blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
4
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
689M
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
131 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
32 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
313
6fc8c460142b4f6fe0cb4dfd6f672bc8de7fbed6
8a6453cd49949798c11f57462d3f64a1fa2fc441
/aws-java-sdk-glue/src/main/java/com/amazonaws/services/glue/model/transform/JsonClassifierJsonUnmarshaller.java
e852bb571fdcf1cb38f1a7e1e87bca968e83ece0
[ "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,706
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.glue.model.transform; import java.math.*; import javax.annotation.Generated; import com.amazonaws.services.glue.model.*; import com.amazonaws.transform.SimpleTypeJsonUnmarshallers.*; import com.amazonaws.transform.*; import com.fasterxml.jackson.core.JsonToken; import static com.fasterxml.jackson.core.JsonToken.*; /** * JsonClassifier JSON Unmarshaller */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class JsonClassifierJsonUnmarshaller implements Unmarshaller<JsonClassifier, JsonUnmarshallerContext> { public JsonClassifier unmarshall(JsonUnmarshallerContext context) throws Exception { JsonClassifier jsonClassifier = new JsonClassifier(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.getCurrentToken(); if (token == null) token = context.nextToken(); if (token == VALUE_NULL) { return null; } while (true) { if (token == null) break; if (token == FIELD_NAME || token == START_OBJECT) { if (context.testExpression("Name", targetDepth)) { context.nextToken(); jsonClassifier.setName(context.getUnmarshaller(String.class).unmarshall(context)); } if (context.testExpression("CreationTime", targetDepth)) { context.nextToken(); jsonClassifier.setCreationTime(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context)); } if (context.testExpression("LastUpdated", targetDepth)) { context.nextToken(); jsonClassifier.setLastUpdated(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context)); } if (context.testExpression("Version", targetDepth)) { context.nextToken(); jsonClassifier.setVersion(context.getUnmarshaller(Long.class).unmarshall(context)); } if (context.testExpression("JsonPath", targetDepth)) { context.nextToken(); jsonClassifier.setJsonPath(context.getUnmarshaller(String.class).unmarshall(context)); } } else if (token == END_ARRAY || token == END_OBJECT) { if (context.getLastParsedParentElement() == null || context.getLastParsedParentElement().equals(currentParentElement)) { if (context.getCurrentDepth() <= originalDepth) break; } } token = context.nextToken(); } return jsonClassifier; } private static JsonClassifierJsonUnmarshaller instance; public static JsonClassifierJsonUnmarshaller getInstance() { if (instance == null) instance = new JsonClassifierJsonUnmarshaller(); return instance; } }
[ "" ]
fe5e3d8efa14d68b7d2ff343d737d9fa218d1a52
b9ad39c12af0b081fa16dc319b5d87b147d3c747
/xiandaojia/src/main/java/com/xiandaojia/common/domain/ProductSmallTypeInfo.java
b9922aa2be101082b0ad3aa0be920a40ba0a3fe8
[ "Apache-2.0" ]
permissive
kio569874/mchyc
f00d9c3753109547e15485107e04b2840ea51434
26ff18457269494f24c7eb134ddf71c890bc0d20
refs/heads/master
2021-08-18T22:27:07.008488
2018-11-05T04:57:35
2018-11-05T04:57:35
112,986,893
0
0
null
null
null
null
UTF-8
Java
false
false
1,626
java
package com.xiandaojia.common.domain; import java.util.Date; public class ProductSmallTypeInfo { private Long smalltypeId; private String smalltypeName; private String status; private Date createTime; private Date updateTime; private String operator; private Short smallSeqno; public Long getSmalltypeId() { return smalltypeId; } public void setSmalltypeId(Long smalltypeId) { this.smalltypeId = smalltypeId; } public String getSmalltypeName() { return smalltypeName; } public void setSmalltypeName(String smalltypeName) { this.smalltypeName = smalltypeName == null ? null : smalltypeName.trim(); } public String getStatus() { return status; } public void setStatus(String status) { this.status = status == null ? null : status.trim(); } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public Date getUpdateTime() { return updateTime; } public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } public String getOperator() { return operator; } public void setOperator(String operator) { this.operator = operator == null ? null : operator.trim(); } public Short getSmallSeqno() { return smallSeqno; } public void setSmallSeqno(Short smallSeqno) { this.smallSeqno = smallSeqno; } }
[ "yc_ccj@163.com" ]
yc_ccj@163.com
89056dfbe3f639bb8ce5459e1865e11a9c6cd198
c4623aa95fb8cdd0ee1bc68962711c33af44604e
/src/android/support/v4/widget/ag.java
e9bea79ed00dd1944c3ef25c6f91f415d4669070
[]
no_license
reverseengineeringer/com.yelp.android
48f7f2c830a3a1714112649a6a0a3110f7bdc2b1
b0ac8d4f6cd5fc5543f0d8de399b6d7b3a2184c8
refs/heads/master
2021-01-19T02:07:25.997811
2016-07-19T16:37:24
2016-07-19T16:37:24
38,555,675
1
0
null
null
null
null
UTF-8
Java
false
false
387
java
package android.support.v4.widget; import android.widget.EdgeEffect; class ag { public static boolean a(Object paramObject, float paramFloat1, float paramFloat2) { ((EdgeEffect)paramObject).onPull(paramFloat1, paramFloat2); return true; } } /* Location: * Qualified Name: android.support.v4.widget.ag * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
881deb6323a73f02310348c1ec166da9e6ccf6d4
b3c9ff43b846f9b72e01d600dd3fc41bd519ea69
/app/src/androidTest/java/com/example/lasse/magretheskaal/ExampleInstrumentedTest.java
7c58d7cb70da3c8e20570ad46f84b2e3bdaa8510
[]
no_license
lasse1511/MagretheSkaalGit
67d6a3642072b45a9ac5cf95a1e13960c621e1bb
635ce05adf7fa7b8b919c911a858d0d2c7d392d3
refs/heads/master
2021-01-12T12:12:19.397425
2016-12-14T21:48:56
2016-12-14T21:48:56
72,357,045
0
0
null
2016-11-02T21:12:03
2016-10-30T15:17:32
Java
UTF-8
Java
false
false
766
java
package com.example.lasse.magretheskaal; 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.*; /** * Instrumentation 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.example.lasse.magretheskaal", appContext.getPackageName()); } }
[ "lassebonner@hotmail.com" ]
lassebonner@hotmail.com
87b9b648e2b4ba17065885423807693278006d5a
d887ccc2f2c07bc9230572131507f8da4dc34e50
/cloud-provider-payment8001/src/main/java/com/zhs/cloudproviderpayment8001/dao/PaymentDao.java
ded0f3e13bba8085f8b85f00dbe2937d3e253c30
[]
no_license
zhanghslq/cloud2020
780e4b4977f17bd902b4a8db14e4047f78c144c6
5a76b95bac1153ac4e1b4c92aaf91fa14ec81f62
refs/heads/master
2022-12-05T22:58:37.318683
2020-08-16T04:32:01
2020-08-16T04:32:01
287,873,388
0
0
null
null
null
null
UTF-8
Java
false
false
354
java
package com.zhs.cloudproviderpayment8001.dao; import com.zhs.entity.Payment; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; /** * @author: zhs * @date: 2020/3/28 21:20 */ @Mapper public interface PaymentDao { int insert(@Param("payment") Payment payment); Payment query(@Param("id") Integer id); }
[ "zhanghslq@163.com" ]
zhanghslq@163.com
f2aace491e3b762ac3eb63a698a9748f98c92df8
04fe4e69a031ccd6dca04e5e2852b6647042e362
/src/java/dataaccess/FollowDB.java
8533f25310b0e1b54b1a2b1e148a6f4041a40caa
[]
no_license
ayeshaperwaiz/MiniTwitter
b57a1a460c3d9a0d21e0e56789e50c53a8dc3f6c
b5967cd142b9a76ff5027b91d1713986ac19f2c2
refs/heads/master
2021-08-18T08:17:00.438750
2018-12-13T07:26:11
2018-12-13T07:26:11
148,415,941
0
0
null
null
null
null
UTF-8
Java
false
false
6,191
java
package dataaccess; import business.Follow; import business.User; import java.io.IOException; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.LinkedList; import java.util.List; public class FollowDB { public static int insert(Follow follow) { ConnectionPool pool = ConnectionPool.getInstance(); Connection connection = pool.getConnection(); PreparedStatement ps = null; ResultSet rs = null; //Find if this data exist in the database. String query = "SELECT * FROM twitterdb.follow WHERE userID = ? AND followedUserID = ?;"; try{ ps = connection.prepareStatement(query); ps.setInt(1, follow.getUserID()); ps.setInt(2, follow.getFollowedUserID()); rs = ps.executeQuery(); //If data already exist, don't add it again. if(rs.next()){ return 1; }else{ query = "INSERT INTO twitterdb.follow (userID, followedUserID, followDate) " + "VALUES (?, ?, ?)"; try{ ps = connection.prepareStatement(query); ps.setInt(1, follow.getUserID()); ps.setInt(2, follow.getFollowedUserID()); ps.setString(3, follow.getFollowDate()); return ps.executeUpdate(); } catch (SQLException e) { System.out.println(e); return 0; } } } catch(SQLException e) { System.out.println(e); return 0; }finally { DBUtil.closePreparedStatement(ps); pool.freeConnection(connection); } } public static int delete(Follow follow) { ConnectionPool pool = ConnectionPool.getInstance(); Connection connection = pool.getConnection(); PreparedStatement ps = null; ResultSet rs = null; //Find if this data exist in the database. String query = "SELECT * FROM twitterdb.follow WHERE userID = ? AND followedUserID = ?;"; try{ ps = connection.prepareStatement(query); ps.setInt(1, follow.getUserID()); ps.setInt(2, follow.getFollowedUserID()); rs = ps.executeQuery(); //If this data exist, delete this data. if(rs.next()){ query = "DELETE FROM twitterdb.follow WHERE userID = ? AND followedUserID = ?;"; try{ ps = connection.prepareStatement(query); ps.setInt(1, follow.getUserID()); ps.setInt(2, follow.getFollowedUserID()); return ps.executeUpdate(); }catch (SQLException e) { System.out.println(e); return 0; } }else{ return 1; } }catch (SQLException e) { System.out.println(e); return 0; } finally { DBUtil.closePreparedStatement(ps); pool.freeConnection(connection); } } public static List<User> followedUsers(String userID) throws IOException { ConnectionPool pool = ConnectionPool.getInstance(); Connection connection = pool.getConnection(); PreparedStatement ps = null; ResultSet rs = null; String query = "SELECT * FROM twitterdb.follow WHERE userID = ?"; List<User> followedList = new LinkedList(); try{ ps = connection.prepareStatement(query); ps.setString(1, userID); rs = ps.executeQuery(); User user = null; while(rs.next()){ user = new User(); user.setUserID(rs.getInt("followedUserID")); followedList.add(user); } return followedList; } catch (SQLException e) { System.out.println(e); return null; } finally { DBUtil.closeResultSet(rs); DBUtil.closePreparedStatement(ps); pool.freeConnection(connection); } } public static int countFollowers(String userID) throws IOException { ConnectionPool pool = ConnectionPool.getInstance(); Connection connection = pool.getConnection(); PreparedStatement ps = null; ResultSet rs = null; int count = 0; String query = "SELECT COUNT(*) AS count FROM twitterdb.follow WHERE followedUserID = ?"; try{ ps = connection.prepareStatement(query); ps.setString(1, userID); rs = ps.executeQuery(); if(rs.next()){ count = Integer.parseInt(rs.getString("count")); } return count; } catch (SQLException e) { System.out.println(e); return 0; } finally { DBUtil.closePreparedStatement(ps); pool.freeConnection(connection); } } public static int countFollowing(String userID) throws IOException { ConnectionPool pool = ConnectionPool.getInstance(); Connection connection = pool.getConnection(); PreparedStatement ps = null; ResultSet rs = null; int count = 0; String query = "SELECT COUNT(*) AS count FROM twitterdb.follow WHERE userID = ?"; try{ ps = connection.prepareStatement(query); ps.setString(1, userID); rs = ps.executeQuery(); if(rs.next()){ count = Integer.parseInt(rs.getString("count")); } return count; } catch (SQLException e) { System.out.println(e); return 0; } finally { DBUtil.closePreparedStatement(ps); pool.freeConnection(connection); } } }
[ "35862526+NghiP@users.noreply.github.com" ]
35862526+NghiP@users.noreply.github.com
ce4e9c2e22dabc9005520227369d38fc7f2c7fa6
707764e16214f67fb69a50a1f2245e451b3410dd
/src/main/java/net/sourceforge/argparse4j/impl/type/ConstructorArgumentType.java
94e1e7e72987bd9b0f133b05f0315f17dd064806
[ "MIT" ]
permissive
whoschek/argparse4j
8083753ae0a9486f86130341de87f3e370462176
2d2385e1e8a115bdb56249f1b2cbd53eb9c93bb0
refs/heads/master
2021-01-16T18:49:00.285733
2012-12-17T17:57:23
2012-12-17T17:57:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,271
java
/* * Copyright (C) 2011 Tatsuhiro Tsujikawa * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, copy, * modify, merge, publish, distribute, sublicense, and/or sell copies * of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ package net.sourceforge.argparse4j.impl.type; import java.lang.reflect.InvocationTargetException; import net.sourceforge.argparse4j.inf.Argument; import net.sourceforge.argparse4j.inf.ArgumentParser; import net.sourceforge.argparse4j.inf.ArgumentParserException; import net.sourceforge.argparse4j.inf.ArgumentType; /** * <p> * This implementation converts String value into given type using given type's * constructor. * </p> * <p> * The constructor must have 1 String argument. If error occurred inside the * constructor, {@link ArgumentParserException} will be thrown. If error * occurred in other locations, subclass of {@link RuntimeException} will be * thrown. * </p> * */ public class ConstructorArgumentType<T> implements ArgumentType<T> { private Class<T> type_; /** * <p> * Creates {@link ConstructorArgumentType} object with given {@code type}. * </p> * <p> * The constructor of {@code type} must have 1 String argument. * </p> * * @param type * The type String value should be converted to. */ public ConstructorArgumentType(Class<T> type) { type_ = type; } @Override public T convert(ArgumentParser parser, Argument arg, String value) throws ArgumentParserException { T obj = null; try { obj = type_.getConstructor(String.class).newInstance(value); } catch (InstantiationException e) { handleInstatiationError(e); } catch (IllegalAccessException e) { handleInstatiationError(e); } catch (InvocationTargetException e) { throw new ArgumentParserException(String.format( "could not convert '%s' to %s (%s)", value, type_.getSimpleName(), e.getCause().getMessage()), e.getCause(), parser, arg); } catch (NoSuchMethodException e) { handleInstatiationError(e); } return obj; } private void handleInstatiationError(Exception e) { throw new IllegalArgumentException("Failed to instantiate object", e); } }
[ "tatsuhiro.t@gmail.com" ]
tatsuhiro.t@gmail.com
0aae5de3a4f6c0bef92ace38b5e5589b5d8b468d
bbcc871b736b37b175621ff3dfd9edcfc2ba13e9
/PrintForm.java
89a02ad44c64680ccc9eae82f8097941e8847e98
[]
no_license
INTROSE-F14/Biopsy-Client
33482a15e58058543920036514fbb193c401b6d8
5a558a731b3dd34577e5a9b4486172ae3be7e400
refs/heads/master
2021-01-23T20:18:17.681465
2014-03-13T12:37:53
2014-03-13T12:37:53
16,804,550
1
0
null
2014-04-07T15:07:49
2014-02-13T14:03:47
Java
UTF-8
Java
false
false
28
java
public class PrintForm { }
[ "shirleymarcaida@vicky-os-macbook-pro.local" ]
shirleymarcaida@vicky-os-macbook-pro.local
73d458ca4628135f8f4f1a7ac86b46abb9fefe8d
d3e91b0c4e5b3b0cd4654dd4666d202956b22c63
/persistence/src/main/java/com/elink/persistence/model/Page.java
07eb71074e41e98769fe7a822c0258842aa086fa
[ "MIT" ]
permissive
gdsglgf/elink
50c8c57be23f37c65106bd084e0f024b0a81ca6d
1bc7dee20e77de9aed4679b9ea5ed0b850691b8b
refs/heads/master
2020-06-11T03:48:45.954523
2017-05-28T06:44:47
2017-05-28T06:44:47
76,011,364
0
1
null
null
null
null
UTF-8
Java
false
false
2,013
java
package com.elink.persistence.model; public class Page { private Long id; private String docno; private String url; private String title; private String keywords; private String description; private int rank; private Location location; public Page() {} public Page(String docno, String url, String title, String keywords, String description) { this.docno = docno; this.url = url; this.title = title; this.keywords = keywords; this.description = description; } public Page(String docno, String url, String title, String keywords, String description, int rank) { this(docno, url, title, keywords, description); this.rank = rank; } public Page(String docno, String url, String title, String keywords, String description, int rank, Location location) { this(docno, url, title, keywords, description, rank); this.location = location; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getDocno() { return docno; } public void setDocno(String docno) { this.docno = docno; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getKeywords() { return keywords; } public void setKeywords(String keywords) { this.keywords = keywords; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public int getRank() { return rank; } public void setRank(int rank) { this.rank = rank; } public Location getLocation() { return location; } public void setLocation(Location location) { this.location = location; } public String toString() { return String.format("Page[id:%d, rank:%d, docno:%s, url:%s, title:%s, keywords:%s, description:%s, loc:%s]", id, rank, docno, url, title, keywords, description, location); } }
[ "wzguofulgz@126.com" ]
wzguofulgz@126.com
3118c20cb42e89f58fd3e0d4d0467da402172c28
8c3772a1f8a29d6d62c0910d2a309939d0419726
/spring/src/main/java/com/example/spring/container/SpringModuleContext2.java
249c3464dffef3288b4efb14f311192d871f679b
[]
no_license
zeyideng/module
bf4859eea7758aa353363d74f20cd79a05ec21ff
36eb3ee2a0236745552ee995dffcf2cc20ad8135
refs/heads/main
2023-06-01T04:28:37.387693
2021-06-27T04:04:17
2021-06-27T04:04:17
371,705,630
1
0
null
null
null
null
UTF-8
Java
false
false
1,322
java
package com.example.spring.container; import com.example.spring.test.ChildClass1; import com.example.spring.test.ChildClass2; import com.example.spring.test.ParentClass; import org.springframework.beans.BeansException; import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContextAware; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; public class SpringModuleContext2 implements ApplicationContextAware { private ApplicationContext parent; @Override public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { if(applicationContext.getParent()==null){ return; } //Get parent application context this.parent = applicationContext.getParent(); ConfigurableApplicationContext childContext = new ClassPathXmlApplicationContext("classpath:/child2.xml"); childContext.setParent(this.parent); childContext.refresh(); ParentClass parentClass = childContext.getBean(ParentClass.class); System.out.println(parentClass); ChildClass2 bean = childContext.getBean(ChildClass2.class); System.out.println(bean.getParentClass()); } }
[ "1399238664@qq.com" ]
1399238664@qq.com
63a5a299dc3f8b87467187459224ac2c85426dea
9b5fe9ec46b6715e118a003da92989688e0429f3
/HKUST Java/Labs/COMP 102x Lab 03/Lab03.java
4cd2959de7054c9c048e5fa125f8a6dace653adf
[]
no_license
dreedgibson/Projects
a8057828594b93e8ff8ad39d5363bf331096ae07
07b932b8b5ca4d5b3f3fbfddb63bedb523ce59f8
refs/heads/master
2021-01-11T22:00:33.854325
2017-03-27T22:24:51
2017-03-27T22:24:51
78,891,653
0
0
null
null
null
null
UTF-8
Java
false
false
2,508
java
import comp102x.ColorImage; import comp102x.Canvas; public class Lab03 { public void loadAnImage() { // Please write your code after this line ColorImage image1 = new ColorImage(); Canvas canvas = new Canvas(image1.getWidth(), image1.getHeight()); canvas.add(image1); } public void loadTwoImagesOnTheSameCanvas() { // Please write your code after this line ColorImage image1 = new ColorImage(); ColorImage image2 = new ColorImage(); int height; if (image1.getHeight() > image2.getHeight()) { height = image1.getHeight(); } else { height = image2.getHeight(); } Canvas canvas = new Canvas(image1.getWidth() + image2.getWidth(), height); canvas.add(image1); canvas.add(image2, image1.getWidth(), 0); } public void imageAddition() { // Please write your code after this line ColorImage image1 = new ColorImage(); ColorImage image2 = new ColorImage(); ColorImage image3 = image1.add(image2); int height; if (image1.getHeight() > image2.getHeight()) { height = image1.getHeight(); } else { height = image2.getHeight(); } Canvas canvas = new Canvas(3 * image1.getWidth() + 20, height); canvas.add(image1); canvas.add(image2, image1.getWidth() + 10, 0); canvas.add(image3, 2 * image1.getWidth() + 20, 0); } public void imageMultiplication() { // Please write your code after this line ColorImage image1 = new ColorImage(); ColorImage image2 = new ColorImage(); ColorImage image3 = image1.multiply(image2); int height; if (image1.getHeight() > image2.getHeight()) { height = image1.getHeight(); } else { height = image2.getHeight(); } Canvas canvas = new Canvas(3 * image1.getWidth() + 20, height); canvas.add(image1); canvas.add(image2, image1.getWidth() + 10, 0); canvas.add(image3, 2 * image1.getWidth() + 20, 0); } public void changeColor() { ColorImage image = new ColorImage(); image.increaseRed(40); Canvas canvas = new Canvas(image.getWidth(), image.getHeight()); canvas.add(image); //image.save(); } }
[ "dennis.reed.gibson@gmail.com" ]
dennis.reed.gibson@gmail.com
56ac438f0a2f9bacff07aa4f458449d9ae0eade7
b07048160d3263ea3307a0bd5250c6942df8c020
/plusmall-business-web/src/main/java/com/plusmall/business/controller/ItemCatController.java
0af3ca0b19b352244a09f7e7826b982680cd5e94
[]
no_license
SteveChiru/PlusMall
42fbf7c32d5626ed206c440bc5eecf3dac76e27f
87c1d1977ba8ce39094d06e6e74d2c72c48ec893
refs/heads/master
2020-04-21T11:13:43.966128
2019-04-04T02:52:10
2019-04-04T02:52:10
169,516,299
0
0
null
null
null
null
UTF-8
Java
false
false
1,257
java
package com.plusmall.business.controller; import com.alibaba.dubbo.config.annotation.Reference; import com.plusmall.business.ItemCatService; import com.plusmall.commons.PageResult; import com.plusmall.model.TbItemCat; import org.apache.log4j.Logger; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; /** * @Description: */ @RestController @RequestMapping("/itemcat") public class ItemCatController { private static Logger logger = Logger.getLogger(ItemCatController.class); private static String logStr = "进入ItemCatController-"; private static PageResult pageResult; @Reference private ItemCatService itemCatService; @RequestMapping("/searchByParentId") public PageResult searchByParentId(Long parentId){ logger.info(logStr+"searchByParentId方法"); return itemCatService.searchByParentId(parentId); } @RequestMapping("/findOne") public TbItemCat findOne(Long id){ logger.info(logStr+"findOne方法"); return itemCatService.findOne(id); } @RequestMapping("/findAll") public List<TbItemCat> findAll(){ logger.info(logStr+"findAll方法"); return itemCatService.findALl(); } }
[ "cqr151623@163.com" ]
cqr151623@163.com
7087c8c592919ff94b8dd0a4eb7ae2c9976d8b89
36a6e511527d5d474e657f13c87c54376a768347
/src/client/ClientSend.java
076cef6739d93946ab138b8eb26ae5427f8cb5c3
[]
no_license
YuZhiDongHaHa/chatroom
93673a94532c3880393da6ca9fd7c84295bc2836
55b9e14d0b91a397629a4b8992a8aac185952997
refs/heads/master
2020-05-29T15:57:35.662229
2019-06-04T14:15:40
2019-06-04T14:15:40
189,236,303
0
0
null
null
null
null
UTF-8
Java
false
false
560
java
package client; import java.io.IOException; import java.io.PrintWriter; import java.net.Socket; import java.util.Scanner; public class ClientSend implements Runnable { private Socket socket; public ClientSend(Socket socket) { this.socket = socket; } public void run() { String message; Scanner sc = new Scanner(System.in); try { PrintWriter pw = new PrintWriter((socket.getOutputStream()), true); while (true) { pw.println(sc.nextLine()); } } catch (IOException e) { e.printStackTrace(); } } }
[ "565192393@qq.com" ]
565192393@qq.com
167ffb5abacd5440153c9a5bfe611a2e8bb98567
a9d49bd7efdae1a4f1a8ec114338cef12ccdda40
/commons/commons-util/src/main/java/com/cm/cloud/commons/util/DateUtils.java
584da97a2f9730fc206f1aa18e04723edb751a41
[]
no_license
chenmin0519/cloud_study
7bfb31cb1ececd3e582f08388ffcc876ceccf439
207bfa53b5bb132f3ef79dffd551de4e2e992f2f
refs/heads/master
2023-07-03T08:18:18.441710
2021-08-05T08:53:55
2021-08-05T08:53:55
381,894,161
1
0
null
null
null
null
UTF-8
Java
false
false
431
java
package com.cm.cloud.commons.util; import java.util.Calendar; import java.util.Date; public class DateUtils { /** * 获取时间间隔日期 * @param date * @param day 天数 * @return */ public static Date getDay(Date date, Integer day){ Calendar now = Calendar.getInstance(); now.setTime(date); now.add(Calendar.DAY_OF_MONTH, day); return now.getTime(); } }
[ "18874830336@163.com" ]
18874830336@163.com
05315c2834c7dbbee1e5b1cdaefaa4aa08552bd0
74ea60e7b20df6f7b7c92814fc6c919412c064e4
/04_React/src/main/java/com/phoenix/projects/react/security/SecurityConfiguration.java
c4c41c27087f4f273f00d25d14aa1d87035940d8
[]
no_license
Zero0ut/java
1e3deb84c0262b60e381f06aa355da902dbd0bd4
ef874013e658a41537d719872c283ee34740a960
refs/heads/master
2022-09-13T00:09:54.149344
2020-03-19T16:35:57
2020-03-19T16:35:57
171,308,889
0
0
null
null
null
null
UTF-8
Java
false
false
666
java
package com.phoenix.projects.react.security; //import org.springframework.context.annotation.Configuration; //import org.springframework.security.config.annotation.web.builders.HttpSecurity; //import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; //import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; //@Configuration //@EnableWebSecurity //public class SecurityConfiguration extends WebSecurityConfigurerAdapter { // @Override // protected void configure(HttpSecurity http) throws Exception{ // http.authorizeRequests().antMatchers("/").permitAll(); // } //}
[ "alex.kpc@gmail.com" ]
alex.kpc@gmail.com
6ac2783382f83c34e1f97c91586de5c0aa8acc62
0e0ee3710c3b4e05a5b0c0375d97c2bae3fa21e5
/TextElements.java
f67f3a439761be7e8ab36d0b4c04c61db7d12156
[]
no_license
OlgaDergachova/pvt-automation
2bc8a3d76c66395f12a5e6f8447b522095f71d7b
244b2f2fd5eca4f43c872f499a66f6d8660ac8c7
refs/heads/master
2020-03-23T05:52:38.601204
2018-07-23T17:15:59
2018-07-23T17:15:59
141,172,387
0
0
null
2018-07-23T17:16:00
2018-07-16T17:50:47
Java
UTF-8
Java
false
false
845
java
package text; public abstract class TextElements { private String element; public TextElements(String element) { this.element = element; } public String getElement() { return element; } public void setElement(String element) { this.element = element; } public abstract String[] divideTextElement(); public abstract void appendElements(String[] elements); @Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; TextElements that = (TextElements) o; return element != null ? element.equals(that.element) : that.element == null; } @Override public int hashCode() { return element != null ? element.hashCode() : 0; } @Override public String toString() { return "TextElements{" + "element='" + element + '\'' + '}'; } }
[ "dergachova.olya@gmail.com" ]
dergachova.olya@gmail.com
86dd6d5329e7460709f53a0126037053f023f295
8447a1753e32ade8cfb221e599f1cbc01fba190e
/LoginWithFB_Android/app/src/main/java/com/iamvickyav/jarvis/googlesignin/SecondActivity.java
526b752072999f1ad6cb488d392727d4eb972f13
[]
no_license
iamvickyav/Android-samples-for-beginners
a78b420d3f097332a2ba49cb4b08467544c7be0e
9018ff1a7b3dd6123b1c64adb214afebf3449456
refs/heads/master
2022-12-23T15:16:23.192140
2020-09-20T06:47:22
2020-09-20T06:47:22
297,017,352
0
0
null
null
null
null
UTF-8
Java
false
false
746
java
package com.iamvickyav.jarvis.googlesignin; import android.content.Intent; import android.os.Bundle; import android.os.PersistableBundle; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.widget.Toast; public class SecondActivity extends AppCompatActivity { @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.second); Intent intent = getIntent(); if(intent != null) { FBResponse fbResponse = (FBResponse) intent.getSerializableExtra("fb_response"); Toast.makeText(this, fbResponse.toString(), Toast.LENGTH_LONG).show(); } } }
[ "vickyavw.10@gmail.com" ]
vickyavw.10@gmail.com
3cc8f474b6784aef33764f71e6ffaebb69306251
beefe4c79a4119fabf6c716e440c22ec08971a61
/java/Core/src/test/java/com/devexpress/logify/alert/core/collectors/JvmMemoryCollectorTests.java
6836d33322eb109caa6b64cf6187d1ddca05794e
[ "LicenseRef-scancode-warranty-disclaimer" ]
no_license
DevExpress/Logify.Alert.Clients
dd6cfe2e861ed2c3983ed1723f33e6c462d3019c
f753d102d89531e30e7cb3a2de25265c7b09eee5
refs/heads/develop
2023-07-22T04:30:50.311859
2020-08-24T13:17:39
2020-08-24T13:17:39
75,168,865
75
21
NOASSERTION
2021-01-29T19:54:27
2016-11-30T08:53:23
C#
UTF-8
Java
false
false
889
java
package com.devexpress.logify.alert.core.collectors; import com.google.gson.JsonObject; import org.junit.Test; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; public class JvmMemoryCollectorTests extends CollectorTestsBase { @Test public void testJvmMemoryCollecting() { new JvmMemoryCollector().process(null, logger); String memoryPattern = "^\\d+? Mb$"; JsonObject memory = parseJsonReport(true).getAsJsonObject("memory of JVM"); assertNotNull(memory); assertTrue(memory.get("totalMemory").getAsString().matches(memoryPattern)); assertTrue(memory.get("freeMemory").getAsString().matches(memoryPattern)); assertTrue(memory.get("usedMemory").getAsString().matches(memoryPattern)); assertTrue(memory.get("totalVirtualMemory").getAsString().matches(memoryPattern)); } }
[ "grigoriy.vakhmistrov@devexpress.com" ]
grigoriy.vakhmistrov@devexpress.com
e5cdf707dc5baa67edaa00d3ca4888d9f92ece14
ec9442682e2ec1528a0ed33af2023cf27187a279
/coreJava/arrays/oneD/MaximumInArray.java
2d2086cbea3929c427aae784ea4b798041b5c9e9
[ "MIT" ]
permissive
Sandip75/Programming-in-Java
f45443544f83cfaabf3ba46e9b8130b03ad3f7b6
8d785e6bf707b83de047f09a5600ef2e7229031e
refs/heads/master
2020-03-27T19:48:05.838508
2019-02-18T20:21:07
2019-02-18T20:21:07
147,012,161
12
11
null
2018-10-27T18:51:25
2018-09-01T15:56:04
Java
UTF-8
Java
false
false
544
java
package coreJava.arrays.oneD; import java.util.*; public class MaximumInArray { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int n = scanner.nextInt(); int[] arr = new int[n]; for (int i = 0; i < arr.length; i++) { arr[i] = scanner.nextInt(); } int ans = maxValueInArray(arr); System.out.println(ans); } public static int maxValueInArray(int[] arr) { int max = arr[0]; for (int i = 1; i < arr.length; i++) { if (max < arr[i]) { max = arr[i]; } } return max; } }
[ "sk1957339@gmail.com" ]
sk1957339@gmail.com
2abef656e3b6437ebd8554a9dece7c8d139b2af4
9b62639c399bdb6daa73c37b72b829ecdc4c4108
/service-zuul/src/main/java/com/cloud/ServiceZuulApplication.java
3a6add1d418b0e0e652ba2cfed62df595e491c06
[]
no_license
seapeak007/spring-cloud-learn
4b27ab218d5e4bfd95f2cfb5ee78f48a7f07c997
c740cb38f257dd2d1eb09ba286d4e64c6e68257a
refs/heads/master
2021-01-19T21:21:26.504820
2017-08-29T08:36:48
2017-08-29T08:36:48
101,249,949
0
0
null
null
null
null
UTF-8
Java
false
false
721
java
package com.cloud; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.netflix.eureka.EnableEurekaClient; import org.springframework.cloud.netflix.zuul.EnableZuulProxy; /** * Zuul的主要功能是路由转发和过滤器。路由功能是微服务的一部分, * 比如/api/user转发到到user服务,/api/shop转发到到shop服务。 * zuul默认和Ribbon结合实现了负载均衡的功能。 */ @SpringBootApplication @EnableEurekaClient @EnableZuulProxy public class ServiceZuulApplication { public static void main(String[] args) { SpringApplication.run(ServiceZuulApplication.class, args); } }
[ "qijianmin@lexue.com" ]
qijianmin@lexue.com
b02da1a1bf34132613914b5736d1ee55b81a7998
12a68a05437364394fedc6c403255384cef6ea0a
/src/main/java/com.example/lombok/restTemplateExt/FilterRestTemplate.java
afaf10c40b47d6170ac065439be45d71d0e9d56b
[]
no_license
weChatYyq/startDemo01
b533f1e12306ea6dd8f440022334a4b88b16e46e
a619a5d0a73f2c563eb8faa8d7357c789ce0161f
refs/heads/master
2021-07-16T19:34:39.619567
2019-10-21T02:07:32
2019-10-21T02:07:32
215,918,339
0
0
null
2020-10-13T16:48:38
2019-10-18T01:41:46
Java
UTF-8
Java
false
false
369
java
package com.example.lombok.restTemplateExt; import lombok.AllArgsConstructor; import lombok.experimental.Delegate; import org.springframework.web.client.RestOperations; import org.springframework.web.client.RestTemplate; @AllArgsConstructor public class FilterRestTemplate implements RestOperations { @Delegate protected volatile RestTemplate restTemplate; }
[ "yyqhwr@163.com" ]
yyqhwr@163.com
140ce080fceea8d296e9fde6c1195e0cabc27987
b1853ce2e77fdaf5ad6bb1ef72295a71c7c04bf9
/app/src/main/java/com/shuzhengit/zhixin/WBShareActivity.java
cc930f45da6cf73c8cf6eee82279bd1daebc38ed
[]
no_license
lyttlytt/zhixin
c6ea1e603ff1d3f90dfff820d00def2e83ba8756
2d4653f445dced01852ac515e67bf86ec68eb11a
refs/heads/master
2020-03-25T07:03:31.541949
2018-08-04T15:17:16
2018-08-04T15:17:16
143,539,157
0
0
null
null
null
null
UTF-8
Java
false
false
260
java
package com.shuzhengit.zhixin; //import com.umeng.socialize.media.WBShareCallBackActivity; import com.umeng.socialize.media.WBShareCallBackActivity; /** * Created by wangfei on 15/12/3. */ public class WBShareActivity extends WBShareCallBackActivity { }
[ "1286235481@qq.com" ]
1286235481@qq.com
e549befdde05ce9fc0c7e552f986ea14661de881
dcc3e115a232d3869b7b26e45ed7d1969b83a057
/src/test/java/com/example/reactivelinkshortner/LinkControllerTest.java
dcd77eaf2a61e92ea0d537a87f61a9dc0be3db5f
[]
no_license
slipkool/spring-reactive-redis-link-shortner
f31e0399f71d4b3ac1511bf32b1f3a9e369a5736
678da9f8b68fe5f02b94455bd925d4b364771936
refs/heads/master
2020-12-15T04:19:13.035536
2020-01-20T01:33:02
2020-01-20T01:33:02
234,992,925
0
0
null
null
null
null
UTF-8
Java
false
false
1,912
java
package com.example.reactivelinkshortner; import org.assertj.core.api.Assertions; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mockito; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest; import org.springframework.boot.test.mock.mockito.MockBean; import org.springframework.http.MediaType; import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.web.reactive.server.WebTestClient; import reactor.core.publisher.Mono; @RunWith(SpringRunner.class) @WebFluxTest(controllers = LinkController.class) public class LinkControllerTest { @Autowired private WebTestClient webTestClient; @MockBean LinkService linkService; @Test public void shortensLink(){ Mockito.when(linkService.shortenLink("https://spring.io/")).thenReturn(Mono.just("http://localhost:8080/aass2211")); webTestClient.post() .uri("/link") .contentType(MediaType.APPLICATION_JSON) .bodyValue("{\"link\":\"https://spring.io/\"}") .exchange() .expectStatus() .is2xxSuccessful() .expectBody() .jsonPath("$.shortenedLink") .value(val -> Assertions.assertThat(val).isEqualTo("http://localhost:8080/aass2211")); } @Test public void redirectoToOriginalLink(){ Mockito.when(linkService.getOriginalLink("aaa21123")).thenReturn(Mono.just(new Link("https://spring.io/", "aaa21123"))); webTestClient.get() .uri("/aaa21123") .exchange() .expectStatus() .isPermanentRedirect() .expectHeader() .value("Location", location -> Assertions.assertThat(location).isEqualTo("https://spring.io/")); } }
[ "alexandermartinez0426@gmail.com" ]
alexandermartinez0426@gmail.com
68faf8396e723d495c8920e3bfd3248771fc81c1
ff1a5ef7ce61043466cc6af383b132855a917013
/app/src/main/java/unicauca/movil/parkinapp/database/CalificacionesDao.java
3915987db26b5144bcf639ad242d7d7856f4e65c
[]
no_license
natamunoz19/ParkinApp
7b0f7ea924584842fccdf5c0f2b467c687a0b275
d58948cd0e1e09f223aba2b0815feb3293c3ac08
refs/heads/master
2021-01-13T14:44:42.481944
2016-12-16T13:50:40
2016-12-16T13:50:40
76,609,359
0
0
null
null
null
null
UTF-8
Java
false
false
2,299
java
package unicauca.movil.parkinapp.database; import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import java.util.ArrayList; import java.util.List; /** * Created by Natic_000 on 12/12/2016. */ public class CalificacionesDao { static final String TABLE = "calificacion"; static final String C_IDUSER = "idUsuario"; static final String C_IDPARQ = "idParqueadero"; static final String C_CALIF = "calificacion"; SQLiteDatabase db; public CalificacionesDao(Context context){ DataBaseHelper helper = new DataBaseHelper(context); db = helper.getWritableDatabase(); } public void insert(long idU,long idP, double calif){ ContentValues values = new ContentValues(); values.put(C_IDUSER, idU); values.put(C_IDPARQ, idP); values.put(C_CALIF, calif); db.insert(TABLE, null, values); } public void delete(long id){ db.delete(TABLE,"idParqueadero = ?", new String[]{""+id}); } public void deleteAll(){ db.delete(TABLE,null,null); } public List<String> list(){ String sql = "SELECT * FROM "+TABLE; return cursorToList(sql); } public List<String> listCalif(){ String sql = "SELECT * FROM "+TABLE; return cursorToListCalif(sql); } private List<String> cursorToList(String sql){ Cursor cursor = db.rawQuery(sql, null); List<String> data = new ArrayList<>(); while (cursor.moveToNext()){ String u = String.valueOf(cursor.getLong(2)); data.add(u); } return data; } private List<String> cursorToListCalif(String sql){ Cursor cursor = db.rawQuery(sql, null); List<String> data = new ArrayList<>(); while (cursor.moveToNext()){ String u = String.valueOf(cursor.getLong(3)); data.add(u); } return data; } public double getById(long id){ String sql = "SELECT * FROM "+ TABLE+" WHERE idParqueadero = "+id; Cursor cursor = db.rawQuery(sql, null); if(cursor.getCount() > 0){ return cursor.getDouble(3); }else return 100; } }
[ "angynm@unicauca.edu.co" ]
angynm@unicauca.edu.co
ccfb37a9ce055939d95802019621901353b3b9ab
f37ace45077bb3df52cc16c65a98a564e4d2f329
/Wlqz_Common/src/main/java/com/qzwl/common/util/FileUtils.java
c650b7f5b3b2419a43e3cb4dc5bd3633622f5d7d
[]
no_license
yaoshuoshenme/wanliqianzhuang
c910561fcbf687799d56e01b714f4c9cf011311f
372c1cbb71194ec071b4c8543929957966bae24c
refs/heads/master
2020-03-28T04:14:13.593937
2018-09-14T13:09:29
2018-09-14T13:09:29
147,702,262
0
0
null
null
null
null
UTF-8
Java
false
false
1,420
java
/** * @Title: FileUtils.java * @Package com.qfedu.common.utils * @Description: TODO(用一句话描述该文件做什么) * @author Feri * @date 2018年5月29日 * @version V1.0 */ package com.qzwl.common.util; import java.io.File; import java.text.SimpleDateFormat; import java.util.Date; import java.util.UUID; /** * @Title: FileUtils.java * @Package com.qfedu.common.utils * @Description: TODO(用一句话描述该文件做什么) * @author Feri * @date 2018年5月29日 * @version V1.0 * 文件工具类 */ public class FileUtils { //创建文件夹 一个月一个文件夹 public static File createDir(String dir) { //子文件名称:201805 201806 String month=new SimpleDateFormat("yyyyMM").format(new Date()); File dir1=new File(new File(dir).getParent(),"xiaomiimages"); File dir2=new File(dir1,month) ; if(!dir2.exists()) { dir2.mkdirs(); } return dir2; } //创建唯一名称 public static String createFileName(String fn) { if(fn.length()>30) { fn=fn.substring(fn.length()-30); } return UUID.randomUUID().toString()+"_"+fn; } public static File createDir(String root,String dir) { //子文件名称:201805 201806 String month=new SimpleDateFormat("yyyyMM").format(new Date()); File dir1=new File(new File(root).getParent(),"tickresource"+File.separator+dir); if(!dir1.exists()) { dir1.mkdirs(); } return dir1; } }
[ "946863181@qq.com" ]
946863181@qq.com
0095f3a054f714c17ac011630f67a05cb9866b4f
14ad7ddf2e1513cc82fceeb46f9458e87710165e
/src/main/java/com/tkapps/cursomc/resources/ClienteResource.java
f67e485a92951bd9396ea93870dcc1a777686c04
[]
no_license
thiagosmartinsdev/spring-boot-ionic-backend
d6b3246930f0a6368a7b62ad5d496aaeb3bfe629
6c32c2d89b6fcf071df442c6e3a29a2943bd5cb2
refs/heads/master
2022-12-04T09:02:17.410073
2020-08-27T01:17:29
2020-08-27T01:17:29
283,234,712
0
0
null
null
null
null
UTF-8
Java
false
false
843
java
package com.tkapps.cursomc.resources; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RestController; import com.tkapps.cursomc.domain.Cliente; import com.tkapps.cursomc.services.ClienteService; @RestController @RequestMapping(value="/clientes" ) public class ClienteResource { @Autowired private ClienteService service; @RequestMapping(value="/{id}", method=RequestMethod.GET) public ResponseEntity<Cliente> find(@PathVariable Integer id) { Cliente obj = service.find(id); return ResponseEntity.ok().body(obj); } }
[ "thiagomartinsseg@gmail.com" ]
thiagomartinsseg@gmail.com
3e30b74d6bc28210921f07c13fca2f2164692b51
cb4035e0414c43036a731f773ca782c2ae7e24cf
/Demo21/src/DuoTai/FriendTest.java
b03581ea362025c61c4573e5668b3256d67e4ebf
[]
no_license
bainan224/Java-code
9a380feba4bf4021fc1a8de4f759d7ecb0b00df2
f6d2b88f47933e1c874ee2d6eeb132c004cd62d0
refs/heads/master
2022-12-12T07:55:57.988921
2020-09-20T09:49:46
2020-09-20T09:49:46
297,044,344
0
0
null
null
null
null
GB18030
Java
false
false
451
java
package DuoTai; public class FriendTest { public static void main(String[] args) { Friend friend1 = new ChineseFriend("无名","中国"); friend1.sayHello(); System.out.println("----------------"); Friend friend2 = new ForeignFriend("Denial","America"); friend2.sayHello(); Host host = new Host("芳华"); host.Serving(friend1, "汉语", "八宝饭"); host.Serving(friend2, "American English", "Piazz"); } }
[ "2403906364@qq.com" ]
2403906364@qq.com
8d1d8bd4b96e9119203055576708306a825dcd3a
99e7bffd58833a56e46cb736b33d853e208975db
/src/com/mprog/Ear.java
358dcf6dd506e67543ea1e34929de6231fd6ebfa
[]
no_license
Munir-prog/patternFlyWeight
57c746f1d0f71c6d717baaf4bcc11d7a34e85832
50112048441263513c653e9a6479c3bd569bdb59
refs/heads/main
2023-05-01T10:17:43.321121
2021-05-29T10:46:24
2021-05-29T10:46:24
371,947,226
0
0
null
null
null
null
UTF-8
Java
false
false
327
java
package com.mprog; import java.awt.*; public class Ear/*Колос*/ { private int x; private int y; private EarType type; public Ear(int x, int y, EarType type) { this.x = x; this.y = y; this.type = type; } public void draw(Graphics g) { type.draw(g, x, y); } }
[ "munirprog@gmail.com" ]
munirprog@gmail.com
a5c6ca412dd85f94bed906d98f6d288081b84c84
1081aa8d04f2c956bcd9cf149a52200a4703eeb2
/app/src/main/java/inc/gb/cp20/RecylerView/ThumbnailAdpForSearch.java
42616371db924bf4e2dfe53bfa1b8f0cf5c54964
[]
no_license
gb17/CP2.0
7640b87383c2d04f2ec39718638bf3014b2eaab4
0e30dd21f83ab8f4800a5c4e0246382eeea890ec
refs/heads/master
2021-01-10T11:16:42.219354
2016-04-16T15:04:21
2016-04-16T15:04:21
54,020,127
0
0
null
null
null
null
UTF-8
Java
false
false
7,294
java
package inc.gb.cp20.RecylerView; import android.app.Activity; import android.content.Context; import android.content.Intent; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.graphics.Typeface; import android.net.Uri; import android.support.v4.app.FragmentManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import android.widget.Toast; import org.apache.commons.io.FilenameUtils; import java.io.File; import java.util.List; import inc.gb.cp20.ContentLib.ContentLibrary; import inc.gb.cp20.DB.DBHandler; import inc.gb.cp20.Models.SearchData; import inc.gb.cp20.R; import inc.gb.cp20.interfaces.RecyclerViewClickListener; /** * Created by GB on 3/18/16. */ public class ThumbnailAdpForSearch extends RecyclerView.Adapter<ThumbnailAdpForSearch.MyViewHolder> { private static RecyclerViewClickListener itemListener; public List<SearchData> brandList; static Typeface font; static Context mContext; FragmentManager fragmentManager; static DBHandler dbHandler; Bitmap bitmap; public ThumbnailAdpForSearch(List<SearchData> brandList, Context mContext, FragmentManager fragmentManager, RecyclerViewClickListener itemListener) { this.brandList = brandList; this.mContext = mContext; this.fragmentManager = fragmentManager; this.itemListener = itemListener; font = Typeface.createFromAsset(mContext.getAssets(), "fontawesome-webfont.ttf"); dbHandler = DBHandler.getInstance(mContext); } public static class MyViewHolder extends RecyclerView.ViewHolder { public TextView title, brandname, pagename, newTag; ImageView imageView; public MyViewHolder(View view) { super(view); title = (TextView) view.findViewById(R.id.title); imageView = (ImageView) view.findViewById(R.id.bandimage); newTag = (TextView) view.findViewById(R.id.newtag); brandname = (TextView) view.findViewById(R.id.brand_name); pagename = (TextView) view.findViewById(R.id.page_name); } public void bind(final SearchData brandList, final int Position_) { imageView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (brandList.getPageNamee().toLowerCase().contains("mp4")) { ((ContentLibrary) mContext).onRefrenceClickFromSrch(brandList); } else if (brandList.getPageNamee().contains("pdf")) { String path1 = mContext.getFilesDir().getAbsolutePath() + "/" + brandList.getPageNamee(); File file1 = new File(path1); if (file1.exists()) { file1.setReadable(true, false); Intent intent = new Intent(Intent.ACTION_VIEW); intent.setDataAndType(Uri.fromFile(file1), "application/pdf"); try { ((Activity) mContext).startActivityForResult(intent, 1001); } catch (Exception e) { System.out.println("PDF Exception = = = >" + e.toString()); } } else { Toast.makeText(mContext, "Please wait PDF being downloaded.....", Toast.LENGTH_SHORT) .show(); } } else { String pos = "0"; String[][] playstData = dbHandler.genericSelect("select a.COL5, a.COL2, b.COL1, b.COL2, b.COL3, b.COL5, b.COL16, a.COL11 from TBDPS a , TBDPG b\n" + " where a.col5 = b.col0\n" + " and a.COL3 = '" + brandList.getBrand_code() + "' and a.COL9 = '" + brandList.getCat_Type() + "' and a.COL10 = 'IPL' and b.COL7 = '1' order by CAST (a.col2 AS INTEGER) ASC ", 8); if (playstData != null) for (int i = 0; i < playstData.length; ++i) { for (int j = 0; j < playstData[i].length; ++j) { if (brandList.getPageCode().equals(playstData[i][0])) { pos = i + ""; break; } } } Intent intent = new Intent(); intent.putExtra("category_code", brandList.getBrand_code()); intent.putExtra("category_name", brandList.getCat_Type()); intent.putExtra("page_number", pos); intent.putExtra("index_lib", "4"); ((Activity) mContext).setResult(Activity.RESULT_OK, intent); ((Activity) mContext).finish(); } } }); } } @Override public MyViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View itemView = LayoutInflater.from(parent.getContext()) .inflate(R.layout.tumbnail_item_search, parent, false); return new MyViewHolder(itemView); } @Override public void onBindViewHolder(MyViewHolder holder, int position) { SearchData tbdpg = brandList.get(position); if (!tbdpg.getPageNamee().equals("")) holder.title.setText(tbdpg.getPageNamee()); else holder.title.setVisibility(View.GONE); if (!tbdpg.getSubpageName().equals("")) holder.pagename.setText(tbdpg.getSubpageName()); else holder.pagename.setVisibility(View.GONE); if (!tbdpg.getCat_Name().equals("")) holder.brandname.setText(tbdpg.getCat_Name()); else holder.brandname.setVisibility(View.GONE); String filePath = new File(mContext.getFilesDir() + "/" + FilenameUtils.removeExtension(tbdpg.getImagePath()) + "/", FilenameUtils.removeExtension(tbdpg.getImagePath()) + ".png").getAbsolutePath(); if (tbdpg.getPageNamee().toLowerCase().contains("mp4")) { holder.imageView.setScaleType(ImageView.ScaleType.CENTER); holder.imageView.setImageResource(R.drawable.vdoicon); } else if (tbdpg.getPageNamee().toLowerCase().contains("pdf")) { holder.imageView.setScaleType(ImageView.ScaleType.CENTER); holder.imageView.setImageResource(R.drawable.pdficon); } else { bitmap = BitmapFactory.decodeFile(filePath); holder.imageView.setImageBitmap(bitmap); if (bitmap == null) holder.imageView.setImageResource(R.drawable.page); } holder.bind(brandList.get(position), position); } @Override public int getItemCount() { return brandList.size(); } }
[ "gaurav.b@cirrius.com" ]
gaurav.b@cirrius.com
40910ba76287d09e1b265b39bfbf96820c40d6b7
4db068b3a622b4d5097c08dee09527e6c8cc4af9
/WebGISApplicationClientGeoTools/src/main/java/com/webgisapplicationclientgeotools/services/util/Utils.java
158c59012d429183e34f05a616b2283ad1014909
[]
no_license
NegreaAlexandruCristian/Lucrare-Licenta
349b98582184adff6a6c96c6f76147982d62a516
6979d53baa715bee565002fc0055db06c33cc2df
refs/heads/main
2023-06-04T05:42:54.932431
2021-06-22T21:12:29
2021-06-22T21:12:29
321,042,522
0
0
null
null
null
null
UTF-8
Java
false
false
426
java
package com.webgisapplicationclientgeotools.services.util; import org.springframework.stereotype.Component; import java.util.Map; @Component public class Utils { public static final Map<Integer,String> types = Map.ofEntries( Map.entry(1,"hospital"), Map.entry(2,"bus-stop"), Map.entry(3,"pharmacy"), Map.entry(4,"school"), Map.entry(5,"university") ); }
[ "alexandru.negrea98@e-uvt.ro" ]
alexandru.negrea98@e-uvt.ro
21fcf21a7051622faff6fa15c83f4aa8e9046854
03bad84313237eee33e1c7b2fb49aed4fb43d0c4
/src/test/java/br/com/projetojhipster/IntegrationTest.java
011237bb5df40a2d33f441d4acfaf670a1519ad0
[]
no_license
JhonMarques/jhipster-sample-application
35fd3c5009649cc6ed9e2a3a9a27ee4483fa5298
8ce2276b08dfafcc6b00f601b5c8620a3de9c075
refs/heads/main
2023-06-03T01:41:17.330904
2021-06-21T20:57:38
2021-06-21T20:57:38
379,060,853
0
0
null
null
null
null
UTF-8
Java
false
false
538
java
package br.com.projetojhipster; import br.com.projetojhipster.JhipsterSampleApplicationApp; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import org.springframework.boot.test.context.SpringBootTest; /** * Base composite annotation for integration tests. */ @Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME) @SpringBootTest(classes = JhipsterSampleApplicationApp.class) public @interface IntegrationTest { }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
237f2f2c024939410284b69aa9a054e429b0efb8
1cea724eaa824c7973d295448290b825ea856d1e
/src/main/java/com/cignex/service/UserService.java
d97a5687bcdf6fe2fbf25d75c3f15e56967d4154
[]
no_license
pinalp887/JwtAuthenticationWithRoleBase
c4b67901f653f39cb8344a356f8e85d1ca3f19ed
9e8688ad53a38a22fef2d9a7c4486ebd3c470dbf
refs/heads/master
2020-06-26T07:38:07.521799
2019-07-30T04:59:41
2019-07-30T04:59:41
199,573,771
0
0
null
null
null
null
UTF-8
Java
false
false
385
java
package com.cignex.service; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.cignex.entity.User; import com.cignex.repository.UserRepository; @Service public class UserService { @Autowired private UserRepository repository; public User findByName(String name) { return repository.findByName(name); } }
[ "pinal.sheradiya@CIGNEXDATAMATICS.COM" ]
pinal.sheradiya@CIGNEXDATAMATICS.COM
4fadeb7fea84f2e2b528048cb8dc1b565e3e556b
86915cc1f3bd9623be7bbab0b470fcabd0287442
/src/br/edu/fatecfranca/list4/e2/Passenger.java
3d2df1f33a761e233a87798f08cdb6d5bd8d2de7
[ "MIT" ]
permissive
scalone/oop-java
e637350687bde7c2cff789f8c6321ba528f08c6a
6b5aed911a7b168d78db8f6f633b2b47eded1d30
refs/heads/master
2020-05-17T14:28:02.919717
2015-06-10T02:57:13
2015-06-10T02:57:13
32,783,446
0
0
null
null
null
null
UTF-8
Java
false
false
556
java
package br.edu.fatecfranca.list4.e2; public class Passenger { private int place; private String name; public Passenger(int place, String name) { this.place = place; this.name = name; } public Passenger() { this(10, "Daniel"); } public int getPlace() { return this.place; } public void setPlace(int place) { this.place = place; } public String getName() { return this.name; } public void setName(String name) { this.name = name; } public String show() { return "Place: " + this.place + "; Name: " + this.name; } }
[ "thiago@scalone.com.br" ]
thiago@scalone.com.br
4f39166dcdca4dc1141de517b5d6f6f3b2f27737
68c02503b49a2fa480eaea2d14a068bc3c8615cd
/src/main/java/br/horus/paginas/base/BasePage.java
d5626b0ef72f553c61c29f78e2beb26996cb6900
[ "Apache-2.0" ]
permissive
pedroppinheiro/horus
082031917c90bdce8b28ee3ab32adf3b3a512e9c
1b096fde6a6593b1d7e1ba438816b87f3a7c4d01
refs/heads/master
2022-12-06T17:26:40.029543
2019-10-11T01:42:20
2019-10-11T01:42:20
214,319,021
0
0
Apache-2.0
2022-11-24T06:43:50
2019-10-11T01:41:41
Java
UTF-8
Java
false
false
2,049
java
package br.horus.paginas.base; import java.util.logging.Level; import java.util.logging.Logger; import org.openqa.selenium.JavascriptException; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.ui.ExpectedConditions; import br.horus.driver.DriverVO; import br.horus.paginas.DominioPaginas; import br.horus.paginas.LoginPage; /** * Este classe pode ser usada para armazenar métodos que representam ações * em comum a toda a aplicação a ser testada. Todas as classes que representam * páginas ou elementos podem herdar desta classe, * se não deverá herdar da classe PageObjectBase * @author pedro * */ public abstract class BasePage extends PageObjectBase { private static final Logger LOGGER = Logger.getLogger(BasePage.class.getName()); // @FindBy(id = "linkSair") public WebElement linkSair; // @FindBy(id = "sim") public WebElement simBtn; // @FindBy(id = "modalAguarde") public WebElement modalAguarde; // public BasePage(DriverVO driverVO) { super(driverVO); } // public LoginPage logoff(DriverVO driverVO) { // linkSair.click(); // simBtn.click(); // return new LoginPage(driverVO); // } public String getURL() { return getWebDriver().getCurrentUrl(); } // /** // * Disponibiliza o select tradicional para que o selenium consiga interagir corretamente com o elemento // */ // public void habilitarSelects() { // waitAndExecuteScript(1000, "$('select').closest('div').removeClass('ui-helper-hidden-accessible')"); // } public void acessarURL(String url) { getWebDriver().get(url); } public BasePage acessarPagina(DominioPaginas dominioPagina) { LOGGER.log(Level.FINE, "Tentando acessar a página {0}", dominioPagina); // lógica para acessar as paginas // pode ser colocada aqui se for algo mais genérico // ou pode ser sobrescrita nas subclasses LOGGER.log(Level.FINE, "Página carregada"); return dominioPagina.getPagina(getDriverVO()); } }
[ "pedrovictor.pinheiro@gmail.com" ]
pedrovictor.pinheiro@gmail.com
4ce22872740aa1f3fbfce96985c81c41de740c15
ec095dfa2eecfd47a34162a7927813cf4e52dfff
/bookstore/bookstorecore/src/my/bookstore/core/event/OrderCompletedEventListener.java
0e711213c871dd5a28e0809d53687f4d14126cc4
[]
no_license
christophct/treinamento_hybris
7ff96e0dc60363941cdf88ebeed1c6dbaacf40c2
eb063f13c710d87709f49b5fd97bfd02cc7ef00d
refs/heads/master
2021-08-29T20:44:53.467266
2017-12-15T01:51:07
2017-12-15T01:51:07
114,254,746
0
3
null
null
null
null
UTF-8
Java
false
false
2,751
java
/* * [y] hybris Platform * * Copyright (c) 2017 SAP SE or an SAP affiliate company. All rights reserved. * * This software is the confidential and proprietary information of SAP * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with SAP. */ package my.bookstore.core.event; import de.hybris.platform.acceleratorservices.site.AbstractAcceleratorSiteEventListener; import de.hybris.platform.basecommerce.model.site.BaseSiteModel; import de.hybris.platform.commerceservices.enums.SiteChannel; import de.hybris.platform.core.enums.OrderStatus; import de.hybris.platform.core.model.order.OrderModel; import de.hybris.platform.orderprocessing.events.OrderCompletedEvent; import de.hybris.platform.processengine.BusinessProcessService; import de.hybris.platform.servicelayer.model.ModelService; import de.hybris.platform.servicelayer.util.ServicesUtil; import org.springframework.beans.factory.annotation.Required; /** * Listener for order confirmation events. Code for sending an email is commented out. Add this process and uncomment to * use this. */ public class OrderCompletedEventListener extends AbstractAcceleratorSiteEventListener<OrderCompletedEvent> { private ModelService modelService; private BusinessProcessService businessProcessService; /** * @return the businessProcessService */ protected BusinessProcessService getBusinessProcessService() { return businessProcessService; } /** * @param businessProcessService * the businessProcessService to set */ @Required public void setBusinessProcessService(final BusinessProcessService businessProcessService) { this.businessProcessService = businessProcessService; } /** * @return the modelService */ protected ModelService getModelService() { return modelService; } /** * @param modelService * the modelService to set */ @Required public void setModelService(final ModelService modelService) { this.modelService = modelService; } @Override protected void onSiteEvent(final OrderCompletedEvent orderCompletedEvent) { final OrderModel orderModel = orderCompletedEvent.getProcess().getOrder(); orderModel.setStatus(OrderStatus.COMPLETED); getModelService().save(orderModel); } @Override protected SiteChannel getSiteChannelForEvent(final OrderCompletedEvent event) { final OrderModel order = event.getProcess().getOrder(); ServicesUtil.validateParameterNotNullStandardMessage("event.order", order); final BaseSiteModel site = order.getSite(); ServicesUtil.validateParameterNotNullStandardMessage("event.order.site", site); return site.getChannel(); } }
[ "christoph.ct@gmail.com" ]
christoph.ct@gmail.com
b46e0154dc79fa7e4b43e55fe1ebfbd19c6112e1
8d4fb46b8b8185b734af07e2300077b806e28753
/app/src/main/java/com/aengbee/android/leanback/presenter/CardPresenter.java
2cb53f7a81dc38d44efc5cf6258ec21d917d0ebd
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
xavaz/aengbee
d0039ae5dab6feb841bcf84309d3e5f82fd6de8c
df18938bad35a68b220e17f0e7ac4a00d81bdd1d
refs/heads/master
2020-05-22T03:19:17.021467
2017-07-08T17:34:38
2017-07-08T17:34:39
84,678,730
0
1
null
null
null
null
UTF-8
Java
false
false
4,231
java
/* * Copyright (c) 2015 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aengbee.android.leanback.presenter; import android.content.SharedPreferences; import android.content.res.Resources; import android.graphics.drawable.Drawable; import android.preference.PreferenceManager; import android.support.v17.leanback.widget.ImageCardView; import android.support.v17.leanback.widget.Presenter; import android.support.v4.content.ContextCompat; import android.view.ViewGroup; import com.bumptech.glide.Glide; import com.aengbee.android.leanback.R; import com.aengbee.android.leanback.model.Video; /* * A CardPresenter is used to generate Views and bind Objects to them on demand. * It contains an Image CardView */ public class CardPresenter extends Presenter { private int mSelectedBackgroundColor = -1; private int mDefaultBackgroundColor = -1; private Drawable mDefaultCardImage; @Override public ViewHolder onCreateViewHolder(ViewGroup parent) { mDefaultBackgroundColor = ContextCompat.getColor(parent.getContext(), R.color.default_background); mSelectedBackgroundColor = ContextCompat.getColor(parent.getContext(), R.color.selected_background); mDefaultCardImage = parent.getResources().getDrawable(R.drawable.movie, null); ImageCardView cardView = new ImageCardView(parent.getContext()) { @Override public void setSelected(boolean selected) { updateCardBackgroundColor(this, selected); super.setSelected(selected); } }; cardView.setFocusable(true); cardView.setFocusableInTouchMode(true); updateCardBackgroundColor(cardView, false); return new ViewHolder(cardView); } private void updateCardBackgroundColor(ImageCardView view, boolean selected) { int color = selected ? mSelectedBackgroundColor : mDefaultBackgroundColor; // Both background colors should be set because the view's // background is temporarily visible during animations. view.setBackgroundColor(color); view.findViewById(R.id.info_field).setBackgroundColor(color); } @Override public void onBindViewHolder(Presenter.ViewHolder viewHolder, Object item) { Video video = (Video) item; ImageCardView cardView = (ImageCardView) viewHolder.view; cardView.setTitleText(video.title); cardView.setContentText(video.description); if(video.category.equals("TJ")) cardView.setBadgeImage(viewHolder.view.getResources().getDrawable(R.drawable.ic_tj_128x128,null)); if(video.category.equals("KY")) cardView.setBadgeImage(viewHolder.view.getResources().getDrawable(R.drawable.ic_ky_128x128_3,null)); if (video.cardImageUrl != null) { // Set card size from dimension resources. Resources res = cardView.getResources(); int width = res.getDimensionPixelSize(R.dimen.card_width); int height = res.getDimensionPixelSize(R.dimen.card_height); cardView.setMainImageDimensions(width, height); Glide.with(cardView.getContext()) .load(video.cardImageUrl) .error(mDefaultCardImage) .into(cardView.getMainImageView()); } } @Override public void onUnbindViewHolder(Presenter.ViewHolder viewHolder) { ImageCardView cardView = (ImageCardView) viewHolder.view; // Remove references to images so that the garbage collector can free up memory. cardView.setBadgeImage(null); cardView.setMainImage(null); } }
[ "fytoz@hotmail.com" ]
fytoz@hotmail.com
b2be2c68f9b4a741317e0cf492a0bc1afeb2dbac
5b8f0cbd2076b07481bd62f26f5916d09a050127
/src/A1399.java
3e2214c0e8de930c6ec4533c039ab17caf6904a1
[]
no_license
micgogi/micgogi_algo
b45664de40ef59962c87fc2a1ee81f86c5d7c7ba
7cffe8122c04059f241270bf45e033b1b91ba5df
refs/heads/master
2022-07-13T00:00:56.090834
2022-06-15T14:02:51
2022-06-15T14:02:51
209,986,655
7
3
null
2020-10-20T07:41:03
2019-09-21T13:06:43
Java
UTF-8
Java
false
false
2,096
java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.Arrays; import java.util.StringTokenizer; /** * @author Micgogi * on 8/10/2020 7:52 PM * Rahul Gogyani */ public class A1399 { public static void main(String args[]) { FastReader sc = new FastReader(); int t = sc.nextInt(); while (t-- != 0) { int n = sc.nextInt(); int a[] = new int[n]; for (int i = 0; i < n; i++) { a[i] = sc.nextInt(); } Arrays.sort(a); boolean flag = false; if (a.length == 1) flag = true; else { for (int i = 1; i < a.length; i++) { if (a[i] - a[i - 1] <= 1) { flag = true; } else { flag = false; break; } } } if (flag) System.out.println("YES"); else System.out.println("NO"); } } static class FastReader { BufferedReader br; StringTokenizer st; public FastReader() { br = new BufferedReader(new InputStreamReader(System.in), 32768); } String next() { while (st == null || !st.hasMoreElements()) { try { st = new StringTokenizer(br.readLine()); } catch (IOException e) { e.printStackTrace(); } } return st.nextToken(); } int nextInt() { return Integer.parseInt(next()); } long nextLong() { return Long.parseLong(next()); } double nextDouble() { return Double.parseDouble(next()); } String nextLine() { String str = ""; try { str = br.readLine(); } catch (IOException e) { e.printStackTrace(); } return str; } } }
[ "rahul.gogyani@gmail.com" ]
rahul.gogyani@gmail.com
295af1d6f99d417ff493efd3767365ab51f3685e
08d042f33270954bb78c4f922c1b7d622f2d1ea4
/src/main/java/com/liewmanchoi/zheye/aspect/LogAspect.java
c164ac1485241bc8f37b38c516d081c314fce8e9
[]
no_license
liewmanchoi/zheye
f657502dad54c0db75e9d4a5a48a179f7667d4b0
a73d4e0d89964f758893a667e542d1863271b4f3
refs/heads/develop
2022-07-01T07:12:14.301345
2019-08-11T03:28:47
2019-08-11T03:28:47
184,584,427
0
0
null
2022-06-17T02:23:42
2019-05-02T13:18:04
null
UTF-8
Java
false
false
1,003
java
package com.liewmanchoi.zheye.aspect; import java.util.Date; import lombok.extern.slf4j.Slf4j; import org.aspectj.lang.JoinPoint; import org.aspectj.lang.annotation.After; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Before; import org.springframework.stereotype.Component; /** * @author wangsheng * @date 2019/5/16 */ @Aspect @Component @Slf4j public class LogAspect { @Before("execution(* com.liewmanchoi.zheye.controller.*Controller.*(..))") public void beforeMethod(JoinPoint joinPoint) { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("args: "); for (Object arg : joinPoint.getArgs()) { if (arg == null) { break; } stringBuilder.append(arg.toString()).append("|"); } log.info("before method: " + stringBuilder.toString()); } @After("execution(* com.liewmanchoi.zheye.controller.*Controller.*(..))") public void afterMethod() { log.info("after method: " + new Date()); } }
[ "liewmanchoi@gmail.com" ]
liewmanchoi@gmail.com
58306807e2c25596d0d38eccff763e807d273802
216a89666cf973378c292657d416eff4238be171
/app/src/main/java/com/example/cattinder/logic/CatPresenter.java
6ffdab79ba07f141fd4c6f4961ad92166deea81b
[]
no_license
virat-gpsw/CatTinder
ff05dbb8ea596dc2705dccf3bcf515465e1986e4
3e11ce80f2bb3b76d703ab4511943d35208ca6a3
refs/heads/master
2021-01-10T01:30:21.380526
2016-04-01T17:39:43
2016-04-01T17:39:43
51,621,621
0
0
null
null
null
null
UTF-8
Java
false
false
1,131
java
package com.example.cattinder.logic; import com.example.cattinder.data.Cat; import com.example.cattinder.data.ICatDataInteractor; import com.example.cattinder.rx.SchedulerFactory; import com.example.cattinder.view.ICatView; import java.util.List; import rx.functions.Action1; public class CatPresenter implements ICatPresenter { private ICatView mCatView; private ICatDataInteractor mDataInteractor; private SchedulerFactory mSchedulerFactory; public CatPresenter(ICatView catView, ICatDataInteractor dataInteractor, SchedulerFactory schedulerFactory) { mCatView = catView; mDataInteractor = dataInteractor; mSchedulerFactory = schedulerFactory; } @Override public void loadCats() { mDataInteractor.getCats() .subscribeOn(mSchedulerFactory.newThread()) .observeOn(mSchedulerFactory.mainThread()) .subscribe(new Action1<List<Cat>>(){ @Override public void call(List<Cat> cats) { mCatView.showCats(cats); } }); } }
[ "vsingh@gopro.com" ]
vsingh@gopro.com
e69c34d14f92ff2ce09d0c249a10317abbbfe33e
b2cff282cb547a2fa5657595c98b0f9e519d6e1c
/itests/standalone/basic/src/test/java/org/wildfly/camel/test/mllp/subA/MllpJUnitResourceException.java
8192e89a071de6740027423aed00d27fc1a655c8
[ "Apache-2.0" ]
permissive
tdiesler/wildfly-camel
b0b429a565a64098cc0e2a2e07132e109f7e5e2a
5356d361223c48ceab2f2cda7c6ced72f0f46971
refs/heads/master
2022-09-16T16:21:29.265196
2021-02-22T11:46:05
2021-02-22T11:46:05
26,170,606
1
0
Apache-2.0
2020-07-09T14:54:14
2014-11-04T13:48:25
Java
UTF-8
Java
false
false
1,451
java
/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.wildfly.camel.test.mllp.subA; /** * Base Exception for MLLP JUnit Rules */ public class MllpJUnitResourceException extends RuntimeException { public MllpJUnitResourceException(String message) { super(message); } public MllpJUnitResourceException(String message, Throwable cause) { super(message, cause); } public MllpJUnitResourceException(Throwable cause) { super(cause); } public MllpJUnitResourceException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { super(message, cause, enableSuppression, writableStackTrace); } }
[ "thomas.diesler@jboss.com" ]
thomas.diesler@jboss.com
69f2b5ea047e2118bf5512c3218fcdda4ffa0863
0ea381431ec913bd3a0f69f6c9e7094967aedb21
/main/geo/benchmark/src/boofcv/alg/geo/BenchmarkRuntimeHomography.java
9f46d5fd26e7201422e2f3adf01bf9eb09ebb4a5
[ "Apache-2.0" ]
permissive
eclissato/BoofCV
37dcbd99a217dc2e7917483736eeba845f65545e
71cc50e44c03cc63a80885813bf45a6619f4caf0
refs/heads/master
2021-01-16T01:07:58.181704
2012-09-22T01:57:40
2012-09-22T01:57:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,441
java
/* * Copyright (c) 2011-2012, Peter Abeles. All Rights Reserved. * * This file is part of BoofCV (http://boofcv.org). * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package boofcv.alg.geo; import boofcv.abst.geo.EpipolarMatrixEstimator; import boofcv.factory.geo.FactoryEpipolar; import boofcv.misc.Performer; import boofcv.misc.ProfileOperation; import java.util.ArrayList; import java.util.List; /** * @author Peter Abeles */ public class BenchmarkRuntimeHomography extends ArtificialStereoScene { static final long TEST_TIME = 1000; static final int NUM_POINTS = 500; static final boolean PIXELS = true; List<AssociatedPair> pairs4 = new ArrayList<AssociatedPair>(); public class Estimate implements Performer { EpipolarMatrixEstimator alg; String name; List<AssociatedPair> list; public Estimate( String name , EpipolarMatrixEstimator alg , List<AssociatedPair> list ) { this.alg = alg; this.name = name; this.list = list; } @Override public void process() { alg.process(list); alg.getEpipolarMatrix(); } @Override public String getName() { return name; } } public void runAll() { System.out.println("========= Profile numFeatures "+NUM_POINTS); System.out.println(); init(NUM_POINTS, PIXELS,true); for( int i = 0; i < 4; i++ ) { pairs4.add(pairs.get(i)); } System.out.println("Minimum Number"); ProfileOperation.printOpsPerSec(new Estimate("Linear 4 Norm", FactoryEpipolar.computeHomography(true), pairs4), TEST_TIME); ProfileOperation.printOpsPerSec(new Estimate("Linear 4 Unorm",FactoryEpipolar.computeHomography(false),pairs4), TEST_TIME); System.out.println("N"); ProfileOperation.printOpsPerSec(new Estimate("Linear 4", FactoryEpipolar.computeHomography(true),pairs), TEST_TIME); } public static void main( String args[] ) { BenchmarkRuntimeHomography alg = new BenchmarkRuntimeHomography(); alg.runAll(); } }
[ "peter.abeles@gmail.com" ]
peter.abeles@gmail.com
d628faeab796098208fce9d893bff2067467e795
62fe6d0c3daf6c673d3663d93b378c853098186b
/1.JavaSyntax/src/com/javarush/task/task09/task0906/Solution.java
32b5aa9891f145eb94e9588ae2cfc310ebf52e92
[]
no_license
KrugerNAD/JavaRushTasks
87dafaddc3d3e12016dbd6575a2d970754dd08b7
de8dc10f9ea700c5189fa65ee7772340a0e398e5
refs/heads/master
2021-01-21T18:46:41.579110
2017-05-22T21:19:56
2017-05-22T21:19:56
92,073,094
0
0
null
null
null
null
UTF-8
Java
false
false
472
java
package com.javarush.task.task09.task0906; /* Логирование стек трейса */ public class Solution { public static void main(String[] args) { log("In main method"); } public static void log(String s) { //напишите тут ваш код System.out.println(Thread.currentThread().getStackTrace()[2].getClassName()+": "+ Thread.currentThread().getStackTrace()[2].getMethodName()+": "+s); } }
[ "HAMSTER@MacBook-Pro-Deksp.local" ]
HAMSTER@MacBook-Pro-Deksp.local
29d5144e3dbe8f38c52bef1ce580d3837ebc402b
af12885602d8caf881c64e1eafebb133b1ce7f3b
/src/interviews/codeeval/easy/SwapCharacters/SwapCharacters.java
36367062c8f31a043bde3585c5819b7d0255350e
[]
no_license
arpitnu/JavaProgramming
9ed698f01a8b1647c05a53d3f7a7247824451da9
27fe80c9008298f49369bd63636ded98677ec35e
refs/heads/master
2021-01-10T13:58:14.261070
2015-06-04T06:44:18
2015-06-04T06:44:18
36,391,184
0
0
null
null
null
null
UTF-8
Java
false
false
2,455
java
/** * */ package interviews.codeeval.easy.SwapCharacters; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.IOException; /** * @author arpitm * * QUESTION: Link: https://www.codeeval.com/open_challenges/196/submit/ * * Write a program that, given a sentence where each word has a single * digit positive integer as a prefix and suffix, swaps the numbers * while retaining the word in between. Words in the sentence are * delimited from each other by a space. * * INPUT SAMPLE: * * The first argument is a path to a file. Each line of the input file * contains one test case represented by a sentence. Each word in the * sentence begins and ends with a single digit positive integer i.e. 0 * through 9. Assume all characters are ASCII. * * 1) 4Always0 5look8 4on9 7the2 4bright8 9side7 3of8 5life5 * * 2) 5Nobody5 7expects3 5the4 6Spanish4 9inquisition0 * * OUTPUT SAMPLE: * * For each test case, print to standard output the sentence obtained by * swapping the numbers surrounding each word, one per line. * * 1) 0Always4 8look5 9on4 2the7 8bright4 7side9 8of3 5life5 * * 2) 5Nobody5 3expects7 4the5 4Spanish6 0inquisition9 * */ public class SwapCharacters { /** * @param args * @throws IOException */ public static void main(String[] args) throws IOException { File file = new File(args[0]); BufferedReader fileBuffer = new BufferedReader(new FileReader(file)); String sentence = null; while ((sentence = fileBuffer.readLine()) != null) { sentence = sentence.trim(); // Process line here. String[] words = sentence.split(" "); int len = words.length; int i; for (i = 0; i < len; i++) { String word = words[i]; int wordLen = word.length(); String newWord = swapCharacters(word, 0, wordLen - 1); words[i] = newWord; } // Print the line on the console for (i = 0; i < len - 1; i++) { System.out.print(words[i] + " "); } System.out.print(words[i]); System.out.println(); } fileBuffer.close(); } private static String swapCharacters(String word, int i, int j) { char[] wordCharArray = word.toCharArray(); char temp = wordCharArray[i]; wordCharArray[i] = wordCharArray[j]; wordCharArray[j] = temp; return (new String(wordCharArray)); } }
[ "arpit231087@gmail.com" ]
arpit231087@gmail.com
fe5cda5c88a17e2f667c39d06957e49a2758a5cb
9a7cc9f1534de083ca21a291b18e2e1961387d0c
/zuul-authjwt-example-ael/auth-center/src/main/java/ael/example/security/auth/dto/JwtResponse.java
39bdaa5ef0c6261f89db4089843df0dd976a9750
[ "MIT" ]
permissive
ahafi/mcommerce
565e6c73da5fd0da3d6313b33b293240fd526729
b671f4ff5b9362712c72f49c992faab562b3f159
refs/heads/master
2022-07-06T14:35:21.477770
2019-11-16T21:32:32
2019-11-16T21:32:32
194,551,141
0
1
null
2022-06-21T02:07:53
2019-06-30T19:02:50
Java
UTF-8
Java
false
false
346
java
package ael.example.security.auth.dto; import java.io.Serializable; public class JwtResponse { //private static final long serialVersionUID = -8091879091924046844L; private final String jwttoken; public JwtResponse(String jwttoken) { this.jwttoken = jwttoken; } public String getToken() { return this.jwttoken; } }
[ "a_hafi@hotmail.fr" ]
a_hafi@hotmail.fr
48bcbd365fe5a3057b5e2ca241af134a6e7dc38f
5c373f2b4b73266b095162ff49d55d4f223d8903
/android/src/com/sushi/AndroidLauncher.java
92362c546d59256823b01c6add96b3b768ca7b5b
[]
no_license
Byuunion/sushi
b9210ee4d2136655ac7570614c00f9d76b28c483
4c53a924a2ce80c9fe41fbb855a2aa0dca92ccbd
refs/heads/master
2021-01-13T01:00:44.647731
2016-02-10T20:27:43
2016-02-10T20:27:43
51,469,733
0
0
null
null
null
null
UTF-8
Java
false
false
499
java
package com.sushi; import android.os.Bundle; import com.badlogic.gdx.backends.android.AndroidApplication; import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration; import com.sushi.SushiMain; public class AndroidLauncher extends AndroidApplication { @Override protected void onCreate (Bundle savedInstanceState) { super.onCreate(savedInstanceState); AndroidApplicationConfiguration config = new AndroidApplicationConfiguration(); initialize(new SushiMain(), config); } }
[ "ormegabenson71593@msn.com" ]
ormegabenson71593@msn.com
d1fad43fc4f4e6c25506e87b1bf32828cba8d735
f7ec23eb91389884d128fd9f28aa4eecee5a6a69
/wemall-v2/wemall-foundation/src/main/java/com/wemall/foundation/domain/query/RoleGroupQueryObject.java
cedfb05289e98d2e2948fdd1aaa6c0a692b55c39
[]
no_license
springwindyike/wemall
e6c607719b1c11bd256d7c4c9b1ab8b670b64ff2
5765ea058615d3d63897be28a3122e2dfa04e026
refs/heads/master
2020-09-16T14:59:43.207420
2019-03-28T16:56:12
2019-03-28T16:56:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
407
java
package com.wemall.foundation.domain.query; import com.wemall.core.query.QueryObject; import org.springframework.web.servlet.ModelAndView; public class RoleGroupQueryObject extends QueryObject { public RoleGroupQueryObject(String currentPage, ModelAndView mv, String orderBy, String orderType){ super(currentPage, mv, orderBy, orderType); } public RoleGroupQueryObject(){ } }
[ "qiaozhi_china@163.com" ]
qiaozhi_china@163.com
d0a3b3770e3fda2e34aeec7af42cc340476e26d1
63c68d3acbfc53e1bec9d7ba14de5b0820badb80
/src/main/java/zhku/lgq/morecondition/repository/BankRepository.java
218046fd1bcf928bf442017d737e5a11bd346f0c
[]
no_license
qgllgq/test3
b38dbfa831520cf04d08cf56692c533a605e5e96
c71929d9028bbc28875a014b5c83924dc305981c
refs/heads/master
2020-03-28T02:50:45.968220
2018-12-04T16:04:38
2018-12-04T16:04:38
147,601,763
0
0
null
null
null
null
UTF-8
Java
false
false
281
java
package zhku.lgq.morecondition.repository; import org.springframework.data.jpa.repository.JpaRepository; import zhku.lgq.morecondition.entity.Channel; public interface BankRepository extends JpaRepository<Channel,Integer> { Channel findChannelByChannelId(int channelId); }
[ "2416286277@qq.com" ]
2416286277@qq.com
3148a46f65854ccc79c9779387e34c3c7f873478
9b62a49653d5ef7e2ce8bc9b15ae7fbbcd058cd3
/src/main/java/com/zbkj/crmeb/validatecode/model/ValidateCode.java
df12af5a2feff49d8e983333e32474d84967f4f0
[]
no_license
123guo789/E-commerce-marketing-system
cfcc00d11e0f645f30e3b3c465b4a907dd7ab5bc
14241e0777e86cd15404811bb397f820ffb4dfd9
refs/heads/master
2023-05-30T19:43:39.276634
2021-06-16T13:07:54
2021-06-16T13:07:54
363,798,792
0
0
null
null
null
null
UTF-8
Java
false
false
738
java
package com.zbkj.crmeb.validatecode.model; import java.io.Serializable; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; /** * 验证码类 */ @Data @EqualsAndHashCode(callSuper = false) @Accessors(chain = true) @ApiModel(value="ValidateCode对象", description="验证码类") public class ValidateCode implements Serializable { public ValidateCode(String key, String code) { this.key = key; this.code = code; } @ApiModelProperty(value = "key", required = true) private String key; @ApiModelProperty(value = "code", required = true) private String code; }
[ "321458547@qq.com" ]
321458547@qq.com
8004aa9a542ce32e3cf63e13107a067955d3fabf
b4780b71309d29554f35ed4b705e00a8e0bce334
/src/primitives/Util.java
d701e9bb659ad6271d62d7041f01c81e831f4ee9
[]
no_license
mendi313/Shapes3D
61974547aabee4c093a8a333801724f2b940ae7b
d77a62619984e6dea1990a27ec131110a14e4f7a
refs/heads/master
2022-12-04T19:31:32.563727
2020-08-20T08:30:32
2020-08-20T08:30:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,488
java
package primitives; /** * Util class is used for some internal utilities, e.g. controlling accuracy * * @author Dan */ public abstract class Util { // It is binary, equivalent to ~1/1,000,000,000,000 in decimal (12 digits) private static final int ACCURACY = -40; // double store format (bit level): // 1 bit sign, 11 bits exponent, 53 bits (52 stored) normalized mantissa // the number is m+2^e where 1<=m<2 // NB: exponent is stored "normalized" (i.e. always positive by adding 1023) private static int getExp(double num) { // 1. doubleToRawLongBits: "convert" the stored number to set of bits // 2. Shift all 52 bits to the right (removing mantissa) // 3. Zero the sign of number bit by mask 0x7FF // 4. "De-normalize" the exponent by subtracting 1023 return (int)((Double.doubleToRawLongBits(num) >> 52) & 0x7FFL) - 1023; } /** * Checks whether the number is [almost] zero * * @param number double * @return true if the number is zero or almost zero, false otherwise */ public static boolean isZero(double number) { return getExp(number) < ACCURACY; } /** * Aligns the number to zero if it is almost zero * * @param number double * @return 0.0 if the number is very close to zero, the number itself otherwise */ public static double alignZero(double number) { return getExp(number) < ACCURACY ? 0.0 : number; } }
[ "770mmw@gmail.com" ]
770mmw@gmail.com
d5fe9c89953410a85e6750e82595d1b9ce0a077a
883f927fbad8c6452bb85476c3845def52c984c0
/src/main/java/de/flapdoodle/mongoom/datastore/query/QueryOperation.java
e95afcb9520b576575ca688fc1282974328c888b
[]
no_license
michaelmosmann/mongoom.flapdoodle.de
73f4aa59d9fd076647234aae83f76183605eead4
15acd1d9e7faad94f869be67d042d4c5f4fa5e1e
refs/heads/master
2021-07-03T08:32:41.936409
2012-08-13T19:59:54
2012-08-13T19:59:54
989,075
1
2
null
2020-10-13T09:45:44
2010-10-15T04:52:06
Java
UTF-8
Java
false
false
5,896
java
/** * Copyright (C) 2010 Michael Mosmann <michael@mosmann.de> * * 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 de.flapdoodle.mongoom.datastore.query; import java.util.Collection; import java.util.regex.Pattern; import com.google.common.collect.Lists; import de.flapdoodle.mongoom.IListQueryOperation; import de.flapdoodle.mongoom.IQuery; import de.flapdoodle.mongoom.IQueryOperation; import de.flapdoodle.mongoom.datastore.factories.IDBObjectFactory; import de.flapdoodle.mongoom.exceptions.MappingException; import de.flapdoodle.mongoom.exceptions.NotImplementedException; import de.flapdoodle.mongoom.mapping.BSONType; import de.flapdoodle.mongoom.mapping.IContainerTransformation; import de.flapdoodle.mongoom.mapping.properties.PropertyReference; public class QueryOperation<T, Q extends IQuery<T>,V> extends AbstractQueryOperation<T, Q, V> implements IQueryOperation<T, Q,V> { public QueryOperation(Q query, IDBObjectFactory queryBuilder, MappedNameTransformation converter) { super(query,queryBuilder,converter); // _query = query; // _queryBuilder = queryBuilder; //// _field = asName(fields); //// _fields = fields; // _field=converter.name().getMapped(); // _name=converter.name(); //// _converter = converter; // _transformation=converter.transformation(); } @Override public <V> IQueryOperation<T, Q,V> field(PropertyReference<V> field) { return new QueryOperation<T, Q,V>(_query, _queryBuilder, Queries.getConverter(field, _transformation,_name)); } @Override public <C extends Collection<V>, V> IListQueryOperation<T, Q,V> listfield(PropertyReference<C> field) { return new ListQueryOperation<T, Q,V>(_query, _queryBuilder, Queries.getConverter(field, _transformation,_name)); } // @Override public IQueryOperation<T, Q,V> not() { if (_not) throw new MappingException("not.not does not make any sense"); _not = !_not; return this; } @Override public Q eq(V value) { if (_not) throw new MappingException("use ne instead of not.eq"); _queryBuilder.set(_field, asObject(getConverter(false),value)); return _query; } @Override public Q match(Pattern pattern) { // check if dest type is String asObject(getConverter(false),""); IDBObjectFactory factory = _queryBuilder.get(_field); if (_not) factory = factory.get("$not"); factory.set(_field, pattern); // _queryBuilder.set(_field, pattern); return _query; } @Override public Q exists(boolean exists) { if (_not) throw new MappingException("use exists(" + !exists + ") instead"); IDBObjectFactory factory = _queryBuilder.get(_field); // if (_not) factory=factory.get("$not"); factory.set("$exists", exists); // _queryBuilder.set(_field, "$exists", exists); return _query; } @Override public Q size(int value) { IDBObjectFactory factory = _queryBuilder.get(_field); if (_not) factory = factory.get("$not"); factory.set("$size", value); // _queryBuilder.set(_field, "$size", value); return _query; } @Override public <V> Q type(Class<?> type) { BSONType bsonType = BSONType.getType(type); if (bsonType == null) throw new MappingException("Could not convert " + type + " to BSON Type"); IDBObjectFactory factory = _queryBuilder.get(_field); if (_not) factory = factory.get("$not"); factory.set("$type", bsonType.code()); // _queryBuilder.set(_field, "$type", bsonType); return _query; } @Override public Q mod(int mod, int eq) { return opList("$mod", false, Lists.newArrayList(mod, eq)); } @Override public Q in(V... value) { if (_not) throw new MappingException("use nin instead of not.in"); return opList("$in", true, value); } @Override public Q in(Collection<V> values) { if (_not) throw new MappingException("use nin instead of not.in"); return opList("$in", true, values); } @Override public Q all(V... value) { return opList("$all", true, value); } @Override public Q all(Collection<V> values) { return opList("$all", true, values); } @Override public Q nin(V... value) { if (_not) throw new MappingException("use in instead of not.nin"); return opList("$nin", true, value); } @Override public Q nin(Collection<V> values) { if (_not) throw new MappingException("use in instead of not.nin"); return opList("$nin", true, values); } @Override public Q ne(V value) { if (_not) throw new MappingException("use eq instead of not.ne"); return op("$ne", true, value); } @Override public Q gt(V value) { if (_not) throw new MappingException("use lte instead of not.gt"); return op("$gt", true, value); } @Override public Q lt(V value) { if (_not) throw new MappingException("use gte instead of not.lt"); return op("$lt", true, value); } @Override public Q gte(V value) { if (_not) throw new MappingException("use lt instead of not.gte"); return op("$gte", true, value); } @Override public Q lte(V value) { if (_not) throw new MappingException("use gt instead of not.lte"); return op("$lte", true, value); } @Override public SubQuery<T, Q> elemMatch() { if (_transformation instanceof IContainerTransformation) { return new SubQuery<T, Q>(_query, ((IContainerTransformation) _transformation).containerConverter(), _queryBuilder.get( _field).get("$elemMatch")); } throw new MappingException("Field " + _field + " is not an List"); } }
[ "michael@mosmann.de" ]
michael@mosmann.de
6e722014fa322020f1c81a02a129831f650d42a4
1086fb107c388cff944a01f2ba5ffb6cbc613419
/app/src/main/java/com/nexuslink/alphrye/ui/activity/CycleActivity.java
1e0c5ed9bea0d1d91bc7109383456d3253c067fd
[ "Apache-2.0" ]
permissive
asdasadasf/Cyctastic
b8b3e11c2f5061b9b744f78a44778ad6cf1d6d14
d6529ad5b07225e4b5c59f8fd219e98a6c56f1bb
refs/heads/master
2020-04-13T17:50:02.025249
2019-06-15T13:54:47
2019-07-09T10:20:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,426
java
package com.nexuslink.alphrye.ui.activity; import android.location.Location; import android.os.Bundle; import com.amap.api.maps.MapView; import com.nexuslink.alphrye.common.MyActivity; import com.nexuslink.alphrye.cyctastic.R; import com.nexuslink.alphrye.helper.LocationHelper; public class CycleActivity extends MyActivity implements LocationHelper.ILocationChangeObserver { private LocationHelper mLocationHelper; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); MapView mapView = findViewById(R.id.v_map); mapView.onCreate(savedInstanceState); } @Override protected int getLayoutId() { return R.layout.activity_cycle; } @Override protected int getTitleBarId() { return 0; } @Override protected void initView() { } @Override protected void initData() { mLocationHelper = LocationHelper.getInstance(); mLocationHelper.addObservers(this); mLocationHelper.start(); } @Override public void onLocationChange(Location location) { if (location == null) { return; } toast(location.getSpeed()); } @Override protected void onDestroy() { super.onDestroy(); if (mLocationHelper == null) { return; } mLocationHelper.removeObservers(this); } }
[ "yuanrui@bytedance.com" ]
yuanrui@bytedance.com
4a1c4199b11806a6f7db83b5bc0d987762a9b566
b63ce462ac9cae6a223527e59e805b4d68cd7cea
/dboe-base/src/test/java/org/seaborne/dboe/base/objectfile/TestStringFileDisk.java
9e6ef7186230de61f7c85ae0a503c8630fadd0c9
[ "LicenseRef-scancode-unknown-license-reference", "Apache-2.0" ]
permissive
tonywoode/mantis
eccecd6891e44500375eefb99bee7b4b20eb0ef4
22318894704af206ee288ed4b3d3d45c8560f1c0
refs/heads/master
2021-04-29T05:12:34.060913
2017-01-02T17:42:02
2017-01-02T17:42:02
78,016,135
1
0
null
2017-01-04T13:04:47
2017-01-04T13:04:46
null
UTF-8
Java
false
false
1,568
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * See the NOTICE file distributed with this work for additional * information regarding copyright ownership. */ package org.seaborne.dboe.base.objectfile; import static org.apache.jena.atlas.lib.FileOps.clearDirectory ; import org.apache.jena.atlas.lib.FileOps ; import org.seaborne.dboe.ConfigTestDBOE ; import org.seaborne.dboe.base.file.FileFactory ; import org.seaborne.dboe.base.file.Location ; import org.seaborne.dboe.base.objectfile.StringFile ; public class TestStringFileDisk extends AbstractTestStringFile { String fn = null ; @Override protected StringFile createStringFile() { String dir = ConfigTestDBOE.getTestingDir() ; clearDirectory(dir) ; Location loc = Location.create(dir) ; fn = loc.getPath("xyz", "node") ; FileOps.delete(fn) ; return FileFactory.createStringFileDisk(fn) ; } @Override protected void removeStringFile(StringFile f) { f.close() ; FileOps.delete(fn) ; } }
[ "andy@seaborne.org" ]
andy@seaborne.org
6c8b156fa87c11e1549af7745b73e9ab060d4827
b65f357466efaa3d5b2086e27ac5ce5df5390f32
/DesignSupportTest/app/src/main/java/com/tutosandroidfrance/designsupporttest/DetailActivity.java
4641fefcb273570507732a3c7419b5728933552d
[ "MIT" ]
permissive
florian2412/TutosAndroidFrance
906a8aca4dbb2ff1ffd455a80ae9deba6676ef0a
9c42f73321df65f29e25856b4a03d1c21c47ba26
refs/heads/master
2021-01-18T13:29:12.135440
2015-06-17T15:29:55
2015-06-17T15:29:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,605
java
/* * Copyright (C) 2015 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.tutosandroidfrance.designsupporttest; import android.content.Intent; import android.media.Image; import android.os.Bundle; import android.support.design.widget.CollapsingToolbarLayout; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.Toolbar; import android.view.MenuItem; import android.widget.ImageView; import com.squareup.picasso.Callback; import com.squareup.picasso.Picasso; import com.tutosandroidfrance.designsupporttest.model.MyObject; import butterknife.ButterKnife; import butterknife.InjectView; public class DetailActivity extends AppCompatActivity { public static final String MY_OBJECT = "MY_OBJECT"; @InjectView(R.id.toolbar) Toolbar toolbar; @InjectView(R.id.collapsing_toolbar) CollapsingToolbarLayout collapsingToolbar; @InjectView(R.id.backgroundImageView) ImageView backgroundImageView; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_detail); ButterKnife.inject(this); setSupportActionBar(toolbar); getSupportActionBar().setDisplayHomeAsUpEnabled(true); MyObject myObject = (MyObject) getIntent().getSerializableExtra(MY_OBJECT); collapsingToolbar.setTitle(myObject.getText()); supportPostponeEnterTransition(); Picasso.with(this).load(myObject.getImageUrl()).centerCrop().fit().into(backgroundImageView, new Callback() { @Override public void onSuccess() { supportStartPostponedEnterTransition(); } @Override public void onError() { } }); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: finish(); return true; } return super.onOptionsItemSelected(item); } }
[ "champigny.florent@gmail.com" ]
champigny.florent@gmail.com
6e273f491d958a3e1ceb32bed023124bf95e131e
ddc0a54cc8dc0543bf6aa7e3e6f98c120b44adf1
/kane/src/main/java/cn/kane/travel/system/entity/Role.java
f6ef76c6538c4cbee5265494accc88372c14a3f1
[]
no_license
Staticsnull/kane
b1434961ea05892778f86235c0f73f3e3b713d0f
7e7147d7ca901a5a821a60c478bd3de3e6b3d3a4
refs/heads/master
2021-05-09T09:48:11.652905
2018-01-31T01:23:45
2018-01-31T01:23:45
119,460,475
0
0
null
null
null
null
UTF-8
Java
false
false
2,129
java
package cn.kane.travel.system.entity; import java.io.Serializable; import java.util.Date; public class Role implements Serializable { private static final long serialVersionUID = -4947502179670638712L; private Integer id; private String name; private String note; private String createdUser; private String modifiedUser; private Date coreatedTime; private Date modifiedTime; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getNote() { return note; } public void setNote(String note) { this.note = note; } public String getCreatedUser() { return createdUser; } public void setCreatedUser(String createdUser) { this.createdUser = createdUser; } public String getModifiedUser() { return modifiedUser; } public void setModifiedUser(String modifiedUser) { this.modifiedUser = modifiedUser; } public Date getCoreatedTime() { return coreatedTime; } public void setCoreatedTime(Date coreatedTime) { this.coreatedTime = coreatedTime; } public Date getModifiedTime() { return modifiedTime; } public void setModifiedTime(Date modifiedTime) { this.modifiedTime = modifiedTime; } @Override public String toString() { return "Role [id=" + id + ", name=" + name + ", note=" + note + ", createdUser=" + createdUser + ", modifiedUser=" + modifiedUser + ", coreatedTime=" + coreatedTime + ", modifiedTime=" + modifiedTime + "]"; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((id == null) ? 0 : id.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Role other = (Role) obj; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; return true; } }
[ "a123456" ]
a123456
9e13949ff63d1c9f0d38898223b4a300b8ec1c4e
5348ddaa295cdc0933a298edf8815cb622e37f3b
/authorization-server/src/main/java/br/com/hubfintech/authorization/AuthorizationTcpRunner.java
062d17c08a36c9369e50fd38a35c65209b4a40d2
[ "Apache-2.0" ]
permissive
JimSP/authorization-soluction
93f228446034b2adda6bdb8d9c70826a70096346
05ffcf69cdd1239a4860218f662741106d019b1c
refs/heads/master
2020-03-25T01:49:22.049714
2018-08-02T22:22:34
2018-08-02T22:23:08
143,258,573
0
0
null
null
null
null
UTF-8
Java
false
false
641
java
package br.com.hubfintech.authorization; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.CommandLineRunner; import org.springframework.stereotype.Component; import br.com.hubfintech.authorization.queues.Receiver; import br.com.hubfintech.authorization.tcp.AuthorizationTcpServer; @Component public class AuthorizationTcpRunner implements CommandLineRunner { @Autowired private AuthorizationTcpServer authorizationTcpServer; @Autowired private Receiver receiver; @Override public void run(String... args) throws Exception { receiver.start(); authorizationTcpServer.start(); } }
[ "alexandre.msl@gmail.com" ]
alexandre.msl@gmail.com
17e308987e1c1545d6b10dec3fb82a114c2aae6c
2943f233ac0e073f585c9142f5ff66ecba7d8b13
/MessageStore/src/main/java/jpa/service/external/PostmasterTargetText.java
30b91665ece24d02e95f0f8ecb86995bd6b4b84e
[]
no_license
barbietunnie/jboss-5-to-7-migration
1a519afeee052cf02c51823b5bf2003d99056112
675e33b8510ca09e7efdb5ca63ccb73c93abba8a
refs/heads/master
2021-01-10T18:40:13.068747
2015-05-29T19:01:26
2015-05-29T19:01:26
57,383,835
0
0
null
null
null
null
UTF-8
Java
false
false
1,887
java
package jpa.service.external; import java.util.List; import jpa.model.EmailAddress; import jpa.service.common.EmailAddressService; import jpa.util.EmailAddrUtil; import jpa.util.SpringUtil; import org.apache.log4j.Logger; import org.springframework.stereotype.Component; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; @Component("postmasterTargetText") @Transactional(propagation=Propagation.REQUIRED) public class PostmasterTargetText implements TargetTextProc { static final Logger logger = Logger.getLogger(PostmasterTargetText.class); static final boolean isDebugEnabled = logger.isDebugEnabled(); /** * retrieve all mailing list addresses, and construct a regular expression * that matches any address on the list. * * @return a regular expression */ public String process() { if (isDebugEnabled) { logger.debug("Entering process() method..."); } StringBuffer sb = new StringBuffer(); EmailAddressService dao = SpringUtil.getAppContext().getBean(EmailAddressService.class); List<EmailAddress> list = dao.getByAddressUser("(postmaster|mailmaster|mailadmin|administrator|mailer-(daemon|deamon)|smtp.gateway|majordomo)"); for (int i = 0; i < list.size(); i++) { EmailAddress item = list.get(i); // no display name allowed for list address, just for safety String address = EmailAddrUtil.removeDisplayName(item.getAddress(), true); if (i > 0) { sb.append(","); } sb.append(address); } return sb.toString(); } public static void main(String[] args) { TargetTextProc resolver = new PostmasterTargetText(); try { String regex = resolver.process(); System.err.println("Email regular expression: " + regex); } catch (Exception e) { logger.error("Exception", e); } } }
[ "jackwng@gmail.com" ]
jackwng@gmail.com
6e05ac82749041f1cc8ee020596f57bf50d47e83
738f116c839aaff6c4cee9038e724fc00597ea6c
/src/view/main/Main.java
99e34aba790e669cde019dd16c2cf2683d34ef7f
[ "Apache-2.0" ]
permissive
LTBrendan/algy_b
9b4bf42bb4926d3d3712dd41587f0235fa4e17b2
70e123ba4c35880a52662653abe427854ce3ecfb
refs/heads/master
2023-06-27T02:44:15.715260
2018-04-26T14:18:43
2018-04-26T14:18:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
946
java
package view.main; import java.awt.GraphicsEnvironment; import java.io.Console; import java.io.IOException; import java.net.URISyntaxException; import model.Utils; import model.Utils.Level; public class Main { public static void main (String [] args) throws IOException, InterruptedException, URISyntaxException { Console console = System.console(); if(console == null && !GraphicsEnvironment.isHeadless() && String.valueOf(true).equals(Utils.PROPS.getProperty(Level.LOG.name()))){ String filename = Main.class.getProtectionDomain().getCodeSource().getLocation().toString().substring(5) + "ALGY.exe"; Runtime.getRuntime().exec(new String[]{"cmd","/c","start","cmd","/k","java -jar \"" + filename + "\""}); }else{ App.main(new String[0]); Utils.printLog(Level.INFO, "Program has ended, please type 'exit' to close the console"); } } }
[ "brendan56390@hotmail.fr" ]
brendan56390@hotmail.fr
974380db7d5f16fe77d967ed4af9d42b6bb53327
a06ba0d40d86aba3b34083c4c9da5db248bbddf0
/QuanLySinhVien_JSP/src/java/models/Lecturer.java
81a9af1c44aafb1d1afb330cff7060a9bec467ca
[]
no_license
voduykiet/VoDuyKiet_QLSV_JSP-SERVLET
a52b15f611fd006a00d5788890e1816ac3c73a41
55238bc8338d21b5e2451e688e41514a4901c821
refs/heads/main
2023-07-14T07:10:47.643779
2021-08-13T03:10:22
2021-08-13T03:10:22
395,505,258
0
0
null
null
null
null
UTF-8
Java
false
false
1,997
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 models; /** * * @author DELL */ public class Lecturer { private String id_lecturer; private String name_lecturer; private String birthday; private String email; private String phone; private String address; public Lecturer() { } public Lecturer(String id_lecturer, String name_lecturer, String birthday, String email, String phone, String address) { this.id_lecturer = id_lecturer; this.name_lecturer = name_lecturer; this.birthday = birthday; this.email = email; this.phone = phone; this.address = address; } public String getId_lecturer() { return id_lecturer; } public void setId_lecturer(String id_lecturer) { this.id_lecturer = id_lecturer; } public String getName_lecturer() { return name_lecturer; } public void setName_lecturer(String name_lecturer) { this.name_lecturer = name_lecturer; } public String getBirthday() { return birthday; } public void setBirthday(String birthday) { this.birthday = birthday; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getPhone() { return phone; } public void setPhone(String phone) { this.phone = phone; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } @Override public String toString() { return "Lecturer{" + "id_lecturer=" + id_lecturer + ", name_lecturer=" + name_lecturer + ", birthday=" + birthday + ", email=" + email + ", phone=" + phone + ", address=" + address + ", id_account=" + '}'; } }
[ "78134909+voduykiet@users.noreply.github.com" ]
78134909+voduykiet@users.noreply.github.com
758afbb3413462ec9109bcbc13f91964731912f3
eb9b7c8caef80635b6c1c63d6e1c6cb68c35479a
/Prof Materials/Lab/Lab_7/Lab_7_Security/src/main/java/edu/mum/domain/BillingDetails.java
0a0318d0372b03c30d301b3818e8105e942787fb
[]
no_license
lukpheakdey/Enterprise-Architecture-EA
55640c34da02a05dc7e1e99f484fcbb132fd4f12
440d7d8ac59f0c778c9d109f2d0f6e1a689384d5
refs/heads/master
2020-06-08T07:26:37.240644
2019-06-22T03:35:00
2019-06-22T03:35:00
193,185,600
1
0
null
null
null
null
UTF-8
Java
false
false
2,965
java
package edu.mum.domain; import javax.persistence.*; import java.io.Serializable; import java.util.Date; /** * This is the abstract superclass for BillingDetails. * <p> * A BillingDetails object is always associated with a single * User and depends on the lifecycle of that user. It represents * one of the billing strategies the User has choosen, usually * one BillingDetails is the default in a collection of many. * * @author Christian Bauer */ @Entity @Table(name = "BILLING_DETAILS") @Inheritance(strategy = InheritanceType.JOINED) public abstract class BillingDetails implements Serializable, Comparable { @Id @GeneratedValue(strategy=GenerationType.AUTO) @Column(name = "BILLING_DETAILS_ID") private Long id = null; @Version @Column(name = "OBJ_VERSION") private int version = 0; @Column(name = "OWNER", nullable = false) private String owner; @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "USER_ID", updatable = false) private User user; @Temporal(TemporalType.TIMESTAMP) @Column(name="CREATED", nullable = true, updatable = false) private Date created = new Date(); /** * No-arg constructor for JavaBean tools */ public BillingDetails() {} /** * Full constructor */ protected BillingDetails(String owner, User user) { this.owner = owner; this.user = user; } // ********************** Accessor Methods ********************** // public Long getId() { return id; } public int getVersion() { return version; } public String getOwner() { return owner; } public void setOwner(String owner) { this.owner = owner; } public User getUser() { return user; } public Date getCreated() { return created; } // ********************** Common Methods ********************** // // TODO: This is not a very good equals() implementation public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof BillingDetails)) return false; final BillingDetails billingDetails = (BillingDetails) o; if (! (created.getTime() == billingDetails.created.getTime()) ) return false; if (!getOwner().equals(billingDetails.getOwner())) return false; return true; } public int hashCode() { int result; result = getCreated().hashCode(); result = 29 * result + getOwner().hashCode(); return result; } public int compareTo(Object o) { if (o instanceof BillingDetails) // Don't compare Date objects! Use the time in milliseconds! return Long.valueOf(this.getCreated().getTime()).compareTo( Long.valueOf( ((BillingDetails)o).getCreated().getTime()) ); return 0; } // ********************** Business Methods ********************** // /** * Checks if the billing information is correct. * <p> * Check algorithm is implemented in subclasses. * * @return boolean */ public abstract boolean isValid(); }
[ "luk.pheakdey@gmail.com" ]
luk.pheakdey@gmail.com
8cf31943f0cf7ee2a256213abbe94ca217971944
0cfff28d2f0fe52e26a78821d328ed2fb37f6b08
/API/src/main/java/com/lordeats/api/services/ReservationServiceImpl.java
1c2dbe7a08358f9b67aa9e9641b2361d989f0a22
[]
no_license
Michalak-Bartosz/Web-Eats
ff00b6e3ccde1c225058cf85ef4927b857d4a23f
3d5be438a51efbbf5a365c6d344d6c52fe0be379
refs/heads/main
2023-08-03T16:27:38.263970
2021-06-25T07:03:36
2021-06-25T07:03:36
380,148,361
0
0
null
null
null
null
UTF-8
Java
false
false
5,045
java
package com.lordeats.api.services; import com.lordeats.api.dtos.GetReservation; import com.lordeats.api.dtos.PostReservation; import com.lordeats.api.dtos.UpdateReservation; import com.lordeats.api.entities.CustomerEntity; import com.lordeats.api.entities.ReservationEntity; import com.lordeats.api.repositories.CustomerRepository; import com.lordeats.api.repositories.ReservationRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; import java.util.stream.Collectors; import java.util.stream.StreamSupport; @Service public class ReservationServiceImpl implements ReservationService{ private final ReservationRepository reservationRepository; private final CustomerRepository customerRepository; @Autowired public ReservationServiceImpl(ReservationRepository reservationRepository, CustomerRepository customerRepository) { this.reservationRepository = reservationRepository; this.customerRepository = customerRepository; } @Override public List<GetReservation> getAllReservations() { return StreamSupport.stream(reservationRepository.findAll().spliterator(), false).map( reservationEntity -> new GetReservation(reservationEntity.getId(), reservationEntity.getName(), reservationEntity.getAddress(), reservationEntity.getPriceLevel(), reservationEntity.getFonNumber(), reservationEntity.getRatingPoints(), reservationEntity.getWebPage(), reservationEntity.getCustomer().getId())).collect(Collectors.toList()); } @Override public List<GetReservation> getCustomerReservations(String nickname) { if(customerRepository.existsByNickname(nickname)){ CustomerEntity customer = customerRepository.findByNickname(nickname); return customer.getReservations(); } return null; } @Override public GetReservation getReservation(int id) { ReservationEntity reservationEntity = reservationRepository.findById(id); if(reservationEntity != null) return new GetReservation(reservationEntity.getId(), reservationEntity.getName(), reservationEntity.getAddress(), reservationEntity.getFonNumber(), reservationEntity.getPriceLevel(), reservationEntity.getRatingPoints(), reservationEntity.getWebPage(), reservationEntity.getCustomer().getId()); return null; } private void setNewReservation(ReservationEntity reservationEntity, String name, String address, String priceLevel, String fonNumber, String ratingPoints, String webPage) { reservationEntity.setName(name); reservationEntity.setAddress(address); reservationEntity.setFonNumber(fonNumber); reservationEntity.setPriceLevel(priceLevel); reservationEntity.setRatingPoints(ratingPoints); reservationEntity.setWebPage(webPage); } @Override public boolean addNewReservation(PostReservation postReservation) { if(!customerRepository.existsByNickname(postReservation.getCustomerNickname())) return false; ReservationEntity reservationEntity = new ReservationEntity(); setNewReservation(reservationEntity, postReservation.getName(), postReservation.getAddress(), postReservation.getPriceLevel(), postReservation.getFonNumber(), postReservation.getRatingPoints(), postReservation.getWebPage()); reservationEntity.setCustomer(customerRepository.findByNickname(postReservation.getCustomerNickname())); reservationRepository.save(reservationEntity); return reservationRepository.existsById(reservationEntity.getId()); } @Override public boolean updateReservation(int reservationId, UpdateReservation updateReservation) { if(reservationRepository.existsById(reservationId)) { ReservationEntity reservationEntity = reservationRepository.findById(reservationId); setNewReservation(reservationEntity, updateReservation.getName(), updateReservation.getAddress(), updateReservation.getPriceLevel(), updateReservation.getFonNumber(), updateReservation.getRatingPoints(), updateReservation.getWebPage()); reservationRepository.save(reservationEntity); return true; } return false; } @Override public boolean deleteReservation(int id) { if(reservationRepository.existsById(id)){ reservationRepository.deleteById(id); return true; } return false; } @Override public boolean deleteAllReservations() { Iterable<ReservationEntity> reservationList = reservationRepository.findAll(); for(ReservationEntity reservation: reservationList){ reservationRepository.delete(reservation); } return reservationRepository.count() == 0; } }
[ "noreply@github.com" ]
Michalak-Bartosz.noreply@github.com
eaa2d0c9ef3149b540f76baf038f2a765f85632e
a018622e8a99a3363b9bbd060587988b3ea7fa03
/src/main/java/com/eshlon/shopGuru/model/Role.java
4d394a6098ea5bc9a263afa63e41ecbe0685301f
[]
no_license
meAnim/shopGuru_SpringBoot-Java_Backend-App
ff9660cc317637d5bd41ddeb13d37af7fabb000a
42927ddda7f0d7a40d523861effefa89d9b1bad4
refs/heads/master
2022-12-29T04:46:10.711757
2020-10-20T15:41:36
2020-10-20T15:41:36
277,832,547
0
0
null
2020-09-30T11:58:15
2020-07-07T14:02:11
Java
UTF-8
Java
false
false
925
java
package com.eshlon.shopGuru.model; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; @Entity @Table(name = "auth_role") public class Role { @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "auth_role_id") private int id; @Column(name = "role_name") private String role; @Column(name = "role_desc") private String desc; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getRole() { return role; } public void setRole(String role) { this.role = role; } public String getDesc() { return desc; } public void setDesc(String desc) { this.desc = desc; } @Override public String toString() { return "Role [id=" + id + ", role=" + role + ", desc=" + desc + "]"; } }
[ "animj.emma@gmail.com" ]
animj.emma@gmail.com
405dfe7abe95d0ee4cb67bbc0525cc14865b0099
d089f720711d9784dba713b385117e806494f847
/src/test/java/me/pugmarx/bettercode/autovalue/CakeTest.java
d58337a71659d9c9a13fbc91bc1a3e8cdb44d603
[]
no_license
pugmarx/bettercode
c167146d51ef5e26f49d8fc33092b2de6cc61597
bd2c58887a8c3cbb9bb8caf9a643ace6a2d1bc80
refs/heads/master
2021-05-10T16:49:09.472266
2018-02-03T22:25:02
2018-02-03T22:25:02
118,589,838
0
0
null
null
null
null
UTF-8
Java
false
false
854
java
package me.pugmarx.bettercode.autovalue; import org.junit.Test; import static org.junit.Assert.*; public class CakeTest { @Test public void makeCakes() { // Build a cake without oil Cake cakeNoOil = Cake.builder(2, 3).flour(2).bakingPowder(3).sugar(2) .eggs(2).build(); assertNotNull(cakeNoOil); // Check that it has 0 oil assertEquals(0, cakeNoOil.oil()); // default // Make cake with oil Cake cakeWOil = Cake.builder(2, 3).sugar(2).oil(1).eggs(2).build(); // Obviously, both the cakes are different assertNotEquals(cakeNoOil, cakeWOil); // Another cake that's same as cake w/ oil Cake anotherCakeWOil = Cake.builder(2, 3).sugar(2).oil(1) .eggs(2).build(); assertEquals(cakeWOil, anotherCakeWOil); } }
[ "naqi.rizvi@gmail.com" ]
naqi.rizvi@gmail.com
2cf2e0110a569e53a933fbca1880a8c9dd817a3a
11b96b6a73adb20a3a4a7b96412623944e10ceef
/javarush/test/level11/lesson11/bonus03/Solution.java
9280ddd6144d6080b6410120fc178c46df749803
[]
no_license
Zerodur/javaRush
a34644703b6b5c35a919ee12979659ce62de8892
8a5b5d808f4cb01aff6fefaf9e373a30b6a20334
refs/heads/master
2020-07-01T19:26:09.075989
2017-02-21T11:20:16
2017-02-21T11:20:19
74,261,525
0
0
null
null
null
null
UTF-8
Java
false
false
1,295
java
package com.javarush.test.level11.lesson11.bonus03; /* Задача по алгоритмам Написать метод, который возвращает минимальное и максимальное числа в массиве. */ public class Solution { public static void main(String[] args) throws Exception { int[] data = new int[]{1, 2, 3, 5, -2, -8, 0, 77, 5, 5}; Pair<Integer, Integer> result = getMinimumAndMaximum(data); System.out.println("Minimum is " + result.x); System.out.println("Maximum is " + result.y); } public static Pair<Integer, Integer> getMinimumAndMaximum(int[] array) { if (array == null || array.length == 0) { return new Pair<Integer, Integer>(null, null); } int min = array[0], max = array[0]; for (int i = 0; i < array.length; i++){ if (array[i] < min){ min = array[i]; }else if(array[i] > max){ max = array[i]; } } return new Pair<Integer, Integer>(min, max); } public static class Pair<X, Y> { public X x; public Y y; public Pair(X x, Y y) { this.x = x; this.y = y; } } }
[ "zerodur91@gmail.com" ]
zerodur91@gmail.com
ff2e4baf0d12c6083ad700bd9c3bff0f93824558
c6dc36594e94eb1e0ec80a97911687bbc2af44ad
/src/main/java/edu/usc/irds/tensorflow/grpc/Main.java
e9c11982e147b782b5d1dd4faab9e73b070fada8
[ "Apache-2.0" ]
permissive
sunxingxingtf/tensorflow-grpc-java
dfe369e4f7d97d3483f4942889d35be3441ae886
a6de2faec01be4227142a81e6f17650d340643ae
refs/heads/master
2020-04-03T18:36:57.354975
2017-09-29T00:36:03
2017-09-29T00:36:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,807
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package edu.usc.irds.tensorflow.grpc; import java.io.FileInputStream; import java.io.InputStream; import java.util.List; import java.util.Map; /** * @author Thamme Gowda */ public class Main { public static void main(String[] args) throws Exception { if (args.length != 2){ System.out.println("Invalid args"); System.out.println("Usage: <host:port> <image>"); System.out.println("\tExample: localhost:9090 ~/Pictures/cat.jpg"); System.exit(1); } String[] parts = args[0].split(":"); String server = parts[0]; int port = Integer.parseInt(parts[1]); String imagePath = args[1]; TensorflowObjectRecogniser recogniser = new TensorflowObjectRecogniser(server, port); System.out.println("Image = " + imagePath); InputStream jpegStream = new FileInputStream(imagePath); List<Map.Entry<String, Double>> list = recogniser .recognise(jpegStream); System.out.println(list); recogniser.close(); jpegStream.close(); } }
[ "thammegowda@apache.org" ]
thammegowda@apache.org
bfbf2b7c8f159cd5ba1f77b8f1d4487d56ef7765
4786ac31a45fa8eed50336bc38b2f3d599807403
/JavaChat/src/controler/ClientReception.java
f035f14488e23fead0f7d7dc29d8524dd97bfec6
[]
no_license
juancsosap/javatraining
f9f6e4547e7e7a91f0b862e4be77254164cb7fa6
5575572eaaafc52ffca11fef97cf6e3d5793efc1
refs/heads/master
2023-05-27T10:16:52.238332
2023-05-10T19:28:18
2023-05-10T19:28:18
123,918,686
3
8
null
null
null
null
UTF-8
Java
false
false
671
java
package controler; import java.io.ObjectInputStream; import java.net.Socket; import javafx.concurrent.Task; public class ClientReception extends Task<Void> { private boolean enable = true; private Informable src; private Socket socket; public ClientReception(Informable src, Socket socket) { this.src = src; this.socket = socket; } @Override protected Void call() throws Exception { while(enable) { ObjectInputStream input = new ObjectInputStream(socket.getInputStream()); model.Message message = (model.Message) input.readObject(); src.inform(message); input.close(); } return null; } }
[ "juan.c.sosa.p@gmail.com" ]
juan.c.sosa.p@gmail.com
30c9da2bd9475cf7dd9ede9795e58b0ccf8d76a4
4506b60dbdf395213ee7ae8a03c7e057d04864ba
/commonlib/src/main/java/com/tws/commonlib/activity/AddDeviceWirelessNoteActivity.java
34ffc4f5608a7f71317e3b939365e79df75a6f36
[]
no_license
liu835704070/tenvisty_android
b792372404e25a08eff848c68a0c8f88ed7ba955
94bb3d99099ec882012ee50d068d22e2ee9432bb
refs/heads/master
2020-04-25T02:55:09.135190
2018-05-15T08:49:12
2018-05-15T08:49:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,131
java
package com.tws.commonlib.activity; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.view.View; import com.hichip.tools.HiSinVoiceData; import com.tws.commonlib.R; import com.tws.commonlib.bean.TwsDataValue; import com.tws.commonlib.controller.GifView; public class AddDeviceWirelessNoteActivity extends BaseActivity{ @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.setContentView(R.layout.activity_add_device_configwifi_note); this.setTitle(getText(R.string.title_add_camera)); initView(); } @Override protected void initView(){ super.initView(); if(TwsDataValue.getTryConnectcamera() != null && TwsDataValue.getTryConnectcamera().isSessionConnected()){ showAlert(getString(R.string.dialog_msg_add_camera_connected),getString(R.string.prompt),false, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { Intent intent = AddDeviceWirelessNoteActivity.this.getIntent(); intent.setClass(AddDeviceWirelessNoteActivity.this,SaveCameraActivity.class); startActivity(intent); finish(); } }); return; } } /** * 底部手动一键配置WIFI按钮的处理,跳转到一键配置WIFI 输入SSID PASSWORD的界面 * @param view */ public void configWifiSsid(View view) { if(TwsDataValue.getTryConnectcamera() != null && TwsDataValue.getTryConnectcamera().isSessionConnected()){ showAlert(getString(R.string.dialog_msg_add_camera_connected),getString(R.string.prompt),false, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { Intent intent = AddDeviceWirelessNoteActivity.this.getIntent(); intent.setClass(AddDeviceWirelessNoteActivity.this,SaveCameraActivity.class); startActivity(intent); finish(); } }); return; } Intent intent = this.getIntent(); intent.setClass(AddDeviceWirelessNoteActivity.this, AddDeviceWirelessSettingActivity.class); startActivity(intent); } }
[ "yilu11@qq.com" ]
yilu11@qq.com
68f027c2d42f19bcc0b7052023e81dddc7175940
0d135664a9e6959729765fe3adf517f76a0f4aac
/src/main/java/entity/provinces/Mazwowieckie.java
9b6eb904e969364519dd584e7327611e5d38525d
[]
no_license
mbabanes/statystykaWInf
6dbbd3ccec7c888868b0a68389945f0b1abb2fc5
158670eae7292bec7559500831b5946702e87a6a
refs/heads/master
2021-09-03T08:51:19.205359
2018-01-07T19:13:31
2018-01-07T19:13:31
109,317,367
0
0
null
null
null
null
UTF-8
Java
false
false
74
java
package entity.provinces; public class Mazwowieckie extends Province { }
[ "asd" ]
asd
0db95dbe78a2abb1225f6b66477ac8be318baac5
3f91685f2ef8d45a14cb74d11590fbd65953f0f8
/src/main/java/com/wallet/response/Response.java
cb8f81a66e910ea467acc572d49216feb2e5a9f0
[]
no_license
johnbuenodev/spring-boot2-curso-TDD-CI-CD
066c6bce25936fee434cff3c55c8c10636853dbd
5722d32fd74ce0e4edbab26335924905c58732dc
refs/heads/main
2023-08-02T20:57:47.954233
2021-10-04T02:21:27
2021-10-04T02:21:27
412,802,474
0
0
null
null
null
null
UTF-8
Java
false
false
486
java
package com.wallet.response; import java.util.ArrayList; import java.util.List; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; /// T de Type vai tratar varios tipos de resposta quando for solicitado, generica @Getter @Setter @NoArgsConstructor public class Response<T> { private T data; private List<String> errors; public List<String> getErrors(){ if(this.errors == null) { this.errors = new ArrayList<String>(); } return errors; } }
[ "johnbuenodev@gmail.com" ]
johnbuenodev@gmail.com
0c6fbebd064982855d9a6dc809328762eb578b1f
80774881a329b09506af2b124659d9c4e462d637
/java/algorithms/src/test/java/io/github/suzp1984/algorithms/connection/QuickUnionConnectionTest.java
ed98279b36e8fb14b552cad04fa20a0fbe6dc781
[ "Apache-2.0" ]
permissive
suzp1984/Algorithms-Collection
831da91ae4f9144d983fa7bb186989dab0062b0a
ea678476a4c70e5135d31fccd8383fac989cc031
refs/heads/master
2020-04-12T05:33:39.335282
2018-01-07T13:31:25
2018-01-07T13:31:25
65,159,392
0
0
null
null
null
null
UTF-8
Java
false
false
526
java
package io.github.suzp1984.algorithms.connection; import static org.junit.Assert.assertEquals; import org.junit.Test; import io.github.suzp1984.algorithms.connection.QuickUnionConnection; public class QuickUnionConnectionTest { @Test public void testInt() { QuickUnionConnection<Integer> intQU = new QuickUnionConnection<>(); for (int i = 0; i < 10; i++) { intQU.add(i); } intQU.union(2, 3); intQU.union(3, 4); intQU.union(2, 7); assertEquals(true, intQU.isConnected(4, 7)); } }
[ "suzp1984@gmail.com" ]
suzp1984@gmail.com
c4e814c0c823aff9b33d323a9555b92d64b11444
dc5e30ca33eeaf265061100fb50bfb159b3b46df
/src/com/pt/bridge/Implementor.java
ec6fccd41a84c9803f0adabd722d4a12bed653fa
[]
no_license
TheLastClownthelastone/designPatternStudy
d1be8e06a37f3a949f87671a87c888ed0434763a
edeff4c6d0e63feb27a1fd2842087071a428f6af
refs/heads/master
2023-08-24T15:29:39.898651
2021-10-14T07:34:37
2021-10-14T07:34:37
416,563,478
0
0
null
null
null
null
UTF-8
Java
false
false
237
java
package com.pt.bridge; /** * @author nate-pt * @date 2021/10/12 14:06 * @Since 1.8 * @Description 行为抽象类 */ public abstract class Implementor { /** * 抽象行为 */ public abstract void operation(); }
[ "2286931835@qq.com" ]
2286931835@qq.com
4dc94af668ab12b6982c977d5f505239f56a6064
d02cc74d925aa74d27d7650fe3c735f1c889d849
/app/src/main/java/com/twtstudio/coder/saishi_android/ui/settings/SettingsModule.java
5859c0187ad211565dd13657542944db95d935f9
[]
no_license
Wallong/SaiShi-Android
943773fc99292d06ec75d0a15f64d55292c7832d
81ea303f1c01f33fe9b99b498b1d1f941003c3a2
refs/heads/master
2021-01-10T14:36:08.988310
2016-04-20T06:39:30
2016-04-20T06:39:30
52,960,916
1
0
null
null
null
null
UTF-8
Java
false
false
918
java
package com.twtstudio.coder.saishi_android.ui.settings; import javax.inject.Singleton; import com.twtstudio.coder.saishi_android.AppModule; import com.twtstudio.coder.saishi_android.interactor.SettingsInteractor; import dagger.Module; import dagger.Provides; /** * Created by clifton on 16-2-28. */ @Module( injects = SettingsActivity.class, addsTo = AppModule.class ) public class SettingsModule { private SettingsView mSettingsView; public SettingsModule(SettingsView settingsView) { this.mSettingsView = settingsView; } @Provides @Singleton public SettingsView provideSettingsView() { return mSettingsView; } @Provides @Singleton public SettingsPresenter provideSettingsPresenter(SettingsView settingsView, SettingsInteractor settingsInteractor) { return new SettingsPresenterImpl(settingsView, settingsInteractor); } }
[ "wallong@tju.edu.cn" ]
wallong@tju.edu.cn
4f682168e81b8aa276a3857a6898a56e1043e150
593c08543d7eb1c2492fa11b865a7be23085c586
/org/omg/PortableInterceptor/ORBIdHelper.java
4708a7d287a440bcb17a6ce5077c4052207b166b
[]
no_license
liuzhengyang/jdk-research
bacdb1297ccf3f7f5dd6394aad2d90a4aecf4923
8745611af673afceb662102404439ced180d0666
refs/heads/master
2021-01-10T08:10:38.170309
2016-02-25T09:31:11
2016-02-25T09:31:11
52,512,855
0
0
null
null
null
null
UTF-8
Java
false
false
1,563
java
package org.omg.PortableInterceptor; /** * org/omg/PortableInterceptor/ORBIdHelper.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from ../../../../src/share/classes/org/omg/PortableInterceptor/Interceptors.idl * Thursday, December 18, 2014 4:24:04 PM PST */ // This should actually be the CORBA::ORBid type once that is available abstract public class ORBIdHelper { private static String _id = "IDL:omg.org/PortableInterceptor/ORBId:1.0"; public static void insert (org.omg.CORBA.Any a, String that) { org.omg.CORBA.portable.OutputStream out = a.create_output_stream (); a.type (type ()); write (out, that); a.read_value (out.create_input_stream (), type ()); } public static String extract (org.omg.CORBA.Any a) { return read (a.create_input_stream ()); } private static org.omg.CORBA.TypeCode __typeCode = null; synchronized public static org.omg.CORBA.TypeCode type () { if (__typeCode == null) { __typeCode = org.omg.CORBA.ORB.init ().create_string_tc (0); __typeCode = org.omg.CORBA.ORB.init ().create_alias_tc (org.omg.PortableInterceptor.ORBIdHelper.id (), "ORBId", __typeCode); } return __typeCode; } public static String id () { return _id; } public static String read (org.omg.CORBA.portable.InputStream istream) { String value = null; value = istream.read_string (); return value; } public static void write (org.omg.CORBA.portable.OutputStream ostream, String value) { ostream.write_string (value); } }
[ "liuzhengyang@meituan.com" ]
liuzhengyang@meituan.com
04c9a389cc13e48fc876096084d1e4202f07a2d4
1d20d17379c666db154cd46f496f00e62876e985
/src/main/java/com/cs308/User/UserRepository.java
ff162a24f9c992a08b452091782d19a5dd4a7955
[]
no_license
ebozkurt93/CS-308-Ticketing-Backend
9d6f18b19d6c5f495705a942a55d1c18a4d39f5c
3b80afa7de0f926f87475ffb050a455d3b83b413
refs/heads/master
2020-04-23T08:47:40.877974
2017-06-01T16:38:13
2017-06-01T16:38:13
171,048,688
0
0
null
null
null
null
UTF-8
Java
false
false
191
java
package com.cs308.User; import org.springframework.data.repository.CrudRepository; public interface UserRepository extends CrudRepository<User,Long> { User findByMail(String email); }
[ "ebozkurt@sabanciuniv.edu" ]
ebozkurt@sabanciuniv.edu
7b5c46c360e58ba3af899da55b1e245ac97e0ef3
5893a98e9066f2d17968326c670618e270bbc6b5
/Java-Function/java-funcional/src/main/java/br/com/one/innovation/digital/aula03/FutureExemplo.java
68d65689d9a2a97fed286490caf39db079e7d24d
[]
no_license
PedroEmanuelLima/Inter-Java-Developer
6219f7fcafba87071660716fd81fcd6aad5aa848
cfbfb15346e6daa4d472fa0a836d2f23d2db00ca
refs/heads/main
2023-03-21T05:00:42.866540
2021-03-18T17:00:16
2021-03-18T17:00:16
349,150,222
0
0
null
null
null
null
UTF-8
Java
false
false
6,762
java
package br.com.one.innovation.digital.aula03; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.concurrent.*; import java.util.stream.Collector; import java.util.stream.Collectors; //public class FutureExemplo { // private static final ExecutorService threadPool = Executors.newFixedThreadPool(3); public class FutureExemplo { private static final ExecutorService pessoasParaExecutarAtividade = Executors.newFixedThreadPool(3); // public static void main(String[] args) { // Casa casa = new Casa(new Quarto()); // casa.obterAfazeresDaCasa().forEach( atividade -> threadPool.execute(() -> atividade.realizar())); // threadPool.shutdown(); // // } // public static void main(String[] args) { // Casa casa = new Casa(new Quarto()); // casa.obterAfazeresDaCasa().forEach( atividade -> threadPool.execute(() -> { // try { // atividade.realizar(); // } catch (InterruptedException e) { // e.printStackTrace(); // } // })); // threadPool.shutdown(); // // } // public static void main(String[] args) { // Casa casa = new Casa(new Quarto()); // List<? extends Future<?>> futuros = casa.obterAfazeresDaCasa().stream() //// .map(atividade -> threadPool.submit(atividade::realizar)) //// .map(atividade -> pessoasParaExecutarAtividade.submit(() -> atividade.realizar())) // .map(atividade -> pessoasParaExecutarAtividade.submit(() -> atividade.realizar())) // .collect(Collectors.toList()); // public static void main(String[] args) throws InterruptedException { // Casa casa = new Casa(new Quarto()); // List<? extends Future<?>> futuros = // new CopyOnWriteArrayList<>(casa.obterAfazeresDaCasa().stream() // .map(atividade -> pessoasParaExecutarAtividade.submit(() -> { // try { // atividade.realizar(); // } catch (InterruptedException e) { // e.printStackTrace(); // } // })) // .collect(Collectors.toList())); // public static void main(String[] args) throws InterruptedException { // Casa casa = new Casa(new Quarto()); // List<? extends Future<String>> futuros = // new CopyOnWriteArrayList<Future<String>>(casa.obterAfazeresDaCasa().stream() // .map(atividade -> pessoasParaExecutarAtividade.submit(() -> { // try { // return atividade.realizar(); // } catch (InterruptedException e) { // e.printStackTrace(); // } // return null; // })) // .collect(Collectors.toList())); public static void main(String[] args) throws InterruptedException { Casa casa = new Casa(new Quarto()); List<Future<String>> futuros = new CopyOnWriteArrayList<>(casa.obterAfazeresDaCasa().stream() .map(atividade -> pessoasParaExecutarAtividade.submit(() -> { try { return atividade.realizar(); } catch (InterruptedException e) { e.printStackTrace(); } return null; }) ) .collect(Collectors.toList())); // while (!futuros.stream().allMatch(Future::isDone)) { while (true) { int numeroDeAtividadesNaoFinalizadas = 0; for (Future<?> futuro : futuros) { if (futuro.isDone()) { try { System.out.println("Parabéns você terminou de " + futuro.get()); System.out.println("_______________________________________________________________________\n"); futuros.remove(futuro); } catch (InterruptedException e) { e.printStackTrace(); } catch (ExecutionException e) { e.printStackTrace(); } } else { numeroDeAtividadesNaoFinalizadas++; } } if (futuros.stream().allMatch(Future::isDone)){ break; } System.out.println("Número de atividades não realizadas : " + numeroDeAtividadesNaoFinalizadas); Thread.sleep(500); } // threadPool.shutdown(); pessoasParaExecutarAtividade.shutdown(); } } class Casa { private List<Comodo> comodos; Casa(Comodo... comodos) { this.comodos = Arrays.asList(comodos); } List<Atividade> obterAfazeresDaCasa () { return this.comodos.stream().map(Comodo::obterAfazeresDoComodo) .reduce(new ArrayList<Atividade>(), (pivo, atividades) -> { pivo.addAll(atividades); return pivo; }); } } interface Atividade { String realizar() throws InterruptedException; } abstract class Comodo { abstract List<Atividade> obterAfazeresDoComodo(); } class Quarto extends Comodo { @Override List<Atividade> obterAfazeresDoComodo() { // ArrayList<Atividades> objects = new ArrayList<>(); // objects.add(this::getArrumarACama); // objects.add(this::getVarrerOQuarto); // objects.add(this::getArrumarGuardaRoupa); return Arrays.asList( this::arrumarACama, this::varrerOQuarto, this::arrumarGuardaRoupa ); } private String arrumarGuardaRoupa() throws InterruptedException { Thread.sleep(5000); String arrumar_o_guarda_roupa = "Arrumar o guarda roupa"; System.out.println(arrumar_o_guarda_roupa); return arrumar_o_guarda_roupa; } private String varrerOQuarto() throws InterruptedException { Thread.sleep(7000); String varrer_o_quarto = "Varrer o quarto"; System.out.println(varrer_o_quarto); return varrer_o_quarto; } private String arrumarACama() throws InterruptedException { Thread.sleep(10000); String arrumar_a_cama = "Arrumar a cama"; System.out.println(arrumar_a_cama); return arrumar_a_cama; } }
[ "pa69731@gmail.com" ]
pa69731@gmail.com
9858998dc24dbf79481c5c205f98efd2ea3b55d0
f82113b498d6b80541378753044381cf918bd547
/Lesson 8/Task 8/src/Of76.java
c01884f5ed5f9ddebebe9d064c0043c474dec317
[]
no_license
TheForest13/Lessons
fd389702e24e18ca59ae59f4c128fc906ef8bd8f
739f9e9ba61817378b5834fe56b360ba10192f46
refs/heads/master
2023-02-08T14:15:06.536674
2021-01-03T18:33:28
2021-01-03T18:33:28
326,474,463
0
0
null
null
null
null
UTF-8
Java
false
false
573
java
interface Nose{ int iMethod(); } abstract class Picasso implements Nose { public int iMethod() { return 7; } } class Clowns extends Picasso { } class Act extends Picasso { public int iMethod(){ return 5; } } public class Of76 extends Clowns { public static void main(String[] args) { Nose [] i = new Nose[3]; i[0] = new Act(); i[1] = new Clowns(); i[2] = new Of76(); for (int x = 0; x < 3; x++){ System.out.println(i[x].iMethod() + " " + i[x].getClass()); } } }
[ "guselnikow1999@gmail.com" ]
guselnikow1999@gmail.com
12518a046fae95594d724b561848577e1fd03bb1
05e458fa5f8f10b214d8a41e164fbed8aa088f65
/Java OOP Advanced/Problems/Java OOP Advanced Exam - 12 August 2018/src/main/java/callofduty/domain/enums/CommandType.java
d595e92834db056ed3116eb038fc855e9f4c4a81
[]
no_license
MinorGlitch/Java-Fundamentals
1a5ea6e0b1618060f6328deb0871f41081fdd9a4
090d61dea4fd7060c55f5594ba9ac9fac0a431e1
refs/heads/master
2020-03-17T12:15:54.440440
2018-08-13T11:50:10
2018-08-13T11:50:10
133,580,748
0
1
null
null
null
null
UTF-8
Java
false
false
253
java
package callofduty.domain.enums; public enum CommandType { AGENT, REQUEST, COMPLETE, STATUS, OVER; @Override public String toString() { return this.name().charAt(0) + this.name().substring(1).toLowerCase(); } }
[ "loveca001@gmail.com" ]
loveca001@gmail.com
e329ce66a27889673db69727b6e39e63d644fa7a
369dfba1fb831100f2322e221a9cd6029c0eb3e9
/app/src/main/java/com/app/macky/droidgency/SMSReceiver.java
cfcfa399eb188abf24f43d71ec6b69265fd80c90
[]
no_license
macmac04/Tabs
897db1e236087956517fdd5d99cc3b5201823b9b
7a7247caefdb97acfd33d502222d1aaf65feb5b0
refs/heads/master
2021-01-01T19:06:23.591570
2015-07-26T07:07:59
2015-07-26T07:07:59
39,716,670
0
0
null
null
null
null
UTF-8
Java
false
false
1,942
java
package com.app.macky.droidgency; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.telephony.SmsMessage; import android.util.Log; public class SMSReceiver extends BroadcastReceiver { public static final String SMS_RECEIVED = "android.provider.Telephony.SMS_RECEIVED"; @Override public void onReceive(Context ctx, Intent intent) { if (intent.getAction().equals(SMS_RECEIVED)) { /* Get SMS msg passed in */ Bundle bundle = intent.getExtras(); if(bundle != null) { Object[] pdus = (Object[]) bundle.get("pdus"); final SmsMessage[] msgs = new SmsMessage[pdus.length]; /* Retrieve SMS received */ for(int i = 0; i < pdus.length; i++) { msgs[i] = SmsMessage.createFromPdu((byte[]) pdus[i]); } /* Check if SMS is relevant (starts with [LIGHTHOUSE ALERT]) */ if(msgs.length > -1) { Log.i("SmsReceiver", "Message recieved: " + msgs[0].getMessageBody()); for(int k = 0; k < msgs.length; k++) { String m = msgs[k].getMessageBody(); if(m.startsWith(HomeFragment.beginText)) { Log.i("SmsReceiver", "Relevant! " + msgs[k].getMessageBody()); String type = m.substring(HomeFragment.beginText.length(), HomeFragment.beginText.length() + 1); Log.i("SmsReceiverB", type); String pNum = msgs[k].getOriginatingAddress(); pNum = pNum.replaceAll("[^\\d.]", ""); Intent iS = new Intent(ctx, UpdateDBService.class); iS.putExtra("type", type); iS.putExtra("num", pNum); ctx.startService(iS); /*Intent broadcastIntent = new Intent(); broadcastIntent.setAction("SMS_RECEIVED_ACTION"); broadcastIntent.putExtra("sms", m); ctx.sendBroadcast(broadcastIntent); */ } else { Log.i("SmsReceiver", "Not Relevant: " + msgs[k].getMessageBody()); } } } } } } }
[ "villaflormarkjoseph@gmail.com" ]
villaflormarkjoseph@gmail.com
1914de6ee53d6c3500697a639bd5258b74a2b0e5
091335568ea9f1410f63b94a755355decc2bbed0
/src/main/java/net/beyondcoding/codility/PassingCars.java
85a209340402ab85052b5f021a289829c2515581
[]
no_license
jenkins957/codility-solutions
3160aa416ed47cf6928a441024fb52a26cf8ddaa
7055487b8c74d9c4ae7e33362ff4848f4eb827cb
refs/heads/master
2023-02-03T18:27:03.173787
2020-12-17T14:28:33
2020-12-17T14:28:33
191,226,967
0
0
null
2020-10-13T13:59:38
2019-06-10T18:47:54
Java
UTF-8
Java
false
false
784
java
package net.beyondcoding.codility; /** * https://app.codility.com/programmers/lessons/5-prefix_sums/passing_cars/ */ public class PassingCars { private static final int MAX_PAIRS = 1_000_000_000; private static final int DRIVING_EAST = 0; private static final int DRIVING_WEST = 1; public int solution( int[] A ) { long pairs = 0; int westBound = 0; for ( int i = A.length - 1; i >= 0; i-- ) { if( A[i] == DRIVING_WEST ) { westBound++; } else if ( A[ i ] == DRIVING_EAST ) { pairs += westBound; } } if ( pairs > MAX_PAIRS ) { pairs = -1; } return ( int ) pairs; } }
[ "jenkins957@gmail.com" ]
jenkins957@gmail.com
669c5b2d6c7d523c1b14b070a8af91804b7de28a
a5ab614bcf2035410c911876997cf4551abc6651
/Cobalagi/app/src/main/java/com/example/cobalagi/LihatBiodataActivity.java
a0dbcb8f3b4afa2cb570dd0de9bdd6df1e898340
[]
no_license
KentaroAksyal/3sc1_pnj_t01_KentaroAksyal
6b69df3f25dd401c4a2a8b92f5005b1bee2be40b
75605758df5b150fbb611c5fe76821776908ba47
refs/heads/main
2023-02-15T20:03:35.795074
2021-01-18T07:50:52
2021-01-18T07:50:52
326,639,517
0
0
null
null
null
null
UTF-8
Java
false
false
2,533
java
package com.example.cobalagi; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.Toolbar; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.os.Bundle; import android.view.MenuItem; import android.widget.TextView; import com.example.cobalagi.helper.DataHelper; public class LihatBiodataActivity extends AppCompatActivity { protected Cursor cursor; DataHelper dataHelper; TextView txtNomor, txtNama, txtUsername, txtPassword, txtAlamat, txtJeniskelamin, txtTglLahir, txtVaksin; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_lihat_biodata); Toolbar toolbar = findViewById(R.id.toolbar); toolbar.setTitle("Lihat Biodata"); //setSupportActionBar(toolbar); assert getSupportActionBar() != null; getSupportActionBar().setDisplayHomeAsUpEnabled(true); dataHelper = new DataHelper(this); txtNomor = findViewById(R.id.txtValueNomor); txtAlamat = findViewById(R.id.txtValueAlamat); txtJeniskelamin = findViewById(R.id.txtValueJenisKelamin); txtNama = findViewById(R.id.txtValueName); txtPassword = findViewById(R.id.txtValuePassword); txtTglLahir = findViewById(R.id.txtValueTglLahir); txtUsername = findViewById(R.id.txtValueUsername); txtVaksin = findViewById(R.id.textValueVaksin); SQLiteDatabase db = dataHelper.getReadableDatabase(); cursor = db.rawQuery("SELECT no, username, password, nama, tgl, jk, alamat,vaksinisasi FROM biodata WHERE nama = '" + getIntent().getStringExtra("nama") + "'", null); cursor.moveToFirst(); if (cursor.getCount() > 0) { cursor.moveToPosition(0); txtNomor.setText(cursor.getString(0)); txtAlamat.setText(cursor.getString(6)); txtJeniskelamin.setText(cursor.getString(5)); txtNama.setText(cursor.getString(3)); txtPassword.setText(cursor.getString(2)); txtTglLahir.setText(cursor.getString(4)); txtUsername.setText(cursor.getString(1)); txtVaksin.setText(cursor.getString(7)); } } @Override public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == android.R.id.home) { finish(); return true; } return super.onOptionsItemSelected(item); } }
[ "kentaaksyal@gmail.com" ]
kentaaksyal@gmail.com
c336959c669276c648aaab06762778a098c3c129
4e2ca98705ade4fbe272f3f8869181d601a29e5f
/src/test/java/AplicaçãoWEB/Cadastro.java
3d1b06ebb0f9bc87a8590abe434c66b51d4b49bd
[]
no_license
feliciojr92/Turma2_Bootcamp_Yaman_Trios
26f994002f1601f720d108718923ca3d8d32e366
786b683ffcb465640066d72814990b4f61a31242
refs/heads/master
2023-04-26T08:34:59.569288
2021-05-26T00:15:55
2021-05-26T00:15:55
370,859,898
0
0
null
null
null
null
UTF-8
Java
false
false
47
java
package PACKAGE_NAME;public class Cadastro { }
[ "rm81599@fiap.com.br" ]
rm81599@fiap.com.br
8248039e69d207d912262e74deefa5396697e23d
c4485c67c3ee9b8b1f9dde8daea7d5996881a0bf
/src/test/java/StepDefinitions/_12_JDBCSteps.java
3d7247ef83a438d2c3f188a4f8ad702ea3692e59
[]
no_license
emircaglar/Cucumber_Wieder
3940efac4d43b1d0c040f2ffa60bc29d55c03ca6
eac731803e5d68c2d2ea150220dc683422f99e30
refs/heads/master
2023-06-29T11:45:55.342004
2021-07-28T12:25:40
2021-07-28T12:25:40
385,729,378
0
0
null
null
null
null
UTF-8
Java
false
false
944
java
package StepDefinitions; import Pages.DialogContent; import Utilities.DB_Utilities; import cucumber.api.java.en.Then; import org.openqa.selenium.WebElement; import org.testng.Assert; import java.util.List; public class _12_JDBCSteps { @Then("^Send the query the database \"([^\"]*)\" and control match$") public void sendTheQueryTheDatabaseAndControlMatch(String query) { List<List<String>> dbList= DB_Utilities.getListData(query); System.out.println("dbList = " + dbList); // database // Web list DialogContent dc=new DialogContent(); List<WebElement> UnitList=dc.waitUntilAllElementvisible(dc.nameList); for (WebElement e:UnitList ) { System.out.println("e.getText() = " + e.getText()); } for (int i = 0; i <dbList.size() ; i++) { Assert.assertEquals(dbList.get(i).get(1),UnitList.get(i).getText()); } } }
[ "emircaglar2906@gmail.com" ]
emircaglar2906@gmail.com
f36ce5061c391cf494946ab99d06caa3aab4bc12
01b6d0cd22bbccec68b453125a53d3c677680f20
/src/kiemtra/DAO.java
b63852a059f7247db4809c58cb166f9955417f05
[]
no_license
tuananh00298/baikiemtra
6412116672557aa122dc242b3d0a32369a6a5ba7
1a2726879f6b29f33f736e54302b14b5d975502c
refs/heads/master
2021-01-19T22:13:25.452739
2017-04-19T17:01:45
2017-04-19T17:01:45
88,769,390
0
0
null
null
null
null
UTF-8
Java
false
false
727
java
package kiemtra; /* * 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. */ //anhntd00298 import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; /** * * @author tuana */ public class DAO { public static Connection getConnection() throws SQLException { String connectionString = GlobalConfig.getCONNECTION_URL_PREFIX() + GlobalConfig.getHOST() + GlobalConfig.getDATABASE(); // System.out.println(connectionString); return DriverManager.getConnection(connectionString, GlobalConfig.getUSERNAME(), GlobalConfig.getPASSWORD()); } }
[ "anhntd00298@fpt.edu.vn" ]
anhntd00298@fpt.edu.vn
83b67bba49804bc619a9087315fb6463bcbf06b0
bbe84e35ca7b2f003271c133159443a33b954a89
/Cerner Interview Questions/src/com/repeatedSubSting/RepeatedSubstring.java
1d91991f72f5a8b55196b4d539666709af2e09ca
[]
no_license
manideepreddynukala/InterviewQuestions
81e2be87447e26d24df873c1354b9ccdf865424d
8f33ca38ec31766b01388cff91de4033450a0921
refs/heads/master
2020-09-10T18:01:19.824914
2019-10-16T00:46:48
2019-10-16T00:46:48
221,788,438
0
0
null
2019-11-14T21:17:49
2019-11-14T21:17:48
null
UTF-8
Java
false
false
967
java
package com.repeatedSubSting; public class RepeatedSubstring { static int[] computeLPSArray(String str, int M,int lps[]) { int len = 0; int i; lps[0] = 0; // lps[0] is always 0 i = 1; while (i < M) { if (str.charAt(i) == str.charAt(len)) { len++; lps[i] = len; i++; } else { if (len != 0) { len = lps[len-1]; } else { lps[i] = 0; i++; } } } return lps; } static int isRepeat(String str) { int n = str.length(); int lps[] = new int[n]; int arr[] = computeLPSArray(str, n, lps); int len = arr[n-1]; if(len > 0 && n%(n-len) == 0) return n/(n-len); return -1; } public static void main(String[] args) { String txt[] = {"GEEKGGEEK", "ABABAB", "ABCDABCD", "GEEKSFORGEEKS", "GEEKGEEK", "AAAACAAAAC", "ABCDABC"}; int n = txt.length; for (int i = 0; i < n; i++) { System.out.println(isRepeat(txt[i])); } } }
[ "chitaliya.nisarg4@gmail.com" ]
chitaliya.nisarg4@gmail.com
e2b9af1ba445d91d53336125ec873972d2d66438
54a0b2133ebaadf88a920479f89f77260942af11
/src/com/syntax/class25/FinalParentClass.java
922196f0cb2b033123365df945dafff585c671af
[]
no_license
JustFatCat/JavaBatch8
162a28917b1f5d7a5961873702dcbc2f145f4469
08d2eea2664d3fca10d7d36d23ebc9f7e0de36fb
refs/heads/main
2023-01-20T12:35:59.876122
2020-12-03T13:54:55
2020-12-03T13:54:55
304,907,925
0
0
null
null
null
null
UTF-8
Java
false
false
235
java
package com.syntax.class25; public class FinalParentClass { String name; public FinalParentClass(String name) { this.name = name; } public void printName(){ System.out.println("Name " + name); } }
[ "natalis200623@gmail.com" ]
natalis200623@gmail.com
01bd7a70beabf686a3cf5fe7321e5e5a942a23d2
349c7a3cc91d89ba760eb7810750fc38c543afca
/sscafter/src/main/java/com/lovo/sscafter/upperAndLowerGoods/dao/impl/GoodsQueryDaoImpl.java
f4aa9b84ea28aee398dabc1de904d2832bfd8b24
[]
no_license
MartinL100/mall
f86b057439d06958ccab10db30de0c636011aa23
a42172427f8957bc44601c304b94d3f34e4d994d
refs/heads/master
2022-08-11T01:59:50.355943
2019-08-13T07:39:01
2019-08-13T07:39:01
199,815,691
0
0
null
2022-06-17T02:25:09
2019-07-31T08:40:51
CSS
UTF-8
Java
false
false
3,409
java
package com.lovo.sscafter.upperAndLowerGoods.dao.impl; import com.lovo.sscafter.upperAndLowerGoods.dao.IGoodsQueryDao; import com.lovo.sscafter.upperAndLowerGoods.entity.GoodsEntity; import com.lovo.sscafter.upperAndLowerGoods.util.StringUtil; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; import org.springframework.stereotype.Repository; import javax.persistence.EntityManager; import javax.persistence.Query; import java.util.List; @Repository(value="goodsQueryDao") public class GoodsQueryDaoImpl implements IGoodsQueryDao { @Autowired private LocalContainerEntityManagerFactoryBean entityManagerFactory; //获得entityManager public EntityManager getEntityManager() { return entityManagerFactory.getObject().createEntityManager(); } public List<GoodsEntity> getGoodsList(int page,int rows,String goodsState, String goodsType, String goodsBooking, String goodsName) { String hql="from GoodsEntity where 1=1 "; if(!StringUtil.blString(goodsState)){ hql+=" and goodsState=:goodsState"; } if(!"不限".equals(goodsType)&&!StringUtil.blString(goodsType)){ hql+=" and goodsType=:goodsType"; } if(!"不限".equals(goodsBooking)&&!StringUtil.blString(goodsBooking)){ hql+=" and goodsBooking=:goodsBooking"; } if(!StringUtil.blString(goodsName)){ hql+=" and goodsName like '%"+goodsName+"%'"; } Query query= getEntityManager().createQuery(hql); if(!StringUtil.blString(goodsState)){ query.setParameter("goodsState",goodsState); } if(!"不限".equals(goodsType)&&!StringUtil.blString(goodsType)){ query.setParameter("goodsType",goodsType); } if(!"不限".equals(goodsBooking)&&!StringUtil.blString(goodsBooking)){ query.setParameter("goodsBooking",goodsBooking); } // if(!StringUtil.blString(goodsName)){ // query.setParameter("goodsName",goodsName); // } return query.setFirstResult(page).setMaxResults(rows).getResultList(); } @Override public long getGoodsCount(String goodsState, String goodsType, String goodsBooking, String goodsName) { String hql="select count(*) from GoodsEntity where 1=1"; if(!StringUtil.blString(goodsState)){ hql+=" and goodsState=:goodsState"; } if(!"不限".equals(goodsType)&&!StringUtil.blString(goodsType)){ hql+=" and goodsType=:goodsType"; } if(!"不限".equals(goodsBooking)&&!StringUtil.blString(goodsBooking)){ hql+=" and goodsBooking=:goodsBooking"; } if(!StringUtil.blString(goodsName)){ hql+=" and goodsName like '%"+goodsName+"%'"; } Query query= getEntityManager().createQuery(hql); if(!StringUtil.blString(goodsState)){ query.setParameter("goodsState",goodsState); } if(!"不限".equals(goodsType)&&!StringUtil.blString(goodsType)){ query.setParameter("goodsType",goodsType); } if(!"不限".equals(goodsBooking)&&!StringUtil.blString(goodsBooking)){ query.setParameter("goodsBooking",goodsBooking); } return (long) query.getSingleResult(); } }
[ "394241176@qq.com" ]
394241176@qq.com
dccf175a3484a2896192d879779b76f03fcba21d
8e088b3f7ebe71b5918097cf0093e59b5655afff
/server/src/main/java/com/agilexp/controller/exercise/PrivateSourceController.java
6b271810f93d13ce5e8c8d69dc0f4db1b5fa16d0
[]
no_license
toma-s/agile-xp
c48e31989f4923dee0938d4fbebb21333da0c169
47763318a85352f15e5ec4fdec7f1f965c7f472d
refs/heads/master
2023-01-07T21:41:53.838405
2019-06-25T07:47:30
2019-06-25T07:47:30
163,991,630
0
0
null
2023-01-07T03:00:18
2019-01-03T15:41:02
Java
UTF-8
Java
false
false
1,984
java
package com.agilexp.controller.exercise; import com.agilexp.dbmodel.exercise.PrivateSource; import com.agilexp.service.exercise.PrivateSourceServiceImpl; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import java.util.ArrayList; import java.util.List; import java.util.Optional; @CrossOrigin(origins = "http://localhost:4200") @RestController @RequestMapping("/api") public class PrivateSourceController { @Autowired private PrivateSourceServiceImpl service; @PostMapping(value = "/private-sources/create") public ResponseEntity<PrivateSource> postPrivateSource(@RequestBody PrivateSource privateSource) { PrivateSource newPrivateSource = service.create(privateSource); return new ResponseEntity<>(newPrivateSource, HttpStatus.CREATED); } @GetMapping(value="/private-sources/exercise/{exerciseId}") public ResponseEntity<List<PrivateSource>> getPrivateSourcesByExerciseId(@PathVariable("exerciseId") long exerciseId) { List<PrivateSource> privateSources = service.getByExerciseId(exerciseId); return new ResponseEntity<>(privateSources, HttpStatus.OK); } @PutMapping("/private-sources/{id}") public ResponseEntity<PrivateSource> updatePrivateSource(@PathVariable("id") long id, @RequestBody PrivateSource privateSource) { if (service.update(id, privateSource)) { return new ResponseEntity<>(HttpStatus.OK); } return new ResponseEntity<>(HttpStatus.NOT_FOUND); } @DeleteMapping("/private-sources/{exerciseId}") public ResponseEntity<String> deleteByExerciseId(@PathVariable("exerciseId") long exerciseId) { service.deleteByExerciseId(exerciseId); return new ResponseEntity<>(String.format("Private sources from exercise id %s have been deleted", exerciseId), HttpStatus.OK); } }
[ "toma.savkova@gmail.com" ]
toma.savkova@gmail.com
5e513a46573110ff1e83009707586d5046ec93ba
753458bb1ef870387666f338449521c2985d8f0a
/src-app/hu/scelight/gui/overlaycard/LastGameInfoOverlay.java
1881b8620586a7ce80020c91afba6d00c300194f
[ "Apache-2.0" ]
permissive
icza/scelight
f4f7099404077f994aa9c4738a0d38a6b29fe702
7360c30765c9bc2f25b069da4377b37e47d4b426
refs/heads/master
2022-08-23T09:15:32.451515
2022-08-12T13:35:16
2022-08-12T13:35:16
51,061,294
128
23
Apache-2.0
2023-09-12T20:20:51
2016-02-04T08:04:52
Java
UTF-8
Java
false
false
7,458
java
/* * Project Scelight * * Copyright (c) 2013 Andras Belicza <iczaaa@gmail.com> * * This software is the property of Andras Belicza. * Copying, modifying, distributing, refactoring without the author's permission * is prohibited and protected by Law. */ package hu.scelight.gui.overlaycard; import hu.scelight.action.Actions; import hu.scelight.gui.icon.Icons; import hu.scelight.gui.page.repanalyzer.UserColoredTableRenderer; import hu.scelight.sc2.rep.factory.RepParserEngine; import hu.scelight.sc2.rep.repproc.RepProcessor; import hu.scelight.sc2.rep.repproc.User; import hu.scelight.service.env.Env; import hu.scelight.service.settings.Settings; import hu.scelight.util.Utils; import hu.scelightapi.gui.overlaycard.OverlayCardParams; import hu.sllauncher.gui.comp.BorderPanel; import hu.sllauncher.gui.comp.XButton; import hu.sllauncher.gui.comp.XLabel; import hu.sllauncher.gui.comp.table.XTable; import hu.sllauncher.util.gui.RenderablePair; import hu.sllauncher.util.gui.adapter.ActionAdapter; import java.awt.Color; import java.awt.Cursor; import java.awt.FlowLayout; import java.awt.event.ActionEvent; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseListener; import java.nio.file.Path; import java.util.Vector; import java.util.concurrent.atomic.AtomicReference; import javax.swing.Box; import javax.swing.JPanel; import javax.swing.Timer; /** * Last game info overlay card. * * @author Andras Belicza */ @SuppressWarnings( "serial" ) public class LastGameInfoOverlay extends OverlayCard { /** Instance reference. */ private static final AtomicReference< LastGameInfoOverlay > INSTANCE = new AtomicReference<>(); /** * Returns the instance reference. * * @return the instance reference */ public static LastGameInfoOverlay INSTANCE() { return INSTANCE.get(); } /** Overlay card parameters. */ private static final OverlayCardParams PARAMS = new OverlayCardParams(); static { PARAMS.settings = Env.APP_SETTINGS; PARAMS.centerXSetting = Settings.LGI_OVERLAY_CENTER_X; PARAMS.centerYSetting = Settings.LGI_OVERLAY_CENTER_Y; PARAMS.opacitySetting = Settings.LGI_OVERLAY_OPACITY; PARAMS.lockedSetting = Settings.LGI_OVERLAY_LOCKED; PARAMS.focusableSetting = Settings.LGI_OVERLAY_FOCUSABLE; PARAMS.allowOutMainScrSetting = Settings.LGI_OVERLAY_ALLOW_OUT_MAIN_SCR; } /** Last replay file whose info to show. */ private final Path replayFile; /** Timer to close the overlay. */ private final Timer timer; /** (Auto) closer button. */ private final XButton closeButton = new XButton( Icons.F_CROSS.get() ); /** Time remaining to auto-close the overlay. */ private int autoCloseSec = 13; /** * Creates a new {@link LastGameInfoOverlay}. * * @param replayFile last replay file whose info to show */ public LastGameInfoOverlay( final Path replayFile ) { super( PARAMS ); INSTANCE.set( this ); this.replayFile = replayFile; titleLabel.setIcon( Icons.F_INFORMATION_BALLOON.get() ); titleLabel.setText( "Last Game Info" ); titleLabel.allBorder( 3 ); buildGui(); packAndPosition(); setVisible( true ); timer = new Timer( 1000, new ActionAdapter( true ) { @Override public void actionPerformed( final ActionEvent event ) { // We're in the EDT (due to swing Timer) if ( autoCloseSec == 0 ) { close(); return; } closeButton.setText( "_Closing in " + autoCloseSec-- + " sec" ); } } ); timer.start(); } /** * Builds the GUI of the tab. */ private void buildGui() { // Stop the count down if clicked final MouseListener stopperMouseListener = new MouseAdapter() { @Override public void mousePressed( final MouseEvent event ) { if ( !timer.isRunning() ) return; timer.stop(); closeButton.setText( "_Close" ); } }; final RepProcessor repProc = RepParserEngine.getRepProc( replayFile ); if ( repProc == null ) { final XLabel label = new XLabel( "Failed to parse replay!" ).allBorder( 15 ).boldFont().italicFont().color( Color.RED ); cp.addCenter( label ); label.setCursor( Cursor.getDefaultCursor() ); label.addMouseListener( stopperMouseListener ); } else { autoCloseSec += repProc.playerUsers.length; final XTable table = new XTable(); final Vector< Object > columns = Utils.vector( "User Color", "T", "Player", "", "", "", "APM", "SPM", "SQ", "SC%", "Lvl", "Dir" ); final int userColorColIdx = 0; table.setTableCellRenderer( new UserColoredTableRenderer( table, userColorColIdx ) ); final Vector< Vector< Object > > data = new Vector<>(); for ( final User u : repProc.playerUsers ) { final Vector< Object > row = new Vector<>( columns.size() ); row.add( u.getPlayerColor().darkerColor ); row.add( u.slot.teamId + 1 ); row.add( new RenderablePair<>( u.getPlayerColor().icon, u.fullName ) ); row.add( u.player.race.ricon.get() ); row.add( u.player.getResult().ricon.get() ); row.add( u.uid == null ? null : u.uid.getHighestLeague().ricon.get() ); row.add( u.apm ); row.add( u.spm ); row.add( u.sq ); row.add( Env.LANG.formatNumber( u.supplyCappedPercent, 2 ) + '%' ); row.add( u.uid == null ? null : u.uid.getCombinedRaceLevels() ); row.add( u.startDirection ); data.add( row ); } table.getXTableModel().setDataVector( data, columns ); table.pack(); table.setSortable( false ); table.removeColumn( table.getColumnModel().getColumn( userColorColIdx ) ); // Hide color column table.getTableHeader().addMouseListener( stopperMouseListener ); table.addMouseListener( stopperMouseListener ); final Box box = Box.createVerticalBox(); final XLabel infoLabel = new XLabel( "Length: " + repProc.formatLoopTime( repProc.replay.header.getElapsedGameLoops() ) ); infoLabel.addMouseListener( stopperMouseListener ); box.add( new BorderPanel( infoLabel ) ); box.setCursor( Cursor.getDefaultCursor() ); box.add( table.getTableHeader() ); box.add( table ); cp.addCenter( box ); } final JPanel buttonsPanel = new JPanel( new FlowLayout( FlowLayout.RIGHT, 0, 0 ) ); if ( repProc != null ) { final XButton openButton = new XButton( "_Open", Icons.F_CHART.get() ); openButton.setCursor( Cursor.getDefaultCursor() ); openButton.addActionListener( new ActionAdapter() { @Override public void actionPerformed( final ActionEvent event ) { Actions.SHOW_MAIN_FRAME.actionPerformed( event ); Env.MAIN_FRAME.repAnalyzersPage.newRepAnalyzerPage( replayFile, true ); close(); } } ); buttonsPanel.add( openButton ); } closeButton.setCursor( Cursor.getDefaultCursor() ); closeButton.addActionListener( new ActionAdapter() { @Override public void actionPerformed( final ActionEvent event ) { close(); } } ); buttonsPanel.add( closeButton ); cp.addSouth( buttonsPanel ); addMouseListener( stopperMouseListener ); configButton.addMouseListener( stopperMouseListener ); } @Override protected void customOnClose() { timer.stop(); INSTANCE.set( null ); } }
[ "iczaaa@gmail.com" ]
iczaaa@gmail.com
7a5747c94c5a9db280c46bab9f3feff2c1bcf638
2e7aae415774519ed3064c1d952c47cf32635e68
/demo-mp-server/src/main/java/com/dome/mp/server/web/interceptor/DefaultInterceptor.java
402fd4d29ff67c6cfd0a23463c54e40b05ed138c
[]
no_license
Starlight-tanxin/codebase
4571af9b14b59a072d4c06c75f706041fe20ed1c
280a4adc62c17f07dc9b1dee4bce06880d0cd61f
refs/heads/master
2022-06-28T12:50:28.086580
2021-04-14T06:20:25
2021-04-14T06:20:25
161,034,393
0
1
null
2022-06-17T03:30:38
2018-12-09T11:57:56
Java
UTF-8
Java
false
false
742
java
package com.dome.mp.server.web.interceptor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; import org.springframework.web.servlet.HandlerInterceptor; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * 默认拦截器 * * @author TanXin */ @Slf4j @Component public class DefaultInterceptor implements HandlerInterceptor { @Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { return true; } @Override public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception { } }
[ "tanxin_java@163.com" ]
tanxin_java@163.com
c21fbe4dc736eec6af8767cfefee6eaada90969f
aad69e95bf51e4e0d6533f3aaa814ed14d02e672
/lib/plantuml-7746/src/net/sourceforge/plantuml/cucadiagram/dot/LabelBuilderHtmlHeaderTableForObjectOrClass.java
4de2aa5f983fd2af62ce18908fb4329316ad3aa7
[]
no_license
amercier/seeduml
2eb54e2b0aa3144c97c2e1b3ca28c63105cd1d01
6712dd306c391a739d3d29b66e5c1cdc4ed17d03
refs/heads/master
2016-08-04T17:11:50.336908
2012-05-16T16:06:19
2012-05-16T16:06:19
4,147,293
1
0
null
null
null
null
UTF-8
Java
false
false
4,805
java
/* ======================================================================== * PlantUML : a free UML diagram generator * ======================================================================== * * (C) Copyright 2009-2012, Arnaud Roques * * Project Info: http://plantuml.sourceforge.net * * This file is part of PlantUML. * * PlantUML is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * PlantUML 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 library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, * USA. * * [Java is a trademark or registered trademark of Sun Microsystems, Inc. * in the United States and other countries.] * * Original Author: Arnaud Roques * * Revision $Revision: 6295 $ * */ package net.sourceforge.plantuml.cucadiagram.dot; import java.io.IOException; import net.sourceforge.plantuml.ColorParam; import net.sourceforge.plantuml.FileFormat; import net.sourceforge.plantuml.cucadiagram.IEntity; class LabelBuilderHtmlHeaderTableForObjectOrClass extends DotCommon implements LabelBuilder { private final IEntity entity; private final String circleAbsolutePath; private final int spring; private final BorderMode borderMode; private final boolean classes; LabelBuilderHtmlHeaderTableForObjectOrClass(FileFormat fileFormat, DotData data, IEntity entity, final String circleAbsolutePath, int spring, boolean classes, BorderMode borderMode) { super(fileFormat, data); this.entity = entity; this.circleAbsolutePath = circleAbsolutePath; this.classes = classes; this.borderMode = borderMode; this.spring = spring; } public void appendLabel(StringBuilder sb) throws IOException { if (spring == 0) { htmlHeaderTableForObjectOrClassOrInterfaceOrEnumNoSpring(sb, 0); return; } if (borderMode == BorderMode.NO_BORDER) { sb.append("<TABLE BORDER=\"0\" CELLBORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\">"); } else if (borderMode == BorderMode.NO_BORDER_CELLSPACING_OLD) { sb.append("<TABLE BORDER=\"0\" CELLBORDER=\"0\" CELLSPACING=\"1\" CELLPADDING=\"1\">"); } else if (borderMode == BorderMode.NO_BORDER_CELLSPACING_NEW) { final String stereo = entity.getStereotype() == null ? null : entity.getStereotype().getLabel(); sb.append("<TABLE BORDER=\"1\" CELLBORDER=\"0\" CELLSPACING=\"1\" CELLPADDING=\"1\" "); sb.append("COLOR=" + getColorString(ColorParam.classBorder, stereo) + " BGCOLOR=" + getColorString(ColorParam.classBackground, stereo)); sb.append(">"); } else if (borderMode == BorderMode.BORDER_1_WITHOUT_COLOR) { sb.append("<TABLE BORDER=\"1\" CELLBORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\" "); sb.append(">"); } else if (borderMode == BorderMode.BORDER_1_WITH_COLOR) { final String stereo = entity.getStereotype() == null ? null : entity.getStereotype().getLabel(); sb.append("<TABLE BORDER=\"1\" CELLBORDER=\"0\" CELLSPACING=\"0\" CELLPADDING=\"0\" "); sb.append("COLOR=" + getColorString(ColorParam.classBorder, stereo) + " BGCOLOR=" + getColorString(ColorParam.classBackground, stereo)); sb.append(">"); } else { throw new IllegalStateException(); } sb.append("<TR>"); for (int i = 0; i < spring; i++) { sb.append("<TD></TD>"); } if (circleAbsolutePath != null) { appendImageAsTD(sb, circleAbsolutePath); } sb.append("<TD>"); appendLabelAndStereotype(entity, sb, classes); sb.append("</TD>"); for (int i = 0; i < spring; i++) { sb.append("<TD></TD>"); } sb.append("</TR></TABLE>"); } private void htmlHeaderTableForObjectOrClassOrInterfaceOrEnumNoSpring(StringBuilder sb, int cellSpacing) throws IOException { sb.append("<TABLE BORDER=\"0\" CELLBORDER=\"0\" CELLSPACING=\"" + cellSpacing + "\" CELLPADDING=\"0\">"); sb.append("<TR>"); if (circleAbsolutePath == null) { sb.append("<TD>"); } else { if (getData().getDpi() == 96) { sb.append("<TD ALIGN=\"RIGHT\">"); sb.append("<IMG SRC=\"" + circleAbsolutePath + "\"/></TD>"); } else { addTdImageBugB1983(sb, circleAbsolutePath); } sb.append("<TD ALIGN=\"LEFT\">"); } appendLabelAndStereotype(entity, sb, classes); sb.append("</TD></TR></TABLE>"); } }
[ "alexandre.mercier12@gmail.com" ]
alexandre.mercier12@gmail.com
cf5961dee26786ca3b61b13512fb9261c15f7c4c
5fb7090a6ac9d7119833bc9f4ef692bc7b05614c
/server/web-socket/src/main/java/cc/blynk/server/websocket/handlers/WebSocketEncoder.java
dda6f1d1b3a7e8bc9e1ba1cb0afcffe75be869a8
[ "MIT" ]
permissive
ceviana/blynk-server
4f431872eb190c1b734fe4f675f6a81a07a6fd6e
9c5406639fd0e2871789035da15313f3bca5e2e5
refs/heads/master
2021-01-17T23:18:48.728053
2016-01-26T18:57:22
2016-01-26T18:57:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,440
java
package cc.blynk.server.websocket.handlers; import cc.blynk.server.core.protocol.enums.Command; import cc.blynk.server.core.protocol.model.messages.MessageBase; import cc.blynk.server.core.stats.GlobalStats; import io.netty.buffer.Unpooled; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.MessageToMessageEncoder; import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame; import java.nio.ByteBuffer; import java.util.List; /** * The Blynk Project. * Created by Dmitriy Dumanskiy. * Created on 15.01.16. */ public class WebSocketEncoder extends MessageToMessageEncoder<MessageBase> { private final GlobalStats stats; public WebSocketEncoder(GlobalStats stats) { this.stats = stats; } @Override protected void encode(ChannelHandlerContext ctx, MessageBase msg, List<Object> out) throws Exception { stats.mark(msg.command); //todo finish and optimize. ByteBuffer bb; if (msg.command == Command.RESPONSE) { bb = ByteBuffer.allocate(5); } else { bb = ByteBuffer.allocate(5 + msg.length); } bb.put((byte) msg.command); bb.putShort((short) msg.id); bb.putShort((short) msg.length); byte[] data = msg.getBytes(); if (data != null) { bb.put(data); } out.add(new BinaryWebSocketFrame(Unpooled.wrappedBuffer(bb.array()))); } }
[ "doom369@gmail.com" ]
doom369@gmail.com
1b5b19e64c0c45191539f38d1861001e99a3a61b
8855af42fa56e7f03804ddc69e47357706065592
/app/src/main/java/com/yyide/doorcontrol/activity/TodayAppointmentActivity.java
3a94d6ceb6e179e0b784e6358170322dbea4ce87
[]
no_license
601189170/DoorControl2
2328a56193f0b8dff750d12c5d3fa7fb9357c3c2
9e8c947e272e43e743c8c51f053526a3844d090f
refs/heads/master
2022-12-13T20:15:31.997591
2020-09-21T11:06:19
2020-09-21T11:06:19
295,672,560
0
0
null
null
null
null
UTF-8
Java
false
false
6,725
java
package com.yyide.doorcontrol.activity; import android.os.Bundle; import android.os.Handler; import android.os.Message; import android.support.annotation.Nullable; import android.util.Log; import android.view.View; import android.widget.LinearLayout; import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; import com.alibaba.fastjson.JSON; import com.android.volley.Response; import com.android.volley.VolleyError; import com.blankj.utilcode.util.SPUtils; import com.yyide.doorcontrol.MyApp; import com.yyide.doorcontrol.R; import com.yyide.doorcontrol.SpData; import com.yyide.doorcontrol.adapter.MTListAdapter; import com.yyide.doorcontrol.base.BaseActivity; import com.yyide.doorcontrol.base.BaseConstant; import com.yyide.doorcontrol.mina.MinaEventType; import com.yyide.doorcontrol.requestbean.GetTodayReservationListReq; import com.yyide.doorcontrol.rsponbean.GetTodayReservationListRsp; import com.yyide.doorcontrol.view.MultiStateView; import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; import java.util.ArrayList; import java.util.List; import butterknife.BindView; import butterknife.ButterKnife; import butterknife.OnClick; /** * 今日预约界面 */ public class TodayAppointmentActivity extends BaseActivity { @BindView(R.id.ll_back) LinearLayout llBack; @BindView(R.id.title) TextView title; @BindView(R.id.list) ListView list; MTListAdapter adapter; @BindView(R.id.tx1) TextView tx1; @BindView(R.id.tx2) TextView tx2; @BindView(R.id.tx3) TextView tx3; @BindView(R.id.tx4) TextView tx4; @BindView(R.id.mu) MultiStateView mu; Handler handler = new Handler() { @Override public void handleMessage(Message msg) { super.handleMessage(msg); } }; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_today_appointment); ButterKnife.bind(this); adapter = new MTListAdapter(); list.setAdapter(adapter); mu.findViewById(R.id.retry).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { getData(); } }); EventBus.getDefault().register(this); handler.postDelayed(runnable, 6000 * 10 * 60 * 5); } @Subscribe(threadMode = ThreadMode.MAIN) public void Event(MinaEventType messageEvent) { if (messageEvent.i == 10) { Log.e("TAG", "Event:收到推送" + messageEvent.i); getData(); } } Runnable runnable = new Runnable() { @Override public void run() { getData(); handler.postDelayed(runnable, 6000 * 10 * 60 * 5); } }; @Override protected void onResume() { super.onResume(); getData(); } @Override protected void onDestroy() { super.onDestroy(); handler.removeCallbacks(runnable); handler.removeCallbacksAndMessages(null); EventBus.getDefault().unregister(this);//反注册EventBus } @OnClick(R.id.ll_back) public void onViewClicked(View view) { switch (view.getId()) { case R.id.ll_back: finish(); break; } } void getData() { mu.setViewState(MultiStateView.VIEW_STATE_LOADING); GetTodayReservationListReq req = new GetTodayReservationListReq(); req.officeId = SpData.User().data.officeId; req.roomId = SpData.User().data.roomId; //直接使用预约系统的接口 MyApp.getInstance().requestYySystemData(this, req, new sListener(), new Error()); } class sListener implements Response.Listener<GetTodayReservationListRsp> { @Override public void onResponse(GetTodayReservationListRsp rsp) { if (rsp.status == BaseConstant.REQUEST_SUCCES) { Log.e("TAG", "rererererere: " + JSON.toJSONString(rsp)); SPUtils.getInstance().put(SpData.ReservationList, JSON.toJSONString(rsp)); int type = 0; if (rsp.data.size() > 0) { type = setData(rsp); mu.setViewState(MultiStateView.VIEW_STATE_CONTENT); } else { mu.setViewState(MultiStateView.VIEW_STATE_EMPTY); } adapter.list.clear(); Log.e("TAG", "sListener: " + type); adapter.notfyData(rsp.data, type); } else { mu.setViewState(MultiStateView.VIEW_STATE_ERROR); Toast.makeText(TodayAppointmentActivity.this, rsp.info, Toast.LENGTH_SHORT).show(); } } } class Error implements Response.ErrorListener { @Override public void onErrorResponse(VolleyError volleyError) { mu.setViewState(MultiStateView.VIEW_STATE_ERROR); } } int setData(GetTodayReservationListRsp rsp) { //会议 List<String> list1 = new ArrayList<>(); //教学 List<String> list2 = new ArrayList<>(); int type = 0; for (GetTodayReservationListRsp.DataBean datum : rsp.data) { if (datum.meetType.equals("会议")) { list1.add(datum.name); } else { list2.add(datum.name); } } if (list1.size() > 0 && list2.size() > 0) { title.setText("今日预约列表"); tx1.setText("预约主题"); tx2.setVisibility(View.VISIBLE); tx3.setVisibility(View.VISIBLE); tx3.setText("时间"); tx4.setText("组织者"); type = 3; } else if (list1.size() > 0 && list2.size() == 0) { title.setText("今日会议列表"); tx1.setText("会议主题"); tx2.setVisibility(View.GONE); tx3.setVisibility(View.VISIBLE); tx3.setText("时间"); tx4.setText("组织者"); type = 1; } else if (list1.size() == 0 && list2.size() > 0) { title.setText("今日教学列表"); tx1.setText("教学主题"); tx2.setVisibility(View.VISIBLE); tx3.setVisibility(View.VISIBLE); tx3.setText("节次"); tx4.setText("组织者"); type = 2; } Log.e("TAG", "list1: " + JSON.toJSON(list1)); Log.e("TAG", "list2: " + JSON.toJSON(list2)); return type; } }
[ "674382040@qq.com" ]
674382040@qq.com
94f224a52b1083f1127ed17fb38cb0597facd425
ea19c7ef80f129e0a2c257dcc0022b8fb2975c42
/Baby/src/baby/pages/content/MeasureListPage.java
a208006b5f6ea772f21a2c60af060568e1016897
[]
no_license
davidcai/vel
5bd46fcd9a98f8a803f62ba8ffa44346ecde1490
684c7f5ecee54de1970a3bfc2c8d292f4a7a48de
refs/heads/master
2020-04-15T06:39:02.971804
2013-01-29T07:34:01
2013-01-29T07:34:01
6,397,138
0
0
null
null
null
null
UTF-8
Java
false
false
3,021
java
package baby.pages.content; import java.util.List; import java.util.UUID; import samoyan.controls.DataTableControl; import samoyan.controls.LinkToolbarControl; import samoyan.core.ParameterMap; import samoyan.servlet.exc.RedirectException; import baby.database.Measure; import baby.database.MeasureStore; import baby.pages.BabyPage; public class MeasureListPage extends BabyPage { public static final String COMMAND = BabyPage.COMMAND_CONTENT + "/measure-list"; public static final String PARAM_ID = "id"; @Override public void validate() throws Exception { } @Override public void renderHTML() throws Exception { new LinkToolbarControl(this) .addLink(getString("content:MeasureList.NewMeasure"), getPageURL(MeasurePage.COMMAND), "icons/standard/pencil-16.png") .render(); List<UUID> measureIDs = MeasureStore.getInstance().getAll(); if (measureIDs.isEmpty()) { writeEncode(getString("content:MeasureList.NoMeasuresDefined")); return; } writeFormOpen(); new DataTableControl<UUID>(this, "measures", measureIDs) { @Override protected void defineColumns() throws Exception { column("").width(1); // checkbox column(getString("content:MeasureList.Label")); column(getString("content:MeasureList.Unit")); column(getString("content:MeasureList.ForMom")); column(getString("content:MeasureList.Preconception")); column(getString("content:MeasureList.Pregnancy")); column(getString("content:MeasureList.Infancy")); } @Override protected void renderRow(UUID id) throws Exception { Measure m = MeasureStore.getInstance().load(id); cell(); writeCheckbox("chk_" + m.getID().toString(), null, false); cell(); writeLink(m.getLabel(), getPageURL(MeasurePage.COMMAND, new ParameterMap(PARAM_ID, m.getID().toString()))); cell(); writeEncode(getString("content:MeasureList.MetricImperial", m.getMetricUnit(), m.getImperialUnit())); cell(); if (m.isForMother()) { writeEncode(getString("content:MeasureList.Yes")); } cell(); if (m.isForPreconception()) { writeEncode(getString("content:MeasureList.Yes")); } cell(); if (m.isForPregnancy()) { writeEncode(getString("content:MeasureList.Yes")); } cell(); if (m.isForInfancy()) { writeEncode(getString("content:MeasureList.Yes")); } } }.render(); write("<br>"); writeRemoveButton(); writeFormClose(); } @Override public void commit() throws Exception { for (String p : getContext().getParameterNamesThatStartWith("chk_")) { MeasureStore.getInstance().remove(UUID.fromString(p.substring(4))); } // Redirect to self throw new RedirectException(getContext().getCommand(), null); } @Override public String getTitle() throws Exception { return getString("content:MeasureList.Title"); } }
[ "w.david.cai@gmail.com" ]
w.david.cai@gmail.com
be0dcb5279e67ab3be24429e391b03d9cf07a44d
ceac5c693257ea7af51ae7b0c775508ae13e0ff0
/misc/NifiTensorflowProcessors/src/test/java/test/in/dream_lab/nifi/tf/processors/test/FilterImagesEdgentTest.java
2437affd0f341f68ba51192605e56e4415cb3cfc
[ "Apache-2.0" ]
permissive
dream-lab/echo
86a53e2a3149fbe7c6982250bd6f07870644840d
3ba3e83068e733bc2330e0d1c9176d3fc2fb7e20
refs/heads/master
2020-04-05T13:41:22.066781
2019-04-05T04:07:12
2019-04-05T04:07:12
94,972,076
19
10
Apache-2.0
2018-06-29T11:29:06
2017-06-21T06:45:57
Java
UTF-8
Java
false
false
937
java
package test.in.dream_lab.nifi.tf.processors.test; import in.dream_lab.nifi.tf.processors.FilterImagesEdgent; import org.apache.nifi.util.MockFlowFile; import org.apache.nifi.util.TestRunner; import org.apache.nifi.util.TestRunners; import org.junit.Test; import java.io.IOException; import java.util.List; public class FilterImagesEdgentTest { @Test public void testOnTrigger() throws IOException { TestRunner runner = TestRunners.newTestRunner(new FilterImagesEdgent()); //set Properties // runner.setProperty() // add content //runner.enqueue(InputStream type) //Run runner.run(1); // check //runner.assert... // check flowfile //List<MockFlowFile> results = runner.getFlowFilesForRelationship(relationshipname) //assertwhatever //MockFlowFile result = results.get(0); // result.assertwhatever } }
[ "pushkar1593@gmail.com" ]
pushkar1593@gmail.com
8a016ff04f7d195b1289e0acecc834a7b0b63162
4a0cf4cb3a13c81dc7f899b12568a60b62ddbb57
/Client/src/main/java/generated/com/biblio/BibliothequeServices.java
18292c75ebf5bf23d77b61acafc51197a509982a
[]
no_license
MatthieuDelomez/P7-SystemeBibliotheque
ed32072e9e256061cb30b65d88ebbac451ccbe0d
d9b1f86054fdda0548d5d6aa38be3d39316983df
refs/heads/master
2021-10-20T04:17:16.717961
2019-02-25T20:16:06
2019-02-25T20:16:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
12,397
java
package com.biblio; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult; import javax.jws.WebService; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.ws.Action; import javax.xml.ws.RequestWrapper; import javax.xml.ws.ResponseWrapper; /** * This class was generated by Apache CXF 3.0.2 * 2019-02-25T21:12:39.891+01:00 * Generated source version: 3.0.2 * */ @WebService(targetNamespace = "http://biblio.com/", name = "BibliothequeServices") @XmlSeeAlso({ObjectFactory.class}) public interface BibliothequeServices { @WebMethod @Action(input = "http://biblio.com/BibliothequeServices/searchBiblioRequest", output = "http://biblio.com/BibliothequeServices/searchBiblioResponse") @RequestWrapper(localName = "searchBiblio", targetNamespace = "http://biblio.com/", className = "com.biblio.SearchBiblio") @ResponseWrapper(localName = "searchBiblioResponse", targetNamespace = "http://biblio.com/", className = "com.biblio.SearchBiblioResponse") @WebResult(name = "return", targetNamespace = "") public com.biblio.BibliothequeResponse searchBiblio( @WebParam(name = "refbibliotheque", targetNamespace = "") int refbibliotheque ); @WebMethod @Action(input = "http://biblio.com/BibliothequeServices/addPretRequest", output = "http://biblio.com/BibliothequeServices/addPretResponse") @RequestWrapper(localName = "addPret", targetNamespace = "http://biblio.com/", className = "com.biblio.AddPret") @ResponseWrapper(localName = "addPretResponse", targetNamespace = "http://biblio.com/", className = "com.biblio.AddPretResponse") @WebResult(name = "return", targetNamespace = "") public com.biblio.PretResponse addPret( @WebParam(name = "refpret", targetNamespace = "") int refpret, @WebParam(name = "refclient", targetNamespace = "") int refclient, @WebParam(name = "refouvrage", targetNamespace = "") int refouvrage, @WebParam(name = "dureepret", targetNamespace = "") java.lang.String dureepret, @WebParam(name = "nbrexemplaire", targetNamespace = "") java.lang.String nbrexemplaire, @WebParam(name = "prolonger", targetNamespace = "") boolean prolonger ); @WebMethod @Action(input = "http://biblio.com/BibliothequeServices/listInfoDocumentRequest", output = "http://biblio.com/BibliothequeServices/listInfoDocumentResponse") @RequestWrapper(localName = "listInfoDocument", targetNamespace = "http://biblio.com/", className = "com.biblio.ListInfoDocument") @ResponseWrapper(localName = "listInfoDocumentResponse", targetNamespace = "http://biblio.com/", className = "com.biblio.ListInfoDocumentResponse") @WebResult(name = "listInfoDocument", targetNamespace = "") public java.util.List<com.biblio.InfoPretResponse> listInfoDocument(); @WebMethod @Action(input = "http://biblio.com/BibliothequeServices/listPretRequest", output = "http://biblio.com/BibliothequeServices/listPretResponse") @RequestWrapper(localName = "listPret", targetNamespace = "http://biblio.com/", className = "com.biblio.ListPret") @ResponseWrapper(localName = "listPretResponse", targetNamespace = "http://biblio.com/", className = "com.biblio.ListPretResponse") @WebResult(name = "listPret", targetNamespace = "") public java.util.List<com.biblio.PretResponse> listPret(); @WebMethod @Action(input = "http://biblio.com/BibliothequeServices/searchPretRequest", output = "http://biblio.com/BibliothequeServices/searchPretResponse") @RequestWrapper(localName = "searchPret", targetNamespace = "http://biblio.com/", className = "com.biblio.SearchPret") @ResponseWrapper(localName = "searchPretResponse", targetNamespace = "http://biblio.com/", className = "com.biblio.SearchPretResponse") @WebResult(name = "return", targetNamespace = "") public com.biblio.PretResponse searchPret( @WebParam(name = "refpret", targetNamespace = "") int refpret ); @WebMethod @Action(input = "http://biblio.com/BibliothequeServices/addBiblioRequest", output = "http://biblio.com/BibliothequeServices/addBiblioResponse") @RequestWrapper(localName = "addBiblio", targetNamespace = "http://biblio.com/", className = "com.biblio.AddBiblio") @ResponseWrapper(localName = "addBiblioResponse", targetNamespace = "http://biblio.com/", className = "com.biblio.AddBiblioResponse") @WebResult(name = "return", targetNamespace = "") public com.biblio.BibliothequeResponse addBiblio( @WebParam(name = "refbibliotheque", targetNamespace = "") int refbibliotheque, @WebParam(name = "nom", targetNamespace = "") java.lang.String nom, @WebParam(name = "adresse", targetNamespace = "") java.lang.String adresse, @WebParam(name = "ville", targetNamespace = "") java.lang.String ville, @WebParam(name = "codepostal", targetNamespace = "") java.lang.String codepostal, @WebParam(name = "description", targetNamespace = "") java.lang.String description ); @WebMethod @Action(input = "http://biblio.com/BibliothequeServices/doLoginClientRequest", output = "http://biblio.com/BibliothequeServices/doLoginClientResponse") @RequestWrapper(localName = "doLoginClient", targetNamespace = "http://biblio.com/", className = "com.biblio.DoLoginClient") @ResponseWrapper(localName = "doLoginClientResponse", targetNamespace = "http://biblio.com/", className = "com.biblio.DoLoginClientResponse") @WebResult(name = "return", targetNamespace = "") public com.biblio.ClientResponse doLoginClient( @WebParam(name = "pseudo", targetNamespace = "") java.lang.String pseudo, @WebParam(name = "motpasse", targetNamespace = "") java.lang.String motpasse ); @WebMethod @Action(input = "http://biblio.com/BibliothequeServices/listClientRequest", output = "http://biblio.com/BibliothequeServices/listClientResponse") @RequestWrapper(localName = "listClient", targetNamespace = "http://biblio.com/", className = "com.biblio.ListClient") @ResponseWrapper(localName = "listClientResponse", targetNamespace = "http://biblio.com/", className = "com.biblio.ListClientResponse") @WebResult(name = "listClient", targetNamespace = "") public java.util.List<com.biblio.ClientResponse> listClient(); @WebMethod @Action(input = "http://biblio.com/BibliothequeServices/addDocumentRequest", output = "http://biblio.com/BibliothequeServices/addDocumentResponse") @RequestWrapper(localName = "addDocument", targetNamespace = "http://biblio.com/", className = "com.biblio.AddDocument") @ResponseWrapper(localName = "addDocumentResponse", targetNamespace = "http://biblio.com/", className = "com.biblio.AddDocumentResponse") @WebResult(name = "return", targetNamespace = "") public com.biblio.DocumentResponse addDocument( @WebParam(name = "refbibliotheque", targetNamespace = "") int refbibliotheque, @WebParam(name = "nomouvrage", targetNamespace = "") java.lang.String nomouvrage, @WebParam(name = "quantitetotal", targetNamespace = "") java.lang.String quantitetotal ); @WebMethod @Action(input = "http://biblio.com/BibliothequeServices/deletePretRequest", output = "http://biblio.com/BibliothequeServices/deletePretResponse") @RequestWrapper(localName = "deletePret", targetNamespace = "http://biblio.com/", className = "com.biblio.DeletePret") @ResponseWrapper(localName = "deletePretResponse", targetNamespace = "http://biblio.com/", className = "com.biblio.DeletePretResponse") @WebResult(name = "return", targetNamespace = "") public com.biblio.PretResponse deletePret( @WebParam(name = "dureepret", targetNamespace = "") java.lang.String dureepret, @WebParam(name = "refpret", targetNamespace = "") int refpret ); @WebMethod @Action(input = "http://biblio.com/BibliothequeServices/listDocumentRequest", output = "http://biblio.com/BibliothequeServices/listDocumentResponse") @RequestWrapper(localName = "listDocument", targetNamespace = "http://biblio.com/", className = "com.biblio.ListDocument") @ResponseWrapper(localName = "listDocumentResponse", targetNamespace = "http://biblio.com/", className = "com.biblio.ListDocumentResponse") @WebResult(name = "listDocument", targetNamespace = "") public java.util.List<com.biblio.DocumentResponse> listDocument( @WebParam(name = "nomOuvrage", targetNamespace = "") java.lang.String nomOuvrage ); @WebMethod @Action(input = "http://biblio.com/BibliothequeServices/doLoginRequest", output = "http://biblio.com/BibliothequeServices/doLoginResponse") @RequestWrapper(localName = "doLogin", targetNamespace = "http://biblio.com/", className = "com.biblio.DoLogin") @ResponseWrapper(localName = "doLoginResponse", targetNamespace = "http://biblio.com/", className = "com.biblio.DoLoginResponse") @WebResult(name = "return", targetNamespace = "") public com.biblio.UtilisateurResponse doLogin( @WebParam(name = "pseudo", targetNamespace = "") java.lang.String pseudo, @WebParam(name = "motPasse", targetNamespace = "") java.lang.String motPasse ); @WebMethod @Action(input = "http://biblio.com/BibliothequeServices/addUserRequest", output = "http://biblio.com/BibliothequeServices/addUserResponse") @RequestWrapper(localName = "addUser", targetNamespace = "http://biblio.com/", className = "com.biblio.AddUser") @ResponseWrapper(localName = "addUserResponse", targetNamespace = "http://biblio.com/", className = "com.biblio.AddUserResponse") @WebResult(name = "return", targetNamespace = "") public com.biblio.UtilisateurResponse addUser( @WebParam(name = "refbibliotheque", targetNamespace = "") int refbibliotheque, @WebParam(name = "pseudo", targetNamespace = "") java.lang.String pseudo, @WebParam(name = "motPasse", targetNamespace = "") java.lang.String motPasse, @WebParam(name = "email", targetNamespace = "") java.lang.String email, @WebParam(name = "nom", targetNamespace = "") java.lang.String nom, @WebParam(name = "prenom", targetNamespace = "") java.lang.String prenom ); @WebMethod @Action(input = "http://biblio.com/BibliothequeServices/deleteClientRequest", output = "http://biblio.com/BibliothequeServices/deleteClientResponse") @RequestWrapper(localName = "deleteClient", targetNamespace = "http://biblio.com/", className = "com.biblio.DeleteClient") @ResponseWrapper(localName = "deleteClientResponse", targetNamespace = "http://biblio.com/", className = "com.biblio.DeleteClientResponse") @WebResult(name = "return", targetNamespace = "") public com.biblio.ClientResponse deleteClient( @WebParam(name = "refclient", targetNamespace = "") int refclient ); @WebMethod @Action(input = "http://biblio.com/BibliothequeServices/addClientRequest", output = "http://biblio.com/BibliothequeServices/addClientResponse") @RequestWrapper(localName = "addClient", targetNamespace = "http://biblio.com/", className = "com.biblio.AddClient") @ResponseWrapper(localName = "addClientResponse", targetNamespace = "http://biblio.com/", className = "com.biblio.AddClientResponse") @WebResult(name = "return", targetNamespace = "") public com.biblio.ClientResponse addClient( @WebParam(name = "refbibliotheque", targetNamespace = "") int refbibliotheque, @WebParam(name = "nom", targetNamespace = "") java.lang.String nom, @WebParam(name = "prenom", targetNamespace = "") java.lang.String prenom, @WebParam(name = "sexe", targetNamespace = "") java.lang.String sexe, @WebParam(name = "pseudo", targetNamespace = "") java.lang.String pseudo, @WebParam(name = "motPasse", targetNamespace = "") java.lang.String motPasse, @WebParam(name = "adresse", targetNamespace = "") java.lang.String adresse, @WebParam(name = "email", targetNamespace = "") java.lang.String email, @WebParam(name = "codepostal", targetNamespace = "") java.lang.String codepostal ); }
[ "mdelomez@esac-cambrai.net" ]
mdelomez@esac-cambrai.net
85ea9f262e10d4a23062b71f6144e3d56bb3e9d5
adbf717e3abb4ebae4c7dacebe39f9175991e23c
/java/com/fiberhome/ms/bbs/ui/ResourceResource.java
ab9b504312fc0a2d4c0f773cd8924fbce2f0aeec
[]
no_license
apolloKwong/bbs
d26d196f4390d8cd4d0a93a1f3c32624fa23ceff
7dda1a4b89ba1906a6355e1b489a7055a5551f49
refs/heads/master
2022-11-23T11:53:36.025260
2020-07-25T05:35:05
2020-07-25T05:35:05
282,377,116
0
0
null
null
null
null
UTF-8
Java
false
false
6,039
java
/** * */ package com.fiberhome.ms.bbs.ui; import java.io.IOException; import java.net.URLDecoder; import java.util.List; import javax.ws.rs.GET; import javax.ws.rs.PUT; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.core.Context; import javax.ws.rs.core.MultivaluedMap; import javax.ws.rs.core.UriInfo; import org.apache.ibatis.annotations.Param; import org.apache.solr.client.solrj.SolrServerException; import org.apache.solr.common.SolrDocument; import org.springframework.beans.factory.annotation.Autowired; import com.fiberhome.ms.bbs.entity.Resource; import com.fiberhome.ms.bbs.service.ResourceService; import com.fiberhome.ms.bbs.utils.commandTool; import com.fiberhome.smartms.BusinessAccessException; import com.fiberhome.smartms.Pageable; import com.fiberhome.smartms.annotation.ApiQueryParam; import com.fiberhome.smartms.annotation.Compress; import com.fiberhome.smartms.annotation.Operation; import com.fiberhome.smartms.sql.QueryFilter; import com.fiberhome.smartms.ui.BaseResource; /** * @author yanz * */ @Path("bbs/resource") //@Resource(code = 20001, model = "Smart2", desc = "Resource Resource") public class ResourceResource extends BaseResource<Resource> { @Autowired private ResourceService service; @Context protected UriInfo uriInfo; protected ResourceService getService() { return service; } //// @GET @Path(value = "/index") @Operation(code = Operation.READ, desc = Operation.READ_DESC) public String index() { return null; } @GET @Path(value = "/getByUserId/list/{userId}/{page}/{pageSize}") @Operation(code = Operation.READ, desc = Operation.READ_DESC) public Pageable<Resource> getByUserId(@PathParam("userId")long userId,@PathParam("page") int page,@PathParam("pageSize") int pageSize) throws BusinessAccessException { return this.getService().getByUserId(userId,this.getQueryFilter(), page, pageSize); } @GET @Path(value = "/getByFieldName/list/{fieldName}") @Operation(code = Operation.READ, desc = Operation.READ_DESC) public List<Resource> getByFieldName(@PathParam("fieldName")String fieldName) { return getService().getByFieldName(fieldName); } @GET @Path(value = "getByFieldName2/list/{fieldName}/{page}/{pageSize}") @Operation(code = Operation.READ, desc = Operation.READ_DESC) public Pageable<Resource> getByFieldName2(@PathParam("fieldName")String fieldName,@PathParam("page") int page,@PathParam("pageSize") int pageSize) throws BusinessAccessException { return this.getService().getByFieldName2(fieldName,this.getQueryFilter(), page, pageSize); } // @GET // @Path(value = "/getAllByDownloads/list") // @Operation(code = Operation.READ, desc = Operation.READ_DESC) // public List<Resource> getAllByDownloads() { // // return getService().getAllByDownloads(); // } // // @GET // @Path(value = "/getAllByDate/list") // @Operation(code = Operation.READ, desc = Operation.READ_DESC) // public List<Resource> getAllByDate() { // // return getService().getAllByDate(); // }LastUpdate @GET @Path(value = "/lastUpdate/list") @Operation(code = Operation.READ, desc = Operation.READ_DESC) public List<Resource> lastUpdate() { return getService().lastUpdate(); } @GET @Path(value = "/topEveryDay/list") @Operation(code = Operation.READ, desc = Operation.READ_DESC) public List<Resource> topEveryDay() { return getService().topEveryDay(); } @GET @Path(value = "/topEveryWeek/list") @Operation(code = Operation.READ, desc = Operation.READ_DESC) public List<Resource> topEveryWeek() { return getService().topEveryWeek(); } @GET @Path(value = "/topEveryMonth/list") @Operation(code = Operation.READ, desc = Operation.READ_DESC) public List<Resource> topEveryMonth() { return getService().topEveryMonth(); } @GET @Path(value = "/topEveryYear/list") @Operation(code = Operation.READ, desc = Operation.READ_DESC) public List<Resource> topEveryYear() { return getService().topEveryYear(); } @GET @Path(value = "/top24h/list") @Operation(code = Operation.READ, desc = Operation.READ_DESC) public List<Resource> top24h() { return getService().top24h(); } @GET @Path(value = "/latest24h/list") @Operation(code = Operation.READ, desc = Operation.READ_DESC) public List<Resource> latest24h() { return getService().latest24h(); } @PUT @Path(value="downloadsPlusOne/{id}") @Operation(code = Operation.UPDATE, desc = Operation.UPDATE_DESC) public void downloadsPlusOne(@PathParam("id") long id){ getService().downloadsPlusOne(id); } @GET @Path(value = "search/{page}/{pageSize}") @Operation(code = Operation.READ, desc = Operation.READ_DESC) public Pageable<SolrDocument> search(@PathParam("page") int page,@PathParam("pageSize") int pageSize) throws SolrServerException, IOException { MultivaluedMap<String, String> revecive= this.uriInfo.getQueryParameters(); String keyword = URLDecoder.decode(revecive.getFirst("keyword"),"utf-8"); System.out.println(keyword); String field = URLDecoder.decode(revecive.getFirst("field"),"utf-8"); field = commandTool.fieldFilterQueryMaker(field); System.out.println(field); String resourceType = URLDecoder.decode(revecive.getFirst("resourceType"),"utf-8"); resourceType = commandTool.resourceTypeFilterQueryMaker(resourceType); System.out.println(resourceType); return getService().search(keyword,field,resourceType,page, pageSize); } }
[ "841020231@qq.com.com" ]
841020231@qq.com.com
51db2bdd6de96fba349cb1627b6e75ac7ac26e4e
2fa93de3f707400d90239aab7b1d6a6101500f48
/src/main/java/com/wechat/service/SystemUserService.java
0b4533552d3cbd38bda531ca2464f068b9801d1e
[]
no_license
iwushiyu/WeChat
f63ec4dc97351ed84f39e16b5459ef07f3895f9c
619fe60c5743f46bffebcf58f3d992a827683ec4
refs/heads/master
2022-12-21T21:46:10.044917
2019-06-28T03:33:39
2019-06-28T03:33:39
194,190,862
0
0
null
null
null
null
UTF-8
Java
false
false
923
java
package com.wechat.service; import com.wechat.entity.SystemUser; import org.springframework.stereotype.Repository; import org.springframework.stereotype.Service; import java.util.List; import java.util.Map; public interface SystemUserService { public List<SystemUser> allSystemUser(int accountId); public SystemUser doLogin(String name,String pwd); public int addSystemUser(SystemUser systemUser); public List<SystemUser> search(String username,int accountId); public List<SystemUser> searchAll(String username); public boolean deleteSystemUser(SystemUser systemUser); public boolean editSystemUser(SystemUser systemUser); public SystemUser selectSystemUserByUsername(SystemUser systemUser); public boolean editSystemUserpwd(SystemUser systemUser); public SystemUser getSystemUserById(int userId); public List<SystemUser> allSystemUserByUserId(int userId,int accountId); }
[ "1055368412@qq.com" ]
1055368412@qq.com
db3a1e031084ccce3eeeb68cebbe10edb3f38c61
8e17c72f50d78c52a9ba5837cbf28e0a05470424
/src/main/java/com/laotek/churchguru/web/client/widget/bulk/BulkUploadRowDataHandler.java
4113a8f27d70b5881b7b36c76d152b49ba3e768f
[]
no_license
larryoke/churchguru-web
7cbaf6ccfabc96727b9ce13b519c59ec9c449a0f
2d33a30a59a82d56a8e827e2a59286abf84e70a1
refs/heads/master
2021-01-11T14:58:31.286962
2018-12-05T17:18:46
2018-12-05T17:18:46
80,263,931
0
0
null
null
null
null
UTF-8
Java
false
false
223
java
package com.laotek.churchguru.web.client.widget.bulk; import java.util.Map; public interface BulkUploadRowDataHandler { void saveOrDeleteRowData(Map<String, String> rowData, boolean save); void publishData(); }
[ "larryoke@gmail.com" ]
larryoke@gmail.com
e284e510ae131b95de8d5aa875476147e073cf2a
041d8e7d62f06df9a2f945bbbf807c3bccbc8205
/CopiloteMaster/src/com/valohyd/copilotemaster/sqlite/POISQLite.java
e52fc8f69b06e7367665679c9dc6514b02365d8e
[]
no_license
loloidorap/copilote-master
a87eb897b872118d9308c7a05111f69b5f65d325
a39954f8074c5a2095a98d014b9270a4df9704e9
refs/heads/master
2021-01-10T08:14:07.178823
2014-03-13T21:38:29
2014-03-13T21:38:29
48,001,957
0
0
null
null
null
null
ISO-8859-1
Java
false
false
1,450
java
package com.valohyd.copilotemaster.sqlite; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteDatabase.CursorFactory; import android.database.sqlite.SQLiteOpenHelper; public class POISQLite extends SQLiteOpenHelper { private static final String TABLE_POIS = "table_pois"; private static final String COL_ID = "ID"; private static final String COL_TYPE = "Type"; private static final String COL_LAT = "Lat"; private static final String COL_LONG = "Long"; private static final String CREATE_BDD = "CREATE TABLE " + TABLE_POIS + " (" + COL_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, " + COL_TYPE + " INTEGER NOT NULL, "+ COL_LAT + " DOUBLE PRECISION NOT NULL, "+ COL_LONG + " DOUBLE PRECISION NOT NULL);"; public POISQLite(Context context, String name, CursorFactory factory, int version) { super(context, name, factory, version); } @Override public void onCreate(SQLiteDatabase db) { // on créé la table à partir de la requête écrite dans la variable // CREATE_BDD db.execSQL(CREATE_BDD); } @Override public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) { // On peut fait ce qu'on veut ici moi j'ai décidé de supprimer la table // et de la recréer // comme ça lorsque je change la version les id repartent de 0 db.execSQL("DROP TABLE " + TABLE_POIS + ";"); onCreate(db); } }
[ "parodilaurent@gmail.com" ]
parodilaurent@gmail.com
22ed8a8a33d345d6c84c41f4ab760d31a2a66731
8ce54486ba540b3e053a76eabbfed4d157431cad
/AtmEmpresaConsultoria/app/src/main/java/atmempresaconsultoria/cursoandroid/com/atmempresaconsultoria/ClientesActivity.java
b0a6f15c794b23d57534a194e529aabb39c2cdec
[]
no_license
lucassantosf/curso_android
e6a9e5a1c42d2453719391427a725adcc8e0dcac
44718929fa304c14c69b26cb78698c0436e518cd
refs/heads/master
2021-01-12T10:18:43.585616
2020-09-02T21:15:16
2020-09-02T21:15:16
76,402,483
0
0
null
2020-09-02T21:16:07
2016-12-13T22:06:39
Java
UTF-8
Java
false
false
381
java
package atmempresaconsultoria.cursoandroid.com.atmempresaconsultoria; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; public class ClientesActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_clientes); } }
[ "lucas46em@gmail.com" ]
lucas46em@gmail.com
9d2817af1a2bd69b2b77e559197ed31507959a85
affe223efe18ba4d5e676f685c1a5e73caac73eb
/clients/webservice/src/main/java/com/vmware/vim25/DistributedVirtualSwitchPortStatistics.java
8754b74a8bfbc19f7c37e0c0423a57e4dd28fb28
[]
no_license
RohithEngu/VM27
486f6093e0af2f6df1196115950b0d978389a985
f0f4f177210fd25415c2e058ec10deb13b7c9247
refs/heads/master
2021-01-16T00:42:30.971054
2009-08-14T19:58:16
2009-08-14T19:58:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
19,312
java
/** * DistributedVirtualSwitchPortStatistics.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter. */ package com.vmware.vim25; public class DistributedVirtualSwitchPortStatistics extends com.vmware.vim25.DynamicData implements java.io.Serializable { /** * */ private static final long serialVersionUID = 1L; private long packetsInMulticast; private long packetsOutMulticast; private long bytesInMulticast; private long bytesOutMulticast; private long packetsInUnicast; private long packetsOutUnicast; private long bytesInUnicast; private long bytesOutUnicast; private long packetsInBroadcast; private long packetsOutBroadcast; private long bytesInBroadcast; private long bytesOutBroadcast; private long packetsInDropped; private long packetsOutDropped; private long packetsInException; private long packetsOutException; public DistributedVirtualSwitchPortStatistics() { } public DistributedVirtualSwitchPortStatistics(java.lang.String dynamicType, com.vmware.vim25.DynamicProperty[] dynamicProperty, long packetsInMulticast, long packetsOutMulticast, long bytesInMulticast, long bytesOutMulticast, long packetsInUnicast, long packetsOutUnicast, long bytesInUnicast, long bytesOutUnicast, long packetsInBroadcast, long packetsOutBroadcast, long bytesInBroadcast, long bytesOutBroadcast, long packetsInDropped, long packetsOutDropped, long packetsInException, long packetsOutException) { super(dynamicType, dynamicProperty); this.packetsInMulticast = packetsInMulticast; this.packetsOutMulticast = packetsOutMulticast; this.bytesInMulticast = bytesInMulticast; this.bytesOutMulticast = bytesOutMulticast; this.packetsInUnicast = packetsInUnicast; this.packetsOutUnicast = packetsOutUnicast; this.bytesInUnicast = bytesInUnicast; this.bytesOutUnicast = bytesOutUnicast; this.packetsInBroadcast = packetsInBroadcast; this.packetsOutBroadcast = packetsOutBroadcast; this.bytesInBroadcast = bytesInBroadcast; this.bytesOutBroadcast = bytesOutBroadcast; this.packetsInDropped = packetsInDropped; this.packetsOutDropped = packetsOutDropped; this.packetsInException = packetsInException; this.packetsOutException = packetsOutException; } /** * Gets the packetsInMulticast value for this * DistributedVirtualSwitchPortStatistics. * * @return packetsInMulticast */ public long getPacketsInMulticast() { return packetsInMulticast; } /** * Sets the packetsInMulticast value for this * DistributedVirtualSwitchPortStatistics. * * @param packetsInMulticast */ public void setPacketsInMulticast(long packetsInMulticast) { this.packetsInMulticast = packetsInMulticast; } /** * Gets the packetsOutMulticast value for this * DistributedVirtualSwitchPortStatistics. * * @return packetsOutMulticast */ public long getPacketsOutMulticast() { return packetsOutMulticast; } /** * Sets the packetsOutMulticast value for this * DistributedVirtualSwitchPortStatistics. * * @param packetsOutMulticast */ public void setPacketsOutMulticast(long packetsOutMulticast) { this.packetsOutMulticast = packetsOutMulticast; } /** * Gets the bytesInMulticast value for this * DistributedVirtualSwitchPortStatistics. * * @return bytesInMulticast */ public long getBytesInMulticast() { return bytesInMulticast; } /** * Sets the bytesInMulticast value for this * DistributedVirtualSwitchPortStatistics. * * @param bytesInMulticast */ public void setBytesInMulticast(long bytesInMulticast) { this.bytesInMulticast = bytesInMulticast; } /** * Gets the bytesOutMulticast value for this * DistributedVirtualSwitchPortStatistics. * * @return bytesOutMulticast */ public long getBytesOutMulticast() { return bytesOutMulticast; } /** * Sets the bytesOutMulticast value for this * DistributedVirtualSwitchPortStatistics. * * @param bytesOutMulticast */ public void setBytesOutMulticast(long bytesOutMulticast) { this.bytesOutMulticast = bytesOutMulticast; } /** * Gets the packetsInUnicast value for this * DistributedVirtualSwitchPortStatistics. * * @return packetsInUnicast */ public long getPacketsInUnicast() { return packetsInUnicast; } /** * Sets the packetsInUnicast value for this * DistributedVirtualSwitchPortStatistics. * * @param packetsInUnicast */ public void setPacketsInUnicast(long packetsInUnicast) { this.packetsInUnicast = packetsInUnicast; } /** * Gets the packetsOutUnicast value for this * DistributedVirtualSwitchPortStatistics. * * @return packetsOutUnicast */ public long getPacketsOutUnicast() { return packetsOutUnicast; } /** * Sets the packetsOutUnicast value for this * DistributedVirtualSwitchPortStatistics. * * @param packetsOutUnicast */ public void setPacketsOutUnicast(long packetsOutUnicast) { this.packetsOutUnicast = packetsOutUnicast; } /** * Gets the bytesInUnicast value for this * DistributedVirtualSwitchPortStatistics. * * @return bytesInUnicast */ public long getBytesInUnicast() { return bytesInUnicast; } /** * Sets the bytesInUnicast value for this * DistributedVirtualSwitchPortStatistics. * * @param bytesInUnicast */ public void setBytesInUnicast(long bytesInUnicast) { this.bytesInUnicast = bytesInUnicast; } /** * Gets the bytesOutUnicast value for this * DistributedVirtualSwitchPortStatistics. * * @return bytesOutUnicast */ public long getBytesOutUnicast() { return bytesOutUnicast; } /** * Sets the bytesOutUnicast value for this * DistributedVirtualSwitchPortStatistics. * * @param bytesOutUnicast */ public void setBytesOutUnicast(long bytesOutUnicast) { this.bytesOutUnicast = bytesOutUnicast; } /** * Gets the packetsInBroadcast value for this * DistributedVirtualSwitchPortStatistics. * * @return packetsInBroadcast */ public long getPacketsInBroadcast() { return packetsInBroadcast; } /** * Sets the packetsInBroadcast value for this * DistributedVirtualSwitchPortStatistics. * * @param packetsInBroadcast */ public void setPacketsInBroadcast(long packetsInBroadcast) { this.packetsInBroadcast = packetsInBroadcast; } /** * Gets the packetsOutBroadcast value for this * DistributedVirtualSwitchPortStatistics. * * @return packetsOutBroadcast */ public long getPacketsOutBroadcast() { return packetsOutBroadcast; } /** * Sets the packetsOutBroadcast value for this * DistributedVirtualSwitchPortStatistics. * * @param packetsOutBroadcast */ public void setPacketsOutBroadcast(long packetsOutBroadcast) { this.packetsOutBroadcast = packetsOutBroadcast; } /** * Gets the bytesInBroadcast value for this * DistributedVirtualSwitchPortStatistics. * * @return bytesInBroadcast */ public long getBytesInBroadcast() { return bytesInBroadcast; } /** * Sets the bytesInBroadcast value for this * DistributedVirtualSwitchPortStatistics. * * @param bytesInBroadcast */ public void setBytesInBroadcast(long bytesInBroadcast) { this.bytesInBroadcast = bytesInBroadcast; } /** * Gets the bytesOutBroadcast value for this * DistributedVirtualSwitchPortStatistics. * * @return bytesOutBroadcast */ public long getBytesOutBroadcast() { return bytesOutBroadcast; } /** * Sets the bytesOutBroadcast value for this * DistributedVirtualSwitchPortStatistics. * * @param bytesOutBroadcast */ public void setBytesOutBroadcast(long bytesOutBroadcast) { this.bytesOutBroadcast = bytesOutBroadcast; } /** * Gets the packetsInDropped value for this * DistributedVirtualSwitchPortStatistics. * * @return packetsInDropped */ public long getPacketsInDropped() { return packetsInDropped; } /** * Sets the packetsInDropped value for this * DistributedVirtualSwitchPortStatistics. * * @param packetsInDropped */ public void setPacketsInDropped(long packetsInDropped) { this.packetsInDropped = packetsInDropped; } /** * Gets the packetsOutDropped value for this * DistributedVirtualSwitchPortStatistics. * * @return packetsOutDropped */ public long getPacketsOutDropped() { return packetsOutDropped; } /** * Sets the packetsOutDropped value for this * DistributedVirtualSwitchPortStatistics. * * @param packetsOutDropped */ public void setPacketsOutDropped(long packetsOutDropped) { this.packetsOutDropped = packetsOutDropped; } /** * Gets the packetsInException value for this * DistributedVirtualSwitchPortStatistics. * * @return packetsInException */ public long getPacketsInException() { return packetsInException; } /** * Sets the packetsInException value for this * DistributedVirtualSwitchPortStatistics. * * @param packetsInException */ public void setPacketsInException(long packetsInException) { this.packetsInException = packetsInException; } /** * Gets the packetsOutException value for this * DistributedVirtualSwitchPortStatistics. * * @return packetsOutException */ public long getPacketsOutException() { return packetsOutException; } /** * Sets the packetsOutException value for this * DistributedVirtualSwitchPortStatistics. * * @param packetsOutException */ public void setPacketsOutException(long packetsOutException) { this.packetsOutException = packetsOutException; } private java.lang.Object __equalsCalc = null; @Override public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof DistributedVirtualSwitchPortStatistics)) { return false; } DistributedVirtualSwitchPortStatistics other = (DistributedVirtualSwitchPortStatistics) obj; if (obj == null) { return false; } if (this == obj) { return true; } if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = super.equals(obj) && this.packetsInMulticast == other.getPacketsInMulticast() && this.packetsOutMulticast == other.getPacketsOutMulticast() && this.bytesInMulticast == other.getBytesInMulticast() && this.bytesOutMulticast == other.getBytesOutMulticast() && this.packetsInUnicast == other.getPacketsInUnicast() && this.packetsOutUnicast == other.getPacketsOutUnicast() && this.bytesInUnicast == other.getBytesInUnicast() && this.bytesOutUnicast == other.getBytesOutUnicast() && this.packetsInBroadcast == other.getPacketsInBroadcast() && this.packetsOutBroadcast == other.getPacketsOutBroadcast() && this.bytesInBroadcast == other.getBytesInBroadcast() && this.bytesOutBroadcast == other.getBytesOutBroadcast() && this.packetsInDropped == other.getPacketsInDropped() && this.packetsOutDropped == other.getPacketsOutDropped() && this.packetsInException == other.getPacketsInException() && this.packetsOutException == other.getPacketsOutException(); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; @Override public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = super.hashCode(); _hashCode += new Long(getPacketsInMulticast()).hashCode(); _hashCode += new Long(getPacketsOutMulticast()).hashCode(); _hashCode += new Long(getBytesInMulticast()).hashCode(); _hashCode += new Long(getBytesOutMulticast()).hashCode(); _hashCode += new Long(getPacketsInUnicast()).hashCode(); _hashCode += new Long(getPacketsOutUnicast()).hashCode(); _hashCode += new Long(getBytesInUnicast()).hashCode(); _hashCode += new Long(getBytesOutUnicast()).hashCode(); _hashCode += new Long(getPacketsInBroadcast()).hashCode(); _hashCode += new Long(getPacketsOutBroadcast()).hashCode(); _hashCode += new Long(getBytesInBroadcast()).hashCode(); _hashCode += new Long(getBytesOutBroadcast()).hashCode(); _hashCode += new Long(getPacketsInDropped()).hashCode(); _hashCode += new Long(getPacketsOutDropped()).hashCode(); _hashCode += new Long(getPacketsInException()).hashCode(); _hashCode += new Long(getPacketsOutException()).hashCode(); __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc( DistributedVirtualSwitchPortStatistics.class, true); static { typeDesc.setXmlType(new javax.xml.namespace.QName("urn:vim25", "DistributedVirtualSwitchPortStatistics")); org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("packetsInMulticast"); elemField.setXmlName(new javax.xml.namespace.QName("urn:vim25", "packetsInMulticast")); elemField.setXmlType(new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "long")); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("packetsOutMulticast"); elemField.setXmlName(new javax.xml.namespace.QName("urn:vim25", "packetsOutMulticast")); elemField.setXmlType(new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "long")); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("bytesInMulticast"); elemField.setXmlName(new javax.xml.namespace.QName("urn:vim25", "bytesInMulticast")); elemField.setXmlType(new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "long")); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("bytesOutMulticast"); elemField.setXmlName(new javax.xml.namespace.QName("urn:vim25", "bytesOutMulticast")); elemField.setXmlType(new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "long")); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("packetsInUnicast"); elemField.setXmlName(new javax.xml.namespace.QName("urn:vim25", "packetsInUnicast")); elemField.setXmlType(new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "long")); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("packetsOutUnicast"); elemField.setXmlName(new javax.xml.namespace.QName("urn:vim25", "packetsOutUnicast")); elemField.setXmlType(new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "long")); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("bytesInUnicast"); elemField.setXmlName(new javax.xml.namespace.QName("urn:vim25", "bytesInUnicast")); elemField.setXmlType(new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "long")); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("bytesOutUnicast"); elemField.setXmlName(new javax.xml.namespace.QName("urn:vim25", "bytesOutUnicast")); elemField.setXmlType(new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "long")); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("packetsInBroadcast"); elemField.setXmlName(new javax.xml.namespace.QName("urn:vim25", "packetsInBroadcast")); elemField.setXmlType(new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "long")); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("packetsOutBroadcast"); elemField.setXmlName(new javax.xml.namespace.QName("urn:vim25", "packetsOutBroadcast")); elemField.setXmlType(new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "long")); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("bytesInBroadcast"); elemField.setXmlName(new javax.xml.namespace.QName("urn:vim25", "bytesInBroadcast")); elemField.setXmlType(new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "long")); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("bytesOutBroadcast"); elemField.setXmlName(new javax.xml.namespace.QName("urn:vim25", "bytesOutBroadcast")); elemField.setXmlType(new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "long")); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("packetsInDropped"); elemField.setXmlName(new javax.xml.namespace.QName("urn:vim25", "packetsInDropped")); elemField.setXmlType(new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "long")); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("packetsOutDropped"); elemField.setXmlName(new javax.xml.namespace.QName("urn:vim25", "packetsOutDropped")); elemField.setXmlType(new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "long")); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("packetsInException"); elemField.setXmlName(new javax.xml.namespace.QName("urn:vim25", "packetsInException")); elemField.setXmlType(new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "long")); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("packetsOutException"); elemField.setXmlName(new javax.xml.namespace.QName("urn:vim25", "packetsOutException")); elemField.setXmlType(new javax.xml.namespace.QName( "http://www.w3.org/2001/XMLSchema", "long")); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } /** * Get Custom Serializer */ public static org.apache.axis.encoding.Serializer getSerializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanSerializer(_javaType, _xmlType, typeDesc); } /** * Get Custom Deserializer */ public static org.apache.axis.encoding.Deserializer getDeserializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanDeserializer(_javaType, _xmlType, typeDesc); } }
[ "sankarachary@intalio.com" ]
sankarachary@intalio.com