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
01b7f6ff97143a79a575d71333733b741aebc650
176b7706b25845b57e245659a14699639176c82d
/src/main/java/com/bankledger/utils/SendEmailUtils.java
30d045cd6f5753933e3058194c42266d5e3d45fe
[]
no_license
sandnul025/volunteer
5b82920a996bd607960bafd498dee31a3e855280
a6eb64286fa9a6b82d90b2619d46ec7dd5b01140
refs/heads/master
2020-03-20T03:21:14.186788
2018-06-13T01:27:22
2018-06-13T01:27:22
137,143,306
0
0
null
null
null
null
UTF-8
Java
false
false
3,196
java
package com.bankledger.utils; import java.io.UnsupportedEncodingException; import java.security.GeneralSecurityException; import java.util.Date; import java.util.Properties; import javax.mail.Authenticator; import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.PasswordAuthentication; import javax.mail.Session; import javax.mail.Transport; import javax.mail.internet.AddressException; import javax.mail.internet.InternetAddress; import javax.mail.internet.MimeMessage; import com.sun.mail.util.MailSSLSocketFactory; public class SendEmailUtils { private static String account;// 登录用户名 private static String pass; // 登录密码 private static String from; // 发件地址 private static String host; // 服务器地址 private static String port; // 端口 private static String protocol; // 协议 public static String path; private String to; // 用户名密码验证,需要实现抽象类Authenticator的抽象方法PasswordAuthentication static class MyAuthenricator extends Authenticator { String u = null; String p = null; public MyAuthenricator(String u, String p) { this.u = u; this.p = p; } @Override protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(u, p); } } public SendEmailUtils(String to) { account = PropertyUtil.getProperty("mail.username"); pass = PropertyUtil.getProperty("mail.password"); from = PropertyUtil.getProperty("mail.username"); host = PropertyUtil.getProperty("mail.host"); port = PropertyUtil.getProperty("mail.smtp.port"); protocol = PropertyUtil.getProperty("mail.transport.protocol"); this.to = to;// 收件人 } public void send(String code) throws AddressException, MessagingException, GeneralSecurityException, UnsupportedEncodingException { Properties prop = new Properties(); // 协议 prop.setProperty("mail.transport.protocol", protocol); // 服务器 prop.setProperty("mail.smtp.host", host); // 端口 prop.setProperty("mail.smtp.port", port); // 使用smtp身份验证 prop.setProperty("mail.smtp.auth", "true"); // 使用SSL,企业邮箱必需! // 开启安全协议 MailSSLSocketFactory sf = null; sf = new MailSSLSocketFactory(); sf.setTrustAllHosts(true); prop.put("mail.smtp.ssl.enable", "true"); prop.put("mail.smtp.ssl.socketFactory", sf); Session session = Session.getInstance(prop, new MyAuthenricator(account, pass)); session.setDebug(true); MimeMessage mimeMessage = new MimeMessage(session); mimeMessage.setFrom(new InternetAddress(from, "博客邮箱验证码")); mimeMessage.addRecipient(Message.RecipientType.TO, new InternetAddress(to)); mimeMessage.setSubject("博客验证码"); mimeMessage.setSentDate(new Date()); mimeMessage.setContent("<html><body><p>您的验证码是:" + code + "</a></body></html>", "text/html;charset=utf-8"); mimeMessage.saveChanges(); Transport.send(mimeMessage); } public static void test4() throws Exception { SendEmailUtils s = new SendEmailUtils("tuyi954456157@163.com"); s.send("123456"); } public static void main(String[] args) throws Exception { test4(); } }
[ "tuyi954456157@qq.com" ]
tuyi954456157@qq.com
2bbaae4a99fdc896a11d407c16a3654c78cd465d
7265034a37152ad91d0eca7442660106b89534f3
/src/main/java/com/company/animalreport/projections/ReportProjection.java
cbdf6992b53e3a892a29679e8f13c184011ac966
[]
no_license
bsp-tech/animalreport_restapi
b10b19507ed2cdc0520c936d2d3515ea24b45893
c2fee6a3b32af5b17a6ce166db22fe73a056422b
refs/heads/release-1
2022-06-27T18:11:21.389896
2019-12-01T19:35:51
2019-12-01T19:35:51
210,440,856
0
0
null
2022-06-21T01:55:49
2019-09-23T19:56:36
Java
UTF-8
Java
false
false
610
java
package com.company.animalreport.projections; import com.company.animalreport.entities.Report; import com.company.animalreport.entities.Situation; import org.springframework.data.rest.core.config.Projection; @Projection(types = {Report.class}) public interface ReportProjection extends CommonProjection { String getLocation(); byte[][] getVideo(); byte[][] getImage(); byte[][] getVideoAfterSolved(); byte[][] getImageAfterSolved(); String getDescription(); String getDescriptionAfterSolved(); Situation getSituationId(); Situation getSituationIdAfterSolved(); }
[ "qosqarmirze@gmail.com" ]
qosqarmirze@gmail.com
d764e62bd1f8215026238140dd2c48c59cda35b3
0483ba1dc9bddaad0118c394e5e5bd8a098f0445
/src/added_app/Management/app/src/main/java/org/androidtown/management/DeleteRequest.java
b9c4c36cd8fdb49928c4b0c366bfbb5bf75c4a6f
[]
no_license
InjeongChoii/2018-cap1-2
3f04328e00534e25a7733fb486a74ac76f9ed4cd
2b6aa09bffe4f101ae844e12b2fb9f8352bfef1d
refs/heads/master
2020-04-07T10:10:57.333175
2018-03-07T09:30:15
2018-03-07T09:30:15
124,202,700
0
0
null
null
null
null
UTF-8
Java
false
false
702
java
package org.androidtown.management; import com.android.volley.Response; import com.android.volley.toolbox.StringRequest; import java.util.HashMap; import java.util.Map; /** * Created by EJW on 2017-09-30. */ public class DeleteRequest extends StringRequest{ final static private String URL = "http://172.30.1.4/ProbonoDBConn/Delete.php"; private Map<String, String> parameters; public DeleteRequest(String userID, Response.Listener<String> listener) { super(Method.POST, URL, listener, null); parameters = new HashMap<>(); parameters.put("userID",userID); } @Override public Map<String, String> getParams() { return parameters; } }
[ "dhkddmswl@naver.com" ]
dhkddmswl@naver.com
0c385379044075525e5f0cde9ef64f3d2197060e
1d79ce872e630a4c45890d3a638e6a8892f23081
/src/cursojava/ProgramList.java
abde8b7fb904bf6bc7f2a544bd27d746467ccfed
[]
no_license
OPAFION/exceptions1-java
d102135e2d680b1bb8ce6df27887f73102a54a75
9393b26c1eb4d4ebe4d474e68f3a73237b304f59
refs/heads/master
2022-04-11T00:52:02.364318
2020-03-28T19:10:26
2020-03-28T19:10:26
250,324,716
0
0
null
null
null
null
UTF-8
Java
false
false
1,700
java
package cursojava; import entities.EmployeeList; import java.util.ArrayList; import java.util.List; import java.util.Locale; import java.util.Scanner; public class ProgramList { public static void main(String[] args) { Locale.setDefault(Locale.US); Scanner sc = new Scanner(System.in); List<EmployeeList> list = new ArrayList<>(); System.out.println("How many employees will be registered?"); int n = sc.nextInt(); for(int i = 0; i < n; i++){ System.out.println(); System.out.println("Emplyoee #" + i + ": "); System.out.print("Id: "); int id = sc.nextInt(); System.out.print("Name: "); sc.nextLine(); String name = sc.nextLine(); System.out.print("Salary: "); double salary = sc.nextDouble(); list.add(new EmployeeList(id, name, salary)); } System.out.println(); System.out.print("Enter the employee id that will have salary increase: "); int id = sc.nextInt(); EmployeeList emp = list.stream().filter(x -> x.getId() == id).findFirst().orElse(null); if(emp == null){ System.out.println("This id does not exist!"); } else{ System.out.print("Enter the percentage: "); double percentagem = sc.nextDouble(); emp.salaryIncrease(percentagem); } System.out.println(); System.out.println("List of employees: "); for(EmployeeList obj: list){ System.out.println(obj); } sc.close(); } }
[ "daniel13.oliveira.do@gmail.com" ]
daniel13.oliveira.do@gmail.com
e2f8a5755b4fd4f0e9dc947bb647716386f1ebf8
705879dc61c41198fb2c4f4f6328bba190c8a465
/src/main/java/org/virtualbox/IMousePointerShapeChangedEventGetShape.java
202999a6e6fdcc672864c8bb836965cf2b2c9d41
[]
no_license
abiquo/hypervisor-mock
dcd1d6c8a2fdbc4db01c7a6e9a64edd101e8ed42
e49e4ca84930415eca72ab6c73140a0f2eea4bbe
refs/heads/master
2021-01-19T09:40:57.840712
2013-08-23T08:54:17
2013-08-23T08:54:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,483
java
package org.virtualbox; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for anonymous complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="_this" type="{http://www.w3.org/2001/XMLSchema}string"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "_this" }) @XmlRootElement(name = "IMousePointerShapeChangedEvent_getShape") public class IMousePointerShapeChangedEventGetShape { @XmlElement(required = true) protected String _this; /** * Gets the value of the this property. * * @return * possible object is * {@link String } * */ public String getThis() { return _this; } /** * Sets the value of the this property. * * @param value * allowed object is * {@link String } * */ public void setThis(String value) { this._this = value; } }
[ "serafin.sedano@abiquo.com" ]
serafin.sedano@abiquo.com
2326f42261fadbabebac52d5b59fe19e4c658964
f229e4948ab5ce1820a3b84bfe6a756a1a23e294
/StoreDatabase/app/src/androidTest/java/com/example/brandonkbarnes/storedatabase/ExampleInstrumentedTest.java
f47319b1ac2540a7ee914152eaa3a29931f7f188
[]
no_license
drbfragged111/StoreDatabase
1cf91218a6ca9d3b771b69d278487fee1966daef
7a536ae2089ac990ded42d4433ca6a811f5b70b7
refs/heads/master
2021-08-30T12:47:33.515189
2017-12-18T01:25:35
2017-12-18T01:25:35
114,582,776
0
0
null
null
null
null
UTF-8
Java
false
false
781
java
package com.example.brandonkbarnes.storedatabase; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() throws Exception { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("com.example.brandonkbarnes.storedatabase", appContext.getPackageName()); } }
[ "drbfragged111@gmail.com" ]
drbfragged111@gmail.com
0af429914e98831c948ff10c084b04bcefa239b7
53e9a85eb09a1cdb8f7e18621c5f7063dc5dcd41
/java/interfaces/ifUebung/Main.java
f0afe59d940c3b208dd0bf326eab0fa0a2b259c0
[]
no_license
finnbechinka/informationstechnischer-Assistent
97ef32fff692a1a70432b28287c14de500b5e5ea
dc03bb295093105d203e799b241f0422d05b516e
refs/heads/master
2023-02-19T17:24:59.601541
2020-05-04T12:50:27
2020-05-04T12:50:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
601
java
package ifUebung; public class Main implements IFmethodenSammlung { public void saveData(int c, int[] a, int index) { a[index] = c; } public void delData(float[] d, int index) { d[index] = Float.NaN; } public void resultMsg() { System.out.print("Done! ;-)"); } public double surfAreaCircle(Kreis k) { return Math.PI * Math.pow(k.getRadius(), 2); } public Kreis copyCircle(Kreis k) { return k; } public double distPoints(Punkt p1, Punkt p2) { return Math.sqrt(Math.pow(p2.getX()-p1.getX(), 2) + Math.pow(p2.getY()-p1.getY(), 2)); } }
[ "noreply@github.com" ]
finnbechinka.noreply@github.com
77805c62633a316a457c1339eaad1cfa9f0ad65f
d5e8dc7dc5a962b2fbcb3ce08340ac6b91f238af
/share-app/content-center/src/main/java/com/soft1851/contentcenter/domain/entity/MidUserShare.java
498b70c496f0108f7a6ed0a4f0185152c61e2407
[]
no_license
zhent1106/micro-service
b1a07dadd59145fe8976ff79651363b9efc7c053
1e5e25501c75724ba9494399da665e951282929b
refs/heads/master
2022-12-20T18:51:23.447002
2020-10-05T07:07:41
2020-10-05T07:07:41
297,043,641
0
0
null
null
null
null
UTF-8
Java
false
false
745
java
package com.soft1851.contentcenter.domain.entity; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; import javax.persistence.Column; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; /** * @ClassName * @Description TODO * @Author wanghuanle * @Date **/ @AllArgsConstructor @NoArgsConstructor @Builder @Data @Table(name = "t_mid_user_share") public class MidUserShare { @Id @GeneratedValue(generator = "JDBC") private Integer id; /** * share.id */ @Column(name = "share_id") private Integer shareId; /** * user.id */ @Column(name = "user_id") private Integer userId; }
[ "1299088269@qq.com" ]
1299088269@qq.com
917b6260ca8da033a499a1684edb6467243ced9e
7ac0cc5507bcaa2bdc900d9ee7c6220ee025b240
/trans-service/trans-source-interface/src/main/java/com/trans/entity/LineType.java
4e53f0150304402f35b034ce45a6aaaa1004481a
[]
no_license
xcs666/trans
95eb626f902e43f99008dc3eda18347980585c6a
bb0f763ba3c346126d0d6edb1ec30496ab2766d7
refs/heads/master
2022-12-22T18:35:22.134827
2019-11-21T13:07:54
2019-11-21T13:07:54
223,131,460
0
0
null
2022-12-10T05:45:21
2019-11-21T09:00:31
Java
UTF-8
Java
false
false
190
java
package com.trans.entity; import lombok.Data; import javax.persistence.Table; @Table(name = "tb_line_type") @Data public class LineType { private Long id; private String name; }
[ "2232168951@qq.com" ]
2232168951@qq.com
9fcea1c7c0b7314acdba48f1001be13a07a7f192
a76107297e4081a8658ddedbad2764e9cf11f16f
/hr-payroll/src/main/java/com/devsuperior/hrpayroll/entities/Payment.java
9d44eec680c500b2ef341659fdf155930dabe645
[]
no_license
GuhTiagoSilva/java-microservices-course
ca2257fdf7cdfee3bca00cb137a51dd9616f33bf
89bf4d991c9e6c9673e58134a30711b68f8785e6
refs/heads/main
2023-08-23T06:59:05.815041
2021-10-19T10:36:04
2021-10-19T10:36:04
338,865,827
0
0
null
null
null
null
UTF-8
Java
false
false
1,017
java
package com.devsuperior.hrpayroll.entities; import java.io.Serializable; public class Payment implements Serializable { private static final long serialVersionUID = 1L; private String name; private Double dailyIncome; private Integer days; public Payment() { } public Payment(String name, Double dailyIncome, Integer days) { this.name = name; this.dailyIncome = dailyIncome; this.days = days; } public String getName() { return name; } public void setName(String name) { this.name = name; } public Double getDailyIncome() { return dailyIncome; } public void setDailyIncome(Double dailyIncome) { this.dailyIncome = dailyIncome; } public Integer getDays() { return days; } public void setDays(Integer days) { this.days = days; } public double getTotal() { return days * dailyIncome; } }
[ "gustavo.tiago.gts@outlook.com" ]
gustavo.tiago.gts@outlook.com
beb7eab5fbd4ae9d122c085d61fd6e5528f96618
a9458343b2667a1d57616c12eaaacf23e5c0eb80
/OOAD/solid-app/SRP/com/techlab/srp/violation/Invoice.java
ab08e2ffd88c46457d1e1cd8edc5996a5a82349c
[]
no_license
sonam-singh15/Swabhavtechlabs1
098898da9e8e9986f012a5cac74be2f2bcdfe567
16618ca5a765ccb819eae646ea751dffa296eabd
refs/heads/master
2020-08-11T19:54:50.604879
2020-01-30T08:57:20
2020-01-30T08:57:20
214,617,928
0
0
null
2019-10-16T05:44:55
2019-10-12T09:23:13
HTML
UTF-8
Java
false
false
1,354
java
package com.techlab.srp.violation; public class Invoice { private int id; private String name; public double amount; private float discountPercentage; private static final float GST = 0.125f; public Invoice(int id, String name, double amount, float discountPercentage) { this.id = id; this.name = name; this.amount = amount; this.discountPercentage = discountPercentage; } public int getId() { return id; } public String getName() { return name; } public double getAmount() { return amount; } public float getDiscount() { return discountPercentage; } public double calculateDiscount() { return this.amount - (this.amount * (this.discountPercentage / 100.0f)); } public double calculateGst() { return this.calculateDiscount() + GST; } public double calculateTotalCost() { double discountPrice = calculateDiscount(); double gstPrice = calculateGst(); return discountPrice + gstPrice; } public void printInvoice(Invoice invoice) { System.out.println(" Id :-" + invoice.id); System.out.println(" Name :-" + invoice.name); System.out.println(" Amount :-" + invoice.amount); System.out.println(" CostAfterDiscount :-" + invoice.calculateDiscount()); System.out.println("CostAfterGst :-" + invoice.calculateGst()); System.out.println("TotalCost :-" + invoice.calculateTotalCost()); } }
[ "sonamsingh15" ]
sonamsingh15
1ff82509aad2e7afaefefe8352a07b0ee8a74b90
870fc26621d3633f18e01f93f79a1a165d5b052e
/src/edu/harvard/util/job/GraphLayoutAlgorithmJob.java
4381151b173896119d37dcb0849f48a921a9321d
[]
no_license
End-to-end-provenance/provenance-map-orbiter
b7810f5bb9ab195e6c6400b0d36ffff1699a23a4
834ecc292250172c815bd95bc0d408e4d97f7018
refs/heads/master
2020-04-10T21:32:44.342366
2016-01-05T00:28:09
2016-01-05T00:28:09
42,343,669
1
0
null
null
null
null
UTF-8
Java
false
false
4,143
java
/* * A Collection of Miscellaneous Utilities * * Copyright 2010 * The President and Fellows of Harvard College. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE UNIVERSITY AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE UNIVERSITY OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ package edu.harvard.util.job; import edu.harvard.util.Cancelable; import edu.harvard.util.Pointer; import edu.harvard.util.graph.layout.*; import edu.harvard.util.graph.*; /** * The job to compute a graph layout * * @author Peter Macko */ public class GraphLayoutAlgorithmJob extends AbstractJob { private Pointer<BaseGraph> input; private GraphLayout result; private GraphLayoutAlgorithm algorithm; private int levels; private boolean canceled; /** * Constructor of class GraphLayoutAlgorithmJob * * @param algorithm the graph layout algorithm * @param input the pointer to the input * @param levels the number of levels in the hierarchy of summary nodes to precompute (-1 to compute the entire layout) */ public GraphLayoutAlgorithmJob(GraphLayoutAlgorithm algorithm, Pointer<BaseGraph> input, int levels) { super(levels >= 0 ? "Initializing graph layout" : "Computing graph layout"); this.algorithm = algorithm; this.input = input; this.levels = levels; result = null; canceled = false; } /** * Constructor of class GraphLayoutAlgorithmJob * * @param algorithm the graph layout algorithm * @param input the pointer to the input */ public GraphLayoutAlgorithmJob(GraphLayoutAlgorithm algorithm, Pointer<BaseGraph> input) { this(algorithm, input, -1); } /** * Return the result of the job * * @return the result */ public GraphLayout getResult() { return result; } /** * Run the job * * @throws JobException if the job failed * @throws JobCanceledException if the job was canceled */ public void run() throws JobException { result = null; canceled = false; // Get the graph BaseGraph g = input.get(); if (g == null) throw new JobException("No graph"); // Compute the graph layout try { if (levels < 0) { result = algorithm.computeLayout(g, observer); } else { result = algorithm.initializeLayout(g, levels, observer); } g.addLayout(result); } catch (Throwable t) { if (canceled) throw new JobCanceledException(); throw new JobException(t); } } /** * Determine whether the job can be canceled * * @return true if the job can be canceled */ public boolean isCancelable() { return algorithm instanceof Cancelable; } /** * Cancel the job (if possible) */ public void cancel() { try { if (algorithm != null) { canceled = true; ((Cancelable) algorithm).cancel(); } } catch (Exception e) { // Silent failover } } }
[ "pmacko@eecs.harvard.edu" ]
pmacko@eecs.harvard.edu
9be14e698901b6c4ba9a60a78db7d7440b57c616
ff9dbc16978d49dbc629c8f23f4792c1cfcbbc6d
/src/xiaosun/v.java
c597a12cd3a0dcd24408389d7bc773fc66a52ca0
[]
no_license
xiaoxiaosun1987/testsun
fc954e29ecf2852fc56c0d2ed11565d4769174bc
f1a2175f066428351a4662b02f4948b75a2841e3
refs/heads/master
2016-09-01T17:57:18.205699
2015-04-14T10:04:03
2015-04-14T10:04:03
33,916,132
0
0
null
null
null
null
UTF-8
Java
false
false
45
java
package xiaosun; public class v { }
[ "jiangchengzicao@163.com" ]
jiangchengzicao@163.com
90b6fb15926d3252233b2b5b941aa0a631d4b686
d06669ef43bb0a5c746a6ff33482cd53d848e322
/src/org/basiccompiler/compiler/library/methods/operators/Method_IntegerDivision.java
cefc6caf941e5081a3c3a92c9c43993b76f29d2d
[ "LicenseRef-scancode-unknown-license-reference", "BSD-2-Clause-Views" ]
permissive
adammendoza/BASICCompiler
a5055ff6b4256237d9bdbe71265e83a4259d253a
60011533de6ba8bb3d6a76d9a3d04cbaaccd978b
refs/heads/master
2020-04-05T23:31:28.119983
2015-07-21T09:49:42
2015-07-21T09:49:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,826
java
/* * Copyright (c) 2015, Lorenz Wiest * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. * * The views and conclusions contained in the software and documentation are * those of the authors and should not be interpreted as representing official * policies, either expressed or implied, of the FreeBSD Project. */ package org.basiccompiler.compiler.library.methods.operators; import java.util.List; import org.basiccompiler.bytecode.info.ExceptionTableInfo; import org.basiccompiler.compiler.etc.ByteOutStream; import org.basiccompiler.compiler.library.LibraryManager; import org.basiccompiler.compiler.library.LibraryManager.MethodEnum; import org.basiccompiler.compiler.library.methods.Method; public class Method_IntegerDivision extends Method { private final static String METHOD_NAME = "IntegerDivision"; private final static String DESCRIPTOR = "(FF)F"; private final static int NUM_LOCALS = 2; public Method_IntegerDivision(LibraryManager libraryManager) { super(libraryManager, METHOD_NAME, DESCRIPTOR, NUM_LOCALS); } @Override public void addMethodByteCode(ByteOutStream o, List<ExceptionTableInfo> e) { // local 0: F=>I numerator (determines sign of result when division by zero) // local 1: F=>I denominator o.fload_0(); this.libraryManager.getMethod(MethodEnum.ROUND_TO_INT).emitCall(o); o.istore_0(); o.iload_0(); o.iconst(-32768); o.if_icmpge("skipArg1Underflow"); emitThrowRuntimeException(o, "Integer Division: First argument < -32768."); o.label("skipArg1Underflow"); o.iload_0(); o.iconst(32767); o.if_icmple("skipArg1Overflow"); emitThrowRuntimeException(o, "Integer Division: First argument > 32767."); o.label("skipArg1Overflow"); o.fload_1(); this.libraryManager.getMethod(MethodEnum.ROUND_TO_INT).emitCall(o); o.istore_1(); o.iload_1(); o.iconst(-32768); o.if_icmpge("skipArg2Underflow"); emitThrowRuntimeException(o, "Integer Division: Second argument < -32768."); o.label("skipArg2Underflow"); o.iload_1(); o.iconst(32767); o.if_icmple("skipArg2Overflow"); emitThrowRuntimeException(o, "Integer Division: Second argument > 32767."); o.label("skipArg2Overflow"); o.iload_1(); o.ifeq("divisionByZero"); o.iload_0(); o.iload_1(); o.idiv(); o.i2f(); o.freturn(); o.label("divisionByZero"); o.iload_0(); o.i2f(); this.libraryManager.getMethod(MethodEnum.DIVISION_BY_ZERO).emitCall(o); o.freturn(); } }
[ "lo.wiest@web.de" ]
lo.wiest@web.de
29f71c19e4d8540f94f3b043eee9d5211bf9ce62
6b19f9bc191153c7c7898dc73a6666c6ab5c1313
/src/test/java/com/sms/test/CountryTest.java
f2c5b46dd2b237007592e782469f8d0fffd30091
[]
no_license
jaouade/GateWaySms
5fbed5c84f797f1f6d5a33e50685e27e3746a09b
0801852724b6ecfc5c1f3eb56acfdf47f78e59e9
refs/heads/master
2020-06-16T17:37:50.797710
2017-06-21T00:34:40
2017-06-21T00:34:40
94,151,944
0
0
null
null
null
null
UTF-8
Java
false
false
1,283
java
package com.sms.test; import com.sms.config.HibernateConfiguration; import com.sms.dao.ICountryDao; import com.sms.entities.Country; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @ContextConfiguration(classes = {HibernateConfiguration.class}) @RunWith(SpringJUnit4ClassRunner.class) public class CountryTest { @Autowired @Qualifier("countrydao") private ICountryDao countryyDao; @Test public void AaddTest() { Country c = countryyDao.save(new Country("Maroc")); Assert.assertNotNull(c); } @Test public void BupdateTest() { Country c = countryyDao.save(new Country("spain")); c.setCountryName("Maroc"); countryyDao.update(c); Assert.assertEquals("Maroc", c.getCountryName()); } @Test public void CdeletTest() { Country c = countryyDao.save(new Country("USA")); countryyDao.delete(c); c = countryyDao.get(c.getIdCountry()); Assert.assertNull(c); } }
[ "jaouadelaoud@gmail.com" ]
jaouadelaoud@gmail.com
f1bab4c7148a58b4b71b9a839ff31b45d48077da
8a86ba08363413bfa21408023b4cc477d0c4b890
/jax-rs-day2/src/main/java/se/coredev/data/Message.java
bfb84d14da42375d703b382ffb999e8f527407d5
[ "MIT" ]
permissive
yhc3l-java-1618/web
3d09b4d1202368fdde9fc9cd0d7bfcdef0f5d37c
70cb83ab6cdc8be79e03237fc8274edd3e8560e3
refs/heads/master
2021-01-21T07:00:02.052032
2017-03-13T13:25:20
2017-03-13T13:25:20
83,304,670
0
1
null
null
null
null
UTF-8
Java
false
false
391
java
package se.coredev.data; public final class Message { private final String id; private final String content; public Message(String id, String content) { this.id = id; this.content = content; } public String getId() { return id; } public String getContent() { return content; } @Override public String toString() { return String.format("%s, %s", id, content); } }
[ "anders.carlsson@coredev.se" ]
anders.carlsson@coredev.se
50de6d9431f1e1a1de9e8741ffe8913700198a46
1a6974cce238519d2ef9d7bfea96ae9effd49fdb
/src/test/java/unit/feed/controller/categories/CategoryReportTest.java
7cdd4608013c6f446a75c615c6d2cc7afff600f9
[]
no_license
vitaliikacov/nmdService
f592c66960934ceea1cf2d0ad0fd1041dbb96c97
f998eeceb5c287ec934065496a40110e4c06e957
refs/heads/master
2021-01-18T13:21:44.041693
2015-04-14T19:11:00
2015-04-14T19:11:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,493
java
package unit.feed.controller.categories; import nmd.orb.error.ServiceException; import nmd.orb.reader.Category; import nmd.orb.services.filter.FeedItemReportFilter; import nmd.orb.services.report.CategoryReport; import nmd.orb.services.report.FeedItemsReport; import nmd.orb.services.report.FeedReadReport; import org.junit.Test; import unit.feed.controller.AbstractControllerTestBase; import java.util.List; import java.util.UUID; import static org.junit.Assert.*; /** * @author : igu */ public class CategoryReportTest extends AbstractControllerTestBase { @Test public void initialReportTest() { final List<CategoryReport> reports = this.categoriesService.getCategoriesReport(); assertEquals(1, reports.size()); final CategoryReport first = reports.get(0); assertEquals(Category.MAIN_CATEGORY_ID, first.id); assertEquals(Category.MAIN_CATEGORY_ID, first.name); assertTrue(first.feedReadReports.isEmpty()); assertEquals(0, first.read); assertEquals(0, first.notRead); assertEquals(0, first.readLater); } @Test public void whenFeedStateWasChangedThenItWillBeReflectedInReport() throws ServiceException { final UUID feedId = addValidFirstRssFeedToMainCategory(); final FeedItemsReport feedItemsReport = this.readsService.getFeedItemsReport(feedId, FeedItemReportFilter.SHOW_ALL); final String feedItemId = feedItemsReport.reports.get(0).itemId; this.readsService.markItemAsRead(feedId, feedItemId); final List<CategoryReport> reports = this.categoriesService.getCategoriesReport(); final CategoryReport first = reports.get(0); assertEquals(Category.MAIN_CATEGORY_ID, first.id); assertEquals(Category.MAIN_CATEGORY_ID, first.name); assertNotNull(findForFeed(feedId, first.feedReadReports)); assertEquals(1, first.read); assertEquals(1, first.notRead); assertEquals(0, first.readLater); } @Test public void whenCategoryIsFoundThenReportReturns() throws ServiceException { final CategoryReport report = this.categoriesService.getCategoryReport(Category.MAIN_CATEGORY_ID); assertNotNull(report); } @Test(expected = ServiceException.class) public void whenCategoryIsNotFoundThenExceptionThrows() throws ServiceException { this.categoriesService.getCategoryReport(UUID.randomUUID().toString()); } @Test public void whenReportContainsCategoriesThenTheyAreSortedAlphabeticallyByName() { this.categoriesService.addCategory("first"); this.categoriesService.addCategory("zet"); final List<CategoryReport> reports = this.categoriesService.getCategoriesReport(); assertEquals("first", reports.get(0).name); assertEquals(Category.MAIN.name, reports.get(1).name); assertEquals("zet", reports.get(2).name); } @Test public void whenCategoryReportCreatedThenFeedsAreSortedAlphabeticallyByTitle() throws ServiceException { final UUID secondFeedId = addValidSecondRssFeedToMainCategory(); final UUID firstFeedId = addValidFirstRssFeedToMainCategory(); final CategoryReport report = this.categoriesService.getCategoryReport(Category.MAIN_CATEGORY_ID); final List<FeedReadReport> readReports = report.feedReadReports; assertEquals(firstFeedId, readReports.get(0).feedId); assertEquals(secondFeedId, readReports.get(1).feedId); } }
[ "nmds48@gmail.com" ]
nmds48@gmail.com
a73a62975bcd29d43dd704c62c0f9c86c53bfea0
028d6009f3beceba80316daa84b628496a210f8d
/core/com.nokia.carbide.cpp.codescanner/src/com/nokia/carbide/cpp/internal/codescanner/gen/Kbdata/ProdinfoType.java
eb7685fe2f452a557cd634d2bbf1b071ea3963cd
[]
no_license
JamesLinus/oss.FCL.sftools.dev.ide.carbidecpp
fa50cafa69d3e317abf0db0f4e3e557150fd88b3
4420f338bc4e522c563f8899d81201857236a66a
refs/heads/master
2020-12-30T16:45:28.474973
2010-10-20T16:19:31
2010-10-20T16:19:31
null
0
0
null
null
null
null
UTF-8
Java
false
false
34,961
java
/* * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of the License "Eclipse Public License v1.0" * which accompanies this distribution, and is available * at the URL "http://www.eclipse.org/legal/epl-v10.html". * * Initial Contributors: * Nokia Corporation - initial contribution. * * Contributors: * * Description: * */ package com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.util.FeatureMap; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>Prodinfo Type</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * <ul> * <li>{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getProdname <em>Prodname</em>}</li> * <li>{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getVrmlist <em>Vrmlist</em>}</li> * <li>{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getGroup <em>Group</em>}</li> * <li>{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getBrand <em>Brand</em>}</li> * <li>{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getSeries <em>Series</em>}</li> * <li>{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getPlatform <em>Platform</em>}</li> * <li>{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getPrognum <em>Prognum</em>}</li> * <li>{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getFeatnum <em>Featnum</em>}</li> * <li>{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getComponent <em>Component</em>}</li> * <li>{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getAudience <em>Audience</em>}</li> * <li>{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getBase <em>Base</em>}</li> * <li>{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getClass_ <em>Class</em>}</li> * <li>{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getConref <em>Conref</em>}</li> * <li>{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getDir <em>Dir</em>}</li> * <li>{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getId <em>Id</em>}</li> * <li>{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getImportance <em>Importance</em>}</li> * <li>{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getLang <em>Lang</em>}</li> * <li>{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getOtherprops <em>Otherprops</em>}</li> * <li>{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getPlatform1 <em>Platform1</em>}</li> * <li>{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getProduct <em>Product</em>}</li> * <li>{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getProps <em>Props</em>}</li> * <li>{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getRev <em>Rev</em>}</li> * <li>{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getStatus <em>Status</em>}</li> * <li>{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getTranslate <em>Translate</em>}</li> * <li>{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getXtrc <em>Xtrc</em>}</li> * <li>{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getXtrf <em>Xtrf</em>}</li> * </ul> * </p> * * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.KbdataPackage#getProdinfoType() * @model extendedMetaData="name='prodinfo_._type' kind='elementOnly'" * @generated */ public interface ProdinfoType extends EObject { /** * Returns the value of the '<em><b>Prodname</b></em>' containment reference. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Prodname</em>' containment reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Prodname</em>' containment reference. * @see #setProdname(ProdnameType) * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.KbdataPackage#getProdinfoType_Prodname() * @model containment="true" required="true" * extendedMetaData="kind='element' name='prodname' namespace='##targetNamespace'" * @generated */ ProdnameType getProdname(); /** * Sets the value of the '{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getProdname <em>Prodname</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Prodname</em>' containment reference. * @see #getProdname() * @generated */ void setProdname(ProdnameType value); /** * Returns the value of the '<em><b>Vrmlist</b></em>' containment reference. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Vrmlist</em>' containment reference isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Vrmlist</em>' containment reference. * @see #setVrmlist(VrmlistType) * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.KbdataPackage#getProdinfoType_Vrmlist() * @model containment="true" required="true" * extendedMetaData="kind='element' name='vrmlist' namespace='##targetNamespace'" * @generated */ VrmlistType getVrmlist(); /** * Sets the value of the '{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getVrmlist <em>Vrmlist</em>}' containment reference. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Vrmlist</em>' containment reference. * @see #getVrmlist() * @generated */ void setVrmlist(VrmlistType value); /** * Returns the value of the '<em><b>Group</b></em>' attribute list. * The list contents are of type {@link org.eclipse.emf.ecore.util.FeatureMap.Entry}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Group</em>' attribute list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Group</em>' attribute list. * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.KbdataPackage#getProdinfoType_Group() * @model unique="false" dataType="org.eclipse.emf.ecore.EFeatureMapEntry" many="true" * extendedMetaData="kind='group' name='group:2'" * @generated */ FeatureMap getGroup(); /** * Returns the value of the '<em><b>Brand</b></em>' containment reference list. * The list contents are of type {@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.BrandType}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Brand</em>' containment reference list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Brand</em>' containment reference list. * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.KbdataPackage#getProdinfoType_Brand() * @model containment="true" transient="true" volatile="true" derived="true" * extendedMetaData="kind='element' name='brand' namespace='##targetNamespace' group='group:2'" * @generated */ EList<BrandType> getBrand(); /** * Returns the value of the '<em><b>Series</b></em>' containment reference list. * The list contents are of type {@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.SeriesType}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Series</em>' containment reference list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Series</em>' containment reference list. * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.KbdataPackage#getProdinfoType_Series() * @model containment="true" transient="true" volatile="true" derived="true" * extendedMetaData="kind='element' name='series' namespace='##targetNamespace' group='group:2'" * @generated */ EList<SeriesType> getSeries(); /** * Returns the value of the '<em><b>Platform</b></em>' containment reference list. * The list contents are of type {@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.PlatformType}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Platform</em>' containment reference list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Platform</em>' containment reference list. * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.KbdataPackage#getProdinfoType_Platform() * @model containment="true" transient="true" volatile="true" derived="true" * extendedMetaData="kind='element' name='platform' namespace='##targetNamespace' group='group:2'" * @generated */ EList<PlatformType> getPlatform(); /** * Returns the value of the '<em><b>Prognum</b></em>' containment reference list. * The list contents are of type {@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.PrognumType}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Prognum</em>' containment reference list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Prognum</em>' containment reference list. * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.KbdataPackage#getProdinfoType_Prognum() * @model containment="true" transient="true" volatile="true" derived="true" * extendedMetaData="kind='element' name='prognum' namespace='##targetNamespace' group='group:2'" * @generated */ EList<PrognumType> getPrognum(); /** * Returns the value of the '<em><b>Featnum</b></em>' containment reference list. * The list contents are of type {@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.FeatnumType}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Featnum</em>' containment reference list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Featnum</em>' containment reference list. * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.KbdataPackage#getProdinfoType_Featnum() * @model containment="true" transient="true" volatile="true" derived="true" * extendedMetaData="kind='element' name='featnum' namespace='##targetNamespace' group='group:2'" * @generated */ EList<FeatnumType> getFeatnum(); /** * Returns the value of the '<em><b>Component</b></em>' containment reference list. * The list contents are of type {@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ComponentType}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Component</em>' containment reference list isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Component</em>' containment reference list. * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.KbdataPackage#getProdinfoType_Component() * @model containment="true" transient="true" volatile="true" derived="true" * extendedMetaData="kind='element' name='component' namespace='##targetNamespace' group='group:2'" * @generated */ EList<ComponentType> getComponent(); /** * Returns the value of the '<em><b>Audience</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Audience</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Audience</em>' attribute. * @see #setAudience(Object) * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.KbdataPackage#getProdinfoType_Audience() * @model dataType="org.eclipse.emf.ecore.xml.type.AnySimpleType" * extendedMetaData="kind='attribute' name='audience' namespace='##targetNamespace'" * @generated */ Object getAudience(); /** * Sets the value of the '{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getAudience <em>Audience</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Audience</em>' attribute. * @see #getAudience() * @generated */ void setAudience(Object value); /** * Returns the value of the '<em><b>Base</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Base</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Base</em>' attribute. * @see #setBase(Object) * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.KbdataPackage#getProdinfoType_Base() * @model dataType="org.eclipse.emf.ecore.xml.type.AnySimpleType" * extendedMetaData="kind='attribute' name='base' namespace='##targetNamespace'" * @generated */ Object getBase(); /** * Sets the value of the '{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getBase <em>Base</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Base</em>' attribute. * @see #getBase() * @generated */ void setBase(Object value); /** * Returns the value of the '<em><b>Class</b></em>' attribute. * The default value is <code>"- topic/prodinfo "</code>. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Class</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Class</em>' attribute. * @see #isSetClass() * @see #unsetClass() * @see #setClass(Object) * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.KbdataPackage#getProdinfoType_Class() * @model default="- topic/prodinfo " unsettable="true" dataType="org.eclipse.emf.ecore.xml.type.AnySimpleType" * extendedMetaData="kind='attribute' name='class' namespace='##targetNamespace'" * @generated */ Object getClass_(); /** * Sets the value of the '{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getClass_ <em>Class</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Class</em>' attribute. * @see #isSetClass() * @see #unsetClass() * @see #getClass_() * @generated */ void setClass(Object value); /** * Unsets the value of the '{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getClass_ <em>Class</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #isSetClass() * @see #getClass_() * @see #setClass(Object) * @generated */ void unsetClass(); /** * Returns whether the value of the '{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getClass_ <em>Class</em>}' attribute is set. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return whether the value of the '<em>Class</em>' attribute is set. * @see #unsetClass() * @see #getClass_() * @see #setClass(Object) * @generated */ boolean isSetClass(); /** * Returns the value of the '<em><b>Conref</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Conref</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Conref</em>' attribute. * @see #setConref(Object) * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.KbdataPackage#getProdinfoType_Conref() * @model dataType="org.eclipse.emf.ecore.xml.type.AnySimpleType" * extendedMetaData="kind='attribute' name='conref' namespace='##targetNamespace'" * @generated */ Object getConref(); /** * Sets the value of the '{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getConref <em>Conref</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Conref</em>' attribute. * @see #getConref() * @generated */ void setConref(Object value); /** * Returns the value of the '<em><b>Dir</b></em>' attribute. * The literals are from the enumeration {@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.DirType122}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Dir</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Dir</em>' attribute. * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.DirType122 * @see #isSetDir() * @see #unsetDir() * @see #setDir(DirType122) * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.KbdataPackage#getProdinfoType_Dir() * @model unsettable="true" * extendedMetaData="kind='attribute' name='dir' namespace='##targetNamespace'" * @generated */ DirType122 getDir(); /** * Sets the value of the '{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getDir <em>Dir</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Dir</em>' attribute. * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.DirType122 * @see #isSetDir() * @see #unsetDir() * @see #getDir() * @generated */ void setDir(DirType122 value); /** * Unsets the value of the '{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getDir <em>Dir</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #isSetDir() * @see #getDir() * @see #setDir(DirType122) * @generated */ void unsetDir(); /** * Returns whether the value of the '{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getDir <em>Dir</em>}' attribute is set. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return whether the value of the '<em>Dir</em>' attribute is set. * @see #unsetDir() * @see #getDir() * @see #setDir(DirType122) * @generated */ boolean isSetDir(); /** * Returns the value of the '<em><b>Id</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Id</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Id</em>' attribute. * @see #setId(String) * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.KbdataPackage#getProdinfoType_Id() * @model dataType="org.eclipse.emf.ecore.xml.type.NMTOKEN" * extendedMetaData="kind='attribute' name='id' namespace='##targetNamespace'" * @generated */ String getId(); /** * Sets the value of the '{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getId <em>Id</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Id</em>' attribute. * @see #getId() * @generated */ void setId(String value); /** * Returns the value of the '<em><b>Importance</b></em>' attribute. * The literals are from the enumeration {@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ImportanceType120}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Importance</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Importance</em>' attribute. * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ImportanceType120 * @see #isSetImportance() * @see #unsetImportance() * @see #setImportance(ImportanceType120) * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.KbdataPackage#getProdinfoType_Importance() * @model unsettable="true" * extendedMetaData="kind='attribute' name='importance' namespace='##targetNamespace'" * @generated */ ImportanceType120 getImportance(); /** * Sets the value of the '{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getImportance <em>Importance</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Importance</em>' attribute. * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ImportanceType120 * @see #isSetImportance() * @see #unsetImportance() * @see #getImportance() * @generated */ void setImportance(ImportanceType120 value); /** * Unsets the value of the '{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getImportance <em>Importance</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #isSetImportance() * @see #getImportance() * @see #setImportance(ImportanceType120) * @generated */ void unsetImportance(); /** * Returns whether the value of the '{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getImportance <em>Importance</em>}' attribute is set. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return whether the value of the '<em>Importance</em>' attribute is set. * @see #unsetImportance() * @see #getImportance() * @see #setImportance(ImportanceType120) * @generated */ boolean isSetImportance(); /** * Returns the value of the '<em><b>Lang</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Lang</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Lang</em>' attribute. * @see #setLang(String) * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.KbdataPackage#getProdinfoType_Lang() * @model dataType="org.eclipse.emf.ecore.xml.type.NMTOKEN" * extendedMetaData="kind='attribute' name='lang' namespace='##targetNamespace'" * @generated */ String getLang(); /** * Sets the value of the '{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getLang <em>Lang</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Lang</em>' attribute. * @see #getLang() * @generated */ void setLang(String value); /** * Returns the value of the '<em><b>Otherprops</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Otherprops</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Otherprops</em>' attribute. * @see #setOtherprops(Object) * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.KbdataPackage#getProdinfoType_Otherprops() * @model dataType="org.eclipse.emf.ecore.xml.type.AnySimpleType" * extendedMetaData="kind='attribute' name='otherprops' namespace='##targetNamespace'" * @generated */ Object getOtherprops(); /** * Sets the value of the '{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getOtherprops <em>Otherprops</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Otherprops</em>' attribute. * @see #getOtherprops() * @generated */ void setOtherprops(Object value); /** * Returns the value of the '<em><b>Platform1</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Platform1</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Platform1</em>' attribute. * @see #setPlatform1(Object) * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.KbdataPackage#getProdinfoType_Platform1() * @model dataType="org.eclipse.emf.ecore.xml.type.AnySimpleType" * extendedMetaData="kind='attribute' name='platform' namespace='##targetNamespace'" * @generated */ Object getPlatform1(); /** * Sets the value of the '{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getPlatform1 <em>Platform1</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Platform1</em>' attribute. * @see #getPlatform1() * @generated */ void setPlatform1(Object value); /** * Returns the value of the '<em><b>Product</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Product</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Product</em>' attribute. * @see #setProduct(Object) * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.KbdataPackage#getProdinfoType_Product() * @model dataType="org.eclipse.emf.ecore.xml.type.AnySimpleType" * extendedMetaData="kind='attribute' name='product' namespace='##targetNamespace'" * @generated */ Object getProduct(); /** * Sets the value of the '{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getProduct <em>Product</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Product</em>' attribute. * @see #getProduct() * @generated */ void setProduct(Object value); /** * Returns the value of the '<em><b>Props</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Props</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Props</em>' attribute. * @see #setProps(Object) * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.KbdataPackage#getProdinfoType_Props() * @model dataType="org.eclipse.emf.ecore.xml.type.AnySimpleType" * extendedMetaData="kind='attribute' name='props' namespace='##targetNamespace'" * @generated */ Object getProps(); /** * Sets the value of the '{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getProps <em>Props</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Props</em>' attribute. * @see #getProps() * @generated */ void setProps(Object value); /** * Returns the value of the '<em><b>Rev</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Rev</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Rev</em>' attribute. * @see #setRev(Object) * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.KbdataPackage#getProdinfoType_Rev() * @model dataType="org.eclipse.emf.ecore.xml.type.AnySimpleType" * extendedMetaData="kind='attribute' name='rev' namespace='##targetNamespace'" * @generated */ Object getRev(); /** * Sets the value of the '{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getRev <em>Rev</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Rev</em>' attribute. * @see #getRev() * @generated */ void setRev(Object value); /** * Returns the value of the '<em><b>Status</b></em>' attribute. * The literals are from the enumeration {@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.StatusType93}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Status</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Status</em>' attribute. * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.StatusType93 * @see #isSetStatus() * @see #unsetStatus() * @see #setStatus(StatusType93) * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.KbdataPackage#getProdinfoType_Status() * @model unsettable="true" * extendedMetaData="kind='attribute' name='status' namespace='##targetNamespace'" * @generated */ StatusType93 getStatus(); /** * Sets the value of the '{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getStatus <em>Status</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Status</em>' attribute. * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.StatusType93 * @see #isSetStatus() * @see #unsetStatus() * @see #getStatus() * @generated */ void setStatus(StatusType93 value); /** * Unsets the value of the '{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getStatus <em>Status</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #isSetStatus() * @see #getStatus() * @see #setStatus(StatusType93) * @generated */ void unsetStatus(); /** * Returns whether the value of the '{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getStatus <em>Status</em>}' attribute is set. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return whether the value of the '<em>Status</em>' attribute is set. * @see #unsetStatus() * @see #getStatus() * @see #setStatus(StatusType93) * @generated */ boolean isSetStatus(); /** * Returns the value of the '<em><b>Translate</b></em>' attribute. * The literals are from the enumeration {@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.TranslateType60}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Translate</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Translate</em>' attribute. * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.TranslateType60 * @see #isSetTranslate() * @see #unsetTranslate() * @see #setTranslate(TranslateType60) * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.KbdataPackage#getProdinfoType_Translate() * @model unsettable="true" * extendedMetaData="kind='attribute' name='translate' namespace='##targetNamespace'" * @generated */ TranslateType60 getTranslate(); /** * Sets the value of the '{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getTranslate <em>Translate</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Translate</em>' attribute. * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.TranslateType60 * @see #isSetTranslate() * @see #unsetTranslate() * @see #getTranslate() * @generated */ void setTranslate(TranslateType60 value); /** * Unsets the value of the '{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getTranslate <em>Translate</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see #isSetTranslate() * @see #getTranslate() * @see #setTranslate(TranslateType60) * @generated */ void unsetTranslate(); /** * Returns whether the value of the '{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getTranslate <em>Translate</em>}' attribute is set. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return whether the value of the '<em>Translate</em>' attribute is set. * @see #unsetTranslate() * @see #getTranslate() * @see #setTranslate(TranslateType60) * @generated */ boolean isSetTranslate(); /** * Returns the value of the '<em><b>Xtrc</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Xtrc</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Xtrc</em>' attribute. * @see #setXtrc(Object) * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.KbdataPackage#getProdinfoType_Xtrc() * @model dataType="org.eclipse.emf.ecore.xml.type.AnySimpleType" * extendedMetaData="kind='attribute' name='xtrc' namespace='##targetNamespace'" * @generated */ Object getXtrc(); /** * Sets the value of the '{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getXtrc <em>Xtrc</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Xtrc</em>' attribute. * @see #getXtrc() * @generated */ void setXtrc(Object value); /** * Returns the value of the '<em><b>Xtrf</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Xtrf</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>Xtrf</em>' attribute. * @see #setXtrf(Object) * @see com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.KbdataPackage#getProdinfoType_Xtrf() * @model dataType="org.eclipse.emf.ecore.xml.type.AnySimpleType" * extendedMetaData="kind='attribute' name='xtrf' namespace='##targetNamespace'" * @generated */ Object getXtrf(); /** * Sets the value of the '{@link com.nokia.carbide.cpp.internal.codescanner.gen.Kbdata.ProdinfoType#getXtrf <em>Xtrf</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>Xtrf</em>' attribute. * @see #getXtrf() * @generated */ void setXtrf(Object value); } // ProdinfoType
[ "Deepak.Modgil@Nokia.com" ]
Deepak.Modgil@Nokia.com
8fd0a6860dcab39d91cdd50a6d63fa8f2baaae9b
f0d017b22de71d06425275fbc590dc254fe4dba0
/pet-clinic-data/src/main/java/com/theherose/h3rogroub/services/springdatajba/VetSDJpaService.java
d396e768c0969e1914b578f13ece54e70fd7fe4e
[]
no_license
yasser9947/study-project
c964880fbd35ab8ea099991f1176ced3163c1c0d
21143e786bf9330e020688de5fbb9a022b781a7e
refs/heads/master
2023-07-15T23:44:23.076858
2021-08-27T05:15:32
2021-08-27T05:15:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,089
java
package com.theherose.h3rogroub.services.springdatajba; import com.theherose.h3rogroub.model.Vet; import com.theherose.h3rogroub.repositores.VetRepository; import com.theherose.h3rogroub.services.VetService; import org.springframework.stereotype.Service; import java.util.HashSet; import java.util.Set; @Service public class VetSDJpaService implements VetService { private final VetRepository vetRepository; public VetSDJpaService(VetRepository vetRepository) { this.vetRepository = vetRepository; } @Override public Set<Vet> findAll() { Set<Vet> vets = new HashSet<>(); vetRepository.findAll().forEach(vets::add); return vets; } @Override public Vet findById(Long aLong) { return vetRepository.findById(aLong).orElse(null); } @Override public Vet save(Vet vet) { return vetRepository.save(vet); } @Override public void delete(Vet vet) { vetRepository.delete(vet); } @Override public void deleteById(Long aLong) { vetRepository.deleteById(aLong); } }
[ "yasser9946.1@gmail.com" ]
yasser9946.1@gmail.com
a23c122860c96d52ad338bcee7e261b5539ba7b5
cd835a9cb1b9000d8fcc014028562d27430b0bf7
/app/src/main/java/com/rockchipme/app/adapters/FavouritesListAdapter.java
fe608aa5f46dc5a56061f3cf59bc872752ddc665
[]
no_license
likhinnelliyotan1/RockPOS
ee09f5c582a69c21787bced85f06965676f3ad99
701970b1113e9dc3cee4de7a6fe36f88eb54ec82
refs/heads/master
2023-02-10T23:11:47.681974
2021-01-07T11:36:37
2021-01-07T11:36:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,181
java
package com.rockchipme.app.adapters; import android.content.Intent; import android.support.annotation.NonNull; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.ImageView; import android.widget.TextView; import com.rockchipme.app.R; import com.rockchipme.app.activities.FavouritesListActivity; import com.rockchipme.app.activities.ItemDetailsActivity; import com.rockchipme.app.helpers.BasketHelper; import com.rockchipme.app.helpers.Constants; import com.rockchipme.app.models.Products; import com.squareup.picasso.Picasso; import java.util.ArrayList; import java.util.List; /** * Created by Sibin on 10/20/2017. */ public class FavouritesListAdapter extends RecyclerView.Adapter<FavouritesListAdapter.ProductViewHolder> { private List<Products> favouritesList = new ArrayList<>(); private FavouritesListActivity context; private String currency; public FavouritesListAdapter(FavouritesListActivity context, String currency) { this.context = context; this.currency = currency; } @NonNull @Override public ProductViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View v = LayoutInflater.from(parent.getContext()).inflate( R.layout.row_favourite_list_new, parent, false); return new ProductViewHolder(v); } @Override public void onBindViewHolder(@NonNull ProductViewHolder holder, int position) { Products data = favouritesList.get(position); holder.tvTitle.setText(data.name); holder.tvPrice.setText(String.format("%s %s", currency, data.rate)); // holder.tvPrice.setText(currency + " "+data.rate); if (data.imageList != null && data.imageList.size() > 0) { Log.d(Constants.APP_TAG, "fav img:"+data.imageList.get(0).getImage()); Picasso.with(context) .load(data.imageList.get(0).getImage()) .placeholder(R.drawable.no_image) .into(holder.ivProduct); } else { Log.d(Constants.APP_TAG, "fav img: empty"); holder.ivProduct.setImageResource(R.mipmap.ic_launcher); } // ((ProductViewHolder)holder). holder.tvRemove.setOnClickListener(v -> { if (favouritesList.size() > position) { context.removeFavouriteApi(data.pdtId); favouritesList.remove(position); notifyDataSetChanged(); } }); holder.tvMoveToCart.setOnClickListener(v -> { if (favouritesList.size() > position) { new BasketHelper(context).updateCart(1, data, "FavouritesListAdapter"); favouritesList.remove(position); notifyDataSetChanged(); } }); holder.view.setOnClickListener(v -> { Intent intent = new Intent(context, ItemDetailsActivity.class); intent.putExtra("pdtId", data.pdtId); context.startActivity(intent); }); } @Override public int getItemCount() { return favouritesList.size(); } class ProductViewHolder extends RecyclerView.ViewHolder { TextView tvTitle, tvPrice; Button tvMoveToCart, tvRemove; ImageView ivProduct; View view; ProductViewHolder(View view) { super(view); this.view = view; tvTitle = view.findViewById(R.id.tvItemName); tvPrice = view.findViewById(R.id.tvPrice); tvMoveToCart = view.findViewById(R.id.btnMoveToCart); tvRemove = view.findViewById(R.id.btnRemove); ivProduct = view.findViewById(R.id.civ); } } public List<Products> getFavouriteList() { if (favouritesList == null) { favouritesList = new ArrayList<>(); } return favouritesList; } public void setAdapterData(List<Products> productsList) { this.favouritesList = productsList; notifyDataSetChanged(); } }
[ "jafseel@alisonsgroup.com" ]
jafseel@alisonsgroup.com
24707ea7132be230b513a53a4d4106fbbf2768f2
d9d9dfc148337d5f3a2a6aaec0d42c8811b742f7
/collection-kotlin/src/main/java/com/youngmanster/collection_kotlin/theme/material/SkinMaterialTextInputLayout.java
2d60393148070eaac92477c27cbd8500c74a0164
[ "MIT" ]
permissive
usernameyangyan/Collection-Android-kotlin
a158a16b7ffc9044b82a818f0f6b0bc144cac232
bc7ed916e676075b35f719ec2d41e63f4ae6d9dd
refs/heads/master
2021-10-28T20:57:56.151225
2021-10-09T01:17:54
2021-10-09T01:17:54
243,885,240
20
3
null
2020-02-29T02:06:15
2020-02-29T01:33:58
Java
UTF-8
Java
false
false
8,972
java
package com.youngmanster.collection_kotlin.theme.material; import android.content.Context; import android.content.res.ColorStateList; import android.content.res.TypedArray; import android.util.AttributeSet; import android.widget.TextView; import androidx.annotation.StyleRes; import com.google.android.material.textfield.TextInputLayout; import com.youngmanster.collection_kotlin.R; import com.youngmanster.collection_kotlin.theme.res.SkinCompatResources; import com.youngmanster.collection_kotlin.theme.widget.SkinCompatBackgroundHelper; import com.youngmanster.collection_kotlin.theme.widget.SkinCompatEditText; import com.youngmanster.collection_kotlin.theme.widget.SkinCompatHelper; import com.youngmanster.collection_kotlin.theme.widget.SkinCompatSupportable; import java.lang.reflect.Field; import java.lang.reflect.Method; import static com.youngmanster.collection_kotlin.theme.widget.SkinCompatHelper.INVALID_ID; public class SkinMaterialTextInputLayout extends TextInputLayout implements SkinCompatSupportable { private SkinCompatBackgroundHelper mBackgroundTintHelper; private int mPasswordToggleResId = INVALID_ID; private int mCounterTextColorResId = INVALID_ID; private int mErrorTextColorResId = INVALID_ID; private int mFocusedTextColorResId = INVALID_ID; private int mDefaultTextColorResId = INVALID_ID; public SkinMaterialTextInputLayout(Context context) { this(context, null); } public SkinMaterialTextInputLayout(Context context, AttributeSet attrs) { this(context, attrs, 0); } public SkinMaterialTextInputLayout(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); mBackgroundTintHelper = new SkinCompatBackgroundHelper(this); mBackgroundTintHelper.loadFromAttributes(attrs, defStyleAttr); final TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.TextInputLayout, defStyleAttr, R.style.Widget_Design_TextInputLayout); if (a.hasValue(R.styleable.TextInputLayout_android_textColorHint)) { mDefaultTextColorResId = mFocusedTextColorResId = a.getResourceId(R.styleable.TextInputLayout_android_textColorHint, INVALID_ID); applyFocusedTextColorResource(); } int errorTextAppearance = a.getResourceId(R.styleable.TextInputLayout_errorTextAppearance, INVALID_ID); loadErrorTextColorResFromAttributes(errorTextAppearance); int counterTextAppearance = a.getResourceId(R.styleable.TextInputLayout_counterTextAppearance, INVALID_ID); loadCounterTextColorResFromAttributes(counterTextAppearance); mPasswordToggleResId = a.getResourceId(R.styleable.TextInputLayout_passwordToggleDrawable, INVALID_ID); a.recycle(); } private void loadCounterTextColorResFromAttributes(@StyleRes int resId) { if (resId != INVALID_ID) { TypedArray counterTA = getContext().obtainStyledAttributes(resId, R.styleable.SkinTextAppearance); if (counterTA.hasValue(R.styleable.SkinTextAppearance_android_textColor)) { mCounterTextColorResId = counterTA.getResourceId(R.styleable.SkinTextAppearance_android_textColor, INVALID_ID); } counterTA.recycle(); } applyCounterTextColorResource(); } @Override public void setCounterEnabled(boolean enabled) { super.setCounterEnabled(enabled); if (enabled) { applyCounterTextColorResource(); } } private void applyCounterTextColorResource() { mCounterTextColorResId = SkinCompatHelper.checkResourceId(mCounterTextColorResId); if (mCounterTextColorResId != INVALID_ID) { TextView counterView = getCounterView(); if (counterView != null) { counterView.setTextColor(SkinCompatResources.getColor(getContext(), mCounterTextColorResId)); updateEditTextBackground(); } } } private TextView getCounterView() { try { Field counterView = TextInputLayout.class.getDeclaredField("mCounterView"); counterView.setAccessible(true); return (TextView) counterView.get(this); } catch (Exception e) { e.printStackTrace(); } return null; } @Override public void setErrorTextAppearance(@StyleRes int resId) { super.setErrorTextAppearance(resId); loadErrorTextColorResFromAttributes(resId); } private void loadErrorTextColorResFromAttributes(@StyleRes int resId) { if (resId != INVALID_ID) { TypedArray errorTA = getContext().obtainStyledAttributes(resId, R.styleable.SkinTextAppearance); if (errorTA.hasValue(R.styleable.SkinTextAppearance_android_textColor)) { mErrorTextColorResId = errorTA.getResourceId(R.styleable.SkinTextAppearance_android_textColor, INVALID_ID); } errorTA.recycle(); } applyErrorTextColorResource(); } @Override public void setErrorEnabled(boolean enabled) { super.setErrorEnabled(enabled); if (enabled) { applyErrorTextColorResource(); } } private void applyErrorTextColorResource() { mErrorTextColorResId = SkinCompatHelper.checkResourceId(mErrorTextColorResId); if (mErrorTextColorResId != INVALID_ID && mErrorTextColorResId != R.color.design_error) { TextView errorView = getErrorView(); if (errorView != null) { errorView.setTextColor(SkinCompatResources.getColor(getContext(), mErrorTextColorResId)); updateEditTextBackground(); } } } private TextView getErrorView() { try { Field errorView = TextInputLayout.class.getDeclaredField("mErrorView"); errorView.setAccessible(true); return (TextView) errorView.get(this); } catch (Exception e) { e.printStackTrace(); } return null; } private void updateEditTextBackground() { try { Method updateEditTextBackground = TextInputLayout.class.getDeclaredMethod("updateEditTextBackground"); updateEditTextBackground.setAccessible(true); updateEditTextBackground.invoke(this); } catch (Exception e) { e.printStackTrace(); } } private void setDefaultTextColor(ColorStateList colors) { try { Field defaultTextColor = TextInputLayout.class.getDeclaredField("mDefaultTextColor"); defaultTextColor.setAccessible(true); defaultTextColor.set(this, colors); updateLabelState(); } catch (Exception e) { e.printStackTrace(); } } private void applyFocusedTextColorResource() { mFocusedTextColorResId = SkinCompatHelper.checkResourceId(mFocusedTextColorResId); if (mFocusedTextColorResId != INVALID_ID && mFocusedTextColorResId != R.color.abc_hint_foreground_material_light) { setFocusedTextColor(SkinCompatResources.getColorStateList(getContext(), mFocusedTextColorResId)); } else if (getEditText() != null) { int textColorResId = INVALID_ID; if (getEditText() instanceof SkinCompatEditText) { textColorResId = ((SkinCompatEditText) getEditText()).getTextColorResId(); } else if (getEditText() instanceof SkinMaterialTextInputEditText) { textColorResId = ((SkinMaterialTextInputEditText) getEditText()).getTextColorResId(); } textColorResId = SkinCompatHelper.checkResourceId(textColorResId); if (textColorResId != INVALID_ID) { ColorStateList colors = SkinCompatResources.getColorStateList(getContext(), textColorResId); setFocusedTextColor(colors); } } } private void setFocusedTextColor(ColorStateList colors) { try { Field focusedTextColor = TextInputLayout.class.getDeclaredField("mFocusedTextColor"); focusedTextColor.setAccessible(true); focusedTextColor.set(this, colors); updateLabelState(); } catch (Exception e) { e.printStackTrace(); } } private void updateLabelState() { try { Method updateLabelState = TextInputLayout.class.getDeclaredMethod("updateLabelState", boolean.class); updateLabelState.setAccessible(true); updateLabelState.invoke(this, false); } catch (Exception e) { e.printStackTrace(); } } @Override public void applySkin() { applyErrorTextColorResource(); applyCounterTextColorResource(); applyFocusedTextColorResource(); if (mBackgroundTintHelper != null) { mBackgroundTintHelper.applySkin(); } } }
[ "yangy@huatugz.com" ]
yangy@huatugz.com
7e283f61f90d39ac047ce949596808ea78d5b149
20695a0678033dbf329535b940a7d17e1444ab68
/src/hibernate_class_1.java
b059033868814f3f3e19afab300378383ca5cad7
[]
no_license
mrthlinh/Oracle-Hibernate
b2b2bf616d10e90113586fc5d560471647142596
924cff4b1d07b97eb79b5ab846982cce5c5a5210
refs/heads/master
2021-01-22T06:53:46.491740
2017-02-13T07:05:57
2017-02-13T07:05:57
81,793,569
0
0
null
null
null
null
UTF-8
Java
false
false
1,430
java
//ID = 520902 import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.Transaction; import org.hibernate.cfg.AnnotationConfiguration; import library.dao.UserDAO; import library.model.User; public class hibernate_class_1{ public class HibernateUserDAO implements UserDAO { private SessionFactory sessionFactory; public HibernateUserDAO() { AnnotationConfiguration annotConf = new AnnotationConfiguration(); annotConf.addAnnotatedClass(User.class); annotConf.configure(); // The line below generates the exception! sessionFactory = annotConf.buildSessionFactory(); } public void store(User user) { Session session = sessionFactory.openSession(); Transaction tx = session.getTransaction(); try { tx.begin(); session.saveOrUpdate(user); tx.commit(); } catch (RuntimeException e) { tx.rollback(); throw e; } finally { session.close(); } } @Override public User getUser(int arg0) { // TODO Auto-generated method stub return null; } @Override public User getUserByFirstLastName(String arg0, String arg1) { // TODO Auto-generated method stub return null; } @Override public User getUserByUsername(String arg0) { // TODO Auto-generated method stub return null; } @Override public int saveUser(User arg0) { // TODO Auto-generated method stub return 0; } } }
[ "mrthlinh@gmail.com" ]
mrthlinh@gmail.com
06ba77e1e4a01998b13fff4986d13df495650c0a
c36d08386a88e139e6325ea7f5de64ba00a45c9f
/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/rawlocal/TestRawlocalContractAppend.java
6d92db1d086b3753db44d06a9e56722e2847fd54
[ "Apache-2.0", "LicenseRef-scancode-unknown", "CC0-1.0", "CC-BY-3.0", "EPL-1.0", "LicenseRef-scancode-unknown-license-reference", "Classpath-exception-2.0", "CC-PDDC", "GCC-exception-3.1", "CDDL-1.0", "MIT", "GPL-2.0-only", "BSD-3-Clause", "LicenseRef-scancode-public-domain", "LGPL-2.1-on...
permissive
dmgerman/hadoop
6197e3f3009196fb4ca528ab420d99a0cd5b9396
70c015914a8756c5440cd969d70dac04b8b6142b
refs/heads/master
2020-12-01T06:30:51.605035
2019-12-19T19:37:17
2019-12-19T19:37:17
230,528,747
0
0
Apache-2.0
2020-01-31T18:29:52
2019-12-27T22:48:25
Java
UTF-8
Java
false
false
2,186
java
begin_unit|revision:0.9.5;language:Java;cregit-version:0.0.1 begin_comment comment|/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ end_comment begin_package DECL|package|org.apache.hadoop.fs.contract.rawlocal package|package name|org operator|. name|apache operator|. name|hadoop operator|. name|fs operator|. name|contract operator|. name|rawlocal package|; end_package begin_import import|import name|org operator|. name|apache operator|. name|hadoop operator|. name|conf operator|. name|Configuration import|; end_import begin_import import|import name|org operator|. name|apache operator|. name|hadoop operator|. name|fs operator|. name|contract operator|. name|AbstractContractAppendTest import|; end_import begin_import import|import name|org operator|. name|apache operator|. name|hadoop operator|. name|fs operator|. name|contract operator|. name|AbstractFSContract import|; end_import begin_class DECL|class|TestRawlocalContractAppend specifier|public class|class name|TestRawlocalContractAppend extends|extends name|AbstractContractAppendTest block|{ annotation|@ name|Override DECL|method|createContract (Configuration conf) specifier|protected name|AbstractFSContract name|createContract parameter_list|( name|Configuration name|conf parameter_list|) block|{ return|return operator|new name|RawlocalFSContract argument_list|( name|conf argument_list|) return|; block|} block|} end_class end_unit
[ "stevel@apache.org" ]
stevel@apache.org
d1b63efac2d6710ae183ff988045ca0e46c33c26
58ba04e0d91edc12572f3cc245772809e8ba4ea1
/src/org/sample/Automation.java
571f573f2ff2182e0969e1b31b8f3235be0e2634
[]
no_license
yeshy27/SampleProject
b522dfaaec7bb3a0567556e834341354ba733a50
703709851c0d3f810f63e427cc5f79494c511b85
refs/heads/master
2023-06-13T02:38:06.310626
2021-07-06T09:14:57
2021-07-06T09:14:57
383,409,168
0
0
null
null
null
null
UTF-8
Java
false
false
1,272
java
package org.sample; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; public class Automation { public static void main(String[] args) { System.setProperty("webdriver.chrome.driver","D:\\ec\\SeleniumTask\\drivers\\chromedriver.exe"); WebDriver driver = new ChromeDriver(); driver.get("http://demo.automationtesting.in/Register.html"); WebElement txtName = driver.findElement(By.xpath("//input[@ng-model='FirstName']")); txtName.sendKeys("yeshwanth"); WebElement txtLName = driver.findElement(By.xpath("//input[@ng-model='LastName']")); txtLName.sendKeys("sai"); WebElement txtAddress = driver.findElement(By.xpath("//textarea[@ng-model='Adress']")); txtAddress.sendKeys("SECRETARIAT COLONY, LAKSHMIPURAM, CH 600099"); WebElement Email = driver.findElement(By.xpath("//input[@ng-model='EmailAdress']")); Email.sendKeys("yesh@gmail.com"); WebElement Phone = driver.findElement(By.xpath("//input[@ng-model='Phone']")); Phone.sendKeys("9962659902"); WebElement Gender = driver.findElement(By.xpath("//input[@ng-model='radiovalue']")); Gender.click(); WebElement hob = driver.findElement(By.id("checkbox1")); hob.click(); } }
[ "kamini191918@gmail.com" ]
kamini191918@gmail.com
8b30ed4a2dc8b8dfbe044dd5ea48ce1f0c53ba78
9785e91a0e41bb1f6ac0574d9ecff3cbb2010d88
/src/main/java/com/zt/opinion/utils/EncryptionUtils.java
4dfeb75dfaba99bbae07a8bbadce604a154cc0e9
[]
no_license
zt1115798334/springboot-opinion
abc5a8970da85143f789e2b94596fb65c0c0264b
7e4de0936721ffa4e153468a6bcd8a0b8e072219
refs/heads/master
2020-04-05T12:37:58.028099
2017-08-16T05:56:40
2017-08-16T05:56:40
95,196,499
0
0
null
null
null
null
UTF-8
Java
false
false
1,203
java
package com.zt.opinion.utils; import org.apache.commons.codec.binary.Base64; import org.apache.commons.codec.digest.DigestUtils; /** * * <p>Title: EncryptionUtils</p> * <p>Description: 加密解密工具类</p> * @author wjc * @date 2016年12月29日 */ public class EncryptionUtils { public static String base64Encode(String data) { return Base64.encodeBase64String(data.getBytes()); } public static byte[] base64Decode(String data) { return Base64.decodeBase64(data.getBytes()); } public static String md5(String data) { return DigestUtils.md5Hex(data); } public static String sha1(String data) { return DigestUtils.sha1Hex(data); } public static String sha256Hex(String data) { return DigestUtils.sha256Hex(data); } /** * @param args */ public static void main(String[] args) { String base64 = base64Encode("ricky"); System.out.println("base64 encode=" + base64); byte[] buf = base64Decode(base64); System.out.println("base64 decode=" + new String(buf)); String md5 = md5("ricky"); System.out.println("md5=" + md5 + "**len=" + md5.length()); String sha1 = sha1("test"); System.out.println("sha1=" + sha1 + "**len=" + sha1.length()); } }
[ "zhangtong9498@qq.com" ]
zhangtong9498@qq.com
07bc721d91e5dd1cfb6531df1215786134bde5e0
e1592ce5357f49117a24459c50f794e3618b4edb
/modules/shiro/src/org/lucidj/shiro/Shiro.java
ec6531e6df46951dbbc6884017cf6e7d46ed1fdc
[ "Apache-2.0", "CC-BY-SA-4.0", "CC-BY-4.0", "CC-BY-NC-SA-4.0" ]
permissive
neoautus/lucidj
7196fb5a0558ce25526362a42ded1749dbcf204f
42acb110c4aa6a4d79ead0b22fd64913305f7568
refs/heads/master
2021-07-17T21:40:29.942890
2021-07-12T13:56:16
2021-07-12T13:56:16
69,292,151
0
0
Apache-2.0
2018-05-05T17:45:04
2016-09-26T20:57:02
Java
UTF-8
Java
false
false
4,123
java
/* * Copyright 2017 NEOautus Ltd. (http://neoautus.com) * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package org.lucidj.shiro; import com.vaadin.server.VaadinSession; // TODO: GET RID OF VaadinSession HERE (VUI) import org.apache.shiro.SecurityUtils; import org.apache.shiro.mgt.SecurityManager; import org.apache.shiro.subject.SimplePrincipalCollection; import org.apache.shiro.subject.Subject; import org.apache.shiro.util.Factory; import org.apache.shiro.config.IniSecurityManagerFactory; import org.lucidj.api.core.SecurityEngine; import org.lucidj.api.core.SecuritySubject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.apache.felix.ipojo.annotations.Component; import org.apache.felix.ipojo.annotations.Instantiate; import org.apache.felix.ipojo.annotations.Provides; @Component (immediate = true, publicFactory = false) @Instantiate @Provides public class Shiro implements SecurityEngine { private final static Logger log = LoggerFactory.getLogger (Shiro.class); private SecurityManager ini_security_manager; public Shiro () { String shiro_ini = "file:" + System.getProperty ("system.conf") + "/shiro.ini"; log.info ("shiro_ini = " + shiro_ini); Factory<SecurityManager> factory = new IniSecurityManagerFactory (shiro_ini); ini_security_manager = factory.getInstance (); SecurityUtils.setSecurityManager (ini_security_manager); } @Override // SecurityEngine public SecuritySubject getStoredSubject (boolean create_as_system) { SecuritySubject current_subject = VaadinSession.getCurrent().getAttribute (SecuritySubject.class); if (current_subject == null || create_as_system) { Subject shiro_subject; // The subject is always rebuilt when configured as system if (create_as_system) { shiro_subject = new Subject.Builder (ini_security_manager) .authenticated (true) .principals (new SimplePrincipalCollection ("system", "")) .buildSubject (); log.info ("Create system subject: {}", shiro_subject); log.info ("{}: authenticated={}", shiro_subject, shiro_subject.isAuthenticated ()); } else { shiro_subject = SecurityUtils.getSecurityManager().createSubject (null); } // TODO: CONFIGURABLE shiro_subject.getSession ().setTimeout (24L * 60 * 60 * 1000); // 24h current_subject = new ShiroSubject (shiro_subject); // TODO: MAKE SECURITY IDENPENDENT FROM VAADIN/SESSIONS FROM WEB try { // Store current user into VaadinSession VaadinSession.getCurrent().getLockInstance().lock(); VaadinSession.getCurrent().setAttribute(SecuritySubject.class, current_subject); } finally { VaadinSession.getCurrent().getLockInstance().unlock(); } } // Reset doomsday counter.... current_subject.touchSession (); return (current_subject); } @Override // SecurityEngine public SecuritySubject getSubject () { SecuritySubject security_subject = getStoredSubject (false); log.info ("Shiro: getSubject() = {}", security_subject); return (security_subject); } @Override // SecurityEngine public SecuritySubject createSystemSubject () { return (getStoredSubject (true)); } } // EOF
[ "marcond@gmail.com" ]
marcond@gmail.com
17b16930d7c7b85fb03d8e62d709d323c2fe7814
66ea8813f0cea0dbb60aef4d4e04b9af10eefffe
/ghotel-core/src/test/java/org/ghotel/core/AppTest.java
387747b8f99d98f586d546cc1ae99807df8e63f3
[]
no_license
ghotel2018/ghotel
1c14d1aae5258d0a5715a6e1670121cac733ed07
a666467794644cb8f95bc46342b49d15bdffae09
refs/heads/master
2020-03-28T01:01:45.503255
2018-10-09T08:38:10
2018-10-09T08:38:10
142,123,433
2
0
null
null
null
null
UTF-8
Java
false
false
643
java
package org.ghotel.core; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; /** * Unit test for simple App. */ public class AppTest extends TestCase { /** * Create the test case * * @param testName name of the test case */ public AppTest( String testName ) { super( testName ); } /** * @return the suite of tests being tested */ public static Test suite() { return new TestSuite( AppTest.class ); } /** * Rigourous Test :-) */ public void testApp() { assertTrue( true ); } }
[ "ghotel2018@163.com" ]
ghotel2018@163.com
aeb02110bf7b29bf04b2210c7501ba493b9cd0a9
4c2f8bc89118b490acc2fb2d7cd5c08b6b40e602
/utils/Parametry.java
05043d87bacbd0c69f22030b2f975ec09ca5d963
[]
no_license
WiktorGrzankowski/Simulation
f864c77238308ada55423e48512e4bd059e8da00
6826c07c4a27eaad29b31aada3e31a21534530c7
refs/heads/master
2023-06-08T04:35:22.002921
2021-06-12T13:44:01
2021-06-12T13:44:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
9,746
java
package zad1.utils; import java.io.File; import java.security.InvalidParameterException; import java.util.NoSuchElementException; import java.util.Scanner; import java.util.Locale; /** * Klasa zawiera wszystkie parametry podane w pliku parametry.txt. * W konstruktorze wczytuje kolejne parametry oraz sprawdza ich poprawność. * zad1.utils.Parametry są atrybutem obiektów klas zad1.Symulacja, zad1.utils.Plansza oraz zad1.utils.Rob. */ public class Parametry { private double ileDajeJedzenie = -1; private int ileRosnieJedzenie = -1; private double limitPowielania = -1; private double prPowielenia = -1; private double prDodaniaInstrukcji = -1; private double prUsunieciaInstrukcji = -1; private double prZmianyInstrukcji = -1; private double kosztTury = -1; private double ulamekEnergiiRodzica = -1; private int ileTur = -1; private int coIleWypisz = -1; private int poczatkowaLiczbaRobow = -1; private String spisInstrukcji = "brak"; private String poczatkowyProgram = "brak"; private double poczatkowaEnergia = -1; /** * Konstruktor kolejno wczytuje parametry i jego wartości z pliku parametry.txt. * Początkowo zmienne liczbowe są ustawione na -1. Przy wczytaniu nazwy parametru jest sprawdzane, czy * wartość parametru wynosi -1. Jeśli tak nie jest, to parametr został wczytany drugi raz. * Początkowo zmienne typu String są ustanowie na "brak". Jeśli przy wczytaniu nazwy parametru typu String * zmienna ta zawiera inny napis niż "brak", to znaczy, że ten parametr został wczytany drugi raz. * Zmienna ileWczytanoParametrow zlicza ile parametrów wczytano. Na końcu konstruktora sprawdzane jest, czy * wczytano dokładnie 15 zmiennych. Gdyby wczytano więcej lub mniej, to wejście jest niepoprawne. */ public Parametry(File plikParametry) throws Exception { Scanner input = new Scanner(plikParametry).useLocale(Locale.ENGLISH); int ileWczytanoParametrow = 0; while (input.hasNextLine()) { if (!input.hasNext()) break; String parametr = input.next(); assert input.hasNext(); switch (parametr) { case "ile_daje_jedzenie": if (ileDajeJedzenie != -1) throw new InvalidParameterException(); ileDajeJedzenie = input.nextDouble(); if (ileDajeJedzenie < 0) throw new InvalidParameterException(); break; case "ile_rośnie_jedzenie": if (ileRosnieJedzenie != -1) throw new InvalidParameterException(); ileRosnieJedzenie = input.nextInt(); if (ileRosnieJedzenie <= 0) throw new InvalidParameterException(); break; case "limit_powielania": if (limitPowielania != -1) throw new InvalidParameterException(); limitPowielania = input.nextDouble(); if (limitPowielania <= 0) throw new InvalidParameterException(); break; case "pr_powielenia": if (prPowielenia != -1) throw new InvalidParameterException(); prPowielenia = input.nextDouble(); if (prPowielenia > 1 || prPowielenia < 0) throw new InvalidParameterException(); break; case "pr_dodania_instr": if (prDodaniaInstrukcji != -1) throw new InvalidParameterException(); prDodaniaInstrukcji = input.nextDouble(); if (prDodaniaInstrukcji > 1 || prDodaniaInstrukcji < 0) throw new InvalidParameterException(); break; case "pr_zmiany_instr": if (prZmianyInstrukcji != -1) throw new InvalidParameterException(); prZmianyInstrukcji = input.nextDouble(); if (prZmianyInstrukcji > 1 || prZmianyInstrukcji < 0) throw new InvalidParameterException(); break; case "pr_usunięcia_instr": if (prUsunieciaInstrukcji != -1) throw new InvalidParameterException(); prUsunieciaInstrukcji = input.nextDouble(); if (prUsunieciaInstrukcji > 1 || prUsunieciaInstrukcji < 0) throw new InvalidParameterException(); break; case "koszt_tury": if (kosztTury != -1) throw new InvalidParameterException(); kosztTury = input.nextDouble(); if (kosztTury < 0) throw new InvalidParameterException(); break; case "ułamek_energii_rodzica": if (ulamekEnergiiRodzica != -1) throw new InvalidParameterException(); ulamekEnergiiRodzica = input.nextDouble(); if (ulamekEnergiiRodzica > 1 || ulamekEnergiiRodzica < 0) throw new InvalidParameterException(); break; case "ile_tur": if (ileTur != -1) throw new InvalidParameterException(); ileTur = input.nextInt(); if (ileTur < 0) throw new InvalidParameterException(); break; case "co_ile_wypisz": if (coIleWypisz != -1) throw new InvalidParameterException(); coIleWypisz = input.nextInt(); if (coIleWypisz <= 0) throw new InvalidParameterException();; break; case "pocz_ile_robów": if (poczatkowaLiczbaRobow != -1) throw new InvalidParameterException(); poczatkowaLiczbaRobow = input.nextInt(); if (poczatkowaLiczbaRobow < 0) throw new InvalidParameterException(); break; case "pocz_energia": if (poczatkowaEnergia != -1) throw new InvalidParameterException(); poczatkowaEnergia = input.nextDouble(); if (poczatkowaEnergia <= 0) throw new InvalidParameterException(); break; case "spis_instr": if (!spisInstrukcji.equals("brak")) throw new InvalidParameterException(); spisInstrukcji = input.next(); break; case "pocz_progr": if (!poczatkowyProgram.equals("brak")) throw new InvalidParameterException(); poczatkowyProgram = input.next(); break; default: throw new NoSuchElementException(); } ileWczytanoParametrow++; } if (ileWczytanoParametrow != 15) throw new InvalidParameterException(); if (!poprawnySpisInstrukcji()) throw new InvalidParameterException(); if (!spisZawieraProgram()) throw new InvalidParameterException(); input.close(); } /** * Sprawdza, czy w poczatkowym programie nie ma isntrukcji spoza spisu instrukcji. */ private boolean spisZawieraProgram() { for (int i = 0; i < poczatkowyProgram.length(); ++i) { if (spisInstrukcji.indexOf(poczatkowyProgram.charAt(i)) == -1) return false; } return true; } /** * Sprawdza, czy w spisie instrukcji nie występują litery inne niż 'l', 'p', 'i', 'w' bądź 'j' * oraz, czy się nie powtarzają. */ private boolean poprawnySpisInstrukcji() { if (!spisInstrukcji.matches("[lpiwj]+")) return false; int ileJedz = 0, ileWąchaj = 0, ileIdz = 0, ilePrawo = 0, ileLewo = 0; for (int i = 0; i < spisInstrukcji.length(); ++i) { switch (spisInstrukcji.charAt(i)) { case 'l': // obroc sie w lewo ileLewo++; break; case 'p': // obroc sie w prawo ilePrawo++; break; case 'i': // idź ileIdz++; break; case 'w': // wąchaj ileWąchaj++; break; case 'j': // jedz ileJedz++; break; } } return ileJedz < 2 && ileWąchaj < 2 && ileIdz < 2 && ilePrawo < 2 && ileLewo < 2; } public double getIleDajeJedzenie() { return ileDajeJedzenie; } public int getIleRosnieJedzenie() { return ileRosnieJedzenie; } public double getLimitPowielania() { return limitPowielania; } public double getPrPowielenia() { return prPowielenia; } public double getPrDodaniaInstrukcji() { return prDodaniaInstrukcji; } public double getPrUsunieciaInstrukcji() { return prUsunieciaInstrukcji; } public double getPrZmianyInstrukcji() { return prZmianyInstrukcji; } public double getKosztTury() { return kosztTury; } public double getUlamekEnergiiRodzica() { return ulamekEnergiiRodzica; } public int getIleTur() { return ileTur; } public int getCoIleWypisz() { return coIleWypisz; } public int getPoczatkowaLiczbaRobow() { return poczatkowaLiczbaRobow; } public String getSpisInstrukcji() { return spisInstrukcji; } public String getPoczatkowyProgram() { return poczatkowyProgram; } public double getPoczatkowaEnergia() { return poczatkowaEnergia; } }
[ "wg429211@students.mimuw.edu.pl" ]
wg429211@students.mimuw.edu.pl
93d31324d0e8372c7090fe75834e06a987a80398
40d844c1c780cf3618979626282cf59be833907f
/src/testcases/CWE572_Call_to_Thread_run_Instead_of_start/CWE572_Call_to_Thread_run_Instead_of_start__basic_03.java
9402d376f2ee29a8489fe10b71243c7459f52905
[]
no_license
rubengomez97/juliet
f9566de7be198921113658f904b521b6bca4d262
13debb7a1cc801977b9371b8cc1a313cd1de3a0e
refs/heads/master
2023-06-02T00:37:24.532638
2021-06-23T17:22:22
2021-06-23T17:22:22
379,676,259
1
0
null
null
null
null
UTF-8
Java
false
false
2,953
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE572_Call_to_Thread_run_Instead_of_start__basic_03.java Label Definition File: CWE572_Call_to_Thread_run_Instead_of_start__basic.label.xml Template File: point-flaw-03.tmpl.java */ /* * @description * CWE: 572 Call to Thread run instead of Thread start * Sinks: * GoodSink: calls thread start * BadSink : calls thread run * Flow Variant: 03 Control flow: if(5==5) and if(5!=5) * * */ package testcases.CWE572_Call_to_Thread_run_Instead_of_start; import testcasesupport.*; public class CWE572_Call_to_Thread_run_Instead_of_start__basic_03 extends AbstractTestCase { public void bad() throws Throwable { if (5 == 5) { IO.writeLine("bad() Main thread name is: " + Thread.currentThread().getName()); Thread threadOne = new Thread() { public void run() { IO.writeLine("bad() In thread: " + Thread.currentThread().getName()); } }; threadOne.run(); /* FLAW: Called Thread.run() instead of Thread.start() */ } } /* good1() changes 5==5 to 5!=5 */ private void good1() throws Throwable { if (5 != 5) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run */ IO.writeLine("Benign, fixed string"); } else { IO.writeLine("good() Main thread name is: " + Thread.currentThread().getName()); Thread threadTwo = new Thread() { public void run() { IO.writeLine("good() In thread: " + Thread.currentThread().getName()); } }; threadTwo.start(); /* FIX: Correctly called Thread.start() */ } } /* good2() reverses the bodies in the if statement */ private void good2() throws Throwable { if (5 == 5) { IO.writeLine("good() Main thread name is: " + Thread.currentThread().getName()); Thread threadTwo = new Thread() { public void run() { IO.writeLine("good() In thread: " + Thread.currentThread().getName()); } }; threadTwo.start(); /* FIX: Correctly called Thread.start() */ } } public void good() throws Throwable { good1(); good2(); } /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "you@example.com" ]
you@example.com
345a05eb105ad8d5e47da7c8dd8d53a11abc3416
34a4c4d87332939d3a89d2e6e8f9ed06d05ca712
/src/gui/userrequest/UserRequest.java
4fd83048a16d61632e5c3b92c8c5084becd2897d
[]
no_license
ppashakhanloo/CELization
e22889760118b2d87649a6d34a76aa3606bf401f
9d62e425b94fd55d3e3ff5c53f538a3a7dbf81d0
refs/heads/master
2020-09-22T03:14:15.123651
2015-08-31T14:58:41
2015-08-31T14:58:41
41,681,369
0
0
null
null
null
null
UTF-8
Java
false
false
270
java
package gui.userrequest; import gui.gui.GUIGameObject; abstract public class UserRequest { private GUIGameObject uiObject; public UserRequest(GUIGameObject uiObject) { this.uiObject = uiObject; } public GUIGameObject getUiObject() { return uiObject; } }
[ "ppashakhanloo@gmail.com" ]
ppashakhanloo@gmail.com
94af4a1904b3973c0c24bd2f0fe844c58f6ba5bd
068d982fb3edf636d7479c4bed8c6d8857e5bb33
/BlogPost/src/main/java/com/salena/blogpost/blogpost/BlogPost.java
34123cafcdb4155193f289419d566f6743add870
[]
no_license
salenastamp/blogproject
1b0e5785258b5eeffe7a5c53380053d0be8569ef
78a1538ee10adf7539da600162e9087b60904a19
refs/heads/main
2023-02-13T02:43:26.508035
2021-01-11T18:17:18
2021-01-11T18:17:18
317,240,417
0
0
null
null
null
null
UTF-8
Java
false
false
1,562
java
package com.salena.blogpost.blogpost; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; @Entity public class BlogPost { //sets the Id as the Primary Key @Id //allows the Id to be generated by the underlying database @GeneratedValue(strategy=GenerationType.AUTO) private Long id; private String title; private String author; private String blogEntry; public BlogPost(){ //non-argument constructor needed for JPA } public BlogPost(String title, String author, String blogEntry) { this.title = title; this.author = author; this.blogEntry = blogEntry; } public BlogPost(String title, String author, String blogEntry, Long id) { this.title = title; this.author = author; this.blogEntry = blogEntry; this.id=id; } public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getAuthor() { return author; } public void setAuthor(String author) { this.author = author; } public String getBlogEntry() { return blogEntry; } public void setBlogEntry(String blogEntry) { this.blogEntry = blogEntry; } @Override public String toString() { return "BlogPost [id=" + id + ", title=" + title + ", author=" + author + ", blogEntry=" + blogEntry + "]"; } public Long getId() { return id; } public void setId(Long id) { this.id = id; } }
[ "noreply@github.com" ]
salenastamp.noreply@github.com
771943c79602cc4dac097311a24032aff85d2f22
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
/sas-20181203/src/main/java/com/aliyun/sas20181203/models/DescribeRiskListCheckResultResponseBody.java
7b9567550aa3d47d4644396eac3f0812ed32de38
[ "Apache-2.0" ]
permissive
aliyun/alibabacloud-java-sdk
83a6036a33c7278bca6f1bafccb0180940d58b0b
008923f156adf2e4f4785a0419f60640273854ec
refs/heads/master
2023-09-01T04:10:33.640756
2023-09-01T02:40:45
2023-09-01T02:40:45
288,968,318
40
45
null
2023-06-13T02:47:13
2020-08-20T09:51:08
Java
UTF-8
Java
false
false
2,531
java
// This file is auto-generated, don't edit it. Thanks. package com.aliyun.sas20181203.models; import com.aliyun.tea.*; public class DescribeRiskListCheckResultResponseBody extends TeaModel { /** * <p>The number of risk items for each cloud service.</p> */ @NameInMap("List") public java.util.List<DescribeRiskListCheckResultResponseBodyList> list; /** * <p>The ID of the request, which is used to locate and troubleshoot issues.</p> */ @NameInMap("RequestId") public String requestId; public static DescribeRiskListCheckResultResponseBody build(java.util.Map<String, ?> map) throws Exception { DescribeRiskListCheckResultResponseBody self = new DescribeRiskListCheckResultResponseBody(); return TeaModel.build(map, self); } public DescribeRiskListCheckResultResponseBody setList(java.util.List<DescribeRiskListCheckResultResponseBodyList> list) { this.list = list; return this; } public java.util.List<DescribeRiskListCheckResultResponseBodyList> getList() { return this.list; } public DescribeRiskListCheckResultResponseBody setRequestId(String requestId) { this.requestId = requestId; return this; } public String getRequestId() { return this.requestId; } public static class DescribeRiskListCheckResultResponseBodyList extends TeaModel { /** * <p>The instance ID of the cloud service.</p> */ @NameInMap("InstanceId") public String instanceId; /** * <p>The total number of risk items detected in the current cloud service.</p> */ @NameInMap("riskCount") public Long riskCount; public static DescribeRiskListCheckResultResponseBodyList build(java.util.Map<String, ?> map) throws Exception { DescribeRiskListCheckResultResponseBodyList self = new DescribeRiskListCheckResultResponseBodyList(); return TeaModel.build(map, self); } public DescribeRiskListCheckResultResponseBodyList setInstanceId(String instanceId) { this.instanceId = instanceId; return this; } public String getInstanceId() { return this.instanceId; } public DescribeRiskListCheckResultResponseBodyList setRiskCount(Long riskCount) { this.riskCount = riskCount; return this; } public Long getRiskCount() { return this.riskCount; } } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
4f188a38411fb1bf9bb7192abffa4befa75fad18
f2744060a5faf75be646e0e8d21d81211b3619be
/JAVA/Java Projects/Pro_24-02-2020/HW20200224_Part1/src/hw20200224P1/Main.java
111d8205adf1aa7fa86dc515872289ea8cfd3c2b
[]
no_license
SayRattana/MobileApps
1df9041133bdb7cfb6e8fb3e9daf50e7256f5a4f
41f4260af93cecf09e373b7bbb16143255598e9a
refs/heads/master
2021-01-09T13:51:26.745032
2020-10-28T10:28:00
2020-10-28T10:28:00
242,325,600
0
0
null
null
null
null
UTF-8
Java
false
false
910
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 hw20200224P1; import java.util.*; /** * * @author HP01 */ public class Main { /** * @param args the command line arguments */ public static void main(String[] args) { ArrayList <Employee> employees = new ArrayList <Employee>(); employees.add(new Employee("Say Rattana",2020,5000.00,"Camboia")); employees.add(new Employee("Pi Pang",2019,4000.00,"Vietnam")); employees.add(new Employee("Pi Phet",2018,3500.00,"Vietnam")); employees.add(new Employee("Mr hai",2017,3000.00,"camboia")); System.out.println("Name\t\tYearofJoin\t\tSalary\t\tAddress"); System.out.println(employees.toString()); } }
[ "sayrattana.nac@gmail.com" ]
sayrattana.nac@gmail.com
e1180446ceab2d13ff40fa02d9a4208867eae5de
993140d652b4f09d0e90ea88eea394f31f65fda8
/app/src/main/java/pl/lamvak/barcodeexporter/BarcodeCaptureSubcomponent.java
8c6e9457ef3d811a10014ecfbe83dd382ae59ca2
[]
no_license
lamvak/Barcodeexporter
88094adb051f61f1327951ba0dbe14306de1c24d
c339f86caafe12ac8da9aa26ce8f9489562565a3
refs/heads/master
2021-01-23T15:59:07.491349
2017-06-11T17:50:59
2017-06-11T17:50:59
93,279,825
0
0
null
null
null
null
UTF-8
Java
false
false
317
java
package pl.lamvak.barcodeexporter; import dagger.Subcomponent; import dagger.android.AndroidInjector; @Subcomponent public interface BarcodeCaptureSubcomponent extends AndroidInjector<BarcodeCapture> { @Subcomponent.Builder public abstract class Builder extends AndroidInjector.Builder<BarcodeCapture> {} }
[ "lamvak@gmail.com" ]
lamvak@gmail.com
459be20ddee855e29cb277f594b3625df1e4909f
a17aea4b980c5e76e22297d78772937e961b743b
/FileIO.java
f099ad1b8a249aa4a21bbcd034b025f6d24a0f51
[]
no_license
Abhishek-Santharaj/JavaLearn
ed686d5d404c56f2bf2ade9b76ff63c270b16a4a
df65dc8dc6d681d0a73afde52f111e644fbf4fc5
refs/heads/master
2023-07-11T17:47:27.659981
2021-08-28T05:07:54
2021-08-28T05:07:54
395,545,551
0
1
null
null
null
null
UTF-8
Java
false
false
520
java
package programs; import java.io.BufferedReader; import java.io.File; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; public class FileIO { public static void main(String[] args) throws IOException { File ff = new File("/home/abhishek/Desktop/abc.txt"); FileReader fr = new FileReader(ff); BufferedReader br = new BufferedReader(fr); String content = br.readLine(); while(content!=null) { System.out.println(content); content = br.readLine(); } } }
[ "noreply@github.com" ]
Abhishek-Santharaj.noreply@github.com
b88124339dfea7165c85a2e27c9e7c2349286065
aed376c05c8224a98d3f00be741be2a47c1a1532
/leetcode-oj/coding-java/src/main/java/com/leetcode/keyao/linklist/Q379DesignPhoneDirectory.java
396dac47261e07d06fa553915070d776855eef46
[]
no_license
zhukeyao/coding
ab073b8e47ae1590c5b94e5ecf36d3525cc71574
41c6f6ebd50a4eec3b11a9da46e173bacefa6ae1
refs/heads/master
2020-06-09T00:58:25.244278
2017-08-04T04:39:39
2017-08-04T04:39:39
16,594,783
0
0
null
null
null
null
UTF-8
Java
false
false
926
java
package com.leetcode.keyao.linklist; import java.util.HashSet; import java.util.PriorityQueue; import java.util.Set; /** * Created by keyao on 12/28/16. */ public class Q379DesignPhoneDirectory { int capacity; int currentMax = 0; PriorityQueue<Integer> recycle = new PriorityQueue<>(); Set<Integer> assigned = new HashSet<Integer>(); Q379DesignPhoneDirectory(int capacity) { capacity = capacity; } public Integer get() { if (recycle.size() != 0) { Integer n = recycle.poll(); assigned.add(n); return n; } if (currentMax == capacity) return -1; currentMax++; assigned.add(currentMax); return currentMax; } public boolean check(Integer n) { return assigned.contains(n); } public void release(Integer n) { assigned.remove(n); recycle.add(n); } }
[ "keyao@ITadmins-Air.attlocal.net" ]
keyao@ITadmins-Air.attlocal.net
f56ab63bbb53c6ba3a868a2b7b634daddcd69640
485d47c3669acb6f457eb61b32133ba2baebe08f
/spring-scaffold-cli/src/main/java/br/com/netodevel/command/setup/SetupScaffoldHandler.java
0834759efe065905473df35d798232d28cd19750
[ "MIT" ]
permissive
sdtorresl/cli-spring-boot-scaffold
8e08198ecb8e48b250bf6d4afe53bf5cee0e0bc7
24d16b8209eb3fe7e4fd206daca76d131e07a1c0
refs/heads/master
2020-03-25T15:52:44.361228
2018-09-15T18:32:43
2018-09-15T18:32:43
143,905,102
0
0
null
2018-09-15T18:32:45
2018-08-07T17:18:19
Java
UTF-8
Java
false
false
2,092
java
package br.com.netodevel.command.setup; import java.util.Arrays; import joptsimple.OptionSet; import joptsimple.OptionSpec; import org.springframework.boot.cli.command.options.OptionHandler; import org.springframework.boot.cli.command.status.ExitStatus; import br.com.generate.application.properties.ApplicationPropertiesGenerator; import br.com.generate.setup.command.SetupGenerator; /** * @author NetoDevel * @since 0.0.1 */ public class SetupScaffoldHandler extends OptionHandler { @SuppressWarnings("unused") private OptionSpec<String> namePackage; @SuppressWarnings("unused") private OptionSpec<String> dataBase; @SuppressWarnings("unused") private OptionSpec<String> userDatabase; @SuppressWarnings("unused") private OptionSpec<String> passwordDatabase; @Override protected void options() { this.namePackage = option(Arrays.asList("namePackage", "n"), "name of package to create scaffolds").withOptionalArg(); this.dataBase = option(Arrays.asList("dataBaseName", "d"), "name of database").withOptionalArg(); this.userDatabase = option(Arrays.asList("userDatabase", "u"), "username database for migrates").withOptionalArg(); this.passwordDatabase = option(Arrays.asList("passwordDatabase", "p"), "password database for migrates").withOptionalArg(); } @Override protected ExitStatus run(OptionSet options) throws Exception { String namePackage = (String) options.valueOf("n"); String nameDataBase = (String) options.valueOf("d"); String userNameDatabase = (String) options.valueOf("u"); String passwordDatabase = (String) options.valueOf("p"); namePackage = namePackage != null ? namePackage.trim() : namePackage; nameDataBase = nameDataBase != null ? nameDataBase.trim() : nameDataBase; userNameDatabase = userNameDatabase != null ? userNameDatabase.trim() : userNameDatabase; passwordDatabase = passwordDatabase != null ? passwordDatabase.trim() : passwordDatabase; new SetupGenerator(namePackage, nameDataBase, userNameDatabase, passwordDatabase); new ApplicationPropertiesGenerator(); return ExitStatus.OK; } }
[ "josevieira.dev@gmail.com" ]
josevieira.dev@gmail.com
e11499d85f429530498a524cc2f07bec892e3315
3ef282b346069281194eb7702d9def872a85fca9
/src/oopprogrambeta/ItemType.java
0090841ef4cd9a59fa279475069eb68c5e67a28b
[]
no_license
delcastGitHub/OOP-Program-Release-Candidate-Final
0a66968f87710604d4ec37250ccc6e0b3162d5aa
c7cb1ea261d65a75b43ddbd2e9730e670b41e120
refs/heads/master
2020-04-09T11:07:56.251309
2018-12-04T04:44:46
2018-12-04T04:44:46
160,296,561
0
0
null
null
null
null
UTF-8
Java
false
false
915
java
/************************************************************************************************************* * @Author : Milko Del Castillo * @Version : v. 1.0 * @Since : 11/09/2018 * FileName : ItemType.java * Source : Code written based on specifications provided in Oracle Academy's OraclProduction document. * All rights for the document and specifications belong to Oracle. * Description : This class creates an enum to pre-set 4 types of items: audio, visual, audio mobile, visual mobile. ************************************************************************************************************/ package oopprogrambeta; // It creates an enum to pre-set 4 types of items: audio, visual, audio mobile, visual mobile. public enum ItemType { AUDIO, // audio type VISUAL, // visual type AudioMobile, // audio mobile type VisualMobile, // visual mobile type }
[ "noreply@github.com" ]
delcastGitHub.noreply@github.com
5527f720492431e083feb95e055afbcc774dce89
9a70a4c749f502b2c70222afd231692e3172952d
/WomenEmpowerment2/src/com/lti/core/entities/Hostel.java
2fc10b0a2d08f6714728eed5f5c9efa05ed203ad
[]
no_license
prithviraj-pawar/WomenEmpowerment
3d7e236e42e50b1d33fdc17cf390d50024aba301
a68ecaa4d5eb2ab7e7d7e64f444ea6a881799b1f
refs/heads/master
2022-12-24T00:05:23.449152
2019-11-26T19:57:04
2019-11-26T19:57:04
224,275,740
0
0
null
2022-12-15T23:39:04
2019-11-26T20:02:27
Java
UTF-8
Java
false
false
3,322
java
package com.lti.core.entities; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.Temporal; import javax.persistence.TemporalType; import org.springframework.context.annotation.Scope; import org.springframework.format.annotation.DateTimeFormat; import org.springframework.format.annotation.DateTimeFormat.ISO; import org.springframework.stereotype.Component; @Entity(name="hostel") @Table(name="HOSTELREG") public class Hostel { @Id @Column(name="USERNAME") private String userName; @Column(name="FIRST_NAME") private String firstName; @Column(name="LAST_NAME") private String lastName; @DateTimeFormat(pattern="yyyy-MM-dd", iso=ISO.DATE) @Column(name="DOB") @Temporal(TemporalType.DATE) private Date dob; @Column(name="CONTACT_NO") private int contactNo; @Column(name="ADDRESS") private String address; @Column(name="INCOME") private int income; @Column(name="MARITAL_STATUS") private String maritalStatus; @Column(name="CHILDREN") private int children; @Column(name="CHILD_GENDER") private String childGender; @Column(name="DESIG") private String desig; @Column(name="PDC") private String pdc; public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public Date getDob() { return dob; } public void setDob(Date dob) { this.dob = dob; } public int getContactNo() { return contactNo; } public void setContactNo(int contactNo) { this.contactNo = contactNo; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public int getIncome() { return income; } public void setIncome(int income) { this.income = income; } public String getMaritalStatus() { return maritalStatus; } public void setMaritalStatus(String maritalStatus) { this.maritalStatus = maritalStatus; } public int getChildren() { return children; } public void setChildren(int children) { this.children = children; } public String getChildGender() { return childGender; } public void setChildGender(String childGender) { this.childGender = childGender; } public String getDesig() { return desig; } public void setDesig(String desig) { this.desig = desig; } public String getPdc() { return pdc; } public void setPdc(String pdc) { this.pdc = pdc; } public Hostel() { System.out.println("Object Created"); } @Override public String toString() { return "Hostel [userName=" + userName + ", firstName=" + firstName + ", lastName=" + lastName + ", dob=" + dob + ", contactNo=" + contactNo + ", address=" + address + ", income=" + income + ", maritalStatus=" + maritalStatus + ", children=" + children + ", childGender=" + childGender + ", desig=" + desig + ", pdc=" + pdc + "]"; } }
[ "Prithviraj@Prithviraj" ]
Prithviraj@Prithviraj
e10d324b5cb50c74c89589cf3e16c7fbfcb96f8f
cc6b5940d80553bf8a178e8f3108167945fcfb12
/kie-dmn/kie-dmn-model/src/main/java/org/kie/dmn/model/v1_4/TFunctionDefinition.java
6e731d239af140180f7b8fb2ae4f39f0648cbb95
[ "Apache-2.0" ]
permissive
yesamer/drools
f0f9889f212a1becb1144ed704e58649f2555bcd
92b5f4e57755bfd1f4e52af34dfcbf0d608f33c9
refs/heads/master
2023-07-06T14:50:31.161516
2023-06-27T01:00:28
2023-06-27T01:00:28
185,600,193
0
0
Apache-2.0
2022-02-15T11:22:48
2019-05-08T12:19:09
Java
UTF-8
Java
false
false
1,773
java
/* * Copyright 2022 Red Hat, Inc. 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 org.kie.dmn.model.v1_4; import java.util.ArrayList; import java.util.List; import org.kie.dmn.model.api.Expression; import org.kie.dmn.model.api.FunctionDefinition; import org.kie.dmn.model.api.FunctionKind; import org.kie.dmn.model.api.InformationItem; public class TFunctionDefinition extends TExpression implements FunctionDefinition { protected List<InformationItem> formalParameter; protected Expression expression; protected FunctionKind kind; @Override public List<InformationItem> getFormalParameter() { if (formalParameter == null) { formalParameter = new ArrayList<>(); } return this.formalParameter; } @Override public Expression getExpression() { return expression; } @Override public void setExpression(Expression value) { this.expression = value; } @Override public FunctionKind getKind() { if (kind == null) { return FunctionKind.FEEL; } else { return kind; } } @Override public void setKind(FunctionKind value) { this.kind = value; } }
[ "noreply@github.com" ]
yesamer.noreply@github.com
d56a27469cdd6cca93d2a5c399fbe0ce390b330b
67fd5c01e55d075322562fadcd53d1c15eb4f461
/guice/filteringGuice/src/main/java/org/tcw/config/MyGuiceServletConfig.java
80f9007878fe7979d5379044ba594a8cfb9557a1
[]
no_license
tcw/Skeletons
fe1c25399069f65b3c439723e47d5b4734617274
6261d741d5fb6c4132fe2a5dc02b74deb5a03ee2
refs/heads/master
2020-05-18T21:02:07.060299
2011-04-12T19:09:02
2011-04-12T19:09:02
1,601,180
0
0
null
null
null
null
UTF-8
Java
false
false
671
java
package org.tcw.config; import com.google.inject.Guice; import com.google.inject.Injector; import com.google.inject.servlet.GuiceServletContextListener; import com.google.inject.servlet.ServletModule; import org.tcw.filters.MyFilter; import org.tcw.servlets.MyServlet; public class MyGuiceServletConfig extends GuiceServletContextListener { @Override protected Injector getInjector() { return Guice.createInjector(new ServletModule() { @Override protected void configureServlets() { filter("/*").through(MyFilter.class); serve("/hello").with(MyServlet.class); } }); } }
[ "tcwgit@gmail.com" ]
tcwgit@gmail.com
36a77695630f439c98b2a81a68e4dbe4bafda4be
d2af70eedab94df6fda54a44437579907cef4d94
/src/main/java/com/isolutions/usermanagement/controller/EmployeeController.java
51e5de79e80e558c12d435bdf41acff1333bec7b
[]
no_license
alkettarko/User-Management
3dda820af9564be46959b6bcacf7f6bb735d7fd4
e200e198ef33cd7f6d70fb841c55cdde0d61cdbf
refs/heads/master
2022-03-24T06:28:21.243360
2019-12-10T01:06:43
2019-12-10T01:06:43
224,932,455
1
0
null
null
null
null
UTF-8
Java
false
false
3,769
java
package com.isolutions.usermanagement.controller; import java.util.List; import javax.validation.Valid; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; import com.isolutions.usermanagement.dto.DepartmentRequest; import com.isolutions.usermanagement.dto.EmployeeRequest; import com.isolutions.usermanagement.exception.UserManagementException; import com.isolutions.usermanagement.model.Employee; import com.isolutions.usermanagement.service.EmployeService; import com.isolutions.usermanagement.service.EmploymentHistoryService; @RestController @RequestMapping("/employee") public class EmployeeController { @Autowired private EmployeService employeeService; @Autowired private EmploymentHistoryService employmentHistoryService; @GetMapping public List<Employee> getEmployes() { return employeeService.getEmployes(); } @GetMapping("/{id}") public ResponseEntity<Employee> getEmployeeById(@PathVariable("id") int id) { return ResponseEntity.ok(employeeService.getEmployeeById(id)); } @PostMapping public ResponseEntity<?> create(@RequestBody @Valid EmployeeRequest employeeRequest) { return ResponseEntity.ok(employeeService.create(employeeRequest)); } @PutMapping("/{id}") public ResponseEntity<?> update(@RequestBody @Valid EmployeeRequest employeeRequest, @PathVariable("id") int id) { return ResponseEntity.ok(employeeService.update(employeeRequest, id)); } @DeleteMapping("/{id}") public ResponseEntity<Employee> delete(@PathVariable("id") int id) { employeeService.delete(id); return ResponseEntity.ok().build(); } @PutMapping("/{id}/department") public ResponseEntity<?> changeDepartment(@PathVariable("id") int employeeId, @RequestBody DepartmentRequest departmentRequest) { employeeService.changeDepartment(employeeId, departmentRequest.getDepartmentId()); return ResponseEntity.ok().build(); } @PostMapping(value = "/{id}/image", consumes = { MediaType.IMAGE_JPEG_VALUE }) public ResponseEntity<?> uploadImage(@RequestParam("image") MultipartFile image, @PathVariable("id") int employeeId) { employeeService.uploadImage(image, employeeId); return ResponseEntity.noContent().build(); } @GetMapping("/{id}/image") public ResponseEntity<?> downloadImage(@PathVariable int id) { Employee employee = employeeService.getEmployeeById(id); if (employee.getImage() == null) { throw new UserManagementException(String.format("Employee with id %s doesn't have an image", id), HttpStatus.NOT_FOUND); } return ResponseEntity.ok().contentType(MediaType.IMAGE_JPEG) .header(HttpHeaders.CONTENT_DISPOSITION, "attachment; filename=\"" + employee.getFirstName() + "\"") .body(employee.getImage()); } @GetMapping("/{id}/history") public ResponseEntity<?> getHistoryByEmployee(@PathVariable("id") int employeeId) { Employee employee = employeeService.getEmployeeById(employeeId); return ResponseEntity.ok(employmentHistoryService.getHistoryByEmployee(employee)); } }
[ "you@example.comalkettarko@outlook.com" ]
you@example.comalkettarko@outlook.com
42a74d4db410bac81acbe78dd67cdff788cb407e
845cf0de4836e1bbadb96629ed4102c43018aa57
/src/com/bdgolka/Multithreading/MyThread.java
7b244b3bd61b6b8937afd3aca7c18e297c64193f
[]
no_license
Bdgolka/Child_Java8
b4c9a218c063864c791bb8e44dc011b246c17710
bc28fc9ff63915b89465a86fa719cf18ea6bae65
refs/heads/master
2020-04-06T04:05:15.716686
2017-03-26T18:53:43
2017-03-26T18:53:43
83,059,259
0
0
null
null
null
null
UTF-8
Java
false
false
522
java
package com.bdgolka.Multithreading; public class MyThread extends Thread { public MyThread(String name) { super(name); start(); } @Override public void run() { System.out.println(getName() + " - star"); try { for (int count = 0; count <10; count++){ Thread.sleep(400); System.out.println("In " + getName()+ ", counter: " + count); } } catch (InterruptedException e) { System.out.println(getName() + " - interrupted"); } System.out.println(getName() + " - finished"); } }
[ "juliapulova@yandex.ru" ]
juliapulova@yandex.ru
3b47760c2d5e8194c7cfb8b6c303dbb4d9f9d451
507dcd4558d87173b08cdd95f0dcb45a81c7a8fd
/xll-modules/xll-upms-service/src/main/java/com/xll/upms/admin/service/SysUserRoleService.java
1aea9af7d9e0a1288fa061262ececbaa5bf37949
[ "MIT" ]
permissive
dadadematisheng/xll-upms
d5189d6bc2bba2e5267eb8abdc490656be92ad2e
95980a2f676b1876b8c9479d4d54e26cb1113c6f
refs/heads/master
2023-03-18T20:22:37.298883
2020-04-12T03:04:20
2020-04-12T03:04:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
550
java
package com.xll.upms.admin.service; import com.baomidou.mybatisplus.service.IService; import com.xll.upms.admin.model.entity.SysUserRole; /** * @Author 徐亮亮 * @Description: 用户角色表 服务类 * @Date 2019/1/18 21:58 */ public interface SysUserRoleService extends IService<SysUserRole> { /** * 根据用户Id删除该用户的角色关系 * * @author 寻欢·李 * @date 2017年12月7日 16:31:38 * @param userId 用户ID * @return boolean */ Boolean deleteByUserId(Integer userId); }
[ "1156033582@qq.com" ]
1156033582@qq.com
a50fc63c80e1b853fdaf3a2368bb3081a929ef64
03f6940a51c6b4499df45302f4fccc97cd29d2cf
/src/amazing/inside/Localization.java
21cd613c8c93db830ebd41c249a688d2907914ac
[ "Apache-2.0" ]
permissive
TheFallender/Amazing
1239e8d625d17a0c6cd2fb5b0d0f2370d7577b7f
cd11c802dc8554babc1b0533edddbd2ece629acc
refs/heads/master
2023-07-19T20:57:20.945898
2018-12-27T18:30:54
2018-12-27T18:30:54
154,214,176
0
0
null
null
null
null
UTF-8
Java
false
false
2,667
java
package amazing.inside; import java.util.ArrayList; import java.util.Locale; import java.util.ResourceBundle; public class Localization { //Region private static ArrayList<Locale> locale_list = new ArrayList<>(); //List of the locale private static int active_locale = 0; //Active locale on the list public static Locale get_a_locale() { //Gets the active locale return locale_list.get(active_locale); } public static String get_a_locale_lang() { //Gets the active locale language return locale_list.get(active_locale).getLanguage(); } public static void set_locale(String lang, String region) { //Sets the locale, if it founds it's set, if not, it's added for (int i = 0; i < locale_list.size(); i++) //Search within the locale list if (locale_list.get(i).getLanguage().equals(lang)) { //Languages are the same active_locale = i; //Update actual language return; } add_locale(lang, region); //Add the locale } public static void add_locale(String lang, String region) { //Adds a new locale //Update Locale List Locale aux_l = new Locale(lang, region); //Auxiliary locale locale_list.add(aux_l); //Adds the locale //Adds the locale to the file String[] aux_s = new String[]{region, "l_lang=" + lang}; //Diferent order for easier readding IO.write("d_locale", aux_s, true); //Writes the locale on the file } public static void set_locale_list() { //Reads the already added locale from the file //Reads the locale IO.read("d_locale", "", 0, false); //Add it to the list for (int i = 1; i <= IO.data().size()/2; i++) { //Add locale for each data Locale aux_l = new Locale(IO.data().get((i * 2) - 1), IO.data().get((i * 2) - 2)); //Sets the new Locale (Language, Region) locale_list.add(aux_l); //Add locale with the data } } public static String get (String type, String prop_key) { //Gets the string from the bundle try{ //Tries to check for the bundle //Bundle ResourceBundle bundle = ResourceBundle.getBundle("locale." + get_a_locale_lang() + "." + type, get_a_locale()); //Creates the bundle //Get string if (bundle.keySet().contains(prop_key)) //Gets the string from the file return bundle.getString(prop_key); //Returns that string else //No key found return "ERROR - No localization entry found."; //Reports that it couldn't find the key } catch (Exception e) { //Fails to create the bundle return "ERROR - Process of localization failed."; //Reports that it couldn't create the bundle } } }
[ "a.ferrari@thefallen.io" ]
a.ferrari@thefallen.io
d632853ef0342981367e85f23b50f8e1c375b0c6
a62c47ca1c5de8496fea7ab76a524147a7b47352
/src/main/java/net/sf/rej/java/constantpool/RefInfo.java
384fa36bd0f1bb67a813473cc6717092bf5b8f71
[]
no_license
jakubsimacek/rej-jakub
d898b43e4b9def3f74507dc57ee4531f7af73e95
f6a5d39eedd087fa9c49fbee77a008c84d66ac32
refs/heads/master
2021-01-11T23:56:37.329593
2017-01-27T15:25:37
2017-01-27T15:25:37
78,648,672
1
0
null
null
null
null
UTF-8
Java
false
false
3,723
java
/* Copyright (C) 2004-2007 Sami Koivu * * 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. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ package net.sf.rej.java.constantpool; import net.sf.rej.java.Descriptor; import net.sf.rej.util.ByteSerializer; // TODO: Reduce coupling between ConstantPoolInfo items and the ConstantPool. // The items maybe shouldn't know what pool they are a part of public class RefInfo extends ConstantPoolInfo { private int tag; /** * Pointer to a <code>ClassInfo</code> entry in the constant pool. */ private int classIndex; /** * Pointer to a <code>NameAndTypeInfo</code> entry in the constant pool. */ private int nameAndTypeIndex; public RefInfo(int tag, int classIndex, int nameAndTypeIndex, ConstantPool pool) { super(tag, pool); this.tag = tag; this.classIndex = classIndex; this.nameAndTypeIndex = nameAndTypeIndex; } @Override public String toString() { Descriptor desc = getDescriptor(); return desc.getReturn() + " " + getClassName() + "." + getTargetName() + "(" + desc.getParams() + ")"; } public String getClassName() { ClassInfo ci = (ClassInfo) this.pool.get(this.classIndex); return ci.getName(); } /** * Returns the method or field name this Ref * * @return String */ public String getTargetName() { NameAndTypeInfo info = (NameAndTypeInfo) this.pool .get(this.nameAndTypeIndex); return info.getName(); } public String getMethodType() { NameAndTypeInfo info = (NameAndTypeInfo) this.pool .get(this.nameAndTypeIndex); return info.getDescriptorString(); } public Descriptor getDescriptor() { NameAndTypeInfo info = (NameAndTypeInfo) this.pool .get(this.nameAndTypeIndex); return info.getDescriptor(); } @Override public byte[] getData() { ByteSerializer ser = new ByteSerializer(true); ser.addByte(getType()); ser.addShort(this.classIndex); ser.addShort(this.nameAndTypeIndex); return ser.getBytes(); } public NameAndTypeInfo getNameAndTypeInfo() { NameAndTypeInfo info = (NameAndTypeInfo) this.pool .get(this.nameAndTypeIndex); return info; } @Override public int hashCode() { int i = getClassName().hashCode(); i += getTargetName().hashCode(); i += this.tag; i += getMethodType().hashCode(); return i; } @Override public boolean equals(Object other) { if (other == null) return false; try { RefInfo ref = (RefInfo) other; if (this.tag != ref.tag) return false; if (!getClassName().equals(ref.getClassName())) return false; if (!getTargetName().equals(ref.getTargetName())) return false; if (!getMethodType().equals(ref.getMethodType())) return false; return true; } catch (ClassCastException cce) { return false; } } @Override public String getTypeString() { switch (this.tag) { case FIELD_REF: return "Fieldref"; case INTERFACE_METHOD_REF: return "InterfaceMethodref"; case METHOD_REF: return "Methodref"; default: throw new RuntimeException("Internal error, undefined Ref type = " + this.tag); } } }
[ "jakubsimacek@email.cz" ]
jakubsimacek@email.cz
d8bdc020a3ed382a13e85a5cc8a6b662aba68f76
4e381841404b7016c399fe80049d587199e67de8
/src/main/java/com/techmaster/hunter/json/HunterUserJson.java
a18d6786b32163378926c872f6b971df1277d51b
[]
no_license
kipopenshift/hunter
79f7040e0c4b5d0b2acb6f37a70a252940e3b2e6
80e68b5e0220a904297ab6adb9b884895c304a14
refs/heads/master
2020-04-06T23:32:31.465147
2017-11-19T03:05:28
2017-11-19T03:05:28
46,681,389
0
0
null
null
null
null
UTF-8
Java
false
false
3,996
java
package com.techmaster.hunter.json; public class HunterUserJson { private Long userId; private String firstName; private String lastName; private String middleName; private String email; private String phoneNumber; private String userType; private String userName; private boolean active; private boolean blocked; private String cretDate; private String lastUpdate; private String createdBy; private String lastUpdatedBy; public HunterUserJson() { super(); } public Long getUserId() { return userId; } public void setUserId(Long userId) { this.userId = userId; } public String getFirstName() { return firstName; } public void setFirstName(String firstName) { this.firstName = firstName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getMiddleName() { return middleName; } public void setMiddleName(String middleName) { this.middleName = middleName; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getPhoneNumber() { return phoneNumber; } public void setPhoneNumber(String phoneNumber) { this.phoneNumber = phoneNumber; } public String getUserType() { return userType; } public void setUserType(String userType) { this.userType = userType; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public boolean isActive() { return active; } public void setActive(Boolean active) { this.active = active; } public String getCretDate() { return cretDate; } public void setCretDate(String cretDate) { this.cretDate = cretDate; } public String getLastUpdate() { return lastUpdate; } public void setLastUpdate(String lastUpdate) { this.lastUpdate = lastUpdate; } public String getCreatedBy() { return createdBy; } public void setCreatedBy(String createdBy) { this.createdBy = createdBy; } public String getLastUpdatedBy() { return lastUpdatedBy; } public void setLastUpdatedBy(String lastUpdatedBy) { this.lastUpdatedBy = lastUpdatedBy; } public boolean isBlocked() { return blocked; } public void setBlocked(Boolean blocked) { this.blocked = blocked; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((email == null) ? 0 : email.hashCode()); result = prime * result + ((userId == null) ? 0 : userId.hashCode()); result = prime * result + ((userName == null) ? 0 : userName.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; HunterUserJson other = (HunterUserJson) obj; if (email == null) { if (other.email != null) return false; } else if (!email.equals(other.email)) return false; if (userId == null) { if (other.userId != null) return false; } else if (!userId.equals(other.userId)) return false; if (userName == null) { if (other.userName != null) return false; } else if (!userName.equals(other.userName)) return false; return true; } @Override public String toString() { return "HunterUserJson [userId=" + userId + ", firstName=" + firstName + ", lastName=" + lastName + ", middleName=" + middleName + ", email=" + email + ", phoneNumber=" + phoneNumber + ", userType=" + userType + ", userName=" + userName + ", active=" + active + ", blocked=" + blocked + ", cretDate=" + cretDate + ", lastUpdate=" + lastUpdate + ", createdBy=" + createdBy + ", lastUpdatedBy=" + lastUpdatedBy + "]"; } }
[ "hillangat@gmail.com" ]
hillangat@gmail.com
b4abe812ca533f9c7b56d6532135c9e504f6b74e
0fa668bcdd310282737ea39de711704fe837922b
/GOWATAinfoAPPLICATION/app/src/main/java/com/example/gowatainfoapplication/startActivity.java
96da76ef030786366eeabe98307337e94cb7242d
[]
no_license
johnnyclapham/GOWATA
9263858ba3db2c884a7c7c319d53c38a6eb7ec17
b8d6f2ed20a15a236ac770341329626aec38d607
refs/heads/main
2023-02-14T01:57:33.128333
2021-01-14T19:19:43
2021-01-14T19:19:43
302,096,871
0
0
null
null
null
null
UTF-8
Java
false
false
1,511
java
package com.example.gowatainfoapplication; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Button; import androidx.appcompat.app.AppCompatActivity; public class startActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_start); final Button start = (Button) findViewById(R.id.start); start.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // your handler code here Intent myIntent = new Intent(startActivity.this, MapsActivity.class); myIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | myIntent.FLAG_ACTIVITY_NEW_TASK); startActivity.this.startActivity(myIntent); finish(); } }); final Button show_wata = (Button) findViewById(R.id.show_wata); show_wata.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { // your handler code here Intent myIntent = new Intent(startActivity.this, wataActivity.class); myIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | myIntent.FLAG_ACTIVITY_NEW_TASK); startActivity.this.startActivity(myIntent); finish(); } }); } }
[ "noreply@github.com" ]
johnnyclapham.noreply@github.com
6a6f69eb432e0d93bb608bbfe29445f7cb0f7498
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.browser-base/sources/defpackage/RunnableC1693af.java
055eeb8db0a915e5559c5c0e225868e8adf67232
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
889
java
package defpackage; /* renamed from: af reason: default package and case insensitive filesystem */ /* compiled from: chromium-OculusBrowser.apk-stable-281887347 */ public class RunnableC1693af implements Runnable { public final /* synthetic */ boolean F; public final /* synthetic */ C1873bf G; public RunnableC1693af(C1873bf bfVar, boolean z) { this.G = bfVar; this.F = z; } public void run() { C1873bf bfVar = this.G; if (!(bfVar.f9551a.G.get(Integer.valueOf(bfVar.c.getJobId())) == bfVar.b)) { AbstractC1220Ua0.a("BkgrdTaskJS", "Tried finishing non-current BackgroundTask.", new Object[0]); return; } C1873bf bfVar2 = this.G; bfVar2.f9551a.G.remove(Integer.valueOf(bfVar2.c.getJobId())); C1873bf bfVar3 = this.G; bfVar3.f9551a.jobFinished(bfVar3.c, this.F); } }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
1418cd77ac01fffdc1ab9a8f12c74a8c78f8fc97
3ce0eb1e6edb52aa8f497b0da5f7b94def121232
/yuuuu-redis-redisson-provider-8101/src/main/java/cn/com/yuuuu/service/impl/AsyncRedisServiceImpl.java
711b356e4d8f42ed72be3058c3fe375813fe814c
[]
no_license
fanhuanianjian/cloud
307b0f309981cf35d0c39cab3eb44b86994ad72f
f4acb1613b353b1b097d1c75c307cd5fc1a96cb5
refs/heads/master
2022-12-25T01:29:25.801547
2020-10-06T02:32:30
2020-10-06T02:32:30
289,236,249
2
0
null
null
null
null
UTF-8
Java
false
false
7,196
java
package cn.com.yuuuu.service.impl; import cn.com.yuuuu.pojo.Student; import cn.com.yuuuu.service.AsyncRedisService; import lombok.extern.slf4j.Slf4j; import org.redisson.RedissonMultiLock; import org.redisson.api.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.HashMap; import java.util.Map; import java.util.concurrent.TimeUnit; /** * @Author: bhl * @Date: 2020/9/30 * @Description: com.faw.membercenter.service.impl * @version: 1.0 */ @Service @Slf4j public class AsyncRedisServiceImpl implements AsyncRedisService { @Autowired private RedissonClient redisson; private static final String ANOTHER_BITSET = "anotherBitset"; // github 官方文档地址 // https://github.com/redisson/redisson/wiki/Redisson%E9%A1%B9%E7%9B%AE%E4%BB%8B%E7%BB%8D /** * Redis key相关的操作 */ @Override public void keys() { /** Redis key相关的操作*/ RKeys keys = redisson.getKeys(); /** 获取所有的key*/ Iterable<String> allKeys = keys.getKeys(); for (String key : allKeys) { log.info("key:{}", key); } /** 获取匹配的key*/ Iterable<String> foundedKeys = keys.getKeysByPattern("key*"); for (String key : foundedKeys) { log.info("key:{}", key); } /** 根据key删除键值*/ long numOfDeletedKeys = keys.delete("obj1", "obj2", "obj3"); log.info("numOfDeletedKeys:{}", numOfDeletedKeys); /** 根据匹配的key删除键值*/ long deletedKeysAmount = keys.deleteByPattern("test?"); log.info("deletedKeysAmount:{}", deletedKeysAmount); /** 获取一个随机已存在的键值(无键值的时候返回null)*/ String randomKey = keys.randomKey(); log.info("randomKey:{}", randomKey); /** key的数量*/ long keysAmount = keys.count(); log.info("keysAmount:{}", keysAmount); } /** * 通用对象桶的操作 */ @Override public void bucket() { RBucket<Student> bucket = redisson.getBucket("student"); bucket.set(new Student(1, "张三", 233)); Student student = bucket.get(); log.info("bucket:{}", student); // 尝试保存value值 boolean trySet = bucket.trySet(new Student(2, "李四", 20)); log.info("trySet:{}", trySet); // 原子替换桶的新值为var2 bucket.compareAndSet(new Student(1, "张三", 233), new Student(4, "大师兄", 20)); log.info("compareAndSet:{}", bucket.get()); // 获取原来的value 并设置新的value Student studentGetAndSet = bucket.getAndSet(new Student(5, "二师兄", 2333)); log.info("studentGetAndSet:{}", studentGetAndSet); log.info("studentGetAndSet:{}", bucket.get()); // 批量操作多个RBucket对象 RBuckets buckets = redisson.getBuckets(); Map<String, Student> loadedBuckets = buckets.get("myBucket1", "myBucket2", "myBucket3"); loadedBuckets.get(""); Map<String, Object> map = new HashMap<>(); map.put("myBucket1", new Student()); map.put("myBucket2", new Student()); // 利用Redis的事务特性,同时保存所有的通用对象桶,如果任意一个通用对象桶已经存在则放弃保存其他所有数据。 buckets.trySet(map); // 同时保存全部通用对象桶。 buckets.set(map); } /** * bitset操作 */ @Override public void bitset() { // 获取一个简单的Bitset RBitSet simpleBitset = redisson.getBitSet("simpleBitset"); simpleBitset.set(0, true); simpleBitset.set(1); simpleBitset.set(1812, true); simpleBitset.clear(1812); log.info("bitset-0:{}", simpleBitset.get(0)); log.info("bitset-1:{}", simpleBitset.get(1)); log.info("bitset-1812:{}", simpleBitset.get(1812)); log.info("-----------------"); //获取另一个Bitset RBitSet anotherBitset = redisson.getBitSet(ANOTHER_BITSET); anotherBitset.set(0); anotherBitset.set(1, false); anotherBitset.set(1812, true); // 与anotherBitset按位异或计算 simpleBitset.xor(ANOTHER_BITSET); log.info("bitset-xor-0:{}", simpleBitset.get(0)); log.info("bitset-xor-1:{}", simpleBitset.get(1)); log.info("bitset-xor-1812:{}", simpleBitset.get(1812)); } /** * 原子长整形和原子双精度浮点 */ @Override public void atomicLongAndAtomicDouble() { //原子长整形 RAtomicLong atomicLong = redisson.getAtomicLong("myAtomicLong"); atomicLong.set(3); atomicLong.incrementAndGet(); atomicLong.get(); //原子双精度浮点 RAtomicDouble atomicDouble = redisson.getAtomicDouble("myAtomicDouble"); atomicDouble.set(2.81); atomicDouble.addAndGet(4.11); atomicDouble.get(); } /** * 分布式锁 */ @Override public long reentrantLock(){ /** * 可重入锁 */ RLock lock = redisson.getLock("reentrantLock"); long startTime = System.currentTimeMillis(); // 最常见的使用方法 // lock.lock(); // 加锁以后10秒钟自动解锁 无需调用unlock方法手动解锁 lock.lock(10, TimeUnit.SECONDS); try { TimeUnit.SECONDS.sleep(5); log.info("Thread:{}",Thread.currentThread().getName()); }catch (Exception e){ log.error("reentrantLockL:",e); } finally { //解锁 lock.unlock(); } // 尝试加锁,最多等待100秒,上锁以后10秒自动解锁 // InterruptedException 中断异常 // boolean res = lock.tryLock(100, 10, TimeUnit.SECONDS); // if (res) { // try { // } finally { // lock.unlock(); // } // } return System.currentTimeMillis()-startTime; } /** * 公平锁 */ public void fairLock(){ RLock fairLock = redisson.getFairLock("fairLock"); // 最常见的使用方法 // fairLock.lock(); } /** * 公平锁 */ public void multiLock(){ /** * 联锁 */ RLock lock1 = redisson.getLock("lock1"); RLock lock2 = redisson.getLock("lock2"); RLock lock3 = redisson.getLock("lock3"); RedissonMultiLock lock = new RedissonMultiLock(lock1, lock2, lock3); // 同时加锁:lock1 lock2 lock3 // 所有的锁都上锁成功才算成功。 lock.lock(); lock.unlock(); } /** * 读写锁 */ public void readWriteLock(){ RReadWriteLock rwlock = redisson.getReadWriteLock("anyRWLock"); // 最常见的使用方法 // rwlock.readLock().lock(); // 或 rwlock.writeLock().lock(); try { }finally { rwlock.writeLock().unlock(); } } }
[ "15943032347@139.com" ]
15943032347@139.com
9c6fce06b7ad56ed5ced9e728f55ae5f6662ed36
d983c60537ffa3f11ce338c67774c42fb36f2d21
/gui/src/main/java/ca/nengo/ui/lib/objects/models/ModelObject.java
7e30cdf19a1e4e04c0925ab71194939388d034b6
[]
no_license
automenta/nengo
1765594dd0cb33bece3f9a7d9975de1d1933f1b1
41555e712ec983f3d1c56e689ceaa6a82a9e80e6
refs/heads/master
2016-09-06T05:55:10.860534
2015-02-24T20:57:06
2015-02-24T20:57:06
31,195,812
0
0
null
null
null
null
UTF-8
Java
false
false
6,350
java
package ca.nengo.ui.lib.objects.models; import ca.nengo.ui.actions.RemoveModelAction; import ca.nengo.ui.lib.util.Util; import ca.nengo.ui.lib.util.menus.PopupMenuBuilder; import ca.nengo.ui.lib.world.Interactable; import ca.nengo.ui.lib.world.WorldObject; import ca.nengo.ui.lib.world.activities.Pulsator; import ca.nengo.ui.lib.world.elastic.ElasticObject; import ca.nengo.ui.models.tooltips.Tooltip; import ca.nengo.ui.models.tooltips.TooltipBuilder; import javax.swing.*; import java.security.InvalidParameterException; import java.util.ArrayList; import java.util.HashSet; /** * A UI Object which wraps a model * * @author Shu Wu */ /** * @author User */ public abstract class ModelObject<M> extends ElasticObject implements Interactable { /** * The property name that identifies a change in this node's Model */ public static final String PROPERTY_MODEL = "uiModel"; /** * Icon for this model */ private WorldObject icon; /** * Property Listener which listens to changes of the Icon's bounds and * updates this node bounds accordingly */ private Listener iconPropertyChangeListener; private boolean isModelBusy = false; private final HashSet<ModelListener> modelListeners = new HashSet<ModelListener>(); /** * Model */ private M myModel; private Pulsator pulsator = null; /** * Create a UI Wrapper around a Model * * @param model * Model */ public ModelObject(M model) { super(); //Util.Assert(model != null); setModel(model); } /** * @param model * New Model */ protected final void setModel(M model) { if (myModel == null && model!=null) { initialize(); } if (myModel == model) { return; } if (myModel != null) { detachViewFromModel(); } myModel = model; firePropertyChange(Property.MODEL_CHANGED); if (myModel != null) { attachViewToModel(); modelUpdated(); } } /** * Attaches the UI from the model */ protected void attachViewToModel() { } /** * @return Constructed Context Menu */ protected void constructMenu(PopupMenuBuilder menu) { if (showRemoveModelAction()) { ArrayList<ModelObject> arrayOfMe = new ArrayList<ModelObject>(); arrayOfMe.add(this); menu.addAction(new RemoveModelAction("Remove model", arrayOfMe)); } } protected boolean showRemoveModelAction() { return true; } protected void constructTooltips(TooltipBuilder builder) { // do nothing } /** * Detaches the UI form the model */ protected void detachViewFromModel() { setModelBusy(false); } protected void initialize() { setSelectable(true); } /** * Updates the UI from the model */ protected void modelUpdated() { } @Override protected void prepareForDestroy() { super.prepareForDestroy(); detachViewFromModel(); firePropertyChange(Property.MODEL_CHANGED); } protected void prepareToDestroyModel() { } /** * @param newIcon * New Icon */ protected void setIcon(WorldObject newIcon) { if (icon != null) { icon.removePropertyChangeListener(Property.BOUNDS_CHANGED, iconPropertyChangeListener); icon.removeFromParent(); } icon = newIcon; addChild(icon, 0); iconPropertyChangeListener = new Listener() { public void propertyChanged(Property event) { setBounds(icon.getBounds()); } }; setBounds(icon.getBounds()); icon.addPropertyChangeListener(Property.BOUNDS_CHANGED, iconPropertyChangeListener); } public void addModelListener(ModelListener listener) { if (modelListeners.contains(listener)) { throw new InvalidParameterException(); } modelListeners.add(listener); } /* * destroy() + destroy the model */ public final void destroyModel() { for (ModelListener listener : modelListeners) { listener.modelDestroyStarted(getModel()); } prepareToDestroyModel(); for (WorldObject wo : getChildren()) { if (wo instanceof ModelObject) { ((ModelObject) wo).destroyModel(); } } for (ModelListener listener : modelListeners.toArray(new ModelListener[modelListeners.size()])) { listener.modelDestroyed(getModel()); } destroy(); } /** * Called if this object is double clicked on */ @Override public void doubleClicked() { super.doubleClicked(); if (getWorld() != null) { getWorld().zoomToObject(this); } } /* * (non-Javadoc) This method is final. To add items to the menu, override * constructMenu() instead. * * @see ca.shu.ui.lib.handlers.Interactable#showContextMenu(edu.umd.cs.piccolo.event.PInputEvent) */ public final JPopupMenu getContextMenu() { if (isModelBusy()) { return null; } else { PopupMenuBuilder menu = new PopupMenuBuilder(getFullName()); constructMenu(menu); return menu.toJPopupMenu(); } } public String getFullName() { return getName() + " (" + getTypeName() + ')'; } /** * @return Icon of this node */ public WorldObject getIcon() { return icon; } /** * @return Model */ public M getModel() { return myModel; } @Override public final WorldObject getTooltip() { String toolTipTitle = getFullName(); TooltipBuilder tooltipBuilder = new TooltipBuilder(toolTipTitle); if (isModelBusy()) { tooltipBuilder.addTitle("Currently busy"); } else { constructTooltips(tooltipBuilder); } return new Tooltip(tooltipBuilder); } /** * @return What this type of Model is called */ public abstract String getTypeName(); public boolean isModelBusy() { return isModelBusy; } public void removeModelListener(ModelListener listener) { if (!modelListeners.contains(listener)) { throw new InvalidParameterException(); } modelListeners.remove(listener); } /** * @param isBusy * Whether the model is currently busy. If it is busy, the object * will not be interactable. */ public void setModelBusy(boolean isBusy) { if (isModelBusy != isBusy) { isModelBusy = isBusy; if (isModelBusy) { Util.Assert(pulsator == null, "Previous pulsator has not been disposed of properly);"); pulsator = new Pulsator(this); } else { if (pulsator != null) { pulsator.finish(); pulsator = null; } } } } static public interface ModelListener { public void modelDestroyed(Object model); public void modelDestroyStarted(Object model); } }
[ "1s1e1h1@gmail.com" ]
1s1e1h1@gmail.com
8139cfb03f0d58a691dedc733c67c1f6718beb58
289f25e227bbc4d084f3f08fba3df5ac69273443
/src/model/CfgBlack.java
7647499ce83413c479af41b42e7c20aa1e9fccf3
[]
no_license
game-platform-awaresome/game-sdk
cba3086105f3ac5821a54434252ee4223460192c
62509664d3f5c4c00c6e44f731aa9228ba45d5c1
refs/heads/master
2020-04-01T07:35:48.830094
2018-06-25T10:10:19
2018-06-25T10:10:19
152,995,575
1
0
null
null
null
null
UTF-8
Java
false
false
551
java
package model; public class CfgBlack implements java.io.Serializable { private static final long serialVersionUID = -3764769895896241908L; private Integer cfg_black_id; private String mobile; private Integer kind; public Integer getCfgBlackId(){ return cfg_black_id; } public void setCfgBlackId(Integer cfg_black_id){ this.cfg_black_id=cfg_black_id; } public String getMobile(){ return mobile; } public void setMobile(String mobile){ this.mobile=mobile; } public Integer getKind(){ return kind; } public void setKind(Integer kind){ this.kind=kind; } }
[ "380622565@qq.com" ]
380622565@qq.com
3b17025ee69f442b54581f1ef881f89d1d94d732
4758de22170a0bda8fe8bb7d7d9fc9ae7d1e497f
/src/main/java/cs/ut/test/TestSubmittingInvalidEmail.java
be0ba32d1acd5cf98dbda522b406f90a26efb5d1
[]
no_license
markusleemet/PlaytechAutomationDeveloperPositionTestAssignment
84ccb02c22befb1c851b38a4e4aef168a7a35f3f
2c60c4d706b13c6d752b1cc321eb7d59ed502aec
refs/heads/master
2022-12-26T18:01:27.029249
2020-09-21T06:45:22
2020-09-21T06:45:22
296,876,349
0
0
null
null
null
null
UTF-8
Java
false
false
1,959
java
package cs.ut.test; import cs.ut.entity.FormEntity; import cs.ut.entity.TestStepsEntity; import org.openqa.selenium.By; import org.openqa.selenium.TimeoutException; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; import java.util.ArrayList; import java.util.Arrays; public class TestSubmittingInvalidEmail extends SeleniumTest { public TestSubmittingInvalidEmail() { super( 3, "Test submitting invalid email address in email field.", new TestStepsEntity(new ArrayList<>(Arrays.asList("Go to site under test", "Fill email field", "Press button 'Saada ära'", "Check that following message is displayed next to the email field: 'Please enter a valid email address'"))), new FormEntity(null, "", "mail-without-at-sign", "", "", ""), "Following message is displayed next to the email field: 'Please enter a valid email address'." ); } @Override public void runTest() { setUpTest(); WebElement submitButton = getSubmitButton(); WebElement emailContainer = getEmailContainer(); fillEmailField(); submitButton.click(); try { new WebDriverWait(driver, 3).until(ExpectedConditions.and( ExpectedConditions.presenceOfNestedElementLocatedBy(emailContainer, By.id("i29")), ExpectedConditions.textToBePresentInElementLocated(By.id("i29"), "Please enter a valid email address") )); actualResult = "Following message is displayed next to the email field: 'Please enter a valid email address'."; } catch (TimeoutException timeoutException) { actualResult = "Message about invalid email is not displayed next to email input field."; } finally { endTestAndWriteResultToLog(); } } }
[ "markusleemet@gmail.com" ]
markusleemet@gmail.com
0e9fd7c217d5e07fbf8a92f95db1b0f97a733135
a750ec83a37f62f3711c899501eb85b4a09502d4
/ksqldb-engine/src/test/java/io/confluent/ksql/function/udf/json/JsonRecordsTest.java
588eab7f3dadc55fcec312fc1b33f7e5a29fb05d
[ "LicenseRef-scancode-proprietary-license", "Apache-2.0" ]
permissive
uurl/ksql
d0e4969108966bbe8f7e79275887f7c31ff92713
8bb47c91808ab11a12bfa3249039b4948423d96b
refs/heads/master
2022-05-09T15:47:09.479017
2022-03-25T16:41:57
2022-03-25T16:41:57
132,240,504
0
0
Apache-2.0
2018-05-05T11:08:55
2018-05-05T11:08:55
null
UTF-8
Java
false
false
1,992
java
/* * Copyright 2022 Confluent Inc. * * Licensed under the Confluent Community License (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.confluent.io/confluent-community-license * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. */ package io.confluent.ksql.function.udf.json; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import io.confluent.ksql.function.KsqlFunctionException; import java.util.Collections; import java.util.HashMap; import java.util.Map; import org.junit.Test; public class JsonRecordsTest { private final JsonRecords udf = new JsonRecords(); @Test public void shouldExtractRecords() { // When final Map<String, String> result = udf.records("{\"a\": \"abc\", \"b\": { \"c\": \"a\" }, \"d\": 1}"); // Then: final Map<String, String> expected = new HashMap<String, String>() {{ put("a", "\"abc\""); put("b", "{\"c\":\"a\"}"); put("d", "1"); }}; assertEquals(expected, result); } @Test public void shouldReturnEmptyMapForEmptyObject() { assertEquals(Collections.emptyMap(), udf.records("{}")); } @Test public void shouldReturnNullForJsonNull() { assertNull(udf.records("null")); } @Test public void shouldReturnNullForJsonArray() { assertNull(udf.records("[1,2,3]")); } @Test public void shouldReturnNullForJsonNumber() { assertNull(udf.records("123")); } @Test public void shouldReturnNullForNull() { assertNull(udf.records(null)); } @Test(expected = KsqlFunctionException.class) public void shouldThrowForInvalidJson() { udf.records("abc"); } }
[ "noreply@github.com" ]
uurl.noreply@github.com
a7333fa9ef3d92d22907c85df0590567950c72c8
a8a71d99a06c65f0d04127c1e95c197d2d6e300b
/app/src/main/java/com/tyutcenter/activity/two/CengKeActivity.java
c3beb26b50a0265f8b2f63cde10ec0cf93bac437
[]
no_license
SharkChao/TyutCenter
20352d603cb5b550dce7d0f86b694ba33b20a488
ed29ad39734865de0d2790c6cad93d5207c2caba
refs/heads/master
2021-10-08T10:20:45.205696
2018-12-11T06:52:53
2018-12-11T06:52:53
119,635,625
10
2
null
null
null
null
UTF-8
Java
false
false
597
java
package com.tyutcenter.activity.two; import android.databinding.ViewDataBinding; import com.tyutcenter.base.BaseActivity; import com.tyutcenter.presenter.MainPresenter; /** * Created by Administrator on 2017/3/13. * 本学期成绩 */ public class CengKeActivity extends BaseActivity<MainPresenter.MainUiCallback> implements MainPresenter.MainUi { @Override public void initTitle() { } @Override public void initView(ViewDataBinding viewDataBinding) { } @Override public void initData() { } @Override protected void initEvent() { } }
[ "827623353@qq.com" ]
827623353@qq.com
78c35f2abcac3296c6b4aeb94dd67e044269826f
602223374a495a1b68047e077c51522b63a9b4f2
/src/main/java/br/com/senai/domain/model/RoleUsuarios.java
ce8dcecd6e6f57abc3ffb154d92043b53c81964b
[]
no_license
MaffezzoIIi/apiSpring
da2ffebcd950bacd6fe18ba57de1930b69df958a
8cf0c9e1160ccd2676f8236377c0e315503bb014
refs/heads/master
2023-06-29T18:02:31.577526
2021-08-09T10:32:27
2021-08-09T10:32:27
394,248,271
1
0
null
null
null
null
UTF-8
Java
false
false
434
java
package br.com.senai.domain.model; import lombok.Getter; import lombok.Setter; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; @Setter @Getter @Entity public class RoleUsuarios { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private Long usuarios_id; private String role_nome_role; }
[ "thomasmaffezzolli8@gmail.com" ]
thomasmaffezzolli8@gmail.com
635a05cf79f386d4b2e6f981f8ce3da0dfbdddb8
8749d661fa54c0e61cb45085513e0f85ba2139b0
/src/main/java/cn/wsg/oj/leetcode/problems/p600/Solution606.java
1d2042f2ce044d625d1e1d657e5cca4e2d30b357
[]
no_license
EastSunrise/oj-java
ed4adb6557116c79192d969c69ada7469b953cf3
63335b7f58bd912a6b392fbd91248f3f753cfa16
refs/heads/master
2021-12-27T00:12:14.421186
2021-12-22T06:43:35
2021-12-22T06:43:35
237,616,489
0
0
null
null
null
null
UTF-8
Java
false
false
1,277
java
package cn.wsg.oj.leetcode.problems.p600; import cn.wsg.oj.Complexity; import cn.wsg.oj.leetcode.problems.base.Solution; import cn.wsg.oj.leetcode.problems.base.TreeNode; /** * 606. Construct String from Binary Tree (EASY) * * @author Kingen * @see Solution536 * @see Solution652 * @see <a href="https://leetcode-cn.com/problems/construct-string-from-binary-tree/">Construct * String from Binary Tree</a> */ public class Solution606 implements Solution { /** * @see #PREORDER * @see Complexity#TIME_N * @see Complexity#SPACE_H */ public String tree2str(TreeNode root) { StringBuilder builder = new StringBuilder(); tree2str(root, builder); return builder.toString(); } private void tree2str(TreeNode node, StringBuilder builder) { builder.append(node.val); if (node.right != null) { builder.append("("); if (node.left != null) { tree2str(node.left, builder); } builder.append(")("); tree2str(node.right, builder); builder.append(")"); } else if (node.left != null) { builder.append("("); tree2str(node.left, builder); builder.append(")"); } } }
[ "wsg787@126.com" ]
wsg787@126.com
98dd2df5633f040227850131f1d36c8a2c3aa989
0869c778762348ce2339d7b1a6b7d65d69fa3002
/tools/patterns/Java_Design_Patterns_Book/chapter22/Vehicle.java
257122e7ba5e1a37404b6d61594adcc70d895c11
[]
no_license
ripley57/CW_Tools
08252944b05dffa298fd96a483abf6544a5feb25
3341d50ae1b936993955649acd94ed4c789acfb2
refs/heads/master
2023-01-03T22:45:54.031549
2020-02-26T20:57:37
2020-02-26T20:57:37
144,877,688
0
1
null
2022-12-16T05:46:08
2018-08-15T16:34:45
C
UTF-8
Java
false
false
673
java
/* * Java Design Pattern Essentials - Second Edition, by Tony Bevis * Copyright 2012, Ability First Limited * * This source code is provided to accompany the book and is provided AS-IS without warranty of any kind. * It is intended for educational and illustrative purposes only, and may not be re-published * without the express written permission of the publisher. */ package chapter22; public interface Vehicle { // public enum Colour {UNPAINTED, BLUE, BLACK, GREEN, RED, SILVER, WHITE, YELLOW}; public Engine getEngine(); public Vehicle.Colour getColour(); public void paint(Vehicle.Colour colour); }
[ "clough.jeremy@gmail.com" ]
clough.jeremy@gmail.com
b1d4c93b248c0bd95a025b9a293caa2e5335b4b1
d5c74ec5c714db8b871d46a90936a1bec0da3e97
/main/java/edu/stanford/nlp/trees/EnglishPatterns.java
1b1b6f24f4221197031ebb989aa2fde57045d188
[]
no_license
tronghuyict56/soict-ner
8b77cab5c4286b0adff7842667e675f18c0a20c4
ef2753fc5d96ab5dcc5cf2aa6b2e931155b5fa6b
refs/heads/master
2020-09-21T06:43:47.817815
2016-09-10T18:04:22
2016-09-10T18:04:22
67,886,287
0
0
null
null
null
null
UTF-8
Java
false
false
6,996
java
package edu.stanford.nlp.trees; import edu.stanford.nlp.util.StringUtils; import java.util.regex.Pattern; /** This class contains some English String or Tregex regular expression * patterns. They originated in other classes like * EnglishGrammaticalRelations, but were collected here so that they * could be used without having to load large classes (which we might want * to have parallel versions of. * Some are just stored here as String objects, since they are often used as * sub-patterns inside larger patterns. * * @author Christopher Manning */ public class EnglishPatterns { public static final String[] copularVerbs = { "be", "being", "been", "am", "are", "r", "is", "ai", "was", "were", "'m", "m", "'re", "'s", "s", "`s", "art", "ar", "wase"}; public static final String[] beGetVerbs = { "be", "being", "been", "am", "are", "r", "is", "ai", "was", "were", "'m", "m", "'re", "'s", "s", "`s", "art", "ar", "wase", "get", "getting", "gets", "got", "gotten" }; public static final String timeWordRegex = "/^(?i:Mondays?|Tuesdays?|Wednesdays?|Thursdays?|Fridays?|Saturdays?|Sundays?|years?|months?|weeks?|days?|mornings?|evenings?|nights?|January|Jan\\.|February|Feb\\.|March|Mar\\.|April|Apr\\.|May|June|July|August|Aug\\.|September|Sept\\.|October|Oct\\.|November|Nov\\.|December|Dec\\.|today|yesterday|tomorrow|spring|summer|fall|autumn|winter)$/"; public static final String timeWordLotRegex = "/^(?i:Mondays?|Tuesdays?|Wednesdays?|Thursdays?|Fridays?|Saturdays?|Sundays?|years?|months?|weeks?|days?|mornings?|evenings?|nights?|January|Jan\\.|February|Feb\\.|March|Mar\\.|April|Apr\\.|May|June|July|August|Aug\\.|September|Sept\\.|October|Oct\\.|November|Nov\\.|December|Dec\\.|today|yesterday|tomorrow|spring|summer|fall|autumn|winter|lot)$/"; public static final String copularWordRegex = "/^(?i:" + StringUtils.join(copularVerbs, "|") + ")$/"; public static final String clausalComplementRegex = "/^(?i:seem|seems|seemed|seeming|resemble|resembles|resembled|resembling|become|becomes|became|becoming|remain|remains|remained|remaining)$/"; // r is for texting r = are public static final String passiveAuxWordRegex = "/^(?i:" +StringUtils.join(beGetVerbs, "|") + ")$/"; public static final String beAuxiliaryRegex = "/^(?i:am|is|are|r|be|being|'s|'re|'m|was|were|been|s|ai|m|art|ar|wase)$/"; public static final String haveRegex = "/^(?i:have|had|has|having|'ve|ve|v|'d|d|hvae|hav|as)$/"; // private static final String stopKeepRegex = "/^(?i:stop|stops|stopped|stopping|keep|keeps|kept|keeping)$/"; public static final String selfRegex = "/^(?i:myself|yourself|himself|herself|itself|ourselves|yourselves|themselves)$/"; public static final String xcompVerbRegex = "/^(?i:advise|advises|advised|advising|allow|allows|allowed|allowing|ask|asks|asked|asking|beg|begs|begged|begging|convice|convinces|convinced|convincing|demand|demands|demanded|demanding|desire|desires|desired|desiring|expect|expects|expected|expecting|encourage|encourages|encouraged|encouraging|force|forces|forced|forcing|implore|implores|implored|imploring|lobby|lobbies|lobbied|lobbying|order|orders|ordered|ordering|persuade|persuades|persuaded|persuading|pressure|pressures|pressured|pressuring|prompt|prompts|prompted|prompting|require|requires|required|requiring|tell|tells|told|telling|urge|urges|urged|urging)$/"; // A list of verbs with an xcomp as an argument // which don't require a NP before the xcomp. public static final String xcompNoObjVerbRegex = "/^(?i:advis|afford|allow|am$|appear|are$|ask|attempt|avoid|be$|bec[oa]m|beg[ia]n|believ|call|caus[ei]|ceas[ei]|choos[ei]|chose|claim|consider|continu|convinc|decid|decline|end|enjoy|expect|feel|felt|find|forb[ia]d|forc[ei]|forg[eo]t|found|going|gon|g[eo]t|happen|hat[ei]|ha[vds]|help|hesitat|hop[ei]|intend|instruct|invit|['i]s$|keep|kept|learn|leav[ei]|left|let|lik[ei]|look|lov[ei]|made|mak[ei]|manag|nam[ei]|need|offer|order|plan|pretend|proceed|promis|prov[ei]|rate|recommend|refus|regret|remember|requir|sa[iy]|seem|sound|start|stop|suggest|suppos|tell|tend|threaten|told|tr[yi]|turn|used|wan|was$|willing|wish)/"; // A list of verbs where the answer to a question involving that // verb would be a ccomp. For example, "I know when the algorithm is // arriving." What does the person know? public static final String ccompVerbRegex = "/^(?i:ask|asks|asked|asking|know|knows|knew|knowing|specify|specifies|specified|specifying|tell|tells|told|telling|understand|understands|understood|understanding|wonder|wonders|wondered|wondering)$/"; // A subset of ccompVerbRegex where you could expect an object and // still have a ccomp. For example, "They told me when ..." can // still have a ccomp. "They know my order when ..." would not // expect a ccomp between "know" and the head of "when ..." public static final String ccompObjVerbRegex = "/^(?i:tell|tells|told|telling)$/"; // TODO: is there some better pattern to look for? We do not have tag information at this point public static final String RELATIVIZING_WORD_REGEX = "(?i:that|what|which|who|whom|whose)"; public static final Pattern RELATIVIZING_WORD_PATTERN = Pattern.compile(RELATIVIZING_WORD_REGEX); // Lemmata of verbs witht the argument structure NP V S-INF. // Extracted from VerbNet 3.2. public static final String NP_V_S_INF_VERBS_REGEX = "(?i:acquiesce|submit|bow|defer|accede|succumb|yield|capitulate|despise|disdain|dislike|regret|like|love|enjoy|fear|hate|pledge|proceed|begin|start|commence|recommence|resume|undertake|ally|collaborate|collude|conspire|discriminate|legislate|partner|protest|rebel|retaliate|scheme|sin|befriend|continue|broadcast|cable|e-mail|fax|modem|netmail|phone|radio|relay|satellite|semaphore|sign|signal|telecast|telegraph|telephone|telex|wire|wireless|ache|crave|fall|hanker|hope|hunger|itch|long|lust|pine|pray|thirst|wish|yearn|dangle|hanker|lust|thirst|yearn|babble|bark|bawl|bellow|bleat|blubber|boom|bray|burble|bluster|cackle|call|carol|chant|chatter|chirp|chortle|chuckle|cluck|coo|croak|croon|crow|cry|drawl|drone|gabble|gasp|gibber|groan|growl|grumble|grunt|hiss|holler|hoot|howl|jabber|keen|lilt|lisp|mewl|moan|mumble|murmur|mutter|nasal|natter|pant|prattle|purr|quaver|rage|rant|rasp|roar|rumble|scream|screech|shout|shriek|sibilate|simper|sigh|sing|smatter|smile|snap|snarl|snivel|snuffle|splutter|squall|squawk|squeak|squeal|stammer|stemmer|stutter|thunder|tisk|trill|trumpet|twang|twitter|vociferate|wail|warble|wheeze|whimper|whine|whisper|whistle|witter|whoop|yammer|yap|yell|yelp|yodel|blare|gurgle|hum|neglect|fail|forego|forgo|flub|overleap|manage|omit|seem|appear|prove|manage|fail|flub|try|attempt|intend|enjoy|expect|wish|hope|intend|mean|plan|propose|think|aim|dream|imagine|yen)"; private EnglishPatterns() {} // static constants }
[ "tronghuy2807@gmail.com" ]
tronghuy2807@gmail.com
1db9a245244d7afe48df9df344f912fed49fdc16
e65171e3e787c958748f34e10f56393ceb416e5b
/src/net/slashie/serf/game/HiScore.java
979b11931c103687e655201ece05be142db40747
[]
no_license
slashman/serf-engine
bb009b9541ccc158a8f442da9f396b31fc16b132
93ab5800f6d507ce91bee8d4e83f95ef5c7e9658
refs/heads/master
2021-12-30T08:49:22.238391
2021-11-11T20:06:00
2021-11-11T20:06:00
32,949,992
0
2
null
2016-04-03T03:26:31
2015-03-26T20:24:26
Java
UTF-8
Java
false
false
1,126
java
package net.slashie.serf.game; public class HiScore { private String name; private int score; private String date; private String turns; private String deathString; private int deathLevel; private String playerClass; public String getName() { return name; } public void setName(String value) { name = value; } public int getScore() { return score; } public void setScore(int value) { score = value; } public String getDate() { return date; } public void setDate(String value) { date = value; } public String getTurns() { return turns; } public void setTurns(String value) { turns = value; } public String getDeathString() { return deathString; } public void setDeathString(String value) { deathString = value; } public int getDeathLevel() { return deathLevel; } public void setDeathLevel(int deathLevel) { this.deathLevel = deathLevel; } public String getPlayerClass() { return playerClass; } public void setPlayerClass(String playerClass) { this.playerClass = playerClass; } }
[ "java.koder@51ccf7a8-1371-11de-a6cc-771c510851eb" ]
java.koder@51ccf7a8-1371-11de-a6cc-771c510851eb
a0573b6ea928fca6b56791e6b9eb3f4b30c6b649
fd578fed1d5adab1749e7b4695040d5e612f671f
/app/src/main/java/kotel/hanzan/view/DrinkCalendar.java
451309b082a0f57504f0246e0c3d067dc0c22970
[]
no_license
silvergt/Hanzjzan
2f16646a9620648184ce85105d673fb55ee97fa7
54ebd3d6e12fb8b0d03113cb87dbffe869fcead1
refs/heads/master
2021-01-20T09:21:48.077415
2018-06-27T05:06:21
2018-06-27T05:06:21
101,591,730
0
0
null
null
null
null
UTF-8
Java
false
false
5,896
java
package kotel.hanzan.view; import android.content.Context; import android.graphics.Color; import android.util.AttributeSet; import android.view.LayoutInflater; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.RelativeLayout; import android.widget.TextView; import java.util.ArrayList; import java.util.Calendar; import java.util.GregorianCalendar; import java.util.Locale; import kotel.hanzan.R; import kotel.hanzan.function.JLog; import kotel.hanzan.listener.DrinkCalendarListener; public class DrinkCalendar extends RelativeLayout { private Context context; private RelativeLayout layout; private TextView monthText; private LinearLayout calendarLayout; private LinearLayout[] calendarRow; private ImageView leftButton, rightButton; private RelativeLayout[] cells; private DrinkCalendarListener listener; private GregorianCalendar calendar; private int headerBufferSize; public DrinkCalendar(Context context) { super(context); init(context); } public DrinkCalendar(Context context, AttributeSet attrs) { super(context, attrs); init(context); } private void init(Context context) { this.context = context; layout = (RelativeLayout) LayoutInflater.from(context).inflate(R.layout.drinkcalendar, null); monthText = layout.findViewById(R.id.drinkCalendar_month); calendarLayout = layout.findViewById(R.id.drinkCalendar_calendarLayout); leftButton = layout.findViewById(R.id.drinkCalendar_left); rightButton = layout.findViewById(R.id.drinkCalendar_right); leftButton.setOnClickListener(view -> { calendar.set(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH) - 1, 1); updateCalendar(); }); rightButton.setOnClickListener(view -> { calendar.set(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH) + 1, 1); updateCalendar(); }); calendar = new GregorianCalendar(Locale.getDefault()); calendar.set(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), 1); calendarRow = new LinearLayout[6]; cells = new RelativeLayout[42]; for (int i = 0; i < calendarLayout.getChildCount(); i++) { calendarRow[i] = (LinearLayout) calendarLayout.getChildAt(i); for (int j = 0; j < 7; j++) { cells[i * 7 + j] = (RelativeLayout) calendarRow[i].getChildAt(j); } } setCalendar(); addView(layout); } public void setCalendar() { updateCalendar(); } public void setCalendar(int year, int monthInNormal) { calendar.set(year, monthInNormal - 1, 1); updateCalendar(); } public void setListener(DrinkCalendarListener listener) { this.listener = listener; } public void setDateChecked(ArrayList<Integer> date) { for (int i = 0; i < date.size(); i++) { ((ImageView)cells[date.get(i) - 1 + headerBufferSize].getChildAt(0)).setImageResource(R.drawable.calendar_check); } setTodayChecked(); } public int getViewingYear() { return calendar.get(Calendar.YEAR); } public int getViewingMonthInNormal() { return calendar.get(Calendar.MONTH) + 1; } private void setTodayChecked() { Calendar todayCalendar = Calendar.getInstance(); if (todayCalendar.get(Calendar.YEAR) == calendar.get(Calendar.YEAR) && todayCalendar.get(Calendar.MONTH) == calendar.get(Calendar.MONTH)) { ((ImageView)cells[todayCalendar.get(Calendar.DATE) - 1 + headerBufferSize].getChildAt(0)).setImageResource(R.drawable.calendar_check_today); ((TextView)cells[todayCalendar.get(Calendar.DATE) - 1 + headerBufferSize].getChildAt(1)).setTextColor(Color.WHITE); JLog.v("calcal",todayCalendar.get(Calendar.DATE) - 1); } } private void updateCalendar() { headerBufferSize = calendar.get(Calendar.DAY_OF_WEEK) - 1; for(int i=0; i<cells.length;i++){ ((TextView)cells[i].getChildAt(1)).setTextColor(Color.BLACK); ((ImageView)cells[i].getChildAt(0)).setImageResource(0); } if(calendar.get(Calendar.MONTH) + 1 <= 9) { monthText.setText(Integer.toString(calendar.get(Calendar.YEAR)) + ". 0" + Integer.toString(calendar.get(Calendar.MONTH) + 1)); }else{ monthText.setText(Integer.toString(calendar.get(Calendar.YEAR)) + ". " + Integer.toString(calendar.get(Calendar.MONTH) + 1)); } switch (calendar.getActualMaximum(Calendar.WEEK_OF_MONTH)) { case 4: calendarRow[4].setVisibility(GONE); calendarRow[5].setVisibility(GONE); break; case 5: calendarRow[4].setVisibility(VISIBLE); calendarRow[5].setVisibility(GONE); break; case 6: calendarRow[4].setVisibility(VISIBLE); calendarRow[5].setVisibility(VISIBLE); break; } int i = 0; while (i < calendar.getActualMaximum(Calendar.WEEK_OF_MONTH) * 7) { if (i < calendar.get(Calendar.DAY_OF_WEEK) - 1 || i > calendar.get(Calendar.DAY_OF_WEEK) + calendar.getActualMaximum(Calendar.DATE) - 2) { ((TextView)cells[i++].getChildAt(1)).setText(""); }else{ for (int j = 0; j < calendar.getActualMaximum(Calendar.DATE); j++) { ((TextView)cells[i++].getChildAt(1)).setText(Integer.toString(j+1)); } } } if (listener != null) { listener.movedToAnotherMonth(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH) + 1); } setTodayChecked(); } }
[ "silvergt@naver.com" ]
silvergt@naver.com
ef9f4092c870e49ec8fb412dbe5955d72cdef0cb
8bb1e2b5bbe3ccd6670781be6dd07b495b5aa692
/src/main/java/com/kseger/ppmtool/PpmtoolApplication.java
6f4f62d41cc9ff15aea4af33d02543238eab68dd
[]
no_license
Kse-Ger/PPMTool
151cd41c70ec39c8cf15f50188d97ac8be6bd564
e4c478eadd92441c49e39d2dc250be39e35c5ff2
refs/heads/master
2023-08-12T22:53:55.614455
2021-09-22T09:52:18
2021-09-22T09:52:18
403,885,160
0
0
null
null
null
null
UTF-8
Java
false
false
313
java
package com.kseger.ppmtool; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class PpmtoolApplication { public static void main(String[] args) { SpringApplication.run(PpmtoolApplication.class, args); } }
[ "ksenija.gerasimcuka@accenture.com" ]
ksenija.gerasimcuka@accenture.com
790d370ca1bdc6da28cbd44a8dfd9300bebb35e4
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/26/26_e66dd3d5215ab9be540f0290f58608d09f7dfa64/K9ActivityCommon/26_e66dd3d5215ab9be540f0290f58608d09f7dfa64_K9ActivityCommon_s.java
773b5a8022a2d3eb4d7e1b001f73f3ba4337ecf4
[]
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
3,766
java
package com.fsck.k9.activity; import java.util.Locale; import com.fsck.k9.K9; import com.fsck.k9.activity.misc.SwipeGestureDetector; import com.fsck.k9.activity.misc.SwipeGestureDetector.OnSwipeGestureListener; import com.fsck.k9.helper.StringUtils; import android.app.Activity; import android.content.res.Configuration; import android.content.res.Resources; import android.content.res.TypedArray; import android.view.GestureDetector; import android.view.MotionEvent; /** * This class implements functionality common to most activities used in K-9 Mail. * * @see K9Activity * @see K9ListActivity * @see K9FragmentActivity */ public class K9ActivityCommon { /** * Creates a new instance of {@link K9ActivityCommon} bound to the specified activity. * * @param activity * The {@link Activity} the returned {@code K9ActivityCommon} instance will be bound to. * * @return The {@link K9ActivityCommon} instance that will provide the base functionality of the * "K9" activities. */ public static K9ActivityCommon newInstance(Activity activity) { return new K9ActivityCommon(activity); } public static void setLanguage(Activity activity, String language) { Locale locale; if (StringUtils.isNullOrEmpty(language)) { locale = Locale.getDefault(); } else if (language.length() == 5 && language.charAt(2) == '_') { // language is in the form: en_US locale = new Locale(language.substring(0, 2), language.substring(3)); } else { locale = new Locale(language); } Configuration config = new Configuration(); config.locale = locale; Resources resources = activity.getResources(); resources.updateConfiguration(config, resources.getDisplayMetrics()); } /** * Base activities need to implement this interface. * * <p>The implementing class simply has to call through to the implementation of these methods * in {@link K9ActivityCommon}.</p> */ public interface K9ActivityMagic { int getThemeBackgroundColor(); void setupGestureDetector(OnSwipeGestureListener listener); } private Activity mActivity; private GestureDetector mGestureDetector; private K9ActivityCommon(Activity activity) { mActivity = activity; setLanguage(mActivity, K9.getK9Language()); mActivity.setTheme(K9.getK9ThemeResourceId()); } /** * Call this before calling {@code super.dispatchTouchEvent(MotionEvent)}. */ public void preDispatchTouchEvent(MotionEvent event) { if (mGestureDetector != null) { mGestureDetector.onTouchEvent(event); } } /** * Get the background color of the theme used for this activity. * * @return The background color of the current theme. */ public int getThemeBackgroundColor() { TypedArray array = mActivity.getTheme().obtainStyledAttributes( new int[] { android.R.attr.colorBackground }); int backgroundColor = array.getColor(0, 0xFF00FF); array.recycle(); return backgroundColor; } /** * Call this if you wish to use the swipe gesture detector. * * @param listener * A listener that will be notified if a left to right or right to left swipe has been * detected. */ public void setupGestureDetector(OnSwipeGestureListener listener) { mGestureDetector = new GestureDetector(mActivity, new SwipeGestureDetector(mActivity, listener)); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
bb5f0418429d25fecd481af35b5c824ddde632c3
f3bf4e9c33098dfc98332775881493d65349810d
/JavaEE6_Zaawansowany_przewodnik/case-studies/dukes-forest/dukes-store/src/java/com/forest/ejb/GroupsBean.java
83a259edeccef4df05a148037498e32630b91867
[]
no_license
tomekb82/JavaProjects
588ffe29e79e0999413ee9fd0d8a9596ecd6ef0b
88ed90da4f3bb930962002da22a46dad9b2ef6ca
refs/heads/master
2021-01-01T18:29:21.055062
2015-11-20T00:21:53
2015-11-20T00:21:53
20,363,504
2
0
null
null
null
null
UTF-8
Java
false
false
753
java
/* * Copyright 2013 Oracle and/or its affiliates. * All rights reserved. You may not modify, use, * reproduce, or distribute this software except in * compliance with the terms of the License at: * http://developers.sun.com/license/berkeley_license.html */ package com.forest.ejb; import com.forest.entity.Groups; import javax.ejb.Stateless; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; /** * * @author ievans */ @Stateless public class GroupsBean extends AbstractFacade<Groups> { @PersistenceContext(unitName = "forestPU") private EntityManager em; public GroupsBean() { super(Groups.class); } protected EntityManager getEntityManager() { return em; } }
[ "tomasz.belina@qualent.eu" ]
tomasz.belina@qualent.eu
a61e8fbb9c2c9bf4d5abe9131d5a3a19404a5cdc
b68cd54c142ca8328bec3b6f68218efa66b52af4
/src/gloop/graphics/rendering/shading/posteffects/FXAAPostEffect.java
6bffdfde349b67e2fd165c112ada48725670765c
[]
no_license
leefogg/GLOOP
99f374a405f79de4196f95c54b3d82e82f3423f6
4d66ff5c48863c07c99d953e78065d6a0b84a373
refs/heads/master
2021-04-03T10:30:43.571974
2020-11-14T22:01:34
2020-11-14T22:01:34
124,439,619
3
0
null
2018-05-31T20:37:38
2018-03-08T19:42:52
Java
UTF-8
Java
false
false
908
java
package gloop.graphics.rendering.shading.posteffects; import gloop.graphics.rendering.texturing.Texture; import gloop.graphics.rendering.texturing.TextureManager; import gloop.graphics.rendering.texturing.TextureUnit; import java.io.IOException; public class FXAAPostEffect extends PostEffect<FXAAShader> { private static FXAAShader Shader; private float span = 16; public FXAAPostEffect() throws IOException { Shader = getShaderSingleton(); } public static FXAAShader getShaderSingleton() throws IOException { if (Shader == null) Shader = new FXAAShader(); return Shader; } @Override public FXAAShader getShader(){ return Shader; } @Override public void setTexture(Texture texture) { TextureManager.bindTextureToUnit(texture, TextureUnit.ALBEDO_MAP); } public void setSpan(float span) { this.span = span; } @Override public void commit() { Shader.setSpan(span); } }
[ "leefogg@users.noreply.github.com" ]
leefogg@users.noreply.github.com
8060243fe5cb135c4d7076306838901b61057446
8f215f39654df1f64ae6f804ed42e2cc931fce5f
/app/src/androidTest/java/com/chaitanya/osos_assignment2/ExampleInstrumentedTest.java
09a4db4e802163bcc59495ed28239010b865edd7
[]
no_license
ckanzarkar/OSOS_Assignment2
52ff0f66b3a282b07da2b7362cbddc779ed7de1a
8bb2ab06b7084c0475803d5e680d39b5efae2842
refs/heads/master
2023-02-20T10:58:33.016967
2021-01-25T08:28:13
2021-01-25T08:28:13
332,663,677
0
0
null
null
null
null
UTF-8
Java
false
false
774
java
package com.chaitanya.osos_assignment2; import android.content.Context; import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); assertEquals("com.chaitanya.osos_assignment2", appContext.getPackageName()); } }
[ "magicianchaitanya@gmail.com" ]
magicianchaitanya@gmail.com
d49019b1094891edede3ebad35580de955a0476c
c6403153efc9905dc20edb3461af741aed0ee7de
/PearlsOfPune/src/pearlsofpune/info.java
3c1fc14dc7ff0dd7e03d840f8fbd2b2b34fdb30d
[]
no_license
mohitpokharna/Object-Oriented-System-Design
7bf6826cef490a2eacc89745fad5545f36fd4dff
e0a17525e096eab222e8b7c8ec53bfeb940b73c5
refs/heads/master
2021-01-17T18:21:30.671503
2016-11-10T07:26:26
2016-11-10T07:26:26
71,379,235
0
0
null
null
null
null
UTF-8
Java
false
false
36,500
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 pearlsofpune; /** * * @author mohit */ public class info extends javax.swing.JFrame { /** * Creates new form info */ public info() { initComponents(); hotels.setLineWrap(true); entertainment.setLineWrap(true); hospitals.setLineWrap(true); transport.setLineWrap(true); tourist_attraction.setLineWrap(true); } /** * 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() { jLabel1 = new javax.swing.JLabel(); jTabbedPane1 = new javax.swing.JTabbedPane(); jPanel1 = new javax.swing.JPanel(); jScrollPane14 = new javax.swing.JScrollPane(); hotels = new javax.swing.JTextArea(); hotels_5star = new javax.swing.JButton(); hotels_4star = new javax.swing.JButton(); hotels_3star = new javax.swing.JButton(); hotels_others = new javax.swing.JButton(); jPanel2 = new javax.swing.JPanel(); jScrollPane1 = new javax.swing.JScrollPane(); entertainment = new javax.swing.JTextArea(); ent_malls = new javax.swing.JButton(); ent_beaches = new javax.swing.JButton(); jPanel3 = new javax.swing.JPanel(); jScrollPane2 = new javax.swing.JScrollPane(); hospitals = new javax.swing.JTextArea(); hosp_private = new javax.swing.JButton(); hosp_govt = new javax.swing.JButton(); jPanel4 = new javax.swing.JPanel(); jScrollPane3 = new javax.swing.JScrollPane(); transport = new javax.swing.JTextArea(); trans_road = new javax.swing.JButton(); trans_rail = new javax.swing.JButton(); trans_air = new javax.swing.JButton(); jPanel5 = new javax.swing.JPanel(); jScrollPane4 = new javax.swing.JScrollPane(); tourist_attraction = new javax.swing.JTextArea(); tourist_relig = new javax.swing.JButton(); tourist_hist = new javax.swing.JButton(); exit = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setBackground(new java.awt.Color(207, 72, 72)); setMaximumSize(new java.awt.Dimension(570, 440)); setMinimumSize(new java.awt.Dimension(570, 440)); setPreferredSize(new java.awt.Dimension(500, 450)); getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jLabel1.setText("Pearls of Pune"); getContentPane().add(jLabel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(210, 10, 140, 25)); hotels.setColumns(20); hotels.setRows(5); jScrollPane14.setViewportView(hotels); hotels_5star.setText("5 star"); hotels_5star.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { hotels_5starActionPerformed(evt); } }); hotels_4star.setText("4 star"); hotels_4star.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { hotels_4starActionPerformed(evt); } }); hotels_3star.setText("3 star"); hotels_3star.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { hotels_3starActionPerformed(evt); } }); hotels_others.setText("Others"); hotels_others.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { hotels_othersActionPerformed(evt); } }); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane14, javax.swing.GroupLayout.DEFAULT_SIZE, 508, Short.MAX_VALUE) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(hotels_5star) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(hotels_4star) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(hotels_3star) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(hotels_others) .addGap(0, 0, Short.MAX_VALUE))) .addContainerGap()) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(hotels_5star) .addComponent(hotels_4star) .addComponent(hotels_3star) .addComponent(hotels_others)) .addGap(19, 19, 19) .addComponent(jScrollPane14, javax.swing.GroupLayout.DEFAULT_SIZE, 221, Short.MAX_VALUE) .addContainerGap()) ); jTabbedPane1.addTab("Hotels", jPanel1); entertainment.setColumns(20); entertainment.setRows(5); jScrollPane1.setViewportView(entertainment); ent_malls.setText("Malls"); ent_malls.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ent_mallsActionPerformed(evt); } }); ent_beaches.setText("Beaches"); ent_beaches.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { ent_beachesActionPerformed(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, javax.swing.GroupLayout.DEFAULT_SIZE, 508, Short.MAX_VALUE) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(ent_malls) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(ent_beaches) .addGap(0, 0, Short.MAX_VALUE))) .addContainerGap()) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(ent_malls) .addComponent(ent_beaches)) .addGap(18, 18, 18) .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 222, Short.MAX_VALUE) .addContainerGap()) ); jTabbedPane1.addTab("Entertainment", jPanel2); hospitals.setColumns(20); hospitals.setRows(5); jScrollPane2.setViewportView(hospitals); hosp_private.setText("Private"); hosp_private.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { hosp_privateActionPerformed(evt); } }); hosp_govt.setText("Government"); hosp_govt.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { hosp_govtActionPerformed(evt); } }); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 508, Short.MAX_VALUE) .addGroup(jPanel3Layout.createSequentialGroup() .addComponent(hosp_private) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(hosp_govt) .addGap(0, 0, Short.MAX_VALUE))) .addContainerGap()) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(hosp_private) .addComponent(hosp_govt)) .addGap(18, 18, 18) .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 221, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(13, 13, 13)) ); jTabbedPane1.addTab("Hospitals", jPanel3); transport.setColumns(20); transport.setRows(5); jScrollPane3.setViewportView(transport); trans_road.setText("Rail"); trans_road.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { trans_roadActionPerformed(evt); } }); trans_rail.setText("Road"); trans_rail.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { trans_railActionPerformed(evt); } }); trans_air.setText("Air"); trans_air.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { trans_airActionPerformed(evt); } }); javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4); jPanel4.setLayout(jPanel4Layout); jPanel4Layout.setHorizontalGroup( jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 508, Short.MAX_VALUE) .addGroup(jPanel4Layout.createSequentialGroup() .addComponent(trans_road) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(trans_rail) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(trans_air) .addGap(0, 0, Short.MAX_VALUE))) .addContainerGap()) ); jPanel4Layout.setVerticalGroup( jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel4Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(trans_road) .addComponent(trans_rail) .addComponent(trans_air)) .addGap(18, 18, 18) .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 221, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(13, 13, 13)) ); jTabbedPane1.addTab("Transport", jPanel4); tourist_attraction.setColumns(20); tourist_attraction.setRows(5); jScrollPane4.setViewportView(tourist_attraction); tourist_relig.setText("Religious"); tourist_relig.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { tourist_religActionPerformed(evt); } }); tourist_hist.setText("Historical"); tourist_hist.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { tourist_histActionPerformed(evt); } }); javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5); jPanel5.setLayout(jPanel5Layout); jPanel5Layout.setHorizontalGroup( jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 508, Short.MAX_VALUE) .addGroup(jPanel5Layout.createSequentialGroup() .addComponent(tourist_relig) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(tourist_hist) .addGap(0, 0, Short.MAX_VALUE))) .addContainerGap()) ); jPanel5Layout.setVerticalGroup( jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel5Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(tourist_relig) .addComponent(tourist_hist)) .addGap(18, 18, 18) .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 222, Short.MAX_VALUE) .addContainerGap()) ); jTabbedPane1.addTab("Tourist Attraction", jPanel5); getContentPane().add(jTabbedPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 60, 540, 330)); exit.setText("Exit"); exit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { exitActionPerformed(evt); } }); getContentPane().add(exit, new org.netbeans.lib.awtextra.AbsoluteConstraints(260, 400, -1, -1)); pack(); }// </editor-fold>//GEN-END:initComponents private void exitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_exitActionPerformed // TODO add your handling code here: System.exit(0); }//GEN-LAST:event_exitActionPerformed private void hotels_5starActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_hotels_5starActionPerformed // TODO add your handling code here: hotels.setText("The Pride Hotel\n5 University Road, Shivaji Nagar\nPhone: 02024657985\n\n"+ "The Corinthians Resort & Club\nNyati County, NIBM Annexxe South Pune\nPhone: 02024657246\n\n"+ "Sun N Sand Hotel\n262,Bund Garden Road\nPhone: 02024624546\n\n"+ "Oakwood Residence\n1 C Naylor Road, Off Managaldas Road\nPhone: 02024624246\n\n"); }//GEN-LAST:event_hotels_5starActionPerformed private void hotels_4starActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_hotels_4starActionPerformed // TODO add your handling code here: hotels.setText("Hyatt Pune\n88 Adjacent To Aga Khan Palace Nagar Road\nPhone:02041411234\n\n"+ "Radisson Blu Hotel\nNagar Bypass Road | Kharadi\nPhone:02041258234\n\n"+ "Four Points By Sheraton\n5th Milestone, Pune\nPhone:02041274594\n\n"+ "Royal Orchid Central\nKalyani Nagar Marisoft Annexe | Marisoft Annexe\nPhone:02045121254\n\n"); }//GEN-LAST:event_hotels_4starActionPerformed private void hotels_3starActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_hotels_3starActionPerformed // TODO add your handling code here: hotels.setText("Vivanta by Taj - Blue Diamond\n11 Koregaon Road\nPhone: 020 6602 5555\n\n"+ "Premier Inn Pune Kharadi Hotel\nPune Kharadi, Kharadi Mundhawa | Bypass Road, Next to Dominos\nPhone: 020 6602 2755\n\n"+ "Royal Orchid Golden Suites\nOpp Cerebrum It Park | Kalyani Nagar\nPhone: 020 2402 5375\n\n"); }//GEN-LAST:event_hotels_3starActionPerformed private void hotels_othersActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_hotels_othersActionPerformed // TODO add your handling code here: hotels.setText("Maitri Lodge\nflat no 106, G block M.I.D.C, near gati godawa, thermax chowk chinchwad\nPhone: 020 4205 0514\n\n"+ "Hotel Sheetal\n1180, Shivajinagar,Dnyaneshwar Paduka Chowk, F.C Road Pune\nPhone: 020 4220 1124\n\n"+ "Hotel Om Sai Palace\n1202/34, Shirole Road, Off Apte Road, Shivajinagar\nPhone: 020 4057 5542\n\n"+ "Hotel Bhooshan\n1170/7, Shivajinagar, Revenue Colony, Behind Jangli Maharaj Temple, Adj. Lane of Surbhi\nPhone: 020 4521 1245\n\n"); }//GEN-LAST:event_hotels_othersActionPerformed private void hosp_privateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_hosp_privateActionPerformed // TODO add your handling code here: hospitals.setText("Ruby Hall Clinic\nRuby Hall Clinic 40, Sassoon Road\nPhone: 020 - 26163391\nEmail: info@rubyhall.com\n\n"+ "Jehangir Hospital\n32, Sassoon Road\nPhone: 66819999, 66811000\nE-mail: enquiry@jehangirhospital.com\n\n"+ "Deenanath Mangeshkar Hospital and Research Centre\nErandawne, Pune 411 004\nPhone: +91 20 40151000 / 66023000\nEmail : info@dmhospital.org /jpmt@vsnl.com\n\n"+ "KEM Hospital\nSardar Moodliar Road\nPhone: 26125224, 66037300, 66037408\nE-mail: marketing@kemhospital.org\n\n"+ "Sancheti Institute For Orthopaedics & Rehabilitation\n16, Shivaji Nagar, Pune\nPhone: (020) 28 999 999, 27 999 999 \nEmail: sanchetihospital@eth.net, parag@sanchetihospital.org\n\n"); }//GEN-LAST:event_hosp_privateActionPerformed private void hosp_govtActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_hosp_govtActionPerformed // TODO add your handling code here: hospitals.setText("Janaki Nursing Home\nKarve Nagar, Kothrud\nPhone:020 - 25440386\n\n"+ "Lifeline Hospital, Ganeshkhind\n#157, Legacy, D.P. Road, Ganeshkhind\nPhone: 020 - 25882053\n\n"+ "Madhuban Hospitals Private Limited\n#365, Donje, Parvati\nPhone: 020 - 24389647\n\n"+ "Military Hospital, N.D.A.\nNDA Khadakwasla, N.D.A., Pune\nPhone: 020 - 25293200\n\n"+ "Neo Clinic, Model Colony\n#917/2, Mayur Center, Fergusson College Road, Model Colony\nPhone: 020 - 25661679\n\n"+ "King Edward Memorial Hospital\nRasta Sardar Mudliar Road, Kasba Peth\nPhone: 020 - 26141177\n\n"); }//GEN-LAST:event_hosp_govtActionPerformed private void ent_mallsActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ent_mallsActionPerformed // TODO add your handling code here: entertainment.setText("Phoenix Market City\nNagar Road, Pune 411030\nPhone Number: +91 20 3095 0000\nReviews:\n> All the big names are there. Clean and well kept and good service.courteous staff and helpful. Prices could be over the average but makes for good taste.\n> One of the biggest malls in Pune , is definitely crowded , good food options with different variety , coffee shops and high end stores. Awesome !\n\n"+ "Seasons Mall\nSolapur Highway, Pune 411028\nPhone Number: +91 20 6722 4000\nReviews:\n> New mall opened near Hadapsar area.Just infront of Amanora Mall. Have almost all the leading Branded stores outlets.Have Star Bazaar for grocery shopping.Food courts are good.We have Cinepolis here for Movies.Good mall to visit with family and friends.\n> You must this place.I enjoy with my friend.Various facilities available for visitors....This place one of the best place in pune to visit...Mall closed @10.3pPm\n\n"+ "Sgs Mall\n No 231 Aundh Camp Internal Road | Near Hdfc Bank, Pune 411002\nPhone Number: +91 20 2633 2865\nReviews:\n> It's a small mall .. It's nice but has limited brands and hence limits option .. They have awesome sale in this mall though.. Came across marks and spencer here.. With insane sale going on .. Made me super happy\n> SGS Mall is one of the oldest malls in Pune. The showrooms and outlets are very restricted with nothing great at offer. Unless you are in the area and dont want to travel to other parts of the city, you can easily skip this one. There are much better shopping destinations.\n\n"); }//GEN-LAST:event_ent_mallsActionPerformed private void ent_beachesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_ent_beachesActionPerformed // TODO add your handling code here: entertainment.setText("Tarkarli Beach\nDistance from Pune: 388 Kilometers (approx.)\nPopular for the mesmerising beauty it holds, Tarkarli Beach is known for the long and narrow stretch sea coast. It gives you one of the most relaxing experiences and can make your sunsets blissful. You are sure to rejuvenate in the calm and serene atmosphere of this highly placid beach destination, just a few miles away from Pune!\n\n"+ "Alibag Beach\nDistance from Pune: 143 Kilometers (approx.)\nOne of the most popular weekend getaways from Pune, Alibag is a hub for Mubaikars and Pune dwellers. Not just the beach, you also have a number of things to visit and sightsee here. One of the famous tourist spots in Alibag is the Kulaba Fort which can be visited only in the gap between the high and low tide. Apart from this, the beautiful beach also has places like Magnetic Observatory, Kanhoji Angre Samadhi, Vikram Vinakyak temple and the tower of St. Barbara making it an amazing tourist destination near Pune.\n\n"+ "Mandwa Beach\nDistance from Pune: 150 Kilometers (approx.)\nMandwa village has a charm of its own with its striking groves of coconut palms. Through this is your ride that will take you to the spell bounding Mandwa Beach! Relax, take a day off and head to this popular destination that has a number of sightseeing places ready in store for you. On a clear day you can also enjoy a breath-taking view across the bay, up to the Gateway of India.\n\n"+ "Ganpatipule Beach\nDistance from Pune: 316 Kilometers (approx.)\nBesides the calm and sedate Ganpatipule village, stretches this serene coastline beauty called the Ganpatipule Beach. Situated on the Konkan coast, this sea shore is a home for variety of cuisines and amazing landscape. It doesn’t take much to get there and is surely one of the best beaches in India; you are definite to leave this place with a relaxed and sober mind.\n\n"); }//GEN-LAST:event_ent_beachesActionPerformed private void trans_airActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_trans_airActionPerformed // TODO add your handling code here: transport.setText("Pune Airport is an international airport at Lohegaon, operated by the Airports Authority of India.\n It shares its runways with the neighbouring Indian Air Force base.[1] In addition to domestic flights to all major Indian cities, this airport serves international direct flights to Dubai (operated by Air India Express)[2] and to Frankfurt (operated by Lufthansa).[3]\n" + "The Maharashtra Industrial Development Corporation is responsible for the design and construction of a New Pune International Airport. The area between Chakan and Rajgurunagar, around the villages of Chandus and Shiroli, is being considered as a construction site. If constructed here, it will be at a distance of 40 km (25 mi) from central Pune.[4]\n\n"); }//GEN-LAST:event_trans_airActionPerformed private void trans_roadActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_trans_roadActionPerformed // TODO add your handling code here: transport.setText("Public buses within the city and its suburbs are operated by the Pune Mahanagar Parivahan Mahamandal Limited (PMPML). The PMPML operates the Pune Bus Rapid Transit system, the first of its kind in India, in which dedicated bus lanes were supposed to allow buses to travel quickly through the city. In reality the project has turned out to be a failure receiving little to no patronage from the local citizenry.[8] Maharashtra State Road Transport Corporation runs buses from its main stations in Shivajinagar, Pune station and Swargate to all major cities and towns in Maharashtra and neighbouring states. Private companies too run buses to major cities throughout India.[9]\n" + "\n" + "Pune is well-connected to other cities by Indian highways and state highways. National Highway 4 (NH 4) connects it to Mumbai, Bangalore and Kolhapur. NH 9 to Hyderabad, and NH 50 to Nashik. State highways connect it to Ahmednagar, Aurangabad, and Alandi.Car Rental Services in Pune Pride Taxi Services Radio Taxis\n" + "The Mumbai-Pune Expressway, India's first six-lane high-speed expressway, was built in 2002, and has reduced travel time between Pune and Mumbai to almost two hours. A ring road is being planned for the convenience of heavy traffic.[10]\n" + "Pune is served by two intra-city highways: Old Pune-Mumbai Highway and Katraj-Dehu Road Bypass, a part of National Highway 4. The Nashik City-Pune Highway NH 50 will be part of the golden triangle(Nashik-Pune-Mumbai).\n\n"); }//GEN-LAST:event_trans_roadActionPerformed private void trans_railActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_trans_railActionPerformed // TODO add your handling code here: transport.setText("Local trains (EMUs) connect Pune to the industrial town of Pimpri-Chinchwad and the hill station of Lonavala, while daily express trains connect Pune to Mumbai, Hyderabad, Delhi, Nagpur, Kanpur, Howrah, Jammu Tawi, Chennai, Bangalore, Goa, Varanasi, Patna, and Jamshedpur. At Pune, there is diesel locomotive shed and electric trip shed.[5] A rapid transit system has been proposed in Pune and is scheduled to begin operations in 2013.[6] Pune Metro Rail is being planned in consultation with Delhi Metro Rail Corporation Limited, the corporation which built and operates the Delhi Metro. It will be a combination of elevated and underground sections, with initial routes being planned between Pimpri-Swargate and Vanaz-Ramwadi.\n\n" + "The city has a railway station, Pune Railway Station. The station is administrated by the Pune Railway Division of the Central Railways.[7] All the railway lines to Pune are broad gauge.\n\n"); }//GEN-LAST:event_trans_railActionPerformed private void tourist_religActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tourist_religActionPerformed // TODO add your handling code here: tourist_attraction.setText("Omkareshwar Temple\nDedicated to Lord Shiva and Goddess Parvati, the Omkareshwar Temple is a famous Jyotirlinga in the Shaniwar Peth locality of Pune. It was built in the 17th century during the reign of Sadashivrao Bhau. The temple's location, on the banks of the Mutha River, makes it a tranquil place of worship. It is also used as a place for performing the last rites for Hindus. The Nagara style architecture of the Omkareshwar Temple is characterised by a beautifully carved dome in white soap stone and a tower or shikhara, with five layers depicting different deities. \n\n"+ "Chaturshringi Temple\nThe Chaturshringi Temple is one of the most popular tourist attractions in Pune. Built during the reign of Chhatrapati Shivaji, the great Maratha ruler, the temple holds much prominence during the Navratri festival, when it is beautifully decorated and lit. It stands 90 feet high on a hill slope at the Senapati Bapat Road. The temple is dedicated to Goddess Chaturshringi or Ambareshwari and represents strength and devotion. The goddess' shrine is located at an elevation that devotees cover by climbing 100 steps. In addition to the shrine, the complex has a temple for Lord Ganesha, which has eight idols of Him, and Goddess Durga. \n\n"+ "Pataleshwar Cave Temple\nReminding one of the elaborate Ellora Caves in the western coast of India, the Pataleshwar Cave Temple is a similar rock-cut temple on the Jungraj Maharaj Road in Pune. Carved out of a single huge block of rock, the temple is an eighth century architectural marvel. Its various structures and seating arrangements depict ancient architects' extensive geometric knowledge. It is no wonder that today the cave temple is a government-declared protected monument. The Pataleshwar Cave Temple is dedicated to Lord Shiva, and has sculptures depicting ancient gods and goddess. An interesting feature of this temple is its museum, which has some astounding Guinness World Record-winning arts displayed for the visitors\n\n"+ "Ganapati Temple\nLord Ganapati or Ganesha is a very popular diety in Maharashtra. It is no wonder, then, that the Shreemant Dagdusheth Halwai Ganapati Temple in Pune is a renowned religious site. The festival commemorating Ganesh Chaturthi is celebrated with much pomp and show here, with the involvement of the state's leaders and celebrities. Built in the 17th century, this temple on the banks of the Krishna River is considered an architectural wonder. It boasts of a large statue of Lord Ganesha in black stone and an ornate door made of natural wood, which interestingly is multi-coloured. The temple is also associated with various myths and legends.\n\n"); }//GEN-LAST:event_tourist_religActionPerformed private void tourist_histActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_tourist_histActionPerformed // TODO add your handling code here: tourist_attraction.setText("Darshan Museum\nSadhu Vaswani Mission, 10 Sadhu Vaswani Path, Near G.P.O, Near Pune Railway Station\nTimings: 11:00 AM - 7:00 PM\nEntry fees: 0\nThe museum is near Pune railway station, so you can easily take a taxi/cab or bus till the museum\n\n"+ "tribal cultural museum\nTribal Research & Training Institute, Pune 28, Queen’s Garden, Pune\nTimings:10:30 AM - 5:30 PM\nEntry fees: INR 10 for Indians; INR 200 for foreigners\nLocated on Queen's road, you can reach here by taking a cab or bus.\n\n"+ "Aga Khan Palace And Gandhi National Memorial\nPune Nagar Road, Kalyani Nagar, Pune\n9:00 AM - 5:30 PM\nEntry fees: INR 5 for Indians; INR 2 for children; INR 100 for foreigners\nLocated at Nagar Road, you can reach here by taking an auto, cab or state buses.\n\n"+ "Rajgad Fort\nRajgad Fort, Rajgad, Pune\nTimings:10:00 AM - 6:00 PM\nEntry fees: 0\nLocated in Rajgad, this fort can be reached by cabs or taxis\n\n"); }//GEN-LAST:event_tourist_histActionPerformed /** * 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"> /** * @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(info.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(info.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(info.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(info.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new info().setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton ent_beaches; private javax.swing.JButton ent_malls; private javax.swing.JTextArea entertainment; private javax.swing.JButton exit; private javax.swing.JButton hosp_govt; private javax.swing.JButton hosp_private; private javax.swing.JTextArea hospitals; private javax.swing.JTextArea hotels; private javax.swing.JButton hotels_3star; private javax.swing.JButton hotels_4star; private javax.swing.JButton hotels_5star; private javax.swing.JButton hotels_others; private javax.swing.JLabel jLabel1; private javax.swing.JPanel jPanel1; private javax.swing.JPanel jPanel2; private javax.swing.JPanel jPanel3; private javax.swing.JPanel jPanel4; private javax.swing.JPanel jPanel5; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JScrollPane jScrollPane14; private javax.swing.JScrollPane jScrollPane2; private javax.swing.JScrollPane jScrollPane3; private javax.swing.JScrollPane jScrollPane4; private javax.swing.JTabbedPane jTabbedPane1; private javax.swing.JTextArea tourist_attraction; private javax.swing.JButton tourist_hist; private javax.swing.JButton tourist_relig; private javax.swing.JButton trans_air; private javax.swing.JButton trans_rail; private javax.swing.JButton trans_road; private javax.swing.JTextArea transport; // End of variables declaration//GEN-END:variables }
[ "noreply@github.com" ]
mohitpokharna.noreply@github.com
59150e5f521c2f5908005504a42e4e689b86dd27
d7613fc69bacf8bcbd46dcc132efc870014edfb3
/src/main/java/com/github/javaparser/ast/nodeTypes/NodeWithMembers.java
d5646f3143dffa7d1b08a9b657adcc118a2f4e70
[]
no_license
xiaogui10000/javaparser-core
28961a9343b1d0c7263a98ce9362aaa6e033f9ee
7cfecf2bce53b793be9ee45cd63aa1aaa4ad93dc
refs/heads/master
2020-03-24T06:58:08.736546
2018-04-03T02:42:46
2018-04-03T02:42:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,416
java
/* * Copyright (C) 2007-2010 Júlio Vilmar Gesser. * Copyright (C) 2011, 2013-2016 The JavaParser Team. * * This file is part of JavaParser. * * JavaParser can be used either under the terms of * a) the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * b) the terms of the Apache License * * You should have received a copy of both licenses in LICENCE.LGPL and * LICENCE.APACHE. Please refer to those files for details. * * JavaParser 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 com.github.javaparser.ast.nodeTypes; import com.github.javaparser.ast.Modifier; import com.github.javaparser.ast.Node; import com.github.javaparser.ast.NodeList; import com.github.javaparser.ast.body.*; import com.github.javaparser.ast.expr.Expression; import com.github.javaparser.ast.stmt.BlockStmt; import com.github.javaparser.ast.type.Type; import com.github.javaparser.ast.type.VoidType; import java.util.Arrays; import java.util.EnumSet; import java.util.List; import static com.github.javaparser.JavaParser.parseType; import static java.util.Collections.unmodifiableList; import java.util.ArrayList; /** * A node having members. * <p> * The main reason for this interface is to permit users to manipulate homogeneously all nodes with a getMembers * method. */ public interface NodeWithMembers<N extends Node> { /** * @return all members inside the braces of this node, * like fields, methods, nested types, etc. */ NodeList<BodyDeclaration<?>> getMembers(); void tryAddImportToParentCompilationUnit(Class<?> clazz); public abstract BodyDeclaration<?> getMember(int i); @SuppressWarnings("unchecked") public abstract N setMember(int i, BodyDeclaration<?> member); @SuppressWarnings("unchecked") public abstract N addMember(BodyDeclaration<?> member); N setMembers(NodeList<BodyDeclaration<?>> members); /** * Add a field to this and automatically add the import of the type if needed * * @param typeClass the type of the field * @param name the name of the field * @param modifiers the modifiers like {@link Modifier#PUBLIC} * @return the {@link FieldDeclaration} created */ public abstract FieldDeclaration addField(Class<?> typeClass, String name, Modifier... modifiers); /** * Add a field to this. * * @param type the type of the field * @param name the name of the field * @param modifiers the modifiers like {@link Modifier#PUBLIC} * @return the {@link FieldDeclaration} created */ public abstract FieldDeclaration addField(String type, String name, Modifier... modifiers); /** * Add a field to this. * * @param type the type of the field * @param name the name of the field * @param modifiers the modifiers like {@link Modifier#PUBLIC} * @return the {@link FieldDeclaration} created */ public abstract FieldDeclaration addField(Type type, String name, Modifier... modifiers); /** * Add a field to this. * * @param type the type of the field * @param name the name of the field * @param initializer the initializer of the field * @param modifiers the modifiers like {@link Modifier#PUBLIC} * @return the {@link FieldDeclaration} created */ public abstract FieldDeclaration addFieldWithInitializer(Type type, String name, Expression initializer, Modifier... modifiers); /** * Add a private field to this. * * @param typeClass the type of the field * @param name the name of the field * @return the {@link FieldDeclaration} created */ public abstract FieldDeclaration addPrivateField(Class<?> typeClass, String name); /** * Add a private field to this and automatically add the import of the type if * needed. * * @param type the type of the field * @param name the name of the field * @return the {@link FieldDeclaration} created */ public abstract FieldDeclaration addPrivateField(String type, String name); /** * Add a public field to this. * * @param typeClass the type of the field * @param name the name of the field * @return the {@link FieldDeclaration} created */ public abstract FieldDeclaration addPublicField(Class<?> typeClass, String name); /** * Add a public field to this and automatically add the import of the type if * needed. * * @param type the type of the field * @param name the name of the field * @return the {@link FieldDeclaration} created */ public abstract FieldDeclaration addPublicField(String type, String name); /** * Add a protected field to this. * * @param typeClass the type of the field * @param name the name of the field * @return the {@link FieldDeclaration} created */ public abstract FieldDeclaration addProtectedField(Class<?> typeClass, String name); /** * Add a protected field to this and automatically add the import of the type * if needed. * * @param type the type of the field * @param name the name of the field * @return the {@link FieldDeclaration} created */ public abstract FieldDeclaration addProtectedField(String type, String name); /** * Adds a methods with void return by default to this. * * @param methodName the method name * @param modifiers the modifiers like {@link Modifier#PUBLIC} * @return the {@link MethodDeclaration} created */ public abstract MethodDeclaration addMethod(String methodName, Modifier... modifiers); /** * Add an initializer block ({@link InitializerDeclaration}) to this. */ public abstract BlockStmt addInitializer(); /** * Add a static initializer block ({@link InitializerDeclaration}) to this. */ public abstract BlockStmt addStaticInitializer(); /** * Try to find a {@link MethodDeclaration} by its name * * @param name the name of the method * @return the methods found (multiple in case of overloading) */ public abstract List<MethodDeclaration> getMethodsByName(String name); /** * Find all methods in the members of this node. * * @return the methods found. This list is immutable. */ public abstract List<MethodDeclaration> getMethods(); /** * Try to find a {@link MethodDeclaration} by its parameters types * * @param paramTypes the types of parameters like "Map&lt;Integer,String&gt;","int" to match<br> void * foo(Map&lt;Integer,String&gt; myMap,int number) * @return the methods found (multiple in case of overloading) */ public abstract List<MethodDeclaration> getMethodsByParameterTypes(String... paramTypes); /** * Try to find {@link MethodDeclaration}s by their name and parameters types * * @param paramTypes the types of parameters like "Map&lt;Integer,String&gt;","int" to match<br> void * foo(Map&lt;Integer,String&gt; myMap,int number) * @return the methods found (multiple in case of overloading) */ public abstract List<MethodDeclaration> getMethodsBySignature(String name, String... paramTypes); /** * Try to find a {@link MethodDeclaration} by its parameters types * * @param paramTypes the types of parameters like "Map&lt;Integer,String&gt;","int" to match<br> void * foo(Map&lt;Integer,String&gt; myMap,int number) * @return the methods found (multiple in case of overloading) */ public abstract List<MethodDeclaration> getMethodsByParameterTypes(Class<?>... paramTypes); /** * Try to find a {@link FieldDeclaration} by its name * * @param name the name of the field * @return null if not found, the FieldDeclaration otherwise */ public abstract FieldDeclaration getFieldByName(String name); /** * Find all fields in the members of this node. * * @return the fields found. This list is immutable. */ public abstract List<FieldDeclaration> getFields(); }
[ "1337893145@qq.com" ]
1337893145@qq.com
bf1fb976acdf6ad72992a33f004c3d07c1c4a285
fa90d79488e463e4790349a33dcc970d0764948c
/app/src/main/java/com/qbase/huaweiability/ItemBean.java
0c7602e82debade2a222d15d687ba1a4323f88f6
[ "Apache-2.0" ]
permissive
qay1139069530/HUAWEIAbility
067ad39eaedc00eea6356c1bf64763019dae693b
60017b4ce8931581b91e3951148e1c5113a5a0bd
refs/heads/master
2022-12-15T04:17:18.202389
2020-09-14T13:46:53
2020-09-14T13:46:53
295,428,389
0
0
null
null
null
null
UTF-8
Java
false
false
738
java
package com.qbase.huaweiability; import androidx.annotation.StringRes; import androidx.appcompat.app.AppCompatActivity; public class ItemBean { private int title; private Class<? extends AppCompatActivity> itemClass; public ItemBean(@StringRes int title, Class<? extends AppCompatActivity> itemClass) { this.title = title; this.itemClass = itemClass; } public int getTitle() { return title; } public void setTitle(int title) { this.title = title; } public Class<? extends AppCompatActivity> getItemClass() { return itemClass; } public void setItemClass(Class<? extends AppCompatActivity> itemClass) { this.itemClass = itemClass; } }
[ "1139069530@qq.com" ]
1139069530@qq.com
85a78478f958f92e0ff6e33abe7ccff519c0c3a8
187599822eb973eb455e69bb39ec39ec5758a8f0
/My-Cat-IoT/app/src/main/java/com/example/team_cat_iot2020/ui/send/SendViewModel.java
5d32e5b9e0322d8dbca41fb8b5dc611ffdc01e19
[]
no_license
NAMU1105/My-Cat-IoT
fb0281ffb38fb59bdbcd6a03c51ae33aae78c79e
63d665c33748916ef10db6e8b8de6e24f96bde9b
refs/heads/master
2023-02-09T14:22:36.803076
2020-12-30T09:34:40
2020-12-30T09:34:40
282,517,015
0
0
null
null
null
null
UTF-8
Java
false
false
451
java
package com.example.team_cat_iot2020.ui.send; import androidx.lifecycle.LiveData; import androidx.lifecycle.MutableLiveData; import androidx.lifecycle.ViewModel; public class SendViewModel extends ViewModel { private MutableLiveData<String> mText; public SendViewModel() { mText = new MutableLiveData<>(); mText.setValue("This is send fragment"); } public LiveData<String> getText() { return mText; } }
[ "47317129+NAMU1105@users.noreply.github.com" ]
47317129+NAMU1105@users.noreply.github.com
f1a7f840f91ec12ae9c6b25176450bc1c5819718
11327a2f5d7da3f25cdda39d7478facaec9902d1
/src/main/java/com/stackroute/Student.java
e94482ba44e618f6ab8a8315e09e379e04f864ee
[]
no_license
vinodkalamati/PE5
bc26f24ba41d957b2dd7479555e782f930773c2f
d6afb27483648cd030b0a9e2e36764208ebaaab2
refs/heads/master
2021-07-13T10:29:26.031877
2019-09-18T05:49:26
2019-09-18T05:49:26
209,227,239
0
0
null
null
null
null
UTF-8
Java
false
false
1,151
java
package com.stackroute; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.List; public class Student { private int id; private String name; private int age; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getAge() { return age; } public void setAge(int age) { this.age = age; } public List<Student> sort_objects(List<Student> _list){ Collections.sort(_list,new StudentSorter()); return _list; } } class StudentSorter implements Comparator<Student>{ @Override public int compare(Student student, Student t1) { if(student.getAge()==t1.getAge()) { if (student.getName().equals(t1.getName())) { return student.getId()-t1.getId(); } return student.getName().compareTo(t1.getName()); } return t1.getAge()-student.getAge(); } }
[ "vinod.kalamati@cgi.com" ]
vinod.kalamati@cgi.com
a20530332d31f1225e4c64c1f00f3c624783c55e
bfe01c752dcda58494766883b28509ec04bba82e
/app/src/main/java/com/example/testsubmission/network/models/weatherresponse/Forecast.java
8ef1590ce6b2424c17daa7e56149a96357b6903d
[]
no_license
babarshamsi/CCAssessment
f0d04f25f55a3b9f10a702af1116e3b86282a2f1
633ceca3e03fc37f057b36985f429ff696d45ae1
refs/heads/master
2020-06-30T08:33:43.359991
2019-08-13T10:18:59
2019-08-13T10:18:59
200,779,536
0
0
null
null
null
null
UTF-8
Java
false
false
460
java
package com.example.testsubmission.network.models.weatherresponse; import java.util.List; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; public class Forecast { @SerializedName("forecastday") @Expose private List<Forecastday> forecastday = null; public List<Forecastday> getForecastday() { return forecastday; } public void setForecastday(List<Forecastday> forecastday) { this.forecastday = forecastday; } }
[ "babar_shamsi@live.com" ]
babar_shamsi@live.com
2dd4f8b9abf6bd085b9e26a59190d1ddf073a887
585e80a2b6e6378b49e1a0f9db2987b7594df157
/src/main/java/Main.java
f647213fdb8f50adb258966c3daa187e4e9bb034
[]
no_license
Splay155/origin
432b79b39608df33fc892a5e054752504d9e0872
ea249063020422a776439c55a01fb293d4fd8aeb
refs/heads/master
2023-08-22T02:13:34.410990
2021-10-20T16:36:34
2021-10-20T16:36:34
419,402,830
0
0
null
null
null
null
UTF-8
Java
false
false
2,765
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 AKSAL */ public class Main { public static void main(String[] args){ // 1. membuat 5 User User aqshal = new User("Aqshal","Splay","155"); User jefta= new User("Jefta","StevenFS","342"); User fatih = new User("Fatih","Gogatsuboy","153"); User ridwan = new User("Ridwan","Iwang","212"); User farrel = new User("Farrel","pargoy","756"); User.usernameList.add("Splay"); User.usernameList.add("StevenFS"); User.usernameList.add("Gogatsuboy"); User.usernameList.add("Iwang"); User.usernameList.add("pargoy"); User.userList.add(aqshal); User.userList.add(jefta); User.userList.add(fatih); User.userList.add(ridwan); User.userList.add(farrel); // 2. Ubah 2 username yang ada aqshal.setUserName("Splay155"); jefta.setUserName("Steven"); System.out.println(); //// 3. Mengganti 1 username dengan username yang sudah ada ridwan.setUserName("pargoy"); System.out.println(); //// 4. Mengganti 2 username yang lain dengan username yang sudah ada fatih.setUserName("Iwang"); farrel.setUserName("Gogatsuboy"); System.out.println(); // //// 5. Cetak seluruh activity yang ada Activity.printAllActivities(); System.out.println(); //// 6. Cetak seluruh activity pada hari ini Activity.printTodaysActivities(); System.out.println(); //// 7. Login 2 kali dengan user yang berbeda fatih.logIn("Gogatsuboy", "153"); ridwan.logIn("Iwang", "212"); System.out.println(); // //// 8. Gagal login 2 kali dengan user yang berbeda jefta.logIn("st3ven", "333"); farrel.logIn("parg0y", "002"); System.out.println(); // //// 9. Cek seluruh activity oleh 2 user tertentu Activity.printUserActivities("Gogatsuboy"); Activity.printUserActivities("Splay"); System.out.println(); // //// 10. Cetak 10 activity terakhir aqshal.setUserName("1"); aqshal.setUserName("2"); aqshal.setUserName("3"); aqshal.setUserName("4"); aqshal.setUserName("5"); aqshal.setUserName("6"); aqshal.setUserName("7"); aqshal.setUserName("8"); aqshal.setUserName("9"); aqshal.setUserName("10"); Activity.printLastTenActivities(); } }
[ "aqshalaurellioa@gmail.com" ]
aqshalaurellioa@gmail.com
6f3e70c628269486ce78a758143f7d66ee68bc5b
82be68d30f1a6fe44db6b31b1c7c577c3f1c34b6
/Polling/src/DAO/PollViewDAO.java
9c077ab38b1a5e2a9560b8784719d639a48e6457
[]
no_license
gpoddar/YouPick
7e09379e38381bddbf8b34ad1bd7d66b3436ac8c
b380802c889e8a5ea1423152053145945affd0a7
refs/heads/master
2021-01-20T19:08:39.562814
2016-07-22T12:50:31
2016-07-22T12:50:31
63,856,200
0
0
null
null
null
null
UTF-8
Java
false
false
1,549
java
package DAO; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import dto.Poll; import util.DBUtil; public class PollViewDAO { Connection connection; public ArrayList<Poll> getViewPolls() { ArrayList<Poll> polls=new ArrayList<Poll>(); DBUtil dbutil=new DBUtil(); PreparedStatement pst=null; ResultSet resultSet=null; try{ connection=dbutil.get(); pst = connection.prepareStatement("select * from polls join poll_category on polls.category_id=poll_category.category_id order by alive "); resultSet = pst.executeQuery(); while(resultSet.next()){ Poll poll=new Poll(); poll.setTitle(resultSet.getString("title")); poll.setPollId(resultSet.getInt("poll_id")); poll.setScore(resultSet.getDouble("score")); poll.setCreatedAt(resultSet.getDate("alive")); poll.setCategoryName(resultSet.getString("category_name")); poll.setVotes(resultSet.getLong("votes")); polls.add(poll); } pst.close(); resultSet.close(); dbutil.close(connection); } catch(SQLException sqlException){ sqlException.printStackTrace(); } catch (ClassNotFoundException e) { e.printStackTrace(); } finally{ dbutil.close(connection); try { pst.close(); resultSet.close(); } catch (SQLException sqlException) { sqlException.printStackTrace(); } } return polls; } }
[ "gaurangpoddar@Gaurangs-MacBook.local" ]
gaurangpoddar@Gaurangs-MacBook.local
4e812a504f19a026ebe9c8fa9accfe04981bf04f
8151e93fd7bd7a219a80002ccb84c57523575782
/app/src/main/java/com/example/khoerul/smarthidroponik/Activity/MainActivity.java
d52536db3152f70a0a31315e3a5eaf4841bfa585
[]
no_license
Ompong7680/SmartHidroponik
41458b32873346b73151770eabd6864ebb901dc2
beab60bf3e8f8c673f9fb395abbd7a851d6645a2
refs/heads/master
2020-08-27T11:07:59.171700
2019-08-13T16:40:43
2019-08-13T16:40:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
16,181
java
package com.example.khoerul.smarthidroponik.Activity; import android.annotation.SuppressLint; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.os.AsyncTask; import android.os.Bundle; import android.support.v4.widget.SwipeRefreshLayout; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.CheckBox; import android.widget.CompoundButton; import android.widget.EditText; import android.widget.RadioButton; import android.widget.Spinner; import android.widget.Toast; import android.widget.ToggleButton; import com.android.volley.AuthFailureError; import com.android.volley.Request; import com.android.volley.RequestQueue; import com.android.volley.Response; import com.android.volley.VolleyError; import com.android.volley.toolbox.StringRequest; import com.android.volley.toolbox.Volley; import com.example.khoerul.smarthidroponik.KeteranganPPMTanaman; import com.example.khoerul.smarthidroponik.R; import com.example.khoerul.smarthidroponik.Sensor; import com.example.khoerul.smarthidroponik.SensorAdapter; import com.example.khoerul.smarthidroponik.Tanaman; import com.loopj.android.http.AsyncHttpResponseHandler; import com.loopj.android.http.MySSLSocketFactory; import com.loopj.android.http.SyncHttpClient; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import java.util.ArrayList; import java.util.HashMap; import java.util.Map; import butterknife.BindView; import butterknife.ButterKnife; import cz.msebera.android.httpclient.Header; public class MainActivity extends AppCompatActivity { Button infotanaman; @BindView(R.id.sensorset) RecyclerView sensorset; Button keteranganppm; SensorAdapter adapter; private SwipeRefreshLayout refreshLayout; ToggleButton toggleButton; CheckBox m100ppm, m200ppm, m500ppm, m1000ppm; private static final String URL = "http://hidroponik.96.lt/getalat.php"; String Input=""; String InputTandon=""; private EditText pomnutrisiA, pomnutrisiB, pomairBasa; private Button validinput; private static String URL_POMPA = "http://hidroponik.96.lt/CONFIG/pompa.php?"; private static String URL_POMPA_Tandon = "http://hidroponik.96.lt/CONFIG/pompatandon.php"; @SuppressLint("WrongViewCast") @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // spinernutria = (Spinner)findViewById(R.id.validnutrisiA) ; toggleButton = (ToggleButton) findViewById(R.id.pompatandon); toggleButton.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { if(isChecked == true) { Toast.makeText(getBaseContext(), "Pompa Aktif", Toast.LENGTH_SHORT).show(); }else { Toast.makeText(getBaseContext(), "Pompa Mati", Toast.LENGTH_SHORT).show(); } } }); m100ppm = (CheckBox) findViewById(R.id.valid100ppm); m200ppm = (CheckBox) findViewById(R.id.valid200ppm); m500ppm = (CheckBox) findViewById(R.id.valid500ppm); m1000ppm = (CheckBox) findViewById(R.id.valid1000ppm); // pomnutrisiA = findViewById(R.id.validnutrisiA); // pomnutrisiB = findViewById(R.id.validnutrisiB); // pomairBasa = findViewById(R.id.validasiAir); validinput = findViewById(R.id.validasiinutrisi); m100ppm.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { m200ppm.setChecked(false); m500ppm.setChecked(false); m1000ppm.setChecked(false); } }); m200ppm.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { m100ppm.setChecked(false); m500ppm.setChecked(false); m1000ppm.setChecked(false); } }); m500ppm.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { m100ppm.setChecked(false); m200ppm.setChecked(false); m1000ppm.setChecked(false); } }); m1000ppm.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { @Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { m100ppm.setChecked(false); m200ppm.setChecked(false); m500ppm.setChecked(false); } }); toggleButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { URL_POMPA_Tandon = "http://hidroponik.96.lt/CONFIG/pompatandon.php"; if (isChecked){ InputTandon="Pompa Aktif"; URL_POMPA_Tandon+="PompaTandon="; URL_POMPA_Tandon+=URL_POMPA_Tandon; TandonPompa(); Toast.makeText(MainActivity.this,URL_POMPA_Tandon,Toast.LENGTH_LONG).show(); }else if (Mati.isChecked()) { URL_POMPA_Tandon = "Pompa Mati"; URL_POMPA_Tandon += "PompaTandon="; URL_POMPA_Tandon += URL_POMPA_Tandon; TandonPompa(); Toast.makeText(MainActivity.this, URL_POMPA_Tandon, Toast.LENGTH_LONG).show(); } } }); validinput.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { URL_POMPA="http://hidroponik.96.lt/CONFIG/pompa.php?"; if (m100ppm.isChecked()){ Input="100ppm"; URL_POMPA+="KadarPPM="; URL_POMPA+=Input; InputVAlidasi(); Toast.makeText(MainActivity.this,Input,Toast.LENGTH_LONG).show(); }else if (m200ppm.isChecked()){ Input="200ppm"; URL_POMPA+="KadarPPM="; URL_POMPA+=Input; InputVAlidasi(); Toast.makeText(MainActivity.this,Input,Toast.LENGTH_LONG).show(); }else if (m500ppm.isChecked()){ Input="500ppm"; URL_POMPA+="KadarPPM="; URL_POMPA+=Input; InputVAlidasi(); Toast.makeText(MainActivity.this,Input,Toast.LENGTH_LONG).show(); }else if (m1000ppm.isChecked()){ Input="1000ppm"; URL_POMPA+="KadarPPM="; URL_POMPA+=Input; InputVAlidasi(); Toast.makeText(MainActivity.this,Input,Toast.LENGTH_LONG).show(); }else{ Toast.makeText(MainActivity.this,"Pilih PPM Terlebih Dahulu", Toast.LENGTH_SHORT).show(); } // URL_POMPA+="KadarPPM="; // URL_POMPA+=Input; // InputVAlidasi(); } }); infotanaman = (Button) findViewById(R.id.btn_infotanaman); infotanaman.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent intent = new Intent(getApplicationContext(), Tanaman.class); startActivity(intent); } }); keteranganppm = (Button) findViewById(R.id.keteranganinput); keteranganppm.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(MainActivity.this, KeteranganPPMTanaman.class); startActivity(intent); } }); refreshLayout = findViewById(R.id.swipe_refresh); refreshLayout.setColorSchemeResources(R.color.colorAccent, R.color.colorPrimary); refreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() { @Override public void onRefresh() { refreshLayout.setRefreshing(false); // validinput.setVisibility(View.VISIBLE); String url = "http://hidroponik.96.lt/getalat.php"; DemoAsync demoASync = new DemoAsync(); demoASync.execute(url); } }); ButterKnife.bind(this); adapter = new SensorAdapter(this); String url = "http://hidroponik.96.lt/getalat.php"; DemoAsync demoASync = new DemoAsync(); demoASync.execute(url); } private void TandonPompa() { StringRequest stringRequest = new StringRequest(Request.Method.POST, URL_POMPA_Tandon, new Response.Listener<String>() { @Override public void onResponse(String response) { try { JSONObject jsonObject = new JSONObject(response); String success = jsonObject.getString("success"); if (success.equals("1")) { Toast.makeText(MainActivity.this, "Input Berhasil", Toast.LENGTH_SHORT).show(); } } catch (JSONException e) { e.printStackTrace(); Toast.makeText(MainActivity.this, "Input Gagal!!!", Toast.LENGTH_SHORT).show(); validinput.setVisibility(View.VISIBLE); } } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { Toast.makeText(MainActivity.this, "Input Gagal!!!", Toast.LENGTH_SHORT).show(); validinput.setVisibility(View.VISIBLE); } }) { @Override protected Map<String, String> getParams() throws AuthFailureError { Map<String, String> Params = new HashMap<>(); Params.put("URL_POMPA_Tandon", URL_POMPA_Tandon); return Params; } }; RequestQueue requestQueue = Volley.newRequestQueue(this); requestQueue.add(stringRequest); } private void InputVAlidasi() { // validinput.setVisibility(View.GONE); // final String m100ppm = this.m100ppm.getText().toString().trim(); // final String m200ppm = this.m200ppm.getText().toString().trim(); // final String m500ppm = this.m500ppm.getText().toString().trim(); // final String m1000ppm = this.m1000ppm.getText().toString().trim(); StringRequest stringRequest = new StringRequest(Request.Method.POST, URL_POMPA, new Response.Listener<String>() { @Override public void onResponse(String response) { try { JSONObject jsonObject = new JSONObject(response); String success = jsonObject.getString("success"); if (success.equals("1")) { Toast.makeText(MainActivity.this, "Input Berhasil", Toast.LENGTH_SHORT).show(); } } catch (JSONException e) { e.printStackTrace(); Toast.makeText(MainActivity.this, "Input Gagal!!!", Toast.LENGTH_SHORT).show(); validinput.setVisibility(View.VISIBLE); } } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { Toast.makeText(MainActivity.this, "Input Gagal!!!", Toast.LENGTH_SHORT).show(); validinput.setVisibility(View.VISIBLE); } }) { @Override protected Map<String, String> getParams() throws AuthFailureError { Map<String, String> Params = new HashMap<>(); Params.put("KadarPPM", Input); return Params; } }; RequestQueue requestQueue = Volley.newRequestQueue(this); requestQueue.add(stringRequest); } @Override public void onBackPressed() { AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage("Ingin Keluar Aplikasi?").setCancelable(false).setPositiveButton( "Yes", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { MainActivity.super.onBackPressed(); } }) .setNegativeButton("No", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { dialogInterface.cancel(); } }); AlertDialog alertDialog = builder.create(); alertDialog.show(); } public void pompa(View view) { if (toggleButton.isChecked()) Toast.makeText(this, "Pompa Aktif", Toast.LENGTH_LONG).show(); else Toast.makeText(this, "Pompa Mati", Toast.LENGTH_LONG).show(); } public class DemoAsync extends AsyncTask<String, Void, ArrayList<Sensor>> { @Override protected ArrayList<Sensor> doInBackground(String... strings) { String uri = strings[0]; final ArrayList<Sensor> sensors = new ArrayList<>(); SyncHttpClient client = new SyncHttpClient(); client.setSSLSocketFactory(MySSLSocketFactory.getFixedSocketFactory()); client.get(uri, new AsyncHttpResponseHandler() { @Override public void onSuccess(int statusCode, Header[] headers, byte[] responseBody) { try { String hasil = new String(responseBody); JSONObject jsonData = new JSONObject(hasil); JSONArray jsonArray = jsonData.getJSONArray("Data"); for (int i = 0; i < jsonArray.length(); i++) { JSONObject sensorObj = jsonArray.getJSONObject(i); Sensor sensor = new Sensor(sensorObj); sensors.add(sensor); } } catch (Exception e) { e.printStackTrace(); } } @Override public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) { Log.d("Tag", "onFailure: " + statusCode); } }); return sensors; } @Override protected void onPostExecute(ArrayList<Sensor> sensor) { super.onPostExecute(sensor); sensorset.setLayoutManager(new LinearLayoutManager(MainActivity.this)); adapter.setListSensor(sensor); sensorset.setAdapter(adapter); } } }
[ "34030504+azissun23@users.noreply.github.com" ]
34030504+azissun23@users.noreply.github.com
00c383181ea1615a1121c4cd6883872f479e4208
f44cfedad9ba781722dcec6654f34126c2dc6c1e
/src/com/kingdee/eas/scm/im/inv/ISaleIssueBill.java
317077b22fb1f8136cf257fe3ddff14820b81f36
[]
no_license
jinbinguo/GADev
8234c04ae4089cf78b8cb90677c82ec2336097f9
7b3b0f1a7f2ce3ef9f0ad2d2fbee8267173e6978
refs/heads/master
2016-09-05T13:43:12.905201
2014-07-11T08:29:31
2014-07-11T08:29:31
15,757,409
0
0
null
null
null
null
UTF-8
Java
false
false
2,157
java
package com.kingdee.eas.scm.im.inv; import com.kingdee.bos.BOSException; //import com.kingdee.bos.metadata.*; import com.kingdee.bos.framework.*; import com.kingdee.bos.util.*; import com.kingdee.bos.Context; import java.lang.String; import com.kingdee.eas.common.EASBizException; import com.kingdee.bos.metadata.entity.EntityViewInfo; import com.kingdee.bos.dao.IObjectPK; import java.util.Map; import java.util.HashMap; import com.kingdee.bos.metadata.entity.SelectorItemCollection; import com.kingdee.eas.framework.CoreBaseCollection; import java.util.Set; import com.kingdee.bos.util.*; import com.kingdee.bos.BOSException; import com.kingdee.bos.Context; import com.kingdee.eas.framework.CoreBaseInfo; import com.kingdee.bos.dao.IObjectCollection; import com.kingdee.bos.framework.*; import java.util.List; public interface ISaleIssueBill extends IInvBillBase { public SaleIssueBillInfo getSaleIssueBillInfo(IObjectPK pk) throws BOSException, EASBizException; public SaleIssueBillInfo getSaleIssueBillInfo(IObjectPK pk, SelectorItemCollection selector) throws BOSException, EASBizException; public SaleIssueBillInfo getSaleIssueBillInfo(String oql) throws BOSException, EASBizException; public SaleIssueBillCollection getSaleIssueBillCollection() throws BOSException; public SaleIssueBillCollection getSaleIssueBillCollection(EntityViewInfo view) throws BOSException; public SaleIssueBillCollection getSaleIssueBillCollection(String oql) throws BOSException; public HashMap splitBillByWrittenOffQty(String[] idList, HashMap param) throws BOSException, EASBizException; public void checkPreReceived(Set saleOrderIds) throws BOSException, EASBizException; public IObjectCollection createNewAuditBillBySettle(Map settledEntriesMap, Set srcBillIdSet) throws BOSException, EASBizException; public void deleteBillByUnSettle(Set billIdSet) throws BOSException, EASBizException; public void changePrice(IObjectPK pk, String description, List list) throws BOSException, EASBizException; public String checkChangePrice(IObjectPK pk) throws BOSException, EASBizException; }
[ "jinbin_guo@qq.com" ]
jinbin_guo@qq.com
c82a27f61d4e7e2c0145bd3a8d796bdaa0e2ed8b
e55476e9e9e9e7f1546797f40594f4868124de57
/src/main/resources/backup/ClubRepository.java
18ae91e0fcf37fb2667dede53bdc847f7986072d
[]
no_license
Todayz/todayz
cea5903850f89ee686634cdde8439622922cb92a
234adb57adf33a3623c714f74d51996a50b4538d
refs/heads/master
2021-01-18T21:36:20.448560
2016-03-16T12:06:05
2016-03-16T12:06:05
52,005,439
0
0
null
null
null
null
UTF-8
Java
false
false
444
java
package com.hotclub.repository; import java.util.List; import com.hotclub.domain.club.Club; import com.hotclub.domain.member.Member; public interface ClubRepository { public void save(Club club); public void delete(Long id); public Club findOne(Long id); //추후에 paging에 대한 처리 필요. public List<Club> findAll(); public Member joinClub(Club club, Member member); public void leaveClub(Club club, Member member); }
[ "hypnodisc@naver.com" ]
hypnodisc@naver.com
0d328e648c2a88d672ebd44e50dae1f68419e78c
aaeaf9e66414673dc753f31847cdb4b54f024e78
/app/src/main/java/be/heh/std/app/activities/PlcManagementActivity.java
0b6b376374495cc342ed4e2aeb99b4331aaa07c2
[]
no_license
TeaFlex/ProcessimControlApp
2d45dee21fc299a1bb88416990d538a01a7bbffc
93b13e22833362403001c4fc4b31dbea6e804f33
refs/heads/master
2023-02-16T02:17:09.371695
2021-01-05T21:20:35
2021-01-05T21:20:35
317,850,186
0
0
null
null
null
null
UTF-8
Java
false
false
4,772
java
package be.heh.std.app.activities; import android.app.AlertDialog; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.widget.Toast; import androidx.appcompat.app.AppCompatActivity; import androidx.databinding.DataBindingUtil; import java.util.ArrayList; import be.heh.std.app.R; import be.heh.std.app.activities.forms.AddPlcActivity; import be.heh.std.app.adapters.PlcConfAdapter; import be.heh.std.app.databinding.ActivityPlcManagementBinding; import be.heh.std.model.database.PlcType; import be.heh.std.model.database.Role; import be.heh.std.model.database.AppDatabase; import be.heh.std.model.database.PlcConf; import be.heh.std.model.database.User; public class PlcManagementActivity extends AppCompatActivity { private ActivityPlcManagementBinding binding; private AppDatabase db; private User current_user; private Intent intent; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); intent = getIntent(); db = AppDatabase.getInstance(getApplicationContext()); current_user = db.userDAO().getUserById(intent.getIntExtra("user_id", 0)); updateList(); } @Override protected void onResume() { super.onResume(); updateList(); } public void onPlcManageClick(View v) { switch (v.getId()) { case R.id.plc_management_back: finish(); break; case R.id.plc_management_add: startActivity(new Intent(this, AddPlcActivity.class)); break; case R.id.plc_del: int received_id = Integer.parseInt(v.getTag().toString()); if(current_user.role == Role.BASIC) Toast.makeText(this, getString(R.string.unauthorized), Toast.LENGTH_SHORT).show(); else { new AlertDialog.Builder(this) .setMessage(getString(R.string.plc_del_confirmation, getString(R.string.plc_n, received_id))) .setNegativeButton(R.string.cancel, null) .setPositiveButton(R.string.accept, (dialog, which) -> { deleteElement(received_id); Toast.makeText(getApplicationContext(), getString(R.string.plc_deleted, received_id), Toast.LENGTH_LONG).show(); }) .create() .show(); } break; case R.id.plc_item: received_id = Integer.parseInt(v.getTag(R.id.plc_del).toString()); PlcConf current_conf = getPlcConf(received_id); if(current_conf != null) { new AlertDialog.Builder(this) .setMessage(getString(R.string.connect_plc_msg, getString(R.string.plc_n, received_id))) .setNegativeButton(R.string.cancel, null) .setPositiveButton(R.string.accept, (dialog, which) -> { Intent n = null; if(current_conf.type == PlcType.LIQUID) { n = new Intent(this, PlcLiquidActivity.class); } else if(current_conf.type == PlcType.PILLS) { n = new Intent(this, PlcPillsActivity.class); } else finish(); n.putExtras(intent); n.putExtra("plc_id", current_conf.id); startActivity(n); }) .create() .show(); } break; } } public void updateList(){ binding = DataBindingUtil.setContentView(this, R.layout.activity_plc_management); ArrayList<PlcConf> confs = new ArrayList<>(db.plcConfDAO().getAllConfs()); PlcConfAdapter adapter = new PlcConfAdapter(confs); binding.confList.setAdapter(adapter); binding.setIsListmpty(confs.isEmpty()); binding.setUser(current_user); } public void deleteElement(int id) { db.plcConfDAO().deleteConfById(id); updateList(); } public PlcConf getPlcConf(int id) { return db.plcConfDAO().getConfById(id); } }
[ "nicolas.jeuniaux.pro@hotmail.com" ]
nicolas.jeuniaux.pro@hotmail.com
4c5136297aaa1aa005af1eb79a14349a91d25818
033340b3fa6b702ab9d74d049d47a26dd145f33c
/src/main/java/ua/jsoft/planner/service/impl/LocationServiceImpl.java
f6ae1ab0a0c0840d6f151425beff9bfefd0c1009
[]
no_license
BulkSecurityGeneratorProject/PlannerJ
d86e1c1fed89497b23a7fa869e1c6d5602bce884
c3fc89ef628083dbc7f4c7c24ade8f90ce74c1b2
refs/heads/master
2022-12-17T00:53:51.574320
2019-05-06T14:27:47
2019-05-06T14:27:47
296,710,261
0
0
null
2020-09-18T19:17:37
2020-09-18T19:17:36
null
UTF-8
Java
false
false
3,021
java
package ua.jsoft.planner.service.impl; import ua.jsoft.planner.service.LocationService; import ua.jsoft.planner.domain.Location; import ua.jsoft.planner.repository.LocationRepository; import ua.jsoft.planner.repository.search.LocationSearchRepository; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.List; import java.util.Optional; import java.util.stream.Collectors; import java.util.stream.StreamSupport; import static org.elasticsearch.index.query.QueryBuilders.*; /** * Service Implementation for managing Location. */ @Service @Transactional public class LocationServiceImpl implements LocationService { private final Logger log = LoggerFactory.getLogger(LocationServiceImpl.class); private final LocationRepository locationRepository; private final LocationSearchRepository locationSearchRepository; public LocationServiceImpl(LocationRepository locationRepository, LocationSearchRepository locationSearchRepository) { this.locationRepository = locationRepository; this.locationSearchRepository = locationSearchRepository; } /** * Save a location. * * @param location the entity to save * @return the persisted entity */ @Override public Location save(Location location) { log.debug("Request to save Location : {}", location); Location result = locationRepository.save(location); locationSearchRepository.save(result); return result; } /** * Get all the locations. * * @return the list of entities */ @Override @Transactional(readOnly = true) public List<Location> findAll() { log.debug("Request to get all Locations"); return locationRepository.findAll(); } /** * Get one location by id. * * @param id the id of the entity * @return the entity */ @Override @Transactional(readOnly = true) public Optional<Location> findOne(Long id) { log.debug("Request to get Location : {}", id); return locationRepository.findById(id); } /** * Delete the location by id. * * @param id the id of the entity */ @Override public void delete(Long id) { log.debug("Request to delete Location : {}", id); locationRepository.deleteById(id); locationSearchRepository.deleteById(id); } /** * Search for the location corresponding to the query. * * @param query the query of the search * @return the list of entities */ @Override @Transactional(readOnly = true) public List<Location> search(String query) { log.debug("Request to search Locations for query {}", query); return StreamSupport .stream(locationSearchRepository.search(queryStringQuery(query)).spliterator(), false) .collect(Collectors.toList()); } }
[ "503292@ukr.net" ]
503292@ukr.net
ce4fd131aefb33f2856310428ac0a48b5faabf47
a01b7f2ce3e03a5076dbae5eaf6f5edd570a9fdb
/app/src/main/java/com/wd/master_of_arts_app/preanter/MyPreanter.java
e74265ab83b096a3a3ebdc20a3c7e8a7c0eba616
[]
no_license
s-swh/master_of_-arts_-app
e4a4af1b2508e86a7ac021645e8d88cdeb914318
642a20884c8d953ceb2079eee55344d38aa75a54
refs/heads/master
2023-02-21T15:15:46.153333
2021-01-26T01:42:14
2021-01-26T01:42:14
332,939,316
0
0
null
null
null
null
UTF-8
Java
false
false
1,175
java
package com.wd.master_of_arts_app.preanter; import com.wd.master_of_arts_app.base.BasePreantert; import com.wd.master_of_arts_app.base.IBaseView; import com.wd.master_of_arts_app.bean.SignOut; import com.wd.master_of_arts_app.contreater.MyContreater; import com.wd.master_of_arts_app.model.MyModel; /** * @author 时文豪 * @description: 我的资料Preanter * @date :2020/12/19 11:08 */ public class MyPreanter extends BasePreantert implements MyContreater.IPreanter { private MyModel myModel; public MyPreanter(IBaseView iBaseView) { super(iBaseView); } @Override protected void initModer() { myModel = new MyModel(); } @Override public void SignOutSuccess(String token) { myModel.SignOutSuccess(token, new MyContreater.IModel.SignOutCoallack() { @Override public void OnSignOut(SignOut signOut) { IBaseView iBaseView = getView(); if(iBaseView instanceof MyContreater.IView){ MyContreater.IView view= (MyContreater.IView) iBaseView; view.OnSignOut(signOut); } } }); } }
[ "1773462334@qq.com" ]
1773462334@qq.com
c5047e5adb0823eabfca42f6c208aa40d4ba0404
7ce33ef6bb965bd028abe7655cd093826f85f523
/src/main/java/com/capgemini/bank/bean/Account.java
4d03070aa9e059be26a007b86f7e9e386c789e5f
[]
no_license
abhi15197/com.capgemini.bank
3221dafd1bda4334048968cda66ab5d02fcde986
c936010a485eff21685c7562a6febd220cbb538e
refs/heads/master
2022-04-06T01:09:20.312624
2020-02-21T07:46:42
2020-02-21T07:46:42
241,532,398
0
0
null
null
null
null
UTF-8
Java
false
false
1,064
java
package com.capgemini.bank.bean; import java.util.Date; public class Account { private String accountnumber; private String firstname; private String lastname; private double balance; private Date lastPassbookUpdateDate ; public Account(String accountnumber, String firstname, String lastname, double balance, Date lastPassbookUpdateDate) { super(); this.accountnumber = accountnumber; this.firstname = firstname; this.lastname = lastname; this.balance = balance; this.lastPassbookUpdateDate = lastPassbookUpdateDate; } public String getAccountNumber() { return accountnumber; } public String getFirstName() { return firstname; } public String getLastName() { return lastname; } public double getBalance() { return balance; } public void setBalance(double balance) { this.balance = balance; } public Date getLastPassbookUpdateDate() { return lastPassbookUpdateDate; } public void setLastPassbookUpdateDate(Date lastPassbookUpdateDate) { this.lastPassbookUpdateDate = lastPassbookUpdateDate; } }
[ "mishraabhi.sdr@gmail.com" ]
mishraabhi.sdr@gmail.com
648cb5fa797b4507499af8049f565b03f4b7b1e3
0524777cdb194cca1939af69b63f9be6fcb7c393
/rest/src/main/java/com/zoomulus/weaver/rest/RestServer.java
16bd5edf04c0d4d64f12e846f3961cd1eb438b97
[ "MIT" ]
permissive
zoomulus/weaver
25bfde6a904ac832d077b872c98023ae778096d7
b0ffa0bd6733e87bc4acb5cdfba1035482ba1af3
refs/heads/master
2016-08-05T06:51:15.227766
2015-07-31T14:49:15
2015-07-31T14:49:15
25,735,210
1
1
null
2015-03-13T13:32:21
2014-10-25T15:05:19
Java
UTF-8
Java
false
false
2,344
java
package com.zoomulus.weaver.rest; import io.netty.bootstrap.ServerBootstrap; import io.netty.channel.ChannelFuture; import io.netty.channel.ChannelOption; import io.netty.channel.EventLoopGroup; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.nio.NioServerSocketChannel; import java.util.List; import com.google.common.collect.Lists; import com.zoomulus.weaver.core.connector.ServerConnector; public class RestServer { private final List<ServerConnector> connectors; private List<ChannelFuture> channels = Lists.newArrayList(); private final EventLoopGroup masterGroup; private final EventLoopGroup slaveGroup; public RestServer(final ServerConnector connector) { this(Lists.newArrayList(connector)); } public RestServer(final List<ServerConnector> connectors) { this.connectors = connectors; masterGroup = new NioEventLoopGroup(); slaveGroup = new NioEventLoopGroup(); } public void start() { Runtime.getRuntime().addShutdownHook(new Thread(){ @Override public void run() { shutdown(); } }); try { // for each connector, build a bootstrap, start and save the ChannelFuture for (final ServerConnector connector : connectors) { final ServerBootstrap bootstrap = new ServerBootstrap() .group(masterGroup, slaveGroup) .channel(NioServerSocketChannel.class) .childHandler(connector.getChannelInitializer()) .option(ChannelOption.SO_BACKLOG, 128) .childOption(ChannelOption.SO_KEEPALIVE, true); channels.add(bootstrap.bind(connector.getPort()).sync()); } } catch (final InterruptedException e) { } } public void shutdown() { slaveGroup.shutdownGracefully(); masterGroup.shutdownGracefully(); // Perform the magic foo for (final ChannelFuture channel : channels) { try { channel.channel().closeFuture().sync(); } catch (InterruptedException e) { } } } }
[ "matt@mvryan.org" ]
matt@mvryan.org
b76b642517eb8cd7de63fa09cf8e32e27e52438a
1c19a269d6401625dbee561aa54d3266e9d4563a
/app/src/main/java/com/vitraining/odoosales/Partner.java
fd85033655f50a18b99cac97e2a52a1fad368fc7
[]
no_license
Fitranugraha/OdooSales-Training
060ecf0556babb90185479d941b955ad764a33b7
3ace50a9a69e7bc06c18436063bbf72ddd7c01fe
refs/heads/master
2020-05-30T14:21:08.530861
2019-05-30T03:20:45
2019-05-30T03:20:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,725
java
package com.vitraining.odoosales; import java.util.Map; public class Partner { private Integer id; private String name; private String street; private String street2; private String city; private String state; private String country; private String email; private String mobile; private Integer stateId; private Integer countryId; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getStreet() { return street; } public void setStreet(String street) { this.street = street; } public String getStreet2() { return street2; } public void setStreet2(String street2) { this.street2 = street2; } public String getCity() { return city; } public void setCity(String city) { this.city = city; } public String getState() { return state; } public void setState(String state) { this.state = state; } public String getCountry() { return country; } public void setCountry(String country) { this.country = country; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getMobile() { return mobile; } public void setMobile(String mobile) { this.mobile = mobile; } public Integer getStateId() { return stateId; } public void setStateId(Integer stateId) { this.stateId = stateId; } public Integer getCountryId() { return countryId; } public void setCountryId(Integer countryId) { this.countryId = countryId; } public void setData(Map<String, Object> data){ setId( (Integer) data.get("id") ); setName( OdooUtility.getString(data, "name") ); setStreet( OdooUtility.getString(data, "street") ); setStreet2( OdooUtility.getString(data, "street2") ); setCity( OdooUtility.getString(data, "city") ); setMobile( OdooUtility.getString(data, "mobile") ); setEmail( OdooUtility.getString(data, "email") ); //country, state : Many2one [12, "Indonesia"] M2Ofield country_id = OdooUtility.getMany2One(data, "country_id"); setCountry(country_id.value); setCountryId(country_id.id); M2Ofield state_id = OdooUtility.getMany2One(data, "state_id"); setState(state_id.value); setStateId(state_id.id); } }
[ "akhmad.daniel@gmail.com" ]
akhmad.daniel@gmail.com
245a019d0e1f60935897e0258cc6795230813f78
00a53b33c6e73ce1a577d0cd9b64664ec52a134c
/src/main/java/group/LC4_swe/MaxAreaOfIsland.java
25a00ce65ad153c3b94426e6c87fa2bff619332f
[]
no_license
abprash/LC
83dcf5aa07cc1f14e0a7bca88fe8d223a7fb699d
7ff60311475e36e075748360e8f900cbfe86f03f
refs/heads/master
2021-01-19T13:04:19.219954
2019-01-06T02:25:27
2019-01-06T02:25:27
100,820,130
1
0
null
null
null
null
UTF-8
Java
false
false
1,618
java
package group.LC4_swe; //https://leetcode.com/problems/max-area-of-island/description/ public class MaxAreaOfIsland { public int maxAreaOfIsland(int[][] grid) { //validate the input //ensure the grid is not null or empty if(grid == null || grid.length == 0 || grid[0].length == 0) return 0; int maxArea = 0; //now we start a dfs whenever we encounter a 1 //have a separate visited grid (boolean) to keep track of where we have already visited. //time complexity and space complexity would be - O(N) boolean[][] visited = new boolean[grid.length][grid[0].length]; for(int i=0; i<grid.length; i++){ for(int j=0; j<grid[0].length; j++){ if(!visited[i][j] && grid[i][j] == 1){ int area = helper(grid, i, j, visited); //update the max area value maxArea = Math.max(area, maxArea); //we just visited this point, mark it visited[i][j] = true; } } } return maxArea; } public int helper(int[][] grid, int i, int j, boolean[][] visited){ if(i > grid.length-1 || j>grid[0].length-1 || i<0 || j<0 || visited[i][j] || grid[i][j] == 0) return 0; //mark the current point as visited visited[i][j] = true; //add 1 and spread in all 4 directions and keep adding. return 1 + helper(grid, i+1, j, visited) + helper(grid, i, j-1, visited) + helper(grid, i, j+1, visited) + helper(grid, i-1, j, visited); } }
[ "panuradh@buffalo.edu" ]
panuradh@buffalo.edu
36fb9dba1559f3888521273d640c6178accd7af3
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/serge-rider--dbeaver/fdbb5ff2b1cc3ea78e909b5ff07038486dd8cd7a/before/JDBCDataSourceInfo.java
8ead96f6b0a88cdb62fa21752e270dab3abefa95
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
9,096
java
/* * DBeaver - Universal Database Manager * Copyright (C) 2010-2015 Serge Rieder (serge@jkiss.org) * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License (version 2) * as published by the Free Software Foundation. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ package org.jkiss.dbeaver.model.impl.jdbc; import org.jkiss.dbeaver.Log; import org.jkiss.dbeaver.model.DBPDataSourceInfo; import org.jkiss.dbeaver.model.DBPTransactionIsolation; import org.jkiss.dbeaver.model.exec.jdbc.JDBCDatabaseMetaData; import org.jkiss.dbeaver.model.messages.ModelMessages; import org.jkiss.dbeaver.model.struct.DBSDataSourceContainer; import org.jkiss.utils.CommonUtils; import org.osgi.framework.Version; import java.util.ArrayList; import java.util.Collection; import java.util.List; /** * JDBCDataSourceInfo */ public class JDBCDataSourceInfo implements DBPDataSourceInfo { static final Log log = Log.getLog(JDBCDataSourceInfo.class); public static final String TERM_SCHEMA = ModelMessages.model_jdbc_Schema; public static final String TERM_PROCEDURE = ModelMessages.model_jdbc_Procedure; public static final String TERM_CATALOG = ModelMessages.model_jdbc_Database; private boolean readOnly; private String databaseProductName; private String databaseProductVersion; private String driverName; private String driverVersion; private Version databaseVersion; private String schemaTerm; private String procedureTerm; private String catalogTerm; private boolean supportsTransactions; private List<DBPTransactionIsolation> supportedIsolations; private boolean supportsReferences = true; private boolean supportsIndexes = true; private boolean supportsStoredCode = true; private boolean supportsBatchUpdates = false; private boolean supportsScroll; public JDBCDataSourceInfo(DBSDataSourceContainer container) { this.readOnly = false; this.databaseProductName = "?"; //$NON-NLS-1$ this.databaseProductVersion = "?"; //$NON-NLS-1$ this.driverName = container.getDriver().getName(); //$NON-NLS-1$ this.driverVersion = "?"; //$NON-NLS-1$ this.databaseVersion = new Version(0, 0, 0); this.schemaTerm = TERM_SCHEMA; this.procedureTerm = TERM_PROCEDURE; this.catalogTerm = TERM_CATALOG; this.supportsBatchUpdates = false; this.supportsTransactions = false; this.supportedIsolations = new ArrayList<>(); this.supportedIsolations.add(0, JDBCTransactionIsolation.NONE); this.supportsScroll = true; } public JDBCDataSourceInfo(JDBCDatabaseMetaData metaData) { try { this.readOnly = metaData.isReadOnly(); } catch (Throwable e) { log.debug(e.getMessage()); this.readOnly = false; } try { this.databaseProductName = metaData.getDatabaseProductName(); } catch (Throwable e) { log.debug(e.getMessage()); this.databaseProductName = "?"; //$NON-NLS-1$ } try { this.databaseProductVersion = metaData.getDatabaseProductVersion(); } catch (Throwable e) { log.debug(e.getMessage()); this.databaseProductVersion = "?"; //$NON-NLS-1$ } try { this.driverName = metaData.getDriverName(); } catch (Throwable e) { log.debug(e.getMessage()); this.driverName = "?"; //$NON-NLS-1$ } try { this.driverVersion = metaData.getDriverVersion(); } catch (Throwable e) { log.debug(e.getMessage()); this.driverVersion = "?"; //$NON-NLS-1$ } try { databaseVersion = new Version(metaData.getDatabaseMajorVersion(), metaData.getDatabaseMinorVersion(), 0); } catch (Throwable e) { try { databaseVersion = new Version(databaseProductVersion); } catch (IllegalArgumentException e1) { log.debug("Can't determine database version. Use default"); databaseVersion = new Version(0, 0, 0); } } try { this.schemaTerm = makeTermString(metaData.getSchemaTerm(), TERM_SCHEMA); } catch (Throwable e) { log.debug(e.getMessage()); this.schemaTerm = TERM_SCHEMA; } try { this.procedureTerm = makeTermString(metaData.getProcedureTerm(), TERM_PROCEDURE); } catch (Throwable e) { log.debug(e.getMessage()); this.procedureTerm = TERM_PROCEDURE; } try { this.catalogTerm = makeTermString(metaData.getCatalogTerm(), TERM_CATALOG); } catch (Throwable e) { log.debug(e.getMessage()); this.catalogTerm = TERM_CATALOG; } try { supportsBatchUpdates = metaData.supportsBatchUpdates(); } catch (Throwable e) { log.debug(e); } try { supportsTransactions = metaData.supportsTransactions(); } catch (Throwable e) { log.debug(e.getMessage()); supportsTransactions = true; } supportedIsolations = new ArrayList<>(); try { for (JDBCTransactionIsolation txi : JDBCTransactionIsolation.values()) { if (metaData.supportsTransactionIsolationLevel(txi.getCode())) { supportedIsolations.add(txi); } } } catch (Throwable e) { log.debug(e.getMessage()); supportsTransactions = true; } if (!supportedIsolations.contains(JDBCTransactionIsolation.NONE)) { supportedIsolations.add(0, JDBCTransactionIsolation.NONE); } supportsScroll = true; } private String makeTermString(String term, String defTerm) { return CommonUtils.isEmpty(term) ? defTerm : CommonUtils.capitalizeWord(term.toLowerCase()); } @Override public boolean isReadOnlyData() { return readOnly; } @Override public boolean isReadOnlyMetaData() { return readOnly; } @Override public String getDatabaseProductName() { return databaseProductName; } @Override public String getDatabaseProductVersion() { return databaseProductVersion; } @Override public Version getDatabaseVersion() { return databaseVersion; } @Override public String getDriverName() { return driverName; } @Override public String getDriverVersion() { return driverVersion; } @Override public String getSchemaTerm() { return schemaTerm; } @Override public String getProcedureTerm() { return procedureTerm; } @Override public String getCatalogTerm() { return catalogTerm; } @Override public boolean supportsTransactions() { return supportsTransactions; } @Override public boolean supportsSavepoints() { return false; } @Override public boolean supportsReferentialIntegrity() { return supportsReferences; } public void setSupportsReferences(boolean supportsReferences) { this.supportsReferences = supportsReferences; } @Override public boolean supportsIndexes() { return supportsIndexes; } public void setSupportsIndexes(boolean supportsIndexes) { this.supportsIndexes = supportsIndexes; } @Override public boolean supportsStoredCode() { return supportsStoredCode; } public void setSupportsStoredCode(boolean supportsStoredCode) { this.supportsStoredCode = supportsStoredCode; } @Override public Collection<DBPTransactionIsolation> getSupportedTransactionsIsolation() { return supportedIsolations; } @Override public boolean supportsResultSetLimit() { return true; } @Override public boolean supportsResultSetScroll() { return supportsScroll; } @Override public boolean isDynamicMetadata() { return false; } @Override public boolean supportsMultipleResults() { return false; } public void setSupportsResultSetScroll(boolean supportsScroll) { this.supportsScroll = supportsScroll; } @Override public boolean supportsBatchUpdates() { return supportsBatchUpdates; } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
65cae12a49eb89ab41713de7673d199915d168b2
6abdcbd36cb2e3188e3a93ec214f9e29ac3d4b4d
/service/src/main/java/com/wan/synthesize/service/IBillService.java
b7d0f02cbf28acc176d772599133956e6d6896d5
[]
no_license
wanzhixiang/synthesize
c2999db9ea1fb681689bdeb9de569eff3f3f710a
0402d0223f022999fc791c458b42ec4eb5c295b7
refs/heads/wanzhixiang-devp
2021-01-12T17:09:36.821571
2017-03-27T12:20:42
2017-03-27T12:20:42
71,520,567
1
0
null
2017-05-11T11:50:48
2016-10-21T02:03:14
CSS
UTF-8
Java
false
false
225
java
package com.wan.synthesize.service; import com.wan.synthesize.domain.Bill; /** * Created by wzx on 2017/2/9. */ public interface IBillService { /** * 新增 * @param bill */ void add(Bill bill); }
[ "w333sd1125" ]
w333sd1125
83b2099d8711aebf9ed30022889a39b79f35d7e6
9a173af8da01bd2b2d1ad07055216d76a3608cda
/Gradle-Spring-Hibernate-example-master/src/main/java/example/controllers/ExampleController.java
17586a6eefeb47d2f6940cde222dee897522c840
[]
no_license
sanek646/Gradle-Spring-Hibernate-example-master
b1093184be3f3ff0a0408f6e7df362dc9516460c
d5537e7eb3e4c6f57bbde5a5c330d32cc8be4674
refs/heads/master
2023-08-28T15:37:14.489287
2021-09-17T11:32:26
2021-09-17T11:32:26
407,516,442
0
0
null
null
null
null
UTF-8
Java
false
false
2,072
java
package example.controllers; import com.google.gson.Gson; import example.dao.ExampleDAO; import example.objects.ExampleObject; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.MediaType; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import java.util.List; @Controller @RequestMapping("/example") public class ExampleController { @Autowired private ExampleDAO database; @RequestMapping(value = "/get", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) @ResponseBody public String get() { System.out.println("Called get"); List<ExampleObject> list = database.get(); System.out.println("Loaded |" + list + "|"); String response = new Gson().toJson(database.get()); System.out.println("Returning |" + response + "|"); return response; } @RequestMapping(value = "/get/{id}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) @ResponseBody public String get(@PathVariable String id) { System.out.println("Getting |" + id + "|"); ExampleObject object = database.get(id); System.out.println("Loaded |" + object + "|"); String response = new Gson().toJson(object); System.out.println("Returning |" + response + "|"); return response; } @RequestMapping(value = "/add/{name}", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) @ResponseBody public String add(@PathVariable String name) { System.out.println("Received |" + name + "|"); ExampleObject object = new ExampleObject(); object.setName(name); System.out.println("Adding |" + object + "|"); database.add(object); System.out.println("Added |" + object + "|"); String response = new Gson().toJson(object); System.out.println("Returning |" + response + "|"); return response; } }
[ "646sanek@rambler.ru" ]
646sanek@rambler.ru
16fb32c298d1ae33c9544391056bce3893aa51c9
67d1fd9f1e7ac96b36783cad1ee8b4b2a0f63dd8
/第一阶段/第三模块-SpringMVC/code/spring-data-jpa/src/main/java/com/lagou/edu/service/impl/ResumeService.java
716f9319c0f634d7bc5714d9781ad54fdfbb58d1
[]
no_license
codeChengWenY/one_homework
a789f1afb8f511d2f2c6ead64ff8f51e36230634
efa654d87d37a28935ba46cf685c2382b31619fe
refs/heads/master
2023-08-23T22:39:26.373016
2021-10-19T09:19:23
2021-10-19T09:19:23
373,065,200
0
1
null
null
null
null
UTF-8
Java
false
false
973
java
package com.lagou.edu.service.impl; import com.lagou.edu.dao.ResumeDao; import com.lagou.edu.pojo.Resume; import com.lagou.edu.service.IResumeService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; import java.util.Optional; /** * @ClassName ResumeService * @Description: * @Author CoderCheng * @Date 2020-09-08 09:38 * @Version V1.0 **/ @Service public class ResumeService implements IResumeService { @Autowired private ResumeDao resumeDao; @Override public Resume findone(Long id) { Optional<Resume> resume = resumeDao.findById(id); return resume.get(); } @Override public List<Resume> findAll() { return resumeDao.findAll(); } @Override public void upadate(Resume resume) { resumeDao.save(resume); } @Override public void del(Resume resume) { resumeDao.delete(resume); } }
[ "1042732167@qq.com" ]
1042732167@qq.com
df82fb560f81a26b1ef3ac306d8be0a7c5acb1be
05be6641c46e9327f19abeaed602e14b81437850
/src/main/java/com/sgic/library/model/Classification.java
15a48397b765341d32e9f7eebc3edd4d7a21a538
[]
no_license
Thuviyan/SpringMVCProject
7e660eddb7db725499ea2165202d515b559171d9
bad7d681f5022eafe84edaedddb103dde03359f8
refs/heads/master
2020-05-25T04:57:00.384680
2019-05-22T10:30:55
2019-05-22T10:30:55
187,638,992
0
0
null
null
null
null
UTF-8
Java
false
false
856
java
package com.sgic.library.model; import javax.persistence.Id; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Table; //entity -> for table creating @Entity @Table(name="classification") public class Classification { /* variable name must be camelCase */ // id -> primary key @Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Column(name="id") private int id; @Column(name="classification_name") private String classificationName; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getClassificationName() { return classificationName; } public void setClassificationName(String classificationName) { this.classificationName = classificationName; } }
[ "thuviyan@gmail.com" ]
thuviyan@gmail.com
93fb0ca87e833766e57453c90e9bad7d8fe5d0c3
b140652ae6c65c5b17bef72b8c0a5e41e0dee13c
/.svn/pristine/93/93fb0ca87e833766e57453c90e9bad7d8fe5d0c3.svn-base
6c6bbbecc9f5db77cfb37d58b5232b1603e5ee3e
[]
no_license
2223512468/TerryJaHome
7531a87eede5e9104062d2fe138fd5bdce17ec42
01c17bc8f00378cdaf6b460b3183c03aa18180fb
refs/heads/master
2020-03-08T03:15:26.537342
2018-04-03T09:47:50
2018-04-03T09:47:50
127,885,495
0
0
null
null
null
null
UTF-8
Java
false
false
3,815
package com.jajahome.widget.recyclerview; import android.content.Context; import android.support.v7.widget.RecyclerView; import android.view.View; /** * Created by cundong on 2015/11/9. * * 分页展示数据时,RecyclerView的FooterView State 操作工具类 * * RecyclerView一共有几种State:Normal/Loading/Error/TheEnd */ public class RecyclerViewStateUtils { /** * 设置headerAndFooterAdapter的FooterView State * * @param instance context * @param recyclerView recyclerView * @param pageSize 分页展示时,recyclerView每一页的数量 * @param state FooterView State * @param errorListener FooterView处于Error状态时的点击事件 */ public static boolean setFooterViewState(Context instance, RecyclerView recyclerView, int pageSize, LoadingFooter.State state, View.OnClickListener errorListener) { if(instance==null ) { return false; } RecyclerView.Adapter outerAdapter = recyclerView.getAdapter(); if (outerAdapter == null || !(outerAdapter instanceof HeaderAndFooterRecyclerViewAdapter)) { return false; } HeaderAndFooterRecyclerViewAdapter headerAndFooterAdapter = (HeaderAndFooterRecyclerViewAdapter) outerAdapter; //只有一页的时候,就别加什么FooterView了 if (headerAndFooterAdapter.getInnerAdapter().getItemCount() < pageSize) { return false; } LoadingFooter footerView; //已经有footerView了 if (headerAndFooterAdapter.getFooterViewsCount() > 0) { footerView = (LoadingFooter) headerAndFooterAdapter.getFooterView(); footerView.setState(state); if (state == LoadingFooter.State.NetWorkError) { footerView.setOnClickListener(errorListener); } recyclerView.scrollToPosition(headerAndFooterAdapter.getItemCount() - 1); return true; } else { footerView = new LoadingFooter(instance); footerView.setState(state); if (state == LoadingFooter.State.NetWorkError) { footerView.setOnClickListener(errorListener); } headerAndFooterAdapter.addFooterView(footerView); recyclerView.scrollToPosition(headerAndFooterAdapter.getItemCount() - 1); return true; } } /** * 获取当前RecyclerView.FooterView的状态 * * @param recyclerView */ public static LoadingFooter.State getFooterViewState(RecyclerView recyclerView) { RecyclerView.Adapter outerAdapter = recyclerView.getAdapter(); if (outerAdapter != null && outerAdapter instanceof HeaderAndFooterRecyclerViewAdapter) { if (((HeaderAndFooterRecyclerViewAdapter) outerAdapter).getFooterViewsCount() > 0) { LoadingFooter footerView = (LoadingFooter) ((HeaderAndFooterRecyclerViewAdapter) outerAdapter).getFooterView(); return footerView.getState(); } } return LoadingFooter.State.Normal; } /** * 设置当前RecyclerView.FooterView的状态 * * @param recyclerView * @param state */ public static void setFooterViewState(RecyclerView recyclerView, LoadingFooter.State state) { RecyclerView.Adapter outerAdapter = recyclerView.getAdapter(); if (outerAdapter != null && outerAdapter instanceof HeaderAndFooterRecyclerViewAdapter) { if (((HeaderAndFooterRecyclerViewAdapter) outerAdapter).getFooterViewsCount() > 0) { LoadingFooter footerView = (LoadingFooter) ((HeaderAndFooterRecyclerViewAdapter) outerAdapter).getFooterView(); footerView.setState(state); } } } }
[ "2223512468@qq.com" ]
2223512468@qq.com
79e0d392cf98516d7207fab3f22fbcb108d7cc4f
93a4d1b3befb832db6377bb559510ba9b6f226e9
/Practice/Euler/37/Main.java
4860441ff434edc78ea1a4fe64d3ef86d0d99c59
[]
no_license
rjjfdn/Comprog-Stuffs
7176c6ac01a777d6d753268bbee6189d6eaa56e2
4aabb183f66976ff14aa4d84df0f85c0540c0caa
refs/heads/master
2021-01-06T20:41:01.399552
2014-06-11T10:20:02
2014-06-11T10:20:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
872
java
import java.util.*; public class Main { public static void main(String[] args) { Vector<Integer> primes = new Vector<Integer>(); boolean[] isNPrime = new boolean[10000010]; isNPrime[0] = true; isNPrime[1] = true; for(int i=2; i<10000010; i++) if(!isNPrime[i]) { primes.addElement(i); for(int j=i+i; j<10000010; j+=i) isNPrime[j] = true; } int sum = 0; for(int q=0; q<primes.size(); q++) { int num = primes.elementAt(q); if(num < 10) continue; boolean check = false; for(int i=1; i<8; i++) { if(num < Math.pow(10, i)) break; if(isNPrime[num%(int)Math.pow(10,i)] || isNPrime[num/(int)Math.pow(10,i)]) { check = true; break; } } if(!check) sum += num; } System.out.println(sum); } }
[ "hu_u21@yahoo.com.ph" ]
hu_u21@yahoo.com.ph
9c9ff0becd873663dc35016d54b334928bd9f4c1
2e70947e61a4b90c1c677467b14a3f9509214b4c
/Let Me Eat/app/src/test/java/com/example/letmeeat/ExampleUnitTest.java
43cfcfbd0993b366c7d2bd4686cadfc8383b23fa
[ "MIT" ]
permissive
joanking3000/Let-Me-Eat-APP
b374190f0879b082e232d14c1fd7837887bf50d4
871014caed48c7ee4657588317eaef07d984dd78
refs/heads/main
2023-05-08T02:01:18.891857
2021-06-04T01:01:36
2021-06-04T01:01:36
372,304,047
0
0
null
null
null
null
UTF-8
Java
false
false
209
java
package com.example.letmeeat; import org.junit.Test; import static org.junit.Assert.*; public class ExampleUnitTest { @Test public void addition_isCorrect() { assertEquals(4, 2 + 2); } }
[ "joanking3000@gmail.com" ]
joanking3000@gmail.com
d9d02e1d093c06436ef039aaec790c3808bc7a15
8561e5bf0f327e5fa4c171e0352ad0d39a4fd0be
/src/test/java/org/underscore/UnderscoreShould.java
5ac97a251af682e606eb2d5e9022c3eef79ced77
[ "MIT" ]
permissive
seymourpoler/UnderscoreInJava
0b73acef698ccad6746c1992da721c3c37d2dc58
05d18af22cd5a428adb45d078fc87e8c9a243fd3
refs/heads/master
2021-05-26T18:05:52.855969
2020-04-09T15:14:02
2020-04-09T15:14:02
254,145,772
0
0
MIT
2020-10-13T21:01:43
2020-04-08T16:44:23
Java
UTF-8
Java
false
false
819
java
package org.underscore; import org.junit.Assert; import org.junit.Test; import java.util.Arrays; import java.util.List; import java.util.function.Function; import java.util.function.Predicate; public class UnderscoreShould { @Test public void apply_chains_of_functions(){ Function<Integer, Integer> addOne = x -> x + 1; Function<Integer, Boolean> dividiedByTwo = x -> x %2 == 0; Predicate<Integer> moreThanTwo = x -> x > 2; List<Integer> numbers = Arrays.asList(1,2,3,4,5); List<Integer> result = new Underscore(numbers) .map(addOne) .filter(dividiedByTwo) .filter(moreThanTwo) .result(); Assert.assertTrue(result.get(0).equals(2)); Assert.assertTrue(result.get(1).equals(4)); } }
[ "lgabriel@idealista.com" ]
lgabriel@idealista.com
164b1db5f54a07e7ef97b8f3de5da268f8ad29d3
aa1dcdb1137d69c70a97744a33a6e21d2e880791
/src/main/java/com/bridgelabz/workshop/controller/UseRegistrationController.java
46dc616fb40fdbadaaaf33aad9970fe33705f177
[]
no_license
RuchirDixit/UserRegistration_WithSpring
39829c240a420cc78d669edd0ea060ff3510ddf0
eebf0d86d7b4e4e6e842c0954cc111713ce73682
refs/heads/master
2023-05-10T21:44:16.251197
2021-05-26T05:03:00
2021-05-26T05:03:00
370,909,978
0
0
null
null
null
null
UTF-8
Java
false
false
2,444
java
package com.bridgelabz.workshop.controller; import java.util.List; import javax.validation.Valid; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import com.bridgelabz.workshop.dto.ResponseDTO; import com.bridgelabz.workshop.dto.UserDTO; import com.bridgelabz.workshop.model.UserData; import com.bridgelabz.workshop.services.IUserRegistrationService; @RestController @RequestMapping("/user") public class UseRegistrationController { @Autowired public IUserRegistrationService userRegistrationService; @GetMapping("/getUsers") public ResponseEntity<ResponseDTO> getAllUsers(){ List<UserData> userList = userRegistrationService.getAllUsers(); ResponseDTO responseDTO = new ResponseDTO("Get all users", userList); return new ResponseEntity<ResponseDTO>(responseDTO,HttpStatus.OK); } @PostMapping("/createUser") public ResponseEntity<ResponseDTO> addNewUsers(@Valid @RequestBody UserDTO dto){ UserData userData = userRegistrationService.addNewUser(dto); ResponseDTO responseDTO = new ResponseDTO("New User Added", userData); return new ResponseEntity<ResponseDTO>(responseDTO,HttpStatus.OK); } @PutMapping("/updateUser") public ResponseEntity<ResponseDTO> updateUser(@Valid @RequestParam("id") int id,@RequestBody UserDTO dto){ UserData userData = userRegistrationService.updateUser(id,dto); ResponseDTO responseDTO = new ResponseDTO("User Updated", userData); return new ResponseEntity<ResponseDTO>(responseDTO,HttpStatus.OK); } @DeleteMapping("/deleteUser/{id}") public ResponseEntity<ResponseDTO> deleteUser(@PathVariable int id){ userRegistrationService.deleteUserById(id); ResponseDTO responseDTO = new ResponseDTO("User Updated", "User With Id: "+id+" Deleted!"); return new ResponseEntity<ResponseDTO>(responseDTO,HttpStatus.OK); } }
[ "ruchirtd96@gmail.com" ]
ruchirtd96@gmail.com
9979e44924b0e149e65e657bdaf615c3f402c65f
8d348401688e14075ca47e60d27f8dc55bdd6297
/parser/sources/src/parsing/factory/SpecializedParser.java
55cf29256164893192c684ef0d8030cfc20955db
[]
no_license
Hug0Vincent/gutemberg-node
d505e278a7466e0f84515bf0f3ce5832d60cd39b
0705cd62b00baea418f6adc78c15d1993e59910d
refs/heads/master
2020-03-21T14:22:20.703592
2018-04-26T16:12:02
2018-04-26T16:12:02
null
0
0
null
null
null
null
ISO-8859-1
Java
false
false
1,557
java
package parsing.factory; import java.io.File; import java.io.IOException; import java.util.HashMap; import objects.Document; import objects.Page; /** * @author Gutemberg * Cette classe spécifie la structure de chaque parser d'entrée pour une extension données. */ public interface SpecializedParser { /** * Fonction d'entrée pour le parsing d'un fichier * @param file * Le fichier contenant le texte à parser * @param page * La page courante sur laquelle le parser va evoluer * @return ce qui n'a pas été parsé * @throws IOException */ String parse(File file, Page page) throws IOException; /** * Fonction d'entrée pour le parsing d'un string * @param text * Le contenu textuel devant être parsé * @param page * La page courante sur laquelle le parser va evoluer * @return ce qui n'a pas été parsé * @throws IOException */ String parse(String text, Page page) throws IOException; /** * Fonction permettant de récupérer le document correspondant au nom du fichier * @param path * Chemin d'accès au fichier * @param documents * Liste des documents existant * @return Le document correspondant */ Document getDocument(String path, HashMap<String, Document> documents); /** * Fonction permettant de récupérer la page d'un document correspondante au nom du fichier * @param path * Chemin d'accès au fichier * @param document * Document correspondant au fichier * @return La page correspondante */ Page getPage(String path, Document document); }
[ "jordhan.madec@gmail.com" ]
jordhan.madec@gmail.com
cf1716d1e28e4ef1c0f61c8fd5076eab78a69176
d2f479c59bbde8dd55b07e3e78dfd7f1a72f1a1a
/Wipro PRP/src/Fl6.java
b6489a2bb08ef09f97637bb0830acb66c68e4f22
[]
no_license
santhoshkumar143/Wipro-PRP-Day-1-and-Day-2
b4d0454a744b5307187e456cbc11252c7ead66ee
393ba91fc866073b71bc2a9fd8a383f692be82b2
refs/heads/master
2022-11-10T15:12:54.470716
2020-06-25T14:02:13
2020-06-25T14:02:13
272,604,395
0
0
null
null
null
null
UTF-8
Java
false
false
307
java
import java.util.*; class Fl6{ public static void main(String[] args) { int n; Scanner s=new Scanner(System.in); n=s.nextInt(); int i = 1; while(i<=n) { for(int j=1;j<=i;j++) { System.out.print("*"+" "); } System.out.println(" "); i++; } } }
[ "noreply@github.com" ]
santhoshkumar143.noreply@github.com
bb8b4343d8cc8755651377ab563db62c221ca4d4
98cf9894e7d4cb1f2a88bc79ed17c8f9f32075eb
/staffmanagement-model/src/main/java/com/mindtree/staffmanagement/model/entity/Role.java
7f8401e32eee5271f2cb5bd396f59bc4a10d95a4
[ "Apache-2.0" ]
permissive
pankajmahato/StaffManagement
68d250f3f1af14035dc215601d6eaa2e02b22b53
129198257554f103fd81c266404163105e61c2f3
refs/heads/master
2022-12-23T06:50:51.942785
2021-03-16T11:02:56
2021-03-16T11:02:56
59,736,201
0
0
Apache-2.0
2022-12-16T07:49:30
2016-05-26T09:08:09
Java
UTF-8
Java
false
false
117
java
package com.mindtree.staffmanagement.model.entity; public enum Role { ADMINISTRATIVE, EMPLOYEE, SECURITY; }
[ "M1035984@A2MD20778.mindtree.com" ]
M1035984@A2MD20778.mindtree.com
913c750222562e86e117f177601af5f434efd686
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/neo4j/2016/8/SortingTraverserIterator.java
f798b6bc037a1f7ac6a6121c82919a69d82a0ddd
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
3,361
java
/* * Copyright (c) 2002-2016 "Neo Technology," * Network Engine for Objects in Lund AB [http://neotechnology.com] * * This file is part of Neo4j. * * Neo4j 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 org.neo4j.kernel.impl.traversal; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; import java.util.Iterator; import java.util.List; import org.neo4j.graphdb.Path; import org.neo4j.graphdb.Resource; import org.neo4j.graphdb.traversal.BranchState; import org.neo4j.graphdb.traversal.Evaluation; import org.neo4j.graphdb.traversal.TraversalBranch; import org.neo4j.helpers.collection.PrefetchingResourceIterator; class SortingTraverserIterator extends PrefetchingResourceIterator<Path> implements TraverserIterator { private final Comparator<? super Path> sortingStrategy; private final MonoDirectionalTraverserIterator source; private final Resource resource; private Iterator<Path> sortedResultIterator; SortingTraverserIterator( Resource resource, Comparator<? super Path> sortingStrategy, MonoDirectionalTraverserIterator source ) { this.resource = resource; this.sortingStrategy = sortingStrategy; this.source = source; } @Override public int getNumberOfPathsReturned() { return source.getNumberOfPathsReturned(); } @Override public int getNumberOfRelationshipsTraversed() { return source.getNumberOfRelationshipsTraversed(); } @Override public void relationshipTraversed() { source.relationshipTraversed(); } @Override public void unnecessaryRelationshipTraversed() { source.unnecessaryRelationshipTraversed(); } @Override public boolean isUniqueFirst( TraversalBranch branch ) { return source.isUniqueFirst( branch ); } @Override public boolean isUnique( TraversalBranch branch ) { return source.isUnique( branch ); } @Override public Evaluation evaluate( TraversalBranch branch, BranchState state ) { return source.evaluate( branch, state ); } @Override protected Path fetchNextOrNull() { if ( sortedResultIterator == null ) { sortedResultIterator = fetchAndSortResult(); } return sortedResultIterator.hasNext() ? sortedResultIterator.next() : null; } private Iterator<Path> fetchAndSortResult() { List<Path> result = new ArrayList<>(); while ( source.hasNext() ) { result.add( source.next() ); } Collections.sort( result, sortingStrategy ); return result.iterator(); } @Override public void close() { resource.close(); } }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
3eda39f5cec9ceae2aaa7a568fddc05f1517bd1a
dac38549b2ba3e1ef478ad337270f8010a220887
/src/test/java/com/learncamel/routes/process/CamelModifyFileProcessorRouteTest.java
741f3034f34f08537d759aacd1a2d1fc0d2f0665
[]
no_license
AnkitSalian/CamelBoilerPlate_Maven
53fd518b0c2810a49c77a2caff7f72a8f2662b14
f252efa5f85d423a15b503c4423f5438a1dbcb2e
refs/heads/master
2020-04-16T13:12:44.002906
2019-02-07T01:03:46
2019-02-07T01:03:46
165,616,111
1
0
null
null
null
null
UTF-8
Java
false
false
931
java
package com.learncamel.routes.process; import com.learncamel.routes.process.CamelModifyFileProcessorRoute; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.test.junit4.CamelTestSupport; import org.junit.Test; import java.io.File; public class CamelModifyFileProcessorRouteTest extends CamelTestSupport { @Override public RouteBuilder createRouteBuilder(){ return new CamelModifyFileProcessorRoute(); } @Test public void processorTest() throws InterruptedException{ String expectedOutput="1234:Ankit:TCS\n" + "456:Anit:WTW\n"; MockEndpoint mock = getMockEndpoint("mock:output"); mock.expectedBodiesReceived(expectedOutput); Thread.sleep(5000); File file = new File("data/output"); assertTrue(file.isDirectory()); assertMockEndpointsSatisfied(); } }
[ "salian.ankit@tcs.com" ]
salian.ankit@tcs.com
0991fb76f9109b446551443dda8aa50124f387c8
78c37a69a1a0609b9b091b7244d2ac2332124cd5
/src/org/yakoliv/asyncinvoke/tasks/Executor.java
99d55c4ffaa9ed536e675d5ce08260c147edfe4c
[]
no_license
desbocages/yak-async
8dd41c362b9abc16bbbcb7c9330409262659a281
b755f6fef13427fb275f5f4ca1f584c9d7ccd78b
refs/heads/master
2020-04-11T04:38:08.068763
2018-12-20T16:29:32
2018-12-20T16:29:32
161,519,650
2
0
null
2018-12-14T14:55:22
2018-12-12T17:03:37
Java
UTF-8
Java
false
false
3,349
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 org.yakoliv.asyncinvoke.tasks; import java.util.concurrent.ExecutionException; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.SwingWorker; import org.yakoliv.asyncinvoke.events.Callback; import org.yakoliv.asyncinvoke.events.Function; import org.yakoliv.asyncinvoke.pojo.OperationResult; /** * This class is the main class of this library. It is the heart of all * processes. It is the one that makes the asynchronous task possible, creating * and providing the background worker to the application. * @author desbocages */ public class Executor implements IExecutor { private Callback callback = null; public Executor(Callback c) { callback = c; } public Executor() { } /** * This method is used to dynamically generate a swing worker that will be used * to asynchronely perform the task. * @param <T> the type of the result awaited at the end of the process. * @param callable the interface which the operation will be called/executed. * @return An operation result object that will be used by the library to handle * the result of the operation and pass it to the callback class for future use. */ @Override public <T> SwingWorker<OperationResult<T>, Void> executeAsync(Function.Callable callable) { return new SwingWorker<OperationResult<T>, Void>() { @Override protected OperationResult<T> doInBackground() throws Exception { OperationResult<T> result = new OperationResult<>(); try { if (callback != null) { result.setInvokedMethodName(callback.getInvokedMethodName()); callback.doBefore(); } result.setGottenResult((T) callable.call()); } catch (Throwable e) { result.setThrownException(e); } return result; } @Override public void done() { try { if (callback != null) { OperationResult r = get(); if (r != null) { if (r.getThrownException() != null) { callback.setException(r.getThrownException()); } callback.handleResult(r.getGottenResult()); callback.setInvokedMethodName(r.getInvokedMethodName()); } } } catch (InterruptedException ex) { Logger.getLogger(Executor.class.getName()).log(Level.SEVERE, null, ex); } catch (ExecutionException ex) { Logger.getLogger(Executor.class.getName()).log(Level.SEVERE, null, ex); } } }; } /** * @return the callback */ public Callback getCallback() { return callback; } /** * @param callback the callback to set */ public void setCallback(Callback callback) { this.callback = callback; } }
[ "Yale@demo-pc.mshome.net" ]
Yale@demo-pc.mshome.net