blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
4
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
689M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
131 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
32 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
313
d9efef5e49cd208cec651ea10a012120398ffd93
69d4f93a7fb857278407c51f9bec54c7049889d4
/05_galaz_steinera/EdgeManager.java
e691069e07f47a25471f6e066347355a9d6877a6
[]
no_license
mmazepa/GGA
e22f43af1cfa54074274a7bc35afc7bc1a82e4e0
6e794ad0563549258643bd9dde302841c7a56304
refs/heads/master
2020-04-25T10:12:32.225584
2019-06-04T23:18:27
2019-06-04T23:18:27
172,701,063
0
0
null
null
null
null
UTF-8
Java
false
false
133
java
public class EdgeManager { public static Edge prepareEdge(Point point1, Point point2) { return new Edge(point1, point2); } }
[ "maksymilianmariusz@gmail.com" ]
maksymilianmariusz@gmail.com
f6439eb8c37eb7bafb0c7406a05aae26e9bb5176
73c60295060c919b3799c03aa84c8218b558328f
/src/main/java/com/app/moneybudgetapppro/jwt/JwtUserDetails.java
4d5281fba3ab584989b5c979cf7d26a57e958444
[]
no_license
SirKSteen/money-budget-app-pro-spring-boot
7ecf9daad1dcb953b992eb4d9682b81764f34ed0
6ce76d4f374eacbd033b81123e74fb46650861b2
refs/heads/main
2023-06-25T15:09:33.300266
2021-07-29T02:13:59
2021-07-29T02:13:59
390,570,802
0
0
null
null
null
null
UTF-8
Java
false
false
1,665
java
package com.app.moneybudgetapppro.jwt; import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.userdetails.UserDetails; import com.fasterxml.jackson.annotation.JsonIgnore; public class JwtUserDetails implements UserDetails { private static final long serialVersionUID = 5155720064139820502L; private final Long id; private final String username; private final String password; private final Collection<? extends GrantedAuthority> authorities; public JwtUserDetails(Long id, String username, String password, String role) { this.id = id; this.username = username; this.password = password; List<SimpleGrantedAuthority> authorities = new ArrayList<SimpleGrantedAuthority>(); authorities.add(new SimpleGrantedAuthority(role)); this.authorities = authorities; } @JsonIgnore public Long getId() { return id; } @Override public String getUsername() { return username; } @JsonIgnore @Override public boolean isAccountNonExpired() { return true; } @JsonIgnore @Override public boolean isAccountNonLocked() { return true; } @JsonIgnore @Override public boolean isCredentialsNonExpired() { return true; } @JsonIgnore @Override public String getPassword() { return password; } @Override public Collection<? extends GrantedAuthority> getAuthorities() { return authorities; } @Override public boolean isEnabled() { return true; } }
[ "steen.kareem@gmail.com" ]
steen.kareem@gmail.com
46319510a52ee513da45b1425db46a5e4138564b
6ba78113eefd6d2c3ac9b85cee21de7e36ffc71f
/src/main/java/com/zacikp/example/paymenttrackerspring/PaymentRouter.java
6f79a7c9bb8c89785b6541aa753f1535d0057891
[]
no_license
zacikpetr/payment-tracker-spring
829f85ce064a31cece0227a0c85c7654dbd90769
84cc6dda12874064de62b0fc3f9d9113218b2923
refs/heads/master
2020-03-24T07:19:24.219202
2018-07-27T07:46:21
2018-07-27T08:46:19
142,560,810
0
0
null
null
null
null
UTF-8
Java
false
false
763
java
package com.zacikp.example.paymenttrackerspring; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.web.reactive.function.server.RouterFunction; import static org.springframework.web.reactive.function.server.RequestPredicates.GET; import static org.springframework.web.reactive.function.server.RequestPredicates.POST; import static org.springframework.web.reactive.function.server.RouterFunctions.route; @Configuration public class PaymentRouter { @Bean RouterFunction<?> routes(PaymentHandler paymentHandler) { return route(GET("/payment/stream"), paymentHandler::jsonStream) .andRoute(POST("/payment"), paymentHandler::create); } }
[ "zacik.petr@gmail.com" ]
zacik.petr@gmail.com
99092beab14f556c5f54506ef966d5d63c7f4b45
ebe37ebe51995d626a5228983a7347f7396d50e0
/Java Web Development Basics/Exam Preparation/Judge/src/main/java/service/ProblemServiceImpl.java
233961b91d0c3c56ae9c5c1bc7e352668e9580a3
[]
no_license
hristopanev/java-EE
542b7ee02c512cc97dcd0e4fb9cb6741d210b932
4feb8bb516ff5747e4d798bdadb5e142bacfabc5
refs/heads/master
2023-08-10T03:53:53.633323
2020-06-09T10:11:52
2020-06-09T10:11:52
206,050,870
1
0
null
2023-07-22T15:12:24
2019-09-03T10:25:38
HTML
UTF-8
Java
false
false
1,386
java
package service; import domain.entites.Problem; import domain.models.service.ProblemServiceModel; import org.modelmapper.ModelMapper; import repository.ProblemRepository; import javax.inject.Inject; import java.util.List; import java.util.stream.Collectors; public class ProblemServiceImpl implements ProblemService { private final ProblemRepository problemRepository; private final ModelMapper modelMapper; @Inject public ProblemServiceImpl(ProblemRepository problemRepository, ModelMapper modelMapper) { this.problemRepository = problemRepository; this.modelMapper = modelMapper; } @Override public ProblemServiceModel createProblem(ProblemServiceModel problemServiceModel) { return this.modelMapper .map(this.problemRepository .save(this.modelMapper.map(problemServiceModel, Problem.class)), ProblemServiceModel.class); } @Override public ProblemServiceModel getProblemById(String id) { return this.modelMapper.map(this.problemRepository.findById(id), ProblemServiceModel.class); } @Override public List<ProblemServiceModel> getAllProblems() { return this.problemRepository.findAll() .stream() .map(p -> this.modelMapper.map(p, ProblemServiceModel.class)) .collect(Collectors.toList()); } }
[ "hristopanef@gmail.com" ]
hristopanef@gmail.com
7823c93e8aaeea9e203a262d346644bfb553767a
64eaf5bd1069f0bdffb4422d2b6285f41d5a2721
/desktop-admin/src/main/java/com/adstream/automate/babylon/swing/tree/UserEntry.java
dcbc4655b56cca27050fc2b49aa8d7aed2dc7727
[]
no_license
DevikaS/gdam
892f731c69ded3ee48474f3326f8d06d8f77e3f0
7ebd8f5059d88e8f7e34b463e3111fe2e090da21
refs/heads/master
2021-10-28T10:29:01.637709
2019-04-23T13:31:11
2019-04-23T13:31:11
183,001,214
0
0
null
null
null
null
UTF-8
Java
false
false
505
java
package com.adstream.automate.babylon.swing.tree; import com.adstream.automate.babylon.JsonObjects.User; /** * User: ruslan.semerenko * Date: 25.11.12 13:19 */ public class UserEntry { private User user; public UserEntry(User user) { this.user = user; } public User getUser() { return user; } public void setUser(User user) { this.user = user; } public String toString() { return user.getEmail(); } }
[ "Devika.Subramanian@adstream.com" ]
Devika.Subramanian@adstream.com
73f352f52a61ec8811a9fd9739902903fdb52236
5b884ba435cbeea340df145032a84936876b95cb
/src/KATA2/Example.java
f3d516b8dc798c3622924df3401678c473b4b6c0
[]
no_license
AlvaroDD/KATA-2
74f53778eec410ba2653b15e3d4f587974534068
6b82cd23794363c2702d495a101ed244ac61042f
refs/heads/master
2021-01-13T14:36:44.994663
2016-01-10T13:13:29
2016-01-10T13:13:29
49,367,026
0
0
null
null
null
null
UTF-8
Java
false
false
575
java
package kata2; public class Example { public static void main(String[] args) { Integer[] array = {1,4,9,10,3,2,2,1,8,1,3}; String[] array2 = {"Alexis","Alvaro","Ana","Roberto","Juan","Jose","Jose","Juan","Daniel","Ana","Ana"}; Histogram<Integer> histogram = HistagramBuilder.computeHistogram(array); System.out.println(histogram.toString()); System.out.println(""); Histogram<String> histogram2 = HistagramBuilder.computeHistogram(array2); System.out.println(histogram2.toString()); } }
[ "-Alvaro-@Alvaro" ]
-Alvaro-@Alvaro
d3c351ff85a7652a192d0733e8db486d5c9b5f3a
38c4451ab626dcdc101a11b18e248d33fd8a52e0
/identifiers/batik-1.7/sources/org/apache/batik/css/engine/value/InheritValue.java
82cb3b3ed7bc9902b4b6663c4b00e95cb0f3acbb
[]
no_license
habeascorpus/habeascorpus-data
47da7c08d0f357938c502bae030d5fb8f44f5e01
536d55729f3110aee058ad009bcba3e063b39450
refs/heads/master
2020-06-04T10:17:20.102451
2013-02-19T15:19:21
2013-02-19T15:19:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
809
java
org PACKAGE_IDENTIFIER false apache PACKAGE_IDENTIFIER false batik PACKAGE_IDENTIFIER false css PACKAGE_IDENTIFIER false engine PACKAGE_IDENTIFIER false value PACKAGE_IDENTIFIER false org PACKAGE_IDENTIFIER false w3c PACKAGE_IDENTIFIER false dom PACKAGE_IDENTIFIER false css PACKAGE_IDENTIFIER false CSSValue TYPE_IDENTIFIER false InheritValue TYPE_IDENTIFIER true AbstractValue TYPE_IDENTIFIER false InheritValue TYPE_IDENTIFIER false INSTANCE VARIABLE_IDENTIFIER true InheritValue TYPE_IDENTIFIER false InheritValue METHOD_IDENTIFIER false String TYPE_IDENTIFIER false getCssText METHOD_IDENTIFIER true getCssValueType METHOD_IDENTIFIER true CSSValue TYPE_IDENTIFIER false CSS_INHERIT VARIABLE_IDENTIFIER false String TYPE_IDENTIFIER false toString METHOD_IDENTIFIER true getCssText METHOD_IDENTIFIER false
[ "pschulam@gmail.com" ]
pschulam@gmail.com
81a54b09759cf65bc5d908a3b3f361f17dd38be8
df1ef68d6efd4841456ef6fd25b4887a74e57ec2
/ajax/src/dao/dbhelper.java
efd09afe0ab4b5f32a5f11624a3a76d18c691ee5
[]
no_license
Bluehu/first
4f7b792f04c3f8154f225edd3eae67fdcf58db59
efe54b156cbc867e1ed0f95fbd3b40f2f6fe4d5e
refs/heads/master
2021-04-12T09:31:31.405007
2016-06-30T09:08:56
2016-06-30T09:08:56
62,299,618
0
0
null
null
null
null
GB18030
Java
false
false
1,580
java
package dao; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; public class dbhelper { private static String driverStr = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; private static String url = "jdbc:sqlserver://localhost:1433;databaseName=dt14_Project_Test(JSP)"; private static String uid="huyuxiao"; private static String pwd="123456"; //执行增删改,返回所受影响的行数 public static int update(String sql, Object[] arrP){ int result = 0; Connection con = null; PreparedStatement pstm=null; try{ Class.forName(driverStr); con = DriverManager.getConnection(url,uid,pwd); pstm = con.prepareStatement(sql); //判断sql语句是否包含参数? if(arrP !=null){ int i=1; for(Object obj:arrP){ pstm.setObject(i++, obj); } } result = pstm.executeUpdate(); } catch(Exception ex){ result = -1; } return result; } //执行查询,返回结果集 public static ResultSet query(String sql, Object[] arrP){ ResultSet result = null; Connection con = null; PreparedStatement pstm=null; try{ Class.forName(driverStr); con = DriverManager.getConnection(url,uid,pwd); pstm = con.prepareStatement(sql); //判断sql语句是否包含参数? if(arrP !=null){ int i=1; for(Object obj:arrP){ pstm.setObject(i++, obj); } } result = pstm.executeQuery(); } catch(Exception ex){ result = null; } return result; } }
[ "h191842218@163.com" ]
h191842218@163.com
a0978ebe03c44ee18729cfa90abe4b8c6949a1ae
0e9f3f82762567a9dbbccc7c220d3f4178aa258a
/src/main/java/com/greenfoxacademy/todo/services/AssigneeService.java
2b302be987a494769439b1885c7befd0d5f2bbfc
[]
no_license
adel-n/todo2
ff1f88c509aff8e194b4154c4e9e368fa98a05ce
bf77ff4c14450ec50527558d0aaa0056893bf08e
refs/heads/master
2021-05-11T05:28:35.582779
2018-01-18T10:03:38
2018-01-18T10:03:38
117,964,196
0
0
null
null
null
null
UTF-8
Java
false
false
401
java
package com.greenfoxacademy.todo.services; import com.greenfoxacademy.todo.models.Assignee; import org.springframework.stereotype.Service; import java.util.List; @Service public interface AssigneeService { Assignee getAssignee(Integer id); List<Assignee> getAllAssignees(); void modifyAssignee(Assignee assignee); void deleteAssignee(Integer id); void addAssignee(Assignee assignee); }
[ "navracsics.adel@gmail.com" ]
navracsics.adel@gmail.com
fe80532908aad14aae139da23e816fc962b77de6
e93c22f5b866bbf73430254cb21ea5a70db4de31
/TMDModelApp/WEB-INF/classes/eg.java
58be70a9f22547703f004528177a1a91b3fc1110
[]
no_license
AdityaVandan/TMDModeller
b0e768de896417fb679f32d6a17b41977454c53a
c8b62e8a7bd5b9e137f208f32d77ef75e45cde61
refs/heads/master
2020-04-30T23:50:58.639245
2019-03-22T14:56:33
2019-03-22T14:56:33
177,153,528
0
0
null
null
null
null
UTF-8
Java
false
false
709
java
import com.thinking.machines.dmframework.*; import com.thinking.machines.dmframework.exceptions.*; import com.thinking.machines.tmdmodel.dl.*; class eg { public static void main(String gg[]) { try { Project project=new Project(); project.setTitle("Cart"); project.setMemberCode(1); project.setDatabaseArchitectureCode(1); project.setDateOfCreation(new java.sql.Date(System.currentTimeMillis())); project.setTimeOfCreation(new java.sql.Time(System.currentTimeMillis())); project.setNumberOfTable(0); project.setWidth(800); project.setHeight(1000); DataManager dataManager=new DataManager(); dataManager.begin(); dataManager.insert(project); dataManager.end(); }catch(Exception e) { System.out.println(e); } } }
[ "van13heisenberg@gmail.com" ]
van13heisenberg@gmail.com
89ec0d230a634dafa60f381268a982165a4f859d
325bc4e49b41a44b280078fe210b85e408f28985
/springBoot-myBatis/src/main/java/mdm_web/DeleteMdByIdResponse.java
16913a725c916bb678bf9277e01fbd8d6713b88c
[]
no_license
kafun18/springboot_test
9231f10b9643463155d2f7a2e631af251411f13f
ac7a8b5eab257069e99ccb9aba737e890e1b24f7
refs/heads/master
2022-07-11T22:03:13.128897
2020-12-12T15:40:23
2020-12-12T15:40:23
190,215,015
0
0
null
2022-06-21T02:04:34
2019-06-04T14:11:39
Java
GB18030
Java
false
false
1,717
java
package mdm_web; import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>anonymous complex type的 Java 类。 * * <p>以下模式片段指定包含在此类中的预期内容。 * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="return" type="{http://sharing.mdm07.itf.yonyou.com/MdmRetVO}MdmRetVO" minOccurs="0"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "_return" }) @XmlRootElement(name = "deleteMdByIdResponse") public class DeleteMdByIdResponse { @XmlElementRef(name = "return", namespace = "http://sharing.mdm07.itf.yonyou.com/IMdSharingCenterService", type = JAXBElement.class, required = false) protected JAXBElement<MdmRetVO> _return; /** * 获取return属性的值。 * * @return * possible object is * {@link JAXBElement }{@code <}{@link MdmRetVO }{@code >} * */ public JAXBElement<MdmRetVO> getReturn() { return _return; } /** * 设置return属性的值。 * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link MdmRetVO }{@code >} * */ public void setReturn(JAXBElement<MdmRetVO> value) { this._return = value; } }
[ "513112374@qq.com" ]
513112374@qq.com
4dbfdd4533716612280c3586ecd5417e52534598
53d09d1fdbe31b645a6bff24b6100f6f197018fa
/Sorting/SortingAlgorithm.java
8721162a1a2df1050e6fa177791765070b45f34b
[]
no_license
preethakachhadiya/Java-UDP-TCP
20fc2f425f8ab0edc354de314092e1b4d0f47ca5
5c0b03e029f56a79e7880ea8107712d8c6eed9d8
refs/heads/master
2022-11-10T05:30:51.515409
2020-06-10T16:36:29
2020-06-10T16:36:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,946
java
import java.net.*; import java.io.*; import java.util.Scanner; public class SortingAlgorithm { static DataInputStream dis = null; static DataOutputStream dout = null; static Scanner sc = new Scanner(System.in); public static void server() throws IOException { ServerSocket ss = new ServerSocket(8080); System.out.println("Welcome Server!"); Socket s = ss.accept(); dis = new DataInputStream(s.getInputStream()); dout = new DataOutputStream(s.getOutputStream()); String str = (String)dis.readUTF(); int n = Integer.parseInt(str); System.out.println("No. of elemnets: " + n); int i = 0; int arr[] = new int[n]; while(i < n) { str = (String)dis.readUTF(); arr[i] = Integer.parseInt(str); i++; } System.out.println("Sorting using Bubble Sort Algorithm..."); // int temp; arr = Sort(arr); for(i = 0; i < n; i++) dout.writeUTF(Integer.toString(arr[i])); System.out.println("Closing Server!"); str = (String)dis.readUTF(); while(str.equals("S")); s.close(); ss.close(); } public static void Client() throws IOException { Socket s = new Socket("localhost", 8080); System.out.println("Welcome in Client"); dis = new DataInputStream(s.getInputStream()); dout = new DataOutputStream(s.getOutputStream()); System.out.println("Enter the number of elements to be sorted:"); String str = sc.nextLine(); int n = Integer.parseInt(str); dout.writeUTF(str); String arr[] = new String[n]; System.out.println("Enter the array to be sorted:"); for(int i = 0; i < n; i++) { arr[i] = sc.nextLine(); dout.writeUTF(arr[i]); } int i = 0; System.out.println("After Sorting:"); while(i++ < n) System.out.println(i + ". " + (String)dis.readUTF() ); System.out.println("Closing Client"); dout.writeUTF("Stop"); s.close(); } public static void main(String[] arg) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String ans = new String(); System.out.println("Enter Who are you (Server/Client):"); ans = br.readLine(); if(ans.equals("Server")) server(); else Client(); } private static int[] Sort(int[] arr) { int i, j, temp; for(i = 0; i < arr.length-1; i++) { for(j = 0; j < arr.length-i-1; j++) { if(arr[j] > arr[j+1]) { temp = arr[j]; arr[j] = arr[j+1]; arr[j+1] = temp; } } } return arr; } }
[ "preethamkachhadiya@gmail.com" ]
preethamkachhadiya@gmail.com
cf3970792769b23b9c66ab414b619478ab0094eb
37db626f014c686525d934968c29020f9f366a9d
/app/src/main/java/androidhive/info/itraveller/model/ReturnDomesticFlightModel.java
7f3a41dbb9348c5463bbb86ba2518e764197d9ac
[]
no_license
sreejithsatheesh/itrAndroid
797fef775e4d6f7fc5dfd054e79e9de2a05c0063
f35c3a59efd26f5b2f0929d759ac45111e075743
refs/heads/master
2016-08-08T14:38:29.110569
2015-08-16T16:41:51
2015-08-16T16:41:51
37,450,727
0
1
null
2015-08-16T17:26:16
2015-06-15T07:41:24
Java
UTF-8
Java
false
false
8,878
java
package androidhive.info.itraveller.model; public class ReturnDomesticFlightModel { String ActualBaseFare,Tax,STax,TCharge,SCharge,TDiscount,TMarkup,TPartnerCommission,TSdiscount,ocTax,id,key,AirEquipType,ArrivalAirportCode,ArrivalAirportName,ArrivalDateTime,DepartureAirportCode,DepartureAirportName,DepartureDateTime,FlightNumber,MarketingAirlineCode,OperatingAirlineCode,OperatingAirlineName,OperatingAirlineFlightNumber,NumStops,LinkSellAgrmnt,Conx,AirpChg,InsideAvailOption,GenTrafRestriction,DaysOperates,JrnyTm,EndDt,StartTerminal,EndTerminal; public ReturnDomesticFlightModel() { } public ReturnDomesticFlightModel(String actualBaseFare, String tax, String STax, String TCharge, String SCharge, String TDiscount, String TMarkup, String TPartnerCommission, String TSdiscount, String ocTax, String id, String key, String airEquipType, String arrivalAirportCode, String arrivalAirportName, String arrivalDateTime, String departureAirportCode, String departureAirportName, String departureDateTime, String flightNumber, String marketingAirlineCode, String operatingAirlineCode, String operatingAirlineName, String operatingAirlineFlightNumber, String numStops, String linkSellAgrmnt, String conx, String airpChg, String insideAvailOption, String genTrafRestriction, String daysOperates, String jrnyTm, String endDt, String startTerminal, String endTerminal) { ActualBaseFare = actualBaseFare; Tax = tax; this.STax = STax; this.TCharge = TCharge; this.SCharge = SCharge; this.TDiscount = TDiscount; this.TMarkup = TMarkup; this.TPartnerCommission = TPartnerCommission; this.TSdiscount = TSdiscount; this.ocTax = ocTax; this.id = id; this.key = key; AirEquipType = airEquipType; ArrivalAirportCode = arrivalAirportCode; ArrivalAirportName = arrivalAirportName; ArrivalDateTime = arrivalDateTime; DepartureAirportCode = departureAirportCode; DepartureAirportName = departureAirportName; DepartureDateTime = departureDateTime; FlightNumber = flightNumber; MarketingAirlineCode = marketingAirlineCode; OperatingAirlineCode = operatingAirlineCode; OperatingAirlineName = operatingAirlineName; OperatingAirlineFlightNumber = operatingAirlineFlightNumber; NumStops = numStops; LinkSellAgrmnt = linkSellAgrmnt; Conx = conx; AirpChg = airpChg; InsideAvailOption = insideAvailOption; GenTrafRestriction = genTrafRestriction; DaysOperates = daysOperates; JrnyTm = jrnyTm; EndDt = endDt; StartTerminal = startTerminal; EndTerminal = endTerminal; } public String getActualBaseFare() { return ActualBaseFare; } public void setActualBaseFare(String actualBaseFare) { ActualBaseFare = actualBaseFare; } public String getTax() { return Tax; } public void setTax(String tax) { Tax = tax; } public String getSTax() { return STax; } public void setSTax(String STax) { this.STax = STax; } public String getTCharge() { return TCharge; } public void setTCharge(String TCharge) { this.TCharge = TCharge; } public String getSCharge() { return SCharge; } public void setSCharge(String SCharge) { this.SCharge = SCharge; } public String getTDiscount() { return TDiscount; } public void setTDiscount(String TDiscount) { this.TDiscount = TDiscount; } public String getTMarkup() { return TMarkup; } public void setTMarkup(String TMarkup) { this.TMarkup = TMarkup; } public String getTPartnerCommission() { return TPartnerCommission; } public void setTPartnerCommission(String TPartnerCommission) { this.TPartnerCommission = TPartnerCommission; } public String getTSdiscount() { return TSdiscount; } public void setTSdiscount(String TSdiscount) { this.TSdiscount = TSdiscount; } public String getOcTax() { return ocTax; } public void setOcTax(String ocTax) { this.ocTax = ocTax; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getKey() { return key; } public void setKey(String key) { this.key = key; } public String getAirEquipType() { return AirEquipType; } public void setAirEquipType(String airEquipType) { AirEquipType = airEquipType; } public String getArrivalAirportCode() { return ArrivalAirportCode; } public void setArrivalAirportCode(String arrivalAirportCode) { ArrivalAirportCode = arrivalAirportCode; } public String getArrivalAirportName() { return ArrivalAirportName; } public void setArrivalAirportName(String arrivalAirportName) { ArrivalAirportName = arrivalAirportName; } public String getArrivalDateTime() { return ArrivalDateTime; } public void setArrivalDateTime(String arrivalDateTime) { ArrivalDateTime = arrivalDateTime; } public String getDepartureAirportCode() { return DepartureAirportCode; } public void setDepartureAirportCode(String departureAirportCode) { DepartureAirportCode = departureAirportCode; } public String getDepartureAirportName() { return DepartureAirportName; } public void setDepartureAirportName(String departureAirportName) { DepartureAirportName = departureAirportName; } public String getDepartureDateTime() { return DepartureDateTime; } public void setDepartureDateTime(String departureDateTime) { DepartureDateTime = departureDateTime; } public String getFlightNumber() { return FlightNumber; } public void setFlightNumber(String flightNumber) { FlightNumber = flightNumber; } public String getMarketingAirlineCode() { return MarketingAirlineCode; } public void setMarketingAirlineCode(String marketingAirlineCode) { MarketingAirlineCode = marketingAirlineCode; } public String getOperatingAirlineCode() { return OperatingAirlineCode; } public void setOperatingAirlineCode(String operatingAirlineCode) { OperatingAirlineCode = operatingAirlineCode; } public String getOperatingAirlineName() { return OperatingAirlineName; } public void setOperatingAirlineName(String operatingAirlineName) { OperatingAirlineName = operatingAirlineName; } public String getOperatingAirlineFlightNumber() { return OperatingAirlineFlightNumber; } public void setOperatingAirlineFlightNumber(String operatingAirlineFlightNumber) { OperatingAirlineFlightNumber = operatingAirlineFlightNumber; } public String getNumStops() { return NumStops; } public void setNumStops(String numStops) { NumStops = numStops; } public String getLinkSellAgrmnt() { return LinkSellAgrmnt; } public void setLinkSellAgrmnt(String linkSellAgrmnt) { LinkSellAgrmnt = linkSellAgrmnt; } public String getConx() { return Conx; } public void setConx(String conx) { Conx = conx; } public String getAirpChg() { return AirpChg; } public void setAirpChg(String airpChg) { AirpChg = airpChg; } public String getInsideAvailOption() { return InsideAvailOption; } public void setInsideAvailOption(String insideAvailOption) { InsideAvailOption = insideAvailOption; } public String getGenTrafRestriction() { return GenTrafRestriction; } public void setGenTrafRestriction(String genTrafRestriction) { GenTrafRestriction = genTrafRestriction; } public String getDaysOperates() { return DaysOperates; } public void setDaysOperates(String daysOperates) { DaysOperates = daysOperates; } public String getJrnyTm() { return JrnyTm; } public void setJrnyTm(String jrnyTm) { JrnyTm = jrnyTm; } public String getEndDt() { return EndDt; } public void setEndDt(String endDt) { EndDt = endDt; } public String getStartTerminal() { return StartTerminal; } public void setStartTerminal(String startTerminal) { StartTerminal = startTerminal; } public String getEndTerminal() { return EndTerminal; } public void setEndTerminal(String endTerminal) { EndTerminal = endTerminal; } }
[ "vishaknk@gmail.com" ]
vishaknk@gmail.com
21f41c5f90a0d49cca073218861c33dd6af08e26
a4fe3958ac44bfae04f4c798f8a9edf08f5de131
/src/helloLinux/log/CommentLogDAO.java
0e440559b5bc6721352d99c6cc82de22c44e1a18
[]
no_license
yelimkim98/hello_linux
b61b2a313a7a6d90f32c3a11107a89c4aea2e8a3
85848123215792d1e19d6187bc7182d77405bfe8
refs/heads/master
2020-09-10T03:28:45.797919
2019-12-04T10:20:56
2019-12-04T10:20:56
219,692,254
0
0
null
null
null
null
UTF-8
Java
false
false
57
java
package helloLinux.log; public class CommentLogDAO { }
[ "kiel0103@naver.com" ]
kiel0103@naver.com
10dc1948d448093c197a10ac07ba691f9bc49f99
98bfbb9c0d0dc614eb624b69e7e17f67fced0933
/proposals/logging/api/src/test/java/org/eclipse/microprofile/logging/ExtendedData.java
2210f97163fb3c9d5d43fddf3d919a617d56c4de
[ "Apache-2.0", "LicenseRef-scancode-generic-cla" ]
permissive
eclipse/microprofile-sandbox
f3ac9cdb3814f049526eba6af2ecef5a29c0eb42
6ff385401d3e804824fd77df0e2febcebdcf5ad7
refs/heads/main
2023-09-06T08:39:36.302945
2023-07-13T13:42:02
2023-07-13T13:42:02
93,201,544
43
47
Apache-2.0
2023-07-06T14:25:17
2017-06-02T20:30:35
Java
UTF-8
Java
false
false
194
java
package org.eclipse.microprofile.logging; /** * Basic data to store in an extended {@link LogEvent}. */ public class ExtendedData { public String subName; public String subVersion; }
[ "alex.lewis001@gmail.com" ]
alex.lewis001@gmail.com
8c2fa457c1c3d3d4949e00c33c8c30cf3999fb3c
3fdeaa7cc9e68e96d0c196f737079929aec8634b
/src/test/java/CalculatorTest.java
e4af2abbcb4eb8a330ab8686ddd1ebe8e9d78e84
[]
no_license
KotikE/Task8_CalculatorUnitTest
3bb0648cab4333b319f9354725d34a843602bd33
955818df1bbdf3aa28f89eb387abab2660013997
refs/heads/master
2020-03-26T20:09:28.462440
2018-08-19T14:07:05
2018-08-19T14:07:05
145,308,003
0
0
null
null
null
null
UTF-8
Java
false
false
1,716
java
import org.junit.After; import org.junit.Assert; import org.junit.Before; import org.junit.Test; import java.util.ArrayList; public class CalculatorTest { static int count = 0; static int countFalse = 0; ArrayList<String> array = new ArrayList<>(); String text = "The test is faild! It's "; @Before public void newBeggining() { array.add(0, ""); array.add(1, "1"); array.add(2, "2"); } @Test public void AdditionTest() { try { Assert.assertTrue(text+"testAddition!", new Addition(array).calculate(array) == 3); } catch (Throwable e) { countFalse++; System.out.println(e.toString()); } } @Test public void Divisiontest() { try { Assert.assertTrue(text+"testDivision!", new Division(array).calculate(array) == 0.5); } catch (Throwable e) { countFalse++; System.out.println(e.toString()); } } @Test public void Multiplicationtest() { try { Assert.assertTrue(text+"testMultiplication!", new Multiplication(array).calculate(array) == 2); } catch (Throwable e) { countFalse++; System.out.println(e.toString()); } } @Test public void Subtractiontest() { try { Assert.assertTrue(text+"testSubtraction!", new Subtraction(array).calculate(array) == -1); } catch (Throwable e) { countFalse++; System.out.println(e.toString()); } } @After public void theEnd() { count++; System.out.println("Tests passed: " + (count - countFalse) + " of " + count); } }
[ "kotik_k@bk.ru" ]
kotik_k@bk.ru
c28da43c4f8479cf1c42b56f9193650ecc029a15
12812173470a69f7718ac6fd650794f9ac13f416
/Namu/src/main/java/com/youlove/service/domain/Hotel.java
69ca1904477e78b05b2e297a6c49a0e50c5c9f0f
[]
no_license
qwqws9/YouLoveNamuPjt
7d7d8b33fcb8f6f818e4ac9e936eb9e4626d8904
d06404e4fde1fdb67ccc08775aa212289c58c9ed
refs/heads/master
2020-06-18T22:50:13.709430
2019-10-07T05:26:51
2019-10-07T05:26:51
196,480,996
0
1
null
null
null
null
UTF-8
Java
false
false
2,271
java
package com.youlove.service.domain; public class Hotel { private String hotelId; private String hotelName; private String hotelThumb; private String hotelShortDesc; private String hotelLoc; private String price; private String keyword; private String checkin; private String checkout; private String adult; private String children; public String getHotelId() { return hotelId; } public void setHotelId(String hotelId) { this.hotelId = hotelId; } public String getHotelName() { return hotelName; } public void setHotelName(String hotelName) { this.hotelName = hotelName; } public String getHotelThumb() { return hotelThumb; } public void setHotelThumb(String hotelThumb) { this.hotelThumb = hotelThumb; } public String getHotelShortDesc() { return hotelShortDesc; } public void setHotelShortDesc(String hotelShortDesc) { this.hotelShortDesc = hotelShortDesc; } public String getHotelLoc() { return hotelLoc; } public void setHotelLoc(String hotelLoc) { this.hotelLoc = hotelLoc; } public String getPrice() { return price; } public void setPrice(String price) { this.price = price; } public String getKeyword() { return keyword; } public void setKeyword(String keyword) { this.keyword = keyword; } public String getCheckin() { return checkin; } public void setCheckin(String checkin) { this.checkin = checkin; } public String getCheckout() { return checkout; } public void setCheckout(String checkout) { this.checkout = checkout; } public String getAdult() { return adult; } public void setAdult(String adult) { this.adult = adult; } public String getChildren() { return children; } public void setChildren(String children) { this.children = children; } @Override public String toString() { return "Hotel [hotelId=" + hotelId + ", hotelName=" + hotelName + ", hotelThumb=" + hotelThumb + ", hotelShortDesc=" + hotelShortDesc + ", hotelLoc=" + hotelLoc + ", price=" + price + ", keyword=" + keyword + ", checkin=" + checkin + ", checkout=" + checkout + ", adult=" + adult + ", children=" + children + "]"; } }
[ "yong@DESKTOP-LO5SEOI" ]
yong@DESKTOP-LO5SEOI
b7aaedd56dc728b910dfc1cd625d53438ada9b31
561906a068167ac6bad77fbf5023b7fccefdddb9
/app/src/test/java/com/mis/gfcfeedback/ExampleUnitTest.java
b7be38ef80e33dc43e3e7b036e0a7820fe90f86d
[]
no_license
axe3228/GFCFeedBack
990a2dccdab8a32c51961372922f060c45b1c7fd
a505b69df8284c8ff3f66b22018de8122a63cdd6
refs/heads/master
2020-11-23T18:53:21.321055
2019-12-16T02:46:18
2019-12-16T02:46:18
227,777,579
1
0
null
null
null
null
UTF-8
Java
false
false
380
java
package com.mis.gfcfeedback; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() { assertEquals(4, 2 + 2); } }
[ "habaradas26@gmail.com" ]
habaradas26@gmail.com
d8a26b796bfbbe73cd468b73b2e2de91b4a111d0
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/14/14_110ed4d6b5c53e00fc34d6e95537ace36785eeaa/ElementManipulator/14_110ed4d6b5c53e00fc34d6e95537ace36785eeaa_ElementManipulator_s.java
ef2ea22fb46423563e8f21efb00658502c396e42
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,101
java
package com.ontometrics.scraper.extraction; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.ontometrics.scraper.TagOccurrence; import com.ontometrics.scraper.util.ScraperUtil; public class ElementManipulator extends Manipulator { private static final Logger log = LoggerFactory.getLogger(ElementManipulator.class); private TagOccurrence tagOccurrence; public ElementManipulator(TagOccurrence tagOccurrence) { this.tagOccurrence = tagOccurrence; } @Override public String performExtraction() { return extractTag(); } private String extractTag() { String extraction = null; if (tagOccurrence.getMatching() != null) { extraction = ScraperUtil.extractTagMatching(getSource().toString(), tagOccurrence); log.debug("result of matching: {}", extraction); } else { extraction = ScraperUtil.extract(getSource().toString(), tagOccurrence.getTag(), tagOccurrence.getOccurrence()); } return extraction; } @Override public void setMatcher(String matcher) { this.tagOccurrence.setMatcher(matcher); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
62738cc74da3747d32ebc0313bb415b86d8fbc70
29a000e6266e6bb5b9861dfad174e42506b95d28
/src/main/java/mii/marke/security/jwt/JWTFilter.java
574a38a9596c90d3931d91cbbe422f33af0ea138
[]
no_license
danangrisang/marke
97423f89ece80662723042849d2ce021c9591a21
03eb3fd22031f98e06b5f7c5a440e759f7eb6c83
refs/heads/master
2020-12-03T00:40:43.457784
2017-07-03T02:00:18
2017-07-03T02:00:18
96,060,877
0
0
null
null
null
null
UTF-8
Java
false
false
1,799
java
package mii.marke.security.jwt; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.util.StringUtils; import org.springframework.web.filter.GenericFilterBean; import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import java.io.IOException; /** * Filters incoming requests and installs a Spring Security principal if a header corresponding to a valid user is * found. */ public class JWTFilter extends GenericFilterBean { private TokenProvider tokenProvider; public JWTFilter(TokenProvider tokenProvider) { this.tokenProvider = tokenProvider; } @Override public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { HttpServletRequest httpServletRequest = (HttpServletRequest) servletRequest; String jwt = resolveToken(httpServletRequest); if (StringUtils.hasText(jwt) && this.tokenProvider.validateToken(jwt)) { Authentication authentication = this.tokenProvider.getAuthentication(jwt); SecurityContextHolder.getContext().setAuthentication(authentication); } filterChain.doFilter(servletRequest, servletResponse); } private String resolveToken(HttpServletRequest request){ String bearerToken = request.getHeader(JWTConfigurer.AUTHORIZATION_HEADER); if (StringUtils.hasText(bearerToken) && bearerToken.startsWith("Bearer ")) { return bearerToken.substring(7, bearerToken.length()); } return null; } }
[ "danangrisang@gmail.com" ]
danangrisang@gmail.com
b9b9d17091fca8f038ddf5e3a22c845a989fde98
2599907d0f35f6a27f06757d2473a740ae9f0778
/app/src/main/java/com/example/jadwalshalat/database/AppDatabase.java
84c8eedddfc2c41389f0622400ab697a4d9cd92e
[]
no_license
avisenahuda111099/JadwalShalat
dd49370b4e707731974aa6b7fb334527abcbf9e9
17d6fadbee9cd3a08fb440494c1b314433411f57
refs/heads/master
2022-06-30T06:35:21.337313
2020-05-09T01:22:25
2020-05-09T01:22:25
261,965,564
0
0
null
null
null
null
UTF-8
Java
false
false
631
java
package com.example.jadwalshalat.database; import android.content.Context; import androidx.room.Database; import androidx.room.Room; import androidx.room.RoomDatabase; @Database(entities = {DataModel.class}, version = 1) public abstract class AppDatabase extends RoomDatabase { private static AppDatabase appDatabase; public abstract SholatDAO sholatDAO(); public static AppDatabase initDatabase(Context context) { if (appDatabase == null) { appDatabase = Room.databaseBuilder(context, AppDatabase.class, "sholat").allowMainThreadQueries().build(); } return appDatabase; } }
[ "avisena.hudabf109@gmail.com" ]
avisena.hudabf109@gmail.com
55cba8b43266b1c8e92475e693a41669f0e705f1
2bdf5c874bb8828f81d487a63a9d940a5031ab4e
/src/practica1_199819880/ApiladorZombies.java
d97e3dd072900506f7eb4e7c186b1bf31edc84ea
[]
no_license
AllanAugustS/Practica1s2015_199819880
7a765429422ba73f181c313131e6e4fbb831c713
a2fc6cfcc241233a416685d478a4a59dbbd2eb6a
refs/heads/master
2016-09-08T01:18:48.920398
2015-02-26T05:26:30
2015-02-26T05:26:30
30,784,083
0
0
null
null
null
null
UTF-8
Java
false
false
1,196
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package practica1_199819880; import java.util.Random; import java.util.logging.Level; import java.util.logging.Logger; /** * * @author Allan */ public class ApiladorZombies implements Runnable { private Pilazombies pila; public ApiladorZombies(Pilazombies pila) { this.pila = pila; } @Override public void run() { //int length = g_slist_length (list); Random rd = new Random(); while(true){ try { int time = rd.nextInt(5000); Thread.sleep(time); // int dato = rd.nextInt(ListaCatalogoZombies.listacatalogo.Cabeza.imagen.length()); System.out.println(pila.apilar(ListaCatalogoZombies.listacatalogo)); } catch (InterruptedException ex) { Logger.getLogger(ApiladorZombies.class.getName()).log(Level.SEVERE, null, ex); } } } }
[ "Allan@Allan-PC" ]
Allan@Allan-PC
dedb124a3cb2d2b5cb4453b8393f48493901705b
97f729711aa5cc97a38f34bce4bd0dc5c1aac2ff
/SpringBoot_dubo_customer/src/main/java/com/jk/controller/ShowVideoInfo/VideoInfoContoller.java
cd940f901b1e1b5a7f00c034359429ad94c01650
[]
no_license
Group1-jk/SpringBoot_dubo_hospital
18e06a4c91204ec4c6bf676d6cba17c2742d4232
fb06f0a2f963298cc00d68b6250898ef02dc569a
refs/heads/master
2021-05-09T05:31:52.534164
2018-08-06T10:52:30
2018-08-06T10:52:30
119,312,955
2
2
null
2018-06-03T12:28:09
2018-01-29T00:52:46
JavaScript
UTF-8
Java
false
false
2,836
java
/** * <pre>项目名称:Hospital * 文件名称:VideoInfoContoller.java * 包名:com.jk.controller.ShowVideoInfo * 创建日期:2018年1月29日下午3:27:22 * Copyright (c) 2018, yuxy123@gmail.com All Rights Reserved.</pre> */ package com.jk.controller.ShowVideoInfo; import com.jk.model.ShowVideoInfo.VideoInfo; import com.jk.service.ShowVideoInfo.VideoInfoService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.ModelAndView; import redis.clients.jedis.ShardedJedis; import redis.clients.jedis.ShardedJedisPool; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; /** * <pre>项目名称:Hospital * 类名称:VideoInfoContoller 一句话描述这个方法的作用(); * 类描述: * 创建人:王硕 ws_java@126.com * 创建时间:2018年1月29日 下午3:27:22 * 修改人:王硕 ws_java@126.com * 修改时间:2018年1月29日 下午3:27:22 * 修改备注: * @version </pre> */ @Controller @RequestMapping("/VideoInfoContoller") public class VideoInfoContoller { @Autowired private VideoInfoService videoInfo; @Autowired private ShardedJedisPool shardedJedisPool; /** * 去视频展示页面 * @return */ @RequestMapping("/toVideoPage") String toVideoPage(){ return "/VideoInfo/videoCore"; } /** * 展示视频列表 * */ @RequestMapping("/VideoList") @ResponseBody public List<LinkedHashMap> VideoList(VideoInfo video){ // 展示视频图片的信息 和视频的详细信息 // 展示视频详细信 return videoInfo.VideoList(video); } /** * 去视频分类展示页面 * 分类展示视频信息 * @return */ @RequestMapping("/toAdverTisePage") String AdverTise(){ return "/VideoInfo/AdverTise"; } /** * 查询条数的集合 * @param video * @return */ @RequestMapping("/findVideoList") @ResponseBody public Map findVideoList(VideoInfo video){ return videoInfo.findVideoList(video); } /** * 视频的详情页面 */ @RequestMapping("/queryVideoDetailInfo") @ResponseBody public ModelAndView queryVideoDetailInfo(Integer imgid){ /** * 每点击超过100次 就新增到数据库中 */ ShardedJedis redis = shardedJedisPool.getResource(); Long i=redis.incr("Hospital"+imgid); if(i%100==0){ videoInfo.updateVideoClick(imgid,i); } ModelAndView md=new ModelAndView(); // 查询视频的信息 VideoInfo video=videoInfo.findVideoInfoById(imgid); md.addObject("video", video); md.setViewName("/VideoInfo/PlayVideo"); return md; } }
[ "3471951139@qq.com" ]
3471951139@qq.com
54063fbe6ceba603abd08f12ee6e0e84b5522783
5d895063d5b99b01c3e2f71af38d690a477227aa
/src/com/lexerAndParser/JNI/TestJNI.java
e992be553e28dcc84d7704f3ac481bdf08394fbe
[]
no_license
ecnucompiler/compiler
0b9ea67a1b35bee98aa082a649ea4acb9135cb7f
9bd98592c7cbdc3b557804a2d4f6084952ee96c5
refs/heads/master
2016-08-11T09:14:42.015690
2016-01-21T15:23:53
2016-01-21T15:23:53
49,945,743
0
1
null
null
null
null
UTF-8
Java
false
false
574
java
package com.lexerAndParser.JNI; public class TestJNI { static{ System.loadLibrary("goodlucky"); } public native void set(int value); public native int get(); public native String scan(String str); public native String parse(String str); // public static void main(String[] args) { // // TestJNI td=new TestJNI(); // System.out.println("haha"); // System.out.println(td.compile("lalala")); //// // td.set(10); //// // System.out.println(td.get()); // // } }
[ "chenkai19950130@126.com" ]
chenkai19950130@126.com
faad54b14004ab09c9754c9691efa0138d991dfa
843396cd2751f5cec2a912d0894a76a95ebf08d0
/NetBeansProjects/CPU/src/main/java/cpu/GUI_Inicial.java
440b8778ac29f7382a779e707cf14a89684b81ef
[]
no_license
RenanErnest/Computer-Organization-Exercise-Program
78fb282908524777d23871be332136aae5ce4160
cb48989d6be7ae18171fc079e211d2829cd7a744
refs/heads/master
2020-06-04T11:52:30.898177
2019-09-06T17:17:45
2019-09-06T17:17:45
192,009,343
0
0
null
null
null
null
UTF-8
Java
false
false
7,320
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 cpu; /** * * @author Renan */ public class GUI_Inicial extends javax.swing.JFrame { /** * Creates new form GUI */ public GUI_Inicial() { initComponents(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jScrollPane1 = new javax.swing.JScrollPane(); codigo = new javax.swing.JTextArea(); enviar = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setPreferredSize(new java.awt.Dimension(600, 600)); jLabel1.setText("Digite ou cole um código Assembly na área abaixo:"); codigo.setColumns(20); codigo.setRows(5); jScrollPane1.setViewportView(codigo); enviar.setText("Enviar"); enviar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { enviarActionPerformed(evt); } }); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane1) .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 540, Short.MAX_VALUE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() .addGap(0, 0, Short.MAX_VALUE) .addComponent(enviar))) .addContainerGap()) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 482, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(enviar) .addContainerGap()) ); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); pack(); }// </editor-fold>//GEN-END:initComponents private void enviarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_enviarActionPerformed Main.Code = codigo.getText(); GUI.main(new String[1]); this.dispose(); }//GEN-LAST:event_enviarActionPerformed /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(GUI_Inicial.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(GUI_Inicial.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(GUI_Inicial.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(GUI_Inicial.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new GUI_Inicial().setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JTextArea codigo; private javax.swing.JButton enviar; private javax.swing.JLabel jLabel1; private javax.swing.JPanel jPanel1; private javax.swing.JPanel jPanel2; private javax.swing.JScrollPane jScrollPane1; // End of variables declaration//GEN-END:variables }
[ "renan.erns@gmail.com" ]
renan.erns@gmail.com
d9b58e87dab52182db5399d128431741ac79accc
9b2d3c436da7471cdb1669e0cc96e0399518e822
/CasosAcadAppMvn/CasosAcadAppMvn-ejb/src/main/java/casos/acad/acceso/PasoRequisitoFacadeLocal.java
9ed491adedf45a0d5a184f0eab27d0e57b45260c
[]
no_license
GadMurcia/RestAppMaven
a95f0d6705fe9e16299f0c710708911915f58de0
ca304214e7790b9a2d2e4731bb03df6c2b89b1f1
refs/heads/master
2021-01-21T20:34:01.033259
2017-07-03T01:46:05
2017-07-03T01:46:05
92,250,534
0
0
null
null
null
null
UTF-8
Java
false
false
850
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 casos.acad.acceso; import casos.acad.casosacaddatalibmvn.PasoRequisito; import casos.acad.casosacaddatalibmvn.Requisito; import java.util.List; import javax.ejb.Local; import javax.persistence.EntityManager; /** * * @author omar */ @Local public interface PasoRequisitoFacadeLocal { void create(PasoRequisito pasoRequisito); void edit(PasoRequisito pasoRequisito); void remove(PasoRequisito pasoRequisito); PasoRequisito find(Object id); List<PasoRequisito> findAll(); List<Requisito> findAllIdPaso(Object id); List<PasoRequisito> findRange(int[] range); int count(); EntityManager getEntityManager(); }
[ "guillermox001@gmail.com" ]
guillermox001@gmail.com
47bb09bdb6f34f8f201c9f7d8acbb26b575afd83
a6c8d406cb8656cc48e5c8ab5487b34b2b7f8111
/StringToNumbers.java
99b4003e053efc8bdf9f831fd3ed0b7594e48725
[]
no_license
Hazen2/Strings-To-Numbers-Dialog
c04287cba5a9714bd5c5473449149ea0e5af81ae
f9616109c03e0a7bbc4c27292f0ba1e17febd6f8
refs/heads/master
2021-01-15T14:29:48.025623
2014-10-22T08:56:12
2014-10-22T08:56:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,360
java
import javax.swing.JOptionPane; /** This program demonstrates converting strings to numbers using Dialog Boxes. */ public class StringToNumbers { /** This is the main method. */ public static void main(String[] args) { String inputString; String name; double hourlyWage = 15; double hoursWorked; double grossPay; // Get the user's name. name = JOptionPane.showInputDialog("Please enter your name."); // Ask the user's hourly wage. inputString = JOptionPane.showInputDialog("Enter your hourly wage."); // Convert hourly wage to a double. hourlyWage = Double.parseDouble(inputString); // Ask how many hours worked this month. inputString = JOptionPane.showInputDialog("Enter the hours worked this month."); // Convert hours worked from String to double hoursWorked = Double.parseDouble(inputString); // Calculate gross pay. grossPay = hoursWorked * hourlyWage; // Display the gross pay in a message dialog box. JOptionPane.showMessageDialog(null, name + " , you have worked " + hoursWorked + " hours this month." + " With a pay rate of $" + hourlyWage + " an hour, you have made a " + "total of $" + grossPay + " this month."); System.exit(0); } }
[ "Hazen2@users.noreply.github.com" ]
Hazen2@users.noreply.github.com
8ce7dd7b18f0f32faa75828faee805cc3ac20032
bf3fbd5f27faa4ded75b9c7ad808f0cfd75db327
/eureka-server/src/main/java/com/forezp/EurekaServerApplication.java
8e5c679a29a515ee2e73a7e27db2cee9b1c3657f
[]
no_license
sinosofti/springcloud-
6d99cfc742d694eecf095e70d2a63bc64259c4fe
eff70280570d5ed2dd89aee83d722926a7b19e02
refs/heads/master
2020-03-21T07:33:58.437596
2018-06-25T02:07:24
2018-06-25T02:07:24
138,287,485
0
0
null
null
null
null
UTF-8
Java
false
false
500
java
package com.forezp; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.cloud.netflix.eureka.server.EnableEurekaServer; @EnableEurekaServer @SpringBootApplication public class EurekaServerApplication { public static void main(String[] args) { SpringApplication.run(EurekaServerApplication.class, args); System.out.println("【【【【【【 Eureka微服务 】】】】】】已启动."); } }
[ "825407457@qq.com" ]
825407457@qq.com
09d5fba4501c420203528df9716f2f00307ed4fe
007b382faefd0ae297c8c4f23f4fd72501d04f4e
/app/src/main/java/cc/makepower/cc_door_face/retrofit/cookies/SerializableOkHttpCookies.java
3a6e3cdd54829378c00f84347633c08ceca1fad7
[]
no_license
cc800412/CC_Door_Face
8cab75bb629428ce08c8fa6cd9a94fe4bee8ca40
1c643038514a2237fde4d749568496299345780a
refs/heads/master
2022-12-05T00:59:19.695502
2020-08-25T05:18:37
2020-08-25T05:18:37
280,983,690
0
0
null
null
null
null
UTF-8
Java
false
false
2,132
java
package cc.makepower.cc_door_face.retrofit.cookies; import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.Serializable; import okhttp3.Cookie; /** * Created by makePower */ public class SerializableOkHttpCookies implements Serializable { private transient final Cookie cookies; private transient Cookie clientCookies; public SerializableOkHttpCookies(Cookie cookies) { this.cookies = cookies; } public Cookie getCookies() { Cookie bestCookies = cookies; if (clientCookies != null) { bestCookies = clientCookies; } return bestCookies; } private void writeObject(ObjectOutputStream out) throws IOException { out.writeObject(cookies.name()); out.writeObject(cookies.value()); out.writeLong(cookies.expiresAt()); out.writeObject(cookies.domain()); out.writeObject(cookies.path()); out.writeBoolean(cookies.secure()); out.writeBoolean(cookies.httpOnly()); out.writeBoolean(cookies.hostOnly()); out.writeBoolean(cookies.persistent()); } private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException { String name = (String) in.readObject(); String value = (String) in.readObject(); long expiresAt = in.readLong(); String domain = (String) in.readObject(); String path = (String) in.readObject(); boolean secure = in.readBoolean(); boolean httpOnly = in.readBoolean(); boolean hostOnly = in.readBoolean(); boolean persistent = in.readBoolean(); Cookie.Builder builder = new Cookie.Builder(); builder = builder.name(name); builder = builder.value(value); builder = builder.expiresAt(expiresAt); builder = hostOnly ? builder.hostOnlyDomain(domain) : builder.domain(domain); builder = builder.path(path); builder = secure ? builder.secure() : builder; builder = httpOnly ? builder.httpOnly() : builder; clientCookies = builder.build(); } }
[ "825334272@qq.com" ]
825334272@qq.com
7e5ea309dd5e0066bc140236e4b093a71a7de5e2
0c850813c4e53fabac9555fa0da7cac6b0d6586b
/copymy/src/main/java/sys/qx/util/StringUtils.java
a505265150fbcede15e744a031aa5ea8e7958e6b
[]
no_license
fongwenkui/ssmRights
07656ad56c7f515b5ef82a9a3048c621bb537348
f25d3e352d38d3171625f5e4b17c039a41aba95e
refs/heads/master
2021-07-06T10:14:38.049977
2017-09-29T19:23:31
2017-09-29T19:23:31
105,097,052
0
0
null
null
null
null
UTF-8
Java
false
false
508
java
package sys.qx.util; import java.util.Collection; import java.util.UUID; public class StringUtils { public static boolean isNotNull(String text){ return text != null && !"".equals(text); } public static String getUUID(){ return UUID.randomUUID().toString().replace("-", ""); } public static boolean isNotNull(String[] array){ return array != null && array.length > 0; } public static boolean isNotNull(Collection<?> list){ return list != null && list.size() > 0; } }
[ "494819237@qq.com" ]
494819237@qq.com
c567e7c3e49a1e62fd27e01825732d0c16db29fc
447520f40e82a060368a0802a391697bc00be96f
/apks/malware/app27/source/com/c3r2fdffs/i/app/Base64.java
9bc4487a073cd9cce8d0ba67847a79bb0bd287ac
[ "Apache-2.0" ]
permissive
iantal/AndroidPermissions
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
d623b732734243590b5f004d167e542e2e2ae249
refs/heads/master
2023-07-19T01:29:26.689186
2019-09-30T19:01:42
2019-09-30T19:01:42
107,239,248
0
0
Apache-2.0
2023-07-16T07:41:38
2017-10-17T08:22:57
null
UTF-8
Java
false
false
34,443
java
package com.c3r2fdffs.i.app; import java.io.UnsupportedEncodingException; public class Base64 { public static final int CRLF = 4; public static final int DEFAULT = 0; public static final int NO_CLOSE = 16; public static final int NO_PADDING = 1; public static final int NO_WRAP = 2; public static final int URL_SAFE = 8; static { if (!Base64.class.desiredAssertionStatus()) {} for (boolean bool = true;; bool = false) { $assertionsDisabled = bool; return; } } private Base64() {} public static byte[] decode(String paramString, int paramInt) { return decode(paramString.getBytes(), paramInt); } public static byte[] decode(byte[] paramArrayOfByte, int paramInt) { return decode(paramArrayOfByte, 0, paramArrayOfByte.length, paramInt); } public static byte[] decode(byte[] paramArrayOfByte, int paramInt1, int paramInt2, int paramInt3) { Decoder localDecoder = new Decoder(paramInt3, new byte[paramInt2 * 3 / 4]); if (!localDecoder.process(paramArrayOfByte, paramInt1, paramInt2, true)) { throw new IllegalArgumentException("bad base-64"); } if (localDecoder.op == localDecoder.output.length) { return localDecoder.output; } paramArrayOfByte = new byte[localDecoder.op]; System.arraycopy(localDecoder.output, 0, paramArrayOfByte, 0, localDecoder.op); return paramArrayOfByte; } public static byte[] encode(byte[] paramArrayOfByte, int paramInt) { return encode(paramArrayOfByte, 0, paramArrayOfByte.length, paramInt); } public static byte[] encode(byte[] paramArrayOfByte, int paramInt1, int paramInt2, int paramInt3) { Encoder localEncoder = new Encoder(paramInt3, null); int i = paramInt2 / 3 * 4; int j; if (localEncoder.do_padding) { paramInt3 = i; if (paramInt2 % 3 > 0) { paramInt3 = i + 4; } i = paramInt3; if (localEncoder.do_newline) { i = paramInt3; if (paramInt2 > 0) { j = (paramInt2 - 1) / 57; if (!localEncoder.do_cr) { break label186; } } } } label186: for (i = 2;; i = 1) { i = paramInt3 + i * (j + 1); localEncoder.output = new byte[i]; localEncoder.process(paramArrayOfByte, paramInt1, paramInt2, true); if (($assertionsDisabled) || (localEncoder.op == i)) { break label192; } throw new AssertionError(); paramInt3 = i; switch (paramInt2 % 3) { case 0: default: paramInt3 = i; break; case 1: paramInt3 = i + 2; break; case 2: paramInt3 = i + 3; break; } } label192: return localEncoder.output; } public static String encodeToString(byte[] paramArrayOfByte, int paramInt) { try { paramArrayOfByte = new String(encode(paramArrayOfByte, paramInt), "US-ASCII"); return paramArrayOfByte; } catch (UnsupportedEncodingException paramArrayOfByte) { throw new AssertionError(paramArrayOfByte); } } public static String encodeToString(byte[] paramArrayOfByte, int paramInt1, int paramInt2, int paramInt3) { try { paramArrayOfByte = new String(encode(paramArrayOfByte, paramInt1, paramInt2, paramInt3), "US-ASCII"); return paramArrayOfByte; } catch (UnsupportedEncodingException paramArrayOfByte) { throw new AssertionError(paramArrayOfByte); } } static abstract class Coder { public int op; public byte[] output; Coder() {} public abstract int maxOutputSize(int paramInt); public abstract boolean process(byte[] paramArrayOfByte, int paramInt1, int paramInt2, boolean paramBoolean); } static class Decoder extends Base64.Coder { private static final int[] DECODE; private static final int[] DECODE_WEBSAFE; private static final int EQUALS = -2; private static final int SKIP = -1; private final int[] alphabet; private int state; private int value; static { int[] arrayOfInt = new int['Ā']; arrayOfInt[0] = -1; arrayOfInt[1] = -1; arrayOfInt[2] = -1; arrayOfInt[3] = -1; arrayOfInt[4] = -1; arrayOfInt[5] = -1; arrayOfInt[6] = -1; arrayOfInt[7] = -1; arrayOfInt[8] = -1; arrayOfInt[9] = -1; arrayOfInt[10] = -1; arrayOfInt[11] = -1; arrayOfInt[12] = -1; arrayOfInt[13] = -1; arrayOfInt[14] = -1; arrayOfInt[15] = -1; arrayOfInt[16] = -1; arrayOfInt[17] = -1; arrayOfInt[18] = -1; arrayOfInt[19] = -1; arrayOfInt[20] = -1; arrayOfInt[21] = -1; arrayOfInt[22] = -1; arrayOfInt[23] = -1; arrayOfInt[24] = -1; arrayOfInt[25] = -1; arrayOfInt[26] = -1; arrayOfInt[27] = -1; arrayOfInt[28] = -1; arrayOfInt[29] = -1; arrayOfInt[30] = -1; arrayOfInt[31] = -1; arrayOfInt[32] = -1; arrayOfInt[33] = -1; arrayOfInt[34] = -1; arrayOfInt[35] = -1; arrayOfInt[36] = -1; arrayOfInt[37] = -1; arrayOfInt[38] = -1; arrayOfInt[39] = -1; arrayOfInt[40] = -1; arrayOfInt[41] = -1; arrayOfInt[42] = -1; arrayOfInt[43] = 62; arrayOfInt[44] = -1; arrayOfInt[45] = -1; arrayOfInt[46] = -1; arrayOfInt[47] = 63; arrayOfInt[48] = 52; arrayOfInt[49] = 53; arrayOfInt[50] = 54; arrayOfInt[51] = 55; arrayOfInt[52] = 56; arrayOfInt[53] = 57; arrayOfInt[54] = 58; arrayOfInt[55] = 59; arrayOfInt[56] = 60; arrayOfInt[57] = 61; arrayOfInt[58] = -1; arrayOfInt[59] = -1; arrayOfInt[60] = -1; arrayOfInt[61] = -2; arrayOfInt[62] = -1; arrayOfInt[63] = -1; arrayOfInt[64] = -1; arrayOfInt[66] = 1; arrayOfInt[67] = 2; arrayOfInt[68] = 3; arrayOfInt[69] = 4; arrayOfInt[70] = 5; arrayOfInt[71] = 6; arrayOfInt[72] = 7; arrayOfInt[73] = 8; arrayOfInt[74] = 9; arrayOfInt[75] = 10; arrayOfInt[76] = 11; arrayOfInt[77] = 12; arrayOfInt[78] = 13; arrayOfInt[79] = 14; arrayOfInt[80] = 15; arrayOfInt[81] = 16; arrayOfInt[82] = 17; arrayOfInt[83] = 18; arrayOfInt[84] = 19; arrayOfInt[85] = 20; arrayOfInt[86] = 21; arrayOfInt[87] = 22; arrayOfInt[88] = 23; arrayOfInt[89] = 24; arrayOfInt[90] = 25; arrayOfInt[91] = -1; arrayOfInt[92] = -1; arrayOfInt[93] = -1; arrayOfInt[94] = -1; arrayOfInt[95] = -1; arrayOfInt[96] = -1; arrayOfInt[97] = 26; arrayOfInt[98] = 27; arrayOfInt[99] = 28; arrayOfInt[100] = 29; arrayOfInt[101] = 30; arrayOfInt[102] = 31; arrayOfInt[103] = 32; arrayOfInt[104] = 33; arrayOfInt[105] = 34; arrayOfInt[106] = 35; arrayOfInt[107] = 36; arrayOfInt[108] = 37; arrayOfInt[109] = 38; arrayOfInt[110] = 39; arrayOfInt[111] = 40; arrayOfInt[112] = 41; arrayOfInt[113] = 42; arrayOfInt[114] = 43; arrayOfInt[115] = 44; arrayOfInt[116] = 45; arrayOfInt[117] = 46; arrayOfInt[118] = 47; arrayOfInt[119] = 48; arrayOfInt[120] = 49; arrayOfInt[121] = 50; arrayOfInt[122] = 51; arrayOfInt[123] = -1; arrayOfInt[124] = -1; arrayOfInt[125] = -1; arrayOfInt[126] = -1; arrayOfInt[127] = -1; arrayOfInt['€'] = -1; arrayOfInt[''] = -1; arrayOfInt['‚'] = -1; arrayOfInt['ƒ'] = -1; arrayOfInt['„'] = -1; arrayOfInt['…'] = -1; arrayOfInt['†'] = -1; arrayOfInt['‡'] = -1; arrayOfInt['ˆ'] = -1; arrayOfInt['‰'] = -1; arrayOfInt['Š'] = -1; arrayOfInt['‹'] = -1; arrayOfInt['Œ'] = -1; arrayOfInt[''] = -1; arrayOfInt['Ž'] = -1; arrayOfInt[''] = -1; arrayOfInt[''] = -1; arrayOfInt['‘'] = -1; arrayOfInt['’'] = -1; arrayOfInt['“'] = -1; arrayOfInt['”'] = -1; arrayOfInt['•'] = -1; arrayOfInt['–'] = -1; arrayOfInt['—'] = -1; arrayOfInt['˜'] = -1; arrayOfInt['™'] = -1; arrayOfInt['š'] = -1; arrayOfInt['›'] = -1; arrayOfInt['œ'] = -1; arrayOfInt[''] = -1; arrayOfInt['ž'] = -1; arrayOfInt['Ÿ'] = -1; arrayOfInt[' '] = -1; arrayOfInt['¡'] = -1; arrayOfInt['¢'] = -1; arrayOfInt['£'] = -1; arrayOfInt['¤'] = -1; arrayOfInt['¥'] = -1; arrayOfInt['¦'] = -1; arrayOfInt['§'] = -1; arrayOfInt['¨'] = -1; arrayOfInt['©'] = -1; arrayOfInt['ª'] = -1; arrayOfInt['«'] = -1; arrayOfInt['¬'] = -1; arrayOfInt['­'] = -1; arrayOfInt['®'] = -1; arrayOfInt['¯'] = -1; arrayOfInt['°'] = -1; arrayOfInt['±'] = -1; arrayOfInt['²'] = -1; arrayOfInt['³'] = -1; arrayOfInt['´'] = -1; arrayOfInt['µ'] = -1; arrayOfInt['¶'] = -1; arrayOfInt['·'] = -1; arrayOfInt['¸'] = -1; arrayOfInt['¹'] = -1; arrayOfInt['º'] = -1; arrayOfInt['»'] = -1; arrayOfInt['¼'] = -1; arrayOfInt['½'] = -1; arrayOfInt['¾'] = -1; arrayOfInt['¿'] = -1; arrayOfInt['À'] = -1; arrayOfInt['Á'] = -1; arrayOfInt['Â'] = -1; arrayOfInt['Ã'] = -1; arrayOfInt['Ä'] = -1; arrayOfInt['Å'] = -1; arrayOfInt['Æ'] = -1; arrayOfInt['Ç'] = -1; arrayOfInt['È'] = -1; arrayOfInt['É'] = -1; arrayOfInt['Ê'] = -1; arrayOfInt['Ë'] = -1; arrayOfInt['Ì'] = -1; arrayOfInt['Í'] = -1; arrayOfInt['Î'] = -1; arrayOfInt['Ï'] = -1; arrayOfInt['Ð'] = -1; arrayOfInt['Ñ'] = -1; arrayOfInt['Ò'] = -1; arrayOfInt['Ó'] = -1; arrayOfInt['Ô'] = -1; arrayOfInt['Õ'] = -1; arrayOfInt['Ö'] = -1; arrayOfInt['×'] = -1; arrayOfInt['Ø'] = -1; arrayOfInt['Ù'] = -1; arrayOfInt['Ú'] = -1; arrayOfInt['Û'] = -1; arrayOfInt['Ü'] = -1; arrayOfInt['Ý'] = -1; arrayOfInt['Þ'] = -1; arrayOfInt['ß'] = -1; arrayOfInt['à'] = -1; arrayOfInt['á'] = -1; arrayOfInt['â'] = -1; arrayOfInt['ã'] = -1; arrayOfInt['ä'] = -1; arrayOfInt['å'] = -1; arrayOfInt['æ'] = -1; arrayOfInt['ç'] = -1; arrayOfInt['è'] = -1; arrayOfInt['é'] = -1; arrayOfInt['ê'] = -1; arrayOfInt['ë'] = -1; arrayOfInt['ì'] = -1; arrayOfInt['í'] = -1; arrayOfInt['î'] = -1; arrayOfInt['ï'] = -1; arrayOfInt['ð'] = -1; arrayOfInt['ñ'] = -1; arrayOfInt['ò'] = -1; arrayOfInt['ó'] = -1; arrayOfInt['ô'] = -1; arrayOfInt['õ'] = -1; arrayOfInt['ö'] = -1; arrayOfInt['÷'] = -1; arrayOfInt['ø'] = -1; arrayOfInt['ù'] = -1; arrayOfInt['ú'] = -1; arrayOfInt['û'] = -1; arrayOfInt['ü'] = -1; arrayOfInt['ý'] = -1; arrayOfInt['þ'] = -1; arrayOfInt['ÿ'] = -1; DECODE = arrayOfInt; arrayOfInt = new int['Ā']; arrayOfInt[0] = -1; arrayOfInt[1] = -1; arrayOfInt[2] = -1; arrayOfInt[3] = -1; arrayOfInt[4] = -1; arrayOfInt[5] = -1; arrayOfInt[6] = -1; arrayOfInt[7] = -1; arrayOfInt[8] = -1; arrayOfInt[9] = -1; arrayOfInt[10] = -1; arrayOfInt[11] = -1; arrayOfInt[12] = -1; arrayOfInt[13] = -1; arrayOfInt[14] = -1; arrayOfInt[15] = -1; arrayOfInt[16] = -1; arrayOfInt[17] = -1; arrayOfInt[18] = -1; arrayOfInt[19] = -1; arrayOfInt[20] = -1; arrayOfInt[21] = -1; arrayOfInt[22] = -1; arrayOfInt[23] = -1; arrayOfInt[24] = -1; arrayOfInt[25] = -1; arrayOfInt[26] = -1; arrayOfInt[27] = -1; arrayOfInt[28] = -1; arrayOfInt[29] = -1; arrayOfInt[30] = -1; arrayOfInt[31] = -1; arrayOfInt[32] = -1; arrayOfInt[33] = -1; arrayOfInt[34] = -1; arrayOfInt[35] = -1; arrayOfInt[36] = -1; arrayOfInt[37] = -1; arrayOfInt[38] = -1; arrayOfInt[39] = -1; arrayOfInt[40] = -1; arrayOfInt[41] = -1; arrayOfInt[42] = -1; arrayOfInt[43] = -1; arrayOfInt[44] = -1; arrayOfInt[45] = 62; arrayOfInt[46] = -1; arrayOfInt[47] = -1; arrayOfInt[48] = 52; arrayOfInt[49] = 53; arrayOfInt[50] = 54; arrayOfInt[51] = 55; arrayOfInt[52] = 56; arrayOfInt[53] = 57; arrayOfInt[54] = 58; arrayOfInt[55] = 59; arrayOfInt[56] = 60; arrayOfInt[57] = 61; arrayOfInt[58] = -1; arrayOfInt[59] = -1; arrayOfInt[60] = -1; arrayOfInt[61] = -2; arrayOfInt[62] = -1; arrayOfInt[63] = -1; arrayOfInt[64] = -1; arrayOfInt[66] = 1; arrayOfInt[67] = 2; arrayOfInt[68] = 3; arrayOfInt[69] = 4; arrayOfInt[70] = 5; arrayOfInt[71] = 6; arrayOfInt[72] = 7; arrayOfInt[73] = 8; arrayOfInt[74] = 9; arrayOfInt[75] = 10; arrayOfInt[76] = 11; arrayOfInt[77] = 12; arrayOfInt[78] = 13; arrayOfInt[79] = 14; arrayOfInt[80] = 15; arrayOfInt[81] = 16; arrayOfInt[82] = 17; arrayOfInt[83] = 18; arrayOfInt[84] = 19; arrayOfInt[85] = 20; arrayOfInt[86] = 21; arrayOfInt[87] = 22; arrayOfInt[88] = 23; arrayOfInt[89] = 24; arrayOfInt[90] = 25; arrayOfInt[91] = -1; arrayOfInt[92] = -1; arrayOfInt[93] = -1; arrayOfInt[94] = -1; arrayOfInt[95] = 63; arrayOfInt[96] = -1; arrayOfInt[97] = 26; arrayOfInt[98] = 27; arrayOfInt[99] = 28; arrayOfInt[100] = 29; arrayOfInt[101] = 30; arrayOfInt[102] = 31; arrayOfInt[103] = 32; arrayOfInt[104] = 33; arrayOfInt[105] = 34; arrayOfInt[106] = 35; arrayOfInt[107] = 36; arrayOfInt[108] = 37; arrayOfInt[109] = 38; arrayOfInt[110] = 39; arrayOfInt[111] = 40; arrayOfInt[112] = 41; arrayOfInt[113] = 42; arrayOfInt[114] = 43; arrayOfInt[115] = 44; arrayOfInt[116] = 45; arrayOfInt[117] = 46; arrayOfInt[118] = 47; arrayOfInt[119] = 48; arrayOfInt[120] = 49; arrayOfInt[121] = 50; arrayOfInt[122] = 51; arrayOfInt[123] = -1; arrayOfInt[124] = -1; arrayOfInt[125] = -1; arrayOfInt[126] = -1; arrayOfInt[127] = -1; arrayOfInt['€'] = -1; arrayOfInt[''] = -1; arrayOfInt['‚'] = -1; arrayOfInt['ƒ'] = -1; arrayOfInt['„'] = -1; arrayOfInt['…'] = -1; arrayOfInt['†'] = -1; arrayOfInt['‡'] = -1; arrayOfInt['ˆ'] = -1; arrayOfInt['‰'] = -1; arrayOfInt['Š'] = -1; arrayOfInt['‹'] = -1; arrayOfInt['Œ'] = -1; arrayOfInt[''] = -1; arrayOfInt['Ž'] = -1; arrayOfInt[''] = -1; arrayOfInt[''] = -1; arrayOfInt['‘'] = -1; arrayOfInt['’'] = -1; arrayOfInt['“'] = -1; arrayOfInt['”'] = -1; arrayOfInt['•'] = -1; arrayOfInt['–'] = -1; arrayOfInt['—'] = -1; arrayOfInt['˜'] = -1; arrayOfInt['™'] = -1; arrayOfInt['š'] = -1; arrayOfInt['›'] = -1; arrayOfInt['œ'] = -1; arrayOfInt[''] = -1; arrayOfInt['ž'] = -1; arrayOfInt['Ÿ'] = -1; arrayOfInt[' '] = -1; arrayOfInt['¡'] = -1; arrayOfInt['¢'] = -1; arrayOfInt['£'] = -1; arrayOfInt['¤'] = -1; arrayOfInt['¥'] = -1; arrayOfInt['¦'] = -1; arrayOfInt['§'] = -1; arrayOfInt['¨'] = -1; arrayOfInt['©'] = -1; arrayOfInt['ª'] = -1; arrayOfInt['«'] = -1; arrayOfInt['¬'] = -1; arrayOfInt['­'] = -1; arrayOfInt['®'] = -1; arrayOfInt['¯'] = -1; arrayOfInt['°'] = -1; arrayOfInt['±'] = -1; arrayOfInt['²'] = -1; arrayOfInt['³'] = -1; arrayOfInt['´'] = -1; arrayOfInt['µ'] = -1; arrayOfInt['¶'] = -1; arrayOfInt['·'] = -1; arrayOfInt['¸'] = -1; arrayOfInt['¹'] = -1; arrayOfInt['º'] = -1; arrayOfInt['»'] = -1; arrayOfInt['¼'] = -1; arrayOfInt['½'] = -1; arrayOfInt['¾'] = -1; arrayOfInt['¿'] = -1; arrayOfInt['À'] = -1; arrayOfInt['Á'] = -1; arrayOfInt['Â'] = -1; arrayOfInt['Ã'] = -1; arrayOfInt['Ä'] = -1; arrayOfInt['Å'] = -1; arrayOfInt['Æ'] = -1; arrayOfInt['Ç'] = -1; arrayOfInt['È'] = -1; arrayOfInt['É'] = -1; arrayOfInt['Ê'] = -1; arrayOfInt['Ë'] = -1; arrayOfInt['Ì'] = -1; arrayOfInt['Í'] = -1; arrayOfInt['Î'] = -1; arrayOfInt['Ï'] = -1; arrayOfInt['Ð'] = -1; arrayOfInt['Ñ'] = -1; arrayOfInt['Ò'] = -1; arrayOfInt['Ó'] = -1; arrayOfInt['Ô'] = -1; arrayOfInt['Õ'] = -1; arrayOfInt['Ö'] = -1; arrayOfInt['×'] = -1; arrayOfInt['Ø'] = -1; arrayOfInt['Ù'] = -1; arrayOfInt['Ú'] = -1; arrayOfInt['Û'] = -1; arrayOfInt['Ü'] = -1; arrayOfInt['Ý'] = -1; arrayOfInt['Þ'] = -1; arrayOfInt['ß'] = -1; arrayOfInt['à'] = -1; arrayOfInt['á'] = -1; arrayOfInt['â'] = -1; arrayOfInt['ã'] = -1; arrayOfInt['ä'] = -1; arrayOfInt['å'] = -1; arrayOfInt['æ'] = -1; arrayOfInt['ç'] = -1; arrayOfInt['è'] = -1; arrayOfInt['é'] = -1; arrayOfInt['ê'] = -1; arrayOfInt['ë'] = -1; arrayOfInt['ì'] = -1; arrayOfInt['í'] = -1; arrayOfInt['î'] = -1; arrayOfInt['ï'] = -1; arrayOfInt['ð'] = -1; arrayOfInt['ñ'] = -1; arrayOfInt['ò'] = -1; arrayOfInt['ó'] = -1; arrayOfInt['ô'] = -1; arrayOfInt['õ'] = -1; arrayOfInt['ö'] = -1; arrayOfInt['÷'] = -1; arrayOfInt['ø'] = -1; arrayOfInt['ù'] = -1; arrayOfInt['ú'] = -1; arrayOfInt['û'] = -1; arrayOfInt['ü'] = -1; arrayOfInt['ý'] = -1; arrayOfInt['þ'] = -1; arrayOfInt['ÿ'] = -1; DECODE_WEBSAFE = arrayOfInt; } public Decoder(int paramInt, byte[] paramArrayOfByte) { this.output = paramArrayOfByte; if ((paramInt & 0x8) == 0) {} for (paramArrayOfByte = DECODE;; paramArrayOfByte = DECODE_WEBSAFE) { this.alphabet = paramArrayOfByte; this.state = 0; this.value = 0; return; } } public int maxOutputSize(int paramInt) { return paramInt * 3 / 4 + 10; } public boolean process(byte[] paramArrayOfByte, int paramInt1, int paramInt2, boolean paramBoolean) { if (this.state == 6) { return false; } int j = paramInt1; int i1 = paramInt2 + paramInt1; paramInt2 = this.state; int i = this.value; int k = 0; byte[] arrayOfByte = this.output; int[] arrayOfInt = this.alphabet; paramInt1 = j; j = k; if (paramInt1 >= i1) { paramInt1 = i; i = j; if (!paramBoolean) { this.state = paramInt2; this.value = paramInt1; this.op = i; return true; } } else { k = j; int n = paramInt1; int m = i; if (paramInt2 == 0) { k = i; i = paramInt1; for (;;) { paramInt1 = k; if (i + 4 <= i1) { paramInt1 = arrayOfInt[(paramArrayOfByte[i] & 0xFF)] << 18 | arrayOfInt[(paramArrayOfByte[(i + 1)] & 0xFF)] << 12 | arrayOfInt[(paramArrayOfByte[(i + 2)] & 0xFF)] << 6 | arrayOfInt[(paramArrayOfByte[(i + 3)] & 0xFF)]; if (paramInt1 >= 0) {} } else { k = j; n = i; m = paramInt1; if (i < i1) { break label263; } i = j; break; } arrayOfByte[(j + 2)] = ((byte)paramInt1); arrayOfByte[(j + 1)] = ((byte)(paramInt1 >> 8)); arrayOfByte[j] = ((byte)(paramInt1 >> 16)); j += 3; i += 4; k = paramInt1; } } label263: paramInt1 = n + 1; i = arrayOfInt[(paramArrayOfByte[n] & 0xFF)]; switch (paramInt2) { } do { do { do { do { do { do { j = k; i = m; break; if (i >= 0) { paramInt2 += 1; j = k; break; } } while (i == -1); this.state = 6; return false; if (i >= 0) { i = m << 6 | i; paramInt2 += 1; j = k; break; } } while (i == -1); this.state = 6; return false; if (i >= 0) { i = m << 6 | i; paramInt2 += 1; j = k; break; } if (i == -2) { arrayOfByte[k] = ((byte)(m >> 4)); paramInt2 = 4; j = k + 1; i = m; break; } } while (i == -1); this.state = 6; return false; if (i >= 0) { i = m << 6 | i; arrayOfByte[(k + 2)] = ((byte)i); arrayOfByte[(k + 1)] = ((byte)(i >> 8)); arrayOfByte[k] = ((byte)(i >> 16)); j = k + 3; paramInt2 = 0; break; } if (i == -2) { arrayOfByte[(k + 1)] = ((byte)(m >> 2)); arrayOfByte[k] = ((byte)(m >> 10)); j = k + 2; paramInt2 = 5; i = m; break; } } while (i == -1); this.state = 6; return false; if (i == -2) { paramInt2 += 1; j = k; i = m; break; } } while (i == -1); this.state = 6; return false; } while (i == -1); this.state = 6; return false; } switch (paramInt2) { default: paramInt1 = i; case 0: case 1: case 2: case 3: for (;;) { this.state = paramInt2; this.op = paramInt1; return true; paramInt1 = i; continue; this.state = 6; return false; j = i + 1; arrayOfByte[i] = ((byte)(paramInt1 >> 4)); paramInt1 = j; continue; j = i + 1; arrayOfByte[i] = ((byte)(paramInt1 >> 10)); arrayOfByte[j] = ((byte)(paramInt1 >> 2)); paramInt1 = j + 1; } } this.state = 6; return false; } } static class Encoder extends Base64.Coder { private static final byte[] ENCODE; private static final byte[] ENCODE_WEBSAFE; public static final int LINE_GROUPS = 19; private final byte[] alphabet; private int count; public final boolean do_cr; public final boolean do_newline; public final boolean do_padding; private final byte[] tail; int tailLen; static { if (!Base64.class.desiredAssertionStatus()) {} for (boolean bool = true;; bool = false) { $assertionsDisabled = bool; ENCODE = new byte[] { 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 43, 47 }; ENCODE_WEBSAFE = new byte[] { 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 45, 95 }; return; } } public Encoder(int paramInt, byte[] paramArrayOfByte) { this.output = paramArrayOfByte; boolean bool1; if ((paramInt & 0x1) == 0) { bool1 = true; this.do_padding = bool1; if ((paramInt & 0x2) != 0) { break label101; } bool1 = true; label33: this.do_newline = bool1; if ((paramInt & 0x4) == 0) { break label106; } bool1 = bool2; label47: this.do_cr = bool1; if ((paramInt & 0x8) != 0) { break label111; } paramArrayOfByte = ENCODE; label63: this.alphabet = paramArrayOfByte; this.tail = new byte[2]; this.tailLen = 0; if (!this.do_newline) { break label118; } } label101: label106: label111: label118: for (paramInt = 19;; paramInt = -1) { this.count = paramInt; return; bool1 = false; break; bool1 = false; break label33; bool1 = false; break label47; paramArrayOfByte = ENCODE_WEBSAFE; break label63; } } public int maxOutputSize(int paramInt) { return paramInt * 8 / 5 + 10; } public boolean process(byte[] paramArrayOfByte, int paramInt1, int paramInt2, boolean paramBoolean) { byte[] arrayOfByte1 = this.alphabet; byte[] arrayOfByte2 = this.output; int k = 0; int n = this.count; int i = paramInt1; int i1 = paramInt2 + paramInt1; paramInt2 = -1; paramInt1 = i; int j = paramInt2; int m; switch (this.tailLen) { default: j = paramInt2; paramInt1 = i; case 0: paramInt2 = n; i = k; k = paramInt1; if (j != -1) { i = 0 + 1; arrayOfByte2[0] = arrayOfByte1[(j >> 18 & 0x3F)]; paramInt2 = i + 1; arrayOfByte2[i] = arrayOfByte1[(j >> 12 & 0x3F)]; i = paramInt2 + 1; arrayOfByte2[paramInt2] = arrayOfByte1[(j >> 6 & 0x3F)]; m = i + 1; arrayOfByte2[i] = arrayOfByte1[(j & 0x3F)]; j = n - 1; paramInt2 = j; i = m; k = paramInt1; if (j == 0) { paramInt2 = m; if (this.do_cr) { arrayOfByte2[m] = 13; paramInt2 = m + 1; } i = paramInt2 + 1; arrayOfByte2[paramInt2] = 10; j = 19; paramInt2 = paramInt1; paramInt1 = i; i = j; } } break; } for (;;) { label237: if (paramInt2 + 3 > i1) { if (!paramBoolean) { break label1118; } if (paramInt2 - this.tailLen != i1 - 1) { break label773; } j = 0; if (this.tailLen <= 0) { break label757; } k = this.tail[0]; j = 0 + 1; } for (;;) { k = (k & 0xFF) << 4; this.tailLen -= j; j = paramInt1 + 1; arrayOfByte2[paramInt1] = arrayOfByte1[(k >> 6 & 0x3F)]; paramInt1 = j + 1; arrayOfByte2[j] = arrayOfByte1[(k & 0x3F)]; j = paramInt1; if (this.do_padding) { k = paramInt1 + 1; arrayOfByte2[paramInt1] = 61; j = k + 1; arrayOfByte2[k] = 61; } paramInt1 = j; k = paramInt2; if (this.do_newline) { paramInt1 = j; if (this.do_cr) { arrayOfByte2[j] = 13; paramInt1 = j + 1; } arrayOfByte2[paramInt1] = 10; paramInt1 += 1; k = paramInt2; } if (($assertionsDisabled) || (this.tailLen == 0)) { break label1093; } throw new AssertionError(); paramInt1 = i; j = paramInt2; if (i + 2 > i1) { break; } paramInt2 = this.tail[0]; j = i + 1; i = paramArrayOfByte[i]; paramInt1 = j + 1; j = (paramInt2 & 0xFF) << 16 | (i & 0xFF) << 8 | paramArrayOfByte[j] & 0xFF; this.tailLen = 0; break; paramInt1 = i; j = paramInt2; if (i + 1 > i1) { break; } j = (this.tail[0] & 0xFF) << 16 | (this.tail[1] & 0xFF) << 8 | paramArrayOfByte[i] & 0xFF; this.tailLen = 0; paramInt1 = i + 1; break; j = (paramArrayOfByte[paramInt2] & 0xFF) << 16 | (paramArrayOfByte[(paramInt2 + 1)] & 0xFF) << 8 | paramArrayOfByte[(paramInt2 + 2)] & 0xFF; arrayOfByte2[paramInt1] = arrayOfByte1[(j >> 18 & 0x3F)]; arrayOfByte2[(paramInt1 + 1)] = arrayOfByte1[(j >> 12 & 0x3F)]; arrayOfByte2[(paramInt1 + 2)] = arrayOfByte1[(j >> 6 & 0x3F)]; arrayOfByte2[(paramInt1 + 3)] = arrayOfByte1[(j & 0x3F)]; j = paramInt2 + 3; paramInt1 += 4; m = i - 1; paramInt2 = m; i = paramInt1; k = j; if (m != 0) { break label1243; } paramInt2 = paramInt1; if (this.do_cr) { arrayOfByte2[paramInt1] = 13; paramInt2 = paramInt1 + 1; } paramInt1 = paramInt2 + 1; arrayOfByte2[paramInt2] = 10; i = 19; paramInt2 = j; break label237; label757: m = paramInt2 + 1; k = paramArrayOfByte[paramInt2]; paramInt2 = m; } label773: if (paramInt2 - this.tailLen == i1 - 2) { k = 0; if (this.tailLen > 1) { k = this.tail[0]; m = 0 + 1; j = paramInt2; paramInt2 = m; label816: if (this.tailLen <= 0) { break label1010; } m = this.tail[paramInt2]; paramInt2 += 1; } for (;;) { k = (k & 0xFF) << 10 | (m & 0xFF) << 2; this.tailLen -= paramInt2; paramInt2 = paramInt1 + 1; arrayOfByte2[paramInt1] = arrayOfByte1[(k >> 12 & 0x3F)]; m = paramInt2 + 1; arrayOfByte2[paramInt2] = arrayOfByte1[(k >> 6 & 0x3F)]; paramInt1 = m + 1; arrayOfByte2[m] = arrayOfByte1[(k & 0x3F)]; paramInt2 = paramInt1; if (this.do_padding) { arrayOfByte2[paramInt1] = 61; paramInt2 = paramInt1 + 1; } paramInt1 = paramInt2; k = j; if (!this.do_newline) { break; } paramInt1 = paramInt2; if (this.do_cr) { arrayOfByte2[paramInt2] = 13; paramInt1 = paramInt2 + 1; } arrayOfByte2[paramInt1] = 10; paramInt1 += 1; k = j; break; j = paramInt2 + 1; m = paramArrayOfByte[paramInt2]; paramInt2 = k; k = m; break label816; label1010: m = paramArrayOfByte[j]; j += 1; } } j = paramInt1; if (this.do_newline) { j = paramInt1; if (paramInt1 > 0) { j = paramInt1; if (i != 19) { if (!this.do_cr) { break label1240; } j = paramInt1 + 1; arrayOfByte2[paramInt1] = 13; paramInt1 = j; } } } label1093: label1118: label1169: label1240: for (;;) { j = paramInt1 + 1; arrayOfByte2[paramInt1] = 10; paramInt1 = j; k = paramInt2; break; paramInt2 = paramInt1; if (!$assertionsDisabled) { paramInt2 = paramInt1; if (k != i1) { throw new AssertionError(); if (paramInt2 != i1 - 1) { break label1169; } arrayOfByte1 = this.tail; j = this.tailLen; this.tailLen = (j + 1); arrayOfByte1[j] = paramArrayOfByte[paramInt2]; } } for (paramInt2 = paramInt1;; paramInt2 = paramInt1) { this.op = paramInt2; this.count = i; return true; if (paramInt2 == i1 - 2) { arrayOfByte1 = this.tail; j = this.tailLen; this.tailLen = (j + 1); arrayOfByte1[j] = paramArrayOfByte[paramInt2]; arrayOfByte1 = this.tail; j = this.tailLen; this.tailLen = (j + 1); arrayOfByte1[j] = paramArrayOfByte[(paramInt2 + 1)]; } } } label1243: paramInt1 = i; i = paramInt2; paramInt2 = k; } } } }
[ "antal.micky@yahoo.com" ]
antal.micky@yahoo.com
17104af4cc612e3ee25e30940878ad545111c1a3
19156214d3c456e7aa9b34183a928ef144b3c206
/src/test-suite-dependencies/geotk-xml-gml-3.21-sources/src/main/java/org/geotoolkit/gml/xml/v321/SurfacePatchArrayPropertyType.java
aa34e7951c60abc0b4c120c2fc12f9090152d49c
[]
no_license
opengeospatial/teamengine-offline
85549dbab9ff681c4f6b09dfabce1e4b85ce4206
6b81fc3fc4647e8f68ba433701199b0e68fc36d2
refs/heads/master
2021-01-01T19:24:08.817030
2014-12-18T17:35:06
2014-12-18T17:35:06
21,212,109
0
0
null
null
null
null
UTF-8
Java
false
false
3,653
java
/* * Geotoolkit - An Open Source Java GIS Toolkit * http://www.geotoolkit.org * * (C) 2008 - 2012, Geomatys * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ package org.geotoolkit.gml.xml.v321; import java.util.ArrayList; import java.util.List; import javax.xml.bind.JAXBElement; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElementRef; import javax.xml.bind.annotation.XmlType; /** * gml:SurfacePatchArrayPropertyType is a container for a sequence of surface patches. * * <p>Java class for SurfacePatchArrayPropertyType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="SurfacePatchArrayPropertyType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence maxOccurs="unbounded" minOccurs="0"> * &lt;element ref="{http://www.opengis.net/gml/3.2}AbstractSurfacePatch"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "SurfacePatchArrayPropertyType", propOrder = { "abstractSurfacePatch" }) public class SurfacePatchArrayPropertyType { @XmlElementRef(name = "AbstractSurfacePatch", namespace = "http://www.opengis.net/gml/3.2", type = JAXBElement.class) private List<JAXBElement<? extends AbstractSurfacePatchType>> abstractSurfacePatch; /** * Gets the value of the abstractSurfacePatch property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the abstractSurfacePatch property. * * <p> * For example, to add a new item, do as follows: * <pre> * getAbstractSurfacePatch().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link JAXBElement }{@code <}{@link AbstractParametricCurveSurfaceType }{@code >} * {@link JAXBElement }{@code <}{@link PolygonPatchType }{@code >} * {@link JAXBElement }{@code <}{@link SphereType }{@code >} * {@link JAXBElement }{@code <}{@link ConeType }{@code >} * {@link JAXBElement }{@code <}{@link RectangleType }{@code >} * {@link JAXBElement }{@code <}{@link TriangleType }{@code >} * {@link JAXBElement }{@code <}{@link CylinderType }{@code >} * {@link JAXBElement }{@code <}{@link AbstractSurfacePatchType }{@code >} * {@link JAXBElement }{@code <}{@link AbstractGriddedSurfaceType }{@code >} * * */ public List<JAXBElement<? extends AbstractSurfacePatchType>> getAbstractSurfacePatch() { if (abstractSurfacePatch == null) { abstractSurfacePatch = new ArrayList<JAXBElement<? extends AbstractSurfacePatchType>>(); } return this.abstractSurfacePatch; } }
[ "rjmartell@computer.org" ]
rjmartell@computer.org
44e368494097e4dae6729ea1994e08555c0ae21e
7948db58f606697d5ac2d3c5c4750e4699d14c81
/src/main/java/attractions/RollerCoaster.java
d87269958b728c8086a93ca7217574fedef94fe5
[]
no_license
geczirebeka/w12_d1_themepark_hw
ec5a7e27ca8fde51fd486e6ecb5eb7e4723d1ba2
33c9b2bcaf1f42797eeecbc0232323bfa039e0a0
refs/heads/master
2022-12-05T06:49:30.309270
2020-09-01T07:27:40
2020-09-01T07:27:40
291,927,654
0
0
null
null
null
null
UTF-8
Java
false
false
680
java
package attractions; import behaviours.ISecurity; import behaviours.ITicketed; import people.Visitor; import java.util.stream.IntStream; public class RollerCoaster extends Attraction implements ISecurity, ITicketed { public RollerCoaster(String name, int rating) { super(name, rating); } public boolean isAllowedTo(Visitor visitor) { return visitor.getHeight() >= 145 && visitor.getAge() >= 12; } public double defaultPrice() { return 8.40; } public double priceFor(Visitor visitor) { if (visitor.getHeight() > 2.00) { return defaultPrice() * 2; } else return defaultPrice(); } }
[ "geczirebeka@gmail.com" ]
geczirebeka@gmail.com
b7c243f0861ab748a56a5f61ca97c42ea4129870
2ec51ec7a480bc82217ba067b055a932f3f9736a
/src/com/yale/test/springmvc/i18n/web/MvcInterceptor.java
9d3eea3ee082defc90b1adccd5195e088a9ba949
[]
no_license
gitking/JavaDemoStudyProject
03eae3ced81d81330a96d4f87a29c5d11db63686
072b2155a2da92d59168a6b73ae4ad045d9d28c0
refs/heads/master
2022-05-20T14:24:57.408102
2022-03-27T13:45:03
2022-03-27T13:45:03
100,861,539
0
0
null
null
null
null
UTF-8
Java
false
false
1,363
java
package com.yale.test.springmvc.i18n.web; import java.util.Locale; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.MessageSource; import org.springframework.stereotype.Component; import org.springframework.web.servlet.HandlerInterceptor; import org.springframework.web.servlet.LocaleResolver; import org.springframework.web.servlet.ModelAndView; /* * 不要忘了在WebMvcConfigurer中注册MvcInterceptor。现在,就可以在View中调用MessageSource.getMessage()方法来实现多语言: */ @Component public class MvcInterceptor implements HandlerInterceptor{ @Autowired LocaleResolver localeResolver; @Autowired @Qualifier("i18n")// 注意注入的MessageSource名称是i18n: MessageSource messageSource; @Override public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception { if (modelAndView != null) { // 解析用户的Locale: Locale locale = localeResolver.resolveLocale(request); // 放入Model: modelAndView.addObject("__messageSource__", messageSource); modelAndView.addObject("__locale__", locale); } } }
[ "yale268sh@163.com" ]
yale268sh@163.com
ed3be7e2a8870f094563b3df3ac208044c13ea15
7b7ef39a3b79dc7b9a464e49c6b7e10c812cc745
/swagger-butler-eureka-client/src/main/java/com/didispace/ueditor/upload/Uploader.java
9c619e94a27ad01c8e3ba72e69461c44a3769bdd
[ "Apache-2.0" ]
permissive
a937557708/didispace-swagger-butler
bb5619d4b69a4f4cade3a2c1f23e35645cfc95de
3019af4fe5e8321f55e5a4a819613593fb433ce0
refs/heads/master
2023-03-06T21:33:19.289503
2019-12-06T23:36:03
2019-12-06T23:36:03
230,693,023
0
1
Apache-2.0
2023-02-22T07:39:17
2019-12-29T02:31:39
Java
UTF-8
Java
false
false
729
java
package com.didispace.ueditor.upload; import java.util.Map; import javax.servlet.http.HttpServletRequest; import com.didispace.ueditor.define.State; public class Uploader { private HttpServletRequest request = null; private Map<String, Object> conf = null; public Uploader(HttpServletRequest request, Map<String, Object> conf) { this.request = request; this.conf = conf; } public final State doExec() { String filedName = (String) this.conf.get("fieldName"); State state = null; if ("true".equals(this.conf.get("isBase64"))) { state = Base64Uploader.save(this.request.getParameter(filedName), this.conf); } else { state = BinaryUploader.save(this.request, this.conf); } return state; } }
[ "937557708@qq.com" ]
937557708@qq.com
eaa6a473c05a1ecca52a04c867d12214a39f27b4
72e25b63b14e35924c4208ceb863c3a95fffdc8e
/demo11/demo/src/main/java/com/cloudfoundry/demo/Controlller/UserController.java
d989db1675e5f529cc94cbede965a36c66c963e7
[]
no_license
futurefuturehx/Py3
18734b1180e3aae70ca29618a58e2a0e344c3631
0355920699f598b20f829b322da210d67028424f
refs/heads/master
2022-12-23T08:32:12.001094
2019-06-15T14:27:25
2019-06-15T14:27:25
179,222,529
0
0
null
null
null
null
UTF-8
Java
false
false
3,749
java
package com.cloudfoundry.demo.Controlller; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Random; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.repository.CrudRepository; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; import com.cloudfoundry.demo.bean.User; @Controller public class UserController { private CrudRepository<User, String> repository; @Autowired public UserController(CrudRepository<User, String> repository) { this.repository = repository; } @RequestMapping("/login") public String login() { return "relogin"; } @RequestMapping("/register") public String register() { return "register"; } // @RequestMapping("/saveSuccess") // public ModelAndView save(String username, String password) { // ModelAndView mav = new ModelAndView(); // User u = userService.getByUsername(username); // String msg=null; // if(u!=null) { // mav.setViewName("register"); // msg="用户已存在"; // mav.addObject("msg",msg); // return mav; // } // User user = new User(); // user.setUsername(username); // user.setPassword(password); // userService.save(user); // mav.setViewName("login"); // return mav; // } @RequestMapping("/modify") public String modify(Map<String, Object> map) { return "modify"; } // @RequestMapping("/modifySuccess") // public ModelAndView modifySuccess(String username, String OriginalPassword, String password) { // ModelAndView mav = new ModelAndView(); // User user = userService.getByUsername(username); // String msg = null; // if (user == null) { // msg = "用户不存在"; // } else { // String password1 = user.getPassword(); // if (!password1.equals(OriginalPassword)) { // msg = "用户密码错误"; // } else { // user.setPassword(password); // userService.modify(user); // mav.setViewName("login"); // return mav; // } // } // mav.setViewName("modify"); // mav.addObject("msg", msg); // return mav; // } @RequestMapping("/loginCheck1") public String show(Map<String, Object> map) { Random rd = new Random(); int CPU_Usage = rd.nextInt(100); int Memory_Usage = rd.nextInt(100); int Network_Speed = rd.nextInt(100); map.put("CPU_Usage", CPU_Usage); map.put("Memory_Usage", Memory_Usage); map.put("Network_Speed", Network_Speed); return "show"; } @RequestMapping("/loginCheck") public ModelAndView updates(String username, String password) { String msg = null; ModelAndView mav = new ModelAndView(); System.out.println("0000"); Iterable<User> users = repository.findAll(); System.out.println("00000000000"); int falg=1; for (User user : users) { if(user.getUsername().equals(username)&&user.getPassword().equals(password)) { Map<String, Integer> map = new HashMap<>(); Random rd = new Random(); int CPU_Usage = rd.nextInt(100); int Memory_Usage = rd.nextInt(100); int Network_Speed = rd.nextInt(100); map.put("CPU_Usage", CPU_Usage); map.put("Memory_Usage", Memory_Usage); map.put("Network_Speed", Network_Speed); mav.addObject("map", map); mav.setViewName("show"); System.out.println("111"); return mav; } if(user.getUsername().equals(username)&&!user.getPassword().equals(password)) { msg = "密码错误"; falg=0; System.out.println("222"); } } if (falg == 1) { msg = "用户不存在"; System.out.println("ss"); } mav.addObject("msg", msg); mav.setViewName("relogin"); return mav; } @RequestMapping("/test") public String test(){ return "index"; } }
[ "xuhe02@zjft.com" ]
xuhe02@zjft.com
5204914e895f8acf14b86b580f53872e02930880
f785d1c8fc28db7efb48757cf2a996b293253bb2
/src/main/java/ThMod_FnH/cards/Marisa/PropBag.java
4d57ff7e4efc4c890e0e8ff259baddb954108aa6
[]
no_license
Skrelpoid/STS_ThMod_MRS
1cbff7841aff6e5a6149a30848124e6fa963032a
1b0758f8cf9f796cd83ee859caac20860f1f3a18
refs/heads/master
2020-03-30T07:41:14.530435
2018-09-27T09:47:04
2018-09-27T09:47:04
150,958,758
0
0
null
2018-09-30T10:48:51
2018-09-30T10:48:50
null
UTF-8
Java
false
false
1,669
java
package ThMod_FnH.cards.Marisa; import com.megacrit.cardcrawl.cards.AbstractCard; import com.megacrit.cardcrawl.characters.AbstractPlayer; import com.megacrit.cardcrawl.core.CardCrawlGame; import com.megacrit.cardcrawl.dungeons.AbstractDungeon; import com.megacrit.cardcrawl.localization.CardStrings; import com.megacrit.cardcrawl.monsters.AbstractMonster; import ThMod_FnH.action.PropBagAction; import ThMod_FnH.patches.AbstractCardEnum; import basemod.abstracts.CustomCard; public class PropBag extends CustomCard { public static final String ID = "PropBag"; public static final String IMG_PATH = "img/cards/PropBag.png"; private static final CardStrings cardStrings = CardCrawlGame.languagePack.getCardStrings(ID); public static final String NAME = cardStrings.NAME; public static final String DESCRIPTION = cardStrings.DESCRIPTION; public static final String DESCRIPTION_UPG = cardStrings.UPGRADE_DESCRIPTION; private static final int COST = 0; public PropBag() { super( ID, NAME, IMG_PATH, COST, DESCRIPTION, AbstractCard.CardType.SKILL, AbstractCardEnum.MARISA_COLOR, AbstractCard.CardRarity.UNCOMMON, AbstractCard.CardTarget.SELF ); this.exhaust = true; } public void use(AbstractPlayer p, AbstractMonster m) { AbstractDungeon.actionManager.addToBottom( new PropBagAction() ); } public AbstractCard makeCopy() { return new PropBag(); } public void upgrade() { if (!this.upgraded) { upgradeName(); this.isInnate = true; this.rawDescription = DESCRIPTION_UPG; initializeDescription(); } } }
[ "lf201014@163.com" ]
lf201014@163.com
7b8d07a401b13be0264a72437a402f6675a25cdf
ccd657c4f3179d85ffa72a492647fe5932ba4756
/JPA/ResumeWeb/src/main/java/com/mycompany/resume/controller/UserSkillController.java
9112f21c0bc8ff011e51bf071ef5c4de84b6cc41
[]
no_license
movsummammadov/Resume
1d9c6f1121d0b93e78ea706ea7b7368282bfbc7b
4dd76b55f9e9677bfbea941edd78e914d14a83ff
refs/heads/master
2022-11-12T16:19:50.646497
2020-07-06T17:23:51
2020-07-06T17:23:51
248,462,237
0
0
null
null
null
null
UTF-8
Java
false
false
1,168
java
package com.mycompany.resume.controller; import com.mycompany.dao.inter.SkillDaoInter; import com.mycompany.dao.inter.UserDaoInter; import com.mycompany.dao.inter.UserSkillDaoInter; import com.mycompany.main.Context; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.IOException; /** * * @author Movsum Mammadov * */ @WebServlet(name = "UserSkillController", urlPatterns = {"/userskill"}) public class UserSkillController extends HttpServlet { private UserSkillDaoInter userSkillDao= Context.instanceUserSkillDao(); private SkillDaoInter skillDao=Context.instanceSkillDao(); @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { request.getRequestDispatcher("userskill.jsp").forward(request,response); } @Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } }
[ "movsum617@gmail.com" ]
movsum617@gmail.com
dd3c8deec1da7d8c0def3557405de678d14916d7
914eaed607cc6d80c6d6047dd79f07284db69a92
/src/main/java/com/jsmile/springboot/jpajtatx/service/TxEmployeeServiceImpl.java
e539513f2d342814545749cec1e79640ed66118c
[]
no_license
jsmile/jpa-jta-tx
23b3c08886dac07219ff81848e976976835b12e0
89c80f123305afcc1830b2d923dbf790b4a39c2e
refs/heads/master
2021-05-27T10:29:53.847913
2020-04-14T13:42:38
2020-04-14T13:42:38
254,253,958
0
0
null
null
null
null
UTF-8
Java
false
false
2,007
java
package com.jsmile.springboot.jpajtatx.service; import java.util.List; import java.util.Optional; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import com.jsmile.springboot.jpajtatx.entity.Employee; import lombok.extern.slf4j.Slf4j; @Slf4j @Service public class TxEmployeeServiceImpl implements TxEmployeeService { @Autowired private EmployeeMariadbService employeeMariadbService; @Autowired private EmployeeMysqlService employeeMysqlService; @Autowired private EmployeeOracleService employeeOracleService; @Override @Transactional( readOnly = true, propagation = Propagation.REQUIRED, transactionManager = "multiTxManager" ) public List<Employee> findAll() { return employeeMariadbService.findAll(); } @Override @Transactional( readOnly = true, propagation = Propagation.REQUIRED, transactionManager = "multiTxManager" ) public Employee findById( int theId ) { Employee result = employeeMariadbService.findById( theId ); Employee theEmployee = null; if ( result != null ) { theEmployee = result; } else { // we didn't find the employee throw new RuntimeException( "Did not find employee id - " + theId ); } return theEmployee; } @Override @Transactional( readOnly = false, propagation = Propagation.REQUIRED, transactionManager = "multiTxManager" ) public void save( Employee theEmployee ) throws RuntimeException { employeeMariadbService.save( theEmployee ); employeeMysqlService.save( theEmployee ); employeeOracleService.save( theEmployee ); } @Override @Transactional( readOnly = false, propagation = Propagation.REQUIRED, transactionManager = "multiTxManager" ) public void deleteById( int theId ) { employeeMariadbService.deleteById( theId ); employeeMysqlService.deleteById( theId ); employeeOracleService.deleteById( theId ); } }
[ "jsmile@naver.com" ]
jsmile@naver.com
4d5f930e16c49edb2ed2178b64734f65f3772e57
4a5f24baf286458ddde8658420faf899eb22634b
/aws-java-sdk-waf/src/main/java/com/amazonaws/services/waf/model/waf/transform/UpdateRegexPatternSetRequestMarshaller.java
1404d297f17c3c47268113ef68438f8012cf3599
[ "Apache-2.0" ]
permissive
gopinathrsv/aws-sdk-java
c2876eaf019ac00714724002d91d18fadc4b4a60
97b63ab51f2e850d22e545154e40a33601790278
refs/heads/master
2021-05-14T17:18:16.335069
2017-12-29T19:49:30
2017-12-29T19:49:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,762
java
/* * Copyright 2012-2017 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.waf.model.waf.transform; import java.util.List; import javax.annotation.Generated; import com.amazonaws.SdkClientException; import com.amazonaws.services.waf.model.*; import com.amazonaws.protocol.*; import com.amazonaws.annotation.SdkInternalApi; /** * UpdateRegexPatternSetRequestMarshaller */ @Generated("com.amazonaws:aws-java-sdk-code-generator") @SdkInternalApi public class UpdateRegexPatternSetRequestMarshaller { private static final MarshallingInfo<String> REGEXPATTERNSETID_BINDING = MarshallingInfo.builder(MarshallingType.STRING) .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("RegexPatternSetId").build(); private static final MarshallingInfo<List> UPDATES_BINDING = MarshallingInfo.builder(MarshallingType.LIST).marshallLocation(MarshallLocation.PAYLOAD) .marshallLocationName("Updates").build(); private static final MarshallingInfo<String> CHANGETOKEN_BINDING = MarshallingInfo.builder(MarshallingType.STRING) .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("ChangeToken").build(); private static final UpdateRegexPatternSetRequestMarshaller instance = new UpdateRegexPatternSetRequestMarshaller(); public static UpdateRegexPatternSetRequestMarshaller getInstance() { return instance; } /** * Marshall the given parameter object. */ public void marshall(UpdateRegexPatternSetRequest updateRegexPatternSetRequest, ProtocolMarshaller protocolMarshaller) { if (updateRegexPatternSetRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(updateRegexPatternSetRequest.getRegexPatternSetId(), REGEXPATTERNSETID_BINDING); protocolMarshaller.marshall(updateRegexPatternSetRequest.getUpdates(), UPDATES_BINDING); protocolMarshaller.marshall(updateRegexPatternSetRequest.getChangeToken(), CHANGETOKEN_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } } }
[ "" ]
3a9d207eab9f7a7cfe279061cba4c02b903f11f0
b2b21651c670ccaf7937c3fd7853e052f4ee273b
/src/com/enrutatemio/fragmentos/Tab3.java
ce78901aefbdab07cc2f364cdebc932a3b30b8a0
[]
no_license
bssandroid/enrutate
c53b4bfdd0dbe0015ac1d6db5307eb5b7ae4217a
c03433fcc19b72100116896f6b395aca10f3ccdd
refs/heads/master
2020-04-15T04:53:45.557160
2015-07-16T13:15:39
2015-07-16T13:15:39
39,197,641
0
1
null
null
null
null
UTF-8
Java
false
false
3,322
java
package com.enrutatemio.fragmentos; import android.content.Intent; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.Toast; import com.actionbarsherlock.app.SherlockFragment; import com.actionbarsherlock.view.Menu; import com.actionbarsherlock.view.MenuInflater; import com.enrutatemio.R; import com.enrutatemio.actividades.WebViewClientDemoActivity; import com.enrutatemio.util.ConnectionDetector; public class Tab3 extends SherlockFragment { public ImageView metrocali ; public ImageView transito ; public final static String TWITTER_TRANSITO = "https://twitter.com/MOVILIDADCALI"; public final static String TWITTER_METROCALI = "https://twitter.com/METROCALI"; public Tab3() { // TODO Auto-generated constructor stub setHasOptionsMenu(true); } public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { super.onCreateView(inflater, container, savedInstanceState); // create your view using LayoutInflater return inflater.inflate(R.layout.tweets, container, false); } public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // setRetainInstance(true); // do your variables initialisations here except Views!!! } public void onViewCreated(View view, Bundle savedInstanceState){ super.onViewCreated(view, savedInstanceState); metrocali = (ImageView) view.findViewById(R.id.metrocali); transito = (ImageView) view.findViewById(R.id.transito); transito.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if(ConnectionDetector.isConnectingToInternet(getActivity())) { Intent intent = new Intent(getActivity(), WebViewClientDemoActivity.class); intent.putExtra("url", TWITTER_TRANSITO); intent.putExtra("titulo","Tweets Transito"); startActivity(intent); } else Toast.makeText(getActivity(), R.string.acceso_internet, Toast.LENGTH_SHORT).show(); } }); metrocali.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if(ConnectionDetector.isConnectingToInternet(getActivity())) { Intent intent = new Intent(getActivity(), WebViewClientDemoActivity.class); intent.putExtra("url", TWITTER_METROCALI); intent.putExtra("titulo","Tweets Metrocali"); startActivity(intent); } else Toast.makeText(getActivity(), R.string.acceso_internet, Toast.LENGTH_SHORT).show(); } }); } @Override public void onResume() { super.onResume(); } @Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { menu.findItem(R.id.position).setVisible(false); menu.findItem(12).setVisible(false); menu.findItem(R.id.drawStations).setVisible(false); super.onCreateOptionsMenu(menu, inflater); } }
[ "juanmabb8@gmail.com" ]
juanmabb8@gmail.com
b7e516822177435122ac194454c3ab41c554c4ab
31b0ff01f107d8769d7a4667c8698a2eb74b04ae
/Programmers/Level2/src/행렬의곱셈.java
c0d5c00fd3ec66ba18f3e1cdbb860435b04de905
[]
no_license
dodamtanguri/Web-programmer
9953c642ed8c699842ad82973c438ccd637245cc
f0a93bf7cf984a7e7f853689ce3fecb6fff860a7
refs/heads/main
2023-08-29T17:38:43.943617
2021-11-14T08:07:31
2021-11-14T08:07:31
318,128,305
0
0
null
null
null
null
UTF-8
Java
false
false
749
java
import java.util.Arrays; public class 행렬의곱셈 { public static void main(String[] args) { 행렬의곱셈 test = new 행렬의곱셈(); int[][] arr1 = {{1, 4}, {3, 2}, {4, 1}}; int[][] arr2 = {{3, 3}, {3, 3}}; System.out.println(Arrays.deepToString(test.solution(arr1, arr2))); } public int[][] solution(int[][] arr1, int[][] arr2) { int[][] answer = new int[arr1.length][arr2[0].length]; for (int i = 0; i < arr1.length; i++) { for (int j = 0; j < arr2[0].length; j++) { for (int n = 0; n < arr1[0].length; n++) { answer[i][j] += arr1[i][n] * arr2[n][j]; } } } return answer; } }
[ "sh663746@gmail.com" ]
sh663746@gmail.com
75ac8a50321448573d7bf286b703cf228b6e8beb
8764eeb467a34a22e45902bfc0b8922f27a15f24
/media/common/src/main/java/io/helidon/media/common/MessageBodyContext.java
984937fe4c78481cba08d2df8bca65a1380af783
[ "Apache-2.0", "LicenseRef-scancode-unicode", "LGPL-3.0-only", "LicenseRef-scancode-warranty-disclaimer", "CC0-1.0", "GPL-3.0-only", "LicenseRef-scancode-protobuf", "LGPL-2.0-or-later", "BSD-3-Clause", "LicenseRef-scancode-unknown-license-reference", "EPL-1.0", "Classpath-exception-2.0", "Lic...
permissive
aseovic/helidon
36c43b9cf217a05c8ffa22e21a0e4d17a887acbb
895695a902b4b843b61afa5e80c8280cec468946
refs/heads/master
2021-06-10T10:50:49.807748
2021-04-26T17:13:43
2021-04-26T17:23:44
168,202,967
0
4
Apache-2.0
2019-09-11T10:18:40
2019-01-29T18:07:33
Java
UTF-8
Java
false
false
14,108
java
/* * Copyright (c) 2020 Oracle and/or its affiliates. * * 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 io.helidon.media.common; import java.nio.charset.Charset; import java.util.Objects; import java.util.Optional; import java.util.concurrent.Flow.Publisher; import java.util.concurrent.Flow.Subscriber; import java.util.concurrent.Flow.Subscription; import java.util.logging.Level; import java.util.logging.Logger; import io.helidon.common.GenericType; import io.helidon.common.http.DataChunk; import io.helidon.common.reactive.Single; /** * Base message body context implementation. */ public abstract class MessageBodyContext implements MessageBodyFilters { /** * Logger. */ private static final Logger LOGGER = Logger.getLogger(MessageBodyContext.class.getName()); /** * Message body content subscription event listener. */ public interface EventListener { /** * Handle a subscription event. * @param event subscription event */ void onEvent(Event event); } /** * Message body content subscription event types. */ public enum EventType { /** * Emitted before {@link Subscriber#onSubscribe(Subscription)}. */ BEFORE_ONSUBSCRIBE, /** * Emitted after {@link Subscriber#onSubscribe(Subscription)}. */ AFTER_ONSUBSCRIBE, /** * Emitted before {@link Subscriber#onNext(Object)}. */ BEFORE_ONNEXT, /** * Emitted after {@link Subscriber#onNext(Object)}. */ AFTER_ONNEXT, /** * Emitted before {@link Subscriber#onError(Throwable)}. */ BEFORE_ONERROR, /** * Emitted after {@link Subscriber#onError(Throwable)}. */ AFTER_ONERROR, /** * Emitted after {@link Subscriber#onComplete()}. */ BEFORE_ONCOMPLETE, /** * Emitted after {@link Subscriber#onComplete()}. */ AFTER_ONCOMPLETE } /** * Message body content subscription event contract. */ public interface Event { /** * Get the event type of this event. * @return EVENT_TYPE */ EventType eventType(); /** * Get the type requested for conversion. * @return never {@code null} */ Optional<GenericType<?>> entityType(); /** * Fluent helper method to cast this event as a {@link ErrorEvent}. This * is safe to do when {@link #eventType()} returns * {@link EventType#BEFORE_ONERROR} or {@link EventType#AFTER_ONERROR} * * @return ErrorEvent * @throws IllegalStateException if this event is not an instance of * {@link ErrorEvent} */ default ErrorEvent asErrorEvent() { if (!(this instanceof ErrorEvent)) { throw new IllegalStateException("Not an error event"); } return (ErrorEvent) this; } } /** * A subscription event emitted for {@link EventType#BEFORE_ONERROR} or * {@link EventType#AFTER_ONERROR} that carries the received error. */ public interface ErrorEvent extends Event { /** * Get the subscription error of this event. * @return {@code Throwable}, never {@code null} */ Throwable error(); } /** * Singleton event for {@link EventType#BEFORE_ONSUBSCRIBE}. */ private static final Event BEFORE_ONSUBSCRIBE = new EventImpl(EventType.BEFORE_ONSUBSCRIBE, Optional.empty()); /** * Singleton event for {@link EventType#BEFORE_ONNEXT}. */ private static final Event BEFORE_ONNEXT = new EventImpl(EventType.BEFORE_ONNEXT, Optional.empty()); /** * Singleton event for {@link EventType#BEFORE_ONCOMPLETE}. */ private static final Event BEFORE_ONCOMPLETE = new EventImpl(EventType.BEFORE_ONCOMPLETE, Optional.empty()); /** * Singleton event for {@link EventType#AFTER_ONSUBSCRIBE}. */ private static final Event AFTER_ONSUBSCRIBE = new EventImpl(EventType.AFTER_ONSUBSCRIBE, Optional.empty()); /** * Singleton event for {@link EventType#AFTER_ONNEXT}. */ private static final Event AFTER_ONNEXT = new EventImpl(EventType.AFTER_ONNEXT, Optional.empty()); /** * Singleton event for {@link EventType#AFTER_ONCOMPLETE}. */ private static final Event AFTER_ONCOMPLETE = new EventImpl(EventType.AFTER_ONCOMPLETE, Optional.empty()); /** * The filters registry. */ private final MessageBodyOperators<FilterOperator> filters; /** * Message body content subscription event listener. */ private final EventListener eventListener; /** * Create a new parented content support instance. * @param parent content filters parent * @param eventListener event listener */ protected MessageBodyContext(MessageBodyContext parent, EventListener eventListener) { if (parent != null) { this.filters = new MessageBodyOperators<>(parent.filters); } else { this.filters = new MessageBodyOperators<>(); } this.eventListener = eventListener; } /** * Create a new parented content support instance. * * @param parent content filters parent */ protected MessageBodyContext(MessageBodyContext parent) { this(parent, parent.eventListener); } /** * Derive the charset to use from the {@code Content-Type} header value or * using a default charset as fallback. * * @return Charset, never {@code null} * @throws IllegalStateException if an error occurs loading the charset * specified by the {@code Content-Type} header value */ public abstract Charset charset() throws IllegalStateException; @Override public MessageBodyContext registerFilter(MessageBodyFilter filter) { Objects.requireNonNull(filter, "filter is null!"); filters.registerLast(new FilterOperator(filter)); return this; } /** * Apply the filters on the given input publisher to form a publisher chain. * * @param publisher input publisher * @return tail of the publisher chain */ public Publisher<DataChunk> applyFilters(Publisher<DataChunk> publisher) { return doApplyFilters(publisher, eventListener); } /** * Apply the filters on the given input publisher to form a publisher chain. * * @param publisher input publisher * @param type type information associated with the input publisher * @return tail of the publisher chain */ protected Publisher<DataChunk> applyFilters(Publisher<DataChunk> publisher, GenericType<?> type) { Objects.requireNonNull(type, "type cannot be null!"); if (eventListener != null) { return doApplyFilters(publisher, new TypedEventListener(eventListener, type)); } else { return doApplyFilters(publisher, null); } } /** * Perform the filter chaining. * * @param publisher input publisher * @param listener subscription listener * @return tail of the publisher chain */ private Publisher<DataChunk> doApplyFilters(Publisher<DataChunk> publisher, EventListener listener) { if (publisher == null) { publisher = Single.<DataChunk>empty(); } try { Publisher<DataChunk> last = publisher; for (MessageBodyFilter filter : filters) { Publisher<DataChunk> p = filter.apply(last); if (p != null) { last = p; } } return new EventingPublisher(last, listener); } finally { filters.close(); } } /** * Delegating publisher that subscribes a delegating * {@link EventingSubscriber} during {@link Publisher#subscribe }. */ private static final class EventingPublisher implements Publisher<DataChunk> { private final Publisher<DataChunk> publisher; private final EventListener listener; EventingPublisher(Publisher<DataChunk> publisher, EventListener listener) { this.publisher = publisher; this.listener = listener; } @Override public void subscribe(Subscriber<? super DataChunk> subscriber) { publisher.subscribe(new EventingSubscriber(subscriber, listener)); } } /** * Delegating subscriber that emits the events. */ private static final class EventingSubscriber implements Subscriber<DataChunk> { private final Subscriber<? super DataChunk> delegate; private final EventListener listener; EventingSubscriber(Subscriber<? super DataChunk> delegate, EventListener listener) { this.delegate = delegate; this.listener = listener; } private void fireEvent(Event event) { if (listener != null) { try { listener.onEvent(event); } catch (Throwable ex) { LOGGER.log(Level.WARNING, "An exception occurred in EventListener.onEvent", ex); } } } @Override public void onSubscribe(Subscription subscription) { fireEvent(BEFORE_ONSUBSCRIBE); try { delegate.onSubscribe(subscription); } finally { fireEvent(AFTER_ONSUBSCRIBE); } } @Override public void onNext(DataChunk item) { fireEvent(BEFORE_ONNEXT); try { delegate.onNext(item); } finally { fireEvent(AFTER_ONNEXT); } } @Override public void onError(Throwable error) { fireEvent(new ErrorEventImpl(error, EventType.BEFORE_ONERROR)); try { delegate.onError(error); } finally { fireEvent(new ErrorEventImpl(error, EventType.AFTER_ONERROR)); } } @Override public void onComplete() { fireEvent(BEFORE_ONCOMPLETE); try { delegate.onComplete(); } finally { fireEvent(AFTER_ONCOMPLETE); } } } /** * {@link MessageBodyOperator} adapter for {@link MessageBodyFilter}. */ private static final class FilterOperator implements MessageBodyOperator<MessageBodyContext>, MessageBodyFilter { private final MessageBodyFilter filter; FilterOperator(MessageBodyFilter filter) { this.filter = filter; } @Override public PredicateResult accept(GenericType<?> type, MessageBodyContext context) { return PredicateResult.SUPPORTED; } @Override public Publisher<DataChunk> apply(Publisher<DataChunk> publisher) { return filter.apply(publisher); } } /** * Delegating listener that creates copies of the emitted events to add the * entityType. */ private static final class TypedEventListener implements EventListener { private final EventListener delegate; private final Optional<GenericType<?>> entityType; TypedEventListener(EventListener delegate, GenericType<?> entityType) { this.delegate = delegate; this.entityType = Optional.of(entityType); } @Override public void onEvent(Event event) { Event copy; if (event instanceof ErrorEventImpl) { copy = new ErrorEventImpl((ErrorEventImpl) event, entityType); } else if (event instanceof EventImpl) { copy = new EventImpl((EventImpl) event, entityType); } else { throw new IllegalStateException("Unknown event type " + event); } delegate.onEvent(copy); } } /** * {@link Event} implementation. */ private static class EventImpl implements Event { private final EventType eventType; private final Optional<GenericType<?>> entityType; EventImpl(EventImpl event, Optional<GenericType<?>> entityType) { this(event.eventType, entityType); } EventImpl(EventType eventType, Optional<GenericType<?>> entityType) { this.eventType = eventType; this.entityType = entityType; } @Override public Optional<GenericType<?>> entityType() { return entityType; } @Override public EventType eventType() { return eventType; } } /** * {@link ErrorEvent} implementation. */ private static final class ErrorEventImpl extends EventImpl implements ErrorEvent { private final Throwable error; ErrorEventImpl(ErrorEventImpl event, Optional<GenericType<?>> type) { super(event.eventType(), type); error = event.error; } ErrorEventImpl(Throwable error, EventType eventType) { super(eventType, Optional.empty()); Objects.requireNonNull(error, "error cannot be null!"); this.error = error; } @Override public Throwable error() { return error; } } }
[ "noreply@github.com" ]
aseovic.noreply@github.com
4bf7f3aa5d1ead22b7010082559c5ca97bd74e00
3b4c0b02cd77341ebffb7546064924cc7d931bde
/src/main/java/com/law/category/repository/CategoryRepository.java
6a68cfd42362d4bc0128baa5baa4a6fe4db51441
[]
no_license
xsc19850920/boot-demo
acb1bb13252e5d9fb0636bbf511d821a87e2de42
29b198e28cff581e54cf680bbb1b1af287a5e6e4
refs/heads/master
2020-03-21T12:59:21.506716
2018-07-06T06:43:45
2018-07-06T06:43:45
138,581,963
0
0
null
null
null
null
UTF-8
Java
false
false
881
java
package com.law.category.repository; import java.util.List; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import com.law.category.entity.Category; public interface CategoryRepository extends JpaRepository<Category, Long> { // @Query(value=" from Category c where c.delFlag = 0 order by categoryId ,parentId") @Query(value=" from Category c where c.stateType = 1 and c.delFlag = 0 order by id ,pId") List<Category> findAcitveCategory(); @Query(value="select IFNULL(max(category_id),0) +1 from category ",nativeQuery=true) long findMaxCategoryId(); // @Query(value=" from Category c where c.stateType = 1 and pId = ?1 and c.delFlag = 0 order by id ,pId") // List<Category> findAcitveCategoryByParentId(Long id); // List<Category> findByLvlAndDelFlag(int lvl,int delFlag); }
[ "xsc19850920@163.com" ]
xsc19850920@163.com
b6f769983707eecfbd4520d992c0738565ff8e9b
83a40560f90370130662ac377461bb8e86076696
/part09-Part09_10.OnlineShop/src/main/java/ShoppingCart.java
bed8102a6bc6c0454c9bb3533b4868b34c3c4449
[]
no_license
benbasty/Java-MOOC.Fi-2
a82476fa4b0276acc514a5590a3f7cd14766b989
07601e51cd382752ca07e625b16843335304c60c
refs/heads/master
2023-06-28T11:52:37.368904
2021-07-26T13:55:42
2021-07-26T13:55:42
382,238,362
0
0
null
null
null
null
UTF-8
Java
false
false
1,098
java
import java.util.HashMap; import java.util.Map; /* * 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. */ /** * * @author benbasty */ public class ShoppingCart { private Map<String, Item> itemMap; public ShoppingCart() { this.itemMap = new HashMap<>(); } public void add(String product, int price) { if (itemMap.keySet().contains(product)) { increaseQuantity(product); } else { itemMap.put(product, new Item(product, 1, price)); } } public int price() { int totalPrice = 0; for (Item e : itemMap.values()) { totalPrice += e.price(); } return totalPrice; } public void increaseQuantity(String product) { this.itemMap.get(product).increaseQuantity(); } public void print() { for (String e : itemMap.keySet()) { System.out.println(itemMap.get(e).toString()); } } }
[ "benbasty@yahoo.fr" ]
benbasty@yahoo.fr
0dfb3886f6141c26359bb95141a9b7d2e5ede95a
39cb22bcdc00a0365a77fc71e2ca3a7d0de9c33a
/database/UserDb.java
1a82d1d8c385d4cdb2ae0d9467115478ed9cb50e
[]
no_license
Adi-Kahn/beacon-android-app
89340b1639f66ebb57de030f264c1d9a9b03ec21
eae0be859bcdf8c63db6a116f121f33325a2486f
refs/heads/main
2023-07-19T01:38:14.403726
2021-09-09T08:31:13
2021-09-09T08:31:13
404,467,177
0
0
null
null
null
null
UTF-8
Java
false
false
6,950
java
package com.example.adi.rejsekortv1.database; import android.content.Context; import android.content.SharedPreferences; import android.support.v7.app.AppCompatActivity; import android.util.Log; import com.example.adi.rejsekortv1.model.BankAccount; import com.example.adi.rejsekortv1.model.TravelHistory; import com.example.adi.rejsekortv1.model.User; import java.sql.SQLOutput; import java.util.List; import java.util.UUID; import io.realm.OrderedRealmCollection; import io.realm.Realm; import io.realm.RealmResults; import io.realm.exceptions.RealmException; public class UserDb extends AppCompatActivity { private static Realm realm; private static UserDb sUserDb; public static SharedPreferences mPreferences; public static final String UID_PREFS_NAME = "UIdPrefsFile"; public static UserDb get(Context context) { if (sUserDb == null) { realm = Realm.getDefaultInstance(); sUserDb = new UserDb(context); } return sUserDb; } public void saveUser(User user, BankAccount bankacc) { final User uprofile = user; final BankAccount bank = bankacc; realm.executeTransaction(new Realm.Transaction() { @Override public void execute(Realm realm) { realm.copyToRealm(uprofile); realm.copyToRealm(bank); }}); } public User showUserProfile(String username, String pass) { User user = new User(); User rows = realm.where(User.class).equalTo("Username", username).equalTo("PsW", pass).findFirst(); if (rows != null){ try { user.setName(rows.getName()); user.setEmail(rows.getEmail()); user.setCardnumber(rows.getCardnumber()); user.setUsername(rows.getUsername()); user.setPsW(rows.getPsW()); user.setBalance(rows.getBalance()); return user; } catch (RealmException ex) { System.out.println("Realm Error!" + ex.toString()); } } else Log.v("database", ">>>>>>>>>>Problem<<<<"); return rows; } public boolean LoginUserPr(User SignIn){ final User login = SignIn; boolean exist= false; RealmResults<User> rows=realm.where(User.class).equalTo("Username", login.getUsername().trim()).equalTo("PsW", login.getPsW().trim()).findAll(); if (rows.size() > 0) { Log.v("database", ">>>>>>>>>>stored successfully<<<<"); exist = true; } return exist; } public BankAccount showBankAccount(String username, String pass){ BankAccount accountBank = new BankAccount(); BankAccount rows = realm.where(BankAccount.class).equalTo("Username", username).equalTo("PsW", pass).findFirst(); if (rows != null){ //accountBank = rows; accountBank.setName(rows.getName()); accountBank.setEmail(rows.getEmail()); accountBank.setUsername(rows.getUsername()); accountBank.setPsW(rows.getPsW()); accountBank.setCardNumber(rows.getCardNumber()); accountBank.setBalance(rows.getBalance()); return accountBank; } else return null; } //Method for Balance Fragment and adding Balance to User's Travel Account public boolean addBalance(String us, String psw, int balance){ User user = new User(); BankAccount bankaccount = new BankAccount(); int result, travelBalance, bankbalance, NewBankBalanace = 0; boolean added = false; User rows =realm.where(User.class).equalTo("Username", us).equalTo("PsW", psw).findFirst(); BankAccount Baccount = realm.where(BankAccount.class).equalTo("Username", us).findFirst(); if (rows != null && Baccount != null) { // take user balance for travel travelBalance = rows.getBalance(); user.setBalance(travelBalance); // take user balance from bank bankbalance = Baccount.getBalance(); bankaccount.setBalance(bankbalance); if (balance<= bankbalance) { // Add money to user travel account result = travelBalance + balance; // Withdraw money from Bank account NewBankBalanace = bankbalance - balance; realm.beginTransaction(); // Update Balance in User and Bank Account rows.setBalance(result); Baccount.setBalance(NewBankBalanace); realm.commitTransaction(); Log.v("database", ">>>>>>>>>>stored successfully<<<<"); added = true; } } else Log.v("User", ">>>>>>>>>>Not match<<<<"); return added; } // Method for saving travel history of user, used with in travel_fragment public boolean saveTravelHis(String user, String pw, int zp, TravelHistory travelH) { TravelHistory travelHis = travelH; User userModel = new User(); int travelBalance, result = 0; boolean update= false; // TravelHistory traveled =realm.where(TravelHistory.class).equalTo("Username", user).equalTo("PsW", pw).findFirst(); User rows =realm.where(User.class).equalTo("Username", user).equalTo("PsW", pw).findFirst(); if (rows != null ) { travelBalance = rows.getBalance(); if (zp < travelBalance ) { result = travelBalance - zp; realm.beginTransaction(); realm.copyToRealm(travelHis); //travelHis.setDate(date); rows.setBalance(result); realm.commitTransaction(); update = true; Log.v("Zones", ">>>>>>>>>>stored successfully<<<<"); } else return update; } return update; } // Method for showing list of travel history for specific user public List<TravelHistory> showTravelHistory(String username, String pass) { TravelHistory travelhis = new TravelHistory(); RealmResults<TravelHistory> result = realm.where(TravelHistory.class).equalTo("Username", username).equalTo("PsW", pass).findAll(); if (result.size() > 0){ Log.v("List", ">>>>>>>>>>Views<<<<"); return result; } else Log.v("Not", ">>>>>>>>>>Accessible<<<<"); return result; } @Override protected void onDestroy() { super.onDestroy(); realm.close(); } public UserDb(Context context) { } }
[ "45436228+AdnanLime@users.noreply.github.com" ]
45436228+AdnanLime@users.noreply.github.com
e5a7abb25c723e0e594adc73ec1db32f1980b87e
7d7d2093dda33095ad3e95c48eeac4ef2724751c
/src/com/siwuxie095/designpattern/category/chapter9th/example5th/Main.java
d1ddecb98b92d21af76f2a2bd840b8f680d34785
[]
no_license
siwuxie095/DesignPattern
8cf0f7ad6591b9574dc950099ba2df05ac317eeb
1f31e6e0277a068a096fe9dbef5c44b18999b7e8
refs/heads/master
2020-07-02T14:55:51.576373
2019-11-12T05:56:13
2019-11-12T05:56:13
201,562,114
0
0
null
null
null
null
UTF-8
Java
false
false
8,552
java
package com.siwuxie095.designpattern.category.chapter9th.example5th; /** * @author Jiajing Li * @date 2019-11-06 16:48:00 */ public class Main { /** * 迭代器模式 * * 提供了一种方法顺序访问一个聚合对象中的各个元素,而又不暴露 * 其内部的表示。 * * * 迭代器模式让我们能游走于聚合内的每一个元素,而又不暴露其内部 * 的表示。把游走的任务放在迭代器上,而不是聚合上。这样简化了聚 * 合的接口和实现,也让责任各得其所。 * * 这很有意义:这个模式给你提供了一种方法,可以顺序访问一个聚合 * 对象中的元素,而又不用知道内部是如何表示的。在之前的例子中可 * 以看到这一点,在设计中使用迭代器的影响是明显的:如果你有一个 * 统一的方法访问聚合中的每一个对象,你就可以编写多态的代码和这 * 些聚合搭配使用。 * * 另一个对设计造成重要影响的,是迭代器模式把在元素之间游走的责 * 任交给迭代器,而不是聚合对象。这不仅让聚合的接口和实现变得更 * 简洁,也可以让聚合更专注在它应该专注的事情上面(即 管理对象 * 集合),而不必去理会遍历的事情。 * * * 疑问与解答 * * 问: * 我看到其他书上让迭代器类提供一些方法叫做 first()、next()、 * isDone() 和 currentItem()。为什么这些方法不一样? * 答: * 这些是 "经典" 的方法名称,它们随着时间的流逝渐渐改变了,而 * 现在在 Java 自带的 Iterator 中所使用的名称有 next()、 * hasNext() 甚至 remove()。 * 不妨看看这些经典的方法。next() 和 currentItem() 实际上 * 被合并成了 Iterator 中的 next()。isDone() 变成了 Iterator * 中的 hasNext()。至于 first() 则不存在对应,这是在 Java * 中,更倾向于取得一个新的迭代器,而不是让目前的迭代器跳到一 * 开始的位置。所以,其实这些接口没什么太大的差异。事实上,你 * 可以在自己的迭代器内部加上许多的方法,例如 remove()。 * * 问: * 我听说 "内部的" 迭代器和 "外部的" 迭代器。这是什么?在前面 * 的例子中实现的是哪一种? * 答: * 实现的是外部的迭代器,也就是说,客户通过调用 next() 取得下 * 一个元素。而内部的迭代器则是由迭代器自己控制。在这种情况下, * 因为是由迭代器自行在元素之间游走,所以你必须告诉迭代器在游 * 走的过程中,要做什么事情,也就是说,你必须将操作传给迭代器。 * 因为客户无法控制遍历的过程,所以内部迭代器比外部迭代器更没 * 有弹性。然而,某些人可能认为内部的迭代器比较容易使用,因为 * 只需将操作告诉它,它就会帮你做完所有事情。 * * 问: * 迭代器可以被实现成向后(向左)移动吗,就像向前(向右)移动 * 一样? * 答: * 绝对可以。在这样的情况下,你可能要加上两个方法,一个方法取 * 得前一个元素,而另一个方法告诉你是否已经到了集合的最前端。 * Java 的 Collection Framework 提供了另一种迭代器接口, * 称为 ListIterator。这个迭代器在标准的迭代器接口上多加了 * 一个 hasPrevious() 和 previous() 以及一些其他的方法。 * 任何实现了 List 接口的集合,都支持这样的做法。 * * 问: * 对于散列表这样的集合,元素之间并没有明显的次序关系,该怎么办? * 答: * 迭代器意味着没有次序。只是取出所有的元素,并不表示取出元素的 * 先后就代表元素的大小次序。对于迭代器来说,数据结构可以是有次 * 序的,或是没有次序的,甚至数据可以是重复的。除非某个集合的文 * 件有特别说明,否则不可以对迭代器所取出的元素大小顺序作出假设。 * * 问: * 你说可以用迭代器写出 "多态的代码",可以再多做一些解释吗? * 答: * 当写了一个需要以迭代器当作参数的方法时,其实就是在使用多态的 * 迭代器。也就是说,所写出的代码,可以在不同的集合中游走,只要 * 这个集合支持迭代器即可。我们不在乎这个集合是如何被实现的,但 * 依然可以编程在它内部的元素之间游走。 * * 问: * 如果我使用 Java,不见得总是要利用 Java 自带的迭代器,可能 * 想要使用自己的迭代器实现,和这些已经使用 Java 自带的迭代器 * 的类进行整合,这做得到吗? * 答: * 或许可以吧。如果你有一个通用的迭代器接口,那么让你自己的集合 * 和 Java 的集合(如:List、Vector)混合使用就会比较容易。 * 但是请记住,如果你需要在自己的迭代器接口为你的集合新增功能, * 你可以随时扩展迭代器接口。 * * 问: * 我看到 Java 有一个 Enumeration (枚举器)接口,它实现了 * 迭代器模式吗? * 答: * Enumeration 其实是一个有次序的迭代器实现,它有两个方法, * hasMoreElements() 类似 hasNext(),而 nextElement() * 类似 next()。然而你应该比较想使用迭代器,而不是枚举器, * 因为大多数的 Java 类支持的都是迭代器。如果你想把二者互相 * 转换,可以通过适配器模式来进行。 * * * * 九个 OO 原则之第九个设计原则: * 一个类应该只有一个引起变化的原因 * * 也称 单一职责(责任)原则 * * * 如果允许这里的聚合实现它们内部的集合,以及相关的操作和遍历的方法, * 又会如何?已经知道,这会增加聚合中的方法个数,但又怎样?为什么这 * 么做不好? * 这是因为,当允许一个类不但要完成自己的事情(管理相关操作),还同 * 时要担负更多的责任(遍历)时,就给了这个类两个变化的原因。 * 即 如果这个集合改变改变的话,这个类也必须改变。如果遍历的方式改变 * 的话,这个类也必须跟着改变。 * 所以,老朋友 "改变" 又成了设计原则的中心。 * * 显然,应该要避免类内的改变,因为修改代码很容易造成许多潜在的错误。 * 如果有一个类具有两个改变的原因,那么这会使得将来该类的变化机率上 * 升,而当它真的改变时,你的设计中同时有两个方面将会受到影响。 * 要如何解决呢?这个原则告诉我们将一个责任只指派给一个类。但这听起 * 来容易,但做起来却并不简单:区分设计中的责任,是最困难的事情之一。 * 因为大脑很习惯看着一大群行为,然后将它们集中在一起,尽管它们可能 * 属于两个或多个不同的责任。想要成功的方法,就是努力不懈地检查你的 * 设计,随着系统的成长,随时观察有没有迹象显示某个类改变的原因超过 * 一个。 * * 类的每个责任都有改变的潜在区域。超过一个责任,意味着超过一个改变 * 的区域。所以,尽量让每个类保持单一责任。 * * * 内聚(cohesion) * * 内聚用来度量一个类或模块紧密地达到单一目的或责任。 * * 当一个类或模块被设计成只支持一组相关的功能时,就说它具有高内聚; * 反之,当被设计成支持一组不相关的功能时,就说它具有低内聚。 * * 内聚是一个比单一责任原则更普遍的概念,但两者其实关系是很密切的。 * 遵守这个原则的类容易具有很高的凝聚力,而且比背负许多责任的低内聚 * 类更容易维护。 */ public static void main(String[] args) { Aggregate aggregate = new ConcreteAggregate(); Client client = new Client(aggregate); client.doSomething(); } }
[ "834879583@qq.com" ]
834879583@qq.com
00d7141030d5d6a2e4be1ea6923c86728423c7ea
9ffdeedbb966e25ae8f46045a4cd5fd4c4fdd71a
/fupin_2_0/src/main/java/com/roch/fupin/dialog/NormalDailog.java
1c8a38215c853c453a4c66440a68f5312c2abaad
[]
no_license
gugj/FuPin_2_0_TongLiao
ef6bc04356924411ed937b1f357eface1f06a5ab
6bad2ea4550fb1d4349bd2a7ad34adfa40eb3eae
refs/heads/master
2021-01-22T21:13:10.083617
2017-08-18T06:25:32
2017-08-18T06:25:32
100,679,481
1
0
null
null
null
null
UTF-8
Java
false
false
4,868
java
package com.roch.fupin.dialog; import android.app.Dialog; import android.content.Context; import android.os.Bundle; import android.view.WindowManager.LayoutParams; import android.widget.Button; import android.widget.LinearLayout; import android.widget.TextView; import com.roch.fupin_2_0.R; public class NormalDailog extends Dialog { private android.view.View.OnClickListener mOnClick; private TextView content, title,tv_dingwei_location,tv_old_location,tv_qiandao_count; private Button doneBtn, cancelBtn,xiugaiBtn; LinearLayout doneBtnLayout; private int layout_type; public NormalDailog(Context context) { super(context); } public NormalDailog(Context context, int theme) { super(context, theme); } /** * * @param context 上下文 * @param theme 主体 * @param layout_type dialog弹窗口布局类型,如果为3,即为修改、删除、取消按钮布局,否则为确定、取消按钮布局;如果为4, * 即为自定义的可以显示位置信息的布局 */ public NormalDailog(Context context, int theme,int layout_type) { super(context, theme); this.layout_type=layout_type; } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); if(3==layout_type){ setContentView(R.layout.widget_normal_dialog_3); }else if(4==layout_type){ setContentView(R.layout.widget_normal_dialog_zidingyi); } else { setContentView(R.layout.widget_normal_dialog); } // 使dialog全局 getWindow().setLayout(LayoutParams.MATCH_PARENT, LayoutParams.WRAP_CONTENT); initViews(); } //dialog 控件初始化 private void initViews() { title = (TextView) findViewById(R.id.product_search_dialog_title); content = (TextView) findViewById(R.id.normal_dialog_content); doneBtn = (Button) findViewById(R.id.normal_dialog_done); cancelBtn = (Button) findViewById(R.id.normal_dialog_cancel); if(3==layout_type){ xiugaiBtn = (Button) findViewById(R.id.normal_dialog_xiugai); }else if(4==layout_type){ tv_dingwei_location = (TextView) findViewById(R.id.tv_dingwei_location); tv_old_location = (TextView) findViewById(R.id.tv_old_location); tv_qiandao_count = (TextView) findViewById(R.id.tv_qiandao_count); } } /** * 按钮点击事件 * @param l */ public void setOnClickLinener(android.view.View.OnClickListener l) { this.mOnClick = l; doneBtn.setOnClickListener(mOnClick); cancelBtn.setOnClickListener(mOnClick); if(3==layout_type){ xiugaiBtn.setOnClickListener(mOnClick); } } /** * 设置title 文字 * @param text */ public void setTitleText(String text) { title.setText(text); } /** * 设置dialog提示内容,如果是自定义的,即设置签到的时间 * @param text */ public void setContentText(String text) { content.setText(text); } /** * 设置当前定位的位置信息 * @param text */ public void setLocationText(String text) { tv_dingwei_location.setText(text); } /** * 设置服务器保存的定位的位置信息 * @param text */ public void setNetLocationText(String text) { tv_old_location.setText(text); } /** * 设置服务器保存的已签到次数 * @param text */ public void setQiaoDaoCount(String text) { tv_qiandao_count.setText(text); } /** * 设置dialog提示内容 颜色 * * @param color */ public void setContentTextColor(int color) { content.setTextColor(color); } /** * 设置完成按钮文字描述 * @param text */ public void setDoneButtonText(String text) { doneBtn.setText(text); } /** * 设置取消按钮文字描述 * @param text */ public void setCancelButtonText(String text) { cancelBtn.setText(text); } /** * 设置确定按钮隐藏 or 显示 * @param visibility */ public void setDoneBtnVisible(int visibility) { //doneBtnLayout.setVisibility(visibility); doneBtn.setVisibility(visibility); } /** * 设置取消按钮隐藏 or 显示 * @param visibility */ public void setCancelVisible(int visibility) { //doneBtnLayout.setVisibility(visibility); cancelBtn.setVisibility(visibility); } public void setCancelBtnText(String text) { cancelBtn.setText(text); } public void setDoneBtnText(String text) { doneBtn.setText(text); } }
[ "qqdongshao123@126.com" ]
qqdongshao123@126.com
333232db46b0fdd949d721089f7d4b0d83b749e9
31e999ed8660acf3f004f92726f502b05aab8fe0
/mcac/src/weka/classifiers/rules/mcac/datastructures/RuleID.java
df405aa595a26f72b0444c8ff312670ca373b553
[]
no_license
suhelhammoud/mcac
84e66a76247a4de5561ca7c6e819d6fb75fa2b2c
b8f1b66161976d06f2f366455ee11c103284eeaf
HEAD
2016-09-05T15:01:52.741909
2014-01-06T19:30:54
2014-01-06T19:30:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,336
java
package weka.classifiers.rules.mcac.datastructures; import com.google.common.base.Joiner; import com.google.common.base.Objects; /** * Instances of this class are to be used as immutable objects * @author suheil * */ public class RuleID{ public final ColumnID colid; public final int rowid; public final int support; public final double confidence; private int hashCode; public RuleID(ColumnID colid, int rowid, int support, double confidence){ this.colid = colid; this.rowid = rowid; this.support = support; this.confidence = confidence; this.hashCode = Objects.hashCode(colid, rowid, support, confidence); } public static RuleID of(ColumnID colid, FrequentItem item){ Calc calc = item.getCalc(); return new RuleID(colid, calc.rowId , calc.support, calc.confidence); } @Override public boolean equals(Object obj) { if(obj == this)return true; if( ! (obj instanceof RuleID)) return false; RuleID that = (RuleID)obj; return this.rowid == that.rowid && this.colid.equals(that.colid) && this.support == that.support && Math.abs(this.confidence - that.confidence) < 1e-6 ; } @Override public int hashCode() { return hashCode; } @Override public String toString() { return "<"+colid+","+rowid+" ,conf:"+confidence+", supp="+support+ " >"; } }
[ "eepgssh@gmail.com" ]
eepgssh@gmail.com
e2b6a55dde057fd5241de29bcba372e15fc72cc2
1c58f6ea07d10898b2b3ec776aa87086712c035f
/src/consulo/unity3d/module/Unity3dChildModuleExtension.java
5046b9f9de3b26f35861ea50a1c0f75f56ce57b0
[ "Apache-2.0" ]
permissive
CaiusPeng/consulo-unity3d
861111508b44d1e727c8a8db263c77bf578d888d
e11893e92ceafca0f41a04f09bc277656250e7a1
refs/heads/master
2021-01-21T20:46:26.756833
2017-05-18T11:34:03
2017-05-18T11:34:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,571
java
/* * Copyright 2013-2016 consulo.io * * 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 consulo.unity3d.module; import java.util.Collections; import java.util.List; import java.util.Map; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import com.intellij.openapi.projectRoots.Sdk; import com.intellij.openapi.projectRoots.SdkType; import com.intellij.openapi.roots.OrderRootType; import com.intellij.util.ArrayUtil; import consulo.annotations.RequiredReadAction; import consulo.dotnet.module.DotNetNamespaceGeneratePolicy; import consulo.module.extension.ModuleInheritableNamedPointer; import consulo.module.extension.impl.ModuleExtensionImpl; import consulo.roots.ModuleRootLayer; /** * @author VISTALL * @since 29.03.2015 */ public class Unity3dChildModuleExtension extends ModuleExtensionImpl<Unity3dChildModuleExtension> implements Unity3dModuleExtension<Unity3dChildModuleExtension> { public Unity3dChildModuleExtension(@NotNull String id, @NotNull ModuleRootLayer moduleRootLayer) { super(id, moduleRootLayer); } @NotNull @Override @RequiredReadAction public DotNetNamespaceGeneratePolicy getNamespaceGeneratePolicy() { Unity3dRootModuleExtension rootModuleExtension = Unity3dModuleExtensionUtil.getRootModuleExtension(getProject()); if(rootModuleExtension != null) { return rootModuleExtension.getNamespaceGeneratePolicy(); } return UnityNamespaceGeneratePolicy.INSTANCE; } @NotNull @Override public ModuleInheritableNamedPointer<Sdk> getInheritableSdk() { return EmptyModuleInheritableNamedPointer.empty(); } @Nullable @Override public Sdk getSdk() { return null; } @Nullable @Override public String getSdkName() { return null; } @NotNull @Override public Class<? extends SdkType> getSdkTypeClass() { throw new UnsupportedOperationException("Use root module extension"); } @Override @RequiredReadAction @NotNull public List<String> getVariables() { Unity3dRootModuleExtension rootModuleExtension = Unity3dModuleExtensionUtil.getRootModuleExtension(getProject()); if(rootModuleExtension != null) { return rootModuleExtension.getVariables(); } return Collections.emptyList(); } @Override public boolean isSupportCompilation() { return false; } @NotNull @Override @RequiredReadAction public Map<String, String> getAvailableSystemLibraries() { Unity3dRootModuleExtension rootModuleExtension = Unity3dModuleExtensionUtil.getRootModuleExtension(getProject()); if(rootModuleExtension != null) { return rootModuleExtension.getAvailableSystemLibraries(); } return Collections.emptyMap(); } @NotNull @Override @RequiredReadAction public String[] getSystemLibraryUrls(@NotNull String name, @NotNull OrderRootType orderRootType) { Unity3dRootModuleExtension rootModuleExtension = Unity3dModuleExtensionUtil.getRootModuleExtension(getProject()); if(rootModuleExtension != null) { return rootModuleExtension.getSystemLibraryUrls(name, orderRootType); } return ArrayUtil.EMPTY_STRING_ARRAY; } }
[ "vistall.valeriy@gmail.com" ]
vistall.valeriy@gmail.com
8ccd4ed467f74d3275f42cedc0f231a560e550fb
ca576d8c9e0e7c7d03e1e93061ede277f72d0ed3
/smart-services/service-main/src/main/java/com/sct/service/main/ScEstateImpl.java
9a23b7677ce507a2b5aa1f87b0f93a009bc387a7
[ "Apache-2.0" ]
permissive
hubeixiang/smart-city
f73d6932fb81f300c9cbb83763a7e8c868177d8d
ff178d300da40d22bfd09d067c5fe6c615a30c98
refs/heads/develop
2023-03-13T06:24:26.370445
2021-03-01T07:35:36
2021-03-01T07:35:36
310,278,160
4
4
Apache-2.0
2021-01-02T13:58:48
2020-11-05T11:28:52
Java
UTF-8
Java
false
false
2,804
java
package com.sct.service.main; import com.sct.service.core.FormatDataServiceImpl; import com.sct.service.core.service.QPagingUtil; import com.sct.service.core.web.support.collection.PageResultVO; import com.sct.service.core.web.support.collection.ResultVOEntity; import com.sct.service.core.web.support.collection.pages.PageResponse; import com.sct.service.core.web.support.collection.pages.Paging; import com.sct.service.database.condition.QPaging; import com.sct.service.database.condition.ScEstateCondition; import com.sct.service.database.entity.ScEstate; import com.sct.service.database.mapper.ScEstateMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; @Service public class ScEstateImpl { @Autowired private FormatDataServiceImpl formatDataService; @Autowired private ScEstateMapper scEstateMapper; public ResultVOEntity list(ScEstateCondition condition) { List data = scEstateMapper.selectCondition(condition); List<String> columns = QPagingUtil.parserResultColumns(data); return ResultVOEntity.of(columns, data); } public PageResultVO listPage(Paging paging, ScEstateCondition condition) { int totalSize = scEstateMapper.selectConditionCount(condition); PageResponse pageResponse = PageResponse.of(paging.getPageIndex(), paging.getPageSize(), totalSize); ResultVOEntity resultVO = null; if (totalSize == 0) { resultVO = ResultVOEntity.of(); } else { QPaging qPaging = QPagingUtil.toQPaging(paging); if (totalSize < qPaging.getEndIndex()) { qPaging.setEndIndex(totalSize); } List data = scEstateMapper.selectConditionPage(condition, qPaging); List<String> columns = QPagingUtil.parserResultColumns(data); resultVO = ResultVOEntity.of(columns, data); } return PageResultVO.of(pageResponse, resultVO); } public int insert(ScEstate scEstate) { return scEstateMapper.insert(scEstate); } public int delete(Integer id) { return scEstateMapper.deleteByPrimaryKey(id); } public int deletes(List<Integer> ids) { return scEstateMapper.deleteByPrimaryKeys(ids); } public int update(ScEstate scEstate) { return scEstateMapper.updateByPrimaryKey(scEstate); } public ScEstate select(Integer id) { return scEstateMapper.selectByPrimaryKey(id); } public ResultVOEntity listEstatesByCommunityId(Integer communityId) { List data = scEstateMapper.selectByCommunityId(communityId); List<String> columns = QPagingUtil.parserResultColumns(data); return ResultVOEntity.of(columns, data); } }
[ "fight.xfcyzq@outlook.com" ]
fight.xfcyzq@outlook.com
4532123dab0d38d01a4be08a5f0309dd6c679e1c
6d14b6c809b296a3bbdac3a41ba9031bb382a4a7
/opak2/PrvoCisla.java
b7e7e97178d7798989cca04be8ed7a5ce1b44159
[]
no_license
MartinKurej/PRG02
8ad97bb5849626f4ec34de5ca60e6371b2b164d8
e5a70d522ffa8738c7811f262f853fe313f9f437
refs/heads/main
2022-12-31T09:02:39.580736
2020-10-23T07:22:04
2020-10-23T07:22:04
306,559,336
0
0
null
null
null
null
UTF-8
Java
false
false
1,394
java
import java.util.ArrayList; import java.util.Scanner; public class PrvoCisla { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int limit; do { System.out.println("Kolik prvocisel chcete vypsat?"); String limitString = scan.nextLine(); try { limit = Integer.parseInt(limitString); } catch (java.lang.NumberFormatException e) { limit = 0; } } while (limit <= 1); ArrayList<Integer> pN = new ArrayList<>(); ArrayList<Integer> cN = new ArrayList<>(); cN.add(1); for (int pNCan = 2; pN.size() < limit; pNCan++) { if (!cN.contains(pNCan)) { pN.add(pNCan); for (int multiple = 2; (multiple * pNCan) <= Math.pow(limit, 2); multiple++) { if (!cN.contains(multiple * pNCan)) { cN.add(multiple * pNCan); } } } } log(pN); } public static void log(ArrayList<Integer> pN) { System.out.println("\n-------------------"); System.out.println("Prvo cisla:"); pN.forEach((element) -> doLock(element)); } public static void doLock(int input) { if (input != 0) { System.out.print(input + "-"); } } }
[ "reallook12@gmail.com" ]
reallook12@gmail.com
98db0f334cad99a7689530beb05d1e664009de85
c478425892a21572bb9ef687b1d1036761d3b2dc
/src/main/java/com/zyx/o2o/service/impl/AreaServiceImpl.java
f29d92286fc4ebe63d1c51763a03fbeb0d4027ad
[]
no_license
zhangyuexu/o2o
f291e5be59dae24d48d3e035332b29d596b445b6
cb3961fa27f837dc0631089bfdb011484680fade
refs/heads/master
2022-12-21T13:46:20.051477
2019-07-02T08:17:52
2019-07-02T08:17:52
194,819,491
1
0
null
2022-12-16T11:34:38
2019-07-02T08:16:11
Java
UTF-8
Java
false
false
489
java
package com.zyx.o2o.service.impl; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.zyx.o2o.service.AreaService; import com.zyx.o2o.dao.AreaDao; import com.zyx.o2o.entity.Area; @Service public class AreaServiceImpl implements AreaService { //service层依赖dao层的 @Autowired private AreaDao areaDao; @Override public List<Area> getAreaList(){ return areaDao.queryArea(); } }
[ "407770031@qq.com" ]
407770031@qq.com
bb85577fd363a3adb366886239e533257721e0f2
38734989c117592305cbf0b13d5a170f708f693c
/Entertainment-Tracker Iteration 3/Entertainment-Tracker/app/src/main/java/comp3350/entertainment_tracker/business/ItemSearch.java
49bf33ad9e1165bf318ecd2231098d3ed371017a
[]
no_license
JPK8909/Entertainment_training
3fd9d3271aebcbb87a84a7d50dcedf99bb43f91f
8b2b299c9a248aee674bdedb13c57648a5b9f8c4
refs/heads/master
2020-03-18T13:40:00.372232
2018-05-25T03:22:31
2018-05-25T03:22:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
777
java
package comp3350.entertainment_tracker.business; import java.util.ArrayList; import comp3350.entertainment_tracker.objects.EntertainmentItem; public class ItemSearch { public static ArrayList<EntertainmentItem> searchListForSubstring(ArrayList<EntertainmentItem> searchList, String substring) { ArrayList<EntertainmentItem> matchingItems = new ArrayList<>(); if (searchList != null && substring != null && !substring.equals("")) { for (int i = 0; i < searchList.size(); i++) { EntertainmentItem currentItem = searchList.get(i); String currentItemName = searchList.get(i).getItemName().toLowerCase(); if (currentItemName.contains(substring.toLowerCase())) matchingItems.add(currentItem); } } return matchingItems; } }
[ "parkb346@myumanitoba.caa" ]
parkb346@myumanitoba.caa
a2f0b5bb4b4b3802a5b3a79c55b4a39f806a6b5e
a5c50c4592f4ea096e9a3dc94c07ffdc6e137241
/Plugin/src/main/java/com/github/teozfrank/duelme/commands/duel/ListCmd.java
de9da44d397b72d539e3fc861343690d242aacc5
[ "MIT" ]
permissive
teozfrank/DuelMe
ec9ff590d4eb8f465d510bf413270924b1de67ed
64407db1cfd55ae74feeab6af08717753386a65a
refs/heads/master
2021-06-25T06:09:06.204907
2020-05-18T19:36:06
2020-05-18T19:36:06
11,536,918
11
26
null
2017-01-20T23:28:19
2013-07-19T20:49:41
Java
UTF-8
Java
false
false
2,503
java
package com.github.teozfrank.duelme.commands.duel; /** The MIT License (MIT) Copyright (c) 2014 teozfrank Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ import com.github.teozfrank.duelme.main.DuelMe; import com.github.teozfrank.duelme.util.DuelArena; import com.github.teozfrank.duelme.util.DuelManager; import com.github.teozfrank.duelme.util.Util; import org.bukkit.ChatColor; import org.bukkit.command.CommandSender; public class ListCmd extends DuelCmd { public ListCmd(DuelMe plugin, String mainPerm) { super(plugin, mainPerm); } @Override public void run(CommandSender sender, String subCmd, String[] args) { DuelManager dm = plugin.getDuelManager(); Util.sendEmptyMsg(sender, Util.LINE_BREAK); Util.sendEmptyMsg(sender, ChatColor.GOLD + " DuelMe - List Duel Arena status(es)"); Util.sendEmptyMsg(sender, ""); if(dm.getDuelArenas().size() > 0) { for(DuelArena duelArena: dm.getDuelArenas()) { Util.sendEmptyMsg(sender, ChatColor.GREEN + "Name: " + ChatColor.AQUA + duelArena.getName()); Util.sendEmptyMsg(sender, ChatColor.GREEN + "Status: " + ChatColor.AQUA + duelArena.getDuelState()); Util.sendEmptyMsg(sender, ""); } } else { Util.sendEmptyMsg(sender, NO_DUEL_ARENAS); } Util.sendEmptyMsg(sender, ""); Util.sendCredits(sender); Util.sendEmptyMsg(sender, Util.LINE_BREAK); } }
[ "frankfallon0@gmail.com" ]
frankfallon0@gmail.com
082b2c3685fe9076b32e4ea57f966547e103e852
61a8265ac6c8a085965b82e9a8311e5805dff0aa
/app/src/main/java/com/recyclerviewtest/model/Model.java
4789fca40bab5bfd937d79e1990ec96ab66a2422
[ "Apache-2.0" ]
permissive
Dream97/RecyclerViewTest
cda39c988ee07c7d6dbf9609df8a5bd48315df49
5335cda6da953404cff6f8ba2e01c524915bd1f8
refs/heads/master
2021-01-01T18:10:53.887649
2017-07-25T13:52:22
2017-07-25T13:52:22
98,273,214
0
0
null
null
null
null
UTF-8
Java
false
false
2,746
java
package com.recyclerviewtest.model; import com.recyclerviewtest.util.OkHttp3; import java.util.Map; import okhttp3.FormBody; import okhttp3.OkHttpClient; import okhttp3.Request; /**import * 方法模型层 * Created by asus on 2017/7/20. */ public class Model { private static Model instance = new Model();//单例 public static Model getInstance() { return instance; } public OkHttpClient client = OkHttp3.getClient(); /** * post请求 * @param address * @param callback * @param map */ public void post(String address, okhttp3.Callback callback, Map<String,String> map) { OkHttpClient client = new OkHttpClient(); FormBody.Builder builder = new FormBody.Builder(); if (map!=null) { for (Map.Entry<String,String> entry:map.entrySet()) { builder.add(entry.getKey(),entry.getValue()); } } FormBody body = builder.build(); Request request = new Request.Builder() .url(address) .post(body) .build(); client.newCall(request).enqueue(callback); } /** * post请求 * @param address * @param callback */ public void get(String address, okhttp3.Callback callback) { OkHttpClient client = new OkHttpClient(); FormBody.Builder builder = new FormBody.Builder(); FormBody body = builder.build(); Request request = new Request.Builder() .url(address) .build(); client.newCall(request).enqueue(callback); } /** * post方式提交Json * * @param context * @param url * @param content * @param callback */ // public void postJson(final Context context, String url, String content, final ICallBack callback) { // // RequestBody requestBody = RequestBody.create( // MediaType.parse("application/json"), content); // Request request = new Request.Builder() // .url(url) // .post(requestBody) // .build(); // client.newCall(request).enqueue(new Callback() { // @Override // public void onFailure(Call call, IOException e) { // callback.result(e.toString()); // } // // @Override // public void onResponse(Call call, Response response) throws IOException { // if (response.isSuccessful()) { // callback.result(response.body().string()); // } else { // callback.result("请求失败!"); // } // } // }); // } }
[ "1248310717@qq.com" ]
1248310717@qq.com
76dde351cc1d4845becc3e616d3c78b8de68da97
68d92445824824e896be4d7bef85e52e9bcf09e0
/src/main/java/com/macro/mall/tiny/demo/mbg/CommentGenerator.java
8c7c011389a844b2922fbb5b45fa20acc0e221f4
[]
no_license
binyang179/mall-tiny-01
5673dda728e275310ce255c688ff65f1262b6a8f
5b10e7b481783c0093c47a20cfb6dbc69e38823f
refs/heads/master
2020-07-28T15:26:06.215599
2019-09-19T01:44:38
2019-09-19T01:44:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
123
java
package com.macro.mall.tiny.demo.mbg; /** * @Author crab * @Date 9/19/19 9:42 AM */ public class CommentGenerator { }
[ "binyang3179@gmail.com" ]
binyang3179@gmail.com
50bb5f44f9b03bcb30c76e1e150798a30ab0f2a8
fcef57066b85ce04292672d4bb44d3238590c1b9
/app/src/main/java/com/kovaxarny/trifit/utilities/PreferenceUtil.java
151f0530c31589b6215ec8fbbb88485662b1a45b
[]
no_license
kovaxarny/TriFit
ef9abd7026bb0530c514c03a02b671e5fed765c1
0d12c5d28c13ab945598f4c85fa74867aac2697c
refs/heads/master
2021-09-11T13:14:24.833604
2018-04-07T12:17:11
2018-04-07T12:17:11
112,164,203
0
0
null
null
null
null
UTF-8
Java
false
false
4,197
java
package com.kovaxarny.trifit.utilities; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; import android.preference.PreferenceManager; /** * Created by kovax on 2018-03-18. */ public class PreferenceUtil { private static final String IS_FIRST_RUN = "isFirstRun"; private static final String FIRST_NAME = "firstName"; private static final String LAST_NAME = "lastName"; private static final String BIRTH_DAY = "birthDay"; private static final String GENDER = "gender"; public static void createBaseUserData(Context context, Intent data) { SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); SharedPreferences.Editor editor = preferences.edit(); editor.putString(FIRST_NAME, data.getStringExtra("firstName")) .putString(LAST_NAME, data.getStringExtra("lastName")) .putString(BIRTH_DAY, data.getStringExtra("birthDay")) .putString(GENDER, data.getStringExtra("gender")) .apply(); } public static boolean isFirstRun(Context context) { SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); return preferences.getBoolean(IS_FIRST_RUN, true); } public static String getFullName(Context context) { SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); return preferences.getString(FIRST_NAME, "firstName") + " " + preferences.getString(LAST_NAME, "lastName"); } public static String getBirthDate(Context context) { SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); return preferences.getString(BIRTH_DAY, "birthDay"); } public static String getGender(Context context) { SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); return preferences.getString(GENDER, "gender"); } public static void turnOnFirstRun(Context context) { SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); SharedPreferences.Editor editor = preferences.edit(); editor.putBoolean(IS_FIRST_RUN, true) .apply(); } public static void turnOffFirstRun(Context context) { SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); SharedPreferences.Editor editor = preferences.edit(); editor.putBoolean(IS_FIRST_RUN, false) .apply(); } public static void saveSwitchState(Context context,String key, boolean b) { SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); SharedPreferences.Editor editor = preferences.edit(); editor.putBoolean(key, b) .apply(); } public static boolean restoreSwitchState(Context context, String key) { SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); return preferences.getBoolean(key,true); } public static String getFirstName(Context context) { SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); return preferences.getString(FIRST_NAME, "firstName"); } public static String getLastName(Context context) { SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); return preferences.getString(LAST_NAME, "lastName"); } public static void saveWorkoutPerformance(Context context, String id, String workout) { SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); SharedPreferences.Editor editor = preferences.edit(); editor.putString(id, workout) .apply(); } public static String getLastPerformance(Context context, String s) { SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(context); return preferences.getString(s,"There is no previous workout for this exercise."); } }
[ "kovaxarny96@gmail.com" ]
kovaxarny96@gmail.com
b41bd01f2b65d7193147e19d4bb8c9c23646f2df
d6891ba46b62941c4f0c54d8bfc1ef73b8703d8a
/src/com/hl/PlayObserver.java
6a6489e91a9e7e65f09cd74b7b5a7321bfda6640
[]
no_license
huanglin1/DesignPatterns.Observer
aec46647e1157ecc9222ea5670fb9e7353cb6d2a
78410ec1fa09949dfcfffad6af81ceb3a9327f77
refs/heads/master
2020-03-27T17:37:25.516098
2018-08-31T12:12:56
2018-08-31T12:12:56
146,862,294
0
0
null
null
null
null
UTF-8
Java
false
false
333
java
package com.hl; /** * Created with IntelliJ IDEA. * User: huanglin * Date: 2018/7/22 * Time: 15:56 * To change this template use File | Settings | File Templates. */ public class PlayObserver implements Observer{ @Override public void update(String msg){ System.out.println(msg+",停止玩游戏了"); } }
[ "1782518783@qq.com" ]
1782518783@qq.com
80bb1c48e1fa45680bfde981843462f7b600a3d7
b63ed2811eb9a9d722df92de0640199fecdbf6ca
/app/src/main/java/com/example/menumakanan/MenuAdapter.java
530dc561f16f0848768d5684de0f0bc88f765451
[]
no_license
alanupermana/MenuMakanan-Firebase-Android
571d2ce47c1576ced044079b460711fce400c066
660d62c1f77c46b578cb6ffefecefbe4749427f9
refs/heads/master
2020-05-17T16:32:54.885749
2019-04-28T06:40:18
2019-04-28T06:40:18
183,822,520
0
0
null
null
null
null
UTF-8
Java
false
false
1,921
java
package com.example.menumakanan; import android.content.Context; import android.support.annotation.NonNull; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import java.util.ArrayList; import java.util.List; public class MenuAdapter extends RecyclerView.Adapter<MenuAdapter.ViewHolder> { private Context context; private List<MenuModel> listMenu; public MenuAdapter(Context context) { this.context = context; listMenu = new ArrayList<>(); } public void setData(List<MenuModel> listMenu) { this.listMenu = listMenu; } @NonNull @Override public MenuAdapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) { View v = LayoutInflater.from(context).inflate(R.layout.item_list, viewGroup, false); return new ViewHolder(v); } @Override public void onBindViewHolder(@NonNull MenuAdapter.ViewHolder viewHolder, int i) { MenuModel menuModel = listMenu.get(i); viewHolder.tvNamaMenu.setText(menuModel.getNamaMenu()); viewHolder.tvHarga.setText(String.valueOf(menuModel.getHarga())); viewHolder.tvDetailMenu.setText(menuModel.getDetailMenu()); } @Override public int getItemCount() { return listMenu.size(); } public class ViewHolder extends RecyclerView.ViewHolder { ImageView ivMenu; TextView tvNamaMenu, tvHarga, tvDetailMenu; public ViewHolder(@NonNull View itemView) { super(itemView); ivMenu = itemView.findViewById(R.id.iv_menu); tvNamaMenu = itemView.findViewById(R.id.tv_nama_menu); tvHarga = itemView.findViewById(R.id.tv_harga); tvDetailMenu = itemView.findViewById(R.id.tv_detail_menu); } } }
[ "naufalrzld@tubesjarkom.com" ]
naufalrzld@tubesjarkom.com
88434269227fd41840e842d6ba41b588a1d05c8c
87071efd200ea4f477306469864f890f64940821
/ZCGYieldSystem/src/main/java/cn/stylefeng/guns/core/common/constant/StatusConstant.java
deffa0833c2dfb59cbe24cce4c6da9130bfcc7f9
[]
no_license
huangjufei/zhaoliang
5fca8d6893506106da46214286a7e00a0a4b8afd
f454506cdf6963a280c895795544fc14510a571b
refs/heads/master
2022-12-11T05:05:57.044927
2019-07-09T08:37:13
2019-07-09T08:37:13
195,724,335
0
0
null
2022-12-09T17:24:00
2019-07-08T02:41:45
JavaScript
UTF-8
Java
false
false
1,498
java
package cn.stylefeng.guns.core.common.constant; public interface StatusConstant { /** * 数据提交,提交用户与管理员可见 */ final static public String COMMIT = "提交"; /** * 数据审核中,提交用户与管理员可见 */ final static public String AUDIT = "审核"; /** * 数据审核失败,提交用户与管理员可见 */ final static public String FAILED = "失败"; /** * 数据审核通过,且上架到平台之中,对数据可见用户都可见; */ final static public String SHELVES = "上架"; /** * 数据审核通过,用户自定义的下架数据,则只有提交用户与管理员可见 */ final static public String SOLD_OUT = "下架"; /** * 数据被标记为删除状态,在删除规则之前有可恢复的时机,反之,则数据将被真的删除; */ final static public String MARK_DELETE = "标记删除"; static public boolean isLegal(String status) { if(COMMIT.equals(status) || AUDIT.equals(status) || FAILED.equals(status) || SHELVES.equals(status) || SOLD_OUT.equals(status) || MARK_DELETE.equals(status)) { return true; } return false; } static public String constant() { return "状态可选参数,及其说明:[" + COMMIT + "]:用户提交;[" + AUDIT + "]:审核中 ;[" + FAILED + "]:审核失败;" + "[" + SHELVES + "]:用户可见;[" + SOLD_OUT + "]:用户不可见 ;[" + MARK_DELETE + "]:在系统删除规则时间内可恢复;"; } }
[ "28160997@qq.com" ]
28160997@qq.com
436ed6022a24753d4380c9d66e36541aa1bd1404
f05b94742c03ce80af7270907ea3fba2bcff1ba5
/app/src/main/java/com/tsd/top10downloader/FeedAdapter.java
27d4544c7dce98f7ac5e7c84770e442f2619786d
[]
no_license
DevRogue20/Top10Downloader
ce06b678809c02c0bc976ae324e8c7c67de65514
3829e88fc737fd5ed72ce267e27f2f1b748ed5ae
refs/heads/main
2023-02-01T10:26:40.841997
2020-12-15T17:13:32
2020-12-15T17:13:32
321,736,732
0
0
null
null
null
null
UTF-8
Java
false
false
2,156
java
package com.tsd.top10downloader; import android.content.Context; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ArrayAdapter; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import java.util.List; public class FeedAdapter extends ArrayAdapter { private static final String TAG = "FeedAdapter"; private final int layoutResource; private final LayoutInflater layoutInflater; private List<FeedEntry> applications; public FeedAdapter(@NonNull Context context, int resource, List<FeedEntry> applications) { super(context, resource); this.layoutResource = resource; this.layoutInflater = LayoutInflater.from(context); this.applications = applications; } @Override public int getCount() { return applications.size(); } @NonNull @Override public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) { ViewHolder viewHolder; if (convertView == null) { Log.d(TAG, "getView: called with null convertView"); convertView = layoutInflater.inflate(layoutResource, parent, false); viewHolder = new ViewHolder(convertView); convertView.setTag(viewHolder); } else { Log.d(TAG, "getView: provided a convertView"); viewHolder = (ViewHolder) convertView.getTag(); } FeedEntry currentApp = applications.get(position); viewHolder.tvName.setText(currentApp.getName()); viewHolder.tvArtist.setText(currentApp.getArtist()); viewHolder.tvSummary.setText(currentApp.getSummary()); return convertView; } private class ViewHolder { final TextView tvName; final TextView tvArtist; final TextView tvSummary; ViewHolder(View v) { this.tvName = v.findViewById(R.id.tvName); this.tvArtist = v.findViewById(R.id.tvArtist); this.tvSummary = v.findViewById(R.id.tvSummary); } } }
[ "74317830+DevRogue20@users.noreply.github.com" ]
74317830+DevRogue20@users.noreply.github.com
5e5d2a9d77916cbd430a2e8a67a13a563ac1c75e
e15e124e0d0c0fedb07d57deeb807f796a37b57c
/src/main/java/com/imac/core/FinalTest.java
fd2d63b92c84c29f8dc6f1850d2a80cc8dca66c9
[]
no_license
imacback/portal
abc6a5f36cc85baf9d449a4eb3ea0d5ec036b8ba
18610f0826e5591e50b7e947df85d05e5626c952
refs/heads/master
2021-01-23T20:38:08.984717
2018-03-16T00:41:58
2018-03-16T00:41:58
102,867,978
0
0
null
null
null
null
UTF-8
Java
false
false
2,076
java
package com.imac.core; public class FinalTest { int i = 1; static FinalTest test; public FinalTest() { test = this; for (int j = 0; j < 10000000; j++) { } i = 2; } public static void write() { new FinalTest(); } public static void read() { if (test != null) { int tmp = test.i; System.out.println(tmp); } else { System.out.println("test is null"); } } public static void main(String[] args) throws Exception{ // Thread t1 = new Thread(new Runnable() { // @Override // public void run() { // try { // TimeUnit.SECONDS.sleep(1); // } catch (InterruptedException e) { // e.printStackTrace(); // } // write(); // //// try { //// TimeUnit.SECONDS.sleep(2); //// } catch (InterruptedException e) { //// e.printStackTrace(); //// } // } // }); // // t1.start(); // // Thread t2 = new Thread(new Runnable() { // @Override // public void run() { //// for (int i = 0; i < 100 ; i++) { //// read(); //// } // read(); // // } // }); // // t2.start(); System.out.println("result:" + CatchException()); } public static int test() { int i = 0; try { return 1; } catch (Exception e) { } finally { return 2; } } public static int CatchException(){ int i=10; try{ System.out.println("i in try block is--"+i); i=i/0; return --i; }catch(Exception e){ System.out.println("i in catch - form try block is--"+i); int j = i/0; return --i; } // finally{ // // System.out.println("i in finally - from try or catch block is--"+i); // --i; // System.out.println("i in finally block is--"+i); // //return --i; // } } }
[ "imacback@gmail.com" ]
imacback@gmail.com
e38b0a9e34f5d9c18ed016a7681c5edc9d94144d
09f5ac6ba9039072048a3830647012563cf81501
/MySolution/src/main/java/com/binarytree/SolutionMaxDepth.java
0ff90cbc19a7627742404aa3f59ef7c021624a56
[]
no_license
DrinkToWink/DataStructureAlgorithm
fe93ec87d80a50ebcee5f1528821286d793dca4c
bd05eba86631d4045d4a71708726b789c0ae0075
refs/heads/master
2023-05-08T03:06:46.410008
2021-05-29T03:25:41
2021-05-29T03:25:41
295,161,905
0
0
null
null
null
null
UTF-8
Java
false
false
800
java
package com.binarytree; /** * @author: 一个小菜逼 * @Date: 2020/4/25 * 二叉树的深度优先遍历(DFS),使用递归来实现的; * 二叉树的广度优先遍历(BFS),使用队列来实现 */ public class SolutionMaxDepth { public int maxDepth(TreeNode root){ if (root==null)return 0; //当一个节点的左节点和右节点都为空的时候,会进行递归的第一次返回,返回1 if (root.left==null && root.right==null)return 1; int max=Integer.MIN_VALUE; if (root.left!=null) max=Math.max(maxDepth(root.left),max); if (root.right!=null)max=Math.max(maxDepth(root.right),max); //max是左节点或者是右节点的最大值,加1就表示在加上本节点的深度 return max+1; } }
[ "2279104443@qq.com" ]
2279104443@qq.com
a5e23fd2ecf735abc64024133bf069b4b105bc54
eaab3d5b346190618cbec254ce3265c15cdeb699
/app/src/main/java/com/example/stackoverflowclientapp/common/BaseObservable.java
0097c85d6a95b91c01723ab12d98a0d7c805f8d7
[]
no_license
Vasiliy1711/git-test
12eb2da2be85a0f44ee7068adde37808e7157775
de559385c01a2ab8cd53ebcfe692e59bbae5b64b
refs/heads/main
2023-01-01T18:09:00.730959
2020-10-28T12:51:33
2020-10-28T12:51:33
307,146,185
0
0
null
null
null
null
UTF-8
Java
false
false
727
java
package com.example.stackoverflowclientapp.common; import java.util.Collections; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; public abstract class BaseObservable<LISTENER_CLASS> { // thread-safe set of listeners private final Set<LISTENER_CLASS> mListeners = Collections.newSetFromMap( new ConcurrentHashMap<LISTENER_CLASS, Boolean>(1)); public final void registerListener(LISTENER_CLASS listener) { mListeners.add(listener); } public final void unregisterListener(LISTENER_CLASS listener) { mListeners.remove(listener); } protected final Set<LISTENER_CLASS> getListeners() { return Collections.unmodifiableSet(mListeners); } }
[ "vas2011@ya.ru" ]
vas2011@ya.ru
503fe3603fbca91e35ddc90871834f165ddb2adb
3f8832413754de2a0de7369adca147b9e9a3f297
/src/main/java/com/github/taktos/dbflute/dao/exbhv/MemberAddressBhv.java
bbbd75a14b47670d952b164b5fa9fdfc7ebf38fb
[]
no_license
taktos/dbflute-cache
085e907cdb5649c6d44dc3043b2a726429f890f6
73c12e7a73192ef81348c6497bfdecb80333b1cb
refs/heads/master
2021-01-20T05:58:24.398496
2012-03-19T01:43:34
2012-03-20T14:25:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
368
java
package com.github.taktos.dbflute.dao.exbhv; import com.github.taktos.dbflute.dao.bsbhv.BsMemberAddressBhv; /** * The behavior of MEMBER_ADDRESS. * <p> * You can implement your original methods here. * This class remains when re-generating. * </p> * @author DBFlute(AutoGenerator) */ public class MemberAddressBhv extends BsMemberAddressBhv { }
[ "taktos@gmail.com" ]
taktos@gmail.com
f922ff48f37f0706ad141a96c889ec5eb7644255
01a4ded83ae5539af30c7418ab1ac38a98aa18f8
/jaxrs-scale/jaxrs-scale-dmv-war6/src/test/java/ejava/examples/jaxrsscale/dmv/client/ApproveApplicationAction.java
30a2a0b609bbaae48ed01cd35cac89feed2a7134
[]
no_license
DeepaBC/war-project
3a549221605bb68e6e81b8ef6549ef7deaf03de0
e8965a203b456b63e322a9dbb7519052779653ce
refs/heads/master
2020-04-30T21:08:50.751285
2012-12-12T16:40:29
2012-12-12T16:40:29
177,087,610
0
0
null
null
null
null
UTF-8
Java
false
false
318
java
package ejava.examples.jaxrsscale.dmv.client; import ejava.examples.jaxrsscale.dmv.lic.dto.Application; /** * This class implements the approval of a DMV application. */ public class ApproveApplicationAction extends PutApplicationAction { public Application approve() { return super.put(null); } }
[ "jcstaff@apl.jhu.edu" ]
jcstaff@apl.jhu.edu
624c2ec3ea4ca4dc38736b722e87da6f0a22350c
bfd8b0762738a000c83e5aeaf3a08247f0d3b7a5
/src/plains_E9.java
171a8efb3a3b324909698eb01837c80593345c34
[]
no_license
isaacwhi/GroupAssignment
656157d9d4e2c6b69fd953df8b05b12e3cba9386
a5e11552562005379a509b777962ac3a055547fe
refs/heads/master
2021-05-14T03:40:13.465138
2018-01-08T03:23:41
2018-01-08T03:23:41
116,623,997
0
0
null
2018-01-08T03:23:42
2018-01-08T03:21:57
Java
UTF-8
Java
false
false
7,247
java
import java.awt.*; import java.awt.event.*; public class plains_E9 extends extraFunctions { int direction; boolean flicker; plains_E9() { backgroundImage= loadImage("plains_E9.png"); direction = 0; //< DONT CHANGE flicker = true; //< DONT CHANGE } @Override public boolean updateMapMovement(Collision collisionPoints, Character player){ direction = collisionPoints.edgeCheck(player); switch (direction) { case 0: //do nothing break; case 1: //going up player.setCurrentMapLocation(20); flicker = false; return true; case 2: //going down player.setCurrentMapLocation(22); flicker = false; return true; case 3: // going right player.setCurrentMapLocation(29); flicker = false; return true; case 4: //going left player.setCurrentMapLocation(13); flicker = false; return true; } return false; } //////////////////////////////////////////////////////////// /// /// Collision /// /////////////////////////////////////////////////////////// @Override public void setUpCollision(Collision collisionPoints){ collisionPoints.addSmallCollisionPoint(5,5,flicker); collisionPoints.addSmallCollisionPoint(20,5,flicker); collisionPoints.addSmallCollisionPoint(10,1,flicker); //Right small house for (int i = 19;i < 31; i++){ collisionPoints.addSmallCollisionPoint(i,20,flicker); } for (int i = 5;i < 20; i++){ collisionPoints.addSmallCollisionPoint(19,i,flicker); } for (int i = 5;i < 20; i++){ collisionPoints.addSmallCollisionPoint(31,i,flicker); } collisionPoints.addSmallCollisionPoint(15,19,flicker); collisionPoints.addSmallCollisionPoint(21,4,flicker); collisionPoints.addSmallCollisionPoint(22,3,flicker); collisionPoints.addSmallCollisionPoint(23,2,flicker); collisionPoints.addSmallCollisionPoint(24,2,flicker); collisionPoints.addSmallCollisionPoint(25,2,flicker); collisionPoints.addSmallCollisionPoint(26,2,flicker); collisionPoints.addSmallCollisionPoint(27,2,flicker); collisionPoints.addSmallCollisionPoint(28,3,flicker); collisionPoints.addSmallCollisionPoint(29,4,flicker); collisionPoints.addSmallCollisionPoint(30,5,flicker); collisionPoints.addSmallCollisionPoint(58,28,flicker); collisionPoints.addSmallCollisionPoint(58,29,flicker); collisionPoints.addSmallCollisionPoint(58,30,flicker); //left small house for (int i = 4;i < 16; i++){ collisionPoints.addSmallCollisionPoint(i,20,flicker); } for (int i = 5;i < 20; i++){ collisionPoints.addSmallCollisionPoint(16,i,flicker); } for (int i = 5;i < 20; i++){ collisionPoints.addSmallCollisionPoint(4,i,flicker); } collisionPoints.addSmallCollisionPoint(6,4,flicker); collisionPoints.addSmallCollisionPoint(7,3,flicker); collisionPoints.addSmallCollisionPoint(8,2,flicker); collisionPoints.addSmallCollisionPoint(9,2,flicker); collisionPoints.addSmallCollisionPoint(10,2,flicker); collisionPoints.addSmallCollisionPoint(11,2,flicker); collisionPoints.addSmallCollisionPoint(12,2,flicker); collisionPoints.addSmallCollisionPoint(13,3,flicker); collisionPoints.addSmallCollisionPoint(14,4,flicker); collisionPoints.addSmallCollisionPoint(15,5,flicker); //big house for(int i = 30; i < 43;i++){ collisionPoints.addSmallCollisionPoint(59,i,flicker); } for(int i = 30; i < 43;i++){ collisionPoints.addSmallCollisionPoint(76,i,flicker); } for(int i = 59; i < 76;i++){ collisionPoints.addSmallCollisionPoint(i,43,flicker); } //pier for(int i = 48;i <= 78;i++){ collisionPoints.addSmallCollisionPoint(i,15,flicker); } for(int i = 48;i <= 78;i++){ collisionPoints.addSmallCollisionPoint(i,9,flicker); } // for(int i = 9;i < 15;i++){ // collisionPoints.addSmallCollisionPoint(76,i,flicker); // } //lake collisionPoints.addCollisionPoint(111,flicker); for(int i = 57,j = 28;i > 48;i--,j--){ collisionPoints.addSmallCollisionPoint(i,j,flicker); collisionPoints.addSmallCollisionPoint(i,j-1,flicker); } collisionPoints.addSmallCollisionPoint(48,20,flicker); for(int i = 16; i < 20;i++){ collisionPoints.addSmallCollisionPoint(48,i,flicker); } for(int i = 48,j = 8;i < 57;i++,j--){ collisionPoints.addSmallCollisionPoint(i,j,flicker); collisionPoints.addSmallCollisionPoint(i+1,j,flicker); } //Extra DETAILS //sign collisionPoints.addSmallCollisionPoint(37,50,flicker); collisionPoints.addSmallCollisionPoint(36,50,flicker); collisionPoints.addSmallCollisionPoint(38,50,flicker); collisionPoints.addSmallCollisionPoint(37,49,flicker); collisionPoints.addSmallCollisionPoint(36,49,flicker); collisionPoints.addSmallCollisionPoint(38,49,flicker); collisionPoints.addSmallCollisionPoint(37,48,flicker); collisionPoints.addSmallCollisionPoint(36,48,flicker); collisionPoints.addSmallCollisionPoint(38,48,flicker); //Wood collisionPoints.addSmallCollisionPoint(30,21,flicker); collisionPoints.addSmallCollisionPoint(30,20,flicker); collisionPoints.addSmallCollisionPoint(29,21,flicker); collisionPoints.addSmallCollisionPoint(29,20,flicker); collisionPoints.addSmallCollisionPoint(28,21,flicker); collisionPoints.addSmallCollisionPoint(28,20,flicker); //Fence for(int i = 51; i <= 58; i++) { collisionPoints.addSmallCollisionPoint(i, 32, flicker); } for(int i = 51; i <= 58; i++) { collisionPoints.addSmallCollisionPoint(i, 41, flicker); } for(int i = 32; i <= 41; i++) { collisionPoints.addSmallCollisionPoint(51, i, flicker); } //Bushes //Left collisionPoints.addSmallCollisionPoint(55, 42, flicker); collisionPoints.addSmallCollisionPoint(55, 43, flicker); collisionPoints.addSmallCollisionPoint(57, 44, flicker); collisionPoints.addSmallCollisionPoint(58, 44, flicker); collisionPoints.addSmallCollisionPoint(59, 44, flicker); collisionPoints.addSmallCollisionPoint(60, 44, flicker); collisionPoints.addSmallCollisionPoint(61, 44, flicker); //Right for(int i = 67; i <= 73; i++) { collisionPoints.addSmallCollisionPoint(i, 44, flicker); } } }
[ "bupton@hotmail.co.nz" ]
bupton@hotmail.co.nz
cc1addf17caac3feab9731dc7ad401d31b236bc5
a027decfa44fccc0eef63485b0087919690ecacc
/app/src/main/java/com/example/rafiw/securechild/selectDevice.java
908f49088ee32848c1c9a42a784d632b12e52cbf
[]
no_license
rafi4204/rafi.securechild
7f217706ab84e6ff961c7bb6320c19adb0a4f58d
2b825f46781a7c779d86893e67519b3fa26a9962
refs/heads/master
2020-04-03T03:20:43.230018
2018-10-27T16:01:05
2018-10-27T16:01:05
154,983,117
1
0
null
null
null
null
UTF-8
Java
false
false
1,820
java
package com.example.rafiw.securechild; import android.animation.ValueAnimator; import android.content.Intent; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import com.airbnb.lottie.LottieAnimationView; public class selectDevice extends AppCompatActivity { Button parent_device; Button child_device; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_select_device); final LottieAnimationView animationView = (LottieAnimationView) findViewById(R.id.animation_view); parent_device=(Button)findViewById(R.id.parent_device); child_device=(Button)findViewById(R.id.child_device); parent_device.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent=new Intent(selectDevice.this,Menu.class); startActivity(intent); } }); child_device.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent=new Intent(selectDevice.this,ChildMenu.class); startActivity(intent); } }); // Custom animation speed or duration. ValueAnimator animator = ValueAnimator.ofFloat(0f, 1f) .setDuration(5000); animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() { @Override public void onAnimationUpdate(ValueAnimator animation) { animationView.setProgress((Float) animation.getAnimatedValue()); } }); animator.start(); } }
[ "35198987+CyberneticsBd@users.noreply.github.com" ]
35198987+CyberneticsBd@users.noreply.github.com
485966cdb218a0669dc06abedde586039fb3ebdd
dc9fc55f754e23cd8acb80639a1bb675010f1fff
/part04-Part04_16.PaymentCard/src/main/java/PaymentCard.java
35338ea9afd311c9966599a2c52bd1bffdb7c038
[]
no_license
bhunk/java_mooc_2021
6fa3ecfd6b0c5cc915de3f96c6b6e64811826645
9ba73e80c656caa58e2a4f57b31aecbeb48ef432
refs/heads/master
2023-09-01T05:05:10.098006
2021-10-11T07:46:20
2021-10-11T07:46:20
407,077,667
0
0
null
null
null
null
UTF-8
Java
false
false
1,142
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. */ /** * * @author Zord */ public class PaymentCard { private double balance; public PaymentCard(double openingBalance){ this.balance = openingBalance; } public String toString() { return "The card has a balance of " + this.balance + " euros"; } public void eatAffordably() { if(this.balance < 0.9 || this.balance <2.60){ this.balance -= 0; }else{ this.balance -= 2.60; } } public void eatHeartily(){ if (this.balance < 0.9 || this.balance < 4.60){ this.balance -= 0; }else{ this.balance -= 4.60; } } public void addMoney(double amount) { if(amount < 0){ this.balance += 0; }else{ this.balance += amount; if(this.balance > 150){ this.balance = 150; } } } }
[ "bhunkin@live.com" ]
bhunkin@live.com
d7e065f1bfc23ac04edcae46358aa79f01327f35
91ba0e1cec427b0082942b90e7dd4770d3dad31f
/src/LecteurDvd.java
917b24186311d79e1e291b4d8f4766c696c3aa0b
[]
no_license
fbattet/HomeCinema
0051ac11d1823447b8043e37d0bc9422ff842133
c3262ce63517ab3c98e5e87d05c3b1bcc1d2c066
refs/heads/master
2021-01-11T21:50:09.073460
2017-01-16T12:06:53
2017-01-16T12:06:53
78,861,346
0
0
null
null
null
null
UTF-8
Java
false
false
1,052
java
/** * Created by association on 13/01/17. */ public class LecteurDvd { Amplificateur amplificateur; public LecteurDvd(Amplificateur amplificateur) { this.amplificateur = amplificateur; } public void marche() { System.out.println("Lecteur DVD allumée"); } public void arret() { System.out.println("Lecteur DVD éteint"); } public void ejecter() { System.out.println("DVD éjecté"); } public void pause() { System.out.println("Lecteur DVD en pause"); } public void jouer() { System.out.println("Lecture DVD"); } public void jouer(String film) { System.out.println("Lecture DVD : " + film); } public void setAudioSurround() { amplificateur.setSonSurround(); System.out.println("Audio Surround"); } public void setAudioStereo() { amplificateur.setSonStereo(); System.out.println("Audio Stéréo"); } public void stop() { System.out.println("DVD stoppé"); } }
[ "fbattet@outlook.com" ]
fbattet@outlook.com
ee97e928b807ba63e39b06baac9607eb8fcab33c
974217d3bcc66c53b5f1ebbec46234c618142351
/src/rfeng/junit/json/testJSONArray.java
1eb4f1ea5064bec40a9999fd78de2e7e9c830090
[]
no_license
shcniter/code_examples
acd354b8000deac38d2d507769777a8c82c0b06c
d27db760e55a60811f92f90f067cb71998ff7624
refs/heads/master
2020-05-17T03:42:25.298034
2013-02-13T02:30:08
2013-02-13T02:30:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
691
java
/******************************************************************************* * Copyright (c) 2007 Actuate Corporation. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Actuate Corporation - initial API and implementation *******************************************************************************/ package rfeng.junit.json; import org.json.JSONObject; /** * */ public class testJSONArray { JSONObject json = new JSONObject(); }
[ "shcn_iter@126.com" ]
shcn_iter@126.com
8df18414c9a9ede336ee2260c08859a48aed09aa
91297ffb10fb4a601cf1d261e32886e7c746c201
/projectapi/src/org/netbeans/spi/project/support/LookupProviderSupport.java
2b7ea6b72efa44be8216a23705f99333ba66ef46
[]
no_license
JavaQualitasCorpus/netbeans-7.3
0b0a49d8191393ef848241a4d0aa0ecc2a71ceba
60018fd982f9b0c9fa81702c49980db5a47f241e
refs/heads/master
2023-08-12T09:29:23.549956
2019-03-16T17:06:32
2019-03-16T17:06:32
167,005,013
0
0
null
null
null
null
UTF-8
Java
false
false
12,214
java
/* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. * * Copyright 1997-2010 Oracle and/or its affiliates. All rights reserved. * * Oracle and Java are registered trademarks of Oracle and/or its affiliates. * Other names may be trademarks of their respective owners. * * The contents of this file are subject to the terms of either the GNU * General Public License Version 2 only ("GPL") or the Common * Development and Distribution License("CDDL") (collectively, the * "License"). You may not use this file except in compliance with the * License. You can obtain a copy of the License at * http://www.netbeans.org/cddl-gplv2.html * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the * specific language governing permissions and limitations under the * License. When distributing the software, include this License Header * Notice in each file and include the License file at * nbbuild/licenses/CDDL-GPL-2-CP. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the GPL Version 2 section of the License file that * accompanied this code. If applicable, add the following below the * License Header, with the fields enclosed by brackets [] replaced by * your own identifying information: * "Portions Copyrighted [year] [name of copyright owner]" * * Contributor(s): * * The Original Software is NetBeans. The Initial Developer of the Original * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun * Microsystems, Inc. All Rights Reserved. * * If you wish your version of this file to be governed by only the CDDL * or only the GPL Version 2, indicate your decision by adding * "[Contributor] elects to include this software in this distribution * under the [CDDL or GPL Version 2] license." If you do not indicate a * single choice of license, a recipient has the option to distribute * your version of this file under either the CDDL, the GPL Version 2 or * to extend the choice of license to its licensees as provided above. * However, if you add GPL Version 2 code and therefore, elected the GPL * Version 2 license, then the option applies only if the new code is * made subject to such option by the copyright holder. */ package org.netbeans.spi.project.support; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.LinkedHashSet; import java.util.Set; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; import org.netbeans.api.project.SourceGroup; import org.netbeans.api.project.Sources; import org.netbeans.spi.project.ActionProvider; import org.netbeans.spi.project.LookupMerger; import org.netbeans.spi.project.LookupProvider; import org.openide.util.ChangeSupport; import org.openide.util.Exceptions; import org.openide.util.Lookup; import org.openide.util.LookupEvent; import org.openide.util.LookupListener; import org.openide.util.lookup.Lookups; /** * Factory for lookup capable of merging content from registered * {@link org.netbeans.spi.project.LookupProvider} instances. * @author mkleint * @since org.netbeans.modules.projectapi 1.12 */ public final class LookupProviderSupport { private LookupProviderSupport() { } /** * Creates a project lookup instance that combines the content from multiple sources. * A convenience factory method for implementors of Project. * <p>The pattern {@code Projects/TYPE/Lookup} is conventional for the folder path, and required if * {@link org.netbeans.spi.project.LookupProvider.Registration}, * {@link org.netbeans.spi.project.LookupMerger.Registration}, or * {@link org.netbeans.spi.project.ProjectServiceProvider} are used. * * @param baseLookup initial, base content of the project lookup created by the project owner * @param folderPath the path in the System Filesystem that is used as root for lookup composition, as for {@link Lookups#forPath}. * The content of the folder is assumed to be {@link LookupProvider} instances. * @return a lookup to be used in project */ public static Lookup createCompositeLookup(Lookup baseLookup, String folderPath) { return new DelegatingLookupImpl(baseLookup, Lookups.forPath(folderPath), folderPath); } /** * Creates a project lookup instance that combines the content from multiple sources. * A convenience factory method for implementors of Project. * <p>The pattern {@code Projects/TYPE/Lookup} is conventional for the folder path, and required if * {@link org.netbeans.spi.project.LookupProvider.Registration}, * {@link org.netbeans.spi.project.LookupMerger.Registration}, or * {@link org.netbeans.spi.project.ProjectServiceProvider} are used. * * @param baseLookup initial, base content of the project lookup created by the project owner * @param providers lookup containing the {@link LookupProvider} instances, typically created by aggregating multiple folder paths (see {@link Lookups#forPath}) * @return a lookup to be used in project * @since 1.49 */ public static Lookup createCompositeLookup(Lookup baseLookup, Lookup providers) { return new DelegatingLookupImpl(baseLookup, providers, "<multiplePaths>"); } /** * Factory method for creating {@link org.netbeans.spi.project.LookupMerger} instance that merges * {@link org.netbeans.api.project.Sources} instances in the project lookup. * Allows to compose the {@link org.netbeans.api.project.Sources} * content from multiple sources. * @return instance to include in project lookup */ public static LookupMerger<Sources> createSourcesMerger() { return new SourcesMerger(); } /** * Factory method for creating {@link org.netbeans.spi.project.LookupMerger} instance that merges * {@link org.netbeans.spi.project.ActionProvider} instances in the project lookup. * The first {@link org.netbeans.spi.project.ActionProvider} which supports the command and is * enabled on it_will perform it. * @return instance to include in project lookup * @since 1.38 */ public static LookupMerger<ActionProvider> createActionProviderMerger() { return new ActionProviderMerger(); } private static class SourcesMerger implements LookupMerger<Sources> { public @Override Class<Sources> getMergeableClass() { return Sources.class; } public @Override Sources merge(Lookup lookup) { return new SourcesImpl(lookup); } } private static class SourcesImpl implements Sources, ChangeListener, LookupListener { private final ChangeSupport changeSupport = new ChangeSupport(this); private final Lookup.Result<Sources> delegates; private Sources[] currentDelegates; @SuppressWarnings("LeakingThisInConstructor") SourcesImpl(Lookup lookup) { delegates = lookup.lookupResult(Sources.class); delegates.addLookupListener(this); } public @Override SourceGroup[] getSourceGroups(String type) { assert delegates != null; Sources[] _currentDelegates; synchronized (this) { if (currentDelegates == null) { Collection<? extends Sources> instances = delegates.allInstances(); currentDelegates = instances.toArray(new Sources[instances.size()]); for (Sources ns : currentDelegates) { ns.addChangeListener(this); } } _currentDelegates = currentDelegates; } Collection<SourceGroup> result = new ArrayList<SourceGroup>(); for (Sources ns : _currentDelegates) { SourceGroup[] sourceGroups = ns.getSourceGroups(type); if (sourceGroups != null) { for (SourceGroup sourceGroup : sourceGroups) { if (sourceGroup == null) { Exceptions.printStackTrace(new NullPointerException(ns + " returns null source group!")); } else { result.add(sourceGroup); } } } } return result.toArray(new SourceGroup[result.size()]); } @Override public synchronized void addChangeListener(ChangeListener listener) { changeSupport.addChangeListener(listener); } @Override public synchronized void removeChangeListener(ChangeListener listener) { changeSupport.removeChangeListener(listener); } public @Override void stateChanged(ChangeEvent e) { changeSupport.fireChange(); } public @Override void resultChanged(LookupEvent ev) { synchronized (this) { if (currentDelegates != null) { for (Sources old : currentDelegates) { old.removeChangeListener(this); } currentDelegates = null; } } changeSupport.fireChange(); } } private static final class ActionProviderMerger implements LookupMerger<ActionProvider> { @Override public Class<ActionProvider> getMergeableClass() { return ActionProvider.class; } @Override public ActionProvider merge(final Lookup lookup) { return new MergedActionProvider(lookup); } } private static final class MergedActionProvider implements ActionProvider, LookupListener { private final Lookup.Result<ActionProvider> lkpResult; @SuppressWarnings("VolatileArrayField") private volatile String[] actionNamesCache; @SuppressWarnings("LeakingThisInConstructor") private MergedActionProvider(final Lookup lkp) { this.lkpResult = lkp.lookupResult(ActionProvider.class); this.lkpResult.addLookupListener(this); } @Override public String[] getSupportedActions() { String[] result = actionNamesCache; if (result == null) { final Set<String> actionNames = new LinkedHashSet <String>(); for (ActionProvider ap : lkpResult.allInstances()) { actionNames.addAll(Arrays.asList(ap.getSupportedActions())); } result = actionNames.toArray(new String[actionNames.size()]); actionNamesCache = result; } assert result != null; return result; } @Override public boolean isActionEnabled(String command, Lookup context) throws IllegalArgumentException { boolean found = false; for (ActionProvider ap : lkpResult.allInstances()) { if (Arrays.asList(ap.getSupportedActions()).contains(command)) { if (ap.isActionEnabled(command, context)) { return true; } else { found = true; } } } if (found) { return false; } else { throw new IllegalArgumentException("Misimplemented command '" + command + "' in " + Arrays.toString(lkpResult.allInstances().toArray())); } } @Override public void invokeAction(String command, Lookup context) throws IllegalArgumentException { for (ActionProvider ap : lkpResult.allInstances()) { if (Arrays.asList(ap.getSupportedActions()).contains(command) && ap.isActionEnabled(command, context)) { ap.invokeAction(command, context); return; } } throw new IllegalArgumentException(String.format(command)); } @Override public void resultChanged(LookupEvent ev) { actionNamesCache = null; } } }
[ "taibi@sonar-scheduler.rd.tut.fi" ]
taibi@sonar-scheduler.rd.tut.fi
62cd32df57d1e172caa8bbdea4032c6f5da012ed
410dfd9f6d7476d6c9250c1a238485a74c8fa44a
/logmonitor/src/main/java/cn/lxj/bigdata/log/logMonitor/mail/MailAuthenticator.java
03104e525e56a69736d871b08142bed54640b672
[]
no_license
lixinjiang/bigdata
cefe60ec9a3cf2fa5a146d8972dfe1c49254a935
960d2d79d38ff25ebb5603b1983c38084df741a7
refs/heads/master
2020-04-05T00:53:44.028115
2019-02-26T03:01:45
2019-02-26T03:01:45
156,414,073
0
0
null
null
null
null
UTF-8
Java
false
false
629
java
package cn.lxj.bigdata.log.logMonitor.mail; import javax.mail.Authenticator; import javax.mail.PasswordAuthentication; /** * MailAuthenticator * description * create class by lxj 2019/1/31 **/ public class MailAuthenticator extends Authenticator { String userName; String userPassword; public MailAuthenticator() { super(); } public MailAuthenticator(String user, String pwd) { super(); userName = user; userPassword = pwd; } public PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(userName, userPassword); } }
[ "bonusli@163.com" ]
bonusli@163.com
7cc7f8e3a70e77acb6dfe471db0907e9a90d78e2
d4338a391abf83c30cf037203d34690085aa6ae7
/TGParallelTetsing/src/com/tgr/PageObjects/CreditDebitCardPaymentPage.java
ca023481d36c9471e095a8429aa83484578fd238
[]
no_license
DeepthiM24/TG-Automation
cbdb375f3dbdd1068823987f1fd3550e4aa7af62
3e94c89117bb03bb3c162c525b6ab8d859125577
refs/heads/master
2022-03-29T21:20:25.830962
2020-01-27T10:19:05
2020-01-27T10:19:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,516
java
package com.tgr.PageObjects; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.openqa.selenium.By; import org.openqa.selenium.JavascriptExecutor; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.How; import org.openqa.selenium.support.PageFactory; import org.openqa.selenium.support.ui.Select; import com.aventstack.extentreports.ExtentTest; import com.tgr.Utilities.MyOwnException; import wrapper.classes.methods.MyWait; import wrapper.classes.methods.MyWebElement; public class CreditDebitCardPaymentPage extends CommonPage { private static final Logger log = LogManager.getLogger(CreditDebitCardPaymentPage.class.getName()); WebDriver ldriver; ExtentTest testCase; public CreditDebitCardPaymentPage(WebDriver driver) { super(driver); this.ldriver = driver; PageFactory.initElements(driver, this); } // ===================== PAGE OBJECTS ====================== @FindBy(how = How.XPATH, using = "//*[@id=\"navigationButtons\"]/a[2]") public WebElement processPayment; @FindBy(how = How.ID, using = "ccNumber") public WebElement ccNumber; @FindBy(how = How.NAME, using = "expirationMonth") public WebElement expirationMonth; @FindBy(how = How.NAME, using = "expirationYear") public WebElement expirationYear; @FindBy(how = How.LINK_TEXT, using = "Use Garaging Address") public WebElement useGaragingLink; // ===================== PAGE METHODS ====================== public void creditdebitCardPaymentPage() throws InterruptedException, MyOwnException { log.info("METHOD(login) EXECUTION STARTED SUCCESSFULLY"); try { MyWait.until(ldriver, "ELEMENT_VISIBLE", 90, processPayment); MyWebElement.enterText(ccNumber, currentHash.get("ccNumber")); MyWebElement.enterText(expirationMonth, currentHash.get("expirationMonth")); MyWebElement.enterText(expirationYear, currentHash.get("expirationYear")); MyWait.implicitlyFor(ldriver, 10, "SECONDS"); useGaragingLink.click(); processPayment.click(); } catch (AssertionError exp) { log.error(exp.getMessage()); throwException("UNABLE TO open INTO THE TGR APPLICATION FROM THE METHOD login\n" + exp.getMessage() + "\n"); } catch (Exception exp) { log.error(exp.getMessage()); throwException("UNABLE TO open INTO THE TGR APPLICATION FROM THE METHOD login\n" + exp.getMessage() + "\n"); } log.info("METHOD(login) EXECUTED SUCCESSFULLY"); } }
[ "DMedikurthi@thegeneral.com" ]
DMedikurthi@thegeneral.com
2447d6a036bb94efcbf227291d05b8b60e69cf34
f593aa92d4dbac7bdf3073ef79d2d37e250f7ca5
/src/main/java/com/jmal/clouddisk/service/impl/TagService.java
6a166f8cf99cbe758c620716b0866cdc8d034728
[ "MIT" ]
permissive
wangscript007/jmal-cloud-server
d1101d589ccadc3a7602758af46c12f428d59df3
e912f5bfe9859206e483f8ed7429459712018920
refs/heads/master
2023-03-22T03:04:37.873046
2021-03-05T08:37:33
2021-03-05T08:37:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,186
java
package com.jmal.clouddisk.service.impl; import cn.hutool.extra.cglib.CglibUtil; import com.jmal.clouddisk.model.TagDO; import com.jmal.clouddisk.model.TagDTO; import com.jmal.clouddisk.util.MongoUtil; import com.jmal.clouddisk.util.ResponseResult; import com.jmal.clouddisk.util.ResultUtil; import org.bson.types.ObjectId; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.mongodb.core.MongoTemplate; import org.springframework.data.mongodb.core.query.Criteria; import org.springframework.data.mongodb.core.query.Query; import org.springframework.data.mongodb.core.query.Update; import org.springframework.stereotype.Service; import org.springframework.util.StringUtils; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; /** * @author jmal * @Description 分类管理 * @Date 2020/10/26 5:51 下午 */ @Service public class TagService { @Autowired private MongoTemplate mongoTemplate; private static final String USERID_PARAM = "userId"; private static final String COLLECTION_NAME = "tag"; /*** * 标签列表 * @param userId userId * @return List<TagDTO> */ public List<TagDTO> list(String userId) { Query query = getQueryUserId(userId); List<TagDO> tagList = mongoTemplate.find(query, TagDO.class, COLLECTION_NAME); return tagList.parallelStream().map(tag -> { TagDTO tagDTO = new TagDTO(); CglibUtil.copy(tag, tagDTO); return tagDTO; }).sorted().collect(Collectors.toList()); } /*** * 带有文章数的标签列表 * @return List<TagDTO> */ public List<TagDTO> listTagsOfArticle() { Query query = getQueryUserId(null); List<TagDO> tagList = mongoTemplate.find(query, TagDO.class, COLLECTION_NAME); return tagList.parallelStream().map(tag -> { TagDTO tagDTO = new TagDTO(); CglibUtil.copy(tag, tagDTO); getTagArticlesNum(tagDTO); tagDTO.setFontSize(Math.round(Math.log(tagDTO.getArticleNum() * 5) * 10)); tagDTO.setColor("rgb("+Math.round(Math.random() * 100 + 80)+","+Math.round(Math.random() * 100 + 80)+","+Math.round(Math.random() * 100 + 80)+")"); return tagDTO; }).filter(tag -> tag.getArticleNum() > 0).sorted().collect(Collectors.toList()); } /*** * 获取标签的文章数 * @param tagDTO tagDTO */ private void getTagArticlesNum(TagDTO tagDTO) { Query query = new Query(); query.addCriteria(Criteria.where("tagIds").is(tagDTO.getId())); query.addCriteria(Criteria.where("release").is(true)); tagDTO.setArticleNum(mongoTemplate.count(query, FileServiceImpl.COLLECTION_NAME)); } /*** * 获取查询条件 * @param userId userId * @return Query */ private Query getQueryUserId(String userId) { Query query = new Query(); if (!StringUtils.isEmpty(userId)) { query.addCriteria(Criteria.where(USERID_PARAM).is(userId)); } else { query.addCriteria(Criteria.where(USERID_PARAM).exists(false)); } return query; } /*** * 获取分类信息 * @param userId 用户id * @param tagName 标签名 * @return 一个分类信息 */ public TagDO getTagInfo(String userId, String tagName) { Query query = getQueryUserId(userId); query.addCriteria(Criteria.where("name").is(tagName)); return mongoTemplate.findOne(query, TagDO.class, COLLECTION_NAME); } /*** * 获取分类信息 * @param userId 用户id * @param tagSlugName 标签缩略名 * @return 一个分类信息 */ public TagDO getTagInfoBySlug(String userId, String tagSlugName) { Query query = getQueryUserId(userId); query.addCriteria(Criteria.where("slug").is(tagSlugName)); TagDO tag = mongoTemplate.findOne(query, TagDO.class, COLLECTION_NAME); if(tag == null){ tag = getTagInfo(userId, tagSlugName); } return tag; } /*** * 标签信息 * @param tagId tagId * @return Tag */ public TagDO getTagInfo(String tagId) { Query query = new Query(); query.addCriteria(Criteria.where("_id").is(tagId)); return mongoTemplate.findOne(query, TagDO.class, COLLECTION_NAME); } /*** * 添加标签 * @param tagDTO TagDTO * @return ResponseResult */ public ResponseResult<Object> add(TagDTO tagDTO) { if (tagExists(tagDTO)) { return ResultUtil.warning("该标签名称已存在"); } tagDTO.setSlug(getSlug(tagDTO)); TagDO tag = new TagDO(); CglibUtil.copy(tagDTO, tag); tag.setId(null); mongoTemplate.save(tag, COLLECTION_NAME); return ResultUtil.success(); } private boolean tagExists(TagDTO tagDTO) { TagDO tag = getTagInfo(tagDTO.getUserId(), tagDTO.getName()); return tag != null; } /*** * 更新标签 * @param tagDTO TagDTO * @return ResponseResult */ public ResponseResult<Object> update(TagDTO tagDTO) { TagDO tag1 = getTagInfo(tagDTO.getId()); if (tag1 == null) { return ResultUtil.warning("该标签不存在"); } Query query1 = new Query(); query1.addCriteria(Criteria.where("_id").nin(tagDTO.getId())); query1.addCriteria(Criteria.where("name").is(tagDTO.getName())); if(mongoTemplate.exists(query1, COLLECTION_NAME)){ return ResultUtil.warning("该标签名称已存在"); } tagDTO.setSlug(getSlug(tagDTO)); TagDO tag = new TagDO(); CglibUtil.copy(tagDTO, tag); Query query = new Query(); query.addCriteria(Criteria.where("_id").is(tagDTO.getId())); Update update = MongoUtil.getUpdate(tag); mongoTemplate.upsert(query, update, COLLECTION_NAME); return ResultUtil.success(); } private String getSlug(TagDTO tagDTO) { Query query = new Query(); String slug = tagDTO.getSlug(); if (StringUtils.isEmpty(slug)) { return tagDTO.getName(); } String id = tagDTO.getId(); if (id != null) { query.addCriteria(Criteria.where("_id").nin(id)); } query.addCriteria(Criteria.where("slug").is(slug)); if (mongoTemplate.exists(query, COLLECTION_NAME)) { return slug + "-1"; } return slug; } /*** * 删除标签 * @param tagIdList tagIdList */ public void delete(List<String> tagIdList) { Query query = new Query(); query.addCriteria(Criteria.where("_id").in(tagIdList)); mongoTemplate.remove(query, COLLECTION_NAME); } /** * 根据标签名获取标签Id * 没有相应的标签名则添加 * @param tagNames 签名集合 * @return 标签Id集合 */ public String[] getTagIdsByNames(String[] tagNames) { if(tagNames == null){ return new String[]{}; } List<String> tagNameList = Arrays.asList(tagNames); return tagNameList.parallelStream().map(this::getTagIdByName).toArray(String[]::new); } private String getTagIdByName(String tagName){ Query query = new Query(); query.addCriteria(Criteria.where("name").is(tagName)); TagDO tag = mongoTemplate.findOne(query, TagDO.class, COLLECTION_NAME); if(tag == null){ tag = new TagDO(); tag.setId(new ObjectId().toHexString()); tag.setName(tagName); tag.setSlug(tagName); mongoTemplate.save(tag, COLLECTION_NAME); } return tag.getId(); } /*** * 根据id查询标签列表 * @param tagIds 标签id集合 * @return 标签列表 */ public List<TagDO> getTagListByIds(String[] tagIds) { Query query = new Query(); query.addCriteria(Criteria.where("_id").in(tagIds)); return mongoTemplate.find(query, TagDO.class, COLLECTION_NAME); } }
[ "zhushilun084@gmail.com" ]
zhushilun084@gmail.com
2758bbc15b9d7b1d2bd67c07ae54aeffa4c5dca6
4e7ca4f3e71289a2e3109f05c15139dade9d974d
/Probabilities.java
5052a8a459f56c94d2c25fb8f7a9104d5f200b2d
[]
no_license
Siand/Cancel-
0ee96e8773d658fc48877ef193eeceb50791991e
3bc93c24b9055a790c2634e4406634a9461b4122
refs/heads/master
2016-08-12T12:44:51.751173
2016-03-17T13:14:14
2016-03-17T13:14:14
54,118,931
0
0
null
null
null
null
UTF-8
Java
false
false
5,462
java
/** * Save probabilities in some ArrayLists according to every feature * @author axr574 */ import java.util.ArrayList; import java.util.concurrent.ConcurrentHashMap; public class Probabilities{ ConcurrentHashMap<Integer, JobList> jobMap; // yes - cancelled jobs; no - not cancelled ArrayList<Float> rewardsYes = new ArrayList<Float>(); ArrayList<Float> rewardsNo = new ArrayList<Float>(); ArrayList<Float> weightsYes = new ArrayList<Float>(); ArrayList<Float> weightsNo = new ArrayList<Float>(); ArrayList<Float> numberYes = new ArrayList<Float>(); ArrayList<Float> numberNo = new ArrayList<Float>(); //number of cancelled jobs int yes = 0; //number of not cancelled jobs int no = 0; //the lower bound of the training set private int start; public Probabilities(ConcurrentHashMap<Integer, JobList> jobMap, int start) { this.jobMap = jobMap; this.start = start; for (int i = start; i < start + 80; i++) { if (jobMap.get(i).getCancelled()) yes++; else no++; } // countRewards(true, yes, rewardsYes); countRewards(false, no, rewardsNo); countWeights(true, yes, weightsYes); countWeights(false, no, weightsNo); countNumber(true, yes, numberYes); countNumber(false, no, numberNo); } public double getNumber(String type,int index) { if (type.equals("rewards")) return rewardsYes.get(index) +rewardsNo.get(index); else if (type.equals("weights")) return weightsYes.get(index) +weightsNo.get(index); else return numberYes.get(index)+numberNo.get(index); } // Counts how many jobs(out of 80) have their rewards/weights/nrOfObj within // a specific interval, taking into consideration if the jobs will be // cancelled or not. // Parameters: // type - the feature (rewards/weights/nrOfObj) on which this method is // applied; instead of creating a method for every feature, I have created // a universal one that requires the feature as a parameter // min - the lower bound of the interval // max - the upper bound of the interval // cancelled - whether the job will be cancelled or not, reading from the // file private int count(String type, double min, double max, boolean cancelled) { int count = 0; float value = 0; for (int i = start; i < start + 80; i++) { if (type.equals("rewards")) { value = jobMap.get(i).getTotalReward(); } else if (type.equals("weights")) { value = jobMap.get(i).getTotalWeight(); } else if (type.equals("number")) { value = jobMap.get(i).getTotalN(); } if (value >= min && value < max && cancelled == jobMap.get(i).getCancelled()) { count++; } } return count; } // Intervals: // [0,3) // [3,4) // [4,5) // [5,6) // ... // [16,17) // [17,18) // [18,10000) // the ArrayList will retain the probabilities of jobs to be cancelled or // not, according to their rewards and split in // intervals; the size of the ArrayList is equal to the number of intervals private void countRewards(boolean cancelled, int nr, ArrayList<Float> array) { float count = 0; // the first interval for (int i = 0; i < 260; i+=2) { count = count("rewards", i, i + 2, cancelled); //array.add(count / nr); array.add(count); } // the last interval count = count("rewards", 260, 10000, cancelled); //array.add(count / nr); array.add(count); } // Intervals // [0, 0.3) // [0.3, 0.6) // [0.6, 0.9) // ... // [5.1, 5.4) // [5.4, 10000) // the ArrayList will retain the probabilities of jobs to be cancelled or // not, according to their weights and split in // intervals; the size of the ArrayList is equal to the number of intervals private void countWeights(boolean cancelled, int nr, ArrayList<Float> array) { float count = 0; for (double i = 0; i < 60; i += 2) { count = count("weights", i, i + 2, cancelled); //array.add(count / nr); array.add(count); } //the last interval count = count("weights", 60, 10000, cancelled); //array.add(count / nr); array.add(count); } // Intervals // [0,1) // [1,2) // [2,3) // ... // [19,20) // [20,1000) // the ArrayList will retain the probabilities of jobs to be cancelled or // not, according to their nrOfObjects and split in // intervals ; the size of the ArrayList is equal to the number of intervals private void countNumber(boolean cancelled, int nr, ArrayList<Float> array) { float count = 0; for (double i = 0; i < 20; i += 1) { count = count("number", i, i + 1, cancelled); //array.add(count / nr); array.add(count); } //the last interval count = count("number", 20, 10000, cancelled); //array.add(count / nr); array.add(count); } /** * Get the arrayList of a specific feature, taking into consideration whether the job will be cancelled or not * * @param cancelled * whether the job will be cancelled or not, reading from the * file * @param type * the feature (rewards/weights/number) * @return the arrayList */ public ArrayList<Float> get(boolean cancelled, String type) { if (cancelled) { if (type.equals("rewards")) return rewardsYes; else if (type.equals("weights")) return weightsYes; else if (type.equals("number")) return numberYes; else return null; } else { if (type.equals("rewards")) return rewardsNo; else if (type.equals("weights")) return weightsNo; else if (type.equals("number")) return numberNo; else return null; } } }
[ "sxs1307@cs.bham.ac.uk" ]
sxs1307@cs.bham.ac.uk
0896e91c22364a7867bdc6aaa2103e1b9316caf2
4caed1b7d63509d710f755b814b41a163d3cc15f
/src/main/java/demo/service/PaymentService.java
40a4071d82acae949977360567117182fea00ad9
[]
no_license
prakhag1/ecomm-monolith
c3940398f169d68f2e8e3d062c29949bdd04d71a
4c4f8fb9932f3d2a11f94d0194a7d9e51d64db6c
refs/heads/master
2022-11-30T22:16:23.417887
2020-08-04T06:48:52
2020-08-04T06:48:52
255,371,238
2
1
null
2020-08-03T12:11:00
2020-04-13T15:48:01
Java
UTF-8
Java
false
false
213
java
package demo.service; import org.springframework.stereotype.Service; @Service public class PaymentService { // Dummy payment processing public Boolean makePayment() throws Exception { return true; } }
[ "prakhar_au@yahoo.com" ]
prakhar_au@yahoo.com
f86ec69d9fe18de3eac8433fb82c6d6b5f71bc1b
bdd257cb718384c69b6c238421bae9992408a9ed
/app/src/main/java/com/goyo/in/UpdateLocationService.java
2f65d8882adb41f91c0b621c3f1e325021acf559
[]
no_license
mineofcode/gyo_customer_mn
09e5b8c4aea7032dd6fcc398048416c01976fab5
7c0073edefa00af3ecb7e19a017c05ad1ea773ae
refs/heads/master
2023-04-30T19:27:45.399080
2018-11-02T11:02:04
2018-11-02T11:02:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,956
java
package com.goyo.in; import android.Manifest; import android.app.Service; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.location.Location; import android.location.LocationManager; import android.os.Bundle; import android.os.IBinder; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.ActivityCompat; import android.util.Log; import com.goyo.in.Utils.Constant; import com.goyo.in.Utils.Preferences; import com.goyo.in.VolleyLibrary.RequestInterface; import com.goyo.in.VolleyLibrary.VolleyRequestClassNew; import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.api.GoogleApiClient; import com.google.android.gms.common.api.ResultCallback; import com.google.android.gms.common.api.Status; import com.google.android.gms.location.LocationListener; import com.google.android.gms.location.LocationRequest; import com.google.android.gms.location.LocationServices; import org.json.JSONException; import org.json.JSONObject; import okhttp3.HttpUrl; public class UpdateLocationService extends Service implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener, ResultCallback<Status>, LocationListener { @Nullable @Override public IBinder onBind(Intent intent) { return null; } private LocationManager mLocationManager = null; LocationRequest mLocationRequest; double gpsLat, gpsLong; private GoogleApiClient googleApiClient; @Override public void onConnected(@Nullable Bundle bundle) { startLocationUpdates(); } public void startLocationUpdates() { if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) { // TODO: Consider calling // ActivityCompat#requestPermissions // here to request the missing permissions, and then overriding // public void onRequestPermissionsResult(int requestCode, String[] permissions, // int[] grantResults) // to handle the case where the user grants the permission. See the documentation // for ActivityCompat#requestPermissions for more details. return; } LocationServices.FusedLocationApi.requestLocationUpdates(googleApiClient, mLocationRequest, this); } @Override public void onConnectionSuspended(int i) { } @Override public void onConnectionFailed(@NonNull ConnectionResult connectionResult) { } @Override public void onResult(@NonNull Status status) { } private void update_location(double lat, double lng) { HttpUrl.Builder urlBuilder = HttpUrl.parse(Constant.UPDATE_LOCATION).newBuilder(); urlBuilder.addQueryParameter("device", "ANDROID"); urlBuilder.addQueryParameter("lang", "en"); urlBuilder.addQueryParameter("login_id", Preferences.getValue_String(getApplicationContext(), Preferences.USER_ID)); urlBuilder.addQueryParameter("v_token", Preferences.getValue_String(getApplicationContext(), Preferences.USER_AUTH_TOKEN)); urlBuilder.addQueryParameter("l_latitude", String.valueOf(lat)); urlBuilder.addQueryParameter("l_longitude", String.valueOf(lng)); String url = urlBuilder.build().toString(); String newurl = url.replaceAll(" ", "%20"); okhttp3.Request request = new okhttp3.Request.Builder().url(newurl).build(); VolleyRequestClassNew.allRequest(UpdateLocationService.this, newurl, new RequestInterface() { @Override public void onResult(JSONObject response) { try { int status = response.getInt("status"); if (status == 1) { Log.e("UpdateLocation", "onResult: Updating"); } else { Log.e("UpdateLocation", "onResult: Fail to Update"); } } catch (JSONException e) { e.printStackTrace(); } } }); } @Override public int onStartCommand(Intent intent, int flags, int startId) { Log.e("Update Service", "onStartCommand"); super.onStartCommand(intent, flags, startId); createGoogleApi(); Intent intent1 = intent; if (intent1 != null) { Log.e("Update Service", "Start Update Service"); if (intent.getExtras() != null) { googleApiClient.connect(); } } else { if (googleApiClient != null && googleApiClient.isConnected()) { stopLocationUpdates(); googleApiClient.disconnect(); this.stopSelf(); } } mLocationRequest = LocationRequest.create() .setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY) .setInterval(1000 * 60) .setFastestInterval(1000 * 60); Log.i("LOG_TAG", "onStartCommand-->" + startId); googleApiClient.connect(); return START_NOT_STICKY; } private void createGoogleApi() { if (googleApiClient == null) { googleApiClient = new GoogleApiClient.Builder(this) .addConnectionCallbacks(this) .addOnConnectionFailedListener(this) .addApi(LocationServices.API) .build(); } } @Override public void onCreate() { createGoogleApi(); } @Override public void onDestroy() { super.onDestroy(); Log.i("TAG", "onDestroy"); if (googleApiClient != null && googleApiClient.isConnected()) { stopLocationUpdates(); googleApiClient.disconnect(); this.stopSelf(); } } public void stopLocationUpdates() { if (googleApiClient.isConnected()) { LocationServices.FusedLocationApi.removeLocationUpdates(googleApiClient, this); } } private void initializeLocationManager() { Log.e("Update Service", "initializeLocationManager"); if (mLocationManager == null) { mLocationManager = (LocationManager) getApplicationContext().getSystemService(Context.LOCATION_SERVICE); } } @Override public void onLocationChanged(Location location) { if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) { // TODO: Consider calling // ActivityCompat#requestPermissions // here to request the missing permissions, and then overriding // public void onRequestPermissionsResult(int requestCode, String[] permissions, // int[] grantResults) // to handle the case where the user grants the permission. See the documentation // for ActivityCompat#requestPermissions for more details. return; } location = LocationServices.FusedLocationApi.getLastLocation(googleApiClient); if (location != null) { //Getting longitude and latitude gpsLat = location.getLatitude(); gpsLong = location.getLongitude(); Log.e("UpdateLocation", "onLocationChanged: " + gpsLat + " " + gpsLong); if (Constant.isOnline(UpdateLocationService.this)) { update_location(gpsLat, gpsLong); } } } }
[ "pratik@ideas2tech.com" ]
pratik@ideas2tech.com
83fe2d8d5285c6dd00b00cebd9f983758a9d5c31
4eb28d9f9164d283a81e439f61c6941a8e5c4427
/HabitatForHumanity/src/controller/TaskPaneController.java
8f17272ddb0e358115be8930eebec8b53809218a
[]
no_license
GaracktheMad/CSE248FinalProject
e8ee4ac43c1c175745d03a474ea4392706e6a57e
938f53d2c3b018cc18e0e53dd89bf98cd3021166
refs/heads/master
2021-03-24T09:50:36.950525
2018-05-17T00:41:17
2018-05-17T00:41:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,729
java
package controller; import javafx.fxml.FXML; import javafx.scene.control.Button; import javafx.scene.control.TextField; import model.Data; import model.InvalidListTypeException; import view.FXMLLoadingController; import java.io.IOException; import javafx.event.ActionEvent; import javafx.scene.control.Label; import javafx.scene.control.PasswordField; public class TaskPaneController implements LogsOut { @FXML private Button productViewBtn; @FXML private TextField userIDBox; @FXML private Label changePassLbl; @FXML private PasswordField currentPass; @FXML private PasswordField newPass; @FXML private PasswordField newPassRetype; @FXML private Button submitButton; @FXML private Button exitButton; @FXML private Button createItemBtn; @FXML private Button myOrders; @FXML private Button manageOrders; @FXML private Button invoiceBtn; @FXML void activateMyOrders(ActionEvent event) { try { FXMLLoadingController.list("my orders"); } catch (IOException | InvalidListTypeException e) { e.printStackTrace(); } } @FXML void masterInvoiceGen(ActionEvent event) { try { FXMLLoadingController.invoiceGen(); } catch (IOException e) { e.printStackTrace(); } } @FXML void orderManagement(ActionEvent event) { try { FXMLLoadingController.list("orders"); } catch (IOException | InvalidListTypeException e) { e.printStackTrace(); } } @FXML void activateProductList(ActionEvent event) { try { FXMLLoadingController.list("Items"); } catch (IOException e) { e.printStackTrace(); } catch (InvalidListTypeException e) { e.printStackTrace(); } } @FXML void attemptPassChange(ActionEvent event) { int result = CurrentUserController.setPassword(currentPass.getText(), newPass.getText(), newPassRetype.getText()); if (result == 0) { changePassLbl.setText("New Passwords Do Not Match!"); } else if (result == -1) { changePassLbl.setText("PASSWORD NOT RECOGNIZED"); } else if (result == 1) { changePassLbl.setText("Success!"); try { Data.save(); } catch (IOException e) { e.printStackTrace(); } } else { changePassLbl.setText("ERROR"); } } @FXML void createItem(ActionEvent event) { try { FXMLLoadingController.createItem(); } catch (IOException e) { e.printStackTrace(); } } @FXML void logout(ActionEvent event) { exit(); } @FXML void initialize() { if (CurrentUserController.userIsClerk() != null) { createItemBtn.setVisible(true); createItemBtn.setDisable(false); invoiceBtn.setVisible(true); invoiceBtn.setDisable(false); manageOrders.setVisible(true); manageOrders.setDisable(false); } userIDBox.setText(CurrentUserController.getID().toString()); } }
[ "robodude55@hotmail.com" ]
robodude55@hotmail.com
ae811d5a661c85f5d93a8057108bf2d41d6dc648
ebcebf0d0e14216f59bc690909dc93b54483bb29
/DocxReader.java
17ab148730f51eb18e47eb4d6861a8a33ca7c417
[]
no_license
y4u/regexWithResumeParser
e8896155dadd66991485c8be22f3cc60e300ab9a
47080474a3587d3fd215d4bc219261bfd309902d
refs/heads/master
2020-04-15T09:54:13.702118
2019-01-18T14:08:04
2019-01-18T14:08:04
164,570,936
0
0
null
null
null
null
UTF-8
Java
false
false
4,754
java
package reader; import java.io.File; import java.io.FileInputStream; import java.util.ArrayList; import java.util.List; import java.util.regex.Matcher; import java.util.regex.Pattern; import org.apache.poi.xwpf.usermodel.XWPFDocument; import org.apache.poi.xwpf.usermodel.XWPFParagraph; public class DocxReader { static List<String> skillsList = new ArrayList<>(); static List<String> emailList = new ArrayList<>(); static List<String> phoneNumbers = new ArrayList<>(); public static void readDocxFile(String fileName) { try { File file = new File(fileName); FileInputStream fis = new FileInputStream(file.getAbsolutePath()); XWPFDocument document = new XWPFDocument(fis); List<XWPFParagraph> paragraphs = document.getParagraphs(); for (int i = 0; i < paragraphs.size(); i++) { String bodyData =(paragraphs.get(i).getParagraphText()); // System.out.println(bodyData); findEmail(bodyData); findPhoneNumber(bodyData); findApplicantSkills(bodyData); } System.out.println(skillsList); System.out.println(emailList); System.out.println(phoneNumbers); } catch (Exception e) { e.printStackTrace(); } } private static void findEmail(String details) { Pattern pattern = Pattern.compile(RegEx.EMAIL.toString(), Pattern.MULTILINE); Matcher matcher = pattern.matcher(details); while (matcher.find()) { emailList.add(matcher.group()); } } /** * Find phone numbers in the resume * * @param line to search for * @return phone numbers found from resume */ private static void findPhoneNumber(String line) { Pattern pattern = Pattern.compile(RegEx.PHONE.toString(), Pattern.MULTILINE | Pattern.DOTALL); Matcher matcher = pattern.matcher(line); while (matcher.find()) { phoneNumbers.add(matcher.group()); } } private static String findEducations(String line) { ParserHelper parser = new ParserHelper(); // just like findWorkExperiences int indexOfEducation = parser.getIndexOfThisSection(RegEx.EDUCATION, line); if (indexOfEducation != -1) { int nextSectionIndex = 0; List<Integer> listOfSectionIndexes = parser.getAllSectionIndexes(line); String educationsText = line.replaceFirst(RegEx.EDUCATION.toString(), ""); for (int index = 0; index < listOfSectionIndexes.size(); index++) { if (listOfSectionIndexes.get(index) == indexOfEducation) { // if education is the last section, then there is no // nextSectionIndex if (index == listOfSectionIndexes.size() - 1) { return educationsText.substring(indexOfEducation); } else { // index + 1: where index is the index of education section heading, +1 // the index of the next section heading nextSectionIndex = listOfSectionIndexes.get(index + 1); break; } } } return educationsText.substring(indexOfEducation, nextSectionIndex); } return ""; } private static String findWorkExperiences(String line) { ParserHelper parser = new ParserHelper(); /* * Algorithm: copy texts starting from experience section index to the following * section index experience index is LESS THAN the following section index, * therefore * * Example: section indexes [24, 355, 534, 669] index of experience section = * 355 therefore, the following section index would be 534 we can get the texts * that encompasses experience section by substring => (indexOfExperience, * beginIndexOfFollowingSection) * */ int indexOfExperience = parser.getIndexOfThisSection(RegEx.EXPERIENCE, line); if (indexOfExperience != -1) { int nextSectionIndex = 0; // index that follows experience section String experiencesText = line.replaceFirst(RegEx.EXPERIENCE.toString(), ""); for (int index = 0; index < parser.getAllSectionIndexes(line).size(); index++) { if (parser.getAllSectionIndexes(line).get(index) == indexOfExperience) { // experience section is not always in the middle // rarely they may appear as the last section if (index == parser.getAllSectionIndexes(line).size() - 1) { return experiencesText.substring(indexOfExperience); } else { nextSectionIndex = parser.getAllSectionIndexes(line).get(index + 1); break; } } } return experiencesText.substring(indexOfExperience, nextSectionIndex); } return ""; } private static void findApplicantSkills(String skillsFromResume) { Pattern pattern = Pattern.compile(RegEx.SKILLS.toString(),Pattern.DOTALL |Pattern.MULTILINE ); Matcher matcher = pattern.matcher(skillsFromResume); while (matcher.find()) { skillsList.add(matcher.group()); //System.out.println(skillsList); } } public static void main(String[] args) { readDocxFile("/home/agile/Downloads/Resume.docx"); } }
[ "noreply@github.com" ]
y4u.noreply@github.com
fe9c6ddae8b994909bf59af6bea679bb12febf7c
4acd854c17c1cc730fd6b000994ba61342f26869
/src/Spring/Aop_two/MyBeanFactory.java
5d7842d964b646079d3199221a31b9b783841634
[]
no_license
Morty123456/LeetCode
836b2e9e72e94db5ce0244bc11e3bd4ce56dcf01
c2de2f6e4ea0978bea8727d43375ec72cc8f4062
refs/heads/master
2020-11-26T20:12:06.048471
2020-11-23T02:10:09
2020-11-23T02:10:09
229,196,094
0
0
null
null
null
null
UTF-8
Java
false
false
2,148
java
package Spring.Aop_two; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; /** * @author: wzh * @time: 2020/8/21 9:53 * @description: */ public class MyBeanFactory { public static UserService createService(){ //目标类 UserService userService = new UserServiceImpl(); //切面类 MyAspect myAspect = new MyAspect(); /* 代理类:将目标类 和 切面类 结合 Proxy.newProxyInstance 的三个参数 loader:类加载器,动态代理类运行时创建,任何类都需要类加载将其加载到内存 可选参数:当前类.class.getClassLoader() 目标类实例.getClass().getClassLoader() Class[] interfaces:代理类需要实现的所有接口 方式1:目标类实例.getClass.getInterfaces() //这样做只能获得自己的接口,不能获得父元素的接口 方式2:new Class[]{UserService.class} InvocationHandler:动态代理类的调用处理程序,需要重写 invoke 方法,代理类的每一个方法执行时,都会调用一次 invoke 参数1:Object proxy:代理对象 参数2:Method method:代理对象当前执行的方法的描述对象 执行方法名:method.getName() 执行方法:method.invoke(对象,实际参数) 参数3:Object[] args:方法实际参数 */ UserService proxyService = (UserService) Proxy.newProxyInstance( MyBeanFactory.class.getClassLoader(), userService.getClass().getInterfaces(), new InvocationHandler() { @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { myAspect.before(); Object obj = method.invoke(userService, args); myAspect.after(); return obj; } }); return proxyService; } }
[ "13021151355@163.com" ]
13021151355@163.com
3587a4c9fb9e68202f47e02dccd183b1b6937c1c
65287f4533e36d48c3bff52a7bf1e92c27102672
/src/main/java/urim/client/rest/ScriptClient.java
69513ca08788fd7d05511f04f9c5c7dfad716615
[ "MIT" ]
permissive
wayz-of-chang/Urim
fc84e90e925bc5b01ba11535d5dd95f6937c12d2
99ef43767fd049c42692d3e200b0e31a3427fbce
refs/heads/master
2021-01-15T10:29:20.108828
2016-10-07T21:47:55
2016-10-07T21:47:55
58,745,769
0
1
null
null
null
null
UTF-8
Java
false
false
697
java
package urim.client.rest; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import urim.Message; import urim.client.task.ScriptTask; @RestController public class ScriptClient extends Client { @RequestMapping(value = "/script", method = RequestMethod.GET) public Message script(@RequestParam(value="name", defaultValue="") String name) { return new Message(counter.incrementAndGet(), new ScriptTask().getStats(name), this.name, new Parameters("script", this.name, name)); } }
[ "david@dchang.no-ip.org" ]
david@dchang.no-ip.org
28f2716d17bf6a829e8ca4b1a571ce95605cb915
da5a2d2050ac529a19e14a8ea3f9f21714cc2b5d
/app/src/main/java/rx/exceptions/CompositeException$WrappedPrintStream.java
0b5b4f376276d34881445b2563694eff68a5162e
[]
no_license
F0rth/Izly
851bf22e53ea720fd03f03269d015efd7d8de5a4
89af45cedfc38e370a64c9fa341815070cdf49d6
refs/heads/master
2021-07-17T15:39:25.947444
2017-10-21T10:05:58
2017-10-21T10:05:58
108,004,099
1
1
null
2017-10-23T15:51:00
2017-10-23T15:51:00
null
UTF-8
Java
false
false
461
java
package rx.exceptions; import java.io.PrintStream; class CompositeException$WrappedPrintStream extends CompositeException$PrintStreamOrWriter { private final PrintStream printStream; CompositeException$WrappedPrintStream(PrintStream printStream) { super(); this.printStream = printStream; } Object lock() { return this.printStream; } void println(Object obj) { this.printStream.println(obj); } }
[ "baptiste.robert@sigma.se" ]
baptiste.robert@sigma.se
4f83849d8b551c5cd955ec47259394eb8f7ed309
14f4c680c4f71663efabdafa8ebc2d709e40436f
/src/main/java/gradle/demo/dao/CourseMapper.java
b50d57101659d78c5a144a9c350015d7a223dd87
[ "Apache-2.0" ]
permissive
Vip-Augus/gradle-demo
22fc55442150f07471f6f8d914fe1eb69715b592
b790d449241d4b406e123d9375a9af49f5847c84
refs/heads/master
2021-04-09T15:44:56.874049
2019-09-22T15:21:07
2019-09-22T15:21:07
125,706,060
1
2
null
null
null
null
UTF-8
Java
false
false
1,027
java
package gradle.demo.dao; import gradle.demo.base.BaseMapperTemplate; import gradle.demo.model.Course; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import java.util.List; /** * @author JingQ on 2017/12/24. */ @Mapper public interface CourseMapper extends BaseMapperTemplate<Course> { /** * 批量查询 * * @param ids 课程ID列表 * @return 课程列表 */ List<Course> selectByIds(@Param("ids") List<Integer> ids); /** * 查询室使用情况--正在上的课 * * @param classroomId 室ID * @param day 周几 * @param currentTime 当前时间 * @return */ List<Course> selectInUseByClassroomId(@Param("classroomId") Integer classroomId, @Param("day") Integer day, @Param("currentTime") String currentTime); /** * 根据识别码进行课程查询 * * @param code 课程识别码 * @return 课程信息 */ Course selectByCode(@Param("code") String code); }
[ "850366301@qq.com" ]
850366301@qq.com
bfb5dc24a3781a69a53d4a59d5488c5c304f36dd
230eecc5b1059861257f2371b34d6520c58c993c
/src/main/java/com/springboot/chapter5/controller/JpaController.java
fa461b66e4bc531b0904740b7421625cf3d13c62
[]
no_license
wangrunze-git/spring_demo1
16acfede9b1c9ed7428cc59fa176094fef66171e
78ddbc15f8721b1039f051fe6f15871e20d03a77
refs/heads/master
2023-04-16T02:41:28.212561
2021-04-25T09:58:14
2021-04-25T09:58:14
351,079,942
0
0
null
null
null
null
UTF-8
Java
false
false
2,048
java
package com.springboot.chapter5.controller; import com.springboot.chapter5.dao.JpaUserRepository; import com.springboot.chapter5.pojo.User; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import java.util.List; @Controller @RequestMapping("/jpa") public class JpaController { //注入JPA接口,这里不需要使用实现类 @Autowired private JpaUserRepository jpaUserRepository = null; @RequestMapping("/printTest") @ResponseBody public String printTest(){ return "test"; } @RequestMapping("/getUser") @ResponseBody public User getUser(Long id){ //使用JPA接口查询对象 User user = jpaUserRepository.findById(id).get(); return user; } @RequestMapping("/findUsers") @ResponseBody public List<User> findUsers(String userName, String note){ //使用JPA接口查询对象 List<User> users = jpaUserRepository.findUsers(userName, note); return users; } @RequestMapping("/getUserById") @ResponseBody public User getUserById(Long id){ //使用JPA接口查询对象 User user = jpaUserRepository.getUserById(id); return user; } @RequestMapping("/findByUserNameLike") @ResponseBody public List<User> findByUserNameLike(String userName){ //使用JPA接口查询对象 List<User> userList = jpaUserRepository.findByUserNameLike("%" + userName + "%"); return userList; } @RequestMapping("/findByUserNameLikeOrNoteLike") @ResponseBody public List<User> findByUserNameLikeOrNoteLike(String userName, String note){ String userNameLike = "%" + userName + "%"; String noteLike = "%" + note + "%"; List<User> userList = jpaUserRepository.findByUserNameLikeOrNoteLike(userNameLike, noteLike); return userList; } }
[ "wangrunze-git@163.com" ]
wangrunze-git@163.com
4262a0cff9535ca1070e3510621a11264afdfb30
09dcc67c72e2bd8e3f26edeb7602fffeceac7f5c
/src/test/java/me/sangmessi/soccer/index/IndexControllerTest.java
6dda7c36ddde6ce700a4fc67d87fb1fea39b1b3f
[]
no_license
messi1913/soccer
93751029e3bc12c1ea3a209669c2915eb4c83079
c43b932e6d58bb1fc83fe4ace7e8e3958353f75f
refs/heads/master
2020-04-17T14:51:43.840056
2019-01-20T15:09:28
2019-01-20T15:09:28
166,674,723
0
0
null
null
null
null
UTF-8
Java
false
false
701
java
package me.sangmessi.soccer.index; import me.sangmessi.soccer.common.BaseControllerTest; import org.junit.Test; import static org.junit.Assert.*; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; public class IndexControllerTest extends BaseControllerTest { @Test public void index() throws Exception { this.mockMvc.perform(get("/api/")) .andExpect(status().isOk()) .andExpect(jsonPath("_links.accounts").exists()) ; } }
[ "messi1913@gmail.com" ]
messi1913@gmail.com
6f241c9b9f7363370a40f216fca28edbb6861f92
2957ddb7b0eeccbec84c5e08d3769d27ca75e7d6
/src/test/java/com/test/spring/service/MemberServiceIntTest.java
fcd9c903447b4762b759a9881a707ae01cdb54d7
[]
no_license
kimgwanghoon/springBoot
a063634b8c550ea8fedef68134b55cfb12eb87a2
3ad90aaa3edad6ae96afa2abd25521acbaf3ea02
refs/heads/master
2023-04-22T07:41:51.683811
2021-05-09T13:50:54
2021-05-09T13:50:54
364,745,164
0
0
null
null
null
null
UTF-8
Java
false
false
1,891
java
package com.test.spring.service; import com.test.spring.domain.Member; import com.test.spring.repository.MemberRepository; import com.test.spring.repository.MemoryMemberRepository; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.transaction.annotation.Transactional; import static org.assertj.core.api.Assertions.assertThat; import static org.junit.jupiter.api.Assertions.assertThrows; @SpringBootTest @Transactional class MemberServiceIntTest { @Autowired MemberService memberService; @Autowired MemberRepository memberRepository; @Test void join() { //given Member member = new Member(); member.setName("spring"); //when boolean saveId = memberService.join(member); //then // Member findMember = memberService.findOne(saveId).get(); // assertThat(member.getName()).isEqualTo(findMember.getName()); } @Test public void 중복회원() { //given Member member1 = new Member(); member1.setName("spring"); Member member2 = new Member(); member2.setName("spring"); //when memberService.join(member2); IllegalStateException e = assertThrows(IllegalStateException.class, () -> memberService.join(member2)); //assertThrows(IllegalStateException.class, () -> memberService.join(member2)); assertThat(e.getMessage()).isEqualTo("이미 존재하는 회원입니다."); /* try { memberService.join(member2); fail(); }catch (IllegalStateException e){ assertThat(e.getMessage()).isEqualTo("이미 존재하는 회원입니다.1"); } */ } }
[ "khkimykk@naver.com" ]
khkimykk@naver.com
02eb67d96e49e28d55c58d2bbb6bff46fedcb488
9fb579252ee75773d6e28beafb58fb6496e49ed8
/spring-security-demo-06-csrf/src/main/java/com/arbalax/springsecurity/demo/config/SecutiryWebApplicationInitializer.java
3bcc223298f44840be871bba01bb6892e29220ba
[]
no_license
Arbalax/spring-hibernate_udemy-course
dfc0b417b5003fd3e0e2aa6828af8069189cfd30
9cf9bfcb23e23a087aa2b9d9baa7232a9313cf93
refs/heads/master
2023-05-03T09:43:02.851830
2021-05-27T20:29:11
2021-05-27T20:29:11
371,496,450
0
0
null
null
null
null
UTF-8
Java
false
false
242
java
package com.arbalax.springsecurity.demo.config; import org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer; public class SecutiryWebApplicationInitializer extends AbstractSecurityWebApplicationInitializer { }
[ "maus393939@gmail.com" ]
maus393939@gmail.com
b2c5d20073ca991595e164708ae298505d48d58a
38a3ca9695c8c1aaa24075779b3d7f7529d3ee5c
/src/main/java/es/unileon/ulebank/formAssets/domain/Loan.java
c3453b25b213919fd277d5e926650d27deaa19fa
[]
no_license
jliebl00/FormAssetss
86fd16bd3344d6acde0d69bc0491ec9eecdb6e1b
821250b0457a616ad07f2ee7ed66b1803b247c1c
refs/heads/master
2020-12-24T15:58:03.953557
2014-06-06T16:41:54
2014-06-06T16:41:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,228
java
package es.unileon.ulebank.formAssets.domain; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Table; @Entity @Table(name="loans") public class Loan { @Id @Column(name = "id") @GeneratedValue(strategy = GenerationType.AUTO) private int id; double totalLoan; private double cancelFee; private double studyFee; private double openningFee; private double modifyFee; public double getTotalLoan() { return totalLoan; } public void setTotalLoan(double totalLoan) { this.totalLoan = totalLoan; } public double getCancelFee() { return cancelFee; } public void setCancelFee(double cancelFee) { this.cancelFee = cancelFee; } public double getStudyFee() { return studyFee; } public void setStudyFee(double studyFee) { this.studyFee = studyFee; } public double getOpenningFee() { return openningFee; } public void setOpenningFee(double openningFee) { this.openningFee = openningFee; } public double getModifyFee() { return modifyFee; } public void setModifyFee(double modifyFee) { this.modifyFee = modifyFee; } }
[ "jliebl00@estudiantes.unileon.es" ]
jliebl00@estudiantes.unileon.es
7fa47b9b7b5848e8668904b4ebbb7545f8709fbb
6c30dd3f4f0cf15671faf91218f39b7381007081
/app/src/main/java/com/patelheggere/rajeevadmin/RajeevAdminApplication.java
6fb25c784694aff99013d0c83981591fa219b4ef
[]
no_license
patelheggere/RajeevAdmin
7a5530cf827cf23e0508657502afe96295958d01
cb1a3b5ea3eb2d95d2b17615d6d8781bfd585b35
refs/heads/master
2020-04-11T12:08:06.731110
2018-12-14T10:41:12
2018-12-14T10:41:12
161,770,596
0
0
null
null
null
null
UTF-8
Java
false
false
1,529
java
package com.patelheggere.rajeevadmin; import android.app.Application; import android.util.Log; import com.google.firebase.database.DatabaseReference; import com.google.firebase.database.FirebaseDatabase; public class RajeevAdminApplication extends Application { private static RajeevAdminApplication mInstance; private static DatabaseReference databaseReference; @Override public void onCreate() { super.onCreate(); mInstance = this; FirebaseDatabase.getInstance().setPersistenceEnabled(true); // ApiClient.intialise(); /* if(isDeve()) { ApiClient.setBaseUrl(AppConstants.appBaseUrlDev); } else { ApiClient.setBaseUrl(AppConstants.appBaseUrl); }*/ } public static synchronized DatabaseReference getFireBaseRef() { Log.d("", "getFireBaseRef: "); System.out.println("getdef"); //FirebaseDatabase.getInstance().setPersistenceEnabled(true); if(BuildConfig.DEBUG) { System.out.println("debug"); Log.d("", "getFireBaseRef: Debug"); databaseReference = FirebaseDatabase.getInstance().getReference().child("test"); } else { Log.d("", "getFireBaseRef: release"); databaseReference = FirebaseDatabase.getInstance().getReference().child("prod"); } return databaseReference; } public static synchronized RajeevAdminApplication getInstance() { return mInstance; } }
[ "patelheggere@gmail.com" ]
patelheggere@gmail.com
4db60ac8ea960b1e3d450b3ef6dd27984a8ad94c
768892b4093b35c20d00c1bfa8cdf06ae964df0f
/src/main/java/com/rbkmoney/schedulator/config/DominantConfig.java
e70ac3e957428cf65ae664b197e6b4453fb91b39
[ "Apache-2.0" ]
permissive
rbkmoney/schedulator
5d46c919d2e145b9380b1adeeada7b1b70713666
15efe1bfdf5f059f849907b82a6ae987483a1d97
refs/heads/master
2023-09-03T20:37:55.715748
2021-11-09T10:43:54
2021-11-09T10:43:54
171,291,202
0
2
Apache-2.0
2021-11-09T10:43:55
2019-02-18T13:40:16
Java
UTF-8
Java
false
false
918
java
package com.rbkmoney.schedulator.config; import com.rbkmoney.damsel.domain_config.RepositoryClientSrv; import com.rbkmoney.woody.thrift.impl.http.THSpawnClientBuilder; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.io.Resource; import java.io.IOException; @Configuration public class DominantConfig { @Bean public RepositoryClientSrv.Iface dominantClient(@Value("${service.dominant.url}") Resource resource, @Value("${service.dominant.networkTimeout}") int networkTimeout) throws IOException { return new THSpawnClientBuilder() .withNetworkTimeout(networkTimeout) .withAddress(resource.getURI()).build(RepositoryClientSrv.Iface.class); } }
[ "noreply@github.com" ]
rbkmoney.noreply@github.com
3cb51a4580b6c312281bcdbcadf9f63677d9bc21
a04e8061110bdb38a858599c809e7754dc79496e
/example-mr/src/main/java/cn/itcast/mr/weblog/preprocess/WebLogBean.java
f45c350911e2b342bf2e9dd716855fefd33bde99
[]
no_license
yl1920/reps1108
b73bb8b37e5d43d3822e897cbf3939997bdbe55a
8ef86c1ec50b01c89bd4dd8f7188352d7b067524
refs/heads/master
2023-01-04T20:08:09.449293
2020-11-08T08:45:26
2020-11-08T08:45:26
310,989,167
0
0
null
null
null
null
UTF-8
Java
false
false
4,159
java
package cn.itcast.mr.weblog.preprocess; import org.apache.hadoop.io.Writable; import java.io.DataInput; import java.io.DataOutput; import java.io.IOException; /** * 对接外部数据的层,表结构定义最好跟外部数据源保持一致 * 术语: 贴源表 * @author * */ public class WebLogBean implements Writable { private boolean valid = true;// 判断数据是否合法 private String remote_addr;// 记录客户端的ip地址 private String remote_user;// 记录客户端用户名称,忽略属性"-" private String time_local;// 记录访问时间与时区 private String request;// 记录请求的url与http协议 private String status;// 记录请求状态;成功是200 private String body_bytes_sent;// 记录发送给客户端文件主体内容大小 private String http_referer;// 用来记录从那个页面链接访问过来的 private String http_user_agent;// 记录客户浏览器的相关信息 public void set(boolean valid,String remote_addr, String remote_user, String time_local, String request, String status, String body_bytes_sent, String http_referer, String http_user_agent) { this.valid = valid; this.remote_addr = remote_addr; this.remote_user = remote_user; this.time_local = time_local; this.request = request; this.status = status; this.body_bytes_sent = body_bytes_sent; this.http_referer = http_referer; this.http_user_agent = http_user_agent; } public String getRemote_addr() { return remote_addr; } public void setRemote_addr(String remote_addr) { this.remote_addr = remote_addr; } public String getRemote_user() { return remote_user; } public void setRemote_user(String remote_user) { this.remote_user = remote_user; } public String getTime_local() { return this.time_local; } public void setTime_local(String time_local) { this.time_local = time_local; } public String getRequest() { return request; } public void setRequest(String request) { this.request = request; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getBody_bytes_sent() { return body_bytes_sent; } public void setBody_bytes_sent(String body_bytes_sent) { this.body_bytes_sent = body_bytes_sent; } public String getHttp_referer() { return http_referer; } public void setHttp_referer(String http_referer) { this.http_referer = http_referer; } public String getHttp_user_agent() { return http_user_agent; } public void setHttp_user_agent(String http_user_agent) { this.http_user_agent = http_user_agent; } public boolean isValid() { return valid; } public void setValid(boolean valid) { this.valid = valid; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(this.valid); sb.append("\001").append(this.getRemote_addr()); sb.append("\001").append(this.getRemote_user()); sb.append("\001").append(this.getTime_local()); sb.append("\001").append(this.getRequest()); sb.append("\001").append(this.getStatus()); sb.append("\001").append(this.getBody_bytes_sent()); sb.append("\001").append(this.getHttp_referer()); sb.append("\001").append(this.getHttp_user_agent()); return sb.toString(); } @Override public void readFields(DataInput in) throws IOException { this.valid = in.readBoolean(); this.remote_addr = in.readUTF(); this.remote_user = in.readUTF(); this.time_local = in.readUTF(); this.request = in.readUTF(); this.status = in.readUTF(); this.body_bytes_sent = in.readUTF(); this.http_referer = in.readUTF(); this.http_user_agent = in.readUTF(); } @Override public void write(DataOutput out) throws IOException { out.writeBoolean(this.valid); out.writeUTF(null==remote_addr?"":remote_addr); out.writeUTF(null==remote_user?"":remote_user); out.writeUTF(null==time_local?"":time_local); out.writeUTF(null==request?"":request); out.writeUTF(null==status?"":status); out.writeUTF(null==body_bytes_sent?"":body_bytes_sent); out.writeUTF(null==http_referer?"":http_referer); out.writeUTF(null==http_user_agent?"":http_user_agent); } }
[ "1126570123@qq.com" ]
1126570123@qq.com
d2f4a11d205505447b05f3737a217850f2c4a030
85a426b9379f604ec690ff1bff4d9f184461cc76
/src/main/java/projetocounterstrike/model/Calibre.java
6021f4cb25b1a4b4fab25950d18d3e121a0dba8f
[]
no_license
RuanRDM/projetocounterstrike
36055fae82189bd0e4b34444c425ee0290998028
626259377f01c6bc8a84ff19a809e8032430e46f
refs/heads/master
2023-08-25T08:44:29.471267
2021-10-13T21:07:25
2021-10-13T21:07:25
409,229,138
0
0
null
null
null
null
UTF-8
Java
false
false
600
java
package projetocounterstrike.model; /** * * @author ruan_ */ public enum Calibre { C03, C05, C08; public static Calibre getCalibre(String nameEnum){ if(nameEnum.equals(Calibre.C03.toString())) return Calibre.C03; else if(nameEnum.equals(Calibre.C05.toString())){ return Calibre.C05; }else if(nameEnum.equals(Calibre.C08.toString())){ return Calibre.C08; }else{ return null; } } }
[ "ruan_@DESKTOP-V1S2Q48" ]
ruan_@DESKTOP-V1S2Q48
8f4a7fd0922c0983589525b40bb2b37b7de1b7ab
d436fade2ee33c96f79a841177a6229fdd6303b7
/com/planet_ink/coffee_mud/Abilities/Prayers/Prayer_Blindness.java
8425c79d1a1453dc20da29c873cce6d49424c644
[ "Apache-2.0" ]
permissive
SJonesy/UOMUD
bd4bde3614a6cec6fba0e200ac24c6b8b40a2268
010684f83a8caec4ea9d38a7d57af2a33100299a
refs/heads/master
2021-01-20T18:30:23.641775
2017-05-19T21:38:36
2017-05-19T21:38:36
90,917,941
0
0
null
null
null
null
UTF-8
Java
false
false
4,503
java
package com.planet_ink.coffee_mud.Abilities.Prayers; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; /* Copyright 2001-2017 Bo Zimmerman 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. */ public class Prayer_Blindness extends Prayer { @Override public String ID() { return "Prayer_Blindness"; } private final static String localizedName = CMLib.lang().L("Blindness"); @Override public String name() { return localizedName; } private final static String localizedStaticDisplay = CMLib.lang().L("(Blindness)"); @Override public String displayText() { return localizedStaticDisplay; } @Override protected int canAffectCode(){return Ability.CAN_MOBS;} @Override protected int canTargetCode(){return Ability.CAN_MOBS;} @Override public int classificationCode(){return Ability.ACODE_PRAYER|Ability.DOMAIN_CORRUPTION;} @Override public int abstractQuality(){ return Ability.QUALITY_MALICIOUS;} @Override public long flags(){return Ability.FLAG_UNHOLY;} @Override public void affectPhyStats(Physical affected, PhyStats affectableStats) { super.affectPhyStats(affected,affectableStats); if(affected==null) return; if(!(affected instanceof MOB)) return; affectableStats.setSensesMask(affectableStats.sensesMask()|PhyStats.CAN_NOT_SEE); } @Override public void unInvoke() { // undo the affects of this spell if(!(affected instanceof MOB)) return; final MOB mob=(MOB)affected; super.unInvoke(); if((canBeUninvoked())&&(CMLib.flags().canSee(mob))) mob.tell(L("Your vision returns.")); } @Override public int castingQuality(MOB mob, Physical target) { if(mob!=null) { if(target instanceof MOB) { if(((MOB)target).charStats().getBodyPart(Race.BODY_EYE)==0) return Ability.QUALITY_INDIFFERENT; if(!CMLib.flags().canSee((MOB)target)) return Ability.QUALITY_INDIFFERENT; } } return super.castingQuality(mob,target); } @Override public boolean invoke(MOB mob, List<String> commands, Physical givenTarget, boolean auto, int asLevel) { final MOB target=this.getTarget(mob,commands,givenTarget); if(target==null) return false; if((!auto)&&(target.charStats().getBodyPart(Race.BODY_EYE)==0)) { mob.tell(L("@x1 has no eyes, and would not be affected.",target.name(mob))); return false; } if(!super.invoke(mob,commands,givenTarget,auto,asLevel)) return false; final boolean success=proficiencyCheck(mob,-((target.charStats().getStat(CharStats.STAT_WISDOM)*2)),auto); if(success) { final CMMsg msg=CMClass.getMsg(mob,target,this,verbalCastCode(mob,target,auto)|CMMsg.MASK_MALICIOUS,auto?"":L("^S<S-NAME> invoke(s) an unholy blindness upon <T-NAMESELF>.^?")); if(mob.location().okMessage(mob,msg)) { mob.location().send(mob,msg); if(msg.value()<=0) { mob.location().show(target,null,CMMsg.MSG_OK_VISUAL,L("<S-NAME> go(es) blind!")); maliciousAffect(mob,target,asLevel,0,-1); } } } else return maliciousFizzle(mob,target,L("<S-NAME> attempt(s) to blind <T-NAMESELF>, but flub(s) it.")); // return whether it worked return success; } }
[ "bo@zimmers.net" ]
bo@zimmers.net
4348a47f12203629b7b7f84af379bef6d24b2b09
3a1e5e48dff09f824b57e2b133299a56229b334a
/m2-capstone/src/main/java/com/techelevator/campground/model/SiteDAO.java
183891dea2c38c91de95e164304912235f599ef4
[]
no_license
ZuzannaWeichel/NationalPark-reservationSystem
fc27e73e5d3495c497e9863f59874c7f32038e6c
ee82c37c00c81ea222de494feab6043837e40bff
refs/heads/master
2020-04-03T23:17:43.849983
2018-10-31T21:33:37
2018-10-31T21:33:37
155,626,061
0
0
null
null
null
null
UTF-8
Java
false
false
320
java
package com.techelevator.campground.model; import java.time.LocalDate; import java.util.List; public interface SiteDAO { public List<Site> getAvailableSites(Object camp, List<LocalDate> dates); public List<Site> getAvailableSitesWithRestrictions(Object camp, List<LocalDate> dates, List<String> restrictions); }
[ "noreply@github.com" ]
ZuzannaWeichel.noreply@github.com
fb7f0dd1815903eae35675fe4d404824f1acd9a4
3b4dd5d7360a6975cb3f718b5806b318ed2d7abd
/openCVLibrary341/build/generated/source/aidl/debug/org/opencv/engine/OpenCVEngineInterface.java
76cf767be1472e26a3dae2300305fce8f23cb6f1
[]
no_license
kyoky82/OpenCVCameraDemo
4d9c2d708f06f338439791a0458f801292e6be73
89cfad26f5dd710b571e798543b6b583f8dd873c
refs/heads/master
2020-03-29T01:24:12.107902
2018-09-27T09:11:00
2018-09-27T09:11:00
149,386,751
0
0
null
null
null
null
UTF-8
Java
false
false
6,042
java
/* * This file is auto-generated. DO NOT MODIFY. * Original file: F:\\androidStudio\\workspase\\OpenCVCamDemo\\openCVLibrary341\\src\\main\\aidl\\org\\opencv\\engine\\OpenCVEngineInterface.aidl */ package org.opencv.engine; /** * Class provides a Java interface for OpenCV Engine Service. It's synchronous with native OpenCVEngine class. */ public interface OpenCVEngineInterface extends android.os.IInterface { /** Local-side IPC implementation stub class. */ public static abstract class Stub extends android.os.Binder implements org.opencv.engine.OpenCVEngineInterface { private static final java.lang.String DESCRIPTOR = "org.opencv.engine.OpenCVEngineInterface"; /** Construct the stub at attach it to the interface. */ public Stub() { this.attachInterface(this, DESCRIPTOR); } /** * Cast an IBinder object into an org.opencv.engine.OpenCVEngineInterface interface, * generating a proxy if needed. */ public static org.opencv.engine.OpenCVEngineInterface asInterface(android.os.IBinder obj) { if ((obj==null)) { return null; } android.os.IInterface iin = obj.queryLocalInterface(DESCRIPTOR); if (((iin!=null)&&(iin instanceof org.opencv.engine.OpenCVEngineInterface))) { return ((org.opencv.engine.OpenCVEngineInterface)iin); } return new org.opencv.engine.OpenCVEngineInterface.Stub.Proxy(obj); } @Override public android.os.IBinder asBinder() { return this; } @Override public boolean onTransact(int code, android.os.Parcel data, android.os.Parcel reply, int flags) throws android.os.RemoteException { switch (code) { case INTERFACE_TRANSACTION: { reply.writeString(DESCRIPTOR); return true; } case TRANSACTION_getEngineVersion: { data.enforceInterface(DESCRIPTOR); int _result = this.getEngineVersion(); reply.writeNoException(); reply.writeInt(_result); return true; } case TRANSACTION_getLibPathByVersion: { data.enforceInterface(DESCRIPTOR); java.lang.String _arg0; _arg0 = data.readString(); java.lang.String _result = this.getLibPathByVersion(_arg0); reply.writeNoException(); reply.writeString(_result); return true; } case TRANSACTION_installVersion: { data.enforceInterface(DESCRIPTOR); java.lang.String _arg0; _arg0 = data.readString(); boolean _result = this.installVersion(_arg0); reply.writeNoException(); reply.writeInt(((_result)?(1):(0))); return true; } case TRANSACTION_getLibraryList: { data.enforceInterface(DESCRIPTOR); java.lang.String _arg0; _arg0 = data.readString(); java.lang.String _result = this.getLibraryList(_arg0); reply.writeNoException(); reply.writeString(_result); return true; } } return super.onTransact(code, data, reply, flags); } private static class Proxy implements org.opencv.engine.OpenCVEngineInterface { private android.os.IBinder mRemote; Proxy(android.os.IBinder remote) { mRemote = remote; } @Override public android.os.IBinder asBinder() { return mRemote; } public java.lang.String getInterfaceDescriptor() { return DESCRIPTOR; } @Override public int getEngineVersion() throws android.os.RemoteException { android.os.Parcel _data = android.os.Parcel.obtain(); android.os.Parcel _reply = android.os.Parcel.obtain(); int _result; try { _data.writeInterfaceToken(DESCRIPTOR); mRemote.transact(Stub.TRANSACTION_getEngineVersion, _data, _reply, 0); _reply.readException(); _result = _reply.readInt(); } finally { _reply.recycle(); _data.recycle(); } return _result; } @Override public java.lang.String getLibPathByVersion(java.lang.String version) throws android.os.RemoteException { android.os.Parcel _data = android.os.Parcel.obtain(); android.os.Parcel _reply = android.os.Parcel.obtain(); java.lang.String _result; try { _data.writeInterfaceToken(DESCRIPTOR); _data.writeString(version); mRemote.transact(Stub.TRANSACTION_getLibPathByVersion, _data, _reply, 0); _reply.readException(); _result = _reply.readString(); } finally { _reply.recycle(); _data.recycle(); } return _result; } /** * Tries to install defined version of OpenCV from Google Play Market. * @param OpenCV version. * @return Returns true if installation was successful or OpenCV package has been already installed. */ @Override public boolean installVersion(java.lang.String version) throws android.os.RemoteException { android.os.Parcel _data = android.os.Parcel.obtain(); android.os.Parcel _reply = android.os.Parcel.obtain(); boolean _result; try { _data.writeInterfaceToken(DESCRIPTOR); _data.writeString(version); mRemote.transact(Stub.TRANSACTION_installVersion, _data, _reply, 0); _reply.readException(); _result = (0!=_reply.readInt()); } finally { _reply.recycle(); _data.recycle(); } return _result; } @Override public java.lang.String getLibraryList(java.lang.String version) throws android.os.RemoteException { android.os.Parcel _data = android.os.Parcel.obtain(); android.os.Parcel _reply = android.os.Parcel.obtain(); java.lang.String _result; try { _data.writeInterfaceToken(DESCRIPTOR); _data.writeString(version); mRemote.transact(Stub.TRANSACTION_getLibraryList, _data, _reply, 0); _reply.readException(); _result = _reply.readString(); } finally { _reply.recycle(); _data.recycle(); } return _result; } } static final int TRANSACTION_getEngineVersion = (android.os.IBinder.FIRST_CALL_TRANSACTION + 0); static final int TRANSACTION_getLibPathByVersion = (android.os.IBinder.FIRST_CALL_TRANSACTION + 1); static final int TRANSACTION_installVersion = (android.os.IBinder.FIRST_CALL_TRANSACTION + 2); static final int TRANSACTION_getLibraryList = (android.os.IBinder.FIRST_CALL_TRANSACTION + 3); } public int getEngineVersion() throws android.os.RemoteException; public java.lang.String getLibPathByVersion(java.lang.String version) throws android.os.RemoteException; /** * Tries to install defined version of OpenCV from Google Play Market. * @param OpenCV version. * @return Returns true if installation was successful or OpenCV package has been already installed. */ public boolean installVersion(java.lang.String version) throws android.os.RemoteException; public java.lang.String getLibraryList(java.lang.String version) throws android.os.RemoteException; }
[ "kyoky_xxj@qq.com" ]
kyoky_xxj@qq.com
a97ec932ee891fba9fc6348820318ac32864ea22
0cc3358e3e8f81b854f9409d703724f0f5ea2ff7
/src/za/co/mmagon/jwebswing/plugins/bootstrap/forms/groups/sets/BSFormSetChildren.java
cceb612f872eeb9908fd2a6c40661a2803bad1c0
[]
no_license
jsdelivrbot/JWebMP-CompleteFree
c229dd405fe44d6c29ab06eedaecb7a733cbb183
d5f020a19165418eb21507204743e596bee2c011
refs/heads/master
2020-04-10T15:12:35.635284
2018-12-10T01:03:58
2018-12-10T01:03:58
161,101,028
0
0
null
2018-12-10T01:45:25
2018-12-10T01:45:25
null
UTF-8
Java
false
false
960
java
/* * Copyright (C) 2017 Marc Magon * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ package za.co.mmagon.jwebswing.plugins.bootstrap.forms.groups.sets; import za.co.mmagon.jwebswing.base.html.interfaces.GlobalChildren; /** * * @author Marc Magon * @since 07 Aug 2015 * @version 1.0 */ public interface BSFormSetChildren extends GlobalChildren { }
[ "ged_marc@hotmail.com" ]
ged_marc@hotmail.com
d9f5b4ebb961453a68ae8abe022f0d0008908417
4fd380b338cab14efa9508f54c443cefb1e5e5ff
/spf4j-core/src/main/java/org/spf4j/io/ObjectAppenderSupplier.java
b604c894746cde72d674d98107a4d87649479e83
[]
no_license
josecarloscanova/spf4j
73f576ec990844c52194bf0f14104a8c96396ffb
f9113225ef8ce58ea7fa3e88deae3bebaf223b38
refs/heads/master
2020-12-03T03:51:48.970722
2017-06-23T16:09:41
2017-06-23T16:09:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,344
java
/* * Copyright (c) 2001, Zoltan Farkas All Rights Reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ package org.spf4j.io; import javax.annotation.Nonnull; import javax.annotation.ParametersAreNonnullByDefault; /** * * @author zoly */ @ParametersAreNonnullByDefault public interface ObjectAppenderSupplier { @Nonnull <T> ObjectAppender<? super T> get(Class<T> type); ObjectAppenderSupplier TO_STRINGER = new ObjectAppenderSupplier() { @Override public <T> ObjectAppender<T> get(final Class<T> type) { return (ObjectAppender<T>) ObjectAppender.TOSTRING_APPENDER; } }; }
[ "zolyfarkas@yahoo.com" ]
zolyfarkas@yahoo.com
2756fee939fc2184afbad9c34ae3817a6f70ad4a
a8796c3fa9c9942f81c1ca7b9d545909aa4ff3c7
/Cucumber/src/main/java/com/Cucumber/framework/browserConfiguration/ChromeBrowser.java
f78e1d63108d1a9263f79a236a14c2d075b5a66d
[]
no_license
ssanadi/Cucumber
90f7123947c530626408a7bcbbdd5864e97f2267
87c8b60016c5605657d2ee8fa2567ca43792d71c
refs/heads/master
2021-07-24T18:09:03.038350
2017-11-01T18:13:21
2017-11-01T18:13:21
106,993,143
0
0
null
null
null
null
UTF-8
Java
false
false
919
java
package com.Cucumber.framework.browserConfiguration; import org.openqa.selenium.Capabilities; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.openqa.selenium.chrome.ChromeOptions; import org.openqa.selenium.remote.DesiredCapabilities; import com.Cucumber.framework.helper.ResourceHelper; public class ChromeBrowser { public Capabilities getChromeCapabilities() { ChromeOptions option = new ChromeOptions(); option.addArguments("start-maximized"); DesiredCapabilities chrome = DesiredCapabilities.chrome(); chrome.setJavascriptEnabled(true); chrome.setCapability(ChromeOptions.CAPABILITY, option); return chrome; } public WebDriver getChromeDriver(Capabilities cap) { System.setProperty("webdriver.chrome.driver", ResourceHelper.getResourcePath("driver/chromedriver.exe")); return new ChromeDriver(cap); } }
[ "sanadi.saifali.7@gmail.com" ]
sanadi.saifali.7@gmail.com