blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
132 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
191d9e106506d248fb91b38f7a7e552f366ba4bb
f874bd87bdb9df2f88c63e66f8120c7d1979736c
/src/org/sdu/android/util/otherUtil/CopiedIterator.java
a46452ec9297d6916ceb43970b26ed6485c8876e
[]
no_license
ywzhang909/SDUGameEngine
11aca759c0b72a5cb878484a947a311b05d86bd6
551725308812b8bc4e6049485a81a621ad32a134
refs/heads/master
2021-01-20T22:59:04.913788
2012-11-15T12:18:35
2012-11-15T12:18:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
586
java
package org.sdu.android.util.otherUtil; import java.util.Iterator; import java.util.LinkedList; public class CopiedIterator implements Iterator { private Iterator iterator = null; public CopiedIterator(Iterator itr) { LinkedList list = new LinkedList(); while (itr.hasNext()) { list.add(itr.next()); } this.iterator = list.iterator(); } public boolean hasNext() { return this.iterator.hasNext(); } public void remove( ) { throw new UnsupportedOperationException("This is a read-only iterator."); } public Object next() { return this.iterator.next(); } }
[ "craigleehi@gmail.com" ]
craigleehi@gmail.com
4fb49218d54040023bab8dd020ca3911d8451802
131681e98612051e8070504e991fd9b0a4425410
/src/main/java/com/cillian/bigdataanalytics/App.java
08500ac38f8504ee2d8feae726a9e09c1a0fc6ed
[]
no_license
cilliand/MahoutTrustRecommender
46d3bb6fb8b47be286db7c6eb779ba8adc3f0ddf
1c68f31e057c4e0f4e7c4ed9aae09fb38dca40f5
refs/heads/master
2021-01-10T13:43:16.241383
2016-03-19T14:16:24
2016-03-19T14:16:24
53,268,953
0
1
null
null
null
null
UTF-8
Java
false
false
12,985
java
package com.cillian.bigdataanalytics; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.TreeMap; import org.apache.mahout.cf.taste.common.Refreshable; import org.apache.mahout.cf.taste.common.TasteException; import org.apache.mahout.cf.taste.eval.IRStatistics; import org.apache.mahout.cf.taste.eval.RecommenderBuilder; import org.apache.mahout.cf.taste.eval.RecommenderEvaluator; import org.apache.mahout.cf.taste.eval.RecommenderIRStatsEvaluator; import org.apache.mahout.cf.taste.impl.common.FastByIDMap; import org.apache.mahout.cf.taste.impl.common.FastIDSet; import org.apache.mahout.cf.taste.impl.eval.AverageAbsoluteDifferenceRecommenderEvaluator; import org.apache.mahout.cf.taste.impl.eval.GenericRecommenderIRStatsEvaluator; import org.apache.mahout.cf.taste.impl.eval.RMSRecommenderEvaluator; import org.apache.mahout.cf.taste.impl.model.file.FileDataModel; import org.apache.mahout.cf.taste.impl.neighborhood.NearestNUserNeighborhood; import org.apache.mahout.cf.taste.impl.neighborhood.ThresholdUserNeighborhood; import org.apache.mahout.cf.taste.impl.recommender.GenericItemBasedRecommender; import org.apache.mahout.cf.taste.impl.recommender.GenericUserBasedRecommender; import org.apache.mahout.cf.taste.impl.recommender.slopeone.SlopeOneRecommender; import org.apache.mahout.cf.taste.impl.similarity.EuclideanDistanceSimilarity; import org.apache.mahout.cf.taste.impl.similarity.LogLikelihoodSimilarity; import org.apache.mahout.cf.taste.impl.similarity.PearsonCorrelationSimilarity; import org.apache.mahout.cf.taste.impl.similarity.SpearmanCorrelationSimilarity; import org.apache.mahout.cf.taste.impl.similarity.TanimotoCoefficientSimilarity; import org.apache.mahout.cf.taste.model.DataModel; import org.apache.mahout.cf.taste.neighborhood.UserNeighborhood; import org.apache.mahout.cf.taste.recommender.RecommendedItem; import org.apache.mahout.cf.taste.recommender.Recommender; import org.apache.mahout.cf.taste.similarity.ItemSimilarity; import org.apache.mahout.cf.taste.similarity.PreferenceInferrer; import org.apache.mahout.cf.taste.similarity.UserSimilarity; /** * Hello world! * */ public class App { public static FastByIDMap<FastIDSet> loadTrustData() { FastByIDMap<FastIDSet> trustMap = new FastByIDMap<FastIDSet>(); try { // Read input BufferedReader br = new BufferedReader(new FileReader("trust.csv")); String line; while ((line = br.readLine()) != null) { String[] split = line.split(","); if (!trustMap.containsKey(Long.parseLong(split[0]))) { trustMap.put(Long.parseLong(split[0]), new FastIDSet()); } trustMap.get(Long.parseLong(split[0])).add(Long.parseLong(split[1])); } br.close(); } catch (IOException e) { System.out.println("Could not load trust.csv"); System.exit(0); } return trustMap; } static DataModel model; static int maxNeighbours; static BufferedWriter bw; public static void main(String[] args) throws IOException, TasteException { model = new FileDataModel(new File("ratings.csv")); maxNeighbours = 1000; bw = new BufferedWriter(new FileWriter("output.csv")); testUserBasedSimilarity(); testTrustSimilarity(); bw.flush(); bw.close(); testItemBasedSimilarity(); testSlopeOneRecommender(); } public static void testUserBasedSimilarity() throws TasteException, IOException { System.out.println("User Based Simiarlity"); System.out.println("----------------------"); for (int i = 10; i <= maxNeighbours; i += 10) { final int numNeighbours = i; RecommenderBuilder recommenderBuilder = new RecommenderBuilder() { public Recommender buildRecommender(DataModel model) throws TasteException { UserSimilarity similarity = new PearsonCorrelationSimilarity(model); UserNeighborhood neighborhood = new NearestNUserNeighborhood(numNeighbours, similarity, model); return new GenericUserBasedRecommender(model, neighborhood, similarity); } }; RecommenderEvaluator scoreEvaluator = new AverageAbsoluteDifferenceRecommenderEvaluator(); double score = scoreEvaluator.evaluate(recommenderBuilder, null, model, 0.9, 0.1); String a = "EuclideanDistanceSimilarity"; String b = "Pearson"; int diff = (a.length() - b.length())+20; System.out.format("Pearson Score: %"+diff+"s Neighbours: %3d\n", score, numNeighbours); bw.write("Pearson,"+score+","+numNeighbours+"\n"); //System.out.println("Pearons Score: " + score + " Neighbours: " + numNeighbours); } // Spearman for (int i = 10; i <= maxNeighbours; i += 10) { final int numNeighbours = i; RecommenderBuilder recommenderBuilder = new RecommenderBuilder() { public Recommender buildRecommender(DataModel model) throws TasteException { UserSimilarity similarity = new SpearmanCorrelationSimilarity(model); UserNeighborhood neighborhood = new NearestNUserNeighborhood(numNeighbours, similarity, model); return new GenericUserBasedRecommender(model, neighborhood, similarity); } }; RecommenderEvaluator scoreEvaluator = new AverageAbsoluteDifferenceRecommenderEvaluator(); double score = scoreEvaluator.evaluate(recommenderBuilder, null, model, 0.9, 0.1); String a = "EuclideanDistanceSimilarity"; String b = "Spearman"; int diff = (a.length() - b.length())+20; bw.write("Spearman,"+score+","+numNeighbours+"\n"); System.out.format("Spearman Score: %"+diff+"s Neighbours: %3d\n", score, numNeighbours); } // LogLikelihood for (int i = 10; i <= maxNeighbours; i += 10) { final int numNeighbours = i; RecommenderBuilder recommenderBuilder = new RecommenderBuilder() { public Recommender buildRecommender(DataModel model) throws TasteException { UserSimilarity similarity = new LogLikelihoodSimilarity(model); UserNeighborhood neighborhood = new NearestNUserNeighborhood(numNeighbours, similarity, model); return new GenericUserBasedRecommender(model, neighborhood, similarity); } }; RecommenderEvaluator scoreEvaluator = new AverageAbsoluteDifferenceRecommenderEvaluator(); double score = scoreEvaluator.evaluate(recommenderBuilder, null, model, 0.9, 0.1); String a = "EuclideanDistanceSimilarity"; String b = "LogLikelihoodSimilarity"; int diff = (a.length() - b.length())+20; bw.write("LogLikelihoodSimilarity,"+score+","+numNeighbours+"\n"); System.out.format("LogLikelihoodSimilarity Score: %"+diff+"s Neighbours: %3d\n", score, numNeighbours); } //EuclideanDistanceSimilarity for (int i = 10; i <= maxNeighbours; i += 10) { final int numNeighbours = i; RecommenderBuilder recommenderBuilder = new RecommenderBuilder() { public Recommender buildRecommender(DataModel model) throws TasteException { UserSimilarity similarity = new EuclideanDistanceSimilarity(model); UserNeighborhood neighborhood = new NearestNUserNeighborhood(numNeighbours, similarity, model); return new GenericUserBasedRecommender(model, neighborhood, similarity); } }; RecommenderEvaluator scoreEvaluator = new AverageAbsoluteDifferenceRecommenderEvaluator(); double score = scoreEvaluator.evaluate(recommenderBuilder, null, model, 0.9, 0.1); bw.write("EuclideanDistanceSimilarity,"+score+","+numNeighbours+"\n"); System.out.format("EuclideanDistanceSimilarity Score: %20s Neighbours: %3d\n", score, numNeighbours); } // Tanimoto for (int i = 10; i <= maxNeighbours; i += 10) { final int numNeighbours = i; RecommenderBuilder recommenderBuilder = new RecommenderBuilder() { public Recommender buildRecommender(DataModel model) throws TasteException { UserSimilarity similarity = new TanimotoCoefficientSimilarity(model); UserNeighborhood neighborhood = new NearestNUserNeighborhood(numNeighbours, similarity, model); return new GenericUserBasedRecommender(model, neighborhood, similarity); } }; RecommenderEvaluator scoreEvaluator = new AverageAbsoluteDifferenceRecommenderEvaluator(); double score = scoreEvaluator.evaluate(recommenderBuilder, null, model, 0.9, 0.1); String a = "EuclideanDistanceSimilarity"; String b = "TanimotoCoefficient"; int diff = (a.length() - b.length())+20; bw.write("TanimotoCoefficient,"+score+","+numNeighbours+"\n"); System.out.format("TanimotoCoefficient Score: %"+diff+"s Neighbours: %3d\n", score, numNeighbours); } } public static void testTrustSimilarity() throws TasteException, IOException { System.out.println("Trust Based Simiarlity"); System.out.println("----------------------"); final FastByIDMap<FastIDSet> trustMap = loadTrustData(); for (int i = 10; i <= maxNeighbours; i += 10) { final int numNeighbours = i; RecommenderBuilder recommenderBuilder = new RecommenderBuilder() { public Recommender buildRecommender(DataModel model) throws TasteException { UserSimilarity similarity = new TrustSimilarity(trustMap); UserNeighborhood neighborhood = new NearestNUserNeighborhood(numNeighbours, similarity, model); return new GenericUserBasedRecommender(model, neighborhood, similarity); } }; RecommenderEvaluator scoreEvaluator = new AverageAbsoluteDifferenceRecommenderEvaluator(); double score = scoreEvaluator.evaluate(recommenderBuilder, null, model, 0.9, 0.1); bw.write("TrustSimilarity,"+score+","+numNeighbours+"\n"); System.out.println("TrustSimilarity Score: " + score + " Neighbours: " + numNeighbours); } } public static void testItemBasedSimilarity() throws TasteException { System.out.println("Item Based Simiarlity"); System.out.println("----------------------"); RecommenderBuilder recommenderBuilder = new RecommenderBuilder() { public Recommender buildRecommender(DataModel model) throws TasteException { ItemSimilarity similarity = new PearsonCorrelationSimilarity(model); return new GenericItemBasedRecommender(model, similarity); } }; RecommenderEvaluator scoreEvaluator = new AverageAbsoluteDifferenceRecommenderEvaluator(); double score = scoreEvaluator.evaluate(recommenderBuilder, null, model, 0.9, 0.1); System.out.println("Pearson Score: " + score); // recommenderBuilder = new RecommenderBuilder() { // public Recommender buildRecommender(DataModel model) throws TasteException { // ItemSimilarity similarity = new SpearmanCorrelationSimilarity(model); // return new GenericItemBasedRecommender(model, similarity); // } // }; // // scoreEvaluator = new AverageAbsoluteDifferenceRecommenderEvaluator(); // score = scoreEvaluator.evaluate(recommenderBuilder, null, model, 0.9, 0.1); // // System.out.println("Spearman Score: " + score); recommenderBuilder = new RecommenderBuilder() { public Recommender buildRecommender(DataModel model) throws TasteException { ItemSimilarity similarity = new LogLikelihoodSimilarity(model); return new GenericItemBasedRecommender(model, similarity); } }; scoreEvaluator = new AverageAbsoluteDifferenceRecommenderEvaluator(); score = scoreEvaluator.evaluate(recommenderBuilder, null, model, 0.9, 0.1); System.out.println("LogLikelihoodSimilarity Score: " + score); recommenderBuilder = new RecommenderBuilder() { public Recommender buildRecommender(DataModel model) throws TasteException { ItemSimilarity similarity = new EuclideanDistanceSimilarity(model); return new GenericItemBasedRecommender(model, similarity); } }; scoreEvaluator = new AverageAbsoluteDifferenceRecommenderEvaluator(); score = scoreEvaluator.evaluate(recommenderBuilder, null, model, 0.9, 0.1); System.out.println("EuclideanDistanceSimilarity Score: " + score); recommenderBuilder = new RecommenderBuilder() { public Recommender buildRecommender(DataModel model) throws TasteException { ItemSimilarity similarity = new TanimotoCoefficientSimilarity(model); return new GenericItemBasedRecommender(model, similarity); } }; scoreEvaluator = new AverageAbsoluteDifferenceRecommenderEvaluator(); score = scoreEvaluator.evaluate(recommenderBuilder, null, model, 0.9, 0.1); System.out.println("Tanimoto Score: " + score); } public static void testSlopeOneRecommender() throws TasteException{ RecommenderBuilder recommenderBuilder = new RecommenderBuilder() { public Recommender buildRecommender(DataModel model) throws TasteException { Recommender recommender = new SlopeOneRecommender(model); return recommender; } }; RecommenderEvaluator scoreEvaluator = new AverageAbsoluteDifferenceRecommenderEvaluator(); double score = scoreEvaluator.evaluate(recommenderBuilder, null, model, 0.9, 0.1); System.out.println("SlopeOne Score: " + score); } }
[ "cillian@cilliandudley.com" ]
cillian@cilliandudley.com
e49285073985bc74cffecb81f22e83f53ff72950
b3a02d5f1f60cd584fbb6da1b823899607693f63
/04_DB Frameworks_Hibernate+Spring Data/08_Spring Data Intro EX/Problem_9_UserSystem/src/main/java/app/services/UserService.java
b9d8101cd7eb018da74b5b10b0db341b54db4c86
[ "MIT" ]
permissive
akkirilov/SoftUniProject
20bf0543c9aaa0a33364daabfddd5f4c3e400ba2
709d2d1981c1bb6f1d652fe4101c1693f5afa376
refs/heads/master
2021-07-11T02:53:18.108275
2018-12-04T20:14:19
2018-12-04T20:14:19
79,428,334
0
0
null
null
null
null
UTF-8
Java
false
false
1,145
java
package app.services; import java.util.List; import javax.transaction.Transactional; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import app.entities.User; import app.repositories.UserRepository; @Service @Transactional public class UserService { @Autowired private UserRepository userRepository; public void saveAndFlush(User user) { userRepository.saveAndFlush(user); } public void save(User user) { userRepository.save(user); } public void save(List<User> users) { userRepository.saveAll(users); } public User findById(Long id) { return userRepository.getOne(id); } public User findByEmail(String email) { return userRepository.findByEmail(email); } public User findByUsername(String username) { return userRepository.findByUsername(username); } public List<User> findAll() { return userRepository.findAll(); } public boolean isExist(User user) { return userRepository.existsById(user.getId()); } public void setLastNameManual(User user, String lastName) { userRepository.setLastName(lastName, user.getId()); } }
[ "akkirilov@mail.bg" ]
akkirilov@mail.bg
ee4b87dc3a593bc74b5a30091891086543a096e7
88b1a9f665a030ab8758a4d6f933c2164aa41287
/app/src/main/java/com/example/geoquizz/CityLoader.java
f3c06628f9d008f77de4831fc86bdc8064b23410
[]
no_license
KilianCM/GeoQuizz
77184d57f644f7a8a4d6d5c584aee16de406879b
f2784c86b2306ff3739def98ea8f10d59932b9f1
refs/heads/master
2020-04-22T12:12:58.440419
2019-03-19T17:39:25
2019-03-19T17:39:25
170,365,036
0
0
null
null
null
null
UTF-8
Java
false
false
755
java
package com.example.geoquizz; import android.content.Context; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.content.AsyncTaskLoader; public class CityLoader extends AsyncTaskLoader<String> { private Double mLongitude; private Double mLatitude; CityLoader(Context context, Double longitude, Double latitude) { super(context); mLatitude = latitude; mLongitude = longitude; } @Nullable @Override public String loadInBackground() { return NetworkUtils.getCityInfoWithLocalisation(mLongitude,mLatitude); } @Override protected void onStartLoading() { super.onStartLoading(); forceLoad(); } }
[ "chamiot.k@gmail.com" ]
chamiot.k@gmail.com
c98fe55ce2a15a7a0012532dbc483b4ad1088222
4d1af4823c1a1c3ac2a338d79c514bf5f74754a7
/src/test/java/Cucumber/casestudy/login.java
95b098822a993aa2a5629dc01e5e143d45a87de9
[]
no_license
AravindSuresh7/CaseStudy
736e7d34c7d65076400e2eaae3a0e8d3487951ec
4182cbb18aa7b81fe5ac7afee41ebf3d5a74971a
refs/heads/master
2021-07-08T13:27:35.206717
2019-07-12T04:15:16
2019-07-12T04:15:16
196,507,317
0
0
null
2020-10-13T14:31:44
2019-07-12T04:13:58
Java
UTF-8
Java
false
false
1,840
java
package Cucumber.casestudy; import java.util.List; import java.util.Map; import org.openqa.selenium.WebDriver; import org.openqa.selenium.support.PageFactory; import org.testng.Assert; import cucumber.api.DataTable; import cucumber.api.java.en.Given; import cucumber.api.java.en.Then; public class login { WebDriver driver; @Given("^user must be on Login page$") public void user_must_be_on_Login_page() throws Throwable { // Write code here that turns the phrase above into concrete actions driver=utilityClass.startBrowser("chrome","http://10.232.237.143:443/TestMeApp/login.htm"); Assert.assertEquals(driver.getTitle(), "Login"); System.out.println(" login page"); } @Given("^user enters registered credentials$") public void user_enters_registered_credentials(DataTable dt) throws Throwable { // Write code here that turns the phrase above into concrete actions // For automatic transformation, change DataTable to one of // List<YourType>, List<List<E>>, List<Map<K,V>> or Map<K,V>. // E,K,V must be a scalar (String, Integer, Date, enum etc) List<Map<String,String>> list=dt.asMaps(String.class, String.class); for(int i=0;i<list.size()-1;i++) { // System.out.println(list.get(i).get("Username")+" "+ // list.get(i).get("Password")); // System.out.println("\n"); pageFactory login= PageFactory.initElements(driver, pageFactory.class); login.login_reg(list.get(i).get("value"), list.get(i+1).get("value")); System.out.println("user entered valid credentials"); } } @Then("^user must be in Home Page$") public void user_must_be_in_Home_Page() throws Throwable { // Write code here that turns the phrase above into concrete actions Assert.assertEquals(driver.getTitle(), "Home"); System.out.println(" home page"); } }
[ "Training_C2A.04.30@CDC2-D-47Q1N62.dir.svc.accenture.com" ]
Training_C2A.04.30@CDC2-D-47Q1N62.dir.svc.accenture.com
a44048d6647dd110ca61302277f278606b86a2f1
9dcdb2c0006ab299017464337260dd09bcca3014
/app/src/test/java/com/iamtodor/contactaccess/ExampleUnitTest.java
ff8166218116aac15e4a227f71b83ede62388fef
[]
no_license
iamtodor/contact-access
fe6e66df07354a9cf6c296d27cf49d1ba87e8ec1
5187485ccf6cdacba034f827fd022832d7d2748e
refs/heads/master
2021-01-25T05:44:34.676763
2017-02-02T23:18:42
2017-02-02T23:18:42
80,674,477
0
0
null
null
null
null
UTF-8
Java
false
false
404
java
package com.iamtodor.contactaccess; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() throws Exception { assertEquals(4, 2 + 2); } }
[ "iamtodor@iamtodors-MacBook-Pro.local" ]
iamtodor@iamtodors-MacBook-Pro.local
095236ec1f4e5129bd1065c4d5476882e8c8fa49
de41e4a9d737425e30dd0eba606a50822a03c264
/agents/src/main/java/cn/agent/pojo/Log.java
c36ba5a78480c54b875d8551ebee8102956e6c5f
[]
no_license
2868452694/spring-jpa-hibernate
03d7f957412642df9dfcc03a930e3aec5445e603
af5be9f6c69c660408c75dd9db8db2719197b03c
refs/heads/master
2022-07-02T07:56:12.147155
2019-07-20T07:12:01
2019-07-20T07:12:01
197,893,959
0
0
null
2022-06-17T02:19:39
2019-07-20T07:11:48
Java
UTF-8
Java
false
false
1,633
java
package cn.agent.pojo; import org.hibernate.annotations.GenericGenerator; import javax.persistence.*; import java.io.Serializable; import java.util.Date; /** * log日志表 */ @Entity @Table(name = "LOG") public class Log implements Serializable { public Log(Users users, String loginfo, Date logtime) { this.users = users; this.loginfo = loginfo; this.logtime = logtime; } public Log() { } /** * 日志id */ @Id /*@GeneratedValue(strategy = GenerationType.SEQUENCE,generator = "sql_Log") @SequenceGenerator(name = "sql_Log",sequenceName ="seqLog")*/ @GeneratedValue(generator = "increment") @GenericGenerator(name="increment",strategy = "increment") private Long logid; /* *//** * 用户id *//* @Column(name = "USERID") private Long userid;*/ /** * 用户 */ @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name ="USERID") private Users users; /** * 日志信息 */ @Column(name = "LOGINFO") private String loginfo; /** * 操作时间 */ @Column(name = "LOGTIME") private Date logtime; public Long getLogid() { return logid; } public void setLogid(Long logid) { this.logid = logid; } /* public Long getUserid() { return userid; } public void setUserid(Long userid) { this.userid = userid; }*/ public Users getUsers() { return users; } public void setUsers(Users users) { this.users = users; } public String getLoginfo() { return loginfo; } public void setLoginfo(String loginfo) { this.loginfo = loginfo; } public Date getLogtime() { return logtime; } public void setLogtime(Date logtime) { this.logtime = logtime; } }
[ "17636592868@163.com" ]
17636592868@163.com
0fbcb419f4f4984086a55cb0dd22f70cb87a0dee
fa4528ef25b3cbb158acddfa2fcf1b0ede3a438e
/record/src/main/java/com/music/record/security/JwtAuthenticationFilter.java
897887903c2cf5da8c0a020e419009b386ab64b0
[]
no_license
lucasmaximiano/backend-music-record
15c7211c6db81d0e6c7e41231fd3ec7ce304718d
7d1510646b36f391b032fd9b2e3cce7a27ef639a
refs/heads/master
2022-12-26T10:18:40.657082
2019-11-28T23:21:34
2019-11-28T23:21:34
222,800,716
0
0
null
2022-12-16T05:07:13
2019-11-19T22:19:02
Java
UTF-8
Java
false
false
1,978
java
package com.music.record.security; import java.io.IOException; import java.util.ArrayList; import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Value; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.web.authentication.www.BasicAuthenticationFilter; import io.jsonwebtoken.Claims; import io.jsonwebtoken.Jwts; public class JwtAuthenticationFilter extends BasicAuthenticationFilter { private String secret = "beblue"; public JwtAuthenticationFilter(AuthenticationManager authenticationManager) { super(authenticationManager); } @Override protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws IOException, ServletException { String header = request.getHeader("Authorization"); if (header != null && header.startsWith("Bearer ")) { UsernamePasswordAuthenticationToken auth = getAuthentication(header.substring(7)); if (auth != null) { SecurityContextHolder.getContext().setAuthentication(auth); } } chain.doFilter(request, response); } private UsernamePasswordAuthenticationToken getAuthentication(String token) { if (isValidToken(token)) return new UsernamePasswordAuthenticationToken(getClaims(token), null, new ArrayList<>()); return null; } private Boolean isValidToken(String token) { Claims claims = getClaims(token); if (claims != null) return true; return false; } private Claims getClaims(String token) { try { return Jwts.parser().setSigningKey(secret.getBytes()).parseClaimsJws(token).getBody(); } catch (Exception e) { return null; } } }
[ "lucasrodriguesmaximiano1@gmail.com" ]
lucasrodriguesmaximiano1@gmail.com
f492c0538032d779c4cfacbc9a813afdf5c9844f
ddcb9978b31659774985c96ea1cf607df83f7ccf
/Onnix/src/com/onnix/business/dao/impl/CuentasClientesDAOImpl.java
cee7b721a42e334d43cbafbe1b213ab16fc826a2
[]
no_license
sergycg/Ocio-Indigo
b6fb7f467301ae97e67dbf7959804ab497c6794a
055cbe21c01a96e3a8cc0b025ffe2ed329f1eb13
refs/heads/master
2020-04-06T16:12:32.645852
2016-01-09T19:37:28
2016-01-09T19:37:28
42,772,426
0
0
null
null
null
null
UTF-8
Java
false
false
2,757
java
package com.onnix.business.dao.impl; import java.util.List; import org.hibernate.Criteria; import org.hibernate.Session; import org.hibernate.criterion.MatchMode; import org.hibernate.criterion.Restrictions; import org.springframework.orm.hibernate3.support.HibernateDaoSupport; import com.onnix.business.dao.ICuentasClientesDAO; import com.onnix.business.utils.StringUtils; import com.onnix.business.vo.ClienteVO; import com.onnix.business.vo.ViewCuentasClientesVO; import com.onnix.business.vo.ViewTotalesVO; public class CuentasClientesDAOImpl extends HibernateDaoSupport implements ICuentasClientesDAO{ @Override public ClienteVO loadById (Long id){ Session session = getSessionFactory().getCurrentSession(); ClienteVO vo = (ClienteVO) session.get(ClienteVO.class, id); return vo; } @Override public ViewCuentasClientesVO loadById(ViewCuentasClientesVO vo) { Criteria criteria = getSessionFactory().getCurrentSession().createCriteria(ViewCuentasClientesVO.class); criteria.add(Restrictions.eq("idCliente", vo.getIdCliente())); criteria.add(Restrictions.eq("idCuenta", vo.getIdCuenta())); ViewCuentasClientesVO resultado = new ViewCuentasClientesVO(); resultado = (ViewCuentasClientesVO) criteria.uniqueResult(); return resultado; } @Override public ViewTotalesVO loadById(ViewTotalesVO vo) { Criteria criteria = getSessionFactory().getCurrentSession().createCriteria(ViewTotalesVO.class); criteria.add(Restrictions.eq("idCliente", vo.getIdCliente())); criteria.add(Restrictions.eq("idCuenta", vo.getIdCuenta())); ViewTotalesVO resultado = new ViewTotalesVO(); resultado = (ViewTotalesVO) criteria.uniqueResult(); return resultado; } @Override public List<ViewCuentasClientesVO> findByExample(ViewCuentasClientesVO vo) { Criteria criteria = getSessionFactory().getCurrentSession().createCriteria(ViewCuentasClientesVO.class); if (StringUtils.isNotEmpty(vo.getNombre())) criteria.add(Restrictions.like("nombre", vo.getNombre(), MatchMode.ANYWHERE)); if (StringUtils.isNotEmpty(vo.getApellidos())) criteria.add(Restrictions.like("apellidos", vo.getApellidos(), MatchMode.ANYWHERE)); if (StringUtils.isNotEmpty(vo.getTelefono())) criteria.add(Restrictions.like("telefono", vo.getTelefono(), MatchMode.ANYWHERE)); if (StringUtils.isNotEmpty(vo.getCodPostal())) criteria.add(Restrictions.like("codPostal", vo.getCodPostal(), MatchMode.ANYWHERE)); if (vo.getIndActiva()!=null) criteria.add(Restrictions.eq("indActiva", vo.getIndActiva())); List listado = criteria.list(); return listado; } @Override public ClienteVO save(ClienteVO vo){ Session sesion = getSessionFactory().getCurrentSession(); sesion.saveOrUpdate(vo); return vo; } }
[ "sergycg@gmail.com" ]
sergycg@gmail.com
0aaa4cd22b96b5c054b8cb1fadff65f83cb96a6f
218e122df8307430469c215084293e26d75ed0da
/src/com/mysecretwish/exceptions/PreventiviDaoException.java
d0ff09d3d51d722bdbf636b2572e97b9253c9369
[]
no_license
hseldon80/booking
65fa326133535b3b03d796cfda5e679a7630316b
7fc4f80feac20679d6f7a2897be1dd5c9d470ef9
refs/heads/master
2021-01-25T13:28:34.593977
2018-03-19T17:12:58
2018-03-19T17:12:58
123,574,558
0
0
null
null
null
null
UTF-8
Java
false
false
663
java
/* * This source file was generated by FireStorm/DAO. * * If you purchase a full license for FireStorm/DAO you can customize this header file. * * For more information please visit http://www.codefutures.com/products/firestorm */ package com.mysecretwish.exceptions; public class PreventiviDaoException extends DaoException { /** * Method 'PreventiviDaoException' * * @param message */ public PreventiviDaoException(String message) { super(message); } /** * Method 'PreventiviDaoException' * * @param message * @param cause */ public PreventiviDaoException(String message, Throwable cause) { super(message, cause); } }
[ "36992639+ambrosioesposito1@users.noreply.github.com" ]
36992639+ambrosioesposito1@users.noreply.github.com
a29a3760dbbf96760b7612693bbf30b00f3a7a56
d1dabe42cc6e8402f22fdcd347720283f879d5f0
/src/main/java/com/anping/yueche/controller/YuecheController.java
a88f54f1b5a45ae7b4714361de6f8ccf77ffe148
[]
no_license
Betteronly/MyWeiXin_youtry
49600f51b31466962e0031e3fe8568e296dc6561
ba7ec7f562f76e8b2eb7a77bb5bcc2dc18b1e472
refs/heads/master
2021-01-21T17:09:45.287113
2017-07-04T15:56:28
2017-07-04T15:56:28
91,935,904
1
0
null
null
null
null
UTF-8
Java
false
false
8,070
java
package com.anping.yueche.controller; import com.anping.yueche.entity.CodeItem; import com.anping.yueche.pojo.CarOrderInfo; import com.anping.yueche.pojo.ServiceTelCallHistory; import com.anping.yueche.pojo.UserInfo; import com.anping.yueche.service.CommonService; import com.anping.yueche.service.YuecheService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import javax.servlet.ServletRequest; import javax.servlet.http.HttpServletRequest; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; import static com.anping.yueche.utils.CommonConstants.*; import com.youtry.myweixin_youtry.util.SendSMSUtil; @Controller @RequestMapping("/yueche") public class YuecheController { private static Logger log = LoggerFactory.getLogger(YuecheController.class); @Autowired private YuecheService yuecheService; @Autowired private CommonService commonService; public YuecheController() { super(); } /** * 约车首页显示 * * @param httpRequest * @param model * @param openId * @param servletRequest * @return */ @RequestMapping(value = { "/yuecheIndex", "/", "/index" }, method = RequestMethod.GET) public String yuecheIndex(HttpServletRequest httpRequest, Model model, String openId, ServletRequest servletRequest) { // String openId = openId; // 参数传入方式 // String openId2 = httpRequest.getParameter("openId"); // 获取参数方式 // 微信传入用户信息 // SNSUserInfo SNSuserInfo = (SNSUserInfo) httpRequest.getAttribute("snsUserInfo"); // 状态值 // String state = (String) httpRequest.getAttribute("state"); // 微信静默方式传入OpenID查询用户信息 if (!StringUtils.isEmpty(openId)) { UserInfo userInfo = yuecheService.getUserInfo(openId); model.addAttribute("openId", openId); // 客户NO if (userInfo != null) { model.addAttribute("userNo", userInfo.getUserNo()); } else { model.addAttribute("userNo", ""); } // 客户昵称 if (userInfo != null) { model.addAttribute("nickName", userInfo.getNickName()); } else { model.addAttribute("nickName", ""); } // 客户姓名 if (userInfo != null) { model.addAttribute("name", userInfo.getName()); } else { model.addAttribute("name", ""); } // 客户手机号码 if (userInfo != null) { model.addAttribute("orderPhone", userInfo.getPhone()); } else { model.addAttribute("orderPhone", ""); } } // 出发地 List<CodeItem> addrFromList = commonService.getCodeItemList(ADDR_FROM_LIST); model.addAttribute("addrFromList", addrFromList); // 目的地 List<CodeItem> addrToList = commonService.getCodeItemList(ADDR_TO_LIST); model.addAttribute("addrToList", addrToList); // model.addAttribute("anpingServiceTel", "10086"); // 出发日期 // List<CodeItem> departDateList = commonService.getCodeItemList(DEPART_DATE_LIST); List<CodeItem> departDateList = new ArrayList<CodeItem>(); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); //设置日期格式 Date today = new Date(); // 7天内预约 for (int i=0; i < 7; i++){ CodeItem codeItem = new CodeItem(); String newDay = sdf.format(new Date(today.getTime() + i * 24 * 60 * 60 * 1000)); codeItem.setKey(newDay); codeItem.setValue(newDay); departDateList.add(codeItem); } model.addAttribute("departDateList", departDateList); // 出发时刻 List<CodeItem> departTimeList = commonService.getCodeItemList(DEPART_TIME_LIST); model.addAttribute("departTimeList", departTimeList); // model.addAttribute("userInfo", (userInfo == null ? null : userInfo)); // model.addAttribute("state", state); return "anping/yueche/index"; } /** * 约车首页、约车处理 * @param carOrderInfo * @param userInfo * @param model * @return */ @RequestMapping(value = { "/orderCar" }, method = RequestMethod.POST) public String orderCar(CarOrderInfo carOrderInfo, UserInfo userInfo, Model model) { // 00:用户预约成功、10:客服确认成功、11:客服确认失败 carOrderInfo.setOrderStatus("待确认"); // 0:有效、1:无效 carOrderInfo.setDataState("0"); // 约车用户名 if (!StringUtils.isEmpty(userInfo.getName())) { carOrderInfo.setOrderName(userInfo.getName()); } else { if (!StringUtils.isEmpty(userInfo.getNickName())) { carOrderInfo.setOrderName(userInfo.getNickName()); } else { carOrderInfo.setOrderName(""); } } // 约车 boolean ret = yuecheService.doOrderCar(carOrderInfo); model.addAttribute("openId", carOrderInfo.getOpenId()); if (ret) { model.addAttribute("carOderStatus", "OK"); // 发送客服通知短信 SendSMSUtil.sendSingleSms(null, carOrderInfo.getCarOrderId()); } else { model.addAttribute("carOderStatus", "NG"); } // return "anping/yueche/ordercar_confirm"; return "anping/yueche/order_finish"; } /** * 约车信息管理 * @param model * @return */ @RequestMapping(value = { "/manage/orderCarInfo" }, method = RequestMethod.GET) public String orderInfoManage(Model model, String selectedOrderStatusList) { // 预约状态 CarOrderInfo carOrderInfo = new CarOrderInfo(); if (selectedOrderStatusList == null){ carOrderInfo.setOrderStatus("'待确认','待出发'"); //初始化 } else if ("".equals(selectedOrderStatusList)){ carOrderInfo.setOrderStatus(null); //全量检索 } else { carOrderInfo.setOrderStatus(selectedOrderStatusList); } List<CarOrderInfo> carOrderInfoList = yuecheService.getCarOrderInfo(carOrderInfo); model.addAttribute("carOrderInfoList", carOrderInfoList); List<CodeItem> orderStatusList = commonService.getCodeItemList(ORDER_STATUS); model.addAttribute("orderStatusList", orderStatusList); if (selectedOrderStatusList == null) { // 状态选择框 选择状态保持 model.addAttribute("chkbxOrderStatusWaitConfirm", true); model.addAttribute("chkbxOrderStatusWaitDepart", true); } else { // 状态选择框 选择状态保持 model.addAttribute("chkbxOrderStatusWaitConfirm", selectedOrderStatusList.contains("待确认") ? true : false); model.addAttribute("chkbxOrderStatusWaitDepart", selectedOrderStatusList.contains("待出发") ? true : false); model.addAttribute("chkbxOrderStatusFinish", selectedOrderStatusList.contains("订单完成") ? true : false); model.addAttribute("chkbxOrderStatusDelete", selectedOrderStatusList.contains("订单作废") ? true : false); } ServiceTelCallHistory serviceTelCallHistory = new ServiceTelCallHistory(); String count = yuecheService.getServiceTelCallCount(serviceTelCallHistory); model.addAttribute("countOfServiceTelCall", count); return "anping/yueche/order_info_manage"; } }
[ "roli_ice@163.com" ]
roli_ice@163.com
819d05ba7889533766d769808f0e02ea919f607a
bf1a992b5adcaefbef690120265e9dc61dec3f54
/basic-api-study/src/main/java/com/yicj/study/controller/modelsupport/ModelSupportController.java
a4c864547cd168047accf468798b4ec5205c5600
[]
no_license
yichengjie/spring-mvc-study
7deda2abbf98d6d66629a4664420baf477b3280f
ac2bf38290adbd375eb6868c7bff34e3d8039a97
refs/heads/master
2022-12-15T17:59:52.825183
2020-09-20T13:24:33
2020-09-20T13:24:33
292,978,492
0
0
null
null
null
null
UTF-8
Java
false
false
1,564
java
package com.yicj.study.controller.modelsupport; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.servlet.mvc.support.RedirectAttributes; import javax.servlet.http.HttpServletRequest; @Controller public class ModelSupportController { @GetMapping("/forwardView") public String forwardView(Model model){ // 设置转发前的模型属性 model.addAttribute("info", "转发前的属性") ; //返回转发视图,转发目标是forwardTargetView return "forward:forwardTargetView" ; } @GetMapping("/forwardTargetView") public String forwardTargetView(Model model, HttpServletRequest request){ Object info = request.getAttribute("info"); // 设置模型属性 model.addAttribute("first", info) ; model.addAttribute("second", "转发后的属性") ; return "viewView" ; } @GetMapping("/redirectView") public String redirectView(RedirectAttributes model){ // 重定向前的模型数据 model.addFlashAttribute("first", "重定向前的属性") ; // 返回重定向视图,转发目标forwardTargetView return "redirect:redirectTargetView" ; } @GetMapping("/redirectTargetView") public String redirectTargetView(Model model){ //此时的Model已经有了重定向的属性了 model.addAttribute("second", "重定向后的属性") ; return "viewView" ; } }
[ "626659321@qq.com" ]
626659321@qq.com
e226c0960527af3b4a5970b20407fbacc50371f8
265b3f9eb40057c73d6f1450eea79b932af94181
/udemy/src/test/java/spark/udemy/AppTest.java
90df7a8a8cbb03f5959d9ea08ba53ca9cee27f8f
[]
no_license
Jaimin-Parekh/spark_udemy
a4a77f8d0560a7f77de338f3ddeb667780cefe78
3e9734ce984829003dc2f1c229217b178c491fce
refs/heads/master
2020-04-19T13:43:21.794535
2019-01-29T22:17:40
2019-01-29T22:17:40
168,224,602
0
0
null
null
null
null
UTF-8
Java
false
false
639
java
package spark.udemy; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; /** * Unit test for simple App. */ public class AppTest extends TestCase { /** * Create the test case * * @param testName name of the test case */ public AppTest( String testName ) { super( testName ); } /** * @return the suite of tests being tested */ public static Test suite() { return new TestSuite( AppTest.class ); } /** * Rigourous Test :-) */ public void testApp() { assertTrue( true ); } }
[ "parekhjn@mail.uc.edu" ]
parekhjn@mail.uc.edu
0f1eeed98e6cc99586b3887dcbd1a934abd39823
8a48ffe0dfb90926c42367ea47a5ddbc316ef99a
/EP3/src/FreewayAppRamp.java
555ad1a4c31c7810bb969e5f09f4dcc6b0e365ee
[]
no_license
geien/MAC0209
fbdf309a8636e160409dba6ca7e5cdce2a58e0c3
1912eb27716c6d3a4c4fb5c89b7e119e34dc26a9
refs/heads/master
2021-06-18T07:29:43.131810
2017-07-04T00:54:13
2017-07-04T00:54:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,677
java
import org.opensourcephysics.controls.*; import org.opensourcephysics.frames.*; public class FreewayAppRamp extends AbstractSimulation { FreewayRamp freeway = new FreewayRamp (); DisplayFrame display = new DisplayFrame ("Freeway"); LatticeFrame spaceTime = new LatticeFrame ("space", "time", "Space Time Diagram"); public FreewayAppRamp () { display.addDrawable(freeway) ; } public void initialize () { freeway.numberOfCars = control.getInt("Number of cars"); freeway.roadLength = control.getInt("Road length"); freeway.p = control.getDouble("Slow down probability"); freeway.p2 = control.getDouble("Exiting ramp probability"); freeway.maximumVelocity = control.getInt("Maximum velocity"); display.setPreferredMinMax(0, freeway.roadLength, -3, 4); freeway.initialize(spaceTime); } public void doStep () { freeway.step(); } public void reset () { control.setValue("Number of cars", 10); control.setValue("Road length", 50); control.setValue("Slow down probability" , 0.5); control.setValue("Exiting ramp probability" , 0.5); control.setValue("Maximum velocity" , 2 ); control.setValue("Steps between plots" , 1); enableStepsPerDisplay(true); } public void resetAverages () { freeway.flow = 0; freeway.steps = 0; } public static void main (String [] args) { SimulationControl control = SimulationControl.createApp (new FreewayAppRamp()); control.addButton("resetAverages", "resetAverages"); } }
[ "leolanavo@gmail.com" ]
leolanavo@gmail.com
6072b414be6dfc94458b532240b415e4bf305a58
f96fe513bfdf2d1dbd582305e1cbfda14a665bec
/net.sf.smbt.jazzmutant/src-model/net/sf/smbt/jzmui/MidiVarD0ChannelPressure.java
25f1fc498f73cedcd11b87179553b7628508991e
[]
no_license
lucascraft/ubq_wip
04fdb727e7b2dc384ba1d2195ad47e895068e1e4
eff577040f21be71ea2c76c187d574f1617703ce
refs/heads/master
2021-01-22T02:28:20.687330
2015-06-10T12:38:47
2015-06-10T12:38:47
37,206,324
0
0
null
null
null
null
UTF-8
Java
false
false
454
java
/** * <copyright> * </copyright> * * $Id$ */ package net.sf.smbt.jzmui; import org.eclipse.emf.ecore.EObject; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Midi Var D0 Channel Pressure</b></em>'. * <!-- end-user-doc --> * * * @see net.sf.smbt.jzmui.JzmuiPackage#getMidiVarD0ChannelPressure() * @model * @generated */ public interface MidiVarD0ChannelPressure extends EObject { } // MidiVarD0ChannelPressure
[ "lucas.bigeardel@gmail.com" ]
lucas.bigeardel@gmail.com
a0307e23b6f4d1eef8082cf3da71fbe84a8b2a0f
a2c176b9b2f418e8d99914bec3b0a1302bcbb2f1
/app/src/main/java/br/com/ddmsoftware/sqliteandrecycleview/GroceryContract.java
c8c57e363cc094ba5e86cefbc836ab1a273c1cca
[]
no_license
douglimar/SQLiteAndRecycleView
52449c402772749a87504191941577bc72829825
f035e5afc890c4108e221022b86d9f671902aca2
refs/heads/master
2020-04-02T23:22:57.008691
2018-10-26T16:53:34
2018-10-26T16:53:34
154,865,554
0
0
null
null
null
null
UTF-8
Java
false
false
488
java
package br.com.ddmsoftware.sqliteandrecycleview; import android.provider.BaseColumns; public class GroceryContract { private GroceryContract() { } public static final class GroceryEntry implements BaseColumns { public static final String TABLE_NAME = "groceryList"; public static final String COLUMN_NAME = "name"; public static final String COLUMN_AMOUNT = "amount"; public static final String COLUMN_TIMESTAMP = "timestamp"; } }
[ "douglimar@gmail.com" ]
douglimar@gmail.com
8be0f6923f6e7bcdadad313d0812fe0b387c9ee9
10d2e01f89d94aac94c8a6226f8b050fec396769
/app/src/main/java/com/luthfy/tugas_uas_genap_2021_akb_if_9_10118379/Model/AdapterTourPlace.java
b6fcc6c857276388e48aed15a0822adaf88f41ca
[]
no_license
luthfykarliandi007/Tugas-UAS-Genap-2021-AKB-IF-9-10118379
a5e122910a01870b5a27049b7d851fce8d91b67f
68d57ab77fb5496e34aaf27f60ce9766731d73f0
refs/heads/master
2023-07-13T22:00:50.059157
2021-08-14T10:52:57
2021-08-14T10:52:57
395,941,892
0
0
null
null
null
null
UTF-8
Java
false
false
3,207
java
package com.luthfy.tugas_uas_genap_2021_akb_if_9_10118379.Model; import android.app.Activity; import android.content.Intent; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import com.bumptech.glide.Glide; import com.luthfy.tugas_uas_genap_2021_akb_if_9_10118379.R; import com.luthfy.tugas_uas_genap_2021_akb_if_9_10118379.View.DetailActivity; import java.util.ArrayList; import androidx.annotation.NonNull; import androidx.cardview.widget.CardView; import androidx.recyclerview.widget.RecyclerView; /** NIM : 10118379 * Nama : Luthfy Karliandi Nugraha * Kelas : IF-9 * **/ public class AdapterTourPlace extends RecyclerView.Adapter<AdapterTourPlace.TourPlaceViewHolder> { private ArrayList<TourPlace> listTourPlace = new ArrayList<>(); private Activity activity; public AdapterTourPlace(Activity activity){ this.activity = activity; } public ArrayList<TourPlace> getListNotes(){ return listTourPlace; } public void setListNotes(ArrayList<TourPlace> listNotes){ if (listNotes.size() > 0 ){ this.listTourPlace.clear(); } this.listTourPlace.addAll(listNotes); notifyDataSetChanged(); } @NonNull @Override public AdapterTourPlace.TourPlaceViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_note, parent, false); return new TourPlaceViewHolder(view); } @Override public void onBindViewHolder(@NonNull TourPlaceViewHolder holder, int position) { holder.tvNama.setText(listTourPlace.get(position).getNama()); holder.tvWaktuBuka.setText(listTourPlace.get(position).getWaktuBuka()); Glide.with(activity) .asBitmap() .load(listTourPlace.get(position).getFoto()) .into(holder.tvFoto); holder.cvNote.setOnClickListener(new CustomClickListener(position, new CustomClickListener.OnItemClickCallback() { @Override public void onItemClicked(View view, int position) { Intent intent = new Intent(activity, DetailActivity.class); intent.putExtra(DetailActivity.EXTRA_POSITION, position); intent.putExtra(DetailActivity.EXTRA_NOTE, listTourPlace.get(position)); activity.startActivityForResult(intent, DetailActivity.REQUEST_UPDATE); } })); } @Override public int getItemCount() { return listTourPlace.size(); } public class TourPlaceViewHolder extends RecyclerView.ViewHolder{ final TextView tvNama, tvWaktuBuka; final ImageView tvFoto; final CardView cvNote; public TourPlaceViewHolder(@NonNull View itemView) { super(itemView); tvNama = itemView.findViewById(R.id.nama_wisata); tvWaktuBuka = itemView.findViewById(R.id.waktuBuka); tvFoto = itemView.findViewById(R.id.gambar_wisata); cvNote = itemView.findViewById(R.id.cv_item_note); } } }
[ "luthfykarliandi@gmail.com" ]
luthfykarliandi@gmail.com
2a69bab2d29aa34841ae670c2b3b380050d6cbc4
ab30eded94edeb5687b1260c4a15dab828d66acf
/park_platform/src/main/java/com/wynlink/park_platform/service/SysUserService.java
06affc55b00837516f47994ffa7726b33fd92977
[]
no_license
shanliyun/repo1
90f9a1fcf1a2735634ba3518384c8af669c08231
744e99d2b12cc1e1d251882bfaaf9cbc650d97a2
refs/heads/master
2022-02-22T13:35:31.216902
2019-05-30T06:38:33
2019-05-30T06:38:33
189,336,742
0
0
null
2022-02-09T22:14:46
2019-05-30T03:09:15
Java
UTF-8
Java
false
false
287
java
package com.wynlink.park_platform.service; import com.wynlink.park_platform.entity.SysUser; import com.baomidou.mybatisplus.service.IService; /** * <p> * 服务类 * </p> * * @author Vincent * @since 2019-03-19 */ public interface SysUserService extends IService<SysUser> { }
[ "lys980787053@163.com" ]
lys980787053@163.com
08ad9e8b818187088673fe4a619deb06779e5d6a
9b7b7c2862ee705c4efd5491cd389bb144b084b5
/src/领扣算法/A简单题/汉明距离总和/Main.java
e0d3874648c0fea1f2d0ade1c9f704be1a95c90b
[]
no_license
g1587613421/arithmetic
5bf16083df2b9791d6ff09ea4463610184a250cb
22f99afb5f785eadb8cff57ec09c635dead69d50
refs/heads/master
2021-07-10T03:19:08.413358
2021-04-02T00:58:25
2021-04-02T00:58:25
235,080,687
1
0
null
null
null
null
UTF-8
Java
false
false
747
java
package 领扣算法.A简单题.汉明距离总和; public class Main { public int totalHammingDistance(int[] nums) { if(nums.length<=1){ return 0; } int len=nums.length; int[] sums=new int[32]; int x=0; for(int i=0;i<len;i++){//统计每个二进制位上的1出现个数 for(int j=0;j<32;j++){ sums[j]+=nums[i]&1; nums[i]=nums[i]>>1; if(nums[i]==0){ break; } } } int sum=0; for(int i=0;i<32;i++){//通过对每个二进制位上的1的个数和0的个数相乘,求和 sum+=sums[i]*(len-sums[i]); } return sum; } }
[ "g1587613421@outlook.com" ]
g1587613421@outlook.com
3be42906b0e03985663ff10e87f7bf19028273f1
a719959335af6a1b3b0aaad661e369c2a86864e1
/app/src/main/java/co/herxun/impp/utils/Constant.java
744f6be40e3471d7db4a45965ec4bef7167be144
[]
no_license
fengfansky/JianKouNew
f3cf04ba48b9c76e25f2a956d3081d21f2750b14
7833d2dd7c1f0a91659f8ae0e8fd76bb502b15b6
refs/heads/master
2022-11-07T06:14:33.010667
2020-06-30T11:14:35
2020-06-30T11:14:35
275,756,242
0
0
null
null
null
null
UTF-8
Java
false
false
1,718
java
package co.herxun.impp.utils; public class Constant { public final static String PUSH_CHANNEL = "_IMPP_DEFAULT_"; public final static String FRIEND_REQUEST_KEY_TYPE = "type"; public final static String FRIEND_REQUEST_KEY_USERNAME = "username"; public final static String FRIEND_REQUEST_TYPE_SEND = "send"; public final static String FRIEND_REQUEST_TYPE_APPROVE = "approve"; public final static String FRIEND_REQUEST_TYPE_REJECT = "reject"; public final static String FRIEND_REQUEST_ID = "request_id"; public final static String INTENT_EXTRA_KEY_CLIENT = "client"; public final static String INTENT_EXTRA_KEY_ROOM = "room"; public final static String INTENT_EXTRA_KEY_POST_ID = "post"; public final static String INTENT_EXTRA_KEY_CHAT = "chat"; public final static String INTENT_EXTRA_KEY_TOPIC = "topic"; public final static String INTENT_EXTRA_KEY_TOPIC_EDIT_TYPE = "topic_edit_type"; public final static String INTENT_EXTRA_KEY_TOPIC_EDIT_FILTER_MEMBERS = "topic_edit_filter_members"; public final static String INTENT_EXTRA_KEY_PAYLOAD = "payload"; public final static int REQUESTCODE_PHOTO_TAKE = 0; public final static int REQUESTCODE_PHOTO_PICK = 1; public final static int REQUESTCODE_PHOTO_CROP = 2; public final static String ROOM_TYPE = "room"; public final static String BULLETIN_TYPE = "bulletin"; public final static int VOTE_TYPE_ALL = 1; public final static int VOTE_TYPE_MINE = 2; public final static int VOTE_TYPE_JOIN = 3; public final static String VOTE_TYPE_SINGLE = "single"; public final static String VOTE_TYPE_MULTIPLE = "multiple"; public final static String ROOM_ID = "room_id"; }
[ "fengfan@shandianyun.com" ]
fengfan@shandianyun.com
069bb421cdd3a164e657ab133e036389dc1eef31
d521a95d6c096082fbf49ca64f55c08ff0afe468
/src-pos/com/openbravo/data/loader/SentenceExec.java
ee13f77089b36134e3fd2af8e6f1d673f9029221
[]
no_license
rhinterndorfer/w4cash
3276adfd58dec62f8d898e942fd9c255de5706b6
896c9a3751fc378d9e85c130274fa6170b8f80a0
refs/heads/master
2023-07-06T19:36:42.316276
2023-04-28T12:40:36
2023-04-28T12:40:36
46,166,005
1
1
null
null
null
null
UTF-8
Java
false
false
1,231
java
// Openbravo POS is a point of sales application designed for touch screens. // Copyright (C) 2007-2009 Openbravo, S.L. // http://www.openbravo.com/product/pos // // This file is part of Openbravo POS. // // Openbravo POS 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. // // Openbravo POS is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Openbravo POS. If not, see <http://www.gnu.org/licenses/>. package com.openbravo.data.loader; import com.openbravo.basic.BasicException; import com.openbravo.basic.SignatureUnitException; public interface SentenceExec { public int exec() throws BasicException; public int exec(Object params) throws BasicException; public int exec(Object... params) throws BasicException; }
[ "office@rammelhof.at" ]
office@rammelhof.at
81d8e4a7da0b34a24cad6cb482f4ee7447702756
b01cb09dc5c9ed0e0cfea41cbbb6fc0de8fdbedf
/src/main/java/com/bedirhansisman/springboot/thymeleafdemo/service/EmployeeServiceImpl.java
932061522375d225840d02e132d9ab9c9654d152
[]
no_license
BedirhanSisman/SpringBootFullProjectThymeleafTemplate
86ebc2449658498e1bbb2ddb024371e0abfd9be9
9ab59155758c8b7ed100298b19ebc607bb80416a
refs/heads/master
2020-05-30T12:26:02.068120
2019-06-01T13:14:59
2019-06-01T13:14:59
189,734,438
0
0
null
null
null
null
UTF-8
Java
false
false
1,239
java
package com.bedirhansisman.springboot.thymeleafdemo.service; import java.util.List; import java.util.Optional; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.bedirhansisman.springboot.thymeleafdemo.dao.EmployeeRepository; import com.bedirhansisman.springboot.thymeleafdemo.entity.Employee; @Service public class EmployeeServiceImpl implements EmployeeService { private EmployeeRepository employeeRepository; @Autowired public EmployeeServiceImpl(EmployeeRepository employeeRepository) { this.employeeRepository = employeeRepository; } @Override public List<Employee> findAll() { return employeeRepository.findAllByOrderByLastNameAsc(); } @Override public Employee findById(int theId) { Optional<Employee> result = employeeRepository.findById(theId); Employee employee = null; if(result.isPresent()) { employee = result.get(); }else { throw new RuntimeException("Did not find the employee id - " + theId); } return employee; } @Override public void save(Employee employee) { employeeRepository.save(employee); } @Override public void deleteById(int theId) { employeeRepository.deleteById(theId); } }
[ "bedirhan.sisman@gmail.com" ]
bedirhan.sisman@gmail.com
5e5741ca98340993eb807e696da4603a106dc7f4
d35caff96b4b2a8647ea50548114e452b6b7073e
/app/src/main/java/edu/tecii/android/practica_fragments/MainCallbacks.java
bab8488b499216690b7f6bf0dedcdc3875b2b6a6
[]
no_license
HazukiS/Practica_Fragments
50887cf8cc4b22854fe9d9b692c6b5fe07c603a9
c078a29fe6c855f6dfea9f8f85cd78b8cfc0671e
refs/heads/master
2021-01-12T12:29:09.720704
2016-11-01T06:38:23
2016-11-01T06:38:23
72,510,300
0
0
null
null
null
null
UTF-8
Java
false
false
194
java
package edu.tecii.android.practica_fragments; /** * Created by hazuk on 31/10/2016. */ public interface MainCallbacks { public void onMsgFromFragToMain (String sender,String strValue); }
[ "alejandracalderon322@gmail.com" ]
alejandracalderon322@gmail.com
99eabfaa50d07aef58a52749e350804bb0978e5e
1466992fcbf177558e30a29ef24e8106aecdd67c
/src/main/java/com/dingzhaohua/helloworld/Swagger2.java
69ff02ab74bfd13328b4edb0d93b719635816a04
[ "MIT" ]
permissive
dzh1104/freedom
d74ba7ba806117388c7bb7c5c741c9fb00319bb9
de46a6e8d055e6e871fd8b7792180d4b0bc3489d
refs/heads/master
2020-04-06T08:45:55.934841
2018-11-27T11:53:53
2018-11-27T11:53:53
157,315,576
1
0
null
null
null
null
UTF-8
Java
false
false
1,883
java
package com.dingzhaohua.helloworld; //swagger2的配置文件,在项目的启动类的同级文件建立 import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import springfox.documentation.builders.ApiInfoBuilder; import springfox.documentation.builders.PathSelectors; import springfox.documentation.builders.RequestHandlerSelectors; import springfox.documentation.service.ApiInfo; import springfox.documentation.service.Contact; import springfox.documentation.spi.DocumentationType; import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.swagger2.annotations.EnableSwagger2; //swagger2的配置 @Configuration //项目启动的时候启动swagger2 @EnableSwagger2 public class Swagger2 { //swagger2的配置文件,这里可以配置swagger2的一些基本的内容,比如扫描的包等等 @Bean public Docket createRestApi() { return new Docket(DocumentationType.SWAGGER_2) .apiInfo(apiInfo()) .select() //为当前包路径,指的是我们在哪些类中使用swagger2来测试 .apis(RequestHandlerSelectors.basePackage("com.dingzhaohua.helloworld.Controller")) .paths(PathSelectors.any()) .build(); } //构建 api文档的详细信息函数,注意这里的注解引用的是哪个 private ApiInfo apiInfo() { return new ApiInfoBuilder() //页面标题 .title("Spring Boot 测试使用 Swagger2 构建RESTful API") //创建人 .contact(new Contact("zhding", "https://github.com/dzh1104", "zhding1104@163.com")) //版本号 .version("1.0") //描述 .description("API 描述") .build(); } }
[ "zhding1104@163.com" ]
zhding1104@163.com
cdc84f7ea823163fbefe6536b26b216d997926c3
731994fa30d6e344bcd8d2d804ab955497cf85e4
/src/com/zhoulychn/剑指Offer/连续子数组最大和.java
51d2071f26cb663dbb5f51df0dd118731894b48b
[]
no_license
zhoulychn/algorithm
33893cd50307ebcd7467e6247173c527dbe5a1e1
2ca6d21060cf8cb5c4be0ba0ed4e73b8bf85b151
refs/heads/master
2021-05-01T21:26:40.081735
2020-08-13T07:24:03
2020-08-13T07:24:03
120,913,518
0
0
null
null
null
null
UTF-8
Java
false
false
449
java
package com.zhoulychn.剑指Offer; public class 连续子数组最大和 { public int FindGreatestSumOfSubArray(int[] array) { if (array.length == 1) return array[0]; int result = array[0], sum = array[0]; for (int i = 1; i < array.length; i++) { if (array[i] < 0) result = Math.max(result, sum); sum = Math.max(array[i], sum + array[i]); } return Math.max(result, sum); } }
[ "zhoulychn@qq.com" ]
zhoulychn@qq.com
b3853f7d52d4d5e255240b5559135e220de4b1f0
c71b205558e3320bd06e97ad280de56beeb27826
/sscorp-core/src/main/java/com/superconduits/core/business/interfaces/IProjects.java
71eb6c473b6767afaac978ba93f73f6bef528d45
[]
no_license
bhaskardas/SSCorp
0f4acbdf759dbeb4cd01ae351904179c07134dcb
0df30a1f6430bc2b06be58f90884040a46105d9f
refs/heads/master
2020-06-08T17:13:38.321237
2011-10-27T06:46:53
2011-10-27T06:46:53
2,210,650
0
0
null
null
null
null
UTF-8
Java
false
false
798
java
/* * This is the main interface in the service layer to interact with the front * end layer of the application. This interface provides business functionality * to return all the projects related information of Super Sales Corporation. */ package com.superconduits.core.business.interfaces; import com.superconduits.core.to.project.ProjectCategoryTO; import com.superconduits.core.to.project.ProjectTO; import java.util.List; /** * @author bhaskar * @Created on 20th Nov 2010 * @Version : 1.0 * @ChangeLog : */ public interface IProjects { /** * Fetches the list of all the project categories that super sales * corporation is currently doing. * @param companyId * @return */ public List<ProjectCategoryTO> fetchProjectCategories(Integer companyId); }
[ "bhaskar.aries@gmaail.com" ]
bhaskar.aries@gmaail.com
61dfd010b2cc07c572de8184e5e00efe3cc416f7
dc888b07c782295a3cd181fe4836572b0d522425
/app/src/main/java/com/chocco/huy/qlsk/PaperAdapter.java
00bbf9bc3039abe520fb86e9a30134dee257b6f7
[]
no_license
hoangvu96z/QUAN-LY-SUC-KHOE
24ec6398f07fa96cd5c88e76ab3ebbf0cbc6c6ac
7905c3870c0c07a4e98f6cdf0173966cc7b7e9ce
refs/heads/master
2021-01-22T03:30:24.066642
2017-05-25T16:32:09
2017-05-25T16:32:09
92,383,101
0
0
null
null
null
null
UTF-8
Java
false
false
1,229
java
package com.chocco.huy.qlsk; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import android.support.v4.app.FragmentStatePagerAdapter; /** * Created by ACER on 4/7/2017. */ public class PaperAdapter extends FragmentPagerAdapter { int mNumOfTabs; public PaperAdapter(FragmentManager fm,int NumOfTabs) { super(fm); this.mNumOfTabs=NumOfTabs; } @Override public Fragment getItem(int position) { switch (position) { case 0: TabFragment1 tab1 = new TabFragment1(); return tab1; case 1: TabFragment2 tab2 = new TabFragment2(); return tab2; case 2: TabFragment3 tab3 = new TabFragment3(); return tab3; case 3: TabFragment4 tab4 = new TabFragment4(); return tab4; case 4: TabFragment5 tab5 = new TabFragment5(); return tab5; default: return null; } } @Override public int getCount() { return mNumOfTabs; } }
[ "hoangvu96z@gmail.com" ]
hoangvu96z@gmail.com
2fc91b4dcec038dfcbb9cbdb2fccf4d773943efe
e9f671edda745b666d0297431c94a67304de6d50
/spring_security/src/main/java/com/spring/security/LoginFailureHandler.java
a8821213cfbd402967ef53b14be00e5fc664244d
[]
no_license
rabo2/Spring
ca026fca00fac1a8b2729b65eebcc8830afa7d18
41428dbfd94400edce338f446f02245ead269e56
refs/heads/master
2023-08-17T07:33:37.848099
2021-09-28T07:51:47
2021-09-28T07:51:47
390,545,364
0
0
null
null
null
null
UTF-8
Java
false
false
953
java
package com.spring.security; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.security.core.AuthenticationException; import org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler; public class LoginFailureHandler extends SimpleUrlAuthenticationFailureHandler{ @Override public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) throws IOException, ServletException { response.setContentType("text/html;charset=utf-8"); PrintWriter out = response.getWriter(); out.println("<script>"); out.println("alert('아이디 혹은 패스워드가 일치하지 않습니다');"); out.println("history.go(-1);"); out.println("</script>"); } }
[ "raboy500@gmail.com" ]
raboy500@gmail.com
172eae96ed04c08f0f463717375a858ec190c479
a3d2ff6dee7ee79f6eeca3b145e8e74a3600c874
/src/trees/TreeStructure.java
c600f0ab65c94381a885ea3e354ec2d3fe1e736c
[]
no_license
rithuiketz/HackerRankSolutions
26772ce262693ff58c399aa6e36ebcc6be703acc
86cb9eadc5ab6d012e066fc5ffd2bf1036475cf9
refs/heads/master
2022-12-05T19:35:01.422636
2020-08-23T18:36:26
2020-08-23T18:36:26
289,745,292
0
0
null
null
null
null
UTF-8
Java
false
false
1,397
java
package trees; public class TreeStructure { private TreeNode root; protected class TreeNode { private Integer data; private TreeNode left; private TreeNode right; public TreeNode(Integer data) { this.data = data; } public void setLeft(TreeNode leftNode) { this.left = leftNode; } public void setRight(TreeNode rightNode) { this.left = rightNode; } public Integer getData() { return this.data; } public TreeNode getLeft() { return this.left; } public TreeNode getRight() { return this.right; } @Override public String toString() { // TODO Auto-generated method stub return String.valueOf(data); } } public void add(Integer data) { if (this.root == null) this.root = new TreeNode(data); else { TreeNode targetNode = this.root; TreeNode temp = null; while (targetNode.left != null && data < targetNode.data) { targetNode = targetNode.left; } while (targetNode.right != null && data > targetNode.data ) { targetNode = targetNode.right; } if (data < targetNode.data) { temp = targetNode.left; targetNode.left = new TreeNode(data); targetNode.left.left = temp; } if (data > targetNode.data) { temp = targetNode.right; targetNode.right = new TreeNode(data); targetNode.right.right = temp; } } } public TreeNode getRoot() { return this.root; } }
[ "=rithuik.etz@gmail.com" ]
=rithuik.etz@gmail.com
a185c112a02141bea4c19880364aeb5765a171f0
266c9b8553595acf30a96a86e0077cd87a33e3c6
/battleship-game/src/main/java/com/game/battleship/exception/BattleShipRuntimeException.java
b00e4aa7845f394f33eaa27299289124f9aac8f3
[]
no_license
zuned/battleshipGame
dd2e13b75e8dc02ac7ad0d36e0e593086b381842
1195c50ee2add6602a41c7f20f15347c20fa7525
refs/heads/master
2021-07-01T10:50:36.741363
2017-09-21T06:22:32
2017-09-21T06:22:32
104,307,795
0
0
null
null
null
null
UTF-8
Java
false
false
568
java
package com.game.battleship.exception; public class BattleShipRuntimeException extends RuntimeException{ /** * */ private static final long serialVersionUID = 1L; private final String errorCode; public BattleShipRuntimeException(final String errorCode ,final String message){ super(message); this.errorCode = errorCode; } public BattleShipRuntimeException(final String errorCode ,final String message , Throwable exception){ super(message, exception); this.errorCode = errorCode; } public String getErrorCode() { return errorCode; } }
[ "Zuned.Ahmed@hcentive.com" ]
Zuned.Ahmed@hcentive.com
1e4033f58706699dbed4c844d7abe62529dd7040
42a3840113043ea90162c93c32e2a08f93675843
/DesignPatterns/src/main/java/com/cosmo/PrototypePattern/Mail.java
34ac5db905be7912ac306184aec4128a88b736f7
[]
no_license
cosmohsueh/DesignPatterns
d1e0987467da3c483c0766e30760bd9aa8ab428e
03e9d3baed6875dde33183c50ae17f35abaabfc9
refs/heads/master
2021-01-01T03:51:06.643417
2016-05-04T07:15:28
2016-05-04T07:15:28
56,737,098
0
0
null
null
null
null
UTF-8
Java
false
false
1,228
java
package com.cosmo.PrototypePattern; public class Mail implements Cloneable { private String receiver; private String subject; private String appellation; private String context; private String tail; public Mail(AdvTemplate advTemplate) { this.subject = advTemplate.getAdvSubject(); this.context = advTemplate.getAdvContext(); } public String getReceiver() { return receiver; } public void setReceiver(String receiver) { this.receiver = receiver; } public String getSubject() { return subject; } public void setSubject(String subject) { this.subject = subject; } public String getAppellation() { return appellation; } public void setAppellation(String appellation) { this.appellation = appellation; } public String getContext() { return context; } public void setContext(String context) { this.context = context; } public String getTail() { return tail; } public void setTail(String tail) { this.tail = tail; } @Override protected Mail clone() { Mail mail = null; try{ mail = (Mail) super.clone(); } catch(CloneNotSupportedException e){ e.printStackTrace(); } return mail; } }
[ "cosmo.hsueh@gmail.com" ]
cosmo.hsueh@gmail.com
14a420ba136ff90eb7261efde4c5845c04bc72e0
45c8befa5628270ef6e72552adddf2ba2d138c42
/pattern/pattern-proxy/src/main/java/com/bingo/java/pattern/proxy/cglibproxy/CGLibProxyTest.java
20f621bc5b426c9ec4b0f892bc72cf09a42cf821
[]
no_license
yyb0107/java-hub
7603f987fb50f55101b42952cec93cefb7d57d02
5f7f000317379245d92c4da3bac8b565eded16a8
refs/heads/master
2022-12-22T01:11:15.290197
2021-08-26T18:21:21
2021-08-26T18:21:21
177,807,824
0
0
null
2022-12-16T08:36:03
2019-03-26T14:41:49
Java
UTF-8
Java
false
false
661
java
package com.bingo.java.pattern.proxy.cglibproxy; import com.bingo.java.pattern.proxy.pojo.IPerson; import com.bingo.java.pattern.proxy.pojo.Person; import net.sf.cglib.core.DebuggingClassWriter; /** * @author Bingo * @title: CGLibProxyTest * @projectName java-hub * @description: TODO * @date 2019/4/5 23:08 */ public class CGLibProxyTest { public static void main(String[] args) { System.setProperty(DebuggingClassWriter.DEBUG_LOCATION_PROPERTY,"D://cglib_proxy_classes"); JobHunter hunter = new JobHunter(); IPerson person = (IPerson) hunter.getInstance(Person.class); person.findJob("this is command!"); } }
[ "yangyingbin0107@163.com" ]
yangyingbin0107@163.com
0d59c0419c12eb102a0835b96ede07467f869459
4573ee264818b8f7ee8dfa87583f004c8536e7a1
/src/main/java/com/yundaren/support/po/ProjectPo.java
e67c6b66bbbc298d24d3b8e900a8c2e32ac40ea0
[]
no_license
n1318914/make8
2e4ddcc9d47e6db2b1df6c5fd69b92d8b1660b3a
613980839235ec9a86d38a20e58d8daa3047e5f8
refs/heads/master
2021-01-19T09:55:35.301319
2017-02-16T07:20:22
2017-02-16T07:20:22
82,151,815
0
1
null
null
null
null
UTF-8
Java
false
false
1,922
java
package com.yundaren.support.po; import java.util.Date; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @Data public class ProjectPo { // 活动ID private String id; // 需求类型 private String type; // 心里价格 private String priceRange; // 需求简述 private String name; // 需求详细描述 private String content; // 需求附件 private String attachment; // 交付周期(天) private int period; // 竞标截止时间 @DateTimeFormat(pattern = "yyyy-MM-dd") private Date bidEndTime; // 后台状态 -1审核未通过, 0审核中,1招标中,2托管中,3工作中,4验收中,5验收未通过,6验收通过, 8关闭(未选标),9关闭(任务完成),10已取消,11已评价 private int backgroudStatus = -10; // 提单人用户ID private long creatorId; // 中标人用户ID private long employeeId = -1; // 审核人 private long checkerId = -1; // 审核日期 private Date checkTime; // 审核结果 private String checkResult; // 创建时间 @DateTimeFormat(pattern = "yyyy-MM-dd") private Date createTime; // 备注 private String remark; // 发标人姓名 private String userName; // 竞标个数 private int joinCount; // 完成时间 @DateTimeFormat(pattern = "yyyy-MM-dd") private Date finishTime; // 审核通过时间 @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private Date acceptTime; // 审核不通过原因 private String acceptResult; // 雇主选择公开的联系方式(1手机 2邮箱 3QQ 4微信)用逗号分隔 private String publicContact; // 是否为诚意项目(0否、1是) private int isSincerity = -1; // 项目排序级别(0普通,1置顶项目,2诚意项目) private int ranking = -1; // 是否删除(0否,1是) private int deleted = -1; private String contactMobile; private String contactEmail; private String contactQq; private String contactWeixin; }
[ "358058306@qq.com" ]
358058306@qq.com
5b6e496be01c374816e0bfa3ca0b9843b8cce1bf
25f7be2a13a2648a7150a6d6538806ae0eed22bd
/aliyun-java-sdk-dds/src/main/java/com/aliyuncs/dds/model/v20151201/ModifyInstanceAutoRenewalAttributeResponse.java
a867debf5495f33985e62c411b29c4f770e304c7
[ "Apache-2.0" ]
permissive
llCnll/aliyun-openapi-java-sdk
4d5ddb34e672a4188cdfe7dc1463b5d89e26569c
6400549026014f1ffc2ffd22b7f29c29b37cccc6
refs/heads/master
2020-04-22T02:53:28.836935
2019-01-31T08:31:36
2019-02-01T09:15:01
170,066,708
1
0
NOASSERTION
2019-02-11T04:16:11
2019-02-11T04:16:11
null
UTF-8
Java
false
false
1,319
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.dds.model.v20151201; import java.util.Map; import com.aliyuncs.AcsResponse; import com.aliyuncs.dds.transform.v20151201.ModifyInstanceAutoRenewalAttributeResponseUnmarshaller; import com.aliyuncs.transform.UnmarshallerContext; /** * @author auto create * @version */ public class ModifyInstanceAutoRenewalAttributeResponse extends AcsResponse { private String requestId; public String getRequestId() { return this.requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } @Override public ModifyInstanceAutoRenewalAttributeResponse getInstance(UnmarshallerContext context) { return ModifyInstanceAutoRenewalAttributeResponseUnmarshaller.unmarshall(this, context); } }
[ "yixiong.jxy@alibaba-inc.com" ]
yixiong.jxy@alibaba-inc.com
da7fe6df318e5d27fb45e21bd150bcfe57e61cdb
f0a64578e206d196ed29465fa8d1115ea15534d3
/src/main/java/com/bishal/Bank/common/enums/TransactionType.java
6310482ef9f54e50753e32d7233e780539a7af22
[]
no_license
Bishalj/Bank
012c3f6816702fcb631b77ccd240920c4c544740
7bb9d69987ec5a17fd9dc93745d0002e6e29279c
refs/heads/master
2022-11-01T04:23:10.748598
2020-06-15T16:54:52
2020-06-15T16:54:52
272,141,428
0
0
null
null
null
null
UTF-8
Java
false
false
94
java
package com.bishal.Bank.common.enums; public enum TransactionType { WITHDRAW, DEPOSIT }
[ "jaiswalbishal3@gmail.com" ]
jaiswalbishal3@gmail.com
88ca7f3c82fbf06696ae18a6d519c22390c093c0
85cfc652459ca2f015aa8c8dc55240721632cee0
/bin/custom/cartridge/cartridgestorefront/web/src/com/hybris/cartridge/storefront/controllers/pages/checkout/steps/SummaryCheckoutStepController.java
5b44881b7b976d6e219706ead3dfa4c1d6252d7c
[]
no_license
varshadhamal/Hybris-test
43e5479b9909e41e6276dfde6b4f4ff1cdae9b0e
a29c6090680110ab733e2077772c9c477d497df6
refs/heads/master
2020-03-18T06:31:01.940494
2018-05-22T11:58:12
2018-05-22T11:58:12
134,400,503
0
1
null
null
null
null
UTF-8
Java
false
false
8,852
java
/* * [y] hybris Platform * * Copyright (c) 2000-2016 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 com.hybris.cartridge.storefront.controllers.pages.checkout.steps; import de.hybris.platform.acceleratorservices.enums.CheckoutPciOptionEnum; import de.hybris.platform.acceleratorstorefrontcommons.annotations.PreValidateCheckoutStep; import de.hybris.platform.acceleratorstorefrontcommons.annotations.RequireHardLogIn; import de.hybris.platform.acceleratorstorefrontcommons.checkout.steps.CheckoutStep; import de.hybris.platform.acceleratorstorefrontcommons.constants.WebConstants; import de.hybris.platform.acceleratorstorefrontcommons.controllers.pages.checkout.steps.AbstractCheckoutStepController; import de.hybris.platform.acceleratorstorefrontcommons.controllers.util.GlobalMessages; import de.hybris.platform.acceleratorstorefrontcommons.forms.PlaceOrderForm; import de.hybris.platform.cms2.exceptions.CMSItemNotFoundException; import de.hybris.platform.commercefacades.order.data.CartData; import de.hybris.platform.commercefacades.order.data.OrderData; import de.hybris.platform.commercefacades.order.data.OrderEntryData; import de.hybris.platform.commercefacades.product.ProductOption; import de.hybris.platform.commercefacades.product.data.ProductData; import de.hybris.platform.commerceservices.order.CommerceCartModificationException; import de.hybris.platform.order.InvalidCartException; import de.hybris.platform.payment.AdapterException; import com.hybris.cartridge.storefront.controllers.ControllerConstants; import java.util.Arrays; import javax.servlet.http.HttpServletRequest; import org.apache.commons.lang.StringUtils; import org.apache.log4j.Logger; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.servlet.mvc.support.RedirectAttributes; @Controller @RequestMapping(value = "/checkout/multi/summary") public class SummaryCheckoutStepController extends AbstractCheckoutStepController { private static final Logger LOGGER = Logger.getLogger(SummaryCheckoutStepController.class); private static final String SUMMARY = "summary"; @RequestMapping(value = "/view", method = RequestMethod.GET) @RequireHardLogIn @Override @PreValidateCheckoutStep(checkoutStep = SUMMARY) public String enterStep(final Model model, final RedirectAttributes redirectAttributes) throws CMSItemNotFoundException, // NOSONAR CommerceCartModificationException { final CartData cartData = getCheckoutFacade().getCheckoutCart(); if (cartData.getEntries() != null && !cartData.getEntries().isEmpty()) { for (final OrderEntryData entry : cartData.getEntries()) { final String productCode = entry.getProduct().getCode(); final ProductData product = getProductFacade().getProductForCodeAndOptions(productCode, Arrays.asList(ProductOption.BASIC, ProductOption.PRICE)); entry.setProduct(product); } } model.addAttribute("cartData", cartData); model.addAttribute("allItems", cartData.getEntries()); model.addAttribute("deliveryAddress", cartData.getDeliveryAddress()); model.addAttribute("deliveryMode", cartData.getDeliveryMode()); model.addAttribute("paymentInfo", cartData.getPaymentInfo()); // Only request the security code if the SubscriptionPciOption is set to Default. final boolean requestSecurityCode = CheckoutPciOptionEnum.DEFAULT.equals(getCheckoutFlowFacade() .getSubscriptionPciOption()); model.addAttribute("requestSecurityCode", Boolean.valueOf(requestSecurityCode)); model.addAttribute(new PlaceOrderForm()); storeCmsPageInModel(model, getContentPageForLabelOrId(MULTI_CHECKOUT_SUMMARY_CMS_PAGE_LABEL)); setUpMetaDataForContentPage(model, getContentPageForLabelOrId(MULTI_CHECKOUT_SUMMARY_CMS_PAGE_LABEL)); model.addAttribute(WebConstants.BREADCRUMBS_KEY, getResourceBreadcrumbBuilder().getBreadcrumbs("checkout.multi.summary.breadcrumb")); model.addAttribute("metaRobots", "noindex,nofollow"); setCheckoutStepLinksForModel(model, getCheckoutStep()); return ControllerConstants.Views.Pages.MultiStepCheckout.CheckoutSummaryPage; } @RequestMapping(value = "/placeOrder") @RequireHardLogIn public String placeOrder(@ModelAttribute("placeOrderForm") final PlaceOrderForm placeOrderForm, final Model model, final HttpServletRequest request, final RedirectAttributes redirectModel) throws CMSItemNotFoundException, // NOSONAR InvalidCartException, CommerceCartModificationException { if (validateOrderForm(placeOrderForm, model)) { return enterStep(model, redirectModel); } //Validate the cart if (validateCart(redirectModel)) { // Invalid cart. Bounce back to the cart page. return REDIRECT_PREFIX + "/cart"; } // authorize, if failure occurs don't allow to place the order boolean isPaymentUthorized = false; try { isPaymentUthorized = getCheckoutFacade().authorizePayment(placeOrderForm.getSecurityCode()); } catch (final AdapterException ae) { // handle a case where a wrong paymentProvider configurations on the store see getCommerceCheckoutService().getPaymentProvider() LOGGER.error(ae.getMessage(), ae); } if (!isPaymentUthorized) { GlobalMessages.addErrorMessage(model, "checkout.error.authorization.failed"); return enterStep(model, redirectModel); } final OrderData orderData; try { orderData = getCheckoutFacade().placeOrder(); } catch (final Exception e) { LOGGER.error("Failed to place Order", e); GlobalMessages.addErrorMessage(model, "checkout.placeOrder.failed"); return enterStep(model, redirectModel); } return redirectToOrderConfirmationPage(orderData); } /** * Validates the order form before to filter out invalid order states * * @param placeOrderForm * The spring form of the order being submitted * @param model * A spring Model * @return True if the order form is invalid and false if everything is valid. */ protected boolean validateOrderForm(final PlaceOrderForm placeOrderForm, final Model model) { final String securityCode = placeOrderForm.getSecurityCode(); boolean invalid = false; if (getCheckoutFlowFacade().hasNoDeliveryAddress()) { GlobalMessages.addErrorMessage(model, "checkout.deliveryAddress.notSelected"); invalid = true; } if (getCheckoutFlowFacade().hasNoDeliveryMode()) { GlobalMessages.addErrorMessage(model, "checkout.deliveryMethod.notSelected"); invalid = true; } if (getCheckoutFlowFacade().hasNoPaymentInfo()) { GlobalMessages.addErrorMessage(model, "checkout.paymentMethod.notSelected"); invalid = true; } else { // Only require the Security Code to be entered on the summary page if the SubscriptionPciOption is set to Default. if (CheckoutPciOptionEnum.DEFAULT.equals(getCheckoutFlowFacade().getSubscriptionPciOption()) && StringUtils.isBlank(securityCode)) { GlobalMessages.addErrorMessage(model, "checkout.paymentMethod.noSecurityCode"); invalid = true; } } if (!placeOrderForm.isTermsCheck()) { GlobalMessages.addErrorMessage(model, "checkout.error.terms.not.accepted"); invalid = true; return invalid; } final CartData cartData = getCheckoutFacade().getCheckoutCart(); if (!getCheckoutFacade().containsTaxValues()) { LOGGER.error(String .format( "Cart %s does not have any tax values, which means the tax cacluation was not properly done, placement of order can't continue", cartData.getCode())); GlobalMessages.addErrorMessage(model, "checkout.error.tax.missing"); invalid = true; } if (!cartData.isCalculated()) { LOGGER.error(String.format("Cart %s has a calculated flag of FALSE, placement of order can't continue", cartData.getCode())); GlobalMessages.addErrorMessage(model, "checkout.error.cart.notcalculated"); invalid = true; } return invalid; } @RequestMapping(value = "/back", method = RequestMethod.GET) @RequireHardLogIn @Override public String back(final RedirectAttributes redirectAttributes) { return getCheckoutStep().previousStep(); } @RequestMapping(value = "/next", method = RequestMethod.GET) @RequireHardLogIn @Override public String next(final RedirectAttributes redirectAttributes) { return getCheckoutStep().nextStep(); } protected CheckoutStep getCheckoutStep() { return getCheckoutStep(SUMMARY); } }
[ "varsha.d.saste@accenture.com" ]
varsha.d.saste@accenture.com
87fb07775dc68d75bc094eef5d074e53dde102a2
f12056f89cd34b763a8532a70c9cb8c5be6c25aa
/hw1-wfeely/src/main/java/edu/cmu/cs/wfeely/hw1/BaseAnnotation_Type.java
c07a375690011de1062ef50bc95a5eb5e81d02a8
[]
no_license
wfeely/hw1-wfeely
1d5710599e75353fa96b49559d8f8d1399557be3
5bcd363a1a8aef955e03d11695bbf82c8bd21db4
refs/heads/master
2020-05-02T20:01:42.343463
2013-09-11T23:52:50
2013-09-11T23:52:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,739
java
/* First created by JCasGen Mon Sep 09 20:28:05 EDT 2013 */ package edu.cmu.cs.wfeely.hw1; import org.apache.uima.jcas.JCas; import org.apache.uima.jcas.JCasRegistry; import org.apache.uima.cas.impl.CASImpl; import org.apache.uima.cas.impl.FSGenerator; import org.apache.uima.cas.FeatureStructure; import org.apache.uima.cas.impl.TypeImpl; import org.apache.uima.cas.Type; import org.apache.uima.cas.impl.FeatureImpl; import org.apache.uima.cas.Feature; import org.apache.uima.jcas.tcas.Annotation_Type; /** Base annotation type. * Updated by JCasGen Wed Sep 11 19:14:02 EDT 2013 * @generated */ public class BaseAnnotation_Type extends Annotation_Type { /** @generated */ @Override protected FSGenerator getFSGenerator() {return fsGenerator;} /** @generated */ private final FSGenerator fsGenerator = new FSGenerator() { public FeatureStructure createFS(int addr, CASImpl cas) { if (BaseAnnotation_Type.this.useExistingInstance) { // Return eq fs instance if already created FeatureStructure fs = BaseAnnotation_Type.this.jcas.getJfsFromCaddr(addr); if (null == fs) { fs = new BaseAnnotation(addr, BaseAnnotation_Type.this); BaseAnnotation_Type.this.jcas.putJfsFromCaddr(addr, fs); return fs; } return fs; } else return new BaseAnnotation(addr, BaseAnnotation_Type.this); } }; /** @generated */ @SuppressWarnings ("hiding") public final static int typeIndexID = BaseAnnotation.typeIndexID; /** @generated @modifiable */ @SuppressWarnings ("hiding") public final static boolean featOkTst = JCasRegistry.getFeatOkTst("edu.cmu.cs.wfeely.hw1.BaseAnnotation"); /** @generated */ final Feature casFeat_source; /** @generated */ final int casFeatCode_source; /** @generated */ public String getSource(int addr) { if (featOkTst && casFeat_source == null) jcas.throwFeatMissing("source", "edu.cmu.cs.wfeely.hw1.BaseAnnotation"); return ll_cas.ll_getStringValue(addr, casFeatCode_source); } /** @generated */ public void setSource(int addr, String v) { if (featOkTst && casFeat_source == null) jcas.throwFeatMissing("source", "edu.cmu.cs.wfeely.hw1.BaseAnnotation"); ll_cas.ll_setStringValue(addr, casFeatCode_source, v);} /** @generated */ final Feature casFeat_confidence; /** @generated */ final int casFeatCode_confidence; /** @generated */ public double getConfidence(int addr) { if (featOkTst && casFeat_confidence == null) jcas.throwFeatMissing("confidence", "edu.cmu.cs.wfeely.hw1.BaseAnnotation"); return ll_cas.ll_getDoubleValue(addr, casFeatCode_confidence); } /** @generated */ public void setConfidence(int addr, double v) { if (featOkTst && casFeat_confidence == null) jcas.throwFeatMissing("confidence", "edu.cmu.cs.wfeely.hw1.BaseAnnotation"); ll_cas.ll_setDoubleValue(addr, casFeatCode_confidence, v);} /** initialize variables to correspond with Cas Type and Features * @generated */ public BaseAnnotation_Type(JCas jcas, Type casType) { super(jcas, casType); casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl)this.casType, getFSGenerator()); casFeat_source = jcas.getRequiredFeatureDE(casType, "source", "uima.cas.String", featOkTst); casFeatCode_source = (null == casFeat_source) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_source).getCode(); casFeat_confidence = jcas.getRequiredFeatureDE(casType, "confidence", "uima.cas.Double", featOkTst); casFeatCode_confidence = (null == casFeat_confidence) ? JCas.INVALID_FEATURE_CODE : ((FeatureImpl)casFeat_confidence).getCode(); } }
[ "wfeely@cs.cmu.edu" ]
wfeely@cs.cmu.edu
8a3474dc09888555ed372ca3a7dcbe037e3c3ab5
4cf0768f3f8ae53755c015aa0d468a131a5962f6
/src/test/java/studio/guoliao/DigestTest.java
2d61af4759b958f778defb7525620159bed8d418
[ "MIT", "Apache-2.0" ]
permissive
guoliao502/crypto
de060d7dd7f3db0d2bbd7cc095f78a2a73daed8c
5e551bc10ed02a1feb12bd74e3d1599364ce2261
refs/heads/master
2022-02-02T21:03:43.882476
2020-07-07T02:55:55
2020-07-07T02:55:55
198,992,538
90
9
NOASSERTION
2022-01-04T16:34:53
2019-07-26T09:53:20
Java
UTF-8
Java
false
false
1,767
java
package studio.guoliao; import org.apache.commons.codec.binary.Base64; import org.junit.Assert; import org.junit.Test; import studio.guoliao.crypto.digest.CommonDigest; import studio.guoliao.crypto.digest.HmacDigest; import studio.guoliao.crypto.model.KeyDescription; import studio.guoliao.crypto.util.KeyUtil; import javax.crypto.SecretKey; import java.security.NoSuchAlgorithmException; import java.security.spec.InvalidKeySpecException; /** * User: guoliao * Date: 2019/7/26 * Time: 下午2:46 * Description: */ public class DigestTest { @Test public void digest(){ String data = "helloworld"; byte[] tmp = CommonDigest.MD5_DIGEST.digest(data.getBytes()); System.out.println(Base64.encodeBase64String(tmp)); tmp = CommonDigest.SHA1_DIGEST.digest(data.getBytes()); System.out.println(Base64.encodeBase64String(tmp)); tmp = CommonDigest.SHA224_DIGEST.digest(data.getBytes()); System.out.println(Base64.encodeBase64String(tmp)); tmp = CommonDigest.SHA256_DIGEST.digest(data.getBytes()); System.out.println(Base64.encodeBase64String(tmp)); tmp = CommonDigest.SHA512_DIGEST.digest(data.getBytes()); System.out.println(Base64.encodeBase64String(tmp)); } @Test public void hmacDigest() throws InvalidKeySpecException, NoSuchAlgorithmException { String data = "helloworld"; KeyUtil keyUtil = new KeyUtil(); SecretKey key = keyUtil.generateSameKey(KeyDescription.DES_56, "SHA1PRNG", data.getBytes()); HmacDigest digest = new HmacDigest(HmacDigest.HMAC_MD5, key); byte[] buf = digest.digest(data.getBytes()); System.out.println(Base64.encodeBase64String(buf)); Assert.assertNotNull("", buf); } }
[ "guoliao@kaochong.com" ]
guoliao@kaochong.com
02f4d281cc0cbcaef32230b4eec1356aa6bfadf4
67fbd11d809ad491edafd34b4fffb70483bffc72
/launcher/gen/com/example/launcher/R.java
7c2e39d7fedd374c10a1ca226f5c0b2631362d2c
[]
no_license
ImYeol/launcher_
f9de75d6db5b7b4c374c48821034ccad28295001
6a37ee96aa5bb24966157edc6846e159edb2d046
refs/heads/master
2016-09-01T18:42:38.855349
2015-01-27T06:40:37
2015-01-27T06:40:37
26,010,402
0
0
null
null
null
null
UTF-8
Java
false
false
2,959
java
/* AUTO-GENERATED FILE. DO NOT MODIFY. * * This class was automatically generated by the * aapt tool from the resource data it found. It * should not be modified by hand. */ package com.example.launcher; public final class R { public static final class attr { } public static final class drawable { public static final int aim=0x7f020000; public static final int custom_progressbar=0x7f020001; public static final int ic_camera_50=0x7f020002; public static final int ic_delete_50=0x7f020003; public static final int ic_launcher=0x7f020004; public static final int ic_message_30=0x7f020005; public static final int ic_message_50=0x7f020006; public static final int ic_no_50=0x7f020007; public static final int ic_reply_50=0x7f020008; public static final int ic_request_50=0x7f020009; public static final int ic_search_50=0x7f02000a; public static final int ic_share_50=0x7f02000b; public static final int ic_warning_150=0x7f02000c; public static final int iron_man=0x7f02000d; } public static final class id { public static final int button1=0x7f060000; public static final int camera_catch_label=0x7f060004; public static final int camera_label=0x7f06000b; public static final int camera_overlayview=0x7f060002; public static final int camera_preview=0x7f060001; public static final int command_list_frame=0x7f06000a; public static final int comment_layout=0x7f060005; public static final int comment_text=0x7f060006; public static final int file_transfer_progressbar=0x7f060008; public static final int finish_label=0x7f06000f; public static final int imageView=0x7f060007; public static final int imageView1=0x7f060003; public static final int imageView2=0x7f06000c; public static final int imageView3=0x7f06000e; public static final int recognition_state_progressbar=0x7f060010; public static final int search_label=0x7f06000d; public static final int textView1=0x7f060009; } public static final class layout { public static final int activity_main=0x7f030000; public static final int camera=0x7f030001; public static final int custom_dialog=0x7f030002; public static final int image_viewer=0x7f030003; public static final int transfer_dialog=0x7f030004; public static final int voice_commands_list_layout=0x7f030005; public static final int voice_commands_list_view=0x7f030006; public static final int voice_recognition_state_dialog=0x7f030007; } public static final class raw { public static final int camera_click=0x7f040000; } public static final class string { public static final int app_name=0x7f050000; public static final int hello_world=0x7f050001; } }
[ "gyl115@naver.com" ]
gyl115@naver.com
9afe69208696f245c95683b921ca6c67043e7f31
cb3e78036b285e820049e2f1ac879d14eac6057e
/app/src/main/java/com/example/newsapp/utils/InternetConnection.java
fab8ee717f892dcf882489951b814c2ac5019567
[]
no_license
couragepaul/NewsApp
5ea6071de62bfa5e6f4f339dc8a0c74baf1156be
5b50603ad690ecb51352f43a92de7cb8c6abc530
refs/heads/master
2023-01-28T08:30:46.541812
2020-12-03T16:57:09
2020-12-03T16:57:09
318,248,611
0
0
null
null
null
null
UTF-8
Java
false
false
719
java
package com.example.newsapp.utils; import android.content.Context; import android.net.ConnectivityManager; import android.net.NetworkInfo; public class InternetConnection { /** * check Internet connection available in system */ public static boolean isConnectingToInternet(Context context){ try { ConnectivityManager connectivity = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); if (connectivity != null){ NetworkInfo netInfo = connectivity.getActiveNetworkInfo(); if (netInfo != null && netInfo.isConnectedOrConnecting()) { return true; } } return false; } catch (Exception e) { e.printStackTrace(); return false; } } }
[ "couragepaul@Courages-iMac.local" ]
couragepaul@Courages-iMac.local
f8dfc01a45b2a82f588335f45bbf735ba0a84b67
9af8fe96b774b77617e8f66846474c44f66fcf74
/AndroidUtils/src/main/java/com/nityankhanna/androidutils/DateTimeFormat.java
1b88dd23ca5644e03805bb95ab2b30920ef18dae
[ "MIT" ]
permissive
b3457m0d3/android-utils-1
82868365d070fed6b8fab729075ced0a5c41d33e
b2aecf04e28e5fa794874f391e7d9e16e80cd363
refs/heads/master
2020-12-31T03:16:11.023342
2014-03-09T04:17:55
2014-03-09T04:17:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,044
java
package com.nityankhanna.androidutils; /** * Created by Nityan Khanna on Jan 14 2014. */ public enum DateTimeFormat { DAY_MONTH_YEAR("dd/MM/yyyy"), MONTH_DAY_YEAR("MM/dd/yyyy"), YEAR_MONTH_DAY("yyyy/MM/dd"), HOUR_MINUTE_SECOND_12("hh:mm:ss"), HOUR_MINUTE_SECOND_24("kk:mm:ss"), HOUR_MINUTE_SECOND_AM_PM("hh:mm:ss aa"), DAY_MONTH_YEAR_HOUR_MINUTE_SECOND_12("dd/MM/yyyy hh:mm:ss"), DAY_MONTH_YEAR_HOUR_MINUTE_SECOND_24("dd/MM/yyyy kk:mm:ss"), MONTH_DAY_YEAR_HOUR_MINUTE_SECOND_12("MM/dd/yyyy hh:mm:ss"), MONTH_DAY_YEAR_HOUR_MINUTE_SECOND_24("MM/dd/yyyy kk:mm:ss"), YEAR_MONTH_DAY_HOUR_MINUTE_SECOND_12("yyyy/MM/dd hh:mm:ss"), YEAR_MONTH_DAY_HOUR_MINUTE_SECOND_24("yyyy/MM/dd kk:mm:ss"), DAY_MONTH_YEAR_HOUR_MINUTE_SECOND_AM_PM("dd/MM/yyyy hh:mm:ss aa"), MONTH_DAY_YEAR_HOUR_MINUTE_SECOND_AM_PM("MM/dd/yyyy hh:mm:ss aa"), YEAR_MONTH_DAY_HOUR_MINUTE_SECOND_AM_PM("yyyy/MM/dd hh:mm:ss aa"); private String value; private DateTimeFormat(String value) { this.value = value; } public String getValue() { return value; } }
[ "nityan.khanna@mohawkcollege.ca" ]
nityan.khanna@mohawkcollege.ca
c428ace3a8b17a96ca68bede6b1e4fb5f678fc11
be932cae69ad9e9d28950e1c6540872686cdabf9
/rongke-web/src/main/java/com/rongke/web/lianpay/vo/OrderInfo.java
a1e292a2ed115ab7cbe1237bca8aa2337f166075
[]
no_license
gaolizhan/rongke
a8af53f7810d462c8294c248c89faf8a6ae10daa
684a1aa522f182137b3b23b0ec98e2fbd4eef801
refs/heads/master
2020-04-08T08:18:49.829102
2018-11-25T14:53:35
2018-11-25T14:53:35
159,174,206
0
1
null
null
null
null
UTF-8
Java
false
false
1,488
java
package com.rongke.web.lianpay.vo; import java.io.Serializable; /** * 商户订单信息 * @author guoyx * @date:Jun 24, 2013 3:25:29 PM * @version :1.0 * */ public class OrderInfo implements Serializable{ private static final long serialVersionUID = 1L; private String no_order; // 商户唯一订单号 private String dt_order; // 商户订单时间 private String name_goods; // 商品名称 private String info_order; // 订单描述 private String money_order; // 交易金额 单位为RMB-元 public String getNo_order() { return no_order; } public void setNo_order(String no_order) { this.no_order = no_order; } public String getDt_order() { return dt_order; } public void setDt_order(String dt_order) { this.dt_order = dt_order; } public String getName_goods() { return name_goods; } public void setName_goods(String name_goods) { this.name_goods = name_goods; } public String getInfo_order() { return info_order; } public void setInfo_order(String info_order) { this.info_order = info_order; } public String getMoney_order() { return money_order; } public void setMoney_order(String money_order) { this.money_order = money_order; } }
[ "cmeizu@hotmail.com" ]
cmeizu@hotmail.com
f856ff58408a4d986c2014dd70f391d36abe089f
a026f5df043f1adb4945417d027ef7eab1d2bad8
/Workspace/LetsTagOn/LetsTagOnService/src/main/java/com/letstagon/enums/NotificationTypeEnum.java
b66eeedad1c21190c86d7c873e3f3e081f0c59f2
[]
no_license
Ranjitha1992/LetsTag-On
9a134790d9c325d0c1befba871b1b485dd65d24a
50400e9f2a25e4900bc6abfd34ff289e67b3f329
refs/heads/master
2021-06-22T07:48:01.737246
2017-08-16T07:02:42
2017-08-16T07:02:42
100,458,604
0
0
null
null
null
null
UTF-8
Java
false
false
1,907
java
package com.letstagon.enums; // TODO: Auto-generated Javadoc /** * The Enum NotificationTypeEnum. */ public enum NotificationTypeEnum { /** The connection accept. */ CONNECTION_ACCEPT("ConnectionAcceptEvent", "Your Connection has been accepted"), /** The connection request. */ CONNECTION_REQUEST( "ConnectionRequestEvent", "Connection has been requested"), /** The invite to opportunity. */ INVITE_TO_OPPORTUNITY( "OpportunityInviteEvent", "You have been invited for opportunity"), /** The message priint. */ MESSAGE_PRIINT( "MessagePrintEvent", "Message"), /** The new post on opportunity. */ NEW_POST_ON_OPPORTUNITY( "NewPostOnOppEvent", "New post on"), /** The opportunity application status change. */ OPPORTUNITY_APPLICATION_STATUS_CHANGE( "OppAppStatusChangeEvent", "Your Application status has been updated"), /** The opportunity attendence change. */ OPPORTUNITY_ATTENDENCE_CHANGE( "OppAttChangeEvent", "Attendence Marked"), /** The opportunity feedback change. */ OPPORTUNITY_FEEDBACK_CHANGE( "OppFeedBackEvent", "FeedBack"), /** The opportunity application sent. */ OPPORTUNITY_APPLICATION_SENT( "OppAppSentEvent", "Application Sent"), /** The password reset. */ PASSWORD_RESET( "PasswordResetEvent", "Password has been reset"); /** * Instantiates a new notification type enum. * * @param eventType the event type * @param message the message */ private NotificationTypeEnum(String eventType, String message) { this.eventType = eventType; this.message = message; } /** The event type. */ private final String eventType; /** The message. */ private final String message; /** * Gets the event type. * * @return the event type */ public String getEventType() { return eventType; } /** * Gets the message. * * @return the message */ public String getMessage() { return message; } }
[ "Ranjitha.Ravi@techwave.net" ]
Ranjitha.Ravi@techwave.net
f7fe82b50e470f27c09d547877b27bb83837863c
9bc4e4fd32dda778d61e15fd95609a5fb74faac3
/boot-system/src/main/java/com/boot/system/domain/SysNotice.java
01ce637788ef6ab1fe5a9a79130d82b4b43e4511
[ "MIT" ]
permissive
missaouib/boot
210455e5cf87408b61852f36277e62b69fc4fff0
5340a820326ff06f6bd2a7bb1b905726c61aceb1
refs/heads/master
2023-03-02T23:42:05.000876
2021-01-13T07:03:45
2021-01-13T07:03:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,376
java
package com.boot.system.domain; import javax.validation.constraints.NotBlank; import javax.validation.constraints.Size; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.boot.common.core.domain.BaseEntity; /** * 通知公告表 sys_notice * * @author ruoyi */ public class SysNotice extends BaseEntity { private static final long serialVersionUID = 1L; /** 公告ID */ private Long noticeId; /** 公告标题 */ private String noticeTitle; /** 公告类型(1通知 2公告) */ private String noticeType; /** 公告内容 */ private String noticeContent; /** 公告状态(0正常 1关闭) */ private String status; public Long getNoticeId() { return noticeId; } public void setNoticeId(Long noticeId) { this.noticeId = noticeId; } public void setNoticeTitle(String noticeTitle) { this.noticeTitle = noticeTitle; } @NotBlank(message = "公告标题不能为空") @Size(min = 0, max = 50, message = "公告标题不能超过50个字符") public String getNoticeTitle() { return noticeTitle; } public void setNoticeType(String noticeType) { this.noticeType = noticeType; } public String getNoticeType() { return noticeType; } public void setNoticeContent(String noticeContent) { this.noticeContent = noticeContent; } public String getNoticeContent() { return noticeContent; } public void setStatus(String status) { this.status = status; } public String getStatus() { return status; } @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) .append("noticeId", getNoticeId()) .append("noticeTitle", getNoticeTitle()) .append("noticeType", getNoticeType()) .append("noticeContent", getNoticeContent()) .append("status", getStatus()) .append("createBy", getCreateBy()) .append("createTime", getCreateTime()) .append("updateBy", getUpdateBy()) .append("updateTime", getUpdateTime()) .append("remark", getRemark()) .toString(); } }
[ "gfqjava@163.com" ]
gfqjava@163.com
f4ef8545fc418a0e998bb43741ad2997cbd74096
3ef55e152decb43bdd90e3de821ffea1a2ec8f75
/large/module0254_internal/src/java/module0254_internal/a/Foo3.java
23f34bcff4c77c8bd00b1d2e2df22fc15b813593
[ "BSD-3-Clause" ]
permissive
salesforce/bazel-ls-demo-project
5cc6ef749d65d6626080f3a94239b6a509ef145a
948ed278f87338edd7e40af68b8690ae4f73ebf0
refs/heads/master
2023-06-24T08:06:06.084651
2023-03-14T11:54:29
2023-03-14T11:54:29
241,489,944
0
5
BSD-3-Clause
2023-03-27T11:28:14
2020-02-18T23:30:47
Java
UTF-8
Java
false
false
1,578
java
package module0254_internal.a; import javax.lang.model.*; import javax.management.*; import javax.naming.directory.*; /** * Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut * labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. * Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. * * @see java.nio.file.FileStore * @see java.sql.Array * @see java.util.logging.Filter */ @SuppressWarnings("all") public abstract class Foo3<X> extends module0254_internal.a.Foo2<X> implements module0254_internal.a.IFoo3<X> { java.util.zip.Deflater f0 = null; javax.annotation.processing.Completion f1 = null; javax.lang.model.AnnotatedConstruct f2 = null; public X element; public static Foo3 instance; public static Foo3 getInstance() { return instance; } public static <T> T create(java.util.List<T> input) { return module0254_internal.a.Foo2.create(input); } public String getName() { return module0254_internal.a.Foo2.getInstance().getName(); } public void setName(String string) { module0254_internal.a.Foo2.getInstance().setName(getName()); return; } public X get() { return (X)module0254_internal.a.Foo2.getInstance().get(); } public void set(Object element) { this.element = (X)element; module0254_internal.a.Foo2.getInstance().set(this.element); } public X call() throws Exception { return (X)module0254_internal.a.Foo2.getInstance().call(); } }
[ "gwagenknecht@salesforce.com" ]
gwagenknecht@salesforce.com
6affb508bde243ca071a1812c1cac745966b4e49
17cf1597969504c3878eda785894bba838e2b934
/src/collections/teoria/modelo/ProdutoValorComparator.java
835df4ef84106c643c43538571b7a2f7a4124b06
[]
no_license
Jessica-Garcia/curso-java-13
ad8e92ce6a37310040fc7fc2899a1765d52c7835
5d23825e8fd6ca01b41a7b0d85a115fff1c63d3d
refs/heads/master
2022-11-22T01:22:15.993122
2020-07-29T07:10:21
2020-07-29T07:10:21
280,557,312
0
0
null
null
null
null
UTF-8
Java
false
false
261
java
package collections.teoria.modelo; import java.util.Comparator; public class ProdutoValorComparator implements Comparator<Produto> { @Override public int compare(Produto p1, Produto p2) { return p1.getValor().compareTo(p2.getValor()); } }
[ "jessica.rodriguesgarcia@gmail.com" ]
jessica.rodriguesgarcia@gmail.com
e396a5d72dc19546f9d933b013c5326acdbb1d86
0ed456435ee6385e2f86c407982781e7a21b4c6d
/client/YYQuan/multi-image-selector/src/main/java/me/nereo/multi_image_selector/adapter/ImageGridAdapter.java
2e042f544230a43aa64f92ac96724a01c5f66db0
[ "Apache-2.0" ]
permissive
kkman2008/xmppapp
961e5c97fb1b878f630959685616278f3ad38d06
290fae6a6a65b199275d1a7992967b834bfe2483
refs/heads/master
2020-03-27T09:02:19.228855
2018-10-09T20:59:46
2018-10-09T20:59:46
146,308,835
2
1
null
null
null
null
UTF-8
Java
false
false
6,708
java
package me.nereo.multi_image_selector.adapter; import android.content.Context; import android.text.TextUtils; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; import android.widget.GridView; import android.widget.ImageView; import com.squareup.picasso.Callback; import com.squareup.picasso.Picasso; import java.io.File; import java.util.ArrayList; import java.util.List; import me.nereo.multi_image_selector.R; import me.nereo.multi_image_selector.bean.Image; /** * 图片Adapter * Created by Nereo on 2015/4/7. */ public class ImageGridAdapter extends BaseAdapter { private static final int TYPE_CAMERA = 0; private static final int TYPE_NORMAL = 1; private Context mContext; private LayoutInflater mInflater; private boolean showCamera = true; private boolean showSelectIndicator = true; private List<Image> mImages = new ArrayList<>(); private List<Image> mSelectedImages = new ArrayList<>(); private int mItemSize; private GridView.LayoutParams mItemLayoutParams; public ImageGridAdapter(Context context, boolean showCamera){ mContext = context; mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE); this.showCamera = showCamera; mItemLayoutParams = new GridView.LayoutParams(GridView.LayoutParams.MATCH_PARENT, GridView.LayoutParams.MATCH_PARENT); } /** * 显示选择指示器 * @param b */ public void showSelectIndicator(boolean b) { showSelectIndicator = b; } public void setShowCamera(boolean b){ if(showCamera == b) return; showCamera = b; notifyDataSetChanged(); } public boolean isShowCamera(){ return showCamera; } /** * 选择某个图片,改变选择状态 * @param image */ public void select(Image image) { if(mSelectedImages.contains(image)){ mSelectedImages.remove(image); }else{ mSelectedImages.add(image); } notifyDataSetChanged(); } /** * 通过图片路径设置默认选择 * @param resultList */ public void setDefaultSelected(ArrayList<String> resultList) { for(String path : resultList){ Image image = getImageByPath(path); if(image != null){ mSelectedImages.add(image); } } if(mSelectedImages.size() > 0){ notifyDataSetChanged(); } } private Image getImageByPath(String path){ if(mImages != null && mImages.size()>0){ for(Image image : mImages){ if(image.path.equalsIgnoreCase(path)){ return image; } } } return null; } /** * 设置数据集 * @param images */ public void setData(List<Image> images) { mSelectedImages.clear(); if(images != null && images.size()>0){ mImages = images; }else{ mImages.clear(); } notifyDataSetChanged(); } /** * 重置每个Column的Size * @param columnWidth */ public void setItemSize(int columnWidth) { if(mItemSize == columnWidth){ return; } mItemSize = columnWidth; mItemLayoutParams = new GridView.LayoutParams(mItemSize, mItemSize); notifyDataSetChanged(); } @Override public int getViewTypeCount() { return 2; } @Override public int getItemViewType(int position) { if(showCamera){ return position==0 ? TYPE_CAMERA : TYPE_NORMAL; } return TYPE_NORMAL; } @Override public int getCount() { return showCamera ? mImages.size()+1 : mImages.size(); } @Override public Image getItem(int i) { if(showCamera){ if(i == 0){ return null; } return mImages.get(i-1); }else{ return mImages.get(i); } } @Override public long getItemId(int i) { return i; } @Override public View getView(int i, View view, ViewGroup viewGroup) { int type = getItemViewType(i); if(type == TYPE_CAMERA){ view = mInflater.inflate(R.layout.list_item_camera, viewGroup, false); view.setTag(null); }else if(type == TYPE_NORMAL){ ViewHolde holde; if(view == null){ view = mInflater.inflate(R.layout.list_item_image, viewGroup, false); holde = new ViewHolde(view); }else{ holde = (ViewHolde) view.getTag(); if(holde == null){ view = mInflater.inflate(R.layout.list_item_image, viewGroup, false); holde = new ViewHolde(view); } } if(holde != null) { holde.bindData(getItem(i)); } } /** Fixed View Size */ GridView.LayoutParams lp = (GridView.LayoutParams) view.getLayoutParams(); if(lp.height != mItemSize){ view.setLayoutParams(mItemLayoutParams); } return view; } class ViewHolde { ImageView image; ImageView indicator; ViewHolde(View view){ image = (ImageView) view.findViewById(R.id.image); indicator = (ImageView) view.findViewById(R.id.checkmark); view.setTag(this); } void bindData(final Image data){ if(data == null) return; // 处理单选和多选状态 if(showSelectIndicator){ indicator.setVisibility(View.VISIBLE); if(mSelectedImages.contains(data)){ // 设置选中状态 indicator.setImageResource(R.drawable.btn_selected); }else{ // 未选择 indicator.setImageResource(R.drawable.btn_unselected); } }else{ indicator.setVisibility(View.GONE); } File imageFile = new File(data.path); if(mItemSize > 0) { // 显示图片 Picasso.with(mContext) .load(imageFile) .placeholder(R.drawable.default_error) //.error(R.drawable.default_error) .resize(mItemSize, mItemSize) .centerCrop() .into(image); } } } }
[ "113531420@qq.com" ]
113531420@qq.com
12166a404fdddd147a3abfeb06b0346d5479773c
701ed7de0862037fd09372e2365f608964889d3d
/src/empresa/EmpleadoTest.java
2f3d3def9feb287a7e40d90edbe3831bf74050b7
[]
no_license
Cristian2301/Objetos2Empresa
ef3e84d21071697a2fc4b2421871b611ca4a1000
9f9d073a1430c5179a151fcd4c99a96ee130e130
refs/heads/master
2020-05-05T05:00:03.408881
2019-04-08T20:04:58
2019-04-08T20:04:58
179,734,034
0
0
null
null
null
null
UTF-8
Java
false
false
1,175
java
package empresa; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.Test; class EmpleadoTest { Empleado empleado; @BeforeEach void setUp() throws Exception{ empleado = new Empleado("Jose", 212, true, 99, 12000); } @Test void testGetNombre() { assertTrue(empleado.getNombre() == "Jose"); } @Test void testSetNombre() { fail("Not yet implemented"); } @Test void testGetDireccion() { fail("Not yet implemented"); } @Test void testSetDireccion() { fail("Not yet implemented"); } @Test void testGetCasado() { fail("Not yet implemented"); } @Test void testSetCasado() { fail("Not yet implemented"); } @Test void testGetFechaNacimiento() { fail("Not yet implemented"); } @Test void testSetFechaNacimiento() { fail("Not yet implemented"); } @Test void testGetSueldoBasico() { fail("Not yet implemented"); } @Test void testSetSueldoBasico() { fail("Not yet implemented"); } @Test void testGetEdad() { fail("Not yet implemented"); } @Test void testEmpleado() { fail("Not yet implemented"); } }
[ "cris.eze.99@gmail.com" ]
cris.eze.99@gmail.com
1614b245f49b9f9836dd728aee20394ff76fe855
a953ece8ff4a36e367d26d046d2ab056f2ccda4d
/2020/GTBIT/LevelUp/l001_Recursion/l002RecursionTrees.java
bb64bee4670602eb9d1412ab2630c2b728c51ae7
[]
no_license
SiyaKumari/pepcoding-Batches
2ae669bdae342159c408ca636a4ff9bfddad0e1d
59195aa355f704c0091b2f85bed200fb34c2448b
refs/heads/master
2023-05-06T08:58:37.784862
2021-05-22T07:58:47
2021-05-22T07:58:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
13,126
java
public class l002RecursionTrees { public static int permutationWithInfi(int[] arr, int tar, String ans) { if (tar == 0) { System.out.println(ans); return 1; } int count = 0; for (int ele : arr) { if (tar - ele >= 0) { count += permutationWithInfi(arr, tar - ele, ans + ele); } } return count; } public static int combinationWithInfi(int[] arr, int tar, int idx, String ans) { if (tar == 0) { System.out.println(ans); return 1; } int count = 0; for (int i = idx; i < arr.length; i++) { if (tar - arr[i] >= 0) count += combinationWithInfi(arr, tar - arr[i], i, ans + arr[i]); } return count; } public static int combinationWithSingle(int[] arr, int tar, int idx, String ans) { if (tar == 0) { System.out.println(ans); return 1; } int count = 0; for (int i = idx; i < arr.length; i++) { if (tar - arr[i] >= 0) count += combinationWithSingle(arr, tar - arr[i], i + 1, ans + arr[i]); } return count; } public static int permutationWithSingleCoin(int[] arr, int tar, String ans) { if (tar == 0) { System.out.println(ans); return 1; } int count = 0; for (int i = 0; i < arr.length; i++) { if (arr[i] > 0 && tar - arr[i] >= 0) { int val = arr[i]; arr[i] = -arr[i]; count += permutationWithSingleCoin(arr, tar - val, ans + val); arr[i] = -arr[i]; } } return count; } public static int permutationWithSingleCoin(int[] arr, boolean[] vis, int tar, String ans) { if (tar == 0) { System.out.println(ans); return 1; } int count = 0; for (int i = 0; i < arr.length; i++) { if (!vis[i] && tar - arr[i] >= 0) { vis[i] = true; count += permutationWithSingleCoin(arr, vis, tar - arr[i], ans + arr[i]); vis[i] = false; } } return count; } // ==================================================================================================== public static int permutationWithInfi_subSeq(int[] arr, int tar, int idx, String ans) { if (tar == 0 || idx == arr.length) { if (tar == 0) { System.out.println(ans); return 1; } return 0; } int count = 0; if (tar - arr[idx] >= 0) count += permutationWithInfi_subSeq(arr, tar - arr[idx], 0, ans + arr[idx]); count += permutationWithInfi_subSeq(arr, tar, idx + 1, ans); return count; } public static int combinationWithInfi_subSeq(int[] arr, int tar, int idx, String ans) { if (tar == 0 || idx == arr.length) { if (tar == 0) { System.out.println(ans); return 1; } return 0; } int count = 0; if (tar - arr[idx] >= 0) count += combinationWithInfi_subSeq(arr, tar - arr[idx], idx, ans + arr[idx]); count += combinationWithInfi_subSeq(arr, tar, idx + 1, ans); return count; } public static int combinationWithSingle_subSeq(int[] arr, int tar, int idx, String ans) { if (tar == 0 || idx == arr.length) { if (tar == 0) { System.out.println(ans); return 1; } return 0; } int count = 0; if (tar - arr[idx] >= 0) count += combinationWithSingle_subSeq(arr, tar - arr[idx], idx + 1, ans + arr[idx]); count += combinationWithSingle_subSeq(arr, tar, idx + 1, ans); return count; } public static int permutationWithSingleCoin_subSeq(int[] arr, int tar, int idx, String ans) { if (tar == 0 || idx == arr.length) { if (tar == 0) { System.out.println(ans); return 1; } return 0; } int count = 0; if (arr[idx] > 0 && tar - arr[idx] >= 0) { int val = arr[idx]; arr[idx] = -arr[idx]; count += permutationWithSingleCoin_subSeq(arr, tar - val, 0, ans + val); arr[idx] = -arr[idx]; } count += permutationWithSingleCoin_subSeq(arr, tar, idx + 1, ans); return count; } // 1D_Queen_Set================================================================================= // tboxes = total Bpxes, tqn = total queen, qpsf = queen placed so far, bn = // box_no, public static int queenCombination(int tboxe, int tqn, int qpsf, int bn, String ans) { if (qpsf == tqn) { System.out.println(ans); return 1; } int count = 0; for (int i = bn; i < tboxe; i++) { count += queenCombination(tboxe, tqn, qpsf + 1, i + 1, ans + "b" + i + "q" + qpsf + " "); } return count; } public static int queenPermutation(boolean[] tboxe, int tqn, int qpsf, int bn, String ans) { if (qpsf == tqn) { System.out.println(ans); return 1; } int count = 0; for (int i = bn; i < tboxe.length; i++) { if (!tboxe[i]) { tboxe[i] = true; count += queenPermutation(tboxe, tqn, qpsf + 1, 0, ans + "b" + i + "q" + qpsf + " "); tboxe[i] = false; } } return count; } // 2D_Queen_Set================================================================================= // tboxes = total Bpxes, tqn = total queen, qpsf = queen placed so far, bn = // box_no, public static int queenCombination2D(boolean[][] boxes, int tqn, int bn, String ans) { if (tqn == 0) { System.out.println(ans); return 1; } int n = boxes.length, m = boxes[0].length, count = 0; for (int i = bn; i < n * m; i++) { int r = i / m; int c = i % m; boxes[r][c] = true; count += queenCombination2D(boxes, tqn - 1, i + 1, ans + "(" + r + ", " + c + ") "); boxes[r][c] = false; } return count; } public static int queenPermutation2D(boolean[][] boxes, int tqn, int bn, String ans) { if (tqn == 0) { System.out.println(ans); return 1; } int n = boxes.length, m = boxes[0].length, count = 0; for (int i = bn; i < n * m; i++) { int r = i / m; int c = i % m; if (!boxes[r][c]) { boxes[r][c] = true; count += queenPermutation2D(boxes, tqn - 1, 0, ans + "(" + r + ", " + c + ") "); boxes[r][c] = false; } } return count; } // Nqueen Series.=================================================== public static boolean isSafeToPlaceQueen(boolean[][] boxes, int r, int c) { // int[][] dir = { { 0, -1 }, { -1, -1 }, { -1, 0 }, { -1, 1 } }; int[][] dir = { { 0, -1 }, { -1, -1 }, { -1, 0 }, { -1, 1 }, { 0, 1 }, { 1, 1 }, { 1, 0 }, { 1, -1 } }; int n = boxes.length, m = boxes[0].length; for (int d = 0; d < dir.length; d++) { for (int rad = 1; rad < n; rad++) { int x = r + rad * dir[d][0]; int y = c + rad * dir[d][1]; if (x >= 0 && y >= 0 && x < n && y < m) { if (boxes[x][y]) return false; } else break; } } return true; } public static int nqueen_Combination01(boolean[][] boxes, int tnq, int idx, String ans) { if (tnq == 0) { System.out.println(ans); return 1; } int n = boxes.length, m = boxes[0].length, count = 0; for (int i = idx; i < n * m; i++) { int r = i / m; int c = i % m; if (isSafeToPlaceQueen(boxes, r, c)) { boxes[r][c] = true; count += nqueen_Combination01(boxes, tnq - 1, i + 1, ans + "(" + r + ", " + c + ") "); boxes[r][c] = false; } } return count; } public static int nqueen_Permutation01(boolean[][] boxes, int tnq, int idx, String ans) { if (tnq == 0) { System.out.println(ans); return 1; } int n = boxes.length, m = boxes[0].length, count = 0; for (int i = idx; i < n * m; i++) { int r = i / m; int c = i % m; if (!boxes[r][c] && isSafeToPlaceQueen(boxes, r, c)) { boxes[r][c] = true; count += nqueen_Permutation01(boxes, tnq - 1, 0, ans + "(" + r + ", " + c + ") "); boxes[r][c] = false; } } return count; } public static int nqueen_Combination02(boolean[][] boxes, int tnq, int idx, String ans) { int n = boxes.length, m = boxes[0].length, count = 0; if (tnq == 0 || idx >= n * m) { if (tnq == 0) { System.out.println(ans); return 1; } return 0; } int r = idx / m; int c = idx % m; if (isSafeToPlaceQueen(boxes, r, c)) { boxes[r][c] = true; count += nqueen_Combination02(boxes, tnq - 1, idx + 1, ans + "(" + r + ", " + c + ") "); boxes[r][c] = false; } count += nqueen_Combination02(boxes, tnq, idx + 1, ans); return count; } static boolean[] rows; static boolean[] cols; static boolean[] diag; static boolean[] adiag; public static int nqueen_Combination03(int n, int m, int tnq, int idx, String ans) { if (tnq == 0) { System.out.println(ans); return 1; } int count = 0; for (int i = idx; i < n * m; i++) { int r = i / m; int c = i % m; if (!rows[r] && !cols[c] && !diag[r + c] && !adiag[r - c + m - 1]) { rows[r] = cols[c] = diag[r + c] = adiag[r - c + m - 1] = true; count += nqueen_Combination03(n, m, tnq - 1, i + 1, ans + "(" + r + ", " + c + ") "); rows[r] = cols[c] = diag[r + c] = adiag[r - c + m - 1] = false; } } return count; } public static int nqueen_Permutation03(int n, int m, int tnq, int idx, String ans) { if (tnq == 0) { System.out.println(ans); return 1; } int count = 0; for (int i = idx; i < n * m; i++) { int r = i / m; int c = i % m; if (!rows[r] && !cols[c] && !diag[r + c] && !adiag[r - c + m - 1]) { rows[r] = cols[c] = diag[r + c] = adiag[r - c + m - 1] = true; count += nqueen_Permutation03(n, m, tnq - 1, 0, ans + "(" + r + ", " + c + ") "); rows[r] = cols[c] = diag[r + c] = adiag[r - c + m - 1] = false; } } return count; } public static void Nqueen() { int n = 4, m = 4, q = 4; boolean[][] boxes = new boolean[n][m]; // System.out.println(nqueen_Combination01(boxes, q, 0, "")); // System.out.println(nqueen_Permutation01(boxes, q, 0, "")); // System.out.println(nqueen_Combination02(boxes, q, 0, "")); rows = new boolean[n]; cols = new boolean[m]; diag = new boolean[n + m - 1]; adiag = new boolean[n + m - 1]; System.out.println(nqueen_Combination03(n, m, q, 0, "")); } public static void coinChange() { int[] arr = { 2, 3, 5, 7 }; int tar = 10; // System.out.println(permutationWithInfi(arr, tar, "")); // System.out.println(coFmbinationWithInfi(arr, tar,0, "")); // System.out.println(combinationWithSingle(arr, tar, 0, "")); // System.out.println(permutationWithSingleCoin(arr, tar, "")); // System.out.println(permutationWithInfi_subSeq(arr, tar, 0, "")); // System.out.println(combinationWithInfi_subSeq(arr, tar, 0, "")); // System.out.println(combinationWithSingle_subSeq(arr, tar, 0, "")); // System.out.println(permutationWithSingleCoin_subSeq(arr, tar, 0, "")); } public static void queenSet() { // boolean[] boxes = new boolean[6]; // System.out.println(queenCombination(16, 4, 0, 0, "")); // System.out.println(queenPermutation(boxes, 4, 0, 0, "")); boolean[][] boxes = new boolean[4][4]; // System.out.println(queenCombination2D(boxes, 4, 0, "")); System.out.println(queenPermutation2D(boxes, 4, 0, "")); } public static void main(String[] args) { // queenSet(); Nqueen(); } }
[ "rajneeshkumar@gmail.com" ]
rajneeshkumar@gmail.com
9abd812ad0e2e3b7e916e83be939c2964c7ad80e
dc4b0c1cd5e45c779061ad477c6ff681206a7470
/app/src/main/java/com/example/ycx36/recruitment/view/activity/AddAttentionActivity.java
fe77c0e84f14b4844ac65662b741686fc22edd1c
[]
no_license
yangchengxue/Recruitmentxx
aa7def3275f1c3592e11d7ddbb5b58d211d35fe9
91bc0af49fb422b3afbc909fc3d463352f0e52aa
refs/heads/master
2020-05-09T14:04:47.284338
2019-05-17T14:33:30
2019-05-17T14:33:30
181,180,239
0
0
null
null
null
null
UTF-8
Java
false
false
5,262
java
package com.example.ycx36.recruitment.view.activity; import android.content.Context; import android.content.Intent; import android.net.Uri; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.inputmethod.InputMethodManager; import android.widget.RelativeLayout; import android.widget.TextView; import android.widget.Toast; import com.avos.avoscloud.AVException; import com.avos.avoscloud.AVObject; import com.avos.avoscloud.AVQuery; import com.avos.avoscloud.AVUser; import com.avos.avoscloud.FindCallback; import com.avos.avoscloud.FollowCallback; import com.avos.avoscloud.GetCallback; import com.example.ycx36.recruitment.R; import com.example.ycx36.recruitment.util.LearnCloudSubclass_User; import com.example.ycx36.recruitment.util.learnCloudtest; import com.facebook.drawee.backends.pipeline.Fresco; import com.facebook.drawee.interfaces.DraweeController; import com.facebook.drawee.view.SimpleDraweeView; import com.facebook.imagepipeline.request.ImageRequest; import com.facebook.imagepipeline.request.ImageRequestBuilder; import java.util.List; import butterknife.BindView; import butterknife.ButterKnife; import scut.carson_ho.searchview.ICallBack; import scut.carson_ho.searchview.SearchView; import scut.carson_ho.searchview.bCallBack; public class AddAttentionActivity extends AppCompatActivity { @BindView(R.id.search_view) SearchView searchView; @BindView(R.id.userDraw) SimpleDraweeView userDraw; @BindView(R.id.tv_name) TextView tv_name; @BindView(R.id.tv_userNull) TextView tv_userNull; @BindView(R.id.userRelativeLayout) RelativeLayout userRelativeLayout; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_add_attention); ButterKnife.bind(this); searchView.setOnClickSearch(new ICallBack() { @Override public void SearchAciton(String string) { AVQuery<LearnCloudSubclass_User> query = AVObject.getQuery(LearnCloudSubclass_User.class); query.whereEqualTo("username",string); query.findInBackground(new FindCallback<LearnCloudSubclass_User>() { @Override public void done(List<LearnCloudSubclass_User> results, AVException e) { if (results.size() != 0) { for (final LearnCloudSubclass_User a : results) { final String userName = a.getUsername(); tv_name.setText(userName); tv_userNull.setVisibility(View.GONE); userRelativeLayout.setVisibility(View.VISIBLE); userDraw.setVisibility(View.VISIBLE); if (a.getuserPhotoUri() != null) { showUserPhoto(a.getuserPhotoUri(), userDraw); } userRelativeLayout.setOnClickListener(new View.OnClickListener(){ public void onClick(View view){ // FocusPerson(a.getObjectId()); //点击关注 Intent intent = new Intent(AddAttentionActivity.this,UserDetailInfoActivity.class); Bundle bundle = new Bundle(); bundle.putString("userObjectId",a.getObjectId()); bundle.putString("userName",userName); intent.putExtras(bundle); startActivity(intent); } }); } } else { tv_userNull.setVisibility(View.VISIBLE); userDraw.setVisibility(View.INVISIBLE); userRelativeLayout.setVisibility(View.INVISIBLE); } } }); InputMethodManager m=(InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); m.toggleSoftInput(0, InputMethodManager.HIDE_NOT_ALWAYS); } }); // 5. 设置点击返回按键后的操作(通过回调接口) searchView.setOnClickBack(new bCallBack() { @Override public void BackAciton() { finish(); } }); } public void showUserPhoto(String path, SimpleDraweeView Dview) { Uri uri = Uri.parse(path); ImageRequest request = ImageRequestBuilder.newBuilderWithSource(uri) .setLocalThumbnailPreviewsEnabled(true) .build(); DraweeController controller = Fresco.newDraweeControllerBuilder() .setImageRequest(request) .build(); Dview.setController(controller); } }
[ "553566463@qq.com" ]
553566463@qq.com
4bfb960462b3caa83553fa077c7ecc66bece401f
d040376ea3601d41f151a8972148d2f3c00e07f1
/src/com/srutkowski/facade/example1/MailContentGenerator.java
5fd33a827f435938feb66929e5581bbe41052f55
[]
no_license
sakovski/Design-Patterns
9454eabaa006c7595c1ea9e40328e34cae0fdc08
cb560e456df639c0e656ad0fcfa698ec6984acdf
refs/heads/master
2020-04-17T15:26:15.922203
2019-02-10T15:37:50
2019-02-10T15:37:50
166,698,576
0
0
null
null
null
null
UTF-8
Java
false
false
425
java
package com.srutkowski.facade.example1; public class MailContentGenerator { public String getWelcomeContent(String receiver, String template) { return String.format("%s HELLO %s! Long time no see :)", template, receiver); } public String getBusinessOfferContent(String receiver, String template) { return String.format("%s Hello %s! We have a nice offer for you!", template, receiver); } }
[ "sakasew@gmail.com" ]
sakasew@gmail.com
3271c8179e3c0c79da99c5140f27eae30a594dbc
2b97ebc4a4a5b96291ca994ef6f11f045c9fce68
/pet-clinic-data/src/main/java/jagrat/springframework/petclinic/model/Pet.java
4993e47cd1f715368cf681be9e93c0fc56c5ff8b
[]
no_license
foducoder/pet-clinic
350dbdcd908ab5638e699b7b214453fc4cec4449
fed51037c4ae51c4a26e1a176adc8a900d2b1a69
refs/heads/master
2022-12-02T09:59:18.072953
2020-08-11T11:24:00
2020-08-11T11:24:00
284,430,585
0
0
null
null
null
null
UTF-8
Java
false
false
809
java
package jagrat.springframework.petclinic.model; import java.time.LocalDate; public class Pet extends BaseEntity{ private String name; private PetType petType; private Owner owner; private LocalDate birthDate; public String getName() { return name; } public void setName(String name) { this.name = name; } public PetType getPetType() { return petType; } public void setPetType(PetType petType) { this.petType = petType; } public Owner getOwner() { return owner; } public void setOwner(Owner owner) { this.owner = owner; } public LocalDate getBirthDate() { return birthDate; } public void setBirthDate(LocalDate birthDate) { this.birthDate = birthDate; } }
[ "lolwa@gmail.com" ]
lolwa@gmail.com
33f489d90fecf8ab1e446075f875113e650a3203
05a5bb2f14da29e67a086d0a0beb0863978663e9
/src/main/java/net/imglib2/blocks/TempArrayImpl.java
e3db8c4a9dc94fffe28e6a0a47e4f1f974eec9bc
[ "BSD-2-Clause" ]
permissive
imglib/imglib2
8239153419a862149cc8317ca27a185dbe07aeec
0f83262f6a1db0b131341fe28ec1d4f495c65a7a
refs/heads/master
2023-08-18T10:50:51.702443
2023-02-06T17:59:32
2023-07-14T12:01:47
2,996,011
260
79
NOASSERTION
2023-09-12T12:26:59
2011-12-16T16:36:19
Java
UTF-8
Java
false
false
2,532
java
/*- * #%L * ImgLib2: a general-purpose, multidimensional image processing library. * %% * Copyright (C) 2009 - 2023 Tobias Pietzsch, Stephan Preibisch, Stephan Saalfeld, * John Bogovic, Albert Cardona, Barry DeZonia, Christian Dietz, Jan Funke, * Aivar Grislis, Jonathan Hale, Grant Harris, Stefan Helfrich, Mark Hiner, * Martin Horn, Steffen Jaensch, Lee Kamentsky, Larry Lindsey, Melissa Linkert, * Mark Longair, Brian Northan, Nick Perry, Curtis Rueden, Johannes Schindelin, * Jean-Yves Tinevez and Michael Zinsmaier. * %% * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * #L% */ package net.imglib2.blocks; import java.lang.ref.WeakReference; class TempArrayImpl< T > implements TempArray< T > { private final PrimitiveTypeProperties< T, ? > props; private WeakReference< T > arrayRef; TempArrayImpl( PrimitiveTypeProperties< T, ? > props ) { arrayRef = new WeakReference<>( null ); this.props = props; } @Override public T get( final int minSize ) { T array = arrayRef.get(); if ( array == null || props.length( array ) < minSize ) { array = props.allocate( minSize ); arrayRef = new WeakReference<>( array ); } return array; } @Override public TempArray< T > newInstance() { return new TempArrayImpl<>( props ); } }
[ "tobias.pietzsch@gmail.com" ]
tobias.pietzsch@gmail.com
069c85840c1be4c01ed5af33b60ef51ac652cd6a
b4ae50a27df77dece540ed79bbc0f3cfd3602680
/src/tests/Ex2Test.java
f7f5dc3d415cf9ea5cd5f2e572ecb3fb18dd7e4e
[]
no_license
NetanelAlbert/OopEx2-Maze-of-Waze
c181a2e66a2257c1d1f55639ac3bf0bfc99c94e0
2d2392157e145913c69b0552f042a3370c584450
refs/heads/master
2020-11-25T02:32:57.394021
2020-01-05T21:48:30
2020-01-05T21:48:30
228,454,835
0
0
null
null
null
null
UTF-8
Java
false
false
1,509
java
package tests; import static org.junit.jupiter.api.Assertions.*; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import algorithms.*; import dataStructure.*; import utils.*; import gui.*; /** * EX2 Structure test: * 1. make sure your code compile with this dummy test (DO NOT Change a thing in this test). * 2. the only change require is to run your GUI window (see line 64). * 3. EX2 auto-test will be based on such file structure. * 4. Do include this test-case in you submitted repository, in folder Tests (under src). * 5. Do note that all the required packages are imported - do NOT use other * * @author boaz.benmoshe * */ class Ex2Test { private static graph _graph; private static graph_algorithms _alg; public static final double EPS = 0.001; private static Point3D min = new Point3D(0,0,0); private static Point3D max = new Point3D(100,100,0); @BeforeAll static void setUpBeforeClass() throws Exception { _graph = tinyGraph(); } @BeforeEach void setUp() throws Exception { } @Test void testConnectivity() { _alg = new Graph_Algo(_graph); boolean con = _alg.isConnected(); if(!con) { fail("shoulbe be connected"); } } @Test void testgraph() { boolean ans = drawGraph(_graph); assertTrue(ans); } private static graph tinyGraph() { graph ans = new DGraph(); return ans; } boolean drawGraph(graph g) { // YOUR GUI graph draw new GraphGui(g); return true; } }
[ "NetanelAlbert@gmail.com" ]
NetanelAlbert@gmail.com
355e512f68e8424eddf19ba183bd42315a734285
85a912b7e7f46f0a8b828463075cba1c5a338065
/hello-eureka-client-service-consumer-feign/src/main/java/com/lee/springcloud/simple/ConsumerController.java
f19914c12ca15b188fd7ff1f114d9d138959583e
[]
no_license
BlueLeer/lee-springcloud-learn
0c6a810b24f94a584b0cca6bb095c95174ef9ccf
3cac1541bd4408a771bad2ac4a5457076cc8c4ec
refs/heads/master
2020-06-21T21:17:41.257789
2020-04-17T16:59:41
2020-04-17T16:59:41
197,554,499
1
0
null
null
null
null
UTF-8
Java
false
false
621
java
package com.lee.springcloud.simple; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** * Feign继承的特性 * * @author lee * @date 2020/4/16 16:27 */ @RestController public class ConsumerController { @Autowired private ConsumerService consumerService; @RequestMapping("/simple") public String simple() { String hi = consumerService.hi(); String name = consumerService.hiFeign("wangle"); return hi + "##########" + name; } }
[ "251668577@qq.com" ]
251668577@qq.com
16fd9c0aa39dd60d6eeaa1b693dd6709d7bd0ed2
5111cd4d27e846053fc844335ab96b42f60e3b16
/zy-gis-service/src/main/java/com/zy/dzzw/gis/service/LayerInfoService.java
555a2e9c3f15ae48efde7dc65ce3d056ac6cf807
[]
no_license
wellsmitch/officeMap
d259b7cdd8cc2c22e1688b1c8b56f834c680ce78
9777a5066f5b9eb061a64efee7f263b831cbaa9e
refs/heads/master
2023-04-15T07:39:09.090910
2021-04-23T02:22:23
2021-04-23T02:22:23
360,738,366
0
0
null
null
null
null
UTF-8
Java
false
false
5,703
java
package com.zy.dzzw.gis.service; import com.zy.common.sys.entity.SysRole; import com.zy.common.sys.entity.SysUser; import com.zy.common.sys.service.CommonService; import com.zy.core.exception.ServiceRuntimeException; import com.zy.dzzw.gis.entity.BaseObject; import com.zy.dzzw.gis.entity.LayerInfo; import com.zy.dzzw.gis.entity.LayerRole; import com.zy.dzzw.gis.entity.TreeObject; import com.zy.dzzw.gis.listener.LayerInfoListener; import com.zy.dzzw.gis.repository.LayerInfoRepository; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.cache.annotation.Cacheable; import org.springframework.data.domain.Sort; import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.Comparator; import java.util.List; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; import java.util.function.Function; import java.util.function.Predicate; import java.util.stream.Collectors; /** * 图层服务 * * @Author wangxiaofeng * @Date 2020/3/28 9:42 */ @Service public class LayerInfoService { @Autowired(required = false) private List<LayerInfoListener> layerInfoListenerList; @Autowired LayerInfoRepository layerInfoRepository; @Autowired LayerRoleService layerRoleService; @Autowired(required = false) CommonService commonService; @Value("${sysId}") String sysId; // @Cacheable(value = "gis:layer", key = "'gis:layer:list'") public List<LayerInfo> find() { return layerInfoRepository.find(Sort.by(Sort.Order.asc("lft"))); } public LayerInfo findById(Long id) { return layerInfoRepository.findById(id); } public LayerInfo condition(LayerInfo layerInfo){ if (StringUtils.isNotBlank(layerInfo.getLayer())) { LayerInfo layerInfo1 = layerInfoRepository.findByLayer(layerInfo.getLayer()); if (layerInfo1 != null && !layerInfo1.getId().equals(layerInfo.getId())) { throw new ServiceRuntimeException("图层服务已存在"); } } String fullPathName; if (layerInfo.getId() == null && layerInfo.getPid() != null) { fullPathName = this.findParent(layerInfo.getPid()).stream().map(LayerInfo::getName).collect(Collectors.joining("/")); } else { fullPathName = this.findParent(layerInfo).stream().map(LayerInfo::getName).collect(Collectors.joining("/")); } if (StringUtils.isNotBlank(fullPathName) && !fullPathName.endsWith("/")) { fullPathName += "/"; } fullPathName += layerInfo.getName(); layerInfo.setFullPathName(fullPathName); return layerInfo; } public LayerInfo insert(LayerInfo layerInfo) { this.condition(layerInfo); layerInfoRepository.insert(layerInfo); return layerInfo; } public LayerInfo findByLayer(String layer) { return layerInfoRepository.findByLayer(layer); } public LayerInfo save(LayerInfo layerInfo) { this.condition(layerInfo); layerInfoRepository.save(layerInfo); return layerInfo; } public void remove(Long id) { layerInfoListenerList.forEach(layerInfoListener -> layerInfoListener.remove(findById(id))); layerInfoRepository.remove(id); } public void move(Long sourceId, Long targetId, String type) { LayerInfo ro = layerInfoRepository.findById(targetId); if ("inner".equals(type) && ro.getType() == 0) { throw new ServiceRuntimeException("目标节点不是分类"); } layerInfoRepository.move(sourceId, targetId, type); LayerInfo layerInfo = this.findById(sourceId); this.save(layerInfo); // 更新fullPathName List<LayerInfo> childrenList = this.findChildren(sourceId); childrenList.forEach(child -> { this.save(child); }); } public List<LayerInfo> findParent(Long id) { return layerInfoRepository.findParent(id); } public List<LayerInfo> findParent(LayerInfo layerInfo) { return layerInfoRepository.findParent(layerInfo); } public List<LayerInfo> findChildren(Long id) { return layerInfoRepository.findChildren(id); } public List<LayerInfo> findChildren(LayerInfo layerInfo) { return layerInfoRepository.findChildren(layerInfo); } public List<LayerInfo> find(SysUser sysUser) { List<LayerInfo> resultList = new ArrayList<>(256); List<SysRole> roleList = commonService.getUserRoleInfo(sysId, sysUser.getUserId()); List<String> roleIds = roleList.stream().map(sysRole -> sysRole.getOrgCode() + "_" + sysRole.getRoleId()).collect(Collectors.toList()); // 超级管理员查看所有 if (roleIds.contains("0_admin")) { return this.find(); } List<LayerRole> layerRoleList = layerRoleService.findByRoleIds(roleIds); layerRoleList.forEach(layerRole -> { LayerInfo layerInfo = layerRole.getLayerInfo(); resultList.addAll(this.findParent(layerInfo)); resultList.add(layerInfo); resultList.addAll(this.findChildren(layerInfo)); }); return resultList.stream().filter(distinctByKey(BaseObject::getId)).sorted(Comparator.comparing(TreeObject::getLft)).collect(Collectors.toList()); } private static <T> Predicate<T> distinctByKey(Function<? super T, Object> keyExtractor) { Set<Object> seen = ConcurrentHashMap.newKeySet(); return t -> seen.add(keyExtractor.apply(t)); } }
[ "1970083855@qq.com" ]
1970083855@qq.com
0c1d4c9f7714624b5bc17b402121082dea3db9e2
acc18fcba1c66500579b93432484c745a61c2f2d
/DanhBaContentProvider/app/src/main/java/com/example/huynh/danhba/Keyboard.java
9a78f0784f91eca8f05c04feaace334fb996d138
[]
no_license
lucfan99/DanhSachDoAn
b58a4b25cb90a596942313a00af44e66f30a0275
6ed591aad9e66d8e88679bf9a44bc311f07ea1c2
refs/heads/master
2022-12-14T17:49:51.516368
2020-09-20T12:30:22
2020-09-20T12:30:22
297,069,420
0
0
null
null
null
null
UTF-8
Java
false
false
4,404
java
package com.example.huynh.danhba; import android.content.Context; import android.text.TextUtils; import android.util.AttributeSet; import android.util.SparseArray; import android.view.LayoutInflater; import android.view.View; import android.view.inputmethod.InputConnection; import android.widget.Button; import android.widget.LinearLayout; public class Keyboard extends LinearLayout implements View.OnClickListener { // constructors public Keyboard(Context context) { this(context, null, 0); } public Keyboard(Context context, AttributeSet attrs) { this(context, attrs, 0); } public Keyboard(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); init(context, attrs); } // keyboard keys (buttons) private Button mButton1; private Button mButton2; private Button mButton3; private Button mButton4; private Button mButton5; private Button mButton6; private Button mButton7; private Button mButton8; private Button mButton9; private Button mButton0; private Button mButtonDelete; private Button mButtonEnter; // This will map the button resource id to the String value that we want to // input when that button is clicked. SparseArray<String> keyValues = new SparseArray<>(); // Our communication link to the EditText InputConnection inputConnection; private void init(Context context, AttributeSet attrs) { // initialize buttons LayoutInflater.from(context).inflate(R.layout.keyboard_layout, this, true); mButton1 = (Button) findViewById(R.id.button_1); mButton2 = (Button) findViewById(R.id.button_2); mButton3 = (Button) findViewById(R.id.button_3); mButton4 = (Button) findViewById(R.id.button_4); mButton5 = (Button) findViewById(R.id.button_5); mButton6 = (Button) findViewById(R.id.button_6); mButton7 = (Button) findViewById(R.id.button_7); mButton8 = (Button) findViewById(R.id.button_8); mButton9 = (Button) findViewById(R.id.button_9); mButton0 = (Button) findViewById(R.id.button_0); mButtonDelete = (Button) findViewById(R.id.button_delete); mButtonEnter = (Button) findViewById(R.id.button_call); // set button click listeners mButton1.setOnClickListener(this); mButton2.setOnClickListener(this); mButton3.setOnClickListener(this); mButton4.setOnClickListener(this); mButton5.setOnClickListener(this); mButton6.setOnClickListener(this); mButton7.setOnClickListener(this); mButton8.setOnClickListener(this); mButton9.setOnClickListener(this); mButton0.setOnClickListener(this); mButtonDelete.setOnClickListener(this); mButtonEnter.setOnClickListener(this); // map buttons IDs to input strings keyValues.put(R.id.button_1, "1"); keyValues.put(R.id.button_2, "2"); keyValues.put(R.id.button_3, "3"); keyValues.put(R.id.button_4, "4"); keyValues.put(R.id.button_5, "5"); keyValues.put(R.id.button_6, "6"); keyValues.put(R.id.button_7, "7"); keyValues.put(R.id.button_8, "8"); keyValues.put(R.id.button_9, "9"); keyValues.put(R.id.button_0, "0"); } @Override public void onClick(View v) { // do nothing if the InputConnection has not been set yet if (inputConnection == null) return; // Delete text or input key value // All communication goes through the InputConnection if (v.getId() == R.id.button_delete) { CharSequence selectedText = inputConnection.getSelectedText(0); if (TextUtils.isEmpty(selectedText)) { // no selection, so delete previous character inputConnection.deleteSurroundingText(1, 0); } else { // delete the selection inputConnection.commitText("", 1); } } else { String value = keyValues.get(v.getId()); inputConnection.commitText(value, 1); } } // The activity (or some parent or controller) must give us // a reference to the current EditText's InputConnection public void setInputConnection(InputConnection ic) { this.inputConnection = ic; } }
[ "57805171+lucfan99@users.noreply.github.com" ]
57805171+lucfan99@users.noreply.github.com
ecdee94922ec62e07a34eb9bb7b1a604bb24d2bc
5b7b7ac935757f9ba4f4207decfce2c969c7721d
/Polestar/src/main/java/com/polestar/constants/HeaderConstants.java
482921f03648b6a0815fbc64b1cb45f9694df020
[]
no_license
AbhijitBiradar/Polestar
163998d90c3419df77916b0be81d3ff2b2ed34e0
8ec2173be49d19213dff23ab99dd4d0ab3bb1bf3
refs/heads/master
2022-11-22T18:26:14.643536
2020-07-19T08:29:25
2020-07-19T08:29:25
254,250,250
0
0
null
2022-11-16T00:46:28
2020-04-09T02:20:28
Java
UTF-8
Java
false
false
240
java
package com.polestar.constants; public class HeaderConstants { public static final String CONTENT_TYPE="Content-Type"; public static final String APPLICATION_JSON="application/json"; public static final String SERVER="server"; }
[ "biradar.abhijit@gmail.com" ]
biradar.abhijit@gmail.com
845aa1854c17cd943738c6dccbcf7febaf026516
082e4d7b73248fda2e39e742e7a59d5b3d8672ad
/src/main/java/com/community/gateway/logical/BusinessLogical.java
c344edccf24e49593502e77955cd24b92eda286d
[]
no_license
kannanr26/Gateway
6141fdfad75983e2f4dc4c36df86a428e4659642
b5592a631008f711d52544eceac00195dff57e65
refs/heads/master
2021-05-27T12:59:10.902341
2020-05-01T07:14:03
2020-05-01T07:14:03
254,268,987
0
1
null
2020-05-01T07:14:05
2020-04-09T04:14:03
Java
UTF-8
Java
false
false
601
java
package com.community.gateway.logical; import java.util.List; import javax.validation.Valid; import com.community.gateway.dto.BusinessDTO; import com.community.gateway.exception.ResourceNotFoundException; public interface BusinessLogical { List<BusinessDTO> findAll(); BusinessDTO findById(Long businessId)throws ResourceNotFoundException; BusinessDTO findByBusinessName(String business)throws ResourceNotFoundException; //BusinessDTO save(@Valid Business businessDTO); void delete(Long businessId) throws ResourceNotFoundException; BusinessDTO save(@Valid BusinessDTO businessDto); }
[ "kannanrathaselvi@gmail.com" ]
kannanrathaselvi@gmail.com
f0f7587ccb96b94196f4cec7ee213c0b681563b6
eea662c5b274ab75b9b982b63006ab5c7bda5b96
/src/main/java/fire/web/service/AssignmentService.java
2775a138c3106806f14c39d3415326f10939242f
[]
no_license
tynr426/fire
ebec94145eac9cd0aedd695f18426d35acf40c5d
0361380becad3a1526f50b2807606402638c5115
refs/heads/master
2021-09-12T23:19:20.071306
2018-04-22T14:24:17
2018-04-22T14:24:17
103,547,542
0
0
null
null
null
null
UTF-8
Java
false
false
877
java
package fire.web.service; import java.util.List; import fire.common.entity.Assignment; import fire.common.entity.AssignmentResult; import fire.common.entity.RepairrecordResult; import fire.common.entity.StatusStatistics; import fire.web.utils.PageInfo; public interface AssignmentService { public Assignment getAssignment(int id); public int deleteAssignment(int id); public PageInfo<AssignmentResult> getAssignmentPage(int companyId,int index,int size); public PageInfo<AssignmentResult> getAssignmentPageByManager(int companyId,int managerId,int index,int size,Integer status,String keyword); public List<StatusStatistics> getStatistics(int managerId,Integer status,String keyword); public int updateStatus(Integer id, Integer status); public int save(Assignment entity); public AssignmentResult getAssignmentByCheckId(int checkId); }
[ "pc@F0X0W2J6PRGKFTO" ]
pc@F0X0W2J6PRGKFTO
f28e49187c24e0e1d2e362f7c34ccedf3c6338db
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project24/src/test/java/org/gradle/test/performance24_3/Test24_207.java
50dd68e1ca00914b44ccbbfb0805cbcac3ef84a6
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
292
java
package org.gradle.test.performance24_3; import static org.junit.Assert.*; public class Test24_207 { private final Production24_207 production = new Production24_207("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
f277dc1cc7f398ec5bcf540a8248b74c81bc7da3
66ef826c4e5e578e1a4099aff69e335b8af1ef13
/src/task4/Task4.java
62c4080372c68c9567b5fe55b3decfa7d0b61fd9
[]
no_license
DEdKorolev/Zadanie3
2b58c32de342437f229f180d3ce2bbfbf879dae6
2de71b32f182cbad7794f448e7d52239357a7cf9
refs/heads/master
2023-07-27T02:00:23.566868
2021-09-06T10:01:31
2021-09-06T10:01:31
401,137,284
0
0
null
null
null
null
UTF-8
Java
false
false
2,466
java
/* Метод, который получает на вход Map<K, V> и возвращает Map, где ключи и значения поменяны местами. Так как значения исходной Map могут совпадать, то тип ключа в Map будет уже не K, а Collection<K>: Map<V, Collection<K>> */ package task4; import java.util.*; import java.util.Set; public class Task4 { public static void main(String[] args) { // Map для тестирования HashMap<String, Integer> map = new HashMap<>(); map.put("a", 1); map.put("b", 2); map.put("c", 2); map.put("d", 3); // Вызов метода перестановки и вывод данных в консоль System.out.println(inverse(map)); } // Метод перестановки ключей и значений с учётом возможного дублирования значений public static <K, V> Map<V, Collection<K>> inverse(Map<? extends K, ? extends V> map){ // Создаем карту, в которой ключем будут значения, а значения коллекций из ключей Map<V, Collection<K>> resultMap = new HashMap<>(); // Создаем сет ключей из map Set<K> keys = (Set<K>) map.keySet(); // Перебираем ключи for(K key : keys){ V value = map.get(key); // Запрашиваем значение у ключа из map и присваиваем значение переменной value // Сопоставляет новый ключ и новый сет значений // Если ключ (значение value) не повторяется keysSet обнуляется // Если ключ (значение value) повторяется keysSet не обнуляется resultMap.compute(value, (val, keysSet) -> { // Если keysSet не существует, то создать новый keysSet if(keysSet == null){ keysSet = new HashSet<>(); } keysSet.add(key); // Добавить в keysSet значение return keysSet; // Вернуть keysSet }); } return resultMap; // Вернуть resultMap } }
[ "scooter-@mail.ru" ]
scooter-@mail.ru
7af614459f0cb73fbea873e46938793015ae9957
3449cc2feeaa0d6ffe5075032e424be3ccbd1733
/src/main/java/org/sonatype/nexus/plugins/crowd/client/rest/RestException.java
43698f6e1b963c5b16d1fa1250937d5f80fe0112
[]
no_license
PatrickRoumanoff/nexus-crowd-plugin
6018cf3a3e0a6a1096847a9a1f3424321b9b20fa
f01e277627dde36eed6413759340e63b66e5ab00
refs/heads/master
2023-07-06T19:36:47.922149
2023-06-28T16:55:52
2023-06-28T16:55:52
4,085,009
22
15
null
2021-09-27T13:06:32
2012-04-20T09:32:38
Java
UTF-8
Java
false
false
1,233
java
/* * This program is licensed to you under the Apache License Version 2.0, * and you may not use this file except in compliance with the Apache License Version 2.0. * You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. * * Unless required by applicable law or agreed to in writing, * software distributed under the Apache License Version 2.0 is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. */ package org.sonatype.nexus.plugins.crowd.client.rest; public class RestException extends Exception { private static final long serialVersionUID = 8299574203640049391L; public RestException() { super(); } public RestException(String message) { super(message); } public RestException(Throwable cause) { super(cause); } public RestException(String message, Throwable cause) { super(message, cause); } public RestException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { super(message, cause, enableSuppression, writableStackTrace); } }
[ "issa-gorissen@usa.net" ]
issa-gorissen@usa.net
7cb739f44404b8e34419d09231fb3377d29b3080
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/9/9_6b1d1ab0a27e9ed08a626e18319beb91d0a0d5ce/OtpMbox/9_6b1d1ab0a27e9ed08a626e18319beb91d0a0d5ce_OtpMbox_s.java
16369f5053fc874c378f018d5b80328d06921d6d
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
22,737
java
/* * %CopyrightBegin% * * Copyright Ericsson AB 2000-2009. All Rights Reserved. * * The contents of this file are subject to the Erlang Public License, * Version 1.1, (the "License"); you may not use this file except in * compliance with the License. You should have received a copy of the * Erlang Public License along with this software. If not, it can be * retrieved online at http://www.erlang.org/. * * Software distributed under the License is distributed on an "AS IS" * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See * the License for the specific language governing rights and limitations * under the License. * * %CopyrightEnd% */ package com.ericsson.otp.erlang; /** * <p> * Provides a simple mechanism for exchanging messages with Erlang processes or * other instances of this class. * </p> * * <p> * Each mailbox is associated with a unique {@link OtpErlangPid pid} that * contains information necessary for delivery of messages. When sending * messages to named processes or mailboxes, the sender pid is made available to * the recipient of the message. When sending messages to other mailboxes, the * recipient can only respond if the sender includes the pid as part of the * message contents. The sender can determine his own pid by calling * {@link #self self()}. * </p> * * <p> * Mailboxes can be named, either at creation or later. Messages can be sent to * named mailboxes and named Erlang processes without knowing the * {@link OtpErlangPid pid} that identifies the mailbox. This is neccessary in * order to set up initial communication between parts of an application. Each * mailbox can have at most one name. * </p> * * <p> * Since this class was intended for communication with Erlang, all of the send * methods take {@link OtpErlangObject OtpErlangObject} arguments. However this * class can also be used to transmit arbitrary Java objects (as long as they * implement one of java.io.Serializable or java.io.Externalizable) by * encapsulating the object in a {@link OtpErlangBinary OtpErlangBinary}. * </p> * * <p> * Messages to remote nodes are externalized for transmission, and as a result * the recipient receives a <b>copy</b> of the original Java object. To ensure * consistent behaviour when messages are sent between local mailboxes, such * messages are cloned before delivery. * </p> * * <p> * Additionally, mailboxes can be linked in much the same way as Erlang * processes. If a link is active when a mailbox is {@link #close closed}, any * linked Erlang processes or OtpMboxes will be sent an exit signal. As well, * exit signals will be (eventually) sent if a mailbox goes out of scope and its * {@link #finalize finalize()} method called. However due to the nature of * finalization (i.e. Java makes no guarantees about when {@link #finalize * finalize()} will be called) it is recommended that you always explicitly * close mailboxes if you are using links instead of relying on finalization to * notify other parties in a timely manner. * </p> * * When retrieving messages from a mailbox that has received an exit signal, an * {@link OtpErlangExit OtpErlangExit} exception will be raised. Note that the * exception is queued in the mailbox along with other messages, and will not be * raised until it reaches the head of the queue and is about to be retrieved. * </p> * */ public class OtpMbox { OtpNode home; OtpErlangPid self; GenericQueue queue; String name; Links links; // package constructor: called by OtpNode:createMbox(name) // to create a named mbox OtpMbox(final OtpNode home, final OtpErlangPid self, final String name) { this.self = self; this.home = home; this.name = name; queue = new GenericQueue(); links = new Links(10); } // package constructor: called by OtpNode:createMbox() // to create an anonymous OtpMbox(final OtpNode home, final OtpErlangPid self) { this(home, self, null); } /** * <p> * Get the identifying {@link OtpErlangPid pid} associated with this * mailbox. * </p> * * <p> * The {@link OtpErlangPid pid} associated with this mailbox uniquely * identifies the mailbox and can be used to address the mailbox. You can * send the {@link OtpErlangPid pid} to a remote communicating part so that * he can know where to send his response. * </p> * * @return the self pid for this mailbox. */ public OtpErlangPid self() { return self; } /** * <p> * Register or remove a name for this mailbox. Registering a name for a * mailbox enables others to send messages without knowing the * {@link OtpErlangPid pid} of the mailbox. A mailbox can have at most one * name; if the mailbox already had a name, calling this method will * supercede that name. * </p> * * @param name * the name to register for the mailbox. Specify null to * unregister the existing name from this mailbox. * * @return true if the name was available, or false otherwise. */ public synchronized boolean registerName(final String name) { return home.registerName(name, this); } /** * Get the registered name of this mailbox. * * @return the registered name of this mailbox, or null if the mailbox had * no registerd name. */ public String getName() { return name; } /** * Block until a message arrives for this mailbox. * * @return an {@link OtpErlangObject OtpErlangObject} representing the body * of the next message waiting in this mailbox. * * @exception OtpErlangDecodeException * if the message can not be decoded. * * @exception OtpErlangExit * if a linked {@link OtpErlangPid pid} has exited or has * sent an exit signal to this mailbox. */ public OtpErlangObject receive() throws OtpErlangExit, OtpErlangDecodeException { try { return receiveMsg().getMsg(); } catch (final OtpErlangExit e) { throw e; } catch (final OtpErlangDecodeException f) { throw f; } } /** * Wait for a message to arrive for this mailbox. * * @param timeout * the time, in milliseconds, to wait for a message before * returning null. * * @return an {@link OtpErlangObject OtpErlangObject} representing the body * of the next message waiting in this mailbox. * * @exception OtpErlangDecodeException * if the message can not be decoded. * * @exception OtpErlangExit * if a linked {@link OtpErlangPid pid} has exited or has * sent an exit signal to this mailbox. */ public OtpErlangObject receive(final long timeout) throws OtpErlangExit, OtpErlangDecodeException { try { final OtpMsg m = receiveMsg(timeout); if (m != null) { return m.getMsg(); } } catch (final OtpErlangExit e) { throw e; } catch (final OtpErlangDecodeException f) { throw f; } catch (final InterruptedException g) { } return null; } /** * Block until a message arrives for this mailbox. * * @return a byte array representing the still-encoded body of the next * message waiting in this mailbox. * * @exception OtpErlangExit * if a linked {@link OtpErlangPid pid} has exited or has * sent an exit signal to this mailbox. * */ public OtpInputStream receiveBuf() throws OtpErlangExit { return receiveMsg().getMsgBuf(); } /** * Wait for a message to arrive for this mailbox. * * @param timeout * the time, in milliseconds, to wait for a message before * returning null. * * @return a byte array representing the still-encoded body of the next * message waiting in this mailbox. * * @exception OtpErlangExit * if a linked {@link OtpErlangPid pid} has exited or has * sent an exit signal to this mailbox. * * @exception InterruptedException * if no message if the method times out before a message * becomes available. */ public OtpInputStream receiveBuf(final long timeout) throws InterruptedException, OtpErlangExit { final OtpMsg m = receiveMsg(timeout); if (m != null) { return m.getMsgBuf(); } return null; } /** * Block until a message arrives for this mailbox. * * @return an {@link OtpMsg OtpMsg} containing the header information as * well as the body of the next message waiting in this mailbox. * * @exception OtpErlangExit * if a linked {@link OtpErlangPid pid} has exited or has * sent an exit signal to this mailbox. * */ public OtpMsg receiveMsg() throws OtpErlangExit { final OtpMsg m = (OtpMsg) queue.get(); switch (m.type()) { case OtpMsg.exitTag: case OtpMsg.exit2Tag: try { final OtpErlangObject o = m.getMsg(); throw new OtpErlangExit(o, m.getSenderPid()); } catch (final OtpErlangDecodeException e) { throw new OtpErlangExit("unknown", m.getSenderPid()); } default: return m; } } /** * Wait for a message to arrive for this mailbox. * * @param timeout * the time, in milliseconds, to wait for a message. * * @return an {@link OtpMsg OtpMsg} containing the header information as * well as the body of the next message waiting in this mailbox. * * @exception OtpErlangExit * if a linked {@link OtpErlangPid pid} has exited or has * sent an exit signal to this mailbox. * * @exception InterruptedException * if no message if the method times out before a message * becomes available. */ public OtpMsg receiveMsg(final long timeout) throws InterruptedException, OtpErlangExit { final OtpMsg m = (OtpMsg) queue.get(timeout); if (m == null) { return null; } switch (m.type()) { case OtpMsg.exitTag: case OtpMsg.exit2Tag: try { final OtpErlangObject o = m.getMsg(); throw new OtpErlangExit(o, m.getSenderPid()); } catch (final OtpErlangDecodeException e) { throw new OtpErlangExit("unknown", m.getSenderPid()); } default: return m; } } /** * Send a message to a remote {@link OtpErlangPid pid}, representing either * another {@link OtpMbox mailbox} or an Erlang process. * * @param to * the {@link OtpErlangPid pid} identifying the intended * recipient of the message. * * @param msg * the body of the message to send. * */ public void send(final OtpErlangPid to, final OtpErlangObject msg) { try { final String node = to.node(); if (node.equals(home.node())) { home.deliver(new OtpMsg(to, (OtpErlangObject) msg.clone())); } else { final OtpCookedConnection conn = home.getConnection(node); if (conn == null) { return; } conn.send(self, to, msg); } } catch (final Exception e) { } } /** * Send a message to a named mailbox created from the same node as this * mailbox. * * @param name * the registered name of recipient mailbox. * * @param msg * the body of the message to send. * */ public void send(final String name, final OtpErlangObject msg) { home.deliver(new OtpMsg(self, name, (OtpErlangObject) msg.clone())); } /** * Send a message to a named mailbox created from another node. * * @param name * the registered name of recipient mailbox. * * @param node * the name of the remote node where the recipient mailbox is * registered. * * @param msg * the body of the message to send. * */ public void send(final String name, final String node, final OtpErlangObject msg) { try { final String currentNode = home.node(); if (node.equals(currentNode)) { send(name, msg); } else if (node.indexOf('@', 0) < 0 && node.equals(currentNode.substring(0, currentNode .indexOf('@', 0)))) { send(name, msg); } else { // other node final OtpCookedConnection conn = home.getConnection(node); if (conn == null) { return; } conn.send(self, name, msg); } } catch (final Exception e) { } } /** * Close this mailbox with the given reason. * * <p> * After this operation, the mailbox will no longer be able to receive * messages. Any delivered but as yet unretrieved messages can still be * retrieved however. * </p> * * <p> * If there are links from this mailbox to other {@link OtpErlangPid pids}, * they will be broken when this method is called and exit signals will be * sent. * </p> * * @param reason * an Erlang term describing the reason for the exit. */ public void exit(final OtpErlangObject reason) { home.closeMbox(this, reason); } /** * Equivalent to <code>exit(new OtpErlangAtom(reason))</code>. * </p> * * @see #exit(OtpErlangObject) */ public void exit(final String reason) { exit(new OtpErlangAtom(reason)); } /** * <p> * Send an exit signal to a remote {@link OtpErlangPid pid}. This method * does not cause any links to be broken, except indirectly if the remote * {@link OtpErlangPid pid} exits as a result of this exit signal. * </p> * * @param to * the {@link OtpErlangPid pid} to which the exit signal * should be sent. * * @param reason * an Erlang term indicating the reason for the exit. */ // it's called exit, but it sends exit2 public void exit(final OtpErlangPid to, final OtpErlangObject reason) { exit(2, to, reason); } /** * <p> * Equivalent to <code>exit(to, new * OtpErlangAtom(reason))</code>. * </p> * * @see #exit(OtpErlangPid, OtpErlangObject) */ public void exit(final OtpErlangPid to, final String reason) { exit(to, new OtpErlangAtom(reason)); } // this function used internally when "process" dies // since Erlang discerns between exit and exit/2. private void exit(final int arity, final OtpErlangPid to, final OtpErlangObject reason) { try { final String node = to.node(); if (node.equals(home.node())) { home.deliver(new OtpMsg(OtpMsg.exitTag, self, to, reason)); } else { final OtpCookedConnection conn = home.getConnection(node); if (conn == null) { return; } switch (arity) { case 1: conn.exit(self, to, reason); break; case 2: conn.exit2(self, to, reason); break; } } } catch (final Exception e) { } } /** * <p> * Link to a remote mailbox or Erlang process. Links are idempotent, calling * this method multiple times will not result in more than one link being * created. * </p> * * <p> * If the remote process subsequently exits or the mailbox is closed, a * subsequent attempt to retrieve a message through this mailbox will cause * an {@link OtpErlangExit OtpErlangExit} exception to be raised. Similarly, * if the sending mailbox is closed, the linked mailbox or process will * receive an exit signal. * </p> * * <p> * If the remote process cannot be reached in order to set the link, the * exception is raised immediately. * </p> * * @param to * the {@link OtpErlangPid pid} representing the object to * link to. * * @exception OtpErlangExit * if the {@link OtpErlangPid pid} referred to does not * exist or could not be reached. * */ public void link(final OtpErlangPid to) throws OtpErlangExit { try { final String node = to.node(); if (node.equals(home.node())) { if (!home.deliver(new OtpMsg(OtpMsg.linkTag, self, to))) { throw new OtpErlangExit("noproc", to); } } else { final OtpCookedConnection conn = home.getConnection(node); if (conn != null) { conn.link(self, to); } else { throw new OtpErlangExit("noproc", to); } } } catch (final OtpErlangExit e) { throw e; } catch (final Exception e) { } links.addLink(self, to); } /** * <p> * Remove a link to a remote mailbox or Erlang process. This method removes * a link created with {@link #link link()}. Links are idempotent; calling * this method once will remove all links between this mailbox and the * remote {@link OtpErlangPid pid}. * </p> * * @param to * the {@link OtpErlangPid pid} representing the object to * unlink from. * */ public void unlink(final OtpErlangPid to) { links.removeLink(self, to); try { final String node = to.node(); if (node.equals(home.node())) { home.deliver(new OtpMsg(OtpMsg.unlinkTag, self, to)); } else { final OtpCookedConnection conn = home.getConnection(node); if (conn != null) { conn.unlink(self, to); } } } catch (final Exception e) { } } /** * <p> * Create a connection to a remote node. * </p> * * <p> * Strictly speaking, this method is not necessary simply to set up a * connection, since connections are created automatically first time a * message is sent to a {@link OtpErlangPid pid} on the remote node. * </p> * * <p> * This method makes it possible to wait for a node to come up, however, or * check that a node is still alive. * </p> * * <p> * This method calls a method with the same name in {@link OtpNode#ping * Otpnode} but is provided here for convenience. * </p> * * @param node * the name of the node to ping. * * @param timeout * the time, in milliseconds, before reporting failure. */ public boolean ping(final String node, final long timeout) { return home.ping(node, timeout); } /** * <p> * Get a list of all known registered names on the same {@link OtpNode node} * as this mailbox. * </p> * * <p> * This method calls a method with the same name in {@link OtpNode#getNames * Otpnode} but is provided here for convenience. * </p> * * @return an array of Strings containing all registered names on this * {@link OtpNode node}. */ public String[] getNames() { return home.getNames(); } /** * Determine the {@link OtpErlangPid pid} corresponding to a registered name * on this {@link OtpNode node}. * * <p> * This method calls a method with the same name in {@link OtpNode#whereis * Otpnode} but is provided here for convenience. * </p> * * @return the {@link OtpErlangPid pid} corresponding to the registered * name, or null if the name is not known on this node. */ public OtpErlangPid whereis(final String name) { return home.whereis(name); } /** * Close this mailbox. * * <p> * After this operation, the mailbox will no longer be able to receive * messages. Any delivered but as yet unretrieved messages can still be * retrieved however. * </p> * * <p> * If there are links from this mailbox to other {@link OtpErlangPid pids}, * they will be broken when this method is called and exit signals with * reason 'normal' will be sent. * </p> * * <p> * This is equivalent to {@link #exit(String) exit("normal")}. * </p> */ public void close() { home.closeMbox(this); } @Override protected void finalize() { close(); queue.flush(); } /** * Determine if two mailboxes are equal. * * @return true if both Objects are mailboxes with the same identifying * {@link OtpErlangPid pids}. */ @Override public boolean equals(final Object o) { if (!(o instanceof OtpMbox)) { return false; } final OtpMbox m = (OtpMbox) o; return m.self.equals(self); } @Override public int hashCode() { return self.hashCode(); } /* * called by OtpNode to deliver message to this mailbox. * * About exit and exit2: both cause exception to be raised upon receive(). * However exit (not 2) causes any link to be removed as well, while exit2 * leaves any links intact. */ void deliver(final OtpMsg m) { switch (m.type()) { case OtpMsg.linkTag: links.addLink(self, m.getSenderPid()); break; case OtpMsg.unlinkTag: links.removeLink(self, m.getSenderPid()); break; case OtpMsg.exitTag: links.removeLink(self, m.getSenderPid()); queue.put(m); break; case OtpMsg.exit2Tag: default: queue.put(m); break; } } // used to break all known links to this mbox void breakLinks(final OtpErlangObject reason) { final Link[] l = links.clearLinks(); if (l != null) { final int len = l.length; for (int i = 0; i < len; i++) { exit(1, l[i].remote(), reason); } } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
cf9fea5bb74d88e39a84812e3f7a1179938676b0
7b8817da7eba394c6c2357a436b759b2f1894102
/kth-mybatis/src/main/java/org/kpu/myweb/controller/MemberController.java
b17df93b6f7b1259c34cd81d6bb5ed3eb15186e7
[]
no_license
thoonk/FrameworkProgramming
5ae466216e996ebbe6bbe98951e5bc666897ea53
ea760d559869d8801025f655b36e3d32b1823f4e
refs/heads/master
2022-12-21T11:28:37.792126
2020-06-13T05:03:14
2020-06-13T05:03:14
249,359,811
2
0
null
2022-12-16T15:26:39
2020-03-23T07:10:43
Java
UTF-8
Java
false
false
3,292
java
package org.kpu.myweb.controller; import java.util.List; import org.kpu.myweb.domain.StudentVO; import org.kpu.myweb.service.MemberService; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; @Controller @RequestMapping(value="/member") public class MemberController { @Autowired private MemberService memberService; private static final Logger logger = LoggerFactory.getLogger(MemberController.class); @RequestMapping(value = {"/list"}, method = RequestMethod.GET) public String listMember(Model model) throws Exception { List<StudentVO> students = memberService.readMemberList(); logger.info(" /member/list URL called. then listMemebr method executed."); model.addAttribute("students", students); return "member/member_list"; } @RequestMapping(value = "/read", method = RequestMethod.GET) public String readMember(@RequestParam("id") String id, Model model) throws Exception { StudentVO student = memberService.readMember(id); logger.info(" /read?id=kang URL called. then readMemebr method executed."); model.addAttribute("student", student); return "member/member_read"; } @RequestMapping(value = {"/register"}, method = RequestMethod.GET) public String createMemberGet() throws Exception { logger.info(" /register URL GET method called. then forward member_register.jsp."); return "member/member_register"; } @RequestMapping(value = {"/register"}, method = RequestMethod.POST) public String createMemberPost( @ModelAttribute("student") StudentVO vo) throws Exception { memberService.addMember(vo); logger.info(vo.toString()); logger.info(" /register URL POST method called. then createMember method executed."); return "redirect:/member/list"; } @RequestMapping(value = "/modify", method = RequestMethod.GET) public String modifyMemberGet(@RequestParam("id") String id, Model model) throws Exception { StudentVO student = memberService.readMember(id); logger.info(" /modify?id=kang URL GET method called. then forward member_modify.jsp."); model.addAttribute("student", student); return "member/member_modify"; } @RequestMapping(value = "/modify", method = RequestMethod.POST) public String modifyMemberPost(@ModelAttribute("student") StudentVO vo) throws Exception { memberService.updateMember(vo); logger.info(vo.toString()); logger.info(" /modify?id=kang URL POST method called. then modifyMemberPost method executed."); return "redirect:/member/list"; } /* MemberControllerAdvice에 예외처리 기능적용 @ExceptionHandler(DataNotFoundException.class) public String handleException(DataNotFoundException e) { return "member/not_found"; } */ }
[ "dkrmrm878@gmail.com" ]
dkrmrm878@gmail.com
0581092d0cdd74b6b5eed300678f440b05152b86
961598004e7e103c0e9dfaf98fb5c611a73f9d38
/src/java/bladwin/web/videoMgrObjMenu.java
065fdef5a4f4a8ed3cda15773ddd15608246f8ee
[]
no_license
jozzell/CraftBeer
76092e56f72756903388ada9bbf8666e04b8648e
0d65ea924041a4a988434ac6238b49768ecf06b4
refs/heads/master
2021-01-01T05:25:59.290532
2016-04-14T15:21:14
2016-04-14T15:21:14
56,244,931
0
0
null
null
null
null
UTF-8
Java
false
false
5,478
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 bladwin.web; import java.io.Serializable; import jvp.obj.eNum.eNumVideoIDs; /** * * @author lmeans */ public class videoMgrObjMenu implements Serializable{ videoMgrObjMenuInterface iface; public videoMgrObjMenu(videoMgrObjMenuInterface i){ iface = i; } // ============================== public void setTrackClubIndoor(){ iface.setVideoType(eNumVideoIDs.TrackClubIndoor); //iface.setVideoType(97,"Baldwin Blazers (Indoor)"); } public void setTrackClubOutdoor(){ iface.setVideoType(eNumVideoIDs.TrackClubOutdoor); //iface.setVideoType(1113,"Baldwin Blazers (Outdoor)"); } public void setTrackClubAAU(){ iface.setVideoType(eNumVideoIDs.TrackClubAAU); //iface.setVideoType(1114,"Baldwin Blazers (AAU)"); } public void calEOC(){ iface.setVideoType(eNumVideoIDs.EOC); //iface.setVideoType(1107, "cal/church_EOC.xhtml"); } public void calFirst(){ iface.setVideoType(eNumVideoIDs.FirstBaptist); //iface.setVideoType(1106, "Royal Priesthool (Anniversary)"); } public void calFirst2009(){ iface.setVideoType(eNumVideoIDs.FirstBaptist2009); //iface.setVideoType(1206, "Gospel Concert (2010)"); } public void calFirst2014XMas(){ iface.setVideoType(eNumVideoIDs.FirstBaptist2014XMas); //iface.setVideoType(1206, "Gospel Concert (2010)"); } public void calMount(){ iface.setVideoType(eNumVideoIDs.MountOlive); //iface.setVideoType(1105, "cal/church_mtolive.xhtml"); } // ============================== public void setHearAndNow(){ iface.setVideoType(eNumVideoIDs.HearAndNow); //iface.setVideoType(107,"Jozzell Video Production"); } public void setShirley(){ iface.setVideoType(eNumVideoIDs.ShirleyPublicAccess); //iface.setVideoType(108,"Jozzell Video Production"); } // ============================== public void setVideoSports(){ iface.setVideoType(eNumVideoIDs.VideoSports); //iface.setVideoType(102,"Football Highlight Real"); } public void setVideoSportsGame(){ iface.setVideoType(eNumVideoIDs.VideoSportsGame); //iface.setVideoType(106,"Jozzell Video Production"); } // ============================== public void setHome(){ iface.setHome(); //iface.setVideoType(101,"Events"); } public void setVideoSweet16(){ iface.setVideoType(eNumVideoIDs.VideoSweet16); //iface.setVideoType(100,"Jozzell Video Production"); } public void setEventsRedCarpet(){ iface.setVideoType(eNumVideoIDs.EventsRedCarpet); // iface.setVideoType(105,"Jozzell Video Production"); } // ============================== public void setCommunityPicnic(){ iface.setVideoType(eNumVideoIDs.CommunityPicnic); // iface.setVideoType(103,"Jozzell Video Production"); } public void setCommunityAwardCeremony(){ iface.setVideoType(eNumVideoIDs.CommunityAwardCeremony); // iface.setVideoType(104,"Jozzell Video Production"); } // ============================== public void setMsRucker(){ iface.setVideoType(eNumVideoIDs.MsRucker); //iface.setVideoType(201,"Jozzell Video Production"); } public void setMrClean(){ iface.setVideoType(eNumVideoIDs.MrClean); //iface.setVideoType(200,"Jozzell Video Production"); } public void setAnaysha(){ iface.setVideoType(eNumVideoIDs.Anaysha); //iface.setVideoType(202,"Jozzell Video Production"); } public void set22nd(){ iface.setVideoType(eNumVideoIDs.VOI22nd); //iface.setVideoType(203,"22nd Anniversary (2011)" ); } public void set23nd(){ iface.setVideoType(eNumVideoIDs.VOI23nd); //iface.setVideoType(204,"23rd Anniversary (2012)"); } public void set24nd(){ iface.setVideoType(eNumVideoIDs.VOI24nd); //iface.setVideoType(205,"24th Anniversary (2013)"); } public void set25nd(){ iface.setVideoType(eNumVideoIDs.VOI25nd); //iface.setVideoType(99,"25th Anniversary (2014) Brooklyn Marriott"); } public void set26nd(){ iface.setVideoType(eNumVideoIDs.VOI26nd); //iface.setVideoType(98,"26th Anniversary (2015)"); } // ============================== public void setSpinMain(){ iface.setVideoType(eNumVideoIDs.SpinMain); //iface.setVideoType(206,"Jozzell Video Production"); } public void setSpinBonus(){ iface.setVideoType(eNumVideoIDs.SpinBonus); //iface.setVideoType(208,"Jozzell Video Production"); } public void setLeone(){ iface.setVideoType(eNumVideoIDs.Leone); //iface.setVideoType(207,"Jozzell Video Production"); } // ============================== public void setAdds(){ iface.setVideoType(eNumVideoIDs.Adds); //iface.setVideoType(210,"Jozzell Video Production"); } }
[ "lmeans@optonline.com" ]
lmeans@optonline.com
e1066ff3afd6026ca4ec0c4af21d1ca77f3f96f4
ce7e36aab52cfbf7c331ad1a7b3bdaab325cfcfa
/hawkular-wildfly-agent/src/main/java/org/hawkular/agent/monitor/extension/RemoteJMXAttributes.java
19a666c49c97c63659686890003ddd39b70765b9
[ "Apache-2.0" ]
permissive
tsegismont/hawkular-agent
74fde96fbf4450cfd1dc4b1c3c613dba65e2087c
9e3f649e7d8a1aedb301abbbd17962cb9920b3f9
refs/heads/master
2021-01-15T11:57:51.506127
2016-01-29T22:15:57
2016-01-29T22:15:57
44,375,757
0
0
null
2015-10-16T09:32:30
2015-10-16T09:32:29
null
UTF-8
Java
false
false
3,027
java
/* * Copyright 2015 Red Hat, Inc. and/or its affiliates * and other contributors as indicated by the @author tags. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.hawkular.agent.monitor.extension; import org.jboss.as.controller.AttributeDefinition; import org.jboss.as.controller.SimpleAttributeDefinition; import org.jboss.as.controller.SimpleAttributeDefinitionBuilder; import org.jboss.as.controller.registry.AttributeAccess; import org.jboss.dmr.ModelNode; import org.jboss.dmr.ModelType; public interface RemoteJMXAttributes { SimpleAttributeDefinition ENABLED = new SimpleAttributeDefinitionBuilder("enabled", ModelType.BOOLEAN) .setAllowNull(true) .setDefaultValue(new ModelNode(true)) .setAllowExpression(true) .addFlag(AttributeAccess.Flag.RESTART_RESOURCE_SERVICES) .build(); SimpleAttributeDefinition URL = new SimpleAttributeDefinitionBuilder("url", ModelType.STRING) .setAllowNull(false) .setAllowExpression(true) .addFlag(AttributeAccess.Flag.RESTART_RESOURCE_SERVICES) .build(); SimpleAttributeDefinition USERNAME = new SimpleAttributeDefinitionBuilder("username", ModelType.STRING) .setAllowNull(true) .setAllowExpression(true) .addFlag(AttributeAccess.Flag.RESTART_RESOURCE_SERVICES) .build(); SimpleAttributeDefinition PASSWORD = new SimpleAttributeDefinitionBuilder("password", ModelType.STRING) .setAllowNull(true) .setAllowExpression(true) .addFlag(AttributeAccess.Flag.RESTART_RESOURCE_SERVICES) .build(); SimpleAttributeDefinition SECURITY_REALM = new SimpleAttributeDefinitionBuilder("securityRealm", ModelType.STRING) .setAllowNull(true) .setAllowExpression(true) .addFlag(AttributeAccess.Flag.RESTART_RESOURCE_SERVICES) .build(); SimpleAttributeDefinition RESOURCE_TYPE_SETS = new SimpleAttributeDefinitionBuilder( "resourceTypeSets", ModelType.STRING) .setAllowNull(true) .setAllowExpression(true) .addFlag(AttributeAccess.Flag.RESTART_RESOURCE_SERVICES) .build(); AttributeDefinition[] ATTRIBUTES = { ENABLED, URL, USERNAME, PASSWORD, SECURITY_REALM, RESOURCE_TYPE_SETS }; }
[ "mazz@redhat.com" ]
mazz@redhat.com
3f1a6c770b6daad2931caf43a76926af74d847cc
0da17db519564eea8851d7cbe8c8e1a1517fc098
/app/src/androidTest/java/com/example/dhaval/assignment2d/ExampleInstrumentedTest.java
f4321d046b6cf0b4828e38519118b603f8fde0e4
[]
no_license
appyshah08/Assignment2d
37b0ba49f39af8485c0daf562f5f246b70e1e991
0a869488ec8d6d94a3a95d4ab9f57cb6cd87c00a
refs/heads/master
2021-01-18T13:50:49.088016
2017-03-08T15:44:59
2017-03-08T15:44:59
84,337,620
0
0
null
null
null
null
UTF-8
Java
false
false
766
java
package com.example.dhaval.assignment2d; 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.dhaval.assignment2d", appContext.getPackageName()); } }
[ "appflamaboy@gmail.com" ]
appflamaboy@gmail.com
7c8e5612959a94fdfdd58fb78438a84615c4bff1
dfd7e70936b123ee98e8a2d34ef41e4260ec3ade
/analysis/reverse-engineering/decompile-fitts-20191031-2200/sources/com/crashlytics/android/core/AppMeasurementEventListenerRegistrar.java
a72268cb39027f0840668348dc2085c8a188b5ed
[ "Apache-2.0" ]
permissive
skkuse-adv/2019Fall_team2
2d4f75bc793368faac4ca8a2916b081ad49b7283
3ea84c6be39855f54634a7f9b1093e80893886eb
refs/heads/master
2020-08-07T03:41:11.447376
2019-12-21T04:06:34
2019-12-21T04:06:34
213,271,174
5
5
Apache-2.0
2019-12-12T09:15:32
2019-10-07T01:18:59
Java
UTF-8
Java
false
false
119
java
package com.crashlytics.android.core; interface AppMeasurementEventListenerRegistrar { boolean register(); }
[ "33246398+ajid951125@users.noreply.github.com" ]
33246398+ajid951125@users.noreply.github.com
0419f1b5a6cfd8089d1bad49b7f5652f6236ab81
3affe07b7e7711248e4a57190e1c2bd7ce7041f5
/app/daos/TipoDireccionDAO.java
d6650f0697013620ad8906b20aab045ca205b73f
[ "Apache-2.0" ]
permissive
chandero/abrahamBackend
ca70c8762da3015a7d40a1151facda137b7f2399
88525cee70a2f9a6ace47c3e36d4acd1f1a361d6
refs/heads/master
2021-07-14T18:13:32.836798
2017-10-17T15:31:23
2017-10-17T15:31:23
107,286,959
0
0
null
null
null
null
UTF-8
Java
false
false
1,292
java
package daos; import java.util.List; import java.sql.PreparedStatement; import java.util.ArrayList; import java.sql.ResultSet; import models.TipoDireccion; import java.sql.Connection; import javax.inject.Inject; import play.db.*; public class TipoDireccionDAO{ private Database db; @Inject private TipoDireccionDAO(Database db) { this.db = db; } public List<TipoDireccion> getTipoDireccion(){ List<TipoDireccion> _dataList = new ArrayList<TipoDireccion>(); PreparedStatement stmt; Connection conn = db.getConnection(); try { String sql; sql = "SELECT t.ID_DIRECCION, t.DESCRIPCION_DIRECCION FROM \"gen$tiposdireccion\" t"; stmt = conn.prepareStatement(sql); ResultSet rs = stmt.executeQuery(); //Extract data from result set if (rs != null){ while(rs.next()){ TipoDireccion td = new TipoDireccion(); td.set_id(rs.getInt("ID_DIRECCION")); td.set_descripcion(rs.getString("DESCRIPCION_DIRECCION")); _dataList.add(td); } } } catch ( Exception e){ e.printStackTrace(); } return _dataList; } }
[ "aldacm2001@gmail.com" ]
aldacm2001@gmail.com
bd5d4ef22705eaf57df97c5cf5c599567c42655a
dbd861703420a64b616c02d763746c589f282585
/src/main/java/com/bharti/domain/SeoKeynote.java
fbee580c90f92b3090f58abe0e8921dc35b1c86a
[]
no_license
amarlalbharti/bitejava
841e69e4b51182ed4e7607d68319dfbf14051555
8727872e3ff3bfccad8a017dd296f524e7a5f146
refs/heads/master
2020-04-15T12:46:30.836816
2019-04-23T14:05:18
2019-04-23T14:05:18
62,317,152
0
0
null
null
null
null
UTF-8
Java
false
false
1,720
java
package com.bharti.domain; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.OneToOne; import javax.persistence.PrimaryKeyJoinColumn; import javax.persistence.Table; @Entity @Table(name="seo_keynote") public class SeoKeynote extends CommonDomain{ @Id @Column(nullable=false) @GeneratedValue(strategy=GenerationType.AUTO) private long seoId; @Column private String Title; @Column(nullable=false) private String description; @Column(nullable=false) private String keywords; @Column private String imageUrl; @OneToOne(fetch = FetchType.LAZY) @JoinColumn(name="kid" , referencedColumnName="kid") private Keynote keynote; public long getSeoId() { return seoId; } public void setSeoId(long seoId) { this.seoId = seoId; } public String getTitle() { return Title; } public void setTitle(String title) { Title = title; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public String getKeywords() { return keywords; } public void setKeywords(String keywords) { this.keywords = keywords; } public String getImageUrl() { return imageUrl; } public void setImageUrl(String imageUrl) { this.imageUrl = imageUrl; } public Keynote getKeynote() { return keynote; } public void setKeynote(Keynote keynote) { this.keynote = keynote; } }
[ "amar.b@LWJAV641.esoftmum.local" ]
amar.b@LWJAV641.esoftmum.local
3feb19d9d351bf1fc109ac2c19aff0470fd55e3e
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
/src/testcases/CWE369_Divide_by_Zero/s02/CWE369_Divide_by_Zero__int_connect_tcp_modulo_61b.java
65ef67f9bf7ea2f11d8e7060333ccab03104fa79
[]
no_license
bqcuong/Juliet-Test-Case
31e9c89c27bf54a07b7ba547eddd029287b2e191
e770f1c3969be76fdba5d7760e036f9ba060957d
refs/heads/master
2020-07-17T14:51:49.610703
2019-09-03T16:22:58
2019-09-03T16:22:58
206,039,578
1
2
null
null
null
null
UTF-8
Java
false
false
7,085
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE369_Divide_by_Zero__int_connect_tcp_modulo_61b.java Label Definition File: CWE369_Divide_by_Zero__int.label.xml Template File: sources-sinks-61b.tmpl.java */ /* * @description * CWE: 369 Divide by zero * BadSource: connect_tcp Read data using an outbound tcp connection * GoodSource: A hardcoded non-zero, non-min, non-max, even number * Sinks: modulo * GoodSink: Check for zero before modulo * BadSink : Modulo by a value that may be zero * Flow Variant: 61 Data flow: data returned from one method to another in different classes in the same package * * */ package testcases.CWE369_Divide_by_Zero.s02; import testcasesupport.*; import javax.servlet.http.*; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.IOException; import java.net.Socket; import java.util.logging.Level; public class CWE369_Divide_by_Zero__int_connect_tcp_modulo_61b { public int badSource() throws Throwable { int data; data = Integer.MIN_VALUE; /* Initialize data */ /* Read data using an outbound tcp connection */ { Socket socket = null; BufferedReader readerBuffered = null; InputStreamReader readerInputStream = null; try { /* Read data using an outbound tcp connection */ socket = new Socket("host.example.org", 39544); /* read input from socket */ readerInputStream = new InputStreamReader(socket.getInputStream(), "UTF-8"); readerBuffered = new BufferedReader(readerInputStream); /* POTENTIAL FLAW: Read data using an outbound tcp connection */ String stringNumber = readerBuffered.readLine(); if (stringNumber != null) /* avoid NPD incidental warnings */ { try { data = Integer.parseInt(stringNumber.trim()); } catch(NumberFormatException exceptNumberFormat) { IO.logger.log(Level.WARNING, "Number format exception parsing data from string", exceptNumberFormat); } } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } finally { /* clean up stream reading objects */ try { if (readerBuffered != null) { readerBuffered.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing BufferedReader", exceptIO); } try { if (readerInputStream != null) { readerInputStream.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing InputStreamReader", exceptIO); } /* clean up socket objects */ try { if (socket != null) { socket.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing Socket", exceptIO); } } } return data; } /* goodG2B() - use goodsource and badsink */ public int goodG2BSource() throws Throwable { int data; /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; return data; } /* goodB2G() - use badsource and goodsink */ public int goodB2GSource() throws Throwable { int data; data = Integer.MIN_VALUE; /* Initialize data */ /* Read data using an outbound tcp connection */ { Socket socket = null; BufferedReader readerBuffered = null; InputStreamReader readerInputStream = null; try { /* Read data using an outbound tcp connection */ socket = new Socket("host.example.org", 39544); /* read input from socket */ readerInputStream = new InputStreamReader(socket.getInputStream(), "UTF-8"); readerBuffered = new BufferedReader(readerInputStream); /* POTENTIAL FLAW: Read data using an outbound tcp connection */ String stringNumber = readerBuffered.readLine(); if (stringNumber != null) /* avoid NPD incidental warnings */ { try { data = Integer.parseInt(stringNumber.trim()); } catch(NumberFormatException exceptNumberFormat) { IO.logger.log(Level.WARNING, "Number format exception parsing data from string", exceptNumberFormat); } } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } finally { /* clean up stream reading objects */ try { if (readerBuffered != null) { readerBuffered.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing BufferedReader", exceptIO); } try { if (readerInputStream != null) { readerInputStream.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing InputStreamReader", exceptIO); } /* clean up socket objects */ try { if (socket != null) { socket.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing Socket", exceptIO); } } } return data; } }
[ "bqcuong2212@gmail.com" ]
bqcuong2212@gmail.com
499392a493889c715806e7697105bb9358166172
7d8576d2276f952c466b99eb7ff978fbd3808beb
/src/main/java/com/how2java/tmall/pojo/Order.java
001b5e8321ce615d049605b8980d21111b1501bb
[]
no_license
dayo0107/tmall_ssm_generator
783cac45ad7bdbf3508eb04f4c5fbe616ce5bdce
b64469ae35bc09cc6b27daf421db4067d05c4022
refs/heads/master
2020-03-27T03:23:45.615423
2018-09-12T16:32:18
2018-09-12T16:32:18
145,859,377
0
0
null
null
null
null
UTF-8
Java
false
false
4,215
java
package com.how2java.tmall.pojo; import com.how2java.tmall.service.OrderService; import java.util.Date; import java.util.List; public class Order { private Integer id; private String orderCode; private String address; private String post; private String receiver; private String mobile; private String userMessage; private Date createDate; private Date payDate; private Date deliveryDate; private Date confirmDate; private Integer uid; private String status; /*非数据库字段*/ private List<OrderItem> orderItems; private User user; private float total; private int totalNumber; public String getStatusDesc(){ String desc ="未知"; switch(status){ case OrderService.waitPay: desc="待付款"; break; case OrderService.waitDelivery: desc="待发货"; break; case OrderService.waitConfirm: desc="待收货"; break; case OrderService.waitReview: desc="等评价"; break; case OrderService.finish: desc="完成"; break; case OrderService.delete: desc="刪除"; break; default: desc="未知"; } return desc; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getOrderCode() { return orderCode; } public void setOrderCode(String orderCode) { this.orderCode = orderCode == null ? null : orderCode.trim(); } public String getAddress() { return address; } public void setAddress(String address) { this.address = address == null ? null : address.trim(); } public String getPost() { return post; } public void setPost(String post) { this.post = post == null ? null : post.trim(); } public String getReceiver() { return receiver; } public void setReceiver(String receiver) { this.receiver = receiver == null ? null : receiver.trim(); } public String getMobile() { return mobile; } public void setMobile(String mobile) { this.mobile = mobile == null ? null : mobile.trim(); } public String getUserMessage() { return userMessage; } public void setUserMessage(String userMessage) { this.userMessage = userMessage == null ? null : userMessage.trim(); } public Date getCreateDate() { return createDate; } public void setCreateDate(Date createDate) { this.createDate = createDate; } public Date getPayDate() { return payDate; } public void setPayDate(Date payDate) { this.payDate = payDate; } public Date getDeliveryDate() { return deliveryDate; } public void setDeliveryDate(Date deliveryDate) { this.deliveryDate = deliveryDate; } public Date getConfirmDate() { return confirmDate; } public void setConfirmDate(Date confirmDate) { this.confirmDate = confirmDate; } public Integer getUid() { return uid; } public void setUid(Integer uid) { this.uid = uid; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status == null ? null : status.trim(); } public List<OrderItem> getOrderItems() { return orderItems; } public void setOrderItems(List<OrderItem> orderItems) { this.orderItems = orderItems; } public User getUser() { return user; } public void setUser(User user) { this.user = user; } public float getTotal() { return total; } public void setTotal(float total) { this.total = total; } public int getTotalNumber() { return totalNumber; } public void setTotalNumber(int totalNumber) { this.totalNumber = totalNumber; } }
[ "zhuoanhui@gmail.com" ]
zhuoanhui@gmail.com
872007885f5eab747718ab556e9635d4ba01db38
63b5e372b693fae3554fa7ec968d378ab9f94e41
/sitae/src/main/java/com/cv/xaloc/gse/bl/wsappclient/type/ContentDocumentRequest.java
c48a9cbb7d77e27c9addd8559be2a739ba590fa9
[ "Apache-2.0" ]
permissive
dedalusgs/sitae
42d9fb038b8e42d7cd996b4d55cd3c1f4d01ff40
6f680c789a0693af362d45d94e986cb045a46c9f
refs/heads/master
2021-01-13T11:18:29.907292
2017-03-01T08:22:43
2017-03-01T08:22:43
76,947,262
1
0
null
null
null
null
UTF-8
Java
false
false
8,380
java
/** * ContentDocumentRequest.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.cv.xaloc.gse.bl.wsappclient.type; public class ContentDocumentRequest implements java.io.Serializable { private byte[] content; private java.lang.String name; private java.lang.String mimeType; private com.cv.xaloc.gse.bl.wsappclient.type.Metadata[] arrayOfMetadata; public ContentDocumentRequest() { } public ContentDocumentRequest( byte[] content, java.lang.String name, java.lang.String mimeType, com.cv.xaloc.gse.bl.wsappclient.type.Metadata[] arrayOfMetadata) { this.content = content; this.name = name; this.mimeType = mimeType; this.arrayOfMetadata = arrayOfMetadata; } /** * Gets the content value for this ContentDocumentRequest. * * @return content */ public byte[] getContent() { return content; } /** * Sets the content value for this ContentDocumentRequest. * * @param content */ public void setContent(byte[] content) { this.content = content; } /** * Gets the name value for this ContentDocumentRequest. * * @return name */ public java.lang.String getName() { return name; } /** * Sets the name value for this ContentDocumentRequest. * * @param name */ public void setName(java.lang.String name) { this.name = name; } /** * Gets the mimeType value for this ContentDocumentRequest. * * @return mimeType */ public java.lang.String getMimeType() { return mimeType; } /** * Sets the mimeType value for this ContentDocumentRequest. * * @param mimeType */ public void setMimeType(java.lang.String mimeType) { this.mimeType = mimeType; } /** * Gets the arrayOfMetadata value for this ContentDocumentRequest. * * @return arrayOfMetadata */ public com.cv.xaloc.gse.bl.wsappclient.type.Metadata[] getArrayOfMetadata() { return arrayOfMetadata; } /** * Sets the arrayOfMetadata value for this ContentDocumentRequest. * * @param arrayOfMetadata */ public void setArrayOfMetadata(com.cv.xaloc.gse.bl.wsappclient.type.Metadata[] arrayOfMetadata) { this.arrayOfMetadata = arrayOfMetadata; } public com.cv.xaloc.gse.bl.wsappclient.type.Metadata getArrayOfMetadata(int i) { return this.arrayOfMetadata[i]; } public void setArrayOfMetadata(int i, com.cv.xaloc.gse.bl.wsappclient.type.Metadata _value) { this.arrayOfMetadata[i] = _value; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof ContentDocumentRequest)) return false; ContentDocumentRequest other = (ContentDocumentRequest) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = true && ((this.content==null && other.getContent()==null) || (this.content!=null && java.util.Arrays.equals(this.content, other.getContent()))) && ((this.name==null && other.getName()==null) || (this.name!=null && this.name.equals(other.getName()))) && ((this.mimeType==null && other.getMimeType()==null) || (this.mimeType!=null && this.mimeType.equals(other.getMimeType()))) && ((this.arrayOfMetadata==null && other.getArrayOfMetadata()==null) || (this.arrayOfMetadata!=null && java.util.Arrays.equals(this.arrayOfMetadata, other.getArrayOfMetadata()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = 1; if (getContent() != null) { for (int i=0; i<java.lang.reflect.Array.getLength(getContent()); i++) { java.lang.Object obj = java.lang.reflect.Array.get(getContent(), i); if (obj != null && !obj.getClass().isArray()) { _hashCode += obj.hashCode(); } } } if (getName() != null) { _hashCode += getName().hashCode(); } if (getMimeType() != null) { _hashCode += getMimeType().hashCode(); } if (getArrayOfMetadata() != null) { for (int i=0; i<java.lang.reflect.Array.getLength(getArrayOfMetadata()); i++) { java.lang.Object obj = java.lang.reflect.Array.get(getArrayOfMetadata(), i); if (obj != null && !obj.getClass().isArray()) { _hashCode += obj.hashCode(); } } } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(ContentDocumentRequest.class, true); static { typeDesc.setXmlType(new javax.xml.namespace.QName("urn:castellon:sigex:alfresco:type:v1.0.0", ">ContentDocumentRequest")); org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("content"); elemField.setXmlName(new javax.xml.namespace.QName("urn:castellon:sigex:alfresco:type:v1.0.0", "content")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "base64Binary")); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("name"); elemField.setXmlName(new javax.xml.namespace.QName("urn:castellon:sigex:alfresco:type:v1.0.0", "name")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("mimeType"); elemField.setXmlName(new javax.xml.namespace.QName("urn:castellon:sigex:alfresco:type:v1.0.0", "mimeType")); elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string")); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("arrayOfMetadata"); elemField.setXmlName(new javax.xml.namespace.QName("urn:castellon:sigex:alfresco:type:v1.0.0", "arrayOfMetadata")); elemField.setXmlType(new javax.xml.namespace.QName("urn:castellon:sigex:alfresco:type:v1.0.0", "Metadata")); elemField.setNillable(false); elemField.setMaxOccursUnbounded(true); 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); } }
[ "dvdtello@gmail.com" ]
dvdtello@gmail.com
b5f2862473cdd2eafe7f87e6acf6f8c6d127b617
6d9ab866292db7e117973b7abc5ea68cd61ac988
/app/src/androidTest/java/com/example/ddizoya/cambiosactivitis/ApplicationTest.java
22668089883c32b6a0c834c7da32db72676fb1b8
[]
no_license
ddizoya/CambiosActivitisYFragments
a43953274397657d27fc2da2920641b9c3c80e58
a223978d99668df7e0b59e065e6019b72a241736
refs/heads/master
2021-01-10T11:54:27.543993
2015-12-02T09:53:19
2015-12-02T09:53:19
46,926,819
0
0
null
null
null
null
UTF-8
Java
false
false
367
java
package com.example.ddizoya.cambiosactivitis; import android.app.Application; import android.test.ApplicationTestCase; /** * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a> */ public class ApplicationTest extends ApplicationTestCase<Application> { public ApplicationTest() { super(Application.class); } }
[ "ddizoya@atanasoft04.danielcastelao.org" ]
ddizoya@atanasoft04.danielcastelao.org
c29aa2ce844a28eab446c0c83054bcfe25fbd0df
5bfcb9cdad4f3be59d1570af7ed441b0f200a737
/src/main/java/com/webapp/lora/entity/DeviceDb.java
3a5ea6dc6d45703f1d47ceb9aaec8ebeab5eda9b
[]
no_license
re5pect123/lor2
eda616ea4192a8d37cbf40604bcc1403fd9ab436
193671ff53864901335d9e604292327afd9bae9a
refs/heads/master
2020-04-05T09:51:23.396023
2019-01-15T14:33:14
2019-01-15T14:33:14
156,778,287
0
0
null
null
null
null
UTF-8
Java
false
false
853
java
package com.webapp.lora.entity; import javax.persistence.*; import java.sql.Timestamp; @Entity @Table(name = "device_db") public class DeviceDb { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) int id; String devEUI; String payload_hex; Timestamp time; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getDevEUI() { return devEUI; } public void setDevEUI(String devEUI) { this.devEUI = devEUI; } public String getPayload_hex() { return payload_hex; } public void setPayload_hex(String payload_hex) { this.payload_hex = payload_hex; } public Timestamp getTime() { return time; } public void setTime(Timestamp time) { this.time = time; } }
[ "marko.uljarevic@procescom.com" ]
marko.uljarevic@procescom.com
086072bcd5cda05ec257c4929dc563e996130964
801f14d01ac16144175e0c9f610ed9f6f6203f36
/demo-server-three/src/main/java/com/demo/demoserverthree/DemoServerThreeApplication.java
06c429b63f2e128fc0063a37b9858419bd8543bf
[]
no_license
javazk/CloudDemo
48c4ea9d30a91c06f70c6c3442c6eda4f379da38
671a916ee77ff677e68f55a7cc47c746cc01b14c
refs/heads/master
2020-05-18T05:26:57.626282
2019-05-17T08:15:30
2019-05-17T08:15:30
184,207,330
0
0
null
null
null
null
UTF-8
Java
false
false
435
java
package com.demo.demoserverthree; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.netflix.eureka.EnableEurekaClient; @SpringBootApplication @EnableEurekaClient public class DemoServerThreeApplication { public static void main(String[] args) { SpringApplication.run(DemoServerThreeApplication.class, args); } }
[ "1142453367@qq.com" ]
1142453367@qq.com
8fd69747eaa6806ce2f24e071b708851e424372b
b51e7e73026f3f6381b7e36bad77876ce47f712b
/application forms/abn amro/bank/JMSBankFrame.java
11e129af56b639d900418d2f28116e53e5408fcc
[]
no_license
miltonvandesanden/DPI6
fa6a68da9c1b27797f7f2c99db191b1b6c600feb
1bf8871c97ea3660efa366c7f558745a9f30330d
refs/heads/master
2020-04-21T07:04:57.890647
2019-02-06T10:44:15
2019-02-06T10:44:15
169,383,270
0
0
null
null
null
null
UTF-8
Java
false
false
3,786
java
package bank; import java.awt.EventQueue; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.DefaultListModel; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JList; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextField; import javax.swing.border.EmptyBorder; import model.bank.*; import messaging.requestreply.RequestReply; public class JMSBankFrame extends JFrame { private static final long serialVersionUID = 1L; private JPanel contentPane; private JTextField tfReply; private DefaultListModel<RequestReply<BankInterestRequest, BankInterestReply>> listModel = new DefaultListModel<>(); /** * Launch the application. */ public static void main(String[] args) { EventQueue.invokeLater ( () -> { try { JMSBankFrame frame = new JMSBankFrame(); frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } ); } /** * Create the frame. */ public JMSBankFrame() { setTitle("JMS Bank - ABN AMRO"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setBounds(100, 100, 450, 300); contentPane = new JPanel(); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); setContentPane(contentPane); GridBagLayout gbl_contentPane = new GridBagLayout(); gbl_contentPane.columnWidths = new int[]{46, 31, 86, 30, 89, 0}; gbl_contentPane.rowHeights = new int[]{233, 23, 0}; gbl_contentPane.columnWeights = new double[]{1.0, 0.0, 1.0, 0.0, 0.0, Double.MIN_VALUE}; gbl_contentPane.rowWeights = new double[]{1.0, 0.0, Double.MIN_VALUE}; contentPane.setLayout(gbl_contentPane); JScrollPane scrollPane = new JScrollPane(); GridBagConstraints gbc_scrollPane = new GridBagConstraints(); gbc_scrollPane.gridwidth = 5; gbc_scrollPane.insets = new Insets(0, 0, 5, 5); gbc_scrollPane.fill = GridBagConstraints.BOTH; gbc_scrollPane.gridx = 0; gbc_scrollPane.gridy = 0; contentPane.add(scrollPane, gbc_scrollPane); JList<RequestReply<BankInterestRequest, BankInterestReply>> list = new JList<>(listModel); scrollPane.setViewportView(list); JLabel lblNewLabel = new JLabel("type reply"); GridBagConstraints gbc_lblNewLabel = new GridBagConstraints(); gbc_lblNewLabel.anchor = GridBagConstraints.EAST; gbc_lblNewLabel.insets = new Insets(0, 0, 0, 5); gbc_lblNewLabel.gridx = 0; gbc_lblNewLabel.gridy = 1; contentPane.add(lblNewLabel, gbc_lblNewLabel); tfReply = new JTextField(); GridBagConstraints gbc_tfReply = new GridBagConstraints(); gbc_tfReply.gridwidth = 2; gbc_tfReply.insets = new Insets(0, 0, 0, 5); gbc_tfReply.fill = GridBagConstraints.HORIZONTAL; gbc_tfReply.gridx = 1; gbc_tfReply.gridy = 1; contentPane.add(tfReply, gbc_tfReply); tfReply.setColumns(10); JButton btnSendReply = new JButton("send reply"); btnSendReply.addActionListener ( e -> { RequestReply<BankInterestRequest, BankInterestReply> rr = list.getSelectedValue(); double interest = Double.parseDouble((tfReply.getText())); BankInterestReply reply = new BankInterestReply(interest,"ABN AMRO"); if (rr!= null && reply != null) { rr.setReply(reply); list.repaint(); // todo: sent JMS message with the reply to Loan Broker } } ); GridBagConstraints gbc_btnSendReply = new GridBagConstraints(); gbc_btnSendReply.anchor = GridBagConstraints.NORTHWEST; gbc_btnSendReply.gridx = 4; gbc_btnSendReply.gridy = 1; contentPane.add(btnSendReply, gbc_btnSendReply); } }
[ "milton.vandesanden@gmail.com" ]
milton.vandesanden@gmail.com
23c808245640f159e57f8017ba03b607e20b2cf1
5e7c62c1940e9454f3fea7120eeb9e19354d5aac
/src/main/java/org/tuckey/web/filters/urlrewrite/RewrittenUrlClass.java
556833e9d9d6662cb79e89ac06ab5f5e2d9693b8
[ "BSD-3-Clause" ]
permissive
paultuckey/urlrewritefilter
554556a0636f90973376fd68693faa986dd100d3
2a672cd260a1f36088a5e6f2afbf6c808fc3b016
refs/heads/main
2023-08-28T18:28:13.578228
2023-07-17T22:52:35
2023-07-17T22:52:35
38,586,425
362
167
NOASSERTION
2023-07-17T22:52:37
2015-07-05T22:25:22
Java
UTF-8
Java
false
false
2,890
java
/** * Copyright (c) 2005-2023, Paul Tuckey * All rights reserved. * ==================================================================== * Licensed under the BSD License. Text as follows. * <p> * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * <p> * - Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * - Redistributions in binary form must reproduce the above * copyright notice, this list of conditions and the following * disclaimer in the documentation and/or other materials provided * with the distribution. * - Neither the name tuckey.org nor the names of its contributors * may be used to endorse or promote products derived from this * software without specific prior written permission. * <p> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * ==================================================================== */ package org.tuckey.web.filters.urlrewrite; import org.tuckey.web.filters.urlrewrite.extend.RewriteMatch; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; import jakarta.servlet.FilterChain; import jakarta.servlet.ServletException; import java.io.IOException; /** * A rewrite target that is acually rewriting the url to a class a user has specified. */ class RewrittenUrlClass implements RewrittenUrl { RewriteMatch rewriteMatch; private String matchingUrl; protected RewrittenUrlClass(RewriteMatch rewriteMatch) { this.matchingUrl = rewriteMatch.getMatchingUrl(); this.rewriteMatch = rewriteMatch; } public boolean doRewrite(final HttpServletRequest hsRequest, final HttpServletResponse hsResponse, final FilterChain chain) throws IOException, ServletException { return rewriteMatch.execute(hsRequest, hsResponse); } public String getTarget() { return matchingUrl; } }
[ "paul@tuckey.org" ]
paul@tuckey.org
07d7f5fa19ad2b8d83859dad932817a8655c0874
38c4451ab626dcdc101a11b18e248d33fd8a52e0
/identifiers/lucene-3.6.2/core/src/java/org/apache/lucene/index/TermInfo.java
4711506b8efe369b2ef785a51df695644326bdf1
[]
no_license
habeascorpus/habeascorpus-data
47da7c08d0f357938c502bae030d5fb8f44f5e01
536d55729f3110aee058ad009bcba3e063b39450
refs/heads/master
2020-06-04T10:17:20.102451
2013-02-19T15:19:21
2013-02-19T15:19:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,106
java
org PACKAGE_IDENTIFIER false apache PACKAGE_IDENTIFIER false lucene PACKAGE_IDENTIFIER false index PACKAGE_IDENTIFIER false TermInfo TYPE_IDENTIFIER true docFreq VARIABLE_IDENTIFIER true freqPointer VARIABLE_IDENTIFIER true proxPointer VARIABLE_IDENTIFIER true skipOffset VARIABLE_IDENTIFIER true TermInfo METHOD_IDENTIFIER false TermInfo METHOD_IDENTIFIER false df VARIABLE_IDENTIFIER true fp VARIABLE_IDENTIFIER true pp VARIABLE_IDENTIFIER true docFreq VARIABLE_IDENTIFIER false df VARIABLE_IDENTIFIER false freqPointer VARIABLE_IDENTIFIER false fp VARIABLE_IDENTIFIER false proxPointer VARIABLE_IDENTIFIER false pp VARIABLE_IDENTIFIER false TermInfo METHOD_IDENTIFIER false TermInfo TYPE_IDENTIFIER false ti VARIABLE_IDENTIFIER true docFreq VARIABLE_IDENTIFIER false ti VARIABLE_IDENTIFIER false docFreq VARIABLE_IDENTIFIER false freqPointer VARIABLE_IDENTIFIER false ti VARIABLE_IDENTIFIER false freqPointer VARIABLE_IDENTIFIER false proxPointer VARIABLE_IDENTIFIER false ti VARIABLE_IDENTIFIER false proxPointer VARIABLE_IDENTIFIER false skipOffset VARIABLE_IDENTIFIER false ti VARIABLE_IDENTIFIER false skipOffset VARIABLE_IDENTIFIER false set METHOD_IDENTIFIER true docFreq VARIABLE_IDENTIFIER true freqPointer VARIABLE_IDENTIFIER true proxPointer VARIABLE_IDENTIFIER true skipOffset VARIABLE_IDENTIFIER true docFreq VARIABLE_IDENTIFIER false docFreq VARIABLE_IDENTIFIER false freqPointer VARIABLE_IDENTIFIER false freqPointer VARIABLE_IDENTIFIER false proxPointer VARIABLE_IDENTIFIER false proxPointer VARIABLE_IDENTIFIER false skipOffset VARIABLE_IDENTIFIER false skipOffset VARIABLE_IDENTIFIER false set METHOD_IDENTIFIER true TermInfo TYPE_IDENTIFIER false ti VARIABLE_IDENTIFIER true docFreq VARIABLE_IDENTIFIER false ti VARIABLE_IDENTIFIER false docFreq VARIABLE_IDENTIFIER false freqPointer VARIABLE_IDENTIFIER false ti VARIABLE_IDENTIFIER false freqPointer VARIABLE_IDENTIFIER false proxPointer VARIABLE_IDENTIFIER false ti VARIABLE_IDENTIFIER false proxPointer VARIABLE_IDENTIFIER false skipOffset VARIABLE_IDENTIFIER false ti VARIABLE_IDENTIFIER false skipOffset VARIABLE_IDENTIFIER false
[ "pschulam@gmail.com" ]
pschulam@gmail.com
ee74957d915c57676c026161249cd1c1044f4de9
663f24b8829e6d673e136e1b88c596cc2e651acb
/src/ru/geekbrains/erp/DAO/PlanDAO.java
7d546daed4e110c978166947d7fa95ea85fbe389
[]
no_license
Valerych-gif/Patterns
95636d0d063073bddde1007123d4b60759a26cc0
8ede15a3dd0ebe2fc24d26c756398b0b304368cf
refs/heads/master
2023-02-02T19:36:31.560932
2020-12-09T15:39:48
2020-12-09T15:39:48
313,298,975
0
0
null
2020-12-10T16:20:04
2020-11-16T12:43:56
Java
UTF-8
Java
false
false
1,847
java
package ru.geekbrains.erp.DAO; import ru.geekbrains.erp.Plan; import ru.geekbrains.erp.Task; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class PlanDAO extends EntityDAO{ private static final String PLANS_TABLE_NAME = "plans"; private static final String ID_COLUMN_NAME = "id"; private static final String TITLE_COLUMN_NAME = "title"; private static final String STATUS_COLUMN_NAME = "status"; public PlanDAO() { super(); } public void insertPlan(Plan plan){ if (plan == null || plan.getTitle()== null) { return; } String sql = "INSERT INTO `" + PLANS_TABLE_NAME + "` " + "(`" + TITLE_COLUMN_NAME + "`, `" + STATUS_COLUMN_NAME + "`)" + " VALUES " + "('" + plan.getTitle() + "', '" + Plan.Status.NEW.getStatusName() + "')"; try (Statement statement = connection.createStatement()) { statement.execute(sql); } catch (SQLException e) { e.printStackTrace(); } } public Plan getPlanById(long id) { return null; } public Plan getPlanByTitle(String title) { Plan plan = null; String sql = "SELECT * FROM `" + PLANS_TABLE_NAME + "` WHERE `" + TITLE_COLUMN_NAME + "`='" + title + "'"; try (Statement statement = connection.createStatement()) { ResultSet rs = statement.executeQuery(sql); if (rs.next()) { plan = new Plan( rs.getLong(ID_COLUMN_NAME), rs.getString(TITLE_COLUMN_NAME)); } } catch (SQLException e){ e.printStackTrace(); } return plan; } public void updatePlan(Plan plan) { } public void deletePlan(int id) { } }
[ "muzaccord@gmail.com" ]
muzaccord@gmail.com
8ccaed1997df44da6c47514ae9a620e131339715
db8a8bc86cb0d6a41f3595cce56c38a50ba00be0
/app/src/main/java/com/malong/sample/TestActivity.java
4b5b00eee325edceb8cef1177ac9c92be07470aa
[]
no_license
maxiaobu1999/DownloadAndroid
43649fba0a10424fafd0b198f6170d09efa6be66
033fc23e8726bca5188815aa11667b06d73420e4
refs/heads/master
2022-11-25T21:54:51.068832
2020-08-05T08:49:28
2020-08-05T08:49:28
277,808,400
2
0
null
null
null
null
UTF-8
Java
false
false
2,966
java
package com.malong.sample; import android.content.Context; import android.content.Intent; import android.database.ContentObserver; import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.util.Log; import androidx.appcompat.app.AppCompatActivity; import com.malong.moses.Constants; import com.malong.moses.Download; import com.malong.moses.DownloadService; import com.malong.moses.Request; import com.malong.moses.ProviderHelper; import com.malong.moses.utils.FileUtils; import com.malong.moses.utils.Utils; import java.io.File; public class TestActivity extends AppCompatActivity { public static final String TAG = "【TestActivity】"; private Context mContext; private ContentObserver mObserver; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_test); mContext = this; Intent intent = new Intent(); intent.setClass(mContext, DownloadService.class); mContext.startService(intent); mObserver = new ContentObserver(new Handler()) { @Override public void onChange(boolean selfChange, Uri uri) { super.onChange(selfChange, uri); Log.d(TAG, "onChange()" + uri.toString()); Log.d(TAG, "onChange()queryProcess=" + ProviderHelper.queryProcess(mContext,uri)); // Log.d(TAG, "onChange():queryStatus=" + DownloadManager.queryStatus(mContext,uri)); } }; findViewById(R.id.button).setOnClickListener(v -> { String pagkage = mContext.getPackageName(); String CONTENT_AUTHORITY = pagkage + ".downloads"; Uri BASE_CONTENT_URI = Uri.parse("content://" + CONTENT_AUTHORITY);// content://com.malong.downloadsample.downloads // String downloadUrl = Constants.BASE_URL+Constants.ZHU_XIAN_NAME; String downloadUrl = Constants.BASE_URL+Constants.TIK_NAME; String fileName = FileUtils.getFileNameFromUrl(downloadUrl); String filePath = mContext.getFilesDir() + File.separator + fileName;// /data/user/0/com.malong.downloadsample/files // 增 Request info = new Request(); info.status = Request.STATUS_PENDING; info. download_url= downloadUrl; info.destination_path = filePath; info.fileName = fileName; info.method = Request.METHOD_BREAKPOINT; int downloadId= Download.doDownload(mContext, info); getContentResolver().registerContentObserver(Utils.generateDownloadUri( mContext,downloadId), false, mObserver); }); findViewById(R.id.stop).setOnClickListener(v -> { Intent intent1 = new Intent(); intent1.setClass(mContext, DownloadService.class); mContext.stopService(intent1); }); } }
[ "v_maqinglong@baidu.com" ]
v_maqinglong@baidu.com
948cdb5245a3c3be4137ed81c7b55031c41b0162
8baf6d5a65a7308fff4408c59ed797768e3eea22
/src/test/ConsProBenchmarkRunner.java
69741b28547c63021385878909b58c0764c92e01
[]
no_license
mengxi-chen/PHAULR
6d987179d03af87eb1da4ceb604076c51a847a64
11060de208b3997f357d1a1ed375e2ea0d1380d2
refs/heads/master
2021-05-27T07:35:54.829879
2014-11-14T08:52:13
2014-11-14T08:52:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,324
java
package test; import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingDeque; import messaging.message.IPMessage; import communication.Configuration; public class ConsProBenchmarkRunner { private int total_requests; private int rate; private int write_ratio; /** * @param total_requests total number of requests * @param rate the rate in which requests are generated and arrive * @param write_ratio the ratio of write requests in percentage */ public ConsProBenchmarkRunner(int total_requests, int rate, int write_ratio) { this.total_requests = total_requests; this.rate = rate; this.write_ratio = write_ratio; } public void GenerateBenchmark() { BlockingQueue<IPMessage> request_queue = new LinkedBlockingDeque<>(); new Thread(new PoissonWorkloadGenerator(request_queue, this.total_requests, this.rate, this.write_ratio)).start(); try { Thread.sleep(1000); } catch (InterruptedException ie) { ie.printStackTrace(); } new Thread(new ClientWithWorkload(request_queue, this.total_requests)).start(); } public void start() { // Configuration.INSTANCE.configSystem(); this.GenerateBenchmark(); } public static void main(String[] args) { Configuration.INSTANCE.configSystem(); new ConsProBenchmarkRunner(10000, 20, 90).start(); } }
[ "1102" ]
1102
815d2a052594d536dd572dc1df0a45ba0386a3a5
ddea8173323ac30db7f605fdc48de5452691048a
/src/testCases/Planner.java
33ce1d80082ebc029a90ac4e1965d20426ac33b9
[]
no_license
Hybrent-QA/Hybrent-Web
c4ab4cf2647fdd0f7013fd3058aefe71c1740369
502cd2391c9009e4df6dc73cb2906b5bd2ed0e9f
refs/heads/master
2020-03-24T20:37:38.653183
2018-08-01T10:03:22
2018-08-01T10:03:22
142,988,347
0
0
null
null
null
null
UTF-8
Java
false
false
3,532
java
package testCases; import java.io.File; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.Parameters; import org.testng.annotations.Test; import com.relevantcodes.extentreports.ExtentReports; import pageObject.Loginpage; import pageObject.PrefcardPageObject; import AutomationFramework.ApplicationKeyword; import AutomationFramework.Generickeywords; import AutomationFramework.OR; public class Planner extends ApplicationKeyword { public static String fullName; @Parameters({"siteName", "siteUrl"}) @BeforeTest public void startReport(String siteName, String siteUrl) { try { Loginpage.URL=siteUrl + "#/login/"; Generickeywords.SITENAME=siteName; Generickeywords.DashBoardURL=siteUrl + "#/dashboard"; String folderPath=OutputDirectory + "/" + siteName; File directory = new File(folderPath); if (! directory.exists()){ directory.mkdir(); // If you require it to make the entire directory path including parents, // use directory.mkdirs(); here instead. } extent = new ExtentReports(folderPath+"/planner.html", true); // extent.addSystemInfo("Environment","Environment Name") extent.addSystemInfo("User Name", "Ravneet"); extent.loadConfig(new File(System.getProperty("user.dir") + "/extent-config.xml")); } catch (Exception e) { System.out.println("--Start REPORT-Cases-Error---" + e.toString()); } } @Test public void Tc_Planner_01() throws InterruptedException { testStarts("Tc_Planner_01", "Verify that user can add patient using Add Patient option."); Loginpage.OpenBrowserAndLogin(); System.out.println("Tc_Planner_01"); PrefcardPageObject.plannerPageLinkandwait(); String facility_Name=getText(OR.Patient_getfacilityName); clickOn(OR.Planner_createPatient); //verifyElementText(OR.Planner_popUpText, "Create Patient "); String firstName="Test1"; String lastName="Patient1"; typeIn(OR.Patient_firstName, firstName); //typeIn(OR.Patient_middleName, "Pat"); typeIn(OR.Patient_lastName, lastName); typeIn(OR.Patient_mrnNumber, "00001"); typeIn(OR.Patient_accNumber, "465000"); typeIn(OR.Patient_dob, "11112017"); clickOn(OR.Patient_facDropDown); WebElement elem=driver.findElement(By.xpath("//li[@class='ui-select-choices-group']//span[text()='"+facility_Name+"']")); elem.click(); clickOn(OR.Planner_AddPatient); Thread.sleep(4000); //waitForElementToDisplayWithoutFail(OR.Patient_firstPatient, 10); PrefcardPageObject.patientsPageLinkandwait(); typeIn(OR.Patient_searchTextBox, firstName+" "+lastName); clickOn(OR.Patient_searchbutton); waitForElementToDisplayWithoutFail(OR.Patient_firstPatient, 20); verifyElement(OR.Patient_firstPatient); String patientName=getText(OR.Patient_firstPatient); String finalName=patientName.substring(2).trim(); if(finalName.equals(firstName+" "+lastName)) { testLogPass("New Patient is added"); } else { testLogFail("New Patient is not added"); } } @Test public void Tc_Planner_02() { testStarts("Tc_Planner_02", "Verify that case can be created by clicking on the calendar vie."); System.out.println("Tc_Planner_01"); NavigateUrl(DashBoardURL); PrefcardPageObject.plannerPageLinkandwait(); clickOn(OR.Planner_datatime630); verifyElementText(OR.Planner_createCaseHeading, "Schedule Case -"); } @AfterTest public void endReport() { closeBrowser(); extent.flush(); } }
[ "Hari14cs@gmail.com" ]
Hari14cs@gmail.com
d05f4ab81748ca6ddb17a252d64e139ddbb0aa78
a59e619c8f96a8a059ed765b13e7ab878fca1e31
/src/test/java/org/springframework/data/jdbc/domain/movie/AmountDiscountStrategy.java
1c7dccbed2c84adb49d9dd132bd7d69ec7111e4f
[ "Apache-2.0" ]
permissive
jihwan/spring-data-jdbc
d687a42b6611c00af8c2abb4fed1130aa944c1c6
12171b869328302fe934c8ea83aff0b4243556f8
refs/heads/master
2021-01-01T05:06:07.149987
2016-06-08T02:11:00
2016-06-08T02:11:00
57,183,788
2
0
null
null
null
null
UTF-8
Java
false
false
234
java
package org.springframework.data.jdbc.domain.movie; public class AmountDiscountStrategy extends DiscountSupport { Money discountAmount; @Override protected Money getDiscountFee(Showing showing) { return discountAmount; } }
[ "zhwan.hwang@gmail.com" ]
zhwan.hwang@gmail.com
f181c4718a61de28c129bb46cef00c2f4b8542fd
94e08513d1d4a2d0f29c85daba9dfc950c67295e
/lib/src/net/sf/jasperreports/web/util/DefaultWebRequestContext.java
d69e5648e7842314d2a859f188b8a279cb6c1fa0
[]
no_license
Rocky28/Assemble
20fd38f8e303459a6ccfc0665287043a0bfd486f
28c8d9b89c41c10137670c76f1b9e179674857c6
refs/heads/master
2020-04-18T03:45:02.699210
2014-09-01T15:54:50
2014-09-01T15:54:50
23,326,051
1
0
null
null
null
null
UTF-8
Java
false
false
1,959
java
/* * JasperReports - Free Java Reporting Library. * Copyright (C) 2001 - 2013 Jaspersoft Corporation. All rights reserved. * http://www.jaspersoft.com * * Unless you have purchased a commercial license agreement from Jaspersoft, * the following license terms apply: * * This program is part of JasperReports. * * JasperReports is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * JasperReports is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with JasperReports. If not, see <http://www.gnu.org/licenses/>. */ package net.sf.jasperreports.web.util; import javax.servlet.http.HttpServletRequest; import net.sf.jasperreports.engine.JasperReportsContext; /** * @author Lucian Chirita (lucianc@users.sourceforge.net) * @version $Id: DefaultWebRequestContext.java 6853 2014-01-30 16:32:58Z lucianc $ */ public class DefaultWebRequestContext implements WebRequestContext { private JasperReportsContext jasperReportsContext; private HttpServletRequest request; @Override public JasperReportsContext getJasperReportsContext() { return jasperReportsContext; } public HttpServletRequest getRequest() { return request; } public void setJasperReportsContext(JasperReportsContext jasperReportsContext) { this.jasperReportsContext = jasperReportsContext; } public void setRequest(HttpServletRequest request) { this.request = request; } @Override public String getRequestContextPath() { return request == null ? null : request.getContextPath(); } }
[ "sinha.aot@gmail.com" ]
sinha.aot@gmail.com
7191e3afe90cc70d043951db33610a0d472b8555
f706b7f221cc0dc7a562d2683095abb66b035471
/examples/polyglot-zipkin/java-dropwizard/src/main/java/org/hawkular/apm/example/dropwizard/AppConfiguration.java
5adee2386c3db93e2631e37e77ba12fff034100e
[ "Apache-2.0" ]
permissive
mumutu/hawkular-apm
fff8383ec30db026bf8c371414eadacdce43ea0e
904565ff68bdd7d44c3603447d83d60031e8e59c
refs/heads/master
2021-01-24T10:09:26.396847
2016-09-22T10:24:05
2016-09-22T10:24:05
68,891,909
1
0
null
2016-09-22T06:35:04
2016-09-22T06:35:04
null
UTF-8
Java
false
false
1,597
java
/* * Copyright 2015-2016 Red Hat, Inc. and/or its affiliates * and other contributors as indicated by the @author tags. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.hawkular.apm.example.dropwizard; import javax.validation.Valid; import javax.validation.constraints.NotNull; import com.fasterxml.jackson.annotation.JsonProperty; import com.smoketurner.dropwizard.zipkin.LoggingZipkinFactory; import com.smoketurner.dropwizard.zipkin.ZipkinFactory; import com.smoketurner.dropwizard.zipkin.client.ZipkinClientConfiguration; import io.dropwizard.Configuration; /** * @author Pavol Loffay */ public class AppConfiguration extends Configuration { @Valid @NotNull public final ZipkinFactory zipkin = new LoggingZipkinFactory(); @Valid @NotNull private final ZipkinClientConfiguration zipkinClient = new ZipkinClientConfiguration(); @JsonProperty public ZipkinFactory getZipkinFactory() { return zipkin; } @JsonProperty public ZipkinClientConfiguration getZipkinClient() { return zipkinClient; } }
[ "ploffay@redhat.com" ]
ploffay@redhat.com
9f7526c6990da37c83741dbd0570937a093e45dd
8df98defb248c49324f1cfa54dc44d43556a187c
/src/Proje/Arama.java
28699727b6270ca2ef391d1ed6d26d28bd5d5659
[]
no_license
fatihhduygu/HashTableUsage
037c217558a24710519f0477ce0fc51e0d64d56a
c352ddaccb70f3b7e6bb012ffc2ba2c4c84ef21c
refs/heads/master
2021-09-09T01:52:59.533288
2018-03-13T08:02:06
2018-03-13T08:02:06
null
0
0
null
null
null
null
ISO-8859-16
Java
false
false
4,100
java
package Proje; import java.io.File; import java.io.FileReader; import java.io.BufferedReader; import java.util.Scanner; public class Arama { public static int[] hucre=new int[211]; //--------------------------------------------------------------------------------------// public static int ascii(String ad) { int Toplam = 0; int uzunluk=ad.length(); for(int i=0; i<uzunluk; i++) { char karakter=ad.charAt(i); int ascii=(int) karakter; Toplam +=Math.pow((i+1), 4)*ascii; } return Toplam; } //--------------------------------------------------------------------------------------// public static void dosyaOku() { File kayit=new File("kelimeler.txt"); try{ FileReader dosyaOku=new FileReader(kayit); String kucultme; BufferedReader dosya=new BufferedReader(dosyaOku); while((kucultme=dosya.readLine())!=null){ kucultme=kucultme.toLowerCase(); int mod1=0; int mod2=0; mod1=ascii(kucultme) % 212; if(hucre[mod1] == 0) { hucre[mod1]=ascii(kucultme); } else { for(int i=0; i<hucre.length; i++) { mod2=((i*i)+mod1) % 212; if(hucre[mod2]==0) { hucre[mod2]=ascii(kucultme); break; } } } } dosya.close(); } catch(Exception e){ e.printStackTrace(); } } //--------------------------------------------------------------------------------------// public static void arama(String ad) { int toplam=ascii(ad); int sayac=0; for(int i=0; i<hucre.length; i++) { if(toplam==hucre[i]) { System.out.println("Aradęginiz Kelime Bulunmustur"); sayac++; } } if(sayac==0) { System.out.println("Aradiginiz kelime Bulunamamistir!!!\n"); yerDegistirerekArama(ad); eksilterekArama(ad); } } //--------------------------------------------------------------------------------------// public static void yerDegistirerekArama(String ad) { char[] dizi=ad.toCharArray(); char a=' '; int toplam=0; for(int i=0; i<ad.length()-1; i++) { a=dizi[i]; dizi[i]=dizi[i+1]; dizi[i+1]=a; String temp=new String (dizi); for(int j=0; j<hucre.length; j++) { toplam=ascii(temp); if(toplam==hucre[j]) { System.out.print(temp); System.out.println(" mi demek istediniz ? \n"); } } dizi=ad.toCharArray(); } } //--------------------------------------------------------------------------------------// public static void eksilterekArama(String ad) { for(int i=0; i<ad.length(); i++) { char[] dizi=ad.toCharArray(); int toplam=0; for(int j=i; j<ad.length()-1; j++) { dizi[j]=dizi[j+1]; dizi[j+1]='\0'; } String temp=new String(dizi); for(int j=0; j<hucre.length; j++) { toplam=ascii(temp); if(toplam==hucre[j]) { System.out.println("\nyoksa \n"); System.out.print(temp); System.out.println(" mi demek istediniz ?"); } } } } //--------------------------------------------------------------------------------------// public static void main(String[] args) { Arama ara=new Arama(); Scanner oku=new Scanner(System.in); System.out.println(" _______ ______ _______ _______ _______ _______ _____ _______ _____ ______ _ _"); System.out.println(" |_____| |_____/ |_____| | | | |_____| | | | | | | | | |_____/ | |"); System.out.println(" | | | \\_ | | | | | | | | | | |_____| | |_____| | \\_ |_____|"); System.out.println(" ________________________________________________________________________________________________________________"); System.out.println("| |"); System.out.print(" "); String ad=oku.nextLine(); System.out.println("|________________________________________________________________________________________________________________| \n"); dosyaOku(); arama(ad); } }
[ "fatih_duygu@hotmail.com" ]
fatih_duygu@hotmail.com
d90270ac02d39e6d46a41f97471a83262afc02ff
47851346e105eb1a4c0359603f3257450089bce6
/src/test/java/Pages/PolymerPage.java
40b4ab4e10ef0e431315b6c63ab9fe6405505713
[]
no_license
sinanaltuntas/Lingoda_QA_Task
75d843f6b5cbc242c1e87c1ecbed05384373341a
a9b8fbe86772bebaa59b9ca995d7d59241a99bd1
refs/heads/master
2023-03-05T16:06:10.806027
2021-02-18T19:04:08
2021-02-18T19:04:08
340,149,513
0
0
null
null
null
null
UTF-8
Java
false
false
376
java
package Pages; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; public class PolymerPage extends BasePage{ @FindBy(css = "[id='new-todo']") public WebElement todoAddBox; @FindBy(xpath = "(//label[@class='style-scope td-item'])[2]") public WebElement secondItem; @FindBy(id = "edit") public WebElement editItem; }
[ "sinanaltuntas.tester@gmail.com" ]
sinanaltuntas.tester@gmail.com
ec893af64b13f61fc2eb27a373116df40c5055be
cd066aa3e4122a944cfea92ad6d2a42a5001941e
/mainmodule/src/main/java/com/sxr/com/mainmodule/fragment/CircleFragment.java
3ce1c049f83d0a1a1c8303e189352c65ee4181a6
[]
no_license
sxrCode/adselflx1
b9c57616c619779ecae0dd1ecbb09ef67d42482c
9cd981237092222185c098563e88276ac39d5dd2
refs/heads/master
2021-10-10T18:41:04.704584
2019-01-15T12:15:34
2019-01-15T12:15:34
110,767,959
0
0
null
null
null
null
UTF-8
Java
false
false
762
java
package com.sxr.com.mainmodule.fragment; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.sxr.com.mainmodule.R; import com.sxr.com.mainmodule.view.CircleView; public class CircleFragment extends Fragment { private CircleView mCircleView; @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_circle, container, false); mCircleView = view.findViewById(R.id.circle); mCircleView.setRate(80); return view; } }
[ "maricle01@163.com" ]
maricle01@163.com
61139f8dce23b4dc028bc67f69f3fb1af0944d3c
0fe1edbb071f01ace58e190b66d94c77a1588e58
/src/main/java/com/learn/algo/graph/GraphApplication.java
88787d45c05cf079f7514dffab6d01d72d99d69c
[]
no_license
ravindraAmbati/graph
3832e6b4fbbd3d247134a8064e6b2cd434e58b41
3fe6704fefd14278d03ddafdeb7879790ce85eaf
refs/heads/master
2022-12-18T19:25:43.148219
2020-09-05T04:53:17
2020-09-05T04:53:17
283,825,427
0
0
null
null
null
null
UTF-8
Java
false
false
311
java
package com.learn.algo.graph; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class GraphApplication { public static void main(String[] args) { SpringApplication.run(GraphApplication.class, args); } }
[ "ravindra.reddy.ambati@outlook.in" ]
ravindra.reddy.ambati@outlook.in
d5c11e690d5fb37f81f6fde980cb8c0673d12718
4d188854bc8dd64499ee0377863e668b4d02a2f4
/src/test/java/com/restapi/service/NewspaperServiceTest.java
1bcc1ad1b04ff259615a246b448654eef0a5c61f
[]
no_license
analiahojman/javaProgramming
b2fd52206f099dd8c65db3e9f848ebae9273a484
3e222d1d84b447866c1a284484d873c24895f223
refs/heads/master
2021-01-01T17:42:14.756084
2015-05-17T17:59:18
2015-05-17T17:59:18
29,763,227
0
0
null
null
null
null
UTF-8
Java
false
false
3,212
java
package com.restapi.service; import static org.junit.Assert.assertFalse; import static org.mockito.Matchers.any; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.verifyNoMoreInteractions; import static org.mockito.Mockito.when; import java.util.ArrayList; import java.util.Date; import org.junit.Before; import org.junit.Test; import com.restapi.model.Newspaper; import com.restapi.model.Post; import com.restapi.repository.NewspaperRepository; import com.restapi.repository.PostRepository; /** * This class tests all the newspaper services * @author analia.hojman */ public class NewspaperServiceTest { private NewspaperRepository newspaperRepositoryMock; private PostRepository postRepositoryMock; private NewspaperService newspaperService; @Before public void setUp() { newspaperRepositoryMock = mock(NewspaperRepository.class); postRepositoryMock = mock(PostRepository.class); newspaperService = new NewspaperService(newspaperRepositoryMock,postRepositoryMock); } /** * This test verifies that a new newspaper was created and saved */ @Test public void addNewNewspaper() { when(newspaperRepositoryMock.save(any(Newspaper.class))).thenReturn(new Newspaper()); newspaperService.create(new Newspaper()); //verify that the newspaper repository has performed a save action to grab the new newspaper verify(newspaperRepositoryMock).save(any(Newspaper.class)); verifyNoMoreInteractions(newspaperRepositoryMock); } /** * This test verifies that a new post was added to a newspaper */ @Test public void addPostToNewspaper() { Newspaper newspaper = new Newspaper("Newspaper Name", "One Editorial Name", new Date(), new ArrayList<Post>()); when(newspaperRepositoryMock.save(any(Newspaper.class))).thenReturn(newspaper); when(newspaperRepositoryMock.findById(any(Long.class))).thenReturn(newspaper); when(postRepositoryMock.save(any(Post.class))).thenReturn(new Post()); newspaperService.addPost(new Long(1), any(Post.class)); //verify that the post repository has performed a save action to grab the new post verify(postRepositoryMock).save(any(Post.class)); //verify that the newspaper repository has performed a save action to grab the newspaper with new post verify(newspaperRepositoryMock).save(any(Newspaper.class)); //verify that the newspaper list of posts is not empty assertFalse(newspaper.getPosts().isEmpty()); } /** * This test verifies that two new newspapers were created and saved */ @Test public void addTwoNewNewspapers(){ when(newspaperRepositoryMock.save(any(Newspaper.class))).thenReturn(new Newspaper()); // Create first newspaper newspaperService.create(new Newspaper("newspaper1", "editorial1", new Date())); // Create second newspaper newspaperService.create(new Newspaper("newspaper2", "editorial2", new Date())); //verify that the newspaper repository has performed two times the save action to grab both newspapers verify(newspaperRepositoryMock, times(2)).save(any(Newspaper.class)); verifyNoMoreInteractions(newspaperRepositoryMock); } }
[ "afh@AFHs-MacBook-Pro.local" ]
afh@AFHs-MacBook-Pro.local
2dd33db1951f307711669d3cae443b9750d83c7b
2f04e6ab1180569308b42dcba09d96bebd7e4bbd
/app/src/main/java/com/barefoot/easypass/GSS1103.java
9b31f113083a9dcac69d8fc16da306845a801edd
[]
no_license
VershimaKelvin/EasyPass
3bd121a57b5065d51b6a5cfc7a639dfa29c9d6c8
972f296a6662dfaa84535f85b36548832bff391d
refs/heads/master
2020-09-23T11:03:35.166152
2020-06-23T15:13:39
2020-06-23T15:13:39
256,256,227
1
0
null
null
null
null
UTF-8
Java
false
false
637
java
package com.barefoot.easypass; import androidx.appcompat.app.ActionBar; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import com.github.barteksc.pdfviewer.PDFView; public class GSS1103 extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_gss1103); ActionBar actionBar =getSupportActionBar(); assert actionBar != null; actionBar.hide(); PDFView pdfView = findViewById(R.id.pdfView); pdfView.fromAsset("GSS1103.pdf").load(); } }
[ "[kelvinityavyar@gmail.com]" ]
[kelvinityavyar@gmail.com]
e177ac6688b488e77957e585eab935c8afcd3dd0
fcf05db5c9183c308a7bf4ebae9688fc1eafe9b3
/app/src/main/java/com/example/JournalPerso/model/IndicateurCaseCochee.java
216e6937c4bd55be1bce34c92350d522e7ee524d
[]
no_license
nataire/JournalPersoAndroid
193a54c0b1e9abd76cb89d6a8592d781f4cdacdc
4f268e406220769b3940c7d02fdad0eccfc3a0fd
refs/heads/master
2022-09-21T19:24:23.483901
2020-06-06T15:19:21
2020-06-06T15:19:21
237,210,942
0
0
null
null
null
null
UTF-8
Java
false
false
1,679
java
package com.example.JournalPerso.model; import androidx.annotation.NonNull; public class IndicateurCaseCochee extends Indicateur implements Cloneable { private boolean etatBoutonSaisie; private boolean objectif; public IndicateurCaseCochee() { this.idIndicateur = java.lang.System.identityHashCode(this); } //region constructor public IndicateurCaseCochee(String nomIndicateur, boolean etatBoutonSaisie, boolean objectifCaseCochee, int idIndicateur) { this.nomIndicateur = nomIndicateur; this.typeIndicateur = "CaseCochee"; this.etatBoutonSaisie = etatBoutonSaisie; this.objectif = objectifCaseCochee; this.idIndicateur = idIndicateur; } public IndicateurCaseCochee(String nomIndicateur, boolean etatBoutonSaisie, boolean objectifCaseCochee) { this.nomIndicateur = nomIndicateur; this.typeIndicateur = "CaseCochee"; this.etatBoutonSaisie = etatBoutonSaisie; this.objectif = objectifCaseCochee; this.idIndicateur = java.lang.System.identityHashCode(this); } @NonNull @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } //endregion //region getter setter public boolean isEtatBoutonSaisie() { return etatBoutonSaisie; } public void setEtatBoutonSaisie(boolean etatBoutonSaisie) { this.etatBoutonSaisie = etatBoutonSaisie; } public boolean isObjectifCaseCochee() { return objectif; } public void setObjectifCaseCochee(boolean objectifCaseCochee) { this.objectif = objectifCaseCochee; } //endregion }
[ "chabcedr17@gmail.com" ]
chabcedr17@gmail.com
5227d4bf6b7a1831b4cb9da472e3024e53f0a9e3
7fdc730ec1ca5dfba595651c8a1df78436f7731b
/src/main/java/com/steven/hicks/logic/dao/VenueSearcher.java
84c33a8cada39e284c97a584649e9c83ef0cd6b0
[]
no_license
shicks255/SetlistFM_API
0c4e40f9edd7854d792115e903a663cd06bd23fb
21c0f815b475e14ffe4517614b13970999f19f27
refs/heads/master
2022-11-24T06:47:13.827664
2022-10-05T14:15:15
2022-10-05T14:15:15
142,797,927
0
0
null
2022-11-16T03:17:40
2018-07-29T21:50:52
Java
UTF-8
Java
false
false
5,229
java
package com.steven.hicks.logic.dao; import com.fasterxml.jackson.databind.ObjectMapper; import com.steven.hicks.beans.Venue; import com.steven.hicks.beans.VenueList; import com.steven.hicks.logic.queryBuilders.QueryBuilder; import com.steven.hicks.logic.queryBuilders.VenueQueryBuilder; import javax.net.ssl.HttpsURLConnection; import java.io.BufferedReader; import java.io.InputStreamReader; import java.net.URL; public class VenueSearcher implements Searchable<Venue, VenueList> { private static ObjectMapper m_objectMapper = new ObjectMapper(); public VenueList m_venueList; @Override public int getNumberOfPages() { return m_venueList.getTotal() / m_venueList.getItemsPerPage(); } @Override public Venue get(String id) { Venue venue = null; String urlAddress = "https://api.setlist.fm/rest/1.0/venue/" + id; try { URL url = new URL(urlAddress); HttpsURLConnection connection = (HttpsURLConnection)url.openConnection(); connection.setRequestProperty("x-api-key", "692ab4ce-9835-4040-8bb8-d6bb77ba54f8"); connection.setRequestProperty("accept", "application/json"); connection.setRequestMethod("GET"); StringBuilder data = new StringBuilder(); String input2 = ""; BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream())); while ((input2 = in.readLine()) != null) data.append(input2); venue = m_objectMapper.readValue(data.toString(), Venue.class); } catch (Exception e) { System.out.println(e.getMessage()); } return venue; } @Override public void search(QueryBuilder queryBuilder, int pageNumber) { String urlAddress = "https://api.setlist.fm/rest/1.0/search/venues?"; StringBuilder queryString = new StringBuilder(); if (queryBuilder instanceof VenueQueryBuilder == false) { //throw exception } VenueQueryBuilder builder = (VenueQueryBuilder)queryBuilder; if (builder.getCityId().length() > 0) { if (queryString.length() > 0) queryString.append("&"); queryString.append("cityId=" + builder.getCityId()); } if (builder.getCityName().length() > 0) { if (queryString.length() > 0) queryString.append("&"); queryString.append("cityName=" + builder.getCityName()); } if (builder.getCountryName().length() > 0) { if (queryString.length() > 0) queryString.append("&"); queryString.append("country=" + builder.getCountryName()); } if (builder.getState().length() > 0) { if (queryString.length() > 0) queryString.append("&"); queryString.append("state=" + builder.getState()); } if (builder.getStateCode().length() > 0) { if (queryString.length() > 0) queryString.append("&"); queryString.append("stateCode=" + builder.getStateCode()); } if (builder.getName().length() > 0) { if (queryString.length() > 0) queryString.append("&"); queryString.append("name=" + builder.getName()); } if (queryString.length() > 0) { queryString.append("&"); queryString.append("p=" + pageNumber); } urlAddress += queryString.toString(); try { URL url = new URL(urlAddress); HttpsURLConnection connection = (HttpsURLConnection)url.openConnection(); connection.setRequestProperty("x-api-key", "692ab4ce-9835-4040-8bb8-d6bb77ba54f8"); connection.setRequestProperty("accept", "application/json"); connection.setRequestMethod("GET"); StringBuilder data = new StringBuilder(); String input2 = ""; BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream())); while ((input2 = in.readLine()) != null) data.append(input2); m_venueList = m_objectMapper.readValue(data.toString(), VenueList.class); } catch (Exception e) { System.out.println(e.getMessage()); } } @Override public boolean hasNextPage() { if (m_venueList == null) return false; int venuesSoFar = m_venueList.getPage() * m_venueList.getItemsPerPage(); if (m_venueList.getTotal() > venuesSoFar) return true; return false; } @Override public VenueList getNextPage(QueryBuilder queryBuilder) { int pageToGet = 1; if (m_venueList != null) pageToGet = m_venueList.getPage() + 1; return searchAndGet(queryBuilder, pageToGet); } @Override public VenueList searchAndGet(QueryBuilder queryBuilder, int pageNumber) { search(queryBuilder, pageNumber); return m_venueList; } @Override public VenueList getSearchResults() { return m_venueList; } }
[ "shicks255@yahoo.com" ]
shicks255@yahoo.com
cbe1d3a0e7771272d48865ce264b60ce790430b1
12416097ca80c97550022405fdf65507fea2f082
/src/test/java/com/att/test/jsontranformer/AppTest.java
6b85aed722fed2cc9981be65671168a917170388
[]
no_license
aagarwal9907/jsontranformer
0fa76626adf4ef1a2604df349557fc8dc66e8a6d
0b1ab6672d1e592467de7fd252a2a03d29ba2012
refs/heads/master
2021-07-03T18:58:53.385820
2017-09-24T18:10:53
2017-09-24T18:10:53
104,665,380
0
1
null
null
null
null
UTF-8
Java
false
false
655
java
package com.att.test.jsontranformer; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; /** * Unit test for simple App. */ public class AppTest extends TestCase { /** * Create the test case * * @param testName name of the test case */ public AppTest( String testName ) { super( testName ); } /** * @return the suite of tests being tested */ public static Test suite() { return new TestSuite( AppTest.class ); } /** * Rigourous Test :-) */ public void testApp() { assertTrue( true ); } }
[ "amit9907@gmail.com" ]
amit9907@gmail.com
fc9a01f0e3ba81e4d7b2d7ff363da49bba95f69e
ab8cefea4376953cf61fa3b820d9cdc302c6cc4d
/Temperature/src/ru/academits/bondyuk/model/KelvinConverter.java
f9a0f595315955f1f2bbacfb87b6de57e75e3e44
[]
no_license
asbondyuk/AcademItSchool
3d96f551032fd158c85943d8d2388ff0d178bd62
fc239673935e6d57969b4d8321efce6acddcdd17
refs/heads/master
2020-12-27T01:34:45.592103
2020-05-07T22:59:55
2020-05-07T22:59:55
237,721,099
0
0
null
null
null
null
UTF-8
Java
false
false
612
java
package ru.academits.bondyuk.model; public class KelvinConverter { private KelvinConverter() { } public static double convert(double value, TemperatureTypes types) { switch (types) { case FAHRENHEIT: return convertToFahrenheit(value); case CELSIUS: return convertToCelsius(value); } return value; } private static double convertToCelsius(double value) { return value - 273.15; } private static double convertToFahrenheit(double value) { return (value - 273.15) * 9 / 5 + 32; } }
[ "aleksander.bondyuk@yandex.ru" ]
aleksander.bondyuk@yandex.ru
93c144b5c788926679857280028b0ad9cb9a0b86
a353ad95103d6b43f7638fe212966279b825203a
/app/src/main/java/com/example/wtl/ttms/AllFilmTypeFragment/LoveFragment.java
d2e7a66ae6d329773ca289505b66a9e35fd733da
[]
no_license
WeiTianLiang/TTMS
49967176a9c5015de7c2b99398152ced12f0ffc1
1523eb831cb21a20a785c68eae39a2e764b4b7fb
refs/heads/master
2020-03-11T06:15:55.910639
2018-04-17T01:16:42
2018-04-17T01:16:42
129,825,929
0
0
null
null
null
null
UTF-8
Java
false
false
2,293
java
package com.example.wtl.ttms.AllFilmTypeFragment; import android.os.Bundle; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v7.widget.DefaultItemAnimator; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.example.wtl.ttms.Adapter.FilmAdapter; import com.example.wtl.ttms.Class.Film; import com.example.wtl.ttms.R; import java.util.ArrayList; import java.util.List; /** * 爱情片 * Created by WTL on 2018/4/16. */ public class LoveFragment extends Fragment{ private List<Film> filmList = new ArrayList<>(); private RecyclerView film_recycler; @Nullable @Override public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.film_racycler,container,false); film_recycler = view.findViewById(R.id.film_recycler); init(); DefaultItemAnimator animator = new DefaultItemAnimator(); animator.setRemoveDuration(200); animator.setChangeDuration(400); animator.setAddDuration(200); film_recycler.getBackground().setAlpha(150); LinearLayoutManager manager = new LinearLayoutManager(getContext()); film_recycler.setLayoutManager(manager); film_recycler.setItemAnimator(animator); final FilmAdapter adapter = new FilmAdapter(filmList,getContext()); film_recycler.setAdapter(adapter); return view; } private void init() { Film film3 = new Film("爱情片","阿甘正传","100分钟","不知道","¥24"); filmList.add(film3); Film film33 = new Film("爱情片","阿甘正传","100分钟","不知道","¥24"); filmList.add(film33); Film film333 = new Film("爱情片","阿甘正传","100分钟","不知道","¥24"); filmList.add(film333); Film film332 = new Film("爱情片","阿甘正传","100分钟","不知道","¥24"); filmList.add(film332); Film film32 = new Film("爱情片","阿甘正传","100分钟","不知道","¥24"); filmList.add(film32); } }
[ "15291065925@163.com" ]
15291065925@163.com
9e0edcf367b761115dd2b5a881ffa3f416851d60
7cef9fec88b8023f585c7cf2e01b0e5e764b13af
/src/main/java/com/libraryManagementSystem/serviceImpl/StudentServiceImpl.java
2ec23a36ff29eecb4717a0a7647f11d770c4f1dc
[]
no_license
sranjika/Library
3ad7242dd499afd7b9f4f71460f18c7199464d1a
f91d00e10f2261cb674fcd71907220876c058a34
refs/heads/master
2023-03-01T02:39:18.707725
2021-02-08T08:12:20
2021-02-08T08:12:20
337,002,631
0
0
null
null
null
null
UTF-8
Java
false
false
2,190
java
package com.libraryManagementSystem.serviceImpl; import com.libraryManagementSystem.beans.Book; import com.libraryManagementSystem.dao.IbookDao; import com.libraryManagementSystem.dao.IstudentDao; import com.libraryManagementSystem.daoImpl.BookDaoImpl; import com.libraryManagementSystem.daoImpl.StudentDaoImpl; import com.libraryManagementSystem.service.IstudentService; import java.util.Scanner; public class StudentServiceImpl implements IstudentService { Scanner sa=new Scanner(System.in); IbookDao bookDao = new BookDaoImpl(); IstudentDao studentDao = new StudentDaoImpl(); @Override public void searchBook() { System.out.print("Enter book name :"); String bookName = sa.nextLine(); bookDao.searchBook(bookName); } @Override public void issueBook() { System.out.println("Please enter the Book name which book you want to issue: "); String bookName = sa.nextLine(); Book book = bookDao.searchBook(bookName); bookDao.issueBook(book); System.out.println("...booko issued..\n"); } @Override public void returnBook() { System.out.println("Please enter the bookId , bookName, authName, subject,pages, price which book you want to return: "); System.out.println("Book id : "); int bookId = sa.nextInt(); sa.nextLine(); System.out.println("Book name : "); String bookName = sa.nextLine(); System.out.println("Author name : "); String authorName = sa.nextLine(); System.out.println("subject name : "); String subject = sa.nextLine(); System.out.println("Book pages : "); int pages = sa.nextInt(); System.out.println("Price : "); int price = sa.nextInt(); sa.nextLine(); bookDao.addBook( bookId, bookName, authorName, subject,pages, price); System.out.println("Book returned successfully\n "); System.out.println(".....Choose another task..... "); } @Override public void getAllBooks() { for (Book b :bookDao.getAllBooks() ) { System.out.println(b); } } }
[ "sranjika.patel@newvisionsoftware.in" ]
sranjika.patel@newvisionsoftware.in
a39962024f9b29127b010673d405f06d51ad520a
3c8c96e41b0af44b65779cfa95af5247c01922df
/src/main/java/io/vertx/ext/unit/report/impl/SimpleFormatter.java
24d4699e51896ec5fe22a72bb2d661b518b1c6e3
[]
no_license
alexlehm/vertx-unit
ec9e33b4d584f3ff3ffd5779df95037794f44cdb
c6b444454e1d9d46c5abd722f4f7731b4b7e3bd4
refs/heads/initial-work
2021-01-14T09:29:10.763743
2015-02-20T18:27:45
2015-02-20T18:27:45
29,323,669
0
0
null
2020-10-14T08:16:33
2015-01-15T23:37:37
Java
UTF-8
Java
false
false
2,110
java
package io.vertx.ext.unit.report.impl; import io.vertx.core.Handler; import io.vertx.core.buffer.Buffer; import io.vertx.ext.unit.report.TestResult; import io.vertx.ext.unit.report.Reporter; import java.util.function.BiConsumer; import java.util.function.Consumer; /** * @author <a href="mailto:julien@julienviet.com">Julien Viet</a> */ public class SimpleFormatter implements Reporter<SimpleFormatter.ReportImpl> { private final Consumer<Buffer> info; private final BiConsumer<Buffer, Throwable> error; private final Handler<Void> endHandler; public SimpleFormatter(Consumer<Buffer> info, BiConsumer<Buffer, Throwable> error, Handler<Void> endHandler) { this.info = info; this.error = error; this.endHandler = endHandler; } public static class ReportImpl { private int run; private int failures; private int errors; } @Override public ReportImpl createReport() { return new ReportImpl(); } @Override public void reportBeginTestSuite(ReportImpl report, String name) { info.accept(Buffer.buffer("Begin test suite " + name)); } @Override public void reportBeginTestCase(ReportImpl report, String name) { info.accept(Buffer.buffer("Begin test " + name)); report.run++; } @Override public void reportEndTestCase(ReportImpl report, String name, TestResult result) { if (result.succeeded()) { info.accept(Buffer.buffer("Passed " + result.name())); } else { if (result.failure().isError()) { report.errors++; } else { report.failures++; } error.accept(Buffer.buffer("Failed " + result.name()), result.failure().cause()); } } @Override public void reportEndTestSuite(ReportImpl report, String name, Throwable err) { if (err != null) { error.accept(Buffer.buffer("Test suite " + name + " failure"), err); } String msg = "End test suite " + name + " , run: " + report.run + ", Failures: " + report.failures + ", Errors: " + report.errors; info.accept(Buffer.buffer(msg)); if (endHandler != null) { endHandler.handle(null); } } }
[ "julien@julienviet.com" ]
julien@julienviet.com