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
595214b8b872a4039a203534c268ca7c89999ce4
9f7a726bb12b3a91aebd9b6cf62b97cb83b11058
/src/main/java/com/banun/service/UserServiceImpl/UserSecurityService.java
d99696cdc8f016929ace6e761d22a70f7b0a6c16
[]
no_license
tamtamu-spring/spring-data-jpa
456dfe31e48bd56567bb4ac332772bc4a2f2b23d
4900a607ac80bfabe0ea84fd5065d412f28b053c
refs/heads/master
2020-04-09T01:03:59.071566
2017-09-25T06:37:30
2017-09-25T06:37:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,111
java
package com.banun.service.UserServiceImpl; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.stereotype.Service; import com.banun.dao.UserDao; import com.banun.domain.User; @Service public class UserSecurityService implements UserDetailsService { /** The application logger */ private static final Logger LOG = LoggerFactory.getLogger(UserSecurityService.class); @Autowired private UserDao userDao; @Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { User user = userDao.findByUsername(username); if (null == user) { LOG.warn("Username {} not found", username); throw new UsernameNotFoundException("Username " + username + " not found"); } return user; } }
[ "anas.banun@anasbanun.com" ]
anas.banun@anasbanun.com
38b9d18d1b82df303b5e7f461e93b9322e9abfe8
3b72755805b8a2b49830cc293e999ed7760228cc
/Java Practice Examples/Unit7/src/Unit7/CacheAny.java
741145aa8f027357c7186444fca9c952d3ed4ef4
[]
no_license
joebaldwin95/Java-Programming
36657f9b6312d966c84f8e61d70790f4ec694d1e
93ae7b7574f241ca6371a186c6d7df4f5d670791
refs/heads/master
2020-04-13T04:55:18.929600
2014-04-13T20:10:53
2014-04-13T20:10:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
149
java
package Unit7; public class CacheAny <T>{ private T t; public void add (T t){ this.t = t; } public T get(){ return t; } }
[ "joe.baldwin@capgemini.com" ]
joe.baldwin@capgemini.com
5f585ad08372c15e1666d7d680bf6ca986083cb4
12285dfccf10dabef299cad62f645de61840165b
/src/main/java/com/demo/myretail/dao/ProductRepository.java
f34ffc35fe213073a64dde1cf27490a6d0cbbc83
[ "MIT" ]
permissive
ppexa/retail
b23e5f63d85682d2c7984665da329ce3beaa9b69
acd3cd94d27523a5f397094db7b0046b161ba547
refs/heads/master
2020-03-27T16:29:36.034261
2018-09-06T12:07:59
2018-09-06T12:07:59
146,786,252
0
0
null
null
null
null
UTF-8
Java
false
false
285
java
package com.demo.myretail.dao; import com.demo.myretail.domain.Product; import org.springframework.data.mongodb.repository.MongoRepository; import org.springframework.stereotype.Repository; @Repository public interface ProductRepository extends MongoRepository<Product, String> { }
[ "phillpexa@outlook.com" ]
phillpexa@outlook.com
32d4323663db3977f1d772ac70056f55a688ae7d
3d77e4423bc1aa7306608c585af00677654644d7
/src/main/java/com/uestc/getthecourse/entity/Student.java
12cee868b10ea8cc455a272a627c2dab4393fd97
[]
no_license
zhoujiahao123/GetTheCourse
d498bbc71f4bbcb67662bdb1e6cdcd7d6234f67b
8e60c9b5ae0e6d669025909be0fc2e567c1e9efc
refs/heads/master
2023-04-09T13:07:02.073880
2021-04-13T02:52:55
2021-04-13T02:52:55
351,073,261
1
0
null
null
null
null
UTF-8
Java
false
false
1,273
java
package com.uestc.getthecourse.entity; public class Student { private String studentId; private String password; private String slat; private String classes; private String grade; public String getStudentId() { return studentId; } public void setStudentId(String studentId) { this.studentId = studentId; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getClasses() { return classes; } public void setClasses(String classes) { this.classes = classes; } public String getGrade() { return grade; } public void setGrade(String grade) { this.grade = grade; } @Override public String toString() { return "Student{" + "studentId='" + studentId + '\'' + ", password='" + password + '\'' + ", salt='" + slat + '\'' + ", classes='" + classes + '\'' + ", grade='" + grade + '\'' + '}'; } public String getSlat() { return slat; } public void setSlat(String slat) { this.slat = slat; } }
[ "zhou.jiahao@foxmail.com" ]
zhou.jiahao@foxmail.com
59cbca9244cccdecee7c1de98e4b152f3ed1b836
a4e3ae7ef9c38b7490192725a2087d152454b4af
/selectednumber_admin/src/main/java/com/cvssp/selectednumber/dao/NumberCategoryDao.java
f6fc7d1db8df4ea9fc256a920c650be21a5e3b7d
[]
no_license
wanggq1109/selectednumber
ab51795979aea3f5a2f4931867850a1eac69a698
17f679defb3eb1f52871821b1636088b02aab416
refs/heads/master
2020-09-20T05:40:42.236462
2017-07-11T02:34:52
2017-07-11T02:34:52
94,500,909
0
0
null
null
null
null
UTF-8
Java
false
false
722
java
package com.cvssp.selectednumber.dao; import com.cvssp.selectednumber.domain.CategoryCvsspNumber; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; /** * Created by wgq on 2017/6/21. */ public interface NumberCategoryDao extends JpaRepository<CategoryCvsspNumber,Long> { @Query("FROM CategoryCvsspNumber N,Category C,CvsspNumber M,Group G WHERE N.cvsspNumber=M.id and N.category = C.id and C.groupInfo = G.id and N.category.name=?2 and N.cvsspNumber.dnseg=?1 ") Page findNumberAndCategoryInfo(String dnseg, String type,Pageable page); }
[ "33042974@qq.com" ]
33042974@qq.com
c2505940b59cedb8638fa3e3e666b1eeaf7626fc
e2ac29401830b60a24b1d7168aa2d0be3b793d67
/src/main/java/frc/team5104/auto/actions/DriveTrajectory.java
d2733f9718078759984cc7af91420ee92ceee086
[]
no_license
BreakerBots/Athena_Offseason_2018
14e032acaeb8aea0048962cafc507728afd1c17b
7db2fd3813ba94a4ecf9ced99a8d059a6fea3865
refs/heads/master
2020-03-27T05:56:28.278108
2019-11-27T21:56:25
2019-11-27T21:56:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,529
java
package frc.team5104.auto.actions; import frc.team5104.auto.BreakerPathAction; import frc.team5104.auto.BreakerTrajectoryFollower; import frc.team5104.auto.BreakerTrajectoryGenerator; import frc.team5104.subsystem.drive.DriveActions; import frc.team5104.subsystem.drive.Odometry; import frc.team5104.util.console; import frc.team5104.util.console.c; import jaci.pathfinder.Waypoint; /*Breakerbots Robotics Team 2018*/ /** * Follow a trajectory using the Breaker Trajectory Follower (Ramses Follower) */ public class DriveTrajectory extends BreakerPathAction { private BreakerTrajectoryFollower f; private Waypoint[] p; public DriveTrajectory(Waypoint[] points) { this.p = points; } public void init() { console.sets.create("RunTrajectoryTime"); console.log(c.AUTO, "Running Trajectory"); //Reset Odometry and Get Path (Reset it twice to make sure it all good) Odometry.reset(); f = new BreakerTrajectoryFollower( BreakerTrajectoryGenerator.getTrajectory(p) ); Odometry.reset(); //Wait 100ms for Device Catchup try { Thread.sleep(100); } catch (Exception e) { console.error(e); e.printStackTrace(); } } public boolean update() { DriveActions.set(f.getNextDriveSignal(Odometry.getPosition()), true); return f.isFinished(); } public void end() { DriveActions.stop(); console.log(c.AUTO, "Trajectory Finished in " + console.sets.getTime("RunTrajectoryTime") + "s at position " + Odometry.getPosition().toString()); } }
[ "liamsnow03@gmail.com" ]
liamsnow03@gmail.com
8560592079344997dda900708a974aaff95d4dbd
8894bfaacc66ac0b7a7c85dea32373619eb8c881
/app/src/main/java/ru/geron/ftploader/App.java
b3a859d342cc2f673a26fefdb33abfd5ecc310fb
[]
no_license
GerONSo/FTPLoader
6d02e936300b0ecc1e2776d9c49e76af80d4db64
2a14eb3b7532c57617efcaf2c63520452ca9085f
refs/heads/master
2020-07-14T00:05:56.190231
2019-08-29T14:37:25
2019-08-29T14:37:25
205,185,015
1
0
null
null
null
null
UTF-8
Java
false
false
331
java
package ru.geron.ftploader; import android.app.Application; import android.content.Context; public class App extends Application { private String productId = ""; public void setProductId(String productId) { this.productId = productId; } public String getProductId() { return productId; } }
[ "oper_80@mail.ru" ]
oper_80@mail.ru
ba28bb86a9added56b6bf8e42a8300edb5f72a7f
e75be673baeeddee986ece49ef6e1c718a8e7a5d
/submissions/blizzard/Corpus/ecf/1310.java
ec787e3c6efa9c35219d763d32f1601a02304de1
[ "MIT" ]
permissive
zhendong2050/fse18
edbea132be9122b57e272a20c20fae2bb949e63e
f0f016140489961c9e3c2e837577f698c2d4cf44
refs/heads/master
2020-12-21T11:31:53.800358
2018-07-23T10:10:57
2018-07-23T10:10:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,677
java
/* Copyright (c) 2006-2009 Jan S. Rellermeyer * Systems Group, * Institute for Pervasive Computing, ETH Zurich. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * - 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 of ETH Zurich nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. * * 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 ch.ethz.iks.r_osgi.messages; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; public class DeliverBundlesMessage extends RemoteOSGiMessage { /** * the bytes of the bundles */ private byte[][] bytes; public DeliverBundlesMessage() { super(RemoteOSGiMessage.DELIVER_BUNDLES); } /** * create a new message from the wire. * * @param input * the input stream. * @throws IOException * in case of IO problems. */ public DeliverBundlesMessage(final ObjectInputStream input) throws IOException { super(RemoteOSGiMessage.DELIVER_BUNDLES); final int bundleCount = input.readInt(); bytes = new byte[bundleCount][]; for (int i = 0; i < bundleCount; i++) { bytes[i] = readBytes(input); } } /** * write the body of this message to the wire. */ protected void writeBody(final ObjectOutputStream output) throws IOException { output.writeInt(bytes.length); for (int i = 0; i < bytes.length; i++) { writeBytes(output, bytes[i]); } } /** * get the bytes of the dependency bundles. * * @return the bundle bytes. */ public byte[][] getDependencies() { return bytes; } /** * set the bytes of the dependency bundles. * * @param bytes */ public void setDependencies(final byte[][] bytes) { this.bytes = bytes; } /** * String representation for debug outputs. * * @return a string representation. * @see java.lang.Object#toString() */ public String toString() { final StringBuffer buffer = new StringBuffer(); //$NON-NLS-1$ buffer.append("[DELIVER_BUNDLES]"); //$NON-NLS-1$ buffer.append("- XID: "); buffer.append(xid); //$NON-NLS-1$ buffer.append(", ... "); return buffer.toString(); } }
[ "tim.menzies@gmail.com" ]
tim.menzies@gmail.com
00d8503d06f633015519acf0c7530f14ef48c9e0
f08af8d1ac64eee450b4d433de86e596e2a7f377
/UNIT2/Inheritance.java
7330529410a551a74039f1089acb573dde46bab1
[]
no_license
noddykhan276/JAVA-Programs
fa99a1f195f464847fceaf285eb0f2b56acccb68
4983a86aa06ff901a3afb7844bba461cb55986a0
refs/heads/main
2023-08-28T17:36:07.917862
2021-10-12T19:20:57
2021-10-12T19:20:57
null
0
0
null
null
null
null
UTF-8
Java
false
false
820
java
package UNIT2; class Vehicle { protected String brand = "Ford"; public void honk() { System.out.println("Tuut, tuut!"); } } class Car extends Vehicle { public String modelName = "Mustang"; } public class Inheritance { public static void main(String[] args) { Vehicle myVehicle = new Vehicle(); Car myCar = new Car(); // Call the honk() method (from the Vehicle class) on the myCar object myCar.honk(); // Call the honk() method from the Vehicle class myVehicle.honk(); // Display the value of the brand attribute (from the Vehicle class) and the // value of the modelName from the Car class System.out.println(myCar.brand + " " + myCar.modelName); } } // Output:- // Tuut,tuut! // Tuut,tuut! // Ford Mustang
[ "nadeemshareef934@gmail.com" ]
nadeemshareef934@gmail.com
3b1f2f1a021681b48f7af72f53052ff19c15937a
589d35328567872883345f5445572a5a87eb1945
/src/main/java/pl/ts/test3/model/ResponseCreateInvoice.java
42475020c7b8e083cc2e858bd2cea0b4ee11827a
[]
no_license
tomeksochacki/test-tasks-enigma
ea19a061553769e320890719dbfe555eb1eaf5ef
6b94ef7cc5b6346fd959417d150100fa6308d9ea
refs/heads/master
2023-07-12T12:25:13.372644
2021-08-13T12:55:36
2021-08-13T12:55:36
395,650,584
0
0
null
null
null
null
UTF-8
Java
false
false
4,516
java
package pl.ts.test3.model; import java.util.HashMap; import java.util.List; public class ResponseCreateInvoice { private String id; private String object; private String account_country; private String account_name; private List<AccountTaxId> account_tax_ids; private Integer amount_due; private Integer amount_paid; private Integer amount_remaining; private Integer application_fee_amount; private Integer attempt_count; private boolean attempted; private boolean auto_advance; //TODO dodać Optional - typ? private AutomaticTax automatic_tax; //TODO dowiedzieć jaki typ jest zahashowany, prawdopodobnie String? Przyjmuje to jako String. private String billing_reason; private String charge; private String collection_method; private Integer created; //TODO sprawdzić co to za typ timestamp - znak czasu lub przyjąć jako string?? private String currency; //TODO sprawdzić ten trzyliterowy kod - waluty jaki dokładnie typ, czy może być String? private String custom_fields; //TODO sprawdzić jaki typ jest zahashowany - array of hashes - prawdopodobnie String? Przyjmuje to jako String. private String customer; private String customer_address; //TODO dowiedzieć się jaki typ jest zahashowany, prawdopodobnie String. Przyjmuje to jako String. private String customer_email; private String customer_name; private String customer_phone; private String customer_shipping; //TODO dowiedzieć się jaki typ jest zahashowany, przyjmuje to jako String? private String customer_tax_exempt; private List<CustomerTaxId> customer_tax_ids; //TODO sprawdzić co to za tablica hashu - czy może być String? bo tu mamy pustą tablicę ale pytanie jakiego stypu? private String default_payment_method; private String default_source; private List<DefaultTaxRate> default_tax_rates; //TODO srawdzić co to za tablica hashu - czy może być String bo tu podobnie mamy pustą tablicę ale pytanie jakiego typu? private String description; private String discount; private List<Discount> discounts; //TODO tablica zwiejąca optional array of hashes - sprawdzić jaki typ, czy może być String? private String due_date; //TODO sprawdzić co to za typ optional - lub przyjąć jako String? private Integer ending_balance; private String footer; //TODO sorawdzić co to za typ optional - lub czy przyjąć jako String? private String hosted_invoice_url; private String invoice_pdf; private String last_finalization_error; //TODO sprawdzić co to za typ hash - czy może być String? private Lines lines; //TODO sprawdzić co to za typ? private boolean livemode; private HashMap<String, String> metadata; //TODO sprawdzić co to ma być dokłądnie za typ czy HASHMAPA - para klucz wartość? Czy noy typ Metadata? private Integer next_payment_attempt; //TODO sprawdzić co to za tym timestamp, przypisałem Integer, ale może lepiej przyjąć jako String? private String number; private String on_behalf_of; //TODO sprawdzić co to za typ optional? Czy może być String? private boolean paid; private String payment_intent; private PaymentSettings payment_settings; //TODO sprawdzić co to za typ optional dictionary?? lub hash? private Integer period_end; //TODO sprawdzić co to za typ timestamp? private Integer period_start; //TODO sprawdzić co to za typ timestamp? private Integer post_payment_credit_notes_amount; private Integer pre_payment_credit_notes_amount; private String quote; private String receipt_number; private Integer starting_balance; private String statement_descriptor; //TODO sprawdzić co to za typ optional? Czy może być String? private String status; private StatusTransistion status_transitions; //TODO sprawdzić co to za typ? hash - czy moze być String?? private String subscription; //TODO sprawdzić co to za typ optional? czy może być String? private Integer subtotal; private Integer tax; private Integer total; private List<TotalDiscountAmount> total_discount_amounts; //TODO sprawdzić jaki to będzie typ tablica hashu - array of hashes? private List<TotalTaxAmount> total_tax_amounts; //TODO sprawdzić jaki to będzie typ tablica hashu - array of hashes? private String transfer_data; //TODO sprawdzić co to za typ? Puki co String. private Integer webhooks_delivered_at; //TODO sprawdzić co to za typ timestamp? }
[ "tomeksochacki@wp.pl" ]
tomeksochacki@wp.pl
8bd9035ceabae865f8ef127295ca3822e8395efe
e584abd61fa133f965098e8fc96a284a69ff080f
/cemitery/RecommenderController (macmini's conflicted copy 2017-03-23).java
7cd89ca92b607db77ef7fcdf29478669d85d9c1f
[]
no_license
rubentrancoso/cosinsimilarity
2b3d51b4495f4b2cf64c2b6c673c7a9564d9a2d5
23b2a3d9d01ecbcfb27b42b57982889f06c3c860
refs/heads/master
2021-01-11T13:50:05.055977
2018-01-06T04:06:19
2018-01-06T04:06:19
86,628,082
0
0
null
null
null
null
UTF-8
Java
false
false
1,579
java
package engine.controllers; import java.util.HashMap; import java.util.Map; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.RestController; import engine.entities.Article; import engine.services.RecommenderService; @RestController @EnableAutoConfiguration public class RecommenderController { @Autowired private RecommenderService recommenderService; private static final Logger logger = LoggerFactory.getLogger(RecommenderController.class); @RequestMapping(value = "/recommend/{articleName}", produces = MediaType.APPLICATION_JSON_VALUE) @ResponseBody Map<String, String> execute(@PathVariable("articleName") Long articleName) { logger.info("processing request"); Map<String, String> response = new HashMap<String, String>(); try { Article article = recommenderService.recommend(articleName); response.put("name", Long.toString(article.getName())); response.put("status", "success"); } catch (Exception e) { logger.error("Error occurred while trying to process api request", e); response.put("status", "fail"); } return response; } }
[ "rubentrancoso@gmail.com" ]
rubentrancoso@gmail.com
e6ac69b38026aefe08cff89bd93b1b7a7c4a5ab4
e97543b7b013fe3ca8cc99626a7b14320824f0ce
/study-autoconfigure/src/main/java/com/github/icezerocat/study/autoconfigure/config/A_SonConfig.java
feaf69fc876fcc203069071f3456ff2dc049d4c3
[]
no_license
zhoumingjiejie/icezero-cat
d987f7ee806ee715f01bbbebc59a8e7f8c81294a
48096ff3e96314a22b7ae090470d99b077ce5dc7
refs/heads/main
2023-06-15T19:19:08.821270
2021-07-06T10:35:49
2021-07-06T10:35:49
309,537,604
0
0
null
null
null
null
UTF-8
Java
false
false
474
java
package com.github.icezerocat.study.autoconfigure.config; import lombok.extern.slf4j.Slf4j; import org.springframework.boot.autoconfigure.AutoConfigureAfter; import org.springframework.context.annotation.Configuration; /** * Description: 儿子 * CreateDate: 2021/7/5 15:06 * * @author zero * @version 1.0 */ @Slf4j @Configuration @AutoConfigureAfter(B_ParentConfig.class) public class A_SonConfig { public A_SonConfig() { log.debug("儿子"); } }
[ "996586523@qq.com" ]
996586523@qq.com
43f92fb54478c3577af497542dcc4a16f2d9c630
5c3c6a469909653cfb7750392b02bcd290d985d7
/841-keys-and-rooms/src/Solution.java
439c84f24f29a3b961e46bec9b42def52cc07c5e
[]
no_license
Reimu747/leetcode
1519f9f21ca77eb589d3512f286af7b0169b255a
2db6080c424c3a38213f82cc9e1b4c0af5bbff1b
refs/heads/master
2020-05-05T05:06:01.249445
2020-01-10T22:31:01
2020-01-10T22:31:01
177,986,687
0
0
null
null
null
null
UTF-8
Java
false
false
1,728
java
import java.util.LinkedList; import java.util.List; import java.util.Queue; public class Solution { /** * BFS * * @param rooms 房间列表 * @return 是否能进入每一个房间 */ public boolean canVisitAllRooms(List<List<Integer>> rooms) { Queue<Integer> queue = new LinkedList<>(); queue.offer(0); boolean[] hasVisited = new boolean[rooms.size()]; hasVisited[0] = true; while (!queue.isEmpty()) { int size = queue.size(); for (int i = 0; i < size; i++) { List<Integer> keys = rooms.get(queue.peek()); for (int key : keys) { if (!hasVisited[key]) { hasVisited[key] = true; queue.offer(key); } } queue.poll(); } } for (boolean b : hasVisited) { if (!b) { return false; } } return true; } /** * DFS * * @param rooms 房间列表 * @return 是否能进入每一个房间 */ public boolean canVisitAllRooms2(List<List<Integer>> rooms) { boolean[] hasVisited = new boolean[rooms.size()]; dfs(0, hasVisited, rooms); for (boolean b : hasVisited) { if (!b) { return false; } } return true; } private void dfs(int curRoom, boolean[] hasVisited, List<List<Integer>> rooms) { hasVisited[curRoom] = true; for (int key : rooms.get(curRoom)) { if (!hasVisited[key]) { dfs(key, hasVisited, rooms); } } } }
[ "1099169475@qq.com" ]
1099169475@qq.com
c33b4c1655b2caae8a947ca6c2d53bfb18cf53dd
0ed907f11fa0af482487f18564bbea42c37285d7
/TaskEleven.java
cc4aecf01a3cd9d80c78fe3842fd97a9fb2f9c82
[]
no_license
almirmehmedika/Zadaca1
ede1b461ab3178385ace702eddd12bba492fd4d3
00e1169b5b5fc675a38fa584643c70d2f7903811
refs/heads/master
2021-01-17T21:01:59.139686
2015-06-16T20:23:12
2015-06-16T20:23:12
37,600,026
0
0
null
2015-06-17T14:31:02
2015-06-17T14:31:02
null
UTF-8
Java
false
false
856
java
public class TaskEleven { public static void main(String[] args) { // Program which determines when plane is going to land // Input time when plane take off int hour = 20; int min = 34; // Input time flying int hour1 = 4; int min1 = 50; int hour2 = hour + hour1; int min2 = min + min1; int min3 = min2 % 60; int hour3 = min2 / 60; int hour4 = hour2 + hour3; int day = hour4 % 24; boolean hour5 = hour >= 0 && hour < 24; boolean hour6 = hour1 >= 0 && hour1 < 24; boolean min4 = min >= 0 && min < 60; boolean min5 = min1 >= 0 && min1 < 60; if(hour4 >= 24){ System.out.print("Vrijeme slijetanja je " + day + ":" + min3); }else if(hour5 && hour6 && min4 && min5){ System.out.print("Vrijeme slijetanja je " + hour4 + ":" + min3); }else{ System.out.print("Upisali ste pogrijesno vrijeme"); } } }
[ "becir.omerbasic@bitcamp.ba" ]
becir.omerbasic@bitcamp.ba
e7757327ef7edc148a6c731466272f466632ea38
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/tencent/mm/plugin/luckymoney/sns/b/a.java
b0d203a2b799096f783d6cf2cb34d11fd7860ada
[]
no_license
0jinxing/wechat-apk-source
544c2d79bfc10261eb36389c1edfdf553d8f312a
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
refs/heads/master
2020-06-07T20:06:03.580028
2019-06-21T09:17:26
2019-06-21T09:17:26
193,069,132
9
4
null
null
null
null
UTF-8
Java
false
false
1,282
java
package com.tencent.mm.plugin.luckymoney.sns.b; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.kernel.e; import com.tencent.mm.kernel.g; import com.tencent.mm.storage.ac.a; import com.tencent.mm.storage.z; public final class a { public static int bMi() { AppMethodBeat.i(42551); g.RQ(); int i = ((Integer)g.RP().Ry().get(ac.a.xNe, Integer.valueOf(0))).intValue(); AppMethodBeat.o(42551); return i; } public static String bMj() { AppMethodBeat.i(42553); g.RQ(); String str = (String)g.RP().Ry().get(ac.a.xNj, ""); AppMethodBeat.o(42553); return str; } public static String bMk() { AppMethodBeat.i(42554); g.RQ(); String str = (String)g.RP().Ry().get(ac.a.xNk, ""); AppMethodBeat.o(42554); return str; } public static void xV(int paramInt) { AppMethodBeat.i(42552); g.RQ(); g.RP().Ry().set(ac.a.xNe, Integer.valueOf(paramInt)); g.RQ(); g.RP().Ry().dsb(); AppMethodBeat.o(42552); } } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes5-dex2jar.jar * Qualified Name: com.tencent.mm.plugin.luckymoney.sns.b.a * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
5f4820ba4b5caedef09d539cac5612350d3469af
32bff6e5a5cf8f5cbefa0af0b01968ee997f0181
/app/src/main/java/de/pbma/pma/sensorapp2/model/AlgorithmUtil.java
17751a3bec1c84688bfbeb29922112fdfd9ec148
[]
no_license
timulbrich/LibreWatch
740e11981d2553c66c8b8a84a53601bc024827ca
1ec2283ad8dda4b69242be79b25c5f75887ae9b0
refs/heads/master
2020-04-11T18:54:18.920337
2018-12-16T15:52:52
2018-12-16T15:52:52
162,015,982
0
0
null
null
null
null
UTF-8
Java
false
false
2,595
java
package de.pbma.pma.sensorapp2.model; import android.content.res.Resources; import java.text.DateFormat; import java.util.HashMap; import java.util.Locale; import java.util.Map; import java.util.concurrent.TimeUnit; import de.pbma.pma.sensorapp2.R; import static java.lang.Math.max; public class AlgorithmUtil { public static final double TREND_UP_DOWN_LIMIT = 15.0; // mg/dl / 10 minutes public static final DateFormat mFormatTimeShort = DateFormat.getTimeInstance(DateFormat.SHORT, Locale.GERMAN); //public static final DateFormat mFormatDayTime = DateFormat.getInstance(); public static final DateFormat mFormatDate = DateFormat.getDateInstance(); //public static final DateFormat mFormatDateShort = DateFormat.getDateInstance(DateFormat.SHORT); public static final DateFormat mFormatDateTime = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT); //public static final DateFormat mFormatDateTimeSec = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.LONG); public static String bytesToHexString(byte[] src) { StringBuilder builder = new StringBuilder(""); if (src == null || src.length <= 0) { return ""; } char[] buffer = new char[2]; for (byte b : src) { buffer[0] = Character.forDigit((b >>> 4) & 0x0F, 16); buffer[1] = Character.forDigit(b & 0x0F, 16); builder.append(buffer); } return builder.toString(); } public static String getDurationBreakdown(Resources resources, long duration) { duration = max(0, duration); long days = TimeUnit.MILLISECONDS.toDays(duration); duration -= TimeUnit.DAYS.toMillis(days); long hours = TimeUnit.MILLISECONDS.toHours(duration); duration -= TimeUnit.HOURS.toMillis(hours); long minutes = TimeUnit.MILLISECONDS.toMinutes(duration); if (days > 1) { return days + " " + resources.getString(R.string.days); } if (days == 1) { return "1 " + resources.getString(R.string.day); } if (hours > 1) { return hours + " " + resources.getString(R.string.hours); } if (hours == 1) { return "1 " + resources.getString(R.string.hour); } if (minutes > 1) { return minutes + " " + resources.getString(R.string.minutes); } if (minutes == 1) { return "1 " + resources.getString(R.string.minute); } return "0 " + resources.getString(R.string.minutes); } }
[ "tim.ulbrich@mysugr.com" ]
tim.ulbrich@mysugr.com
cc6b92e9500fb6f904aac337331027c256865e8e
e2307b5abcc3d91ba98c82fa8d8a7108133ac8b3
/aws-java-sdk-kendra/src/main/java/com/amazonaws/services/kendra/model/transform/TextDocumentStatisticsMarshaller.java
a136c79424ea62e59f1f129606a4e4061a3fe10c
[ "Apache-2.0" ]
permissive
fangwentong/aws-sdk-java
d87f9be8120643766dee5e086beb01fe8d733d76
92eb162a81e9c1b78d07a430c5a290519d7e7335
refs/heads/master
2022-07-26T11:29:40.748429
2020-05-09T18:57:29
2020-05-09T18:57:29
262,482,398
0
0
Apache-2.0
2020-05-09T03:40:19
2020-05-09T03:40:18
null
UTF-8
Java
false
false
2,083
java
/* * Copyright 2015-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.kendra.model.transform; import javax.annotation.Generated; import com.amazonaws.SdkClientException; import com.amazonaws.services.kendra.model.*; import com.amazonaws.protocol.*; import com.amazonaws.annotation.SdkInternalApi; /** * TextDocumentStatisticsMarshaller */ @Generated("com.amazonaws:aws-java-sdk-code-generator") @SdkInternalApi public class TextDocumentStatisticsMarshaller { private static final MarshallingInfo<Integer> INDEXEDTEXTDOCUMENTSCOUNT_BINDING = MarshallingInfo.builder(MarshallingType.INTEGER) .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("IndexedTextDocumentsCount").build(); private static final TextDocumentStatisticsMarshaller instance = new TextDocumentStatisticsMarshaller(); public static TextDocumentStatisticsMarshaller getInstance() { return instance; } /** * Marshall the given parameter object. */ public void marshall(TextDocumentStatistics textDocumentStatistics, ProtocolMarshaller protocolMarshaller) { if (textDocumentStatistics == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(textDocumentStatistics.getIndexedTextDocumentsCount(), INDEXEDTEXTDOCUMENTSCOUNT_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } } }
[ "" ]
54da22bf2a4b0de1dddb96f9c59a1ad5ff3b97e4
7a8022c92aa66283a0f525db3a752983f3e60f92
/basics-java/src/array_integer_logics/duplicate.java
ed96cdacb59246b91b0ef21ec45d336df44f9a3d
[]
no_license
hemanthkumar77/java-fundamentals
81420986dd2801fe7ffad4b9d69809b001fbbfdd
ed903afadaabdaf07b5ea42fa2cf3b8ccd01966b
refs/heads/master
2023-06-16T08:50:31.615600
2021-07-08T03:24:04
2021-07-08T03:24:04
320,976,263
0
0
null
null
null
null
UTF-8
Java
false
false
908
java
package array_integer_logics; import java.util.Scanner; public class duplicate { private int data; int[]a; int[]b; int increment; static int exist=0; Scanner obj=new Scanner(System.in); duplicate() { System.out.println("enter the size of the array: "); data=obj.nextInt(); a=new int[data]; b=new int[data]; insert(0); logic(0); display(0); } void insert(int i) { if(i<data) { a[i]=obj.nextInt(); i++; insert(i); } } void logic(int i) { if(i<data-1) { for(int j=i+1;j<data;j++) { if(a[i]==a[j]) { exist=1; break; } } if(a[i]==a[data-2]) { b[increment]=a[data-1]; } if(exist==0) { b[increment]=a[i]; increment++; } else { exist=0; } i++; logic(i); } } void display(int i) { if(i<=increment) { System.out.print(b[i]+" "); i++; display(i); } } public static void main(String args[]) { duplicate object=new duplicate(); } }
[ "59542999+hemanthkumar77@users.noreply.github.com" ]
59542999+hemanthkumar77@users.noreply.github.com
062e35a29f2e027062b5e2d506f171e1e89072cf
c7cfb60c5c11fb97b686a26aaf3bd906c9c1a326
/src/main/java/com/kru/stwitter/config/TwitterMessageProducer.java
28aba4600b01cc3024e73feb4560d68e28a6af83
[]
no_license
krunalsabnis/stwitter
b91d192cc1ed39de562d6cfc4645e3dc8d396ee6
b83ac806a5353e0271c1d8c3871a6b3332914fe8
refs/heads/master
2020-05-29T23:31:17.847021
2019-06-01T20:52:05
2019-06-01T20:52:05
189,437,428
0
0
null
2019-06-01T20:52:06
2019-05-30T15:24:17
Java
UTF-8
Java
false
false
1,869
java
package com.kru.stwitter.config; import lombok.AccessLevel; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import lombok.experimental.FieldDefaults; import lombok.extern.slf4j.Slf4j; import org.springframework.integration.endpoint.MessageProducerSupport; import org.springframework.integration.support.MessageBuilder; import org.springframework.messaging.MessageChannel; import twitter4j.FilterQuery; import twitter4j.Status; import twitter4j.StatusAdapter; import twitter4j.TwitterStream; import java.util.List; /** * @author kru on 30-5-19 * @project spring-twitter-streamer */ @Data @AllArgsConstructor @NoArgsConstructor @FieldDefaults(level = AccessLevel.PRIVATE) @Slf4j public class TwitterMessageProducer extends MessageProducerSupport { List<String> terms; StatusListener statusListener; FilterQuery filterQuery; TwitterStream twitterStream; public TwitterMessageProducer(TwitterStream twitterStream, MessageChannel outputChannel) { this.twitterStream = twitterStream; setOutputChannel(outputChannel); } @Override protected void onInit() { super.onInit(); statusListener = new StatusListener(); String[] termsArray = terms.toArray(new String[terms.size()]); filterQuery = new FilterQuery(0, null, termsArray); } @Override public void doStart() { twitterStream.addListener(statusListener); twitterStream.filter(filterQuery); } @Override public void doStop() { twitterStream.cleanUp(); twitterStream.clearListeners(); } class StatusListener extends StatusAdapter { @Override public void onStatus(Status status) { log.debug("received : {}", status); sendMessage(MessageBuilder.withPayload(status).build()); } } }
[ "krunalsabnis@gmail.com" ]
krunalsabnis@gmail.com
a2d420225ba7dc937bc2b1363f02c3bd2a8bd26c
50f9081e8c28e406cb09134cf8902d5c1101251f
/src/exercises/Z6_Truck.java
59ffb26e0965be1ce886970f464cded20cbc9e6a
[]
no_license
MarielHdz/JavaClasses
834897d54e27b84e9731633b3c634e297b5c374a
8c2e7dc8acc4754ccfc4d5b2b8c2f61a3466aed2
refs/heads/master
2020-04-26T02:27:17.489946
2019-03-01T05:15:05
2019-03-01T05:15:05
173,235,277
0
0
null
null
null
null
UTF-8
Java
false
false
627
java
package exercises; public class Z6_Truck { private String name; private int year; private double price; public Z6_Truck() { } public Z6_Truck(String name, int year, double price) { this.name = name; this.year = year; this.price = price; } public void doMonterThing() { } public void setName(String name) { this.name = name; } public String getName() { return name; } public int getYear() { return year; } public void setYear(int year) { this.year = year; } public double getPrice() { return price; } public void setPrice(double price) { this.price = price; } }
[ "paola.gloria4@gmail.com" ]
paola.gloria4@gmail.com
78354a7c579535e1371082d9746e581257364168
cc1c4d780e23d5760fc9fe8bfddedcf37e94eb08
/src/main/java/com/bettinghouse/api/validator/BetValidator.java
4374761bcd1d86859d57e4ea6088b99fe5246b6d
[]
no_license
gustavollg/betting_house_backend
776d0f97d65a5a030bf2a2cdfa4c63a4339e19c6
0eb6977d9bb2bc369111ee1cef0e67333a4b1ab6
refs/heads/master
2022-09-16T07:30:05.918943
2019-07-01T16:31:33
2019-07-01T16:31:33
191,197,313
0
0
null
2022-09-08T01:01:05
2019-06-10T15:44:48
Java
UTF-8
Java
false
false
420
java
package com.bettinghouse.api.validator; import com.bettinghouse.api.architecture.validator.CRUDValidator; import com.bettinghouse.api.model.Bet; import org.springframework.stereotype.Component; @Component public class BetValidator extends CRUDValidator<Bet> { @Override public void validateBeforeSave(Bet entity) { } @Override public void validateBeforeRemove(Bet entity) { } }
[ "gustavolinhares1995@gmail.com" ]
gustavolinhares1995@gmail.com
de0adfbeb16ce681c8ce91f6192f1377f29e761a
7e41614c9e3ddf095e57ae55ae3a84e2bdcc2844
/development/workspace(helios)/Poseidon/src/com/gentleware/poseidon/diagrams/gen/node/DslGenMergeNodeNodeGem.java
d1ea3eb92c960ecf5fff694f110842705b1b6469
[]
no_license
ygarba/mde4wsn
4aaba2fe410563f291312ffeb40837041fb143ff
a05188b316cc05923bf9dee9acdde15534a4961a
refs/heads/master
2021-08-14T09:52:35.948868
2017-11-15T08:02:31
2017-11-15T08:02:31
109,995,809
0
0
null
null
null
null
UTF-8
Java
false
false
1,695
java
package com.gentleware.poseidon.diagrams.gen.node; import java.awt.Color; import java.util.List; import org.eclipse.emf.ecore.EObject; import com.gentleware.poseidon.dsl.MetamodelElementWrapper; import com.gentleware.poseidon.idraw.foundation.DiagramFacet; import com.gentleware.poseidon.idraw.foundation.persistence.PersistentFigure; import com.gentleware.poseidon.idraw.foundation.persistence.PersistentProperties; import com.gentleware.poseidon.diagrams.base.node.*; import com.gentleware.poseidon.idraw.nodefacilities.nodesupport.*; import com.gentleware.poseidon.diagrams.feature.FeaturedNodeGem; import com.gentleware.poseidon.diagrams.feature.CompartmentFeatureInfo; import com.gentleware.poseidon.dsldeltaengine.gen.*; import com.gentleware.poseidon.diagrams.gen.bundle.DslGenDiagramResourceBundle; public class DslGenMergeNodeNodeGem extends NoNameNodeGem { public DslGenMergeNodeNodeGem(Color initialFillColor, PersistentFigure figure, String figureName) { super(initialFillColor, figure, figureName, true); } public DslGenMergeNodeNodeGem(EObject subject, DiagramFacet diagram, String figureId, Color initialFillColor, PersistentProperties properties, String figureName) { super(subject, diagram, figureId, initialFillColor, properties, figureName, true); } public String getIconName() { return "merge-node"; } public NodeAppearanceFacet createBasicNodeAppearanceFacet() { return new BasicNoNameNodeAppearanceFacet(initialFillColor, initialFillColor, figureFacet, contents, figureName, textableFacet, subject, true) { public ShapeAppearanceFacet createShapeAppearanceFacet() { return new RhombusShapeAppearanceFacet(); } }; } }
[ "ygarba@gmail.com" ]
ygarba@gmail.com
9d5391887a57ccb5c5ceebb3c85dc745eccad426
87abf88c1b9e1facc017f06899be90523a713589
/src/main/java/book/bookplatform/user/repository/UserRepository.java
f419af5edde810f43ad83c68fabd65f2b741b6a8
[ "Apache-2.0" ]
permissive
erayerdem/booksharingplatform
c3614eae800c1a58a75f191c45b31c47200ff20a
37670ae8fa288927e3dee94e5e806cb07851027c
refs/heads/master
2020-04-26T04:24:59.685435
2020-04-11T10:57:50
2020-04-11T10:57:50
173,301,151
0
0
null
null
null
null
UTF-8
Java
false
false
692
java
package book.bookplatform.user.repository; import book.bookplatform.book.model.BookDatabaseModel; import book.bookplatform.user.model.UserDatabaseModel; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.repository.query.Param; import org.springframework.stereotype.Repository; import java.util.List; import java.util.Optional; @Repository public interface UserRepository extends JpaRepository<UserDatabaseModel, Long> { boolean existsByEmail(@Param("email") String email); Optional<UserDatabaseModel> findByEmail(@Param("email") String email); List<BookDatabaseModel> findBookDatabaseModelsByEmail(@Param("email") String email); }
[ "sameterayerdm@gmail.com" ]
sameterayerdm@gmail.com
86f11f19fa1767be699c04d9039843227326b402
b2af3b8e35daf418ade3ca3bdc9aaafbd952c352
/src/HelloWorld.java
1791141a409a83b53386eda29875c46091b65ebd
[]
no_license
abhijeet-s/Algorithms_DataStructures
36a31bc7b2a4aad44877800feb334e08f68656d8
7e98de848d40af99b164a3bc1d307d37db8ade75
refs/heads/master
2020-04-19T10:59:51.830338
2016-08-28T18:17:28
2016-08-28T18:17:28
66,683,456
0
0
null
null
null
null
UTF-8
Java
false
false
203
java
/** * Created by Abhijeet on 8/26/2016. */ public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World"); System.out.print("!!"); } }
[ "singh.ab@husky.neu.edu" ]
singh.ab@husky.neu.edu
b84e8cbf4a966694289d738930e0c8d9beffcb6c
bfe8ad69a2f9c544392530d3d26511f28ecd599a
/src/main/java/com/qg/anywork/model/po/Chapter.java
2544dcadda795fdc47fef70d273219d266511fef
[]
no_license
qimingXia/anywork
d7df9f9edf8fc6dd6244a04452ce01d2872173d3
fcf5236dcb4a77cdf2dbe4473ab10e82b1198285
refs/heads/master
2020-09-28T20:25:06.316532
2018-12-14T11:18:24
2018-12-14T11:18:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
817
java
package com.qg.anywork.model.po; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import java.io.Serializable; /** * @author ming */ @Data @NoArgsConstructor @AllArgsConstructor @Entity @Table(name = "chapter") public class Chapter implements Serializable { /** * 章节ID */ @Id @Column(name = "chapter_id", nullable = false) private int chapterId; /** * 组织ID */ @Column(name = "organization_id") private int organizationId; /** * 章节名称 */ @Column(name = "chapter_name") private String chapterName; @Column(name = "user_id") private Integer userId; }
[ "1594998836@qq.com" ]
1594998836@qq.com
26bda6a0152d8946b9fb2de5337bece10ce2b0fd
92394ce0d0132b15ddae9fb2dd0a94593d35e1a5
/app/src/main/java/com/airhockey/android/objects/Mallet.java
9414482faefa157bd4400a872a5d3bd5e6ace751
[]
no_license
xiaonengmi/AirHockey
48b80174b6bc246de5d3f8ea20291f87c35b5117
79df964d6a6d388553eda40ce0b0a8a9779ee51e
refs/heads/master
2021-01-12T00:23:55.177526
2017-02-04T03:31:29
2017-02-04T03:31:29
78,719,426
0
0
null
null
null
null
UTF-8
Java
false
false
1,241
java
package com.airhockey.android.objects; import android.opengl.GLES20; import com.airhockey.android.Constants; import com.airhockey.android.data.VertexArray; import com.airhockey.android.programs.ColorShaderProgram; /** * Created by xinchen on 2017/2/3. */ public class Mallet { private static final int POSITION_COMPONENT_COUNT = 2; private static final int COLOR_COMPONENT_COUNT = 3; private static final int STRIDE = (POSITION_COMPONENT_COUNT + COLOR_COMPONENT_COUNT) * Constants.BYTES_PER_FLOAT; private static final float[] VERTEX_DATA = { 0f, -0.4f, 0f, 0f, 1f, 0f, 0.4f, 1f, 0f, 0f }; private final VertexArray vertexArray; public Mallet() { vertexArray = new VertexArray(VERTEX_DATA); } public void bindData(ColorShaderProgram colorProgram) { vertexArray.setVertexAttribPointer(0, colorProgram.getPositionAttributeLocation(), POSITION_COMPONENT_COUNT, STRIDE); vertexArray.setVertexAttribPointer(POSITION_COMPONENT_COUNT, colorProgram.getColorAttributeLocation(), COLOR_COMPONENT_COUNT, STRIDE); } public void draw() { GLES20.glDrawArrays(GLES20.GL_POINTS, 0, 2); } }
[ "chenxin11@le.com" ]
chenxin11@le.com
5370ab10a7effd9c378d6af41a37a59aa95d5557
076afacf9397f53f957659d5ad0996ee9305c8f9
/gen/fr/univpau/todolist_premium/R.java
244abae81f0d5f0fb32c04af69a17714da68b4b7
[]
no_license
kchristi/todolist_premium
cd0887a686a4324a6793676e8f8d0c95ca387368
c0836ec210732f6331df0ff22f83f36204f45538
refs/heads/master
2021-01-10T09:39:25.065786
2015-11-22T10:02:25
2015-11-22T10:02:25
46,654,932
0
0
null
null
null
null
UTF-8
Java
false
false
2,648
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 fr.univpau.todolist_premium; public final class R { public static final class attr { } public static final class drawable { public static final int background=0x7f020000; public static final int ic_launcher=0x7f020001; public static final int plus=0x7f020002; public static final int tile=0x7f020003; } public static final class id { public static final int add_button=0x7f070001; public static final int editText_source=0x7f070000; public static final int itemCheck=0x7f070003; public static final int listView=0x7f070002; public static final int menu_preference=0x7f070007; public static final int menu_vider=0x7f070006; public static final int taskDate=0x7f070005; public static final int taskName=0x7f070004; } public static final class layout { public static final int activity_main=0x7f030000; public static final int todo_list_item=0x7f030001; } public static final class menu { public static final int todo_menu=0x7f060000; } public static final class string { public static final int app_name=0x7f040000; public static final int hello_world=0x7f040001; public static final int menu_preference=0x7f040003; public static final int menu_vider=0x7f040002; } public static final class style { /** Base application theme, dependent on API level. This theme is replaced by AppBaseTheme from res/values-vXX/styles.xml on newer devices. Theme customizations available in newer API levels can go in res/values-vXX/styles.xml, while customizations related to backward-compatibility can go here. Base application theme for API 11+. This theme completely replaces AppBaseTheme from res/values/styles.xml on API 11+ devices. API 11 theme customizations can go here. Base application theme for API 14+. This theme completely replaces AppBaseTheme from BOTH res/values/styles.xml and res/values-v11/styles.xml on API 14+ devices. API 14 theme customizations can go here. */ public static final int AppBaseTheme=0x7f050000; /** Application theme. All customizations that are NOT specific to a particular API-level can go here. */ public static final int AppTheme=0x7f050001; } }
[ "kevin.christine.64@gmail.com" ]
kevin.christine.64@gmail.com
106656ffe1f9272449b380c6c66f7e2d0b247a53
18c129d825e69465113b8e015bdeca9d11989556
/src/com/eagle/hacks/mode/Item.java
6f1085394ed53b58e92addf2440d1b6de8e7636a
[]
no_license
eagle0824/AndroidHacks
e4055542a36cc19445d44e53002913b8d97b7417
82cd226fbced94812129fe5b7bdb8eb02010c9a4
refs/heads/master
2020-05-17T18:59:42.316478
2015-04-10T10:16:30
2015-04-10T10:16:30
32,975,491
0
0
null
null
null
null
UTF-8
Java
false
false
2,002
java
package com.eagle.hacks.mode; public class Item { private String mTitle; private String mPackage; private String mClass; private boolean mEnabled = true; public Item(Buidler builder) { mTitle = builder.title; mPackage = builder.packageName; mClass = builder.className; mEnabled = builder.enable; } public Item(String className) { mClass = className; } public String getClassName() { return mClass; } public String getTitle() { return mTitle; } public void setTitle(String title) { this.mTitle = title; } public String getPackage() { return mPackage; } public void setPackage(String packageName) { this.mPackage = packageName; } public boolean isEnabled() { return mEnabled; } public void setEnabled(boolean enabled) { this.mEnabled = enabled; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("Item title : ").append(mTitle); sb.append(" class : ").append(mClass); sb.append(" package : ").append(mPackage); sb.append(" enabled : ").append(mEnabled); return sb.toString(); } public static class Buidler { private String className; private String packageName; private String title; private boolean enable = true; public Buidler(String className) { this.className = className; } public Buidler setPackageName(String packageName) { this.packageName = packageName; return this; } public Buidler setTitle(String title) { this.title = title; return this; } public Buidler setEnabled(boolean enabled) { this.enable = enabled; return this; } public Item build() { return new Item(this); } } }
[ "l22k77@163.com" ]
l22k77@163.com
0bc5ca33e074a3ca7880f84eeb01bbc1c286fe1d
a3b40f0484cee30e9b9cb105242e9f87377f50c9
/app/src/main/java/com/example/mainscreen/RecyclerViewAdapter.java
a02715143c4c6f71e3125f62a1f56ce43aad40c0
[]
no_license
eunjijeon11/2020_TR
bf0d16ef8b7fd7c52ac7ee549074f4c3bb49b4f0
f5372e02568327e1eec55c8cb66cb55bd32e6ad6
refs/heads/master
2023-07-10T12:09:09.858695
2021-09-05T04:45:19
2021-09-05T04:45:19
257,248,827
2
0
null
null
null
null
UTF-8
Java
false
false
1,443
java
package com.example.mainscreen; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import java.util.ArrayList; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; public class RecyclerViewAdapter extends RecyclerView.Adapter<RecyclerViewAdapter.ViewHolder> { private ArrayList<Data> items = new ArrayList<>(); public class ViewHolder extends RecyclerView.ViewHolder { ImageView ox; ImageView ox_quiz; public ViewHolder(@NonNull View itemView) { super(itemView); ox = itemView.findViewById(R.id.ox); ox_quiz = itemView.findViewById(R.id.ox_quiz); } void onbind(Data data) { ox.setImageResource(data.getoxId()); ox_quiz.setImageBitmap(data.getoxquizId()); } } @NonNull @Override public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.ox_recyclerview,parent,false); return new ViewHolder(v); } @Override public void onBindViewHolder(@NonNull ViewHolder holder, int position) { holder.onbind(items.get(position)); } @Override public int getItemCount() { return items.size(); } void addItem(Data data) { items.add(data); } }
[ "eunjiamy@naver.com" ]
eunjiamy@naver.com
873d1437e97ec78e202fd109be2b43da77d2cadf
6186363f507d38c53bd827642e12a761371a3b3f
/src/main/java/poc/CustomAuthenticationProvider.java
3cf8704565aef0d1cf42fb634d5ba0e85feceb52
[]
no_license
ZoltanSzabo/adldsPoc
da83502b8642f5f7164aa10611031762ffc58bf0
21a9f4d64e1c143a0a011624d0da0955f08603d7
refs/heads/master
2020-03-24T00:11:12.515306
2018-07-25T09:28:52
2018-07-25T09:28:52
142,277,829
0
0
null
null
null
null
UTF-8
Java
false
false
11,300
java
package poc; import org.springframework.dao.IncorrectResultSizeDataAccessException; import org.springframework.ldap.core.DirContextOperations; import org.springframework.ldap.core.DistinguishedName; import org.springframework.ldap.core.support.DefaultDirObjectFactory; import org.springframework.ldap.support.LdapUtils; import org.springframework.security.authentication.*; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.AuthorityUtils; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.security.ldap.SpringSecurityLdapTemplate; import org.springframework.security.ldap.authentication.AbstractLdapAuthenticationProvider; import org.springframework.util.Assert; import org.springframework.util.StringUtils; import javax.naming.AuthenticationException; import javax.naming.Context; import javax.naming.NamingException; import javax.naming.OperationNotSupportedException; import javax.naming.directory.DirContext; import javax.naming.directory.SearchControls; import javax.naming.ldap.InitialLdapContext; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Hashtable; import java.util.regex.Matcher; import java.util.regex.Pattern; public final class CustomAuthenticationProvider extends AbstractLdapAuthenticationProvider { private static final Pattern SUB_ERROR_CODE = Pattern.compile(".*data\\s([0-9a-f]{3,4}).*"); // Error codes private static final int USERNAME_NOT_FOUND = 0x525; private static final int INVALID_PASSWORD = 0x52e; private static final int NOT_PERMITTED = 0x530; private static final int PASSWORD_EXPIRED = 0x532; private static final int ACCOUNT_DISABLED = 0x533; private static final int ACCOUNT_EXPIRED = 0x701; private static final int PASSWORD_NEEDS_RESET = 0x773; private static final int ACCOUNT_LOCKED = 0x775; private final String domain; private final String rootDn; private final String url; private boolean convertSubErrorCodesToExceptions; private String searchFilter = "(&(objectClass=user)(userPrincipalName={0}))"; // Only used to allow tests to substitute a mock LdapContext ContextFactory contextFactory = new ContextFactory(); /** * @param domain the domain name (may be null or empty) * @param url an LDAP url (or multiple URLs) */ public CustomAuthenticationProvider(String domain, String url, String rootDn) { Assert.isTrue(StringUtils.hasText(url), "Url cannot be empty"); this.domain = StringUtils.hasText(domain) ? domain.toLowerCase() : null; this.url = url; this.rootDn = rootDn; } @Override protected DirContextOperations doAuthentication(UsernamePasswordAuthenticationToken auth) { String username = auth.getName(); String password = (String) auth.getCredentials(); DirContext ctx = bindAsUser(username, password); try { return searchForUser(ctx, username); } catch (NamingException e) { logger.error("Failed to locate directory entry for authenticated user: " + username, e); throw badCredentials(e); } finally { LdapUtils.closeContext(ctx); } } /** * Creates the user authority list from the values of the {@code memberOf} attribute obtained from the user's * Active Directory entry. */ @Override protected Collection<? extends GrantedAuthority> loadUserAuthorities(DirContextOperations userData, String username, String password) { String[] groups = userData.getStringAttributes("memberOf"); if (groups == null) { logger.debug("No values for 'memberOf' attribute."); return AuthorityUtils.NO_AUTHORITIES; } if (logger.isDebugEnabled()) { logger.debug("'memberOf' attribute values: " + Arrays.asList(groups)); } ArrayList<GrantedAuthority> authorities = new ArrayList<GrantedAuthority>(groups.length); for (String group : groups) { authorities.add(new SimpleGrantedAuthority(new DistinguishedName(group).removeLast().getValue())); } return authorities; } private DirContext bindAsUser(String username, String password) { // TODO. add DNS lookup based on domain final String bindUrl = url; Hashtable<String, String> env = new Hashtable<String, String>(); env.put(Context.SECURITY_AUTHENTICATION, "simple"); String bindPrincipal = createBindPrincipal(username); env.put(Context.SECURITY_PRINCIPAL, bindPrincipal); env.put(Context.PROVIDER_URL, bindUrl); env.put(Context.SECURITY_CREDENTIALS, password); env.put(Context.REFERRAL, "follow"); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); env.put(Context.OBJECT_FACTORIES, DefaultDirObjectFactory.class.getName()); try { return contextFactory.createContext(env); } catch (NamingException e) { if ((e instanceof AuthenticationException) || (e instanceof OperationNotSupportedException)) { handleBindException(bindPrincipal, e); throw badCredentials(e); } else { throw LdapUtils.convertLdapException(e); } } } private void handleBindException(String bindPrincipal, NamingException exception) { if (logger.isDebugEnabled()) { logger.debug("Authentication for " + bindPrincipal + " failed:" + exception); } int subErrorCode = parseSubErrorCode(exception.getMessage()); if (subErrorCode <= 0) { logger.debug("Failed to locate AD-specific sub-error code in message"); return; } logger.info("Active Directory authentication failed: " + subCodeToLogMessage(subErrorCode)); if (convertSubErrorCodesToExceptions) { raiseExceptionForErrorCode(subErrorCode, exception); } } private int parseSubErrorCode(String message) { Matcher m = SUB_ERROR_CODE.matcher(message); if (m.matches()) { return Integer.parseInt(m.group(1), 16); } return -1; } private void raiseExceptionForErrorCode(int code, NamingException exception) { String hexString = Integer.toHexString(code); // Throwable cause = new ActiveDirectoryAuthenticationException(hexString, exception.getMessage(), exception); switch (code) { case PASSWORD_EXPIRED: throw new CredentialsExpiredException(messages.getMessage("LdapAuthenticationProvider.credentialsExpired", "User credentials have expired")); case ACCOUNT_DISABLED: throw new DisabledException(messages.getMessage("LdapAuthenticationProvider.disabled", "User is disabled")); case ACCOUNT_EXPIRED: throw new AccountExpiredException(messages.getMessage("LdapAuthenticationProvider.expired", "User account has expired")); case ACCOUNT_LOCKED: throw new LockedException(messages.getMessage("LdapAuthenticationProvider.locked", "User account is locked")); default: throw badCredentials(); } } private String subCodeToLogMessage(int code) { switch (code) { case USERNAME_NOT_FOUND: return "User was not found in directory"; case INVALID_PASSWORD: return "Supplied password was invalid"; case NOT_PERMITTED: return "User not permitted to logon at this time"; case PASSWORD_EXPIRED: return "Password has expired"; case ACCOUNT_DISABLED: return "Account is disabled"; case ACCOUNT_EXPIRED: return "Account expired"; case PASSWORD_NEEDS_RESET: return "User must reset password"; case ACCOUNT_LOCKED: return "Account locked"; } return "Unknown (error code " + Integer.toHexString(code) + ")"; } private BadCredentialsException badCredentials() { return new BadCredentialsException(messages.getMessage( "LdapAuthenticationProvider.badCredentials", "Bad credentials")); } private BadCredentialsException badCredentials(Throwable cause) { return (BadCredentialsException) badCredentials().initCause(cause); } private DirContextOperations searchForUser(DirContext context, String username) throws NamingException { SearchControls searchControls = new SearchControls(); searchControls.setSearchScope(SearchControls.SUBTREE_SCOPE); String bindPrincipal = createBindPrincipal(username); String searchRoot = rootDn != null ? rootDn : searchRootFromPrincipal(bindPrincipal); try { String verifyName = username; if (username.indexOf("@") != -1) { verifyName = username.substring(0, username.indexOf("@")); } return SpringSecurityLdapTemplate.searchForSingleEntryInternal(context, searchControls, searchRoot, searchFilter, new Object[]{verifyName}); } catch (IncorrectResultSizeDataAccessException incorrectResults) { // Search should never return multiple results if properly configured - just rethrow if (incorrectResults.getActualSize() != 0) { throw incorrectResults; } // If we found no results, then the username/password did not match UsernameNotFoundException userNameNotFoundException = new UsernameNotFoundException("User " + username + " not found in directory.", incorrectResults); throw badCredentials(userNameNotFoundException); } } private String searchRootFromPrincipal(String bindPrincipal) { int atChar = bindPrincipal.lastIndexOf('@'); if (atChar < 0) { logger.debug("User principal '" + bindPrincipal + "' does not contain the domain, and no domain has been configured"); throw badCredentials(); } return rootDnFromDomain(bindPrincipal.substring(atChar + 1, bindPrincipal.length())); } private String rootDnFromDomain(String domain) { String[] tokens = StringUtils.tokenizeToStringArray(domain, "."); StringBuilder root = new StringBuilder(); for (String token : tokens) { if (root.length() > 0) { root.append(','); } root.append("dc=").append(token); } return root.toString(); } String createBindPrincipal(String username) { if (domain == null || username.toLowerCase().endsWith(domain)) { return username; } return username + "@" + domain; } /** * By default, a failed authentication (LDAP error 49) will result in a {@code BadCredentialsException}. * <p> * If this property is set to {@code true}, the exception message from a failed bind attempt will be parsed * for the AD-specific error code and a {@link CredentialsExpiredException}, {@link DisabledException}, * {@link AccountExpiredException} or {@link LockedException} will be thrown for the corresponding codes. All * other codes will result in the default {@code BadCredentialsException}. * * @param convertSubErrorCodesToExceptions {@code true} to raise an exception based on the AD error code. */ public void setConvertSubErrorCodesToExceptions(boolean convertSubErrorCodesToExceptions) { this.convertSubErrorCodesToExceptions = convertSubErrorCodesToExceptions; } /** * The LDAP filter string to search for the user being authenticated. * Occurrences of {0} are replaced with the {@code username@domain}. * <p> * Defaults to: {@code (&(objectClass=user)(userPrincipalName={0}))} * </p> * * @param searchFilter the filter string * @since 3.2.6 */ public void setSearchFilter(String searchFilter) { Assert.hasText(searchFilter, "searchFilter must have text"); this.searchFilter = searchFilter; } static class ContextFactory { DirContext createContext(Hashtable<?, ?> env) throws NamingException { return new InitialLdapContext(env, null); } } }
[ "szabo.zoltan@sonrisa.hu" ]
szabo.zoltan@sonrisa.hu
3a01558f194a5ed21520108d7a7760de7424723a
9a2c156daf6127fdd4a126de7932d947ba32b560
/OnlineBookStore/src/test/java/com/bookstore/order/OnlineBookStoreApplicationTests.java
653885c40f49785e5803bc08a6237865fad8c09c
[]
no_license
anjali-12/OnlineBookingSystem-orderHistory
cb535d4ce1410257c46a47385063c13b6647d2e5
ee0099f2caeca7bca2c442ede1a3938c45e6d806
refs/heads/master
2022-11-24T03:24:17.950103
2020-07-25T15:06:13
2020-07-25T15:06:13
280,136,764
0
0
null
null
null
null
UTF-8
Java
false
false
220
java
package com.bookstore.order; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class OnlineBookStoreApplicationTests { @Test void contextLoads() { } }
[ "anjalisharmarnq@gmail.com" ]
anjalisharmarnq@gmail.com
e1a50ddd46dbdf0a2b32173f174fa9fa167a7900
7c20e36b535f41f86b2e21367d687ea33d0cb329
/Capricornus/src/com/gopawpaw/erp/hibernate/g/GlcdDet.java
7c49b84c7ce03015351a9a6730fafa4449a06d90
[]
no_license
fazoolmail89/gopawpaw
50c95b924039fa4da8f309e2a6b2ebe063d48159
b23ccffce768a3d58d7d71833f30b85186a50cc5
refs/heads/master
2016-09-08T02:00:37.052781
2014-05-14T11:46:18
2014-05-14T11:46:18
35,091,153
1
1
null
null
null
null
UTF-8
Java
false
false
662
java
package com.gopawpaw.erp.hibernate.g; /** * GlcdDet entity. @author MyEclipse Persistence Tools */ public class GlcdDet extends AbstractGlcdDet implements java.io.Serializable { // Constructors /** default constructor */ public GlcdDet() { } /** minimal constructor */ public GlcdDet(GlcdDetId id, Double oidGlcdDet) { super(id, oidGlcdDet); } /** full constructor */ public GlcdDet(GlcdDetId id, Boolean glcdGlClsd, Boolean glcdClosed, Boolean glcdYrClsd, String glcdUser1, String glcdUser2, String glcdQadc01, Double oidGlcdDet) { super(id, glcdGlClsd, glcdClosed, glcdYrClsd, glcdUser1, glcdUser2, glcdQadc01, oidGlcdDet); } }
[ "ahuaness@b3021582-c689-11de-ba9a-9db95b2bc6c5" ]
ahuaness@b3021582-c689-11de-ba9a-9db95b2bc6c5
6b8724fe228fea1ad9f7e2eeb80d0ef5036406ac
03fe7cbe1371ff94b912b94201daa62f6ff41468
/src/main/java/com/springboot/joyson/demospringbootmybatis/DemoSpringBootMybatisApplication.java
8f0cc7e6552b59ec3b5ac6840851b73a8f16ae0e
[]
no_license
xuyong813/springboot-mybatis
b17e74a4b2feb58485dbec0ef704293b46b358e1
558d7093b270792f323b45a4ffff943ed536e514
refs/heads/master
2020-03-25T20:31:13.564124
2018-08-10T00:55:39
2018-08-10T00:55:39
144,134,535
0
0
null
null
null
null
UTF-8
Java
false
false
377
java
package com.springboot.joyson.demospringbootmybatis; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class DemoSpringBootMybatisApplication { public static void main(String[] args) { SpringApplication.run(DemoSpringBootMybatisApplication.class, args); } }
[ "xuyong@uniudc.com" ]
xuyong@uniudc.com
c8df1637f875188ae414c02298f083faa4a252cb
f3461d2e9a86ff7b0655436ef653e5865bf01902
/EclipseWorkspace/spring-starter/src/main/java/com/w/Address.java
8947896431466ca625a0b3f0a94f26a4d076a6b2
[]
no_license
DipeshHarijan/cts-workspace
ed4d8d0983d3ba534634986a05acc5cf87019609
fc4df0b963cebfe63b5a948c701042350d9f88fc
refs/heads/master
2023-01-21T09:11:23.788726
2020-03-11T12:27:49
2020-03-11T12:27:49
234,142,837
0
0
null
2023-01-07T14:34:47
2020-01-15T18:12:16
Java
UTF-8
Java
false
false
325
java
package com.w; public class Address { String location; long pinCode; public String getLocation() { return location; } public void setLocation(String location) { this.location = location; } public long getPinCode() { return pinCode; } public void setPinCode(long pinCode) { this.pinCode = pinCode; } }
[ "dipeshharijan1122@gmail.com" ]
dipeshharijan1122@gmail.com
451cf71b67a85e4c20af1dca8e345769bdf006ea
159aef4c5a7e65139db9e3ac1a7314e807ed56e0
/app/src/test/java/com/androidlokomedia/filedemo/ExampleUnitTest.java
ca8f15fee8ed0bca15997679f3ff45b2a6e89017
[]
no_license
ahmadss/FileDemo
f21586364fb733733589f29252eb24749b2fadea
0ddfe78eb9d921a473a1ad6bc956e1f5927d56a6
refs/heads/master
2021-04-28T21:49:27.950119
2016-12-31T09:51:33
2016-12-31T09:51:33
77,734,668
0
0
null
null
null
null
UTF-8
Java
false
false
322
java
package com.androidlokomedia.filedemo; import org.junit.Test; import static org.junit.Assert.*; /** * To work on unit tests, switch the Test Artifact in the Build Variants view. */ public class ExampleUnitTest { @Test public void addition_isCorrect() throws Exception { assertEquals(4, 2 + 2); } }
[ "saifuddinahmad12@gmail.com" ]
saifuddinahmad12@gmail.com
7933b75e55a567a7ebbf66c18a76c8a12dd708c6
3b37cefa18f5631f53858a335fbbd1ba2da0de76
/target/generated-sources/annotations/com/requerimientos/requerimientospro/entidades/Orden_.java
7f5c099535b98a27c3c3db8436dee5572e85de27
[]
no_license
egudino484/requerimientospro
de80e7da5d2ffd371d24ae8aaa421fcdd46bbe21
8198254f2984254611366c27d39bd04c83e29863
refs/heads/master
2020-04-22T03:11:11.329496
2019-02-20T14:35:48
2019-02-20T14:35:48
170,076,762
0
0
null
null
null
null
UTF-8
Java
false
false
470
java
package com.requerimientos.requerimientospro.entidades; import javax.annotation.Generated; import javax.persistence.metamodel.SingularAttribute; import javax.persistence.metamodel.StaticMetamodel; @Generated(value="EclipseLink-2.5.2.v20140319-rNA", date="2019-02-20T03:00:01") @StaticMetamodel(Orden.class) public class Orden_ { public static volatile SingularAttribute<Orden, String> descripcion; public static volatile SingularAttribute<Orden, Long> id; }
[ "" ]
8d82b6b8ac4da9b7885527c7f143347b356bd6d0
4688d19282b2b3b46fc7911d5d67eac0e87bbe24
/aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/waiters/DescribeNatGatewaysFunction.java
01648ae1f152679b3211d5349b3ab9489aabf03b
[ "Apache-2.0" ]
permissive
emilva/aws-sdk-java
c123009b816963a8dc86469405b7e687602579ba
8fdbdbacdb289fdc0ede057015722b8f7a0d89dc
refs/heads/master
2021-05-13T17:39:35.101322
2018-12-12T13:11:42
2018-12-12T13:11:42
116,821,450
1
0
Apache-2.0
2018-09-19T04:17:41
2018-01-09T13:45:39
Java
UTF-8
Java
false
false
1,968
java
/* * Copyright 2013-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.ec2.waiters; import javax.annotation.Generated; import com.amazonaws.annotation.SdkInternalApi; import com.amazonaws.waiters.SdkFunction; import com.amazonaws.services.ec2.model.DescribeNatGatewaysRequest; import com.amazonaws.services.ec2.model.DescribeNatGatewaysResult; import com.amazonaws.services.ec2.AmazonEC2; @SdkInternalApi @Generated("com.amazonaws:aws-java-sdk-code-generator") public class DescribeNatGatewaysFunction implements SdkFunction<DescribeNatGatewaysRequest, DescribeNatGatewaysResult> { /** * Represents the service client */ private final AmazonEC2 client; /** * Constructs a new DescribeNatGatewaysFunction with the given client * * @param client * Service client */ public DescribeNatGatewaysFunction(AmazonEC2 client) { this.client = client; } /** * Makes a call to the operation specified by the waiter by taking the corresponding request and returns the * corresponding result * * @param describeNatGatewaysRequest * Corresponding request for the operation * @return Corresponding result of the operation */ @Override public DescribeNatGatewaysResult apply(DescribeNatGatewaysRequest describeNatGatewaysRequest) { return client.describeNatGateways(describeNatGatewaysRequest); } }
[ "" ]
e45bf44617955038beec9f9f22c999361400e9ad
abda16e051b78404102e5af67afacefa364134fb
/openAPI/src/main/java/jetbrains/exodus/env/Transaction.java
fdc6080969e3a7dbd8898535be50af9c32372c94
[ "Apache-2.0" ]
permissive
yusuke/xodus
c000e9dc098d58e1e30f6d912ab5283650d3f5c0
f84bb539ec16d96136d35600eb6f0966cc7b3b07
refs/heads/master
2023-09-04T12:35:52.294475
2017-12-01T18:46:24
2017-12-01T18:46:52
112,916,407
0
0
null
2017-12-03T09:46:15
2017-12-03T09:46:15
null
UTF-8
Java
false
false
6,690
java
/** * Copyright 2010 - 2017 JetBrains s.r.o. * * 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 jetbrains.exodus.env; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; /** * Transaction is required for any access to data in database. Any transaction holds a database snapshot (version * of the database), thus providing <a href="https://en.wikipedia.org/wiki/Snapshot_isolation">snapshot isolation</a>. * <p>All changes made in a transaction are atomic and consistent if they are successfully flushed or committed. * Along with snapshot isolation and configurable durability, transaction are fully * <a href="https://en.wikipedia.org/wiki/ACID">ACID-compliant</a>. * By default, transaction durability is turned off since it significantly slows down {@linkplain #flush()}and * {@linkplain #commit()}. To turn it on, pass {@code true} to {@linkplain EnvironmentConfig#setLogDurableWrite(boolean)}. * <p>Transactions can be read-only or not, exclusive or not. Read-only transactions are used to only read data. * Exclusive transactions are used to have successive access to database. If you have an exclusive transaction, * no other transaction (except read-only) can be started against the same {@linkplain Environment} unless you * finish (commit or abort) your exclusive one. * <p>Given you have an instance of {@linkplain Environment} you can start new transaction: * <pre> * final Transaction txn = environment.beginTransaction(); * </pre> * Starting read-only transaction: * <pre> * final Transaction txn = environment.beginReadonlyTransaction(); * </pre> * Starting exclusive transaction: * <pre> * final Transaction txn = environment.beginExclusiveTransaction(); * </pre> * * @see Environment * @see Environment#beginTransaction() * @see Environment#beginReadonlyTransaction() * @see Environment#beginExclusiveTransaction() * @see EnvironmentConfig#setLogDurableWrite(boolean) */ public interface Transaction { /** * Idempotent transaction changes nothing in database. It doesn't matter whether you flush it or revert, * commit or abort. Result will be the same - nothing will be added, modified or deleted. Flushing idempotent * transaction is trivial, {@linkplain #flush()} just does nothing and returns {@code true}. Each newly created * transaction is idempotent. * * @return {@code true} if transaction is idempotent * @see #flush() * @see #commit() */ boolean isIdempotent(); /** * Drops all changes and finishes the transaction. * * @see #commit() * @see #flush() * @see #revert() * @see #isFinished() */ void abort(); /** * Tries to flush all changes accumulated to the moment in the transaction and finish the transaction. If it * returns {@code true} all changes are flushed and transaction is finished, otherwise nothing is flushed and * transaction is not finished. * * @return {@code true} if transaction is committed * @see #flush() * @see #abort() * @see #revert() * @see #isFinished() */ boolean commit(); /** * Tries to flush all changes accumulated to the moment in the transaction. Returns {@code true} if flush succeeded. * In that case, transaction remains unfinished and holds the newest database snapshot. * * @return {@code true} if transaction is flushed * @see #commit() * @see #abort() * @see #revert() * @see #isFinished() */ boolean flush(); /** * Drops all changes without finishing the transaction and holds the newest database snapshot. * * @see #commit() * @see #abort() * @see #flush() * @see #isFinished() */ void revert(); /** * Creates new transaction holding the same database snapshot as this one holds. * * @return new transaction holding the same database snapshot * @see Environment#beginTransaction() */ Transaction getSnapshot(); /** * Creates new transaction with specified begin hook holding the same database snapshot as this one holds. * * @param beginHook begin hook * @return new transaction holding the same database snapshot * @see Environment#beginTransaction(Runnable) */ Transaction getSnapshot(@Nullable Runnable beginHook); /** * Creates new read-only transaction holding the same database snapshot as this one holds. * * @return new read-only transaction holding the same database snapshot * @see Environment#beginReadonlyTransaction() */ Transaction getReadonlySnapshot(); /** * @return {@linkplain Environment} instance against which the transaction was created. */ @NotNull Environment getEnvironment(); /** * Provides transaction with commit hook. Commit hook is called if and only if the transaction is going to be * successfully flushed or committed. That is, {@code hook.run()} is called when you call {@linkplain #flush()} or * {@linkplain #commit()}, and any of these methods will definitely succeed and return {@code true}. * * @param hook commit hook * @see #flush() * @see #commit() */ void setCommitHook(@Nullable Runnable hook); /** * Time when the transaction acquired its database snapshot, i.e. time when it was started, * reverted or successfully flushed (committed). * * @return the difference (in milliseconds) between current time and midnight, January 1, 1970 UTC. */ long getStartTime(); /** * @return the value of Log.getHighAddress() that was actual when the transaction was started. */ long getHighAddress(); /** * @return true if the transaction is read-only. */ boolean isReadonly(); /** * @return true if the transaction was started as exclusive one * @see Environment#beginExclusiveTransaction() */ boolean isExclusive(); /** * @return true if the transaction is finished, committed or aborted * @see #commit() * @see #abort() */ boolean isFinished(); }
[ "lvo@intellij.net" ]
lvo@intellij.net
40ac8859662128f83fd469d0ba3ff62a00285780
f6089cdd04bbb212911683dbbe01aeda941400dc
/SmartLock/src/com/example/smartlock/pager/LockPager.java
a4a4be0944a6e220cd38feeeeec6b80face4d866
[]
no_license
hanyonggithub/SmartLock
c767b09cdca6c2b84d3f7a9b5f5af17d4efb353d
c20956b81a5feb811f24bc2c94b7ce8a00ea4b27
refs/heads/master
2021-01-10T11:33:26.629585
2016-03-31T04:27:37
2016-03-31T04:27:37
55,119,312
0
0
null
null
null
null
UTF-8
Java
false
false
558
java
package com.example.smartlock.pager; import android.content.Context; import android.widget.Switch; import com.example.smartlock.R; import com.example.smartlock.base.BasePager; public class LockPager extends BasePager { public LockPager(Context context) { super(context); } @Override public void initData() { super.initData(); fl_left_btn.removeAllViews(); Switch switcher =new Switch(mContext); fl_left_btn.addView(switcher); fl_right_btn.setBackgroundResource(R.drawable.refresh); tv_center_text.setText(R.string.title_list); } }
[ "1039789221@qq.com" ]
1039789221@qq.com
a98a80a77237c444064ea499603ac9b56921c7f4
6daa1abb670e19c65bce4b32cd1f366416d88204
/battery-gateway/src/main/java/com/soundgroup/battery/logic/HttpProcessRunnable.java
a614c1b783945612674b09efb0a73cd30350316a
[]
no_license
sengeiou/undefined
13a13c4c59ec9495cac95ce431e7408811ddb7fb
02b15c7360897b3b54de230d1706b6c106eda1bf
refs/heads/master
2020-06-04T16:03:41.804483
2018-07-10T07:29:09
2018-07-10T07:29:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,998
java
package com.soundgroup.battery.logic; import static io.netty.handler.codec.http.HttpHeaders.Names.CONTENT_TYPE; import io.netty.channel.ChannelFutureListener; import io.netty.channel.ChannelHandlerContext; import io.netty.handler.codec.http.DefaultFullHttpResponse; import io.netty.handler.codec.http.FullHttpRequest; import io.netty.handler.codec.http.FullHttpResponse; import io.netty.handler.codec.http.HttpHeaders; import io.netty.handler.codec.http.HttpResponseStatus; import io.netty.handler.codec.http.HttpVersion; import io.netty.handler.codec.http.QueryStringDecoder; import io.netty.util.ReferenceCountUtil; import java.util.HashMap; import java.util.Map; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import org.apache.log4j.Logger; public class HttpProcessRunnable implements Runnable { private static final Logger LOG = Logger.getLogger(HttpProcessRunnable.class); public static final Map<String, HttpProcess> ROUTE = new HashMap<String, HttpProcess>(); public static final ExecutorService EXECUTOR = Executors.newCachedThreadPool(); private ChannelHandlerContext ctx; private FullHttpRequest req; private boolean retain = false; public HttpProcessRunnable(ChannelHandlerContext ctx, FullHttpRequest req) { super(); this.ctx = ctx; this.req = req; req.retain(); retain = true; } public void run() { try { QueryStringDecoder queryStringDecoder = new QueryStringDecoder(req.getUri()); String path = queryStringDecoder.path(); HttpProcess process = ROUTE.get(path); if (process == null) { LOG.info("404 at=:"+req.getUri()); FullHttpResponse res = new DefaultFullHttpResponse(HttpVersion.HTTP_1_1, HttpResponseStatus.OK); res.setStatus(HttpResponseStatus.NOT_FOUND); res.content().writeBytes("404无效资源".getBytes()); HttpHeaders.setContentLength(res, res.content().readableBytes()); res.headers().set(CONTENT_TYPE, "text/html;charset=UTF-8"); ctx.channel().writeAndFlush(res).addListener(ChannelFutureListener.CLOSE); } else { process.execute(ctx, req,new HashMap<String,Object>()); } } catch (Exception e) { LOG.error("执行http业务error", e); ctx.close(); } finally { if (retain) { ReferenceCountUtil.release(req); retain = false; } LOG.info("after run ref release req=:"+req.refCnt()); } } @Override protected void finalize() throws Throwable { try { if (retain) { ReferenceCountUtil.release(req); retain = false; } LOG.info("after finalize ref release req=:"+req.refCnt()); } finally { super.finalize(); } } }
[ "root@centos.(none)" ]
root@centos.(none)
f8f1d4f6d3f200740bf5ffbdfe230f10df270299
db77908c40c076bb713c1b00fd633457658964a3
/common/ifs-resources/src/main/java/org/innovateuk/ifs/invite/resource/CompetitionFinanceInviteResource.java
25fddcae40545ca46fac84ae2b48abddb6279880
[ "MIT" ]
permissive
InnovateUKGitHub/innovation-funding-service
e3807613fd3c398931918c6cc773d13874331cdc
964969b6dc9c78750738ef683076558cc897c1c8
refs/heads/development
2023-08-04T04:04:05.501037
2022-11-11T14:48:30
2022-11-11T14:48:30
87,336,871
30
20
MIT
2023-07-19T21:23:46
2017-04-05T17:20:38
Java
UTF-8
Java
false
false
1,002
java
package org.innovateuk.ifs.invite.resource; import org.innovateuk.ifs.invite.constant.InviteStatus; public class CompetitionFinanceInviteResource { private long id; private String hash; private String email; private long competitionId; private InviteStatus status; public long getId() { return id; } public void setId(long id) { this.id = id; } public String getHash() { return hash; } public void setHash(String hash) { this.hash = hash; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public long getCompetitionId() { return competitionId; } public void setCompetitionId(long competition) { this.competitionId = competitionId; } public InviteStatus getStatus() { return status; } public void setStatus(InviteStatus status) { this.status = status; } }
[ "markd@iuk.ukri.org" ]
markd@iuk.ukri.org
e7a7f88f0ad008f76296ed4a4364caf2e37fd0ff
762a96fd78928044b4bf3f1d0898cfc24bad071a
/webapp/src/com/yahoo/petermwenda83/persistence/student/StudentDAO.java
1c781d2b209f363bff857b852346c77a68cc19a5
[]
no_license
msomi22/ChristianUnion
0a176eb1d40006df16d52a759ec5feb0297c054b
8fd0239b97a3f3765182f3385996e06ab046cb0b
refs/heads/master
2021-01-10T06:48:26.042796
2016-10-28T11:21:57
2016-10-28T11:21:57
44,550,626
0
0
null
null
null
null
UTF-8
Java
false
false
11,850
java
/**########################################################## * ### This is My Forth Year Project######################### * ####### Maasai Mara University############################ * ####### Year:2015-2016 ################################### * ####### Although this software is open source, No one * ###### should assume it ownership and copy paste * ###### the code herein without approval of from * ###### owner.############################################# * ########################################################## * ##### SchoolAccount Management System ########################### * ##### Uses MVC Model, Postgres database, ant for * ##### project management and other technologies. * ##### It consist Desktop application and a web * #### application all sharing the same DB. * ########################################################## * */ package com.yahoo.petermwenda83.persistence.student; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Timestamp; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.apache.commons.dbutils.BeanProcessor; import org.apache.commons.lang3.exception.ExceptionUtils; import org.apache.log4j.Logger; import com.yahoo.petermwenda83.bean.schoolaccount.SchoolAccount; import com.yahoo.petermwenda83.bean.student.Student; import com.yahoo.petermwenda83.persistence.GenericDAO; /** * @author peter<a href="mailto:mwendapeter72@gmail.com">Peter mwenda</a> * */ public class StudentDAO extends GenericDAO implements SchoolStudentDAO { private static StudentDAO studentDAO; private Logger logger = Logger.getLogger(this.getClass()); private BeanProcessor beanProcessor = new BeanProcessor(); public static StudentDAO getInstance(){ if(studentDAO == null){ studentDAO = new StudentDAO(); } return studentDAO; } /** * */ public StudentDAO() { super(); } /** * */ public StudentDAO(String databaseName, String Host, String databaseUsername, String databasePassword, int databasePort) { super(databaseName, Host, databaseUsername, databasePassword, databasePort); } /** * @see com.yahoo.petermwenda83.persistence.student.SchoolStudentDAO#getStudent(java.lang.String) */ @Override public Student getStudent(String Uuid) { Student student = null; ResultSet rset = null; try( Connection conn = dbutils.getConnection(); PreparedStatement pstmt = conn.prepareStatement("SELECT * FROM Student WHERE Uuid = ?;"); ){ pstmt.setString(1, Uuid); rset = pstmt.executeQuery(); while(rset.next()){ student = beanProcessor.toBean(rset,Student.class); } }catch(SQLException e){ logger.error("SQL Exception when getting an users with uuid: " + Uuid); logger.error(ExceptionUtils.getStackTrace(e)); } return student; } /** * @see com.yahoo.petermwenda83.persistence.student.SchoolStudentDAO#getStudents(java.lang.String) */ @Override public Student getStudents(String admno) { Student student = null; ResultSet rset = null; try( Connection conn = dbutils.getConnection(); PreparedStatement pstmt = conn.prepareStatement("SELECT * FROM Student WHERE admno = ?;"); ){ pstmt.setString(1, admno); rset = pstmt.executeQuery(); while(rset.next()){ student = beanProcessor.toBean(rset,Student.class); } }catch(SQLException e){ logger.error("SQL Exception when getting an users with admno: " + admno); logger.error(ExceptionUtils.getStackTrace(e)); } return student; } /** * @see com.yahoo.petermwenda83.persistence.student.SchoolStudentDAO#getStudentByName(com.yahoo.petermwenda83.bean.schoolaccount.SchoolAccount, java.lang.String) */ public List<Student> getStudentByName(SchoolAccount schoolaccount, String firstname) { List<Student> list = new ArrayList<>(); try ( Connection conn = dbutils.getConnection(); PreparedStatement pstmt = conn.prepareStatement("SELECT * FROM Student WHERE SchoolAccountUuid = ? " + "AND firstname ILIKE ?;"); ) { pstmt.setString(1, schoolaccount.getUuid()); pstmt.setString(2, "%" + firstname + "%"); try( ResultSet rset = pstmt.executeQuery();){ list = beanProcessor.toBeanList(rset, Student.class); } } catch (SQLException e) { logger.error("SQLException when getting Student of " + schoolaccount + " and student name '" + firstname + "'"); logger.error(ExceptionUtils.getStackTrace(e)); } Collections.sort(list); return list; } /** * @see com.yahoo.petermwenda83.persistence.student.SchoolStudentDAO#getStudentAdmNo(com.yahoo.petermwenda83.bean.schoolaccount.SchoolAccount, java.lang.String) */ @Override public List<Student> getStudentByAdmNo(String schoolaccountUuid, String admno ) { List<Student> list = new ArrayList<>(); try ( Connection conn = dbutils.getConnection(); PreparedStatement pstmt = conn.prepareStatement("SELECT * FROM Student WHERE SchoolAccountUuid = ? " + "AND admno ILIKE ? ORDER BY admno ASC LIMIT ? OFFSET ?;;"); ) { pstmt.setString(1, schoolaccountUuid); pstmt.setString(2, "%" + admno.toUpperCase() + "%"); pstmt.setInt(3, 15); pstmt.setInt(4, 0); try( ResultSet rset = pstmt.executeQuery();){ list = beanProcessor.toBeanList(rset, Student.class); } } catch (SQLException e) { logger.error("SQLException when getting Student of " + schoolaccountUuid + " and student admno '" + admno + "'"); logger.error(ExceptionUtils.getStackTrace(e)); } Collections.sort(list); return list; } /** * @see com.yahoo.petermwenda83.persistence.student.SchoolStudentDAO#putStudents(com.yahoo.petermwenda83.bean.student.Student) */ @Override public boolean putStudents(Student student) { boolean success = true; try( Connection conn = dbutils.getConnection(); PreparedStatement pstmt = conn.prepareStatement("INSERT INTO Student" +"(Uuid,SchoolAccountUuid, Firstname, Lastname,Surname,Admno,Year,DOB,Bcertno,SysUser,RegDate)" + " VALUES (?,?,?,?,?,?,?,?,?,?);"); ){ pstmt.setString(1, student.getUuid()); pstmt.setString(2, student.getSchoolAccountUuid()); pstmt.setString(3, student.getFirstname()); pstmt.setString(4, student.getLastname()); pstmt.setString(5, student.getSurname()); pstmt.setString(6, student.getAdmno()); // pstmt.setString(7, student.getYear()); // pstmt.setString(8, student.getDOB()); pstmt.setString(9, student.getBcertno()); pstmt.setString(10, student.getSysUser()); // pstmt.setTimestamp(11, new Timestamp(student.getRegDate().getTime())); pstmt.executeUpdate(); }catch(SQLException e){ logger.error("SQL Exception trying to put Student: "+student); logger.error(ExceptionUtils.getStackTrace(e)); success = false; } return success; } /** * @see com.yahoo.petermwenda83.persistence.student.SchoolStudentDAO#editStudents(com.yahoo.petermwenda83.bean.student.Student) */ @Override public boolean updateStudents(Student student) { boolean success = true; try( Connection conn = dbutils.getConnection(); PreparedStatement pstmt = conn.prepareStatement("UPDATE Student SET Firstname =?," +"Lastname =?,Surname =?,Year =?,DOB =?," + "Bcertno =?,SysUser =?,RegDate=? WHERE Admno = ? AND SchoolAccountUuid =?; "); ){ pstmt.setString(1, student.getFirstname()); pstmt.setString(2, student.getLastname()); pstmt.setString(3, student.getSurname()); //pstmt.setString(4, student.getYear()); //pstmt.setString(5, student.getDOB()); pstmt.setString(6, student.getBcertno()); pstmt.setString(7, student.getSysUser()); // pstmt.setTimestamp(8, new Timestamp(student.getRegDate().getTime())); pstmt.setString(9, student.getAdmno()); pstmt.setString(10, student.getSchoolAccountUuid()); pstmt.executeUpdate(); }catch(SQLException e){ logger.error("SQL Exception trying to put Student: "+student); logger.error(ExceptionUtils.getStackTrace(e)); System.out.println(ExceptionUtils.getStackTrace(e)); success = false; } return success; } /** * @see com.yahoo.petermwenda83.persistence.student.SchoolStudentDAO#deleteStudents(com.yahoo.petermwenda83.bean.student.Student) */ @Override public boolean deleteStudents(Student student) { boolean success = true; try( Connection conn = dbutils.getConnection(); PreparedStatement pstmt = conn.prepareStatement("DELETE FROM Student" + " WHERE Uuid = ? AND SchoolAccountUuid =?; "); ){ pstmt.setString(1, student.getUuid()); pstmt.setString(2, student.getSchoolAccountUuid()); pstmt.executeUpdate(); }catch(SQLException e){ logger.error("SQL Exception when deletting student : " +student); logger.error(ExceptionUtils.getStackTrace(e)); System.out.println(ExceptionUtils.getStackTrace(e)); success = false; } return success; } /** * @see com.yahoo.petermwenda83.persistence.student.SchoolStudentDAO#getAllStudents() */ @Override public List<Student> getAllStudents(String schoolaccountUuid) { List<Student> list = null; try( Connection conn = dbutils.getConnection(); PreparedStatement pstmt = conn.prepareStatement("SELECT * FROM Student;"); ResultSet rset = pstmt.executeQuery(); ) { list = beanProcessor.toBeanList(rset, Student.class); } catch(SQLException e){ logger.error("SQL Exception when getting all Student"); logger.error(ExceptionUtils.getStackTrace(e)); System.out.println(ExceptionUtils.getStackTrace(e)); } return list; } /** * @param schoolaccount * @param startIndex * @param endIndex * @return */ public List<Student> getStudentList (SchoolAccount schoolaccount , int startIndex , int endIndex){ List<Student> studentList = new ArrayList<>(); try( Connection conn = dbutils.getConnection(); PreparedStatement psmt= conn.prepareStatement("SELECT * FROM Student WHERE " + "SchoolAccountUuid = ? ORDER BY firstname ASC LIMIT ? OFFSET ? ;"); ) { psmt.setString(1, schoolaccount.getUuid()); psmt.setInt(2, endIndex - startIndex); psmt.setInt(3, startIndex); try(ResultSet rset = psmt.executeQuery();){ studentList = beanProcessor.toBeanList(rset, Student.class); } } catch (SQLException e) { logger.error("SQLException when trying to get a Student List with an index and offset."); logger.error(ExceptionUtils.getStackTrace(e)); System.out.println(ExceptionUtils.getStackTrace(e)); } return studentList; } }
[ "mwendapeter72@gmail.com" ]
mwendapeter72@gmail.com
11b7bcf6bb5ff997962c56cec484b2eda9c484ed
b2aaae505ee4d13ed73ebdc9a298a2e471d0e7ed
/hw08-0036516980/src/main/java/hr/fer/oprpp1/hw08/jnotepadpp/local/ILocalizationProvider.java
2ae6f777ba59e615f55e321e9f35f8ce26e60b8c
[]
no_license
veks9/OPRPP1
43a60bbf3db97f0455b8a8a18492328522deac39
9f32c43e82353f87a9f74d509276d74defaa335b
refs/heads/master
2023-04-11T04:26:03.057405
2021-04-08T10:16:40
2021-04-08T10:16:40
352,348,869
0
0
null
null
null
null
UTF-8
Java
false
false
754
java
package hr.fer.oprpp1.hw08.jnotepadpp.local; /** * Sucelje predstavlja providera koji moze spojiti i odspojiti listenera * i dohvatiti prijevod po ključu * @author vedran * */ public interface ILocalizationProvider { /** * Metoda dodaje predanog listenera u internu listu listenera * @param listener */ void addLocalizationListener(ILocalizationListener listener); /** * Metoda miče predanog listenera iz interne liste listenera * @param listener */ void removeLocalizationListener(ILocalizationListener listener); /** * Metoda primi ključ i dohvati prijevod * @param key ključ * @return prijevod */ String getString(String key); /** * Metoda vraća trenutni jezik * @return */ String getCurrentLanguage(); }
[ "vedran.hernaus@fer.hr" ]
vedran.hernaus@fer.hr
80aeb81530c1c7fdd406beb07696d2e147d22632
38cfbca025d1bcb5cab2b9db6408bf5aa4f6ac9b
/tombot-models/tombot-models-facebook/src/main/java/be/tomcools/tombot/model/facebook/settings/PaymentSettings.java
47642198c574e7d1600e18a1d21e6da99320ef4d
[]
no_license
TomCools/tombot
bfb07f84aea81db3bb2bee6875124630b4ca6cc1
eade87d8c0dfcf9953a8f32f6aad40c29299afa7
refs/heads/master
2021-01-13T08:45:24.347749
2018-10-25T23:50:01
2018-10-25T23:50:01
72,359,479
1
0
null
null
null
null
UTF-8
Java
false
false
423
java
package be.tomcools.tombot.model.facebook.settings; import com.google.gson.annotations.SerializedName; import lombok.Builder; import lombok.Data; import lombok.Singular; import java.util.List; @Builder @Data public class PaymentSettings { @SerializedName("privacy_url") private String privacyUrl; @SerializedName("public_key") private String publicKey; @Singular private List<Integer> testers; }
[ "tom.cools@infosupport.com" ]
tom.cools@infosupport.com
3bf71b21f213a8698c4cc76c0bda0d6a8541b670
852a663b653045d43d17834ff73674499d31c133
/src/main/java/com/lhcc/decorator3/impl/GatewayComponent.java
cbce8cb40727ddb5849cf0a7f2643e8f68047f45
[]
no_license
chengwei426/Design-Pattern
a43e0e4026cdeedac04a83b127e5a20ebb2fb4a3
69a8194fdbc88c86c38c22c3bbd5fa86bea88b9e
refs/heads/master
2022-07-13T14:57:09.647953
2019-12-22T03:04:41
2019-12-22T03:04:41
229,509,806
0
0
null
2022-06-17T02:47:06
2019-12-22T02:47:40
Java
UTF-8
Java
false
false
340
java
package com.lhcc.decorator3.impl; import com.lhcc.decorator3.AbstractGatewayComponent; /** * Created by Administrator on 2019/7/14. */ public class GatewayComponent extends AbstractGatewayComponent { @Override public void service() { System.out.println("第一步 >>> 网关中获取基本的操作实现...."); } }
[ "chengwei426@126.com" ]
chengwei426@126.com
689d2fc9423cb15e61c2bc0386f75e12d29b12bf
2a7bbb813f774dda92416a28dbf0b66f9b6656a6
/Exercises/src/debugging/debugging.java
ce0652c9109ecf24cfac1cb7fe3507b8d5700897
[]
no_license
ftoppert/Chapter-1
611d2c82e556f64c14d982d2cc4b4c0622c565d4
75e10a0bc92c44aa0a9cb6968d6e3cf1c77a4516
refs/heads/master
2020-03-27T08:58:31.972358
2018-09-10T14:14:49
2018-09-10T14:14:49
146,303,454
0
0
null
null
null
null
UTF-8
Java
false
false
179
java
package debugging; public class debugging { /* This program displays a greeting */ public static void main(String[] arg) { System.out.println("Hello"); } }
[ "42647326+ftoppert@users.noreply.github.com" ]
42647326+ftoppert@users.noreply.github.com
1a9dcead23f403a444e829977e6020be3723e3f2
f7e09ae5cb95585bfcb04b5c90d53d72ec38ab33
/weather-service-application/src/main/java/myreika/weather/service/CurrentWeatherServiceImpl.java
4e30e3ac45869c9fb55641d65708425aeebee84d
[ "Apache-2.0" ]
permissive
HVrettost/weather-service
cc1dac6a4ace93341fcd809f6b49f699dd2a6745
090173aee15b0f9c4a6908747bfa46b62f1ba810
refs/heads/main
2023-03-31T01:14:57.861074
2021-04-04T18:49:32
2021-04-04T18:49:32
338,552,368
0
0
null
null
null
null
UTF-8
Java
false
false
3,674
java
package myreika.weather.service; import myreika.weather.dao.database.metrics.WeatherApiCallMetricsDao; import myreika.weather.dao.service.owm.CurrentWeatherDao; import myreika.weather.domain.Coordinates; import myreika.weather.domain.enums.metrics.ApiCallType; import myreika.weather.dto.current.CurrentWeatherDto; import myreika.weather.validator.UnitsValidator; import myreika.weather.validator.LanguageValidator; import myreika.weather.validator.CityValidator; import myreika.weather.validator.CityIdValidator; import myreika.weather.validator.CoordinatesValidator; import org.springframework.stereotype.Service; @Service public class CurrentWeatherServiceImpl implements CurrentWeatherService { private final CurrentWeatherDao currentWeatherDao; private final UnitsValidator unitsValidator; private final LanguageValidator languageValidator; private final CityValidator cityValidator; private final CityIdValidator cityIdValidator; private final CoordinatesValidator coordinatesValidator; private final WeatherApiCallMetricsDao weatherApiCallMetricsDao; public CurrentWeatherServiceImpl(CurrentWeatherDao currentWeatherDao, UnitsValidator unitsValidator, LanguageValidator languageValidator, CityValidator cityValidator, CityIdValidator cityIdValidator, CoordinatesValidator coordinatesValidator, WeatherApiCallMetricsDao weatherApiCallMetricsDao) { this.currentWeatherDao = currentWeatherDao; this.unitsValidator = unitsValidator; this.languageValidator = languageValidator; this.cityValidator = cityValidator; this.cityIdValidator = cityIdValidator; this.coordinatesValidator = coordinatesValidator; this.weatherApiCallMetricsDao = weatherApiCallMetricsDao; } @Override public CurrentWeatherDto getCurrentWeatherByCity(String city, String units, String lang) { validateOptionalParameters(lang, units); cityValidator.validate(city); weatherApiCallMetricsDao.saveApiCallMetric(ApiCallType.CURRENT_WEATHER_BY_CITY); return currentWeatherDao.getCurrentWeatherByCity(city, units, lang); } @Override public CurrentWeatherDto getCurrentWeatherByCityId(int cityId, String units, String lang) { validateOptionalParameters(lang, units); cityIdValidator.validate(cityId); weatherApiCallMetricsDao.saveApiCallMetric(ApiCallType.CURRENT_WEATHER_BY_CITY_ID); return currentWeatherDao.getCurrentWeatherByCityId(cityId, units, lang); } @Override public CurrentWeatherDto getCurrentWeatherByCoordinates(Coordinates coordinates, String units, String lang) { validateOptionalParameters(lang, units); coordinatesValidator.validate(coordinates); weatherApiCallMetricsDao.saveApiCallMetric(ApiCallType.CURRENT_WEATHER_BY_COORDINATES); return currentWeatherDao.getCurrentWeatherByCoordinates(coordinates, units, lang); } @Override public CurrentWeatherDto getCurrentWeatherByZipCode(int zipCode, String units, String lang) { validateOptionalParameters(lang, units); weatherApiCallMetricsDao.saveApiCallMetric(ApiCallType.CURRENT_WEATHER_BY_ZIP_CODE); return currentWeatherDao.getCurrentWeatherByZipCode(zipCode, units, lang); } private void validateOptionalParameters(String lang, String units) { languageValidator.validate(lang); unitsValidator.validate(units); } }
[ "haris.vrettos@gmail.com" ]
haris.vrettos@gmail.com
416b725b5543e0bee3989be0712a600aaeabddfc
52f5fc752a1ad84deb896648e39c213dabd14bf3
/pay/pay.app/src/main/java/poweredby/sergey/pay/app/AccountMenuActivity.java
6aec1517c80b9ba0fb40c76a43dba490c270d8e9
[]
no_license
Laesod/sergey-pay
cd411fdfe7e3ea8748767fbe52bdf5d66deefd7e
28f86c0ea47d9b20e354e779bbb55a44e83995f1
refs/heads/master
2021-01-10T16:51:35.839956
2017-05-23T22:58:23
2017-05-23T22:58:23
46,396,596
0
0
null
null
null
null
UTF-8
Java
false
false
3,421
java
package poweredby.sergey.pay.app; import poweredby.sergey.pay.app.bll.ApiFacade; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.Button; public class AccountMenuActivity extends Activity { private static final int REQUEST_CODE = 0; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.account_menu); final Button buttonBallance = (Button) findViewById(R.id.buttonBalance); buttonBallance.setOnClickListener(new OnClickListener() { public void onClick(View v) { viewBallance(); } }); final Button buttonSendMoney = (Button) findViewById(R.id.buttonSendMoney); buttonSendMoney.setOnClickListener(new OnClickListener() { public void onClick(View v) { viewSendMoney(); } }); final Button buttonTransactions = (Button) findViewById(R.id.buttonTransactions); buttonTransactions.setOnClickListener(new OnClickListener() { public void onClick(View v) { viewTransactions(); } }); final Button buttonEncode = (Button) findViewById(R.id.buttonEncode); buttonEncode.setOnClickListener(new OnClickListener() { public void onClick(View v) { viewEncode(); } }); final Button buttonLogout = (Button) findViewById(R.id.buttonLogout); buttonLogout.setOnClickListener(new OnClickListener() { public void onClick(View v) { logout(); } }); final Button buttonPreferences = (Button) findViewById(R.id.buttonPreferences); buttonPreferences.setOnClickListener(new OnClickListener() { public void onClick(View v) { showPreferences(); } }); } protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == REQUEST_CODE) { //SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); //ApiFacade.userName = prefs.getString(PreferencesActivity.KEY_LOGIN, ""); //ApiFacade.password = prefs.getString(PreferencesActivity.KEY_PASSWORD, ""); } } private void viewBallance() { Intent intent = new Intent().setClass(this, BalanceActivity.class); startActivity(intent); } private void viewSendMoney() { Intent intent = new Intent().setClass(this, SendMoneyActivity.class); startActivity(intent); } private void viewTransactions() { Intent intent = new Intent().setClass(this, TransactionsActivity.class); startActivity(intent); } private void viewEncode() { Intent intent = new Intent().setClass(this, EncodeMoneyActivity.class); startActivity(intent); } private void logout() { ApiFacade.logout(); finish(); } private void showPreferences() { Intent settingsActivity = new Intent(this, PreferencesActivity.class); startActivityForResult(settingsActivity, REQUEST_CODE); } }
[ "sergeydobryn@gmail.com" ]
sergeydobryn@gmail.com
377943a1eb179f805342170889e6f6705deb86a2
49b4cb79c910a17525b59d4b497a09fa28a9e3a8
/parserValidCheck/src/main/java/com/ke/css/cimp/fwb/fwb17/Rule_DECLARED_VALUE_FOR_CUSTOMS.java
2a6920824e1bf0fdc162d6c0680cb8a07aed72f7
[]
no_license
ganzijo/koreanair
a7d750b62cec2647bfb2bed4ca1bf8648d9a447d
e980fb11bc4b8defae62c9d88e5c70a659bef436
refs/heads/master
2021-04-26T22:04:17.478461
2018-03-06T05:59:32
2018-03-06T05:59:32
124,018,887
0
0
null
null
null
null
UTF-8
Java
false
false
4,091
java
package com.ke.css.cimp.fwb.fwb17; /* ----------------------------------------------------------------------------- * Rule_DECLARED_VALUE_FOR_CUSTOMS.java * ----------------------------------------------------------------------------- * * Producer : com.parse2.aparse.Parser 2.5 * Produced : Tue Mar 06 10:25:52 KST 2018 * * ----------------------------------------------------------------------------- */ import java.util.ArrayList; final public class Rule_DECLARED_VALUE_FOR_CUSTOMS extends Rule { public Rule_DECLARED_VALUE_FOR_CUSTOMS(String spelling, ArrayList<Rule> rules) { super(spelling, rules); } public Object accept(Visitor visitor) { return visitor.visit(this); } public static Rule_DECLARED_VALUE_FOR_CUSTOMS parse(ParserContext context) { context.push("DECLARED_VALUE_FOR_CUSTOMS"); boolean parsed = true; int s0 = context.index; ParserAlternative a0 = new ParserAlternative(s0); ArrayList<ParserAlternative> as1 = new ArrayList<ParserAlternative>(); parsed = false; { int s1 = context.index; ParserAlternative a1 = new ParserAlternative(s1); parsed = true; if (parsed) { boolean f1 = true; int c1 = 0; for (int i1 = 0; i1 < 1 && f1; i1++) { int g1 = context.index; ArrayList<ParserAlternative> as2 = new ArrayList<ParserAlternative>(); parsed = false; { int s2 = context.index; ParserAlternative a2 = new ParserAlternative(s2); parsed = true; if (parsed) { boolean f2 = true; @SuppressWarnings("unused") int c2 = 0; for (int i2 = 0; i2 < 12 && f2; i2++) { Rule rule = Rule_Typ_Decimal.parse(context); if ((f2 = rule != null)) { a2.add(rule, context.index); c2++; } } parsed = true; } if (parsed) { as2.add(a2); } context.index = s2; } { int s2 = context.index; ParserAlternative a2 = new ParserAlternative(s2); parsed = true; if (parsed) { boolean f2 = true; int c2 = 0; for (int i2 = 0; i2 < 1 && f2; i2++) { Rule rule = Terminal_StringValue.parse(context, "NCV"); if ((f2 = rule != null)) { a2.add(rule, context.index); c2++; } } parsed = c2 == 1; } if (parsed) { as2.add(a2); } context.index = s2; } ParserAlternative b = ParserAlternative.getBest(as2); parsed = b != null; if (parsed) { a1.add(b.rules, b.end); context.index = b.end; } f1 = context.index > g1; if (parsed) c1++; } parsed = c1 == 1; } if (parsed) { as1.add(a1); } context.index = s1; } ParserAlternative b = ParserAlternative.getBest(as1); parsed = b != null; if (parsed) { a0.add(b.rules, b.end); context.index = b.end; } Rule rule = null; if (parsed) { rule = new Rule_DECLARED_VALUE_FOR_CUSTOMS(context.text.substring(a0.start, a0.end), a0.rules); } else { context.index = s0; } context.pop("DECLARED_VALUE_FOR_CUSTOMS", parsed); return (Rule_DECLARED_VALUE_FOR_CUSTOMS)rule; } } /* ----------------------------------------------------------------------------- * eof * ----------------------------------------------------------------------------- */
[ "wrjo@wrjo-PC" ]
wrjo@wrjo-PC
5b480101c1553e4d4242f5ddaea64424682b5ab8
f8dcd37192d2781157d917c8ce45210daed52046
/app/src/main/java/com/animation/qmb/management/mbap.java
0f0a03db3f6cc4c707e745d54bdde3bf6d824268
[]
no_license
sid046/QMB
8a10eb0d3e3e267716c689c27380d5b1927068a7
fa4ad29efaf0c29249dc3ed52761c6369b4dc293
refs/heads/master
2021-04-11T03:18:33.910194
2020-03-21T14:05:03
2020-03-21T14:05:03
248,988,336
0
0
null
null
null
null
UTF-8
Java
false
false
2,799
java
package com.animation.qmb.management; import android.app.ProgressDialog; import android.os.Bundle; import com.animation.qmb.Filelink; import com.animation.qmb.R; import com.google.firebase.database.DataSnapshot; import com.google.firebase.database.DatabaseError; import com.google.firebase.database.DatabaseReference; import com.google.firebase.database.FirebaseDatabase; import com.google.firebase.database.ValueEventListener; import java.util.ArrayList; import java.util.List; import adapter.QuestionModel; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; public class mbap extends AppCompatActivity { private ProgressDialog progressDialog; RecyclerView listView; DatabaseReference databaseReference; FirebaseDatabase firebaseDatabase; private List<Filelink> filelinks; adapter.QuestionModel QuestionModel; String subject_Name; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_mcam); progressDialog=new ProgressDialog(this); progressDialog.setMessage("Please Wait Loading..."); listView = findViewById(R.id.listview1); Bundle b = getIntent().getExtras(); subject_Name = b.getString("subjectName"); firebaseDatabase=firebaseDatabase.getInstance(); databaseReference=firebaseDatabase.getReference("class8").child(subject_Name); filelinks = new ArrayList<>(); progressDialog.show(); QuestionModel = new QuestionModel(com.animation.qmb.management.mbap.this,filelinks); listView.setLayoutManager(new LinearLayoutManager(com.animation.qmb.management.mbap.this)); listView.setAdapter(QuestionModel); databaseReference.addListenerForSingleValueEvent(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot dataSnapshot) { //Toast.makeText(class8.this,"Count is:"+dataSnapshot.getChildrenCount(), Toast.LENGTH_SHORT).show(); for (DataSnapshot ds: dataSnapshot.getChildren()){ Filelink filelink = ds.getValue(Filelink.class); //Toast.makeText(class8.this, "key is :"+filelink.getDownloadurl(), Toast.LENGTH_SHORT).show(); filelinks.add(new Filelink(filelink.getDownloadurl(),filelink.getName())); QuestionModel.notifyDataSetChanged(); } progressDialog.dismiss(); } @Override public void onCancelled(@NonNull DatabaseError databaseError) { } }); } }
[ "90sidddharth@gmail.com" ]
90sidddharth@gmail.com
d8480451bc350ae61d4f166a1dea905a3cdb27e1
66f0e98b2d8808b837aba6f0993bff1d4b937bd3
/src/main/java/com/sirenliv/voidevolutions/VoidEvolutions.java
f04fd73f62529cf24d3b9dae2348d5acedb5b02d
[]
no_license
sirenliv/VoidEvolutions
3cbcdffdd072a88ae1c198ae8b521d8c5f41d5a6
3d99ddd42ce326bd05b743e8fa8296a80a6811c2
refs/heads/master
2020-05-23T12:14:29.675716
2019-05-17T06:37:34
2019-05-17T06:37:34
186,753,572
0
0
null
null
null
null
UTF-8
Java
false
false
703
java
package com.sirenliv.voidevolutions; import com.sirenliv.voidevolutions.init.Items; import net.minecraftforge.fml.common.Mod; import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.Mod.Instance; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; @Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION) public class VoidEvolutions { @Instance public static VoidEvolutions instance; @EventHandler public void preInit(FMLPreInitializationEvent event){ Items.init(); } @EventHandler public void init(FMLInitializationEvent event) { } }
[ "olivia.maziarka@gmail.com" ]
olivia.maziarka@gmail.com
41a0a64fe722b8148529fa93a6880efe9a6f9096
7dccb79b9804d8d9459c86ba9721e1197f59b865
/de.fhdo.lemma.technology.mappingdsl.metamodel/src-gen/de/fhdo/lemma/technology/mapping/impl/TechnologySpecificFieldMappingImpl.java
9b69e8259333026a408912966d9dc0d289d30cff
[ "MIT" ]
permissive
SeelabFhdo/lemma
a668854675d50d3f3cad56eb5e3961b683d0f70a
2e9ccc882352116b253a7700b5ecf2c9316a5829
refs/heads/main
2023-08-28T18:04:56.990603
2023-03-24T08:03:13
2023-03-24T08:03:13
204,692,764
32
9
MIT
2022-10-25T12:25:06
2019-08-27T11:54:43
Java
UTF-8
Java
false
false
23,793
java
/** */ package de.fhdo.lemma.technology.mapping.impl; import de.fhdo.lemma.data.DataField; import de.fhdo.lemma.data.Enumeration; import de.fhdo.lemma.data.EnumerationField; import de.fhdo.lemma.data.Type; import de.fhdo.lemma.service.Import; import de.fhdo.lemma.technology.mapping.ComplexParameterMapping; import de.fhdo.lemma.technology.mapping.ComplexTypeMapping; import de.fhdo.lemma.technology.mapping.MappingPackage; import de.fhdo.lemma.technology.mapping.TechnologySpecificFieldMapping; import de.fhdo.lemma.technology.mapping.TechnologySpecificImportedServiceAspect; import java.lang.reflect.InvocationTargetException; import java.util.Collection; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList; import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.emf.ecore.util.InternalEList; /** * <!-- begin-user-doc --> * An implementation of the model object '<em><b>Technology Specific Field Mapping</b></em>'. * <!-- end-user-doc --> * <p> * The following features are implemented: * </p> * <ul> * <li>{@link de.fhdo.lemma.technology.mapping.impl.TechnologySpecificFieldMappingImpl#getTechnology <em>Technology</em>}</li> * <li>{@link de.fhdo.lemma.technology.mapping.impl.TechnologySpecificFieldMappingImpl#getType <em>Type</em>}</li> * <li>{@link de.fhdo.lemma.technology.mapping.impl.TechnologySpecificFieldMappingImpl#getEnumerationField <em>Enumeration Field</em>}</li> * <li>{@link de.fhdo.lemma.technology.mapping.impl.TechnologySpecificFieldMappingImpl#getDataField <em>Data Field</em>}</li> * <li>{@link de.fhdo.lemma.technology.mapping.impl.TechnologySpecificFieldMappingImpl#getAspects <em>Aspects</em>}</li> * <li>{@link de.fhdo.lemma.technology.mapping.impl.TechnologySpecificFieldMappingImpl#getTypeMapping <em>Type Mapping</em>}</li> * <li>{@link de.fhdo.lemma.technology.mapping.impl.TechnologySpecificFieldMappingImpl#getParameterMapping <em>Parameter Mapping</em>}</li> * </ul> * * @generated */ public class TechnologySpecificFieldMappingImpl extends MinimalEObjectImpl.Container implements TechnologySpecificFieldMapping { /** * The cached value of the '{@link #getTechnology() <em>Technology</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getTechnology() * @generated * @ordered */ protected Import technology; /** * The cached value of the '{@link #getType() <em>Type</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getType() * @generated * @ordered */ protected Type type; /** * The cached value of the '{@link #getEnumerationField() <em>Enumeration Field</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getEnumerationField() * @generated * @ordered */ protected EnumerationField enumerationField; /** * The cached value of the '{@link #getDataField() <em>Data Field</em>}' reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getDataField() * @generated * @ordered */ protected DataField dataField; /** * The cached value of the '{@link #getAspects() <em>Aspects</em>}' containment reference list. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #getAspects() * @generated * @ordered */ protected EList<TechnologySpecificImportedServiceAspect> aspects; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected TechnologySpecificFieldMappingImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override protected EClass eStaticClass() { return MappingPackage.Literals.TECHNOLOGY_SPECIFIC_FIELD_MAPPING; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Import getTechnology() { if (technology != null && technology.eIsProxy()) { InternalEObject oldTechnology = (InternalEObject)technology; technology = (Import)eResolveProxy(oldTechnology); if (technology != oldTechnology) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__TECHNOLOGY, oldTechnology, technology)); } } return technology; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Import basicGetTechnology() { return technology; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setTechnology(Import newTechnology) { Import oldTechnology = technology; technology = newTechnology; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__TECHNOLOGY, oldTechnology, technology)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Type getType() { if (type != null && type.eIsProxy()) { InternalEObject oldType = (InternalEObject)type; type = (Type)eResolveProxy(oldType); if (type != oldType) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__TYPE, oldType, type)); } } return type; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Type basicGetType() { return type; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setType(Type newType) { Type oldType = type; type = newType; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__TYPE, oldType, type)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EnumerationField getEnumerationField() { if (enumerationField != null && enumerationField.eIsProxy()) { InternalEObject oldEnumerationField = (InternalEObject)enumerationField; enumerationField = (EnumerationField)eResolveProxy(oldEnumerationField); if (enumerationField != oldEnumerationField) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__ENUMERATION_FIELD, oldEnumerationField, enumerationField)); } } return enumerationField; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EnumerationField basicGetEnumerationField() { return enumerationField; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setEnumerationField(EnumerationField newEnumerationField) { EnumerationField oldEnumerationField = enumerationField; enumerationField = newEnumerationField; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__ENUMERATION_FIELD, oldEnumerationField, enumerationField)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public DataField getDataField() { if (dataField != null && dataField.eIsProxy()) { InternalEObject oldDataField = (InternalEObject)dataField; dataField = (DataField)eResolveProxy(oldDataField); if (dataField != oldDataField) { if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.RESOLVE, MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__DATA_FIELD, oldDataField, dataField)); } } return dataField; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public DataField basicGetDataField() { return dataField; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setDataField(DataField newDataField) { DataField oldDataField = dataField; dataField = newDataField; if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__DATA_FIELD, oldDataField, dataField)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public EList<TechnologySpecificImportedServiceAspect> getAspects() { if (aspects == null) { aspects = new EObjectContainmentWithInverseEList<TechnologySpecificImportedServiceAspect>(TechnologySpecificImportedServiceAspect.class, this, MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__ASPECTS, MappingPackage.TECHNOLOGY_SPECIFIC_IMPORTED_SERVICE_ASPECT__FIELD_MAPPING); } return aspects; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ComplexTypeMapping getTypeMapping() { if (eContainerFeatureID() != MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__TYPE_MAPPING) return null; return (ComplexTypeMapping)eContainer(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ComplexTypeMapping basicGetTypeMapping() { if (eContainerFeatureID() != MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__TYPE_MAPPING) return null; return (ComplexTypeMapping)eInternalContainer(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetTypeMapping(ComplexTypeMapping newTypeMapping, NotificationChain msgs) { msgs = eBasicSetContainer((InternalEObject)newTypeMapping, MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__TYPE_MAPPING, msgs); return msgs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setTypeMapping(ComplexTypeMapping newTypeMapping) { if (newTypeMapping != eInternalContainer() || (eContainerFeatureID() != MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__TYPE_MAPPING && newTypeMapping != null)) { if (EcoreUtil.isAncestor(this, newTypeMapping)) throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); NotificationChain msgs = null; if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs); if (newTypeMapping != null) msgs = ((InternalEObject)newTypeMapping).eInverseAdd(this, MappingPackage.COMPLEX_TYPE_MAPPING__FIELD_MAPPINGS, ComplexTypeMapping.class, msgs); msgs = basicSetTypeMapping(newTypeMapping, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__TYPE_MAPPING, newTypeMapping, newTypeMapping)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ComplexParameterMapping getParameterMapping() { if (eContainerFeatureID() != MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__PARAMETER_MAPPING) return null; return (ComplexParameterMapping)eContainer(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ComplexParameterMapping basicGetParameterMapping() { if (eContainerFeatureID() != MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__PARAMETER_MAPPING) return null; return (ComplexParameterMapping)eInternalContainer(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NotificationChain basicSetParameterMapping(ComplexParameterMapping newParameterMapping, NotificationChain msgs) { msgs = eBasicSetContainer((InternalEObject)newParameterMapping, MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__PARAMETER_MAPPING, msgs); return msgs; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public void setParameterMapping(ComplexParameterMapping newParameterMapping) { if (newParameterMapping != eInternalContainer() || (eContainerFeatureID() != MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__PARAMETER_MAPPING && newParameterMapping != null)) { if (EcoreUtil.isAncestor(this, newParameterMapping)) throw new IllegalArgumentException("Recursive containment not allowed for " + toString()); NotificationChain msgs = null; if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs); if (newParameterMapping != null) msgs = ((InternalEObject)newParameterMapping).eInverseAdd(this, MappingPackage.COMPLEX_PARAMETER_MAPPING__FIELD_MAPPINGS, ComplexParameterMapping.class, msgs); msgs = basicSetParameterMapping(newParameterMapping, msgs); if (msgs != null) msgs.dispatch(); } else if (eNotificationRequired()) eNotify(new ENotificationImpl(this, Notification.SET, MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__PARAMETER_MAPPING, newParameterMapping, newParameterMapping)); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Type getOriginalTypeOfMappedElement() { Type _xifexpression = null; DataField _dataField = this.getDataField(); boolean _tripleNotEquals = (_dataField != null); if (_tripleNotEquals) { _xifexpression = this.getDataField().getEffectiveType(); } else { Enumeration _xifexpression_1 = null; EnumerationField _enumerationField = this.getEnumerationField(); boolean _tripleNotEquals_1 = (_enumerationField != null); if (_tripleNotEquals_1) { _xifexpression_1 = this.getEnumerationField().getEnumeration(); } else { return null; } _xifexpression = _xifexpression_1; } return _xifexpression; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @SuppressWarnings("unchecked") @Override public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__ASPECTS: return ((InternalEList<InternalEObject>)(InternalEList<?>)getAspects()).basicAdd(otherEnd, msgs); case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__TYPE_MAPPING: if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs); return basicSetTypeMapping((ComplexTypeMapping)otherEnd, msgs); case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__PARAMETER_MAPPING: if (eInternalContainer() != null) msgs = eBasicRemoveFromContainer(msgs); return basicSetParameterMapping((ComplexParameterMapping)otherEnd, msgs); } return super.eInverseAdd(otherEnd, featureID, msgs); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { switch (featureID) { case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__ASPECTS: return ((InternalEList<?>)getAspects()).basicRemove(otherEnd, msgs); case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__TYPE_MAPPING: return basicSetTypeMapping(null, msgs); case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__PARAMETER_MAPPING: return basicSetParameterMapping(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public NotificationChain eBasicRemoveFromContainerFeature(NotificationChain msgs) { switch (eContainerFeatureID()) { case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__TYPE_MAPPING: return eInternalContainer().eInverseRemove(this, MappingPackage.COMPLEX_TYPE_MAPPING__FIELD_MAPPINGS, ComplexTypeMapping.class, msgs); case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__PARAMETER_MAPPING: return eInternalContainer().eInverseRemove(this, MappingPackage.COMPLEX_PARAMETER_MAPPING__FIELD_MAPPINGS, ComplexParameterMapping.class, msgs); } return super.eBasicRemoveFromContainerFeature(msgs); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__TECHNOLOGY: if (resolve) return getTechnology(); return basicGetTechnology(); case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__TYPE: if (resolve) return getType(); return basicGetType(); case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__ENUMERATION_FIELD: if (resolve) return getEnumerationField(); return basicGetEnumerationField(); case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__DATA_FIELD: if (resolve) return getDataField(); return basicGetDataField(); case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__ASPECTS: return getAspects(); case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__TYPE_MAPPING: if (resolve) return getTypeMapping(); return basicGetTypeMapping(); case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__PARAMETER_MAPPING: if (resolve) return getParameterMapping(); return basicGetParameterMapping(); } return super.eGet(featureID, resolve, coreType); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @SuppressWarnings("unchecked") @Override public void eSet(int featureID, Object newValue) { switch (featureID) { case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__TECHNOLOGY: setTechnology((Import)newValue); return; case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__TYPE: setType((Type)newValue); return; case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__ENUMERATION_FIELD: setEnumerationField((EnumerationField)newValue); return; case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__DATA_FIELD: setDataField((DataField)newValue); return; case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__ASPECTS: getAspects().clear(); getAspects().addAll((Collection<? extends TechnologySpecificImportedServiceAspect>)newValue); return; case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__TYPE_MAPPING: setTypeMapping((ComplexTypeMapping)newValue); return; case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__PARAMETER_MAPPING: setParameterMapping((ComplexParameterMapping)newValue); return; } super.eSet(featureID, newValue); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void eUnset(int featureID) { switch (featureID) { case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__TECHNOLOGY: setTechnology((Import)null); return; case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__TYPE: setType((Type)null); return; case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__ENUMERATION_FIELD: setEnumerationField((EnumerationField)null); return; case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__DATA_FIELD: setDataField((DataField)null); return; case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__ASPECTS: getAspects().clear(); return; case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__TYPE_MAPPING: setTypeMapping((ComplexTypeMapping)null); return; case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__PARAMETER_MAPPING: setParameterMapping((ComplexParameterMapping)null); return; } super.eUnset(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public boolean eIsSet(int featureID) { switch (featureID) { case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__TECHNOLOGY: return technology != null; case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__TYPE: return type != null; case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__ENUMERATION_FIELD: return enumerationField != null; case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__DATA_FIELD: return dataField != null; case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__ASPECTS: return aspects != null && !aspects.isEmpty(); case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__TYPE_MAPPING: return basicGetTypeMapping() != null; case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING__PARAMETER_MAPPING: return basicGetParameterMapping() != null; } return super.eIsSet(featureID); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException { switch (operationID) { case MappingPackage.TECHNOLOGY_SPECIFIC_FIELD_MAPPING___GET_ORIGINAL_TYPE_OF_MAPPED_ELEMENT: return getOriginalTypeOfMappedElement(); } return super.eInvoke(operationID, arguments); } } //TechnologySpecificFieldMappingImpl
[ "florian.rademacher@fh-dortmund.de" ]
florian.rademacher@fh-dortmund.de
b1c51b4fd6a99614af42406f92a91bef720778a4
9e60577127d40b38c8930391f9ee30d069a87e24
/facebook/src/main/java/com/facebook/HttpMethod.java
ac201dc457b3cd3ab41a1a4739ce5767c0009845
[]
no_license
StarNeit/Android-360Video-VR
a77c1820cad5abde95d5849c3f7e68644e54ae41
93118f001ed1a7418f151ecdd966c868833442c1
refs/heads/master
2021-06-08T09:34:09.997285
2016-11-13T20:23:09
2016-11-13T20:23:09
73,640,682
1
0
null
null
null
null
UTF-8
Java
false
false
1,473
java
/** * Copyright (c) 2014-present, Facebook, Inc. All rights reserved. * * You are hereby granted a non-exclusive, worldwide, royalty-free license to use, * copy, modify, and distribute this software in source code or binary form for use * in connection with the web services and APIs provided by Facebook. * * As with any software that integrates with the Facebook platform, your use of * this software is subject to the Facebook Developer Principles and Policies * [http://developers.facebook.com/policy/]. This copyright notice shall be * included in all copies or substantial portions of the software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package com.facebook; /** * Enumeration of HTTP methods supported by Request */ public enum HttpMethod { /** * Use HTTP method "GET" for the request */ GET, /** * Use HTTP method "POST" for the request */ POST, /** * Use HTTP method "DELETE" for the request */ DELETE, }
[ "you@example.com" ]
you@example.com
c60d58cd5b9702b3dccbe2db04c36a7f1df18cd2
9d32980f5989cd4c55cea498af5d6a413e08b7a2
/A5_8_1_0/src/main/java/com/android/server/-$Lambda$T7cKu_OKm_Fk2kBNthmo_uUJTSo.java
f595272f128434a37b0e7ab09de3d32c24321ddb
[]
no_license
liuhaosource/OppoFramework
e7cc3bcd16958f809eec624b9921043cde30c831
ebe39acabf5eae49f5f991c5ce677d62b683f1b6
refs/heads/master
2023-06-03T23:06:17.572407
2020-11-30T08:40:07
2020-11-30T08:40:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,147
java
package com.android.server; import android.content.Context; import com.android.server.input.InputManagerService; import com.android.server.media.MediaRouterService; import com.android.server.net.NetworkPolicyManagerService; import com.android.server.net.NetworkStatsService; import com.android.server.oppo.OppoService; import com.android.server.oppo.OppoUsageService; import com.android.server.wm.WindowManagerService; import com.oppo.media.OppoMultimediaService; import com.oppo.roundcorner.OppoRoundCornerService; final /* synthetic */ class -$Lambda$T7cKu_OKm_Fk2kBNthmo_uUJTSo implements Runnable { public static final /* synthetic */ -$Lambda$T7cKu_OKm_Fk2kBNthmo_uUJTSo $INST$0 = new -$Lambda$T7cKu_OKm_Fk2kBNthmo_uUJTSo((byte) 0); public static final /* synthetic */ -$Lambda$T7cKu_OKm_Fk2kBNthmo_uUJTSo $INST$1 = new -$Lambda$T7cKu_OKm_Fk2kBNthmo_uUJTSo((byte) 1); public static final /* synthetic */ -$Lambda$T7cKu_OKm_Fk2kBNthmo_uUJTSo $INST$2 = new -$Lambda$T7cKu_OKm_Fk2kBNthmo_uUJTSo((byte) 2); public static final /* synthetic */ -$Lambda$T7cKu_OKm_Fk2kBNthmo_uUJTSo $INST$3 = new -$Lambda$T7cKu_OKm_Fk2kBNthmo_uUJTSo((byte) 3); private final /* synthetic */ byte $id; /* renamed from: com.android.server.-$Lambda$T7cKu_OKm_Fk2kBNthmo_uUJTSo$1 */ final /* synthetic */ class AnonymousClass1 implements Runnable { /* renamed from: -$f0 */ private final /* synthetic */ Object f0-$f0; /* renamed from: -$f1 */ private final /* synthetic */ Object f1-$f1; /* renamed from: -$f10 */ private final /* synthetic */ Object f2-$f10; /* renamed from: -$f11 */ private final /* synthetic */ Object f3-$f11; /* renamed from: -$f12 */ private final /* synthetic */ Object f4-$f12; /* renamed from: -$f13 */ private final /* synthetic */ Object f5-$f13; /* renamed from: -$f14 */ private final /* synthetic */ Object f6-$f14; /* renamed from: -$f15 */ private final /* synthetic */ Object f7-$f15; /* renamed from: -$f16 */ private final /* synthetic */ Object f8-$f16; /* renamed from: -$f17 */ private final /* synthetic */ Object f9-$f17; /* renamed from: -$f18 */ private final /* synthetic */ Object f10-$f18; /* renamed from: -$f19 */ private final /* synthetic */ Object f11-$f19; /* renamed from: -$f2 */ private final /* synthetic */ Object f12-$f2; /* renamed from: -$f3 */ private final /* synthetic */ Object f13-$f3; /* renamed from: -$f4 */ private final /* synthetic */ Object f14-$f4; /* renamed from: -$f5 */ private final /* synthetic */ Object f15-$f5; /* renamed from: -$f6 */ private final /* synthetic */ Object f16-$f6; /* renamed from: -$f7 */ private final /* synthetic */ Object f17-$f7; /* renamed from: -$f8 */ private final /* synthetic */ Object f18-$f8; /* renamed from: -$f9 */ private final /* synthetic */ Object f19-$f9; private final /* synthetic */ void $m$0() { ((SystemServer) this.f0-$f0).m10lambda$-com_android_server_SystemServer_104889((Context) this.f1-$f1, (WindowManagerService) this.f12-$f2, (NetworkScoreService) this.f13-$f3, (NetworkManagementService) this.f14-$f4, (NetworkPolicyManagerService) this.f15-$f5, (NetworkStatsService) this.f16-$f6, (ConnectivityService) this.f17-$f7, (LocationManagerService) this.f18-$f8, (CountryDetectorService) this.f19-$f9, (NetworkTimeUpdateService) this.f2-$f10, (OppoMultimediaService) this.f3-$f11, (OppoRoundCornerService) this.f4-$f12, (CommonTimeManagementService) this.f5-$f13, (InputManagerService) this.f6-$f14, (TelephonyRegistry) this.f7-$f15, (MediaRouterService) this.f8-$f16, (OppoUsageService) this.f9-$f17, (MmsServiceBroker) this.f10-$f18, (OppoService) this.f11-$f19); } public /* synthetic */ AnonymousClass1(Object obj, Object obj2, Object obj3, Object obj4, Object obj5, Object obj6, Object obj7, Object obj8, Object obj9, Object obj10, Object obj11, Object obj12, Object obj13, Object obj14, Object obj15, Object obj16, Object obj17, Object obj18, Object obj19, Object obj20) { this.f0-$f0 = obj; this.f1-$f1 = obj2; this.f12-$f2 = obj3; this.f13-$f3 = obj4; this.f14-$f4 = obj5; this.f15-$f5 = obj6; this.f16-$f6 = obj7; this.f17-$f7 = obj8; this.f18-$f8 = obj9; this.f19-$f9 = obj10; this.f2-$f10 = obj11; this.f3-$f11 = obj12; this.f4-$f12 = obj13; this.f5-$f13 = obj14; this.f6-$f14 = obj15; this.f7-$f15 = obj16; this.f8-$f16 = obj17; this.f9-$f17 = obj18; this.f10-$f18 = obj19; this.f11-$f19 = obj20; } public final void run() { $m$0(); } } /* renamed from: com.android.server.-$Lambda$T7cKu_OKm_Fk2kBNthmo_uUJTSo$2 */ final /* synthetic */ class AnonymousClass2 implements Runnable { /* renamed from: -$f0 */ private final /* synthetic */ Object f20-$f0; private final /* synthetic */ void $m$0() { ((SystemServer) this.f20-$f0).m11lambda$-com_android_server_SystemServer_105794(); } public /* synthetic */ AnonymousClass2(Object obj) { this.f20-$f0 = obj; } public final void run() { $m$0(); } } private /* synthetic */ -$Lambda$T7cKu_OKm_Fk2kBNthmo_uUJTSo(byte b) { this.$id = b; } public final void run() { switch (this.$id) { case (byte) 0: $m$0(); return; case (byte) 1: $m$1(); return; case (byte) 2: $m$2(); return; case (byte) 3: $m$3(); return; default: throw new AssertionError(); } } }
[ "dstmath@163.com" ]
dstmath@163.com
9bea7dd72c6a97d1a42cfd6717ce9d4e69814816
d85dcd5a6ccdeb9ffd3e1dc26c4e8cafa7d9a495
/src/com/company/SevenPunishCard.java
35bd41163f0242f46b3ef7fb1ae46c0b800b3f45
[]
no_license
shahryarsz/DirtySevenProject
5cd7f2c5d0c202fedf1e539b66ab35d1ad9774ed
04d294f4037f574342b928e5e48cc46eac925e5e
refs/heads/master
2023-05-30T05:05:40.951019
2021-06-16T09:01:02
2021-06-16T09:01:02
362,364,592
0
0
null
null
null
null
UTF-8
Java
false
false
2,392
java
package com.company; /** * dirty seven class * cards with number 7 and their punishment * @author shahryarsz * @version 1.1 */ public class SevenPunishCard extends SpecialCard{ /** * constructor for seven cards * @param value value of them * @param color color of them */ public SevenPunishCard(String value, String color) { super(value, color); } /** * overriding act method for dirty seven action in a game * @param game the game */ @Override public void act(Game game) { int index = 0; for (Player player : game.getPlayers()) { if (player.isPlaying) { //finding the next guy index player.hasPunish=false; if (game.isClockwise()){ if (index == game.getPlayers().size() - 1) { index = 0; } else { index++; } }else { if (index==0){ index = game.getPlayers().size()-1; }else { index--; } } //checking if next guy has 7 or not and update the punish for (Card card : game.getPlayers().get(index).playerCards) { if (card.value.equals("7")) { if (card.color.equals("black")) { game.punish += 4; } else { game.punish += 2; } game.getPlayers().get(index).hasPunish = true; return; } } //next guy doesn't have 7 if (this.color.equals("black") && game.punish==2) game.punish=4; System.out.println(colorString("red" , "\n\n" + game.getPlayers().get(index).name + " should grab " + game.punish + " cards from storage.\n")); for (int i=0;i< game.punish;i++){game.getPlayers().get(index).grabStorage(game.getStorage());} game.getPlayers().get(index).hasPunish = false; if (game.punish > 2) { game.punish = 2; } return; } index++; } } }
[ "szshahryar@gmail.com" ]
szshahryar@gmail.com
15c69cd7d3987d8744e8f04b2a9edc278c5986db
799cce351010ca320625a651fb2e5334611d2ebf
/Data Set/Synthetic/Before/before_2452.java
2a01a30794697fcec0410ebb9d2a6e9c2f6f062b
[]
no_license
dareenkf/SQLIFIX
239be5e32983e5607787297d334e5a036620e8af
6e683aa68b5ec2cfe2a496aef7b467933c6de53e
refs/heads/main
2023-01-29T06:44:46.737157
2020-11-09T18:14:24
2020-11-09T18:14:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
265
java
public class Dummy { void sendRequest(Connection conn) throws SQLException { Statement stmt = conn.createStatement(); ResultSet rs = stmt.executeQuery("SELECT EMPLOYEE_ID, END_DATE, JOB_ID FROM JOB_HISTORY WHERE END_DATE <=" + var1+" OR JOB_ID <" + rand1); } }
[ "jahin99@gmail.com" ]
jahin99@gmail.com
defa0c316c95b39c879615dc122eb7701f4157fc
77aee6e65b19f92cab7ac6053b6d8f3bcd09977e
/java8-in-action/src/main/java/chapter06/example6/PrimeExample.java
9c15318246b28cb5f2692a726af19607ea95c646
[]
no_license
edfeff/study-all
01123004c90298e9fc26569224f2a328ea0bf3a1
f069fe7f2c3f42e20d3c441912f65b4e05d0f931
refs/heads/master
2023-01-06T10:48:05.711073
2020-01-16T05:59:05
2020-01-16T05:59:05
219,867,299
0
0
null
2022-12-27T14:45:24
2019-11-05T23:04:47
Java
UTF-8
Java
false
false
997
java
package chapter06.example6; import java.util.List; import java.util.Map; import java.util.stream.Collector; import java.util.stream.Collectors; import java.util.stream.IntStream; /** * 质数 分区 * * @author wangpp */ public class PrimeExample { public static void main(String[] args) { Map<Boolean, List<Integer>> booleanListMap = partitionPrime(100); System.out.println(booleanListMap); } /** * 质数分组 * * @param n * @return */ public static Map<Boolean, List<Integer>> partitionPrime(int n) { return IntStream.rangeClosed(2, n).boxed() .collect(Collectors.partitioningBy(PrimeExample::isPrime)); } /** * 判断质数 * <p> * 从 2 - candidate的平方根 * * @param candidate * @return */ public static boolean isPrime(int candidate) { return IntStream.rangeClosed(2, (int) Math.sqrt(candidate)).noneMatch(i -> candidate % i == 0); } }
[ "396859442@qq.com" ]
396859442@qq.com
add5cd28a634c811f7e95f2a2015e78d300066c9
852ae668be85e1bbbfb213ac030cd2bd9b13eb6e
/PUB/PubTermServer/build/generated/jax-wsCache/AuthorizationIDP/de/fhdo/terminologie/ws/idp/authorizationIDP/LoginRequestType.java
a33e646325711b53ed62ab3a92c9b2630488ea45
[]
no_license
TechnikumWienAcademy/Terminologieserver
e2a568ef04b8c378dfbe10b9add23d6253a708f9
bdb719233891efcc3c6761557898799a6eafcedd
refs/heads/master
2023-06-29T07:54:00.597735
2021-06-05T10:03:57
2021-06-05T10:03:57
176,249,973
0
0
null
2021-08-02T06:39:39
2019-03-18T09:44:26
Java
ISO-8859-1
Java
false
false
1,415
java
package de.fhdo.terminologie.ws.idp.authorizationIDP; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * <p>Java-Klasse für loginRequestType complex type. * * <p>Das folgende Schemafragment gibt den erwarteten Content an, der in dieser Klasse enthalten ist. * * <pre> * &lt;complexType name="loginRequestType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="login" type="{http://authorizationIDP.idp.ws.terminologie.fhdo.de/}loginType" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "loginRequestType", propOrder = { "login" }) public class LoginRequestType { protected LoginType login; /** * Ruft den Wert der login-Eigenschaft ab. * * @return * possible object is * {@link LoginType } * */ public LoginType getLogin() { return login; } /** * Legt den Wert der login-Eigenschaft fest. * * @param value * allowed object is * {@link LoginType } * */ public void setLogin(LoginType value) { this.login = value; } }
[ "bachinge@technikum-wien.at" ]
bachinge@technikum-wien.at
0bb17fc8294870a42f55aded31e6fa4cb03bc01d
848b9360c05424ad1cd50e59d17802ac6ef06044
/app/src/main/java/com/example/omar/logisticsapplication/DriversActivity.java
3e91aec16b1f8a408cfe088d154d3fa28afa739f
[]
no_license
OmarNabiiil/LogisticsApplication
b03929f7a9dedc0d3765dc49ffd54416a73e0736
49e787cacf6684d88891173baa44ca9d9a2d2ce1
refs/heads/master
2020-04-13T19:43:35.432174
2018-12-28T13:01:23
2018-12-28T13:01:23
163,411,063
0
0
null
null
null
null
UTF-8
Java
false
false
3,707
java
package com.example.omar.logisticsapplication; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.support.v7.widget.DefaultItemAnimator; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.View; import com.android.volley.Request; import com.android.volley.Response; import com.android.volley.VolleyError; import com.android.volley.toolbox.StringRequest; import com.example.omar.logisticsapplication.classes.AddDriverInterface; import com.example.omar.logisticsapplication.classes.Driver; import com.example.omar.logisticsapplication.listsAdapters.DriversAdapter; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class DriversActivity extends AppCompatActivity implements AddDriverInterface { private RecyclerView recyclerView; private List<Driver> drivers_list; private DriversAdapter mAdapter; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_drivers); recyclerView = findViewById(R.id.recycler_view); drivers_list = new ArrayList<>(); mAdapter = new DriversAdapter( drivers_list); RecyclerView.LayoutManager mLayoutManager = new LinearLayoutManager(this); recyclerView.setLayoutManager(mLayoutManager); recyclerView.setItemAnimator(new DefaultItemAnimator()); recyclerView.setAdapter(mAdapter); getAllDrivers(); } public void getAllDrivers(){ String tag_string_req = "req_register"; String url = Config.TEST_DRIVERS_URL; StringRequest strReq = new StringRequest(Request.Method.POST, url, new Response.Listener<String>() { @Override public void onResponse(String response) { Log.d("test", "GetCards Response: " + response.toString()); try { //JSONObject jObji = new JSONObject(response); JSONArray a=new JSONArray(response); int sizeofarray=a.length(); for(int i=0;i<sizeofarray;i++){ JSONObject jObj = a.getJSONObject(i);//all the users in the database Driver c=new Driver(jObj.get("name").toString(), jObj.get("mobile").toString(), jObj.get("address").toString(), jObj.get("cost").toString(), jObj.get("status").toString()); drivers_list.add(c); } mAdapter.notifyDataSetChanged(); } catch (JSONException e) { e.printStackTrace(); } } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { Log.e("test", "Registration Error: " + error.getMessage()); } }) { }; // Adding request to request queue ApplicationActivity.getInstance().addToRequestQueue(strReq, tag_string_req); } public void addDriver(){ AddDriver fr=new AddDriver(); fr.setListener(this); fr.show(getSupportFragmentManager(), "Add Driver"); } @Override public void onAddClick(Driver c) { mAdapter.addItem(c); } public void Add(View view) { addDriver(); } }
[ "omarnabil@Omars-MacBook-Air.local" ]
omarnabil@Omars-MacBook-Air.local
28ea4a6360cac5b68bb04b459c2d99672d24386e
f6691cb59f188ddc272b2a4b294d3c9e8b3d700e
/cxcy_maven/src/main/java/cn/lut/bear/admin/RWfile.java
09fe49a2112d9df4c3ea8cfb4731f69ca350a689
[]
no_license
Ryewhiskey/JavaTest
ad1cbb06d6d10df8ca0b1644c358d1b76339ff4f
6d89559f83d36ffba0d885bcf5c5048a0cc183bd
refs/heads/master
2022-07-31T01:01:11.280183
2019-11-07T06:32:38
2019-11-07T06:32:38
216,819,823
0
0
null
2022-06-29T17:43:39
2019-10-22T13:24:10
Java
UTF-8
Java
false
false
2,571
java
package cn.lut.bear.admin; import java.io.File; public class RWfile { /** * 删除单个文件 * @param sPath 被删除文件的文件名 * @return 单个文件删除成功返回true,否则返回false */ static public boolean deleteFile(String sPath) { boolean flag = false; File file = new File(sPath); // 路径为文件且不为空则进行删除 if (file.isFile() && file.exists()) { file.delete(); flag = true; } return flag; } /** * 删除目录(文件夹)以及目录下的文件 * @param sPath 被删除目录的文件路径 * @return 目录删除成功返回true,否则返回false */ static public boolean deleteDirectory(String sPath) { //如果sPath不以文件分隔符结尾,自动添加文件分隔符 if (!sPath.endsWith(File.separator)) { sPath = sPath + File.separator; } File dirFile = new File(sPath); //如果dir对应的文件不存在,或者不是一个目录,则退出 if (!dirFile.exists() || !dirFile.isDirectory()) { return false; } boolean flag = true; //删除文件夹下的所有文件(包括子目录) File[] files = dirFile.listFiles(); for (int i = 0; i < files.length; i++) { //删除子文件 if (files[i].isFile()) { flag = deleteFile(files[i].getAbsolutePath()); if (!flag) break; } //删除子目录 else { flag = deleteDirectory(files[i].getAbsolutePath()); if (!flag) break; } } if (!flag) return false; //删除当前目录 if (dirFile.delete()) { return true; } else { return false; } } /** * 根据路径删除指定的目录或文件,无论存在与否 *@param sPath 要删除的目录或文件 *@return 删除成功返回 true,否则返回 false。 */ static public boolean DeleteFolder(String sPath) { boolean flag = false; File file = new File(sPath); // 判断目录或文件是否存在 if (!file.exists()) { // 不存在返回 false return flag; } else { // 判断是否为文件 if (file.isFile()) { // 为文件时调用删除文件方法 return deleteFile(sPath); } else { // 为目录时调用删除目录方法 return deleteDirectory(sPath); } } } }
[ "306089698@qq.com" ]
306089698@qq.com
41ede2aa3164c62c56b993287c86095b02700ed0
055b1ae12a70c10c31d5f4b70871c2e46d1dd279
/src/unit/tests/PieceTest.java
c9a16c6d33b0d83eaa4963ee209cd17c2804a9b6
[]
no_license
bradguru2/ChessGame
65246be9fdd8cbc27436c22c9ea3dad301a3b845
c196fc57f64bbd9ba6e814d499f5867e7f920c64
refs/heads/master
2020-03-08T16:18:33.673268
2018-04-18T06:38:15
2018-04-18T06:38:15
128,235,900
0
0
null
null
null
null
UTF-8
Java
false
false
1,878
java
package unit.tests; import static org.junit.Assert.*; import org.junit.Test; import com.chess.pieces.*; public class PieceTest { @Test(expected = IllegalArgumentException.class) public void testPiecePlayerWhenNull() { new Piece(null, Ability.Bishop); } @Test(expected = IllegalArgumentException.class) public void testPieceAbilityWhenNull() { new Piece(new Player(PlayerColor.Lower, PlayerType.Auto, "foo"), null); } @Test public void testGetHistory() { String name = "testMe"; PlayerColor color = PlayerColor.Upper; PlayerType type = PlayerType.Manual; Ability ability = Ability.Bishop; Player player = new Player(color, type, name); Piece piece = new Piece(player, ability); assertNotSame(null, piece.getHistory()); assertEquals(0, piece.getHistory().size()); } @Test public void testGetPlayer() { String name = "testMe"; PlayerColor color = PlayerColor.Upper; PlayerType type = PlayerType.Manual; Ability ability = Ability.Bishop; Player player = new Player(color, type, name); Piece piece = new Piece(player, ability); assertSame(player, piece.getPlayer()); } @Test public void testGetAbility() { String name = "testMe"; PlayerColor color = PlayerColor.Upper; PlayerType type = PlayerType.Manual; Ability ability = Ability.Bishop; Player player = new Player(color, type, name); Piece piece = new Piece(player, ability); assertSame(ability, piece.getAbility()); } @Test public void testSetAbility() { String name = "testMe"; PlayerColor color = PlayerColor.Upper; PlayerType type = PlayerType.Manual; Ability ability = Ability.Pawn; Ability newAbility = Ability.Queen; Player player = new Player(color, type, name); Piece piece = new Piece(player, ability); piece.setAbility(newAbility); assertSame(newAbility, piece.getAbility()); } }
[ "bradley@bradley-pc" ]
bradley@bradley-pc
edd403712db4652a525fed5856534eb14d29342e
a6de4ab3ebd414074aa37a113485de0f0e850e2c
/app/src/main/java/br/com/nicoletti/comeja/fragments/FinalizarCompraFragment.java
72804844d752b239a5ced85066a5d5cdb41cc360
[ "MIT" ]
permissive
bhnicoletti/APPComeJa
d4e00a1ed1d8d2de65f6a6a2f14a3a6eff136a10
72ba2091f95682ae96728d917b8fd9c6d739d66b
refs/heads/main
2023-06-12T23:14:14.575407
2021-06-21T00:59:00
2021-06-21T00:59:00
329,344,891
1
0
null
null
null
null
UTF-8
Java
false
false
6,808
java
package br.com.nicoletti.comeja.fragments; import android.content.Context; import android.content.DialogInterface; import android.graphics.Color; import android.os.Bundle; import android.support.design.widget.FloatingActionButton; import android.support.v4.app.Fragment; import android.support.v7.app.AlertDialog; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.helper.ItemTouchHelper; import android.util.Log; import android.view.GestureDetector; import android.view.LayoutInflater; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; import android.widget.EditText; import android.widget.LinearLayout; import android.widget.RadioButton; import android.widget.RadioGroup; import android.widget.TextView; import android.widget.Toast; import com.google.gson.Gson; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.text.NumberFormat; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Locale; import br.com.nicoletti.comeja.MainActivity; import br.com.nicoletti.comeja.R; import br.com.nicoletti.comeja.adapters.CarrinhoAdapter; import br.com.nicoletti.comeja.extras.CarrinhoTouchHelper; import br.com.nicoletti.comeja.extras.UtilTCM; import br.com.nicoletti.comeja.interfaces.RecyclerViewOnClickListenerHack; import br.com.nicoletti.comeja.model.Endereco; import br.com.nicoletti.comeja.model.FormaPagamento; import br.com.nicoletti.comeja.model.ItemVenda; import br.com.nicoletti.comeja.model.WrapObjToNetwork; import br.com.nicoletti.comeja.network.NetworkConnection; import br.com.nicoletti.comeja.network.Transaction; public class FinalizarCompraFragment extends Fragment { private RadioGroup rgEndereco, rgFormaPagamente; private TextView valorTotal; private String formaPagamento; private EditText troco; private Endereco endereco; private Boolean end = false; private Boolean pag = false; private List<Endereco> listaEndereco = new ArrayList<>(); private List<FormaPagamento> listaFormaPagamento = new ArrayList<>(); @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_finalizarcompra, container, false); getActivity().getWindow().setSoftInputMode( WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN); listaEndereco = ((MainActivity) getActivity()).getUsuarioLogado().getEnderecos(); listaFormaPagamento = ((MainActivity) getActivity()).getCarrinhoCompras().get(0).getProdutoItemVenda().getEmpresaProduto().getListaFormaPagamento(); //Botao FloatingActionButton fab = (FloatingActionButton) view.findViewById(R.id.fab); fab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if (!pag) { Toast.makeText(getContext(), "Selecione uma forma de pagamento", Toast.LENGTH_SHORT).show(); } else if(!end){ Toast.makeText(getContext(), "Selecione um Endereço", Toast.LENGTH_SHORT).show(); } else { ((MainActivity) getActivity()).setEndereco(endereco); Double valor = null; if (!troco.getText().toString().equals("")) { valor = Double.parseDouble(troco.getText().toString().replace(',', '.')); Log.e("valor", valor.toString()); } ((MainActivity) getActivity()).finalizarVenda(formaPagamento, valor); try { realizarVenda(); } catch (JSONException e) { e.printStackTrace(); } } } }); rgEndereco = (RadioGroup) view.findViewById(R.id.rgEndereco); valorTotal = (TextView) view.findViewById(R.id.valorTotal); troco = (EditText) view.findViewById(R.id.edtTroco); Locale ptBr = new Locale("pt", "BR"); String valorString = NumberFormat.getCurrencyInstance(ptBr).format(((MainActivity) getActivity()).getValorTotal()); valorTotal.setText("Valor da compra: " + valorString); rgFormaPagamente = (RadioGroup) view.findViewById(R.id.rgFormaPagamento); for (int i = 0; i < listaFormaPagamento.size(); i++) { FormaPagamento fp = listaFormaPagamento.get(i); RadioButton radioButton = new RadioButton(getContext()); radioButton.setText(fp.getFormaPagamento()); radioButton.setTag(fp.getFormaPagamento()); radioButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { pag = true; formaPagamento = v.getTag().toString(); if(formaPagamento.equals("Dinheiro")) { troco.setVisibility(View.VISIBLE); } else{ troco.setVisibility(View.INVISIBLE); } } }); rgFormaPagamente.addView(radioButton); } for (int i = 0; i <= listaEndereco.size(); i++) { RadioButton radioButtonView = new RadioButton(getContext()); if (i < listaEndereco.size()) { String stringendereco = listaEndereco.get(i).getRuaEndereco() + ", nº " + listaEndereco.get(i).getNumeroEndereco(); radioButtonView.setText(stringendereco); radioButtonView.setTag(listaEndereco.get(i)); radioButtonView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { end = true; endereco = (Endereco) v.getTag(); } }); } else { radioButtonView.setText("Retirar no local"); radioButtonView.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { end = true; endereco = null; } }); } rgEndereco.addView(radioButtonView); } return view; } public void realizarVenda() throws JSONException { ((MainActivity) getActivity()).enviarVenda(); } }
[ "bruasa@hotmail.com" ]
bruasa@hotmail.com
e1852e87aff495f6d5b30c2da543e54544d61234
47bd5d5b5b9d05d4ebf2464a1ed6d9ee81f1ff9b
/src/main/java/pickupmanager/PickupManager.java
c2c50d3311c8ed20cd7a85389153c26510f28899
[]
no_license
ircashem/TEAM-UDAAR
588ed5b884bd6baf8df64a198867c9019e8fc1b8
66defd29de114d0ce604d65c5e18af61c222ed35
refs/heads/master
2023-06-21T05:51:41.738245
2021-07-28T09:40:41
2021-07-28T09:40:41
344,423,076
0
2
null
null
null
null
UTF-8
Java
false
false
3,907
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 pickupmanager; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.util.*; import postneedmanager.Need; /** * * @author ircashem */ public class PickupManager { private String fileName = "./consignDb.txt"; private List<Consignment> consignList; public PickupManager(){ this.consignList = new ArrayList<Consignment>(); } public boolean init(String fileName){ boolean res = false; BufferedReader bufReader = null; try { bufReader = new BufferedReader(new FileReader(fileName)); bufReader.readLine(); String oneLine = bufReader.readLine(); Need myNeed = null; while(oneLine != null){ StringTokenizer st = new StringTokenizer(oneLine, "|"); myNeed = new Need(); myNeed.setName(st.nextToken()); myNeed.setAddress(st.nextToken()); myNeed.setCategory(st.nextToken()); myNeed.setTopWear(Integer.parseInt(st.nextToken())); myNeed.setBottomWear(Integer.parseInt(st.nextToken())); myNeed.setWinterWear(Integer.parseInt(st.nextToken())); myNeed.setFootWear(Integer.parseInt(st.nextToken())); Consignment myConsign = new Consignment(); myConsign.setConsignment(myNeed); this.consignList.add(myConsign); oneLine = bufReader.readLine(); } bufReader.close(); res = true; } catch (FileNotFoundException e) { //do something clever with the exception System.out.println("File Not Found"); } catch (IOException e) { //do something clever with the exception System.out.println("IO Exception"); } return res; } public boolean write(String fileName){ boolean flag = false; BufferedWriter bw = null; try { bw = new BufferedWriter(new FileWriter(fileName)); bw.write("name|address|Category|top_wear|bottom_wear|winter_wear|foot_wear\n"); for(int i=0;i<this.consignList.size();i++){ // bw.write(this.needList.get(i).toString()); bw.write(this.consignList.get(i).toString()); } flag = true; bw.close(); } catch (IOException e) { System.out.println("Error Occurred." + e); } return flag; } public boolean addConsignment(Consignment nd){ this.consignList.clear(); this.init(fileName); boolean flag = false; try{ this.consignList.add(nd); write(this.fileName); } finally{ flag = true; } return flag; } public boolean deleteConsignment(Need nd){ this.consignList.clear(); this.init(fileName); boolean flag = false; for (int i=0;i<this.consignList.size();i++){ if (this.consignList.get(i).getConsignment().getName().equals(nd.getName())){ this.consignList.remove(i); write(this.fileName); flag = true; break; } } return flag; } // public static void main(String[] args){ // Consignment c = new Consignment(); // PickupManager pMgr = new PickupManager(); // pMgr.init("/home/ircashem/Desktop/consignDb.txt"); // // } }
[ "rahulkumar6084@gmail.com" ]
rahulkumar6084@gmail.com
22a487f08cc331a5ba26b9f1219784fa6a347618
5e581e40107cf24f1cc09ce883d6e17ae87212ec
/app/src/main/java/com/psguide/uttam/Models2/WpFeaturedmedium_.java
7204ff4360c8c1ff871e06e9af5b47c2a09ccf60
[]
no_license
marufnwu/ps_guide
8660fca38fa931e8fe81f4bc715ede59805e6d4f
ef5da6b21e15f2a1329e700d5476274c8a25bb0b
refs/heads/master
2022-12-04T10:11:26.363298
2020-08-28T06:24:51
2020-08-28T06:24:51
276,564,914
0
0
null
null
null
null
UTF-8
Java
false
false
2,971
java
package com.psguide.uttam.Models2; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class WpFeaturedmedium_ { @SerializedName("id") @Expose private Integer id; @SerializedName("date") @Expose private String date; @SerializedName("slug") @Expose private String slug; @SerializedName("type") @Expose private String type; @SerializedName("link") @Expose private String link; @SerializedName("title") @Expose private Title_ title; @SerializedName("author") @Expose private Integer author; @SerializedName("caption") @Expose private Caption caption; @SerializedName("alt_text") @Expose private String altText; @SerializedName("media_type") @Expose private String mediaType; @SerializedName("mime_type") @Expose private String mimeType; @SerializedName("media_details") @Expose private MediaDetails mediaDetails; @SerializedName("source_url") @Expose private String sourceUrl; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getDate() { return date; } public void setDate(String date) { this.date = date; } public String getSlug() { return slug; } public void setSlug(String slug) { this.slug = slug; } public String getType() { return type; } public void setType(String type) { this.type = type; } public String getLink() { return link; } public void setLink(String link) { this.link = link; } public Title_ getTitle() { return title; } public void setTitle(Title_ title) { this.title = title; } public Integer getAuthor() { return author; } public void setAuthor(Integer author) { this.author = author; } public Caption getCaption() { return caption; } public void setCaption(Caption caption) { this.caption = caption; } public String getAltText() { return altText; } public void setAltText(String altText) { this.altText = altText; } public String getMediaType() { return mediaType; } public void setMediaType(String mediaType) { this.mediaType = mediaType; } public String getMimeType() { return mimeType; } public void setMimeType(String mimeType) { this.mimeType = mimeType; } public MediaDetails getMediaDetails() { return mediaDetails; } public void setMediaDetails(MediaDetails mediaDetails) { this.mediaDetails = mediaDetails; } public String getSourceUrl() { return sourceUrl; } public void setSourceUrl(String sourceUrl) { this.sourceUrl = sourceUrl; } }
[ "maruf.paikgacha@gmail.com" ]
maruf.paikgacha@gmail.com
cae994900e1c2ecd6bb6272ff3fd2e7670b45403
b5db846dc817bc509692946c1ba78b46f32c1d89
/src/com/zyk/launcher/FolderInfo.java
ced3e5d713cfe26f88c6cc4edeab702d6851db94
[ "Apache-2.0" ]
permissive
yukun314/android-5.1.1_r29
74b14f2bb4073dd80f8ef7eb1d9ed48fad0a2102
dd3862935187874cfd29dd557048df1fd715c329
refs/heads/master
2021-01-21T12:58:17.592531
2016-06-02T10:01:46
2016-06-02T10:01:46
54,986,493
0
0
null
null
null
null
UTF-8
Java
false
false
3,407
java
/* * Copyright (C) 2008 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.zyk.launcher; import android.content.ClipData; import android.content.ContentValues; import android.content.Context; import com.zyk.launcher.compat.UserHandleCompat; import java.util.ArrayList; import java.util.Arrays; /** * Represents a folder containing shortcuts or apps. */ public class FolderInfo extends ItemInfo { /** * Whether this folder has been opened */ public boolean opened; /** * The apps and shortcuts */ ArrayList<ItemInfo> contents = new ArrayList<ItemInfo>(); ArrayList<FolderListener> listeners = new ArrayList<FolderListener>(); FolderInfo() { itemType = LauncherSettings.Favorites.ITEM_TYPE_FOLDER; user = UserHandleCompat.myUserHandle(); } /** * Add an app or shortcut * * @param item */ public void add(ItemInfo item) { contents.add(item); for (int i = 0; i < listeners.size(); i++) { listeners.get(i).onAdd(item); } itemsChanged(); } /** * Remove an app or shortcut. Does not change the DB. * * @param item */ public void remove(ItemInfo item) { contents.remove(item); for (int i = 0; i < listeners.size(); i++) { listeners.get(i).onRemove(item); } itemsChanged(); } public void setTitle(CharSequence title) { this.title = title; for (int i = 0; i < listeners.size(); i++) { listeners.get(i).onTitleChanged(title); } } @Override void onAddToDatabase(Context context, ContentValues values) { super.onAddToDatabase(context, values); values.put(LauncherSettings.Favorites.TITLE, title.toString()); } void addListener(FolderListener listener) { listeners.add(listener); } void removeListener(FolderListener listener) { if (listeners.contains(listener)) { listeners.remove(listener); } } void itemsChanged() { for (int i = 0; i < listeners.size(); i++) { listeners.get(i).onItemsChanged(); } } @Override void unbind() { super.unbind(); listeners.clear(); } interface FolderListener { public void onAdd(ItemInfo item); public void onRemove(ItemInfo item); public void onTitleChanged(CharSequence title); public void onItemsChanged(); } @Override public String toString() { return "FolderInfo(id=" + this.id + " type=" + this.itemType + " container=" + this.container + " screen=" + screenId + " cellX=" + cellX + " cellY=" + cellY + " spanX=" + spanX + " spanY=" + spanY + " dropPos=" + Arrays.toString(dropPos) + ")"; } }
[ "yukun314@126.com" ]
yukun314@126.com
28e0a1ce688b29ef871f7b20f583903a8f0fd7cb
9f04053cabe4d3e1ef66b68f59262afe0c0839f3
/java/Java200/src/com/ksh/java200/N104/Card.java
fa7c31aaf673abd26a69c79bbdf38544c011531a
[]
no_license
lovesky411/practice
3d246f0f706c429f40e7ddccff8e3059f296536b
96b2bbf672a817960814f06cef7cb209e513a42f
refs/heads/main
2023-02-10T03:30:06.285087
2021-01-08T15:22:09
2021-01-08T15:22:09
109,343,484
0
0
null
null
null
null
UTF-8
Java
false
false
576
java
package com.ksh.java200.N104; public class Card { private String cardVal; public String getCardVal() { return cardVal; } public Card(String cardVal) { this.cardVal = cardVal; } public Card(){ int suit = (int)(Math.random()*CardUtil.SUIT.length); int valu = (int)(Math.random()*CardUtil.VALU.length); cardVal = CardUtil.SUIT[suit]+CardUtil.VALU[valu]; } public Card(Card c){ this(c.getCardVal()); } @Override public String toString() { return "[" + cardVal + "]"; } }
[ "nomad411@naver.com" ]
nomad411@naver.com
c37c2aa6a8fe2ded21cdbd1f9e72f56d6ce21b43
2b6db85eca2a3b91c2dc4146f6cc1acd8a54b56b
/app/src/main/java/com/venkat/gdp/SubsDialog.java
a0946cfd99fd1e1a243bce006e3538c989a03bb8
[]
no_license
venkster11/GDP-SIES
9830fecf0037b60281536aa2cff778a492136020
9d077dedff90905d9309ad09aa25e17efbdba2b3
refs/heads/master
2022-07-16T12:02:29.744361
2020-05-16T10:58:01
2020-05-16T10:58:01
262,640,187
0
0
null
null
null
null
UTF-8
Java
false
false
2,477
java
package com.venkat.gdp; import android.app.AlertDialog; import android.app.Dialog; import android.content.Context; import android.content.DialogInterface; import android.content.SharedPreferences; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.widget.Button; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.DialogFragment; public class SubsDialog extends DialogFragment { TextView SubTxt; @NonNull @Override public Dialog onCreateDialog(@Nullable Bundle savedInstanceState) { AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()); LayoutInflater inflater = getActivity().getLayoutInflater(); View view = inflater.inflate(R.layout.dialog_layout, null); SubTxt = view.findViewById(R.id.dialog_txt); SharedPreferences pref = getContext().getSharedPreferences("MyPref", Context.MODE_PRIVATE); final SharedPreferences.Editor editor = pref.edit(); final boolean subedornot = pref.getBoolean("subed",false); if (subedornot) SubTxt.setText("Do you want to Unsubscribe"); else SubTxt.setText("Do you want to Subscribe"); builder.setView(view) .setTitle("Confirmation") .setPositiveButton("OK", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { if (subedornot){ editor.putBoolean("subed",false); editor.apply(); Button button = getActivity().findViewById(R.id.btn_sub); button.setText("Subscribe"); } else { editor.putBoolean("subed",true); editor.apply(); Button button = getActivity().findViewById(R.id.btn_sub); button.setText("Subscribed"); } } }) .setNegativeButton("Cancel", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { } }); return builder.create(); } }
[ "venkateshm11799@gmail.com" ]
venkateshm11799@gmail.com
b85beb1b6628988503e4c5ef5ad9c8424bf72a29
7a8dc41f59dcfa418021e393aeb7d0ec9615fc7b
/src/main/java/vu/lt/mybatis/dao/ReservationRoomMapper.java
e0cfe531fae62ae4ac904956fce10cbf137f6575
[]
no_license
RytisBnk/PSK-1
346d3e420cfa18e0f0183858148b0192e1aa42a4
a76036de8e9966112fde90ad1bbe7cf011e98fe5
refs/heads/master
2022-01-24T02:57:34.695481
2019-05-28T19:58:10
2019-05-28T19:58:10
178,616,249
0
0
null
2022-01-07T00:09:49
2019-03-30T22:07:22
Java
UTF-8
Java
false
false
672
java
package vu.lt.mybatis.dao; import java.util.List; import org.mybatis.cdi.Mapper; import vu.lt.mybatis.model.ReservationRoom; @Mapper public interface ReservationRoomMapper { /** * This method was generated by MyBatis Generator. * This method corresponds to the database table PUBLIC.RESERVATION_ROOM * * @mbg.generated Sun Mar 31 17:17:07 EEST 2019 */ int insert(ReservationRoom record); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table PUBLIC.RESERVATION_ROOM * * @mbg.generated Sun Mar 31 17:17:07 EEST 2019 */ List<ReservationRoom> selectAll(); }
[ "rytis.bankieta@gmail.com" ]
rytis.bankieta@gmail.com
f43cd3f3226333eb147520d16f2c8e00abd898b0
d1d3237aa581834b15b3dbb8dea111d09bf614d0
/src/java/org/apache/commons/configuration2/io/HomeDirectoryLocationStrategy.java
113b2c2c64ee1d9ded6663b98a4dfbf31559c11a
[]
no_license
tanatoly/med
f97e5dd3340fa0f176ed888ac9e9f7e3f3272fd0
88a7f0ce41e77ec505ce2304be4b62525571c1ba
refs/heads/master
2021-05-21T01:02:20.242056
2020-04-23T11:58:39
2020-04-23T11:58:39
252,478,461
0
0
null
null
null
null
UTF-8
Java
false
false
6,038
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.commons.configuration2.io; import java.io.File; import java.net.URL; import org.apache.commons.lang3.StringUtils; /** * <p> * A specialized implementation of {@code FileLocationStrategy} which searches * for files in the user's home directory or another special configurable * directory. * </p> * <p> * This strategy implementation ignores the URL stored in the passed in * {@link FileLocator}. It constructs a file path from the configured home * directory (which is the user's home directory per default, but can be changed * to another path), optionally the base path, and the file name. If the * resulting path points to an existing file, its URL is returned. * </p> * <p> * When constructing an instance it can be configured whether the base path * should be taken into account. If this option is set, the base path is * appended to the home directory if it is not <b>null</b>. This is useful for * instance to select a specific sub directory of the user's home directory. If * this option is set to <b>false</b>, the base path is always ignored, and only * the file name is evaluated. * </p> * * @version $Id: HomeDirectoryLocationStrategy.java 1624601 2014-09-12 18:04:36Z oheger $ */ public class HomeDirectoryLocationStrategy implements FileLocationStrategy { /** Constant for the system property with the user's home directory. */ private static final String PROP_HOME = "user.home"; /** The home directory to be searched for the requested file. */ private final String homeDirectory; /** The flag whether the base path is to be taken into account. */ private final boolean evaluateBasePath; /** * Creates a new instance of {@code HomeDirectoryLocationStrategy} and * initializes it with the specified settings. * * @param homeDir the path to the home directory (can be <b>null</b>) * @param withBasePath a flag whether the base path should be evaluated */ public HomeDirectoryLocationStrategy(String homeDir, boolean withBasePath) { homeDirectory = fetchHomeDirectory(homeDir); evaluateBasePath = withBasePath; } /** * Creates a new instance of {@code HomeDirectoryLocationStrategy} and * initializes the base path flag. The home directory is set to the user's * home directory. * * @param withBasePath a flag whether the base path should be evaluated */ public HomeDirectoryLocationStrategy(boolean withBasePath) { this(null, withBasePath); } /** * Creates a new instance of {@code HomeDirectoryLocationStrategy} with * default settings. The home directory is set to the user's home directory. * The base path flag is set to <b>false</b> (which means that the base path * is ignored). */ public HomeDirectoryLocationStrategy() { this(false); } /** * Returns the home directory. In this directory the strategy searches for * files. * * @return the home directory used by this object */ public String getHomeDirectory() { return homeDirectory; } /** * Returns a flag whether the base path is to be taken into account when * searching for a file. * * @return the flag whether the base path is evaluated */ public boolean isEvaluateBasePath() { return evaluateBasePath; } /** * {@inheritDoc} This implementation searches in the home directory for a * file described by the passed in {@code FileLocator}. If the locator * defines a base path and the {@code evaluateBasePath} property is * <b>true</b>, a sub directory of the home directory is searched. */ @Override public URL locate(FileSystem fileSystem, FileLocator locator) { if (StringUtils.isNotEmpty(locator.getFileName())) { String basePath = fetchBasePath(locator); File file = FileLocatorUtils.constructFile(basePath, locator.getFileName()); if (file.isFile()) { return FileLocatorUtils.convertFileToURL(file); } } return null; } /** * Determines the base path to be used for the current locate() operation. * * @param locator the {@code FileLocator} * @return the base path to be used */ private String fetchBasePath(FileLocator locator) { if (isEvaluateBasePath() && StringUtils.isNotEmpty(locator.getBasePath())) { return FileLocatorUtils.appendPath(getHomeDirectory(), locator.getBasePath()); } else { return getHomeDirectory(); } } /** * Obtains the home directory to be used by a new instance. If a directory * name is provided, it is used. Otherwise, the user's home directory is * looked up. * * @param homeDir the passed in home directory * @return the directory to be used */ private static String fetchHomeDirectory(String homeDir) { return (homeDir != null) ? homeDir : System.getProperty(PROP_HOME); } }
[ "tanatoly@gmail.com" ]
tanatoly@gmail.com
829cb243c43378930859ea071a0c303f6d1f2fe1
cd6c199441cbdb958797983cca67e3048faf9262
/src/main/java/com/mana/spring/web/TaxRateController.java
bd43e3b8a0680faa6c3a1ac51130dc7d31d06183
[]
no_license
nik8singh/blueberry
9e0491d2f680a237ee2792f496eb6f7ca0543865
4e57e6419f2a141490a24b37ac711bceaae41115
refs/heads/master
2022-12-20T07:18:31.671313
2021-01-23T00:29:47
2021-01-23T00:29:47
148,213,464
1
0
null
2022-12-15T23:39:39
2018-09-10T20:15:08
Java
UTF-8
Java
false
false
1,090
java
package com.mana.spring.web; import com.mana.spring.domain.TaxRate; import com.mana.spring.service.TaxRateService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; import javax.validation.Valid; import java.util.ArrayList; @RestController @RequestMapping("/taxrate") public class TaxRateController { @Autowired public TaxRateService taxRateService; @RequestMapping(value = "adm/save", method = RequestMethod.POST) public TaxRate saveTaxRate(@RequestBody TaxRate taxRate) { return taxRateService.addTaxRate(taxRate); } @RequestMapping(value = "adm/update", method = RequestMethod.POST) public TaxRate updateTaxRate(@Valid @RequestBody TaxRate taxRate) { return taxRateService.updateTaxRate(taxRate); } @RequestMapping(value = "adm/list/active/{pageNumber}", method = RequestMethod.GET, produces = "application/json") public @ResponseBody ArrayList<TaxRate> getTaxRates(@PathVariable int pageNumber) { return taxRateService.getAll(pageNumber); } }
[ "nscoder8@gmail.com" ]
nscoder8@gmail.com
941d217cbdf2adc438f95360829e2bf2dee1db89
1f42910c413b2a75edbf897b3ec5361a1d0a24db
/src/main/java/it/univaq/disim/oop/pharmathome/business/impl/ram/PrescrizioneServicesRAM.java
e554282c209ed872d677dbdfcdaca0a9294f317f
[]
no_license
Hacker07info/pharm-home
700b8e094ed61273880cbff6bed4c64e296e5e91
bf9364cbb372943ba6c9b65f97ae8b51c8be3474
refs/heads/master
2023-02-10T04:08:29.789391
2020-07-24T12:22:13
2020-07-24T12:22:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,453
java
package it.univaq.disim.oop.pharmathome.business.impl.ram; import java.time.LocalDate; import java.util.ArrayList; import java.util.Collection; import java.util.List; import it.univaq.disim.oop.pharmathome.business.exceptions.BusinessException; import it.univaq.disim.oop.pharmathome.business.exceptions.FarmacoNotFoundException; import it.univaq.disim.oop.pharmathome.business.exceptions.UserNotFoundException; import it.univaq.disim.oop.pharmathome.business.services.FarmacoServices; import it.univaq.disim.oop.pharmathome.business.services.PrescrizioneServices; import it.univaq.disim.oop.pharmathome.business.services.UserServices; import it.univaq.disim.oop.pharmathome.domain.Farmaco; import it.univaq.disim.oop.pharmathome.domain.Medico; import it.univaq.disim.oop.pharmathome.domain.Paziente; import it.univaq.disim.oop.pharmathome.domain.Prescrizione; public class PrescrizioneServicesRAM implements PrescrizioneServices{ private static List<Prescrizione> prescrizioni = new ArrayList<Prescrizione>(); UserServices userServices; FarmacoServices farmacoServices; public PrescrizioneServicesRAM(UserServices userServices, FarmacoServices farmacoServices) { this.userServices = userServices; this.farmacoServices = farmacoServices; creaPrescrizioniIniziali(); } @Override public List<Prescrizione> findPrescrizioniDaEvadere() throws BusinessException{ ArrayList<Prescrizione> result = new ArrayList<Prescrizione>(); for(Prescrizione prescrizione : prescrizioni) if(prescrizione.getStato().equals("Non Evasa")) result.add(prescrizione); return result; } @Override public void evadiPrescrizione(Prescrizione prescrizione) throws BusinessException { prescrizione.setStato("Evasa"); } @Override public List<Prescrizione> findPrescrizioniFromPaziente(Paziente paziente) throws BusinessException { List<Prescrizione> result = new ArrayList<Prescrizione>(); for(Prescrizione prescrizione : prescrizioni) { if(prescrizione.getPaziente().getId() == paziente.getId()) result.add(prescrizione); } return result; } @Override public List<Prescrizione> findPrescrizioniFromMedico(Medico medico) throws BusinessException { List<Prescrizione> result = new ArrayList<Prescrizione>(); for(Prescrizione prescrizione : prescrizioni) { if(prescrizione.getMedico().getId() == medico.getId()) result.add(prescrizione); } return result; } @Override public List<Prescrizione> cercaPrescrizioni(Paziente paziente, String medico, String farmaco, LocalDate data) throws BusinessException { List<Prescrizione> prescrizioniPaziente = findPrescrizioniFromPaziente(paziente); List<Prescrizione> result = new ArrayList<Prescrizione>(); boolean boolMedico = false, boolData = false, boolFarmaco = false; if(medico.isEmpty()) boolMedico = true; if(farmaco.isEmpty()) boolFarmaco = true; for(Prescrizione prescr : prescrizioniPaziente) { if(boolMedico == false && (medico.equalsIgnoreCase(prescr.getMedico().getNome()) || (medico.equalsIgnoreCase(prescr.getMedico().getCognome()))) ) boolMedico = true; if(data.equals(prescr.getData())) boolData = true; for(Farmaco farm : prescr.getFarmaco()) { if(farm.getNome().equalsIgnoreCase(farmaco)) boolFarmaco = true; } if(boolMedico && boolData && boolFarmaco) result.add(prescr); } return result; } @Override public void modificaPrescrizione(Prescrizione prescrizione, String nome, String cognome, Collection<String> farmaci) throws BusinessException { try { int idNuovoPaziente = userServices.findIdPazienteByNominativo(nome, cognome); Paziente nuovoPaziente = userServices.findPazienteById(idNuovoPaziente); List<Farmaco> nuoviFarmaci = new ArrayList<Farmaco>(); Farmaco farmaco; int idFarmaco; for(String NomeFarmaco : farmaci) { idFarmaco = farmacoServices.findIdFarmacoByNome(NomeFarmaco); farmaco = farmacoServices.findFarmacoById(idFarmaco); nuoviFarmaci.add(farmaco); } prescrizione.setPaziente(nuovoPaziente); prescrizione.setFarmaco(nuoviFarmaci); } catch(UserNotFoundException e) { throw new UserNotFoundException(); } catch(FarmacoNotFoundException e2) { throw new FarmacoNotFoundException(); } } @Override public void cancellaPrescrizione(Prescrizione prescrizione) throws BusinessException { prescrizioni.remove(prescrizione); } @Override public void creaPrescrizione(int idMedico, String nome, String cognome, List<String> farmaci) throws BusinessException { try { Prescrizione result = new Prescrizione(); int idPaziente = userServices.findIdPazienteByNominativo(nome, cognome); Paziente paziente = userServices.findPazienteById(idPaziente); List<Farmaco> listaFarmaci = new ArrayList<Farmaco>(); Farmaco farmaco; int idFarmaco; for(String NomeFarmaco : farmaci) { idFarmaco = farmacoServices.findIdFarmacoByNome(NomeFarmaco); farmaco = farmacoServices.findFarmacoById(idFarmaco); listaFarmaci.add(farmaco); } result.setNumero(prescrizioni.size()+1); result.setMedico(userServices.findMedicoById(idMedico)); result.setPaziente(paziente); result.setFarmaco(listaFarmaci); result.setData(LocalDate.now()); result.setStato("Non Evasa"); prescrizioni.add(result); } catch(UserNotFoundException e) { throw new UserNotFoundException(); } catch(FarmacoNotFoundException e2) { throw new FarmacoNotFoundException(); } } private void creaPrescrizioniIniziali() { Farmaco f1 = new Farmaco(); f1.setId(1); f1.setCodiceMinisteriale("83657"); f1.setNome("Oki"); f1.setCasaFarmaceutica("Bayern"); f1.setPrezzo(4.99); f1.setDisponibilita(15); f1.setQuantitaMinima(5); Farmaco f2 = new Farmaco(); f2.setId(2); f2.setCodiceMinisteriale("42974"); f2.setNome("Tachipirina"); f2.setCasaFarmaceutica("Melanini"); f2.setPrezzo(8.50); f2.setDisponibilita(10); f2.setQuantitaMinima(3); Farmaco f3 = new Farmaco(); f3.setId(3); f3.setCodiceMinisteriale("87402"); f3.setNome("Rinazina"); f3.setCasaFarmaceutica("Santa Croce"); f3.setPrezzo(4.99); f3.setDisponibilita(8); f3.setQuantitaMinima(3); List<Farmaco> lista1 = new ArrayList<Farmaco>(); lista1.add(f1); lista1.add(f2); List<Farmaco> lista2 = new ArrayList<Farmaco>(); lista2.add(f3); Medico medico = new Medico(); medico.setId(2); medico.setNome("Davide"); medico.setCognome("Palombaro"); medico.setEmail("davide@gmail.com"); medico.setCodiceFiscale("DVDPLB99L21E058I"); medico.setPassword("davide"); Paziente paziente = new Paziente(); paziente.setId(1); paziente.setNome("Federico"); paziente.setCognome("Cantoro"); paziente.setEmail("federico@gmail.com"); paziente.setCodiceFiscale("CNTFRC"); paziente.setPassword("federiico"); LocalDate date = LocalDate.now(); Prescrizione p1 = new Prescrizione(); p1.setNumero(1); p1.setMedico(medico); p1.setPaziente(paziente); p1.setFarmaco(lista1); p1.setData(date); p1.setStato("Non Evasa"); Prescrizione p2 = new Prescrizione(); p2.setNumero(2); p2.setMedico(medico); p2.setPaziente(paziente); p2.setFarmaco(lista2); p2.setData(date); p2.setStato("Non Evasa"); prescrizioni.add(p1); prescrizioni.add(p2); paziente.setPrescrizioni(prescrizioni); paziente.setPrescrizioni(prescrizioni); } }
[ "federicocantoro99@gmail.com" ]
federicocantoro99@gmail.com
b34065f1dad74a7ec2e0a7b76b1b9ff6bfb32409
bf92ea3f90e8a47fa0fc6bf3883e7ed48d7b0106
/src/hyFlow/edu/vt/rt/hyflow/helper/Atomic.java
80f369440f6fd836edbffc4050c0aa76de10bdd7
[]
no_license
junwhan/replication
5a34b679774590dbcb01c5dcbe81b93e7ecdcec6
a8005e85510a86691731f5640234dd11c07bd3ac
refs/heads/master
2016-09-05T23:25:24.615598
2014-01-02T02:22:53
2014-01-02T02:22:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,475
java
package edu.vt.rt.hyflow.helper; import org.deuce.transaction.Context; import org.deuce.transaction.ContextDelegator; import org.deuce.transaction.TransactionException; import edu.vt.rt.hyflow.benchmark.tm.vacation.Benchmark; import edu.vt.rt.hyflow.core.AbstractDistinguishable; import edu.vt.rt.hyflow.core.tm.ContextFactory; import edu.vt.rt.hyflow.core.tm.NestedContext; import edu.vt.rt.hyflow.core.tm.NestingModel; import edu.vt.rt.hyflow.core.tm.control.ControlContext; import edu.vt.rt.hyflow.util.io.Logger; public abstract class Atomic<T> { // Set default nesting model here: private NestingModel nestingModel = NestingModel.FLAT; protected boolean m_hasOnCommit = false; protected boolean m_hasOnAbort = false; public Atomic() { // default (empty) constructor // use flat nesting } public Atomic(boolean configurable) { if (configurable) { this.nestingModel = NestingModel.fromString( System.getProperty("defaultNestingModel", "FLAT")); } } public Atomic(NestingModel nestingModel) { this.nestingModel = nestingModel; } public NestingModel getNestingModel() { return nestingModel; } // override this public abstract T atomically(AbstractDistinguishable self, Context __transactionContext__); public T execute(AbstractDistinguishable self) throws Throwable { Logger.debug("BEGIN ATOMIC BLOCK"); Throwable throwable = null; ContextDelegator.setNestingModel(nestingModel); Context context = ContextDelegator.getInstance(); T ret = null; boolean commit = true; //long result = 0; for (int i = 0; i < 0x7fffffff; i++) { context.init(3); ((NestedContext)context).setCurrentOpenNestingAction(this); try { ret = atomically(self, context); } catch (TransactionException ex) { Logger.debug("TransactionException #1"); ex.printStackTrace(Logger.levelStream[Logger.DEBUG]); commit = false; } catch (Throwable ex) { throwable = ex; } if (commit) { if (context.commit()) { ContextDelegator.releaseInstance(context); if (throwable != null) { Logger.debug("EXCEPTION IN ATOMIC BLOCK"); throwable.printStackTrace(Logger.levelStream[Logger.DEBUG]); throw throwable; } else { Logger.debug("END ATOMIC BLOCK"); return ret; } } else { Logger.debug("Commit failed :<"); context.rollback(); // TODO: we don't want casts here ((edu.vt.rt.hyflow.core.tm.dtl.Context)context).doOnAbort(); ((NestedContext)context).checkParent(); } } else { if(context instanceof ControlContext) ControlContext.abort(((ControlContext)context).getContextId()); else // rollback does checkParent! context.rollback(); commit = true; } // Ugly hack, contention manager should handle this instead :( // If last was commit, no sleep // Otherwise, some sleep, depending on the number of recent aborts ContextDelegator.getFactory().delayNext(); if (((NestedContext)context).isTopLevel()) { StatsAggregator.get().endTxn(); } } ContextDelegator.releaseInstance(context); Logger.debug("END ATOMIC BLOCK (FAILED)"); throw new TransactionException("Failed to commit the transaction in the defined retries."); } public void onCommit(Context __transactionContext__) { } public void onAbort(Context __transactionContext__) { } public boolean hasOnCommit() { return m_hasOnCommit; } public boolean hasOnAbort() { return m_hasOnAbort; } }
[ "jkim@gojkim" ]
jkim@gojkim
f9b28cb2db8303a78bc3754aaaf03fe547a205fc
4abd71563eeef17d075ac79eb624e39312c14fca
/app/src/main/java/com/example/recipes/RecipeProvider.java
a7985601921ba3f884c84548ba5ab999726e3a5e
[]
no_license
wws002/androidRecipes
04da1e1b69ef84a6b83c4ca98db00521c8918def
cd01647954e9d1b7d3d82336e7b1ee27b9cb9a5a
refs/heads/main
2023-02-18T09:33:51.053178
2021-01-21T23:03:34
2021-01-21T23:03:34
309,534,872
0
0
null
null
null
null
UTF-8
Java
false
false
5,957
java
package com.example.recipes; import android.content.ContentProvider; import android.content.ContentValues; import android.content.UriMatcher; import android.database.Cursor; import android.net.Uri; import android.content.Context; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper; import android.database.sqlite.SQLiteQueryBuilder; import android.text.TextUtils; import android.util.Log; import androidx.annotation.NonNull; import androidx.annotation.Nullable; public class RecipeProvider extends ContentProvider { private static String LOGTAG = "RecipeProvider:"; private static final String DBNAME = "RecipeDB"; private static final String AUTHORITY = "com.example.recipes.recipeprovider"; private static final String TABLE_NAME = "Recipes"; public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/" + TABLE_NAME); public static final String RECIPES_TABLE_COL_ID = "_id"; public static final String RECIPES_TABLE_COL_TYPE = "TYPE"; public static final String RECIPES_TABLE_COL_TITLE = "TITLE"; public static final String RECIPES_TABLE_COL_CONTENT = "CONTENT"; private static final String SQL_CREATE_MAIN = "CREATE TABLE " + TABLE_NAME + " " + "(" + RECIPES_TABLE_COL_ID + " INTEGER PRIMARY KEY, " + RECIPES_TABLE_COL_TYPE + " TEXT," + RECIPES_TABLE_COL_TITLE + " TEXT," + RECIPES_TABLE_COL_CONTENT + " TEXT)"; private static final UriMatcher sUriMatcher = new UriMatcher(UriMatcher.NO_MATCH); private MainDatabaseHelper mOpenHelper; public RecipeProvider(){ sUriMatcher.addURI(AUTHORITY, TABLE_NAME, 1); sUriMatcher.addURI(AUTHORITY, TABLE_NAME + "/#", 2); } @Override public boolean onCreate() { mOpenHelper = new MainDatabaseHelper(getContext()); return true; } @Nullable @Override public Cursor query(@NonNull Uri uri, @Nullable String[] projection, @Nullable String selection, @Nullable String[] selectionArgs, @Nullable String sortOrder) { SQLiteQueryBuilder queryBuilder = new SQLiteQueryBuilder(); queryBuilder.setTables(TABLE_NAME); switch(sUriMatcher.match(uri)){ case 1: if(TextUtils.isEmpty(sortOrder)) sortOrder="_ID ASC"; break; case 2: selection = selection + "_ID = " + uri.getLastPathSegment(); break; default: Log.e(LOGTAG, "URI not recognized " + uri); } Cursor cursor = queryBuilder.query(mOpenHelper.getWritableDatabase(),projection,selection,selectionArgs,null,null,sortOrder); return cursor; } @Nullable @Override public String getType(@NonNull Uri uri) { throw new UnsupportedOperationException("Not yet implemented."); } @Nullable @Override public Uri insert(@NonNull Uri uri, @Nullable ContentValues values) { switch(sUriMatcher.match(uri)){ case 1: break; default: Log.e(LOGTAG, "URI not recognized " + uri); } long id = mOpenHelper.getWritableDatabase().insert(TABLE_NAME, null, values); getContext().getContentResolver().notifyChange(uri, null); return Uri.parse(CONTENT_URI+"/" + id); } @Override public int delete(@NonNull Uri uri, @Nullable String selection, @Nullable String[] selectionArgs) { switch(sUriMatcher.match(uri)){ case 2: String id = uri.getPathSegments().get(1); selection = RECIPES_TABLE_COL_ID + "=" + id + (!TextUtils.isEmpty(selection) ? "AND (" + selection + ")" : ""); break; default: throw new IllegalArgumentException("Unsupported URI: " + uri); } int deleteCount = mOpenHelper.getWritableDatabase().delete( TABLE_NAME,selection,selectionArgs); getContext().getContentResolver().notifyChange(uri, null); return deleteCount; } @Override public int update(@NonNull Uri uri, @Nullable ContentValues values, @Nullable String selection, @Nullable String[] selectionArgs) { switch (sUriMatcher.match(uri)){ case 1: break; case 2: String id = uri.getPathSegments().get(1); selection = RECIPES_TABLE_COL_ID + "=" + id + (!TextUtils.isEmpty(selection) ? "AND (" + selection + ")" : ""); break; default: throw new IllegalArgumentException("Unsupported URI: " + uri); } int updateCount = mOpenHelper.getWritableDatabase().update(TABLE_NAME, values, selection,selectionArgs); getContext().getContentResolver().notifyChange(uri,null); return updateCount; } //Class for creating an instance of a SQLiteOpenHelper //Performs creation of the SQLite Database if none exists protected static final class MainDatabaseHelper extends SQLiteOpenHelper { /* * Instantiates an open helper for the provider's SQLite data repository * Do not do database creation and upgrade here. */ MainDatabaseHelper(Context context) { super(context, DBNAME, null, 7); } /* * Creates the data repository. This is called when the provider attempts to open the * repository and SQLite reports that it doesn't exist. */ public void onCreate(SQLiteDatabase db) { // Creates the main table db.execSQL(SQL_CREATE_MAIN); } public void onUpgrade(SQLiteDatabase db, int int1, int int2){ db.execSQL("DROP TABLE IF EXISTS Recipes"); onCreate(db); } } }
[ "wws002@email.uark.edu" ]
wws002@email.uark.edu
a5d0e4ab3646fe61d3dd74e9c184984b984d3198
797ddee1e39cd2270f857de6b77607b084a62a72
/src/main/java/com/serijakala/sj4/akzo/akzonobel/web/rest/errors/package-info.java
67980ee8908c15ca8df892a31a2b1b0f01532599
[]
no_license
Ila82M/akzo_jh-application
e06084de5467419e88e26bd408c76eba9bb1211a
8d834554f82ec9328ee0e58b4825da7645bb24a2
refs/heads/master
2020-03-31T17:54:36.006631
2018-10-10T14:36:48
2018-10-10T14:36:48
152,438,555
0
0
null
2018-10-11T13:41:49
2018-10-10T14:36:39
Java
UTF-8
Java
false
false
208
java
/** * Specific errors used with Zalando's "problem-spring-web" library. * * More information on https://github.com/zalando/problem-spring-web */ package com.serijakala.sj4.akzo.akzonobel.web.rest.errors;
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
5c26582147e9482874f16f6a6500ec24855f9458
5249baa32e85c441ae88952b03052efa1a6cca76
/src/collections/HashsetConcept.java
d859cc40120f8e7ce1ac2ca4dbd30f2cdcd92573
[]
no_license
susanta2k/JavaCode
e1a7f1bc02e10c2e99dc45b0d3b1ad55a518ddc3
69b5f2101c829359b08c9a5b5bb4578ecd70d561
refs/heads/master
2022-07-10T05:55:23.845922
2019-09-19T00:10:37
2019-09-19T00:10:37
209,422,725
0
0
null
2022-03-08T21:23:22
2019-09-18T23:40:41
Java
UTF-8
Java
false
false
577
java
package collections; import java.util.HashSet; import java.util.Iterator; // HashSet is class which implements Set interface //It will allow to store duplicate object. Objects are stores in random order. public class HashsetConcept { public static void main(String[] args) { HashSet<Integer> hs = new HashSet<Integer>(); hs.add(10); hs.add(20); hs.add(30); hs.add(40); hs.add(50); hs.add(10); System.out.println(hs); Iterator<Integer> it = hs.iterator(); while (it.hasNext()) { System.out.println(it.next()); } } }
[ "susanta2k@gmail.com" ]
susanta2k@gmail.com
8b86959f6a5bbf05eea333350587e425c3ae7162
3f63486beb1f2b9a1be3c7c01df9b3a8696641b3
/tools/src/tool/util/Config.java
2d81f53ebacdbfe9f6aacfd8d212e375fbf762c1
[]
no_license
junit/mmo-server
44b9ec878c45e5c6a9b733aeb2edea67e0b9ca2d
7f878816c33ee441e434f4a6ec46f42193f038fd
refs/heads/master
2020-09-13T10:00:39.158049
2014-08-14T03:48:27
2014-08-14T03:48:27
28,801,938
10
8
null
2015-01-05T07:17:10
2015-01-05T07:17:10
null
UTF-8
Java
false
false
3,607
java
package tool.util; import java.io.File; import java.util.Iterator; import org.dom4j.Document; import org.dom4j.DocumentException; import org.dom4j.Element; import org.dom4j.io.SAXReader; import tool.ftl.LanguageEnum; public class Config { private static Config instance = new Config(); private Config() { SAXReader reader = new SAXReader(); Document doc = null; try { doc = reader.read(new File("config/config.xml")); } catch (DocumentException e) { e.printStackTrace(); } Element root = doc.getRootElement(); for (Iterator<?> i = root.elementIterator(); i.hasNext();) { Element element = (Element) i.next(); if (element.getName().equals("java-client")) { javaClientPath = element.attributeValue("path"); } else if (element.getName().equals("java-server")) { javaServerPath = element.attributeValue("path"); } else if (element.getName().equals("message")) { messagePath = element.attributeValue("path"); } else if (element.getName().equals("as")) { asPath = element.attributeValue("path"); } else if (element.getName().equals("db-config")) { config_url = element.attributeValue("url"); config_usr = element.attributeValue("usr"); config_pwd = element.attributeValue("pwd"); } else if (element.getName().equals("db-data")) { data_url = element.attributeValue("url"); data_usr = element.attributeValue("usr"); data_pwd = element.attributeValue("pwd"); } } } public static Config getInstance() { return instance; } private String javaClientPath; private String javaServerPath; private String messagePath; private String asPath; private String data_url; private String data_usr; private String data_pwd; private String config_url; private String config_usr; private String config_pwd; public String getPath(LanguageEnum type) { switch (type) { case AS: return asPath; case JAVA_CLIENT: return javaClientPath; case JAVA_SERVER: return javaServerPath; } return null; } public String getJavaClientPath() { return javaClientPath; } public void setJavaClientPath(String javaClientPath) { this.javaClientPath = javaClientPath; } public String getJavaServerPath() { return javaServerPath; } public void setJavaServerPath(String javaServerPath) { this.javaServerPath = javaServerPath; } public String getMessagePath() { return messagePath; } public void setMessagePath(String messagePath) { this.messagePath = messagePath; } public String getAsPath() { return asPath; } public void setAsPath(String asPath) { this.asPath = asPath; } public String getData_url() { return data_url; } public void setData_url(String data_url) { this.data_url = data_url; } public String getData_usr() { return data_usr; } public void setData_usr(String data_usr) { this.data_usr = data_usr; } public String getData_pwd() { return data_pwd; } public void setData_pwd(String data_pwd) { this.data_pwd = data_pwd; } public String getConfig_url() { return config_url; } public void setConfig_url(String config_url) { this.config_url = config_url; } public String getConfig_usr() { return config_usr; } public void setConfig_usr(String config_usr) { this.config_usr = config_usr; } public String getConfig_pwd() { return config_pwd; } public void setConfig_pwd(String config_pwd) { this.config_pwd = config_pwd; } public static void setInstance(Config instance) { Config.instance = instance; } }
[ "boyshell@qq.com" ]
boyshell@qq.com
1997290237fdadb375883b0add131219b40ddd12
ab07b280b3732bd36f60c0c2dec79964443cfb04
/src/com/smona/app/propertypayment/property/bean/PaymentPropertyPlanRequestInfo.java
417500f13b930ae1eae58afc129739298fa2c1a5
[]
no_license
motianhu/PropertyPayment
bd6820b8135f98fbfa022f793ad799bc59309f86
7b50a1f0ea8213a8f3cc324e4198c0ae4b520c54
refs/heads/master
2021-01-17T08:54:08.145048
2016-04-04T09:28:01
2016-04-04T09:28:01
40,538,441
0
0
null
null
null
null
UTF-8
Java
false
false
267
java
package com.smona.app.propertypayment.property.bean; import com.smona.app.propertypayment.process.PaymentRequestInfo; public class PaymentPropertyPlanRequestInfo extends PaymentRequestInfo { public String communitycode; public String housingbantranscode; }
[ "motianhu@qq.com" ]
motianhu@qq.com
92e2de0792ba7584ebe0627e11f2e71659fcd1b0
84819716e37f072d853a1cbf8a43d6f49071b777
/Selenium/src/day4/ScreenShotEg.java
bf607162220fe0568afba031c5203b720b9290d2
[]
no_license
shaath/Sai_Kumar
cd3706d8513d224c59a6b46e5eb39423768409fe
900dfa585097a8d0fd911a5ea03d48cd5b4a20bc
refs/heads/master
2020-06-13T12:14:30.695900
2016-12-02T10:26:24
2016-12-02T10:26:24
75,382,382
0
0
null
null
null
null
UTF-8
Java
false
false
632
java
package day4; import java.io.File; import java.io.IOException; import org.apache.commons.io.FileUtils; import org.openqa.selenium.OutputType; import org.openqa.selenium.TakesScreenshot; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; public class ScreenShotEg { public static void main(String[] args) throws IOException { WebDriver driver=new FirefoxDriver(); driver.get("http://seleniumhq.org"); File source=((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE); FileUtils.copyFile(source, new File("F:\\Anu_Sara\\Selenium\\src\\Screenshots\\seleniumhq.png")); } }
[ "sharath chandra" ]
sharath chandra
3e166d09fa07d09276640413b0de3c079f0a4231
66f20078c2b5a2876c5eb40a5f389d244735c776
/src/main/java/com/casic/icms/monitor/entity/ActiveUser.java
3bc2d42de98092fed5a3ef1b2e6704eea78fa5db
[ "Apache-2.0" ]
permissive
iyish/ICMS-APP
52a160a1a7d9050c6dd4f5d4279a390466716f59
55875e382e27f2f73effc24e58fd25f6db6d4ec0
refs/heads/master
2022-09-30T22:29:01.202253
2019-09-02T06:22:59
2019-09-02T06:22:59
205,963,028
0
0
Apache-2.0
2022-09-01T23:12:16
2019-09-03T01:19:23
HTML
UTF-8
Java
false
false
1,020
java
package com.casic.icms.monitor.entity; import lombok.Data; import java.io.Serializable; /** * 在线用户 * * @author MrBird */ @Data public class ActiveUser implements Serializable { private static final long serialVersionUID = -1277171780468841527L; /** * session id */ private String id; /** * 用户 id */ private String userId; /** * 用户名称 */ private String username; /** * 用户主机地址 */ private String host; /** * 用户登录时系统 IP */ private String systemHost; /** * 状态 */ private String status; /** * session 创建时间 */ private String startTimestamp; /** * session 最后访问时间 */ private String lastAccessTime; /** * 超时时间 */ private Long timeout; /** * 所在地 */ private String location; /** * 是否为当前登录用户 */ private boolean current; }
[ "568423033@qq.com" ]
568423033@qq.com
bf5f2b600ca4ded85da2056630eca5ceb48e56d6
7f6292a3473aa72d4e46cdd0a19fbe8833a7194f
/ejbs/digitalarchive/src/main/java/org/sola/services/digitalarchive/repository/entities/FileInfo.java
20b3c63bd08cb8b6c4ce8c52221e5943e98e2a14
[]
no_license
SOLA-NIGERIA/services
375f08e8db0c650fc62ab592a534837e5d1fa341
7fc7aae549caed17edcce4da80e3d4ed8953f3f8
refs/heads/master
2020-05-31T01:03:38.225836
2016-12-06T21:20:18
2016-12-06T21:20:18
20,647,290
0
2
null
2015-05-31T21:13:29
2014-06-09T13:24:26
Java
UTF-8
Java
false
false
2,747
java
/** * ****************************************************************************************** * Copyright (C) 2012 - Food and Agriculture Organization of the United Nations (FAO). * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice,this list * of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice,this list * of conditions and the following disclaimer in the documentation and/or other * materials provided with the distribution. * 3. Neither the name of FAO nor the names of its contributors may be used to endorse or * promote products derived from this software without specific prior written permission. * * 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 HOLDER 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.sola.services.digitalarchive.repository.entities; import java.util.Date; import javax.persistence.Id; import org.sola.services.common.repository.entities.AbstractReadOnlyEntity; /** * * Represents meta data of the file, stored in the shared folder */ public class FileInfo extends AbstractReadOnlyEntity { @Id private String name; private Date modificationDate; private long fileSize; public FileInfo() { super(); } public Date getModificationDate() { return modificationDate; } public void setModificationDate(Date creationDate) { this.modificationDate = creationDate; } public long getFileSize() { return fileSize; } public void setFileSize(long fileSize) { this.fileSize = fileSize; } public String getName() { return name; } public void setName(String Name) { this.name = Name; } }
[ "armcdowell@hotmail.com" ]
armcdowell@hotmail.com
95c9495cd405de8da90e1d381a240aa50df5853d
ca030864a3a1c24be6b9d1802c2353da4ca0d441
/classes7.dex_source_from_JADX/com/facebook/feed/inlinecomposer/multirow/common/BaseV3PromptPartDefinition.java
3cbfb6ab726a6cc63d3895754b927f7bc3a01411
[]
no_license
pxson001/facebook-app
87aa51e29195eeaae69adeb30219547f83a5b7b1
640630f078980f9818049625ebc42569c67c69f7
refs/heads/master
2020-04-07T20:36:45.758523
2018-03-07T09:04:57
2018-03-07T09:04:57
124,208,458
4
0
null
null
null
null
UTF-8
Java
false
false
8,036
java
package com.facebook.feed.inlinecomposer.multirow.common; import android.content.Context; import android.view.View; import com.facebook.common.propertybag.PropertyBag; import com.facebook.feed.environment.HasPersistentState; import com.facebook.feed.environment.HasPositionInformation; import com.facebook.feed.inlinecomposer.multirow.common.views.HasPromptFlyout; import com.facebook.feed.rows.styling.BackgroundPartDefinition; import com.facebook.feed.rows.styling.BackgroundPartDefinition.StylingData; import com.facebook.feed.rows.styling.PaddingStyle; import com.facebook.inject.ContextScope; import com.facebook.inject.ContextScoped; import com.facebook.inject.InjectorLike; import com.facebook.inject.InjectorThreadStack; import com.facebook.inject.ProvisioningException; import com.facebook.inject.ScopeSet; import com.facebook.ipc.productionprompts.manager.PromptViewStateUpdater; import com.facebook.ipc.productionprompts.ui.v2.PromptPartDefinitionProps; import com.facebook.multirow.api.AnyEnvironment; import com.facebook.multirow.api.BaseSinglePartDefinition; import com.facebook.multirow.api.SubParts; import com.facebook.multirow.parts.ClickListenerPartDefinition; import javax.inject.Inject; @ContextScoped /* compiled from: android.settings. */ public class BaseV3PromptPartDefinition<V extends View & HasPromptFlyout, E extends HasPersistentState & PromptViewStateUpdater & HasPositionInformation> extends BaseSinglePartDefinition<Props, Void, E, V> { private static BaseV3PromptPartDefinition f19262h; private static final Object f19263i = new Object(); @Inject public InlineComposerPromptFlyoutTitleBarPartDefinition f19264a; @Inject public PromptChevronMenuHelper f19265b; @Inject public BackgroundPartDefinition f19266c; @Inject public ClickListenerPartDefinition f19267d; @Inject public DefaultPromptActionHandlePartDefinition f19268e; @Inject public PromptImpressionLoggerPartDefinition f19269f; @Inject public InlineComposerPersistentStateHelper f19270g; /* compiled from: android.settings. */ public class Props { PromptPartDefinitionProps f19260a; boolean f19261b; public Props(PromptPartDefinitionProps promptPartDefinitionProps, boolean z) { this.f19260a = promptPartDefinitionProps; this.f19261b = z; } public static Props m22759a(PromptPartDefinitionProps promptPartDefinitionProps) { return new Props(promptPartDefinitionProps, true); } } private static BaseV3PromptPartDefinition m22762b(InjectorLike injectorLike) { BaseV3PromptPartDefinition baseV3PromptPartDefinition = new BaseV3PromptPartDefinition(InlineComposerPromptFlyoutTitleBarPartDefinition.a(injectorLike), PromptChevronMenuHelper.m22773a(injectorLike), BackgroundPartDefinition.a(injectorLike), ClickListenerPartDefinition.a(injectorLike), DefaultPromptActionHandlePartDefinition.m22764a(injectorLike), PromptImpressionLoggerPartDefinition.a(injectorLike), InlineComposerPersistentStateHelper.b(injectorLike)); baseV3PromptPartDefinition.m22761a(InlineComposerPromptFlyoutTitleBarPartDefinition.a(injectorLike), PromptChevronMenuHelper.m22773a(injectorLike), BackgroundPartDefinition.a(injectorLike), ClickListenerPartDefinition.a(injectorLike), DefaultPromptActionHandlePartDefinition.m22764a(injectorLike), PromptImpressionLoggerPartDefinition.a(injectorLike), InlineComposerPersistentStateHelper.b(injectorLike)); return baseV3PromptPartDefinition; } public final Object m22763a(SubParts subParts, Object obj, AnyEnvironment anyEnvironment) { Props props = (Props) obj; HasPersistentState hasPersistentState = (HasPersistentState) anyEnvironment; subParts.a(this.f19266c, new StylingData(PaddingStyle.i)); this.f19265b.m22775a(props.f19260a); subParts.a(2131560877, this.f19267d, this.f19265b.m22775a(props.f19260a)); if (props.f19261b) { subParts.a(this.f19268e, props.f19260a); } subParts.a(this.f19264a, new com.facebook.feed.inlinecomposer.multirow.common.InlineComposerPromptFlyoutTitleBarPartDefinition.Props(props.f19260a.c)); subParts.a(this.f19269f, new com.facebook.feed.inlinecomposer.multirow.common.PromptImpressionLoggerPartDefinition.Props(props.f19260a.c, props.f19260a.a, hasPersistentState, props.f19260a.b)); return null; } private void m22761a(InlineComposerPromptFlyoutTitleBarPartDefinition inlineComposerPromptFlyoutTitleBarPartDefinition, PromptChevronMenuHelper promptChevronMenuHelper, BackgroundPartDefinition backgroundPartDefinition, ClickListenerPartDefinition clickListenerPartDefinition, DefaultPromptActionHandlePartDefinition defaultPromptActionHandlePartDefinition, PromptImpressionLoggerPartDefinition promptImpressionLoggerPartDefinition, InlineComposerPersistentStateHelper inlineComposerPersistentStateHelper) { this.f19264a = inlineComposerPromptFlyoutTitleBarPartDefinition; this.f19265b = promptChevronMenuHelper; this.f19266c = backgroundPartDefinition; this.f19267d = clickListenerPartDefinition; this.f19268e = defaultPromptActionHandlePartDefinition; this.f19269f = promptImpressionLoggerPartDefinition; this.f19270g = inlineComposerPersistentStateHelper; } public static BaseV3PromptPartDefinition m22760a(InjectorLike injectorLike) { ScopeSet a = ScopeSet.a(); byte b = a.b((byte) 8); try { Context b2 = injectorLike.getScopeAwareInjector().b(); if (b2 == null) { throw new ProvisioningException("Called context scoped provider outside of context scope"); } BaseV3PromptPartDefinition b3; ContextScope contextScope = (ContextScope) injectorLike.getInstance(ContextScope.class); PropertyBag a2 = ContextScope.a(b2); synchronized (f19263i) { BaseV3PromptPartDefinition baseV3PromptPartDefinition; if (a2 != null) { baseV3PromptPartDefinition = (BaseV3PromptPartDefinition) a2.a(f19263i); } else { baseV3PromptPartDefinition = f19262h; } if (baseV3PromptPartDefinition == null) { InjectorThreadStack injectorThreadStack = injectorLike.getInjectorThreadStack(); contextScope.a(b2, injectorThreadStack); try { b3 = m22762b(injectorThreadStack.e()); if (a2 != null) { a2.a(f19263i, b3); } else { f19262h = b3; } } finally { ContextScope.a(injectorThreadStack); } } else { b3 = baseV3PromptPartDefinition; } } return b3; } finally { a.c(b); } } @Inject public BaseV3PromptPartDefinition(InlineComposerPromptFlyoutTitleBarPartDefinition inlineComposerPromptFlyoutTitleBarPartDefinition, PromptChevronMenuHelper promptChevronMenuHelper, BackgroundPartDefinition backgroundPartDefinition, ClickListenerPartDefinition clickListenerPartDefinition, DefaultPromptActionHandlePartDefinition defaultPromptActionHandlePartDefinition, PromptImpressionLoggerPartDefinition promptImpressionLoggerPartDefinition, InlineComposerPersistentStateHelper inlineComposerPersistentStateHelper) { this.f19264a = inlineComposerPromptFlyoutTitleBarPartDefinition; this.f19265b = promptChevronMenuHelper; this.f19266c = backgroundPartDefinition; this.f19267d = clickListenerPartDefinition; this.f19268e = defaultPromptActionHandlePartDefinition; this.f19269f = promptImpressionLoggerPartDefinition; this.f19270g = inlineComposerPersistentStateHelper; } }
[ "son.pham@jmango360.com" ]
son.pham@jmango360.com
184b0905276384ff596272fef59e5bbe1cc7e818
6264f94a1cc72ab5d0f31cdfc0d1d70c2e04f63a
/service/src/main/java/ru/kislyakova/anastasia/emailservice/service/impl/EmailServiceImpl.java
16496efba1ee1cd042663a98a69254067a1d1153
[]
no_license
AnastasiaKislyakova/email-service
7a887d93b6f5a64e85b1a735f3cab4d44fb87805
1827c3d975fad0fb25949149b6a0c3e75dafbceb
refs/heads/master
2023-02-19T01:02:31.257429
2021-01-14T09:20:47
2021-01-14T09:20:47
329,563,791
0
0
null
null
null
null
UTF-8
Java
false
false
4,098
java
package ru.kislyakova.anastasia.emailservice.service.impl; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.DataIntegrityViolationException; import org.springframework.mail.SimpleMailMessage; import org.springframework.mail.javamail.JavaMailSender; import org.springframework.stereotype.Service; import ru.kislyakova.anastasia.emailservice.config.EmailCfg; import ru.kislyakova.anastasia.emailmodel.dto.EmailCreationDto; import ru.kislyakova.anastasia.emailmodel.entity.Email; import ru.kislyakova.anastasia.emailmodel.entity.EmailStatus; import ru.kislyakova.anastasia.emailservice.repository.EmailRepository; import ru.kislyakova.anastasia.emailservice.service.EmailService; import java.util.ArrayList; import java.util.List; @Service public class EmailServiceImpl implements EmailService { private static final Logger logger = LoggerFactory.getLogger(EmailServiceImpl.class); private EmailRepository emailRepository; private EmailCfg emailCfg; private JavaMailSender mailSender; @Autowired public EmailServiceImpl(EmailRepository emailRepository, EmailCfg emailCfg, JavaMailSender mailSender) { this.emailRepository = emailRepository; this.emailCfg = emailCfg; this.mailSender = mailSender; } @Override public Email sendEmail(EmailCreationDto emailDto) { Email email = new Email(emailDto); try { email = emailRepository.save(email); } catch (DataIntegrityViolationException ex) { email = emailRepository.findByMailingIdAttemptAndRecipient(emailDto.getMailingId(), emailDto.getMailingAttempt(), emailDto.getRecipient()); if (email.getStatus() == EmailStatus.SENT) return email; } SimpleMailMessage mailMessage = new SimpleMailMessage(); mailMessage.setFrom(this.emailCfg.getUsername()); mailMessage.setTo(email.getRecipient()); mailMessage.setSubject(email.getSubject()); mailMessage.setText(email.getText()); //try { mailSender.send(mailMessage); email.setStatus(EmailStatus.SENT); email = emailRepository.save(email); // } // catch(MailException ex) { // logger.error("Couldn't send email, caused by MailException : {}", ex.getMessage()); // } return email; } //TODO should add sendEmails ? public List<Email> sendEmails(List<EmailCreationDto> emailDtos) { List<SimpleMailMessage> messages = new ArrayList<>(); List<Email> emails = new ArrayList<>(); for (EmailCreationDto emailDto : emailDtos){ Email email = new Email(emailDto); try { email = emailRepository.save(email); } catch (DataIntegrityViolationException ex) { email = emailRepository.findByMailingIdAttemptAndRecipient(emailDto.getMailingId(), emailDto.getMailingAttempt(), emailDto.getRecipient()); if (email.getStatus() == EmailStatus.SENT) continue; } SimpleMailMessage mailMessage = new SimpleMailMessage(); mailMessage.setFrom(this.emailCfg.getUsername()); mailMessage.setTo(email.getRecipient()); mailMessage.setSubject(email.getSubject()); mailMessage.setText(email.getText()); messages.add(mailMessage); emails.add(email); } SimpleMailMessage[] simpleMailMessages = new SimpleMailMessage[messages.size()]; messages.toArray(simpleMailMessages); mailSender.send(simpleMailMessages); for (Email email : emails) { email.setStatus(EmailStatus.SENT); emailRepository.save(email); } return emails; } @Override public List<Email> getEmails() { return emailRepository.findAll(); } @Override public Email getEmailById(int emailId) { return emailRepository.findById(emailId).orElse(null); } }
[ "anastasia.kislyakova@gmail.com" ]
anastasia.kislyakova@gmail.com
f21ca6017600ccff122747f1d68f688f653ffe95
2840a11414e5e36d8cb356e9274a51232fc5e6e7
/app/src/main/java/com/muye/rocket/mvp/account/presenter/CountDownTimePresenter.java
aff31985301db2a9277f4b329930dd8ff72b83c4
[]
no_license
MerkleTreesTec123/rocket_android
a4c5b7cb3f23ddf3c539fe32fbb79a7633618e53
8d0a0ff338e414e515c4495d79443635e4e6342d
refs/heads/master
2022-04-24T10:11:18.223147
2020-04-25T03:50:23
2020-04-25T03:50:23
258,680,671
6
0
null
null
null
null
UTF-8
Java
false
false
1,363
java
package com.muye.rocket.mvp.account.presenter; import com.muye.rocket.base.BasePresenter; import com.muye.rocket.mvp.account.contract.CountDownTimeContract; import java.util.concurrent.TimeUnit; import io.reactivex.Observable; import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.functions.Action; import io.reactivex.functions.Consumer; public class CountDownTimePresenter extends BasePresenter<CountDownTimeContract.View> implements CountDownTimeContract.Presenter { public CountDownTimePresenter(CountDownTimeContract.View view) { super(view); } @Override public void startCountDownTime(int totalSeconds) { mView.onCountDownTimeStart(); mCompositeDisposable.add(Observable.intervalRange(0, totalSeconds, 0, 1, TimeUnit.SECONDS) .observeOn(AndroidSchedulers.mainThread()) .doOnNext(new Consumer<Long>() { @Override public void accept(Long aLong) throws Exception { mView.showCountDownTime(totalSeconds - aLong.intValue()); } }).doOnComplete(new Action() { @Override public void run() throws Exception { mView.onCountDownTimeEnd(); } }).subscribe()); } }
[ "15385152450@163.com" ]
15385152450@163.com
22908aaaf0e2c75e1644ef1536ac4f562ff8005b
235063d0a0a846dba295761f4ae2003eeee27a90
/manashiki-uchilearte-negocio/src/main/java/com/manashiki/uchilearte/negocio/mapper/RegionModelMapper.java
6fcc8171aeb080b5d86c02d9d049b6edec052831
[]
no_license
juliocornejo/manashiki-uchilearte
c80256a375f99170daf94099a2fcb8e5d4bf3d51
8c16fb83deacc2328d19c3c2fc24ac3400cd41f1
refs/heads/master
2020-04-14T14:06:01.757928
2019-04-29T06:49:09
2019-04-29T06:49:09
163,886,950
0
0
null
null
null
null
UTF-8
Java
false
false
2,697
java
package com.manashiki.uchilearte.negocio.mapper; import java.util.ArrayList; import java.util.List; import com.manashiki.uchilearte.logica.entidad.RegionEntity; import com.manashiki.uchilearte.negocio.model.RegionModel; public class RegionModelMapper{ /** * Mapper de las entidades * 1 Model to Entity * 2 list<Model> to List<Entity> * 3 Entity to Model * 4 List<Entity> to List<Model>*/ public static RegionEntity RegionModelToRegionEntity(RegionModel regionModel){ RegionEntity region=new RegionEntity(); if(regionModel==null){ return new RegionEntity(); } else{ region.setIdRegion(regionModel.getIdRegion()); region.setCodigoRegion(regionModel.getCodigoRegion()); region.setNombreRegion(regionModel.getNombreRegion()); region.setNombreRegionLower(regionModel.getNombreRegionLower()); region.setDescripcionRegion(regionModel.getDescripcionRegion()); } return region; } public static List<RegionEntity> ListRegionModelToListRegionEntity(List<RegionModel> listaRegionModel){ List<RegionEntity> listaRegionEntity=new ArrayList<RegionEntity>(); if(listaRegionModel==null || listaRegionModel.size()==0){ return new ArrayList<RegionEntity>(); } else{ listaRegionEntity=new ArrayList<RegionEntity>(); RegionEntity region=new RegionEntity(); for(RegionModel regMod: listaRegionModel){ region=new RegionEntity(); region = RegionModelToRegionEntity(regMod); listaRegionEntity.add(region); } } return listaRegionEntity; } public static RegionModel RegionEntityToRegionModel(RegionEntity regionEntity){ RegionModel regionModel=new RegionModel(); if(regionEntity==null){ return new RegionModel(); } else{ regionModel.setIdRegion(regionEntity.getIdRegion()); regionModel.setCodigoRegion(regionEntity.getCodigoRegion()); regionModel.setNombreRegion(regionEntity.getNombreRegion()); regionModel.setNombreRegionLower(regionEntity.getNombreRegionLower()); regionModel.setDescripcionRegion(regionEntity.getDescripcionRegion()); } return regionModel; } public static List<RegionModel> ListRegionEntityToListRegionModel(List<RegionEntity> listaRegionEntity){ List<RegionModel> listaRegionModel=new ArrayList<RegionModel>(); if(listaRegionEntity==null || listaRegionEntity.size()==0){ return new ArrayList<RegionModel>(); } else{ listaRegionModel=new ArrayList<RegionModel>(); RegionModel regionModel=new RegionModel(); for(RegionEntity regEnt: listaRegionEntity){ regionModel=new RegionModel(); regionModel = RegionEntityToRegionModel(regEnt); listaRegionModel.add(regionModel); } } return listaRegionModel; } }
[ "elimino.gente.por.dinero@gmail.com" ]
elimino.gente.por.dinero@gmail.com
8e9da30307bdcb949c56b911e56fcfafdaa3440e
1f7ba866e091db666bb575bc5979222d999a727c
/src/br/ufjf/dcc171/ExercicioRaio.java
2cd69ce1477a94acc9340057aeb89efedc099f9f
[]
no_license
ufjf-dcc171/ufjf-dcc171-2017-3-exrx1-camposraiza
66a72a62dedbd6f00408f9b9eef3abdda9f130a1
00d2d70c234d1098b8122365620cffca5a7a3dcf
refs/heads/master
2021-07-04T19:35:51.090943
2017-09-22T02:02:23
2017-09-22T02:02:58
104,418,762
0
0
null
null
null
null
UTF-8
Java
false
false
1,020
java
package br.ufjf.dcc171; import java.text.ParseException; import java.util.ArrayList; import java.util.List; import javax.swing.JFrame; public class ExercicioRaio { public static void main(String[] args) throws ParseException { JanelaRaios janela = new JanelaRaios(getSampleData()); janela.setSize(400, 300); janela.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); janela.setLocationRelativeTo(null); janela.setVisible(true); } private static List<TipoRaio> getSampleData() { Raio r1 = new Raio("17", "25", " RAIO NÍVEL HARD"); Raio r2 = new Raio("27", "30", "RAIO NÍVEL LIGTH"); TipoRaio t1 = new TipoRaio("RAIO s2"); TipoRaio t2 = new TipoRaio("RAIO s3"); t1.getRaios().add(r1); t2.getRaios().add(r1); t2.getRaios().add(r2); List<TipoRaio> nome = new ArrayList<>(); nome.add(t1); nome.add(t2); return nome; } }
[ "meiriele_dias@yahoo.com.br" ]
meiriele_dias@yahoo.com.br
d2c8e7ad4f9695238416be3961317e9c11e4a44e
afa4f093919791069964e2edd2e47d2f175fc9e8
/src/com/wellbroad/db/beans/tour/TourListDTO.java
5428dd6a3a047509033c55216e9492642cd51032
[]
no_license
dlwoghks/wellbroad
475108295ab79d24c322948f1ca95905489c254e
36cdf2983ba7ea0e782f46b42d6fd138055322ec
refs/heads/master
2020-03-25T17:30:06.712617
2018-08-08T08:13:10
2018-08-08T08:13:10
143,980,635
0
0
null
null
null
null
UTF-8
Java
false
false
1,071
java
package com.wellbroad.db.beans.tour; public class TourListDTO { private String name; private String code; private String description; private String icon; public String getIcon() { return icon; } public void setIcon(String icon) { this.icon = icon; } public TourListDTO() { } public TourListDTO(String icon,String code, String name, String description) { this.icon = icon; this.code = code; this.name = name; this.description = description; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getDiscription() { return description; } public void setDiscription(String description) { this.description = description; } @Override public String toString() { // description = description.replace("/\n/gi","\\r\\n"); return "{\"icon\":\""+icon+"\",\"code\":\"" + code + "\", \"name\":\"" + name + "\", \"description\":\"" + description + "\"}"; } }
[ "dlwoghks1354@gmail.com" ]
dlwoghks1354@gmail.com
de814f1bfac3ae2f7749ab094fb7d39b66e960a9
229479d5926c93bb8a124947553ff89506c6c731
/project/DemoOTP/app/src/main/java/com/example/demootp/model/ModelClass1.java
1508da5a33bdaaa9f847228542e7d126800309f9
[]
no_license
chuanhoang11/covid-info
294529c789639218e482e38d9ac0d78c88661765
fb5b64bfb32fcd314dd5e6fcd12e6ce3ec8cbd21
refs/heads/main
2023-08-23T22:03:20.540767
2021-10-14T03:22:43
2021-10-14T03:22:43
416,974,485
0
0
null
null
null
null
UTF-8
Java
false
false
1,381
java
package com.example.demootp.model; public class ModelClass1 { private String author,title,description,url,urlToImage,publishedAt; public ModelClass1(String author, String title, String description, String url, String urlToImage, String publishedAt) { this.author = author; this.title = title; this.description = description; this.url = url; this.urlToImage = urlToImage; this.publishedAt = publishedAt; } public String getAuthor() { return author; } public void setAuthor(String author) { this.author = author; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public String getUrl() { return url; } public void setUrl(String url) { this.url = url; } public String getUrlToImage() { return urlToImage; } public void setUrlToImage(String urlToImage) { this.urlToImage = urlToImage; } public String getPublishedAt() { return publishedAt; } public void setPublishedAt(String publishedAt) { this.publishedAt = publishedAt; } }
[ "59105450+chuanhoang11@users.noreply.github.com" ]
59105450+chuanhoang11@users.noreply.github.com
5475ec648ff12941d1a21e1586150a55abc34bad
60ac1a98fd2594b800120fa7492afe0ff4ea9171
/src/main/java/com/kodilla/backend/domain/RankingRecord.java
d3e0cf5be7a15bbd8e44e3fca4f783ac6588cb14
[]
no_license
sitkositkowski/bookmaker-app
de3a511cb044e12c59bd67e8fa6025346d27a85c
2fecf0712973a897c5ba1027a8eefdf417b8bace
refs/heads/main
2023-06-18T02:04:47.221941
2021-06-22T13:28:39
2021-06-22T13:28:39
374,810,843
0
0
null
null
null
null
UTF-8
Java
false
false
445
java
package com.kodilla.backend.domain; import lombok.*; import javax.persistence.*; import java.io.Serializable; @Data @Entity @Table(name = "ranking") @NoArgsConstructor @AllArgsConstructor @Builder public class RankingRecord implements Serializable { //@Id //@GeneratedValue //Long id; @Id String name; @JoinColumn(name = "points") Double points; @JoinColumn(name = "predictions") Integer predictions; }
[ "sitkositkowski@wp.pl" ]
sitkositkowski@wp.pl
daf3e532c0887acca79c75067f2f976488d5a19b
1dced079671699fb3e69a080178fa9a8fc6f2359
/j2se/src/javac1/ir/instr/LogicOp.java
ca1efedcfdae78b317f2a5de6531829a140918ee
[]
no_license
dougxc/SquawkNG
7dc93a7fd2ebafaea4cf021e942f984ab8d494ea
60ebfc59d2a479e671160679a78b1d2ddc30ab65
refs/heads/master
2022-12-22T05:02:18.384927
2020-09-29T09:54:49
2020-09-29T09:54:49
299,572,864
0
0
null
null
null
null
UTF-8
Java
false
false
1,323
java
/* * @(#)LogicOp.java 1.10 02/11/27 * * Copyright 1993-2002 Sun Microsystems, Inc. All rights reserved. * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. */ package javac1.ir.instr; import javac1.ir.InstructionVisitor; import javac1.ir.IRScope; /** * The instruction node for executing a binary bitwise logical operation. * * @author Thomas Kotzmann * @version 1.00 */ public class LogicOp extends Op2 { /** * Constructs a new instruction node for a logical operation. * * @param scope scope containing this instruction * @param op the operation code * @param x the first operand * @param y the second operand */ public LogicOp(IRScope scope, int op, Instruction x, Instruction y) { super(scope, x.getType().meet(y.getType()), op, x, y); } public boolean isCommutative() { return true; } public int hashCode() { return hash(getOp(), getX().getId(), getY().getId()); } public boolean equals(Object obj) { return (obj instanceof Op2) && (((Op2) obj).getOp() == getOp()) && (((Op2) obj).getX() == getX()) && (((Op2) obj).getY() == getY()); } public void visit(InstructionVisitor visitor) { visitor.doLogicOp(this); } }
[ "doug.simon@oracle.com" ]
doug.simon@oracle.com
472cacc24beb77c0aca388cecdce3d917c48128d
02bb295af2aef392dfbc5520c67fd664fafd9880
/weixin6.0/src/main/java/com/xiang/weixin60/imageLoader/FolderBean.java
80e2a973fa36913a6fcf9819059b076782c9a579
[]
no_license
xiang205012/Test
e2a224a0a9e2be070eb92693864a2c55d1aedeef
2756004b81f5668fb92ed9be625e1b9199e92e31
refs/heads/master
2020-07-01T04:54:01.361243
2016-12-07T12:50:16
2016-12-07T12:50:16
74,096,963
0
0
null
null
null
null
UTF-8
Java
false
false
1,183
java
package com.xiang.weixin60.imageLoader; /** * ListView的Item所需的变量 * Created by Administrator on 2016/5/5. */ public class FolderBean { /**当前文件夹的路径*/ private String dir; /**当前文件夹的名称*/ private String name; /**当前文件夹下的第一张图片的路径*/ private String firstImgPath; /**当前文件夹下的文件数量*/ private int count; public String getDir() { return dir; } public void setDir(String dir) { this.dir = dir; // sdcard/images/photo : photo int lastIndexOf = this.dir.lastIndexOf("/"); this.name = this.dir.substring(lastIndexOf); } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getFirstImgPath() { return firstImgPath; } public void setFirstImgPath(String firstImgPath) { this.firstImgPath = firstImgPath; } public int getCount() { return count; } public void setCount(int count) { this.count = count; } }
[ "xiang205012@gmail.com" ]
xiang205012@gmail.com
1adefea32413878447d20b574506887cec00f70c
07251556dde22700fe4828a7aaf85c27787b2fcf
/src/main/java/com/jm/mvc/vo/order/OrderInfoAndDetailCreateVo.java
10a602ed5325cdb783ff3d9db13c683cc67cb037
[]
no_license
wanghonghong/mygit
0a45dc9e7efa2bcc14b3279c6071dd73fc86da36
d0f0e40e8897f30042a58a42ea772f887ab1551b
refs/heads/master
2020-12-02T23:51:40.346895
2017-07-02T02:11:26
2017-07-02T02:11:26
95,954,161
1
0
null
null
null
null
UTF-8
Java
false
false
515
java
package com.jm.mvc.vo.order; import java.util.List; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * <p>订单及订单详情</p> * * @author hantp * @version latest * @date 2016/5/9 */ @Data @ApiModel(description = "订单") public class OrderInfoAndDetailCreateVo { @ApiModelProperty(value = "订单") OrderInfoCreateVo createvo; @ApiModelProperty(value = "订单详情") List<OrderDetailCreateVo> detailvo; }
[ "445605976@qq.com" ]
445605976@qq.com
7a4a655a337c0f99a185d0f15d0a46bf6fe54635
7742fee89a60c69f77cd14c8cc7c8c67d14ddef1
/sql-processor-hibernate/src/main/java/org/sqlproc/engine/hibernate/type/HibernateType.java
c08212ca9e03dbf9f9cd7d6bb8bc29c34dc0e7e5
[]
no_license
nathieb/sql-processor
87b6b85c2c3197d46b557b4cffe1ec04831f77c7
a13f6cacf8f753d3dc3d15f2b29ca9e436cf0cad
refs/heads/master
2020-12-25T10:38:19.167778
2012-02-29T08:53:21
2012-02-29T08:53:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,918
java
package org.sqlproc.engine.hibernate.type; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.lang.reflect.Modifier; import java.util.Collection; import java.util.HashMap; import java.util.Map; import org.hibernate.Hibernate; import org.hibernate.type.PrimitiveType; import org.hibernate.type.Type; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.sqlproc.engine.SqlQuery; import org.sqlproc.engine.SqlRuntimeException; import org.sqlproc.engine.impl.BeanUtils; import org.sqlproc.engine.type.SqlMetaType; /** * The general Hibernate META type. * * @author <a href="mailto:Vladimir.Hudec@gmail.com">Vladimir Hudec</a> */ public class HibernateType extends SqlMetaType { /** * The internal slf4j logger. */ protected static final Logger logger = LoggerFactory.getLogger(HibernateType.class); /** * The map between the Hibernate types names and the Hibernate types. */ static Map<String, Field> hibernateTypes = new HashMap<String, Field>(); static { Field[] fields = Hibernate.class.getFields(); for (Field f : fields) { if (!Modifier.isStatic(f.getModifiers())) continue; try { if (f.get(null) instanceof Type) hibernateTypes.put(f.getName().toUpperCase(), f); } catch (IllegalArgumentException e) { throw e; } catch (IllegalAccessException e) { throw new RuntimeException(e); } } } /** * The Hibernate type. A standard way to assign the type of a parameter/scalar binding to the Hibernate Query. */ private Type hibernateType; /** * Creates a new instance of general Hibernate type based on the declaration in the META SQL statement. * * @param sMetaType * the name of the Hibernate type, for example INTEGER */ public HibernateType(String sMetaType) { String sHibernateType = sMetaType.toUpperCase(); Field f = hibernateTypes.get(sHibernateType); if (f != null) { try { this.hibernateType = (Type) f.get(null); } catch (IllegalArgumentException e) { throw new RuntimeException(e); } catch (IllegalAccessException e) { throw new RuntimeException(e); } } else { throw new SqlRuntimeException("Unsupported Hibernate Type " + sHibernateType); } } /** * {@inheritDoc} */ public void addScalar(SqlQuery query, String dbName, Class<?> attributeType) { query.addScalar(dbName, hibernateType); } /** * {@inheritDoc} */ @Override public void setResult(Object resultInstance, String attributeName, Object resultValue, boolean ingoreError) throws SqlRuntimeException { if (logger.isTraceEnabled()) { logger.trace(">>> setResult HIBERNATE: resultInstance=" + resultInstance + ", attributeName=" + attributeName + ", resultValue=" + resultValue + ", resultType" + ((resultValue != null) ? resultValue.getClass() : null) + ", hibernateType=" + hibernateType); } Method m = BeanUtils.getSetter(resultInstance, attributeName, hibernateType.getReturnedClass()); if (m == null && hibernateType instanceof PrimitiveType) m = BeanUtils.getSetter(resultInstance, attributeName, ((PrimitiveType) hibernateType).getPrimitiveClass()); if (m == null && hibernateType.getReturnedClass() == java.util.Date.class) m = BeanUtils.getSetter(resultInstance, attributeName, java.sql.Timestamp.class); if (m != null) { BeanUtils.simpleInvokeMethod(m, resultInstance, resultValue); } else if (ingoreError) { logger.error("There's no getter for " + attributeName + " in " + resultInstance + ", META type is HIBERNATE"); } else { throw new SqlRuntimeException("There's no setter for " + attributeName + " in " + resultInstance + ", META type is HIBERNATE"); } } /** * {@inheritDoc} */ @Override public void setParameter(SqlQuery query, String paramName, Object inputValue, Class<?> inputType, boolean ingoreError) throws SqlRuntimeException { if (logger.isTraceEnabled()) { logger.trace(">>> setParameter HIBERNATE: paramName=" + paramName + ", inputValue=" + inputValue + ", inputType=" + inputType + ", hibernateType=" + hibernateType); } if (inputValue instanceof Collection) { query.setParameterList(paramName, ((Collection) inputValue).toArray(), hibernateType); } else { query.setParameter(paramName, inputValue, hibernateType); } } }
[ "Vladimir.Hudec@gmail.com" ]
Vladimir.Hudec@gmail.com
a56dd8dc14713ebd48de2572b7c6888783e4eaa9
430ceff6dad2a24c1cb1595f801a3805cabc8ac9
/Advanced Programming/Laboratory3/TravelMap.java
c6bea4a341fe16ee6c5e7731e74be35f5253e89d
[]
no_license
xTachyon/FII
b258f19aa9e886dfcd62342abd82044d159bdb27
e64438d5f40d5080cde75997269fec399ddb3119
refs/heads/master
2020-04-28T03:36:25.606874
2019-03-11T07:43:58
2019-03-11T07:43:58
174,943,371
0
0
null
2019-03-11T06:59:30
2019-03-11T06:59:30
null
UTF-8
Java
false
false
1,349
java
import java.util.ArrayList; import java.util.List; /** * @author Stoica Ioana-Dana on 07-Mar-19 */ public class TravelMap { private List<Node> list; public TravelMap(List<Node> list) { list = new ArrayList<Node>(); } /** * Adds a new object of type Restaurant to the list of Nodes * @param restaurants the list of restaurants to be added */ public void addNode(Restaurant... restaurants) { for (Node i : restaurants) { list.add(i); } } /** * Adds a new object of type Museum to the list of Nodes * @param museums the list of museums to be added */ public void addNode(Museum... museums) { for (Node i : museums) { list.add(i); } } /** * Adds a new object of type Church to the list of Nodes * @param churches the list of churches to be added */ public void addNode(Church... churches) { for (Node i : churches) { list.add(i); } } /** * Adds a new object of type Hotel to the list of Nodes * @param hotels the list of hotels to be added */ public void addNode(Hotel... hotels) { for (Node i : hotels) { list.add(i); } } public List<Node> getNodes() { return list; } }
[ "ioanadana97@gmail.com" ]
ioanadana97@gmail.com
38d636e3bcf42395895c4ea05b2ba0d132cf3dbb
53f0228657768a269bc3d31f1e9701ef74411737
/src/main/java/Characters/Cleric.java
e3c2017977e87f6c6c00226de887f3a63ed04ffe
[]
no_license
dl184/FantasyLab
9d8098bfe6d6e8f58f034f1aac3b32acb593b0ae
99ed31277e055921e6feb92ab35bb258f9522833
refs/heads/master
2020-03-21T20:21:39.816350
2018-06-29T08:42:29
2018-06-29T08:42:29
139,002,225
0
1
null
null
null
null
UTF-8
Java
false
false
393
java
package Characters; import Interfaces.IDamage; import Interfaces.IDefend; import Interfaces.IHeal; public class Cleric extends Character implements IHeal, IDefend { public Cleric(String name, int damageValue, int healthValue) { super(name, damageValue, healthValue); } public void takeDamage(int attackValue) { } public void attack(IDamage victim) { } }
[ "derekleach84@gmail.com" ]
derekleach84@gmail.com
05be233608c73ca3ec487e65730c0e014df7880f
8aea1e0ddc624ba0ba390f4785930c317bd22d28
/app/src/main/java/com/deproo/android/deproo/activity/BrokerListActivity.java
a09c05e0fa17ece219d09ec8bbf4f8db0d944f1f
[]
no_license
sufiaji/deproo
269cb9ebce2bd49a8d3ad6473500bc43f85cff18
aee08684378c4ba99d4727ad8228089ada0cece3
refs/heads/master
2022-12-15T00:57:37.978199
2020-01-15T09:17:12
2020-01-15T09:17:12
293,791,697
0
0
null
null
null
null
UTF-8
Java
false
false
5,557
java
package com.deproo.android.deproo.activity; import android.content.Context; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.net.Uri; import android.os.AsyncTask; import android.os.Bundle; import android.os.PersistableBundle; import android.view.MenuItem; import android.view.View; import android.widget.LinearLayout; import android.widget.ProgressBar; import androidx.annotation.Nullable; import androidx.appcompat.app.AppCompatActivity; import androidx.recyclerview.widget.DefaultItemAnimator; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.deproo.android.deproo.R; import com.deproo.android.deproo.model.AsyncGetBrokerThumb; import com.deproo.android.deproo.model.Broker; import com.deproo.android.deproo.model.BrokerAdapter; import com.deproo.android.deproo.model.EndlessRecyclerViewScrollListener; import com.deproo.android.deproo.utils.Constants; import com.parse.FindCallback; import com.parse.ParseException; import com.parse.ParseFile; import com.parse.ParseQuery; import java.util.ArrayList; import java.util.List; import es.dmoral.toasty.Toasty; /** * Created by Pradhono Rakhmono Aji on $(DATE) */ public class BrokerListActivity extends AppCompatActivity { private Context mContext; private ProgressBar progressBar; private ArrayList<Broker> mBrokers; private BrokerAdapter mAdapter; private int mSkip = 0; @Override protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); mContext = this; setContentView(R.layout.activity_broker_list); getSupportActionBar().setDisplayHomeAsUpEnabled(true); getSupportActionBar().setTitle("Broker"); progressBar = findViewById(R.id.id_progress_broker_list); mBrokers = new ArrayList<>(); mAdapter = new BrokerAdapter(mContext, mBrokers); LinearLayoutManager linearLayoutManager = new LinearLayoutManager(mContext, RecyclerView.VERTICAL, false); RecyclerView recyclerView = findViewById(R.id.id_recycler_broker); recyclerView.setLayoutManager(linearLayoutManager); recyclerView.setItemAnimator(new DefaultItemAnimator()); recyclerView.setAdapter(mAdapter); EndlessRecyclerViewScrollListener scrollListener = new EndlessRecyclerViewScrollListener(linearLayoutManager) { @Override public void onLoadMore(int page, int totalItemsCount, RecyclerView view) { getBroker(); } }; recyclerView.addOnScrollListener(scrollListener); getBroker(); } private void getBroker() { ParseQuery<Broker> query = ParseQuery.getQuery(Broker.class); query.addDescendingOrder(Constants.ParseTable.TableUser.CREATED_AT); query.setLimit(5); query.setSkip(mSkip); query.findInBackground(new FindCallback<Broker>() { @Override public void done(List<Broker> brokers, ParseException e) { progressBar.setVisibility(View.GONE); if(e==null && brokers.size()>0) { int curSize = mAdapter.getItemCount(); mBrokers.addAll(brokers); mAdapter.notifyItemRangeInserted(curSize, brokers.size()); mSkip = mSkip + 5; for(int i=0;i<brokers.size();i++) { String objectID = brokers.get(i).getObjectId(); AsyncBrokerThumb task = new AsyncBrokerThumb(objectID); task.execute(brokers.get(i)); } } else { Toasty.info(getApplicationContext(),"Broker tidak ditemukan"); } } }); } private class AsyncBrokerThumb extends AsyncTask<Broker, Integer, Bitmap> { private String mObjectId; public AsyncBrokerThumb(String objectId) { mObjectId = objectId; } @Override protected Bitmap doInBackground(Broker... brokers) { Broker broker = brokers[0]; ParseFile parseFile = broker.getParseFile(Constants.ParseTable.TableUser.PROFILE_THUMB); Bitmap bitmap = null; try { byte[] data = parseFile.getData(); bitmap = BitmapFactory.decodeByteArray(data, 0, data.length); } catch (ParseException e) { e.printStackTrace(); } catch (Exception e1) { e1.printStackTrace(); } return bitmap; } @Override protected void onPostExecute(Bitmap bitmap) { if(bitmap!=null) { for(int i=0;i<mAdapter.getItemCount();i++) { if(mBrokers.get(i).getObjectId().equals(mObjectId)) { mBrokers.get(i).setProfilePicThumb(bitmap); mAdapter.notifyItemChanged(i); break; } } } } } @Override public void onBackPressed() { super.onBackPressed(); } @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: { // todo: goto back activity from here onBackPressed(); return true; } default: return super.onOptionsItemSelected(item); } } }
[ "sufi.aji@gmail.com" ]
sufi.aji@gmail.com
7fc3a42f272ae1edb9356e9eb64f3ece4687ba42
901e5142cd83a4c5efebad00c24886ed65aef177
/src/depressionsspillet/worldofzuul/Named.java
7aa780be95d233440855dc4711ca09b05941a307
[]
no_license
Lomztein/Semesterproject01-Gruppe30-2018
d0dd629c02e74019a5b496ad6806a7e1e128ff9b
6bfefc68c0f409a12dfa3b8f1da6ca6c388b7e54
refs/heads/master
2020-03-28T12:20:28.433037
2018-12-14T00:01:57
2018-12-14T00:01:57
148,288,905
0
0
null
null
null
null
UTF-8
Java
false
false
153
java
package depressionsspillet.worldofzuul; public interface Named { public String getName (); public String getDescription (); }
[ "lomztein2@gmail.com" ]
lomztein2@gmail.com
d6af885a19b32ae64f877e5249c1726a681f2ad1
0f06bdd0be58267d3555abea4475f58525014e24
/trackzilla-web-app/src/main/java/com/pluralsight/fundamentals/services/ReleaseServiceImpl.java
ad1d0b0b04cbf93f47565b0950365afe06276a4f
[]
no_license
dsbackup/spring-boot-trackzilla
532e641967d9e7c8cadee4806da70a430d8d893a
ca675866347bd9dfb2d298083fe034694aca2463
refs/heads/master
2023-01-12T17:25:43.241995
2020-11-26T07:15:54
2020-11-26T07:15:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
525
java
package com.pluralsight.fundamentals.services; import com.pluralsight.fundamentals.entity.Release; import com.pluralsight.fundamentals.repository.ReleaseRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service public class ReleaseServiceImpl implements ReleaseService { @Autowired private ReleaseRepository releaseRepository; @Override public Iterable<Release> listReleases() { return releaseRepository.findAll(); } }
[ "techkingcontact@gmail.com" ]
techkingcontact@gmail.com
3c403e71b263d2b32daad845d4236cd702d9531a
fd6e2f226f618d04b94d20c7b63c0fd03818ab5c
/src/main/java/edu/umass/ciir/DoubleRecordReader.java
758e6ecaef161d00bfdc7375a67de21f5f3d580f
[ "Apache-2.0" ]
permissive
daltonj/CIIRShared
ded6906176af7c80aeace8121795b3e4a78d3f7d
f0e00e45b7c9cd5cffdd8f466ec7f2ea02ab71c8
refs/heads/master
2023-06-23T21:58:42.625456
2022-08-18T14:59:49
2022-08-18T14:59:49
268,137
0
3
NOASSERTION
2023-06-14T22:46:16
2009-08-03T21:13:00
Java
UTF-8
Java
false
false
723
java
package edu.umass.ciir; import java.io.File; import java.io.FileReader; public class DoubleRecordReader extends FileRecordReader<Double> { public DoubleRecordReader(File fileToRead, boolean catchParseExceptions, PrefixFilter prefixFilter) throws Exception { super(new FileReader(fileToRead), catchParseExceptions, prefixFilter); } @Override protected Double parseLine(String input) throws Exception { if (input == null) { throw new IllegalArgumentException("Cannot parse null input"); } try { return Double.parseDouble(input); } catch (Exception e) { if (!m_catchParseExceptions) { throw e; } else { // seems odd to return null on a parse error. return null; } } } }
[ "jeffdalton104@hotmail.com" ]
jeffdalton104@hotmail.com
73e4cf65d8853dc8a1abe32d20059c488146c381
ca638c1f5fafa0294e958f07b698cfea93722a63
/src/ru/demi/patterns/base/behavioral/mediator/Shop.java
3b994d1a1dc36e2604266615aa7adaec529d94e2
[]
no_license
dmitry-izmerov/design-patterns
fc59919ac0857c5cb10f90ed9d3db61683b278b3
e2e09ef4bb0f95647ba22d4be36927f32b999d36
refs/heads/master
2021-01-25T04:34:37.641195
2017-06-30T19:38:09
2017-06-30T19:38:09
93,445,535
1
0
null
null
null
null
UTF-8
Java
false
false
117
java
package ru.demi.patterns.base.behavioral.mediator; public interface Shop { void processMessage(Message message); }
[ "idd90i@gmail.com" ]
idd90i@gmail.com
56929050432f2fba37074fd4ace21be82d690871
5d7e2cf852d01de2bed0484d81b60d8aca223825
/src/test/java/com/mycompany/aero_hack/config/WebConfigurerTestController.java
4c424eb255ed0bfd7828847ae71bae3240283c87
[]
no_license
conroydamien/aero_hack
a6215200ff33f52a4c09e87d03272c1fd6a75ced
c93b397e5d3c6f35a4aeb2ae1d11bb55de83dfc6
refs/heads/master
2023-06-26T14:17:34.342096
2023-06-15T00:35:46
2023-06-15T00:35:46
118,219,510
0
0
null
2022-12-03T13:20:16
2018-01-20T07:22:46
Java
UTF-8
Java
false
false
386
java
package com.mycompany.aero_hack.config; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; @RestController public class WebConfigurerTestController { @GetMapping("/api/test-cors") public void testCorsOnApiPath() { } @GetMapping("/test/test-cors") public void testCorsOnOtherPath() { } }
[ "damien.conroy@gmail.com" ]
damien.conroy@gmail.com