blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
132 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
033f334ce9aee0c235c93703235d1120ddd15154
e8f0e2243c751e3b7065cbad11a2d86811a0e6fe
/src/model/Denunciada.java
f1a438dcf1457c1fe264393fc6ba99bc82e2b26d
[]
no_license
gerbof/JBICI
e6f10daaefce61d9109a866ea33b3d5cb7e9f98f
df9668269688b23991ac112067a2bac6ca6eeffc
refs/heads/master
2021-07-11T05:50:51.564037
2017-10-03T00:04:38
2017-10-03T00:04:38
105,597,624
0
0
null
null
null
null
UTF-8
Java
false
false
272
java
package model; import javax.persistence.DiscriminatorValue; import javax.persistence.Entity; @Entity @DiscriminatorValue("Denunciada") public class Denunciada extends EstadoBici { public Denunciada() { } public String getDescripcion(){ return "Denunciada"; } }
[ "gerbof@gmail.com" ]
gerbof@gmail.com
76dfe4737719133bbb05e29a4cb7b98cbce547f7
50a909ed44d3c7017129e4be9f771fbe11d108cc
/Modules/src/Module4/BankSystem.java
55ad78bba855a3b2a56170da89624093612f2cc1
[]
no_license
ViktoriaPav/JavaCore
e29a4b0233a542ce7f2814046cfea81ac5df2f98
b6b5fe6739af26d596653f6e125dc349b8822c6f
refs/heads/master
2020-12-01T19:17:52.569461
2016-11-08T19:34:41
2016-11-08T19:34:41
66,832,235
0
0
null
null
null
null
UTF-8
Java
false
false
244
java
package Module4; public interface BankSystem { void withdrawOfUser(User user, int amount); void fundUser(User user, int amount); void transferMoney(User fromUser, User toUser, int amount); void paySalary(User user); }
[ "vikafire21@gmail.com" ]
vikafire21@gmail.com
8b9473894bea9f8fdb757c00f58fe09cdeee51bd
0869a4d1fb42d3d7e2443ec3acb999e9f7fe10e1
/src/test/java/be/datablend/spark/lab4/Exercise1.java
894dbeb1328def6f855aafda0b94901b6c6651ac
[]
no_license
datablend/sai-spark-workshop-solutions
8e08176517de035a3545ff6ab4d27e7f5a40f33c
e89bd98caa3356505a1df1e68eeed312b9f4f83b
refs/heads/master
2021-01-15T15:16:17.727426
2015-11-15T08:58:34
2015-11-15T08:58:34
45,779,813
0
0
null
null
null
null
UTF-8
Java
false
false
6,474
java
package be.datablend.spark.lab4; import be.datablend.spark.BasicSparkLab; import org.apache.spark.Accumulator; import org.apache.spark.api.java.JavaDoubleRDD; import org.apache.spark.api.java.JavaPairRDD; import org.apache.spark.api.java.JavaRDD; import org.apache.spark.api.java.function.*; import org.apache.spark.broadcast.Broadcast; import org.junit.Assert; import org.junit.Test; import scala.Tuple2; import java.io.File; import java.io.FileNotFoundException; import java.io.Serializable; import java.util.*; /** * Created by dsuvee */ public class Exercise1 extends BasicSparkLab implements Serializable { @Test // Keep the parsing time as a side metric while processing the coffee and tea words public void parsingTimeWhileProcessingCoffeeOrTeaWords() { // Import data from the review file JavaRDD<String> reviewLines = sc.textFile(yelpReviewFileLocations); // Create an distributed counter (i.e. accumulator) that will keep track of the time final Accumulator<Integer> processingMillis = sc.accumulator(0); // Get all words associated with the review of a particular business JavaPairRDD<String, String> wordsOfBusinesses = reviewLines.flatMapToPair(new PairFlatMapFunction<String, String, String>() { @Override public Iterable<Tuple2<String, String>> call(String s) throws Exception { String[] elements = s.split("\t"); // Setup a simple timer long start = System.currentTimeMillis(); String[] words = elements[2].split("\\W"); long stop = System.currentTimeMillis(); // Add it to the accumulator processingMillis.add((int)(stop-start)); List<Tuple2<String, String>> businessWords = new ArrayList<Tuple2<String, String>>(); for (String word : words) { businessWords.add(new Tuple2<String, String>(elements[1], word)); } return businessWords; } }); // Filter words on coffee or tea wordsOfBusinesses = wordsOfBusinesses.filter(new Function<Tuple2<String, String>, Boolean>() { @Override public Boolean call(Tuple2<String, String> stringStringTuple2) throws Exception { return "coffee".equals(stringStringTuple2._2()) || "tea".equals(stringStringTuple2._2()); } }); // Group all words on business Map<String, Object> countsPerBusiness = wordsOfBusinesses.countByKey(); // Check whether the number of coffee or tea words for business with id Oz1w_3Ck8lalmtxPcQMOIA is 55 Assert.assertEquals(55L, countsPerBusiness.get("Oz1w_3Ck8lalmtxPcQMOIA")); // Get the value of the distributed counter System.out.println("Processing time: " + processingMillis.value()); } @Test // Get the reviewed business with 5 stars but make use of broadcasting instead of joins to match up the business names public void getReviewedBusinessesWith5StarsWithNamesWithoutJoins() throws FileNotFoundException { // Parse the business names files separately Scanner scanner = new Scanner(new File(yelpBusinessesFileLocations)); Map<String,String> mappings = new HashMap<String,String>(); while (scanner.hasNextLine()) { String elements[] = scanner.nextLine().split("\t"); mappings.put(elements[0],elements[1]); } // Broadcast this map of business id - business names mappings final Broadcast<Map<String,String>> broadcastedMappings = sc.broadcast(mappings); // Import data from the review file JavaRDD<String> reviewLines = sc.textFile(yelpReviewFileLocations); // Filter them to 5-star businesses reviewLines = reviewLines.filter(new Function<String, Boolean>() { @Override public Boolean call(String s) throws Exception { String[] elements = s.split("\t"); return "5".equals(elements[3]); } }); // Get the 5 stars for each business JavaPairRDD<String,Integer> businessStars = reviewLines.mapToPair(new PairFunction<String, String, Integer>() { @Override public Tuple2<String, Integer> call(String s) throws Exception { String[] elements = s.split("\t"); // Use the broadcast variable to get the effective name of the business return new Tuple2<String, Integer>(broadcastedMappings.value().get(elements[1]),1); } }); // Reduce by business businessStars = businessStars.reduceByKey(new Function2<Integer, Integer, Integer>() { @Override public Integer call(Integer integer1, Integer integer2) throws Exception { return integer1 + integer2; } }); // Find the value for the Postino Arcadia business List<Integer> businessCount = businessStars.lookup("Postino Arcadia"); // Check whether it is effectively the Postino Acadia business Assert.assertEquals(473, (int)businessCount.get(0)); } @Test // Get the mean number of stars for a particular business public void getMeanStarsForAParticularBusiness() { // Import data from the review file JavaRDD<String> reviewLines = sc.textFile(yelpReviewFileLocations); // We are going to try to find all reviews of business with id sgBl3UDEcNYKwuUb92CYdA JavaRDD<String> reviewsInterest = reviewLines.filter(new Function<String, Boolean>() { @Override public Boolean call(String s) throws Exception { String[] elements = s.split("\t"); return "sgBl3UDEcNYKwuUb92CYdA".equals(elements[1]); } }); // Get the star scores for this business JavaDoubleRDD starsOfInterest = reviewsInterest.mapToDouble(new DoubleFunction<String>() { @Override public double call(String s) throws Exception { String[] elements = s.split("\t"); return Double.parseDouble(elements[3]); } }); // Calculate the mean value double meanValue = starsOfInterest.mean(); // Check whether it is 3.723404255319149 Assert.assertEquals(3.723404255319149, meanValue, 0.0); } }
[ "info@datablend.be" ]
info@datablend.be
f9574402e926088406774432fffcc4ab32fcdafa
b4227f123d3b35db9f478bcc90f155d773d98066
/src/main/java/com/athlima/bots/embeds/AnnounceEmbed.java
7127853c41ed6f5cf0e8bfc4fc6962107dec07c2
[]
no_license
excaliburonly/athlima-java-bot
3b5e0b08e4ec71c76de830210f81d8eb1cba7ff5
5313e18b625fe34eb4b971bf75734734a4f48c45
refs/heads/main
2023-07-08T14:34:01.925787
2021-08-13T12:01:33
2021-08-13T12:01:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
781
java
package com.athlima.bots.embeds; import org.javacord.api.entity.message.embed.EmbedBuilder; import java.awt.*; public class AnnounceEmbed { public EmbedBuilder makeEmbed(String title, String[] bodyArr) { String body = arrayToString(bodyArr); return new EmbedBuilder() .setTitle(title) .setDescription(body) .setColor(Color.getHSBColor((float)Math.random()*360,(float)Math.random()*360, (float)Math.random()*360)) .setAuthor("Athlima BOT", "http://google.com/", "https://cdn.discordapp.com/embed/avatars/2.png"); } private String arrayToString(String[] bodyArr) { String ret = ""; for (String s:bodyArr) { ret += s+" "; } return ret; } }
[ "87257587+ABexcalibur@users.noreply.github.com" ]
87257587+ABexcalibur@users.noreply.github.com
ee7240d3ec5510b0172eaf9246f01efe1a2c7490
70cbd262e05e31740b0424ba7056237ea2f1e2c9
/src/main/java/org/mat/nounou/vo/UserVO.java
c9e6a6de87d3e6590bcabc024a8da0f55df89e9d
[]
no_license
vincentClaeysen/nounou
5b87ae3c800adf083a32f9a76ab697ea2441e0ca
08ece6a7e2535b59b0375072093f0ee5f7ac5dbb
refs/heads/master
2021-01-24T04:34:19.603689
2012-11-08T15:58:33
2012-11-08T15:58:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,392
java
package org.mat.nounou.vo; import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement public class UserVO { private Integer userId; private Integer accountId; private String firstName; private String lastName; private String phoneNumber; private String email; private String password; private String type; private boolean newUser = false; public UserVO() { } public boolean isNewUser() { return newUser; } public void setNewUser(boolean newUser) { this.newUser = newUser; } public UserVO(String firstName, String lastName) { this.firstName = firstName; this.lastName = lastName; } public Integer getUserId() { return userId; } public void setUserId(Integer userId) { this.userId = userId; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } 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 getPhoneNumber() { return phoneNumber; } public void setPhoneNumber(String phoneNumber) { this.phoneNumber = phoneNumber; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String getType() { return type; } public void setType(String type) { this.type = type; } public Integer getAccountId() { return accountId; } public void setAccountId(Integer accountId) { this.accountId = accountId; } @Override public String toString() { return "UserVO{" + "userId=" + userId + ", accountId=" + accountId + ", firstName='" + firstName + '\'' + ", lastName='" + lastName + '\'' + ", phoneNumber='" + phoneNumber + '\'' + ", email='" + email + '\'' + ", password='" + password + '\'' + ", type='" + type + '\'' + '}'; } }
[ "mlecoutre@gmail.com" ]
mlecoutre@gmail.com
f68897f23838b5c0563b5961d8e0eb9d700d62ba
e1cba5b798043a72414b32ea9219f5266f3c7a9b
/app/src/main/java/com/example/together/activities/decorators/OneDayDecorator.java
3afd2884174192ecde243fec2d4d928067abfd2d
[]
no_license
dodose/Together
501c74bd6d776a1c7fd2713990d4807fd9a6ddee
1b2518a752a031bc05eea45ee66b4567ab9b809b
refs/heads/master
2020-05-01T16:45:55.663012
2019-09-04T05:18:03
2019-09-04T05:18:03
177,581,264
0
0
null
2019-07-16T09:14:17
2019-03-25T12:22:57
Java
UTF-8
Java
false
false
1,156
java
package com.example.together.activities.decorators; import android.graphics.Color; import android.graphics.Typeface; import android.text.style.ForegroundColorSpan; import android.text.style.RelativeSizeSpan; import android.text.style.StyleSpan; import com.prolificinteractive.materialcalendarview.CalendarDay; import com.prolificinteractive.materialcalendarview.DayViewDecorator; import com.prolificinteractive.materialcalendarview.DayViewFacade; import java.util.Date; public class OneDayDecorator implements DayViewDecorator { private CalendarDay date; public OneDayDecorator() { date = CalendarDay.today(); } @Override public boolean shouldDecorate(CalendarDay day) { return date != null && day.equals(date); } @Override public void decorate(DayViewFacade view) { view.addSpan(new StyleSpan(Typeface.BOLD)); view.addSpan(new RelativeSizeSpan(1.4f)); view.addSpan(new ForegroundColorSpan(Color.BLACK)); } /** * We're changing the internals, so make sure to call */ public void setDate(Date date) { this.date = CalendarDay.from(date); } }
[ "46309820+llov0310@users.noreply.github.com" ]
46309820+llov0310@users.noreply.github.com
1d7aeb3eaea8105a0957ad1f2b4e493fba495651
a16611c75fa0c8699bdf97ab1a9d24c442d48a57
/ucloude-uts/ucloude-uts-monitor/src/main/java/cn/uway/ucloude/uts/monitor/access/face/JobTrackerMAccess.java
ae43b43a48452df8c5b54b7bc3fae017abebf141
[]
no_license
un-knower/yuncaiji_v4
cfaf3f18accb794901f70f7252af30280414e7ed
a4ff027e485272b73e2c6fb3f1dd098f5499086b
refs/heads/master
2020-03-17T23:14:40.121595
2017-05-21T05:55:51
2017-05-21T05:55:51
134,036,686
0
1
null
2018-05-19T06:35:12
2018-05-19T06:35:12
null
UTF-8
Java
false
false
270
java
package cn.uway.ucloude.uts.monitor.access.face; import java.util.List; import cn.uway.ucloude.uts.monitor.access.domain.JobTrackerMDataPo; /** * @author uway */ public interface JobTrackerMAccess { void insert(List<JobTrackerMDataPo> jobTrackerMDataPos); }
[ "1852300415@qq.com" ]
1852300415@qq.com
9484714c530fc5870a14648bf53b229952c24ae1
6f17869383fe17520528dfbc4228df5cb274f58f
/src/test/java/com/xinho/dao/Generator.java
2f0f8ca092559a206a525ee9e2d51da1bf536368
[]
no_license
j2ee-design/dms
0e49812a7b6b9df2cec0414fdbde540967284ec3
3cae9ff7fde71f0ed939a3e97f2b0fd26af6afdf
refs/heads/master
2021-08-11T06:47:18.240370
2017-11-13T08:38:09
2017-11-13T08:38:09
107,411,637
2
0
null
null
null
null
UTF-8
Java
false
false
926
java
package com.xinho.dao; import org.junit.Test; import org.mybatis.generator.api.MyBatisGenerator; import org.mybatis.generator.config.Configuration; import org.mybatis.generator.config.xml.ConfigurationParser; import org.mybatis.generator.internal.DefaultShellCallback; import java.io.File; import java.util.ArrayList; import java.util.List; public class Generator { @Test public void main() throws Exception{ List<String> warnings = new ArrayList<String>(); boolean overwrite = true; File configFile = new File("generatorConfig.xml"); ConfigurationParser cp = new ConfigurationParser(warnings); Configuration config = cp.parseConfiguration(configFile); DefaultShellCallback callback = new DefaultShellCallback(overwrite); MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config, callback, warnings); myBatisGenerator.generate(null); } }
[ "1044863601@qq.com" ]
1044863601@qq.com
5eb970bac9849b0d2717b36bdc229f24a0036206
3792a2cb57fd293f446accb4e0675d0184981981
/src/problem4/Employee.java
570322f83295647d5e92fe27f69c2b1e978dff33
[]
no_license
THUYHONGHA/W2L5-HOMEWORKASSIGNMENT
539daaff4c43b08a89158fc148122c285fb1c49e
754f282c38ccd71da9cb82d15b0df8ba01bc460d
refs/heads/master
2021-01-18T18:59:01.976900
2017-03-08T21:29:43
2017-03-08T21:29:43
84,364,697
0
0
null
null
null
null
UTF-8
Java
false
false
820
java
package problem4; public abstract class Employee implements Payable { String firsName; String lastName; String socialSecurityNumber; Employee(String firsName, String lastName, String socialSecurityNumber) { this.firsName=firsName; this.lastName=lastName; this.socialSecurityNumber=socialSecurityNumber; } public String getFirsName() { return firsName; } public void setFirsName(String firsName) { this.firsName = firsName; } public String getLastName() { return lastName; } public void setLastName(String lastName) { this.lastName = lastName; } public String getSocialSecurityNumber() { return socialSecurityNumber; } public void setSocialSecurityNumber(String socialSecurityNumber) { this.socialSecurityNumber = socialSecurityNumber; } abstract public String toString(); }
[ "thuyhong.ip@gmail.com" ]
thuyhong.ip@gmail.com
da961d13d0a2b6a3291e1abb430fabae9c8f568c
fdc1df3ae86b5302f0d4ca316b499b6de9d0e7ec
/app/src/main/java/com/example/pertemuan3_navigation/ChatFragment.java
509c8ee98f4e0b218e0cbe7ef92fe6a25c309454
[]
no_license
Rizky1408/prak3-1901013044-Rizky-Adi-Ryanto
a71f8b022eddd0f5097d8e80301ac0b4524f30b0
4a562fc656380471d434180fef7d51eb0d9f596a
refs/heads/main
2023-09-04T06:45:00.367909
2021-10-18T12:55:00
2021-10-18T12:55:00
418,491,746
0
0
null
null
null
null
UTF-8
Java
false
false
644
java
package com.example.pertemuan3_navigation; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; public class ChatFragment extends Fragment{ @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { return inflater.inflate(R.layout.fragment_chat,container,false); } }
[ "dhipaarsyad13@gmail.com" ]
dhipaarsyad13@gmail.com
643550c924e1df7d5a99bf2df59f2e0cf4e02ca4
9966d16e03154be8ad6f9c47517ce11764d65934
/ConnectionManager.java
0652e252badd5ced3adae28bf4e5960cdaba51c5
[]
no_license
melvinlzw/CS2102SportsBooking
0284442e60647f1c9537ade22eae8318473630b2
0b0260079fc2bd7a685913ee94e292eb8c0bd9da
refs/heads/master
2020-06-03T22:22:06.524851
2014-04-17T03:23:46
2014-04-17T03:23:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
654
java
package Connection; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class ConnectionManager { static Connection conn; public static Connection getConnection() { try { String url = "jdbc:mysql://localhost:3306/"; String dbName ="sportsbooking"; String username = "root"; String password = "root"; Class.forName("com.mysql.jdbc.Driver"); try { conn = DriverManager.getConnection(url+dbName,username,password); } catch (SQLException ex) { ex.printStackTrace(); } } catch(ClassNotFoundException e) { System.out.println(e); } return conn; } }
[ "melvinlzw@gmail.com" ]
melvinlzw@gmail.com
06bd34637a6864dbf050ee96d4b7604418ce7e1a
55834e04164c5d8c8f39d0dd60bb3f01484fc928
/src/main/java/com/galaxyzeta/blog/dao/RoleDao.java
e3c0cc9c06a11a41627e894f0b313758d24a743f
[]
no_license
tanbinh123/SpringbootBlogApi
9bcd8b3afa0a478788c7dc1e12d46d47f5ea47a8
e0a9e69cbff23d843f89d9b92017b48ecfff59e0
refs/heads/master
2023-02-19T13:00:45.697738
2021-01-18T10:39:16
2021-01-18T10:39:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,929
java
package com.galaxyzeta.blog.dao; import java.util.List; import com.galaxyzeta.blog.entity.Role; import org.apache.ibatis.annotations.Delete; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Options; import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Update; @Mapper public interface RoleDao { public static final String COLUMNS = "rid, role"; public static final String VALUES = "#{rid}, #{role}"; public static final String USER_ROLE_COLUMNS = "rid, uid"; public static final String USER_ROLE_VALUES = "#{rid}, #{uid}"; @Insert({ "INSERT INTO role ("+ COLUMNS +") VALUES ("+ VALUES +")" }) @Options(keyColumn = "rid", keyProperty = "rid") public void saveRole(Role role); @Delete({ "DELETE FROM role WHERE rid = #{rid}" }) public void deleteByRoleId(Integer rid); @Update({ "UPDATE role SET role = #{role} WHERE rid = #{rid}" }) public void update(Role role); @Select({ "SELECT * FROM role WHERE rid = #{rid}" }) public Role getByRoleId(Integer rid); @Select({ "SELECT * FROM role WHERE role = #{roleName}" }) public Role getByRoleName(String roleName); @Select({ "SELECT rid, role FROM user_role", "INNER JOIN role USING(rid)", "INNER JOIN user USING(uid)", "WHERE uid = #{uid}" }) public List<Role> getRolesByUserId(Integer uid); @Select({ "SELECT rid FROM user_role WHERE uid = #{uid}" }) public List<Integer> getRoleIdsByUserId(Integer uid); @Insert({ "INSERT IGNORE INTO user_role (" + USER_ROLE_COLUMNS + ")", "VALUES (" + USER_ROLE_VALUES + ")" }) public void grantUserRole(Integer uid, Integer rid); @Delete({ "DELETE FROM user_role WHERE uid = #{uid} AND rid = #{rid}" }) public void revokeUserRole(Integer uid, Integer rid); @Delete({ "DELETE FROM user_role WHERE uid = #{uid}" }) public void revokeAllUserRoles(Integer uid); }
[ "1919737818@qq.com" ]
1919737818@qq.com
1bf3c35087e4913cf72a196a8e8e8e1dbd793271
3b91ed788572b6d5ac4db1bee814a74560603578
/com/tencent/mm/plugin/game/ui/GameIndexWxagView$1.java
f7400a5f540ff99b7c54fc740d9272719a6eb3d5
[]
no_license
linsir6/WeChat_java
a1deee3035b555fb35a423f367eb5e3e58a17cb0
32e52b88c012051100315af6751111bfb6697a29
refs/heads/master
2020-05-31T05:40:17.161282
2018-08-28T02:07:02
2018-08-28T02:07:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,118
java
package com.tencent.mm.plugin.game.ui; import android.view.View; import android.view.View.OnClickListener; import com.tencent.mm.kernel.g; import com.tencent.mm.plugin.appbrand.n.d; import com.tencent.mm.plugin.appbrand.report.AppBrandStatObject; import com.tencent.mm.plugin.game.d.dl; import com.tencent.mm.plugin.game.model.an; class GameIndexWxagView$1 implements OnClickListener { final /* synthetic */ int jUG; final /* synthetic */ GameIndexWxagView jYW; GameIndexWxagView$1(GameIndexWxagView gameIndexWxagView, int i) { this.jYW = gameIndexWxagView; this.jUG = i; } public final void onClick(View view) { if (view.getTag() != null && (view.getTag() instanceof dl)) { dl dlVar = (dl) view.getTag(); AppBrandStatObject appBrandStatObject = new AppBrandStatObject(); appBrandStatObject.scene = 1079; ((d) g.l(d.class)).a(this.jYW.getContext(), dlVar.hbL, dlVar.jQb, dlVar.jTy, 0, dlVar.jTx, appBrandStatObject); an.a(this.jYW.getContext(), 10, 1025, 999, 30, dlVar.jQb, this.jUG, null); } } }
[ "707194831@qq.com" ]
707194831@qq.com
928b4b49524d87f67e6fa2671f2d37a5438d96b8
7c3bcdc90ee59efb44aae59915aad2d911d6769f
/src/Day7/ContactManager/MainContact.java
dcfd20291ddb322e799830f44c58dc3d6e946925
[]
no_license
RiyaAtta/CapgLabPrograms
854f43501066a3df6c5fa36bea625e1ccc40272b
a58860ab6fd2c75622968238287ca5c25a2c96ea
refs/heads/master
2023-05-23T08:14:53.072678
2021-06-14T18:40:42
2021-06-14T18:40:42
370,443,972
0
0
null
null
null
null
UTF-8
Java
false
false
255
java
package Day7.ContactManager; public class MainContact { public static void main(String[] args) { // TODO Auto-generated method stub Contact c=new Contact(); c.readDetails(); String output=c.displayDetails(); System.out.println(output); } }
[ "riyaatta26@gmail.com" ]
riyaatta26@gmail.com
504965b85d336a6cea7ee35c64398233dc83d912
42ed12696748a102487c2f951832b77740a6b70d
/Mage.Sets/src/mage/sets/ninthedition/PhyrexianHulk.java
86684adf33c9b0faf36ff5c02c8b532cea53cbda
[]
no_license
p3trichor/mage
fcb354a8fc791be4713e96e4722617af86bd3865
5373076a7e9c2bdabdabc19ffd69a8a567f2188a
refs/heads/master
2021-01-16T20:21:52.382334
2013-05-09T21:13:25
2013-05-09T21:13:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,197
java
/* * Copyright 2010 BetaSteward_at_googlemail.com. 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 BetaSteward_at_googlemail.com ``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 BetaSteward_at_googlemail.com 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 BetaSteward_at_googlemail.com. */ package mage.sets.ninthedition; import java.util.UUID; import mage.Constants.Rarity; /** * * @author Loki */ public class PhyrexianHulk extends mage.sets.newphyrexia.PhyrexianHulk { public PhyrexianHulk(UUID ownerId) { super(ownerId); this.cardNumber = 306; this.expansionSetCode = "9ED"; this.rarity = Rarity.UNCOMMON; } public PhyrexianHulk(final PhyrexianHulk card) { super(card); } @Override public PhyrexianHulk copy() { return new PhyrexianHulk(this); } }
[ "loki@magefree" ]
loki@magefree
8b9d4b89d5dac19eb01767aa11c6768e42750f32
342586873422ba0bad959ae94d05eb119fd045eb
/solvers/ICAT.java
853c6de2e52ca24c623314212de36d037e733941
[]
no_license
metheway/mapf-benchmark
8320c7ccaeacf5149c72d7497a4a97f7c4f64965
2cf287cc096e47b3d52999ad864150ddb4195ace
refs/heads/master
2021-06-07T22:43:35.566284
2016-12-15T18:56:17
2016-12-15T18:56:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
877
java
package solvers; import solvers.astar.State; import solvers.states.MultiAgentState; import solvers.states.SingleAgentState; import utilities.Conflict; import utilities.Coordinate; import utilities.Node; import utilities.Path; import java.util.List; import java.util.Map; public interface ICAT { int violation(SingleAgentState state); int violation(MultiAgentState state); void addPath(Path path); Conflict simulatePath(Path path, int group); boolean isValid(State state); Map<Node, int[]> getAgentDestinations(); Map<Coordinate, List<Integer>> getGroupOccupantTable(); Map<Coordinate, List<Coordinate>> getCoordinateTable(); void setRelevantGroups(List<Integer> relevantGroups); void setAgentGroups(Map<Integer, Integer> agentGroups); Map<Integer, Integer> getAgentGroups(); List<Integer> getRelevantGroups(); }
[ "maxwellhgray@utexas.edu" ]
maxwellhgray@utexas.edu
fe8e208fa7b6b66cad2e5e001d3b984c71771960
23012f89dbc8f7f1e3053e09c44dfb7f7b9bca65
/src/mbs/IOHandler.java
0c4be04db1495634c1c2d8b0e22115f2cc1195d7
[]
no_license
busratural/ybs
292bb0bf151074526155e3ea5d264a5bd0b36799
b914f7e9ac20115552f9639ea453d122abd10be1
refs/heads/master
2023-09-01T15:08:59.198976
2021-09-29T13:35:44
2021-09-29T13:35:44
410,790,427
0
0
null
null
null
null
ISO-8859-9
Java
false
false
2,267
java
// // Source code recreated from a .class file by IntelliJ IDEA // (powered by FernFlower decompiler) // package mbs; import java.io.IOException; import com.pi4j.io.gpio.GpioController; import com.pi4j.io.gpio.GpioFactory; import com.pi4j.io.gpio.GpioPinDigitalInput; import com.pi4j.io.gpio.PinPullResistance; import com.pi4j.io.gpio.RaspiPin; import com.pi4j.io.gpio.event.GpioPinDigitalStateChangeEvent; import com.pi4j.io.gpio.event.GpioPinListener; import com.pi4j.io.gpio.event.GpioPinListenerDigital; import com.pi4j.io.serial.Serial; import com.pi4j.io.serial.SerialDataEvent; import com.pi4j.io.serial.SerialFactory; public class IOHandler { GpioController gpio; Serial serial; GpioPinDigitalInput kapiButonu; GpioPinDigitalInput takometre; public IOHandler() { } public void Initialize() { this.gpio = GpioFactory.getInstance(); this.kapiButonu = this.gpio.provisionDigitalInputPin(RaspiPin.GPIO_28, PinPullResistance.PULL_UP); this.takometre = this.gpio.provisionDigitalInputPin(RaspiPin.GPIO_29, PinPullResistance.PULL_UP); Serial serial = SerialFactory.createInstance(); this.kapiButonu.addListener(new GpioPinListener[]{new GpioPinListenerDigital() { public void handleGpioPinDigitalStateChangeEvent(GpioPinDigitalStateChangeEvent event) { System.out.println(" --> KAPI BUTONU: " + event.getPin() + " = " + event.getState()); } }}); this.takometre.addListener(new GpioPinListener[]{new GpioPinListenerDigital() { public void handleGpioPinDigitalStateChangeEvent(GpioPinDigitalStateChangeEvent event) { System.out.println(" --> TAKOMETRE: " + event.getPin() + " = " + event.getState()); } }}); } public void WriteTOSP(String data) { try { if (this.serial.isOpen()) { this.serial.write(data); } else { System.out.println("Seri port kapalı olduğu için yazma işlemi gerçekleştirilemedi!"); } } catch (IllegalStateException var3) { var3.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
[ "ahmetyasinuzun@hotmail.com" ]
ahmetyasinuzun@hotmail.com
68bb4a85a09bec474661554c281375b7376fff71
c175dc9e43a321972acb046c7b7211029f5db265
/sagacity-core/src/main/java/org/sagacity/tools/excel/convert/impl/TemplateConvert.java
182cb9cdd0838be13cc909a32ac64106695bd0ec
[]
no_license
denghuafeng/sagacity
68c586fa62d72fbb9c31b4c3928544728cbe7e5f
a1410296ec8b70710c89fcb9767855f1ebfd5d31
refs/heads/master
2020-03-27T04:48:37.964067
2009-03-19T05:14:27
2009-03-19T05:14:27
42,786,158
0
0
null
null
null
null
UTF-8
Java
false
false
3,325
java
/** * */ package org.sagacity.tools.excel.convert.impl; import java.io.StringWriter; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.sagacity.framework.log.Log; import org.sagacity.framework.log.LogFactory; import org.sagacity.tools.excel.convert.IConvert; import org.sagacity.tools.excel.model.ColumnModel; import freemarker.cache.StringTemplateLoader; import freemarker.template.Configuration; import freemarker.template.Template; import freemarker.template.TemplateException; /** *@project abchina *@description:$<p>利用freemarker模板转换</p>$ *@author zhongxuchen $<a href="mailto:zhongxuchen@hotmail.com">联系作者</a>$ *@version $id:TemplateConvert.java,Revision:v1.0,Date:Aug 25, 2008 8:47:12 PM $ */ public class TemplateConvert implements IConvert { /** * 定义日志 */ protected final Log logger = LogFactory.getFactory().getLog(getClass()); private String tempateName="item"; private String marcTemplate; private List params; private Configuration cfg=new Configuration(); private StringTemplateLoader tmpLoader=new StringTemplateLoader(); /* (non-Javadoc) * @see com.abchina.tools.excel.convert.IConvert#convert(java.lang.Object, java.util.List) */ public Object convert(Object key, List rowData,ColumnModel colModel) { if(params==null || params.size()==0) return key; //like #{item[0]}-#{item[1]}- if(params.size()==2) { tempateName=(String)params.get(0); marcTemplate=(String)params.get(1); } else marcTemplate=(String)params.get(0); String result=null; try { tmpLoader.putTemplate(tempateName, marcTemplate); cfg.setTemplateLoader(tmpLoader); Template template = cfg.getTemplate(tempateName); Map root = new HashMap(); root.put(tempateName, rowData); StringWriter writer = new StringWriter(); try { template.process(root, writer); writer.flush(); result=writer.getBuffer().toString(); } catch (TemplateException e) { e.printStackTrace(); } } catch (Exception e) { e.printStackTrace(); logger.error("模板匹配错误!", e.fillInStackTrace()); } return result; } /* (non-Javadoc) * @see com.abchina.tools.excel.convert.IConvert#setParams(java.util.List) */ public void setParams(List params) { // TODO Auto-generated method stub this.params=params; } public static void main(String[] args) { //String marcTemplate="${maro[0]}-${maro[1]}-${maro[2]?left_pad(3,'0')}"; String marcTemplate="${maro[0]?string}0101"; List rowData=new ArrayList(); rowData.add("2006"); Configuration cfg=new Configuration(); try { StringTemplateLoader tmpLoader=new StringTemplateLoader(); tmpLoader.putTemplate("marc", marcTemplate); cfg.setTemplateLoader(tmpLoader); Template template = cfg.getTemplate("marc"); Map root = new HashMap(); root.put("maro", rowData); StringWriter writer = new StringWriter(); try { template.process(root, writer); writer.flush(); } catch (TemplateException e) { e.printStackTrace(); } System.err.println(writer.getBuffer().toString()); } catch (Exception e) { e.printStackTrace(); } } }
[ "zhongxuchen@5dcfa4b7-cc46-0410-8790-75daded58cec" ]
zhongxuchen@5dcfa4b7-cc46-0410-8790-75daded58cec
4a5a1b48312a69935c7d136be390af9be4df8121
c5dc37e41aad04e0f1010f789f22e7913016f5bc
/cloud-consumer-feign-hystrix-order80/src/main/java/com/hyl/springcloud/service/PaymentHystrixService.java
e2890f621a6935218678b128d6c386ca98ec7942
[]
no_license
huyanlong-amg/cloud
685cec71ddd08b1c82aa538e47350816961a3e9b
32ab89f6e10aa529fc48799fa67671a514515b7c
refs/heads/master
2023-04-01T05:18:24.408002
2021-03-24T14:29:44
2021-03-24T14:29:44
351,108,111
0
0
null
null
null
null
UTF-8
Java
false
false
681
java
package com.hyl.springcloud.service; import org.springframework.cloud.openfeign.FeignClient; import org.springframework.stereotype.Component; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; /** * @auther zzyy * @create 2020-02-20 11:55 */ @Component @FeignClient(value = "CLOUD-PROVIDER-HYSTRIX-PAYMENT" ,fallback = PaymentFallbackService.class) public interface PaymentHystrixService { @GetMapping("/payment/hystrix/ok/{id}") String paymentInfoOk(@PathVariable("id") Integer id); @GetMapping("/payment/hystrix/timeout/{id}") String paymentInfoTimeout(@PathVariable("id") Integer id); }
[ "2536620695@qq.com" ]
2536620695@qq.com
ccfd729fcb3677adbc525ac513d43047d2c046de
3139644a57b3c121dfcd012d4a01432b40aa0d00
/enn-monitor-alarm/enn-monitor-alarm-ticket-server/src/main/java/enn/monitor/alarm/ticket/email/pipe/EnnMonitorAlarmTicketEmailPipeClientImpl.java
7b572036485ffa9ccdd9aeac576784a155ed2021
[]
no_license
charmby/monitor-ye
50dbd21c783293f0ebda87de46f49ba8e2080ef6
4f90f5c37d207a4ebfd9683af60badf5cd8c5e9f
refs/heads/master
2021-03-21T03:44:38.105122
2018-12-19T14:47:38
2018-12-19T14:47:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,210
java
package enn.monitor.alarm.ticket.email.pipe; import enn.monitor.alarm.config.email.client.EnnMonitorAlarmConfigEmailClient; import enn.monitor.alarm.config.email.parameter.EnnMonitorAlarmConfigEmailGetDeleted; import enn.monitor.alarm.config.email.parameter.EnnMonitorAlarmConfigEmailTable; import enn.monitor.alarm.config.email.pipe.EnnMonitorAlarmConfigEmailPipeClientImpl; import enn.monitor.alarm.ticket.parameter.EnnMonitorAlarmTicketGetDeleted; public class EnnMonitorAlarmTicketEmailPipeClientImpl extends EnnMonitorAlarmConfigEmailPipeClientImpl { private EnnMonitorAlarmTicketEmailCache ennMonitorAlarmTicketEmailCache = null; public EnnMonitorAlarmTicketEmailPipeClientImpl(EnnMonitorAlarmConfigEmailClient emailClient, EnnMonitorAlarmTicketEmailCache ennMonitorAlarmTicketEmailCache) { super(emailClient); this.ennMonitorAlarmTicketEmailCache = ennMonitorAlarmTicketEmailCache; } @Override protected void updateAndInsert(Object object) { ennMonitorAlarmTicketEmailCache.updateAndInsert((EnnMonitorAlarmConfigEmailTable) object); } @Override protected void delete(Object object) { ennMonitorAlarmTicketEmailCache.remove((EnnMonitorAlarmConfigEmailGetDeleted) object); } }
[ "martynye@Martyns-MacBook-Pro.local" ]
martynye@Martyns-MacBook-Pro.local
14c2d4e426f3dc225b41dc3d04f306ac235f95b2
cb97cde50afc708a074f276e1b9505d6e803a1ca
/src/practicetest.java
c389737cb2bdd7eefce3117d951e30f9bacffaf5
[]
no_license
cristianaragon1/level-1-saturdays
17e51b22061e4f8ea3765e6e11eea40ffea8267d
9be1239bf2ed6cac69d52b707363aa11ea3777a6
refs/heads/master
2021-01-11T05:24:06.532163
2017-09-02T21:31:55
2017-09-02T21:31:55
71,666,723
0
0
null
null
null
null
UTF-8
Java
false
false
688
java
import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; public class practicetest { public static void main(String[] args) { billnye scienceguy = new billnye(); } public static void billnye() { JFrame Frame = new JFrame("meme"); JLabel label = new JLabel("nice meme"); JButton buttonone = new JButton("dank"); JButton buttontwo = new JButton("normie"); JTextField field = new JTextField(); JPanel panel = new JPanel(); Frame.setVisible(true); Frame.setSize(500, 500); Frame.add(label); panel.add(field); field.getText(); panel.add(buttonone); panel.add(buttontwo); } }
[ "league@WTS-IM-17.attlocal.net" ]
league@WTS-IM-17.attlocal.net
677d2ba0552a6399da23cc8aeb596f2254d3cb9c
5d772612d63dbf6243fd592ffafc4ca2d6a0858a
/src/array_multy_dimensi/testarraydua.java
ad606339154c940b69e8d6a9fe8b10af461500b8
[]
no_license
andienkhansa/Array
3c1598b1158ab75f6637b5fde322b8a6885efa3c
efe29a1dc5ea41b00ec545a025993d9fb62089f8
refs/heads/master
2021-07-05T17:57:53.172623
2017-09-25T06:20:45
2017-09-25T06:20:45
104,710,158
0
0
null
null
null
null
UTF-8
Java
false
false
788
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 array_multy_dimensi; /** * * @author Andien */ public class testarraydua { int nis[][] = {{210651},{210651},{210652}}; String nama[][] = {{"Rizvan Dimas"},{"NurAzmi"},{"Devita Fahma"}}; public void tampil(){ System.out.println("Identitas Siswa Angkatan 24"); } public void namanis(){ for (int i = 0; i< 3; i++){ for (int j = 0; j< 1; j++){ System.out.println(nama[i][j]+":"+nis[i][j]); } } } // KUDU MAINE MEK SIJI public static void main (String[]args){ testarraydua siswa = new testarraydua(); siswa.tampil(); siswa.namanis(); } }
[ "Andien@Khansa" ]
Andien@Khansa
553738ae362dd9b252540b1083a3dc3a26a2227a
dba11f957bfe5da6f754de13a0256a997983f674
/src/main/leetcode/editor/cn/[56]Merge Intervals.java
e9158cbfb2c55a2096d536bb85f9d49f2aadba40
[]
no_license
chenxi-null/leetcode
d0945f146d7a37c6012755679195c71b567218e6
5a391c8e5177596bcd560da8ef68c5c4ea8deeae
refs/heads/master
2023-06-24T22:07:31.293571
2021-05-29T17:22:47
2021-05-29T17:24:01
77,845,371
0
0
null
2023-06-14T22:30:54
2017-01-02T16:08:53
Java
UTF-8
Java
false
false
1,805
java
//Given an array of intervals where intervals[i] = [starti, endi], merge all ove //rlapping intervals, and return an array of the non-overlapping intervals that co //ver all the intervals in the input. // // // Example 1: // // //Input: intervals = [[1,3],[2,6],[8,10],[15,18]] //Output: [[1,6],[8,10],[15,18]] //Explanation: Since intervals [1,3] and [2,6] overlaps, merge them into [1,6]. // // // Example 2: // // //Input: intervals = [[1,4],[4,5]] //Output: [[1,5]] //Explanation: Intervals [1,4] and [4,5] are considered overlapping. // // // // Constraints: // // // 1 <= intervals.length <= 104 // intervals[i].length == 2 // 0 <= starti <= endi <= 104 // // Related Topics 排序 数组 // 👍 919 👎 0 //leetcode submit region begin(Prohibit modification and deletion) class Solution { public int[][] merge(int[][] intervals) { // sort by startIdx Arrays.sort(intervals, Comparator.comparingInt(interval -> interval[0])); // merge interval List<int[]> list = new ArrayList<>(); list.add(intervals[0]); for (int i = 1; i < intervals.length; i++) { int[] interval = intervals[i]; int lastEnd = list.get(list.size() - 1)[1]; int currStart = interval[0]; int currEnd = interval[1]; if (currStart <= lastEnd) { list.get(list.size() - 1)[1] = Math.max(lastEnd, currEnd); } else { list.add(interval); } } // list to array int[][] ans = new int[list.size()][]; for (int i = 0; i < ans.length; i++) { ans[i] = list.get(i); } return ans; } } //leetcode submit region end(Prohibit modification and deletion) // #[WA]: 合并时的情况没考虑清楚
[ "chenxiCoder@gmail.com" ]
chenxiCoder@gmail.com
cb2abaa5c787e4fe3fde4e069bfebedea8e35abf
5aafa30fa1f7ba1a7b0cebb72916d449c2116337
/src/pojo_example_1/HelloWorld.java
8b114ba97df04e3ba5df5ca714b6f80cee97053c
[]
no_license
gvnavin/RuleBookExperimentation
5aed97a2b3a43040fc89f1d731e7c116c6cfcf49
a1552f67dd2d0556173719956a70721ad9e296a3
refs/heads/master
2021-01-17T09:05:17.959492
2017-03-05T14:47:30
2017-03-05T14:47:30
83,977,545
0
0
null
null
null
null
UTF-8
Java
false
false
777
java
package pojo_example_1; import com.deliveredtechnologies.rulebook.RuleState; import com.deliveredtechnologies.rulebook.annotation.Given; import com.deliveredtechnologies.rulebook.annotation.Result; import com.deliveredtechnologies.rulebook.annotation.Rule; import com.deliveredtechnologies.rulebook.annotation.Then; import com.deliveredtechnologies.rulebook.annotation.When; /** * Created by gnavin on 2/28/17. */ @Rule public class HelloWorld { @Given("hello") private String hello; @Given("world") private String world; @Result private String helloworld; @When public boolean when() { return true; } @Then public RuleState then() { helloworld = hello + " " + world; return RuleState.BREAK; } }
[ "gnavin@amazon.com" ]
gnavin@amazon.com
d97c268f43efdb211c662419c38e3a10a6251e1b
5c00167c61faaf2e83849a91cc0e574c66336e80
/canova-api/src/main/java/org/canova/api/util/ClassPathResource.java
42757c269c94f421773b24f55553f75ff6a4f229
[ "Apache-2.0" ]
permissive
ljzzju/Canova
041a13c3d50d6f5eaf86e75e1afdf070f21efc82
2f7df2d936217925449f6286e6c3ef4f0158d7b3
refs/heads/master
2020-07-13T14:41:48.309356
2016-01-12T02:58:05
2016-01-12T02:58:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,784
java
package org.canova.api.util; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.*; import java.net.MalformedURLException; import java.net.URI; import java.net.URISyntaxException; import java.net.URL; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; /** * Simple utility class used to get access to files at the classpath, or packed into jar. * Based on Spring ClassPathResource implementation + jar internals access implemented. * * * @author raver119@gmail.com */ public class ClassPathResource { private String resourceName; private static Logger log = LoggerFactory.getLogger(ClassPathResource.class); /** * Builds new ClassPathResource object * * @param resourceName String name of resource, to be retrieved */ public ClassPathResource(String resourceName) { if (resourceName == null) throw new IllegalStateException("Resource name can't be null"); this.resourceName = resourceName; } /** * Returns URL of the requested resource * * @return URL of the resource, if it's available in current Jar */ private URL getUrl() { ClassLoader loader = null; try { loader = Thread.currentThread().getContextClassLoader(); } catch (Exception e) { // do nothing } if (loader == null) { loader = ClassPathResource.class.getClassLoader(); } URL url = loader.getResource(this.resourceName); if (url == null) { // try to check for mis-used starting slash // TODO: see TODO below if (this.resourceName.startsWith("/")) { url = loader.getResource(this.resourceName.replaceFirst("[\\\\/]","")); if (url != null) return url; } else { // try to add slash, to make clear it's not an issue // TODO: change this mechanic to actual path purifier url = loader.getResource("/" + this.resourceName); if (url != null) return url; } throw new IllegalStateException("Resource '" + this.resourceName + "' cannot be found."); } return url; } /** * Returns requested ClassPathResource as File object * * Please note: if this method called from compiled jar, temporary file will be created to provide File access * * @return File requested at constructor call * @throws FileNotFoundException */ public File getFile() throws FileNotFoundException { URL url = this.getUrl(); if (isJarURL(url)) { /* This is actually request for file, that's packed into jar. Probably the current one, but that doesn't matters. */ try { url = extractActualUrl(url); File file = File.createTempFile("canova_temp","file"); file.deleteOnExit(); ZipFile zipFile = new ZipFile(url.getFile()); ZipEntry entry = zipFile.getEntry(this.resourceName); if (entry == null) { if (this.resourceName.startsWith("/")) { entry = zipFile.getEntry(this.resourceName.replaceFirst("/","")); if (entry == null) { throw new FileNotFoundException("Resource " + this.resourceName + " not found"); } } else throw new FileNotFoundException("Resource " + this.resourceName + " not found"); } InputStream stream = zipFile.getInputStream(entry); FileOutputStream outputStream = new FileOutputStream(file); byte[] array = new byte[1024]; int rd = 0; do { rd = stream.read(array); outputStream.write(array,0,rd); } while (rd == 1024); outputStream.flush(); outputStream.close(); stream.close(); zipFile.close(); return file; } catch (Exception e) { throw new RuntimeException(e); } } else { /* It's something in the actual underlying filesystem, so we can just go for it */ try { URI uri = new URI(url.toString().replaceAll(" ", "%20")); return new File(uri.getSchemeSpecificPart()); } catch (URISyntaxException e) { return new File(url.getFile()); } } } /** * Checks, if proposed URL is packed into archive. * * @param url URL to be checked * @return True, if URL is archive entry, False otherwise */ private boolean isJarURL(URL url) { String protocol = url.getProtocol(); return "jar".equals(protocol) || "zip".equals(protocol) || "wsjar".equals(protocol) || "code-source".equals(protocol) && url.getPath().contains("!/"); } /** * Extracts parent Jar URL from original ClassPath entry URL. * * @param jarUrl Original URL of the resource * @return URL of the Jar file, containing requested resource * @throws MalformedURLException */ private URL extractActualUrl(URL jarUrl) throws MalformedURLException { String urlFile = jarUrl.getFile(); int separatorIndex = urlFile.indexOf("!/"); if(separatorIndex != -1) { String jarFile = urlFile.substring(0, separatorIndex); try { return new URL(jarFile); } catch (MalformedURLException var5) { if(!jarFile.startsWith("/")) { jarFile = "/" + jarFile; } return new URL("file:" + jarFile); } } else { return jarUrl; } } /** * Returns requested ClassPathResource as InputStream object * * @return File requested at constructor call * @throws FileNotFoundException */ public InputStream getInputStream() throws FileNotFoundException { URL url = this.getUrl(); if (isJarURL(url)) { try { url = extractActualUrl(url); ZipFile zipFile = new ZipFile(url.getFile()); ZipEntry entry = zipFile.getEntry(this.resourceName); InputStream stream = zipFile.getInputStream(entry); return stream; } catch (Exception e) { throw new RuntimeException(e); } } else { File srcFile = this.getFile(); return new FileInputStream(srcFile); } } }
[ "raver119@gmail.com" ]
raver119@gmail.com
ee4ac4e70b8cea3b70e76b9775edf8a989699032
f9d9143ea7c0efc941e721b137ec7b73aeae506e
/app/Adt/apple/src/com/example/apple/TeamActivity.java
aa72e3d22685825b5bc7bbffe6481163912f977f
[]
no_license
ireck22/musicweb
07af1e9fccb037fdd82023672b908a04b87a89d4
e6ccaaf4383b8be20252332a45a2cfec99b2089c
refs/heads/master
2021-06-19T03:38:57.493974
2017-07-05T07:33:48
2017-07-05T07:33:48
null
0
0
null
null
null
null
BIG5
Java
false
false
1,247
java
package com.example.apple; import android.support.v7.app.ActionBarActivity; import android.content.Intent; import android.os.Bundle; import android.view.Menu; import android.view.MenuItem; import android.view.View; public class TeamActivity extends ActionBarActivity { public void goBack(View v){ Intent it = new Intent(this, Name2Activity.class);//建立Intent並設定目標Name2Activity startActivity(it);//啟動Intent中的目標Name2Activity } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_team);//TeamActivity所對應的佈局檔activity_team } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.team, menu); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); if (id == R.id.action_settings) { return true; } return super.onOptionsItemSelected(item); } }
[ "dragon9029@gmail.com" ]
dragon9029@gmail.com
a143f7a8b3d07f6e09f4be812097e6c269d56129
dbf9175a6459b49b34c6e920f1e05160f9f0b966
/src/main/java/com/hs/dianping/service/Impl/UserServiceImpl.java
d179ad8b16274db22349b9f42aed6da9209fa150
[]
no_license
bfyjr/dianping
7ef1ba0437e9b0383d2f4ee4a86f2618b57fc75c
6d0a44a438a041eefe42ec4564e26053c2440134
refs/heads/master
2023-06-25T20:05:39.320927
2021-07-28T13:27:13
2021-07-28T13:27:13
390,352,724
0
0
null
null
null
null
UTF-8
Java
false
false
2,350
java
package com.hs.dianping.service.Impl; import com.hs.dianping.common.BusinessException; import com.hs.dianping.common.EnumBusinessError; import com.hs.dianping.dal.UserModelMapper; import com.hs.dianping.model.UserModel; import com.hs.dianping.service.UserService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.dao.DuplicateKeyException; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.yaml.snakeyaml.external.biz.base64Coder.Base64Coder; import java.nio.charset.StandardCharsets; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.Arrays; import java.util.Date; @Service public class UserServiceImpl implements UserService { @Autowired UserModelMapper userModelMapper; @Override public UserModel getUser(Integer id) { return userModelMapper.selectByPrimaryKey(id); } @Override @Transactional public UserModel register(UserModel resgisterUser) throws BusinessException, NoSuchAlgorithmException { System.out.println(resgisterUser.getPassword()); resgisterUser.setPassword(encodeByMD5(resgisterUser.getPassword())); resgisterUser.setCreatedAt(new Date()); resgisterUser.setUpdatedAt(new Date()); try { userModelMapper.insertSelective(resgisterUser); }catch (DuplicateKeyException e){ throw new BusinessException(EnumBusinessError.REGISTER_DUP_FAIL); } return getUser(resgisterUser.getId()); } @Override public UserModel login(String telphone, String password) throws NoSuchAlgorithmException, BusinessException { UserModel userModel = userModelMapper.selectByTelphoneAndPassword(telphone, encodeByMD5(password)); if(userModel==null){ throw new BusinessException(EnumBusinessError.LOGIN_FAIL); } return userModel; } @Override public Integer countAllUSer() { return userModelMapper.countAllUser(); } private String encodeByMD5(String pass) throws NoSuchAlgorithmException { MessageDigest messageDigest=MessageDigest.getInstance("MD5"); return Arrays.toString(Base64Coder.encode(messageDigest.digest(pass.getBytes(StandardCharsets.UTF_8)))); } }
[ "“your_email@18875147310@16com”" ]
“your_email@18875147310@16com”
2bdd63bc6f3e67c2c0c6504d518e4de17add7cf4
fb70e6d16baecf886869e14eb439fe334954b39e
/Lezerkardosjdk/java/sun/util/resources/cldr/gl/LocaleNames_gl.java
88287243179fd15a7e078849c1f2590550dda46d
[]
no_license
Savitar97/Prog2
ae5dfc46c8fc61974e4c2ddb59ce9e23ab955d23
8bc2c19240862218b1b06c4b5abe9081747a54c0
refs/heads/master
2020-07-25T00:16:11.948303
2020-02-29T23:49:42
2020-02-29T23:49:42
208,092,693
0
2
null
null
null
null
UTF-8
Java
false
false
23,326
java
/* * Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this * particular file as subject to the "Classpath" exception as provided * by Oracle in the LICENSE file that accompanied this code. * * This code 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 * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /* * COPYRIGHT AND PERMISSION NOTICE * * Copyright (C) 1991-2012 Unicode, Inc. All rights reserved. Distributed under * the Terms of Use in http://www.unicode.org/copyright.html. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of the Unicode data files and any associated documentation (the "Data * Files") or Unicode software and any associated documentation (the * "Software") to deal in the Data Files or Software without restriction, * including without limitation the rights to use, copy, modify, merge, * publish, distribute, and/or sell copies of the Data Files or Software, and * to permit persons to whom the Data Files or Software are furnished to do so, * provided that (a) the above copyright notice(s) and this permission notice * appear with all copies of the Data Files or Software, (b) both the above * copyright notice(s) and this permission notice appear in associated * documentation, and (c) there is clear notice in each modified Data File or * in the Software as well as in the documentation associated with the Data * File(s) or Software that the data or software has been modified. * * THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY * KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR * CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THE DATA FILES OR SOFTWARE. * * Except as contained in this notice, the name of a copyright holder shall not * be used in advertising or otherwise to promote the sale, use or other * dealings in these Data Files or Software without prior written authorization * of the copyright holder. */ package sun.util.resources.cldr.gl; import sun.util.resources.OpenListResourceBundle; public class LocaleNames_gl extends OpenListResourceBundle { @Override protected final Object[][] getContents() { final Object[][] data = new Object[][] { { "001", "Mundo" }, { "002", "\u00c1frica" }, { "003", "Norteam\u00e9rica" }, { "005", "Sudam\u00e9rica" }, { "009", "Ocean\u00eda" }, { "011", "\u00c1frica Occidental" }, { "013", "Am\u00e9rica Central" }, { "014", "\u00c1frica Oriental" }, { "015", "\u00c1frica Septentrional" }, { "017", "\u00c1frica Central" }, { "018", "\u00c1frica Meridional" }, { "019", "Am\u00e9rica" }, { "021", "Am\u00e9rica do Norte" }, { "029", "Caribe" }, { "030", "Asia Oriental" }, { "034", "Sul de Asia" }, { "035", "Sureste Asi\u00e1tico" }, { "039", "Europa Meridional" }, { "053", "Australia e Nova Celandia" }, { "054", "Melanesia" }, { "057", "Rexi\u00f3n da Micronesia" }, { "061", "Polinesia" }, { "142", "Asia" }, { "143", "Asia Central" }, { "145", "Asia Occidental" }, { "150", "Europa" }, { "151", "Europa do Leste" }, { "154", "Europa Septentrional" }, { "155", "Europa Occidental" }, { "419", "Am\u00e9rica Latina" }, { "AC", "Illa de Ascensi\u00f3n" }, { "AD", "Andorra" }, { "AE", "Emiratos \u00c1rabes Unidos" }, { "AF", "Afganist\u00e1n" }, { "AG", "Antiga e Barbuda" }, { "AI", "Anguila" }, { "AL", "Albania" }, { "AM", "Armenia" }, { "AN", "Antillas Holandesas" }, { "AO", "Angola" }, { "AQ", "Ant\u00e1rtida" }, { "AR", "Arxentina" }, { "AS", "Samoa Americana" }, { "AT", "Austria" }, { "AU", "Australia" }, { "AW", "Aruba" }, { "AX", "Illas Aland" }, { "AZ", "Acerbaix\u00e1n" }, { "BA", "Bosnia e Hercegovina" }, { "BB", "Barbados" }, { "BD", "Bangladesh" }, { "BE", "B\u00e9lxica" }, { "BF", "Burkina Faso" }, { "BG", "Bulgaria" }, { "BH", "Bahrein" }, { "BI", "Burundi" }, { "BJ", "Benin" }, { "BL", "San Bartolom\u00e9" }, { "BM", "Bermudas" }, { "BN", "Brunei" }, { "BO", "Bolivia" }, { "BR", "Brasil" }, { "BS", "Bahamas" }, { "BT", "But\u00e1n" }, { "BV", "Illa Bouvet" }, { "BW", "Botsuana" }, { "BY", "Bielorrusia" }, { "BZ", "Belice" }, { "CA", "Canad\u00e1" }, { "CC", "Illas Cocos" }, { "CD", "Rep\u00fablica Democr\u00e1tica do Congo" }, { "CF", "Rep\u00fablica Africana Central" }, { "CG", "Congo" }, { "CH", "Su\u00edza" }, { "CI", "Costa de Marfil" }, { "CK", "Illas Cook" }, { "CL", "Chile" }, { "CM", "Camer\u00fan" }, { "CN", "China" }, { "CO", "Colombia" }, { "CP", "Illa Clipperton" }, { "CR", "Costa Rica" }, { "CS", "Serbia e Montenegro" }, { "CU", "Cuba" }, { "CV", "Cabo Verde" }, { "CX", "Illa Christmas" }, { "CY", "Chipre" }, { "CZ", "Rep\u00fablica Checa" }, { "DE", "Alema\u00f1a" }, { "DG", "Diego Garc\u00eda" }, { "DJ", "Xibuti" }, { "DK", "Dinamarca" }, { "DM", "Dominica" }, { "DO", "Rep\u00fablica Dominicana" }, { "DZ", "Arxelia" }, { "EA", "Ceuta e Melilla" }, { "EC", "Ecuador" }, { "EE", "Estonia" }, { "EG", "Exipto" }, { "EH", "Sahara Occidental" }, { "ER", "Eritrea" }, { "ES", "Espa\u00f1a" }, { "ET", "Etiop\u00eda" }, { "EU", "Uni\u00f3n Europea" }, { "FI", "Finlandia" }, { "FJ", "Fixi" }, { "FK", "Illas Malvinas" }, { "FM", "Micronesia" }, { "FO", "Illas Feroe" }, { "FR", "Francia" }, { "GA", "Gab\u00f3n" }, { "GB", "Reino Unido" }, { "GD", "Granada" }, { "GE", "Xeorxia" }, { "GF", "G\u00fciana Francesa" }, { "GG", "Guernsey" }, { "GH", "Gana" }, { "GI", "Xibraltar" }, { "GL", "Grenlandia" }, { "GM", "Gambia" }, { "GN", "Guinea" }, { "GP", "Guadalupe" }, { "GQ", "Guinea Ecuatorial" }, { "GR", "Grecia" }, { "GS", "Xeorxia do Sur e Illas Sandwich" }, { "GT", "Guatemala" }, { "GU", "Guam" }, { "GW", "Guinea-Bissau" }, { "GY", "G\u00fciana" }, { "HK", "Hong Kong RAE de China" }, { "HM", "Illa Heard e Illas McDonald" }, { "HN", "Honduras" }, { "HR", "Croacia" }, { "HT", "Hait\u00ed" }, { "HU", "Hungr\u00eda" }, { "IC", "Illas Canarias" }, { "ID", "Indonesia" }, { "IE", "Irlanda" }, { "IL", "Israel" }, { "IM", "Illa de Man" }, { "IN", "India" }, { "IO", "Territorio Brit\u00e1nico do Oc\u00e9ano \u00cdndico" }, { "IQ", "Iraq" }, { "IR", "Ir\u00e1n" }, { "IS", "Islandia" }, { "IT", "Italia" }, { "JE", "Jersey" }, { "JM", "Xamaica" }, { "JO", "Xordania" }, { "JP", "Xap\u00f3n" }, { "KE", "Quenia" }, { "KG", "Quirguicist\u00e1n" }, { "KH", "Cambodia" }, { "KI", "Kiribati" }, { "KM", "Comores" }, { "KN", "San Cristovo e Nevis" }, { "KP", "Corea do Norte" }, { "KR", "Corea do Sur" }, { "KW", "Kuwait" }, { "KY", "Illas Caim\u00e1n" }, { "KZ", "Kazakhstan" }, { "LA", "Laos" }, { "LB", "L\u00edbano" }, { "LC", "Santa Luc\u00eda" }, { "LI", "Liechtenstein" }, { "LK", "Sri Lanka" }, { "LR", "Liberia" }, { "LS", "Lesotho" }, { "LT", "Lituania" }, { "LU", "Luxemburgo" }, { "LV", "Letonia" }, { "LY", "Libia" }, { "MA", "Marrocos" }, { "MC", "M\u00f3naco" }, { "MD", "Moldova" }, { "ME", "Montenegro" }, { "MF", "San Marti\u00f1o" }, { "MG", "Madagascar" }, { "MH", "Illas Marshall" }, { "MK", "Macedonia" }, { "ML", "Mali" }, { "MM", "Myanmar" }, { "MN", "Mongolia" }, { "MO", "Macau RAE de China" }, { "MP", "Illas Marianas do norte" }, { "MQ", "Martinica" }, { "MR", "Mauritania" }, { "MS", "Montserrat" }, { "MT", "Malta" }, { "MU", "Mauricio" }, { "MV", "Maldivas" }, { "MW", "Malaui" }, { "MX", "M\u00e9xico" }, { "MY", "Malaisia" }, { "MZ", "Mozambique" }, { "NA", "Namibia" }, { "NC", "Nova Caledonia" }, { "NE", "N\u00edxer" }, { "NF", "Illa Norfolk" }, { "NG", "Nixeria" }, { "NI", "Nicaragua" }, { "NL", "Pa\u00edses Baixos" }, { "NO", "Noruega" }, { "NP", "Nepal" }, { "NR", "Nauru" }, { "NU", "Niue" }, { "NZ", "Nova Celandia" }, { "OM", "Om\u00e1n" }, { "PA", "Panam\u00e1" }, { "PE", "Per\u00fa" }, { "PF", "Polinesia Francesa" }, { "PG", "Pap\u00faa Nova Guinea" }, { "PH", "Filipinas" }, { "PK", "Paquist\u00e1n" }, { "PL", "Polonia" }, { "PM", "San Pedro e Miguel\u00f3n" }, { "PN", "Pitcairn" }, { "PR", "Porto Rico" }, { "PS", "Palestina" }, { "PT", "Portugal" }, { "PW", "Palau" }, { "PY", "Paraguai" }, { "QA", "Qatar" }, { "QO", "Ocean\u00eda Distante" }, { "RE", "Reuni\u00f3n" }, { "RO", "Roman\u00eda" }, { "RS", "Serbia" }, { "RU", "Rusia" }, { "RW", "Ruanda" }, { "SA", "Arabia Saudita" }, { "SB", "Illas Salom\u00f3n" }, { "SC", "Seixeles" }, { "SD", "Sud\u00e1n" }, { "SE", "Suecia" }, { "SG", "Singapur" }, { "SH", "Santa Helena" }, { "SI", "Eslovenia" }, { "SJ", "Svalbard e Jan Mayen" }, { "SK", "Eslovaquia" }, { "SL", "Serra Leoa" }, { "SM", "San Marino" }, { "SN", "Senegal" }, { "SO", "Somalia" }, { "SR", "Surinam" }, { "ST", "Santo Tom\u00e9 e Pr\u00edncipe" }, { "SV", "El Salvador" }, { "SY", "Siria" }, { "SZ", "Suacilandia" }, { "TA", "Trist\u00e1n da Cunha" }, { "TC", "Illas Turks e Caicos" }, { "TD", "Chad" }, { "TF", "Territorios Franceses do Sul" }, { "TG", "Togo" }, { "TH", "Tailandia" }, { "TJ", "Taxiquist\u00e1n" }, { "TK", "Tokelau" }, { "TL", "Timor Leste" }, { "TM", "Turkmenist\u00e1n" }, { "TN", "Tunisia" }, { "TO", "Tonga" }, { "TR", "Turqu\u00eda" }, { "TT", "Trindade e Tobago" }, { "TV", "Tuvalu" }, { "TW", "Taiw\u00e1n" }, { "TZ", "Tanzania" }, { "UA", "Ucra\u00edna" }, { "UG", "Uganda" }, { "UM", "Illas Menores Distantes dos EUA." }, { "US", "Estados Unidos de Am\u00e9rica" }, { "UY", "Uruguai" }, { "UZ", "Uzbekist\u00e1n" }, { "VA", "Cidade do Vaticano" }, { "VC", "San Vicente e Granadinas" }, { "VE", "Venezuela" }, { "VG", "Illas Virxes Brit\u00e1nicas" }, { "VI", "Illas Virxes Estadounidenses" }, { "VN", "Vietnam" }, { "VU", "Vanuatu" }, { "WF", "Wallis e Futuna" }, { "WS", "Samoa" }, { "YE", "Iemen" }, { "YT", "Mayotte" }, { "ZA", "Sud\u00e1frica" }, { "ZM", "Zambia" }, { "ZW", "Cimbabue" }, { "ZZ", "rexi\u00f3n desco\u00f1ecida" }, { "ab", "abkhazo" }, { "af", "afrikaans" }, { "am", "am\u00e1rico" }, { "an", "aragon\u00e9s" }, { "ar", "\u00e1rabe" }, { "as", "assam\u00e9s" }, { "ay", "aimar\u00e1" }, { "az", "azerbaiano" }, { "be", "bielorruso" }, { "bg", "b\u00falgaro" }, { "bh", "bihariano" }, { "bn", "bengal\u00ed" }, { "bo", "tibetano" }, { "br", "bret\u00f3n" }, { "bs", "bosnio" }, { "ca", "catal\u00e1n" }, { "cs", "checo" }, { "cu", "eslavo eclesi\u00e1stico" }, { "cy", "gal\u00e9s" }, { "da", "dinamarqu\u00e9s" }, { "de", "alem\u00e1n" }, { "dv", "divehi" }, { "dz", "dzongkha" }, { "el", "grego" }, { "en", "ingl\u00e9s" }, { "eo", "esperanto" }, { "es", "espa\u00f1ol" }, { "et", "estoniano" }, { "eu", "\u00e9uscaro" }, { "fa", "persa" }, { "fi", "fin\u00e9s" }, { "fj", "fixiano" }, { "fo", "faro\u00e9s" }, { "fr", "franc\u00e9s" }, { "fy", "fris\u00f3n" }, { "ga", "irland\u00e9s" }, { "gd", "ga\u00e9lico escoc\u00e9s" }, { "gl", "galego" }, { "gn", "guaran\u00ed" }, { "gu", "guxaratiano" }, { "ha", "hausa" }, { "he", "hebreo" }, { "hi", "hindi" }, { "hr", "croata" }, { "ht", "haitiano" }, { "hu", "h\u00fangaro" }, { "hy", "armenio" }, { "ia", "interlingua" }, { "id", "indonesio" }, { "ig", "ibo" }, { "is", "island\u00e9s" }, { "it", "italiano" }, { "ja", "xapon\u00e9s" }, { "jv", "xavan\u00e9s" }, { "ka", "xeorxiano" }, { "kk", "casaco" }, { "km", "cambodiano" }, { "kn", "kannada" }, { "ko", "coreano" }, { "ks", "cachemir" }, { "ku", "kurdo" }, { "ky", "kyrgiz" }, { "la", "lat\u00edn" }, { "lb", "luxemburgu\u00e9s" }, { "ln", "lingala" }, { "lo", "laotiano" }, { "lt", "lituano" }, { "lv", "let\u00f3n" }, { "mg", "malgaxe" }, { "mi", "maor\u00ed" }, { "mk", "macedonio" }, { "ml", "malabar" }, { "mn", "mongol" }, { "mr", "marathi" }, { "ms", "malaio" }, { "mt", "malt\u00e9s" }, { "my", "birmano" }, { "nb", "noruegu\u00e9s bokmal" }, { "nd", "ndebele do norte" }, { "ne", "nepal\u00ed" }, { "nl", "holand\u00e9s" }, { "nn", "noruegu\u00e9s nynorsk" }, { "no", "noruegu\u00e9s" }, { "ny", "chewa" }, { "oc", "occitano" }, { "or", "oriya" }, { "os", "osetio" }, { "pa", "punjabi" }, { "pl", "polaco" }, { "ps", "paxt\u00fan" }, { "pt", "portugu\u00e9s" }, { "qu", "quechua" }, { "rm", "romanche" }, { "rn", "rundi" }, { "ro", "roman\u00e9s" }, { "ru", "ruso" }, { "rw", "ruand\u00e9s" }, { "sa", "s\u00e1nscrito" }, { "sd", "sindhi" }, { "se", "sami do norte" }, { "sg", "sango" }, { "sh", "serbocroata" }, { "si", "cingal\u00e9s" }, { "sk", "eslovaco" }, { "sl", "esloveno" }, { "sm", "samoano" }, { "sn", "shona" }, { "so", "somal\u00ed" }, { "sq", "alban\u00e9s" }, { "sr", "serbio" }, { "ss", "swati" }, { "st", "sesoto" }, { "su", "sondan\u00e9s" }, { "sv", "sueco" }, { "sw", "swahili" }, { "ta", "tamil" }, { "te", "telugu" }, { "tg", "taxico" }, { "th", "tailand\u00e9s" }, { "ti", "tigri\u00f1a" }, { "tk", "turcomano" }, { "tl", "tagalo" }, { "tn", "tswana" }, { "to", "tongano" }, { "tr", "turco" }, { "ts", "xitsonga" }, { "tt", "t\u00e1rtaro" }, { "ty", "tahitiano" }, { "ug", "uigur" }, { "uk", "ucra\u00edno" }, { "ur", "urd\u00fa" }, { "uz", "uzbeco" }, { "ve", "venda" }, { "vi", "vietnamita" }, { "wo", "w\u00f3lof" }, { "xh", "xhosa" }, { "yi", "yiddish" }, { "yo", "ioruba" }, { "zh", "chin\u00e9s" }, { "zu", "zul\u00fa" }, { "afa", "lingua afro-asi\u00e1tica" }, { "alg", "lingua algonquina" }, { "apa", "lingua apache" }, { "arc", "arameo" }, { "art", "lingua artificial" }, { "ast", "asturiano" }, { "aus", "lingua australiana" }, { "bat", "lingua b\u00e1ltica" }, { "cai", "lingua india centroamericana" }, { "cau", "lingua cauc\u00e1sica" }, { "cel", "lingua c\u00e9ltica" }, { "efi", "ibibio" }, { "egy", "exipcio antigo" }, { "fil", "filipino" }, { "fiu", "lingua finno-\u00fagrica" }, { "gem", "lingua xerm\u00e1nica" }, { "grc", "grego antigo" }, { "gsw", "alem\u00e1n su\u00edzo" }, { "haw", "hawaiano" }, { "inc", "lingua \u00edndica" }, { "ine", "lingua indoeuropea" }, { "mis", "lingua miscel\u00e1nea" }, { "mul", "varias linguas" }, { "nai", "lingua india norteamericana" }, { "nub", "lingua nubia" }, { "phi", "lingua filipina" }, { "roa", "lingua rom\u00e1nica" }, { "sai", "lingua india sudamericana" }, { "sem", "lingua semita" }, { "sgn", "lingua de signos" }, { "sla", "lingua esl\u00e1vica" }, { "ssa", "lingua do nilo-s\u00e1hara" }, { "tet", "tet\u00fan" }, { "tlh", "clingon" }, { "tpi", "tok pisin" }, { "tut", "lingua altaica" }, { "und", "lingua desco\u00f1ecida ou non v\u00e1lida" }, { "zxx", "sen contido ling\u00fc\u00edstico" }, { "Arab", "\u00c1rabe" }, { "Armn", "Armenio" }, { "Beng", "Bengal\u00ed" }, { "Bopo", "Bopomofo" }, { "Brai", "Braille" }, { "Cans", "Silabario aborixe canadiano unificado" }, { "Cyrl", "Cir\u00edlico" }, { "Deva", "Devanagari" }, { "Ethi", "Et\u00edope" }, { "Geor", "Xeorxiano" }, { "Grek", "Grego" }, { "Gujr", "Guxarati" }, { "Guru", "Gurmukhi" }, { "Hang", "Hangul" }, { "Hani", "Han" }, { "Hans", "Simplificado" }, { "Hant", "Tradicional" }, { "Hebr", "Hebreo" }, { "Hira", "Hiragana" }, { "Jpan", "Xapon\u00e9s" }, { "Kana", "Katakana" }, { "Khmr", "Camboxano" }, { "Knda", "Kannad\u00e9s" }, { "Kore", "Coreano" }, { "Laoo", "Laosiano" }, { "Latn", "Latino" }, { "Mlym", "Malabar" }, { "Mong", "Mongol" }, { "Mymr", "Birmania" }, { "Orya", "Oriya" }, { "Sinh", "Cingal\u00e9s" }, { "Taml", "T\u00e1mil" }, { "Telu", "Telug\u00fa" }, { "Thaa", "Thaana" }, { "Thai", "Tailand\u00e9s" }, { "Tibt", "Tibetano" }, { "Zsym", "S\u00edmbolos" }, { "Zxxx", "non escrita" }, { "Zyyy", "Com\u00fan" }, { "Zzzz", "escritura desco\u00f1ecida" }, { "de_AT", "alem\u00e1n de austria" }, { "de_CH", "alto alem\u00e1n su\u00edzo" }, { "en_AU", "ingl\u00e9s australiano" }, { "en_CA", "ingl\u00e9s canadiano" }, { "en_GB", "ingl\u00e9s brit\u00e1nico" }, { "en_US", "ingl\u00e9s americano" }, { "es_ES", "castel\u00e1n" }, { "fr_CA", "franc\u00e9s canadiano" }, { "fr_CH", "franc\u00e9s su\u00edzo" }, { "nl_BE", "flamenco" }, { "pt_BR", "portugu\u00e9s brasileiro" }, { "pt_PT", "portugu\u00e9s ib\u00e9rico" }, { "es_419", "espa\u00f1ol latinoamericano" }, { "zh_Hans", "chin\u00e9s simplificado" }, { "zh_Hant", "chin\u00e9s tradicional" }, }; return data; } }
[ "atoth1571@gmail.com" ]
atoth1571@gmail.com
644ac93eaf5f3a1b092883550100305129ffdf38
1c91d78b1734b361ea06ffbdede2a4d3a889f821
/src/MainMenu.java
17ca89cef1de6ccc6b840e81a9db4524f9710758
[]
no_license
Julio-L/AnimeLib
6d52cf66d4fb9d4e4d80e23888af0a193bced7fa
475231e696ad849a04b19d03079a4b47038be209
refs/heads/master
2023-07-21T07:53:23.626708
2021-08-25T16:52:53
2021-08-25T16:52:53
399,869,899
0
0
null
null
null
null
UTF-8
Java
false
false
5,998
java
import javafx.scene.Scene; import javafx.scene.control.Button; /** * * @author JulioL */ public class MainMenu extends Panel { //listview that handles add/remove private CollectionManager list; //panel used to display the genre selected //buttons private Button[] addGenre; private Type currentGenre; //add window private InputModel addWindow; private boolean isAddOpen = false; private GenrePanel genrePanel; private Scene genreScene; public MainMenu(int cHeight, int width, int mHeight, String fStyle, short fSize) { super(cHeight, width, mHeight, fStyle, fSize); super.setTitle(Settings.TITLE); super.setUpCustomization(); super.setMain(); this.setOnClose(); //setup genre panel genrePanel = new GenrePanel(this, cHeight, width, mHeight, fStyle, Settings.genrePFSize); genreScene = genrePanel.getMainScene(); //setup list double[] listS = computeListSettings(); list = new CollectionManager(this, listS[0], listS[1]); list.addToPanel(super.getCenterPane()); //create add window which is shared with Manga and Anime button addWindow = new InputModel("Add", Settings.addCHeight, Settings.addWidth, Settings.addMHeight, Settings.numRows, super.getfStyle(), Settings.addFSize); addWindow.renameRows(Settings.addTitles); addWindow.getModelSelect().setOnMousePressed(e -> insertNewGenre()); //setup buttons// //adds a new anime/manga to open addWindow addGenre = new Button[2]; addGenre[0] = new Button("Manga"); addGenre[0].setOnMousePressed(e -> addManga()); addGenre[1] = new Button("Anime"); addGenre[1].setOnMousePressed(e -> addAnime()); for (int i = 0; i < addGenre.length; i++) { addGenre[i].setPrefHeight(Settings.addGenreHeight); addGenre[i].setPrefWidth(Settings.addGenreWidth); super.addToMenuBar(addGenre[i], 0, 0); } //position Manga and Anime buttons in the menu bar posMangaAnimeButtons(); positionList(); } public void setOnClose(){ super.getMain().setOnCloseRequest(e ->{ super.getOtherWindow().close(); genrePanel.getOtherWindow().close(); }); } public String saveFormat() { return super.saveFormat() + "," + list.getNumItems(); } public void repositionLayout(int cHeight, int width) { super.repositionLayout(cHeight, width); super.clearImages(); this.posMangaAnimeButtons(); double[] listS = computeListSettings(); list.setupList(listS[0], listS[1]); this.positionList(); super.getMain().setWidth(width + 16); super.getMain().setHeight(super.getmHeight() + cHeight + 39); genrePanel.repositionHelper(cHeight, width); } public void posMangaAnimeButtons() { //[ totalButtonsW ] = [Manga] + [Anime] + offset*2 double cX = super.getCustomizeX(); double totalButtonsW = (Settings.addGenreWidth * 2) + Settings.offset * 2; double y = super.getmHeight() / 2 - (Settings.addGenreHeight / 2); addGenre[0].setLayoutX(cX - totalButtonsW); addGenre[0].setLayoutY(y); addGenre[1].setLayoutX(cX - totalButtonsW + Settings.offset + Settings.addGenreWidth); addGenre[1].setLayoutY(y); } public void listToFront(){ list.toFront(); } public double[] computeListSettings() { double cX = super.getCustomizeX(); double totalButtonsW = (Settings.addGenreWidth * 2) + Settings.offset * 2; // double listH = super.getHeightT() * Settings.listHeightScale; double listH = super.getcHeight() * Settings.listHeightScale; double listW = super.getWidthT() - (cX - totalButtonsW) - Settings.listWidthOffset; if (list != null) { list.setupList(listH, listW); } return new double[]{listH, listW}; } public void positionList() { // window width - list width - list width * scale double x = addGenre[0].getLayoutX(); // [(center height / 2 ) - (list height/2)] [CENTERS THE LISTVIEW] double y = (super.getcHeight() / 2.0) - (list.getWidthT() / 2.0); list.setListPosition(x, y); } public void addManga() { addWindow.setTitle("Add Manga"); addWindow.editLabel(1, "Chapter: "); currentGenre = Type.MANGA; openNewWindow(addWindow.getMainScene()); } public void addAnime() { addWindow.setTitle("Add Anime"); addWindow.editLabel(1, "Episode: "); currentGenre = Type.ANIME; openNewWindow(addWindow.getMainScene()); } public void insertNewGenre() { boolean valid = InfoManager.checkInputs(addWindow); if (!valid) { return; } //0 - Name //1 - Ep/chapter //2 - Rating String texts[] = addWindow.getLabelTexts().split(","); Genre newGenre = null; String name = texts[0]; int pos = Integer.parseInt(texts[1]); int rating = Integer.parseInt(texts[2]); if (currentGenre == Type.MANGA) { newGenre = new Genre(name, pos, rating, "", Type.MANGA); } else { newGenre = new Genre(name, pos, rating, "", Type.ANIME); } newGenre.setWidth((int) 800); newGenre.setcHeight((int) 400); newGenre.setmHeight((int) 60); newGenre.setfSize((short) this.getfSize()); newGenre.setfStyle(this.getfStyle()); list.addGenre(newGenre); } public void setForSave(){ list.setCollection(); } public GenrePanel getGenrePanel() { return genrePanel; } public Scene getGenreScene() { return genreScene; } public CollectionManager getList() { return list; } }
[ "lima.julio@yahoo.com" ]
lima.julio@yahoo.com
8c54333d8281fac32f8ae271a3433cd484d938fb
13ff3348bf81f4f36ca0feccf1dbd8cdc9f9c48c
/src/main/java/com/openwarehouse/openwarehousemanagement/domain/AbstractAuditingEntity.java
711db6546f5c203e2cf76e19e863fe104bafd904
[]
no_license
awabcodes/open-warehouse-management
19528c08d4bde9289bb7afec05b5be463cb3def1
4364572073758eef8c6fab28efb8e63d8282cf3a
refs/heads/master
2023-05-15T10:11:01.186595
2019-06-23T08:07:01
2019-06-23T08:07:01
183,615,265
0
0
null
2023-04-30T23:58:11
2019-04-26T11:16:53
Java
UTF-8
Java
false
false
2,238
java
package com.openwarehouse.openwarehousemanagement.domain; import com.fasterxml.jackson.annotation.JsonIgnore; import org.hibernate.envers.Audited; import org.springframework.data.annotation.CreatedBy; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.annotation.LastModifiedBy; import org.springframework.data.annotation.LastModifiedDate; import org.springframework.data.jpa.domain.support.AuditingEntityListener; import java.io.Serializable; import java.time.Instant; import javax.persistence.Column; import javax.persistence.EntityListeners; import javax.persistence.MappedSuperclass; /** * Base abstract class for entities which will hold definitions for created, last modified by and created, * last modified by date. */ @MappedSuperclass @Audited @EntityListeners(AuditingEntityListener.class) public abstract class AbstractAuditingEntity implements Serializable { private static final long serialVersionUID = 1L; @CreatedBy @Column(name = "created_by", nullable = false, length = 50, updatable = false) @JsonIgnore private String createdBy; @CreatedDate @Column(name = "created_date", updatable = false) @JsonIgnore private Instant createdDate = Instant.now(); @LastModifiedBy @Column(name = "last_modified_by", length = 50) @JsonIgnore private String lastModifiedBy; @LastModifiedDate @Column(name = "last_modified_date") @JsonIgnore private Instant lastModifiedDate = Instant.now(); public String getCreatedBy() { return createdBy; } public void setCreatedBy(String createdBy) { this.createdBy = createdBy; } public Instant getCreatedDate() { return createdDate; } public void setCreatedDate(Instant createdDate) { this.createdDate = createdDate; } public String getLastModifiedBy() { return lastModifiedBy; } public void setLastModifiedBy(String lastModifiedBy) { this.lastModifiedBy = lastModifiedBy; } public Instant getLastModifiedDate() { return lastModifiedDate; } public void setLastModifiedDate(Instant lastModifiedDate) { this.lastModifiedDate = lastModifiedDate; } }
[ "awabcodes@gmail.com" ]
awabcodes@gmail.com
974ca5361e157cfeb9275d24b605d29f0e6a042c
724da55271b6c7a1040f2456e763888b50ef5636
/src/main/java/com/t2dstudio/admin/service/EmployeeService.java
0792bde964b4d5a2c751d0041ce54b8797377d60
[]
no_license
t2dstudio/AdminDashboard
83a402634c42b8406cdc60eaa36b4ddece296d85
4ba3e1699f7109c0b1410788bdfb5f1a80636567
refs/heads/master
2023-07-17T07:57:43.753524
2021-09-01T20:45:07
2021-09-01T20:45:07
400,272,168
0
0
null
null
null
null
UTF-8
Java
false
false
1,269
java
package com.t2dstudio.admin.service; import java.nio.file.attribute.UserPrincipalNotFoundException; import java.util.List; import java.util.UUID; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.t2dstudio.admin.exception.UserNotFoundException; import com.t2dstudio.admin.model.Employee; import com.t2dstudio.admin.repo.EmployeeRepo; @Transactional @Service public class EmployeeService { private final EmployeeRepo employeeRepo; @Autowired public EmployeeService(EmployeeRepo employeeRepo) { this.employeeRepo = employeeRepo; } public Employee addEmployee(Employee employee) { employee.setEmployeeCode(UUID.randomUUID().toString()); return employeeRepo.save(employee); } public List<Employee> findAllEmployees(){ return employeeRepo.findAll(); } public Employee updateEmployee(Employee employee) { return employeeRepo.save(employee); } public void deleteEmployee(Long id) { employeeRepo.deleteEmployeeById(id); } public Employee findEmployeeById(Long id) { return employeeRepo.findEmployeeById(id) .orElseThrow(()-> new UserNotFoundException("User by id" + id +"was not found")); } }
[ "t2dstudio@yahoo.com" ]
t2dstudio@yahoo.com
6698150c5fb98ffc2972c547fee8832288879faa
0ee9f5085bb5b77a3958bf4292d4f97ac56c78c0
/ssqsa_2.0/CloneUI/src/mainFrame/bottomPanel/SimilarityTextPane.java
2060137cf242083761f4b659555ed3293bd2052d
[]
no_license
gocko/licca
b123058f5c2b55c2553cf0e4e076a39f61f52027
bea9f9fa3f5ef3f5d771e4483721b500dac2b1ae
refs/heads/master
2020-06-04T01:09:54.042259
2019-06-26T12:45:00
2019-06-26T12:45:00
191,809,258
4
1
null
2019-06-26T12:37:39
2019-06-13T17:52:00
Java
UTF-8
Java
false
false
1,929
java
package mainFrame.bottomPanel; import java.awt.Dimension; import java.io.File; import javax.swing.JTextPane; import pubSub.Message; import pubSub.MessageBroker; import pubSub.Subscriber; import datastructures.detectionUnit.DetectionUnit; import datastructures.result.Result; public class SimilarityTextPane extends JTextPane implements Subscriber { private static final long serialVersionUID = 1L; public SimilarityTextPane() { MessageBroker.instance().register(this); setPreferredSize(new Dimension(100, 50)); setEditable(false); setText("*** CLONE DETECTION OUTPUT LOG ***"); } @Override public Class<?>[] messageTypes() { return new Class<?>[] { Result.class }; } @Override public void onMessageReceived(Message message) { Result result = (Result) message.getData(); similarity(result); setText(similarity(result) + statementsMatched(result, result.getDetectionUnit1()) + statementsMatched(result, result.getDetectionUnit2())); } private String similarity(Result result) { return "Similarity = " + (int) (result.getSimilarity() * 100) + "%\n"; } private String statementsMatched(Result result, DetectionUnit detectionUnit) { return fileLabel(detectionUnit) + ": " + coverage(result.getNumberOfStatementsMatched(), detectionUnit.getNumberOfStatements()) + "% coverage " + "(" + result.getNumberOfStatementsMatched() + "/" + detectionUnit.getNumberOfStatements() + " statements)" + "\n"; } private int coverage(int statementsMatched, int totalNumberOfStatements) { double coverage = (double) statementsMatched / totalNumberOfStatements; return (int) (coverage * 100); } private String fileLabel(DetectionUnit detectionUnit) { String absolutePath = detectionUnit.getSourceFile().getAbsolutePath(); String label = absolutePath.substring(absolutePath .lastIndexOf(File.separator) + 1); return label.substring(0, label.indexOf("_")); } }
[ "tijana.vislavski@dmi.uns.ac.rs" ]
tijana.vislavski@dmi.uns.ac.rs
da548cf50954acc1b3528a93a86f0cf007befa76
5803afd38d28e99c25d7ff87b76e46bd387a5769
/Etape 6/ProtocoleTICKMAP/src/tickmap/KeyExchangeTICKMAP.java
785b609ad98a7a8b0c9c5e9574eaa67811a6aba3
[]
no_license
Doublon/EcommerceSecondSess
85e1a73aba20339d51839a7d4f929b272e911c63
fc118cc88549b1b3021ae4d8054b3bf1e61d0a8c
refs/heads/master
2020-03-27T10:15:53.839250
2018-09-22T21:57:57
2018-09-22T21:57:57
146,407,663
0
0
null
null
null
null
UTF-8
Java
false
false
944
java
package tickmap; import java.io.Serializable; import javax.crypto.SecretKey; import requetepoolthreads.Reponse; public class KeyExchangeTICKMAP implements Reponse, Serializable { public static int SEND_KEYS_OK = 202; public static int SEND_KEYS_ERROR = 403; private final int codeRetour; private final SecretKey cleChiffrement; private final SecretKey cleHMAC; public KeyExchangeTICKMAP(int cR) { codeRetour = cR; cleChiffrement = null; cleHMAC = null; } public KeyExchangeTICKMAP(int cR, SecretKey cleC, SecretKey cleH) { codeRetour = cR; cleChiffrement = cleC; cleHMAC = cleH; } @Override public int getCode() { return codeRetour; } public SecretKey getCleChiffrement() { return cleChiffrement; } public SecretKey getCleHMAC() { return cleHMAC; } }
[ "tussetquentin07@hotmail.com" ]
tussetquentin07@hotmail.com
b967d9a57fa5e9dd83fc501c672ab576b3071534
6230acd07faa3f70a1276176eff6166e984b738b
/src/main/java/com/nickmlanglois/wfp3/api/statement/CurveApproxCspaceTechnique.java
aca854e75f3a827b54f436197b63eb98f9fd99ad
[ "Apache-2.0" ]
permissive
heathen00/wfparser3
f9c5b4bb5d09c42f3bccbc4badd3069798257879
4419398ebf724fcd7208719a64d56c5a99ba662b
refs/heads/master
2022-02-16T13:50:20.725867
2019-09-19T20:51:23
2019-09-19T20:51:23
175,873,981
0
0
null
null
null
null
UTF-8
Java
false
false
719
java
package com.nickmlanglois.wfp3.api.statement; import java.math.BigDecimal; /** * The constant spatial subdivision curve approximation technique. * * ctech cspace maxlength * * Specifies a curve with constant spatial subdivision. The curve is approximated by a series of * line segments whose lengths in real space are less than or equal to the maxlength. * * maxlength is the maximum length of the line segments. The smaller the value, the finer the * resolution. * * @author nickl * */ public interface CurveApproxCspaceTechnique extends Comparable<CurveApproxCspaceTechnique>, CurveApprox { public static final BigDecimal MINIMUM_MAX_LENGTH = BigDecimal.ZERO; BigDecimal getMaxLength(); }
[ "nickmlanglois@gmail.com" ]
nickmlanglois@gmail.com
e90e5bebf9fdfb80ef58c69b843675966d8c49ae
00d2d487223e164c209cd70d33f9b9f00fcf2495
/android/app/src/main/java/com/alarmscehdulder/MainActivity.java
52576e74dc3a5a16e4258c0c4c4e1aa0292d13cf
[]
no_license
Imagine-Me/react-native-local-notification-ex
ec81d7981417d637cb483257cc8054c86ac21fa8
ba144f26ffbdcf3e805bccaf597a13d9ebacfeb9
refs/heads/main
2022-12-27T03:04:55.035758
2020-10-05T10:35:07
2020-10-05T10:35:07
301,371,034
0
0
null
null
null
null
UTF-8
Java
false
false
357
java
package com.alarmscehdulder; import com.facebook.react.ReactActivity; public class MainActivity extends ReactActivity { /** * Returns the name of the main component registered from JavaScript. This is used to schedule * rendering of the component. */ @Override protected String getMainComponentName() { return "AlarmScehdulder"; } }
[ "prince100thomas@gmail.com" ]
prince100thomas@gmail.com
fb0dc4d01b4a9a450438ac8183026c4e29e8b350
d31e0b420a6681524f00c607475fbf5c6063158c
/src/main/java/gov/hhs/acf/cb/nytd/actions/compliance/RecordLevelDQAExport.java
a850000a5bae48eb5d0127be9c580eca21527660
[]
no_license
MichaelKilleenSandbox/nytd-incremental
5dd5b851e91b2be8822f4455aeae4abf6bb8c64f
517f57420af7452d123d92f2d78d7b31d8f6f944
refs/heads/master
2023-07-18T23:47:15.871204
2021-08-27T20:32:07
2021-08-27T20:32:07
400,630,077
0
0
null
null
null
null
UTF-8
Java
false
false
1,901
java
package gov.hhs.acf.cb.nytd.actions.compliance; import com.opensymphony.xwork2.ActionSupport; import gov.hhs.acf.cb.nytd.actions.ExportableTable; import gov.hhs.acf.cb.nytd.models.RecordLevelAdvisory; import gov.hhs.acf.cb.nytd.service.DataExtractionService; import java.util.HashMap; import java.util.Map; /** * User: 23839 * Date: Jan 20, 2011 */ public class RecordLevelDQAExport extends ExportableTable<RecordLevelAdvisory> { public RecordLevelDQAExport(ActionSupport action, DataExtractionService dataExtractionService) { super(action, dataExtractionService); } protected void addColumns() { addColumn("Record Number", new ValueProvider<RecordLevelAdvisory>() { public String getValue(final RecordLevelAdvisory recordLevelAdvisory) { return recordLevelAdvisory.getDatum().getTransmissionRecord().getRecordNumber(); } }); addColumn("Element Number/Name", new ValueProvider<RecordLevelAdvisory>() { public String getValue(final RecordLevelAdvisory recordLevelAdvisory) { return recordLevelAdvisory.getDatum().getElement().getName() +" - "+recordLevelAdvisory.getDatum().getElement().getDescription() ; } }); /* addColumn("Element Name", new ExportableTable.ValueProvider<RecordLevelAdvisory>() { public String getValue(final RecordLevelAdvisory recordLevelAdvisory) { return recordLevelAdvisory.getDatum().getElement().getDescription(); } }); */ addColumn("Error Description", new ValueProvider<RecordLevelAdvisory>() { public String getValue(final RecordLevelAdvisory recordLevelAdvisory) { Map<String, Object> namedParams = new HashMap<String, Object>(); namedParams.put("elementNumber", recordLevelAdvisory.getDatum().getElement().getName()); return recordLevelAdvisory.formatText(recordLevelAdvisory.getProblemDescription().getName(),namedParams); } }); } }
[ "michaeljkilleen@outlook.com" ]
michaeljkilleen@outlook.com
60f585567c404dc33e269e7d67bbc9037083264c
c2fa04760594de051e51eb1b7102b827424951ae
/YiXin/.apt_generated/com/yxst/epic/yixin/rest/com/yxst/epic/yixin/rest/ServiceResult_Object.java
7d1312dab870c7510af6ebc7eb5527311b36c062
[ "Apache-2.0" ]
permissive
glustful/mika
c3d9c7b61f02ac94a7e750ebf84391464054e2a3
300c9e921fbefd00734882466819e5987cfc058b
refs/heads/master
2021-01-10T10:50:44.125499
2016-04-06T01:45:26
2016-04-06T01:45:26
55,567,241
0
0
null
null
null
null
UTF-8
Java
false
false
270
java
// // DO NOT EDIT THIS FILE, IT HAS BEEN GENERATED USING AndroidAnnotations 3.0.1. // package com.yxst.epic.yixin.rest.com.yxst.epic.yixin.rest; import com.yxst.epic.yixin.rest.ServiceResult; public class ServiceResult_Object extends ServiceResult<Object> { }
[ "852411097@qq.com" ]
852411097@qq.com
9878582c0cc8088343513630110f3311687dc710
72292f890527a404c30b93e010f0f3922d327d59
/Marchetti/nf-modeling-master-87a891e14833de7ee71f941d0532284571489bdc/nf-modeling-master-87a891e14833de7ee71f941d0532284571489bdc/src/it/polito/parser/IfElseBranch.java
04df7800f08fecbacb93ad25e8550661aa26a3af
[]
no_license
netgroup-polito/vnf-modeling
1b5e5e1a3d87710c2022415e7ff8add78e4798f7
678edbd60cbb4a424f4e14412e72a1da07389f62
refs/heads/master
2020-05-29T08:52:09.843587
2017-12-06T10:22:12
2017-12-06T10:22:12
69,366,553
0
0
null
null
null
null
UTF-8
Java
false
false
1,067
java
package it.polito.parser; import org.eclipse.jdt.core.dom.IfStatement; public class IfElseBranch { public enum Branch { IF, ELSE }; private IfStatement statement; private Branch branch; private int nestingLevel; public int getNestingLevel() { return nestingLevel; } public void setNestingLevel(int nestingLevel) { this.nestingLevel = nestingLevel; } public IfStatement getStatement() { return statement; } public void setStatement(IfStatement statement) { this.statement = statement; } public Branch getBranch() { return branch; } public void setBranch(Branch branch) { this.branch = branch; } public boolean ifBranchContainsReturn() { ReturnStatementExplorator r = new ReturnStatementExplorator(); statement.getThenStatement().accept(r); return r.hasReturnStatement(); } public boolean elseBranchContainsReturn() { if(statement.getElseStatement() == null) return false; ReturnStatementExplorator r = new ReturnStatementExplorator(); statement.getElseStatement().accept(r); return r.hasReturnStatement(); } }
[ "Marco@Marco-PC" ]
Marco@Marco-PC
46a22339606ea25848b13aaff35d2253a858d3c7
161b2c6dbaf41b8f18dc282492c38d8ec8695a1a
/src/java/com/codeminders/hamake/syntax/BaseSyntaxParser.java
e75ed2ca2611b7c963ce5a9b6157e6617826bc8f
[]
no_license
keren123/hamake
4adeac066ce549da1e01ac81587311adbd190dc6
4fc8903e80b1c5d0e6e04e6f5a3951badebfc527
refs/heads/master
2023-03-15T22:53:00.576309
2015-03-28T01:24:20
2015-03-28T01:24:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,324
java
package com.codeminders.hamake.syntax; import java.io.ByteArrayInputStream; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.apache.commons.io.output.ByteArrayOutputStream; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; import org.xml.sax.SAXException; import com.codeminders.hamake.Hamake; import com.codeminders.hamake.InvalidContextStateException; import com.codeminders.hamake.PigNotFoundException; import com.codeminders.hamake.Utils; import com.codeminders.hamake.context.Context; public abstract class BaseSyntaxParser { protected static boolean isPigAvailable = Utils.isPigAvailable(); public static Hamake parse(Context context, String filename) throws Exception { InputStream is = new FileInputStream(filename); try { return parse(context, is); } finally { try { is.close(); } catch (Exception ex) { /* Don't care */ } } } public static Hamake parse(Context context, InputStream is) throws IOException, ParserConfigurationException, SAXException, InvalidMakefileException, PigNotFoundException, InvalidContextStateException{ BaseSyntaxParser syntaxParser = new SyntaxParser(context); ByteArrayOutputStream bos = new ByteArrayOutputStream(); bos.write(is); if(syntaxParser.validate(new ByteArrayInputStream(bos.toByteArray()))){ Document doc = loadMakefile(new ByteArrayInputStream(bos.toByteArray())); return syntaxParser.parseSyntax(doc); } else{ throw new InvalidMakefileException("Hamake-file validation error"); } } protected abstract Hamake parseSyntax(Document dom) throws IOException, ParserConfigurationException, SAXException, InvalidMakefileException, PigNotFoundException, InvalidContextStateException; protected abstract boolean validate(InputStream is) throws SAXException, IOException; protected static Document loadMakefile(InputStream is) throws IOException, ParserConfigurationException, SAXException { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); return builder.parse(is); } protected static String getPath(Node n) { StringBuilder ret = new StringBuilder(); while (n != null && n.getNodeType() != Node.DOCUMENT_NODE) { ret.insert(0, n.getNodeName()).insert(0, '/'); n = n.getParentNode(); } return ret.toString(); } protected Element getMandatory(Element root, String name) throws InvalidMakefileException { NodeList c = root.getElementsByTagName(name); if (c.getLength() != 1) throw new InvalidMakefileException("Missing or ambiguous '" + name + "' section"); return (Element) c.item(0); } protected Element getOptional(Element root, String name) throws InvalidMakefileException { NodeList c = root.getElementsByTagName(name); if (c.getLength() != 1) throw new InvalidMakefileException("Missing or ambiguous '" + name + "' section"); return (Element) c.item(0); } protected Element getOneSubElement(Element root, String... elementNames) throws InvalidMakefileException{ for(String elementName : elementNames){ NodeList list = root.getElementsByTagName(elementName); if(list.getLength() > 0){ if(list.getLength() == 1){ return (Element) list.item(0); } else{ throw new InvalidMakefileException("Multiple elements '" + elementName + "' in " + getPath(root) + " are not permitted"); } } } return null; } protected String getRequiredAttribute(Element root, String name) throws InvalidMakefileException { if (root.hasAttribute(name)) { return root.getAttribute(name); } throw new InvalidMakefileException("Missing '" + name + "' attribute in '" + getPath(root) + "' element"); } protected String getOptionalAttribute(Element root, String name) { return getOptionalAttribute(root, name, null); } protected String getOptionalAttribute(Element root, String name, String defaultValue) { if (root.hasAttribute(name)) { return root.getAttribute(name); } return defaultValue; } }
[ "vorl.soft@b2eb0666-27cf-11de-a2f3-1373824ab735" ]
vorl.soft@b2eb0666-27cf-11de-a2f3-1373824ab735
29b7a7652ffdeaec314c26b2ad809fa01d7d209b
784d3431f2698e946233394347dba49bf8b27996
/JavaStandard/Chapter6/Exercise/Exercise6_2.java
f082dd8672648b084e168efaa7a3680892be1d12
[]
no_license
k8440009/Java_study
d3661f8499aa69d05a36464eb0182669b24813ff
bbde5e96980f0d1840f0ad239e86df68a65606b9
refs/heads/master
2023-02-23T21:45:23.287281
2021-01-29T14:41:14
2021-01-29T14:41:14
320,581,315
0
0
null
null
null
null
UTF-8
Java
false
false
530
java
package JavaStandard.Chapter6.Exercise; class SutdaCard{ private int num; private boolean isKwang; SutdaCard(){ this.num = 1; this.isKwang = true; } SutdaCard(int num, boolean isKwang){ this.num = num; this.isKwang = isKwang; } String info(){ return num + (isKwang ? "K" : ""); } } class Exercise6_2 { public static void main(String args[]) { SutdaCard card1 = new SutdaCard(3, false); SutdaCard card2 = new SutdaCard(); System.out.println(card1.info()); System.out.println(card2.info()); } }
[ "k8440009@gmail.com" ]
k8440009@gmail.com
afa0868d63d8243eddee5a9d248156de075c9fd9
33a5fcf025d92929669d53cf2dc3f1635eeb59c6
/昌平/app/src/main/java/com/mapuni/mobileenvironment/activity/AirActivity.java
aae04962c0a89348c2402f4363722ac24ba64493
[]
no_license
dayunxiang/MyHistoryProjects
2cacbe26d522eeb3f858d69aa6b3c77f3c533f37
6e041f53a184e7c4380ce25f5c0274aa10f06c8e
refs/heads/master
2020-11-29T09:23:27.085614
2018-03-12T07:07:18
2018-03-12T07:07:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,060
java
package com.mapuni.mobileenvironment.activity; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.widget.ListView; import android.widget.TextView; import com.mapuni.mobileenvironment.R; import com.mapuni.mobileenvironment.adapter.AirListAdapter; import com.mapuni.mobileenvironment.utils.TestData; import java.util.List; public class AirActivity extends AppCompatActivity { private ListView listView; private TextView noData; private List<String> list; private AirListAdapter adapter; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_air); initDate(); initView(); } private void initDate() { list= TestData.getAirSource(); } private void initView() { listView= (ListView) findViewById(R.id.list); noData= (TextView) findViewById(R.id.nodata); adapter=new AirListAdapter(this,list); listView.setAdapter(adapter); } }
[ "you@example.com" ]
you@example.com
86fbafe4b4b83eb76451d062bce7453e816e5dd5
7a184df2759885581e3a8aa20cf17849dd3c5334
/src/com/google/servlet/ImageServlet.java
5fbd45276f62129f3ff08d0cb14bec859da1776b
[]
no_license
oynix/WebServer
43df0c4f245f86af1efd7d3c9f6a3382ebca18da
53da381f2616d9d424fd2b01e62bf4e5d575c3cc
refs/heads/master
2020-04-09T20:07:09.095315
2016-07-01T07:03:04
2016-07-01T07:03:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,144
java
package com.google.servlet; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.OutputStream; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import android.os.Environment; public class ImageServlet extends BaseServlet { private static final long serialVersionUID = 1L; @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { resp.setStatus(HttpServletResponse.SC_OK); String name = req.getParameter("name"); String path = Environment.getExternalStorageDirectory().getAbsolutePath() + "/" + "WebInfos/" + name; File file = new File(path); long length = file.length(); resp.setContentLength((int) length); OutputStream out = resp.getOutputStream(); FileInputStream stream = new FileInputStream(file); int count = -1; byte[] buffer = new byte[1024]; while ((count = stream.read(buffer)) != -1) { out.write(buffer, 0, count); out.flush(); } stream.close(); out.close(); } }
[ "761614126@qq.com" ]
761614126@qq.com
c6424379dfb469e9051b14ae1e0c67102a0a09b4
53e78e7dc3cfa004fd4ed6aca644cd3100d3f74c
/src/main/java/Utils/Conexion.java
6d7f41530b1f7aa6a54919e3c59a9d2fd1b6cdbb
[]
no_license
FranciscoMorenoSantaella/WomboBongo
e0fdea851d67e0a7c6544e4b3d50558fb06d25e4
cb102cfe4c65fb3194e5c8c07b4d0f2b55e07725
refs/heads/main
2023-09-06T09:17:22.684051
2021-11-16T23:50:35
2021-11-16T23:50:35
422,827,454
0
0
null
null
null
null
UTF-8
Java
false
false
1,005
java
package Utils; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.ResultSetMetaData; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import java.util.List; public class Conexion { private static Connection con; private final static String server=XMLReader.getConectionInfo("server"); private final static String database=XMLReader.getConectionInfo("database"); private final static String username=XMLReader.getConectionInfo("user"); private final static String password=XMLReader.getConectionInfo("password"); public static void connect() { try { Class.forName("com.mysql.cj.jdbc.Driver"); con=DriverManager.getConnection(server+"/"+database,username,password); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (SQLException e) { con=null; e.printStackTrace(); } } public static Connection getConnection() { if(con==null) { connect(); } return con; } }
[ "santaellamorenofrancisco@gmail.com" ]
santaellamorenofrancisco@gmail.com
b668ac26f8a6fbd7af8d856b0509d929da4f95d5
e85ffdc21ce39468fd3a3e4a1eafa6aaf5cc855a
/src/pokemon/Zoroark.java
2a55e8a3bec3955e3d6fa1accfb26cbeeae43980
[]
no_license
Nanachi07/SumerIntenseLabWork2
9c02381b5d12f73b91a93be3645922afa056761b
4898c6f0c0121ad1f6c5b245937601ad7da94912
refs/heads/master
2022-12-03T09:15:34.717376
2020-07-29T15:41:35
2020-07-29T15:41:35
282,186,306
1
1
null
null
null
null
UTF-8
Java
false
false
351
java
package pokemon; import attack.status.HoneClaws; import ru.ifmo.se.pokemon.*; public class Zoroark extends Zorua { public Zoroark(String name) { this(name, 100); } protected Zoroark(String name, int lvl) { super(name, lvl); this.setStats(60, 105, 60, 120, 60, 105); this.addMove(new HoneClaws()); } }
[ "lis.logovo@mail.ru" ]
lis.logovo@mail.ru
14c1e589d40b1a8bb61dd4d9b153959919ee2e1d
4a6f36ea51672b1697eda9cc90d0ec19b67f6d50
/src/poker/Card.java
a5af7675385c854e85b72be389a174499c3ba98f
[]
no_license
NickTheRip/5-Card-Draw
f7f1e56004efc7fdd94c00df8cc2d779fc5f7fff
c5931cb603969a86c563f2ed56bdd7d2a0ec2282
refs/heads/master
2023-01-29T00:20:46.934507
2020-12-09T06:13:01
2020-12-09T06:13:01
319,807,210
0
0
null
null
null
null
UTF-8
Java
false
false
1,216
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 poker; /** * * @author sdk101 */ public class Card { private int suit, value; private String[] cardSuit = {"Spades", "Diamonds", "Hearts", "Clubs"}; private String[] cardValue = {"Ace", "King", "Queen", "Jack", "10", "9", "8", "7", "6", "5", "4", "3", "2"}; //TODO: Generalized generation for either suit/value OR reference INTs public Card(int cSuit, int cValue){ suit = cSuit; value = cValue; } public String getResourceName(){ return this.getValue() + this.getSuit(); } public String getSuit(){ String s = cardSuit[suit]; return s; } public String getValue(){ String v = cardValue[value]; return v; } public String toString() { String cardInfo = cardValue[value] + " of " + cardSuit[suit]; return cardInfo; } public boolean equals(Card c){ return c.getSuit() == this.getSuit() && c.getValue() == this.getValue(); } }
[ "n-simpson@wiu.edu" ]
n-simpson@wiu.edu
065465a719474937f8c06b0a2b2e030011c09a20
8a91346297640443d0547a4e0736e4e7056046a1
/app/src/main/java/com/example/queue/enCasoUsuarioYaesEnCola/api/ApiSiEstaEnFila.java
738bcb084f7fe1affed821a38b058b8e59cce9d6
[]
no_license
xiaoyangpeng/SistemaGestionFilaAndroid
73687945af4e45543ccbe0209181bbb7afbe7b43
7526fabc4fc9f9a2863f66be8752ce8a372081ee
refs/heads/main
2023-06-03T21:18:52.861868
2021-06-19T11:55:06
2021-06-19T11:55:06
363,290,853
0
0
null
null
null
null
UTF-8
Java
false
false
1,933
java
package com.example.queue.enCasoUsuarioYaesEnCola.api; import android.app.Activity; import com.example.queue.comunicacionQR.apiIncorporar.ApiGetIncorporar; import com.example.queue.guardarDatoSharedPre.guradarDatoAcceso.LeerToken; import com.example.queue.incorporarremota.apiTienda.ApiGetInfTienda; import com.example.queue.incorporarremota.apiTienda.Tiendaremota; import com.example.queue.probarConexionInternet.Fallaconexion; import com.example.queue.valorFijo.ConexionUrl; import java.io.IOException; import retrofit2.Call; import retrofit2.Response; import retrofit2.Retrofit; import retrofit2.converter.gson.GsonConverterFactory; public class ApiSiEstaEnFila extends Thread{ private Activity activity; private Call<Boolean> dataCall; private boolean respuesta; public ApiSiEstaEnFila(Activity activity){ this.activity=activity; } public void crear(){ Retrofit retrofit = new Retrofit.Builder() //设置网络请求BaseUrl地址 .baseUrl(ConexionUrl.Companion.getBASE_URL()) //设置数据解析器 .addConverterFactory(GsonConverterFactory.create()) .build(); // 创建 网络请求接口 的实例 ApiGetSiestaEnfila apiGet =retrofit.create(ApiGetSiestaEnfila.class); String token= LeerToken.tokenUsuario(activity.getApplicationContext()); //对 发送请求 进行封装 dataCall= apiGet.getRepuestaEnfila(token); } public void run(){ try { respuesta= dataCall.execute().body(); } catch (IOException e) { activity.runOnUiThread(new Runnable() { @Override public void run() { Fallaconexion.fallaconexionServidor(activity); } }); } } public boolean getRespuesta() { return respuesta; } }
[ "a1171238267@gmail.com" ]
a1171238267@gmail.com
84aab479a3fb4fe2538875b4995fc23653a48fe3
fecfd2ca4f39187ca4a7f26b313a91417d3aa5cd
/src/main/java/org/jsoup/nodes/Comment.java
ff4ef513be2885ac1db7eab9b3813438085b5c3c
[ "MIT" ]
permissive
tefla/jsoup
1c71472967f50afe66ac47727c0f1487e10e08ee
57d429e266ccf36b56b0ceb773a0504511aae186
refs/heads/master
2021-01-17T06:42:04.977391
2010-06-08T08:56:07
2011-07-18T09:41:43
2,065,459
0
0
null
null
null
null
UTF-8
Java
false
false
439
java
package org.jsoup.nodes; /** A comment node. @author Jonathan Hedley, jonathan@hedley.net */ public class Comment extends Node { private static final String COMMENT_KEY = "comment"; public Comment(String data) { super(); attributes.put(COMMENT_KEY, data); } public String nodeName() { return "#comment"; } public String getData() { return attributes.get(COMMENT_KEY); } }
[ "zigomushy@gmail.com" ]
zigomushy@gmail.com
8439566551b8d6510d9c04de387bfe264fb89d50
4cd1289b011068538c18af836ce39db2adc5a3d7
/app/src/main/java/com/haiwai/housekeeper/view/View_DTQX_13.java
92813f3457c31d26ade33b8af6044cb43b18c7ce
[]
no_license
KnnethKong/housekeeper
11e6e69289b08a14cf31960144f1629c9e5a907e
65a3a99563cba6fbe1a07e415c057f5e60098986
refs/heads/master
2020-04-03T06:11:53.864630
2018-10-28T12:33:51
2018-10-28T12:33:51
155,068,699
0
0
null
null
null
null
UTF-8
Java
false
false
7,552
java
package com.haiwai.housekeeper.view; import android.content.Context; import android.text.TextUtils; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; import android.widget.CheckBox; import android.widget.CompoundButton; import android.widget.EditText; import android.widget.LinearLayout; import android.widget.TextView; import com.haiwai.housekeeper.R; import org.w3c.dom.Text; /** * Created by ihope007 on 2016/10/18. */ public class View_DTQX_13 extends LinearLayout { private TextView tvtitle; private CheckBox cb1, cb2, cb3, cb4, cb5,cb6; private String answer = ""; private EditText et_other; public View_DTQX_13(Context context) { this(context, null); } public View_DTQX_13(Context context, AttributeSet attrs) { this(context, attrs, 0); } public View_DTQX_13(Context context, AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); View.inflate(context, R.layout.view_dtqx_13, this); initView(); } private void initView() { tvtitle = (TextView) findViewById(R.id.view_dtqx_13_tv_title); cb1 = (CheckBox) findViewById(R.id.view_dtqx_13_cb_1); cb2 = (CheckBox) findViewById(R.id.view_dtqx_13_cb_2); cb3 = (CheckBox) findViewById(R.id.view_dtqx_13_cb_3); cb4 = (CheckBox) findViewById(R.id.view_dtqx_13_cb_4); cb5 = (CheckBox) findViewById(R.id.view_dtqx_13_cb_5); cb6 = (CheckBox) findViewById(R.id.view_dtqx_13_cb_6); et_other = ((EditText) findViewById(R.id.view_dtqx_13_et_other)); // et_other.setOnClickListener(new OnClickListener() { // @Override // public void onClick(View view) { // cb6.setChecked(true); // } // }); // et_other.setOnFocusChangeListener(new OnFocusChangeListener() { // @Override // public void onFocusChange(View view, boolean b) { // if(b){ // cb6.setChecked(true); // }else{ // cb6.setChecked(false); // } // } // }); et_other.setOnTouchListener(new OnTouchListener() { @Override public boolean onTouch(View view, MotionEvent motionEvent) { cb6.setChecked(true); return false; } }); } public void setData1(String title, String r1, String r2, String r3, String r4, String r5,String r6) { tvtitle.setText(title); cb1.setText(r1); cb2.setText(r2); cb3.setText(r3); cb4.setText(r4); cb5.setText(r5); // cb6.setText(r6); et_other.setHint(r6); } public void setData1(String title, String r1, String r2, String r3, String r4, String r5, String r6,String answer) { tvtitle.setText(title); cb1.setText(r1); cb2.setText(r2); cb3.setText(r3); cb4.setText(r4); cb5.setText(r5); // cb6.setText(r6); et_other.setHint(r6); if ("1".equals(answer.substring(0, 1))) { cb1.setChecked(true); } if ("1".equals(answer.substring(1, 2))) { cb2.setChecked(true); } if ("1".equals(answer.substring(2, 3))) { cb3.setChecked(true); } if ("1".equals(answer.substring(3, 4))) { cb4.setChecked(true); } if ("1".equals(answer.substring(4, 5))) { cb5.setChecked(true); } } public void setData4(String title, String r1, String r2, String r3, String r4, String r5, String r6,String answer) { tvtitle.setText(title); cb1.setText(r1); cb2.setText(r2); cb3.setText(r3); cb4.setText(r4); cb5.setText(r5); // cb6.setText(r6); et_other.setHint(r6); if ("1".equals(answer.substring(0, 1))) { cb1.setChecked(true); } if ("1".equals(answer.substring(1, 2))) { cb2.setChecked(true); } if ("1".equals(answer.substring(2, 3))) { cb3.setChecked(true); } if ("1".equals(answer.substring(3, 4))) { cb4.setChecked(true); } if ("1".equals(answer.substring(4, 5))) { cb5.setChecked(true); } if ("1".equals(answer.substring(5, 6))) { cb6.setChecked(true); et_other.setText(answer.substring(6,answer.length())); } } public void setData(String title, String r1, String r2, String r3, String r4, String r5) { tvtitle.setText(title); cb1.setText(r1); cb2.setText(r2); cb3.setText(r3); cb4.setText(r4); cb5.setText(r5); cb6.setVisibility(View.GONE); et_other.setVisibility(View.GONE); } public void setData(String title, String r1, String r2, String r3, String r4, String r5, String answer) { tvtitle.setText(title); cb1.setText(r1); cb2.setText(r2); cb3.setText(r3); cb4.setText(r4); cb5.setText(r5); cb6.setVisibility(View.GONE); et_other.setVisibility(View.GONE); if ("1".equals(answer.substring(0, 1))) { cb1.setChecked(true); } if ("1".equals(answer.substring(1, 2))) { cb2.setChecked(true); } if ("1".equals(answer.substring(2, 3))) { cb3.setChecked(true); } if ("1".equals(answer.substring(3, 4))) { cb4.setChecked(true); } if ("1".equals(answer.substring(4, 5))) { cb5.setChecked(true); } } /** * 0:可以通过 1:请至少选择一项 2:请补全信息 */ public int getIsEmptyState() { if (cb1.isChecked() || cb2.isChecked() || cb3.isChecked() || cb4.isChecked() || cb5.isChecked()) { return 0; }else if(cb6.isChecked()){ if(TextUtils.isEmpty(et_other.getText().toString())){ return 2; }else{ return 0; } } else { return 1; } } public int booleanToInt(boolean a) { int i = a == true ? 1 : 0; return i; } public String getQuestion() { return tvtitle.getText().toString().trim(); } public String getAnswer() { answer = "" + booleanToInt(cb1.isChecked()) + booleanToInt(cb2.isChecked()) + booleanToInt(cb3.isChecked()) + booleanToInt(cb4.isChecked()) + booleanToInt(cb5.isChecked()); return answer; } public String getAnswer1() { answer = "" + booleanToInt(cb1.isChecked()) + booleanToInt(cb2.isChecked()) + booleanToInt(cb3.isChecked()) + booleanToInt(cb4.isChecked()) + booleanToInt(cb5.isChecked())+booleanToInt(cb6.isChecked()); return answer; } public String getAnswer2() { if(cb6.isChecked()){ answer = "" + booleanToInt(cb1.isChecked()) + booleanToInt(cb2.isChecked()) + booleanToInt(cb3.isChecked()) + booleanToInt(cb4.isChecked()) + booleanToInt(cb5.isChecked())+booleanToInt(cb6.isChecked())+et_other.getText().toString(); }else{ answer = "" + booleanToInt(cb1.isChecked()) + booleanToInt(cb2.isChecked()) + booleanToInt(cb3.isChecked()) + booleanToInt(cb4.isChecked()) + booleanToInt(cb5.isChecked())+booleanToInt(cb6.isChecked()); } return answer; } }
[ "kxf.kxf@foxmai.com" ]
kxf.kxf@foxmai.com
371d03a4cd56414306eb94af8a5d5a072eb0ea0c
1eb4d584daf34393db3a9e7a73fdc5af4a0e38e7
/common/src/test/java/io/netty/util/concurrent/DefaultThreadFactoryTest.java
8d788a21032685a634a5c1f74b746563c5565a1e
[ "Apache-2.0", "CC-PDDC", "BSD-3-Clause", "MIT", "LicenseRef-scancode-public-domain", "LGPL-2.1-only" ]
permissive
YunaiV/netty
cd96c948684b8e196af2425fb4bf4bd8671a76c5
2c9022aabffc261c103e60c682c041c8cac83045
refs/heads/4.1
2021-06-23T18:17:32.028915
2019-02-09T14:25:32
2019-02-09T14:25:32
139,227,249
153
216
Apache-2.0
2019-06-28T14:27:39
2018-06-30T07:04:53
Java
UTF-8
Java
false
false
10,730
java
/* * Copyright 2016 The Netty Project * * The Netty Project licenses this file to you under the Apache License, * version 2.0 (the "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at: * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations * under the License. */ package io.netty.util.concurrent; import org.junit.Test; import java.security.Permission; import java.util.concurrent.Callable; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; public class DefaultThreadFactoryTest { @Test(timeout = 2000) public void testDescendantThreadGroups() throws InterruptedException { final SecurityManager current = System.getSecurityManager(); try { // install security manager that only allows parent thread groups to mess with descendant thread groups System.setSecurityManager(new SecurityManager() { @Override public void checkAccess(ThreadGroup g) { final ThreadGroup source = Thread.currentThread().getThreadGroup(); if (source != null) { if (!source.parentOf(g)) { throw new SecurityException("source group is not an ancestor of the target group"); } super.checkAccess(g); } } // so we can restore the security manager at the end of the test @Override public void checkPermission(Permission perm) { } }); // holder for the thread factory, plays the role of a global singleton final AtomicReference<DefaultThreadFactory> factory = new AtomicReference<DefaultThreadFactory>(); final AtomicInteger counter = new AtomicInteger(); final Runnable task = new Runnable() { @Override public void run() { counter.incrementAndGet(); } }; final AtomicReference<Throwable> interrupted = new AtomicReference<Throwable>(); // create the thread factory, since we are running the thread group brother, the thread // factory will now forever be tied to that group // we then create a thread from the factory to run a "task" for us final Thread first = new Thread(new ThreadGroup("brother"), new Runnable() { @Override public void run() { factory.set(new DefaultThreadFactory("test", false, Thread.NORM_PRIORITY, null)); final Thread t = factory.get().newThread(task); t.start(); try { t.join(); } catch (InterruptedException e) { interrupted.set(e); Thread.currentThread().interrupt(); } } }); first.start(); first.join(); assertNull(interrupted.get()); // now we will use factory again, this time from a sibling thread group sister // if DefaultThreadFactory is "sticky" about thread groups, a security manager // that forbids sibling thread groups from messing with each other will strike this down final Thread second = new Thread(new ThreadGroup("sister"), new Runnable() { @Override public void run() { final Thread t = factory.get().newThread(task); t.start(); try { t.join(); } catch (InterruptedException e) { interrupted.set(e); Thread.currentThread().interrupt(); } } }); second.start(); second.join(); assertNull(interrupted.get()); assertEquals(2, counter.get()); } finally { System.setSecurityManager(current); } } // test that when DefaultThreadFactory is constructed with a sticky thread group, threads // created by it have the sticky thread group @Test(timeout = 2000) public void testDefaultThreadFactoryStickyThreadGroupConstructor() throws InterruptedException { final ThreadGroup sticky = new ThreadGroup("sticky"); runStickyThreadGroupTest( new Callable<DefaultThreadFactory>() { @Override public DefaultThreadFactory call() throws Exception { return new DefaultThreadFactory("test", false, Thread.NORM_PRIORITY, sticky); } }, sticky); } // test that when DefaultThreadFactory is constructed it is sticky to the thread group from the thread group of the // thread that created it @Test(timeout = 2000) public void testDefaultThreadFactoryInheritsThreadGroup() throws InterruptedException { final ThreadGroup sticky = new ThreadGroup("sticky"); runStickyThreadGroupTest( new Callable<DefaultThreadFactory>() { @Override public DefaultThreadFactory call() throws Exception { final AtomicReference<DefaultThreadFactory> factory = new AtomicReference<DefaultThreadFactory>(); final Thread thread = new Thread(sticky, new Runnable() { @Override public void run() { factory.set(new DefaultThreadFactory("test")); } }); thread.start(); thread.join(); return factory.get(); } }, sticky); } // test that when a security manager is installed that provides a ThreadGroup, DefaultThreadFactory inherits from // the security manager @Test(timeout = 2000) public void testDefaultThreadFactoryInheritsThreadGroupFromSecurityManager() throws InterruptedException { final SecurityManager current = System.getSecurityManager(); try { final ThreadGroup sticky = new ThreadGroup("sticky"); System.setSecurityManager(new SecurityManager() { @Override public ThreadGroup getThreadGroup() { return sticky; } // so we can restore the security manager at the end of the test @Override public void checkPermission(Permission perm) { } }); runStickyThreadGroupTest( new Callable<DefaultThreadFactory>() { @Override public DefaultThreadFactory call() throws Exception { return new DefaultThreadFactory("test"); } }, sticky); } finally { System.setSecurityManager(current); } } private static void runStickyThreadGroupTest( final Callable<DefaultThreadFactory> callable, final ThreadGroup expected) throws InterruptedException { final AtomicReference<ThreadGroup> captured = new AtomicReference<ThreadGroup>(); final AtomicReference<Throwable> exception = new AtomicReference<Throwable>(); final Thread first = new Thread(new ThreadGroup("wrong"), new Runnable() { @Override public void run() { final DefaultThreadFactory factory; try { factory = callable.call(); } catch (Exception e) { exception.set(e); throw new RuntimeException(e); } final Thread t = factory.newThread(new Runnable() { @Override public void run() { } }); captured.set(t.getThreadGroup()); } }); first.start(); first.join(); assertNull(exception.get()); assertEquals(expected, captured.get()); } // test that when DefaultThreadFactory is constructed without a sticky thread group, threads // created by it inherit the correct thread group @Test(timeout = 2000) public void testDefaultThreadFactoryNonStickyThreadGroupConstructor() throws InterruptedException { final AtomicReference<DefaultThreadFactory> factory = new AtomicReference<DefaultThreadFactory>(); final AtomicReference<ThreadGroup> firstCaptured = new AtomicReference<ThreadGroup>(); final ThreadGroup firstGroup = new ThreadGroup("first"); final Thread first = new Thread(firstGroup, new Runnable() { @Override public void run() { factory.set(new DefaultThreadFactory("sticky", false, Thread.NORM_PRIORITY, null)); final Thread t = factory.get().newThread(new Runnable() { @Override public void run() { } }); firstCaptured.set(t.getThreadGroup()); } }); first.start(); first.join(); assertEquals(firstGroup, firstCaptured.get()); final AtomicReference<ThreadGroup> secondCaptured = new AtomicReference<ThreadGroup>(); final ThreadGroup secondGroup = new ThreadGroup("second"); final Thread second = new Thread(secondGroup, new Runnable() { @Override public void run() { final Thread t = factory.get().newThread(new Runnable() { @Override public void run() { } }); secondCaptured.set(t.getThreadGroup()); } }); second.start(); second.join(); assertEquals(secondGroup, secondCaptured.get()); } }
[ "norman_maurer@apple.com" ]
norman_maurer@apple.com
26098632791101d86afab6040a6f2273259a8983
813f49008ac036083f29943718df6deba11f3775
/app/src/main/java/com/example/google_sign_in/MainActivity.java
ac17f8f8b19771c8980b155c3a22a493fba31140
[]
no_license
ZobaeirAlLikhon/Google_Sign_In
e27377ccaa9dc392147eb34736cf9649f5313703
7c850e0071d1a09e67c3752f6372fb310b10bdd8
refs/heads/master
2022-12-12T15:25:04.966860
2020-09-08T07:41:03
2020-09-08T07:41:03
293,731,016
0
0
null
null
null
null
UTF-8
Java
false
false
4,274
java
package com.example.google_sign_in; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Toast; import com.google.android.gms.auth.api.Auth; import com.google.android.gms.auth.api.signin.GoogleSignIn; import com.google.android.gms.auth.api.signin.GoogleSignInAccount; import com.google.android.gms.auth.api.signin.GoogleSignInApi; import com.google.android.gms.auth.api.signin.GoogleSignInClient; import com.google.android.gms.auth.api.signin.GoogleSignInOptions; import com.google.android.gms.common.ConnectionResult; import com.google.android.gms.common.SignInButton; import com.google.android.gms.common.api.ApiException; import com.google.android.gms.common.api.GoogleApiClient; import com.google.android.gms.tasks.OnCompleteListener; import com.google.android.gms.tasks.Task; import com.google.firebase.auth.AuthCredential; import com.google.firebase.auth.AuthResult; import com.google.firebase.auth.FirebaseAuth; import com.google.firebase.auth.FirebaseUser; import com.google.firebase.auth.GoogleAuthProvider; public class MainActivity extends AppCompatActivity { private static final int RC_SIGN_IN =101 ; SignInButton button; FirebaseAuth mAuth; GoogleSignInClient mGoogleSignInClient; FirebaseAuth.AuthStateListener mAuthStateListener; protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); button=findViewById(R.id.sign_in_button); mAuth=FirebaseAuth.getInstance(); GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestIdToken(getString(R.string.default_web_client_id)) .requestEmail() .build(); mGoogleSignInClient = GoogleSignIn.getClient(this, gso); button.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { signIn(); } }); } private void signIn() { Intent signInIntent = mGoogleSignInClient.getSignInIntent(); startActivityForResult(signInIntent, RC_SIGN_IN); } @Override public void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); // Result returned from launching the Intent from GoogleSignInApi.getSignInIntent(...); if (requestCode == RC_SIGN_IN) { Task<GoogleSignInAccount> task = GoogleSignIn.getSignedInAccountFromIntent(data); try { // Google Sign In was successful, authenticate with Firebase GoogleSignInAccount account = task.getResult(ApiException.class); firebaseAuthWithGoogle(account.getIdToken()); } catch (ApiException e) { // Google Sign In failed, update UI appropriately // ... } } } private void firebaseAuthWithGoogle(String idToken) { AuthCredential credential = GoogleAuthProvider.getCredential(idToken, null); mAuth.signInWithCredential(credential) .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() { @Override public void onComplete(@NonNull Task<AuthResult> task) { if (task.isSuccessful()) { // Sign in success, update UI with the signed-in user's information FirebaseUser user = mAuth.getCurrentUser(); updateUI(user); } else { // If sign in fails, display a message to the user. Toast.makeText(MainActivity.this,"user",Toast.LENGTH_LONG).show(); updateUI(null); } // ... } }); } private void updateUI(FirebaseUser user) { Intent intent=new Intent(MainActivity.this,LogOut.class); startActivity(intent); } }
[ "akash001karim@gmail.com" ]
akash001karim@gmail.com
6af2f3a336a976c39c9e9d3c2f1157678d16135d
e7488e2521feacc341ff992303cb2170a068a183
/vskeddemos/projects/jdicdemo/project/jdicdemo/src/com/vsked/test/Browser_jForwardButton_actionAdapter.java
3a859ffafacc4814be5c9702664f9002a64665f1
[ "MIT" ]
permissive
brucevsked/vskeddemolist
6b061d5657d503865726fb98314c5ff0b1dbb1cf
f863783b5b2b4e21e878ee3b295a3b5e03f39d94
refs/heads/master
2023-07-21T21:20:48.900142
2023-07-13T08:11:19
2023-07-13T08:11:19
38,467,274
29
12
MIT
2022-10-26T01:32:56
2015-07-03T02:21:29
Java
UTF-8
Java
false
false
398
java
package com.vsked.test; import java.awt.event.ActionEvent; public class Browser_jForwardButton_actionAdapter implements java.awt.event.ActionListener { Browser adaptee; Browser_jForwardButton_actionAdapter(Browser adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.jForwardButton_actionPerformed(e); } }
[ "vsked@163.com" ]
vsked@163.com
73dca3ca906e1b4a0c0bc7d8ea7d60579c93b210
53e2ac31ff34c0a0cb53f4727c794ea3f285f092
/src/main/java/com/imooc/cglibproxy/Train.java
e17bf983c7b7c315c250c47fc9ec6694855f3041
[]
no_license
lqnasa/proxyDemo
752981cc303a27c0e87996776f172f8cf388dae1
6f58a7129563282e36b0b401a4efcb1cfb70e9a3
refs/heads/master
2021-08-22T23:03:35.809301
2017-11-30T11:01:10
2017-11-30T11:01:10
112,601,053
0
0
null
null
null
null
UTF-8
Java
false
false
323
java
package com.imooc.cglibproxy; import java.util.Random; import com.onemt.agent.annotation.Agent; @Agent("train") public class Train { public void move(){ try { Thread.sleep(new Random().nextInt(1000)); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println("火车行驶中..."); } }
[ "liqiao@onemt.com.cn" ]
liqiao@onemt.com.cn
fe126651ab6d8db8a3ff1816edca5bb74fbf6cf8
a88404e860f9e81f175d80c51b8e735fa499c93c
/hapi-fhir-structures-dstu3/src/test/java/ca/uhn/fhir/rest/server/DeleteConditionalDstu3Test.java
9b39bb2e3a9be924e25b763f72c8055f9b5537ce
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
sabri0/hapi-fhir
4a53409d31b7f40afe088aa0ee8b946860b8372d
c7798fee4880ee8ffc9ed2e42c29c3b8f6753a1c
refs/heads/master
2020-06-07T20:02:33.258075
2019-06-18T09:40:00
2019-06-18T09:40:00
193,081,738
2
0
Apache-2.0
2019-06-21T10:46:17
2019-06-21T10:46:17
null
UTF-8
Java
false
false
4,169
java
package ca.uhn.fhir.rest.server; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.util.concurrent.TimeUnit; import org.apache.http.impl.client.CloseableHttpClient; import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.servlet.ServletHandler; import org.eclipse.jetty.servlet.ServletHolder; import org.hl7.fhir.dstu3.model.IdType; import org.hl7.fhir.dstu3.model.Patient; import org.hl7.fhir.instance.model.api.IBaseResource; import org.junit.*; import ca.uhn.fhir.context.FhirContext; import ca.uhn.fhir.rest.annotation.*; import ca.uhn.fhir.rest.api.MethodOutcome; import ca.uhn.fhir.rest.client.api.IGenericClient; import ca.uhn.fhir.rest.client.interceptor.LoggingInterceptor; import ca.uhn.fhir.test.utilities.JettyUtil; import ca.uhn.fhir.util.TestUtil; public class DeleteConditionalDstu3Test { private static CloseableHttpClient ourClient; private static FhirContext ourCtx = FhirContext.forDstu3(); private static IGenericClient ourHapiClient; private static String ourLastConditionalUrl; private static IdType ourLastIdParam; private static boolean ourLastRequestWasDelete; private static final org.slf4j.Logger ourLog = org.slf4j.LoggerFactory.getLogger(DeleteConditionalDstu3Test.class); private static int ourPort; private static Server ourServer; @Before public void before() { ourLastConditionalUrl = null; ourLastIdParam = null; ourLastRequestWasDelete = false; } @Test public void testSearchStillWorks() throws Exception { Patient patient = new Patient(); patient.addIdentifier().setValue("002"); // HttpGet httpGet = new HttpGet("http://localhost:" + ourPort + "/Patient?_pretty=true"); // // HttpResponse status = ourClient.execute(httpGet); // // String responseContent = IOUtils.toString(status.getEntity().getContent()); // IOUtils.closeQuietly(status.getEntity().getContent()); // // ourLog.info("Response was:\n{}", responseContent); //@formatter:off ourHapiClient .delete() .resourceConditionalByType(Patient.class) .where(Patient.IDENTIFIER.exactly().systemAndIdentifier("SOMESYS","SOMEID")) .execute(); //@formatter:on assertTrue(ourLastRequestWasDelete); assertEquals(null, ourLastIdParam); assertEquals("Patient?identifier=SOMESYS%7CSOMEID", ourLastConditionalUrl); } @AfterClass public static void afterClassClearContext() throws Exception { JettyUtil.closeServer(ourServer); TestUtil.clearAllStaticFieldsForUnitTest(); } @BeforeClass public static void beforeClass() throws Exception { ourServer = new Server(0); PatientProvider patientProvider = new PatientProvider(); ServletHandler proxyHandler = new ServletHandler(); RestfulServer servlet = new RestfulServer(ourCtx); servlet.setResourceProviders(patientProvider); ServletHolder servletHolder = new ServletHolder(servlet); proxyHandler.addServletWithMapping(servletHolder, "/*"); ourServer.setHandler(proxyHandler); JettyUtil.startServer(ourServer); ourPort = JettyUtil.getPortForStartedServer(ourServer); PoolingHttpClientConnectionManager connectionManager = new PoolingHttpClientConnectionManager(5000, TimeUnit.MILLISECONDS); HttpClientBuilder builder = HttpClientBuilder.create(); builder.setConnectionManager(connectionManager); ourClient = builder.build(); ourCtx.getRestfulClientFactory().setSocketTimeout(500 * 1000); ourHapiClient = ourCtx.newRestfulGenericClient("http://localhost:" + ourPort + "/"); ourHapiClient.registerInterceptor(new LoggingInterceptor()); } public static class PatientProvider implements IResourceProvider { @Delete() public MethodOutcome deletePatient(@IdParam IdType theIdParam, @ConditionalUrlParam String theConditional) { ourLastRequestWasDelete = true; ourLastConditionalUrl = theConditional; ourLastIdParam = theIdParam; return new MethodOutcome(new IdType("Patient/001/_history/002")); } @Override public Class<? extends IBaseResource> getResourceType() { return Patient.class; } } }
[ "jamesagnew@gmail.com" ]
jamesagnew@gmail.com
5663de8b892923c1abd2b9ddd6244b6d9466fc98
54e2dd177feb24b77c4bca9996422b433819c0d9
/app/src/main/java/cn/ytxu/androidbackflow/sample/normal/request_activity_count/letter/ACLetterJActivity.java
f54cc35e1ac858382fceb9d3c4814081e6b3458f
[ "Apache-2.0" ]
permissive
xuyt11/androidBackFlow
c308c46f87b0a801fa84fe771025a17da87b6f2b
68bbbd97aeb4e652b37a79dd965baff3be4763d8
refs/heads/master
2021-04-28T22:32:52.924513
2017-03-05T04:15:14
2017-03-05T04:15:14
77,721,702
27
4
null
null
null
null
UTF-8
Java
false
false
388
java
package cn.ytxu.androidbackflow.sample.normal.request_activity_count.letter; import android.os.Bundle; import cn.ytxu.androidbackflow.sample.normal.request_activity_count.base.BaseACLetterActivity; public class ACLetterJActivity extends BaseACLetterActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); } }
[ "xuytao11@163.com" ]
xuytao11@163.com
9418f0e76c97210f712278b604f86eec2842acb2
ea9206777fc779f0ba214b4a1f3caede0896c063
/src/main/java/com/yaoyaohao/study/spring/rw/bpp/ReadWriteDataSourceException.java
db1f7115eb63c3eaa97cb3fdc9694f00f9465d5f
[]
no_license
janzolau1987/study-java
8c814c433d15cfa7bd7b2b1c262b25fed91b42c9
c48310ca4fd4e4c0de92161fc337898c265ffa5d
refs/heads/master
2020-12-25T17:56:28.167353
2017-07-21T08:23:18
2017-07-21T08:23:18
58,424,740
3
4
null
null
null
null
UTF-8
Java
false
false
372
java
package com.yaoyaohao.study.spring.rw.bpp; import org.springframework.core.NestedRuntimeException; /** * 读写分离数据源操作异常类 * */ @SuppressWarnings("serial") public class ReadWriteDataSourceException extends NestedRuntimeException { public ReadWriteDataSourceException(String message, Throwable cause) { super(message, cause); } }
[ "janzolau1987@gmail.com" ]
janzolau1987@gmail.com
82e21dd5d89583c9b6f4a1f51f3e6e3f4e490a17
7d8c64f1f09e13043f14a5a235c4e61272a77506
/sources/p006ti/modules/titanium/network/TiNetworkListener.java
5dc985a642f37d5c010c127b6e39ce2aaf65bff0
[]
no_license
AlexKohanim/QuickReturn
168530c2ef4035faff817a901f1384ed8a554f73
1ce10de7020951d49f80b66615fe3537887cea80
refs/heads/master
2022-06-25T19:00:59.818761
2020-05-08T20:11:14
2020-05-08T20:11:14
262,418,565
0
1
null
null
null
null
UTF-8
Java
false
false
4,209
java
package p006ti.modules.titanium.network; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; import android.net.NetworkInfo; import android.os.Bundle; import android.os.Handler; import android.os.Message; import org.appcelerator.kroll.common.Log; /* renamed from: ti.modules.titanium.network.TiNetworkListener */ public class TiNetworkListener { public static final String EXTRA_CONNECTED = "connected"; public static final String EXTRA_FAILOVER = "failover"; public static final String EXTRA_NETWORK_TYPE = "networkType"; public static final String EXTRA_NETWORK_TYPE_NAME = "networkTypeName"; public static final String EXTRA_REASON = "reason"; private static final String TAG = "TiNetListener"; private IntentFilter connectivityIntentFilter; private Context context; private boolean listening; /* access modifiers changed from: private */ public Handler messageHandler; private ConnectivityBroadcastReceiver receiver = new ConnectivityBroadcastReceiver(); /* renamed from: ti.modules.titanium.network.TiNetworkListener$ConnectivityBroadcastReceiver */ private class ConnectivityBroadcastReceiver extends BroadcastReceiver { private ConnectivityBroadcastReceiver() { } public void onReceive(Context context, Intent intent) { boolean z; if (intent.getAction().equals("android.net.conn.CONNECTIVITY_CHANGE")) { if (TiNetworkListener.this.messageHandler == null) { Log.m44w(TiNetworkListener.TAG, "Network receiver is active but no handler has been set."); return; } boolean noConnectivity = intent.getBooleanExtra("noConnectivity", false); NetworkInfo networkInfo = (NetworkInfo) intent.getParcelableExtra("networkInfo"); NetworkInfo otherNetworkInfo = (NetworkInfo) intent.getParcelableExtra("otherNetwork"); String reason = intent.getStringExtra("reason"); boolean failover = intent.getBooleanExtra("isFailover", false); Log.m29d(TiNetworkListener.TAG, "onReceive(): mNetworkInfo=" + networkInfo + " mOtherNetworkInfo = " + (otherNetworkInfo == null ? "[none]" : otherNetworkInfo + " noConn=" + noConnectivity), Log.DEBUG_MODE); Message message = Message.obtain(TiNetworkListener.this.messageHandler); Bundle b = message.getData(); String str = TiNetworkListener.EXTRA_CONNECTED; if (!noConnectivity) { z = true; } else { z = false; } b.putBoolean(str, z); b.putInt(TiNetworkListener.EXTRA_NETWORK_TYPE, networkInfo.getType()); if (noConnectivity) { b.putString(TiNetworkListener.EXTRA_NETWORK_TYPE_NAME, "NONE"); } else { b.putString(TiNetworkListener.EXTRA_NETWORK_TYPE_NAME, networkInfo.getTypeName()); } b.putBoolean(TiNetworkListener.EXTRA_FAILOVER, failover); b.putString("reason", reason); message.sendToTarget(); } } } public TiNetworkListener(Handler messageHandler2) { this.messageHandler = messageHandler2; this.connectivityIntentFilter = new IntentFilter("android.net.conn.CONNECTIVITY_CHANGE"); } public void attach(Context context2) { if (this.listening) { Log.m44w(TAG, "Connectivity listener is already attached"); } else if (this.context == null) { this.context = context2; context2.registerReceiver(this.receiver, this.connectivityIntentFilter); this.listening = true; } else { throw new IllegalStateException("Context was not cleaned up from last release."); } } public void detach() { if (this.listening) { this.context.unregisterReceiver(this.receiver); this.context = null; this.listening = false; } } }
[ "akohanim@sfsu.edu" ]
akohanim@sfsu.edu
e0bd7f33c9aecd5fa02011e8a4b05d6e31f34f4c
acce485c027fe812d4131691b60bbcb66eee0c7d
/springcloud/spring-cloud-hystrix-client-demo/src/main/java/com/k21d/springcloud/springcloudhystrixclientdemo/FutureDemo.java
a625b86e88d0c20f2bd17bfcb152a14b84f76bba
[]
no_license
k-21d/Java-Demo
85669e0b7c7866be0f961fe4bf6f89459529f2af
eb7e2d2ef91a2a926142e3fe97bcbb7febfe45b8
refs/heads/master
2022-12-26T03:34:31.101292
2019-11-30T11:40:13
2019-11-30T11:40:13
102,599,667
0
0
null
2020-10-13T17:10:02
2017-09-06T11:19:05
Java
UTF-8
Java
false
false
749
java
package com.k21d.springcloud.springcloudhystrixclientdemo; import java.util.Random; import java.util.concurrent.*; public class FutureDemo { public static void main(String[] args) { Random random = new Random(); ExecutorService executorService = Executors.newFixedThreadPool(1); Future<String> future = executorService.submit(() -> { int value = random.nextInt(200); System.out.println("hello world() costs"+value+"ms"); Thread.sleep (value); return "hello world"; }); try { future.get(100, TimeUnit.MILLISECONDS); } catch (Exception e) { System.err.printf("超时"); } executorService.shutdown(); } }
[ "qwer123456" ]
qwer123456
d9df07d47798816708967a4035f742abea86649c
09a00ee047fa6b36462da28351b0b159143aad79
/src/main/java/com/frederickwordie/ServletInitialiser.java
993a3186aa8cf0cc215edadaf1cdfe8784f9934b
[]
no_license
Frederick-Wordie/Agabus
3347bf86407a8a58dcda152c165e980eb8c407bd
9e6339332d69f323fcd3f454f2f793d692f87559
refs/heads/master
2020-03-28T16:05:35.931082
2018-09-13T16:33:25
2018-09-13T16:33:25
148,658,636
2
0
null
null
null
null
UTF-8
Java
false
false
400
java
package com.frederickwordie; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; public class ServletInitialiser extends SpringBootServletInitializer{ @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { return application.sources(Application.class); } }
[ "frederickwo@stlghana.com" ]
frederickwo@stlghana.com
ffc982c4f47297efc4ea7b2759d1749508e705a7
e9f075397dd88e232dd9c1af2e59b2e683cccb12
/api/src/main/java/com/github/lanjusto/moneytransferservice/api/MoneyTransferService.java
e5e477bc175cc2e1bd97b985b2978b1d1c08afe8
[]
no_license
Lanjusto/MoneyTransferService
ef53e19e912ded5cce1df7b7836d7cf69b4afc97
1569c9a5ffa5bc68a1b4dad432a19df8e83f903f
refs/heads/master
2020-09-16T11:09:09.890776
2016-09-12T17:19:24
2016-09-12T17:19:24
67,134,911
0
0
null
null
null
null
UTF-8
Java
false
false
2,019
java
package com.github.lanjusto.moneytransferservice.api; import com.github.lanjusto.moneytransferservice.api.resource.account.entity.AccountServerEntityResource; import com.github.lanjusto.moneytransferservice.api.resource.account.list.AccountListServerResource; import com.github.lanjusto.moneytransferservice.api.resource.transaction.entity.TransactionServerEntityResource; import com.github.lanjusto.moneytransferservice.api.resource.transaction.list.TransactionListServerResource; import com.github.lanjusto.moneytransferservice.api.url.APIUrl; import com.github.lanjusto.moneytransferservice.api.url.APIUrlProvider; import org.jetbrains.annotations.NotNull; import org.restlet.Application; import org.restlet.Restlet; import org.restlet.resource.ServerResource; import org.restlet.routing.Router; import javax.inject.Inject; public class MoneyTransferService extends Application { public static final String INJECTION_POINT = "InjectionPoint"; private final InjectionPoint injectionPoint; @Inject private MoneyTransferService(InjectionPoint injectionPoint) { this.injectionPoint = injectionPoint; } @Override public Restlet createInboundRoot() { final Router router = new Router(getContext()); router.getContext().getAttributes().put(INJECTION_POINT, injectionPoint); attach(router, APIUrlProvider.getAccountEntityUrl(), AccountServerEntityResource.class); attach(router, APIUrlProvider.getAccountListUrl(), AccountListServerResource.class); attach(router, APIUrlProvider.getTransactionEntityUrl(), TransactionServerEntityResource.class); attach(router, APIUrlProvider.getTransactionListUrl(), TransactionListServerResource.class); return router; } private void attach(@NotNull Router router, @NotNull APIUrl url, @NotNull Class<? extends ServerResource> targetClass) { router.attach(url.getRelative(), targetClass); router.attach(url.getRelative() + APIUrl.DELIMITER, targetClass); } }
[ "lanjusto@ya.ru" ]
lanjusto@ya.ru
9b63356e292682d28aa9ecbb96bf7aa4a8e15695
a591675763327fb1871c2a798ffbb02b457b15eb
/src/test/java/com/github/jinahya/datagokr/api/b090041_/lrsrcldinfoservice/proxy/stereotype/LunarCalendarDateSchedulingTasksTest.java
34d5622e974369f23a9e5d3765e3d372b90d5ccd
[ "Apache-2.0" ]
permissive
jinahya/datagokr-api-b090041-lrsrcldinfoservice-proxy-spring
829d070e6caa7c1c51f43c132aac564f7344bed0
e62be94d8bc44bb82e7249b8ca1b07dcf457a588
refs/heads/main
2023-03-06T03:31:42.015214
2021-01-10T00:04:12
2021-01-10T00:04:12
321,066,261
1
1
null
null
null
null
UTF-8
Java
false
false
1,071
java
package com.github.jinahya.datagokr.api.b090041_.lrsrcldinfoservice.proxy.stereotype; import com.github.jinahya.datagokr.api.b090041_.lrsrcldinfoservice.proxy.data.jpa.repository.LunarCalendarDateRepository; import lombok.extern.slf4j.Slf4j; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest @Slf4j class LunarCalendarDateSchedulingTasksTest { @Test void a() { // ResponseResources.items() // .map(LunarCalendarDate::from) // .peek(v -> v.setSolarDate(v.getSolarDate().minus(PERIOD_FOR_PURGING_FUTURE_ENTRIES_BY_SOLAR_DATE).minus(Duration.ofSeconds(1L)))) // .forEach(lunarCalendarDateRepository::save); // final int count = lunarCalendarDateSchedulingTasks.purgePastEntriesBySolarDate(); } @Autowired private LunarCalendarDateRepository lunarCalendarDateRepository; @Autowired private LunarCalendarDateSchedulingTasks lunarCalendarDateSchedulingTasks; }
[ "onacit@users.noreply.github.com" ]
onacit@users.noreply.github.com
13dc4182d5d83456a20ba83c6059e15970445e07
2ada67d05ce46a997de73a6a310e11109bcf93e3
/010518_SinayevAddressbook/src/test/java/DeleteContactTest.java
4b361b8761d09d2a116f2010ccb48c705437fc4c
[ "Apache-2.0" ]
permissive
ArtemAgent/SinyaevQA14
7a7300f667d26030dc4310196d1b3b6821cfdcba
aab850d3d3cf50ad8246653b8641798f237e9f6b
refs/heads/master
2020-03-16T09:59:39.218032
2018-05-06T18:19:49
2018-05-06T18:19:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
467
java
import org.openqa.selenium.By; import org.testng.annotations.Test; public class DeleteContactTest extends TestBase{ @Test public void contactDeletionTest{ selectContact(); goToEditContact(); deleteContact(); returnToHomePage(); } public void selectContact() { driver.findElement(By.name("selected[]")).click(); } public void goToEditContact() { } public void deleteContact() { } }
[ "sinyaev112@gmail.com" ]
sinyaev112@gmail.com
0b2d11741a8aa4d2527954cff54ec6302ee3c2d9
39978d53153663609bfc3c56049e18c16d1f0310
/src/core/components/server/Server.java
606274d8046af7566f5b1a6b192a1ff4f3058b91
[]
no_license
MiguelGarciaTH/sieveq
7c68774331ba0902a5a58cbce99fbeaaa9575aa3
8a47df327dcc947f11e24a46e963d7ef23098ca2
refs/heads/master
2021-09-19T22:25:19.321109
2018-08-01T07:35:56
2018-08-01T07:35:56
143,120,293
0
0
null
null
null
null
UTF-8
Java
false
false
598
java
/* * To change this template, choose Tools | Templates * and open the template in the editor.prop */ package core.components.server; import core.management.CoreProperties; /** * * @author miguel */ public class Server { private final int ID; private final Thread exec; private final CoreProperties prop; public Server(int mode, int id, CoreProperties prop) { this.prop = prop; this.ID = id; exec = new Thread(new ServerExecutor(ID)); } public void start() { exec.run(); } public void stop() { exec.stop(); } }
[ "miguel.garcia.th@gmail.com" ]
miguel.garcia.th@gmail.com
e5ff0fac461e27d4adb5ed5a2f80aa15f73400dd
9bae5a35fd3bff3121bfbb241d07bd70c525adae
/Jason/Cell.java
4364d28ba929a758b5580d7a8ef7e1586921d462
[]
no_license
ashplaysbass97/Search-and-Rescue
a010804ddefdae2a0375ca8fe41806bd2db47855
1793c2967f8528ee0698b23368fe4ac1e46f2fec
refs/heads/master
2022-06-12T05:22:18.165592
2019-12-06T17:00:34
2019-12-06T17:00:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,645
java
import java.awt.Point; import java.util.ArrayList; public class Cell { private Point coordinates; private boolean isBlocked = false; private ArrayList<Cell> neighbours = new ArrayList<Cell>(); private int status = 0; // 0: no victim, 1: potential victim, 2: non-urgent victim private int f = 0; // cost estimate private int g = 0; // cost of the path from the start node to the destination private int h = 0; // heuristic that estimates the cost of the cheapest path from the start node to the destination private Cell previousCell; public Cell (int x, int y) { coordinates = new Point(x, y); } public final Point getCoordinates() { return coordinates; } public final int getF() { return f; } public final int getG() { return g; } public final int getH() { return h; } public final ArrayList<Cell> getNeighbours() { return neighbours; } public final Cell getPreviousCell() { return previousCell; } public final int getStatus() { return status; } public final boolean isBlocked() { return isBlocked; } public final void setF(int f) { this.f = f; } public final void setG(int g) { this.g = g; } public final void setH(int h) { this.h = h; } public final void setIsBlocked() { this.isBlocked = true; } public final void setNeighbours(ArrayList<Cell> neighbours) { this.neighbours = neighbours; } public final void setPreviousCell(Cell previousCell) { this.previousCell = previousCell; } public final void setStatus(int status) { this.status = status; } public final String toString() { return coordinates.x + "," + coordinates.y; } }
[ "Jamescmdaniels@gmail.com" ]
Jamescmdaniels@gmail.com
14c0e560e7fd74c416abfe54a6ddfa2da0bf826a
76852b1b29410436817bafa34c6dedaedd0786cd
/sources-2020-11-04-tempmail/sources/com/google/android/gms/internal/ads/zzwx.java
16d0128299341d8e6c53da00a5c0577b06aa913a
[]
no_license
zteeed/tempmail-apks
040e64e07beadd8f5e48cd7bea8b47233e99611c
19f8da1993c2f783b8847234afb52d94b9d1aa4c
refs/heads/master
2023-01-09T06:43:40.830942
2020-11-04T18:55:05
2020-11-04T18:55:05
310,075,224
0
0
null
null
null
null
UTF-8
Java
false
false
434
java
package com.google.android.gms.internal.ads; import android.os.IBinder; import android.os.IInterface; import android.os.RemoteException; import com.google.android.gms.dynamic.IObjectWrapper; /* compiled from: com.google.android.gms:play-services-ads-lite@@19.2.0 */ public interface zzwx extends IInterface { IBinder M5(IObjectWrapper iObjectWrapper, zzvh zzvh, String str, zzamr zzamr, int i, int i2) throws RemoteException; }
[ "zteeed@minet.net" ]
zteeed@minet.net
99b2cd6f12b07d4ad6d4b771842d3671b7cc9899
0b088dc786b76c00c1aa7cbe0a1689e7b0686c0a
/src/main/java/com/thoughtworks/lirenlab/interfaces/common/provider/DefaultJsonContextProvider.java
c423261ad95dd991ae5e26601225907289107819
[]
no_license
kolyjjj/new_liren
3a63197ad21213a8353bdcfbcd8939aa6d129998
3230d5ecd27e6aa88d2b96b42bad285e0d59ab92
refs/heads/master
2021-01-19T16:21:42.517050
2014-03-23T07:53:46
2014-03-23T07:53:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
704
java
package com.thoughtworks.lirenlab.interfaces.common.provider; import org.codehaus.jackson.map.ObjectMapper; import org.springframework.stereotype.Component; import javax.ws.rs.ext.ContextResolver; import javax.ws.rs.ext.Provider; import static org.codehaus.jackson.map.SerializationConfig.Feature.INDENT_OUTPUT; @Provider @Component public class DefaultJsonContextProvider implements ContextResolver<ObjectMapper> { @Override public ObjectMapper getContext(Class<?> type) { return defaultMapper(); } private static ObjectMapper defaultMapper() { ObjectMapper result = new ObjectMapper(); result.configure(INDENT_OUTPUT, true); return result; } }
[ "zhiheng.li.metaphor@gmail.com" ]
zhiheng.li.metaphor@gmail.com
a2db72691d5b9eb33e778a6488611e58b4138dd7
b34788b8684ff9747174187ac7542ef0155fca0d
/src/main/java/net/mcreator/blahmod/block/PolishedCharredScoriaSideSlabBlock.java
cc1217eec5ca5fd72fcaef03f395c553823dbd19
[]
no_license
blahblahbal/Blah-s-MCreator-Mod
05202024e57585355118285ba5ad4881ab5c5cfa
a69c91ccf028327b0a29066e1f3c71d9d2b332a3
refs/heads/master
2023-04-03T11:32:01.583363
2021-04-12T02:31:45
2021-04-12T02:31:45
355,346,363
0
0
null
null
null
null
UTF-8
Java
false
false
5,866
java
package net.mcreator.blahmod.block; import net.minecraftforge.registries.ObjectHolder; import net.minecraftforge.fml.event.lifecycle.FMLClientSetupEvent; import net.minecraftforge.common.ToolType; import net.minecraftforge.api.distmarker.OnlyIn; import net.minecraftforge.api.distmarker.Dist; import net.minecraft.world.IWorld; import net.minecraft.world.IBlockReader; import net.minecraft.util.math.vector.Vector3d; import net.minecraft.util.math.shapes.VoxelShapes; import net.minecraft.util.math.shapes.VoxelShape; import net.minecraft.util.math.shapes.ISelectionContext; import net.minecraft.util.math.BlockPos; import net.minecraft.util.Rotation; import net.minecraft.util.Mirror; import net.minecraft.util.Direction; import net.minecraft.state.properties.BlockStateProperties; import net.minecraft.state.StateContainer; import net.minecraft.state.DirectionProperty; import net.minecraft.state.BooleanProperty; import net.minecraft.loot.LootContext; import net.minecraft.item.ItemStack; import net.minecraft.item.Item; import net.minecraft.item.BlockItemUseContext; import net.minecraft.item.BlockItem; import net.minecraft.fluid.Fluids; import net.minecraft.fluid.FluidState; import net.minecraft.client.renderer.RenderTypeLookup; import net.minecraft.client.renderer.RenderType; import net.minecraft.block.material.Material; import net.minecraft.block.SoundType; import net.minecraft.block.IWaterLoggable; import net.minecraft.block.HorizontalBlock; import net.minecraft.block.BlockState; import net.minecraft.block.Block; import net.mcreator.blahmod.itemgroup.CreativeTabBlahBlocksItemGroup; import net.mcreator.blahmod.BlahmodModElements; import java.util.List; import java.util.Collections; @BlahmodModElements.ModElement.Tag public class PolishedCharredScoriaSideSlabBlock extends BlahmodModElements.ModElement { @ObjectHolder("blahmod:polished_charred_scoria_side_slab") public static final Block block = null; public PolishedCharredScoriaSideSlabBlock(BlahmodModElements instance) { super(instance, 1620); } @Override public void initElements() { elements.blocks.add(() -> new CustomBlock()); elements.items.add( () -> new BlockItem(block, new Item.Properties().group(CreativeTabBlahBlocksItemGroup.tab)).setRegistryName(block.getRegistryName())); } @Override @OnlyIn(Dist.CLIENT) public void clientLoad(FMLClientSetupEvent event) { RenderTypeLookup.setRenderLayer(block, RenderType.getCutout()); } public static class CustomBlock extends Block implements IWaterLoggable { public static final DirectionProperty FACING = HorizontalBlock.HORIZONTAL_FACING; public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED; public CustomBlock() { super(Block.Properties.create(Material.ROCK).sound(SoundType.BASALT).hardnessAndResistance(1.5f, 6f).setLightLevel(s -> 0).harvestLevel(0) .harvestTool(ToolType.PICKAXE).setRequiresTool().notSolid().setOpaque((bs, br, bp) -> false)); this.setDefaultState(this.stateContainer.getBaseState().with(FACING, Direction.NORTH).with(WATERLOGGED, false)); setRegistryName("polished_charred_scoria_side_slab"); } @Override public boolean propagatesSkylightDown(BlockState state, IBlockReader reader, BlockPos pos) { return true; } @Override public VoxelShape getShape(BlockState state, IBlockReader world, BlockPos pos, ISelectionContext context) { Vector3d offset = state.getOffset(world, pos); switch ((Direction) state.get(FACING)) { case SOUTH : default : return VoxelShapes.or(makeCuboidShape(16, 0, 8, 0, 16, 0)).withOffset(offset.x, offset.y, offset.z); case NORTH : return VoxelShapes.or(makeCuboidShape(0, 0, 8, 16, 16, 16)).withOffset(offset.x, offset.y, offset.z); case EAST : return VoxelShapes.or(makeCuboidShape(8, 0, 0, 0, 16, 16)).withOffset(offset.x, offset.y, offset.z); case WEST : return VoxelShapes.or(makeCuboidShape(8, 0, 16, 16, 16, 0)).withOffset(offset.x, offset.y, offset.z); } } @Override protected void fillStateContainer(StateContainer.Builder<Block, BlockState> builder) { builder.add(FACING, WATERLOGGED); } public BlockState rotate(BlockState state, Rotation rot) { return state.with(FACING, rot.rotate(state.get(FACING))); } public BlockState mirror(BlockState state, Mirror mirrorIn) { return state.rotate(mirrorIn.toRotation(state.get(FACING))); } @Override public BlockState getStateForPlacement(BlockItemUseContext context) { boolean flag = context.getWorld().getFluidState(context.getPos()).getFluid() == Fluids.WATER;; if (context.getFace() == Direction.UP || context.getFace() == Direction.DOWN) return this.getDefaultState().with(FACING, Direction.NORTH).with(WATERLOGGED, flag); return this.getDefaultState().with(FACING, context.getFace()).with(WATERLOGGED, flag); } @Override public FluidState getFluidState(BlockState state) { return state.get(WATERLOGGED) ? Fluids.WATER.getStillFluidState(false) : super.getFluidState(state); } @Override public BlockState updatePostPlacement(BlockState state, Direction facing, BlockState facingState, IWorld world, BlockPos currentPos, BlockPos facingPos) { if (state.get(WATERLOGGED)) { world.getPendingFluidTicks().scheduleTick(currentPos, Fluids.WATER, Fluids.WATER.getTickRate(world)); } return super.updatePostPlacement(state, facing, facingState, world, currentPos, facingPos); } @Override public List<ItemStack> getDrops(BlockState state, LootContext.Builder builder) { List<ItemStack> dropsOriginal = super.getDrops(state, builder); if (!dropsOriginal.isEmpty()) return dropsOriginal; return Collections.singletonList(new ItemStack(this, 1)); } } }
[ "jabawakijadehawk@gmail.com" ]
jabawakijadehawk@gmail.com
93b562c2d8a385fd4764b49d3522f83589489e06
311f1237e7498e7d1d195af5f4bcd49165afa63a
/sourcedata/poi-REL_3_0/src/scratchpad/src/org/apache/poi/hssf/usermodel/HSSFChart.java
bf9b0cc2369e4de84f2cb0d880ccf004dc201c95
[ "Apache-2.0" ]
permissive
DXYyang/SDP
86ee0e9fb7032a0638b8bd825bcf7585bccc8021
6ad0daf242d4062888ceca6d4a1bd4c41fd99b63
refs/heads/master
2023-01-11T02:29:36.328694
2019-11-02T09:38:34
2019-11-02T09:38:34
219,128,146
10
1
Apache-2.0
2023-01-02T21:53:42
2019-11-02T08:54:26
Java
UTF-8
Java
false
false
28,076
java
/* ==================================================================== Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. ==================================================================== */ package org.apache.poi.hssf.usermodel; import org.apache.poi.hssf.record.*; import org.apache.poi.hssf.record.formula.Area3DPtg; import java.util.ArrayList; import java.util.List; import java.util.Stack; /** * Has methods for construction of a chart object. * * @author Glen Stampoultzis (glens at apache.org) */ public class HSSFChart { /** * Creates a bar chart. API needs some work. :) * <p> * NOTE: Does not yet work... checking it in just so others * can take a look. */ public void createBarChart( HSSFWorkbook workbook, HSSFSheet sheet ) { List records = new ArrayList(); records.add( createMSDrawingObjectRecord() ); records.add( createOBJRecord() ); records.add( createBOFRecord() ); records.add( createHeaderRecord() ); records.add( createFooterRecord() ); records.add( createHCenterRecord() ); records.add( createVCenterRecord() ); records.add( createPrintSetupRecord() ); // unknown 33 records.add( createFontBasisRecord1() ); records.add( createFontBasisRecord2() ); records.add( createProtectRecord() ); records.add( createUnitsRecord() ); records.add( createChartRecord( 0, 0, 30434904, 19031616 ) ); records.add( createBeginRecord() ); records.add( createSCLRecord( (short) 1, (short) 1 ) ); records.add( createPlotGrowthRecord( 65536, 65536 ) ); records.add( createFrameRecord1() ); records.add( createBeginRecord() ); records.add( createLineFormatRecord(true) ); records.add( createAreaFormatRecord1() ); records.add( createEndRecord() ); records.add( createSeriesRecord() ); records.add( createBeginRecord() ); records.add( createTitleLinkedDataRecord() ); records.add( createValuesLinkedDataRecord() ); records.add( createCategoriesLinkedDataRecord() ); records.add( createDataFormatRecord() ); // records.add(createBeginRecord()); // unknown // records.add(createEndRecord()); records.add( createSeriesToChartGroupRecord() ); records.add( createEndRecord() ); records.add( createSheetPropsRecord() ); records.add( createDefaultTextRecord( DefaultDataLabelTextPropertiesRecord.CATEGORY_DATA_TYPE_ALL_TEXT_CHARACTERISTIC ) ); records.add( createAllTextRecord() ); records.add( createBeginRecord() ); // unknown records.add( createFontIndexRecord( 5 ) ); records.add( createDirectLinkRecord() ); records.add( createEndRecord() ); records.add( createDefaultTextRecord( (short) 3 ) ); // eek, undocumented text type records.add( createUnknownTextRecord() ); records.add( createBeginRecord() ); records.add( createFontIndexRecord( (short) 6 ) ); records.add( createDirectLinkRecord() ); records.add( createEndRecord() ); records.add( createAxisUsedRecord( (short) 1 ) ); createAxisRecords( records ); records.add( createEndRecord() ); records.add( createDimensionsRecord() ); records.add( createSeriesIndexRecord(2) ); records.add( createSeriesIndexRecord(1) ); records.add( createSeriesIndexRecord(3) ); records.add( createEOFRecord() ); sheet.insertChartRecords( records ); workbook.insertChartRecord(); } private EOFRecord createEOFRecord() { return new EOFRecord(); } private SeriesIndexRecord createSeriesIndexRecord( int index ) { SeriesIndexRecord r = new SeriesIndexRecord(); r.setIndex((short)index); return r; } private DimensionsRecord createDimensionsRecord() { DimensionsRecord r = new DimensionsRecord(); r.setFirstRow(0); r.setLastRow(31); r.setFirstCol((short)0); r.setLastCol((short)1); return r; } private HCenterRecord createHCenterRecord() { HCenterRecord r = new HCenterRecord(); r.setHCenter(false); return r; } private VCenterRecord createVCenterRecord() { VCenterRecord r = new VCenterRecord(); r.setVCenter(false); return r; } private PrintSetupRecord createPrintSetupRecord() { PrintSetupRecord r = new PrintSetupRecord(); r.setPaperSize((short)0); r.setScale((short)18); r.setPageStart((short)1); r.setFitWidth((short)1); r.setFitHeight((short)1); r.setLeftToRight(false); r.setLandscape(false); r.setValidSettings(true); r.setNoColor(false); r.setDraft(false); r.setNotes(false); r.setNoOrientation(false); r.setUsePage(false); r.setHResolution((short)0); r.setVResolution((short)0); r.setHeaderMargin(0.5); r.setFooterMargin(0.5); r.setCopies((short)15); // what the ?? return r; } private FontBasisRecord createFontBasisRecord1() { FontBasisRecord r = new FontBasisRecord(); r.setXBasis((short)9120); r.setYBasis((short)5640); r.setHeightBasis((short)200); r.setScale((short)0); r.setIndexToFontTable((short)5); return r; } private FontBasisRecord createFontBasisRecord2() { FontBasisRecord r = createFontBasisRecord1(); r.setIndexToFontTable((short)6); return r; } private ProtectRecord createProtectRecord() { ProtectRecord r = new ProtectRecord(); r.setProtect(false); return r; } private FooterRecord createFooterRecord() { FooterRecord r = new FooterRecord(); r.setFooter(null); return r; } private HeaderRecord createHeaderRecord() { HeaderRecord r = new HeaderRecord(); r.setHeader(null); return r; } private BOFRecord createBOFRecord() { BOFRecord r = new BOFRecord(); r.setVersion((short)600); r.setType((short)20); r.setBuild((short)0x1CFE); r.setBuildYear((short)1997); r.setHistoryBitMask(0x40C9); r.setRequiredVersion(106); return r; } private UnknownRecord createOBJRecord() { byte[] data = { (byte) 0x15, (byte) 0x00, (byte) 0x12, (byte) 0x00, (byte) 0x05, (byte) 0x00, (byte) 0x02, (byte) 0x00, (byte) 0x11, (byte) 0x60, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0xB8, (byte) 0x03, (byte) 0x87, (byte) 0x03, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, (byte) 0x00, }; return new UnknownRecord( (short) 0x005D, data ); } private UnknownRecord createMSDrawingObjectRecord() { // Since we haven't created this object yet we'll just put in the raw // form for the moment. byte[] data = { (byte)0x0F, (byte)0x00, (byte)0x02, (byte)0xF0, (byte)0xC0, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x10, (byte)0x00, (byte)0x08, (byte)0xF0, (byte)0x08, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x02, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x02, (byte)0x04, (byte)0x00, (byte)0x00, (byte)0x0F, (byte)0x00, (byte)0x03, (byte)0xF0, (byte)0xA8, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x0F, (byte)0x00, (byte)0x04, (byte)0xF0, (byte)0x28, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x01, (byte)0x00, (byte)0x09, (byte)0xF0, (byte)0x10, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x02, (byte)0x00, (byte)0x0A, (byte)0xF0, (byte)0x08, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x04, (byte)0x00, (byte)0x00, (byte)0x05, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x0F, (byte)0x00, (byte)0x04, (byte)0xF0, (byte)0x70, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x92, (byte)0x0C, (byte)0x0A, (byte)0xF0, (byte)0x08, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x02, (byte)0x04, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x0A, (byte)0x00, (byte)0x00, (byte)0x93, (byte)0x00, (byte)0x0B, (byte)0xF0, (byte)0x36, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x7F, (byte)0x00, (byte)0x04, (byte)0x01, (byte)0x04, (byte)0x01, (byte)0xBF, (byte)0x00, (byte)0x08, (byte)0x00, (byte)0x08, (byte)0x00, (byte)0x81, (byte)0x01, (byte)0x4E, (byte)0x00, (byte)0x00, (byte)0x08, (byte)0x83, (byte)0x01, (byte)0x4D, (byte)0x00, (byte)0x00, (byte)0x08, (byte)0xBF, (byte)0x01, (byte)0x10, (byte)0x00, (byte)0x11, (byte)0x00, (byte)0xC0, (byte)0x01, (byte)0x4D, (byte)0x00, (byte)0x00, (byte)0x08, (byte)0xFF, (byte)0x01, (byte)0x08, (byte)0x00, (byte)0x08, (byte)0x00, (byte)0x3F, (byte)0x02, (byte)0x00, (byte)0x00, (byte)0x02, (byte)0x00, (byte)0xBF, (byte)0x03, (byte)0x00, (byte)0x00, (byte)0x08, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x10, (byte)0xF0, (byte)0x12, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x04, (byte)0x00, (byte)0xC0, (byte)0x02, (byte)0x0A, (byte)0x00, (byte)0xF4, (byte)0x00, (byte)0x0E, (byte)0x00, (byte)0x66, (byte)0x01, (byte)0x20, (byte)0x00, (byte)0xE9, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x11, (byte)0xF0, (byte)0x00, (byte)0x00, (byte)0x00, (byte)0x00 }; return new UnknownRecord((short)0x00EC, data); } private void createAxisRecords( List records ) { records.add( createAxisParentRecord() ); records.add( createBeginRecord() ); records.add( createAxisRecord( AxisRecord.AXIS_TYPE_CATEGORY_OR_X_AXIS ) ); records.add( createBeginRecord() ); records.add( createCategorySeriesAxisRecord() ); records.add( createAxisOptionsRecord() ); records.add( createTickRecord1() ); records.add( createEndRecord() ); records.add( createAxisRecord( AxisRecord.AXIS_TYPE_VALUE_AXIS ) ); records.add( createBeginRecord() ); records.add( createValueRangeRecord() ); records.add( createTickRecord2() ); records.add( createAxisLineFormatRecord( AxisLineFormatRecord.AXIS_TYPE_MAJOR_GRID_LINE ) ); records.add( createLineFormatRecord(false) ); records.add( createEndRecord() ); records.add( createPlotAreaRecord() ); records.add( createFrameRecord2() ); records.add( createBeginRecord() ); records.add( createLineFormatRecord2() ); records.add( createAreaFormatRecord2() ); records.add( createEndRecord() ); records.add( createChartFormatRecord() ); records.add( createBeginRecord() ); records.add( createBarRecord() ); // unknown 1022 records.add( createLegendRecord() ); records.add( createBeginRecord() ); // unknown 104f records.add( createTextRecord() ); records.add( createBeginRecord() ); // unknown 104f records.add( createLinkedDataRecord() ); records.add( createEndRecord() ); records.add( createEndRecord() ); records.add( createEndRecord() ); records.add( createEndRecord() ); } private LinkedDataRecord createLinkedDataRecord() { LinkedDataRecord r = new LinkedDataRecord(); r.setLinkType(LinkedDataRecord.LINK_TYPE_TITLE_OR_TEXT); r.setReferenceType(LinkedDataRecord.REFERENCE_TYPE_DIRECT); r.setCustomNumberFormat(false); r.setIndexNumberFmtRecord((short)0); r.setFormulaOfLink( new LinkedDataFormulaField() ); return r; } private TextRecord createTextRecord() { TextRecord r = new TextRecord(); r.setHorizontalAlignment(TextRecord.HORIZONTAL_ALIGNMENT_CENTER); r.setVerticalAlignment(TextRecord.VERTICAL_ALIGNMENT_CENTER); r.setDisplayMode((short)1); r.setRgbColor(0x00000000); r.setX(-37); r.setY(-60); r.setWidth(0); r.setHeight(0); r.setAutoColor(true); r.setShowKey(false); r.setShowValue(false); r.setVertical(false); r.setAutoGeneratedText(true); r.setGenerated(true); r.setAutoLabelDeleted(false); r.setAutoBackground(true); r.setRotation((short)0); r.setShowCategoryLabelAsPercentage(false); r.setShowValueAsPercentage(false); r.setShowBubbleSizes(false); r.setShowLabel(false); r.setIndexOfColorValue((short)77); r.setDataLabelPlacement((short)0); r.setTextRotation((short)0); return r; } private LegendRecord createLegendRecord() { LegendRecord r = new LegendRecord(); r.setXAxisUpperLeft(3542); r.setYAxisUpperLeft(1566); r.setXSize(437); r.setYSize(213); r.setType(LegendRecord.TYPE_RIGHT); r.setSpacing(LegendRecord.SPACING_MEDIUM); r.setAutoPosition(true); r.setAutoSeries(true); r.setAutoXPositioning(true); r.setAutoYPositioning(true); r.setVertical(true); r.setDataTable(false); return r; } private BarRecord createBarRecord() { BarRecord r = new BarRecord(); r.setBarSpace((short)0); r.setCategorySpace((short)150); r.setHorizontal(false); r.setStacked(false); r.setDisplayAsPercentage(false); r.setShadow(false); return r; } private ChartFormatRecord createChartFormatRecord() { ChartFormatRecord r = new ChartFormatRecord(); r.setXPosition(0); r.setYPosition(0); r.setWidth(0); r.setHeight(0); r.setVaryDisplayPattern(false); return r; } private PlotAreaRecord createPlotAreaRecord() { PlotAreaRecord r = new PlotAreaRecord( ); return r; } private AxisLineFormatRecord createAxisLineFormatRecord( short format ) { AxisLineFormatRecord r = new AxisLineFormatRecord(); r.setAxisType( format ); return r; } private ValueRangeRecord createValueRangeRecord() { ValueRangeRecord r = new ValueRangeRecord(); r.setMinimumAxisValue( 0.0 ); r.setMaximumAxisValue( 0.0 ); r.setMajorIncrement( 0 ); r.setMinorIncrement( 0 ); r.setCategoryAxisCross( 0 ); r.setAutomaticMinimum( true ); r.setAutomaticMaximum( true ); r.setAutomaticMajor( true ); r.setAutomaticMinor( true ); r.setAutomaticCategoryCrossing( true ); r.setLogarithmicScale( false ); r.setValuesInReverse( false ); r.setCrossCategoryAxisAtMaximum( false ); r.setReserved( true ); // what's this do?? return r; } private TickRecord createTickRecord1() { TickRecord r = new TickRecord(); r.setMajorTickType( (byte) 2 ); r.setMinorTickType( (byte) 0 ); r.setLabelPosition( (byte) 3 ); r.setBackground( (byte) 1 ); r.setLabelColorRgb( 0 ); r.setZero1( (short) 0 ); r.setZero2( (short) 0 ); r.setZero3( (short) 45 ); r.setAutorotate( true ); r.setAutoTextBackground( true ); r.setRotation( (short) 0 ); r.setAutorotate( true ); r.setTickColor( (short) 77 ); return r; } private TickRecord createTickRecord2() { TickRecord r = createTickRecord1(); r.setZero3((short)0); return r; } private AxisOptionsRecord createAxisOptionsRecord() { AxisOptionsRecord r = new AxisOptionsRecord(); r.setMinimumCategory( (short) -28644 ); r.setMaximumCategory( (short) -28715 ); r.setMajorUnitValue( (short) 2 ); r.setMajorUnit( (short) 0 ); r.setMinorUnitValue( (short) 1 ); r.setMinorUnit( (short) 0 ); r.setBaseUnit( (short) 0 ); r.setCrossingPoint( (short) -28644 ); r.setDefaultMinimum( true ); r.setDefaultMaximum( true ); r.setDefaultMajor( true ); r.setDefaultMinorUnit( true ); r.setIsDate( true ); r.setDefaultBase( true ); r.setDefaultCross( true ); r.setDefaultDateSettings( true ); return r; } private CategorySeriesAxisRecord createCategorySeriesAxisRecord() { CategorySeriesAxisRecord r = new CategorySeriesAxisRecord(); r.setCrossingPoint( (short) 1 ); r.setLabelFrequency( (short) 1 ); r.setTickMarkFrequency( (short) 1 ); r.setValueAxisCrossing( true ); r.setCrossesFarRight( false ); r.setReversed( false ); return r; } private AxisRecord createAxisRecord( short axisType ) { AxisRecord r = new AxisRecord(); r.setAxisType( axisType ); return r; } private AxisParentRecord createAxisParentRecord() { AxisParentRecord r = new AxisParentRecord(); r.setAxisType( AxisParentRecord.AXIS_TYPE_MAIN ); r.setX( 479 ); r.setY( 221 ); r.setWidth( 2995 ); r.setHeight( 2902 ); return r; } private AxisUsedRecord createAxisUsedRecord( short numAxis ) { AxisUsedRecord r = new AxisUsedRecord(); r.setNumAxis( numAxis ); return r; } private LinkedDataRecord createDirectLinkRecord() { LinkedDataRecord r = new LinkedDataRecord(); r.setLinkType( LinkedDataRecord.LINK_TYPE_TITLE_OR_TEXT ); r.setReferenceType( LinkedDataRecord.REFERENCE_TYPE_DIRECT ); r.setCustomNumberFormat( false ); r.setIndexNumberFmtRecord( (short) 0 ); r.setFormulaOfLink( new LinkedDataFormulaField() ); return r; } private FontIndexRecord createFontIndexRecord( int index ) { FontIndexRecord r = new FontIndexRecord(); r.setFontIndex( (short) index ); return r; } private TextRecord createAllTextRecord() { TextRecord r = new TextRecord(); r.setHorizontalAlignment( TextRecord.HORIZONTAL_ALIGNMENT_CENTER ); r.setVerticalAlignment( TextRecord.VERTICAL_ALIGNMENT_CENTER ); r.setDisplayMode( TextRecord.DISPLAY_MODE_TRANSPARENT ); r.setRgbColor( 0 ); r.setX( -37 ); r.setY( -60 ); r.setWidth( 0 ); r.setHeight( 0 ); r.setAutoColor( true ); r.setShowKey( false ); r.setShowValue( true ); r.setVertical( false ); r.setAutoGeneratedText( true ); r.setGenerated( true ); r.setAutoLabelDeleted( false ); r.setAutoBackground( true ); r.setRotation( (short) 0 ); r.setShowCategoryLabelAsPercentage( false ); r.setShowValueAsPercentage( false ); r.setShowBubbleSizes( false ); r.setShowLabel( false ); r.setIndexOfColorValue( (short) 77 ); r.setDataLabelPlacement( (short) 0 ); r.setTextRotation( (short) 0 ); return r; } private TextRecord createUnknownTextRecord() { TextRecord r = new TextRecord(); r.setHorizontalAlignment( TextRecord.HORIZONTAL_ALIGNMENT_CENTER ); r.setVerticalAlignment( TextRecord.VERTICAL_ALIGNMENT_CENTER ); r.setDisplayMode( TextRecord.DISPLAY_MODE_TRANSPARENT ); r.setRgbColor( 0 ); r.setX( -37 ); r.setY( -60 ); r.setWidth( 0 ); r.setHeight( 0 ); r.setAutoColor( true ); r.setShowKey( false ); r.setShowValue( false ); r.setVertical( false ); r.setAutoGeneratedText( true ); r.setGenerated( true ); r.setAutoLabelDeleted( false ); r.setAutoBackground( true ); r.setRotation( (short) 0 ); r.setShowCategoryLabelAsPercentage( false ); r.setShowValueAsPercentage( false ); r.setShowBubbleSizes( false ); r.setShowLabel( false ); r.setIndexOfColorValue( (short) 77 ); r.setDataLabelPlacement( (short) 11088 ); r.setTextRotation( (short) 0 ); return r; } private DefaultDataLabelTextPropertiesRecord createDefaultTextRecord( short categoryDataType ) { DefaultDataLabelTextPropertiesRecord r = new DefaultDataLabelTextPropertiesRecord(); r.setCategoryDataType( categoryDataType ); return r; } private SheetPropertiesRecord createSheetPropsRecord() { SheetPropertiesRecord r = new SheetPropertiesRecord(); r.setChartTypeManuallyFormatted( false ); r.setPlotVisibleOnly( true ); r.setDoNotSizeWithWindow( false ); r.setDefaultPlotDimensions( true ); r.setAutoPlotArea( false ); return r; } private SeriesToChartGroupRecord createSeriesToChartGroupRecord() { return new SeriesToChartGroupRecord(); } private DataFormatRecord createDataFormatRecord() { DataFormatRecord r = new DataFormatRecord(); r.setPointNumber( (short) -1 ); r.setSeriesIndex( (short) 0 ); r.setSeriesNumber( (short) 0 ); r.setUseExcel4Colors( false ); return r; } private LinkedDataRecord createCategoriesLinkedDataRecord() { LinkedDataRecord r = new LinkedDataRecord(); r.setLinkType( LinkedDataRecord.LINK_TYPE_CATEGORIES ); r.setReferenceType( LinkedDataRecord.REFERENCE_TYPE_WORKSHEET ); r.setCustomNumberFormat( false ); r.setIndexNumberFmtRecord( (short) 0 ); LinkedDataFormulaField formula = new LinkedDataFormulaField(); Stack tokens = new Stack(); Area3DPtg p = new Area3DPtg(); p.setExternSheetIndex( (short) 0 ); p.setFirstColumn( (short) 1 ); p.setLastColumn( (short) 1 ); p.setFirstRow( (short) 0 ); p.setLastRow( (short) 31 ); tokens.add( p ); formula.setFormulaTokens( tokens ); r.setFormulaOfLink( formula ); return r; } private LinkedDataRecord createValuesLinkedDataRecord() { LinkedDataRecord r = new LinkedDataRecord(); r.setLinkType( LinkedDataRecord.LINK_TYPE_VALUES ); r.setReferenceType( LinkedDataRecord.REFERENCE_TYPE_WORKSHEET ); r.setCustomNumberFormat( false ); r.setIndexNumberFmtRecord( (short) 0 ); LinkedDataFormulaField formula = new LinkedDataFormulaField(); Stack tokens = new Stack(); Area3DPtg p = new Area3DPtg(); p.setExternSheetIndex( (short) 0 ); p.setFirstColumn( (short) 0 ); p.setLastColumn( (short) 0 ); p.setFirstRow( (short) 0 ); p.setLastRow( (short) 31 ); tokens.add( p ); formula.setFormulaTokens( tokens ); r.setFormulaOfLink( formula ); return r; } private LinkedDataRecord createTitleLinkedDataRecord() { LinkedDataRecord r = new LinkedDataRecord(); r.setLinkType( LinkedDataRecord.LINK_TYPE_TITLE_OR_TEXT ); r.setReferenceType( LinkedDataRecord.REFERENCE_TYPE_DIRECT ); r.setCustomNumberFormat( false ); r.setIndexNumberFmtRecord( (short) 0 ); r.setFormulaOfLink( new LinkedDataFormulaField() ); return r; } private SeriesRecord createSeriesRecord() { SeriesRecord r = new SeriesRecord(); r.setCategoryDataType( SeriesRecord.CATEGORY_DATA_TYPE_NUMERIC ); r.setValuesDataType( SeriesRecord.VALUES_DATA_TYPE_NUMERIC ); r.setNumCategories( (short) 32 ); r.setNumValues( (short) 31 ); r.setBubbleSeriesType( SeriesRecord.BUBBLE_SERIES_TYPE_NUMERIC ); r.setNumBubbleValues( (short) 0 ); return r; } private EndRecord createEndRecord() { return new EndRecord(); } private AreaFormatRecord createAreaFormatRecord1() { AreaFormatRecord r = new AreaFormatRecord(); r.setForegroundColor( 16777215 ); // RGB Color r.setBackgroundColor( 0 ); // RGB Color r.setPattern( (short) 1 ); // TODO: Add Pattern constants to record r.setAutomatic( true ); r.setInvert( false ); r.setForecolorIndex( (short) 78 ); r.setBackcolorIndex( (short) 77 ); return r; } private AreaFormatRecord createAreaFormatRecord2() { AreaFormatRecord r = new AreaFormatRecord(); r.setForegroundColor(0x00c0c0c0); r.setBackgroundColor(0x00000000); r.setPattern((short)1); r.setAutomatic(false); r.setInvert(false); r.setForecolorIndex((short)22); r.setBackcolorIndex((short)79); return r; } private LineFormatRecord createLineFormatRecord( boolean drawTicks ) { LineFormatRecord r = new LineFormatRecord(); r.setLineColor( 0 ); r.setLinePattern( LineFormatRecord.LINE_PATTERN_SOLID ); r.setWeight( (short) -1 ); r.setAuto( true ); r.setDrawTicks( drawTicks ); r.setColourPaletteIndex( (short) 77 ); // what colour is this? return r; } private LineFormatRecord createLineFormatRecord2() { LineFormatRecord r = new LineFormatRecord(); r.setLineColor( 0x00808080 ); r.setLinePattern( (short) 0 ); r.setWeight( (short) 0 ); r.setAuto( false ); r.setDrawTicks( false ); r.setUnknown( false ); r.setColourPaletteIndex( (short) 23 ); return r; } private FrameRecord createFrameRecord1() { FrameRecord r = new FrameRecord(); r.setBorderType( FrameRecord.BORDER_TYPE_REGULAR ); r.setAutoSize( false ); r.setAutoPosition( true ); return r; } private FrameRecord createFrameRecord2() { FrameRecord r = new FrameRecord(); r.setBorderType( FrameRecord.BORDER_TYPE_REGULAR ); r.setAutoSize( true ); r.setAutoPosition( true ); return r; } private PlotGrowthRecord createPlotGrowthRecord( int horizScale, int vertScale ) { PlotGrowthRecord r = new PlotGrowthRecord(); r.setHorizontalScale( horizScale ); r.setVerticalScale( vertScale ); return r; } private SCLRecord createSCLRecord( short numerator, short denominator ) { SCLRecord r = new SCLRecord(); r.setDenominator( denominator ); r.setNumerator( numerator ); return r; } private BeginRecord createBeginRecord() { return new BeginRecord(); } private ChartRecord createChartRecord( int x, int y, int width, int height ) { ChartRecord r = new ChartRecord(); r.setX( x ); r.setY( y ); r.setWidth( width ); r.setHeight( height ); return r; } private UnitsRecord createUnitsRecord() { UnitsRecord r = new UnitsRecord(); r.setUnits( (short) 0 ); return r; } }
[ "512463514@qq.com" ]
512463514@qq.com
565fa419e3ea621f112e6c67535d5bc039487813
d7a042b5ca944eeb18d1a7f3c97f462bf8035392
/src/main/java/cn/edu/guet/mvc/Configuration.java
e7cc1bc57214190c00a1e6f6a45cf4309ebfd58f
[]
no_license
18477006336/lqbk1
f48323d6a6f03dbca0d5cb876d79b17062afb35c
ef6b54056695f3c6add98b6e9870cd325898973b
refs/heads/master
2023-06-18T17:31:35.160884
2021-07-01T02:46:19
2021-07-01T02:46:19
null
0
0
null
null
null
null
GB18030
Java
false
false
2,882
java
package cn.edu.guet.mvc; import cn.edu.guet.mvc.annotation.Controller; import cn.edu.guet.mvc.annotation.RequestMapping; import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.reflect.MethodUtils; import java.io.File; import java.lang.reflect.Method; import java.net.URI; import java.net.URISyntaxException; import java.util.HashMap; import java.util.Map; import java.util.ResourceBundle; public class Configuration { public Map<String, ControllerMapping> config() throws URISyntaxException { Map<String, ControllerMapping> controllerMapping = new HashMap<String, ControllerMapping>(); ResourceBundle bundle = ResourceBundle.getBundle("config"); String controllerPackageName = bundle.getString("controller.package"); String path = controllerPackageName.replace(".", "/"); URI uri = Configuration.class.getResource("/" + path).toURI(); File controllerDirectory = new File(uri); String[] controllerFileNames = controllerDirectory.list(); for (String className : controllerFileNames) { if (className.endsWith(".class")) { System.out.println("包下的所有class:" + className); String fullClassName = controllerPackageName + "." + StringUtils.substringBefore(className, ".class"); System.out.println("class的 全类名:" + fullClassName); try { Class controllerClass = Class.forName(fullClassName); /* 如果clazz中有Controller注解,才进一步处理 */ if (controllerClass.isAnnotationPresent(Controller.class)) { Method methods[] = MethodUtils.getMethodsWithAnnotation(controllerClass, RequestMapping.class); /* 找到哪些方法使用了RequestMapping注解 */ for (Method method : methods) { /* 获取到RequestMapping注解的值 url */ RequestMapping annotation = method.getAnnotation(RequestMapping.class); ControllerMapping mapping = new ControllerMapping(controllerClass, method); System.out.print("控制器:"+controllerClass.getSimpleName()); System.out.print("\t方法:"+method.getName()); System.out.println("\turl注解的值:" + annotation.value()); controllerMapping.put(annotation.value(), mapping); } } } catch (ClassNotFoundException e) { e.printStackTrace(); } } } return controllerMapping; } }
[ "md8817369" ]
md8817369
9dae839a71b83da3ebbf25746b40792a8e586439
c04ab378426deb92fe30e4983e14816ecb9ff04b
/src/main/java/com/huntech/pvs/dao/address/AddressTownMapper.java
ef9be8e2060c16acfe142df539609d03fa7d4f04
[]
no_license
wlhebut/synctest
5ff677e7d8770d2a6e7c9cd10882d2549678d951
284953cc0a610b9b0a390dcb7407fe5e10b3cea5
refs/heads/master
2020-03-21T03:23:03.079666
2018-06-21T03:15:14
2018-06-21T03:15:14
138,051,029
0
0
null
null
null
null
UTF-8
Java
false
false
932
java
package com.huntech.pvs.dao.address; import com.huntech.pvs.model.address.AddressTown; import com.huntech.pvs.model.address.AddressTownExample; import java.util.List; import org.apache.ibatis.annotations.Param; public interface AddressTownMapper { int countByExample(AddressTownExample example); int deleteByExample(AddressTownExample example); int deleteByPrimaryKey(Integer id); int insert(AddressTown record); int insertSelective(AddressTown record); List<AddressTown> selectByExample(AddressTownExample example); AddressTown selectByPrimaryKey(Integer id); int updateByExampleSelective(@Param("record") AddressTown record, @Param("example") AddressTownExample example); int updateByExample(@Param("record") AddressTown record, @Param("example") AddressTownExample example); int updateByPrimaryKeySelective(AddressTown record); int updateByPrimaryKey(AddressTown record); }
[ "584529403@qq.com" ]
584529403@qq.com
ddcf3887e949de33adceb90f6eddadef8e7220eb
aeac2c354ec4153c31c422451d0983e4ba2bdf56
/src/main/java/kr/or/ddit/vo/FollowVO.java
5482f895be0de837d41b4e6304366e23949664e9
[]
no_license
Soo-Young-Jung/eJobProject
feb8640a590d6041c00304bf86e2babbafb93f63
8a0600c6833199e50fa7d56d835ca702dc01a939
refs/heads/master
2022-12-23T12:56:43.853296
2019-09-09T06:53:30
2019-09-09T06:53:30
207,230,657
0
0
null
2022-12-16T09:59:48
2019-09-09T05:28:10
Java
UTF-8
Java
false
false
279
java
package kr.or.ddit.vo; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; @Data @NoArgsConstructor @EqualsAndHashCode(of= {"mem_id", "follow_mem"}) public class FollowVO { private String mem_id; private String follow_mem; }
[ "kscorponok@gmail.com" ]
kscorponok@gmail.com
fe4c27aa8eb2d4f36acd5083c98ee1272652dce8
4ab9f0992801e9e36b8d771fce2beb5fb8d1d97d
/src/main/java/com/ly/xiyifu/rest/exception/BusinessException.java
85b23f9178a9db4c8379ae587396450d60bc4604
[]
no_license
liangyueen/springboot
d3d7f36b13d6d5b40d90cf9fea067fd48b29991d
45faed81d2a12bf3217e80441c0712963fea2f4f
refs/heads/master
2020-03-24T02:25:32.951237
2018-07-26T01:59:26
2018-07-26T01:59:26
142,374,955
0
0
null
null
null
null
UTF-8
Java
false
false
438
java
package com.ly.xiyifu.rest.exception; import lombok.Data; /** * Created with IntelliJ IDEA. * <p> * User: chengzh * <p> * Date: 18-3-15 Time: 下午5:32 * <p> * Description: */ @Data public class BusinessException extends RuntimeException { private int errCode; private String msg; public BusinessException(int code, String msg) { super(msg); this.errCode = code; this.msg = msg; } }
[ "liangyueen@lingyi365.com" ]
liangyueen@lingyi365.com
c2a8708b44f7e01b5f9d086d0659d05846bfe6a1
901d2daf15019c904342b40da87035d4860f72a4
/src/com/company/Main.java
f59b538d46e66680862f0c866c217b86b35add0b
[]
no_license
ronaldescobarj/a-algorithm
c1f189a6443cbfa8c4298dd333298fb6a8440a1e
95956a1d95a299f94f5f7f81af5af4cae1cd7457
refs/heads/master
2020-03-29T19:36:23.556615
2018-09-25T13:45:45
2018-09-25T13:45:45
150,272,150
0
0
null
null
null
null
UTF-8
Java
false
false
23,185
java
package com.company; import javafx.util.Pair; import java.util.*; public class Main { public static final String ANSI_RESET = "\u001B[0m"; public static final String ANSI_RED = "\u001B[31m"; public static final String ANSI_GREEN = "\u001B[32m"; public static final String ANSI_YELLOW = "\u001B[33m"; public static final String ANSI_BLUE = "\u001B[34m"; public static final String ANSI_PURPLE = "\u001B[35m"; public static final String ANSI_CYAN = "\u001B[36m"; public static final String ANSI_WHITE = "\u001B[37m"; static int[][] copyMatrix(int[][] cube) { int[][] newCube = new int[9][12]; for (int i = 0; i < 9; i++) { for (int j = 0; j < 12; j++) { newCube[i][j] = cube[i][j]; } } return newCube; } static void printInColor(int box) { switch(box) { case 1: System.out.print(ANSI_WHITE + box + " " + ANSI_RESET); break; case 2: System.out.print(ANSI_PURPLE + box + " " + ANSI_RESET); break; case 3: System.out.print(ANSI_GREEN + box + " " + ANSI_RESET); break; case 4: System.out.print(ANSI_RED + box + " " + ANSI_RESET); break; case 5: System.out.print(ANSI_BLUE + box + " " + ANSI_RESET); break; case 6: System.out.print(ANSI_YELLOW + box + " " + ANSI_RESET); break; default: System.out.print(" "); break; } } static void printCube(int[][] cube) { for (int i = 0; i < 9; i++) { for (int j = 0; j < 12; j++) { if (cube[i][j] != 0) { printInColor(cube[i][j]); } else { System.out.print(" "); } } System.out.println(); } } static String matrixToString(int[][] cube) { String result = ""; for (int i = 0; i < 9; i++) { for (int j = 0; j < 12; j++) { result += Integer.toString(cube[i][j]); } } return result; } static int[][] stringToMatrix(String cube) { int[][] result = new int[9][12]; int index = 0; for (int i = 0; i < 9; i++) { for (int j = 0; j < 12; j++) { result[i][j] = Character.getNumericValue(cube.charAt(index)); index++; } } return result; } static void rotateFrontClockwise(int[][] cube) { int temp30 = cube[3][0]; int temp31 = cube[3][1]; cube[3][0] = cube[5][0]; cube[3][1] = cube[4][0]; cube[5][0] = cube[5][2]; cube[4][0] = cube[5][1]; cube[5][2] = cube[3][2]; cube[5][1] = cube[4][2]; cube[3][2] = temp30; cube[4][2] = temp31; int temp33 = cube[3][3]; int temp43 = cube[4][3]; int temp53 = cube[5][3]; cube[3][3] = cube[8][6]; cube[4][3] = cube[8][7]; cube[5][3] = cube[8][8]; cube[8][6] = cube[5][11]; cube[8][7] = cube[4][11]; cube[8][8] = cube[3][11]; cube[5][11] = cube[0][8]; cube[4][11] = cube[0][7]; cube[3][11] = cube[0][6]; cube[0][8] = temp33; cube[0][7] = temp43; cube[0][6] = temp53; } static void rotateFrontCounterClockwise(int[][] cube) { int temp30 = cube[3][0]; int temp31 = cube[3][1]; cube[3][0] = cube[3][2]; cube[3][1] = cube[4][2]; cube[3][2] = cube[5][2]; cube[4][2] = cube[5][1]; cube[5][2] = cube[5][0]; cube[5][1] = cube[4][0]; cube[5][0] = temp30; cube[4][0] = temp31; int temp33 = cube[3][3]; int temp43 = cube[4][3]; int temp53 = cube[5][3]; cube[3][3] = cube[0][8]; cube[4][3] = cube[0][7]; cube[5][3] = cube[0][6]; cube[0][8] = cube[5][11]; cube[0][7] = cube[4][11]; cube[0][6] = cube[3][11]; cube[5][11] = cube[8][6]; cube[4][11] = cube[8][7]; cube[3][11] = cube[8][8]; cube[8][6] = temp33; cube[8][7] = temp43; cube[8][8] = temp53; } static void rotateBackClockwise(int[][] cube) { int temp36 = cube[3][6]; int temp37 = cube[3][7]; cube[3][6] = cube[5][6]; cube[3][7] = cube[4][6]; cube[5][6] = cube[5][8]; cube[4][6] = cube[5][7]; cube[5][8] = cube[3][8]; cube[5][7] = cube[4][8]; cube[3][8] = temp36; cube[4][8] = temp37; int temp35 = cube[3][5]; int temp45 = cube[4][5]; int temp55 = cube[5][5]; cube[3][5] = cube[6][6]; cube[4][5] = cube[6][7]; cube[5][5] = cube[6][8]; cube[6][6] = cube[5][9]; cube[6][7] = cube[4][9]; cube[6][8] = cube[3][9]; cube[5][9] = cube[2][8]; cube[4][9] = cube[2][7]; cube[3][9] = cube[2][6]; cube[2][8] = temp35; cube[2][7] = temp45; cube[2][6] = temp55; } static void rotateBackCounterClockwise(int[][] cube) { int temp36 = cube[3][6]; int temp37 = cube[3][7]; cube[3][6] = cube[3][8]; cube[3][7] = cube[4][8]; cube[3][8] = cube[5][8]; cube[4][8] = cube[5][7]; cube[5][8] = cube[5][6]; cube[5][7] = cube[4][6]; cube[5][6] = temp36; cube[4][6] = temp37; int temp35 = cube[3][5]; int temp45 = cube[4][5]; int temp55 = cube[5][5]; cube[3][5] = cube[2][8]; cube[4][5] = cube[2][7]; cube[5][5] = cube[2][6]; cube[2][8] = cube[5][9]; cube[2][7] = cube[4][9]; cube[2][6] = cube[3][9]; cube[5][9] = cube[6][6]; cube[4][9] = cube[6][7]; cube[3][9] = cube[6][8]; cube[6][6] = temp35; cube[6][7] = temp45; cube[6][8] = temp55; } static void rotateLeftClockwise(int[][] cube) { int temp1 = cube[3][0]; int temp2 = cube[4][0]; int temp3 = cube[5][0]; cube[3][0] = cube[2][8]; cube[4][0] = cube[1][8]; cube[5][0] = cube[0][8]; cube[2][8] = cube[5][8]; cube[1][8] = cube[4][8]; cube[0][8] = cube[3][8]; cube[5][8] = cube[8][8]; cube[4][8] = cube[7][8]; cube[3][8] = cube[6][8]; cube[8][8] = temp1; cube[7][8] = temp2; cube[6][8] = temp3; temp1 = cube[3][9]; temp2 = cube[4][9]; cube[3][9] = cube[5][9]; cube[4][9] = cube[5][10]; cube[5][9] = cube[5][11]; cube[5][10] = cube[4][11]; cube[5][11] = cube[3][11]; cube[4][11] = cube[3][10]; cube[3][11] = temp1; cube[3][10] = temp2; } static void rotateLeftCounterClockwise(int[][] cube) { int temp1 = cube[3][0]; int temp2 = cube[4][0]; int temp3 = cube[5][0]; cube[3][0] = cube[8][8]; cube[4][0] = cube[7][8]; cube[5][0] = cube[6][8]; cube[8][8] = cube[5][8]; cube[7][8] = cube[4][8]; cube[6][8] = cube[3][8]; cube[5][8] = cube[2][8]; cube[4][8] = cube[1][8]; cube[3][8] = cube[0][8]; cube[2][8] = temp1; cube[1][8] = temp2; cube[0][8] = temp3; temp1 = cube[3][9]; temp2 = cube[4][9]; cube[3][9] = cube[3][11]; cube[4][9] = cube[3][10]; cube[3][11] = cube[5][11]; cube[3][10] = cube[4][11]; cube[5][11] = cube[5][9]; cube[4][11] = cube[5][10]; cube[5][9] = temp1; cube[5][10] = temp2; } static void rotateRightClockwise(int[][] cube) { int temp33 = cube[3][3]; int temp34 = cube[3][4]; cube[3][3] = cube[5][3]; cube[3][4] = cube[4][3]; cube[5][3] = cube[5][5]; cube[4][3] = cube[5][4]; cube[5][5] = cube[3][5]; cube[5][4] = cube[4][5]; cube[3][5] = temp33; cube[4][5] = temp34; int temp36 = cube[3][6]; int temp46 = cube[4][6]; int temp56 = cube[5][6]; cube[3][6] = cube[0][6]; cube[4][6] = cube[1][6]; cube[5][6] = cube[2][6]; cube[0][6] = cube[5][2]; cube[1][6] = cube[4][2]; cube[2][6] = cube[3][2]; cube[5][2] = cube[6][6]; cube[4][2] = cube[7][6]; cube[3][2] = cube[8][6]; cube[6][6] = temp36; cube[7][6] = temp46; cube[8][6] = temp56; } static void rotateRightCounterClockwise(int[][] cube) { int temp33 = cube[3][3]; int temp34 = cube[3][4]; cube[3][3] = cube[3][5]; cube[3][4] = cube[4][5]; cube[3][5] = cube[5][5]; cube[4][5] = cube[5][4]; cube[5][5] = cube[5][3]; cube[5][4] = cube[4][3]; cube[5][3] = temp33; cube[4][3] = temp34; int temp36 = cube[3][6]; int temp46 = cube[4][6]; int temp56 = cube[5][6]; cube[3][6] = cube[6][6]; cube[4][6] = cube[7][6]; cube[5][6] = cube[8][6]; cube[6][6] = cube[5][2]; cube[7][6] = cube[4][2]; cube[8][6] = cube[3][2]; cube[5][2] = cube[0][6]; cube[4][2] = cube[1][6]; cube[3][2] = cube[2][6]; cube[0][6] = temp36; cube[1][6] = temp46; cube[2][6] = temp56; } static void rotateTopClockwise(int[][] cube) { int temp06 = cube[0][6]; int temp07 = cube[0][7]; cube[0][6] = cube[2][6]; cube[0][7] = cube[1][6]; cube[2][6] = cube[2][8]; cube[1][6] = cube[2][7]; cube[2][8] = cube[0][8]; cube[2][7] = cube[1][8]; cube[0][8] = temp06; cube[1][8] = temp07; int temp36 = cube[3][6]; int temp37 = cube[3][7]; int temp38 = cube[3][8]; cube[3][6] = cube[3][9]; cube[3][7] = cube[3][10]; cube[3][8] = cube[3][11]; cube[3][9] = cube[3][0]; cube[3][10] = cube[3][1]; cube[3][11] = cube[3][2]; cube[3][0] = cube[3][3]; cube[3][1] = cube[3][4]; cube[3][2] = cube[3][5]; cube[3][3] = temp36; cube[3][4] = temp37; cube[3][5] = temp38; } static void rotateTopCounterClockwise(int[][] cube) { int temp06 = cube[0][6]; int temp07 = cube[0][7]; cube[0][6] = cube[0][8]; cube[0][7] = cube[1][8]; cube[0][8] = cube[2][8]; cube[1][8] = cube[2][7]; cube[2][8] = cube[2][6]; cube[2][7] = cube[1][6]; cube[2][6] = temp06; cube[1][6] = temp07; int temp36 = cube[3][6]; int temp37 = cube[3][7]; int temp38 = cube[3][8]; cube[3][6] = cube[3][3]; cube[3][7] = cube[3][4]; cube[3][8] = cube[3][5]; cube[3][3] = cube[3][0]; cube[3][4] = cube[3][1]; cube[3][5] = cube[3][2]; cube[3][0] = cube[3][9]; cube[3][1] = cube[3][10]; cube[3][2] = cube[3][11]; cube[3][9] = temp36; cube[3][10] = temp37; cube[3][11] = temp38; } static void rotateBottomClockwise(int[][] cube) { int temp66 = cube[6][6]; int temp67 = cube[6][7]; cube[6][6] = cube[8][6]; cube[6][7] = cube[7][6]; cube[8][6] = cube[8][8]; cube[7][6] = cube[8][7]; cube[8][8] = cube[6][8]; cube[8][7] = cube[7][8]; cube[6][8] = temp66; cube[7][8] = temp67; int temp56 = cube[5][6]; int temp57 = cube[5][7]; int temp58 = cube[5][8]; cube[5][6] = cube[5][3]; cube[5][7] = cube[5][4]; cube[5][8] = cube[5][5]; cube[5][3] = cube[5][0]; cube[5][4] = cube[5][1]; cube[5][5] = cube[5][2]; cube[5][0] = cube[5][9]; cube[5][1] = cube[5][10]; cube[5][2] = cube[5][11]; cube[5][9] = temp56; cube[5][10] = temp57; cube[5][11] = temp58; } static void rotateBottomCounterClockwise(int[][] cube) { int temp66 = cube[6][6]; int temp67 = cube[6][7]; cube[6][6] = cube[6][8]; cube[6][7] = cube[7][8]; cube[6][8] = cube[8][8]; cube[7][8] = cube[8][7]; cube[8][8] = cube[8][6]; cube[8][7] = cube[7][6]; cube[8][6] = temp66; cube[7][6] = temp67; int temp56 = cube[5][6]; int temp57 = cube[5][7]; int temp58 = cube[5][8]; cube[5][6] = cube[5][9]; cube[5][7] = cube[5][10]; cube[5][8] = cube[5][11]; cube[5][9] = cube[5][0]; cube[5][10] = cube[5][1]; cube[5][11] = cube[5][2]; cube[5][0] = cube[5][3]; cube[5][1] = cube[5][4]; cube[5][2] = cube[5][5]; cube[5][3] = temp56; cube[5][4] = temp57; cube[5][5] = temp58; } static List<String> getAppliableRules() { List<String> appliableRules = new ArrayList<>(); appliableRules.add("frontCW"); appliableRules.add("frontCounterCW"); appliableRules.add("backCW"); appliableRules.add("backCounterCW"); appliableRules.add("leftCW"); appliableRules.add("leftCounterCW"); appliableRules.add("rightCW"); appliableRules.add("rightCounterCW"); appliableRules.add("topCW"); appliableRules.add("topCounterCW"); appliableRules.add("bottomCW"); appliableRules.add("bottomCounterCW"); return appliableRules; } static void applyRule(int[][] cube, String rule) { switch (rule) { case "frontCW": rotateFrontClockwise(cube); break; case "frontCounterCW": rotateFrontCounterClockwise(cube); break; case "backCW": rotateBackClockwise(cube); break; case "backCounterCW": rotateBackCounterClockwise(cube); break; case "leftCW": rotateLeftClockwise(cube); break; case "leftCounterCW": rotateLeftCounterClockwise(cube); break; case "rightCW": rotateRightClockwise(cube); break; case "rightCounterCW": rotateRightCounterClockwise(cube); break; case "topCW": rotateTopClockwise(cube); break; case "topCounterCW": rotateTopCounterClockwise(cube); break; case "bottomCW": rotateBottomClockwise(cube); break; case "bottomCounterCW": rotateBottomCounterClockwise(cube); break; } } static boolean isAncestor(HashMap<String, Pair<String, Float>> graph, String possibleAncestor, String currentState) { String tempState = currentState; boolean response = false; while (!tempState.equals("")) { tempState = graph.get(tempState).getKey(); if (tempState.equals(possibleAncestor)) { response = true; break; } } return response; } static float gFunction(String currentState, String initialState, HashMap<String, Pair<String, Float>> graph) { float cost = 0; String tempState = currentState; while (!tempState.equals(initialState)) { cost += graph.get(tempState).getValue(); tempState = graph.get(tempState).getKey(); } return cost; } static float hFunction(String currentState, String finalState, HashMap<String, Pair<String, Float>> graph) { float cost = 0; for (int i = 0; i < 9 * 12; i++) { if (currentState.charAt(i) != finalState.charAt(i)) { cost++; } } return cost; } static float getCostOfRule(String rule) { return 3; } static void printPath(HashMap<String, Pair<String, Float>> graph, String finalState) { Stack<String> statesPath = new Stack<>(); System.out.println("estados visitados: " + graph.size()); String currentState = finalState; float totalCost = 0; while (!currentState.equals("")) { statesPath.add(currentState); totalCost += graph.get(currentState).getValue(); currentState = graph.get(currentState).getKey(); } int counter = 1; while (!statesPath.isEmpty()) { System.out.println("Iteracion " + counter); String state = statesPath.pop(); printCube(stringToMatrix(state)); counter++; } System.out.println("total cost: " + totalCost); } static boolean isFinalState(String state, String finalState) { int[][] mat = stringToMatrix(state); boolean response = true; for (int i = 0; i < 3; i++) { for (int j = 6; j < 9; j++) { } } return response; } static boolean aAlgorithm(String initialState, String finalState, HashMap<String, Pair<String, Float>> graph) { graph.put(initialState, new Pair<>("", (float) 0)); OpenedStates open = new OpenedStates(); HashSet<String> closed = new HashSet<>(); open.insert(0, initialState); boolean found = false; Pair<String, Float> currentState; while (!open.isEmpty() && !found) { currentState = open.popMinValue(); closed.add(currentState.getKey()); if (currentState.getKey().equals(finalState)) { found = true; System.out.println("deberia ser lo mismo que est vis"); System.out.println(open.getLength() + closed.size()); System.out.println("cerrados (expandidos)"); System.out.println(closed.size()); printPath(graph, finalState); } else { List<String> appliableRules = getAppliableRules(); while (!appliableRules.isEmpty()) { String rule = appliableRules.remove(0); int[][] genState = stringToMatrix(currentState.getKey()); applyRule(genState, rule); String generatedState = matrixToString(genState); float gValue, fValue; if (!isAncestor(graph, generatedState, currentState.getKey())) { float tempCost = gFunction(currentState.getKey(), initialState, graph) + getCostOfRule(rule); if (!open.contains(generatedState) && !closed.contains(generatedState)) { gValue = tempCost; fValue = gValue + hFunction(generatedState, finalState, graph); graph.put(generatedState, new Pair<>(currentState.getKey(), getCostOfRule(rule))); open.insert(fValue, generatedState); } else { if (tempCost < gFunction(generatedState, initialState, graph)) { gValue = tempCost; fValue = gValue + hFunction(generatedState, finalState, graph); graph.put(generatedState, new Pair<>(currentState.getKey(), getCostOfRule(rule))); if (open.contains(generatedState)) { open.update(generatedState, fValue); } if (closed.contains(generatedState)) { closed.remove(generatedState); open.insert(fValue, generatedState); } } } } } } } return found; } public static void main(String[] args) { int[][] initialState = new int[9][12]; int[][] finalState = new int[9][12]; for (int i = 0; i < 9; i++) { for (int j = 0; j < 12; j++) { initialState[i][j] = 0; finalState[i][j] = 0; } } //1 = blanco //2 = naranja //3 = verde // 4 = rojo // 5 = azul // 6 = amarillo finalState[0][6] = 1; finalState[0][7] = 1; finalState[0][8] = 1; finalState[1][6] = 1; finalState[1][7] = 1; finalState[1][8] = 1; finalState[2][6] = 1; finalState[2][7] = 1; finalState[2][8] = 1; finalState[3][0] = 2; finalState[3][1] = 2; finalState[3][2] = 2; finalState[3][3] = 3; finalState[3][4] = 3; finalState[3][5] = 3; finalState[3][6] = 4; finalState[3][7] = 4; finalState[3][8] = 4; finalState[3][9] = 5; finalState[3][10] = 5; finalState[3][11] = 5; finalState[4][0] = 2; finalState[4][1] = 2; finalState[4][2] = 2; finalState[4][3] = 3; finalState[4][4] = 3; finalState[4][5] = 3; finalState[4][6] = 4; finalState[4][7] = 4; finalState[4][8] = 4; finalState[4][9] = 5; finalState[4][10] = 5; finalState[4][11] = 5; finalState[5][0] = 2; finalState[5][1] = 2; finalState[5][2] = 2; finalState[5][3] = 3; finalState[5][4] = 3; finalState[5][5] = 3; finalState[5][6] = 4; finalState[5][7] = 4; finalState[5][8] = 4; finalState[5][9] = 5; finalState[5][10] = 5; finalState[5][11] = 5; finalState[6][6] = 6; finalState[6][7] = 6; finalState[6][8] = 6; finalState[7][6] = 6; finalState[7][7] = 6; finalState[7][8] = 6; finalState[8][6] = 6; finalState[8][7] = 6; finalState[8][8] = 6; initialState = copyMatrix(finalState); rotateFrontClockwise(initialState); rotateTopClockwise(initialState); rotateLeftClockwise(initialState); rotateBottomCounterClockwise(initialState); rotateRightClockwise(initialState); rotateBackCounterClockwise(initialState); rotateTopCounterClockwise(initialState); rotateFrontCounterClockwise(initialState); rotateRightCounterClockwise(initialState); String initialString = matrixToString(initialState); String finalString = matrixToString(finalState); HashMap<String, Pair<String, Float>> graph = new HashMap<>(); System.out.println(aAlgorithm(initialString, finalString, graph)); } }
[ "ronaldescobarj@gmail.com" ]
ronaldescobarj@gmail.com
1977b878f8be8b7836a9f793f6f5eb9d7f4f85a7
ab26a536bde70833421995d7b4d492846d5c165d
/src/main/java/org/wsd/mechanicals/app/notafiscal/EstadoNotaFiscalFaturada.java
8500357f7816882cd026d13bbf842ee14c55689f
[]
no_license
jorool/wsd-mechanicals
0b8266f285ad289ef3945e1aa8d7da79e3689f51
21e883a9e1012064fd5f88937b274875ae1a16d3
refs/heads/master
2020-06-04T01:04:29.405271
2012-10-19T17:47:34
2012-10-19T17:47:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
241
java
package org.wsd.mechanicals.app.notafiscal; public enum EstadoNotaFiscalFaturada implements EstadoNotaFiscal { INSTANCE; @Override public <T> T accept(EstadoNotaFiscalVisitor<T> visitor) { return visitor.visit(this); } }
[ "jorool1988@gmail.com" ]
jorool1988@gmail.com
8308d8e965ebe7db252702cd0d315c80687ba6fb
9465058034aadb087e7952912c69932a23d0c184
/01.basic/src/main/java/scope/package-info.java
086d211e1be425decd3ae73c85d409619218f9ed
[]
no_license
fjquevedo/oca-jse8-I
c11a43cf459c21fc722a9d736b2dfe68636a7599
8acccc6ae79541fc97c4310de0b34d1cc890b541
refs/heads/master
2021-01-11T17:10:46.829695
2017-01-22T21:35:42
2017-01-22T21:35:42
79,733,886
0
0
null
null
null
null
UTF-8
Java
false
false
14
java
package scope;
[ "dimepaco@gmail.com" ]
dimepaco@gmail.com
86ea4ce6750303e65d1505a9bb8482c64b75c4ef
afebf049c42febdf9ff4d75e406053141a0d47e3
/shoppingbackend/src/main/java/net/jgw/shoppingbackend/config/HibernateConfig.java
e576b8489b789b8556ff706f5bda53af1bc04e68
[]
no_license
JESITConsulting/onlineshopping
a1cb67308af7eeff844221a070a0e6f7bd2c7553
29e19abd1357dc72ff6d7a90e6f3474751d5eca2
refs/heads/master
2022-12-30T14:23:55.642319
2018-09-11T04:50:56
2018-09-11T04:59:58
146,446,329
0
0
null
2022-12-16T11:05:27
2018-08-28T12:46:34
JavaScript
UTF-8
Java
false
false
3,055
java
package net.jgw.shoppingbackend.config; import java.util.Properties; import javax.sql.DataSource; import org.apache.commons.dbcp.BasicDataSource; import org.hibernate.SessionFactory; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.orm.hibernate5.HibernateTransactionManager; import org.springframework.orm.hibernate5.LocalSessionFactoryBuilder; import org.springframework.transaction.annotation.EnableTransactionManagement; /****** * * @author jgwilliams * @Configuration -Indicates that a class declares one or more @Bean methods and * may be processed by the Spring container to generate bean * definitions and service * @ComponentScan - Base packages to scan for annotated components * @EnableTransactionManagement - Enables Spring's annotation-driven transaction * management capability *******/ @Configuration @ComponentScan(basePackages = { "net.jgw.shoppingbackend.dto" }) @EnableTransactionManagement public class HibernateConfig { private final static String DATABASE_URL = "jdbc:h2:tcp://localhost/~/onlineshopping"; private final static String DATABASE_DRIVER = "org.h2.Driver"; private final static String DATABASE_DIALECT = "org.hibernate.dialect.H2Dialect"; private final static String DATABASE_USERNAME = "sa"; private final static String DATABASE_PASSWORD = ""; /***** * configure the datasource for connection to the database *****/ @Bean public DataSource getDataSource() { BasicDataSource datasource = new BasicDataSource(); datasource.setUrl(DATABASE_URL); datasource.setDriverClassName(DATABASE_DRIVER); datasource.setUsername(DATABASE_USERNAME); datasource.setPassword(DATABASE_PASSWORD); return datasource; } /***** * configure the sessionfactory using the datasouce configured above *****/ @Bean public SessionFactory getSessionFactory(DataSource datasource) { LocalSessionFactoryBuilder builder = new LocalSessionFactoryBuilder(datasource); builder.addProperties(getProperties()); builder.scanPackages("net.jgw.shoppingbackend.dto"); return builder.buildSessionFactory(); } //set the hibernate properties we want to invoke private Properties getProperties() { // TODO Auto-generated method stub Properties properties = new Properties(); properties.put("hibernate.dialect", DATABASE_DIALECT); properties.put("hibernate.show_sql", true); properties.put("hibernate.format_sql", true); return properties; } /***** * Needed inorder to use @transactional in the entity class * The delegate the transaction management to the spring framework * using hibernate. *****/ @Bean public HibernateTransactionManager getTransactionManager(SessionFactory sessionFactory){ HibernateTransactionManager transactionManager = new HibernateTransactionManager(sessionFactory); return transactionManager; } }
[ "jermaine.mailbox@gmail.com" ]
jermaine.mailbox@gmail.com
21dc7b5ef0aeafd86d420f1a0d70549674a3104c
26426a509a5592342c73017108ed721b0dfcb43a
/src/risk/cartas/Infanteria.java
08de5546fe06a46c551aac6fb5106299c030f533
[]
no_license
ACMCMC/RiskETSE
fdbadbca1ae48e5d592f4d41d11f50b5fb64aa04
8971fdb775aa7c01b6df033c8eb355f2870c44ee
refs/heads/master
2023-05-09T06:42:31.005488
2021-05-30T17:59:39
2021-05-30T17:59:39
299,882,468
0
0
null
null
null
null
UTF-8
Java
false
false
245
java
package risk.cartas; import risk.Pais; public abstract class Infanteria extends Carta { Infanteria(Pais pais) { super(pais); } @Override public Class<?> getClaseCarta() { return Infanteria.class; } }
[ "20495460+ACMCMC@users.noreply.github.com" ]
20495460+ACMCMC@users.noreply.github.com
a257791eb1caec6424eb7a7fee4259346774af5b
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/33/33_496c4ee9d62e080fc5095887a14746bac471ccd1/SegmentController/33_496c4ee9d62e080fc5095887a14746bac471ccd1_SegmentController_s.java
bd99c06491b92c7097436e33e0891d6aec6a7349
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,457
java
package websiteschema.mpsegment.controller; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.ResponseBody; import websiteschema.mpsegment.core.SegmentEngine; import websiteschema.mpsegment.core.SegmentResult; import websiteschema.mpsegment.core.SegmentWorker; import websiteschema.mpsegment.core.WordAtom; import java.util.List; @Controller @RequestMapping(value = "/segment") public class SegmentController { @RequestMapping(value = "", method = RequestMethod.GET) @ResponseBody public List<WordAtom> get(String sentence) { System.out.println(sentence); SegmentWorker worker = SegmentEngine.getInstance().getSegmentWorker(); SegmentResult result = worker.segment(sentence); System.out.println(result); return result.getWordAtoms(); } @RequestMapping(value = "", method = RequestMethod.POST) @ResponseBody public List<WordAtom> post(@RequestBody String sentence) { System.out.println(sentence); SegmentWorker worker = SegmentEngine.getInstance().getSegmentWorker(); SegmentResult result = worker.segment(sentence); System.out.println(result); return result.getWordAtoms(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
e434974f375740cbb6686681ebfd6452e3407028
7a62d8c54ad1069b8882a327a79437c17d16fb5b
/app/src/main/java/com/firozanwar/architecturecomponentsdemo/HerosListingSample/Hero.java
20c04ab6b796b511c1a68e5819b8cee0341e75aa
[]
no_license
firozanawar/android-viewmodel
137a7fb550c1bb0405720b749c2f2742599188c6
91c5ec6d478266e12305cc8b5f374b37f94ae9f7
refs/heads/master
2020-07-10T06:32:51.157033
2019-08-31T18:05:17
2019-08-31T18:05:17
204,194,333
2
0
null
null
null
null
UTF-8
Java
false
false
1,262
java
package com.firozanwar.architecturecomponentsdemo.HerosListingSample; public class Hero { private String name; private String realname; private String team; private String firstappearance; private String createdby; private String publisher; private String imageurl; private String bio; public Hero(String name, String realname, String team, String firstappearance, String createdby, String publisher, String imageurl, String bio) { this.name = name; this.realname = realname; this.team = team; this.firstappearance = firstappearance; this.createdby = createdby; this.publisher = publisher; this.imageurl = imageurl; this.bio = bio; } public String getName() { return name; } public String getRealname() { return realname; } public String getTeam() { return team; } public String getFirstappearance() { return firstappearance; } public String getCreatedby() { return createdby; } public String getPublisher() { return publisher; } public String getImageurl() { return imageurl; } public String getBio() { return bio; } }
[ "firoz.rokiz@gmail.com" ]
firoz.rokiz@gmail.com
68a4e41645c6c078a0c1df8a8a9389643a5cad0c
cb4f08645a20edd1815e98651ab91e5517c7e900
/kodilla-patterns2/src/main/java/com/kodilla/patterns2/adapter/bookclassifier/libraryb/BookSignature.java
f19322ac99ea6f05fd24fd964a6395dae6a9aaf3
[]
no_license
davv1d/Dawid-Kowalski-kodilla-java
28f10767c51e624ffe1fadc83950b444348164c4
80a1bbe41698cd4321dfec438a4fec97c9b6082c
refs/heads/master
2020-05-02T22:31:17.560753
2019-10-08T23:07:47
2019-10-08T23:07:47
178,253,709
1
0
null
null
null
null
UTF-8
Java
false
false
288
java
package com.kodilla.patterns2.adapter.bookclassifier.libraryb; public class BookSignature { private final String signature; public BookSignature(String signature) { this.signature = signature; } public String getSignature() { return signature; } }
[ "kowalskidawid63@gmail.com" ]
kowalskidawid63@gmail.com
38ba18be416bc157d25593a96942352d67771efe
19f7e40c448029530d191a262e5215571382bf9f
/decompiled/instagram/sources/p000X/C14850lq.java
43db0ad9cc04dd2ff83c2273948635a654a5c3f3
[]
no_license
stanvanrooy/decompiled-instagram
c1fb553c52e98fd82784a3a8a17abab43b0f52eb
3091a40af7accf6c0a80b9dda608471d503c4d78
refs/heads/master
2022-12-07T22:31:43.155086
2020-08-26T03:42:04
2020-08-26T03:42:04
283,347,288
18
1
null
null
null
null
UTF-8
Java
false
false
1,155
java
package p000X; import java.util.Arrays; /* renamed from: X.0lq reason: invalid class name and case insensitive filesystem */ public final class C14850lq { public final int A00; public final String A01; public final String A02; public final boolean equals(Object obj) { if (this != obj) { if (obj == null || getClass() != obj.getClass()) { return false; } C14850lq r5 = (C14850lq) obj; if (this.A00 != r5.A00) { return false; } String str = this.A02; String str2 = r5.A02; if (str != str2 && (str == null || !str.equals(str2))) { return false; } String str3 = this.A01; String str4 = r5.A01; return str3 == str4 || (str3 != null && str3.equals(str4)); } } public final int hashCode() { return Arrays.hashCode(new Object[]{Integer.valueOf(this.A00), this.A02, this.A01}); } public C14850lq(int i, String str, String str2) { this.A00 = i; this.A02 = str; this.A01 = str2; } }
[ "stan@rooy.works" ]
stan@rooy.works
81f97e0ab1bb209e84f88528e1ac1b187ab51b8d
43ab54f5cdafe11acb0c80a72c9a1fe76f477f9f
/Mitsubishi/mtc-admin/src/main/java/io/mtc/servicelayer/model/Order.java
e30044657f0b31a5820e8a556a49b38a46c92a46
[]
no_license
mtc-navy/SourceCode
40210072868b6e54267c1382da01d475234eab52
6821d73317c07a0cd230525d5dc0a94741b09fe9
refs/heads/master
2021-07-13T20:48:36.038715
2020-07-23T09:41:42
2020-07-23T09:41:42
186,607,411
0
0
null
null
null
null
UTF-8
Java
false
false
17,999
java
package io.mtc.servicelayer.model; import java.io.Serializable; import java.math.BigDecimal; import java.util.List; /** * 销售订单 * Created by majun on 2018/9/3. */ public class Order implements Serializable { private static final long serialVersionUID = -4825007766546324285L; private Integer DocEntry; private Integer DocNum; private String DocDate; private String DocDueDate; private String ContactPersonCode; private String CardCode; private String CardName; private BigDecimal DocTotal; private String TaxDate; private String U_Creator; private String U_CName; private String U_CreateTime; private String U_Printor; private String U_PrintTime; private String U_PrintNum; private String BPLId; private String BPL_IDAssignedToInvoice; private String VATRegNum; private String BPLName; private String U_CarNo; private String U_WORDREntry; private BigDecimal U_Z005; private BigDecimal U_Z006; private BigDecimal U_Z007; private BigDecimal U_Z008; private BigDecimal U_Z009; private BigDecimal U_Z010; private BigDecimal U_Z011; private BigDecimal U_Z012; private BigDecimal U_Z013; private BigDecimal U_Z003; private String U_Z040; private String U_Z041; private String U_Z042; private String U_Z043; private String U_Z044; private String U_Z027; private BigDecimal U_Z028; private String U_Z029; private BigDecimal U_Z030; private String U_Z031; private BigDecimal U_Z032; private String U_Z033; private BigDecimal U_Z034; private BigDecimal U_Z036; private BigDecimal U_Z037; private BigDecimal U_Z035; private String U_IsDiscount; private String Comments; private BigDecimal U_CashDisc; private String U_TakeBPLId; private String U_DItemCode; private String U_SrcNum; private String U_InlineNo; private String U_TakeNo; private String U_FID; private String U_TrsType; private String NumAtCard; private String U_TranType; private String U_DesOrderNum; private String U_PriceOrderNum; private String U_BusiType; private String U_GUID; private Integer Series; private List<DocumentLines> DocumentLines; public Integer getDocEntry() { return DocEntry; } public void setDocEntry(Integer docEntry) { DocEntry = docEntry; } public Integer getDocNum() { return DocNum; } public void setDocNum(Integer docNum) { DocNum = docNum; } public String getDocDate() { return DocDate; } public void setDocDate(String docDate) { DocDate = docDate; } public String getDocDueDate() { return DocDueDate; } public void setDocDueDate(String docDueDate) { DocDueDate = docDueDate; } public String getCardCode() { return CardCode; } public void setCardCode(String cardCode) { CardCode = cardCode; } public String getCardName() { return CardName; } public void setCardName(String cardName) { CardName = cardName; } public BigDecimal getDocTotal() { return DocTotal; } public void setDocTotal(BigDecimal docTotal) { DocTotal = docTotal; } public String getTaxDate() { return TaxDate; } public void setTaxDate(String taxDate) { TaxDate = taxDate; } public String getBPLId() { return BPLId; } public void setBPLId(String BPLId) { this.BPLId = BPLId; } public String getU_CarNo() { return U_CarNo; } public void setU_CarNo(String u_CarNo) { U_CarNo = u_CarNo; } public String getU_WORDREntry() { return U_WORDREntry; } public void setU_WORDREntry(String u_WORDREntry) { U_WORDREntry = u_WORDREntry; } public BigDecimal getU_Z005() { return U_Z005; } public void setU_Z005(BigDecimal u_Z005) { U_Z005 = u_Z005; } public BigDecimal getU_Z006() { return U_Z006; } public void setU_Z006(BigDecimal u_Z006) { U_Z006 = u_Z006; } public BigDecimal getU_Z007() { return U_Z007; } public void setU_Z007(BigDecimal u_Z007) { U_Z007 = u_Z007; } public BigDecimal getU_Z008() { return U_Z008; } public void setU_Z008(BigDecimal u_Z008) { U_Z008 = u_Z008; } public BigDecimal getU_Z009() { return U_Z009; } public void setU_Z009(BigDecimal u_Z009) { U_Z009 = u_Z009; } public BigDecimal getU_Z010() { return U_Z010; } public void setU_Z010(BigDecimal u_Z010) { U_Z010 = u_Z010; } public BigDecimal getU_Z011() { return U_Z011; } public void setU_Z011(BigDecimal u_Z011) { U_Z011 = u_Z011; } public BigDecimal getU_Z012() { return U_Z012; } public void setU_Z012(BigDecimal u_Z012) { U_Z012 = u_Z012; } public BigDecimal getU_Z013() { return U_Z013; } public void setU_Z013(BigDecimal u_Z013) { U_Z013 = u_Z013; } public BigDecimal getU_Z003() { return U_Z003; } public void setU_Z003(BigDecimal u_Z003) { U_Z003 = u_Z003; } public String getU_Z040() { return U_Z040; } public void setU_Z040(String u_Z040) { U_Z040 = u_Z040; } public String getU_Z041() { return U_Z041; } public void setU_Z041(String u_Z041) { U_Z041 = u_Z041; } public String getU_Z042() { return U_Z042; } public void setU_Z042(String u_Z042) { U_Z042 = u_Z042; } public String getU_Z043() { return U_Z043; } public void setU_Z043(String u_Z043) { U_Z043 = u_Z043; } public String getU_Z044() { return U_Z044; } public void setU_Z044(String u_Z044) { U_Z044 = u_Z044; } public BigDecimal getU_Z028() { return U_Z028; } public void setU_Z028(BigDecimal u_Z028) { U_Z028 = u_Z028; } public BigDecimal getU_Z030() { return U_Z030; } public void setU_Z030(BigDecimal u_Z030) { U_Z030 = u_Z030; } public BigDecimal getU_Z032() { return U_Z032; } public void setU_Z032(BigDecimal u_Z032) { U_Z032 = u_Z032; } public BigDecimal getU_Z034() { return U_Z034; } public void setU_Z034(BigDecimal u_Z034) { U_Z034 = u_Z034; } public BigDecimal getU_Z036() { return U_Z036; } public void setU_Z036(BigDecimal u_Z036) { U_Z036 = u_Z036; } public BigDecimal getU_Z037() { return U_Z037; } public void setU_Z037(BigDecimal u_Z037) { U_Z037 = u_Z037; } public BigDecimal getU_Z035() { return U_Z035; } public void setU_Z035(BigDecimal u_Z035) { U_Z035 = u_Z035; } public String getComments() { return Comments; } public void setComments(String comments) { Comments = comments; } public List<Order.DocumentLines> getDocumentLines() { return DocumentLines; } public void setDocumentLines(List<Order.DocumentLines> documentLines) { DocumentLines = documentLines; } public String getContactPersonCode() { return ContactPersonCode; } public void setContactPersonCode(String contactPersonCode) { ContactPersonCode = contactPersonCode; } public String getU_IsDiscount() { return U_IsDiscount; } public void setU_IsDiscount(String u_IsDiscount) { U_IsDiscount = u_IsDiscount; } public String getBPL_IDAssignedToInvoice() { return BPL_IDAssignedToInvoice; } public void setBPL_IDAssignedToInvoice(String BPL_IDAssignedToInvoice) { this.BPL_IDAssignedToInvoice = BPL_IDAssignedToInvoice; } public String getBPLName() { return BPLName; } public void setBPLName(String BPLName) { this.BPLName = BPLName; } public String getVATRegNum() { return VATRegNum; } public void setVATRegNum(String VATRegNum) { this.VATRegNum = VATRegNum; } public String getU_Creator() { return U_Creator; } public void setU_Creator(String u_Creator) { U_Creator = u_Creator; } public String getU_CreateTime() { return U_CreateTime; } public void setU_CreateTime(String u_CreateTime) { U_CreateTime = u_CreateTime; } public String getU_Printor() { return U_Printor; } public void setU_Printor(String u_Printor) { U_Printor = u_Printor; } public String getU_PrintTime() { return U_PrintTime; } public void setU_PrintTime(String u_PrintTime) { U_PrintTime = u_PrintTime; } public String getU_PrintNum() { return U_PrintNum; } public void setU_PrintNum(String u_PrintNum) { U_PrintNum = u_PrintNum; } public BigDecimal getU_CashDisc() { return U_CashDisc; } public void setU_CashDisc(BigDecimal u_CashDisc) { U_CashDisc = u_CashDisc; } public String getU_TakeBPLId() { return U_TakeBPLId; } public void setU_TakeBPLId(String u_TakeBPLId) { U_TakeBPLId = u_TakeBPLId; } public String getU_DItemCode() { return U_DItemCode; } public void setU_DItemCode(String u_DItemCode) { U_DItemCode = u_DItemCode; } public String getU_SrcNum() { return U_SrcNum; } public void setU_SrcNum(String u_SrcNum) { U_SrcNum = u_SrcNum; } public String getU_InlineNo() { return U_InlineNo; } public void setU_InlineNo(String u_InlineNo) { U_InlineNo = u_InlineNo; } public String getU_TakeNo() { return U_TakeNo; } public void setU_TakeNo(String u_TakeNo) { U_TakeNo = u_TakeNo; } public String getU_FID() { return U_FID; } public void setU_FID(String u_FID) { U_FID = u_FID; } public String getU_TrsType() { return U_TrsType; } public void setU_TrsType(String u_TrsType) { U_TrsType = u_TrsType; } public String getNumAtCard() { return NumAtCard; } public void setNumAtCard(String numAtCard) { NumAtCard = numAtCard; } public String getU_CName() { return U_CName; } public void setU_CName(String u_CName) { U_CName = u_CName; } public String getU_TranType() { return U_TranType; } public void setU_TranType(String u_TranType) { U_TranType = u_TranType; } public String getU_DesOrderNum() { return U_DesOrderNum; } public void setU_DesOrderNum(String u_DesOrderNum) { U_DesOrderNum = u_DesOrderNum; } public String getU_PriceOrderNum() { return U_PriceOrderNum; } public void setU_PriceOrderNum(String u_PriceOrderNum) { U_PriceOrderNum = u_PriceOrderNum; } public String getU_BusiType() { return U_BusiType; } public void setU_BusiType(String u_BusiType) { U_BusiType = u_BusiType; } public String getU_Z027() { return U_Z027; } public void setU_Z027(String u_Z027) { U_Z027 = u_Z027; } public String getU_Z029() { return U_Z029; } public void setU_Z029(String u_Z029) { U_Z029 = u_Z029; } public String getU_Z031() { return U_Z031; } public void setU_Z031(String u_Z031) { U_Z031 = u_Z031; } public String getU_Z033() { return U_Z033; } public void setU_Z033(String u_Z033) { U_Z033 = u_Z033; } public String getU_GUID() { return U_GUID; } public void setU_GUID(String u_GUID) { U_GUID = u_GUID; } public Integer getSeries() { return Series; } public void setSeries(Integer series) { Series = series; } public static class DocumentLines { private Integer LineNum; private String ItemCode; private String ItemDescription; private BigDecimal Quantity; private BigDecimal Price; private BigDecimal UnitPrice; private BigDecimal Factor1; private BigDecimal Factor2; private BigDecimal U_DiscNum; private String U_IsStdPkg; private BigDecimal LineTotal; private BigDecimal U_PayAmt; private String U_Realdisc; private String WarehouseCode; private String U_DiscOrder; private String U_DiscEntry; private String U_DItemCode; private String BaseType; private Integer BaseEntry; private Integer BaseLine; private String U_RegSupName; private BigDecimal U_DiscAmt; private List<BatchNumbers> BatchNumbers; public Integer getLineNum() { return LineNum; } public void setLineNum(Integer lineNum) { LineNum = lineNum; } public String getItemCode() { return ItemCode; } public void setItemCode(String itemCode) { ItemCode = itemCode; } public String getItemDescription() { return ItemDescription; } public void setItemDescription(String itemDescription) { ItemDescription = itemDescription; } public BigDecimal getQuantity() { return Quantity; } public void setQuantity(BigDecimal quantity) { Quantity = quantity; } public BigDecimal getPrice() { return Price; } public void setPrice(BigDecimal price) { Price = price; } public BigDecimal getFactor1() { return Factor1; } public void setFactor1(BigDecimal factor1) { Factor1 = factor1; } public BigDecimal getFactor2() { return Factor2; } public void setFactor2(BigDecimal factor2) { Factor2 = factor2; } public BigDecimal getLineTotal() { return LineTotal; } public void setLineTotal(BigDecimal lineTotal) { LineTotal = lineTotal; } public BigDecimal getU_PayAmt() { return U_PayAmt; } public void setU_PayAmt(BigDecimal u_PayAmt) { U_PayAmt = u_PayAmt; } public String getU_Realdisc() { return U_Realdisc; } public void setU_Realdisc(String u_Realdisc) { U_Realdisc = u_Realdisc; } public String getWarehouseCode() { return WarehouseCode; } public void setWarehouseCode(String warehouseCode) { WarehouseCode = warehouseCode; } public String getU_IsStdPkg() { return U_IsStdPkg; } public void setU_IsStdPkg(String u_IsStdPkg) { U_IsStdPkg = u_IsStdPkg; } public String getU_DiscOrder() { return U_DiscOrder; } public void setU_DiscOrder(String u_DiscOrder) { U_DiscOrder = u_DiscOrder; } public BigDecimal getU_DiscNum() { return U_DiscNum; } public void setU_DiscNum(BigDecimal u_DiscNum) { U_DiscNum = u_DiscNum; } public String getU_DItemCode() { return U_DItemCode; } public void setU_DItemCode(String u_DItemCode) { U_DItemCode = u_DItemCode; } public String getU_DiscEntry() { return U_DiscEntry; } public void setU_DiscEntry(String u_DiscEntry) { U_DiscEntry = u_DiscEntry; } public String getBaseType() { return BaseType; } public void setBaseType(String baseType) { BaseType = baseType; } public Integer getBaseEntry() { return BaseEntry; } public void setBaseEntry(Integer baseEntry) { BaseEntry = baseEntry; } public Integer getBaseLine() { return BaseLine; } public void setBaseLine(Integer baseLine) { BaseLine = baseLine; } public BigDecimal getUnitPrice() { return UnitPrice; } public void setUnitPrice(BigDecimal unitPrice) { UnitPrice = unitPrice; } public String getU_RegSupName() { return U_RegSupName; } public void setU_RegSupName(String u_RegSupName) { U_RegSupName = u_RegSupName; } public BigDecimal getU_DiscAmt() { return U_DiscAmt; } public void setU_DiscAmt(BigDecimal u_DiscAmt) { U_DiscAmt = u_DiscAmt; } public List<Order.BatchNumbers> getBatchNumbers() { return BatchNumbers; } public void setBatchNumbers(List<Order.BatchNumbers> batchNumbers) { BatchNumbers = batchNumbers; } } public static class BatchNumbers { private String BatchNumber; private BigDecimal Quantity; public String getBatchNumber() { return BatchNumber; } public void setBatchNumber(String batchNumber) { BatchNumber = batchNumber; } public BigDecimal getQuantity() { return Quantity; } public void setQuantity(BigDecimal quantity) { Quantity = quantity; } } }
[ "navy.jiang@mtcsys.com" ]
navy.jiang@mtcsys.com
ce02603e196857a61a94a185d834b87559d0e26b
f5a815588cb0b9987bf42d03c51d3e93b8feb922
/OOP/Week 13/Graphics/GUI.java
5516f6e880d5fb8481d35f698213a9491f26d7f3
[]
no_license
clickykeyboard/SEM-2-OOP
cd0e0b8a55f165ff34a321b7359f3cbc209c222b
595961fd19a3d294384999e7be71122076fd4861
refs/heads/main
2023-03-04T06:43:09.378018
2021-02-09T12:52:47
2021-02-09T12:52:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,301
java
import javax.swing.*; import java.awt.*; import java.awt.event.*; public class GUI { public static void main(String args[]) { JFrame frame = new JFrame("Frame"); Oval oval = new Oval(); frame.add(BorderLayout.CENTER, oval); JButton button = new JButton("Change color"); frame.add(BorderLayout.SOUTH, button); button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent event) { oval.repaint(); } }); JButton buttonTop = new JButton("Change background color"); frame.add(BorderLayout.NORTH, buttonTop); buttonTop.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent event) { frame.getContentPane().setBackground(randomColor()); } }); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.setSize(300, 300); frame.setVisible(true); } public static Color randomColor() { int red, green, blue; red = (int) (Math.random() * 255); green = (int) (Math.random() * 255); blue = (int) (Math.random() * 255); Color randomColor = new Color(red, green, blue); return randomColor; } }
[ "badrkmc@hotmail.com" ]
badrkmc@hotmail.com
1069a7fbd18c5c7e685d9d9f18ad78e35190a195
61aebb7c28971c6e9023b8ba3bf42af285fe121c
/src/main/java/com/edv/demo/configuration/DataBaseConfiguration.java
fbd456ba935aa046027ffd5eb81333f26271e246
[]
no_license
ruchva/rest-api-demo
f4fc5ddb9817607803602ebf7b1a98ac456a7dee
ec0fcfe25265b7764299bda41458c75e2fbcce87
refs/heads/main
2023-01-24T12:51:37.097640
2020-11-30T21:02:04
2020-11-30T21:02:04
317,343,893
0
0
null
null
null
null
UTF-8
Java
false
false
2,368
java
package com.edv.demo.configuration; import java.util.Properties; import javax.sql.DataSource; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration; import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.jdbc.datasource.DriverManagerDataSource; import org.springframework.orm.hibernate5.HibernateTransactionManager; import org.springframework.orm.hibernate5.LocalSessionFactoryBean; import org.springframework.transaction.annotation.EnableTransactionManagement; @Configuration @EnableTransactionManagement @EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class, DataSourceTransactionManagerAutoConfiguration.class, HibernateJpaAutoConfiguration.class}) public class DataBaseConfiguration { @Bean public LocalSessionFactoryBean sessionFactory(){ LocalSessionFactoryBean sessionFactoryBean = new LocalSessionFactoryBean(); sessionFactoryBean.setDataSource(dataSource()); sessionFactoryBean.setPackagesToScan("com.edv.demo.model"); sessionFactoryBean.setHibernateProperties(hibernateProperties()); return sessionFactoryBean; } @Bean public DataSource dataSource(){ DriverManagerDataSource dataSource = new DriverManagerDataSource(); dataSource.setDriverClassName("oracle.jdbc.driver.OracleDriver"); dataSource.setUrl("jdbc:oracle:thin:@192.168.100.15:1599:edvsan"); dataSource.setUsername("idepositary"); dataSource.setPassword("Sanklaus2018"); return dataSource; } public Properties hibernateProperties(){ Properties properties = new Properties(); properties.put("hibernet.dialect", "org.hibernate.dialect.Oracle10gDialect"); properties.put("show_sql", "true"); return properties; } @Bean @Autowired public HibernateTransactionManager transacionManager() { HibernateTransactionManager hibernateTransactionManager = new HibernateTransactionManager(); hibernateTransactionManager.setSessionFactory(sessionFactory().getObject()); return hibernateTransactionManager; } }
[ "rchiara@edv.com.bo" ]
rchiara@edv.com.bo
888be6b8535b2aeda656bfb79b3c1e1863a21bde
0701625d3314eaad923783dd55fcfe4dde47dd8e
/src/main/java/site/jbjb/webservice/springboot/domain/posts/Posts.java
4ad8aab830b3909e778176afd3c4bbe9be224f0d
[]
no_license
jbjb4467/springboot-study
33d26b22cb864d0e4b785db9490910097a5c40f4
167366513b5a90d1ce709759ee92e629169b311f
refs/heads/master
2023-09-01T15:21:33.293421
2021-10-23T15:07:45
2021-10-23T15:07:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,171
java
package site.jbjb.webservice.springboot.domain.posts; import lombok.Builder; import lombok.Getter; import lombok.NoArgsConstructor; import site.jbjb.webservice.springboot.domain.BaseTimeEntity; import javax.persistence.*; // 클래스 내 모든 필드의 Getter 메소드를 자동생성 @Getter // 기본 생성자 자동 추가. public Posts() {} 와 같은 효과 @NoArgsConstructor // 테이블과 링크될 클래스임을 나타냄. 기본값으로 클래스의 카멜케이스 이름을 언더스코어 네이밍으로 테이블 이름을 매칭 // SalesManager.java -> sales_manager table @Entity // Entity 클래스에는 Setter 메소드를 만들지 않음 // 해당 클래스의 인스턴스 값이 언제 어디서 변해야 하는지 코드상으로 명확하게 구분할 수 없기 때문 // 필드의 값 변경이 필요하면 목적과 의도를 명확히 나타내는 메소드를 추가 public class Posts extends BaseTimeEntity { // 해당 테이블의 PK 필드 @Id // PK의 생성 규칙 // 스프링부트 2.0부터는 GenerationType.IDENTITY 옵션을 추가해야 auto increment 가 됨 @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; // 테이블의 칼럼. 굳이 선언하지 않아도 해당 클래스의 필드는 모두 칼럼이 됨 // 기본값 외에 추가로 변경이 필요한 옵션이 있을 때 사용 // 문자열은 VARCHAR(255)가 기본값인데, 사이즈를 500으로 늘리거나 @Column(length = 500, nullable = false) private String title; // 타입을 TEXT 로 변경할 수 있음 @Column(columnDefinition = "TEXT", nullable = false) private String content; private String author; // 해당 클래스의 빌더 패턴 클래스를 생성 // 생성자 상단에 선언 시 생성자에 포함된 필드만 빌더에 포함 @Builder public Posts(String title, String content, String author) { this.title = title; this.content = content; this.author = author; } public void update(String title, String content) { this.title = title; this.content = content; } }
[ "sunshine4429@gmail.com" ]
sunshine4429@gmail.com
bc3ae15dd60bde4cd9767b62fe256e4d78fb7231
d7f254a5a7ed1a5c53082bd0955227fca5052253
/src/main/java/it/olivetti/hdo/dispatcher/models/pa/BolloVirtualeType.java
4e6c414b3677cb18e5ac879f4306fd9b995929f8
[]
no_license
lsobrero/invoice-repo
436a57f3f0028583ae35bc6d7588a6413b263940
b85a2458901c3ca4f5d4eceda4e1aa1161d3ef01
refs/heads/master
2022-12-21T00:19:45.326160
2019-09-06T09:09:35
2019-09-06T09:09:35
205,160,624
0
0
null
2022-12-16T04:53:16
2019-08-29T12:37:11
Java
UTF-8
Java
false
false
914
java
package it.olivetti.hdo.dispatcher.models.pa; import javax.annotation.Generated; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for BolloVirtualeType. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="BolloVirtualeType"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string"> * &lt;enumeration value="SI"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "BolloVirtualeType") @XmlEnum @Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2019-08-28T09:32:39+02:00", comments = "JAXB RI v2.2.8-b130911.1802") public enum BolloVirtualeType { SI; public String value() { return name(); } public static BolloVirtualeType fromValue(String v) { return valueOf(v); } }
[ "lsobrero@gmail.com" ]
lsobrero@gmail.com
8a89b8b3335ec7111a8cef096f8d0ba2462ba86a
6ad6d791745725057f784bd7713bde7899929eed
/fs/projects/src/il/co/ilrd/jarloader1/SayHi.java
a51d7634c4abfb16a8a739469a9a5d14d705c1a9
[]
no_license
yonatanvolog/projects
1fb9fe1b533ca52d4cc00e6f7be3afe86f7cf646
c5dc5a2a701c7fcb3f705d855e41ecde50f97e48
refs/heads/master
2022-09-26T23:56:22.573893
2020-06-03T16:36:42
2020-06-03T16:36:42
267,815,269
0
0
null
null
null
null
UTF-8
Java
false
false
80
java
package il.co.ilrd.jarloader1; public interface SayHi { String makeSound(); }
[ "gasturbat@gmail.com" ]
gasturbat@gmail.com
b7a035f5d80c48ff5c52d2e3f9e3ae13f25aa8fd
b91d1837e06ce6a6a32dc4acf03efbefeaada416
/Lab3.1/Lab3.1/app/src/main/java/com/trilam/lab31/customDialog.java
4f5070318081f314d676febe23af141e8b1d5753
[]
no_license
annguyen968/AndroidApp
045129ddc4e4edd0300852cee9fd6f0597836cb4
1da4e1744458c730aa0dd52bba4735b973b55b0e
refs/heads/master
2023-04-28T07:02:01.036626
2018-06-11T17:00:17
2018-06-11T17:00:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,115
java
package com.trilam.lab31; import android.app.Activity; import android.app.Service; import android.content.ActivityNotFoundException; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.net.Uri; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v4.app.ActivityCompat; import android.support.v4.content.ContextCompat; import android.support.v7.app.AlertDialog; import android.view.View; import android.view.WindowManager; import android.view.inputmethod.InputMethodManager; import android.widget.Button; import android.widget.EditText; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; import android.widget.Toast; import com.trilam.lab31.MainActivity; import com.trilam.lab31.R; import java.util.ArrayList; import java.util.jar.Manifest; /** * Created by Tri Lam on 10/26/2017. */ public class customDialog extends AlertDialog implements View.OnClickListener{ Context context; EditText tvName; EditText tvEmail; EditText tvPhone; public customDialog(@NonNull Context context) { super(context); this.context = context; } @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.custom_dialog); initViews(); } //private String number =""; //= "01675566519"; private String number = "01675566519"; private void initViews() { ImageView ivClose = (ImageView) findViewById(R.id.iv_close); ivClose.setOnClickListener(this); LinearLayout llSend = (LinearLayout) findViewById(R.id.btn_send); llSend.setOnClickListener(this); LinearLayout llCall = (LinearLayout) findViewById(R.id.btn_call); llCall.setOnClickListener(this); tvName = (EditText) findViewById(R.id.tv_name); tvName.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { InputMethodManager imm = (InputMethodManager) context.getSystemService(Service.INPUT_METHOD_SERVICE); } }); tvEmail = (EditText) findViewById(R.id.tv_email); tvPhone = (EditText) findViewById(R.id.tv_phone); //tvName.setText("Tang Quang Huy"); tvEmail.setText(email); tvPhone.setText(number); } @Override public void onClick(View v) { switch (v.getId()){ case R.id.iv_close:{ closeDialog(); Toast.makeText(context,"Exit done",Toast.LENGTH_LONG).show(); break;} case R.id.btn_send: { sendSMS(); Toast.makeText(context,"Go to send Email", Toast.LENGTH_LONG).show(); break;} case R.id.btn_call: { requestPhoneCallPermission(); Toast.makeText(context,"Calling",Toast.LENGTH_LONG).show(); break;} } } private void closeDialog() { this.dismiss(); } String[] arrayPermission = {android.Manifest.permission.CALL_PHONE}; private void requestPhonePermission(String phone){ if(ContextCompat.checkSelfPermission(context, android.Manifest.permission.CALL_PHONE) != PackageManager.PERMISSION_GRANTED) { ActivityCompat.requestPermissions((MainActivity) context,arrayPermission,555); } } public static final int REQUEST_PHONECALL_PERMISSION_CODE = 1111; public void requestPhoneCallPermission() { if(ContextCompat.checkSelfPermission(context, android.Manifest.permission.CALL_PHONE)!=PackageManager.PERMISSION_GRANTED){ //if not have permission -> request permission ActivityCompat.requestPermissions((Activity) context,new String[]{android.Manifest.permission.CALL_PHONE},REQUEST_PHONECALL_PERMISSION_CODE); } else { EditText tvPhone = (EditText) findViewById(R.id.tv_phone); number=tvPhone.getText().toString(); //if exist permission callPhone -> handle call Phone -> start Activity CALL PHONE Uri call = Uri.parse("tel: "+number); Intent intentCallPhone = new Intent(Intent.ACTION_CALL,call); context.startActivity(intentCallPhone); } } private String email = "abc@gmail.com"; private String[] emailArr = {email}; private String text = "Enter the text you want to send.."; private void sendSMS() { EditText et=(EditText) findViewById(R.id.tv_email); email=et.getText().toString(); emailArr[0]=email; Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND); emailIntent.setType("text/plain"); emailIntent.putExtra(Intent.EXTRA_EMAIL,emailArr); emailIntent.putExtra(Intent.EXTRA_TEXT,text); try{ context.startActivity(Intent.createChooser(emailIntent,"Email Activity")); }catch (ActivityNotFoundException e){ e.getMessage(); } } }
[ "annguyen9682@gmail.com" ]
annguyen9682@gmail.com
2667f21360b7ba1bedb01fd4457a6ec65549d673
76558b1ca9047eae1977769165518f4bef624ac4
/app/src/main/java/com/placelook/commands/ListCountriesCommand.java
7431d14c2ff92c445efd3847e0cd882edd412194
[]
no_license
vsvictor/PlacelookOld
82cab9926b14b2db00c1ca0630785911ddffbfb0
a696bd3e10fe0b8ddc7a0e88090da7a2837d7bb6
refs/heads/master
2021-06-07T03:22:51.976728
2016-07-05T14:01:36
2016-07-05T14:01:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
517
java
package com.placelook.commands; import org.json.JSONException; import org.json.JSONObject; public class ListCountriesCommand extends BaseCommand{ public ListCountriesCommand(int id){ super(id,"list_countries"); obj = new JSONObject(); try { obj.put("cmd", this.getName()); obj.put("callback", this.getName()); obj.put("rid", this.getID()); JSONObject param = new JSONObject(); obj.put("param", param); setText(obj.toString()); } catch (JSONException e) { e.printStackTrace(); } } }
[ "dvictor74@gmail.com" ]
dvictor74@gmail.com
ce9ea180f6c51622f2e17e54826f6ba22279efdb
1e89241627e765f4ade6c5ba4766cd49f1611e6d
/src/test/java/com/municipality/katilimcivatandas/web/rest/UnitResourceIT.java
75784e51e6603597f5a39b7c7041e186a45b4dc5
[]
no_license
bahmetpalanci/katilimcivatandas
3e02d0c6398b6f2a1fa7fd2cc42b66842b14de63
86927700d1b3206a82b1151038f2d4cda85fffee
refs/heads/master
2022-12-21T12:20:33.195209
2019-12-21T12:30:39
2019-12-21T12:30:39
226,501,093
0
0
null
2022-12-16T04:42:13
2019-12-07T11:33:31
Java
UTF-8
Java
false
false
8,831
java
package com.municipality.katilimcivatandas.web.rest; import com.municipality.katilimcivatandas.KatilimcivatandasApp; import com.municipality.katilimcivatandas.domain.Unit; import com.municipality.katilimcivatandas.repository.UnitRepository; import com.municipality.katilimcivatandas.service.UnitService; import com.municipality.katilimcivatandas.web.rest.errors.ExceptionTranslator; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.MockitoAnnotations; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.data.web.PageableHandlerMethodArgumentResolver; import org.springframework.http.MediaType; import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.transaction.annotation.Transactional; import org.springframework.validation.Validator; import javax.persistence.EntityManager; import java.util.List; import static com.municipality.katilimcivatandas.web.rest.TestUtil.createFormattingConversionService; import static org.assertj.core.api.Assertions.assertThat; import static org.hamcrest.Matchers.hasItem; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; import com.municipality.katilimcivatandas.domain.enumeration.UnitType; /** * Integration tests for the {@link UnitResource} REST controller. */ @SpringBootTest(classes = KatilimcivatandasApp.class) public class UnitResourceIT { private static final UnitType DEFAULT_UNIT_TYPE = UnitType.TECHNICAL; private static final UnitType UPDATED_UNIT_TYPE = UnitType.OPERATION; @Autowired private UnitRepository unitRepository; @Autowired private UnitService unitService; @Autowired private MappingJackson2HttpMessageConverter jacksonMessageConverter; @Autowired private PageableHandlerMethodArgumentResolver pageableArgumentResolver; @Autowired private ExceptionTranslator exceptionTranslator; @Autowired private EntityManager em; @Autowired private Validator validator; private MockMvc restUnitMockMvc; private Unit unit; @BeforeEach public void setup() { MockitoAnnotations.initMocks(this); final UnitResource unitResource = new UnitResource(unitService); this.restUnitMockMvc = MockMvcBuilders.standaloneSetup(unitResource) .setCustomArgumentResolvers(pageableArgumentResolver) .setControllerAdvice(exceptionTranslator) .setConversionService(createFormattingConversionService()) .setMessageConverters(jacksonMessageConverter) .setValidator(validator).build(); } /** * Create an entity for this test. * * This is a static method, as tests for other entities might also need it, * if they test an entity which requires the current entity. */ public static Unit createEntity(EntityManager em) { Unit unit = new Unit() .unitType(DEFAULT_UNIT_TYPE); return unit; } /** * Create an updated entity for this test. * * This is a static method, as tests for other entities might also need it, * if they test an entity which requires the current entity. */ public static Unit createUpdatedEntity(EntityManager em) { Unit unit = new Unit() .unitType(UPDATED_UNIT_TYPE); return unit; } @BeforeEach public void initTest() { unit = createEntity(em); } @Test @Transactional public void createUnit() throws Exception { int databaseSizeBeforeCreate = unitRepository.findAll().size(); // Create the Unit restUnitMockMvc.perform(post("/api/units") .contentType(TestUtil.APPLICATION_JSON_UTF8) .content(TestUtil.convertObjectToJsonBytes(unit))) .andExpect(status().isCreated()); // Validate the Unit in the database List<Unit> unitList = unitRepository.findAll(); assertThat(unitList).hasSize(databaseSizeBeforeCreate + 1); Unit testUnit = unitList.get(unitList.size() - 1); assertThat(testUnit.getUnitType()).isEqualTo(DEFAULT_UNIT_TYPE); } @Test @Transactional public void createUnitWithExistingId() throws Exception { int databaseSizeBeforeCreate = unitRepository.findAll().size(); // Create the Unit with an existing ID unit.setId(1L); // An entity with an existing ID cannot be created, so this API call must fail restUnitMockMvc.perform(post("/api/units") .contentType(TestUtil.APPLICATION_JSON_UTF8) .content(TestUtil.convertObjectToJsonBytes(unit))) .andExpect(status().isBadRequest()); // Validate the Unit in the database List<Unit> unitList = unitRepository.findAll(); assertThat(unitList).hasSize(databaseSizeBeforeCreate); } @Test @Transactional public void getAllUnits() throws Exception { // Initialize the database unitRepository.saveAndFlush(unit); // Get all the unitList restUnitMockMvc.perform(get("/api/units?sort=id,desc")) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) .andExpect(jsonPath("$.[*].id").value(hasItem(unit.getId().intValue()))) .andExpect(jsonPath("$.[*].unitType").value(hasItem(DEFAULT_UNIT_TYPE.toString()))); } @Test @Transactional public void getUnit() throws Exception { // Initialize the database unitRepository.saveAndFlush(unit); // Get the unit restUnitMockMvc.perform(get("/api/units/{id}", unit.getId())) .andExpect(status().isOk()) .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE)) .andExpect(jsonPath("$.id").value(unit.getId().intValue())) .andExpect(jsonPath("$.unitType").value(DEFAULT_UNIT_TYPE.toString())); } @Test @Transactional public void getNonExistingUnit() throws Exception { // Get the unit restUnitMockMvc.perform(get("/api/units/{id}", Long.MAX_VALUE)) .andExpect(status().isNotFound()); } @Test @Transactional public void updateUnit() throws Exception { // Initialize the database unitService.save(unit); int databaseSizeBeforeUpdate = unitRepository.findAll().size(); // Update the unit Unit updatedUnit = unitRepository.findById(unit.getId()).get(); // Disconnect from session so that the updates on updatedUnit are not directly saved in db em.detach(updatedUnit); updatedUnit .unitType(UPDATED_UNIT_TYPE); restUnitMockMvc.perform(put("/api/units") .contentType(TestUtil.APPLICATION_JSON_UTF8) .content(TestUtil.convertObjectToJsonBytes(updatedUnit))) .andExpect(status().isOk()); // Validate the Unit in the database List<Unit> unitList = unitRepository.findAll(); assertThat(unitList).hasSize(databaseSizeBeforeUpdate); Unit testUnit = unitList.get(unitList.size() - 1); assertThat(testUnit.getUnitType()).isEqualTo(UPDATED_UNIT_TYPE); } @Test @Transactional public void updateNonExistingUnit() throws Exception { int databaseSizeBeforeUpdate = unitRepository.findAll().size(); // Create the Unit // If the entity doesn't have an ID, it will throw BadRequestAlertException restUnitMockMvc.perform(put("/api/units") .contentType(TestUtil.APPLICATION_JSON_UTF8) .content(TestUtil.convertObjectToJsonBytes(unit))) .andExpect(status().isBadRequest()); // Validate the Unit in the database List<Unit> unitList = unitRepository.findAll(); assertThat(unitList).hasSize(databaseSizeBeforeUpdate); } @Test @Transactional public void deleteUnit() throws Exception { // Initialize the database unitService.save(unit); int databaseSizeBeforeDelete = unitRepository.findAll().size(); // Delete the unit restUnitMockMvc.perform(delete("/api/units/{id}", unit.getId()) .accept(TestUtil.APPLICATION_JSON_UTF8)) .andExpect(status().isNoContent()); // Validate the database contains one less item List<Unit> unitList = unitRepository.findAll(); assertThat(unitList).hasSize(databaseSizeBeforeDelete - 1); } }
[ "bahmetpalanci@gmail.com" ]
bahmetpalanci@gmail.com
270eb2f6600aff32cd8a8fa954b361b11d288d88
8eed4770e9aa99b51eb61c2ab2c1977cdcf11642
/app/src/main/java/xyz/jcdc/beepstake/Variables.java
69643faf7c087e9e02d87a9ed25775057d24e8fa
[]
no_license
johnchrisdc/Beep-Stakes
86a15fbdecac8b851c2654bfd76c7d91ac148e5c
f34d01281f4b84c3a6c0618e945ba46af1f92dca
refs/heads/master
2020-04-06T03:55:34.524171
2017-02-26T10:07:11
2017-02-26T10:07:11
83,100,968
1
0
null
null
null
null
UTF-8
Java
false
false
797
java
package xyz.jcdc.beepstake; /** * Created by jcdc on 2/12/17. */ public class Variables { /* __ __ _ _ _ \ \ / / (_) | | | | \ \ / /_ _ _ __ _ __ _| |__ | | ___ ___ \ \/ / _` | '__| |/ _` | '_ \| |/ _ \/ __| \ / (_| | | | | (_| | |_) | | __/\__ \ \/ \__,_|_| |_|\__,_|_.__/|_|\___||___/ */ private static final String SERVER = "https://dotcmrt3.gov.ph/beep-sites"; private static final String LINES = "/lines?group="; public static final String MARKERS = SERVER + "/markers"; public static final String LINES_MRT3 = SERVER + LINES + "mrt3-line"; public static final String LINES_LRT1 = SERVER + LINES + "lrt1-line"; public static final String LINES_LRT2 = SERVER + LINES + "lrt2-line"; }
[ "johnchrisdelacruz@gmail.com" ]
johnchrisdelacruz@gmail.com
6be78531447c2965ca60258913671ffae4fc5972
ed7acff098913de863f64699206317050de7eadb
/src/main/java/edu/handong/csee/java/lab13/prob1/Friend.java
9a64572c5bf33b42e2df63a8185ddc3f993f605e
[]
no_license
Doyouknowkimchi/Lab13
78228fe3842dd5a548942db27fea4b6bcc0017e4
fba1397843a6f7a21bea8d8a3385a7fa95e45f62
refs/heads/master
2020-03-13T10:34:59.067462
2018-05-02T14:26:34
2018-05-02T14:26:34
131,086,327
0
0
null
null
null
null
UTF-8
Java
false
false
185
java
package edu.handong.csee.java.lab13.prob1; public class Friend { // class name public void justFriend() // method name { System.out.println("Just Friend!"); //show text } }
[ "21700268@handong.edu" ]
21700268@handong.edu
da13ef4712a67f3b5d67cc180fe28469d91781b1
8c40e048c31881b814b7b5ffb63fc7807b099413
/src/main/java/com/dongluhitec/card/connect/util/BCDAddressAdaptor.java
16a1457e216da619da1157a54e735af069cd3c4a
[]
no_license
wangxinit/carparkServer
40539faebac33dd72449e1b053b50f34cdce5d67
62f4fa351385d494f578eae897458cecae0e37f3
refs/heads/master
2021-08-27T15:40:45.567905
2014-05-26T03:22:16
2014-05-26T03:22:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
848
java
package com.dongluhitec.card.connect.util; public class BCDAddressAdaptor { final private SerialDeviceAddress address; public BCDAddressAdaptor(SerialDeviceAddress address) { this.address = address; } public BCDAddressAdaptor(byte[] bytes, int start) { int high_1 = Utils.BCDConvertFromByteToInt(bytes[start + 1]); int low_1 = Utils.BCDConvertFromByteToInt(bytes[start + 3]); this.address = new SerialDeviceAddress(); this.address.setAddress(high_1, low_1); } public byte[] getBytes() { byte[] b = new byte[4]; int firstAddrPart = this.address.getFirstAddrPart(); int secondAddrPart = this.address.getSecondAddrPart(); b[1] = Utils.BCDConvertFromIntToByte(firstAddrPart); b[3] = Utils.BCDConvertFromIntToByte(secondAddrPart); return b; } public SerialDeviceAddress getAddress() { return this.address; } }
[ "154341736@qq.com" ]
154341736@qq.com
777e17d7e04372ce0d4a792191c858d8736d6586
495c21a2d20e48f0907471e0576a2122e4dfabac
/src/test/java/utilities/ScreenshotUtility.java
d5658ec9c0afadcbdb8e6e653dab58abe7f0c315
[]
no_license
balashankarn/Conde_Nast_Automation
2f40e2dfd8b3527fde93ba65980e095681fbd071
e17af1fa14b5e741e15f6ee125f64fac16847fd3
refs/heads/master
2023-06-04T12:27:11.450722
2021-06-27T17:28:39
2021-06-27T17:28:39
380,748,016
0
0
null
null
null
null
UTF-8
Java
false
false
4,133
java
package utilities; /** * Created by Balashankar */ import com.aventstack.extentreports.Status; import com.aventstack.extentreports.markuputils.ExtentColor; import com.aventstack.extentreports.markuputils.MarkupHelper; import com.aventstack.extentreports.ExtentTest; import core.BaseSetup; import org.apache.commons.io.FileUtils; import org.openqa.selenium.OutputType; import org.openqa.selenium.TakesScreenshot; import org.testng.ITestContext; import org.testng.ITestListener; import org.testng.ITestResult; import reports.ReportLibrary; import java.io.File; import java.io.IOException; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; public class ScreenshotUtility extends BaseSetup implements ITestListener { private ExtentTest extentTest; // This method will execute before starting of Test suite. public void onStart(ITestContext tr) { } // This method will execute, Once the Test suite is finished. public void onFinish(ITestContext result) { } // This method will execute only when the test is pass. public void onTestSuccess(ITestResult result) { extentTest = ReportLibrary.extentReports.createTest(result.getName()); extentTest.log(Status.PASS, MarkupHelper.createLabel(result.getName()+" Test Case PASSED", ExtentColor.GREEN)); captureScreenShot(result, "pass"); } // This method will execute only on the event of fail test. public void onTestFailure(ITestResult result) { extentTest = ReportLibrary.extentReports.createTest(result.getName()); extentTest.log(Status.FAIL, MarkupHelper.createLabel(result.getName() + " - Test Case Failed", ExtentColor.RED)); extentTest.log(Status.FAIL, MarkupHelper.createLabel(result.getThrowable() + " - Test Case Failed", ExtentColor.RED)); captureScreenShot(result, "fail"); } // This method will execute before the main test start (@Test) public void onTestStart(ITestResult tr) { } // This method will execute only if any of the main test(@Test) get skipped public void onTestSkipped(ITestResult result) { extentTest = ReportLibrary.extentReports.createTest(result.getName()); extentTest.log(Status.SKIP, MarkupHelper.createLabel(result.getName() + " - Test Case Skipped", ExtentColor.ORANGE)); } public void onTestFailedButWithinSuccessPercentage(ITestResult result) { } // Function to capture screenshot. private static void captureScreenShot(ITestResult result, String status) { // AndroidDriver driver=ScreenshotOnPassFail.getDriver(); String destDir = ""; String passfailMethod = result.getMethod().getRealClass(). getSimpleName() + "." + result.getMethod().getMethodName(); // To capture screenshot. TakesScreenshot scrShot =((TakesScreenshot)driver); File scrFile=scrShot.getScreenshotAs(OutputType.FILE); //File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE); DateFormat dateFormat = new SimpleDateFormat("dd-MMM-yyyy__hh_mm_ssaa"); // If status = fail then set folder name "screenshots/Failures" if (status.equalsIgnoreCase("fail")) { destDir = properties.getProperty("failurescreenshotpath"); } // If status = pass then set folder name "screenshots/Success" else if (status.equalsIgnoreCase("pass")) { destDir = properties.getProperty("successscreenshotpath"); } else if (status.equalsIgnoreCase("Test Start")) { destDir = properties.getProperty("teststartscreenshotpath"); } // To create folder to store screenshots new File(destDir).mkdirs(); // Set file name with combination of test class name + date time. String destFile = passfailMethod + " - " + dateFormat.format(new Date()) + ".png"; try { // Store file at destination folder location FileUtils.copyFile(scrFile, new File(destDir + "/" + destFile)); } catch (IOException e) { e.printStackTrace(); } } }
[ "balashankar.n@digital.datamatics.com" ]
balashankar.n@digital.datamatics.com
27360f4428fe6565d931e9e69e0ca66bfca57c0e
ab2f8717905f7a8f3b70199f9bed81acfa4cb0ba
/JavaFXproject/src/basic/control/Phone.java
635ede2aae9bed321b06a181645a1f6238170cf1
[]
no_license
tjdwns631/JavaFXProject
5dbf55313b3d4f41a6aa8e34071c8563f5009b21
6662abb044c9151bf73104e4cd561c848b40e65b
refs/heads/master
2022-12-22T13:51:19.865851
2020-09-14T06:49:48
2020-09-14T06:49:48
291,579,162
0
0
null
null
null
null
UTF-8
Java
false
false
604
java
package basic.control; import javafx.beans.property.SimpleStringProperty; public class Phone { SimpleStringProperty smartPhone; SimpleStringProperty image; public Phone(String smartPhone, String image) { this.smartPhone = new SimpleStringProperty(smartPhone); this.image = new SimpleStringProperty(image); } public void setSmartPhone(String smartPhone) { this.smartPhone.set(smartPhone); } public void setImage(String image) { this.image.set(image); } public String getSmartPhone() { return this.smartPhone.get(); } public String getImage() { return this.image.get(); } }
[ "you@example.com" ]
you@example.com
1f2084604170b4318ef2418e9f165ba33dd0dfef
487d57e3b8273557480d0b99624737268026317b
/SIG_HDP_Master-ejb/src/java/sessao/GrlPaisFacade.java
d9f10d6f65eea2c0ee4c5d3a03e5068a3e96586c
[]
no_license
armindopacuco/SIG_HDP_Master
928ef41281068a098ff5c8e117ccaf5caf058f4e
19305517f97d1db8b784ee8cebf665c0ffb5e312
refs/heads/master
2021-01-12T05:38:37.996022
2016-12-22T17:26:20
2016-12-22T17:26:20
77,160,170
0
0
null
null
null
null
UTF-8
Java
false
false
693
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 sessao; import entidade.GrlPais; import javax.ejb.Stateless; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; /** * * @author mauro */ @Stateless public class GrlPaisFacade extends AbstractFacade<GrlPais> { @PersistenceContext(unitName = "SIG_HDP_Master-ejbPU") private EntityManager em; @Override protected EntityManager getEntityManager() { return em; } public GrlPaisFacade() { super(GrlPais.class); } }
[ "armindo@armindo-SATELLITE-L755" ]
armindo@armindo-SATELLITE-L755
2b033070c817360f7fabe28a09ac29a68c5e9f6e
e6dc62b1191010791edabdb9fbbea175eca4d0a9
/Client/src/TextPaneOutputStream.java
bf1d2db27f4428390ea09b28f76f100743143823
[]
no_license
jldfn/Lab8
38361ef7c470196e9aa1f9b4e2fdd0f4f8972fe4
5e49afe30dc4bbfaf0438480e8a5988239036f89
refs/heads/master
2021-06-18T04:00:00.866225
2017-06-13T11:16:56
2017-06-13T11:16:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
901
java
import com.sun.istack.internal.NotNull; import javax.swing.*; import java.io.IOException; import java.io.OutputStream; /** * Created by Денис on 06.05.2017. */ public class TextPaneOutputStream extends OutputStream { final JTextPane ConsolePane; TextPaneOutputStream(JTextPane pane){ ConsolePane=pane; } @Override public void write(int b) throws IOException { write (new byte [] {(byte)b}, 0, 1); } @Override public void write(@NotNull byte[] b, int off, int len) throws IOException { final String text = new String (b, off, len); SwingUtilities.invokeLater(new Runnable () { @Override public void run() { ConsolePane.setText(ConsolePane.getText()+System.getProperty("line.separator")+text); } }); } }
[ "kjkszpj361@gmail.com" ]
kjkszpj361@gmail.com
857d007ad3cc15ea7d5caa67e76e8ac09e335859
f5da4305c5ecabcc266c2b931e32a2baeae8e4ed
/boot-jpa-shiro/src/main/java/com/shiro/jpa/utils/EnceladusShiroRealm.java
bd965bedab5dd64df7bad84ece01a53ca02e0985
[]
no_license
HensCoderoad/spring-cloud
b565d945082fdb5666240298e77e2afc473b1caa
d15b02f12c188260072e8d76d74f3ed63fc34e2b
refs/heads/master
2022-06-22T04:23:55.046305
2019-10-27T03:17:09
2019-10-27T03:17:09
211,339,374
0
0
null
2022-06-21T02:02:45
2019-09-27T14:37:46
Java
UTF-8
Java
false
false
2,021
java
package com.shiro.jpa.utils; import com.shiro.jpa.entity.SysPermission; import com.shiro.jpa.entity.SysRole; import com.shiro.jpa.entity.User; import com.shiro.jpa.service.UserService; import org.apache.shiro.authc.AuthenticationException; import org.apache.shiro.authc.AuthenticationInfo; import org.apache.shiro.authc.AuthenticationToken; import org.apache.shiro.authc.SimpleAuthenticationInfo; import org.apache.shiro.authz.AuthorizationInfo; import org.apache.shiro.authz.SimpleAuthorizationInfo; import org.apache.shiro.realm.AuthorizingRealm; import org.apache.shiro.subject.PrincipalCollection; import org.apache.shiro.util.ByteSource; import org.springframework.beans.factory.annotation.Autowired; public class EnceladusShiroRealm extends AuthorizingRealm { @Autowired private UserService userService; @Override protected AuthorizationInfo doGetAuthorizationInfo(PrincipalCollection principalCollection) { SimpleAuthorizationInfo authorizationInfo = new SimpleAuthorizationInfo(); String username = (String)principalCollection.getPrimaryPrincipal(); User user = userService.findUserByName(username); for(SysRole role : user.getRoles()){ authorizationInfo.addRole(role.getRole()); for(SysPermission permission :role.getPermissions()){ authorizationInfo.addStringPermission(permission.getName()); } } return authorizationInfo; } @Override protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken authenticationToken) throws AuthenticationException { String username = (String) authenticationToken.getPrincipal(); User user = userService.findUserByName(username); if(user == null){ return null; } SimpleAuthenticationInfo authenticationInfo = new SimpleAuthenticationInfo(user.getUsername(), user.getPassword(), ByteSource.Util.bytes(user.getCredentialsSalt()), getName()); return authenticationInfo; } }
[ "15915106210@163.com" ]
15915106210@163.com
28eb12a24b9cbe094d283c637b2645df6b32fb46
ffc3c5e51d0ac126c2a36e6ac45f7a6a0eda9164
/src/main/java/wenyu/learning/Matrix/PrintSpiralMatrix.java
e4dab186411ce298662bcf74562091b1e8693645
[]
no_license
WenyuChang/data-structure-algorithm-leaning
203646bd537542e4cd33ca2b549e497e90d97297
9f9df7eb6d438493a1a91c87c766969a1f2147d9
refs/heads/master
2021-01-22T20:08:05.117890
2017-03-17T07:20:14
2017-03-17T07:20:14
85,282,459
0
0
null
null
null
null
UTF-8
Java
false
false
1,365
java
package wenyu.learning.Matrix; /** * Created by Wenyu on 11/30/16. * * Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. * For example: * Given n = 3, * You should return the following matrix: [ [ 1, 2, 3 ], [ 8, 9, 4 ], [ 7, 6, 5 ] ] */ public class PrintSpiralMatrix { private int printSingleSpiral(int[][] matrix, int level, int start) { int row = level; int col = level; while(col<matrix[0].length-level) { matrix[row][col++] = start++; } row++; col = matrix[0].length-level-1; while(row<matrix.length-level) { matrix[row++][col] = start++; } col--; row = matrix.length-level-1; while(col>=level && row>level) { matrix[row][col--] = start++; } col = level; row--; while(row>level && col<matrix[0].length-level-1) { matrix[row--][col] = start++; } return start; } public int[][] generateMatrix(int n) { int[][] matrix = new int[n][n]; int level = 0; int start = 1; while(level*2<matrix.length && level*2<matrix[0].length) { start = printSingleSpiral(matrix, level, start); level++; } return matrix; } }
[ "changwy_1987@hotmail.com" ]
changwy_1987@hotmail.com
b7ce9f6b46eadcbd359cd77a2555c2c759ef4fb0
76f3f97eea31c6993b2d9ab2739e8858d8a3fe6e
/libmc/src/main/java/com/kiun/modelcommonsupport/controllers/LocationActivity.java
eaf47278da345c2756a06388d0771c9917d7b92b
[]
no_license
shanghaif/o2o-android-app
4309dc88047ca16c7ae0bc2477e420070bcb486a
a883287a00d91c62eee4d7d5847b544828402973
refs/heads/master
2022-03-04T08:35:58.649521
2019-11-04T07:40:35
2019-11-04T07:42:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,524
java
package com.kiun.modelcommonsupport.controllers; import android.content.Intent; import android.content.pm.PackageManager; import android.net.Uri; import android.os.Build; import android.provider.Settings; import android.support.v4.content.ContextCompat; import android.text.TextUtils; import android.view.View; import com.amap.api.location.AMapLocation; import com.amap.api.location.AMapLocationClient; import com.amap.api.location.AMapLocationClientOption; import com.amap.api.location.AMapLocationListener; import com.amos.modulebase.utils.MathUtils; import com.kiun.modelcommonsupport.MainApplication; import com.kiun.modelcommonsupport.R; import com.kiun.modelcommonsupport.adapter.ItemListener; import com.kiun.modelcommonsupport.utils.MCDialogManager; /** * Created by kiun_2007 on 2018/9/11. */ public abstract class LocationActivity extends BaseRequestAcitity { public AMapLocationClient mLocationClient = null; public AMapLocationClientOption mLocationOption = null; MCDialogManager permissionDialog = null; MCDialogManager localPermissDialog = null; public abstract void onLocationChanged(String cityName, String cityCode, double latitude, double longitude); public abstract Long getInterval(); // 高德定位 public void getPositioning() { String localCity = MainApplication.getInstance().getValue("localCity"); String localCityCode = MainApplication.getInstance().getValue("localCityCode"); String poiname = MainApplication.getInstance().getValue("poiname"); String lastLatitude = MainApplication.getInstance().getValue("lastLatitude"); String lastLongitude = MainApplication.getInstance().getValue("lastLongitude"); if (!TextUtils.isEmpty(localCity) && !TextUtils.isEmpty(localCityCode)) { //onLocationChanged(localCity.replace("市", "") + "•" + poiname, localCityCode, MathUtils.str2Double(lastLatitude), MathUtils.str2Double(lastLongitude)); onLocationChanged(localCity.replace("市", "") , localCityCode, MathUtils.str2Double(lastLatitude), MathUtils.str2Double(lastLongitude)); } // if() //初始化定位 mLocationClient = new AMapLocationClient(this); //设置定位回调监听 mLocationClient.setLocationListener(new AMapLocationListener() { @Override public void onLocationChanged(AMapLocation aMapLocation) { String cityCode = ""; MainApplication.getInstance().save("location", String.format("%f,%f", aMapLocation.getLatitude(), aMapLocation.getLongitude())); if (!aMapLocation.getAdCode().isEmpty()) { cityCode = aMapLocation.getAdCode().substring(0, 4) + "00"; } if (!TextUtils.isEmpty(aMapLocation.getCity()) && !TextUtils.isEmpty(aMapLocation.getPoiName())) { //LocationActivity.this.onLocationChanged(aMapLocation.getCity().replace("市", "") + "•" + aMapLocation.getPoiName(), cityCode, aMapLocation.getLatitude(), aMapLocation.getLongitude()); LocationActivity.this.onLocationChanged(aMapLocation.getCity().replace("市", "") , cityCode, aMapLocation.getLatitude(), aMapLocation.getLongitude()); } if (!aMapLocation.getCity().isEmpty() && !cityCode.isEmpty()) { MainApplication.getInstance().save("poiname", aMapLocation.getPoiName()); MainApplication.getInstance().save("localCity", aMapLocation.getCity()); MainApplication.getInstance().save("localCityCode", cityCode); MainApplication.getInstance().save("lastLatitude", String.format("%f", aMapLocation.getLatitude())); MainApplication.getInstance().save("lastLongitude", String.format("%f", aMapLocation.getLongitude())); } if (getInterval() < 0) { mLocationClient.stopLocation(); } } }); //初始化AMapLocationClientOption对象 mLocationOption = new AMapLocationClientOption(); //获取一次定位结果: //该方法默认为false。 mLocationOption.setInterval(10000); //设置是否返回地址信息(默认返回地址信息) mLocationOption.setNeedAddress(true); //设置是否允许模拟位置,默认为true,允许模拟位置 mLocationOption.setMockEnable(true); //给定位客户端对象设置定位参数 mLocationClient.setLocationOption(mLocationOption); //设置定位模式为AMapLocationMode.Hight_Accuracy,高精度模式。 mLocationOption.setLocationMode(AMapLocationClientOption.AMapLocationMode.Hight_Accuracy); //启动定位 mLocationClient.startLocation(); } public boolean isLocationEnabled() { int locationMode = 0; String locationProviders; if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { try { locationMode = Settings.Secure.getInt(getContentResolver(), Settings.Secure.LOCATION_MODE); } catch (Settings.SettingNotFoundException e) { e.printStackTrace(); return false; } return locationMode != Settings.Secure.LOCATION_MODE_OFF; } else { locationProviders = Settings.Secure.getString(getContentResolver(), Settings.Secure.LOCATION_PROVIDERS_ALLOWED); return !TextUtils.isEmpty(locationProviders); } } public void startLocation() { if (!isLocationEnabled()) { localPermissDialog = MCDialogManager.showMessage(this, "需要打开定位", "手机没有开启定位无法正常工作", "立即去打开", "暂时不打开", R.drawable.svg_icon_prompt_big); localPermissDialog.setListener(new ItemListener() { @Override public void onItemClick(View listView, Object itemData, int tag) { if (tag == MCDialogManager.TAG_RIGHT_BTN) { Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS); startActivityForResult(intent, 887); } } }); return; } //检测系统是否打开开启了地理定位权限 if (ContextCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) { permissionDialog = MCDialogManager.showMessage(this, "需要定位权限", "应用没有定位权限,设置定位权限才能正常工作", "立即去设置", "暂时不设置", R.drawable.svg_icon_prompt_big); permissionDialog.setListener(new ItemListener() { @Override public void onItemClick(View listView, Object itemData, int tag) { if (tag == MCDialogManager.TAG_RIGHT_BTN) { Intent intent = new Intent(); intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); Uri uri = Uri.fromParts("package", MainApplication.getInstance().getPackageName(), null); intent.setData(uri); startActivity(intent); } } }); return; } getPositioning(); } }
[ "kiun_2007@aliyun.com" ]
kiun_2007@aliyun.com
3196bab35977edeef16ba214f5a6aa2b9661bed2
d7db8e9225961ab3303b70b806452dc5486b8116
/TravelMo/app/src/main/java/com/example/travelmo/GuideBooking.java
bcd5b79035cc3bf1fb60bf5c0fc5d4f160c22ae4
[]
no_license
psbandarigoda/TravelMo
0cc8a65e2e9c6e6f669f8eb16254a6e0c24800c3
0bd5e2120ff05d9e5fd00153e2dc62c9dcabbbae
refs/heads/master
2020-07-02T07:00:03.005488
2019-09-23T08:41:52
2019-09-23T08:41:52
201,448,649
0
1
null
null
null
null
UTF-8
Java
false
false
7,735
java
package com.example.travelmo; import android.content.Intent; import android.os.Bundle; import com.google.android.material.floatingactionbutton.FloatingActionButton; import com.google.android.material.snackbar.Snackbar; import android.text.TextUtils; import android.view.View; import androidx.navigation.NavController; import androidx.navigation.Navigation; import androidx.navigation.ui.AppBarConfiguration; import androidx.navigation.ui.NavigationUI; import com.google.android.material.navigation.NavigationView; import com.google.firebase.database.DatabaseReference; import com.google.firebase.database.FirebaseDatabase; import androidx.drawerlayout.widget.DrawerLayout; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.Toolbar; import android.view.Menu; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.Button; import android.widget.EditText; import android.widget.Spinner; import android.widget.Toast; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; public class GuideBooking extends AppCompatActivity { private AppBarConfiguration mAppBarConfiguration; Button conform; EditText Text_Name, Text_Email, Text_Days, Text_Phone; UserDetailForGuideReserv detailForGuideReserv; DatabaseReference dbRef; int count = 111111; String plc,x,email; SimpleDateFormat currentDate = new SimpleDateFormat("ddMMyyyy"); Date todayDate = new Date(); String thisDate = currentDate.format(todayDate); String vehicleName; String emailPattern = "[a-zA-Z0-9._-]+@[a-z]+\\.+[a-z]+"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_guide_booking); Toolbar toolbar = findViewById(R.id.toolbar); setSupportActionBar(toolbar); FloatingActionButton fab = findViewById(R.id.fab); fab.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG) .setAction("Action", null).show(); } }); DrawerLayout drawer = findViewById(R.id.drawer_layout); NavigationView navigationView = findViewById(R.id.nav_view); mAppBarConfiguration = new AppBarConfiguration.Builder( R.id.nav_home, R.id.nav_gallery, R.id.nav_slideshow, R.id.nav_tools, R.id.nav_share, R.id.nav_send) .setDrawerLayout(drawer) .build(); NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment); NavigationUI.setupActionBarWithNavController(this, navController, mAppBarConfiguration); NavigationUI.setupWithNavController(navigationView, navController); Spinner spinner = (Spinner) findViewById(R.id.spinnerVehicle); List<String> categories = new ArrayList<String>(); categories.add("Micro"); categories.add("Mini"); categories.add("Car"); categories.add("Minivan"); categories.add("Van"); categories.add("VIP"); ArrayAdapter<String> dataAdaptor = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, categories); dataAdaptor.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); spinner.setAdapter(dataAdaptor); spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) { vehicleName = adapterView.getItemAtPosition(i).toString(); } @Override public void onNothingSelected(AdapterView<?> adapterView) { } }); Text_Name = findViewById(R.id.editTextName); Text_Email = findViewById(R.id.editTextEmail); Text_Days = findViewById(R.id.editTextDays); Text_Phone = findViewById(R.id.editTextPhone); conform = findViewById(R.id.btnNext); Intent place = getIntent(); plc = place.getStringExtra("place"); Intent gid = getIntent(); email = gid.getStringExtra("email"); detailForGuideReserv = new UserDetailForGuideReserv(); } @Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.guide_booking, menu); return true; } @Override public boolean onSupportNavigateUp() { NavController navController = Navigation.findNavController(this, R.id.nav_host_fragment); return NavigationUI.navigateUp(navController, mAppBarConfiguration) || super.onSupportNavigateUp(); } @Override protected void onResume() { super.onResume(); conform.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { dbRef = FirebaseDatabase.getInstance().getReference().child(plc).child("GuideReceiveUser"); try { if (TextUtils.isEmpty(Text_Name.getText().toString())) Toast.makeText(getApplicationContext(), "Please Enter Name", Toast.LENGTH_LONG).show(); else if (TextUtils.isEmpty(Text_Email.getText().toString())) Toast.makeText(getApplicationContext(), "Please Enter E-Mail", Toast.LENGTH_LONG).show(); else if(!(Text_Email.getText().toString()).matches(emailPattern)) Toast.makeText(getApplicationContext(), "invalide E-Mail", Toast.LENGTH_LONG).show(); else if (TextUtils.isEmpty(Text_Days.getText().toString())) Toast.makeText(getApplicationContext(), "Please Enter No Of Days", Toast.LENGTH_LONG).show(); else if (TextUtils.isEmpty(Text_Phone.getText().toString())) Toast.makeText(getApplicationContext(), "Please Enter Phone No", Toast.LENGTH_LONG).show(); else { detailForGuideReserv.setName(Text_Name.getText().toString().trim()); detailForGuideReserv.setEmail(Text_Email.getText().toString().trim()); detailForGuideReserv.setDays(Text_Days.getText().toString().trim()); detailForGuideReserv.setVehicle(vehicleName.trim()); detailForGuideReserv.setPhoneNumber(Integer.parseInt(Text_Phone.getText().toString().trim())); x = thisDate + Text_Name.getText().toString().trim(); dbRef.child(x).setValue(detailForGuideReserv); Toast.makeText(getApplicationContext(), "Guide Booking..", Toast.LENGTH_LONG).show(); clearControls(); Intent intent = new Intent(GuideBooking.this, GuideBookingConfirm.class); intent.putExtra("userObject", x); intent.putExtra("place", plc); intent.putExtra("email", email); startActivity(intent); } } catch (NumberFormatException e) { Toast.makeText(getApplicationContext(), "Invalid Contact Number", Toast.LENGTH_LONG).show(); } } }); } private void clearControls() { Text_Name.setText(""); Text_Email.setText(""); Text_Days.setText(""); Text_Phone.setText(""); } }
[ "97psps@gmail.com" ]
97psps@gmail.com