blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
132 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
20d88e5528cd17a847322906505da537d35e47d5
1aef4669e891333de303db570c7a690c122eb7dd
/src/main/java/com/alipay/api/domain/EntityPriorRiskVO.java
200900bce2b7ea9572bd01b9c32272e2de171b99
[ "Apache-2.0" ]
permissive
fossabot/alipay-sdk-java-all
b5d9698b846fa23665929d23a8c98baf9eb3a3c2
3972bc64e041eeef98e95d6fcd62cd7e6bf56964
refs/heads/master
2020-09-20T22:08:01.292795
2019-11-28T08:12:26
2019-11-28T08:12:26
224,602,331
0
0
Apache-2.0
2019-11-28T08:12:26
2019-11-28T08:12:25
null
UTF-8
Java
false
false
1,583
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 风险信息明细 * * @author auto create * @since 1.0, 2018-09-28 13:52:45 */ public class EntityPriorRiskVO extends AlipayObject { private static final long serialVersionUID = 5842168645615311361L; /** * 风险处置源 */ @ApiField("dispose_department") private String disposeDepartment; /** * 风险详情 */ @ApiField("risk_detail") private String riskDetail; /** * 风险级别 */ @ApiField("risk_level") private String riskLevel; /** * 风险场景 */ @ApiField("risk_scene") private String riskScene; /** * 风险类型 */ @ApiField("risk_type") private String riskType; public String getDisposeDepartment() { return this.disposeDepartment; } public void setDisposeDepartment(String disposeDepartment) { this.disposeDepartment = disposeDepartment; } public String getRiskDetail() { return this.riskDetail; } public void setRiskDetail(String riskDetail) { this.riskDetail = riskDetail; } public String getRiskLevel() { return this.riskLevel; } public void setRiskLevel(String riskLevel) { this.riskLevel = riskLevel; } public String getRiskScene() { return this.riskScene; } public void setRiskScene(String riskScene) { this.riskScene = riskScene; } public String getRiskType() { return this.riskType; } public void setRiskType(String riskType) { this.riskType = riskType; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
30d964932cbe808ff8745c577742483b64e8510c
a1c6b5d270d7ff3a2ef8ed048df7480f901d218b
/src/slacklike/FileMessage.java
d1ad37d24e145e0e65bcd99450758987fe89fc62
[]
no_license
galliber/java-android-alpha
51c56c6f2a12ad2cba6e29980fe885a6dbb5c3b7
0192bef26e7084ea79082f207b871a75491ad83e
refs/heads/master
2020-03-19T00:07:46.971444
2018-07-10T11:25:00
2018-07-10T11:25:00
135,455,051
0
0
null
null
null
null
UTF-8
Java
false
false
756
java
package slacklike; public class FileMessage extends Message implements Downloadable{ private String fileName; public FileMessage(String author, String fileName) { super(author); this.fileName=fileName; } @Override public void Download() { System.out.println("Item is downloaded.\n" + "Type: File, Name: "+getFileName()+"Timestamp: "+getTimestamp()); } public String getFileName() { return fileName; } public void setFileName(String fileName) { this.fileName = fileName; } @Override public void show(){ System.out.println("ID: "+getID()+"Type: File Message, Author"+getAuthor()+"File Name: "+getFileName()+" -|"+getTimestamp()); } }
[ "denis.epavlov96@gmail.com" ]
denis.epavlov96@gmail.com
be6cfadfaee7e651b6d12d8151743f452ecfb6ad
db1114568c2893f7766ca1646811608607d0e042
/renrenentity/src/main/java/com/renrentui/renrenentity/req/MyIncomeReq.java
275f46da876affbe4db22a0d4f216caaf274085d
[]
no_license
xiaotou745/et-rrt
ef6d57041a91edf224d86a2a5e7f63d82114d56c
ba84b7f2536603871ac0692f67259daa2dd96be1
refs/heads/master
2021-01-01T05:17:41.195651
2015-11-24T08:35:47
2015-11-24T08:36:12
56,681,334
0
0
null
null
null
null
UTF-8
Java
false
false
332
java
package com.renrentui.renrenentity.req; /** * @Des C端获取用户收入参数实体类 * @Author WangXuDan * @Date 2015年9月28日17:11:18 * @Return */ public class MyIncomeReq { private long userId;//用户Id public long getUserId() { return userId; } public void setUserId(long userId) { this.userId = userId; } }
[ "wang.xudan@etaostars.com" ]
wang.xudan@etaostars.com
fd7d1ed7706b4b75e705a2fe78e8b54044fefeda
b1bae4e06b0832e99919a21e4f803f8a888489e6
/20191023/src/com/banyuan/Test08/Test.java
1e5ac3a149493b13fcc6f21a48b23ccfccd9d139
[]
no_license
devilmancrybaby/JavaCoding
ad2f2ad815fcb1a16820c9a377ad5d285c0baaa0
cace35ca0ddf4956f1002e412b482c828320cdf7
refs/heads/master
2020-08-31T12:20:29.277188
2019-10-31T05:19:35
2019-10-31T05:19:35
218,689,441
0
0
null
null
null
null
UTF-8
Java
false
false
298
java
package com.banyuan.Test08; //单例 饿汉式 public class Test { public static void main(String[] args) { //SingleObject sing=new SingleObject(); 构造函数SingleObject是不可见的 SingleObject instance=SingleObject.getInstance(); instance.showMessage(); } }
[ "a9ydeai@163.com" ]
a9ydeai@163.com
377b453987dedf9acf1c95fb18a7e4ed1ae384bb
2d856265629ada3a296cdc7ebec5500a3406e737
/src/main/java/com/study/design/creational/abstractfactory/imooc/JavaCourseFactory.java
2515303093d237fb56550122e9976314ad064ac5
[]
no_license
RenYuaaa/Design-Pattern
fd671b32f724bb69f160b9fc278334779b52541c
61db44ba078e15482c8bd7eb197dece3981d140c
refs/heads/master
2023-04-04T19:13:49.578475
2021-04-19T16:49:50
2021-04-19T16:49:50
340,100,312
0
0
null
null
null
null
UTF-8
Java
false
false
503
java
package com.study.design.creational.abstractfactory.imooc; /** * @author: renjiahui * @date: 2021-02-22 22:55 * @description: 抽象工厂模式--产品族 * 抽象工厂模式中:横向扩张产品族不会违背开闭原则,扩展较方便 */ public class JavaCourseFactory implements CourseFactory { @Override public Video getVideo() { return new JavaVideo(); } @Override public Article getArticle() { return new JavaArticle(); } }
[ "ren812848195@163.com" ]
ren812848195@163.com
be79f6c020f7816b5218f41098c3c9389a9fba5f
50f38a220f160d508551349630706ad6ab2f3b6d
/testmanage/src/main/java/com/capg/test/dao/QuestionsDAO.java
fc8315670a05d7c9dc020faae4b09ce5b8d940bb
[]
no_license
AmanagantiSaiPhanikumar/new-
57cb9a2bba7aa4f1f00332884e99c0f32cb65376
423469b0d8b4abc1d25bb162b1a6b4b6ee41649e
refs/heads/master
2021-04-07T14:50:33.146714
2020-03-25T14:22:10
2020-03-25T14:22:10
248,684,277
0
0
null
null
null
null
UTF-8
Java
false
false
1,052
java
package com.capg.test.dao; import java.util.Map; import java.util.Set; import com.capg.test.bean.Questions; import com.capg.test.repository.MyRepository; public class QuestionsDAO implements IQuestionsDAO { public int addQuestion(Questions question) { // TODO Auto-generated method stub int add = MyRepository.addQuestion(question); return add; } public int updateQuestion(Questions question, int marks) { // TODO Auto-generated method stub int upd = MyRepository.updateQuestion(question, marks); return upd; } public int deleteQuestion(int questionId) { // TODO Auto-generated method stub int del = MyRepository.deleteQuestion(questionId); return del; } public int getResult(int questionMarks) { int res = MyRepository.getResults(questionMarks); return res; } public Map<Integer, Questions> getMap() { return MyRepository.getMap(); } @Override public Set<Integer> getAllQuestions(int id1) { // TODO Auto-generated method stub return null; } }
[ "ranjit@ARK-PC" ]
ranjit@ARK-PC
72e3c2115d9be878f9ed206ab6ac06d5af901d42
8a6453cd49949798c11f57462d3f64a1fa2fc441
/aws-java-sdk-logs/src/main/java/com/amazonaws/services/logs/model/transform/StartQueryRequestMarshaller.java
ed575a8fddd348476c0a16461dec9a2dac0f8b30
[ "Apache-2.0" ]
permissive
tedyu/aws-sdk-java
138837a2be45ecb73c14c0d1b5b021e7470520e1
c97c472fd66d7fc8982cb4cf3c4ae78de590cfe8
refs/heads/master
2020-04-14T14:17:28.985045
2019-01-02T21:46:53
2019-01-02T21:46:53
163,892,339
0
0
Apache-2.0
2019-01-02T21:38:39
2019-01-02T21:38:39
null
UTF-8
Java
false
false
3,198
java
/* * Copyright 2013-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file 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.amazonaws.services.logs.model.transform; import javax.annotation.Generated; import com.amazonaws.SdkClientException; import com.amazonaws.services.logs.model.*; import com.amazonaws.protocol.*; import com.amazonaws.annotation.SdkInternalApi; /** * StartQueryRequestMarshaller */ @Generated("com.amazonaws:aws-java-sdk-code-generator") @SdkInternalApi public class StartQueryRequestMarshaller { private static final MarshallingInfo<String> LOGGROUPNAME_BINDING = MarshallingInfo.builder(MarshallingType.STRING) .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("logGroupName").build(); private static final MarshallingInfo<Long> STARTTIME_BINDING = MarshallingInfo.builder(MarshallingType.LONG).marshallLocation(MarshallLocation.PAYLOAD) .marshallLocationName("startTime").build(); private static final MarshallingInfo<Long> ENDTIME_BINDING = MarshallingInfo.builder(MarshallingType.LONG).marshallLocation(MarshallLocation.PAYLOAD) .marshallLocationName("endTime").build(); private static final MarshallingInfo<String> QUERYSTRING_BINDING = MarshallingInfo.builder(MarshallingType.STRING) .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("queryString").build(); private static final MarshallingInfo<Integer> LIMIT_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER).marshallLocation(MarshallLocation.PAYLOAD) .marshallLocationName("limit").build(); private static final StartQueryRequestMarshaller instance = new StartQueryRequestMarshaller(); public static StartQueryRequestMarshaller getInstance() { return instance; } /** * Marshall the given parameter object. */ public void marshall(StartQueryRequest startQueryRequest, ProtocolMarshaller protocolMarshaller) { if (startQueryRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(startQueryRequest.getLogGroupName(), LOGGROUPNAME_BINDING); protocolMarshaller.marshall(startQueryRequest.getStartTime(), STARTTIME_BINDING); protocolMarshaller.marshall(startQueryRequest.getEndTime(), ENDTIME_BINDING); protocolMarshaller.marshall(startQueryRequest.getQueryString(), QUERYSTRING_BINDING); protocolMarshaller.marshall(startQueryRequest.getLimit(), LIMIT_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } } }
[ "" ]
034605bbc232f4281b7d32bd87c4251c831d35db
5ca3901b424539c2cf0d3dda52d8d7ba2ed91773
/src_cfr/com/google/security/zynamics/bindiff/graph/helpers/BasicBlockMatchAdder$1.java
8ef150cce3cec40fc96d7810031d6befaee539a1
[]
no_license
fjh658/bindiff
c98c9c24b0d904be852182ecbf4f81926ce67fb4
2a31859b4638404cdc915d7ed6be19937d762743
refs/heads/master
2021-01-20T06:43:12.134977
2016-06-29T17:09:03
2016-06-29T17:09:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
132
java
/* * Decompiled with CFR 0_115. */ package com.google.security.zynamics.bindiff.graph.helpers; class BasicBlockMatchAdder$1 { }
[ "manouchehri@riseup.net" ]
manouchehri@riseup.net
f86e290c979c0d52ca18f1c4a1ee6775e107bde1
2f93508d51fdcd379e568d5f15e20c48d11a5204
/src/main/java/com/example/dto/HelloResponseDto.java
aa7cfc6b4be354ef1be3366c4c3e2bdbed4fc2cc
[]
no_license
JISEON-YANG/corona_pro_map
088fe556ef95080a186854d1242c4a810ed25618
8f93bc5f2c43cd44e8aa9ea5aacc2e1dfbb009ae
refs/heads/master
2023-07-13T15:58:40.241765
2021-08-09T06:48:44
2021-08-09T06:48:44
397,540,491
0
0
null
null
null
null
UTF-8
Java
false
false
217
java
package com.example.dto; import lombok.Getter; import lombok.RequiredArgsConstructor; @Getter @RequiredArgsConstructor public class HelloResponseDto { private final String name; private final int amount; }
[ "omplcie@gmail.com" ]
omplcie@gmail.com
f56a3822799600b6114edb7022b5a33d523c0da4
327fa0dfc68b21202e2ed2a6bace231d80a977e4
/graphe-mobile/gephi/org/gephi/io/data/EdgeDraftImpl.java
101da9e6e391daaf5a678fa061d044212d52c448
[]
no_license
paillardf/IC05_GrapheMobile
b45f9a70aab58205040f8c98856d441770a05158
b9e70d404e131841a7cba07018362a043e1e686a
refs/heads/master
2016-09-06T00:04:02.727638
2016-01-26T21:39:34
2016-01-26T21:39:34
13,592,690
0
0
null
null
null
null
UTF-8
Java
false
false
13,528
java
/* Copyright 2008-2010 Gephi Authors : Mathieu Bastian <mathieu.bastian@gephi.org> Website : http://www.gephi.org This file is part of Gephi. DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. Copyright 2011 Gephi Consortium. All rights reserved. The contents of this file are subject to the terms of either the GNU General Public License Version 3 only ("GPL") or the Common Development and Distribution License("CDDL") (collectively, the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the License at http://gephi.org/about/legal/license-notice/ or /cddl-1.0.txt and /gpl-3.0.txt. See the License for the specific language governing permissions and limitations under the License. When distributing the software, include this License Header Notice in each file and include the License files at /cddl-1.0.txt and /gpl-3.0.txt. If applicable, add the following below the License Header, with the fields enclosed by brackets [] replaced by your own identifying information: "Portions Copyrighted [year] [name of copyright owner]" If you wish your version of this file to be governed by only the CDDL or only the GPL Version 3, indicate your decision by adding "[Contributor] elects to include this software in this distribution under the [CDDL or GPL Version 3] license." If you do not indicate a single choice of license, a recipient has the option to distribute your version of this file under either the CDDL, the GPL Version 3 or to extend the choice of license to its licensees as provided above. However, if you add GPL Version 3 code and therefore, elected the GPL Version 3 license, then the option applies only if the new code is made subject to such option by the copyright holder. Contributor(s): Portions Copyrighted 2011 Gephi Consortium. */ package org.gephi.io.data; import java.util.ArrayList; import java.util.List; import org.gephi.data.attributes.api.AttributeColumn; import org.gephi.data.attributes.api.AttributeRow; import org.gephi.data.attributes.api.AttributeType; import org.gephi.data.attributes.type.DynamicType; import org.gephi.data.attributes.type.Interval; import org.gephi.data.attributes.type.TimeInterval; import org.gephi.data.attributes.type.TypeConvertor; import org.gephi.io.ImportContainerImpl; import org.gephi.io.data.DynamicModel.TimeFormat; import org.gephi.utils.Color; /** * * @author Mathieu Bastian */ public class EdgeDraftImpl implements EdgeDraft, EdgeDraftGetter { //Architecture private final ImportContainerImpl container; //Basic private String id; private String label; //Flag private boolean autoId; //Topology private NodeDraftImpl source; private NodeDraftImpl target; private float weight = 1f; private EdgeType edgeType; //Viz private Color color; private boolean visible = true; //Text private Color labelColor; private float labelSize = -1f; private boolean labelVisible = true; //Attributes private final AttributeRow attributeRow; //Dynamic private TimeInterval timeInterval; public EdgeDraftImpl(ImportContainerImpl container, String id) { this.container = container; this.id = id; this.autoId = true; this.attributeRow = container.getAttributeModel().rowFactory().newEdgeRow(null); } //SETTERS public void setWeight(float weight) { this.weight = weight; } public void setColor(Color color) { this.color = color; } public void setColor(String r, String g, String b) { setColor(Integer.parseInt(r), Integer.parseInt(g), Integer.parseInt(b)); } public void setColor(float r, float g, float b) { r = Math.max(Math.min(r, 1f), 0f); g = Math.max(Math.min(g, 1f), 0f); b = Math.max(Math.min(b, 1f), 0f); setColor(new Color(r, g, b)); } public void setColor(int r, int g, int b) { setColor(r / 255f, g / 255f, b / 255f); } public void setColor(String color) { setColor(Color.getColor(color)); } public void setLabel(String label) { this.label = label; } public void setLabelSize(float size) { this.labelSize = size; } public void setLabelVisible(boolean labelVisible) { this.labelVisible = labelVisible; } public void setLabelColor(Color color) { this.labelColor = color; } public void setLabelColor(String r, String g, String b) { setColor(Integer.parseInt(r), Integer.parseInt(g), Integer.parseInt(b)); } public void setLabelColor(float r, float g, float b) { r = Math.max(Math.min(r, 1f), 0f); g = Math.max(Math.min(g, 1f), 0f); b = Math.max(Math.min(b, 1f), 0f); setColor(new Color(r, g, b)); } public void setLabelColor(int r, int g, int b) { setColor(r / 255f, g / 255f, b / 255f); } public void setLabelColor(String color) { setColor(Color.getColor(color)); } public void setVisible(boolean visible) { this.visible = visible; } public void setType(EdgeType edgeType) { this.edgeType = edgeType; } public void setId(String id) { this.id = id; this.autoId = false; } public void setSource(NodeDraft nodeSource) { this.source = (NodeDraftImpl) nodeSource; } public void setTarget(NodeDraft nodeTarget) { this.target = (NodeDraftImpl) nodeTarget; } public void addAttributeValue(AttributeColumn column, Object value) { if (column.getType().isDynamicType() && !(value instanceof DynamicType)) { if (value instanceof String && !column.getType().equals(AttributeType.DYNAMIC_STRING)) { //Value needs to be parsed value = TypeConvertor.getStaticType(column.getType()).parse((String) value); } //Wrap value in a dynamic type value = DynamicUtilities.createDynamicObject(column.getType(), new Interval(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, value)); } attributeRow.setValue(column, value); } public void addAttributeValue(AttributeColumn column, Object value, String dateFrom, String dateTo) throws IllegalArgumentException { addAttributeValue(column, value, dateFrom, dateTo, false, false); } public void addAttributeValue(AttributeColumn column, Object value, String dateFrom, String dateTo, boolean startOpen, boolean endOpen) throws IllegalArgumentException { if (!column.getType().isDynamicType()) { throw new IllegalArgumentException("The column must be dynamic"); } Double start = Double.NEGATIVE_INFINITY; Double end = Double.POSITIVE_INFINITY; if (dateFrom != null && !dateFrom.isEmpty()) { try { if (container.getTimeFormat().equals(TimeFormat.DATETIME)) { start = DynamicUtilities.getDoubleFromXMLDateTimeString(dateFrom); } else if (container.getTimeFormat().equals(TimeFormat.DATE)) { start = DynamicUtilities.getDoubleFromXMLDateString(dateFrom); } else if (container.getTimeFormat().equals(TimeFormat.TIMESTAMP)) { start = Double.parseDouble(dateFrom + "000"); } else { start = Double.parseDouble(dateFrom); } } catch (Exception ex) { throw new IllegalArgumentException("ImportContainerException_TimeInterval_ParseError"); } } if (dateTo != null && !dateTo.isEmpty()) { try { if (container.getTimeFormat().equals(TimeFormat.DATETIME)) { end = DynamicUtilities.getDoubleFromXMLDateTimeString(dateTo); } else if (container.getTimeFormat().equals(TimeFormat.DATE)) { end = DynamicUtilities.getDoubleFromXMLDateString(dateTo); } else if (container.getTimeFormat().equals(TimeFormat.TIMESTAMP)) { end = Double.parseDouble(dateTo + "000"); } else { end = Double.parseDouble(dateTo); } } catch (Exception ex) { throw new IllegalArgumentException("ImportContainerException_TimeInterval_ParseError"); } } if ((start == null && end == null) || (start == Double.NEGATIVE_INFINITY && end == Double.POSITIVE_INFINITY)) { throw new IllegalArgumentException("ImportContainerException_TimeInterval_Empty"); } if (value instanceof String && !column.getType().equals(AttributeType.DYNAMIC_STRING)) { //Value needs to be parsed value = TypeConvertor.getStaticType(column.getType()).parse((String) value); } Object sourceVal = attributeRow.getValue(column); if (sourceVal != null && sourceVal instanceof DynamicType) { value = DynamicUtilities.createDynamicObject(column.getType(), (DynamicType) sourceVal, new Interval(start, end, startOpen, endOpen, value)); } else if (sourceVal != null && !(sourceVal instanceof DynamicType)) { List<Interval> intervals = new ArrayList<Interval>(2); intervals.add(new Interval(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY, sourceVal)); intervals.add(new Interval(start, end, startOpen, endOpen, value)); value = DynamicUtilities.createDynamicObject(column.getType(), intervals); } else { value = DynamicUtilities.createDynamicObject(column.getType(), new Interval(start, end, startOpen, endOpen, value)); } attributeRow.setValue(column, value); } public void addTimeInterval(String dateFrom, String dateTo) throws IllegalArgumentException { addTimeInterval(dateFrom, dateTo, false, false); } public void addTimeInterval(String dateFrom, String dateTo, boolean startOpen, boolean endOpen) throws IllegalArgumentException { if (timeInterval == null) { timeInterval = new TimeInterval(); } Double start = null; Double end = null; if (dateFrom != null && !dateFrom.isEmpty()) { try { if (container.getTimeFormat().equals(TimeFormat.DATE)) { start = DynamicUtilities.getDoubleFromXMLDateString(dateFrom); } else if (container.getTimeFormat().equals(TimeFormat.DATETIME)) { start = DynamicUtilities.getDoubleFromXMLDateTimeString(dateFrom); } else if (container.getTimeFormat().equals(TimeFormat.TIMESTAMP)) { start = Double.parseDouble(dateFrom + "000"); } else { start = Double.parseDouble(dateFrom); } } catch (Exception ex) { throw new IllegalArgumentException("ImportContainerException_TimeInterval_ParseError"); } } if (dateTo != null && !dateTo.isEmpty()) { try { if (container.getTimeFormat().equals(TimeFormat.DATE)) { end = DynamicUtilities.getDoubleFromXMLDateString(dateTo); } else if (container.getTimeFormat().equals(TimeFormat.DATETIME)) { end = DynamicUtilities.getDoubleFromXMLDateTimeString(dateTo); } else if (container.getTimeFormat().equals(TimeFormat.TIMESTAMP)) { end = Double.parseDouble(dateTo + "000"); } else { end = Double.parseDouble(dateTo); } } catch (Exception ex) { throw new IllegalArgumentException("ImportContainerException_TimeInterval_ParseError"); } } if (start == null && end == null) { throw new IllegalArgumentException("ImportContainerException_TimeInterval_Empty"); } timeInterval = new TimeInterval(timeInterval, start != null ? start : Double.NEGATIVE_INFINITY, end != null ? end : Double.POSITIVE_INFINITY, startOpen, endOpen); } public void setTimeInterval(TimeInterval timeInterval) { this.timeInterval = timeInterval; } //GETTERS public AttributeRow getAttributeRow() { return attributeRow; } public NodeDraftImpl getSource() { return source; } public NodeDraftImpl getTarget() { return target; } public Color getColor() { return color; } public String getId() { return id; } public String getLabel() { return label; } public float getLabelSize() { return labelSize; } public boolean isLabelVisible() { return labelVisible; } public Color getLabelColor() { return labelColor; } public float getWeight() { return weight; } public EdgeType getType() { return edgeType; } public boolean isVisible() { return visible; } public boolean isAutoId() { return autoId; } public TimeInterval getTimeInterval() { return timeInterval; } @Override public String toString() { String res = "edge"; if (!autoId) { res += " id=" + id; } else if (label != null) { res += " label=" + label; } else { res += id; } return res; } }
[ "dev@sertook.com" ]
dev@sertook.com
d207322cf1a1265c8828a8fc5c7c6807e1679714
2879d0e7f4b2ac1cd15cfbbcb3932beaad87f767
/jmetal-exec/src/main/java/org/uma/jmetal45/experiment/NSGAIIExperimentRunner.java
e35307975c4a44791c4caafc8082d8866d5f830d
[]
no_license
jfrchicanog/jMetal
c0c457ad05bafaa52946c662f20362b72d50448b
fe3b0065be449a9ca00e970a6e4c50c0f6049fbe
refs/heads/master
2021-01-09T06:54:09.720671
2014-10-26T09:05:56
2014-10-26T09:05:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,247
java
// NSGAIIExperimentRunner.java // // Author: // Antonio J. Nebro <antonio@lcc.uma.es> // // Copyright (c) 2014 Antonio J. Nebro // // This program 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 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 Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see <http://www.gnu.org/licenses/>. package org.uma.jmetal45.experiment; import org.uma.jmetal45.experiment.experimentoutput.*; import org.uma.jmetal45.util.JMetalException; import java.io.IOException; /** * The class defines a jMetal experiment with the following features * - Algorithms: four variants of NSGA-II (each of them having a different crossover setProbability * - The zdt suite is solved * - The reference Pareto fronts are unknown and have to be computed * - The algorithm variant settings are read from properties files by using this method in the * AlgorithmExecution object: * .setUseAlgorithmConfigurationFiles() */ public class NSGAIIExperimentRunner { public static void main(String[] args) throws JMetalException, IOException { ExperimentData experimentData = new ExperimentData.Builder("NSGAIIStudy") .setAlgorithmNameList(new String[] {"NSGAII", "NSGAIIb", "NSGAIIc", "NSGAIId"}) .setProblemList(new String[] {"ZDT1", "ZDT2", "ZDT3", "ZDT4", "ZDT6"}) .setExperimentBaseDirectory("/Users/antelverde/Softw/jMetal/jMetalGitHub/pruebas") .setOutputParetoFrontFileName("FUN") .setOutputParetoSetFileName("VAR") .setIndependentRuns(4) .build() ; AlgorithmExecution algorithmExecution = new AlgorithmExecution.Builder(experimentData) .setNumberOfThreads(8) .setParetoSetFileName("VAR") .setParetoFrontFileName("FUN") .setUseAlgorithmConfigurationFiles() .build() ; ParetoFrontsGeneration paretoFrontsGeneration = new ParetoFrontsGeneration.Builder(experimentData) .build() ; String[] indicatorList = new String[]{"HV", "IGD", "EPSILON", "SPREAD", "GD"} ; QualityIndicatorGeneration qualityIndicatorGeneration = new QualityIndicatorGeneration.Builder(experimentData) .setParetoFrontDirectory("/Users/antelverde/Softw/pruebas/data/paretoFronts") .setParetoFrontFiles(new String[] {"ZDT1.pf", "ZDT2.pf", "ZDT3.pf", "ZDT4.pf", "ZDT6.pf"}) .setQualityIndicatorList(indicatorList) .build() ; SetCoverageTableGeneration setCoverageTables = new SetCoverageTableGeneration.Builder(experimentData) .build() ; BoxplotGeneration boxplotGeneration = new BoxplotGeneration.Builder(experimentData) .setIndicatorList(indicatorList) .setNumberOfRows(3) .setNumberOfColumns(2) .build() ; WilcoxonTestTableGeneration wilcoxonTestTableGeneration = new WilcoxonTestTableGeneration.Builder(experimentData) .setIndicatorList(indicatorList) .build() ; QualityIndicatorLatexTableGeneration qualityIndicatorLatexTableGeneration = new QualityIndicatorLatexTableGeneration.Builder(experimentData) .setIndicatorList(indicatorList) .build() ; FriedmanTableGeneration friedmanTableGeneration = new FriedmanTableGeneration.Builder(experimentData) .setIndicatorList(indicatorList) .build() ; Experiment experiment = new Experiment.Builder(experimentData) .addExperimentOutput(algorithmExecution) .addExperimentOutput(paretoFrontsGeneration) .addExperimentOutput(qualityIndicatorGeneration) .addExperimentOutput(setCoverageTables) .addExperimentOutput(boxplotGeneration) .addExperimentOutput(wilcoxonTestTableGeneration) .addExperimentOutput(qualityIndicatorLatexTableGeneration) .addExperimentOutput(friedmanTableGeneration) .build() ; experiment.run(); } }
[ "ajnebro@outlook.com" ]
ajnebro@outlook.com
692bca1d6c1cc7a7119a48ce0877471e55208164
c9f1cc00a2b149fa28fc080ca74805a2fc9d6da5
/mvp/src/main/java/cn/love/model/dao/DataBaseHelper.java
0e5a4edc2812149e2d0496773513e6538a7231b5
[ "MIT" ]
permissive
ContentValues/M_Mvp
013fea4ae565cab40d1e966d1b384a1405054f9c
3205fcdfb9dd048f1c06fc1afb6afb8e6dbe68a3
refs/heads/master
2020-08-14T20:50:43.533204
2020-01-13T07:34:43
2020-01-13T07:34:43
215,230,940
0
0
null
null
null
null
UTF-8
Java
false
false
247
java
package cn.love.model.dao; import android.content.Context; /** * Created by admin on 2017/3/10. */ public class DataBaseHelper { private Context context; public DataBaseHelper(Context context) { this.context = context; } }
[ "736126375@qq.com" ]
736126375@qq.com
cd262d30700dfcb2cbf4dd3313adad3f90201845
548a1fc738cea6887a1244bf93a97f7ca15335ce
/GitHubUser/app/src/main/java/demo/com/githubuser/ui/common/main/fragment/github_user_fragment/presenter/GithubUserPresenterImp.java
a24d2387edda2f413a1e99c1c4782a8802f75644
[]
no_license
mahavir9008/HomeProject
5abad96fe593a85fcf4e67291c7f12fc01678760
3665ef068d92079a7a1bfc92a9ace68533f25c33
refs/heads/master
2020-03-17T11:23:14.810243
2018-05-15T17:24:19
2018-05-15T17:24:19
133,549,500
0
0
null
null
null
null
UTF-8
Java
false
false
3,270
java
package demo.com.githubuser.ui.common.main.fragment.github_user_fragment.presenter; import android.os.Bundle; import android.support.annotation.Nullable; import android.util.Log; import java.util.List; import javax.inject.Inject; import demo.com.githubuser.inject.scope.PerFragment; import demo.com.githubuser.model.GitHubUser; import demo.com.githubuser.persistence.database.AppDatabase; import demo.com.githubuser.ui.common.main.fragment.github_user_fragment.GitHubUserFragmentListener; import demo.com.githubuser.ui.common.presenter.BasePresenter; import demo.com.githubuser.util.NetworkError; import demo.com.githubuser.util.Service; import io.reactivex.Completable; import io.reactivex.CompletableObserver; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.disposables.CompositeDisposable; import io.reactivex.disposables.Disposable; import io.reactivex.schedulers.Schedulers; @PerFragment public final class GithubUserPresenterImp extends BasePresenter<GitHubUserFragmentListener> implements GitHubUserPresenterView { @Inject public Service service; @Inject public CompositeDisposable compositeDisposable; @Inject GitHubUserFragmentListener gitHubUserFragmentListener; @Inject AppDatabase appDatabase; @Inject GithubUserPresenterImp(GitHubUserFragmentListener gitHubUserFragmentListener) { super(gitHubUserFragmentListener); } @Override public void onStart(@Nullable Bundle savedInstanceState) { super.onStart(savedInstanceState); service.getforumDataList(new Service.GetForumListCallback() { @Override public void onSuccess(List<GitHubUser> combineData) { addtoDB(combineData); Log.v("Data came", "onsucess Gituserpresnet"); // appDatabase.tableGithubUserDao().insert(combineData); //Log.v("datais ..........", "" + appDatabase.tableGithubUserDao().pokemonsCount()); // gitHubUserFragmentListener.onGetData(combineData); } @Override public void onError(NetworkError networkError) { Log.v("Data came", "onerror Gituserpresnet"); } }); } @Override public void onResume() { super.onResume(); Log.v("on god", "on resume from GithubUserPresenterImp"); } @Override public void onDataCame() { } private void addtoDB(List<GitHubUser> combineData) { Completable.fromAction(() -> appDatabase.tableGithubUserDao().insert(combineData)) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .subscribe(new CompletableObserver() { @Override public void onSubscribe(Disposable d) { } @Override public void onComplete() { Log.v("on god", "data successfull"); gitHubUserFragmentListener.onGetData(); } @Override public void onError(Throwable e) { Log.v("on god", "data error"); } }); } }
[ "mahavir9008@gmail.com" ]
mahavir9008@gmail.com
e4c4da81114b813d9680bad32337ee8c5119bee2
a57d8bf94ca13ae05837412cf2ab2fe19dd7d3f6
/src/day14_Switch_Recap/SwitchStatemntPractice.java
19e1923aad08c36c700b1199e2e20c67f98bc7c5
[]
no_license
SerdarAnnakurdov/myAllFilesCybertek
1bdeb3feba7664f6346bf3a4f62ae825a54ccbe9
61260280d14d841cf02e1df8981c0f602ea0dd73
refs/heads/master
2023-02-23T09:57:30.270111
2021-02-01T21:31:33
2021-02-01T21:31:33
333,541,067
0
0
null
null
null
null
UTF-8
Java
false
false
300
java
package day14_Switch_Recap; public class SwitchStatemntPractice { public static void main(String[] args) { int a = 12; String b ="a"; switch (a){ case 12: b="asd"; default: b="aaa"; } System.out.println(b); } }
[ "serjonchik@gmail.com" ]
serjonchik@gmail.com
76b35a2e67b0e7336e004c6d6b5cf86d4f40bc82
abcce68b2f22e17c68bc1a6313a17ffaf4395b36
/naicha_system/src/main/java/com/fan/system/modules/app/mapper/OrderInfoAdminMapper.java
04e6898bf2d10a72b04d45a9b609701ccf4ce6a2
[]
no_license
Fan-Git/study_springcloud
d0892ed3fdee2f3ff0dc0a206b8d1debee9f5b50
477a2b123bfec072b35e3a21087c15e6873d492f
refs/heads/master
2023-04-21T23:08:10.920492
2021-05-25T12:15:18
2021-05-25T12:15:18
370,680,992
0
0
null
null
null
null
UTF-8
Java
false
false
1,196
java
package com.fan.system.modules.app.mapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.fan.common.entity.app.OrderInfo; import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Update; import java.util.List; /** * 订单 */ public interface OrderInfoAdminMapper extends BaseMapper<OrderInfo> { // 更新订单状态和微信交易号 @Update("UPDATE order_info SET order_status = #{param3}, " + " wx_pay_transaction_id = #{param2}, pay_price=#{param4}, pay_time=#{param5} \n" + " WHERE order_no = #{param1}; ") void updateOrderStatus(String orderNo, String wxPayTransactionId, String orderStatus, Integer payPrice, String payTime); // 通过微信交易号查找微信订单号 @Select("SELECT order_no FROM order_info where wx_pay_transaction_id is null order by create_time limit #{param1}; ") List<String> selectOrderNoByWxPayTransactionId(int limit); // 删除没有支付的订单 @Delete("delete from order_info where order_status = #{param1} or wx_pay_transaction_id is null; ") void deleteOrderNotPay(String orderStatus); }
[ "fan691567915@outllok.com" ]
fan691567915@outllok.com
e670b7ecdbbeab2bdd64db297a2c2d8fc648ebb8
cfdfea445f98c0950c4240a6ca299fc547ef4f2a
/StarClub/src/com/mycom/lib/gesture/imageview/MoveAnimationListener.java
84e20e5d2163079ef8e91be8d8d391b91187fdc9
[]
no_license
Wings1986/StarClub-Android
7d9413d4b7d20ee9b5c627f110311638f81809a3
78ba257b9b43ec4e0a556b0c576dcbf6c6fe2a4c
refs/heads/master
2021-01-10T14:37:29.851748
2015-11-30T16:40:52
2015-11-30T16:40:52
47,131,987
0
0
null
null
null
null
UTF-8
Java
false
false
768
java
/* * Copyright (c) 2012 Jason Polites * * 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.mycom.lib.gesture.imageview; /** * @author Jason Polites * */ public interface MoveAnimationListener { public void onMove(float x, float y); }
[ "wings1986@outlook.com" ]
wings1986@outlook.com
7f96c78bdfb9d87d696f853db086ab9414637861
f358bec21b8a4c898d3cd8018aab8e4aa01ad86c
/src/main/java/net/kimleo/hjk/collect/MapKit.java
a9a59bd96a8eec3cd0b69d5224a23cc58bc5c615
[]
no_license
uazw/hjkit
2380299fee4cbc827f760b91dd0bbdf0cdb305bb
ee045021493e37537f9fe732d4680bea82591fb3
refs/heads/master
2021-01-15T08:32:28.359949
2014-04-02T15:10:27
2014-04-02T15:10:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
707
java
package net.kimleo.hjk.collect; import net.kimleo.hjk.internal.Mapp; import java.util.Arrays; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; public class MapKit { public static <K, V> Mapp<K, V> from(List<K> keys, List<V> values) { Map<K, V> kvMap = new LinkedHashMap<>(); for (int i = 0; i < keys.size(); i++) { if (i < values.size()) kvMap.put(keys.get(i), values.get(i)); else kvMap.put(keys.get(i), null); } return new Mapp<>(kvMap); } public static <K, V> Mapp<K, V> from(K[] keys, V[] values) { return from(Arrays.asList(keys), Arrays.asList(values)); } }
[ "kenpusney@gmail.com" ]
kenpusney@gmail.com
72c98aa969f978d795fecda2e0a853b0a476e64e
8e492584cc149a0e2ae4fbf01690a296d8de9ef4
/jsf-frontend/src/main/java/br/com/harisson/jsffrontend/custom/CustomRestTemplate.java
e0ca47792cc2ca54fd24ea90b05a502daa923ca8
[]
no_license
HarissonNascimento/chunin-exam-with-microservices
5156579fe6e11ea3e04f5fbbd8714edf2247c90b
d7d8c3485112b9a4b321a8be60b58b9121b16670
refs/heads/master
2023-01-21T12:16:41.212122
2020-11-26T02:56:37
2020-11-26T02:56:37
299,993,286
3
1
null
null
null
null
UTF-8
Java
false
false
352
java
package br.com.harisson.jsffrontend.custom; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; import org.springframework.web.client.RestTemplate; public class CustomRestTemplate extends RestTemplate { public CustomRestTemplate() { this.setRequestFactory(new HttpComponentsClientHttpRequestFactory()); } }
[ "harisson.nas@gmail.com" ]
harisson.nas@gmail.com
5e533aa14f46447f90951957daa410a8d820528f
906422826cd43b94dbc94b76a40ea2d16f90eb49
/src/main/java/be/jpaSchoolOut/Proj/data/ExamRepository.java
6db047eb3b20977ef75d1f98dd509fcee721effa
[]
no_license
lavanya1989-2014/SchoolsOut.jpa
bd02806b04b7bd97d50f4b2a99b9ceacbb297865
ee39a7fd304435631879f8bb262e67655cae08f2
refs/heads/master
2022-12-17T22:53:47.549575
2020-09-08T10:36:57
2020-09-08T10:36:57
292,364,946
0
0
null
null
null
null
UTF-8
Java
false
false
4,578
java
package be.jpaSchoolOut.Proj.data; import be.jpaSchoolOut.Proj.model.Exam; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence.EntityTransaction; import javax.persistence.Persistence; import java.util.List; public class ExamRepository { public void createExam(Exam exam) { EntityManagerFactory entityManagerFactory = EntityFactory.getConnection(); EntityManager entityManager = entityManagerFactory.createEntityManager(); EntityTransaction entityTransaction = null; try { entityTransaction = entityManager.getTransaction(); entityTransaction.begin(); entityManager.persist(exam); entityManager.getTransaction().commit(); } catch (RuntimeException e) { if(entityTransaction.isActive()) entityTransaction.rollback(); throw e; } } public void updateExam(Exam exam) { EntityManagerFactory entityManagerFactory = EntityFactory.getConnection(); EntityManager entityManager = entityManagerFactory.createEntityManager(); EntityTransaction entityTransaction = null; try { entityTransaction = entityManager.getTransaction(); entityTransaction.begin(); entityManager.merge(exam); entityManager.getTransaction().commit(); } catch (RuntimeException e) { if(entityTransaction.isActive()) entityTransaction.rollback(); throw e; } } /*public Exam getExambyId(long id) { EntityManagerFactory entityManagerFactory = EntityFactory.getConnection(); EntityManager entityManager = entityManagerFactory.createEntityManager(); EntityTransaction entityTransaction = null; Exam exam = null; try { entityTransaction = entityManager.getTransaction(); entityTransaction.begin(); exam = entityManager.find(Exam.class,id); entityManager.getTransaction().commit(); } catch (RuntimeException e) { if(entityTransaction.isActive()) entityTransaction.rollback(); throw e; } return exam; }*/ public void delExam(long id) { EntityManagerFactory entityManagerFactory = EntityFactory.getConnection(); EntityManager entityManager = entityManagerFactory.createEntityManager(); EntityTransaction entityTransaction = null; Exam exam = null; try { entityTransaction = entityManager.getTransaction(); entityTransaction.begin(); exam = entityManager.find(exam.getClass(),id); entityManager.remove(exam); entityManager.getTransaction().commit(); } catch (RuntimeException e) { if(entityTransaction.isActive()) entityTransaction.rollback(); throw e; } } /*public List<Exam> getAllExams() { EntityManagerFactory entityManagerFactory = EntityFactory.getConnection(); EntityManager entityManager = entityManagerFactory.createEntityManager(); EntityTransaction entityTransaction = null; List<Exam> exams = null; try { entityTransaction = entityManager.getTransaction(); entityTransaction.begin(); exams = (List<Exam>) entityManager.createQuery("SELECT * FROM EXAM"); entityManager.getTransaction().commit(); } catch (RuntimeException e) { if(entityTransaction.isActive()) entityTransaction.rollback(); throw e; } return exams; }*/ public List<Exam> getSubExams (long id) { EntityManagerFactory entityManagerFactory =EntityFactory.getConnection(); EntityManager entityManager = entityManagerFactory.createEntityManager(); EntityTransaction entityTransaction = null; List<Exam> exams = null; try { entityTransaction = entityManager.getTransaction(); entityTransaction.begin(); exams = (List<Exam>) entityManager.createQuery("Select e from e WHERE id =" + id,Exam.class).getResultList(); entityManager.getTransaction().commit(); } catch (RuntimeException e) { if(entityTransaction.isActive()) entityTransaction.rollback(); throw e; } return exams; } }
[ "lavanya@someemailserver.com" ]
lavanya@someemailserver.com
9f4b38fb775a7f64e530cc9e6a379919ca1aa710
758be29a2187fc6b8ab449cba840881962fe36a0
/Source/src/main/java/uk/ac/lancaster/scc210/game/content/StateManager.java
e5f0d7e7b37ce4957994a22888246f11b6efde5d
[]
no_license
WCollier/SCC210
a151b17eb3861729eb5aa101d8ef4595e825383c
be4f7720c654853a7f1dcae2c72fde4c4a4221cc
refs/heads/main
2023-03-14T15:12:16.539909
2021-03-06T16:22:11
2021-03-06T16:22:11
314,944,946
0
0
null
null
null
null
UTF-8
Java
false
false
687
java
package uk.ac.lancaster.scc210.game.content; import uk.ac.lancaster.scc210.engine.content.ContentManager; import uk.ac.lancaster.scc210.engine.states.State; import uk.ac.lancaster.scc210.game.states.*; /** * The type State manager. */ public class StateManager extends ContentManager<State> { /** * Instantiates a new State manager. */ public StateManager() { super(new MainMenu()); put("main-menu", new MainMenu()); put("completion", new Completion()); put("high-score-list", new HighScoreList()); put("level-select", new LevelSelect()); put("pause", new PauseMenu()); put("help", new Help()); } }
[ "w.collier@lancaster.ac.uk" ]
w.collier@lancaster.ac.uk
040a1d6cd352b3e80f384a9e16cc4291038d41e3
a5400d61d214f237fe7850bbbb32045a7291c1e1
/homework/src/main/java/com/homework/service/impl/UserDetailsServiceImpl.java
735f832f5a87f339af9f91e893fee5f5c968f548
[]
no_license
buraknaroglu/User-Registration
2612943b9bb07519a8a7225747701782168b8875
5b9bb94758df52c4cfbdd6795e98f37d78082329
refs/heads/master
2020-03-30T17:28:57.161431
2018-10-04T05:02:24
2018-10-04T05:02:24
151,457,939
0
0
null
null
null
null
UTF-8
Java
false
false
1,291
java
package com.homework.service.impl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; import com.homework.model.Role; import com.homework.model.User; import com.homework.repository.UserRepository; import java.util.HashSet; import java.util.Set; /** * @author Burak Naroglu */ public class UserDetailsServiceImpl implements UserDetailsService { @Autowired private UserRepository userRepository; @Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { User user = userRepository.findByUserName(username); Set<GrantedAuthority> grantedAuthorities = new HashSet<>(); if (user != null) { for (Role role : user.getRoles()) { grantedAuthorities.add(new SimpleGrantedAuthority(role.getName())); } return new org.springframework.security.core.userdetails.User(user.getUsername(), user.getPassword(), grantedAuthorities); } else { return null; } } }
[ "burak.naroglu@consultant.turkcell.com.tr" ]
burak.naroglu@consultant.turkcell.com.tr
44df387b63bf5367eca71649b8deb8d7b6307b1d
dc4a7a9416bbd5111db2b8a57587c3b069c38cca
/Programs new/Core/src/com/easylearnjava/methodcreation/Demo.java
77c28b7b1425f638c2228af94c4c5de2c82c7c1e
[]
no_license
radhi-ka/Java-Project
bf21be7899ae227ba09b339daf1f52c8cb2f9b0c
646cabe2c3661dc9362aaad4ec85c8b66f24084d
refs/heads/master
2020-04-06T15:47:14.336050
2018-11-14T19:11:30
2018-11-14T19:11:30
157,592,736
0
0
null
null
null
null
UTF-8
Java
false
false
417
java
package com.easylearnjava.methodcreation; public class Demo { public static void main(String[] args) { // TODO Auto-generated method stub Employee emp=new Employee(); emp.sayHello(); //method calling emp.wishUser("raghu"); emp.add(2,2.3f,3.3,11); double output=emp.multiply(12, 11.1); System.out.println(output); System.out.println(emp.multiply(11, 11.2)); System.out.println(emp.sayGoodnight("bramha")); } }
[ "bradhika1394@gmail.com" ]
bradhika1394@gmail.com
2f2e45448a0463e8f8001b8205c9ebfc9586c301
61e465932b5d7f53b653324a6323ce22a500e8c3
/src/test/java/org/objectweb/asm/test/ASMifierTest.java
e5e883c2d2cf83c8c1e80ef943bfc7333e98effe
[]
no_license
txazo/asm
51b27037019ee9cc2bf0c3c80680de87314915c8
c3aaa9f46a80df156e033420394fe1558fe69d44
refs/heads/master
2021-01-20T12:24:18.152810
2017-05-09T07:34:11
2017-05-09T07:34:11
90,358,781
0
0
null
null
null
null
UTF-8
Java
false
false
609
java
package org.objectweb.asm.test; import org.junit.Test; import org.objectweb.asm.util.ASMifier; public class ASMifierTest { private static final String DEBUG = "-debug"; private static final String CLASS_NAME = "org.objectweb.asm.test.Sample"; @Test public void test1() throws Exception { ASMifier.main(new String[]{DEBUG, CLASS_NAME}); } @Test public void test2() throws Exception { String classFile = ASMifierTest.class.getResource("/").getPath() + CLASS_NAME.replaceAll("\\.", "/") + ".class"; ASMifier.main(new String[]{DEBUG, classFile}); } }
[ "784990655@qq.com" ]
784990655@qq.com
98dfa3ffc533e8ff444443afe9d5a187b22d6744
e5cd106e602ae0c7cd3ae49633f96d8682f9af6b
/xmpp-extensions-client/src/main/java/rocks/xmpp/extensions/last/package-info.java
d46af67d48b07c35f3b81cde9b5ffe92a2e7929e
[ "MIT" ]
permissive
jeozey/XmppServerTester
ae312e20ad4fb766f557c6d0a91c7563315e3d52
6b1966c141073ffcfb6998811460e84ec88663b1
refs/heads/master
2021-01-13T04:08:15.082932
2017-01-05T08:41:44
2017-01-05T08:41:44
78,088,280
0
0
null
null
null
null
UTF-8
Java
false
false
1,782
java
/* * The MIT License (MIT) * * Copyright (c) 2014-2016 Christian Schudt * * 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. */ /** * Provides classes for <a href="http://xmpp.org/extensions/xep-0012.html">XEP-0012: Last Activity</a> and <a href="http://xmpp.org/extensions/xep-0256.html">XEP-0256: Last Activity in Presence</a>. * <p> * It defines an XMPP protocol extension for communicating information about the last activity associated with an XMPP entity. It is typically used by an IM client to retrieve the most recent presence information from an offline contact by sending a last activity request to the server that hosts the account controlled by the contact. * </p> */ package rocks.xmpp.extensions.last;
[ "18960868232@189.cn" ]
18960868232@189.cn
79a6490d59c4a661b8d42e3b49ca70640f5aa96c
7ad843a5b11df711f58fdb8d44ed50ae134deca3
/JDK/JDK1.8/src/javax/xml/stream/XMLStreamConstants.java
8386e87c7189839bc00766c973a49fbdf1acc465
[ "MIT" ]
permissive
JavaScalaDeveloper/java-source
f014526ad7750ad76b46ff475869db6a12baeb4e
0e6be345eaf46cfb5c64870207b4afb1073c6cd0
refs/heads/main
2023-07-01T22:32:58.116092
2021-07-26T06:42:32
2021-07-26T06:42:32
362,427,367
0
0
null
null
null
null
UTF-8
Java
false
false
2,675
java
/* * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package javax.xml.stream; /** * This interface declares the constants used in this API. * Numbers in the range 0 to 256 are reserved for the specification, * user defined events must use event codes outside that range. * * @since 1.6 */ public interface XMLStreamConstants { /** * Indicates an event is a start element * @see javax.xml.stream.events.StartElement */ public static final int START_ELEMENT=1; /** * Indicates an event is an end element * @see javax.xml.stream.events.EndElement */ public static final int END_ELEMENT=2; /** * Indicates an event is a processing instruction * @see javax.xml.stream.events.ProcessingInstruction */ public static final int PROCESSING_INSTRUCTION=3; /** * Indicates an event is characters * @see javax.xml.stream.events.Characters */ public static final int CHARACTERS=4; /** * Indicates an event is a comment * @see javax.xml.stream.events.Comment */ public static final int COMMENT=5; /** * The characters are white space * (see [XML], 2.10 "White Space Handling"). * Events are only reported as SPACE if they are ignorable white * space. Otherwise they are reported as CHARACTERS. * @see javax.xml.stream.events.Characters */ public static final int SPACE=6; /** * Indicates an event is a start document * @see javax.xml.stream.events.StartDocument */ public static final int START_DOCUMENT=7; /** * Indicates an event is an end document * @see javax.xml.stream.events.EndDocument */ public static final int END_DOCUMENT=8; /** * Indicates an event is an entity reference * @see javax.xml.stream.events.EntityReference */ public static final int ENTITY_REFERENCE=9; /** * Indicates an event is an attribute * @see javax.xml.stream.events.Attribute */ public static final int ATTRIBUTE=10; /** * Indicates an event is a DTD * @see javax.xml.stream.events.DTD */ public static final int DTD=11; /** * Indicates an event is a CDATA section * @see javax.xml.stream.events.Characters */ public static final int CDATA=12; /** * Indicates the event is a namespace declaration * * @see javax.xml.stream.events.Namespace */ public static final int NAMESPACE=13; /** * Indicates a Notation * @see javax.xml.stream.events.NotationDeclaration */ public static final int NOTATION_DECLARATION=14; /** * Indicates a Entity Declaration * @see javax.xml.stream.events.NotationDeclaration */ public static final int ENTITY_DECLARATION=15; }
[ "panzha@dian.so" ]
panzha@dian.so
c660fae0d3bfda1c590bedb221b6569bdab93577
7c05fdd77ff229bda042b208351bd908aabcb169
/app/src/androidTest/java/com/gbmaniac/smartdashboard/StreamMotor.java
96cc56dd60762ce30d879164da7e3e8cf75855d4
[]
no_license
idedevteam/Unittest
b4f31184cbab722f053cd333967fda85d463ad60
37487ac898e93a4cd7d0efd9555cb123dbfa5e09
refs/heads/master
2020-04-18T11:21:05.066686
2019-01-25T06:31:56
2019-01-25T06:31:56
167,497,099
0
0
null
null
null
null
UTF-8
Java
false
false
1,918
java
package com.gbmaniac.smartdashboard; import android.os.SystemClock; import android.support.test.annotation.UiThreadTest; import android.support.test.rule.ActivityTestRule; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import static android.support.test.espresso.Espresso.onView; import static android.support.test.espresso.action.ViewActions.click; import static android.support.test.espresso.matcher.ViewMatchers.withId; import static android.support.test.internal.runner.junit4.statement.UiThreadStatement.runOnUiThread; import static java.lang.Integer.parseInt; import static org.junit.Assert.*; public class StreamMotor { DockingActivity activity; @Rule public ActivityTestRule<DockingActivity> mDockingActivity = new ActivityTestRule<DockingActivity>(DockingActivity.class); @UiThreadTest @Before public void setUp(){ activity = mDockingActivity.getActivity(); } @Test public void nilaiMaksimum(){ onView(withId(R.id.on_off_button)).perform(click()); //thread untuk inisialisasi view untuk menampilkan data inverter try { runOnUiThread(new Runnable() { @Override public void run() { byte[] buffer = new byte[]{0x14, (byte) 0x3C, (byte) 0x3C, (byte) 0x3C, (byte) 0x00}; mDockingActivity.getActivity().getData(buffer); SystemClock.sleep(100); } }); } catch (Throwable throwable) { throwable.printStackTrace(); } //kirim data selama 30 menit dengan keadaan battery minimum dari kecil ke besar for(int i=0; i<18000; i++) { byte[] buffer1 = new byte[]{0x14, (byte) 0x3C, (byte) 0x3C, (byte) 0x3C, (byte) 0x00}; mDockingActivity.getActivity().getData(buffer1); SystemClock.sleep(100); } } }
[ "alifiannisa2002@gmail.com" ]
alifiannisa2002@gmail.com
f42138bab8fb5479bd9a89b5f429cebbd1e06576
ec6039147010bb00d19836aa359d4ea8f577d257
/src/com/alibaba/alisecuritycenter/aliprivacyspace/db/DataTable.java
2e1337399099d4f2cd9062ac78ee34e76e08a090
[]
no_license
linkun199011/AliSecurityCenter
2f14e296d5ddc0c6cfeb8483caa40dfb50233ebe
fe52f526659d608110b18dd97e9a6fe48267abe0
HEAD
2016-09-06T00:21:59.111269
2015-07-20T02:30:55
2015-07-20T02:30:55
39,358,368
0
1
null
null
null
null
WINDOWS-1258
Java
false
false
6,526
java
package com.alibaba.alisecuritycenter.aliprivacyspace.db; public class DataTable { public static final String TABLE_NAME = "data"; public static final String _ID = "_id"; public static final String MIMETYPE = "mimetype"; public static final String RAW_CONTACT_ID = "raw_contact_id"; //public static final String IS_READ_ONLY = "is_read_only"; public static final String IS_PRIMARY = "is_primary"; public static final String IS_SUPER_PRIMARY = "is_super_primary"; public static final String DATA_VERSION = "data_version"; public static final String DATA1 = "data1"; public static final String DATA2 = "data2"; public static final String DATA3 = "data3"; public static final String DATA4 = "data4"; public static final String DATA5 = "data5"; public static final String DATA6 = "data6"; public static final String DATA7 = "data7"; public static final String DATA8 = "data8"; public static final String DATA9 = "data9"; public static final String DATA10 = "data10"; public static final String DATA11 = "data11"; public static final String DATA12 = "data12"; public static final String DATA13 = "data13"; public static final String DATA14 = "data14"; public static final String DATA15 = "data15"; public static final String DATA_SYNC1 = "data_sync1"; public static final String DATA_SYNC2 = "data_sync2"; public static final String DATA_SYNC3 = "data_sync3"; public static final String DATA_SYNC4 = "data_sync4"; private int _id; private String mimetype; private int raw_contact_id; //private int is_read_only; private int is_primary; private int is_super_primary; private int data_version; private String data1; private String data2; private String data3; private String data4; private String data5; private String data6; private String data7; private String data8; private String data9; private String data10; private String data11; private String data12; private String data13; private String data14; private byte[] data15; private String data_sync1; private String data_sync2; private String data_sync3; private String data_sync4; // getter and setter public int get_id() { return _id; } public void set_id(int _id) { this._id = _id; } public String getMimetype() { return mimetype; } public void setMimetype(String mimetype) { this.mimetype = mimetype; } public int getRaw_contact_id() { return raw_contact_id; } public void setRaw_contact_id(int raw_contact_id) { this.raw_contact_id = raw_contact_id; } public int getIs_primary() { return is_primary; } public void setIs_primary(int is_primary) { this.is_primary = is_primary; } public int getIs_super_primary() { return is_super_primary; } public void setIs_super_primary(int is_super_primary) { this.is_super_primary = is_super_primary; } public int getData_version() { return data_version; } public void setData_version(int data_version) { this.data_version = data_version; } public String getData1() { return data1; } public void setData1(String data1) { this.data1 = data1; } public String getData2() { return data2; } public void setData2(String data2) { this.data2 = data2; } public String getData3() { return data3; } public void setData3(String data3) { this.data3 = data3; } public String getData4() { return data4; } public void setData4(String data4) { this.data4 = data4; } public String getData5() { return data5; } public void setData5(String data5) { this.data5 = data5; } public String getData6() { return data6; } public void setData6(String data6) { this.data6 = data6; } public String getData7() { return data7; } public void setData7(String data7) { this.data7 = data7; } public String getData8() { return data8; } public void setData8(String data8) { this.data8 = data8; } public String getData9() { return data9; } public void setData9(String data9) { this.data9 = data9; } public String getData10() { return data10; } public void setData10(String data10) { this.data10 = data10; } public String getData11() { return data11; } public void setData11(String data11) { this.data11 = data11; } public String getData12() { return data12; } public void setData12(String data12) { this.data12 = data12; } public String getData13() { return data13; } public void setData13(String data13) { this.data13 = data13; } public String getData14() { return data14; } public void setData14(String data14) { this.data14 = data14; } public byte[] getData15() { return data15; } public void setData15(byte[] bs) { this.data15 = bs; } public String getData_sync1() { return data_sync1; } public void setData_sync1(String data_sync1) { this.data_sync1 = data_sync1; } public String getData_sync2() { return data_sync2; } public void setData_sync2(String data_sync2) { this.data_sync2 = data_sync2; } public String getData_sync3() { return data_sync3; } public void setData_sync3(String data_sync3) { this.data_sync3 = data_sync3; } public String getData_sync4() { return data_sync4; } public void setData_sync4(String data_sync4) { this.data_sync4 = data_sync4; } } /* data±í * * CREATE TABLE data * (_id INTEGER PRIMARY KEY AUTOINCREMENT, * package_id INTEGER REFERENCES package(_id), >>>>>>>>>>>NOT ADD * mimetype_id INTEGER REFERENCES mimetype(_id) NOT NULL, * raw_contact_id INTEGER REFERENCES raw_contacts(_id) NOT NULL, * is_read_only INTEGER NOT NULL DEFAULT 0, * is_primary INTEGER NOT NULL DEFAULT 0, * is_super_primary INTEGER NOT NULL DEFAULT 0, * data_version INTEGER NOT NULL DEFAULT 0, * data1 TEXT,data2 TEXT,data3 TEXT,data4 TEXT,data5 TEXT, * data6 TEXT,data7 TEXT,data8 TEXT,data9 TEXT,data10 TEXT, * data11 TEXT,data12 TEXT,data13 TEXT,data14 TEXT,data15 TEXT, * data_sync1 TEXT, data_sync2 TEXT, data_sync3 TEXT, data_sync4 TEXT ); * * */
[ "linkun.lk@alibaba-inc.com" ]
linkun.lk@alibaba-inc.com
4ed5e827d91efc81a1be3c4332e68ea434c84034
ed750fb250fd2cab8f47d5c2297a0ea8da81ef59
/src/VO/WebManagerVO.java
9a0040e281a6628aa6e7d4dea13eb97f01945f81
[]
no_license
649433713/HBMSClient
3f7ca3356454b7c6ba98edaae0af4b4c8393ef46
0bb5eafb32264fef0672f30318236fa8ed87f0fa
refs/heads/master
2021-06-07T09:45:54.903390
2016-11-05T00:35:19
2016-11-05T00:35:19
72,847,192
0
0
null
null
null
null
UTF-8
Java
false
false
635
java
package VO; import java.io.Serializable; public class WebManagerVO implements Serializable{ String name; String id; String contactInfo; public WebManagerVO(String n,String i,String cI){ name=n; id=i; contactInfo=cI; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getContactInfo() { return contactInfo; } public void setContactInfo(String contactInfo) { this.contactInfo = contactInfo; } }
[ "649433713@qq.com" ]
649433713@qq.com
92d84c9233a94f4ed6968eb40c24b9222970d47e
edcf16269309d6390064dc59650ea4b0d186dc01
/app/src/main/java/com/polover/hubrakyran/MainActivity.java
881987503711e0b6dc20fc4071d32e79ff948bf8
[]
no_license
hdpolover/rakyanhub
ae57d9fa73b368603fc3539491a716b052ac835d
97c079815be7928b26545e4e60bcb30cdc3b5fc0
refs/heads/master
2023-03-02T04:30:12.606639
2021-02-10T12:02:18
2021-02-10T12:02:18
337,708,938
0
0
null
null
null
null
UTF-8
Java
false
false
1,205
java
package com.polover.hubrakyran; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.TextView; import com.google.android.material.button.MaterialButton; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); TextView signupBtn = findViewById(R.id.signupPageBtn); MaterialButton loginBtn = findViewById(R.id.loginBtn); loginBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(MainActivity.this, DashboardActivity.class); startActivity(intent); } }); signupBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(MainActivity.this, SignupActivity.class); startActivity(intent); } }); } }
[ "hendrapolover@gmail.com" ]
hendrapolover@gmail.com
42850fee74189d96cba22145af439ba5c1836e04
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_8c7c0ed8562382787cb28cf9b028c31892106b5a/PokerCard/2_8c7c0ed8562382787cb28cf9b028c31892106b5a_PokerCard_t.java
ff1fde1d4a1670a01a98c41230b1c45814317e4e
[]
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
409
java
package com.github.kpacha.jkata.pokerhand; public class PokerCard { private String card; public PokerCard(String card) { this.card = card; } public int getNumericValue() { if (card.charAt(0) == 'K') return 12; if (card.charAt(0) == 'Q') return 11; if (card.charAt(0) == 'J') return 10; if (card.charAt(0) == '9') return 9; return 5; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
4559677495b843811d13cf198b2ce2066b78e4ce
6c9a1852426ce7b255a5a05433a66806a927c5d3
/ch05/src/ch05/Ch05Ex01_07.java
994dc3b381fbe492a0fed8def6e26aab2866a346
[]
no_license
LEEWOODO/work_java
f26eee2b6b20508c0bd17500cdbf327cdd188a49
c66024bd09bb5daf4e17b163e41ea2432b92a6e7
refs/heads/master
2020-03-18T03:43:36.400627
2018-06-30T05:21:44
2018-06-30T05:21:44
134,252,624
0
0
null
null
null
null
UTF-8
Java
false
false
3,031
java
package ch05; import java.util.Arrays; import java.util.Scanner; public class Ch05Ex01_07 { public static void main(String[] args) { // TODO Auto-generated method stub Scanner scanner = new Scanner(System.in); /* 내가 한 코드 * * String[] input = scanner.nextLine().split(" "); int[] num = new int[input.length]; int temp = 0; int[] max = new int[num.length]; int[] min = new int[num.length]; int maxResult = 0; int minResult = 0; int j = 0, k = 0; // j는 max용, k는 min용 증감수 for (int i = 0; i < input.length; i++) { num[i] = Integer.parseInt(input[i]); } // 100기준으로 나누끼 for (int i = 0; i < num.length; i++) { if (num[i] - 100 > 0) { // num의 요소가 100이상이면 배열에서 가장 작은 값(MIN)을 찾는다. // min배열에 값들을 저장한다. min[k] = num[i]; k++; } else { // num의 요소가 100미만이면 배열에서 가장 큰 값(MAX)을 찾는다. // max배열에 값들을 저장한다. max[j] = num[i]; j++; } } System.out.println("100이상의 수 min배열 : " + Arrays.toString(min)); System.out.println("100미만의 수 max배열 : " + Arrays.toString(max)); minResult = min[0]; maxResult = max[0]; for (int i = 0; i < min.length; i++) { if (min[i] != 0) { if (minResult > min[i]) { minResult=min[i]; } } } System.out.printf("100이상의 수중 최솟값은: %d%n",minResult); for (int i = 0; i < max.length; i++) { if (max[i] != 0) { if (maxResult < max[i]) { maxResult=max[i]; } } } System.out.printf("100이하의 수중 최대값은: %d%n",maxResult); System.out.printf("%3d %3d",maxResult,minResult);*/ /** * 강사님 코드 */ // 1. 10개의 정수를 입력받기 String numbers[]=scanner.nextLine().split(" "); // 1.1 전체 배열을 검사해서 1이하 10000이상일때 발견되면 프로그램 종료 for(int i=0;i<numbers.length;i++) { int num=Integer.parseInt(numbers[i]); // 만약 1000 이상의 정수가 발견되면 if(!(1<=num&&num<10000)) { // main메소드를 return 시켜 프로그램 종료 System.out.println("1이상 10,000 미만의 정수만 가능"); return; } } // 2. 100미만의 수 중 가장 큰 수를 저장하는 변수 max 선언 int max=100; // 3. 100이상의 수 중 가장 작은 수를 저장하는 변수 min 선언 int min=100; // 4. numbers 배열의 수를 하나씩 꺼내면서 비교하기 for(int i=0;i<numbers.length;i++) { int num=Integer.parseInt(numbers[i]); if(num<100) { if(max==100) { max=num; }else { max=max>num?max:num; } }else { if(min==100) { min=num; }else { min=min<num?min:num; } } } // 5. 출력하기 System.out.printf("MAX: %d, MIN: %d", max,min); } }
[ "KOITT@KOITT-PC" ]
KOITT@KOITT-PC
18458f1a1e8dc4a553d823314f5a7ca4ced4b1e2
3657b6f5b30ac061e2ab1db7cd745e2ca8183af3
/homeProject/src/com/house/framework/commons/conf/DictConstant.java
23ae6ebe177e019e2b91660bf7d72d68ffcbd54c
[]
no_license
Lxt000806/eclipse_workspace
b25f4f81bd0aa6f8d55fc834dd09cdb473af1f3f
04376681ec91c3f8dbde2908d35612c4842a868c
refs/heads/main
2023-05-23T12:05:26.989438
2021-06-13T05:49:26
2021-06-13T05:49:26
376,452,726
0
0
null
null
null
null
UTF-8
Java
false
false
3,737
java
package com.house.framework.commons.conf; /** * 引用字典CODE常量 */ public final class DictConstant { private DictConstant(){}; //--------------------FTP 配置信息------------------------ /** 远程FTP 抽像字典CODE ISS 项目使用*/ public final static String ABSTRACT_DICT_FTP_ISS = "ABSTRACT_DICT_FTP_ISS"; /** 远程FTP 抽像字典CODE 测试 项目使用*/ public final static String ABSTRACT_DICT_FTP_TEST = "ABSTRACT_DICT_FTP_TEST"; /** 远程FTP 抽像字典CODE CMS 项目使用*/ public final static String ABSTRACT_DICT_FTP_CMS = "ABSTRACT_DICT_FTP_CMS"; /** 远程 FTP IP */ public final static String DICT_FTP_REMOTE_IP = "DICT_FTP_REMOTE_IP"; /** 远程FTP 端口 */ public final static String DICT_FTP_REMOTE_PORT = "DICT_FTP_REMOTE_PORT"; /** 远程FTP 账号*/ public final static String DICT_FTP_REMOTE_ACCOUNT = "DICT_FTP_REMOTE_ACCOUNT"; /** 远程FTP 密码*/ public final static String DICT_FTP_REMOTE_PASSWORD = "DICT_FTP_REMOTE_PASSWORD"; //-------------------- 菜单类型 [DICT_MENU_TYPE] ------------------------ /**菜单类型字典KEY */ public static final String ABSTRACT_DICT_MENU_TYPE = "ABSTRACT_DICT_MENU_TYPE"; /**tab类型菜单 */ public static final String DICT_MENU_TYPE_TAB = "DICT_MENU_TYPE_TAB"; /**文件夹类型菜单 */ public static final String DICT_MENU_TYPE_FOLDER = "DICT_MENU_TYPE_FOLDER"; /**url链接菜单 */ public static final String DICT_MENU_TYPE_URL = "DICT_MENU_TYPE_URL"; //-------------------- 菜单打开方式 [DICT_MENU_OPEN] ------------------------ /**菜单打开方式字典KEY */ public static final String ABSTRACT_DICT_MENU_OPEN = "ABSTRACT_DICT_MENU_OPEN"; /**全局窗口打开 */ public static final String DICT_MENU_OPEN_FULL = "DICT_MENU_OPEN_FULL"; /**内部窗口打开 */ public static final String DICT_MENU_OPEN_INNER = "DICT_MENU_OPEN_INNER"; //-------------------- 文件上传路径设置 ------------------------ /** 设置上传路径虚节点 */ public static final String ABSTRACT_DICT_UPLOAD_URL = "ABSTRACT_DICT_UPLOAD_URL"; /** 设置kindeditor 上传路径虚节点 */ public static final String DICT_KINDEDITOR_UPLOAD_URL = "DICT_KINDEDITOR_UPLOAD_URL"; /** 设置 swfupload 上传路径虚节点 */ public static final String DICT_SWFUPLOAD_UPLOAD_URL = "DICT_SWFUPLOAD_UPLOAD_URL"; public static final String ABSTRACT_COMPANY_UPLOAD = "ABSTRACT_COMPANY_UPLOAD"; public static final String LOGO_DIR = "LOGO_DIR"; public static final String ICON_DIR = "ICON_DIR"; public static final String BRCODE_DIR = "BRCODE_DIR"; public static final String PHOTO_DIR = "PHOTO_DIR"; public static final String AYH_ACTIVITY_PICTURE_DIR = "AYH_ACTIVITY_PICTURE_DIR"; /** 设置kindeditor 图片上传路径虚节点 */ public static final String UPLOAD_BOXIMAGE_URL = "UPLOAD_BOXIMAGE_URL"; public static final String UPLOAD_ROOT_DIR = "UPLOAD_ROOT_DIR"; public static final String UPLOAD_IP_DIR = "UPLOAD_IP_DIR"; public static final String UPLOAD_ROOT_URL = "UPLOAD_ROOT_DIR"; public static final String UPLOAD_IP_URL = "UPLOAD_IP_DIR"; public static final String UPLOAD_PROTOCOL_URL = "UPLOAD_PROTOCOL_URL"; public static final String UPLOAD_PORT_URL = "UPLOAD_PORT_URL"; public static final String UPLOAD_TEMP_DIR = "UPLOAD_TEMP_DIR"; public static final String AYH_IMAGE_DIR = "AYH_IMAGE_DIR"; public static final String AYH_USERINFO_IMAGE_DIR = "AYH_USERINFO_IMAGE_DIR"; public static final String AYH_OTHER_IMAGE_DIR = "AYH_OTHER_IMAGE_DIR"; public static final String AYH_USERINFO_PHOTO_DIR = "AYH_USERINFO_PHOTO_DIR"; public static final String AYH_MERCHANT_LOGO_DIR = "AYH_MERCHANT_LOGO_DIR"; }
[ "1728490992@qq.com" ]
1728490992@qq.com
e66ab2024c0f36362f6a59aa1ad211cf7f49b8cc
7a2a4d555d8ab15c7c691d2d623aa09a5662be41
/src/main/java/com/estudo/minhasfinancas/model/Usert.java
a3f2b605f877f88b1df9214d565221785a812902
[]
no_license
marcosrib/java-spring-boot-reactjs
5078ef34ef07a4254fabf6083ee82cbed2102f5e
b2893737ac289e08a52845265de00b5b5820c35e
refs/heads/master
2022-01-23T02:25:41.546534
2020-01-11T19:17:26
2020-01-11T19:17:26
226,728,418
0
0
null
2022-01-21T23:35:05
2019-12-08T20:39:42
Java
UTF-8
Java
false
false
634
java
package com.estudo.minhasfinancas.model; import java.util.List; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.OneToMany; @Entity public class Usert { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "id") private Long id; private String name; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } }
[ "marcos.rib.sousa@gmail.com" ]
marcos.rib.sousa@gmail.com
743a589bcdce39834a5d216367fc92eb9ae65cc2
69e71f3a23e20bcf66975f1c97d9732db15d5615
/android-robot-control/src/javaclient2/structures/simulation/PlayerSimulationData.java
a26d4b1f186dcbacfbdd69add109ec4000a34205
[]
no_license
jobsonp/android-robot-control
731df5abad4a3d2fa7bcbcdfa9c8bd055d83ec90
e4035421f8a880c423885201edb55f7b527ba832
refs/heads/master
2020-05-28T07:05:31.995185
2010-10-19T02:50:59
2010-10-19T02:50:59
41,233,250
0
0
null
null
null
null
UTF-8
Java
false
false
1,709
java
/* * Player Java Client 2 - PlayerSimulationData.java * Copyright (C) 2006 Radu Bogdan Rusu * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: PlayerSimulationData.java,v 1.1.1.1 2006/02/15 17:51:18 veedee Exp $ * */ package javaclient2.structures.simulation; import javaclient2.structures.*; /** * Data * Just a placeholder for now; data will be added in future. * * @author Radu Bogdan Rusu * @version * <ul> * <li>v2.0 - Player 2.0 supported * </ul> */ public class PlayerSimulationData implements PlayerConstants { // A single byte of as-yet-unspecified data. Useful for experiments. private byte data; /** * @return A single byte of as-yet-unspecified data. Useful for experiments. **/ public synchronized byte getData () { return this.data; } /** * @param newData A single byte of as-yet-unspecified data. Useful for experiments. * */ public synchronized void setData (byte newData) { this.data = newData; } }
[ "agusgutierrez@gmail.com" ]
agusgutierrez@gmail.com
a6a00fbb69d64d96f173edc3d5a6a2b67eb3921f
5f786913a0ad978db21a98cee5318ec9d90e57aa
/server/serverApps/src/main/java/com/udemy/serverApps/converter/TodoConverter.java
6b6bd2b7e5b9847558c0a4465231d561003ee2b7
[]
no_license
Nelzhino/full-stack
15156fa8014f60825cbc220ecdd5e5e80f229430
a72fa2bc583d8d53f39de979774aeaf5560bd25e
refs/heads/main
2023-03-31T19:36:13.534098
2021-04-05T15:24:01
2021-04-05T15:24:01
352,679,145
0
0
null
null
null
null
UTF-8
Java
false
false
1,886
java
package com.udemy.serverApps.converter; import java.util.ArrayList; import java.util.List; import com.udemy.serverApps.entities.Todo; import com.udemy.serverApps.models.TodoModel; public class TodoConverter { public static List<Todo> convertListModelToListEntity(List<TodoModel> todoModels){ List<Todo> todos = new ArrayList<>(); for (TodoModel todoModel : todoModels) { Todo todo = new Todo(); todo.setId(todoModel.getId()); todo.setDescription(todoModel.getDescription()); todo.setTargetDate(todoModel.getTargetDate()); todo.setUsername(todoModel.getUsername()); todo.setDone(todoModel.isDone()); todos.add(todo); } return todos; } public static List<TodoModel> convertListEntityToListModel(List<Todo> todos){ List<TodoModel> todoModels = new ArrayList<>(); for (Todo todo : todos) { TodoModel todoModel = new TodoModel(); todoModel.setId(todo.getId()); todoModel.setDescription(todo.getDescription()); todoModel.setTargetDate(todo.getTargetDate()); todoModel.setUsername(todo.getUsername()); todoModel.setDone(todo.isDone()); todoModels.add(todoModel); } return todoModels; } public static TodoModel convertEntityToModel(Todo todo) { TodoModel todoModel = new TodoModel(); todoModel.setId(todo.getId()); todoModel.setDescription(todo.getDescription()); todoModel.setTargetDate(todo.getTargetDate()); todoModel.setUsername(todo.getUsername()); todoModel.setDone(todo.isDone()); return todoModel; } public static Todo convertModelToEntity(TodoModel todoModel) { Todo todo = new Todo(); todo.setId(todoModel.getId()); todo.setDescription(todoModel.getDescription()); todo.setTargetDate(todoModel.getTargetDate()); todo.setUsername(todoModel.getUsername()); todo.setDone(todoModel.isDone()); return todo; } }
[ "ncarabali@intergrupo.com" ]
ncarabali@intergrupo.com
c396c5d14a2f935b471c87fb494fe286f125ee7c
112727d28ac550a79765db1b7b496fbe31a24595
/src/GUI/CreateAccount.java
d96a3cd48d63e0ffb3b2db7428276bad59388c7b
[]
no_license
mkamona/SampleProject
a36c206b5f2d2b157527943a0a62ac027b821b1e
db780085149e3ce1a4b188ad667740f60c94f14c
refs/heads/master
2021-08-28T04:23:46.218847
2017-12-11T07:16:00
2017-12-11T07:16:00
113,824,364
0
0
null
null
null
null
UTF-8
Java
false
false
12,501
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package GUI; /** * * @author Admin */ public class CreateAccount extends javax.swing.JFrame { /** * Creates new form CreateAccount */ public CreateAccount() { initComponents(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); FullName = new javax.swing.JTextField(); jLabel3 = new javax.swing.JLabel(); Email = new javax.swing.JTextField(); jLabel4 = new javax.swing.JLabel(); UserName = new javax.swing.JTextField(); jLabel5 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); ConPassword = new javax.swing.JPasswordField(); Terms = new javax.swing.JButton(); jCheckBox1 = new javax.swing.JCheckBox(); CreateAccount = new javax.swing.JButton(); Password = new javax.swing.JPasswordField(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jLabel1.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N jLabel1.setText("Railway Reservation System"); jLabel2.setText("Name"); FullName.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N jLabel3.setText("Email Address"); Email.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N jLabel4.setText("Username"); UserName.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N jLabel5.setText("Password"); jLabel6.setText("Confirm Password"); ConPassword.setText("jPasswordField2"); Terms.setText("Terms & Conditions"); jCheckBox1.setText("I have read and I accept terms and conditions"); CreateAccount.setText("Create Account"); CreateAccount.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { CreateAccountActionPerformed(evt); } }); Password.setText("jPasswordField1"); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap(195, Short.MAX_VALUE) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addComponent(jLabel1) .addGap(186, 186, 186)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addComponent(jCheckBox1) .addGap(196, 196, 196)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addComponent(CreateAccount, javax.swing.GroupLayout.PREFERRED_SIZE, 175, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(227, 227, 227)))) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(142, 142, 142) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel5) .addComponent(jLabel4) .addComponent(jLabel6) .addComponent(jLabel3) .addComponent(jLabel2)) .addGap(35, 35, 35) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(Email, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(UserName, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(Password, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 274, Short.MAX_VALUE) .addComponent(ConPassword, javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(FullName)) .addContainerGap(143, Short.MAX_VALUE)) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(278, 278, 278) .addComponent(Terms, javax.swing.GroupLayout.PREFERRED_SIZE, 172, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(230, Short.MAX_VALUE))) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 164, Short.MAX_VALUE) .addComponent(jCheckBox1) .addGap(38, 38, 38) .addComponent(CreateAccount, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(81, 81, 81)) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(62, 62, 62) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(FullName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(Email, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(UserName, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jLabel4)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(Password, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel5)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(ConPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jLabel6)) .addGap(44, 44, 44) .addComponent(Terms) .addContainerGap(122, Short.MAX_VALUE))) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); pack(); }// </editor-fold>//GEN-END:initComponents private void CreateAccountActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_CreateAccountActionPerformed String Fullname=FullName.getText(); String Username=UserName.getText(); String email=Email.getText(); String password=Password.getText(); String confirm=ConPassword.getText(); }//GEN-LAST:event_CreateAccountActionPerformed /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(CreateAccount.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(CreateAccount.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(CreateAccount.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(CreateAccount.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new CreateAccount().setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JPasswordField ConPassword; private javax.swing.JButton CreateAccount; private javax.swing.JTextField Email; private javax.swing.JTextField FullName; private javax.swing.JPasswordField Password; private javax.swing.JButton Terms; private javax.swing.JTextField UserName; private javax.swing.JCheckBox jCheckBox1; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JLabel jLabel5; private javax.swing.JLabel jLabel6; private javax.swing.JPanel jPanel1; // End of variables declaration//GEN-END:variables }
[ "Admin@Kamona" ]
Admin@Kamona
a03c97e4177537d0f32838f904a10c3031e1561f
41d2ab95c24eb9521660fa8c2487bda564317c85
/jcart-administration-back/src/main/java/com/zhaozhijie/jcartadministrationback/service/AdministratorService.java
73c2a9e35f64e22d0fad35186ba98d603489fc5d
[ "Apache-2.0" ]
permissive
zhaozhijie123/jcart0224
ec96646f23cbea4e0726f0258be1a413307b3684
63f71e403502ed6c26632f047e9273b731a2dfa1
refs/heads/master
2022-07-01T01:52:52.077022
2020-05-22T01:49:05
2020-05-22T01:49:05
242,688,152
0
0
Apache-2.0
2022-06-17T02:55:36
2020-02-24T08:54:11
JavaScript
UTF-8
Java
false
false
907
java
package com.zhaozhijie.jcartadministrationback.service; import com.github.pagehelper.Page; import com.zhaozhijie.jcartadministrationback.dto.in.AdministratorResetPwdInDTO; import com.zhaozhijie.jcartadministrationback.exception.ClientException; import com.zhaozhijie.jcartadministrationback.po.Administrator; import java.util.List; import java.util.Map; public interface AdministratorService { Administrator getById(Integer administratorId); Administrator getByUsername(String username); Integer create(Administrator administrator); void update(Administrator administrator); void delete(Integer administratorId); void batchDelete(List<Integer> administratorIds); Page<Administrator> getList(Integer pageNum); String getByEmail(String email) throws ClientException; void restPwd(AdministratorResetPwdInDTO administratorResetPwdInDTO) throws ClientException; }
[ "1420800094@qq.com" ]
1420800094@qq.com
85bd5b9a74e125806ee0e217ba39b540db839b93
2eb3b66b421a1f4a18bcb72b69023a3166273ca1
/LeetCode/BinaryTreePostorderTraversal.java
3a5a516c4b16d99b9a03c64440a8722a7c9dc0c4
[]
no_license
johnathan79717/competitive-programming
e1d62016e8b25d8bcb3d003bba6b1d4dc858a62f
3c8471b7ebb516147705bbbc4316a511f0fe4dc0
refs/heads/master
2022-05-07T20:34:21.959511
2022-03-31T15:20:28
2022-03-31T15:20:28
55,674,796
2
2
null
null
null
null
UTF-8
Java
false
false
1,086
java
/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ public class Solution { public ArrayList<Integer> postorderTraversal(TreeNode root) { // IMPORTANT: Please reset any member data you declared, as // the same Solution instance will be reused for each test case. ArrayList<Integer> ans = new ArrayList<Integer>(); if(root == null) return ans; Stack<TreeNode> stack = new Stack<TreeNode>(); HashSet<TreeNode> visited = new HashSet<TreeNode>(); stack.push(root); while(!stack.empty()) { TreeNode node = stack.pop(); if(visited.contains(node)) ans.add(node.val); else { visited.add(node); stack.push(node); if(node.right != null) stack.push(node.right); if(node.left != null) stack.push(node.left); } } return ans; } }
[ "johnathan79717@gmail.com" ]
johnathan79717@gmail.com
accd9ea8b92f4dee50ba85724a091dffa0f6b226
c42d821d03d58ced8224cb11d9fa4b36adf08925
/app/src/androidTest/java/com/example/lculture/ExampleInstrumentedTest.java
6426b0e520378950476fc8de25270586ea50d058
[]
no_license
vishal788/Lculture
e6ed0ca4847755e02471a4ea8015319518f6fc72
eda62fb564de022ea9172546aa31f5a559ffe75e
refs/heads/master
2020-08-29T19:27:09.659297
2019-10-28T21:17:02
2019-10-28T21:17:02
218,146,882
1
0
null
null
null
null
UTF-8
Java
false
false
756
java
package com.example.lculture; import android.content.Context; import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); assertEquals("com.example.lculture", appContext.getPackageName()); } }
[ "vishrajvishal54321@gmail.com" ]
vishrajvishal54321@gmail.com
0f36ca3be4c9017b10067dfbb9a37e8a91f231c6
4c6f53f9798a18bb8f94d5e18cb8a4d152f55720
/NewsAppJava/app/src/main/java/com/example/newsappjava/MainActivity.java
df2fa9e5e4e5c5fbd097fc1ca0102166744c3e30
[]
no_license
vishalpatil0/Android
f3feedb8160ec5782957d571f0bd0c43e932d5b0
0c33466e7c2c3047e2f99c1669501f3c80bd2256
refs/heads/master
2022-04-30T04:32:45.339209
2022-04-25T16:56:19
2022-04-25T16:56:19
208,592,765
0
0
null
null
null
null
UTF-8
Java
false
false
8,897
java
package com.example.newsappjava; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import androidx.browser.customtabs.CustomTabsIntent; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import android.graphics.drawable.Drawable; import android.net.Uri; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.Toast; import java.io.FileWriter; import java.io.IOException; import com.android.volley.Request; import com.android.volley.Response; import com.android.volley.VolleyError; import com.android.volley.toolbox.JsonObjectRequest; import com.bumptech.glide.Glide; import com.bumptech.glide.load.DataSource; import com.bumptech.glide.load.engine.GlideException; import com.bumptech.glide.request.RequestListener; import com.bumptech.glide.request.target.Target; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.util.ArrayList; import com.pubmatic.sdk.common.POBAdSize; import com.pubmatic.sdk.common.POBError; import com.pubmatic.sdk.common.OpenWrapSDK; import com.pubmatic.sdk.common.models.POBApplicationInfo; import com.pubmatic.sdk.openwrap.banner.POBBannerView; import com.pubmatic.sdk.openwrap.interstitial.POBInterstitial; // Import Java Packages. import java.net.MalformedURLException; import java.net.URL; public class MainActivity extends AppCompatActivity implements NewsItemClicked{ private RecyclerView recyclerView; private NewsListAdapter mAdapter; private POBBannerView bannerView; private static final String OPENWRAP_AD_UNIT_ID = "OpenWrapBannerAdUnit"; private static final String PUB_ID = "156276"; private static final int PROFILE_ID = 1165; private static final String OPENWRAP_AD_UNIT_ONE = "OpenWrapInterstitialAdUnit"; private POBInterstitial interstitial; private Button loadAd,showAd; /** * * @param savedInstanceState */ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); recyclerView=findViewById(R.id.recyclerView); recyclerView.setLayoutManager(new LinearLayoutManager(this)); mAdapter=new NewsListAdapter(this); //buttons loadAd=(Button) findViewById(R.id.loadAd); showAd=(Button)findViewById(R.id.showAd); fetchData(); recyclerView.setAdapter(mAdapter); // A valid Play Store Url of an Android application is required. POBApplicationInfo appInfo = new POBApplicationInfo(); try { appInfo.setStoreURL(new URL("https://play.google.com/store/apps/details?id=com.example.android&hl=en")); } catch (MalformedURLException e) { e.printStackTrace(); } // This app information is a global configuration & you // Need not set this for every ad request(of any ad type) OpenWrapSDK.setApplicationInfo(appInfo); bannerView=(POBBannerView) findViewById(R.id.banner); bannerView.init(PUB_ID, PROFILE_ID, OPENWRAP_AD_UNIT_ID, POBAdSize.BANNER_SIZE_320x50); bannerView.setListener(new POBBannerViewListener()); bannerView.loadAd(); interstitial = new POBInterstitial(this, PUB_ID, PROFILE_ID, OPENWRAP_AD_UNIT_ONE); loadAd.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { interstitial.loadAd(); showAd.setEnabled(true); } }); showAd.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { showInterstitialAd(); } }); } /** * To show interstitial ad call this method **/ private void showInterstitialAd() { // check if the interstitial is ready if (null != interstitial) { // Call show on interstitial interstitial.show(); } } @Override protected void onDestroy() { super.onDestroy(); // Destroy banner before destroying activity if (null != bannerView) { bannerView.destroy(); } } /** * Restart function to fetch the data on restart * @return nothing */ @Override protected void onRestart() { super.onRestart(); fetchData(); } /** * fetchData function create the json object to get the response and call the update news function of the NewslistAdapter class. * Add the JsonObjectRequest to the request queue. */ private void fetchData() { String url="https://stagingams.pubmatic.com:8443/sdk/Sushant/news.json"; JsonObjectRequest jsonObjectRequest = new JsonObjectRequest (Request.Method.GET, url, null, new Response.Listener<JSONObject>() { /** * Listener method work after receiving the jsonObject response. * @param response JSONObject contains the JSONArray and JSON elements. */ @Override public void onResponse(JSONObject response) { try { JSONArray newsJsonArray=response.getJSONArray("articles"); ArrayList<News> newsArray=new ArrayList<News>(); for (int i=0;i<newsJsonArray.length();i++) { //fetching the jsonboject from the jsonarray JSONObject newsJsonObject=newsJsonArray.getJSONObject(i); //creating object of news classes by parametric constructor News news=new News(newsJsonObject.getString("title"), newsJsonObject.getString("author"), newsJsonObject.getString("url"), newsJsonObject.getString("urlToImage")); //adding the created object into the array of objects newsArray.add(news); } mAdapter.updateNews(newsArray); } catch (JSONException e) { e.printStackTrace(); } } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { Log.d(error.toString(),"Failed to recevie response from provided API."); } }); MySingleton.getInstance(this).addToRequestQueue(jsonObjectRequest); } /** * onItemClicked is an of NewsItemClicked Interface. * which open links in the custom chrome tab. * @param item View of Recycler View holder. */ @Override public void onItemClicked(News item) { if(item==null) { Log.d("Error","Object is null"); } else { CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder(); CustomTabsIntent customTabsIntent = builder.build(); customTabsIntent.launchUrl(this, Uri.parse(item.url)); } } class POBBannerViewListener extends POBBannerView.POBBannerViewListener { private final String TAG = "POBBannerViewListener"; // Callback method Notifies that an ad has been successfully loaded and rendered. @Override public void onAdReceived(@NonNull POBBannerView view) { Log.d(TAG, "Ad Received"); } // Callback method Notifies an error encountered while loading or rendering an ad. @Override public void onAdFailed(@NonNull POBBannerView view, @NonNull POBError error) { Log.e(TAG, error.toString()); } // Callback method Notifies that the banner ad view will launch a dialog on top of the current view @Override public void onAdOpened(@NonNull POBBannerView view) { Log.d(TAG, "Ad Opened"); } // Callback method Notifies that the banner ad view has dismissed the modal on top of the current view @Override public void onAdClosed(@NonNull POBBannerView view) { Log.d(TAG, "Ad Closed"); } @Override public void onAppLeaving(@NonNull POBBannerView view) { // Implement your custom logic Log.d(TAG, "Banner : App Leaving"); } } }
[ "vishalgpatil10@gmail.com" ]
vishalgpatil10@gmail.com
92c1c1e9a7f81e3ed940c14b5c5335049c2e1c7c
20eae418a0a9f523ffa388629598d0a61f1e1c24
/xyls-service/src/main/java/com/xyls/core/social/weixin/api/WeixinImpl.java
1705926b56184fbd54b6aa4f37e6fe398c081adc
[]
no_license
firefoxhu/xyls
c665aa353ef8fe1db1f1f4cfe48e74a2780fa1fb
7e1c7c5346302b16b87dca9e9899ed440d189823
refs/heads/master
2020-03-25T04:30:37.401445
2018-10-31T12:24:02
2018-10-31T12:24:02
143,399,214
0
0
null
null
null
null
UTF-8
Java
false
false
2,126
java
/** * */ package com.xyls.core.social.weixin.api; import com.fasterxml.jackson.databind.ObjectMapper; import org.apache.commons.lang3.StringUtils; import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.converter.StringHttpMessageConverter; import org.springframework.social.oauth2.AbstractOAuth2ApiBinding; import org.springframework.social.oauth2.TokenStrategy; import java.nio.charset.Charset; import java.util.List; /** * Weixin API调用模板, scope为Request的Spring bean, 根据当前用户的accessToken创建。 * * @author zhailiang */ public class WeixinImpl extends AbstractOAuth2ApiBinding implements Weixin { /** * */ private ObjectMapper objectMapper = new ObjectMapper(); /** * 获取用户信息的url */ private static final String URL_GET_USER_INFO = "https://api.weixin.qq.com/sns/userinfo?openid="; /** * @param accessToken */ public WeixinImpl(String accessToken) { super(accessToken, TokenStrategy.ACCESS_TOKEN_PARAMETER); } /** * 默认注册的StringHttpMessageConverter字符集为ISO-8859-1,而微信返回的是UTF-8的,所以覆盖了原来的方法。 */ protected List<HttpMessageConverter<?>> getMessageConverters() { List<HttpMessageConverter<?>> messageConverters = super.getMessageConverters(); messageConverters.remove(0); messageConverters.add(new StringHttpMessageConverter(Charset.forName("UTF-8"))); return messageConverters; } /** * 获取微信用户信息。 */ @Override public WeixinUserInfo getUserInfo(String openId) { String url = URL_GET_USER_INFO + openId; String response = getRestTemplate().getForObject(url, String.class); if (StringUtils.contains(response, "errcode")) { return null; } WeixinUserInfo profile = null; try { profile = objectMapper.readValue(response, WeixinUserInfo.class); } catch (Exception e) { e.printStackTrace(); } return profile; } }
[ "quickly_hl@163.com" ]
quickly_hl@163.com
02d4f4d64e8d9eabc7759cdbf4d195584ee71e31
adaad18c06fbcf3f36e799663760fe5938260750
/src/main/java/com/samwolfson/bookmark/PlayerListener.java
8cee92a4b4bc55272015c5b5b70c45a19bcf70d9
[]
no_license
terabyte128/Bookmark
d3e04d129d78392abd1d52c5d6781b641d3816b0
c9eedac15dce9c326eb5e439687548b579a8a5eb
refs/heads/master
2023-05-26T14:41:47.169850
2021-02-09T06:56:09
2021-02-09T06:56:09
266,495,234
0
0
null
null
null
null
UTF-8
Java
false
false
1,576
java
package com.samwolfson.bookmark; import org.bukkit.ChatColor; import org.bukkit.event.EventHandler; import org.bukkit.event.Listener; import org.bukkit.event.entity.PlayerDeathEvent; import org.bukkit.event.player.PlayerChangedWorldEvent; import org.bukkit.event.player.PlayerQuitEvent; import org.bukkit.plugin.Plugin; public class PlayerListener implements Listener { public static final String LOCATION_NAME = "rip"; private final Plugin plugin; public PlayerListener(Plugin plugin) { this.plugin = plugin; } @EventHandler public void onPlayerDeath(PlayerDeathEvent event) { ConfigManager configManager = new ConfigManager(event.getEntity(), plugin); configManager.addLocation(LOCATION_NAME, event.getEntity().getLocation()); configManager.saveConfig(); event.getEntity().sendMessage(ChatColor.GREEN + "Your death location was bookmarked as " + ChatColor.BOLD + LOCATION_NAME); event.getEntity().sendMessage(ChatColor.GREEN + "You can navigate back to it with " + ChatColor.BOLD + "/bm nav " + LOCATION_NAME); } @EventHandler public void onPlayerQuit(PlayerQuitEvent event) { PlayerNavTask.removePlayer(event.getPlayer()); } @EventHandler public void onPlayerChangeWorld(PlayerChangedWorldEvent event) { if (PlayerNavTask.hasPlayer(event.getPlayer())) { event.getPlayer().sendMessage(ChatColor.GREEN + "Since you changed worlds, your navigation was cancelled."); PlayerNavTask.removePlayer(event.getPlayer()); } } }
[ "wolfson@cs.uw.edu" ]
wolfson@cs.uw.edu
5bd2edba63ce75f50884c9a315e43fe5a0bf1563
12f8cb175c85a1b80725bbff637c89baca03948f
/bowlingJavaChallenge/src/com/challenge/java/bowling/utils/GenericFactory.java
93a72696eef7fbb5e95bf1922877ba2dc7da01ae
[]
no_license
ajtc16/BowlingChallenge
31d02464d80216ec27cde072ef64999f3c792b1b
fa6ad11e779131045cffcae86502898dad3c29e3
refs/heads/master
2020-07-10T20:01:50.803869
2019-08-25T22:53:52
2019-08-25T22:53:52
204,357,070
0
0
null
null
null
null
UTF-8
Java
false
false
148
java
package com.challenge.java.bowling.utils; public class GenericFactory { public static Utils getBowlingUtils() { return new UtilsImpl(); } }
[ "ajteran@192.168.100.149" ]
ajteran@192.168.100.149
007b665d31f736a06211acc8575d0226a0a41581
5a4313bbf3afafaf70492f1109964ecda2a0db0e
/ScoutinEJB/remotes/com/scoutin/entities/Cluster.java
48af13c91017e4b83b637c514a9c613e6f37804c
[]
no_license
tianhuyang/Scoutin
14f31338a416c29c5afa1733500a864b8ac663f4
55b544a30d7815228436d6386b2c85f980f0ac71
refs/heads/master
2016-09-06T12:41:11.663858
2013-05-13T09:29:44
2013-05-13T09:29:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,391
java
package com.scoutin.entities; import java.sql.Timestamp; import java.util.HashSet; import java.util.Set; import javax.persistence.CascadeType; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import static javax.persistence.GenerationType.IDENTITY; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.OneToMany; import javax.persistence.PrePersist; import javax.persistence.PreUpdate; import javax.persistence.Table; /** * Cluster entity. @author MyEclipse Persistence Tools */ @Entity @Table(name = "CLUSTER", catalog = "Scoutin") public class Cluster implements java.io.Serializable { // Fields private static final long serialVersionUID = 1L; private Long clusterId; private Account account; private String name; private Timestamp createdTime; private Timestamp updatedTime; private Set<AccountCluster> accountClusters = new HashSet<AccountCluster>(0); // Constructors /** default constructor */ public Cluster() { } /** minimal constructor */ public Cluster(Account account, String name, Timestamp createdTime, Timestamp updatedTime) { this.account = account; this.name = name; this.createdTime = createdTime; this.updatedTime = updatedTime; } /** full constructor */ public Cluster(Account account, String name, Timestamp createdTime, Timestamp updatedTime, Set<AccountCluster> accountClusters) { this.account = account; this.name = name; this.createdTime = createdTime; this.updatedTime = updatedTime; this.accountClusters = accountClusters; } // Property accessors @Id @GeneratedValue(strategy = IDENTITY) @Column(name = "CLUSTER_ID", unique = true, nullable = false) public Long getClusterId() { return this.clusterId; } public void setClusterId(Long clusterId) { this.clusterId = clusterId; } @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "OWNER_ID", nullable = false) public Account getAccount() { return this.account; } public void setAccount(Account account) { this.account = account; } @Column(name = "NAME", nullable = false, length = 50) public String getName() { return this.name; } public void setName(String name) { this.name = name; } @Column(name = "CREATED_TIME", nullable = false, updatable = false, length = 19) public Timestamp getCreatedTime() { return this.createdTime; } public void setCreatedTime(Timestamp createdTime) { this.createdTime = createdTime; } @Column(name = "UPDATED_TIME", nullable = false, length = 19) public Timestamp getUpdatedTime() { return this.updatedTime; } public void setUpdatedTime(Timestamp updatedTime) { this.updatedTime = updatedTime; } @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "cluster") public Set<AccountCluster> getAccountClusters() { return this.accountClusters; } public void setAccountClusters(Set<AccountCluster> accountClusters) { this.accountClusters = accountClusters; } @PrePersist protected void onPrePersist() { Timestamp timestamp = new Timestamp(System.currentTimeMillis()); setCreatedTime(timestamp); setUpdatedTime(timestamp); } @PreUpdate protected void onPreUpdate() { Timestamp timestamp = new Timestamp(System.currentTimeMillis()); setUpdatedTime(timestamp); } }
[ "tianhuyang@gmail.com" ]
tianhuyang@gmail.com
716398df4d90ca18147e9bf6961fca797509af9b
9ecfcd9afaa651316971012a3b9c6566b5f2ce33
/src/main/java/de/swisslife/ekv/prototyp/vdg/Application.java
c621be16983adc9620988c9ed8b8faea853db1e7
[]
no_license
marcelseifert/vdg_cloudfoundry
01667e480ad601c1b032b07ffa8a31d993f92e25
46e5a39caef983b73434850bb949a611a8008778
refs/heads/master
2021-01-19T22:15:19.798345
2017-04-19T19:28:53
2017-04-19T19:28:53
88,782,848
0
0
null
null
null
null
UTF-8
Java
false
false
312
java
package de.swisslife.ekv.prototyp.vdg; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class Application { public static void main(String[] args) { SpringApplication.run(Application.class, args); } }
[ "marcel.seifert@googlemail.com" ]
marcel.seifert@googlemail.com
2f42bcdd2257ce176586ff2cf487138638159091
3341b6a49badad87b61d082d41c7b875b92f5107
/grandparent/common/src/main/java/ph/txtdis/app/OrderApp.java
86c7b6eb5f0d9aad96726106b3a81eaad0f05773
[]
no_license
txtdis/JavaFX
9049830dba2988081e3d6d5b49c539111f759c51
a6f43960d2531df4018c77d31c8c0022b1266903
refs/heads/master
2020-05-01T05:40:21.043764
2015-01-26T01:31:26
2015-01-26T01:31:26
23,874,397
1
3
null
null
null
null
UTF-8
Java
false
false
587
java
package ph.txtdis.app; import java.math.BigDecimal; import java.time.LocalDate; import java.util.List; import ph.txtdis.dto.OrderDTO; import ph.txtdis.model.Ordered; import ph.txtdis.model.Priced; public interface OrderApp<D extends Priced> { void createDetailTable(); void setDetail(Priced priced); void setPrice(); void createDetailTableItems(OrderDTO<Ordered<Priced>, Priced> dto); void iterateDetailTableItems(List<Priced> details); LocalDate getPickerDate(); void setCustomerDTO(); void setItemDTO(); BigDecimal getQtyPerUomUnit(); }
[ "Vier@txtDIS" ]
Vier@txtDIS
4e14ccdc507504c50bfffd153e08b3bc7ed3617c
f5049214ff99cdd7c37da74619b60ac4a26fc6ba
/orchestrator/server/server-security/eu.agno3.orchestrator.server.security/src/main/java/eu/agno3/orchestrator/server/security/internal/SetAdminPasswordJobBuilder.java
12553e6086c945068ed5d6019cba4d5fbd493543
[ "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference" ]
permissive
AgNO3/code
d17313709ee5db1eac38e5811244cecfdfc23f93
b40a4559a10b3e84840994c3fd15d5f53b89168f
refs/heads/main
2023-07-28T17:27:53.045940
2021-09-17T14:25:01
2021-09-17T14:31:41
407,567,058
0
2
null
null
null
null
UTF-8
Java
false
false
2,632
java
/** * © 2014 AgNO3 Gmbh & Co. KG * All right reserved. * * Created: 23.12.2014 by mbechler */ package eu.agno3.orchestrator.server.security.internal; import org.osgi.service.component.annotations.Component; import org.osgi.service.component.annotations.Reference; import eu.agno3.orchestrator.config.hostconfig.jobs.SetAdminPasswordJob; import eu.agno3.orchestrator.jobs.JobType; import eu.agno3.orchestrator.jobs.exceptions.JobRunnableException; import eu.agno3.orchestrator.jobs.exec.JobRunnable; import eu.agno3.orchestrator.jobs.exec.JobRunnableFactory; import eu.agno3.orchestrator.server.security.LocalUserServerService; import eu.agno3.runtime.crypto.scrypt.SCryptResult; import eu.agno3.runtime.db.orm.EntityTransactionService; import eu.agno3.runtime.security.SecurityManagementException; /** * @author mbechler * */ @Component ( service = { JobRunnableFactory.class }, property = "jobType=eu.agno3.orchestrator.config.hostconfig.jobs.SetAdminPasswordJob" ) @JobType ( SetAdminPasswordJob.class ) public class SetAdminPasswordJobBuilder implements JobRunnableFactory<SetAdminPasswordJob> { private LocalUserServerService userService; private EntityTransactionService authEts; @Reference protected synchronized void setUserService ( LocalUserServerService init ) { this.userService = init; } protected synchronized void unsetUserService ( LocalUserServerService init ) { if ( this.userService == init ) { this.userService = null; } } @Reference ( target = "(persistenceUnit=auth)" ) protected synchronized void bindEntityTransactionService ( EntityTransactionService ets ) { this.authEts = ets; } protected synchronized void unbindEntityTransactionService ( EntityTransactionService ets ) { if ( this.authEts == ets ) { this.authEts = null; } } /** * {@inheritDoc} * * @see eu.agno3.orchestrator.jobs.exec.JobRunnableFactory#getRunnableForJob(eu.agno3.orchestrator.jobs.Job) */ @Override public JobRunnable getRunnableForJob ( SetAdminPasswordJob j ) throws JobRunnableException { SCryptResult passwordHash; try { String adminPassword = j.getAdminPassword(); passwordHash = this.userService.generatePasswordHash(adminPassword, false); } catch ( SecurityManagementException e ) { throw new JobRunnableException("Failed to generate password hash", e); //$NON-NLS-1$ } return new SetAdminPasswordRunnable(this.userService, this.authEts, passwordHash); } }
[ "bechler@agno3.eu" ]
bechler@agno3.eu
c09bfbb4b4dabbaf0367edf3c8a6b37979d97668
6a99657ee1a14556fd8db8862a308727eff8c08b
/src/main/java/controllers/additional/ApplicationInsert.java
ea0ecde69130d415d89e0dbdc4a016d1b32c0258
[]
no_license
ashif-rahaman/leave-management-openshift
4748e9ec7acee31fb06b4d1fc32d808b1a988b2c
b8aa4a4161b621ea53f30af3e04375938d86bcb2
refs/heads/master
2021-05-11T02:47:52.912878
2018-02-03T07:27:44
2018-02-03T07:27:44
118,373,541
0
0
null
null
null
null
UTF-8
Java
false
false
3,882
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package controllers.additional; import db.util.DBExecutor; import java.io.IOException; import java.sql.ResultSet; import java.sql.SQLException; import java.text.SimpleDateFormat; import java.util.Date; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * * @author ashif */ @WebServlet(name = "ApplicationInsert", urlPatterns = {"/applyinsert"}) public class ApplicationInsert extends HttpServlet { private static final long serialVersionUID = 1L; /** * Handles the HTTP <code>GET</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } /** * Handles the HTTP <code>POST</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */ @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String user = (String) request.getSession().getAttribute("userKey"); if (user != null && !user.isEmpty()) { String subject = request.getParameter("apply_subject"); String body = request.getParameter("apply_body"); String startDate = request.getParameter("start_date"); String endDate = request.getParameter("end_date"); if (subject != null && body != null && startDate != null && endDate != null) { DBExecutor db = new DBExecutor(); String sql = "SELECT id, super_id FROM users WHERE username = '" + user + "'"; ResultSet resultSet = db.execute(sql); try { if (resultSet.next()) { int super_id = resultSet.getInt("super_id"); int applicant_id = resultSet.getInt("id"); SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date date = new Date(); String applyDate = df.format(date); String insertSql = "INSERT INTO application_log (super_id, app_subject, app_body, app_status, apply_date, app_update, startdate, enddate, applicant_id) " + "VALUES (" + super_id + ", '" + subject + "', '" + body + "', 'pending', '" + applyDate + "', 1, '" + startDate + "', '" + endDate + "', " + applicant_id + ")"; db.execute(insertSql); response.sendRedirect("home"); db.close(); return; } } catch (SQLException e) { response.sendRedirect("apply"); return; } db.close(); } else { response.sendRedirect("apply"); } } else { response.sendRedirect("index"); } } /** * Returns a short description of the servlet. * * @return a String containing servlet description */ @Override public String getServletInfo() { return "Short description"; }// </editor-fold> }
[ "ashifrahamanuis@gmail.com" ]
ashifrahamanuis@gmail.com
65093e4a73e92a20eb3ff4f2f3dc43c603e7435e
efe033adf3bc663f44ba3e5c786f603182422446
/src/main/java/com/jm3200104/spring/di/di08/SpringConfig.java
832cd9c407cd5a9fc66d4444120767d628856e69
[]
no_license
codewnw/JF200120
cb35c23c33717ae268d93cdc8912f6aa6c900e96
1abc6ad367eb87a1596223f610cdee14d45dfbbe
refs/heads/master
2022-12-26T09:42:41.013885
2020-01-29T15:13:16
2020-01-29T15:13:16
235,117,318
0
0
null
2022-12-15T23:34:06
2020-01-20T14:14:51
Java
UTF-8
Java
false
false
284
java
package com.jm3200104.spring.di.di08; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; @Configuration @ComponentScan(basePackages = { "com.jm3200104.spring.di.di08" }) public class SpringConfig { }
[ "code.wnw@gmail.com" ]
code.wnw@gmail.com
647db6c8dbb6bc7984ea24e19c81dfd4bc3c5051
658d30368c098639fd5b02d6145b147088b57ab1
/biz/src/main/java/com/hj/biz/generator/QyPowerJyProGen.java
4ce87a59f9adf8664b1ea9e5dc7464f0984eb2a9
[]
no_license
maowei1994/cmsb
76b2103045e843b7f587427f77659d4d19e99472
792147bb093b5b896e342c7764f96955fa9609c2
refs/heads/master
2021-01-25T06:40:06.667706
2015-07-10T16:53:38
2015-07-10T16:53:38
38,889,004
0
0
null
null
null
null
GB18030
Java
false
false
2,295
java
package com.hj.biz.generator; import com.google.common.collect.Lists; import com.google.common.collect.Maps; import com.hj.biz.GraphGenerator; import com.hj.biz.GraphIn; import com.hj.biz.util.GraphUtil; import com.hj.client.object.ValuePair1; import com.hj.client.object.ValuePair2; import com.hj.client.object.list.QyPowerDetailInfo; import org.springframework.util.CollectionUtils; import java.util.List; import java.util.Map; /** * @author tinglang (editice@gmail.com) * @since 2015/2/15 15:48 */ public class QyPowerJyProGen extends GraphGenerator { public static final BizKey QyPowerJyProGen=new BizKey(43,"企业是否基药情况销售额占比","pie"); Map<String,Long> map= Maps.newHashMap(); public QyPowerJyProGen(GraphIn graphIn) { super(graphIn); logger.info(QyPowerJyProGen.toString()); } @Override protected void init() { List<QyPowerDetailInfo> sales = graphIn.getQyPowerDetailInfos(); if (CollectionUtils.isEmpty(sales)) { return; } for (QyPowerDetailInfo saleDO : sales) { String name = saleDO.getIsJy(); long sale = saleDO.getSale(); if (map.containsKey(name)) { map.put(name, map.get(name) + sale); } else { map.put(name, sale); } } map= GraphUtil.extra2(map); } @Override protected void genTitle() { title.setText("是否基药销售占比"); } @Override protected void genToolTip() { } @Override protected void genLegend() { List<String> list= Lists.newArrayList(); for(String s: map.keySet()){ list.add(s); } legend.setData(list); } @Override protected void genXAxis() { } @Override protected void genYAxis() { } @Override protected void genSeries() { List<ValuePair2> list=Lists.newArrayList(); for(String s: map.keySet()) { ValuePair2 pair1=new ValuePair2(); pair1.setName(s); long v= map.get(s); pair1.setValue(v); list.add(pair1); } series.setData(list); } @Override protected void genDataTip() { } }
[ "2496742039@qq.com" ]
2496742039@qq.com
4d437f62aed05fb4584724e8ed1957383a925cf6
eb7c9c89d261300e9dffb9951f69b38b08411f61
/src/main/java/com/joao/workshopmongo/dto/CommentDTO.java
f888cc65f19eb798b4df905c17486472179a2ff3
[]
no_license
joaokage1/workshopmongo
430a3e7400d775b84dc4bb984ac3207b25363763
3d5e3d8a58dbfe00a492b4380b86e989862a6286
refs/heads/master
2023-02-13T00:10:38.343939
2021-01-09T18:45:09
2021-01-09T18:45:09
327,165,492
0
0
null
null
null
null
UTF-8
Java
false
false
758
java
package com.joao.workshopmongo.dto; import java.io.Serializable; import java.util.Date; @SuppressWarnings("serial") public class CommentDTO implements Serializable { private String text; private Date date; private AuthorDTO author; public CommentDTO() { } public CommentDTO(String text, Date date, AuthorDTO author) { super(); this.text = text; this.date = date; this.author = author; } public String getText() { return this.text; } public void setText(String text) { this.text = text; } public Date getDate() { return this.date; } public void setDate(Date date) { this.date = date; } public AuthorDTO getAuthor() { return this.author; } public void setAuthor(AuthorDTO author) { this.author = author; } }
[ "34372105+joaokage1@users.noreply.github.com" ]
34372105+joaokage1@users.noreply.github.com
cb884dacbc64ce507fc754ea17fa9f4a3665b9f1
5d77abfba31d2f0a5cb2f92f937904859785e7ff
/Java/java_examples Hyd/software/xml/javaxml/part1/app/xmlapp.java
e304b49a01e2fed2f2f699cf991bcf4917a36e35
[]
no_license
thinkpavan/artefacts
d93a1c0be0b6158cb0976aae9af9c6a016ebfdae
04bcf95450243dfe2f4fa8f09d96274034428e4d
refs/heads/master
2020-04-01T20:24:34.142409
2016-07-07T16:27:47
2016-07-07T16:27:47
62,716,135
0
0
null
null
null
null
UTF-8
Java
false
false
2,683
java
/* shows how to use new parser Version: 1.0 Author : Team -J */ import java.io.*; import org.xml.sax.*; import org.xml.sax.helpers.DefaultHandler; import javax.xml.parsers.*; import java.util.Vector; public class xmlapp extends DefaultHandler { StringBuffer curtext; boolean ppoline=false; boolean poid=false; boolean pitemid=false; boolean pqty=false; String ordid; poline p; Vector polines = new Vector(); public static void main(String argv[]) { DefaultHandler handler = new xmlapp(); SAXParserFactory factory = SAXParserFactory.newInstance(); try { SAXParser saxParser = factory.newSAXParser(); saxParser.parse( new File("po1.xml"), handler); } catch (Exception e) { e.printStackTrace(); } } // DocumentHandler methods public void startDocument() throws SAXException { } public void endDocument() throws SAXException { System.out.println(" Now storing the following data in DataBase"); System.out.println("PO ID = "+ ordid.trim()); for( int i=0; i<polines.size();i++){ p = (poline)polines.get(i); System.out.println(p.itemid + " "+ p.qty); } // here you can add code to store data in a database using jdbc instead of // displaying the data. } public void startElement(String namespaceURI, String sName, // simple name String qName, // qualified name Attributes attrs) throws SAXException { if(qName.equals("ordID")) poid=true; if(qName.equals("POLINE")){ p = new poline();// create a new poline object. ppoline = true; } if(qName.equals("itemid")) pitemid=true; if(qName.equals("qty")) pqty=true; } public void endElement(String namespaceURI, String sName, // simple name String qName // qualified name ) throws SAXException { if(qName.equals("ordID")){ poid=false; ordid=curtext.toString(); curtext=null; } if(qName.equals("POLINE")){ polines.addElement(p); p = null; ppoline = false; } if(qName.equals("itemid")){ pitemid=false; p.itemid=curtext.toString(); curtext=null; } if(qName.equals("qty")){ pqty=false; p.qty=curtext.toString(); curtext=null; } } public void characters(char buf[], int offset, int len) throws SAXException { String s = new String(buf, offset, len); if (curtext == null) { curtext = new StringBuffer(s); } else { curtext.append(s); } } }
[ "lazygeeks.in@gmail.com" ]
lazygeeks.in@gmail.com
09322bf46970966d052830f345c7c17623c82b01
6df644b14ae13b7ea46ee4f74bd7deecd78031b6
/LeetCodeSolution/src/MyQueue.java
14d8b9959dbbaf72a43a551687cee90d2a2747a6
[]
no_license
ZhengZixiang/LeetCodeSolution
5e5f4e180a65099d221a7e577236878c1e184065
fb66a97f7fb66d94b76af1551298e29ef6c0b1c5
refs/heads/master
2021-01-23T01:33:49.630204
2017-03-23T06:40:22
2017-03-23T06:40:22
85,914,926
0
0
null
null
null
null
UTF-8
Java
false
false
906
java
import java.util.Stack; public class MyQueue { Stack<Integer> pushStack = new Stack<>(); Stack<Integer> popStack = new Stack<>(); // Push element x to the back of queue. public void push(int x) { pushStack.push(x); } // Removes the element from in front of queue. public void pop() { if(popStack.isEmpty()) { while(!pushStack.isEmpty()) { popStack.push(pushStack.pop()); } } popStack.pop(); } // Get the front element. public int peek() { if(popStack.isEmpty()) { while(!pushStack.isEmpty()) { popStack.push(pushStack.pop()); } } return popStack.peek(); } // Return whether the queue is empty. public boolean empty() { return pushStack.isEmpty() && popStack.isEmpty(); } }
[ "imzhengzx@gmail.com" ]
imzhengzx@gmail.com
a0eb4deb58a8de840fc9beee4e50220305db0dce
223ee3e0642f53550e4b86dbcd671a1bc8a7b7c7
/src/com/javaex/practice/Ex07.java
b66ab08c461f2861fd2090aed16ce05a3907acb1
[]
no_license
Maroban/Practice03
94432c74f10059224a5da7dd10cbaee7cd09bab5
f0622df6ef32f99a42aa341e66af9a895d2bed47
refs/heads/master
2023-04-30T11:14:13.312015
2021-05-28T03:54:37
2021-05-28T03:54:37
371,573,455
0
0
null
null
null
null
UTF-8
Java
false
false
430
java
package com.javaex.practice; import java.util.Scanner; public class Ex07 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("숫자를 입력하세요"); int num = sc.nextInt(); for(int m = 0; m<=num; m++) { for(int n = 1; n<=m; n++) { System.out.print(m); } System.out.println(""); } sc.close(); } }
[ "hi@DESKTOP-EGCI8BH" ]
hi@DESKTOP-EGCI8BH
c11f41af6e35763960a4aa7d7796430b31608112
d8242dc1aa56e70dcce3eb8e9e7f85d637148db3
/src/main/java/players/CandinateEvaluator.java
a2cde62dff0439014eee33803e8d35ec26ceabea
[]
no_license
KaappoRaivio/shakki2
8c4f2f789dae2eaa46c47afe748fe068e9cd756b
46c59ae55b1c1f9d9b5672f8a3297a44f4bb6159
refs/heads/master
2021-05-20T09:11:57.651059
2021-02-06T13:49:43
2021-02-06T13:49:43
252,216,155
0
0
null
null
null
null
UTF-8
Java
false
false
6,252
java
package players; import chess.board.Board; import chess.board.BoardHelpers; import chess.move.Move; import chess.piece.basepiece.Piece; import chess.piece.basepiece.PieceColor; import chess.piece.basepiece.PieceType; import java.util.List; public class CandinateEvaluator implements BoardEvaluator { private int depth; private PieceColor color; public CandinateEvaluator(int depth, PieceColor color) { this.color = color; this.depth = depth; } int white = 0; int black = 0; @Override public double evaluateBoard(Board board, int currentDepth) { PieceColor perspective = board.getTurn(); if (perspective == PieceColor.WHITE) { white += 1; } else { black += 1; } if (board.isDraw()) { return 0; } else if (board.isCheckmate(perspective.invert())) { return 1e9 * (currentDepth + 1); } else if (board.isCheckmate(perspective)) { return -1e9 * (currentDepth + 1); } List<Move> ownMoves = board.getAllPossibleMoves(perspective, true, true); List<Move> opponentMoves = board.getAllPossibleMoves(perspective.invert(), true, true); double openingEvaluation = calculateOpeningEvalution(board, perspective, ownMoves) - calculateOpeningEvalution(board, perspective.invert(), opponentMoves); double middlegameEvaluation = calculateMiddlegameEvaluation(board, perspective, ownMoves) - calculateMiddlegameEvaluation(board, perspective.invert(), opponentMoves); double endgameEvaluation = calculateEndgameEvaluation(board, perspective, ownMoves) - calculateEndgameEvaluation(board, perspective.invert(), opponentMoves); GameStage stage = GameStage.getGameStage(board, BoardEvaluatorHelpers.getMaterialSum(board)); return openingEvaluation * stage.getOpeningWeight() + middlegameEvaluation * stage.getMiddlegameWeight() + endgameEvaluation * stage.getEndgameWeight(); } public GameStage getGameStage (Board board) { return GameStage.getGameStage(board, BoardEvaluatorHelpers.getMaterialSum(board)); } private static double calculateEndgameEvaluation(Board board, PieceColor perspective, List<Move> possibleMoves) { double totalValue = BoardEvaluatorHelpers.getMaterialPercentage(board, perspective) * 5000; // double totalValue = BoardEvaluatorHelpers.getMaterialAmount(board, perspective); totalValue += BoardEvaluatorHelpers.getAttackValue(board, possibleMoves) * 2; totalValue += BoardEvaluatorHelpers.getPawnAdvantage(board, perspective) * 2; totalValue += BoardEvaluatorHelpers.getPassedPawns(board, perspective) * 900; // double totalValue = Math.pow(getMaterialPercentage(board, perspective), 3) * 1000; // totalValue += getProtectionValue(board, possibleMoves); // return 0; return totalValue; } private static double calculateMiddlegameEvaluation (Board board, PieceColor perspective, List<Move> possibleMoves) { double totalValue = BoardEvaluatorHelpers.getMaterialAmount(board, perspective); totalValue += BoardEvaluatorHelpers.calculateDevelopmentPenalty(board, perspective) * 0.2; totalValue += BoardEvaluatorHelpers.getAttackValue2(board, possibleMoves) * 2; if (BoardEvaluatorHelpers.hasCastled(board, perspective)) { totalValue += 50; } if (BoardEvaluatorHelpers.hasKingMoved(board, perspective)) { totalValue -= 50; } totalValue += analyzePieceComposition(board, perspective); totalValue += possibleMoves.size() * .1; return totalValue; } private static double analyzePieceComposition(Board board, PieceColor perspective) { double totalValue = 0; var composition = BoardHelpers.getPieceComposition(board, perspective); if (composition.get(PieceType.BISHOP) == 2) totalValue += 50; int amountOfKnights = composition.get(PieceType.KNIGHT); int amountOfPawns = composition.get(PieceType.PAWN); totalValue += amountOfKnights * Math.max(amountOfPawns - 3, 0); return totalValue; } private static double calculateOpeningEvalution (Board board, PieceColor perspective, List<Move> possibleMoves) { double totalValue = BoardEvaluatorHelpers.getMaterialAmount(board, perspective); totalValue += BoardEvaluatorHelpers.calculateDevelopmentPenalty(board, perspective) * 0.25; if (board.getPieceInSquareRelativeTo(perspective, 4, 3).getType() == PieceType.PAWN) { totalValue += 5; if (board.getPieceInSquareRelativeTo(perspective, 2, 2).getType() == PieceType.KNIGHT) { totalValue += 5; } Piece opponentCandinate = board.getPieceInSquareRelativeTo(perspective, 5, 4); if (opponentCandinate.getType() != PieceType.NO_PIECE && opponentCandinate.getType() != PieceType.PAWN && opponentCandinate.getColor() == perspective.invert()) { totalValue += 3; } } if (board.getPieceInSquareRelativeTo(perspective, 3, 3).getType() == PieceType.PAWN) { totalValue += 5; if (board.getPieceInSquareRelativeTo(perspective, 5, 2).getType() == PieceType.KNIGHT) { totalValue += 5; } Piece opponentCandinate = board.getPieceInSquareRelativeTo(perspective, 2, 4); if (opponentCandinate.getType() != PieceType.NO_PIECE && opponentCandinate.getType() != PieceType.PAWN && opponentCandinate.getColor() == perspective.invert()) { totalValue += 3; } } if (!BoardEvaluatorHelpers.pieceFoundIn(List.of("D1", "D2", "E2"), PieceType.QUEEN, perspective, board, true)) { totalValue -= 20; } if (BoardEvaluatorHelpers.hasKingMoved(board, perspective)) { totalValue -= 50; } if (BoardEvaluatorHelpers.hasCastled(board, perspective)) { totalValue += 50; } return totalValue; } }
[ "kaappo.raivio@gmail.com" ]
kaappo.raivio@gmail.com
a00196b3cfe0c18792f1fb05a737a75f27b59b8b
015e28a2d623ba900423883bbd15631887001f1f
/eclipse-workspace/SampleCRMProject2/src/main/java/com/freecrm/testdata/Xls_Reader.java
11e275b2279a1e818fdef9ce325b1d34c41c72f3
[]
no_license
ptech84/Project-Git
2cca30576dbfe27be51fb37d5113a14e6d827007
d8ef1e3328fc4e6bfd36224e39800829b5168980
refs/heads/master
2022-07-10T09:58:13.904729
2020-02-02T02:51:43
2020-02-02T02:51:43
149,109,627
0
0
null
2022-06-28T14:32:35
2018-09-17T10:37:30
HTML
UTF-8
Java
false
false
22,100
java
package com.freecrm.testdata; import org.apache.poi.hssf.usermodel.HSSFCellStyle; import org.apache.poi.hssf.usermodel.HSSFDateUtil; import org.apache.poi.hssf.util.HSSFColor; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.CellStyle; import org.apache.poi.ss.usermodel.IndexedColors; import org.apache.poi.xssf.usermodel.*; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.util.Calendar; @SuppressWarnings("ALL") public class Xls_Reader { public static String filename = "/Users/praveennaidu/git/repository/SampleCRMProject/src/main/java/com/freecrm/testdata/FreeCrmTestData.numbers"; public String path; public FileInputStream fis = null; public FileOutputStream fileOut =null; private XSSFWorkbook workbook = null; private XSSFSheet sheet = null; private XSSFRow row =null; private XSSFCell cell = null; public Xls_Reader(String path) { this.path=path; try { fis = new FileInputStream(path); workbook = new XSSFWorkbook(fis); sheet = workbook.getSheetAt(0); fis.close(); } catch (Exception e) { e.printStackTrace(); } } // returns the row count in a sheet public int getRowCount(String sheetName){ int index = workbook.getSheetIndex(sheetName); if(index==-1) return 0; else{ sheet = workbook.getSheetAt(index); int number=sheet.getLastRowNum()+1; return number; } } // returns the data from a cell public String getCellData(String sheetName,String colName,int rowNum){ try{ if(rowNum <=0) return ""; int index = workbook.getSheetIndex(sheetName); int col_Num=-1; if(index==-1) return ""; sheet = workbook.getSheetAt(index); row=sheet.getRow(0); for(int i=0;i<row.getLastCellNum();i++){ //System.out.println(row.getCell(i).getStringCellValue().trim()); if(row.getCell(i).getStringCellValue().trim().equals(colName.trim())) col_Num=i; } if(col_Num==-1) return ""; sheet = workbook.getSheetAt(index); row = sheet.getRow(rowNum-1); if(row==null) return ""; cell = row.getCell(col_Num); if(cell==null) return ""; //System.out.println(cell.getCellType()); if(cell.getCellType()==Cell.CELL_TYPE_STRING) return cell.getStringCellValue(); else if(cell.getCellType()==Cell.CELL_TYPE_NUMERIC || cell.getCellType()==Cell.CELL_TYPE_FORMULA ){ String cellText = String.valueOf(cell.getNumericCellValue()); if (HSSFDateUtil.isCellDateFormatted(cell)) { // format in form of M/D/YY double d = cell.getNumericCellValue(); Calendar cal =Calendar.getInstance(); cal.setTime(HSSFDateUtil.getJavaDate(d)); cellText = (String.valueOf(cal.get(Calendar.YEAR))).substring(2); cellText = cal.get(Calendar.DAY_OF_MONTH) + "/" + cal.get(Calendar.MONTH)+1 + "/" + cellText; //System.out.println(cellText); } return cellText; }else if(cell.getCellType()==Cell.CELL_TYPE_BLANK) return ""; else return String.valueOf(cell.getBooleanCellValue()); } catch(Exception e){ e.printStackTrace(); return "row "+rowNum+" or column "+colName +" does not exist in xls"; } } // returns the data from a cell public String getCellData(String sheetName,int colNum,int rowNum){ try{ if(rowNum <=0) return ""; int index = workbook.getSheetIndex(sheetName); if(index==-1) return ""; sheet = workbook.getSheetAt(index); row = sheet.getRow(rowNum-1); if(row==null) return ""; cell = row.getCell(colNum); if(cell==null) return ""; if(cell.getCellType()==Cell.CELL_TYPE_STRING) return cell.getStringCellValue(); else if(cell.getCellType()==Cell.CELL_TYPE_NUMERIC || cell.getCellType()==Cell.CELL_TYPE_FORMULA ){ String cellText = String.valueOf(cell.getNumericCellValue()); if (HSSFDateUtil.isCellDateFormatted(cell)) { // format in form of M/D/YY double d = cell.getNumericCellValue(); Calendar cal =Calendar.getInstance(); cal.setTime(HSSFDateUtil.getJavaDate(d)); cellText = (String.valueOf(cal.get(Calendar.YEAR))).substring(2); cellText = cal.get(Calendar.MONTH)+1 + "/" + cal.get(Calendar.DAY_OF_MONTH) + "/" + cellText; // System.out.println(cellText); } return cellText; }else if(cell.getCellType()==Cell.CELL_TYPE_BLANK) return ""; else return String.valueOf(cell.getBooleanCellValue()); } catch(Exception e){ e.printStackTrace(); return "row "+rowNum+" or column "+colNum +" does not exist in xls"; } } // returns true if data is set successfully else false public boolean setCellData(String sheetName,String colName,int rowNum, String data){ try{ fis = new FileInputStream(path); workbook = new XSSFWorkbook(fis); if(rowNum<=0) return false; int index = workbook.getSheetIndex(sheetName); int colNum=-1; if(index==-1) return false; sheet = workbook.getSheetAt(index); row=sheet.getRow(0); for(int i=0;i<row.getLastCellNum();i++){ //System.out.println(row.getCell(i).getStringCellValue().trim()); if(row.getCell(i).getStringCellValue().trim().equals(colName)) colNum=i; } if(colNum==-1) return false; sheet.autoSizeColumn(colNum); row = sheet.getRow(rowNum-1); if (row == null) row = sheet.createRow(rowNum-1); cell = row.getCell(colNum); if (cell == null) cell = row.createCell(colNum); // cell style //CellStyle cs = workbook.createCellStyle(); //cs.setWrapText(true); //cell.setCellStyle(cs); cell.setCellValue(data); fileOut = new FileOutputStream(path); workbook.write(fileOut); fileOut.close(); } catch(Exception e){ e.printStackTrace(); return false; } return true; } // returns true if data is set successfully else false public boolean setCellData(String sheetName,String colName,int rowNum, String data,String url){ //System.out.println("setCellData setCellData******************"); try{ fis = new FileInputStream(path); workbook = new XSSFWorkbook(fis); if(rowNum<=0) return false; int index = workbook.getSheetIndex(sheetName); int colNum=-1; if(index==-1) return false; sheet = workbook.getSheetAt(index); //System.out.println("A"); row=sheet.getRow(0); for(int i=0;i<row.getLastCellNum();i++){ //System.out.println(row.getCell(i).getStringCellValue().trim()); if(row.getCell(i).getStringCellValue().trim().equalsIgnoreCase(colName)) colNum=i; } if(colNum==-1) return false; sheet.autoSizeColumn(colNum); //ashish row = sheet.getRow(rowNum-1); if (row == null) row = sheet.createRow(rowNum-1); cell = row.getCell(colNum); if (cell == null) cell = row.createCell(colNum); cell.setCellValue(data); XSSFCreationHelper createHelper = workbook.getCreationHelper(); //cell style for hyperlinks //by default hypelrinks are blue and underlined CellStyle hlink_style = workbook.createCellStyle(); XSSFFont hlink_font = workbook.createFont(); hlink_font.setUnderline(XSSFFont.U_SINGLE); hlink_font.setColor(IndexedColors.BLUE.getIndex()); hlink_style.setFont(hlink_font); //hlink_style.setWrapText(true); XSSFHyperlink link = createHelper.createHyperlink(XSSFHyperlink.LINK_FILE); link.setAddress(url); cell.setHyperlink(link); cell.setCellStyle(hlink_style); fileOut = new FileOutputStream(path); workbook.write(fileOut); fileOut.close(); } catch(Exception e){ e.printStackTrace(); return false; } return true; } // returns true if sheet is created successfully else false public boolean addSheet(String sheetname){ FileOutputStream fileOut; try { workbook.createSheet(sheetname); fileOut = new FileOutputStream(path); workbook.write(fileOut); fileOut.close(); } catch (Exception e) { e.printStackTrace(); return false; } return true; } // returns true if sheet is removed successfully else false if sheet does not exist public boolean removeSheet(String sheetName){ int index = workbook.getSheetIndex(sheetName); if(index==-1) return false; FileOutputStream fileOut; try { workbook.removeSheetAt(index); fileOut = new FileOutputStream(path); workbook.write(fileOut); fileOut.close(); } catch (Exception e) { e.printStackTrace(); return false; } return true; } // returns true if column is created successfully public boolean addColumn(String sheetName,String colName){ //System.out.println("**************addColumn*********************"); try{ fis = new FileInputStream(path); workbook = new XSSFWorkbook(fis); int index = workbook.getSheetIndex(sheetName); if(index==-1) return false; XSSFCellStyle style = workbook.createCellStyle(); style.setFillForegroundColor(HSSFColor.GREY_40_PERCENT.index); style.setFillPattern(HSSFCellStyle.SOLID_FOREGROUND); sheet=workbook.getSheetAt(index); row = sheet.getRow(0); if (row == null) row = sheet.createRow(0); //cell = row.getCell(); //if (cell == null) //System.out.println(row.getLastCellNum()); if(row.getLastCellNum() == -1) cell = row.createCell(0); else cell = row.createCell(row.getLastCellNum()); cell.setCellValue(colName); cell.setCellStyle(style); fileOut = new FileOutputStream(path); workbook.write(fileOut); fileOut.close(); }catch(Exception e){ e.printStackTrace(); return false; } return true; } // removes a column and all the contents public boolean removeColumn(String sheetName, int colNum) { try{ if(!isSheetExist(sheetName)) return false; fis = new FileInputStream(path); workbook = new XSSFWorkbook(fis); sheet=workbook.getSheet(sheetName); XSSFCellStyle style = workbook.createCellStyle(); style.setFillForegroundColor(HSSFColor.GREY_40_PERCENT.index); XSSFCreationHelper createHelper = workbook.getCreationHelper(); style.setFillPattern(HSSFCellStyle.NO_FILL); for(int i =0;i<getRowCount(sheetName);i++){ row=sheet.getRow(i); if(row!=null){ cell=row.getCell(colNum); if(cell!=null){ cell.setCellStyle(style); row.removeCell(cell); } } } fileOut = new FileOutputStream(path); workbook.write(fileOut); fileOut.close(); } catch(Exception e){ e.printStackTrace(); return false; } return true; } // find whether sheets exists public boolean isSheetExist(String sheetName){ int index = workbook.getSheetIndex(sheetName); if(index==-1){ index=workbook.getSheetIndex(sheetName.toUpperCase()); if(index==-1) return false; else return true; } else return true; } // returns number of columns in a sheet public int getColumnCount(String sheetName){ // check if sheet exists if(!isSheetExist(sheetName)) return -1; sheet = workbook.getSheet(sheetName); row = sheet.getRow(0); if(row==null) return -1; return row.getLastCellNum(); } //String sheetName, String testCaseName,String keyword ,String URL,String message public boolean addHyperLink(String sheetName,String screenShotColName,String testCaseName,int index,String url,String message){ //System.out.println("ADDING addHyperLink******************"); url=url.replace('\\', '/'); if(!isSheetExist(sheetName)) return false; sheet = workbook.getSheet(sheetName); for(int i=2;i<=getRowCount(sheetName);i++){ if(getCellData(sheetName, 0, i).equalsIgnoreCase(testCaseName)){ //System.out.println("**caught "+(i+index)); setCellData(sheetName, screenShotColName, i+index, message,url); break; } } return true; } public int getCellRowNum(String sheetName,String colName,String cellValue){ for(int i=2;i<=getRowCount(sheetName);i++){ if(getCellData(sheetName,colName , i).equalsIgnoreCase(cellValue)){ return i; } } return -1; } // to run this on stand alone public static void main(String arg[]) throws IOException{ //System.out.println(filename); Xls_Reader datatable = null; datatable = new Xls_Reader("src/Framework_XL_Files/Controller.xlsx"); for(int col=0 ;col< datatable.getColumnCount("TC5"); col++){ System.out.println(datatable.getCellData("TC5", col, 1)); } } }
[ "ptech84@gmail.com" ]
ptech84@gmail.com
2b917f5a8e472929c634c5ed3f4aec9e1476be75
336e5c7611ef5921ddac2bcb4e1581dda502df5b
/src/java/de/siv/webinstaller/IsAlreadyInstalled.java
be02686e24587300c3a7ad2734cb392f87a8a994
[]
no_license
SteffenBaresel/installer
d905361501630c9b7aa821fc5b6bb0fb081b75b8
a9a86e80f858568b89108e45e5e15a971a1f29de
refs/heads/master
2016-09-02T03:13:49.319128
2015-04-16T07:33:34
2015-04-16T07:33:34
14,446,587
0
0
null
null
null
null
UTF-8
Java
false
false
2,455
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package de.siv.webinstaller; import java.io.FileNotFoundException; import java.io.IOException; import java.io.PrintWriter; import java.sql.SQLException; import java.util.Properties; import java.util.logging.Level; import java.util.logging.Logger; import javax.naming.NamingException; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * * @author sbaresel */ public class IsAlreadyInstalled extends HttpServlet { Properties props = null; protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); String line = null; try { response.addHeader("Access-Control-Allow-Origin", "*"); response.addHeader("Access-Control-Allow-Methods", "*"); response.setContentType("application/json; charset=utf-8"); /* * Execution * * 1. Create Table Structure */ boolean ctsSuccess = true; try { line = Functions.IsAlreadyInstalled(); } catch(SQLException ex) { ctsSuccess = false; out.println("{\"INSTALLED\":\"0\"}"); Logger.getLogger(PrepareRepository.class.getName()).log(Level.SEVERE, null, ex); } finally { if (ctsSuccess) { out.println("{\"INSTALLED\":\"" + line + "\"}"); } } } catch (FileNotFoundException ex) { Logger.getLogger(PrepareRepository.class.getName()).log(Level.SEVERE, null, ex); } catch (NamingException ex) { Logger.getLogger(PrepareRepository.class.getName()).log(Level.SEVERE, null, ex); } } @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // } }
[ "sbaresel@172.23.3.177" ]
sbaresel@172.23.3.177
ba14d6676272507d05167ecfc02e78ff943a6932
5a9b7739617cc6c6c643e2bba98728b7697566d3
/Java_Stream_Assignment5/src/PracticeStreamTest.java
829d2f30b720d9956a255ec79d9ae8c386186f7a
[]
no_license
Ankancgi2021/Java
deab55343c3245cb834816f0ed822e627c54282b
9c16efc4437e73e34a15db705933329fc556135c
refs/heads/master
2023-04-29T22:50:38.039401
2021-05-13T16:55:03
2021-05-13T16:55:03
367,099,717
0
0
null
null
null
null
UTF-8
Java
false
false
174
java
import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.Test; class PracticeStreamTest { @Test void test() { fail("Not yet implemented"); } }
[ "ankanghoshcs.1620@gmail.com" ]
ankanghoshcs.1620@gmail.com
65cc5255c6b3ff3fe2cb743fd7a87b18e25387cc
2c465bca0a00c746e0175335b5c78d2d90c372f8
/middleware/src/main/java/fr/raprincis/demo/messaging/routes/TimerRoute.java
032ee542cf06e93d51e29b4b9fb3f401f0b8fb39
[]
no_license
raprins/messaging
32326b387b6abb79d17a877349842d19b71f38dc
d56caee3ad7b7981172c45048feb8625b7067f94
refs/heads/master
2023-07-18T08:02:52.373187
2021-08-24T14:21:30
2021-08-24T14:21:30
399,408,736
0
0
null
null
null
null
UTF-8
Java
false
false
1,012
java
package fr.raprincis.demo.messaging.routes; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import fr.raprincis.demo.messaging.services.CommonLogging; import java.time.LocalDateTime; import org.apache.camel.LoggingLevel; import org.apache.camel.builder.RouteBuilder; //@Component public class TimerRoute extends RouteBuilder { @Autowired private CommonLogging commonLogging; @Override public void configure() throws Exception { /** * https://camel.apache.org/components/latest/timer-component.html */ from("timer:my-first?period=3s") .transform().constant(String.format("Premier body %s", LocalDateTime.now())) // Transformation .log(LoggingLevel.INFO, "middle-logger", "${body}") .bean(commonLogging) // Change le body .log(LoggingLevel.INFO, "middle-logger", "${body}") .to("log:my-logger?level=INFO"); } }
[ "andrisoaprincis.rakotomanga@cgi.com" ]
andrisoaprincis.rakotomanga@cgi.com
9152b85a81ae4e0b2f2350c8c6fdbdd037cff071
2917afec784ae2add12d9aa9bc580d30ff84b605
/src/test/java/br/com/afc/wikipedia/pages/SoftwareTestingPage.java
9f164e915eafa316a7b3f0a4e853813485d32559
[]
no_license
Vignesh2691/JavaSeleniumTestSample
1ff85c8dcee7e4f6f236853d96c98bb8e3a7a702
331b2bb2c30d0878c15b2ca5c71c3c3ea99678b2
refs/heads/master
2020-12-02T17:44:34.922673
2017-05-16T12:24:24
2017-05-16T12:24:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
460
java
package br.com.afc.wikipedia.pages; import org.openqa.selenium.WebDriver; public class SoftwareTestingPage extends AbstractPage { private static final String SOFTWARE_TESTING_PAGE = "Software_testing"; public SoftwareTestingPage(WebDriver driver) { super(driver); } public static SoftwareTestingPage create(WebDriver driver) { return new SoftwareTestingPage(driver); } @Override public String getPage() { return SOFTWARE_TESTING_PAGE; } }
[ "anderson.custodio@elotech.com.br" ]
anderson.custodio@elotech.com.br
26364d99e8bbda765ad3aa6e69f2efeb72e499b9
4635fd8799e0fb9136c8874ea60f8d6f211789ee
/src/algorithm/Notation01.java
5fc7499f6e018ba0ea2f7d1bdc2831961a2eec7e
[]
no_license
zhengxiaocai/HelloWorld
78b08dda23c074fbee7a30aeaa522f12270aeee8
3475b1253d63f9c9be5504da416c551d0e07628d
refs/heads/master
2022-11-21T01:36:07.104075
2020-07-15T14:34:20
2020-07-15T14:34:20
266,973,532
0
0
null
null
null
null
UTF-8
Java
false
false
448
java
package algorithm; public class Notation01 { public static void main(String[] args) { // 时间复杂度为 O(1) int n = 1000; System.out.println("Hey - your input is : " + n); // 时间复杂度为 O(1) int m = 1000; System.out.println("Hey - your input is : " + m); System.out.println("Hmm.. I'm doing more stuff with : " + m); System.out.println("And more: " + m); } }
[ "zhengyuan_tester@163.com" ]
zhengyuan_tester@163.com
a74916d7f5cf602a61db699c2f118f9745df91c0
aa6997aba1475b414c1688c9acb482ebf06511d9
/src/java/awt/print/PrinterIOException.java
94214c84da6f7dbe60af6d2d8d6c466ca8f3ad1f
[]
no_license
yueny/JDKSource1.8
eefb5bc88b80ae065db4bc63ac4697bd83f1383e
b88b99265ecf7a98777dd23bccaaff8846baaa98
refs/heads/master
2021-06-28T00:47:52.426412
2020-12-17T13:34:40
2020-12-17T13:34:40
196,523,101
4
2
null
null
null
null
UTF-8
Java
false
false
2,186
java
/* * Copyright (c) 1998, 2000, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package java.awt.print; import java.io.IOException; /** * The <code>PrinterIOException</code> class is a subclass of * {@link PrinterException} and is used to indicate that an IO error * of some sort has occurred while printing. * * <p>As of release 1.4, this exception has been retrofitted to conform to * the general purpose exception-chaining mechanism. The * "<code>IOException</code> that terminated the print job" * that is provided at construction time and accessed via the * {@link #getIOException()} method is now known as the <i>cause</i>, * and may be accessed via the {@link Throwable#getCause()} method, * as well as the aforementioned "legacy method." */ public class PrinterIOException extends PrinterException { static final long serialVersionUID = 5850870712125932846L; /** * The IO error that terminated the print job. * * @serial */ private IOException mException; /** * Constructs a new <code>PrinterIOException</code> * with the string representation of the specified * {@link IOException}. * * @param exception the specified <code>IOException</code> */ public PrinterIOException(IOException exception) { initCause(null); // Disallow subsequent initCause mException = exception; } /** * Returns the <code>IOException</code> that terminated * the print job. * * <p>This method predates the general-purpose exception chaining facility. * The {@link Throwable#getCause()} method is now the preferred means of * obtaining this information. * * @return the <code>IOException</code> that terminated the print job. * @see IOException */ public IOException getIOException() { return mException; } /** * Returns the the cause of this exception (the <code>IOException</code> * that terminated the print job). * * @return the cause of this exception. * @since 1.4 */ public Throwable getCause() { return mException; } }
[ "yueny09@163.com" ]
yueny09@163.com
4fa7fb1191e76c84e2537c0944ae1a1fb111778b
fedd4b03a3ddca81c009a31b24c691615c012d7f
/src/Service/UUIDGenerator.java
d34e1ce4db6f56536ae5478ee6fbd7ff4fbefe07
[]
no_license
Ashaman47/Family-Map-Server
ca5fb13a151c14c43a1a9b0d20f84766b4c57a21
b7df7d3fbbf70746b59a19eb62038256956be854
refs/heads/main
2023-02-09T06:30:58.722915
2020-12-28T23:55:56
2020-12-28T23:55:56
325,142,641
0
0
null
null
null
null
UTF-8
Java
false
false
203
java
package Service; import java.util.UUID; public class UUIDGenerator { public String UUIDGenerator() { String uuid = UUID.randomUUID().toString(); return uuid; } }
[ "ryankhill47@gmail.com" ]
ryankhill47@gmail.com
b3f61b1a080db6e0fa6379597dfcedc9f63e40ca
d80ad130619138bf9e409cb372bf17a616dbbdbf
/src/main/java/alien4cloud/aspide/PluginContextConfiguration.java
9e183a74e1b942c0a009c3dd772a212ffa1f8af3
[]
no_license
adispataru/aspide-orchestrator
d49a4c677aeca76d7dabef9bbe29c29edb6105a3
1f354dc20b18112b754c4855862726ed21dc10a5
refs/heads/master
2021-07-03T14:59:58.699434
2020-11-09T11:44:31
2020-11-09T11:44:31
191,824,516
0
0
null
null
null
null
UTF-8
Java
false
false
618
java
package alien4cloud.aspide; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; /** * Plugin spring configuration entry point. */ @Configuration @ComponentScan(basePackages = {"alien4cloud.aspide", "alien4cloud.aspide.artifacts"}) public class PluginContextConfiguration { // @Bean // public ToscaTypeProvider defaultToscaTypeProvider() { // return new DefaultToscaTypeProvider(); // } // @Bean // public BrooklynToscaTypeProvider brooklynToscaTypeProvider() { // return new BrooklynToscaTypeProvider(); // } }
[ "adi.spataru92@gmail.com" ]
adi.spataru92@gmail.com
51613156fd5ee6e2923ae3e398144af34fd48278
42c065e1043a59e4839a5793372830611deeb621
/src/main/java/my/vaadin/SwitchView.java
d2a81e909a264f9dcceec4b651cee4852d46aed4
[]
no_license
UkaszW/stonka-web-service
64924e118fa6817d296611f6514c259b7065f2ff
cecbb21c6a0541538a797b4248e5ed490b59a988
refs/heads/master
2021-09-09T16:15:28.382061
2018-03-17T20:44:05
2018-03-17T20:44:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
145
java
package my.vaadin; import com.vaadin.navigator.Navigator; public interface SwitchView { void goToView(Navigator navigator, String view); }
[ "226014@student.pwr.edu.pl" ]
226014@student.pwr.edu.pl
eb96edf656dbff0e630f60ae7861b4172efbce7c
be863145b4aa0bc02920bb0d06c67a72ef3ab8db
/kitchenslk/src/main/java/com/janaka/kitchenslk/dto/EmailTemplateDTO.java
eea09209ee6de6802c587ff4a714f42d7b4cdba1
[]
no_license
kitchenslk/kitchens.lk
163e2b08813ffab650928388a6337245ec335876
9c23cdca1483d4942b0298a5dac1773d1375bb93
refs/heads/master
2018-12-27T22:45:12.405253
2013-08-11T15:28:16
2013-08-11T15:31:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,357
java
package com.janaka.kitchenslk.dto; import java.io.Serializable; import java.util.HashMap; import java.util.Map; /** * @author : Nadeeshani Senevirathna * Date/Time: Jul 22, 2013 - 10:48:29 AM * Project : kitchenslk */ public class EmailTemplateDTO implements Serializable{ private static final long serialVersionUID = 1L; private String title; private String date; private String toName; private String message; private String url; private String encryptedUserName; private String[] toEmailAddressList; private String fromEmailAddress; private String velocityTemplateLocation; public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getDate() { return date; } public void setDate(String date) { this.date = date; } public String getToName() { return toName; } public void setToName(String toName) { this.toName = toName; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getEncryptedUserName() { return encryptedUserName; } public void setEncryptedUserName(String encryptedUserName) { this.encryptedUserName = encryptedUserName; } public String[] getToEmailAddressList() { return toEmailAddressList; } public void setToEmailAddressList(String[] toEmailAddressList) { this.toEmailAddressList = toEmailAddressList; } public String getFromEmailAddress() { return fromEmailAddress; } public void setFromEmailAddress(String fromEmailAddress) { this.fromEmailAddress = fromEmailAddress; } public String getVelocityTemplateLocation() { return velocityTemplateLocation; } public void setVelocityTemplateLocation(String velocityTemplateLocation) { this.velocityTemplateLocation = velocityTemplateLocation; } public Map<String, Object> toBasicMap() { Map<String, Object> map=new HashMap<String, Object>(); map.put("title", title); map.put("date", date); map.put("toName", toName); map.put("message", message); map.put("url", url); map.put("encryptedUserName", encryptedUserName); return map; } }
[ "Nadeeshani Senevirathna@Nadeeshani-PC" ]
Nadeeshani Senevirathna@Nadeeshani-PC
3f1fd53b5f5adba831962cb7638bc0ed027bef5b
873e6a996fe3af5045fb9a6594abdcc7dacfafa2
/src/InfoSquare.java
ff6d699c7bb6d785349bbeb5cf30f654b429d17f
[]
no_license
haasdo95/ChessDemo
67f5d7657031d22396d0333e833e61a3d4fd50ee
3b537cea74332788e824e8d443d36788803ab9e4
refs/heads/master
2021-07-13T20:51:21.657598
2017-10-07T06:13:08
2017-10-07T06:13:08
106,075,430
2
0
null
null
null
null
UTF-8
Java
false
false
1,194
java
import javax.swing.*; import java.awt.*; public class InfoSquare extends JPanel { private JLabel thatLabel; private JLabel thisLabel; InfoSquare(JLabel turnIndicator) { this.setLayout(new GridLayout(2, 1)); this.add(turnIndicator); JPanel scorePanel = new JPanel(new GridLayout(1, 2)); int thatScore = 0; int thisScore = 0; // set up "THAT" JPanel thatPanel = new JPanel(); this.thatLabel = new JLabel("" + thatScore, SwingConstants.CENTER); thatLabel.setForeground(Color.WHITE); thatPanel.add(thatLabel, CENTER_ALIGNMENT); thatPanel.setBackground(Color.BLACK); // set up "THIS" JPanel thisPanel = new JPanel(); this.thisLabel = new JLabel("" + thisScore, SwingConstants.CENTER); thisLabel.setForeground(Color.BLACK); thisPanel.add(thisLabel, CENTER_ALIGNMENT); thisPanel.setBackground(Color.WHITE); scorePanel.add(thatPanel); scorePanel.add(thisPanel); this.add(scorePanel); } void updateScore (Pair score) { this.thatLabel.setText("" + score.x); this.thisLabel.setText("" + score.y); } }
[ "gdou2@illinois.edu" ]
gdou2@illinois.edu
723d085950e90eb777e39dfc8d835f74924511e9
973e5f41fabdfb8de22be7c45a6f0224f11c9aec
/src/db/DBConnection.java
446f0a48c5dcbe0f2b2a2ac485f22175e01cf615
[]
no_license
jerrypapa/HandymanConnect
3fc96825e9fd48c30636e006841d6f28bea4a02a
65b5c4ff25431a8565a194fd3cd9487fd3bf73ee
refs/heads/master
2020-03-27T10:37:51.573714
2018-09-03T14:11:38
2018-09-03T14:11:38
146,433,780
0
0
null
null
null
null
UTF-8
Java
false
false
639
java
package db; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class DBConnection { private static Connection connection; public static Connection getConnection(){ String user=("root"); String pwd=("Wilfrida2017"); String url=("jdbc:mysql://localhost:3306/Handymen"); try { connection=DriverManager.getConnection(url,user,pwd); } catch (SQLException e) { e.printStackTrace(); } return connection; } public static void main(String[] args) { System.out.print(getConnection()); } }
[ "jerrybrads38@gmail.com" ]
jerrybrads38@gmail.com
fd62570074af27e8bd7ec3b018adb99a0685e92f
28c22641ec8f626ad37b437a8eee471e9a7a9351
/src/main/java/me/ndPrince/routeOptimization/EmployeeRepository.java
b197b744f2b478440c2850c47a921fe76cfb1575
[]
no_license
2ndPrince/routeOptimization
0524c0807efb8df68b939e07fd7c70e4e567b749
bf0f0c644d8ba7ea07a58b428b7160520470cb15
refs/heads/master
2023-01-10T22:59:21.388275
2020-11-15T05:09:13
2020-11-15T05:09:13
279,976,274
0
0
null
2020-11-15T05:09:14
2020-07-15T20:53:48
Java
UTF-8
Java
false
false
343
java
package me.ndPrince.routeOptimization; import org.springframework.data.repository.CrudRepository; import org.springframework.stereotype.Repository; import java.util.List; @Repository public interface EmployeeRepository extends CrudRepository<Employee, Long> { List<Employee> findByName(String name); Employee findById(long id); }
[ "astonisher88@gmail.com" ]
astonisher88@gmail.com
d6c4663954fba084a4c3c5899cc2c5fa77e09dbb
282e672d4e3da36869341381a87683b59a40e37f
/phynixx/phynixx-watchdog/src/main/java/org/csc/phynixx/watchdog/objectref/WeakObjectReference.java
baaff22d27925e3581dfbb1d56eb669ff0e08f79
[ "Apache-2.0" ]
permissive
gestatech/Phynixx
b25cd73c2bfbc7b5d2304c3abd56b3061beb2fa2
a26c03bc229a8882c647799834115bec6bdc0ac8
refs/heads/master
2021-05-14T06:46:36.719578
2017-01-09T18:11:01
2017-01-09T18:11:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,976
java
package org.csc.phynixx.watchdog.objectref; /* * #%L * phynixx-watchdog * %% * Copyright (C) 2014 csc * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ import java.lang.ref.WeakReference; /** * the watchdog references the conditions weakly. If any condition is not referenced * by anybody but the watchdog it shut be handed to gc. * * @author Christoph Schmidt-Casdorff */ public class WeakObjectReference<T> extends WeakReference<T> implements IObjectReference<T> { private String description = null; public WeakObjectReference(T objectRef) { super(objectRef); this.description = (objectRef == null) ? "NULL" : objectRef.toString(); } public String getObjectDescription() { return this.description; } public boolean isWeakReference() { return true; } public boolean isStale() { return this.get() == null; } public boolean equals(Object obj) { Object objRef = this.get(); if (objRef == null) { return obj == null; } return objRef.equals(obj); } public int hashCode() { Object objRef = this.get(); if (objRef == null) { return "".hashCode(); } return objRef.hashCode(); } public String toString() { Object objRef = this.get(); if (objRef == null) { return ""; } return objRef.toString(); } }
[ "phynixx@freenet.de" ]
phynixx@freenet.de
8ce5fea810876c04c081af1994d8bd4d1af16ee3
f321db1ace514d08219cc9ba5089ebcfff13c87a
/generated-tests/dynamosa/tests/s1009/21_wheelwebtool/evosuite-tests/wheel/json/JSONObject_ESTest.java
25245d75821786442aecb9169fcee4de0b580a25
[]
no_license
sealuzh/dynamic-performance-replication
01bd512bde9d591ea9afa326968b35123aec6d78
f89b4dd1143de282cd590311f0315f59c9c7143a
refs/heads/master
2021-07-12T06:09:46.990436
2020-06-05T09:44:56
2020-06-05T09:44:56
146,285,168
2
2
null
null
null
null
UTF-8
Java
false
false
71,284
java
/* * This file was automatically generated by EvoSuite * Wed Jul 03 11:46:32 GMT 2019 */ package wheel.json; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import java.io.StringWriter; import java.io.Writer; import java.util.Collection; import java.util.HashMap; import java.util.LinkedList; import java.util.Map; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; import wheel.json.JSONArray; import wheel.json.JSONObject; import wheel.json.JSONTokener; @RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true) public class JSONObject_ESTest extends JSONObject_ESTest_scaffolding { @Test(timeout = 4000) public void test000() throws Throwable { HashMap<JSONArray, Long> hashMap0 = new HashMap<JSONArray, Long>(); String string0 = JSONObject.valueToString(hashMap0, 244, 65); assertEquals("{}", string0); } @Test(timeout = 4000) public void test001() throws Throwable { JSONObject jSONObject0 = new JSONObject(); HashMap<Object, Object> hashMap0 = new HashMap<Object, Object>(); jSONObject0.put("zLF4gKO/uR", (Map) hashMap0); String string0 = jSONObject0.toString((-1871)); assertNotNull(string0); } @Test(timeout = 4000) public void test002() throws Throwable { JSONObject jSONObject0 = null; try { jSONObject0 = new JSONObject("{K'9g^8$B"); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // Expected a ':' after a key at character 9 of {K'9g^8$B // verifyException("wheel.json.JSONTokener", e); } } @Test(timeout = 4000) public void test003() throws Throwable { JSONTokener jSONTokener0 = new JSONTokener("|lK4*<?cT`-\"atkL`"); JSONObject jSONObject0 = null; try { jSONObject0 = new JSONObject(jSONTokener0); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // A JSONObject text must begin with '{' at character 1 of |lK4*<?cT`-\"atkL` // verifyException("wheel.json.JSONTokener", e); } } @Test(timeout = 4000) public void test004() throws Throwable { LinkedList<JSONArray> linkedList0 = new LinkedList<JSONArray>(); JSONObject jSONObject0 = new JSONObject(linkedList0); assertEquals(2, jSONObject0.length()); } @Test(timeout = 4000) public void test005() throws Throwable { HashMap<JSONArray, Long> hashMap0 = new HashMap<JSONArray, Long>(); Long long0 = new Long(1302L); hashMap0.put((JSONArray) null, long0); String string0 = JSONObject.valueToString(hashMap0); assertNull(string0); } @Test(timeout = 4000) public void test006() throws Throwable { JSONObject jSONObject0 = new JSONObject(); JSONObject jSONObject1 = jSONObject0.append("{}", "{}"); JSONArray jSONArray0 = (JSONArray)jSONObject1.remove("{}"); assertEquals(1, jSONArray0.length()); } @Test(timeout = 4000) public void test007() throws Throwable { JSONObject jSONObject0 = new JSONObject(); jSONObject0.put("Vb#C", 1051L); long long0 = jSONObject0.optLong("Vb#C"); assertEquals(1051L, long0); } @Test(timeout = 4000) public void test008() throws Throwable { JSONObject jSONObject0 = new JSONObject(); JSONObject jSONObject1 = jSONObject0.put("D_$m%", (-12L)); long long0 = jSONObject1.optLong("D_$m%"); assertEquals((-12L), long0); } @Test(timeout = 4000) public void test009() throws Throwable { Short short0 = new Short((short)134); JSONObject jSONObject0 = new JSONObject(short0); HashMap<String, Float> hashMap0 = new HashMap<String, Float>(); Float float0 = new Float((-1.0)); hashMap0.put("gettoString", float0); jSONObject0.put("] is not a number.", (Map) hashMap0); jSONObject0.optJSONObject("] is not a number."); assertEquals(2, jSONObject0.length()); } @Test(timeout = 4000) public void test010() throws Throwable { Short short0 = new Short((short)134); JSONObject jSONObject0 = new JSONObject(short0); JSONObject jSONObject1 = jSONObject0.put("] is not a number.", (long) (short)134); int int0 = jSONObject1.optInt("] is not a number."); assertEquals(2, jSONObject0.length()); assertEquals(134, int0); } @Test(timeout = 4000) public void test011() throws Throwable { JSONObject jSONObject0 = new JSONObject(); jSONObject0.put("Null key.", (-1L)); int int0 = jSONObject0.optInt("Null key."); assertEquals((-1), int0); } @Test(timeout = 4000) public void test012() throws Throwable { JSONObject jSONObject0 = new JSONObject(); Double double0 = new Double(46); jSONObject0.putOpt("] is not a JSONObject.", double0); double double1 = jSONObject0.optDouble("] is not a JSONObject."); assertEquals(1, jSONObject0.length()); assertEquals(46.0, double1, 0.01); } @Test(timeout = 4000) public void test013() throws Throwable { JSONObject jSONObject0 = new JSONObject((Object) "~u("); Boolean boolean0 = new Boolean(true); jSONObject0.put("JSONArray initial value should be a string or collection or array.", (Object) boolean0); boolean boolean1 = jSONObject0.optBoolean("JSONArray initial value should be a string or collection or array."); assertEquals(4, jSONObject0.length()); assertTrue(boolean1); } @Test(timeout = 4000) public void test014() throws Throwable { JSONObject jSONObject0 = new JSONObject(); jSONObject0.append("{}", "{}"); JSONArray jSONArray0 = (JSONArray)jSONObject0.opt("{}"); assertEquals(1, jSONArray0.length()); } @Test(timeout = 4000) public void test015() throws Throwable { JSONObject jSONObject0 = new JSONObject(); int int0 = jSONObject0.length(); assertEquals(0, int0); } @Test(timeout = 4000) public void test016() throws Throwable { JSONObject jSONObject0 = new JSONObject(); JSONObject jSONObject1 = jSONObject0.put("] is not a number.", (-666L)); boolean boolean0 = jSONObject1.has("] is not a number."); assertTrue(boolean0); } @Test(timeout = 4000) public void test017() throws Throwable { JSONObject jSONObject0 = new JSONObject(); jSONObject0.accumulate(",\n", jSONObject0); String string0 = jSONObject0.getString(",\n"); assertNotNull(string0); } @Test(timeout = 4000) public void test018() throws Throwable { JSONObject jSONObject0 = new JSONObject(); jSONObject0.put("kg%0fif3G;", 0L); long long0 = jSONObject0.getLong("kg%0fif3G;"); assertEquals(0L, long0); } @Test(timeout = 4000) public void test019() throws Throwable { JSONObject jSONObject0 = new JSONObject(); Float float0 = new Float((-6629.822993206766)); jSONObject0.accumulate("Expected '", float0); long long0 = jSONObject0.getLong("Expected '"); assertEquals((-6629L), long0); } @Test(timeout = 4000) public void test020() throws Throwable { JSONObject jSONObject0 = new JSONObject(); HashMap<JSONObject, String> hashMap0 = new HashMap<JSONObject, String>(); hashMap0.put(jSONObject0, "?4O<oD"); jSONObject0.put("?4O<oD", (Map) hashMap0); JSONObject jSONObject1 = jSONObject0.getJSONObject("?4O<oD"); assertNotSame(jSONObject0, jSONObject1); } @Test(timeout = 4000) public void test021() throws Throwable { Short short0 = new Short((short)134); JSONObject jSONObject0 = new JSONObject(short0); LinkedList<Object> linkedList0 = new LinkedList<Object>(); jSONObject0.put("7{NYB#Hn;B", (Collection) linkedList0); jSONObject0.getJSONArray("7{NYB#Hn;B"); assertEquals(2, jSONObject0.length()); } @Test(timeout = 4000) public void test022() throws Throwable { JSONObject jSONObject0 = new JSONObject(); JSONObject jSONObject1 = jSONObject0.put("Expected a ',' or ']'", 1L); int int0 = jSONObject1.getInt("Expected a ',' or ']'"); assertEquals(1, int0); } @Test(timeout = 4000) public void test023() throws Throwable { JSONObject jSONObject0 = new JSONObject(); Double double0 = new Double((-668.5639)); jSONObject0.put("sum", (Object) double0); int int0 = jSONObject0.getInt("sum"); assertEquals((-668), int0); } @Test(timeout = 4000) public void test024() throws Throwable { Short short0 = new Short((short)120); JSONObject jSONObject0 = new JSONObject(short0); jSONObject0.put("] is not a number.", (long) (short)120); double double0 = jSONObject0.getDouble("] is not a number."); assertEquals(2, jSONObject0.length()); assertEquals(120.0, double0, 0.01); } @Test(timeout = 4000) public void test025() throws Throwable { JSONObject jSONObject0 = new JSONObject(); JSONObject jSONObject1 = jSONObject0.put("0..", (-1111L)); double double0 = jSONObject1.getDouble("0.."); assertEquals((-1111.0), double0, 0.01); } @Test(timeout = 4000) public void test026() throws Throwable { JSONObject jSONObject0 = new JSONObject(); JSONObject jSONObject1 = jSONObject0.accumulate("in", (Object) null); assertEquals(0, jSONObject1.length()); } @Test(timeout = 4000) public void test027() throws Throwable { Byte byte0 = new Byte((byte)43); String string0 = JSONObject.valueToString(byte0, 0, 0); assertNotNull(string0); } @Test(timeout = 4000) public void test028() throws Throwable { Short short0 = new Short((short)134); String string0 = JSONObject.valueToString(short0, (-2217), (-2217)); assertNotNull(string0); } @Test(timeout = 4000) public void test029() throws Throwable { Object object0 = JSONObject.NULL; String string0 = JSONObject.valueToString(object0, 65, 65); assertEquals("null", string0); } @Test(timeout = 4000) public void test030() throws Throwable { JSONObject jSONObject0 = new JSONObject(); String string0 = jSONObject0.toString(0); assertEquals("{}", string0); } @Test(timeout = 4000) public void test031() throws Throwable { JSONObject.testValidity((Object) null); } @Test(timeout = 4000) public void test032() throws Throwable { Object object0 = new Object(); JSONObject.testValidity(object0); } @Test(timeout = 4000) public void test033() throws Throwable { JSONArray jSONArray0 = new JSONArray(); JSONObject jSONObject0 = new JSONObject(jSONArray0); jSONObject0.remove("] is not a JSONArray."); assertEquals(1, jSONObject0.length()); } @Test(timeout = 4000) public void test034() throws Throwable { JSONObject jSONObject0 = new JSONObject(); Object object0 = jSONObject0.remove(""); assertNull(object0); } @Test(timeout = 4000) public void test035() throws Throwable { JSONObject jSONObject0 = new JSONObject(); Object object0 = new Object(); jSONObject0.putOpt("", object0); assertEquals(1, jSONObject0.length()); } @Test(timeout = 4000) public void test036() throws Throwable { JSONObject jSONObject0 = new JSONObject(); JSONObject jSONObject1 = jSONObject0.put("", true); assertEquals(1, jSONObject1.length()); } @Test(timeout = 4000) public void test037() throws Throwable { JSONObject jSONObject0 = new JSONObject(); HashMap<Object, Short> hashMap0 = new HashMap<Object, Short>(); JSONObject jSONObject1 = jSONObject0.put("", (Map) hashMap0); assertEquals(1, jSONObject1.length()); } @Test(timeout = 4000) public void test038() throws Throwable { Boolean boolean0 = new Boolean(false); String[] stringArray0 = new String[3]; JSONObject jSONObject0 = new JSONObject(boolean0, stringArray0); JSONObject jSONObject1 = jSONObject0.put("0", (Collection) null); assertEquals(1, jSONObject1.length()); } @Test(timeout = 4000) public void test039() throws Throwable { JSONObject jSONObject0 = new JSONObject(); HashMap<Byte, Integer> hashMap0 = new HashMap<Byte, Integer>(); Collection<Integer> collection0 = hashMap0.values(); JSONObject jSONObject1 = jSONObject0.put("\t", collection0); assertEquals(1, jSONObject1.length()); } @Test(timeout = 4000) public void test040() throws Throwable { JSONObject jSONObject0 = new JSONObject(); LinkedList<Object> linkedList0 = new LinkedList<Object>(); JSONObject jSONObject1 = jSONObject0.put("", (Collection) linkedList0); assertSame(jSONObject1, jSONObject0); } @Test(timeout = 4000) public void test041() throws Throwable { JSONObject jSONObject0 = new JSONObject(); Object object0 = new Object(); JSONObject jSONObject1 = jSONObject0.put("par", object0); assertEquals(1, jSONObject1.length()); } @Test(timeout = 4000) public void test042() throws Throwable { JSONObject jSONObject0 = new JSONObject(); Long long0 = new Long((-201L)); JSONObject jSONObject1 = jSONObject0.put("", (Object) long0); assertSame(jSONObject1, jSONObject0); } @Test(timeout = 4000) public void test043() throws Throwable { Float float0 = new Float(0.0); JSONObject jSONObject0 = new JSONObject(float0); jSONObject0.put("", (-442L)); assertEquals(4, jSONObject0.length()); } @Test(timeout = 4000) public void test044() throws Throwable { Short short0 = new Short((short)134); JSONObject jSONObject0 = new JSONObject(short0); jSONObject0.put("] is not a number.", 0); assertEquals(2, jSONObject0.length()); } @Test(timeout = 4000) public void test045() throws Throwable { String[] stringArray0 = JSONObject.getNames((Object) ""); JSONObject jSONObject0 = new JSONObject("\"\"", stringArray0); jSONObject0.put("\"\"", (-1688)); assertEquals(2, jSONObject0.length()); } @Test(timeout = 4000) public void test046() throws Throwable { String[] stringArray0 = new String[2]; JSONObject jSONObject0 = new JSONObject("", stringArray0); JSONObject jSONObject1 = jSONObject0.put("", 128); assertEquals(1, jSONObject1.length()); } @Test(timeout = 4000) public void test047() throws Throwable { JSONObject jSONObject0 = new JSONObject((Object) "p\"b7"); jSONObject0.put("p\"b7", 1233.61117); assertEquals(4, jSONObject0.length()); } @Test(timeout = 4000) public void test048() throws Throwable { JSONObject jSONObject0 = new JSONObject(); JSONObject jSONObject1 = jSONObject0.put("", (double) 0L); assertEquals(1, jSONObject1.length()); } @Test(timeout = 4000) public void test049() throws Throwable { JSONObject jSONObject0 = new JSONObject(); String string0 = jSONObject0.optString("ishashCode", (String) null); assertNull(string0); } @Test(timeout = 4000) public void test050() throws Throwable { JSONObject jSONObject0 = new JSONObject(); String string0 = jSONObject0.optString("", ""); assertEquals("", string0); } @Test(timeout = 4000) public void test051() throws Throwable { Object object0 = new Object(); JSONObject jSONObject0 = new JSONObject(object0); String string0 = jSONObject0.optString((String) null); assertEquals(1, jSONObject0.length()); assertNotNull(string0); } @Test(timeout = 4000) public void test052() throws Throwable { HashMap<JSONArray, String> hashMap0 = new HashMap<JSONArray, String>(); JSONObject jSONObject0 = new JSONObject((Map) hashMap0); String string0 = jSONObject0.optString(""); assertEquals("", string0); } @Test(timeout = 4000) public void test053() throws Throwable { JSONObject jSONObject0 = new JSONObject(); long long0 = jSONObject0.optLong("", (-1090L)); assertEquals((-1090L), long0); } @Test(timeout = 4000) public void test054() throws Throwable { JSONObject jSONObject0 = new JSONObject(); long long0 = jSONObject0.optLong((String) null, 0L); assertEquals(0L, long0); } @Test(timeout = 4000) public void test055() throws Throwable { JSONObject jSONObject0 = new JSONObject(); long long0 = jSONObject0.optLong("max", 0L); assertEquals(0L, long0); } @Test(timeout = 4000) public void test056() throws Throwable { Object object0 = JSONObject.NULL; JSONObject jSONObject0 = new JSONObject(object0); long long0 = jSONObject0.optLong((String) null); assertEquals(0L, long0); assertEquals(1, jSONObject0.length()); } @Test(timeout = 4000) public void test057() throws Throwable { Object object0 = JSONObject.NULL; JSONObject jSONObject0 = new JSONObject(object0); jSONObject0.optJSONObject((String) null); assertEquals(1, jSONObject0.length()); } @Test(timeout = 4000) public void test058() throws Throwable { Object object0 = JSONObject.NULL; JSONObject jSONObject0 = new JSONObject(object0); jSONObject0.optJSONArray((String) null); assertEquals(1, jSONObject0.length()); } @Test(timeout = 4000) public void test059() throws Throwable { HashMap<Integer, Object> hashMap0 = new HashMap<Integer, Object>(); JSONObject jSONObject0 = new JSONObject((Map) hashMap0); int int0 = jSONObject0.optInt("] is not a JSONObject.", (-914)); assertEquals((-914), int0); } @Test(timeout = 4000) public void test060() throws Throwable { JSONObject jSONObject0 = new JSONObject(); int int0 = jSONObject0.optInt((String) null, 0); assertEquals(0, int0); } @Test(timeout = 4000) public void test061() throws Throwable { HashMap<JSONArray, JSONArray> hashMap0 = new HashMap<JSONArray, JSONArray>(); JSONObject jSONObject0 = new JSONObject((Map) hashMap0); int int0 = jSONObject0.optInt("", (int) (byte)17); assertEquals(17, int0); } @Test(timeout = 4000) public void test062() throws Throwable { Short short0 = new Short((short)0); JSONObject jSONObject0 = new JSONObject(short0); int int0 = jSONObject0.optInt((String) null); assertEquals(1, jSONObject0.length()); assertEquals(0, int0); } @Test(timeout = 4000) public void test063() throws Throwable { Double double0 = new Double((-1.0)); String[] stringArray0 = new String[5]; JSONObject jSONObject0 = new JSONObject(double0, stringArray0); double double1 = jSONObject0.optDouble("lo", (-1.0)); assertEquals((-1.0), double1, 0.01); } @Test(timeout = 4000) public void test064() throws Throwable { Short short0 = new Short((short)0); JSONObject jSONObject0 = new JSONObject(short0); double double0 = jSONObject0.optDouble((String) null, (double) 0); assertEquals(1, jSONObject0.length()); assertEquals(0.0, double0, 0.01); } @Test(timeout = 4000) public void test065() throws Throwable { String[] stringArray0 = new String[7]; JSONObject jSONObject0 = new JSONObject("", stringArray0); double double0 = jSONObject0.optDouble("", 1315.7); assertEquals(1315.7, double0, 0.01); } @Test(timeout = 4000) public void test066() throws Throwable { Boolean boolean0 = Boolean.TRUE; JSONObject jSONObject0 = new JSONObject(boolean0); double double0 = jSONObject0.optDouble((String) null); assertEquals(Double.NaN, double0, 0.01); assertEquals(1, jSONObject0.length()); } @Test(timeout = 4000) public void test067() throws Throwable { JSONObject jSONObject0 = new JSONObject(); double double0 = jSONObject0.optDouble(""); assertEquals(Double.NaN, double0, 0.01); } @Test(timeout = 4000) public void test068() throws Throwable { JSONObject jSONObject0 = new JSONObject(); boolean boolean0 = jSONObject0.optBoolean((String) null, false); assertFalse(boolean0); } @Test(timeout = 4000) public void test069() throws Throwable { JSONObject jSONObject0 = new JSONObject(); boolean boolean0 = jSONObject0.optBoolean("", true); assertTrue(boolean0); } @Test(timeout = 4000) public void test070() throws Throwable { JSONObject jSONObject0 = new JSONObject(); boolean boolean0 = jSONObject0.optBoolean((String) null); assertFalse(boolean0); } @Test(timeout = 4000) public void test071() throws Throwable { Boolean boolean0 = new Boolean(false); String[] stringArray0 = new String[3]; JSONObject jSONObject0 = new JSONObject(boolean0, stringArray0); boolean boolean1 = jSONObject0.optBoolean(""); assertFalse(boolean1); } @Test(timeout = 4000) public void test072() throws Throwable { Short short0 = new Short((short)120); JSONObject jSONObject0 = new JSONObject(short0); jSONObject0.opt(""); assertEquals(1, jSONObject0.length()); } @Test(timeout = 4000) public void test073() throws Throwable { JSONObject jSONObject0 = new JSONObject(); boolean boolean0 = jSONObject0.isNull((String) null); assertTrue(boolean0); } @Test(timeout = 4000) public void test074() throws Throwable { Short short0 = new Short((short)0); JSONObject jSONObject0 = new JSONObject(short0); jSONObject0.has((String) null); assertEquals(1, jSONObject0.length()); } @Test(timeout = 4000) public void test075() throws Throwable { JSONObject jSONObject0 = new JSONObject(); boolean boolean0 = jSONObject0.has(""); assertFalse(boolean0); } @Test(timeout = 4000) public void test076() throws Throwable { JSONObject jSONObject0 = new JSONObject(); try { jSONObject0.getString((String) null); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSONObject[\"\"] not found. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test077() throws Throwable { JSONObject jSONObject0 = new JSONObject((Object) "zL4\u0006g>O/c"); try { jSONObject0.getString("zL4\u0006g>O/c"); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSONObject[\"zL4\\u0006g>O/c\"] not found. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test078() throws Throwable { Object object0 = new Object(); String[] stringArray0 = JSONObject.getNames(object0); assertNull(stringArray0); } @Test(timeout = 4000) public void test079() throws Throwable { Object object0 = JSONObject.NULL; JSONObject jSONObject0 = new JSONObject(object0); try { jSONObject0.getLong((String) null); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSONObject[\"\"] not found. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test080() throws Throwable { JSONObject jSONObject0 = new JSONObject(); try { jSONObject0.getLong(""); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSONObject[\"\"] not found. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test081() throws Throwable { Boolean boolean0 = Boolean.TRUE; JSONObject jSONObject0 = new JSONObject(boolean0); try { jSONObject0.getJSONObject((String) null); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSONObject[\"\"] not found. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test082() throws Throwable { JSONObject jSONObject0 = new JSONObject(); try { jSONObject0.getJSONObject(""); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSONObject[\"\"] not found. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test083() throws Throwable { Object object0 = new Object(); JSONObject jSONObject0 = new JSONObject(object0); try { jSONObject0.getJSONArray((String) null); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSONObject[\"\"] not found. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test084() throws Throwable { HashMap<Double, Double> hashMap0 = new HashMap<Double, Double>(); JSONObject jSONObject0 = new JSONObject((Map) hashMap0); try { jSONObject0.getJSONArray(""); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSONObject[\"\"] not found. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test085() throws Throwable { Float float0 = new Float(0.0); JSONObject jSONObject0 = new JSONObject(float0); try { jSONObject0.getInt(""); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSONObject[\"\"] not found. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test086() throws Throwable { JSONObject jSONObject0 = new JSONObject(); try { jSONObject0.getDouble((String) null); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSONObject[\"\"] not found. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test087() throws Throwable { JSONObject jSONObject0 = new JSONObject(); try { jSONObject0.getDouble(""); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSONObject[\"\"] not found. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test088() throws Throwable { String[] stringArray0 = new String[2]; JSONObject jSONObject0 = new JSONObject("2504.197192844", stringArray0); try { jSONObject0.getBoolean((String) null); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSONObject[\"\"] not found. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test089() throws Throwable { JSONObject jSONObject0 = new JSONObject(); try { jSONObject0.getBoolean(""); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSONObject[\"\"] not found. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test090() throws Throwable { String[] stringArray0 = new String[0]; JSONObject jSONObject0 = new JSONObject("in", stringArray0); try { jSONObject0.get((String) null); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSONObject[\"\"] not found. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test091() throws Throwable { Float float0 = new Float(617.48057068); JSONObject jSONObject0 = new JSONObject(float0); try { jSONObject0.get(""); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSONObject[\"\"] not found. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test092() throws Throwable { String string0 = JSONObject.doubleToString(0.0); assertEquals("0", string0); } @Test(timeout = 4000) public void test093() throws Throwable { JSONObject jSONObject0 = new JSONObject(); JSONArray jSONArray0 = jSONObject0.optJSONArray(""); JSONObject jSONObject1 = jSONObject0.append("", jSONArray0); assertEquals(1, jSONObject1.length()); } @Test(timeout = 4000) public void test094() throws Throwable { JSONObject jSONObject0 = new JSONObject((Object) "null"); Object object0 = JSONObject.NULL; jSONObject0.accumulate("zLF4gKO/uR", object0); assertEquals(4, jSONObject0.length()); } @Test(timeout = 4000) public void test095() throws Throwable { JSONObject jSONObject0 = new JSONObject(); JSONObject jSONObject1 = jSONObject0.accumulate("", ""); assertSame(jSONObject0, jSONObject1); } @Test(timeout = 4000) public void test096() throws Throwable { JSONObject jSONObject0 = new JSONObject(); // Undeclared exception! try { jSONObject0.write((Writer) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test097() throws Throwable { Double double0 = new Double(Double.NaN); try { JSONObject.valueToString(double0, 13, (-44510525)); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSON does not allow non-finite numbers. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test098() throws Throwable { Float float0 = new Float(Double.NaN); try { JSONObject.valueToString(float0); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSON does not allow non-finite numbers. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test099() throws Throwable { StringWriter stringWriter0 = new StringWriter(); JSONObject jSONObject0 = new JSONObject(stringWriter0); // Undeclared exception! jSONObject0.toString(4846, 4846); } @Test(timeout = 4000) public void test100() throws Throwable { HashMap<Long, Object> hashMap0 = new HashMap<Long, Object>(); hashMap0.put((Long) null, "\"Ip$0k.Ofb#;1Oqy)uh\""); JSONObject jSONObject0 = new JSONObject((Map) hashMap0); // Undeclared exception! try { jSONObject0.toString(4265, 4265); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.evosuite.runtime.System", e); } } @Test(timeout = 4000) public void test101() throws Throwable { Float float0 = new Float(1.0); JSONObject jSONObject0 = new JSONObject(float0); // Undeclared exception! jSONObject0.toString(4121); } @Test(timeout = 4000) public void test102() throws Throwable { Float float0 = new Float(0.0); JSONObject jSONObject0 = new JSONObject(float0); HashMap<Byte, Long> hashMap0 = new HashMap<Byte, Long>(); Long long0 = new Long((-927L)); hashMap0.put((Byte) null, long0); JSONObject jSONObject1 = jSONObject0.put("{J876n74/UT>(UA=gtd", (Map) hashMap0); // Undeclared exception! try { jSONObject1.toString(1); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("org.evosuite.runtime.System", e); } } @Test(timeout = 4000) public void test103() throws Throwable { JSONArray jSONArray0 = new JSONArray(); HashMap<Object, Integer> hashMap0 = new HashMap<Object, Integer>(); jSONArray0.put((Map) hashMap0); JSONObject jSONObject0 = new JSONObject(); JSONArray jSONArray1 = jSONObject0.toJSONArray(jSONArray0); try { jSONObject0.toJSONArray(jSONArray1); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSONArray[0] not found. // verifyException("wheel.json.JSONArray", e); } } @Test(timeout = 4000) public void test104() throws Throwable { Double double0 = new Double(Double.NaN); try { JSONObject.testValidity(double0); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSON does not allow non-finite numbers. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test105() throws Throwable { JSONObject jSONObject0 = new JSONObject(); try { jSONObject0.put((String) null, true); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // Null key. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test106() throws Throwable { HashMap<String, Boolean> hashMap0 = new HashMap<String, Boolean>(); JSONObject jSONObject0 = new JSONObject((Map) hashMap0); try { jSONObject0.put((String) null, (Map) hashMap0); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // Null key. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test107() throws Throwable { JSONObject jSONObject0 = new JSONObject(); LinkedList<Object> linkedList0 = new LinkedList<Object>(); try { jSONObject0.put((String) null, (Collection) linkedList0); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // Null key. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test108() throws Throwable { JSONObject jSONObject0 = new JSONObject(); try { jSONObject0.put((String) null, 0L); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // Null key. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test109() throws Throwable { JSONObject jSONObject0 = new JSONObject(); try { jSONObject0.put((String) null, 295); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // Null key. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test110() throws Throwable { JSONObject jSONObject0 = new JSONObject(); try { jSONObject0.put((String) null, Double.NaN); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // Null key. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test111() throws Throwable { // Undeclared exception! try { JSONObject.getNames((JSONObject) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test112() throws Throwable { HashMap<Object, Object> hashMap0 = new HashMap<Object, Object>(); Object object0 = new Object(); Boolean boolean0 = Boolean.FALSE; hashMap0.put(object0, boolean0); JSONObject jSONObject0 = new JSONObject((Map) hashMap0); // Undeclared exception! try { JSONObject.getNames(jSONObject0); fail("Expecting exception: ClassCastException"); } catch(ClassCastException e) { // // java.lang.Object cannot be cast to java.lang.String // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test113() throws Throwable { JSONObject jSONObject0 = new JSONObject(); try { jSONObject0.accumulate((String) null, (Object) null); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // Null key. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test114() throws Throwable { JSONObject jSONObject0 = null; try { jSONObject0 = new JSONObject((JSONTokener) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test115() throws Throwable { JSONObject jSONObject0 = new JSONObject(); JSONObject jSONObject1 = null; try { jSONObject1 = new JSONObject(jSONObject0, (String[]) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test116() throws Throwable { JSONObject jSONObject0 = null; try { jSONObject0 = new JSONObject((String) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // } } @Test(timeout = 4000) public void test117() throws Throwable { JSONObject jSONObject0 = null; try { jSONObject0 = new JSONObject("", (String[]) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test118() throws Throwable { JSONObject jSONObject0 = null; try { jSONObject0 = new JSONObject((Object) null); fail("Expecting exception: NullPointerException"); } catch(NullPointerException e) { // // no message in exception (getMessage() returned null) // } } @Test(timeout = 4000) public void test119() throws Throwable { Byte byte0 = new Byte((byte)20); String string0 = JSONObject.valueToString(byte0); assertNotNull(string0); } @Test(timeout = 4000) public void test120() throws Throwable { JSONArray jSONArray0 = new JSONArray(); JSONObject jSONObject0 = new JSONObject(jSONArray0); jSONObject0.toString((-738), (-738)); assertEquals(1, jSONObject0.length()); } @Test(timeout = 4000) public void test121() throws Throwable { JSONObject jSONObject0 = new JSONObject(); String string0 = jSONObject0.toString(0, 0); assertEquals("{}", string0); } @Test(timeout = 4000) public void test122() throws Throwable { String string0 = JSONObject.quote("3\"`P\"b~9oFw"); assertEquals("\"3\\\"`P\\\"b~9oFw\"", string0); } @Test(timeout = 4000) public void test123() throws Throwable { String string0 = JSONObject.quote("4]~s*w/5iHe]*1"); assertEquals("\"4]~s*w/5iHe]*1\"", string0); } @Test(timeout = 4000) public void test124() throws Throwable { String string0 = JSONObject.quote((String) null); assertEquals("\"\"", string0); } @Test(timeout = 4000) public void test125() throws Throwable { String string0 = JSONObject.quote(""); assertEquals("\"\"", string0); } @Test(timeout = 4000) public void test126() throws Throwable { JSONObject jSONObject0 = new JSONObject(); Integer integer0 = new Integer(0); JSONObject jSONObject1 = jSONObject0.putOpt((String) null, integer0); assertSame(jSONObject0, jSONObject1); } @Test(timeout = 4000) public void test127() throws Throwable { JSONObject jSONObject0 = new JSONObject(); try { jSONObject0.put((String) null, (Object) null); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // Null key. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test128() throws Throwable { Short short0 = new Short((short)245); JSONObject jSONObject0 = new JSONObject(short0); String string0 = jSONObject0.optString((String) null, ",<tu\"WieR?H/p"); assertNotNull(string0); assertEquals(1, jSONObject0.length()); } @Test(timeout = 4000) public void test129() throws Throwable { Short short0 = new Short((short)120); JSONObject jSONObject0 = new JSONObject(short0); jSONObject0.put("] is not a number.", (long) (short)120); jSONObject0.optString("] is not a number.", "getreverseBytes"); assertEquals(2, jSONObject0.length()); } @Test(timeout = 4000) public void test130() throws Throwable { JSONObject jSONObject0 = new JSONObject(); jSONObject0.put("ed^X*3V", 4188L); double double0 = jSONObject0.optDouble("ed^X*3V", (double) 4188L); assertEquals(4188.0, double0, 0.01); } @Test(timeout = 4000) public void test131() throws Throwable { JSONObject jSONObject0 = new JSONObject(); Object object0 = jSONObject0.opt((String) null); assertNull(object0); } @Test(timeout = 4000) public void test132() throws Throwable { Integer integer0 = new Integer((short)0); String string0 = JSONObject.numberToString(integer0); assertNotNull(string0); } @Test(timeout = 4000) public void test133() throws Throwable { JSONObject jSONObject0 = new JSONObject(); JSONObject jSONObject1 = jSONObject0.append("@e$sEVH? Ke=", "@e$sEVH? Ke="); try { jSONObject1.getDouble("@e$sEVH? Ke="); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSONObject[\"@e$sEVH? Ke=\"] is not a number. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test134() throws Throwable { JSONObject jSONObject0 = new JSONObject(); JSONObject jSONObject1 = jSONObject0.append("{}", "{}"); JSONArray jSONArray0 = (JSONArray)jSONObject1.get("{}"); assertEquals(1, jSONArray0.length()); } @Test(timeout = 4000) public void test135() throws Throwable { JSONObject jSONObject0 = new JSONObject(); try { jSONObject0.get("ht=//qHg"); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSONObject[\"ht=//qHg\"] not found. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test136() throws Throwable { JSONObject jSONObject0 = new JSONObject((Map) null); assertEquals(0, jSONObject0.length()); } @Test(timeout = 4000) public void test137() throws Throwable { JSONObject jSONObject0 = new JSONObject((Object) ")zOOv*%9gJr,`0I"); int int0 = jSONObject0.length(); assertEquals(3, int0); } @Test(timeout = 4000) public void test138() throws Throwable { JSONObject jSONObject0 = new JSONObject(); long long0 = jSONObject0.optLong("", 2040L); assertEquals(2040L, long0); } @Test(timeout = 4000) public void test139() throws Throwable { Float float0 = new Float(617.48057068); JSONObject jSONObject0 = new JSONObject(float0); boolean boolean0 = jSONObject0.optBoolean("Q%9fumeh8_rEGV<", false); assertEquals(3, jSONObject0.length()); assertFalse(boolean0); } @Test(timeout = 4000) public void test140() throws Throwable { Float float0 = new Float(0.0); JSONObject jSONObject0 = new JSONObject(float0); jSONObject0.keys(); assertEquals(3, jSONObject0.length()); } @Test(timeout = 4000) public void test141() throws Throwable { JSONObject jSONObject0 = new JSONObject(); JSONObject jSONObject1 = jSONObject0.append("@e$sEVH? Ke=", "@e$sEVH? Ke="); StringWriter stringWriter0 = new StringWriter(); Writer writer0 = jSONObject1.write(stringWriter0); assertSame(writer0, stringWriter0); } @Test(timeout = 4000) public void test142() throws Throwable { JSONArray jSONArray0 = new JSONArray(); HashMap<JSONArray, Boolean> hashMap0 = new HashMap<JSONArray, Boolean>(); JSONArray jSONArray1 = jSONArray0.put((Map) hashMap0); JSONObject jSONObject0 = jSONArray0.toJSONObject(jSONArray1); StringWriter stringWriter0 = new StringWriter(); Writer writer0 = jSONObject0.write(stringWriter0); assertSame(stringWriter0, writer0); } @Test(timeout = 4000) public void test143() throws Throwable { LinkedList<JSONArray> linkedList0 = new LinkedList<JSONArray>(); String string0 = JSONObject.valueToString(linkedList0, 32, 32); assertEquals("[]", string0); } @Test(timeout = 4000) public void test144() throws Throwable { JSONArray jSONArray0 = new JSONArray(); LinkedList<JSONObject> linkedList0 = new LinkedList<JSONObject>(); jSONArray0.put(2461, (Collection) linkedList0); // Undeclared exception! JSONObject.valueToString(jSONArray0, 2461, 1158); } @Test(timeout = 4000) public void test145() throws Throwable { String string0 = JSONObject.valueToString((Object) null, 93, 93); assertEquals("null", string0); } @Test(timeout = 4000) public void test146() throws Throwable { LinkedList<JSONArray> linkedList0 = new LinkedList<JSONArray>(); String string0 = JSONObject.valueToString(linkedList0); assertEquals("[]", string0); } @Test(timeout = 4000) public void test147() throws Throwable { HashMap<JSONArray, Long> hashMap0 = new HashMap<JSONArray, Long>(); String string0 = JSONObject.valueToString(hashMap0); assertNotNull(string0); assertEquals("{}", string0); } @Test(timeout = 4000) public void test148() throws Throwable { JSONArray jSONArray0 = new JSONArray(); String string0 = JSONObject.valueToString(jSONArray0); assertNotNull(string0); } @Test(timeout = 4000) public void test149() throws Throwable { JSONObject jSONObject0 = new JSONObject(); String string0 = JSONObject.valueToString(jSONObject0); assertNotNull(string0); } @Test(timeout = 4000) public void test150() throws Throwable { Object object0 = JSONObject.NULL; String string0 = JSONObject.valueToString(object0); assertEquals("null", string0); } @Test(timeout = 4000) public void test151() throws Throwable { String string0 = JSONObject.valueToString((Object) null); assertEquals("null", string0); } @Test(timeout = 4000) public void test152() throws Throwable { Double double0 = new Double(0.0); JSONObject jSONObject0 = new JSONObject(double0); jSONObject0.toString((-2963), 3041); assertEquals(3, jSONObject0.length()); } @Test(timeout = 4000) public void test153() throws Throwable { StringWriter stringWriter0 = new StringWriter(); JSONObject jSONObject0 = new JSONObject(stringWriter0); String string0 = jSONObject0.toString(); assertNotNull(string0); assertEquals(2, jSONObject0.length()); } @Test(timeout = 4000) public void test154() throws Throwable { JSONObject jSONObject0 = new JSONObject(); JSONArray jSONArray0 = new JSONArray(); JSONArray jSONArray1 = jSONObject0.toJSONArray(jSONArray0); assertNull(jSONArray1); } @Test(timeout = 4000) public void test155() throws Throwable { JSONObject jSONObject0 = new JSONObject(); JSONArray jSONArray0 = jSONObject0.toJSONArray((JSONArray) null); assertNull(jSONArray0); } @Test(timeout = 4000) public void test156() throws Throwable { Float float0 = new Float(Double.NaN); JSONObject jSONObject0 = new JSONObject(float0); try { jSONObject0.putOpt("\f", float0); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSON does not allow non-finite numbers. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test157() throws Throwable { String string0 = JSONObject.quote("zL4\u0006g>O/n"); assertEquals("\"zL4\\u0006g>O/n\"", string0); } @Test(timeout = 4000) public void test158() throws Throwable { String string0 = JSONObject.quote("0</"); assertEquals("\"0<\\/\"", string0); } @Test(timeout = 4000) public void test159() throws Throwable { JSONObject jSONObject0 = new JSONObject(); try { jSONObject0.getBoolean("a\"gf@=+842?"); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSONObject[\"a\\\"gf@=+842?\"] not found. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test160() throws Throwable { String string0 = JSONObject.quote("\r"); assertEquals("\"\\r\"", string0); } @Test(timeout = 4000) public void test161() throws Throwable { String string0 = JSONObject.quote(",\n"); assertEquals("\",\\n\"", string0); } @Test(timeout = 4000) public void test162() throws Throwable { Short short0 = new Short((short)134); JSONObject jSONObject0 = new JSONObject(short0); try { jSONObject0.getInt((String) null); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSONObject[\"\"] not found. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test163() throws Throwable { JSONObject jSONObject0 = new JSONObject((Object) "000"); JSONObject jSONObject1 = jSONObject0.putOpt("000", (Object) null); assertEquals(3, jSONObject1.length()); } @Test(timeout = 4000) public void test164() throws Throwable { JSONObject jSONObject0 = new JSONObject(); JSONObject jSONObject1 = jSONObject0.put("isnotifyAll", (Object) null); assertEquals(0, jSONObject1.length()); } @Test(timeout = 4000) public void test165() throws Throwable { JSONObject jSONObject0 = new JSONObject(); try { jSONObject0.append((String) null, (Object) null); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // Null key. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test166() throws Throwable { JSONObject jSONObject0 = new JSONObject(); JSONObject jSONObject1 = jSONObject0.put("0", true); assertSame(jSONObject1, jSONObject0); } @Test(timeout = 4000) public void test167() throws Throwable { JSONObject jSONObject0 = new JSONObject(); JSONObject jSONObject1 = jSONObject0.append("@e$sEVH? Ke=", "@e$sEVH? Ke="); String string0 = jSONObject1.optString("@e$sEVH? Ke="); assertNotNull(string0); } @Test(timeout = 4000) public void test168() throws Throwable { Short short0 = new Short((short)134); JSONObject jSONObject0 = new JSONObject(short0); HashMap<String, Float> hashMap0 = new HashMap<String, Float>(); jSONObject0.put("] is not a number.", (Map) hashMap0); jSONObject0.optJSONObject("] is not a number."); assertEquals(2, jSONObject0.length()); } @Test(timeout = 4000) public void test169() throws Throwable { JSONObject jSONObject0 = new JSONObject(); JSONObject jSONObject1 = jSONObject0.optJSONObject(""); assertNull(jSONObject1); } @Test(timeout = 4000) public void test170() throws Throwable { JSONObject jSONObject0 = new JSONObject(); jSONObject0.append("getnotify", "getnotify"); JSONArray jSONArray0 = jSONObject0.optJSONArray("getnotify"); assertEquals(1, jSONArray0.length()); } @Test(timeout = 4000) public void test171() throws Throwable { JSONObject jSONObject0 = new JSONObject(); jSONObject0.put("/", (-12L)); double double0 = jSONObject0.optDouble("/"); assertEquals((-12.0), double0, 0.01); } @Test(timeout = 4000) public void test172() throws Throwable { Short short0 = new Short((short)134); JSONObject jSONObject0 = new JSONObject(short0); HashMap<String, Float> hashMap0 = new HashMap<String, Float>(); Float float0 = new Float((-1.0)); hashMap0.put("gettoString", float0); jSONObject0.put("] is not a number.", (Map) hashMap0); jSONObject0.toString((-410)); assertEquals(2, jSONObject0.length()); } @Test(timeout = 4000) public void test173() throws Throwable { try { JSONObject.numberToString((Number) null); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // Null pointer // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test174() throws Throwable { Long long0 = new Long(0L); String[] stringArray0 = new String[0]; JSONObject jSONObject0 = new JSONObject(long0, stringArray0); JSONObject jSONObject1 = jSONObject0.put("{}", 0L); JSONArray jSONArray0 = jSONObject1.names(); assertEquals(1, jSONArray0.length()); } @Test(timeout = 4000) public void test175() throws Throwable { Long long0 = new Long(0L); String[] stringArray0 = new String[0]; JSONObject jSONObject0 = new JSONObject(long0, stringArray0); JSONArray jSONArray0 = jSONObject0.names(); assertNull(jSONArray0); } @Test(timeout = 4000) public void test176() throws Throwable { String[] stringArray0 = JSONObject.getNames((Object) null); assertNull(stringArray0); } @Test(timeout = 4000) public void test177() throws Throwable { JSONObject jSONObject0 = new JSONObject(); String[] stringArray0 = JSONObject.getNames(jSONObject0); assertNull(stringArray0); } @Test(timeout = 4000) public void test178() throws Throwable { Float float0 = new Float((-1917.05424673)); String[] stringArray0 = JSONObject.getNames((Object) float0); assertNotNull(stringArray0); Double double0 = Double.valueOf((-1917.05424673)); JSONObject jSONObject0 = new JSONObject(double0, stringArray0); String[] stringArray1 = JSONObject.getNames(jSONObject0); assertNotNull(stringArray1); assertEquals(8, stringArray1.length); assertEquals(8, jSONObject0.length()); } @Test(timeout = 4000) public void test179() throws Throwable { HashMap<Object, Object> hashMap0 = new HashMap<Object, Object>(); JSONObject jSONObject0 = new JSONObject((Map) hashMap0); jSONObject0.put("2206.807074094103", 102); long long0 = jSONObject0.getLong("2206.807074094103"); assertEquals(102L, long0); } @Test(timeout = 4000) public void test180() throws Throwable { JSONObject jSONObject0 = new JSONObject(); JSONObject jSONObject1 = jSONObject0.accumulate("Null key.", "Null key."); try { jSONObject1.getJSONObject("Null key."); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSONObject[\"Null key.\"] is not a JSONObject. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test181() throws Throwable { JSONObject jSONObject0 = new JSONObject(); jSONObject0.append("2wRed", "2wRed"); JSONArray jSONArray0 = jSONObject0.getJSONArray("2wRed"); assertEquals(1, jSONArray0.length()); } @Test(timeout = 4000) public void test182() throws Throwable { LinkedList<JSONArray> linkedList0 = new LinkedList<JSONArray>(); JSONObject jSONObject0 = new JSONObject(); jSONObject0.putOpt("] is not a JSONArray.", linkedList0); try { jSONObject0.getJSONArray("] is not a JSONArray."); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSONObject[\"] is not a JSONArray.\"] is not a JSONArray. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test183() throws Throwable { JSONObject jSONObject0 = new JSONObject(); JSONObject jSONObject1 = jSONObject0.accumulate("T.jlNY*l8J -+o.Ay*", "T.jlNY*l8J -+o.Ay*"); try { jSONObject1.getInt("T.jlNY*l8J -+o.Ay*"); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSONObject[\"T.jlNY*l8J -+o.Ay*\"] is not a number. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test184() throws Throwable { Long long0 = new Long(0L); String[] stringArray0 = new String[0]; JSONObject jSONObject0 = new JSONObject(long0, stringArray0); JSONObject jSONObject1 = jSONObject0.put("{}", 0L); double double0 = jSONObject1.getDouble("{}"); assertEquals(0.0, double0, 0.01); } @Test(timeout = 4000) public void test185() throws Throwable { JSONObject jSONObject0 = new JSONObject(); JSONObject jSONObject1 = jSONObject0.put("joi", (Object) "joi"); try { jSONObject1.getLong("joi"); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSONObject[\"joi\"] is not a number. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test186() throws Throwable { JSONObject jSONObject0 = new JSONObject(); jSONObject0.accumulate("I$gv", jSONObject0); try { jSONObject0.getBoolean("I$gv"); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSONObject[\"I$gv\"] is not a Boolean. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test187() throws Throwable { JSONObject jSONObject0 = new JSONObject(); JSONObject jSONObject1 = jSONObject0.accumulate("I$gv", "I$gv"); try { jSONObject1.getBoolean("I$gv"); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSONObject[\"I$gv\"] is not a Boolean. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test188() throws Throwable { JSONArray jSONArray0 = new JSONArray(); JSONObject jSONObject0 = new JSONObject(jSONArray0); Boolean boolean0 = Boolean.TRUE; jSONObject0.accumulate("t+xk~Uh%IJp1QYfO", boolean0); boolean boolean1 = jSONObject0.getBoolean("t+xk~Uh%IJp1QYfO"); assertEquals(2, jSONObject0.length()); assertTrue(boolean1); } @Test(timeout = 4000) public void test189() throws Throwable { Float float0 = new Float(2818.4F); JSONObject jSONObject0 = new JSONObject(float0); jSONObject0.put("isvalueOf", false); boolean boolean0 = jSONObject0.getBoolean("isvalueOf"); assertEquals(4, jSONObject0.length()); assertFalse(boolean0); } @Test(timeout = 4000) public void test190() throws Throwable { Short short0 = new Short((short)126); JSONObject jSONObject0 = new JSONObject(short0); HashMap<String, Float> hashMap0 = new HashMap<String, Float>(); jSONObject0.put("] is not a number.", (Map) hashMap0); jSONObject0.getJSONObject("] is not a number."); assertEquals(2, jSONObject0.length()); } @Test(timeout = 4000) public void test191() throws Throwable { String string0 = JSONObject.doubleToString(1.0); assertEquals("1", string0); } @Test(timeout = 4000) public void test192() throws Throwable { String string0 = JSONObject.doubleToString((-30803738)); assertEquals("-3.0803738E7", string0); } @Test(timeout = 4000) public void test193() throws Throwable { String string0 = JSONObject.doubleToString(Double.NaN); assertEquals("null", string0); } @Test(timeout = 4000) public void test194() throws Throwable { String string0 = JSONObject.doubleToString(652.998282296951); assertEquals("652.998282296951", string0); } @Test(timeout = 4000) public void test195() throws Throwable { JSONObject jSONObject0 = new JSONObject(); JSONObject jSONObject1 = jSONObject0.put(".R]9]HYP&BFrfI>\"", (Object) ".R]9]HYP&BFrfI>\""); try { jSONObject1.append(".R]9]HYP&BFrfI>\"", ".R]9]HYP&BFrfI>\""); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSONObject[.R]9]HYP&BFrfI>\"] is not a JSONArray. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test196() throws Throwable { JSONObject jSONObject0 = new JSONObject(); JSONObject jSONObject1 = jSONObject0.append("{}", "{}"); JSONObject jSONObject2 = jSONObject1.accumulate("{}", "{}"); assertSame(jSONObject0, jSONObject2); } @Test(timeout = 4000) public void test197() throws Throwable { JSONObject jSONObject0 = new JSONObject(); JSONArray jSONArray0 = new JSONArray(); JSONObject jSONObject1 = jSONObject0.accumulate("a\"gf@=+842?", jSONArray0); assertSame(jSONObject1, jSONObject0); } @Test(timeout = 4000) public void test198() throws Throwable { JSONObject jSONObject0 = new JSONObject(); JSONObject jSONObject1 = jSONObject0.accumulate("I$gv", "I$gv"); jSONObject1.accumulate("I$gv", jSONObject0); assertEquals(1, jSONObject0.length()); } @Test(timeout = 4000) public void test199() throws Throwable { JSONObject jSONObject0 = new JSONObject(); JSONObject jSONObject1 = jSONObject0.put(">eW*dch{:};!", (Map) null); assertSame(jSONObject1, jSONObject0); } @Test(timeout = 4000) public void test200() throws Throwable { JSONTokener jSONTokener0 = new JSONTokener("{nOLw,;|:_x![-Eiyz{"); JSONObject jSONObject0 = null; try { jSONObject0 = new JSONObject(jSONTokener0); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // Expected a ':' after a key at character 6 of {nOLw,;|:_x![-Eiyz{ // verifyException("wheel.json.JSONTokener", e); } } @Test(timeout = 4000) public void test201() throws Throwable { JSONObject jSONObject0 = null; try { jSONObject0 = new JSONObject("{K=z$g/^8$B"); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // Expected a ',' or '}' at character 7 of {K=z$g/^8$B // verifyException("wheel.json.JSONTokener", e); } } @Test(timeout = 4000) public void test202() throws Throwable { JSONObject jSONObject0 = new JSONObject("{}"); assertEquals(0, jSONObject0.length()); } @Test(timeout = 4000) public void test203() throws Throwable { JSONObject jSONObject0 = null; try { jSONObject0 = new JSONObject("{"); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // A JSONObject text must end with '}' at character 1 of { // verifyException("wheel.json.JSONTokener", e); } } @Test(timeout = 4000) public void test204() throws Throwable { JSONTokener jSONTokener0 = new JSONTokener(""); JSONObject jSONObject0 = null; try { jSONObject0 = new JSONObject(jSONTokener0); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // A JSONObject text must begin with '{' at character 0 of // verifyException("wheel.json.JSONTokener", e); } } @Test(timeout = 4000) public void test205() throws Throwable { JSONObject jSONObject0 = new JSONObject(); String[] stringArray0 = new String[2]; JSONObject jSONObject1 = new JSONObject(jSONObject0, stringArray0); assertFalse(jSONObject1.equals((Object)jSONObject0)); } @Test(timeout = 4000) public void test206() throws Throwable { JSONObject jSONObject0 = new JSONObject(); JSONObject jSONObject1 = jSONObject0.put("Expected a ',' or ']'", 1L); boolean boolean0 = jSONObject1.isNull("Expected a ',' or ']'"); assertFalse(boolean0); } @Test(timeout = 4000) public void test207() throws Throwable { JSONObject jSONObject0 = new JSONObject((Object) "]k'f"); int int0 = jSONObject0.optInt(""); assertEquals(3, jSONObject0.length()); assertEquals(0, int0); } @Test(timeout = 4000) public void test208() throws Throwable { JSONObject jSONObject0 = new JSONObject((Object) "isaccumulate"); jSONObject0.toString(14); assertEquals(3, jSONObject0.length()); } @Test(timeout = 4000) public void test209() throws Throwable { Float float0 = new Float((-1624.5)); JSONObject jSONObject0 = new JSONObject(float0); jSONObject0.put("a.c\t]K,", 18); String string0 = JSONObject.numberToString(float0); assertNotNull(string0); } @Test(timeout = 4000) public void test210() throws Throwable { String[] stringArray0 = new String[3]; JSONObject jSONObject0 = new JSONObject("", stringArray0); long long0 = jSONObject0.optLong(""); assertEquals(0L, long0); } @Test(timeout = 4000) public void test211() throws Throwable { JSONObject jSONObject0 = new JSONObject(); boolean boolean0 = jSONObject0.isNull(""); assertTrue(boolean0); } @Test(timeout = 4000) public void test212() throws Throwable { JSONObject jSONObject0 = new JSONObject("{\n \"java.lang.String@0000000004\": [\n java.lang.Byte@0000000034,\n java.lang.Byte@0000000035,\n java.lang.Byte@0000000036,\n java.lang.Byte@0000000037,\n java.lang.Byte@0000000038,\n java.lang.Byte@0000000039,\n java.lang.Byte@0000000040,\n java.lang.Byte@0000000041,\n java.lang.Byte@0000000042,\n java.lang.Byte@0000000043,\n java.lang.Byte@0000000044,\n java.lang.Byte@0000000045\n ],\n \"java.lang.String@0000000031\": \"java.lang.Class@0000000032\",\n \"java.lang.String@0000000002\": java.lang.Boolean@0000000003\n}"); assertEquals(3, jSONObject0.length()); } @Test(timeout = 4000) public void test213() throws Throwable { StringWriter stringWriter0 = new StringWriter(); JSONObject jSONObject0 = new JSONObject((Object) "Q)i@x<q^cw~Jl="); jSONObject0.write(stringWriter0); assertEquals(3, jSONObject0.length()); } @Test(timeout = 4000) public void test214() throws Throwable { Float float0 = new Float(0.0); JSONObject jSONObject0 = new JSONObject(float0); jSONObject0.put("Yx^C#-pAYD{5", (-3153.682759)); assertEquals(4, jSONObject0.length()); } @Test(timeout = 4000) public void test215() throws Throwable { JSONObject jSONObject0 = new JSONObject(); Object object0 = jSONObject0.remove((String) null); assertNull(object0); } @Test(timeout = 4000) public void test216() throws Throwable { JSONObject jSONObject0 = new JSONObject((Object) "652.998282296951"); jSONObject0.put("652.998282296951", 0L); jSONObject0.getInt("652.998282296951"); assertEquals(4, jSONObject0.length()); } @Test(timeout = 4000) public void test217() throws Throwable { JSONObject jSONObject0 = new JSONObject(); try { jSONObject0.getString(""); fail("Expecting exception: RuntimeException"); } catch(RuntimeException e) { // // JSONObject[\"\"] not found. // verifyException("wheel.json.JSONObject", e); } } @Test(timeout = 4000) public void test218() throws Throwable { JSONObject jSONObject0 = new JSONObject(); LinkedList<String> linkedList0 = new LinkedList<String>(); JSONObject jSONObject1 = jSONObject0.put("le", (Collection) linkedList0); Object object0 = new Object(); jSONObject1.append("le", object0); assertEquals(1, jSONObject0.length()); } }
[ "granogiovanni90@gmail.com" ]
granogiovanni90@gmail.com
6285930f879c25d4fde056664db4105341a7e8ee
af00207e22e1fd3c74cd40618ee73749cbce04dc
/mock-user-service/src/main/java/com/example/model/User.java
2f1f4068b15d10b6196f29b9143233539d48fb43
[]
no_license
ElbrusGarayev/microservices-example
fdeb28d5bb5bd349f04ecae78743a76e6a845a3f
9b3427cdcbedb500ed408cbaabd32d7ec6456cb5
refs/heads/master
2023-01-10T03:33:38.623202
2020-11-12T12:16:28
2020-11-12T12:16:28
309,668,292
0
0
null
null
null
null
UTF-8
Java
false
false
388
java
package com.example.model; import javax.persistence.Entity; import javax.persistence.Id; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; @Entity @Data @AllArgsConstructor @NoArgsConstructor @Builder public class User { @Id private long id; private String name; private int age; private int salary; }
[ "elbrus.qarayev@ibar.az" ]
elbrus.qarayev@ibar.az
7572c6de443d9b6d8b66a0aeb77f7f0d47a1144a
938235c7f8a0e6ce57d9c053c129a05fa82dd60a
/SourceCode/ch8_2/src/main/java/com/wisely/support/CustomRepositoryFactoryBean.java
1f449c4071770c59db32fa04be79787a01a7f096
[]
no_license
CoderDream/SpringBootInAction
53d23421b343862a35fd29f6d4ecee957880f7a2
ce4d8a21797d45305e38c7b671eab1368c149c87
refs/heads/master
2021-01-22T20:55:06.097187
2017-06-16T09:50:30
2017-06-16T09:50:30
85,377,103
0
0
null
null
null
null
UTF-8
Java
false
false
1,562
java
package com.wisely.support; import java.io.Serializable; import javax.persistence.EntityManager; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.support.JpaRepositoryFactory; import org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean; import org.springframework.data.jpa.repository.support.SimpleJpaRepository; import org.springframework.data.repository.core.RepositoryInformation; import org.springframework.data.repository.core.RepositoryMetadata; import org.springframework.data.repository.core.support.RepositoryFactorySupport; public class CustomRepositoryFactoryBean<T extends JpaRepository<S, ID>, S, ID extends Serializable> extends JpaRepositoryFactoryBean<T, S, ID> {// 1 @Override protected RepositoryFactorySupport createRepositoryFactory(EntityManager entityManager) {// 2 return new CustomRepositoryFactory(entityManager); } private static class CustomRepositoryFactory extends JpaRepositoryFactory {// 3 public CustomRepositoryFactory(EntityManager entityManager) { super(entityManager); } @Override @SuppressWarnings({"unchecked"}) protected <T, ID extends Serializable> SimpleJpaRepository<?, ?> getTargetRepository( RepositoryInformation information, EntityManager entityManager) {// 4 return new CustomRepositoryImpl<T, ID>((Class<T>) information.getDomainType(), entityManager); } @Override protected Class<?> getRepositoryBaseClass(RepositoryMetadata metadata) {// 5 return CustomRepositoryImpl.class; } } }
[ "coderdream@gmail.com" ]
coderdream@gmail.com
fa8155e0993659cc0ac7dd1d033c0878004bb366
c026dadcb20ade1a182f47f7c86211e8a856a5ad
/app/src/main/java/mirror/fortrun/cn/mvpdemo/model/entity/JSONResponse.java
b0b559f31f5e8ae3ee7475a2359a97d374b6fdea
[]
no_license
wtt123/MvpDemo
8c02db561229efe4ef59d47cc8721fb4dec8b6dd
a3d2eee8cef948dfebc57a808760d67617662440
refs/heads/master
2021-04-27T03:51:58.035667
2018-02-24T08:56:41
2018-02-24T08:56:41
122,722,038
0
0
null
null
null
null
UTF-8
Java
false
false
814
java
package mirror.fortrun.cn.mvpdemo.model.entity; import java.io.Serializable; /** * Created by wangting on 2018/2/24. * 后台返回的基本数据格式(解析bean类基本格式) * T是指具体的bean类 * 这个类根据你自己后台的数据格式而定 */ public class JSONResponse <T> implements Serializable { private String errcode; private String errmsg; private T data; public String getErrcode() { return errcode; } public void setErrcode(String errcode) { this.errcode = errcode; } public String getErrmsg() { return errmsg; } public void setErrmsg(String errmsg) { this.errmsg = errmsg; } public T getData() { return data; } public void setData(T data) { this.data = data; } }
[ "wangting@wangtingdeMacBook-Pro.local" ]
wangting@wangtingdeMacBook-Pro.local
e906bb420fb411b472cd1398c9c8fc19d6bd3c33
da7c3389774a18e47b01e274c02aed7f0f1aa581
/src/java/StreamExample.java
92ce1170b30c812899964c9e8c920b8b623b014a
[]
no_license
nowaiiNN/JavaToKotlin
d0e0945b23ef534afbc10ba12039921940b752a8
f2ed2d5ba2fab90013841202546a87f48d7ec10d
refs/heads/master
2021-01-25T11:48:32.373954
2018-03-01T12:08:12
2018-03-01T12:08:12
123,429,463
0
0
null
null
null
null
UTF-8
Java
false
false
239
java
package java; import java.util.List; import java.util.stream.Collectors; public class StreamExample { public List<String> demo(List<String> list) { return list.stream().filter(e -> e.length() < 5).collect(Collectors.toList()); } }
[ "tanguy.depommier@etudiant.univ-lille1.fr" ]
tanguy.depommier@etudiant.univ-lille1.fr
f9f21c5e60bb3d3e615fd4911817abd190a4e2bb
bda97c0a7954c84a906273f6dccb597524858e03
/src/main/java/com/javamaven/example/JunitMaven/Calculator.java
be647bd8eb18af859cd2da99b7e4d307c713a926
[]
no_license
KrutikaShah52/CalculatorGit
c71a7216337f59abe7ae9adc2ce40ce7b466ec2f
76235f46247a944cf4558a245f4695091979bc8b
refs/heads/master
2021-09-09T20:05:59.986509
2018-03-19T12:12:48
2018-03-19T12:12:48
125,819,570
0
0
null
null
null
null
UTF-8
Java
false
false
571
java
package com.javamaven.example.JunitMaven; public class Calculator implements ICalculator { public int sum(int a, int b) { return a + b; } public int sub(int a, int b) { return a - b; } public int mult(int a, int b) { return a * b; } public int div(int a, int b) throws Exception { if (b == 0) { throw new Exception("Divider can't be zero"); } return a / b; } public boolean equalIntegers(int a, int b) { boolean result = false; if (a == b) { result = true; } return result; } }
[ "krutiikashah5218@gmail.com" ]
krutiikashah5218@gmail.com
825da8a599f275100eb48004961f6ff46f72d1c9
e75be673baeeddee986ece49ef6e1c718a8e7a5d
/submissions/blizzard/Corpus/eclipse.pde.ui/2030.java
a78327a60302fefef17f6876c0e790447f0d921f
[ "MIT" ]
permissive
zhendong2050/fse18
edbea132be9122b57e272a20c20fae2bb949e63e
f0f016140489961c9e3c2e837577f698c2d4cf44
refs/heads/master
2020-12-21T11:31:53.800358
2018-07-23T10:10:57
2018-07-23T10:10:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,735
java
/******************************************************************************* * Copyright (c) 2007, 2008 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ package org.eclipse.pde.api.tools.internal.provisional.descriptors; /** * Description of a package. * <p> * A package has no parent. * </p> * * @since 1.0.0 */ public interface IPackageDescriptor extends IElementDescriptor { /** * Returns this package's name. Package names are dot qualified. * * @return package name */ public String getName(); /** * Returns a descriptor for a type in this package with the given name. The * given name is not package qualified. Inner types are '$'-separated. * * @param typeQualifiedName type qualified name * @return type descriptor */ public IReferenceTypeDescriptor getType(String typeQualifiedName); /** * Returns a descriptor for a type in this package with the given name. The * given name is not package qualified. Inner types are '$'-separated. * <p> * Extra type signature information may be provided for generic types. * </p> * * @param typeQualifiedName type qualified name * @param signature type signature information or <code>null</code> * @return type descriptor */ public IReferenceTypeDescriptor getType(String typeQualifiedName, String signature); }
[ "tim.menzies@gmail.com" ]
tim.menzies@gmail.com
8299e1d448ab619281051ab60396d151eb57e580
e8cd0d50d44751cd7e6351be9f1b638523bab8bb
/app/src/main/java/com/example/beachapp/BeachesRes.java
daeb92a7f91f81206d364016b12b74c9d0d324d4
[]
no_license
geor13/Syros-Beaches-App
54db97d68b67c6e1df8f4297e7f6c46c00c20978
353cb265a38b18b712df653b3b9f575cb87db268
refs/heads/master
2022-11-13T12:39:54.383034
2020-06-20T18:11:02
2020-06-20T18:11:02
274,087,982
0
0
null
null
null
null
UTF-8
Java
false
false
265
java
package com.example.beachapp; import java.io.Serializable; import java.util.ArrayList; public class BeachesRes implements Serializable{ private ArrayList<SingleBeach> beaches; public ArrayList<SingleBeach> getBeaches() { return beaches; } }
[ "g_aggelou@yahoo.com" ]
g_aggelou@yahoo.com
e656861903c8cd7c13c48eb3b7d335ed34c27bd1
01c531aef7af0487e406c105e8921673b33b2b53
/src/test/java/com/nway/spring/jdbc/performance/MyBatisPlusPerformance.java
7839b7f1e50152cd0ddb7a65df613c70731f6e40
[ "Apache-2.0" ]
permissive
super-QS/nway-jdbc
82fb20443b2a5493d9ae595ddaee8c1a5fdc2147
4db9326c96f02c9784ec3abe57a9d56fa185efcd
refs/heads/master
2022-11-18T18:34:12.494861
2019-12-03T14:49:23
2019-12-03T14:49:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,474
java
package com.nway.spring.jdbc.performance; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.google.gson.Gson; import com.nway.spring.jdbc.performance.entity.Computer; import com.nway.spring.jdbc.performance.entity.Monitor; import com.nway.spring.jdbc.performance.mybatisplus.ComputerDao; import com.nway.spring.jdbc.performance.mybatisplus.MonitorDao; @Service("myBatisPlusPerformance") @Transactional(transactionManager = "jdbcTxManager", readOnly = true) public class MyBatisPlusPerformance implements Performance , JsonQueryPerformance { private Gson gson = new Gson(); @Autowired private MonitorDao monitorDao; @Autowired private ComputerDao computerDao; @Override public Computer getComputerById(int id) { return computerDao.selectById(id); } @Override public List<Computer> listComputer() { return computerDao.selectList(Wrappers.query()); } @Override public Monitor getMonitorById(int id) { return monitorDao.selectById(id); } @Override public List<Monitor> listMonitor() { return monitorDao.selectList(Wrappers.query()); } @Override public String queryMonitorJsonList() { return gson.toJson(listMonitor()); } }
[ "zdtjss@163.com" ]
zdtjss@163.com
6765d3f49ae025b22eaa795d04a56bbc07939c00
afd17deed7fee4bae8e05d9988469bdd61cf503f
/src/exam/Figure.java
d0a2cc6430d78afe4eae93276569823eac9432bd
[]
no_license
LwamHailu/Basic-Java
23bb465a000abd43f29eaf99752d4037635b113d
c0aea502b7ef7db09f48181373bbf241dad6adcd
refs/heads/master
2020-05-31T11:01:57.655669
2017-06-11T20:22:02
2017-06-11T20:22:02
94,029,823
0
0
null
null
null
null
UTF-8
Java
false
false
79
java
package exam; public abstract class Figure { abstract String getfigure(); }
[ "lwi25@yahoo.com" ]
lwi25@yahoo.com
73b3307a5a25d2a097fcbaa368af827762a502b2
12fa880ed477b71a5a185d9f89479bf01258634c
/src/test/java/com/imooc/stormTest/AppTest.java
7a724d553dfb26272370fec37e3faa5a54be2d26
[]
no_license
xiangzisaisai/stormTest
06a8beb469012a065a2c2193c9f20d0a38393279
a004b0aa2544d7be4b22383a6a54aaf3e676fcee
refs/heads/master
2020-03-26T05:08:07.401076
2018-08-13T06:46:40
2018-08-13T06:46:40
144,539,380
0
0
null
null
null
null
UTF-8
Java
false
false
647
java
package com.imooc.stormTest; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; /** * Unit test for simple App. */ public class AppTest extends TestCase { /** * Create the test case * * @param testName name of the test case */ public AppTest( String testName ) { super( testName ); } /** * @return the suite of tests being tested */ public static Test suite() { return new TestSuite( AppTest.class ); } /** * Rigourous Test :-) */ public void testApp() { assertTrue( true ); } }
[ "zhixiang.yao@seaboxdata.com" ]
zhixiang.yao@seaboxdata.com
99818484ab6fbe696f46aafd780a3de2078d75c8
3a79a1e1a290c621a6a3c53d102a5fcbdb40ee68
/elite-rest/src/main/java/com/ledao/elite/rest/controller/project/ProjectCompanyController.java
eb99279edfde055db7c5d2f39a01784b7f0f5d7a
[]
no_license
listenbehind/elite
8509f10c4aad4615479072cd34f06c938569240e
a3967ea21449f89b819cd8031484f3bf639a49ef
refs/heads/master
2023-03-15T23:00:33.580236
2018-02-28T09:11:11
2018-02-28T09:11:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
24,840
java
package com.ledao.elite.rest.controller.project; import java.math.BigDecimal; import java.util.ArrayList; import java.util.Arrays; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.UUID; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.ModelAndView; import com.alibaba.fastjson.JSON; import com.googlecode.genericdao.search.SearchResult; import com.ledao.elite.core.domain.member.MemberCompany; import com.ledao.elite.core.domain.member.MemberPassport; import com.ledao.elite.core.domain.member.MemberPassport.Member_Status; import com.ledao.elite.core.domain.platform.PlatformInOrder; import com.ledao.elite.core.domain.platform.PlatformInOrder.PlatformInOrder_Type; import com.ledao.elite.core.domain.project.Project; import com.ledao.elite.core.domain.project.Project.Project_Status; import com.ledao.elite.core.domain.project.ProjectDefine; import com.ledao.elite.core.domain.project.ProjectDefine.ProjectDefine_Status; import com.ledao.elite.core.domain.project.ProjectDefine.ProjectDefine_Type; import com.ledao.elite.core.domain.project.ProjectDefineStage; import com.ledao.elite.core.domain.project.ProjectLog.ProjectLog_Type; import com.ledao.elite.core.exception.EliteServiceException; import com.ledao.elite.core.framework.annotation.MemberHandleLog; import com.ledao.elite.core.framework.annotation.SSOToken; import com.ledao.elite.core.framework.base.Pager; import com.ledao.elite.core.framework.config.LocalCoreConfig; import com.ledao.elite.core.framework.constant.AttachmentsConstant; import com.ledao.elite.core.framework.constant.ErrorCodeEnum; import com.ledao.elite.core.framework.constant.GlobalDefinedConstant; import com.ledao.elite.core.framework.constant.GlobalDefinedConstant.Pay_Channel; import com.ledao.elite.core.framework.constant.GlobalDefinedConstant.Pay_Status; import com.ledao.elite.core.framework.constant.LogsEnum; import com.ledao.elite.core.framework.dto.ProjectDetailInfo; import com.ledao.elite.core.framework.plugin.pay.PaymentService; import com.ledao.elite.core.service.member.MemberCompanyService; import com.ledao.elite.core.service.member.MemberPassportService; import com.ledao.elite.core.service.platform.PlatformInOrderService; import com.ledao.elite.core.service.project.ProjectDefineService; import com.ledao.elite.core.service.project.ProjectDefineStageService; import com.ledao.elite.core.service.project.ProjectService; import com.ledao.elite.core.utils.WebUtils; import com.ledao.elite.rest.controller.BaseController; import com.ledao.elite.rest.framework.RequestBaseRest; import com.ledao.elite.rest.framework.ResponseBaseRest; import com.ledao.elite.rest.framework.ResponseResultData; import com.ledao.elite.rest.framework.request.PayRequest; import com.ledao.elite.rest.framework.request.ProjectListRequest; import com.ledao.elite.rest.framework.response.PayResponse; import com.ledao.elite.rest.framework.response.project.RProject; import com.ledao.elite.rest.framework.response.project.RProjectDefine; import com.ledao.elite.rest.framework.response.project.RProjectDefineStage; import com.ledao.elite.rest.framework.utils.ColorImageUtils; import com.pingplusplus.model.Charge; /** * 项目方的项目接口中心 * * @author kobe.liu * @version 1.0 * */ @Controller("projectCompanyController") @RequestMapping("/project") public class ProjectCompanyController extends BaseController{ @Resource private ProjectService projectService; @Resource private ProjectDefineStageService projectDefineStageService; @Resource private PlatformInOrderService platformInOrderService; @Resource private MemberPassportService memberPassportService; @Resource private MemberCompanyService memberCompanyService; @Resource private LocalCoreConfig localCoreConfig; @Resource private ProjectDefineService projectDefineService; @Resource(name="aliPaymentService") private PaymentService paymentService; @Resource(name="pingPlusPlusService") private PaymentService pingPlusPlusService; /** * 发布项目 * */ @SSOToken @MemberHandleLog(description="项目方发布项目",type=LogsEnum.create) @ResponseBody @RequestMapping(value="/company/publish",method=RequestMethod.POST) public ModelAndView publish(){ String reqJson=parseRequest("name","intro","projectBudget","projectSolution","areaName","productIndustry","productFunction","contactName","contactPhone","referProject","startTime","expectTime","planed","recommendUser"); Project project=JSON.parseObject(reqJson, Project.class); project.setCompanyId(getMemberId()); project.setCreateId(getMemberId()); if(project.getStartTime()==null){ project.setStartTime(new Date()); } Project obj=this.projectService.createProject(project); //publish log event eventPublishService.publishProjectLogEvent(ProjectLog_Type.company,obj.getId(), null, null, getMemberId(), "立项阶段", "发布项目",null); ResponseResultData<Object> rsp=new ResponseResultData<>(); return rsp.responseResult(); } /** * 更新项目信息 * */ @SSOToken @MemberHandleLog(description="项目方更新项目",type=LogsEnum.update) @ResponseBody @RequestMapping(value="/company/update",method=RequestMethod.POST) public ModelAndView updateProject(){ ResponseBaseRest rs=new ResponseBaseRest(); rs.setCode(ErrorCodeEnum.SUCCESS.code); String reqJson=parseRequest("name","intro","projectBudget","projectSolution"); Project project=JSON.parseObject(reqJson, Project.class); project.setCompanyId(getMemberId()); try { this.projectService.updateProjectInfo(project); } catch (EliteServiceException e) { rs.setCode(e.getCode()); rs.setMsg(e.getMessage()); } //publish event eventPublishService.publishProjectLogEvent(ProjectLog_Type.company,project.getId(), null, null, getMemberId(), "立项阶段", "更新项目信息",null); ResponseResultData<Object> rsp=new ResponseResultData<>(); return rsp.responseResult(rs); } /** * 删除项目 * */ @SSOToken @MemberHandleLog(description="项目方删除项目",type=LogsEnum.remove) @ResponseBody @RequestMapping(value="/company/remove",method=RequestMethod.POST) public ModelAndView removeProject(){ String reqJson=parseRequest("dataId"); RequestBaseRest request=JSON.parseObject(reqJson, RequestBaseRest.class); Long projectId=request.getDataId(); this.projectService.removeProject(projectId); ResponseResultData<Object> rsp=new ResponseResultData<>(); return rsp.responseResult(); } /** * 获取项目方的所有项目 * */ @SSOToken @ResponseBody @RequestMapping(value="/company/findAll",method=RequestMethod.POST) public ModelAndView findAllProjects(){ List<Project> list=this.projectService.findProjectListByCompanyId(getMemberId()); List<RProject> dataList=new ArrayList<>(); for(Project mp:list){ RProject data=new RProject(mp); dataList.add(data); } ResponseResultData<List<RProject>> rsp=new ResponseResultData<>(); return rsp.responseResult(dataList); } /** * 我的项目列表查询 * */ @SSOToken @ResponseBody @RequestMapping(value="/company/listData",method=RequestMethod.POST) public ModelAndView projectListData(){ String reqJson=parseRequest(); ProjectListRequest request=JSON.parseObject(reqJson, ProjectListRequest.class); String status=request.getStatus(); Pager pager=new Pager(0, 50); SearchResult<Project> sr=this.projectService.findProjectList(getMemberId(), null, status, pager); BigDecimal amount=localCoreConfig.getProjectIntentionAmount(); List<RProject> dataList=new ArrayList<>(); for(Project mp:sr.getResult()){ RProject data=new RProject(mp); Map<String,String> map = ColorImageUtils.getColorImage(localCoreConfig.getRandomColor()); String imgPath = AttachmentsConstant.ATTA_SERVER_PATH +"/"+"preview/img/projectPicture/png"+"/"+map.get(mp.getBackgroundColor()); data.setImgPath(imgPath); data.setIntentionAmount(amount); dataList.add(data); } ResponseResultData<List<RProject>> rsp=new ResponseResultData<>(); return rsp.responseResult(dataList); } /** * 项目详情 * */ @SSOToken @ResponseBody @RequestMapping(value="/company/detail",method=RequestMethod.POST) public ModelAndView projectDetail(){ String reqJson=parseRequest("dataId"); RequestBaseRest request=JSON.parseObject(reqJson, RequestBaseRest.class); Long projectId=request.getDataId(); ProjectDetailInfo project=this.projectService.findProjectDetailById(projectId); BigDecimal amount=localCoreConfig.getProjectIntentionAmount(); RProject obj=new RProject(project); Map<String,String> map = ColorImageUtils.getColorImage(localCoreConfig.getRandomColor()); String imgPath = AttachmentsConstant.ATTA_SERVER_PATH +"/"+"preview/img/projectPicture/png"+"/"+map.get(project.getBackgroundColor()); obj.setImgPath(imgPath); obj.setIntentionAmount(amount); List<String> stageList = new ArrayList<>(); Integer stageCount=0; stageList.add("审核");stageList.add("立项"); if(project.getProjectDefine()==null){ stageList.add("阶段开发"); }else{ for(ProjectDefineStage stage:project.getProjectDefine().getStages()){ stageList.add(stage.getTitle()); } stageList.add(Project_Status.quality.label); stageList.add(Project_Status.finish.label); } if(project.getStatus().name().equals(Project_Status.pass_wait.name())||project.getStatus().name().equals(Project_Status.pass_already.name())){ stageCount=1; }else if(project.getStatus().name().equals(Project_Status.stage_course.name())){ stageCount=1+project.getTrustStageCount(); }else if(project.getStatus().name().equals(Project_Status.quality.name())){ stageCount=2+project.getTrustStageCount(); }else if(project.getStatus().name().equals(Project_Status.finish.name())){ stageCount=3+project.getTrustStageCount(); } obj.setStageList(stageList); obj.setStageCount(stageCount); ResponseResultData<RProject> rsp=new ResponseResultData<>(); return rsp.responseResult(obj); } /** * 获取意向金的金额 * */ @SSOToken @ResponseBody @RequestMapping(value="/company/intention",method=RequestMethod.POST) public ModelAndView intentionAmount(){ BigDecimal amount=localCoreConfig.getProjectIntentionAmount(); ResponseResultData<BigDecimal> rsp=new ResponseResultData<>(); return rsp.responseResult(amount); } /** * 确认托管股权 * */ @SSOToken @MemberHandleLog(description="项目股权托管",type=LogsEnum.update) @ResponseBody @RequestMapping(value="/company/stock/save",method=RequestMethod.POST) public ModelAndView saveTrustStock(){ String reqJson=parseRequest("dataId"); RequestBaseRest request=JSON.parseObject(reqJson, RequestBaseRest.class); Long projectId=request.getDataId(); this.projectService.updateProjectTrustStockAsCompany(projectId); //publish event eventPublishService.publishProjectLogEvent(ProjectLog_Type.company,projectId, null, null, getMemberId(), "立项阶段", "项目方托管股权",null); ResponseResultData<Object> rsp=new ResponseResultData<>(); return rsp.responseResult(); } @SSOToken @ResponseBody @RequestMapping(value = "/define", method = RequestMethod.POST) public ModelAndView viewProjectDefine() { String reqJson=parseRequest("dataId"); RequestBaseRest request=JSON.parseObject(reqJson, RequestBaseRest.class); Long projectId=request.getDataId(); ProjectDefine define = this.projectDefineService.findProjectDefine(projectId, ProjectDefine_Type.company, ProjectDefine_Status.wait); RProjectDefine projectDefine=new RProjectDefine(define); ResponseResultData<RProjectDefine> rsp=new ResponseResultData<>(); return rsp.responseResult(projectDefine); } /** * 项目方确定项目立项书 * */ @SSOToken @MemberHandleLog(description="确定项目立项书",type=LogsEnum.update) @ResponseBody @RequestMapping(value="/company/define/save",method=RequestMethod.POST) public ModelAndView saveAffirmDefine(){ String reqJson=parseRequest("dataId"); RequestBaseRest request=JSON.parseObject(reqJson, RequestBaseRest.class); Long projectId=request.getDataId(); //验证项目方是否审核通过,不通过不能立项 ResponseBaseRest result=new ResponseBaseRest(); MemberCompany company=this.memberCompanyService.findMemberCompanyByMemberId(getMemberId()); if(!Member_Status.normal.equals(company.getStatus())){ result.setCode(ErrorCodeEnum.ACCOUNT_AUDIT_UNPASS.code); result.setMsg("您的信息还未审核通过,请联系我们"); }else{ this.projectService.updateProjectAffirmDefinedAsCompany(projectId, true); //publish log event eventPublishService.publishProjectLogEvent(ProjectLog_Type.company,projectId, null, null, getMemberId(), "立项阶段", "项目立项",null); } ResponseResultData<Object> rsp=new ResponseResultData<>(); return rsp.responseResult(result); } /** * 更新项目阶段支付方式为线下支付 */ @SSOToken @MemberHandleLog(description = "更新项目阶段支付方式", type = LogsEnum.update) @ResponseBody @RequestMapping(value = "/prostage/payWay", method = RequestMethod.POST) public ModelAndView payWay() { String reqJson=parseRequest("dataId"); RequestBaseRest request=JSON.parseObject(reqJson, RequestBaseRest.class); Long projectId=request.getDataId(); ResponseResultData<Object> rsp=new ResponseResultData<>(); Project project = this.projectService.findProjectById(projectId); this.projectDefineStageService.updateProjectDefineStagePayWay(project.getTrustStage().getId(), GlobalDefinedConstant.Pay_Way.offline); return rsp.responseResult(); } /** * 去托管费用 * */ @SSOToken @ResponseBody @RequestMapping(value="/company/trustcost",method=RequestMethod.POST) public ModelAndView trustCost(){ String reqJson=parseRequest("dataId"); RequestBaseRest request=JSON.parseObject(reqJson, RequestBaseRest.class); Long projectId=request.getDataId(); Project project=this.projectService.findProjectById(projectId); //如项目未立项,不能托管 List<Project_Status> unList=Arrays.asList(Project_Status.audit_in,Project_Status.audit_in,Project_Status.pass_wait,Project_Status.unpass,Project_Status.invalid); RProjectDefineStage data=new RProjectDefineStage(); ResponseBaseRest result=new ResponseBaseRest(); ResponseResultData<RProjectDefineStage> rsp=new ResponseResultData<>(); if(unList.contains(project.getStatus())){ result.setCode(ErrorCodeEnum.NOT_DEFINE.code); result.setMsg("项目未立项,不能托管费用"); return rsp.responseResult(result); } //TODO:验证该阶段是否已托管,或者上个阶段是否已经验收 ProjectDefineStage stage=project.getTrustStage(); if(stage==null){ result.setCode(ErrorCodeEnum.OBJECT_NOT_EXIST.code); result.setMsg("项目阶段为空,不能托管费用"); return rsp.responseResult(result); } if(Pay_Status.success.equals(stage.getPayStatus()) ||stage.isTrusted()||stage.getFinished()){ result.setCode(ErrorCodeEnum.PAY_EXIST.code); result.setMsg("阶段已经托管过了"); return rsp.responseResult(result); } data=new RProjectDefineStage(stage); data.setIntentionAmount(localCoreConfig.getProjectIntentionAmount()); return rsp.responseResult(result,data); } /** * 验收 * */ @SSOToken @MemberHandleLog(description="项目阶段验收",type=LogsEnum.update) @ResponseBody @RequestMapping(value="/company/accept/save",method=RequestMethod.POST) public ModelAndView saveAcceptStage(){ String reqJson=parseRequest("dataId","password"); RequestBaseRest request=JSON.parseObject(reqJson, RequestBaseRest.class); Long projectId=request.getDataId(); String password=request.getValue(); MemberPassport memberPassport=this.memberPassportService.findMemberPassportByIdValidPassword(getMemberId(), password); ResponseBaseRest result=new ResponseBaseRest(); if(memberPassport!=null){ Project project=this.projectService.findProjectById(projectId); ProjectDefineStage stage=project.getForStage(); if(stage==null){ result.setCode(ErrorCodeEnum.OBJECT_NOT_EXIST.code); result.setMsg("该项目阶段无法进行验收"); }else{ this.projectDefineStageService.updateProjectDefineStageAccept(stage.getId(), true, null); } } ResponseResultData<Object> rsp=new ResponseResultData<>(); return rsp.responseResult(result); } /** * 更新项目阶段支付方式为线下支付 * */ @SSOToken @MemberHandleLog(description="更新项目阶段支付方式",type=LogsEnum.update) @ResponseBody @RequestMapping(value="/company/payWay/offline",method=RequestMethod.POST) public ModelAndView payWayOffline(){ String reqJson=parseRequest("dataId"); RequestBaseRest request=JSON.parseObject(reqJson, RequestBaseRest.class); Long projectId=request.getDataId(); Project project=this.projectService.findProjectById(projectId); this.projectDefineStageService.updateProjectDefineStagePayWay(project.getTrustStage().getId(),GlobalDefinedConstant.Pay_Way.offline); ResponseResultData<Object> rsp=new ResponseResultData<>(); return rsp.responseResult(); } /** * 发起Ping++的支付,异步支付 * */ @SSOToken @MemberHandleLog(description = "去托管费用", type = LogsEnum.pay) @ResponseBody @RequestMapping(value="/pingplus/pay",method = RequestMethod.POST) public ModelAndView pingplusPay(HttpServletRequest req){ String reqJson=parseRequest("projectId","type","channel","invoiceRise","invoiceAddress","invoiceName","invoicePhone"); PayRequest request=JSON.parseObject(reqJson, PayRequest.class); ResponseBaseRest result=new ResponseBaseRest(); ResponseResultData<Object> rsp=new ResponseResultData<>(); if (StringUtils.isEmpty(request.getType()) || request.getProjectId() == null) { result.setCode(ErrorCodeEnum.APPERROR.code); result.setMsg("提交失败"); return rsp.responseResult(result); } Project project = this.projectService.findProjectById(request.getProjectId()); if (project == null) { result.setCode(ErrorCodeEnum.APPERROR.code); result.setMsg("未找到该项目"); return rsp.responseResult(result); } PlatformInOrder_Type orderType = PlatformInOrder_Type.valueOf(PlatformInOrder_Type.class,request.getType()); BigDecimal orderAmount = null; String subject = ""; switch (orderType) { case intention: if (Pay_Status.paying.equals(project.getIntentionStatus()) || Pay_Status.success.equals(project.getIntentionStatus())) { result.setCode(ErrorCodeEnum.APPERROR.code); result.setMsg("意向金已支付过"); return rsp.responseResult(result); } orderAmount = localCoreConfig.getProjectIntentionAmount(); subject ="提交意向金到云英汇平台"; break; case prostage: ProjectDefineStage stage = project.getTrustStage(); if (Pay_Status.paying.equals(stage.getPayStatus()) || Pay_Status.success.equals(stage.getPayStatus()) || stage.isTrusted()) { result.setCode(ErrorCodeEnum.APPERROR.code); result.setMsg(project.getTrustStage().getTitle()+"费用已支付过"); return rsp.responseResult(result); } orderAmount = stage.getFirstAmount() == null ? stage.getAmount() : stage.getFirstAmount(); subject = "托管" + project.getTrustStage().getTitle() + "费用"; break; } String orderNum=createPayOrder(project, request.getProjectId(), request.getType(), request.getChannel(),request.getInvoiceRise(),request.getInvoiceAddress(),request.getInvoiceName(),request.getInvoicePhone()); Map<String,Object> payParams=new HashMap<String, Object>(); payParams.put("orderNum", orderNum); payParams.put("amount", orderAmount.multiply(new BigDecimal(100)));//金额单位为分 payParams.put("channel",request.getChannel());//cp_b2b,upacp_pc payParams.put("ip", WebUtils.getClientIp(req)); payParams.put("subject", subject); payParams.put("body", "云英汇平台资金"); Map<String, String> extra = new HashMap<String, String>(); if(Pay_Channel.upacp_pc.name().equals(request.getChannel())){ extra.put("result_url",localCoreConfig.getDomainServer()+"/pingpp/chinapay/notify"); payParams.put("extra", extra); }else if(Pay_Channel.wx_pub_qr.name().equals(request.getChannel())){ extra.put("product_id",UUID.randomUUID().toString().replaceAll("-", "")); payParams.put("extra", extra); } Map<String,Object> results=pingPlusPlusService.pay(payParams); Charge charge=(Charge) results.get("pingpp"); if(charge==null){ result.setCode(ErrorCodeEnum.APPERROR.code); result.setMsg("支付请求失败"); return rsp.responseResult(result); } logger.info("支付信息charge:"+charge.toString()); return rsp.responseResult(charge); } /** * 项目托管费用开始支付 * */ @SSOToken @MemberHandleLog(description="去托管费用",type=LogsEnum.pay) @RequestMapping(value="/company/pay",method=RequestMethod.POST) public ModelAndView trustProjectAmountPay(){ String reqJson=parseRequest("projectId","type","invoiceRise","invoiceAddress","invoiceName","invoicePhone"); PayRequest request=JSON.parseObject(reqJson, PayRequest.class); Long projectId=request.getProjectId(); String type=request.getType(),invoiceRise=request.getInvoiceRise(); PayResponse data=new PayResponse(); ResponseBaseRest result=new ResponseBaseRest(); Project project=this.projectService.findProjectById(projectId); ResponseResultData<PayResponse> rsp=new ResponseResultData<>(); if(project==null){ result.setCode(ErrorCodeEnum.OBJECT_NOT_EXIST.code); result.setMsg("未找到该项目ID:"+projectId); return rsp.responseResult(result); } PlatformInOrder order=new PlatformInOrder(); PlatformInOrder_Type orderType=PlatformInOrder_Type.valueOf(PlatformInOrder_Type.class,type); BigDecimal orderAmount=null; String subject = ""; switch (orderType) { case intention: if(Pay_Status.paying.equals(project.getIntentionStatus()) ||Pay_Status.success.equals(project.getIntentionStatus())){ result.setCode(ErrorCodeEnum.PAY_EXIST.code); result.setMsg("意向金已经支付过了"); return rsp.responseResult(result); } orderAmount=localCoreConfig.getProjectIntentionAmount(); subject = project.getName() + "提交意向金到云英汇平台"; break; case prostage: ProjectDefineStage stage=project.getTrustStage(); if(Pay_Status.paying.equals(stage.getPayStatus()) ||Pay_Status.success.equals(stage.getPayStatus()) ||stage.isTrusted()){ result.setCode(ErrorCodeEnum.PAY_EXIST.code); result.setMsg(stage.getTitle()+"费用已经支付过了"); return rsp.responseResult(result); } orderAmount=stage.getFirstAmount()==null?stage.getAmount():stage.getFirstAmount(); subject = project.getName() + "托管" + project.getTrustStage().getTitle() + "费用到云英汇平台"; order.setStageId(stage.getId()); break; } String orderNum=createPayOrder(project, projectId, type,Pay_Channel.alipay.name(),invoiceRise,request.getInvoiceAddress(),request.getInvoiceName(),request.getInvoicePhone()); data.setOrderNum(orderNum); data.setSubject(subject); data.setOrderAmount(orderAmount); return rsp.responseResult(result,data); } /** * 创建订单 * */ private String createPayOrder(Project project,Long projectId,String type,String channel,String invoiceRise,String invoiceAddress,String invoiceName,String invoicePhone){ PlatformInOrder order = new PlatformInOrder(); PlatformInOrder_Type orderType = PlatformInOrder_Type.valueOf(PlatformInOrder_Type.class, type); BigDecimal orderAmount = null; switch (orderType) { case intention: orderAmount = localCoreConfig.getProjectIntentionAmount(); break; case prostage: ProjectDefineStage stage = project.getTrustStage(); orderAmount = stage.getFirstAmount() == null ? stage.getAmount() : stage.getFirstAmount(); order.setStageId(stage.getId()); break; } Pay_Channel payType = Pay_Channel.valueOf(Pay_Channel.class, channel); order.setPayType(payType); order.setType(orderType); order.setMemberId(getMemberId()); order.setProjectId(projectId); order.setOrderAmount(orderAmount); order.setInvoiceRise(invoiceRise); order.setInvoiceAddress(invoiceAddress); order.setInvoiceName(invoiceName); order.setInvoicePhone(invoicePhone); String orderNum = this.platformInOrderService.createPlatformInOrder(order); return orderNum; } }
[ "liuyuan_kobe@163.com" ]
liuyuan_kobe@163.com
7d31c705b265372298b79bef47fd940b424f6c4d
5ac74a9e3c1be428b5856c277734f18b93d3823d
/src/main/java/br/pro/delfino/drogaria/bean/CorrespondenteBean.java
966672f00a38a0efb19b6229b407920f13e3379a
[]
no_license
thiagonovato/Drogaria
15023bacebb6dfa7805b9f9eb8c3b12600a0a3fc
50c77a96ddfffe3eceaa8715c0991e010cf2f788
refs/heads/master
2021-05-12T06:01:00.333992
2018-01-12T07:21:55
2018-01-12T07:21:55
117,208,038
0
0
null
null
null
null
UTF-8
Java
false
false
3,371
java
package br.pro.delfino.drogaria.bean; import java.io.Serializable; import java.util.List; import javax.annotation.PostConstruct; import javax.faces.bean.ManagedBean; import javax.faces.bean.ViewScoped; import javax.faces.event.ActionEvent; import org.omnifaces.util.Messages; import br.pro.delfino.drogaria.dao.CorrespondenteDAO; import br.pro.delfino.drogaria.dao.PessoaDAO; import br.pro.delfino.drogaria.domain.Correspondente; import br.pro.delfino.drogaria.domain.Pessoa; @SuppressWarnings("serial") @ManagedBean @ViewScoped public class CorrespondenteBean implements Serializable { private Correspondente correspondente; private List<Correspondente> correspondentes; private List<Pessoa> pessoas; public Correspondente getCorrespondente() { return correspondente; } public void setCorrespondente(Correspondente correspondente) { this.correspondente = correspondente; } public List<Correspondente> getCorrespondentes() { return correspondentes; } public void setCorrespondentes(List<Correspondente> correspondentes) { this.correspondentes = correspondentes; } public List<Pessoa> getPessoas() { return pessoas; } public void setPessoas(List<Pessoa> pessoas) { this.pessoas = pessoas; } @PostConstruct public void listar() { try { CorrespondenteDAO correspondenteDAO = new CorrespondenteDAO(); correspondentes = correspondenteDAO.listar("dataCadastro"); } catch (RuntimeException erro) { Messages.addGlobalError("Ocorreu um erro ao tentar listar os correspondentes"); erro.printStackTrace(); } } public void novo() { try { correspondente = new Correspondente(); PessoaDAO pessoaDAO = new PessoaDAO(); pessoas = pessoaDAO.listar("nome"); } catch (RuntimeException erro) { Messages.addGlobalError("Ocorreu um erro ao tentar criar um novo correspondente"); erro.printStackTrace(); } } public void salvar() { try { CorrespondenteDAO correspondenteDAO = new CorrespondenteDAO(); correspondenteDAO.merge(correspondente); correspondente = new Correspondente(); correspondentes = correspondenteDAO.listar("dataCadastro"); PessoaDAO pessoaDAO = new PessoaDAO(); pessoas = pessoaDAO.listar("nome"); Messages.addGlobalInfo("Correspondente salvo com sucesso"); } catch (RuntimeException erro) { Messages.addGlobalError("Ocorreu um erro ao tentar salvar o correspondente"); erro.printStackTrace(); } } public void excluir(ActionEvent evento) { try { correspondente = (Correspondente) evento.getComponent().getAttributes().get("correspondenteSelecionado"); CorrespondenteDAO correspondenteDAO = new CorrespondenteDAO(); correspondenteDAO.excluir(correspondente); correspondentes = correspondenteDAO.listar(); Messages.addGlobalInfo("Correspondente removido com sucesso"); } catch (RuntimeException erro) { Messages.addFlashGlobalError("Ocorreu um erro ao tentar remover o correspondente"); erro.printStackTrace(); } } public void editar(ActionEvent evento) { try { correspondente = (Correspondente) evento.getComponent().getAttributes().get("correspondenteSelecionado"); PessoaDAO pessoaDAO = new PessoaDAO(); pessoas = pessoaDAO.listar("nome"); } catch (RuntimeException erro) { Messages.addFlashGlobalError("Ocorreu um erro ao tentar selecionar um correspondente"); erro.printStackTrace(); } } }
[ "thiagonovato@gmail.com" ]
thiagonovato@gmail.com
c182eb5fc2dbef3c39f9ab6da1409f0df3c8a829
50cef9458a4f92992a036b4ee05f61541ae39126
/442/Generated2500/src/hw1_1000000LOCInterface9.java
5c2a1775a24e055ffd2af74f6ddf216ecf27c02d
[]
no_license
wcmonty/sw
9de53658cf29e1daa5282f4eeb4210c7edca8a73
3e66b39803014bca01c1ad18781977e0eb26af5e
refs/heads/master
2021-01-19T13:47:14.310121
2015-01-25T22:58:45
2015-01-25T22:58:45
29,833,723
0
0
null
null
null
null
UTF-8
Java
false
false
537
java
public interface hw1_1000000LOCInterface9 { public char hw1_1000000LOCInterface9Method0(hw1_1000000LOC33 var0, String var1, double var2); public double hw1_1000000LOCInterface9Method1(short var0, long var1, String var2, hw1_1000000LOC2 var3, String var4, long var5, float var6, String var7, hw1_1000000LOC27 var8); public double hw1_1000000LOCInterface9Method2(short var0, hw1_1000000LOC6 var1, char var2, double var3, long var4, byte var5, byte var6); public short hw1_1000000LOCInterface9Method3(short var0, short var1, int var2); }
[ "wmontg2@uic.edu" ]
wmontg2@uic.edu
10d372570a019b806cb9db2be8d2b9803196e3ec
beedb93c7b177d648ddc6d7ca0d7831bd6d7b51b
/src/main/java/com/trizzylab/oemsadmin/domain/PersistentAuditEvent.java
c5e87a28924ea7719c80e8b0488df6dada04c451
[]
no_license
zakizainon/jhipster-oemsadmin
6c027e7ef401dd42894a6b28e8fdfd2bea63b8fe
41fd1ae50a4e4f466e8676009bfa6654f24ed240
refs/heads/main
2023-02-04T03:50:15.199255
2020-12-25T08:25:56
2020-12-25T08:25:56
324,321,367
0
0
null
null
null
null
UTF-8
Java
false
false
2,539
java
package com.trizzylab.oemsadmin.domain; import java.io.Serializable; import java.time.Instant; import java.util.HashMap; import java.util.Map; import javax.persistence.*; import javax.validation.constraints.NotNull; /** * Persist AuditEvent managed by the Spring Boot actuator. * * @see org.springframework.boot.actuate.audit.AuditEvent */ @Entity @Table(name = "jhi_persistent_audit_event") public class PersistentAuditEvent implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "event_id") private Long id; @NotNull @Column(nullable = false) private String principal; @Column(name = "event_date") private Instant auditEventDate; @Column(name = "event_type") private String auditEventType; @ElementCollection @MapKeyColumn(name = "name") @Column(name = "value") @CollectionTable(name = "jhi_persistent_audit_evt_data", joinColumns = @JoinColumn(name = "event_id")) private Map<String, String> data = new HashMap<>(); public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getPrincipal() { return principal; } public void setPrincipal(String principal) { this.principal = principal; } public Instant getAuditEventDate() { return auditEventDate; } public void setAuditEventDate(Instant auditEventDate) { this.auditEventDate = auditEventDate; } public String getAuditEventType() { return auditEventType; } public void setAuditEventType(String auditEventType) { this.auditEventType = auditEventType; } public Map<String, String> getData() { return data; } public void setData(Map<String, String> data) { this.data = data; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof PersistentAuditEvent)) { return false; } return id != null && id.equals(((PersistentAuditEvent) o).id); } @Override public int hashCode() { return 31; } // prettier-ignore @Override public String toString() { return "PersistentAuditEvent{" + "principal='" + principal + '\'' + ", auditEventDate=" + auditEventDate + ", auditEventType='" + auditEventType + '\'' + '}'; } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
8361ce4c0894d579b3648774e34a273b798723cd
f9ef0c067f3734ba0605b40c90936babe9b5f8e1
/src/tron/GameStart.java
cfc30de291298286bc4242cb6027454aaec4c318
[ "Apache-2.0" ]
permissive
xzhangpeijin/TronGame
00744d07f3235e201dbc53d8ed5205967996132f
a0c207a161b650a2ddda8b8669e706d1fb5be94e
refs/heads/master
2016-09-05T17:47:43.705861
2014-10-27T04:42:26
2014-10-27T04:42:26
25,802,020
2
0
null
null
null
null
UTF-8
Java
false
false
1,690
java
package tron; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Toolkit; import java.awt.event.KeyAdapter; import java.awt.event.KeyEvent; import java.util.ArrayList; import javax.swing.ImageIcon; public class GameStart extends TronScreen { public int[] selected; public GameStart() { addKeyListener(new TAdapter()); setFocusable(true); setDoubleBuffered(true); } public void imageNames() { } public void paintComponent(Graphics g) { super.paintComponent(g); Graphics2D g2d = (Graphics2D) g; ImageIcon background = new ImageIcon(this.getClass().getResource("images/background.png")); g2d.drawImage(background.getImage(), 0, 0, this); drawMenu(g2d); Toolkit.getDefaultToolkit().sync(); g.dispose(); } public void drawMenu(Graphics2D g2d) { } private class TAdapter extends KeyAdapter { public void keyPressed(KeyEvent e) { int key = e.getKeyCode(); if(key == KeyEvent.VK_ENTER) { ArrayList<TronPlayer> temp = new ArrayList<TronPlayer>(); temp.add(new TronPlayer(750, 550, "Blue", 1)); temp.add(new TronPlayer(850, 550, "Red", 3)); temp.add(new TronAI(650, 600, "Gray3", 7)); temp.add(new TronAI(950, 600, "Gray6", 10)); temp.add(new TronAI(550, 650, "Gray2", 6)); temp.add(new TronAI(1050, 650, "Gray7", 11)); temp.add(new TronAI(450, 700, "Gray1", 5)); temp.add(new TronAI(1150, 700, "Gray8", 12)); TronBoard board = new TronBoard(temp); TronFrame.pushScreen(board); } if(key == KeyEvent.VK_LEFT) { } if(key == KeyEvent.VK_RIGHT) { } if(key == KeyEvent.VK_ESCAPE) { TronFrame.popScreen(); } } } }
[ "xzhangpeijin@gmail.com" ]
xzhangpeijin@gmail.com
03a6e340b0e504d4d8da8cdc1bfa53ebfd05fe4e
eb97ee5d4f19d7bf028ae9a400642a8c644f8fe3
/tags/2008-10-08/seasar2-2.4.30/seasar-benchmark/src/main/java/benchmark/wire/Bean00457A.java
d81e169a1eb99b1926cef58bccd171381664f369
[]
no_license
svn2github/s2container
54ca27cf0c1200a93e1cb88884eb8226a9be677d
625adc6c4e1396654a7297d00ec206c077a78696
refs/heads/master
2020-06-04T17:15:02.140847
2013-08-09T09:38:15
2013-08-09T09:38:15
10,850,644
0
1
null
null
null
null
UTF-8
Java
false
false
59
java
package benchmark.wire; public interface Bean00457A { }
[ "koichik@319488c0-e101-0410-93bc-b5e51f62721a" ]
koichik@319488c0-e101-0410-93bc-b5e51f62721a
ae8b6f5ae3b9a651ea87a93eb01a979986a7dca4
2638642a03e65d4cc299af67d25781a3d2238aca
/gmall-oms/src/main/java/com/atguigu/gmall/oms/dao/OrderItemDao.java
256b6b1519e16e8ff119da00d2e5836ecbf86c16
[ "Apache-2.0" ]
permissive
caining123/gmall-0615
de58dd4b063d70a81d4166fb6b1af738bd5ec129
49ea783ab35eef6c707ed203f3a4e18c849d5b04
refs/heads/master
2022-12-22T10:49:43.218530
2019-11-08T03:20:04
2019-11-08T03:20:04
218,071,124
0
0
Apache-2.0
2022-12-16T14:50:44
2019-10-28T14:52:16
JavaScript
UTF-8
Java
false
false
379
java
package com.atguigu.gmall.oms.dao; import com.atguigu.gmall.oms.entity.OrderItemEntity; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import org.apache.ibatis.annotations.Mapper; /** * 订单项信息 * * @author caining * @email 1113885942@qq.ccom * @date 2019-10-29 06:26:18 */ @Mapper public interface OrderItemDao extends BaseMapper<OrderItemEntity> { }
[ "1113885942@qq.com" ]
1113885942@qq.com
c5619e2bb723033b17c0f77412710ec4b1bf0642
64900793fb808edb8e67c5d1f18178913a741aa4
/Algorithem/src/week1/Quiz_1000.java
a94f523b1d2436b2f5d54ef58d73ff964d88bc55
[]
no_license
yky03/Algorithm
746a3c81e38bfcb7fbef2ab2bed82611f3b6ec0f
a8db0d6232481850a4095c4ce3f0542647280249
refs/heads/master
2021-05-06T14:46:02.994389
2018-02-04T01:00:35
2018-02-04T01:00:35
113,445,475
0
0
null
null
null
null
UTF-8
Java
false
false
310
java
package week1; import java.util.Scanner; public class Quiz_1000 { public static void main(String[] args) { Scanner input = new Scanner(System.in); int A; int B; do { A = input.nextInt(); B = input.nextInt(); } while( A <= 0 || B >= 10); System.out.println(A+B); } }
[ "ykycome00#naver.com" ]
ykycome00#naver.com
33ae4b9e698058ced100dc58330672c045a8da1e
692a7c50612c046529a9e0fccf0693d6c8803f24
/Workshop/Skole mappe/src/eksamentester/VariablePassing.java
925d844b3c596ca0c56499b3f082535e68f9aba2
[]
no_license
AdrianJakobsen/Warehouse-1
93909b921a233d4bd928bb2ad76c9c1eeb5ae2c9
718bfc0362b22932c9d0cce863adb095e05a7e99
refs/heads/master
2016-08-05T02:47:53.542894
2015-02-09T12:53:37
2015-02-09T12:53:37
23,287,068
0
0
null
null
null
null
UTF-8
Java
false
false
311
java
package eksamentester; public class VariablePassing { public static void main(String[] args) { int x = 234; String s = "kjeft"; x = edit(x); edit(s); System.out.println(x + " " + s); } private static int edit(int x){ x++; return x; } private static void edit(String s){ s += "?"; } }
[ "adrjak.aj@gmail.com" ]
adrjak.aj@gmail.com
87008e4898fab4de7ca1e00a5e1d5eb824849afa
a6a6ee2becf3dcbdc02de5e968fc52dcfc2c77b8
/app/src/main/java/com/segor/demontage/models/Mobile.java
fbab05730cea0074435228c73817d6145c33b016
[]
no_license
asma625/Segor12-08-21
ea1c29a7ec4636f9cfeac728707360bbdf50d5f4
78e0f4c41f88a15bb43d704ee7640fa0bc1af9fa
refs/heads/master
2023-07-05T18:55:03.062556
2021-08-12T16:15:49
2021-08-12T16:15:49
395,377,105
0
0
null
null
null
null
UTF-8
Java
false
false
2,153
java
package com.segor.demontage.models; import org.json.JSONException; import org.json.JSONObject; public class Mobile { private Integer id; private String type; private String durete; private String nom; private String nombreDentPignon; private String modulePignon; private String nombreDentRoue; private String moduleRoue; private String inclinaison; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getDurete() { return durete; } public void setDurete(String durete) { this.durete = durete; } public String getNom() { return nom; } public void setNom(String nom) { this.nom = nom; } public String getNombreDentPignon() { return nombreDentPignon; } public void setNombreDentPignon(String nombreDentPignon) { this.nombreDentPignon = nombreDentPignon; } public String getModulePignon() { return modulePignon; } public void setModulePignon(String modulePignon) { this.modulePignon = modulePignon; } public String getNombreDentRoue() { return nombreDentRoue; } public void setNombreDentRoue(String nombreDentRoue) { this.nombreDentRoue = nombreDentRoue; } public String getModuleRoue() { return moduleRoue; } public void setModuleRoue(String moduleRoue) { this.moduleRoue = moduleRoue; } public String getInclinaison() { return inclinaison; } public void setInclinaison(String inclinaison) { this.inclinaison = inclinaison; } public JSONObject toJson() throws JSONException { JSONObject JsonMobile = new JSONObject(); JsonMobile.put("id", this.getId()); JsonMobile.put("nomMobile", this.getNom()); JsonMobile.put("type", this.getType()); JsonMobile.put("durete", this.getDurete()); return JsonMobile; } }
[ "andamasma@gmail.com" ]
andamasma@gmail.com
993617ba49da00d2c1b54931e7a3be64a1fb7308
0945e27812b4cfcfe5f8241a1f24671bbd476401
/src/test/java/com/sarzhinskiy/twitter/repository/dao/NewsDAOTest.java
ff4f71cc630f67888eb3a65bd34907bccffc1e5c
[]
no_license
vasiliysarzhinskiy/cooltwitter
98e0d033dc906a6b810c4d40700074ca91f24fc7
8f4f4c809c2835f590850d02594a87349218e7d0
refs/heads/master
2016-09-15T19:05:39.317747
2014-06-07T22:58:30
2014-06-07T22:58:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
12,363
java
package com.sarzhinskiy.twitter.repository.dao; import java.sql.Timestamp; import java.util.List; import org.joda.time.DateTime; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import com.sarzhinskiy.twitter.domain.news.News; import com.sarzhinskiy.twitter.domain.news.NewsImage; import com.sarzhinskiy.twitter.repository.news.NewsDAO; import static org.junit.Assert.*; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations={"/SpringXMLConfigTest.xml"}) public class NewsDAOTest { private static final String SELECT_COUNT_NEWS = "select count(*) from news"; private static final String SELECT_COUNT_NEWS_IMAGE = "select count(*) from news_image"; private static final String DEFAULT_NEWS_INFO = "Interesting News"; @Autowired private JdbcTemplate jdbcTemplate; @Autowired private NewsDAO newsDAO; @Before public void clearDBTable() { jdbcTemplate.execute("delete from news"); jdbcTemplate.execute("delete from news_image"); } @Test public void testCreateNoException() { News news = new News(DEFAULT_NEWS_INFO); newsDAO.create(news); } @Test public void testCreate() { News news = new News(DEFAULT_NEWS_INFO); newsDAO.create(news); int size = jdbcTemplate.queryForObject(SELECT_COUNT_NEWS, Integer.class); assertEquals(1, size); } @Test public void testCreateAutoGeneratedId() { News news = new News("A"); newsDAO.create(news); assertNotNull(news.getId()); } @Test public void testCreateCorrectFilledField() { News news = new News(DEFAULT_NEWS_INFO); news.setDateTime(DateTime.now()); int nLike = 5; int status = 1; news.setLikeNumber(nLike); news.setStatus(status); newsDAO.create(news); int createdStatus = jdbcTemplate.queryForObject("select status from news where id=" + news.getId(), Integer.class); assertEquals(status, createdStatus); int createdNLike = jdbcTemplate.queryForObject("select like_number from news where id=" + news.getId(), Integer.class); assertEquals(nLike, createdNLike); String createdInfo = jdbcTemplate.queryForObject("select text from news where id=" + news.getId(), String.class); assertEquals(DEFAULT_NEWS_INFO, createdInfo); Timestamp timestamp = jdbcTemplate.queryForObject("select timestamp from news where id=" + news.getId(), Timestamp.class); DateTime createdDateTime = new DateTime(timestamp); assertEquals(news.getDateTime(), createdDateTime); } @Test public void testUpdateModifyCorrect() { News news = new News(DEFAULT_NEWS_INFO); newsDAO.create(news); int newStatus = 3; news.setStatus(newStatus); String newText = "A"; news.setText(newText); newsDAO.update(news); int updatedStatus = jdbcTemplate.queryForObject("select status from news where id=" + news.getId(), Integer.class); assertEquals(newStatus, updatedStatus); String updatedText = jdbcTemplate.queryForObject("select text from news where id=" + news.getId(), String.class); assertEquals(newText, updatedText); } @Test public void testUpdateLikeNumber() { News news = new News(DEFAULT_NEWS_INFO); newsDAO.create(news); int nLike = 5; news.setLikeNumber(nLike); newsDAO.update(news); int updatedLikes = jdbcTemplate.queryForObject("select like_number from news where id=" + news.getId(), Integer.class); assertEquals(nLike, updatedLikes); } @Test public void testFindNewsById() { News news = new News(DEFAULT_NEWS_INFO); newsDAO.create(news); Long id = news.getId(); News findedNews = newsDAO.findById(id); assertNotNull(findedNews); assertEquals(id, findedNews.getId()); } @Test public void testFindAllNews() { News news = new News(DEFAULT_NEWS_INFO); newsDAO.create(news); news = new News("SA"); newsDAO.create(news); List<News> listNews = newsDAO.findAll(); assertEquals(2, listNews.size()); } @Test public void testFindLastOne() { //must be delay because hsql save only milliseconds, and two news could be added in DB with the same milliseconds News news1 = new News(DEFAULT_NEWS_INFO); newsDAO.create(news1); sleepOneMillisecond(); String text = "SA"; News news2 = new News(text); newsDAO.create(news2); int nLast = 1; List<News> listNews = newsDAO.findLast(nLast); assertEquals(nLast, listNews.size()); assertEquals(news2, listNews.get(0)); } @Test public void testFindLastNoExceptionWithoutNews() { int nLast = 2; List<News> listNews = newsDAO.findLast(nLast); assertEquals(0, listNews.size()); } @Test public void testFindLastTwo() { //must be delay because hsql save only milliseconds, and two news could be added in DB with the same milliseconds News news1 = new News(DEFAULT_NEWS_INFO); newsDAO.create(news1); sleepOneMillisecond(); String text2 = "SA"; News news2 = new News(text2); newsDAO.create(news2); sleepOneMillisecond(); String text3 = "SQ"; News news3 = new News(text3); newsDAO.create(news3); int nLast = 2; List<News> listNews = newsDAO.findLast(nLast); assertEquals(nLast, listNews.size()); assertEquals(news3, listNews.get(0)); assertEquals(news2, listNews.get(1)); } @Test public void testFindMostPopular() { News news1 = new News(DEFAULT_NEWS_INFO); news1.setLikeNumber(5); newsDAO.create(news1); String text2 = "SA"; News news2 = new News(text2); newsDAO.create(news2); int nPopular = 1; List<News> listNews = newsDAO.findMostPopular(nPopular); assertEquals(nPopular, listNews.size()); assertEquals(news1, listNews.get(0)); } @Test public void testFindTwoMostPopular() { News news1 = new News(DEFAULT_NEWS_INFO); news1.setLikeNumber(5); newsDAO.create(news1); newsDAO.create(new News("A")); String text2 = "SA"; News news2 = new News(text2); news2.setLikeNumber(15); newsDAO.create(news2); int nPopular = 2; List<News> listNews = newsDAO.findMostPopular(nPopular); assertEquals(nPopular, listNews.size()); assertEquals(news2, listNews.get(0)); assertEquals(news1, listNews.get(1)); } @Test public void testRemoveNoException() { News news = new News(DEFAULT_NEWS_INFO); newsDAO.create(news); newsDAO.remove(news.getId()); } @Test public void testRemove() { News news = new News(DEFAULT_NEWS_INFO); newsDAO.create(news); newsDAO.remove(news.getId()); int size = jdbcTemplate.queryForObject(SELECT_COUNT_NEWS, Integer.class); assertEquals(0, size); } @Test public void testTryRemoveNotExistNewsNoException() { long notExistID = 1000000; newsDAO.remove(notExistID); } @Test public void testRemoveByIdNotDeleteOtherNews() { News news1 = new News(DEFAULT_NEWS_INFO); newsDAO.create(news1); News news2 = new News("A"); newsDAO.create(news2); newsDAO.remove(news1.getId()); int size = jdbcTemplate.queryForObject(SELECT_COUNT_NEWS, Integer.class); assertEquals(1, size); int countNews2 = jdbcTemplate.queryForObject("select count(*) from news where id=" + news2.getId(), Integer.class); assertEquals(1, countNews2); } @Test public void testRemoveAll() { News news1 = new News(DEFAULT_NEWS_INFO); newsDAO.create(news1); News news2 = new News("A"); newsDAO.create(news2); newsDAO.removeAll(); int size = jdbcTemplate.queryForObject(SELECT_COUNT_NEWS, Integer.class); assertEquals(0, size); } @Test public void testInsertImageInExistNewsNoException() { News news = new News(DEFAULT_NEWS_INFO); newsDAO.create(news); NewsImage image = new NewsImage(); image.setImageFile("images//image1.jpg"); image.setName("image1"); image.setComment("smiles"); newsDAO.insertImage(news, image); } @Test public void testInsertImageCorrectInExistNews() { News news = new News(DEFAULT_NEWS_INFO); newsDAO.create(news); NewsImage image = new NewsImage(); image.setImageFile("images//image1.jpg"); image.setName("cool image"); newsDAO.insertImage(news, image); int size = jdbcTemplate.queryForObject(SELECT_COUNT_NEWS_IMAGE, Integer.class); assertEquals(1, size); assertEquals(1, news.getImages().size()); } @Test public void testUpdateExistNewsImage() { News news = new News(DEFAULT_NEWS_INFO); newsDAO.create(news); NewsImage image = new NewsImage(); image.setImageFile("images//image1.jpg"); image.setName("image1"); newsDAO.insertImage(news, image); String comment = "smiles"; image.setComment(comment); String newImageName = "new name!"; image.setName(newImageName); newsDAO.updateImage(image); int size = jdbcTemplate.queryForObject(SELECT_COUNT_NEWS_IMAGE, Integer.class); assertEquals(1, size); String updatedName = jdbcTemplate.queryForObject("select name from news_image where id=" + image.getId(), String.class); assertEquals(newImageName, updatedName); String updatedComment = jdbcTemplate.queryForObject("select comment from news_image where id=" + image.getId(), String.class); assertEquals(comment, updatedComment); } @Test public void testFindImageById() { News news = new News(DEFAULT_NEWS_INFO); newsDAO.create(news); NewsImage image = new NewsImage(); image.setImageFile("images//image1.jpg"); image.setName("image1"); newsDAO.insertImage(news, image); NewsImage findedImage = newsDAO.findImage(image.getId()); assertNotNull(findedImage); assertEquals(image.getId(), findedImage.getId()); } @Test public void testFindImageByNews() { News news = new News(DEFAULT_NEWS_INFO); newsDAO.create(news); NewsImage image = new NewsImage(); image.setImageFile("images//image1.jpg"); image.setName("image1"); newsDAO.insertImage(news, image); List<NewsImage> listImages = newsDAO.findImagesByNews(news.getId()); assertNotNull(listImages); assertEquals(1, listImages.size()); assertEquals(image.getId(), listImages.get(0).getId()); } @Test public void testFindImagesByNewsCorrectLogic() { News news1 = new News(DEFAULT_NEWS_INFO); newsDAO.create(news1); News news2 = new News(DEFAULT_NEWS_INFO); newsDAO.create(news2); NewsImage image1 = new NewsImage(); image1.setImageFile("images//image1.jpg"); image1.setName("beatiful smiles"); NewsImage image2 = new NewsImage(); image2.setImageFile("images//image2.jpg"); NewsImage image3 = new NewsImage(); image3.setImageFile("images//image3.gif"); image3.setName("illusion"); //add image1 and image2 to news1, and add image3 to news2 newsDAO.insertImage(news1, image1); newsDAO.insertImage(news1, image2); newsDAO.insertImage(news2, image3); List<NewsImage> listImagesFirstNews = newsDAO.findImagesByNews(news1.getId()); assertNotNull(listImagesFirstNews); assertEquals(2, listImagesFirstNews.size()); List<NewsImage> listImagesSecondNews = newsDAO.findImagesByNews(news2.getId()); assertNotNull(listImagesSecondNews); assertEquals(1, listImagesSecondNews.size()); assertEquals(image3.getId(), listImagesSecondNews.get(0).getId()); } @Test public void testRemoveNewsImage() { News news = new News(DEFAULT_NEWS_INFO); newsDAO.create(news); NewsImage image = new NewsImage(); image.setImageFile("images//image1.jpg"); image.setName("beatiful smiles"); newsDAO.insertImage(news, image); newsDAO.removeImage(news, image.getId()); int imageSize = jdbcTemplate.queryForObject(SELECT_COUNT_NEWS_IMAGE, Integer.class); assertEquals(0, imageSize); assertEquals(0, news.getImages().size()); } @Test public void testRemoveAllNewsImages() { News news = new News(DEFAULT_NEWS_INFO); newsDAO.create(news); NewsImage image1 = new NewsImage(); image1.setImageFile("images//image1.jpg"); image1.setName("beatiful smiles"); newsDAO.insertImage(news, image1); NewsImage image2 = new NewsImage(); image2.setImageFile("images//image2.jpg"); newsDAO.insertImage(news, image2); newsDAO.removeAllNewsImages(); int imageSize = jdbcTemplate.queryForObject(SELECT_COUNT_NEWS_IMAGE, Integer.class); assertEquals(0, imageSize); } private void sleepOneMillisecond() { try { Thread.sleep(1); } catch (InterruptedException exc) { exc.printStackTrace(); } } }
[ "vasiliy.sarzhinskiy@gmail.com" ]
vasiliy.sarzhinskiy@gmail.com
debd2bb8e75f699fab55a786ecfc71509018c94e
f05bde6d5bdee3e9a07e34af1ce18259919dd9bd
/lang_interface/java/com/intel/daal/algorithms/neural_networks/layers/maximum_pooling2d/ForwardInput.java
dfec08b0e77efc972d929ea42ea32fbc458616fb
[ "Intel", "Apache-2.0" ]
permissive
HFTrader/daal
f827c83b75cf5884ecfb6249a664ce6f091bfc57
b18624d2202a29548008711ec2abc93d017bd605
refs/heads/daal_2017_beta
2020-12-28T19:08:39.038346
2016-04-15T17:02:24
2016-04-15T17:02:24
56,404,044
0
1
null
2016-04-16T20:26:14
2016-04-16T20:26:14
null
UTF-8
Java
false
false
1,374
java
/* file: ForwardInput.java */ /******************************************************************************* * Copyright 2014-2016 Intel Corporation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. *******************************************************************************/ package com.intel.daal.algorithms.neural_networks.layers.maximum_pooling2d; import com.intel.daal.services.DaalContext; /** * <a name="DAAL-CLASS-ALGORITHMS__NEURAL_NETWORKS__LAYERS__MAXIMUM_POOLING2D__FORWARDINPUT"></a> * @brief %Input object for the forward two-dimensional maximum pooling layer */ public class ForwardInput extends com.intel.daal.algorithms.neural_networks.layers.pooling2d.ForwardInput { /** @private */ static { System.loadLibrary("JavaAPI"); } public ForwardInput(DaalContext context, long cObject) { super(context, cObject); } }
[ "vasily.rubtsov@intel.com" ]
vasily.rubtsov@intel.com
c88c6e188b86ed0bfdb64f1ecccd4306546789d8
1b557c2281f2cd22d6c6521e960d3358aae4ec6b
/app/src/main/java/com/clikfin/clikfinapplication/activity/MainActivity.java
b44560caeb9987169f4707da860f853677d83cf2
[]
no_license
ShubhanagiPatil/ClikFin
ec9953c102991167b62ac4439444edce3f998143
aa7a55e737cbcfd5fe13f9add0663d22efaa6c04
refs/heads/master
2023-04-23T04:15:16.291533
2021-04-27T12:36:05
2021-04-27T12:36:05
313,215,090
0
0
null
null
null
null
UTF-8
Java
false
false
6,415
java
package com.clikfin.clikfinapplication.activity; import android.content.Intent; import android.content.IntentSender; import android.os.Bundle; import android.util.Log; import android.view.MotionEvent; import android.view.View; import android.widget.EditText; import android.widget.Toast; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import androidx.fragment.app.Fragment; import androidx.fragment.app.FragmentManager; import androidx.fragment.app.FragmentTransaction; import com.clikfin.clikfinapplication.R; import com.clikfin.clikfinapplication.constants.Constants; import com.clikfin.clikfinapplication.externalRequests.Response.AuthenticatedUser; import com.clikfin.clikfinapplication.fragment.SplashFragment; import com.clikfin.clikfinapplication.network.APICallbackInterface; import com.clikfin.clikfinapplication.network.APIClient; import com.clikfin.clikfinapplication.util.Common; import com.google.android.gms.tasks.OnCompleteListener; import com.google.android.material.snackbar.Snackbar; import com.google.android.play.core.appupdate.AppUpdateInfo; import com.google.android.play.core.appupdate.AppUpdateManager; import com.google.android.play.core.appupdate.AppUpdateManagerFactory; import com.google.android.play.core.install.InstallState; import com.google.android.play.core.install.InstallStateUpdatedListener; import com.google.android.play.core.install.model.AppUpdateType; import com.google.android.play.core.install.model.InstallStatus; import com.google.android.play.core.install.model.UpdateAvailability; import com.google.android.play.core.tasks.Task; import com.google.firebase.analytics.FirebaseAnalytics; import com.google.firebase.messaging.FirebaseMessaging; import retrofit2.Call; import retrofit2.Response; public class MainActivity extends AppCompatActivity { private FirebaseAnalytics mFirebaseAnalytics; AppUpdateManager appUpdateManager; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mFirebaseAnalytics = FirebaseAnalytics.getInstance(this); appUpdateManager = AppUpdateManagerFactory.create(MainActivity.this); // Returns an intent object that you use to check for an update. Task<AppUpdateInfo> appUpdateInfoTask = appUpdateManager.getAppUpdateInfo(); // Checks that the platform will allow the specified type of update. appUpdateInfoTask.addOnSuccessListener(appUpdateInfo -> { if (appUpdateInfo.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE // For a flexible update, use AppUpdateType.FLEXIBLE && appUpdateInfo.isUpdateTypeAllowed(AppUpdateType.IMMEDIATE)) { // Request the update. try { appUpdateManager.startUpdateFlowForResult( // Pass the intent that is returned by 'getAppUpdateInfo()'. appUpdateInfo, // Or 'AppUpdateType.FLEXIBLE' for flexible updates. AppUpdateType.IMMEDIATE, // The current activity making the update request. this, // Include a request code to later monitor this update request. Constants.IN_APP_UPDATE_REQUEST); } catch (IntentSender.SendIntentException e) { Common.logExceptionToCrashlaytics(e); } } else { if (getIntent().hasExtra("pushnotification")) { Intent intent = null; if(getIntent().getStringExtra("Title").equalsIgnoreCase("Hello")){ intent = new Intent(this, HelloActivity.class); }else { intent = new Intent(this, NotificationActivity.class); } startActivity(intent); finish(); }else{ FragmentManager fragmentManager = getSupportFragmentManager(); final FragmentTransaction fragmentTransaction = fragmentManager.beginTransaction(); Fragment fragment = new SplashFragment(); fragmentTransaction.replace(R.id.mainFrameLayout, fragment); fragmentTransaction.commitAllowingStateLoss(); } } }); } @Override protected void onResume() { super.onResume(); appUpdateManager .getAppUpdateInfo() .addOnSuccessListener( appUpdateInfo -> { if (appUpdateInfo.updateAvailability() == UpdateAvailability.DEVELOPER_TRIGGERED_UPDATE_IN_PROGRESS) { // If an in-app update is already running, resume the update. try { appUpdateManager.startUpdateFlowForResult( appUpdateInfo, AppUpdateType.IMMEDIATE, this, Constants.IN_APP_UPDATE_REQUEST); } catch (IntentSender.SendIntentException e) { e.printStackTrace(); } } }); } @Override public boolean dispatchTouchEvent(MotionEvent event) { if (event.getAction() == MotionEvent.ACTION_DOWN) { View v = getCurrentFocus(); if (v instanceof EditText) { Common.hideKeyboard(MainActivity.this); } } return super.dispatchTouchEvent(event); } @Override protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == Constants.IN_APP_UPDATE_REQUEST) { if(resultCode!=RESULT_OK){ Toast.makeText(MainActivity.this,"Update failed...",Toast.LENGTH_LONG).show(); } } } }
[ "shubhangiamale@gmail.com" ]
shubhangiamale@gmail.com
9728b34c808049401ac69a826de937e8bf0398bf
7a8617f40640ff29e15f339b3b8fe4c406b25222
/LetOJ/1108. Defanging an IP Address.java
6be0d2a4c07a146e76f4108e1eb64ca470fad131
[]
no_license
63a16d97ea4816a7f854483da5031469/Data-Structure
3178d712dc9138c5f14749b0320ef2a81035c5e7
2d564a708ecd98d9aad0314c7bf7887d154dc13b
refs/heads/master
2022-11-13T16:51:00.884489
2022-11-07T13:47:58
2022-11-07T13:47:58
44,916,589
0
0
null
null
null
null
UTF-8
Java
false
false
591
java
/* * https://leetcode.com/problems/word-ladder/ Easy 278 669 Add to List Share Given a valid (IPv4) IP address, return a defanged version of that IP address. A defanged IP address replaces every period "." with "[.]". Example 1: Input: address = "1.1.1.1" Output: "1[.]1[.]1[.]1" Example 2: Input: address = "255.100.50.0" Output: "255[.]100[.]50[.]0" 3 Apr. 2020 at 9:08 pm * */ class Solution { public String defangIPaddr(String address) { if(address.length()==0) return address; return address.replace(".","[.]"); } }
[ "ntutonycao@gmail.com" ]
ntutonycao@gmail.com
cac7c8ebbe676e1b5002902b31e9f18ea8a95450
6070dd26d2f56d97bc58ce1507e947d06eb31550
/app/src/androidTest/java/com/hs/dbbclientside/ExampleInstrumentedTest.java
2bb9d091eea60354461cf518f0c7369765e0cfee
[]
no_license
zhtoo/dbb-client-side
9ef80477c07385715c45317bb1de3f17495f5327
82944bd204a5671206627508b0e2700bb79b66c9
refs/heads/master
2021-09-16T21:05:12.737740
2018-06-25T05:52:00
2018-06-25T05:52:00
114,998,570
1
0
null
null
null
null
UTF-8
Java
false
false
741
java
package com.hs.dbbclientside; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() throws Exception { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("com.hs.dbbclientside", appContext.getPackageName()); } }
[ "820159571@qq.com" ]
820159571@qq.com
e19c7fcc45b8f15685ca7e981413cd3803fd780f
f7196f6100bd88b22a1d6b3dc23f4e597e2db4f5
/eshop-cache-ha/src/test/java/com/chenshun/eshopcacheha/controller/CacheControllerTest.java
0e7545bd9c5bdb7d1a0511dff37ffa94d3ef74e7
[]
no_license
chenshun131/eshop-ha
90d62fa50e471c236e3c90399b690cbd8bd95bb9
5aaf3ddefde1af9ecb9e24ab33610522992ce403
refs/heads/master
2020-03-18T02:55:12.580393
2018-05-24T09:48:07
2018-05-24T09:48:07
134,213,719
0
0
null
null
null
null
UTF-8
Java
false
false
880
java
package com.chenshun.eshopcacheha.controller; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; /** * User: mew <p /> * Time: 18/5/21 15:29 <p /> * Version: V1.0 <p /> * Description: <p /> */ @RunWith(SpringRunner.class) @SpringBootTest public class CacheControllerTest { private MockMvc mvc; @Autowired private CacheController cacheController; @Before public void init() { this.mvc = MockMvcBuilders.standaloneSetup(cacheController).build(); } @Test public void changeProduct() { } }
[ "1539831174@qq.com" ]
1539831174@qq.com
2fb5fba755261860d5012a1bc9e77a869da86ca0
960ec353dc7c7b30e2a7062dbdfa987627e16681
/src/mybaby/ui/community/parentingpost/util/WebViewUtil.java
02cb60fa7e93de2e0a157ab663081d3c366792f7
[]
no_license
ruanbaojun1105/BabySave
b9b5a891492076b8baa708028800a563c3eab087
1ad27434f4886e1cfe0ac5f9c6510cf51728c0c8
refs/heads/master
2020-12-30T14:01:31.932948
2018-04-23T01:47:14
2018-04-23T01:47:21
91,282,219
1
0
null
null
null
null
UTF-8
Java
false
false
20,658
java
package mybaby.ui.community.parentingpost.util; import android.app.Activity; import android.content.Intent; import android.graphics.Color; import android.net.Uri; import android.support.annotation.Nullable; import android.support.v7.widget.Toolbar; import android.text.TextUtils; import android.view.View; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient; import android.widget.FrameLayout; import android.widget.ProgressBar; import android.widget.TextView; import android.widget.Toast; import com.alibaba.sdk.android.AlibabaSDK; import com.alibaba.sdk.android.login.LoginService; import com.alibaba.sdk.android.login.WebViewService; import com.taobao.tae.sdk.callback.LoginCallback; import com.taobao.tae.sdk.model.Session; import com.umeng.socialize.controller.UMSocialService; import org.xmlrpc.android.XMLRPCException; import org.xutils.common.util.LogUtil; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; import me.hibb.mybaby.android.R; import mybaby.Constants; import mybaby.action.Action; import mybaby.cache.CacheDataTask; import mybaby.cache.GenCaches; import mybaby.models.Blog; import mybaby.models.WebViewOption; import mybaby.models.community.ParentingPost; import mybaby.rpc.BaseRPC; import mybaby.ui.MyBabyApp; import mybaby.ui.community.customclass.CustomAbsClass; import mybaby.ui.community.parentingpost.ParentingWebViewActivity; import mybaby.ui.community.parentingpost.WebviewFragment; import mybaby.util.LogUtils; import mybaby.util.MapUtils; import mybaby.util.StringUtils; /** * Created by LeJi_BJ on 2016/3/9. */ public class WebViewUtil { Activity activity; String url; String first_url; WebView webView; ProgressBar delayDisplayProgress; ParentingPost parentingPost; UMSocialService webviewController; WebViewClient webViewClient; View topView; TopViewHolder viewHolder; boolean isFirstLoad; public WebViewUtil(Activity activity, String url, String first_url, WebView webView,@Nullable Toolbar topView,ProgressBar delayDisplayProgress, ParentingPost parentingPost, UMSocialService webviewController, WebViewClient webViewClient) { this.activity = activity; this.url = url; this.first_url = first_url; this.webView = webView; this.topView = topView; if (viewHolder==null) { if (topView == null) viewHolder = null; else viewHolder = new TopViewHolder(topView); } this.delayDisplayProgress = delayDisplayProgress; this.parentingPost = parentingPost; this.webviewController = webviewController; this.webViewClient = webViewClient; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } static class TopViewHolder{ TextView tv_title; TextView tv_setShare; TextView tv_back; Toolbar topView; TextView tv_close; public TopViewHolder(Toolbar topView) { if (topView==null) return; tv_title = (TextView) topView.findViewById(R.id.actionbar_title); tv_setShare = (TextView) topView.findViewById(R.id.share_tv); tv_close = (TextView) topView.findViewById(R.id.close_tv); tv_back= (TextView) topView.findViewById(R.id.actionbar_back); this.topView=topView; } } /** * 淘宝登陆授权 */ public void showLogin(final Activity activity, final WebView webView, final WebViewClient webViewClient) { //调用getService方法来获取服务 LoginService loginService = AlibabaSDK.getService(LoginService.class); loginService.showLogin(activity, new LoginCallback() { @Override public void onSuccess(Session session) { // 当前是否登录状态 boolean isLogin(); // 登录授权时间 long getLoginTime(); // 当前用户ID String getUserId(); // 用户其他属性 User getUser(); //User中:淘宝用户名 淘宝用户ID 淘宝用户头像地址 WebViewService webViewService = AlibabaSDK.getService(WebViewService.class); webViewService.bindWebView(webView, webViewClient); //webView.setWebViewClient(webViewClient); /*Toast.makeText(activity, "-isLogin-" + session.isLogin() + "-UserId-" + session.getUserId() + "-LoginTime-" + session.getLoginTime() + "[user]:nick=" + session.getUser().nick + "头像" + session.getUser().avatarUrl, Toast.LENGTH_SHORT).show();*/ } @Override public void onFailure(int code, String message) { Toast.makeText(activity, "授权取消" + code + message, Toast.LENGTH_SHORT).show(); } }); } public boolean deilOverUrl(){ return deilOverUrl(false); } public boolean deilOverUrl(boolean isCut){ try { if (isCut) return true; setPageOption(false); /*String hosturl = StringUtils.getHost(url); if (hosturl.contains("taobao.com") || hosturl.contains("tmall.com")) { LoginService loginService = AlibabaSDK.getService(LoginService.class); if (!loginService.getSession().isLogin()) { showLogin(activity, webView, webViewClient); //TaoOpen.startOauth(ParentingWebViewActivity.this,Constants.OPENIM_KEY,Constants.OPENIM_SECRET); return true; } else { // if (webViewClient!=null) { WebViewService webViewService = AlibabaSDK.getService(WebViewService.class); webViewService.bindWebView(webView, webViewClient); } } }*/ LogUtil.e(url); Action action=null; try { action = Action.createAction(url, false); } catch (Exception e) { e.printStackTrace(); action=null; } if (action == null) { return deilOverUrlAtStr(false,url,first_url,viewHolder,webView,activity); } else { return action.excute(activity, webviewController,webView, parentingPost); } } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); return false; } } /** * url在非action时参数检测,此方法同时在新启动浏览器加载时开启检测 * @param isFirst 是否第一次加载 * @param url * @param first_url * @param webView * @param activity * @return */ private static String skipSourArr[]= new String[]{"tel:", "mbnewpage","mbtopbar","mbotherdomain"}; public static boolean deilOverUrlAtStr(boolean isFirst, String url , String first_url, Toolbar topView, WebView webView, final Activity activity){ return deilOverUrlAtStr(isFirst,url,first_url,topView==null?null:new TopViewHolder(topView),webView,activity); } public static boolean deilOverUrlAtStr(boolean isFirst,String url ,String first_url,TopViewHolder holder, final WebView webView, final Activity activity){ if (url.startsWith(skipSourArr[0])){ Uri uri = Uri.parse(url); Intent it = new Intent(Intent.ACTION_DIAL, uri); activity.startActivity(it); return true; } if (url.contains(skipSourArr[1])){ /*if (first_url.equals(url)||first_url.contains(skipSourArr[1])) { if (activity instanceof ParentingWebViewActivity) return false; }*/ if (!isFirst&&(!url.equals(first_url))) { String hosturl = StringUtils.getHost(url); //没有mbotherdomain这个参数的话不给跳转到其他域名去 if (!(hosturl.contains("lejimami.com") || hosturl.contains("hibb.me"))&&!url.contains(skipSourArr[3])) { return true; } /*if (!(hosturl.contains("taobao.com") || hosturl.contains("tmall.com"))) { setOpenPage(activity, url); }*/ webView.stopLoading(); String newStr = url.replaceAll("&mbnewpage", ""); LogUtils.e("处理后的url:" + newStr); return setOpenPage(activity,webView, newStr); } return true; } if (url.contains(skipSourArr[2])){ if (activity instanceof ParentingWebViewActivity) { ParentingWebViewActivity webViewActivity = (ParentingWebViewActivity) activity; Map<String,Object> map=Action.getHeader(url); webViewActivity.getWebviewFragment().setMbtopbar(MapUtils.getMapInt(map, "mbtopbar")); webViewActivity.getWebviewFragment().setStauToolbar(MapUtils.getMapInt(map,"mbtopbar"), MapUtils.getMapStr(map, "bar_color")); } } if (url.contains("mb_right_btn")&&url.contains("mb_right_btn_action")){ if (activity instanceof ParentingWebViewActivity) { ParentingWebViewActivity webViewActivity = (ParentingWebViewActivity) activity; final Map<String,Object> map=Action.getHeader(url); webViewActivity.getWebviewFragment().setRightBtnTexOnclick(MapUtils.getMapStr(map, "mb_right_btn"), new View.OnClickListener() { @Override public void onClick(View v) { try { Action action = Action.createAction(MapUtils.getMapStr(map, "mb_right_btn_action")); action.excute(activity, WebviewFragment.webviewController, webView, null); } catch (Exception e) { e.printStackTrace(); LogUtil.e("action执行异常"); } } }); } } /*if (!isFirst&&(!url.equals(first_url))) { String hosturl = StringUtils.getHost(url); if (!(hosturl.contains("lejimami.com") || hosturl.contains("hibb.me")) && !url.contains(skipSourArr[3])) { return true; } }*/ /*if (url.contains("bar_color")){ if (holder==null) return false; Map<String,Object> map=Action.getHeader(url); String bgcolor=MapUtils.getMapStr(map,"bar_color"); if (!TextUtils.isEmpty(bgcolor)) { holder.topView.setBackgroundColor(Color.parseColor("#" + bgcolor)); holder.tv_title.setTextColor(Color.WHITE); holder.tv_back.setTextColor(Color.WHITE); holder.tv_setShare.setTextColor(Color.WHITE); holder.tv_close.setTextColor(Color.WHITE); holder.tv_setShare.setBackground(null); }else { holder.topView.setBackgroundColor(activity.getColor(R.color.bg_gray)); holder.tv_title.setTextColor(Color.BLACK); holder.tv_back.setTextColor(Color.BLACK); holder.tv_setShare.setTextColor(Color.BLACK); holder.tv_close.setTextColor(Color.BLACK); } }*/ return false; } /** * 开启新的浏览器 * @param activity * @param url * @return */ public static boolean setOpenPage(Activity activity,WebView webView,String url){ int mbtopbar=0; Map<String,Object> map=Action.getHeader(url); if (map.containsKey("mbtopbar")) mbtopbar=MapUtils.getMapInt(map, "mbtopbar"); if (Constants.WEBVIEW_PAGE_COUNTS_MAX>0) { Constants.WEBVIEW_PAGE_COUNTS_MAX-=1; if (Constants.WEBVIEW_PAGE_COUNTS_MAX<=0) { Constants.WEBVIEW_PAGE_COUNTS_MAX=0; } CustomAbsClass.starWebViewIntent(activity, url); return true; }else { if (activity instanceof ParentingWebViewActivity){ if (mbtopbar>0){ CustomAbsClass.starWebViewIntent(activity, url); return true; }else { webView.loadUrl(url); LogUtil.e("已超过开启浏览器新页面最大数"); ((ParentingWebViewActivity)activity).getWebviewFragment().setStauToolbar(0);//此处保证一下显示问题 return false;/*Toast.makeText(activity, "已超过开启浏览器新页面最大数", Toast.LENGTH_SHORT).show()*/ } }else CustomAbsClass.starWebViewIntent(activity, url); return false;//在当前开启的浏览器中处理 } } /** * 所有浏览器控件统一设置setUserAgentString * @param settings */ public static String getUserAStr(WebSettings settings) { StringBuilder ua = new StringBuilder(settings==null?"":settings.getUserAgentString()); String name = null; if (null!= MyBabyApp.currentUser) name=MyBabyApp.currentUser.getUniqueName(); int width=MyBabyApp.px2dip(MyBabyApp.screenWidth); return settings==null?ua.append(" mybaby-android/").append(MyBabyApp.version) .append(" " + android.os.Build.DEVICE) .append(" " + android.os.Build.VERSION.RELEASE) .append(" MBUSER/").append(TextUtils.isEmpty(name) ? "" : name) .append(" width/").append(width).toString(): ua.append(" MyBaby/").append(MyBabyApp.version) .append(" MBUSER/").append(TextUtils.isEmpty(name) ? "" : name) .append(" width/").append(width).toString(); } private static String str1="webviwe_page_option"; /** * 设置页面属性 * 此处如需DUBUG调试请将清单文件中android:process="me.hibb.mybaby.android.web"去掉,不然无结果 */ public void setPageOption(boolean isFirstLoad){ if (viewHolder==null||delayDisplayProgress==null) return; this.isFirstLoad=isFirstLoad; //String hosturl = StringUtils.getHost(url); //if (!(hosturl.contains("lejimami.com") || hosturl.contains("hibb.me"))) { GenCaches genCaches=CacheDataTask.getGenObjCache(activity,str1); if (genCaches!=null) genCaches= (GenCaches) genCaches.getSerializableObj(); if (genCaches==null) getNewOption(activity, new CommListener() { @Override public void todosomething(WebViewOption[] webViewOptions) { try { setWebviewOption(webViewOptions); } catch (Exception e) { e.printStackTrace(); } } }); else if(!genCaches.getVersion().equals(Blog.getWebPageAttVer())) getNewOption(activity,null); else if (CacheDataTask.booleaRefush( genCaches.getLastTime(), 60*24)){ getNewOption(activity,null); }else { try { setWebviewOption((WebViewOption[]) genCaches.getSerializableObj()); } catch (Exception e) { e.printStackTrace(); } } // } } /** * 普通的提示框 */ public interface CommListener { void todosomething(WebViewOption[] webViewOptions); } /** * 获得页面属性最新属性并缓存 */ public static void getNewOption(final Activity activity,final CommListener listener){ LogUtils.e("getNewOption"); BaseRPC.rpcCallForReturnMaps( "页面属性webviwe_page_option——RPC", "bz.xmlrpc.system.htmlPageAttributes.get", BaseRPC.extParams(), new BaseRPC.CallbackForMaps() { @Override public void onSuccess(Map<?, ?> data) { WebViewOption[] webViewOptions=WebViewOption.createByArray((Object[]) data.get("data")); GenCaches caches=new GenCaches(webViewOptions,MapUtils.getMapStr(data, "version"),new Date()); CacheDataTask.putCache(activity==null?MyBabyApp.getContext():activity,caches,str1,true); if (listener!=null) listener.todosomething(webViewOptions); } @Override public void onFailure(long id, XMLRPCException error) { } }); } /** * 执行页面属性 * @param webViewOptions */ private void setWebviewOption(final WebViewOption[] webViewOptions) throws Exception{ final List<WebViewOption> optionList=new ArrayList<>(); new CustomAbsClass.doSomething(activity) { @Override public void todo() { Pattern pattern; Matcher match; for(WebViewOption viewOption:webViewOptions){ pattern = Pattern.compile(viewOption.getUrlRegex()); match = pattern.matcher(url); if (match.find()) { optionList.add(viewOption); } } if (optionList.size()==0) return; long deTime=0; boolean isNewPage=false; for (WebViewOption viewOption:optionList){ FrameLayout.LayoutParams lp= (FrameLayout.LayoutParams) webView.getLayoutParams(); int height=lp.topMargin; lp.leftMargin=-viewOption.getHideLeftWidth(); lp.topMargin=height-viewOption.getHideTopHeight(); lp.rightMargin=-viewOption.getHideRightWidth(); lp.bottomMargin=-viewOption.getHideBottomHeight(); webView.requestLayout(); viewHolder.tv_title.setText(viewOption.getTitle()); if (!TextUtils.isEmpty(viewOption.getOpenNewPageUrlRegex())) { pattern = Pattern.compile(viewOption.getOpenNewPageUrlRegex()); match = pattern.matcher(url); isNewPage = match.find(); } deTime=viewOption.getDelayDisplayMillisecond(); if ((!TextUtils.isEmpty(viewOption.getHtmlPageScript()))&&(!viewOption.getHtmlPageScript().contains("mbnewpage"))) webView.loadUrl(viewOption.getHtmlPageScript()); if (!TextUtils.isEmpty(viewOption.getDefault_html())&&activity instanceof ParentingWebViewActivity&&isFirstLoad) { //((ParentingWebViewActivity)activity).getWebviewFragment().loadUrl(viewOption.getDefault_html(),url); } LogUtils.e("页面属性初始URL:" + viewOption.getDefault_html()); } if (!isNewPage) { if (deTime > 0) { delayDisplayProgress.bringToFront(); delayDisplayProgress.setVisibility(View.VISIBLE); delayDisplayProgress.postDelayed(new Runnable() { @Override public void run() { if (delayDisplayProgress!=null ) delayDisplayProgress.setVisibility(View.GONE); } },deTime); }else delayDisplayProgress.setVisibility(View.GONE); }else { //webView.stopLoading(); if (!url.contains(skipSourArr[1]))//否者会可能多次执行 setOpenPage(activity,webView,url); } viewHolder.topView.bringToFront(); } }; } }
[ "401763159@qq.com" ]
401763159@qq.com
8245bea65afed8a21c110b45e1ed0dd3b6094c13
8c147c3b3c6750c8ac07850319c35f8c5170d9ed
/Practice/src/practice01/PTra01_03.java
2757096060ec143535301c41f7da3bfb47e7ba9c
[]
no_license
AyanoHorikoshi/JavaBasic
553561a0b0fa6d9f1a2c8302ae9532dd9f3dd462
1cb8775b1e2d3fb190440f1a059b7d44ca5c54fb
refs/heads/master
2021-04-26T23:50:05.534531
2018-04-23T05:12:22
2018-04-23T05:12:22
123,864,850
0
0
null
null
null
null
UTF-8
Java
false
false
475
java
package practice01; /* * PTra01_03.java * 作成 LIKEIT 2017 *------------------------------------------------------------ * Copyright(c) Rhizome Inc. All Rights Reserved. */ public class PTra01_03 { public static void main(String[] args) { int i; // ★ int型の変数 i を宣言してください i = 10; // ★ 変数 i に 10 を代入してください System.out.println(i);// ★ 変数 i に入っている値を出力してください } }
[ "nontankyun@gmail.com" ]
nontankyun@gmail.com
d95a8845df0edea71855cdf7a949dcb891419d56
f21475cb91d2bb98ab2d1c00617a678679442cd4
/src/main/java/co/estebanlopez/repository/EmployeeRepository.java
0237ce18aa219d42a0c91629dc21bda45a23a054
[]
no_license
estebanl/Proyecto-Electiva
52725bd13bb0bc17a7df6f20734846a28328945d
68f173bd51f1f17d346bbeb77150249b72ad319a
refs/heads/master
2016-08-11T07:06:57.898266
2016-04-01T20:57:28
2016-04-01T20:57:28
55,261,610
0
0
null
null
null
null
UTF-8
Java
false
false
335
java
package co.estebanlopez.repository; import co.estebanlopez.domain.Employee; import org.springframework.data.repository.CrudRepository; import org.springframework.data.rest.core.annotation.RepositoryRestResource; @RepositoryRestResource(path = "employee") public interface EmployeeRepository extends CrudRepository<Employee,Long> { }
[ "estebaniindustrial@hotmail.com" ]
estebaniindustrial@hotmail.com