blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
4
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
689M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
131 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
32 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
313
03ae1f53e4186c378049e681946117faa545f559
4d8cac37f60f576d3ec203efc812ea567c726cfd
/Subtitlor/src/com/subtitlor/utilities/SubtitlesHandler.java
a868f827eae7054c9555e52d17250a2fc9378eb9
[]
no_license
melkarmo/Subtitlor
60ee84efc776d477213152f858369b5be675cc89
16401a05a708890c5a9cc40327da3999680a1461
refs/heads/master
2020-07-04T03:32:49.008975
2020-05-13T13:26:43
2020-05-13T13:26:43
202,141,063
0
0
null
null
null
null
UTF-8
Java
false
false
2,114
java
package com.subtitlor.utilities; import java.io.BufferedReader; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import com.subtitlor.beans.Block; import com.subtitlor.conf.SubtitlorConfiguration; public class SubtitlesHandler { private ArrayList<Block> blocks = null; private boolean fileExists; public SubtitlesHandler(String fileName) { blocks = new ArrayList<Block>(); boolean writingLines = false; boolean previousLineWritten = false; BufferedReader br; try { br = new BufferedReader(new InputStreamReader(new FileInputStream(SubtitlorConfiguration.CHEMIN_FICHIERS + fileName), "UTF8")); String line; while ((line = br.readLine()) != null) { if ( !writingLines ) { if ( isInteger(line) ) { Block block = new Block(); block.setFileName(fileName); block.setId(Integer.parseInt(line)); block.setIdLine(0); blocks.add(block); } else { writingLines = true; blocks.get(blocks.size() - 1).setTimeInterval(line); } } else { if ( line.length() != 0 && !previousLineWritten ) { blocks.get(blocks.size() - 1).setSubtitles(line); previousLineWritten = true; } else if ( line.length() != 0 && previousLineWritten ) { Block block = new Block(); block.setFileName(fileName); block.setId(blocks.get(blocks.size() - 1).getId()); block.setTimeInterval(blocks.get(blocks.size() - 1).getTimeInterval()); block.setIdLine(blocks.get(blocks.size() - 1).getIdLine() + 1); block.setSubtitles(line); blocks.add(block); } else { writingLines = false; previousLineWritten = false; } } } br.close(); fileExists = true; } catch (IOException e) { fileExists = false; } } public ArrayList<Block> getFileBlocks() { return blocks; } public boolean isFileExists() { return fileExists; } public static boolean isInteger(String s) { try { Integer.parseInt(s); } catch(Exception e) { return false; } return true; } }
[ "moncefelkarmoudi@outlook.fr" ]
moncefelkarmoudi@outlook.fr
beda2a6cbfeb894d04661ca228ca7f21fa29e548
3816db83a670aa6c47e23e2f0ff8f39768b18fd7
/pinyougou-manager-web/src/main/java/com/pinyougou/manager/controller/ProvincesController.java
949078047a67c34a97bdc771eafbeeffbfe3e2af
[]
no_license
gendway/huiminjihua
a5f3b0c0c0738c8de7e49b123d805b76552244ee
2761c8e50af91fdaae237a4ef62429a096e7cb2a
refs/heads/master
2020-04-22T11:15:52.897306
2019-02-12T14:45:21
2019-02-12T14:45:21
170,333,491
3
0
null
null
null
null
UTF-8
Java
false
false
3,373
java
package com.pinyougou.manager.controller; import com.alibaba.dubbo.config.annotation.Reference; import com.github.pagehelper.PageInfo; import com.pinyougou.http.Result; import com.pinyougou.model.Provinces; import com.pinyougou.sellergoods.service.ProvincesService; import org.springframework.web.bind.annotation.*; import java.util.HashMap; import java.util.List; import java.util.Map; @RestController @RequestMapping(value = "/provinces") public class ProvincesController { @Reference private ProvincesService provincesService; /*** * 根据ID批量删除 * @param ids * @return */ @RequestMapping(value = "/delete") public Result delete(@RequestBody List<Long> ids){ try { //根据ID删除数据 int dcount = provincesService.deleteByIds(ids); if(dcount>0){ return new Result(true,"删除成功"); } } catch (Exception e) { e.printStackTrace(); } return new Result(false,"删除失败"); } /*** * 修改信息 * @param provinces * @return */ @RequestMapping(value = "/update",method = RequestMethod.POST) public Result modify(@RequestBody Provinces provinces){ try { //根据ID修改Provinces信息 int mcount = provincesService.updateProvincesById(provinces); if(mcount>0){ return new Result(true,"修改成功"); } } catch (Exception e) { e.printStackTrace(); } return new Result(false,"修改失败"); } /*** * 根据ID查询Provinces信息 * @param id * @return */ @RequestMapping(value = "/{id}",method = RequestMethod.GET) public Provinces getById(@PathVariable(value = "id")long id){ //根据ID查询Provinces信息 Provinces provinces = provincesService.getOneById(id); return provinces; } /*** * 增加Provinces数据 * @param provinces * 响应数据:success * true:成功 false:失败 * message * 响应的消息 * */ @RequestMapping(value = "/add",method = RequestMethod.POST) public Result add(@RequestBody Provinces provinces){ try { //执行增加 int acount = provincesService.add(provinces); if(acount>0){ //增加成功 return new Result(true,"增加成功"); } } catch (Exception e) { e.printStackTrace(); } return new Result(false,"增加失败"); } /*** * 分页查询数据 * 获取JSON数据 * @return */ @RequestMapping(value = "/list",method = RequestMethod.POST) public PageInfo<Provinces> list(@RequestBody Provinces provinces,@RequestParam(value = "page", required = false, defaultValue = "1") int page, @RequestParam(value = "size", required = false, defaultValue = "10") int size) { return provincesService.getAll(provinces,page, size); } /*** * 查询所有 * 获取JSON数据 * @return */ @RequestMapping(value = "/list",method = RequestMethod.GET) public List<Provinces> list() { return provincesService.getAll(); } }
[ "gendway@163.com" ]
gendway@163.com
2077c3e8ec7278ba5af3c3f44dcf8d6ffcfcbb22
562aebdbe7ac7796c31f723debff876556919c82
/src/test/java/com/actuator/monitoring/MonitoringApplicationTests.java
27ed0eb5e209195eeba949d4067f85b20a8e23b4
[]
no_license
netesh3/MonitoringApp-Prometheus-Grafana-SpringBoot
09e49f15127de9186aa681922ce3d7b1f34d873e
feb524d92d03382f46467fc964d640d67fc41f9e
refs/heads/master
2020-03-28T08:54:49.843048
2018-09-11T02:54:13
2018-09-11T02:54:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
353
java
package com.actuator.monitoring; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringRunner; @RunWith(SpringRunner.class) @SpringBootTest public class MonitoringApplicationTests { @Test public void contextLoads() { } }
[ "netkumar@informatica.com" ]
netkumar@informatica.com
bab010f21ca03459c91acb2b9852786b706dbc4e
672260215b106ed94037fa1ab9b65eb4847af30c
/fasta/Fasta.java
9c6c8e981c1ce965ad84a092881f9251914fd440
[]
no_license
hun-nemethpeter/benchdalvik
8fd1252367c8264fb60d50c7490fc15d71c8fd73
5cb87fe83afee81809e995a24be3fbd4206616ca
refs/heads/master
2021-01-17T22:56:41.597706
2013-08-20T17:26:19
2013-08-20T17:26:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,822
java
import java.util.Date; import java.util.Map; import java.util.HashMap; import java.util.Vector; public class Fasta { static int last = 42; static final int A = 3877; static final int C = 29573; static final int M = 139968; static double rand(int max) { last = (last * A + C) % M; return max * last / (double)M; } static final String ALU = "GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGG" + "GAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGA" + "CCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAAT" + "ACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCA" + "GCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGG" + "AGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCC" + "AGCCTGGGCGACAGAGCGAGACTCCGTCTCAAAAA"; static HashMap<Character, Double> IUB = new HashMap<Character, Double>(); static void InitializeIUB() { IUB.put('a', 0.27); IUB.put('c', 0.12); IUB.put('g', 0.12); IUB.put('t', 0.27); IUB.put('B', 0.02); IUB.put('D', 0.02); IUB.put('H', 0.02); IUB.put('K', 0.02); IUB.put('M', 0.02); IUB.put('N', 0.02); IUB.put('R', 0.02); IUB.put('S', 0.02); IUB.put('V', 0.02); IUB.put('W', 0.02); IUB.put('Y', 0.02); } static HashMap<Character, Double> HomoSap = new HashMap<Character, Double>(); static void InitializeHomoSap() { HomoSap.put('a', 0.3029549426680); HomoSap.put('c', 0.1979883004921); HomoSap.put('g', 0.1975473066391); HomoSap.put('t', 0.3015094502008); } static void makeCumulative(HashMap<Character, Double> table) { Map.Entry<Character, Double> last = null; for (Map.Entry<Character, Double> ent : table.entrySet()) { char c = ent.getKey().charValue(); if (last != null) { ent.setValue(ent.getValue().doubleValue() + last.getValue().doubleValue()); } last = ent; } } static volatile String ret = null; static void fastaRepeat(int n, String seq) { int seqi = 0; int lenOut = 60; while (n > 0) { if (n<lenOut) lenOut = n; if (seqi + lenOut < seq.length()) { ret = seq.substring(seqi, seqi+lenOut); seqi += lenOut; } else { String s = seq.substring(seqi); seqi = lenOut - s.length(); ret = s + seq.substring(0, seqi); } n -= lenOut; } } static void fastaRandom(int n, HashMap<Character, Double> table) { char[] line = new char[60]; while (n>0) { if (n<line.length) line = new char[n]; for (int i=0; i<line.length; i++) { double r = rand(1); for (Map.Entry<Character, Double> ent : table.entrySet()) { char c = ent.getKey().charValue(); if (r < ent.getValue().doubleValue()) { line[i] = c; break; } } } ret = new String(line); n -= line.length; } } static void runFasta() { int count = 7; fastaRepeat(2*count*100000, ALU); fastaRandom(3*count*1000, IUB); fastaRandom(5*count*1000, HomoSap); } static public void main(String[] args) { InitializeIUB(); InitializeHomoSap(); makeCumulative(IUB); makeCumulative(HomoSap); Date d1 = new Date(); for (int i = 0; i < 10; i++) runFasta(); Date d2 = new Date(); System.out.println("Java Time: " + ((d2.getTime() - d1.getTime()) / 1000.0) + " (count=" + ret + ")"); } }
[ "kannan.vij@gmail.com" ]
kannan.vij@gmail.com
8e0b1b1186905f59a0c8c5d62fbbdcf8399fd9be
5e224ff6d555ee74e0fda6dfa9a645fb7de60989
/database/src/main/java/adila/db/a7xeltelgt.java
5d4dd6a814194d496050f79037247f10324ab5df
[ "MIT" ]
permissive
karim/adila
8b0b6ba56d83f3f29f6354a2964377e6197761c4
00f262f6d5352b9d535ae54a2023e4a807449faa
refs/heads/master
2021-01-18T22:52:51.508129
2016-11-13T13:08:04
2016-11-13T13:08:04
45,054,909
3
1
null
null
null
null
UTF-8
Java
false
false
242
java
// This file is automatically generated. package adila.db; /* * Samsung Galaxy A7 (2016) * * DEVICE: a7xeltelgt * MODEL: SM-A710L */ final class a7xeltelgt { public static final String DATA = "Samsung|Galaxy A7 (2016)|Galaxy A"; }
[ "keldeeb@gmail.com" ]
keldeeb@gmail.com
b4eb2189b9f33cb70ebbbc470526bbe782b2bdbd
6b615e53609657e238f4ed1a4596a6b3de8c886d
/GradleBuild/EntitiesModel/src/main/java/org/cmas/entities/Address.java
55a2ddb13f7c44286b84593935b3c8c58b60354d
[]
no_license
sunsunich/cmas
764cc6aba39b962c0828153bca62877974a63df7
36529df024961b51db88fb183fe97a9e6eb797f8
refs/heads/master
2022-09-30T04:48:11.453885
2022-09-24T11:29:50
2022-09-24T11:29:50
46,150,626
0
0
null
null
null
null
UTF-8
Java
false
false
1,671
java
package org.cmas.entities; import com.google.myjson.annotations.Expose; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.ManyToOne; import javax.persistence.Table; /** * Created on May 27, 2019 * * @author Alexander Petukhov */ @Entity @Table(name = "addresses") public class Address extends DictionaryEntity{ private static final long serialVersionUID = 685310177284769825L; @Expose @ManyToOne private Country country; // optional @Expose private String region; @Expose @Column(nullable = false) private String zipCode; @Expose @Column(nullable = false) private String city; @Expose @Column(nullable = false) private String street; @Expose @Column(nullable = false) private String house; public Country getCountry() { return country; } public void setCountry(Country country) { this.country = country; } public String getRegion() { return region; } public void setRegion(String region) { this.region = region; } public String getZipCode() { return zipCode; } public void setZipCode(String zipCode) { this.zipCode = zipCode; } public String getCity() { return city; } public void setCity(String city) { this.city = city; } public String getStreet() { return street; } public void setStreet(String street) { this.street = street; } public String getHouse() { return house; } public void setHouse(String house) { this.house = house; } }
[ "apetukhov@accesssoftek.com" ]
apetukhov@accesssoftek.com
7b97c5e801a03885bb518e6b9ed349761f243e3f
dae06d8115765e0fa77389874b87231340a141af
/client/src/ini/ClientProperty.java
91491662b36300915f38d068eaac7e5248fde53b
[]
no_license
vyskocilz/Scifi
78fbc4ae55322b4c6fe7057cf02e1a8113e30106
f93ba1647e3f10f2f0b3355b9a639aa278dfee6d
refs/heads/master
2020-04-04T17:47:35.261914
2016-02-27T07:21:34
2016-02-27T07:21:34
30,824,120
0
0
null
null
null
null
UTF-8
Java
false
false
3,919
java
package ini; import data.ClientType; import javax.swing.*; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Properties; public class ClientProperty { private static ClientProperty INSTANCE; private Properties properties = new Properties(); public static final String PROPERTY_FILE = "client.properties"; public static final String SERVER_ADDR = "server_ip"; public static final String SERVER_PC_NAME = "server_pc_name"; public static final String SERVER_PORT = "server_port"; public static final String CLIENT_MUSTEK = "client_mustek"; public static final String CLIENT_NAME = "client_name"; public static final String CLIENT_STROJOVNA = "client_strojovna"; public static final String CLIENT_MAPA = "client_mapa"; public static final String CLIENT_LOG = "client_log"; public static final String CLIENT_CLOSE_PASSWORD = "client_close_password"; private ClientProperty() { initPropertyFile(); load(); checkProperties(); save(); } private void load() { try { properties.load(new FileInputStream(PROPERTY_FILE)); } catch (IOException e) { } } private void checkProperties() { String msg = ""; if (properties.getProperty(SERVER_ADDR) == null) { msg += "Ip adresa není vyplněna"; } if (properties.getProperty(SERVER_PORT) == null) { msg += (msg.length() > 0) ? "\n" : "" + "Port není vyplněn"; } if (msg.length() > 0) { JOptionPane.showMessageDialog(null, "Špatné hodnoty", msg, JOptionPane.ERROR_MESSAGE); System.exit(0); } } private void save() { try { properties.store(new FileOutputStream(PROPERTY_FILE), null); } catch (IOException e) { } } private void initPropertyFile() { if (!new File(PROPERTY_FILE).exists()) { properties.put(SERVER_ADDR, DefaultProperty.APPLICATION_IP); properties.put(SERVER_PORT, DefaultProperty.APPLICATION_PORT); properties.put(CLIENT_MUSTEK, DefaultProperty.APPLICATION_CLIENT_TYPE); properties.put(CLIENT_STROJOVNA, DefaultProperty.APPLICATION_CLIENT_TYPE); properties.put(CLIENT_CLOSE_PASSWORD, DefaultProperty.APPLICATION_CLIENT_TYPE); properties.put(CLIENT_NAME, DefaultProperty.APPLICATION_CLIENT_NAME); } } public static String getProperty(String name) { if (CLIENT_LOG.equals(name)) { return DefaultProperty.APPLICATION_DEBUG; } if (INSTANCE == null) { INSTANCE = new ClientProperty(); } return INSTANCE.properties.getProperty(name); } public static boolean getPropertyAsBoolean(String name) { return Boolean.valueOf(getProperty(name)); } public static int getPropertyAsInteger(String name) { return Integer.valueOf(getProperty(name)); } public static List<String> getClientType() { List<String> clientTypes = new ArrayList<String>(); if (getPropertyAsBoolean(CLIENT_MUSTEK)) { clientTypes.add(ClientType.MUSTEK); } if (getPropertyAsBoolean(CLIENT_STROJOVNA)) { clientTypes.add(ClientType.STROJOVNA); } if (getPropertyAsBoolean(CLIENT_MAPA)) { clientTypes.add(ClientType.MAPA); } if (clientTypes.isEmpty()) { clientTypes.add(ClientType.NEZNAMA); } return clientTypes; } public static String getClosePassword() { return getProperty(CLIENT_CLOSE_PASSWORD); } public static String getClientName() { return getProperty(CLIENT_NAME); } }
[ "vyskocilz@email.cz" ]
vyskocilz@email.cz
e7da3fdae5d4fba04680cfad385bd57fb22354b2
cb7aac2b030ffaeb98e3e5875d7af95899e9659e
/NettySpringboot/server/feigedev/src/main/java/com/lzn/utils/JsonUtils.java
8b81f4986d530ad7aea0b55eab02372966b9a91f
[]
no_license
dutlzn/Springboot-Guide
01f9d8c0a32367a0ae2fc6d2a82637709a46e4a7
46ff570a0c39f7160beb70e665cbe06f99eeb2bd
refs/heads/master
2023-05-11T05:26:31.198372
2020-02-08T08:06:22
2020-02-08T08:06:22
234,721,087
0
0
null
2020-02-08T08:07:05
2020-01-18T10:57:54
JavaScript
UTF-8
Java
false
false
1,894
java
package com.lzn.utils; import java.util.List; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.JavaType; import com.fasterxml.jackson.databind.ObjectMapper; /** * @Description: 自定义响应结构, 转换类 */ public class JsonUtils { // 定义jackson对象 private static final ObjectMapper MAPPER = new ObjectMapper(); /** * 将对象转换成json字符串。 * <p>Title: pojoToJson</p> * <p>Description: </p> * * @param data * @return */ public static String objectToJson(Object data) { try { String string = MAPPER.writeValueAsString(data); return string; } catch (JsonProcessingException e) { e.printStackTrace(); } return null; } /** * 将json结果集转化为对象 * * @param jsonData json数据 * @param clazz 对象中的object类型 * @return */ public static <T> T jsonToPojo(String jsonData, Class<T> beanType) { try { T t = MAPPER.readValue(jsonData, beanType); return t; } catch (Exception e) { e.printStackTrace(); } return null; } /** * 将json数据转换成pojo对象list * <p>Title: jsonToList</p> * <p>Description: </p> * * @param jsonData * @param beanType * @return */ public static <T> List<T> jsonToList(String jsonData, Class<T> beanType) { JavaType javaType = MAPPER.getTypeFactory().constructParametricType(List.class, beanType); try { List<T> list = MAPPER.readValue(jsonData, javaType); return list; } catch (Exception e) { e.printStackTrace(); } return null; } }
[ "2436013662@qq.com" ]
2436013662@qq.com
aba45296661ee8b30d7a945e0f4a99544a95adcb
26fa676a9a321eb7aaabbe914ed44cccf262b397
/HibernateCRUD-master/src/main/java/com/tousif/crud_demo/CrudWithHQL.java
1d7a7747436a7e155033d7203d076ceb9a235181
[]
no_license
TejaswiniKavya/Test
130133367e9e07a3ccffbcad1a3868c5bd1eabdf
df13a06a3fb82388bb5fec7751d6c0db63747432
refs/heads/master
2022-12-24T02:37:34.748189
2019-09-13T12:34:01
2019-09-13T12:34:01
194,602,937
0
0
null
2022-12-16T12:13:06
2019-07-01T05:04:31
JavaScript
UTF-8
Java
false
false
2,982
java
package com.tousif.crud_demo; import java.util.Random; import org.hibernate.Query; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.cfg.Configuration; import org.hibernate.service.ServiceRegistry; import org.hibernate.service.ServiceRegistryBuilder; public class CrudWithHQL { private static SessionFactory sessionFactory; public void appendTableS1S2() { Session session = sessionFactory.openSession(); session.beginTransaction(); System.out.println("Transaction Started"); String hql = "INSERT INTO Student(name, rollno, marks)" + "SELECT name, rollno, marks FROM Student2"; Query query = session.createQuery(hql); int result = query.executeUpdate(); System.out.println("Rows affected: " + result); session.getTransaction().commit(); System.out.println("Transaction Completed"); } public void addStudent(int rollno, String name, int marks) { Session session = sessionFactory.openSession(); session.beginTransaction(); System.out.println("Transaction Started"); Student student = new Student(); student.setRollno(rollno); student.setName(name); student.setMarks(marks); session.save(student); session.getTransaction().commit(); System.out.println("Transaction Completed"); } public void deleteStudent(int rollno) { Session session = sessionFactory.openSession(); session.beginTransaction(); System.out.println("Transaction Started"); String hql = "DELETE from Student WHERE rollno = :rollno"; Query query = session.createQuery(hql); query.setParameter("rollno", rollno); query.executeUpdate(); session.getTransaction().commit(); System.out.println("Transaction Completed"); } public void updateMarks(int rollno, int newMarks) { Session session = sessionFactory.openSession(); session.beginTransaction(); System.out.println("Transaction Started"); String hql = "UPDATE Student set marks = :newMarks WHERE rollno = :rollno "; Query query = session.createQuery(hql); query.setParameter("newMarks", newMarks); query.setParameter("rollno", rollno); query.executeUpdate(); session.getTransaction().commit(); System.out.println("Transaction Completed"); } public static void main(String[] args) { Configuration config = new Configuration(); config.configure("hibernate.cfg.xml"); config.addAnnotatedClass(Student.class).addAnnotatedClass(Student2.class); ServiceRegistryBuilder srb = new ServiceRegistryBuilder(); ServiceRegistry reg = srb.applySettings(config.getProperties()).buildServiceRegistry(); sessionFactory = config.buildSessionFactory(reg); //<---------------------------------------------------------------------------------------------------> CrudWithHQL cwh = new CrudWithHQL(); // cwh.appendTableS1S2(); // cwh.addStudent(13,"Name13",13); // cwh.deleteStudent(13); // cwh.updateMarks(12, 24); } }
[ "tejaswinis1ew12ec103@gmail.com" ]
tejaswinis1ew12ec103@gmail.com
403e2365501df5a55882c05daee20e89e5a0644a
7a243592d356792a954e308c3e58220d2de16c7d
/app/src/androidTest/java/com/a4dotsinc/dynamicwalls/ExampleInstrumentedTest.java
70fd382fe8cce92a9c3302c6d54af28a5de14373
[]
no_license
aravindmj97/DynamicWalls
ac25ac6aaa756210a76a41fa81ffc24585ee52a0
8a2ad99d28894f7ec5f5a4dbf0d94bb0b2c82ae4
refs/heads/master
2020-03-28T15:52:25.654377
2018-12-30T10:56:30
2018-12-30T10:56:30
148,633,984
0
0
null
null
null
null
UTF-8
Java
false
false
736
java
package com.a4dotsinc.dynamicwalls; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("com.a4dotsinc.dynamicwalls", appContext.getPackageName()); } }
[ "aravindmj97@gmail.com" ]
aravindmj97@gmail.com
1f87cde162529c6bfc0fe1d8fb235a4f5ad1ba5a
766a8acd25624fbef1c42993cb35c68cf8a90fab
/tes/src/main/java/waw/campus/Campus.java
b884625ea7835356b979fc78904d5c26f9ddfcd7
[]
no_license
WawKei/RPG
854650ea410d69891edc340446abd194cd86cbed
f2b033a98f4beb3040fae2f7c980871a0a385631
refs/heads/master
2020-04-01T12:23:22.148353
2018-12-28T07:11:25
2018-12-28T07:11:25
153,204,932
2
0
null
null
null
null
UTF-8
Java
false
false
2,913
java
package waw.campus; import cn.nukkit.Player; import cn.nukkit.item.ItemMap; import java.awt.*; import java.awt.image.BufferedImage; import java.util.ArrayList; import java.util.HashMap; import java.util.Map.Entry; public class Campus { public static int width = 128; public static int height = 128; public static final int TYPE_SIDE_X = 0; public static final int TYPE_SIDE_Y = 1; BufferedImage campus = new BufferedImage(width, height,BufferedImage.TYPE_INT_ARGB); public ArrayList<CampusElement> elements = new ArrayList<>(); private int y = 0; private int my = 0; private int x = 0; private int margin = 10; private Campus next_page = null; public static HashMap<Player,Campus> showCampus = new HashMap<>(); public static Boolean allClose = false; //private static HashMap<Player,Item> ItemMap = new HashMap<>(); private static HashMap<Player,Campus> nexst = new HashMap<>(); public void setNextPage(Campus c) { this.next_page = c; } protected void addElement(CampusElement element, int type) { elements.add(element); int[] size = element.getSize(campus.getGraphics()); if(type == TYPE_SIDE_X) { element.setLocation(x, y); x += size[0] + margin; }else if(type == TYPE_SIDE_Y) { x = 0; y += my + margin; element.setLocation(x, y); } if(my < size[1]) { my = size[1]; } } public BufferedImage getImage() { Graphics g = campus.getGraphics(); g.setColor(Color.WHITE); g.fillRect(0,0, width, height); g.setColor(Color.BLACK); for(CampusElement element : elements) { element.drawTo(campus,g); } g.dispose(); return campus; } public static void setNexst(Player player,Campus c) { nexst.put(player, c); } public void sendItemMap(Player player) { ItemMap map = (ItemMap) new ItemMap().setCustomName("image"); cInventoryManager.getInventory(player).showItem(map, 1); player.getInventory().setHeldItemSlot(1); this.sendImage(player); } public void sendImage(Player player) { if(player.getInventory().getItemInHand() instanceof ItemMap) { ItemMap map = (ItemMap) player.getInventory().getItemInHand(); map.setImage(getImage()); if(this.next_page != null) { setNexst(player,this.next_page); } if(player.isOnline()) { map.sendImage(player); } showCampus.put(player, this); } } public static void closeAll() { allClose = true; for(Entry<Player, Campus> e : showCampus.entrySet()) { close(e.getKey()); } } public static void close(Player player) { if(showCampus.containsKey(player) && showCampus.get(player).canClose(player)) { if(nexst.containsKey(player) && !allClose) { Campus c = nexst.get(player); nexst.remove(player); c.sendImage(player); }else { cInventoryManager.getInventory(player).setSlots(); showCampus.remove(player); } } } public Boolean canClose(Player player) { return true; } }
[ "waw.mam.waw.mam@gmail.com" ]
waw.mam.waw.mam@gmail.com
e7bb80596c5cc76981ad3d99254e8d5640cd0f83
9717ecc400cbb7d59a7a8d506c471ddc427a0fea
/src/main/java/com/joycheng/ryan/service/impl/ReplyServiceImpl.java
0842f6ff11cb2e86088add299ba584bb732c50ef
[]
no_license
RyanHo97/psychology-health-project
b80f52fcfcfaa522a973a08cb63d144da1ce5f6b
feda1e98f11c97326548e45c67860cb0224b9c06
refs/heads/main
2023-02-16T19:47:04.783089
2021-01-17T12:17:10
2021-01-17T12:17:10
330,381,575
5
1
null
null
null
null
UTF-8
Java
false
false
1,726
java
package com.joycheng.ryan.service.impl; import com.joycheng.ryan.entity.Reply; import com.joycheng.ryan.mapper.ReplyMapper; import com.joycheng.ryan.service.ReplyService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; /** * 留言关联表 */ @Service public class ReplyServiceImpl implements ReplyService { @Autowired private ReplyMapper replyMapper; @Override public boolean deleteByPrimaryKey(Integer id) { int del = replyMapper.deleteByPrimaryKey(id); if (del > 0) { return true; } return false; } @Override public boolean insert(Reply record) { try { int insert = replyMapper.insert(record); if (insert > 0) { return true; } else { throw new RuntimeException("数据库异常...."); } } catch (Exception e) { throw new RuntimeException("后台异常...."+e.getMessage()); } } @Override public Reply selectByPrimaryKey(Integer id) { return replyMapper.selectByPrimaryKey(id); } @Override public List<Reply> selectAll() { return replyMapper.selectAll(); } @Override public boolean updateByPrimaryKey(Reply record) { try { int update = replyMapper.updateByPrimaryKey(record); if (update > 0) { return true; } else { throw new RuntimeException("数据库异常..."); } } catch (Exception e) { throw new RuntimeException("服务器异常...." + e.getMessage()); } } }
[ "1120177906@qq.com" ]
1120177906@qq.com
e94c473b162d92eccdccd7916d7989e89223c75b
d61beea21acccc4b3cd5ce1ec280f8e2eecbe3f5
/src/test/java/io/faucette/math/Vec3Test.java
df5e1df39fcd7fd84e1a96acb37c8184b6cede71
[ "MIT" ]
permissive
nathanfaucett/java-math
a0fb1a5e13d5e7a8d29f13f9ad486db123691065
b9d91ac25306ac706c9b7b127c9a30717e5bc8c6
refs/heads/master
2021-01-15T22:29:36.386705
2017-03-04T16:22:40
2017-03-04T16:22:40
78,878,403
0
0
null
null
null
null
UTF-8
Java
false
false
3,894
java
package io.faucette.math; import static org.junit.Assert.*; import org.junit.*; public class Vec3Test { @Test public void testNewVec3() { Vec3 v = new Vec3(10f, 10f, 10f); assertEquals(v.x, 10f, Mathf.EPSILON); assertEquals(v.y, 10f, Mathf.EPSILON); assertEquals(v.z, 10f, Mathf.EPSILON); } @Test public void testAdd() { Vec3 a = new Vec3(1f, 1f, 1f); Vec3 b = new Vec3(1f, 1f, 1f); a.add(b); assertEquals(2f, a.x, Mathf.EPSILON); assertEquals(2f, a.y, Mathf.EPSILON); assertEquals(2f, a.z, Mathf.EPSILON); } @Test public void testSub() { Vec3 a = new Vec3(1f, 1f, 1f); Vec3 b = new Vec3(1f, 1f, 1f); a.sub(b); assertEquals(0f, a.x, Mathf.EPSILON); assertEquals(0f, a.y, Mathf.EPSILON); assertEquals(0f, a.z, Mathf.EPSILON); } @Test public void testMul() { Vec3 a = new Vec3(2f, 2f, 2f); Vec3 b = new Vec3(2f, 2f, 2f); a.mul(b); assertEquals(4f, a.x, Mathf.EPSILON); assertEquals(4f, a.y, Mathf.EPSILON); assertEquals(4f, a.z, Mathf.EPSILON); } @Test public void testSMul() { Vec3 a = new Vec3(2f, 2f, 2f); a.smul(0.5f); assertEquals(1f, a.x, Mathf.EPSILON); assertEquals(1f, a.y, Mathf.EPSILON); assertEquals(1f, a.z, Mathf.EPSILON); } @Test public void testDiv() { Vec3 a = new Vec3(4f, 4f, 4f); Vec3 b = new Vec3(2f, 2f, 2f); a.div(b); assertEquals(2f, a.x, Mathf.EPSILON); assertEquals(2f, a.y, Mathf.EPSILON); assertEquals(2f, a.z, Mathf.EPSILON); } @Test public void testSDiv() { Vec3 a = new Vec3(2f, 2f, 2f); a.sdiv(2f); assertEquals(1f, a.x, Mathf.EPSILON); assertEquals(1f, a.y, Mathf.EPSILON); assertEquals(1f, a.z, Mathf.EPSILON); } @Test public void testDot() { Vec3 a = new Vec3(1f, 1f, 1f); Vec3 b = new Vec3(1f, 1f, 1f); assertEquals(3f, a.dot(b), Mathf.EPSILON); } @Test public void testLength() { Vec3 a = new Vec3(1f, 1f, 1f); assertEquals(Math.sqrt(3), a.length(), Mathf.EPSILON); } @Test public void testNormalize() { Vec3 a = new Vec3(1f, 1f, 1f); float length = a.normalize(); assertEquals(Math.sqrt(3), length, Mathf.EPSILON); assertEquals(1f / length, a.x, Mathf.EPSILON); assertEquals(1f / length, a.y, Mathf.EPSILON); assertEquals(1f / length, a.z, Mathf.EPSILON); } @Test public void testInverse() { Vec3 a = new Vec3(1f, 1f, 1f); a.inverse(); assertEquals(-1f, a.x, Mathf.EPSILON); assertEquals(-1f, a.y, Mathf.EPSILON); assertEquals(-1f, a.z, Mathf.EPSILON); } @Test public void testMin() { Vec3 a = new Vec3(1f, 1f, 1f); a.min(new Vec3(-1f, -1f, -1f)); assertEquals(new Vec3(-1f, -1f, -1f), a); } @Test public void testMax() { Vec3 a = new Vec3(1f, 1f, 1f); a.max(new Vec3(-1f, -1f, -1f)); assertEquals(new Vec3(1f, 1f, 1f), a); } @Test public void testTransformMat2() { Vec3 a = new Vec3(0f, 1f, 2f); Mat2 m = new Mat2(); m.rotate((float) (Math.PI / 2)); a.transform(m); Vec3 b = new Vec3(-1f, 0f, 2f); assertEquals(b, a); } @Test public void testTransformMat32() { Vec3 a = new Vec3(0f, 1f, 1f); Mat32 m = new Mat32(); m.translate(new Vec3(-1f, 0f, 1f)); m.rotate((float) (Math.PI / 2)); a.transform(m); Vec3 b = new Vec3(-2f, 0f, 1f); assertEquals(b, a); } @Test public void testToString() { assertEquals("Vec3(0.0, 1.0, 2.0)", "" + new Vec3(0f, 1f, 2f)); } }
[ "nathanfaucett@gmail.com" ]
nathanfaucett@gmail.com
9809a99ebfa0094955bcff607e2dac538da9153b
c1385a5c450ed55918d4ec0e2899b20dad4f853f
/branches/mvc/src/main/cn/edu/zju/acm/mvc/control/FieldInitializationErrorException.java
ffe50ea26e2a2f02d4aa48e3b299fc82c19355ee
[]
no_license
BGCX261/zoj-svn-to-git
7e1f821e9ddc0a1097afa177e751a928d06d5a83
339c58e255ee5a8dd01b3ddadbd54baff8e999bf
refs/heads/master
2021-03-12T20:38:36.402362
2015-08-25T15:27:24
2015-08-25T15:27:24
41,491,002
0
0
null
null
null
null
UTF-8
Java
false
false
112
java
package cn.edu.zju.acm.mvc.control; public class FieldInitializationErrorException extends Exception { }
[ "you@example.com" ]
you@example.com
6ffa12ffd100310fd7ddcdd7fd1e7c70001c84d2
b0648626e91a3784026d116d0ccd682290e4346b
/jdbc/controller/departmentController.java
7ccb5ef7c38e1ec7d707e9c7d1bacd35a39e6b35
[]
no_license
nedaakbari/maktab58_HW5
035cd2c74387096a5e9131ff999ba64ac00360d3
7d3295052ff3a8e8878cac6240ce76818713f5b1
refs/heads/main
2023-08-14T16:26:04.390176
2021-09-29T13:15:58
2021-09-29T13:15:58
411,678,267
0
0
null
null
null
null
UTF-8
Java
false
false
2,509
java
package HW5.controller; import java.sql.*; public class departmentController { private static final String URL = "jdbc:mysql://localhost:3306/hw5"; private static final String USERNAME = "neda"; private static final String PASSWORD = "13730203@Neda"; public static Connection connect2Db() throws ClassNotFoundException { Class.forName("com.mysql.cj.jdbc.Driver"); Connection conn = null; try { conn = DriverManager.getConnection(URL, USERNAME, PASSWORD); } catch (SQLException e) { e.printStackTrace(); } return conn; } public static ResultSet runQuery() throws ClassNotFoundException { ResultSet rs = null; Connection conn = connect2Db(); Statement stmt = null; try { stmt = conn.createStatement();//step2 rs = stmt.executeQuery("select * from employee");//step3 } catch (SQLException e) { e.printStackTrace(); } return rs; } public static void showData() throws SQLException, ClassNotFoundException { System.out.println("ID" + "\t" + "name" + "\t" + "phoneNumber" + "\t" + "EmployeeName"); System.out.println("------------------------------------"); ResultSet rslt = runQuery(); while (rslt.next()) { System.out.print(rslt.getInt("id") + "\t" + rslt.getString(2) + "\t"); System.out.println(rslt.getString(3) + "\t" + rslt.getString(4)); } } public static int createdepartrment() throws ClassNotFoundException { Connection conn = connect2Db(); Statement stmt = null; Integer id = 0; try { stmt = conn.createStatement();//step2 id = stmt.executeUpdate("insert into department values (4,'fatemeh','1234','ali@email.com','091233333','2001/01/01')"); } catch (SQLException e) { id = -1; e.printStackTrace(); } return id; } public static int updateDepartment() throws ClassNotFoundException { Connection conn = connect2Db(); Statement stmt = null; Integer id = 0; try { stmt = conn.createStatement(); id = stmt.executeUpdate("update hw5.department set name='mali';"); } catch (SQLException e) { id = -1; e.printStackTrace(); } return id; } }
[ "noreply@github.com" ]
nedaakbari.noreply@github.com
377f2bf42f4496567d932e6cf23dcc8f7eafcd30
a4df4226842e0f1d423fcf10d083ab3c598cbb70
/src/main/java/com/uvsoftgroup/userregistration/repository/UserRegistrationRepository.java
c6dc5998ddf0e78040f148acbf27bae791ee90ce
[]
no_license
mostafariaydh/userregistration_69
45ff42a14e0c0a1cde96a5397af732b32d2c9420
e75082ce284884fd157bd3d12aba455152e8048b
refs/heads/master
2023-08-17T04:08:30.554489
2021-10-10T10:26:13
2021-10-10T10:26:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
298
java
package com.uvsoftgroup.userregistration.repository; import com.uvsoftgroup.userregistration.model.UserRegistration; import org.springframework.data.repository.PagingAndSortingRepository; public interface UserRegistrationRepository extends PagingAndSortingRepository<UserRegistration, Long> { }
[ "riaydhislam@gmail.com" ]
riaydhislam@gmail.com
bac49ec30bd5ce5a782c3ebdbbe68499f44905c5
14da1f59f467151e69ff5365c50db8be675c3b9b
/app/src/main/java/app/template/TemplateApp.java
e132d8b3c5648e411aa20ea01961ca0dd39c6edc
[]
no_license
rafaelje/android-template-app
fda7fe648136c1166d65019a9efc0852f34043c8
971c87e60abd23e14de2499de45e98cb27ff98e8
refs/heads/master
2020-03-18T22:36:35.088153
2018-05-31T22:33:58
2018-05-31T22:33:58
135,354,367
1
0
null
2018-05-29T21:22:35
2018-05-29T21:22:35
null
UTF-8
Java
false
false
1,739
java
package app.template; import android.app.Application; import android.content.pm.ApplicationInfo; import com.orhanobut.logger.AndroidLogAdapter; import com.orhanobut.logger.FormatStrategy; import com.orhanobut.logger.Logger; import com.orhanobut.logger.PrettyFormatStrategy; import app.template.common.UtilsCrash; /** * All the application configuration */ public class TemplateApp extends Application { private static TemplateApp instance; private static Boolean isDebuggable; /** * Called when the application is starting before any activity, service or receiver objects have been created */ @Override public void onCreate() { super.onCreate(); instance = this; UtilsCrash.configCrash(this, true); try { FormatStrategy formatStrategy = PrettyFormatStrategy.newBuilder() .tag(getPackageName()) // (Optional) Global tag for every log. .build(); Logger.addLogAdapter(new AndroidLogAdapter(formatStrategy)); } catch (Exception ex) { ex.getStackTrace(); } isDebuggable = ( 0 != ( getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE ) ); } /** * Get application instance * @return MDMAgent object */ public static TemplateApp getInstance(){ return instance; } /** * Get if the app is debuggable or not * @return Boolean */ public static Boolean getIsDebuggable() { return isDebuggable; } public static Boolean isSecureVersion() { return true; } public static String getCompleteVersion() { return BuildConfig.VERSION_NAME + "." + BuildConfig.VERSION_CODE; } }
[ "rhernandez@teclib.com" ]
rhernandez@teclib.com
7533e170a5053cad5d4f39f5c34079a549d90ea7
033f3964ad3be77bf8e0ee2711f0d0f07075e209
/StudentRegisterSystem/src/servlet/DeleteProfessors.java
8b0f261802bb6d95592f357163409dc32972c004
[]
no_license
DuanJiashuai/SRS-project
9c0171b3adbc4f7e55b29f89a08dc7b9e500f5d2
693cfb61637e9e5e185283c17d0d94c7baed0c0d
refs/heads/master
2020-12-25T13:45:27.009910
2016-07-02T04:13:40
2016-07-02T04:13:40
61,366,308
0
2
null
null
null
null
UTF-8
Java
false
false
1,614
java
package servlet; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import service.ProfessorService; /** * Servlet implementation class DeleteProfessors */ @WebServlet("/DeleteProfessors") public class DeleteProfessors extends HttpServlet { private static final long serialVersionUID = 1L; /** * @see HttpServlet#HttpServlet() */ public DeleteProfessors() { super(); // TODO Auto-generated constructor stub } /** * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse * response) */ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub response.setContentType("text/html;charset=utf-8"); request.setCharacterEncoding("utf-8"); int count = Integer.parseInt(request.getParameter("count")); ProfessorService ps=new ProfessorService(); String pssnList = request.getParameter("pssn").substring(1); for (int i = 0; i < count; i++) { String pssn = pssnList.split(",")[i]; ps.deleteProfessor(pssn); } response.sendRedirect("ProfessorIndex.html"); } /** * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse * response) */ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // TODO Auto-generated method stub doGet(request, response); } }
[ "duanjs1995@126.com" ]
duanjs1995@126.com
3e17554d16cb5ab319fff9a238215c09e4ab1277
295389ccadaaf5d83ff769c8575204df76e3562c
/.svn/pristine/82/82d4d1bf8ee8eb9de2b2ee14d0aca4bc3a09d399.svn-base
29b991f1bf628e1aaad63d781f6f07d41fb157d3
[]
no_license
yyhxp/weidai
c59beaf086656941024715651a7f48206e806c06
98786096ce89b4bbe35f6fad4dbdd0840331ab4a
refs/heads/master
2020-03-30T01:56:26.420295
2018-10-21T11:29:37
2018-10-21T11:29:37
150,603,423
2
0
null
null
null
null
UTF-8
Java
false
false
1,413
package cn.weidai.service.transferBid; import java.util.List; import cn.weidai.pojo.FundRecord; import cn.weidai.pojo.LendRecord; import cn.weidai.pojo.Middleman; import cn.weidai.pojo.Settlement; import cn.weidai.pojo.TransferBid; import cn.weidai.pojo.User; public interface TransferBidService { /**获取所有转让专区的标地,默认利率降序排列 * @param pageSize * @return */ public List<TransferBid> getTBidList(TransferBid transferBid); /**获得转让标地的数量 * @param transferBid * @return */ public int getTBidTotalCount(TransferBid transferBid); /**根据转让标地tId获得标地详情信息 * @param tId * @return */ public TransferBid getTBidListById(int tId); /** * 购买转让标的 * @param user * @param borrower * @param transferBid * @param lendRecord * @param fundRecord * @return */ public boolean wd_BuyTBid(User buyUser,User sellUser,TransferBid transferBid,LendRecord buyLendRecord,LendRecord sellLendRecord,FundRecord fundRecord,Middleman middleman,Settlement settlement) throws Exception; /**债权转让到转让区 * @param transferBid * @param lendRecord * @return * @throws Exception */ public boolean wd_ZhuangRang(TransferBid transferBid,LendRecord lendRecord)throws Exception; }
[ "995969963@qq.com" ]
995969963@qq.com
cb3db41ad3c0e34c95301e12b718b37af9ac34db
f157a688c1359a9ec6cc569cb2456b62d7730069
/NodoNota.java
49df8263e652a68127b932ca3ff170bdb34f6fbd
[]
no_license
DylanGabrielRojas/ExamenProgra1
05b6291cfc7df60ef88f24f513f5c884026bbe3c
8ab3bf48dec7e0a0510c58902141c9445e66bb69
refs/heads/main
2023-01-29T12:28:52.530726
2020-11-26T00:33:08
2020-11-26T00:33:08
316,005,824
0
0
null
null
null
null
UTF-8
Java
false
false
687
java
/** * * @author Dylan Tenorio Rojas C07802 * @version 25/11/2020 */ public class NodoNota { // instance variables - replace the example below with your own private int nota; private NodoNota siguiente; /** * Constructor for objects of class Nodo */ public NodoNota() { this.nota = 0; this.siguiente = null; } public int getNota() { return nota; } public void setNota(int Nota) { this.nota = Nota; } public NodoNota getSiguiente() { return siguiente; } public void setSiguiente(NodoNota siguiente) { this.siguiente = siguiente; } }
[ "dylan.tenorio@gmail.com" ]
dylan.tenorio@gmail.com
80ff95086025f88a9609a9d56fed4a0250a0eeda
23b39955a534b3181ed3b96b120d9655567a96fc
/Java_02/src/com/biz/hello/VarBoolean_02.java
153ce7456b74ab38cc19a0d026a97a4ab0abb082
[]
no_license
shju0317/Java_2020_05
18366d77865560df904d01be965e3aa2d57aba57
d8069fa57e73639ce1460358be31227c09a92f88
refs/heads/master
2023-01-05T21:44:14.469558
2020-11-02T02:44:25
2020-11-02T02:44:25
265,750,655
0
0
null
null
null
null
UTF-8
Java
false
false
882
java
package com.biz.hello; public class VarBoolean_02 { public static void main(String[] args) { // boolean형 변수를 선언하고 // true라는 값을 저장하라(초기화하라). boolean bVar1 = true; boolean bVar2 = true; bVar1 = 3 == 3; // 3>3의 비교연산을 수행하여 결과를 bVar2에 저장하라 bVar2 = 3 > 3; System.out.println(bVar2); bVar1 = 3 < 3; System.out.println(bVar1); bVar1 = 3 >= 3; bVar2 = 3 <= 3; boolean bVar3 = bVar1 == bVar2; System.out.println(bVar3); bVar3 = bVar1 != bVar2; System.out.println(bVar3); bVar1 = 3>=3; // T bVar2 = 3>3; // F bVar3 = bVar1 != bVar2; System.out.println(bVar3); // ||(filter 기호, pipe 기호) : OR 연산기호 bVar3 = bVar1 || bVar2; System.out.println(bVar3); // && : AND 연산기호 bVar3 = bVar1 && bVar2; System.out.println(bVar3); } }
[ "shju0317@naver.com" ]
shju0317@naver.com
55890275d3209bcbce6312d15d4e1c948f8a1f89
3b9c0c95b3c19ace3ae0dc48306312f33006a674
/hrms/salary-payer/src/main/java/ua/dudka/application/reader/CompanyReader.java
3830971401d056b8367003c557b38aa31c6baef1
[ "Apache-2.0" ]
permissive
yeaxi/e-wallet
018f4bd356b935061d3a79bd9459cd5bf77cc69b
56996f956e499524e990ccd06989b807782bf651
refs/heads/master
2021-01-22T04:10:06.309258
2017-07-27T10:01:29
2017-07-27T10:01:29
92,436,027
3
0
null
2017-07-17T10:17:29
2017-05-25T19:13:11
Java
UTF-8
Java
false
false
655
java
package ua.dudka.application.reader; import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.stereotype.Component; import org.springframework.web.bind.annotation.GetMapping; import ua.dudka.domain.model.Company; import java.util.Collections; import java.util.List; /** * @author Rostislav Dudka */ @FeignClient(value = "hrm-service") interface CompanyReader { @GetMapping("/api/companies") List<Company> readAll(); @Component class CompanyReaderFallback implements CompanyReader { @Override public List<Company> readAll() { return Collections.emptyList(); } } }
[ "rostislav.dudka@gmail.com" ]
rostislav.dudka@gmail.com
d05e205d249e9cdc0d3d4dbed3d063e0a76d5ce8
92918060ac6aa94185113915be3855ffae6a70c5
/src/main/java/com/infy/entities/Employee.java
b4e9d771f1aebc2b09afd7d03b0cc5e402bbab0c
[]
no_license
jagadeesh-cyber/ThymeleafDemo
28f6c03dc6e8610129828cb54008efbe0d9ce941
cf53b8d80c58160146a4aeda13bd31818610da42
refs/heads/main
2023-03-26T16:52:25.503565
2021-03-27T12:23:01
2021-03-27T12:23:01
312,770,304
0
0
null
null
null
null
UTF-8
Java
false
false
776
java
package com.infy.entities; public class Employee { private int id; private String name; private String jobrole; private String location; private int salary; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getLocation() { return location; } public void setLocation(String location) { this.location = location; } public String getJobrole() { return jobrole; } public void setJobrole(String jobrole) { this.jobrole = jobrole; } public int getSalary() { return salary; } public void setSalary(int salary) { this.salary = salary; } }
[ "noreply@github.com" ]
jagadeesh-cyber.noreply@github.com
560173fcdea5371f6f0737addfa2599c75bf71a1
6999db375bda29528166831b7c3a5b27892e0ef4
/yfax-htt-api/src/main/java/com/yfax/webapi/htt/dao/UserTaskDao.java
545574e6aac2e4dfc3062287fda3cfdd18a53023
[]
no_license
masterandy/yfax-parent
401ac1491baa59fc77c20e63ac259f70003535d6
8b9206eea68e2f5ff93fdfab3554a2ec7108a9de
refs/heads/master
2022-12-26T22:16:35.018046
2020-03-27T08:23:05
2020-03-27T08:23:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
426
java
package com.yfax.webapi.htt.dao; import com.yfax.webapi.htt.vo.UserTaskVo; public interface UserTaskDao { public UserTaskVo selectUserTask(UserTaskVo userTask); public boolean insertUserTask(UserTaskVo userTask) throws Exception; public boolean updateUserTask(UserTaskVo userTask) throws Exception; public UserTaskVo selectNewUserTask(UserTaskVo userTask); public UserTaskVo selectDailyUserTask(UserTaskVo userTask); }
[ "hemin_it@163.com" ]
hemin_it@163.com
24486b8b2a1904d93982f33b091d2978d1feafd4
034905705528734d4a6896c4e8238a162ceb2f88
/lib/src/com/n8cats/lib_gwt/IConverter.java
7347b3da991627f8c5f7949d9d4d4b4be08ef66b
[]
no_license
riseofcat/n8cats3
6d7abe99647e9f32a9c5b95c752bead99f29c037
0b52aa8503e161a9a8d45e96d75178123ba20808
refs/heads/master
2021-01-21T14:43:24.053256
2017-09-28T23:35:39
2017-09-28T23:35:39
95,326,726
0
0
null
null
null
null
UTF-8
Java
false
false
92
java
package com.n8cats.lib_gwt; public interface IConverter<From,To> { To convert(From obj); }
[ "avdim@mail.ru" ]
avdim@mail.ru
5851a4323f7d0d29ede35f42bb8fa2da9b48cc48
fa93c9be2923e697fb8a2066f8fb65c7718cdec7
/sources/kotlin/ranges/LongRange.java
b9a0a0bf4d2a53eef6eacc6ebe962f8c989fd849
[]
no_license
Auch-Auch/avito_source
b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b
76fdcc5b7e036c57ecc193e790b0582481768cdc
refs/heads/master
2023-05-06T01:32:43.014668
2021-05-25T10:19:22
2021-05-25T10:19:22
370,650,685
0
0
null
null
null
null
UTF-8
Java
false
false
4,583
java
package kotlin.ranges; import com.yandex.mobile.ads.video.tracking.Tracker; import kotlin.Metadata; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import t6.r.a.j; @Metadata(bv = {1, 0, 3}, d1 = {"\u00002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\t\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0004\n\u0002\u0010\u0000\n\u0002\b\u0003\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u000b\u0018\u0000 \u001b2\u00020\u00012\b\u0012\u0004\u0012\u00020\u00030\u0002:\u0001\u001bB\u0017\u0012\u0006\u0010\u0016\u001a\u00020\u0003\u0012\u0006\u0010\u0018\u001a\u00020\u0003¢\u0006\u0004\b\u0019\u0010\u001aJ\u0018\u0010\u0006\u001a\u00020\u00052\u0006\u0010\u0004\u001a\u00020\u0003H–\u0002¢\u0006\u0004\b\u0006\u0010\u0007J\u000f\u0010\b\u001a\u00020\u0005H\u0016¢\u0006\u0004\b\b\u0010\tJ\u001a\u0010\f\u001a\u00020\u00052\b\u0010\u000b\u001a\u0004\u0018\u00010\nH–\u0002¢\u0006\u0004\b\f\u0010\rJ\u000f\u0010\u000f\u001a\u00020\u000eH\u0016¢\u0006\u0004\b\u000f\u0010\u0010J\u000f\u0010\u0012\u001a\u00020\u0011H\u0016¢\u0006\u0004\b\u0012\u0010\u0013R\u0016\u0010\u0016\u001a\u00020\u00038V@\u0016X–\u0004¢\u0006\u0006\u001a\u0004\b\u0014\u0010\u0015R\u0016\u0010\u0018\u001a\u00020\u00038V@\u0016X–\u0004¢\u0006\u0006\u001a\u0004\b\u0017\u0010\u0015¨\u0006\u001c"}, d2 = {"Lkotlin/ranges/LongRange;", "Lkotlin/ranges/LongProgression;", "Lkotlin/ranges/ClosedRange;", "", "value", "", "contains", "(J)Z", "isEmpty", "()Z", "", "other", "equals", "(Ljava/lang/Object;)Z", "", "hashCode", "()I", "", "toString", "()Ljava/lang/String;", "getStart", "()Ljava/lang/Long;", Tracker.Events.CREATIVE_START, "getEndInclusive", "endInclusive", "<init>", "(JJ)V", "Companion", "kotlin-stdlib"}, k = 1, mv = {1, 4, 1}) public final class LongRange extends LongProgression implements ClosedRange<Long> { @NotNull public static final Companion Companion = new Companion(null); @NotNull public static final LongRange d = new LongRange(1, 0); @Metadata(bv = {1, 0, 3}, d1 = {"\u0000\u0010\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0002\b\u0007\b†\u0003\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0007\u0010\bR\u0019\u0010\u0003\u001a\u00020\u00028\u0006@\u0006¢\u0006\f\n\u0004\b\u0003\u0010\u0004\u001a\u0004\b\u0005\u0010\u0006¨\u0006\t"}, d2 = {"Lkotlin/ranges/LongRange$Companion;", "", "Lkotlin/ranges/LongRange;", "EMPTY", "Lkotlin/ranges/LongRange;", "getEMPTY", "()Lkotlin/ranges/LongRange;", "<init>", "()V", "kotlin-stdlib"}, k = 1, mv = {1, 4, 1}) public static final class Companion { public Companion() { } @NotNull public final LongRange getEMPTY() { return LongRange.d; } public Companion(j jVar) { } } public LongRange(long j, long j2) { super(j, j2, 1); } /* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Comparable] */ @Override // kotlin.ranges.ClosedRange public /* bridge */ /* synthetic */ boolean contains(Long l) { return contains(l.longValue()); } @Override // kotlin.ranges.LongProgression, java.lang.Object public boolean equals(@Nullable Object obj) { if (obj instanceof LongRange) { if (!isEmpty() || !((LongRange) obj).isEmpty()) { LongRange longRange = (LongRange) obj; if (!(getFirst() == longRange.getFirst() && getLast() == longRange.getLast())) { } } return true; } return false; } @Override // kotlin.ranges.LongProgression, java.lang.Object public int hashCode() { if (isEmpty()) { return -1; } return (int) ((((long) 31) * (getFirst() ^ (getFirst() >>> 32))) + (getLast() ^ (getLast() >>> 32))); } @Override // kotlin.ranges.LongProgression, kotlin.ranges.ClosedRange public boolean isEmpty() { return getFirst() > getLast(); } @Override // kotlin.ranges.LongProgression, java.lang.Object @NotNull public String toString() { return getFirst() + ".." + getLast(); } public boolean contains(long j) { return getFirst() <= j && j <= getLast(); } @Override // kotlin.ranges.ClosedRange @NotNull public Long getEndInclusive() { return Long.valueOf(getLast()); } @Override // kotlin.ranges.ClosedRange @NotNull public Long getStart() { return Long.valueOf(getFirst()); } }
[ "auchhunter@gmail.com" ]
auchhunter@gmail.com
16f2ea1316fd4b3700cfebd438dd37a73d65ace6
6903d3e6bd56fb9708e4b9b29fffd4c57f101cb9
/com/alipay/oceanbase/3rd/google/common/collect/DescendingMultiset.java
6b6c17cb0260a1bc81315d2c690f402382887e4c
[]
no_license
Qi4ngY/oceanbase-client
8d12273156ed3477ad5720052880de2640717d48
0988f778d2a00800e80d30314ac4ef99344ff70e
refs/heads/master
2022-11-18T12:58:07.105603
2020-07-20T07:52:11
2020-07-20T07:52:11
281,045,860
0
0
null
null
null
null
UTF-8
Java
false
false
3,964
java
package com.alipay.oceanbase.3rd.google.common.collect; import java.util.SortedSet; import java.util.Collection; import java.util.Iterator; import java.util.Set; import java.util.NavigableSet; import java.util.Comparator; import com.alipay.oceanbase.3rd.google.common.annotations.GwtCompatible; @GwtCompatible(emulated = true) abstract class DescendingMultiset<E> extends ForwardingMultiset<E> implements SortedMultiset<E> { private transient Comparator<? super E> comparator; private transient NavigableSet<E> elementSet; private transient Set<Multiset.Entry<E>> entrySet; abstract SortedMultiset<E> forwardMultiset(); @Override public Comparator<? super E> comparator() { final Comparator<? super E> result = this.comparator; if (result == null) { return this.comparator = Ordering.from(this.forwardMultiset().comparator()).reverse(); } return result; } @Override public NavigableSet<E> elementSet() { final NavigableSet<E> result = this.elementSet; if (result == null) { return this.elementSet = new SortedMultisets.NavigableElementSet<E>(this); } return result; } @Override public Multiset.Entry<E> pollFirstEntry() { return this.forwardMultiset().pollLastEntry(); } @Override public Multiset.Entry<E> pollLastEntry() { return this.forwardMultiset().pollFirstEntry(); } @Override public SortedMultiset<E> headMultiset(final E toElement, final BoundType boundType) { return this.forwardMultiset().tailMultiset(toElement, boundType).descendingMultiset(); } @Override public SortedMultiset<E> subMultiset(final E fromElement, final BoundType fromBoundType, final E toElement, final BoundType toBoundType) { return this.forwardMultiset().subMultiset(toElement, toBoundType, fromElement, fromBoundType).descendingMultiset(); } @Override public SortedMultiset<E> tailMultiset(final E fromElement, final BoundType boundType) { return this.forwardMultiset().headMultiset(fromElement, boundType).descendingMultiset(); } @Override protected Multiset<E> delegate() { return this.forwardMultiset(); } @Override public SortedMultiset<E> descendingMultiset() { return this.forwardMultiset(); } @Override public Multiset.Entry<E> firstEntry() { return this.forwardMultiset().lastEntry(); } @Override public Multiset.Entry<E> lastEntry() { return this.forwardMultiset().firstEntry(); } abstract Iterator<Multiset.Entry<E>> entryIterator(); @Override public Set<Multiset.Entry<E>> entrySet() { final Set<Multiset.Entry<E>> result = this.entrySet; return (result == null) ? (this.entrySet = this.createEntrySet()) : result; } Set<Multiset.Entry<E>> createEntrySet() { return (Set<Multiset.Entry<E>>)new Multisets.EntrySet<E>() { @Override Multiset<E> multiset() { return (Multiset<E>)DescendingMultiset.this; } @Override public Iterator<Multiset.Entry<E>> iterator() { return DescendingMultiset.this.entryIterator(); } @Override public int size() { return DescendingMultiset.this.forwardMultiset().entrySet().size(); } }; } @Override public Iterator<E> iterator() { return Multisets.iteratorImpl((Multiset<E>)this); } @Override public Object[] toArray() { return this.standardToArray(); } @Override public <T> T[] toArray(final T[] array) { return this.standardToArray(array); } @Override public String toString() { return this.entrySet().toString(); } }
[ "qiaoye.zqy@mybank.cn" ]
qiaoye.zqy@mybank.cn
6fcbb98f38b3a9168f7342775d594bde7ffe8579
c4d4462b69bebccf24b90cb6c7c7cb6bdb0077ee
/src/main/java/com/example/demo/service/UserService.java
379496dd23534219aa50882e6a635ad84f4127b7
[]
no_license
huytuan001/user_service
f3193cd0d6034e9ed1844c97d99a6db4782a5927
84255342da5fdbadafa30441e85056613d66e65c
refs/heads/main
2023-05-31T01:29:26.454879
2021-07-09T09:51:37
2021-07-09T09:51:37
383,006,633
0
0
null
null
null
null
UTF-8
Java
false
false
622
java
package com.example.demo.service; import com.example.demo.entity.User; import com.example.demo.model.*; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import java.math.BigInteger; public interface UserService extends CrudService<User, BigInteger> { Page<ResUserData> getAllUser(Integer status, Pageable pageable); SimpleResponse createNewUser(ReqCreateUser reqCreateUser); SimpleResponse updateUser(ReqCreateUser reqCreateUser); SimpleResponse changePass(ReqChangePassword reqChangePassword); ResUpdateNewUser getUserByUserName(String userName); }
[ "tuan.dinh@ggg.com.vn" ]
tuan.dinh@ggg.com.vn
d40d5b03c1bf103ae50f7e8b88aa42cebcdc3ab9
10341b1a40d8067f4d666b58e9539551dbc3b1d3
/第七次作业/homework7/app/src/androidTest/java/com/example/homework7/ExampleInstrumentedTest.java
781d5791ec2028dbb21e8b2c2e67dcf65b5de7e9
[]
no_license
tianrui189/zuoye1
ea644a86f8fef6a861e79241be033f8cacfa64ca
7d28014f945a5e25edd33c92c4a46e26e5be89b6
refs/heads/master
2023-01-22T12:51:14.245533
2020-11-28T05:35:14
2020-11-28T05:35:14
300,890,186
1
0
null
null
null
null
UTF-8
Java
false
false
756
java
package com.example.homework7; import android.content.Context; import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); assertEquals("com.example.homework7", appContext.getPackageName()); } }
[ "72297307+tianrui189@users.noreply.github.com" ]
72297307+tianrui189@users.noreply.github.com
6f0d91353709779ccc42c1d0b565277547c1df6d
146264bf14b90b65aecc6264666a181037727ce2
/org.loveholidays.automation/src/main/java/org/loveholidays/pageobjects/ManageSignInPage.java
a1d1a0cffc8f692bc5becf915f862a2a61a62e28
[]
no_license
krishna-automation/Loveholidays
60b2bd5ac01cb9067bce343b942d256df178f2aa
79a58b40d1f24a400f979fa5b9b1d523977fa475
refs/heads/master
2021-03-12T23:42:53.215871
2017-05-16T14:02:28
2017-05-16T14:02:28
91,463,109
0
0
null
null
null
null
UTF-8
Java
false
false
1,826
java
package org.loveholidays.pageobjects; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; import org.testng.Assert; public class ManageSignInPage extends BasePage { private By submit = By.cssSelector("button.mmb-login__form__submit__button"); private By book_ref = By.cssSelector("input#js-reference-field-with-letters"); private By surname = By.cssSelector("input[name='surname']"); public ManageSignInPage(WebDriver driver) { super(driver); } public void bookingReference(String bookref){ driver.findElement(book_ref).sendKeys(bookref); } public void surname(String sname){ driver.findElement(surname).sendKeys(sname); } public void validateReference1(){ driver.findElement(surname).sendKeys("Krishna"); driver.findElement(submit).click(); String reference_error1 = driver.findElement(By.cssSelector("input#js-reference-field-with-letters")).getAttribute("validationMessage"); Assert.assertTrue(reference_error1.contains("Your booking reference starts with LVE or LOV"),"Not an invalid booking reference - not starting with LVE/LOV"); } public void validateReference2(){ driver.findElement(submit).click(); WebDriverWait wait = new WebDriverWait(driver,7); try { wait.until(ExpectedConditions.visibilityOfElementLocated(By.cssSelector("p.error"))); String reference_error2 = driver.findElement(By.cssSelector("p.error")).getText(); Assert.assertTrue(reference_error2.contains("Sorry this is not a valid booking reference"), "Not an invalid booking reference -starting with LVE/LOV"); } catch(Exception e){ e.printStackTrace(); } } }
[ "iam_kb@rediffmail.com" ]
iam_kb@rediffmail.com
7a5fe1e17200741ccddd4e8ff0f901efe2369204
268592c417a8f6fbcfec98a8af17d7cb9f1f6cee
/debop4k-data-mongodb/src/main/kotlin/debop4k/mongodb/cache/MongoCache.java
762bb52ada077cdb9e2da243b9ab4ebfd0b35f1b
[ "Apache-2.0" ]
permissive
debop/debop4k
8a8e29e76b590e72599fb69888c2eb2e90952c10
5a621998b88b4d416f510971536abf3bf82fb2f0
refs/heads/develop
2021-06-14T22:48:58.156606
2019-08-06T15:49:34
2019-08-06T15:49:34
60,844,667
37
12
Apache-2.0
2021-04-22T17:45:14
2016-06-10T12:01:14
Kotlin
UTF-8
Java
false
false
6,055
java
///* // * Copyright (c) 2016. KESTI co, ltd // * Licensed under the Apache License, Version 2.0 (the "License"); // * you may not use this file except in compliance with the License. // * You may obtain a copy of the License at // * // * http://www.apache.org/licenses/LICENSE-2.0 // * // * Unless required by applicable law or agreed to in writing, software // * distributed under the License is distributed on an "AS IS" BASIS, // * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // * See the License for the specific language governing permissions and // * limitations under the License. // */ // //package debop4k.mongodb.cache; // //import com.mongodb.WriteResult; //import debop4k.core.asyncs.AsyncEx; //import debop4k.core.io.serializers.FstJava6Serializer; //import debop4k.core.io.serializers.Serializer; //import lombok.Getter; //import lombok.extern.slf4j.Loggingx; //import nl.komponents.kovenant.Promise; //import org.springframework.cache.Cache; //import org.springframework.cache.support.SimpleValueWrapper; //import org.springframework.data.mongodb.core.MongoTemplate; //import org.springframework.data.mongodb.core.query.Criteria; //import org.springframework.data.mongodb.core.query.Query; //import org.springframework.data.mongodb.core.query.Update; // //import java.util.concurrent.Callable; // ///** // * Spring @Cacheable 을 지원하고, MongoDB에 캐시 항목을 관리하는 클래스입니다. // * // * @author sunghyouk.bae@gmail.com // */ //@Loggingx //@Getter //@SuppressWarnings("unchecked") //public class MongoCache implements Cache { // // public static MongoCache of(String name, String prefix, MongoTemplate mongo) { // return of(name, prefix, mongo, 0, FstJava6Serializer.of()); // } // // public static MongoCache of(String name, String prefix, MongoTemplate mongo, long expiration) { // return of(name, prefix, mongo, expiration, FstJava6Serializer.of()); // } // // public static MongoCache of(String name, String prefix, MongoTemplate mongo, long expiration, Serializer serializer) { // return new MongoCache(name, prefix, mongo, expiration, serializer); // } // // private final String name; // private final String prefix; // private final MongoTemplate mongo; // private final long expirationInSeconds; // private final Serializer serializer; // // public MongoCache(String name, String prefix, MongoTemplate mongo, long expirationInSeconds, Serializer serializer) { // this.name = name; // this.prefix = prefix; // this.mongo = mongo; // this.expirationInSeconds = expirationInSeconds; // this.serializer = serializer; // } // // @Override // public Object getNativeCache() { // return mongo; // } // // @Override // public ValueWrapper get(Object key) { // Object item = this.get(key, Object.class); // return (item != null) ? new SimpleValueWrapper(item) : null; // } // // @Override // public <T> T get(final Object key, Class<T> type) { // log.trace("캐시를 로드합니다. key={}", key); // T value = null; // // try { // MongoCacheItem item = mongo.findOne(Query.query(Criteria.where("key").is(key)), MongoCacheItem.class, name); // if (item != null) { // log.trace("캐시 값 조회. item={}", item); // // boolean isNotExpired = item.getExpireAt() <= 0 || item.getExpireAt() > System.currentTimeMillis(); // if (isNotExpired) // value = serializer.deserialize(item.getValue()); // else // AsyncEx.future(new Runnable() { // @Override // public void run() { // evict(key); // } // }); // } // } catch (Exception e) { // log.warn("캐시 조회에 실패했습니다. key=" + key, e); // } // // return value; // } // // @Override // public <T> T get(Object key, Callable<T> valueLoader) { // try { // ValueWrapper wrapper = get(key); // return (wrapper == null) ? valueLoader.call() : (T) wrapper.get(); // } catch (Exception e) { // return (T) null; // } // } // // public Promise<WriteResult, Exception> putAsync(final Object key, final Object value) { // log.trace("캐시를 저장합니다. key={}", key); // // return AsyncEx.future(new Callable<WriteResult>() { // @Override // public WriteResult call() throws Exception { // Query query = Query.query(Criteria.where("key").is(key)); // Update update = Update.update("value", serializer.serialize(value)); // if (expirationInSeconds > 0) // update.set("expireAt", System.currentTimeMillis() + expirationInSeconds * 1000L); // // return mongo.upsert(query, update, name); // } // }); // } // // @Override // public void put(Object key, Object value) { // log.trace("캐시를 저장합니다. key={}", key); // // Query query = Query.query(Criteria.where("key").is(key)); // Update update = Update.update("value", serializer.serialize(value)); // if (expirationInSeconds > 0) // update.set("expireAt", System.currentTimeMillis() + expirationInSeconds * 1000L); // // mongo.upsert(query, update, name); // } // // @Override // public ValueWrapper putIfAbsent(Object key, Object value) { // ValueWrapper oldValue = get(key); // if (oldValue == null || oldValue.get() == null) { // put(key, value); // } // return oldValue; // } // // @Override // public void evict(Object key) { // log.trace("캐시를 삭제합니다. key={}", key); // // try { // Query query = Query.query(Criteria.where("key").is(key)); // mongo.remove(query, name); // } catch (Exception e) { // log.warn("캐시를 삭제하는데 실패했습니다. key=" + key, e); // } // } // // @Override // public void clear() { // log.debug("캐시 컬렉션을 삭제합니다. name={}", name); // try { // mongo.dropCollection(name); // } catch (Exception e) { // log.warn("캐시 컬렉션을 삭제하는데 실패했습니다. name=" + name, e); // } // } //}
[ "sunghyouk.bae@gmail.com" ]
sunghyouk.bae@gmail.com
25de7623d73ce2eef9b575abd996cc4801beadab
0d5c93bc2500262e0e01a926edb5d7fc377a8dca
/workWithForms/src/com/nba/forms/exceptions/FileNotJPGImageException.java
fb8b047ad6850b179bb83aa037e3dd1a83bf6e3c
[]
no_license
pashtetka/myprojects
b59d515b51fd78a1708c23c176425557d14a1de2
66692a39c3983696a0828bca86da4924f5052034
refs/heads/master
2021-01-18T18:16:31.954926
2015-08-27T10:43:44
2015-08-27T10:43:44
39,572,407
0
0
null
null
null
null
UTF-8
Java
false
false
148
java
package com.nba.forms.exceptions; public class FileNotJPGImageException extends Exception { private static final long serialVersionUID = 1L; }
[ "Aliaksandra_Sinkevich@epam.com" ]
Aliaksandra_Sinkevich@epam.com
868852e3df429f51113e8f86dc3a312260c75620
736d52af62202656e6623ffe92528d1315f9980c
/batik/badapt_classes/org/apache/batik/svggen/CachedImageHandler.java
f76c4bea49bd62844dea4c735fff20c352d53a9f
[ "Apache-2.0" ]
permissive
anthonycanino1/entbench-pi
1548ef975c7112881f053fd8930b3746d0fbf456
0fa0ae889aec3883138a547bdb8231e669c6eda1
refs/heads/master
2020-02-26T14:32:23.975709
2016-08-15T17:37:47
2016-08-15T17:37:47
65,744,715
0
2
null
null
null
null
UTF-8
Java
false
false
15,856
java
package org.apache.batik.svggen; public interface CachedImageHandler extends org.apache.batik.svggen.GenericImageHandler { org.apache.batik.svggen.ImageCacher getImageCacher(); java.lang.String jlc$CompilerVersion$jl7 = "2.7.0"; long jlc$SourceLastModified$jl7 = 1471028785000L; java.lang.String jlc$ClassType$jl7 = ("H4sIAAAAAAAAALVXe2wcRxmfu/M7fiexQxI7LyciTrhTBUUqDqGxa9cXzo5l" + "JxXYJJe53bm7jfd2N7Oz9tkFVCohwj9VFFJakOq/XFWgUipEBUi0CkKircpD" + "LRFQUAsS//CKaIQEf4TX983s3u6tfeIvTrq5uZlvvvf3/Waev0OaXU6GmSXS" + "Ys1hbnrSEnOUu0yfMKnrnoe1vPZUiv7t0h9mH0iSlkXSXabujEZdNmUwU3cX" + "yZBhuYJaGnNnGdPxxBxnLuMrVBi2tUh2G2624piGZogZW2dI8AjlOdJHheBG" + "wRMs6zMQZCgHmmSkJpkz8e2xHOnUbGctJN8TIZ+I7CBlJZTlCtKbu0JXaMYT" + "hpnJGa4Yq3JywrHNtZJpizSrivQV837fBWdz929xweEXe/5+73q5V7pgJ7Us" + "W0jz3Hnm2uYK03OkJ1ydNFnFvUo+S1I5siNCLMhILhCaAaEZEBpYG1KB9l3M" + "8ioTtjRHBJxaHA0VEuRQPROHclrx2cxJnYFDm/Btl4fB2oM1a5WVW0x88kTm" + "5lOXer+VIj2LpMewFlAdDZQQIGQRHMoqBcbdM7rO9EXSZ0GwFxg3qGms+5Hu" + "d42SRYUH4Q/cgouew7iUGfoK4gi2cU8TNq+ZV5QJ5f9rLpq0BLYOhLYqC6dw" + "HQzsMEAxXqSQd/6RpmXD0gU5ED9Rs3Hk40AAR1srTJTtmqgmi8IC6VcpYlKr" + "lFmA1LNKQNpsQwJyQfY2ZIq+dqi2TEssjxkZo5tTW0DVLh2BRwTZHSeTnCBK" + "e2NRisTnzuypJx61pq0kSYDOOtNM1H8HHBqOHZpnRcYZ1IE62Dma+zIdePla" + "khAg3h0jVjTf+fTdB08O33pN0ezbhuZc4QrTRF7bLHS/uX/i+AMpVKPNsV0D" + "g19nuayyOX9nrOpAhxmoccTNdLB5a/5Hn3zs6+zPSdKRJS2abXoVyKM+za44" + "hsn4w8xinAqmZ0k7s/QJuZ8lrTDPGRZTq+eKRZeJLGky5VKLLf+Di4rAAl3U" + "AXPDKtrB3KGiLOdVhxDSCl+SgO9Roj5DOAhyMVO2KyxDNWoZlp2Z4zba72ag" + "4xTAt+VMAbJ+OePaHocUzNi8lKGQB2UWbKyUSszKTOCSnq1ADkxTSwej0phm" + "zv9bQBUt3LmaSIDz98dL34SqmbZNnfG8dtMbn7z7Qv4NlVZYCr5vBBkFmWkl" + "My1lppXM9FaZJJGQonahbBVjiNAy1Do0287jCxfPXr52OAXJ5aw2oX+rsvj2" + "BX/gYExHWeYfXXCe+dVP//jBJEmGHaEn0soXmBiLZCHy7Jf51hfqcZ4zBnTv" + "PD33pSfvfGFJKgEUR7YTOILjBGQftFRoTZ9/7erbv31383aypnhKQBv2CoBm" + "grTRAvQwqglB2mvNSBm26z/wScD33/hFG3FBJVb/hJ/dB2vp7TgRdyTkfI8g" + "Jxq5X54ztKj/0YVDjXqH7Hubj9/c0M89e5+q8P76epwEuPnGL/714/TTv3t9" + "m0RoF7bzAZOtMLNOTxBZd3GYkW01AOG89k73jd9/b6Q0niRNOdIPjvKoiVeA" + "M7wE4KIt+/23swC3iRDUD0ZAHW8j3NaYDpjSCNx9Lm32CuO4LsiuCIfgyoHN" + "dbQx4MdVf/XxP+09f7p8WWZeFMJRWjOgD56cQ+CtAeyBmPvjLL828/zrDx/T" + "biQl5mD/3gar6g+NRQMBQjkDcLXQHFzpAqGH46Ud91ZeGz1IX8q//JkRGYV2" + "AF5BoVECpg3HhdfhxlhQcSiqDZxQtHmFmrgVuLxDlLm9Gq7IntOnCgASpBfz" + "fRi+R/zOKn9xd8DBcVD1KEk/LMdDOIzI7Eri9CgOxyTZ+yHbjoVFDVBgQrfE" + "iIxcsCDsRtGgBZNhu/lnz9H7XvrLE70qkU1YCUJ08n8zCNffN04ee+PSP4Yl" + "m4SGV5Gw8YRkCt92hpzPcE7XUI/q594a+sqr9BlASkAn11hnEnCI3/RQqQlp" + "9mk5jsf2JnH4iCDdJUA3LHXZdXnQHY406g5RWk5GGuR85L6Z167ffq/rkfde" + "uStNrb+wRrvtDHXGVIxxGMOeMxjv99PULQPdh27NfqrXvHUPOC4CRw0QzD3H" + "AXCqdb3Zp25u/fUPfjhw+c0USU6RDtOm+hTFqyEAPKQYc8uAVVXnYw+qNFpt" + "C5KrSrZ4bssCRufA9nGfrDhCRmr9u4PfPvXcxruyzztV7NFbEA757Nlyh1b3" + "Pu2FjZ62wY0Lv5Q1VrubdUJXKnqmGSnhaDm3OJwVDenQTuVWR/5cEGSwQXAB" + "fdREmnle0X8CnjdxekGa5W+UbkmQjpAOWKlJlOSSICkgwWkeHJGoR2n8k8Vh" + "t5rnGkYkAuxH6hJQvlWCBump10pe++bG2dlH7374WYXz8MpZX5d3W7iqq65T" + "a7KHGnILeLVMH7/X/WL70aRfRn1K4bDV7IvU2DzAmIOR3RurX3ekVsZvb556" + "5SfXWt6CVF4iCSrIzqXIS0Fdi6EJeICGS7kQDyNvXdlYxo5/de30yeJffyOT" + "zMfP/Y3p89rt5y7+/MaeTWhAO7KkGSCcVRfh2eM+tGbNM22FL5Iuw52sgorA" + "Bd5hWdLmWcZVj2XhhdWNSUjxFSP94ruzq7aKQCHI4S3PlW3QFgpylfFx27N0" + "CTvQIsKVukdUgFOe48QOhCu1UO7aantee+iLPd+/3p+agkKqMyfKvtX1CjUM" + "jL6rFCji2Csho6ouXKl8bsZxggtYx8/825ataHBdkMSov4qtI6HuN/iXS3ZX" + "5RQH8V9Rea7JMhEAAA=="); java.lang.String jlc$CompilerVersion$jl5 = "2.7.0"; long jlc$SourceLastModified$jl5 = 1471028785000L; java.lang.String jlc$ClassType$jl5 = ("H4sIAAAAAAAAALU5e8zrVn2+331fSu9tgbYrtKXtLVob+JzYcZzoAsN2EjuO" + "E8d24jje4NbxI3biV/xInEAnVmmjGhJDW9mYBP0LtA2Vh6ahTZqYOk0bINAk" + "JrSXNoqmSXuwavSPPTS2sWPne93v9lLxxyL55OSc3/t1fH558RXofBxBpTBw" + "NzM3SPbNLNmfu9h+sgnNeJ/lsIEWxaZBuVocD8HaTf2xL1399x983L62B11Q" + "oTdpvh8kWuIEfiyaceCuTIODrh6vtlzTixPoGjfXVhqcJo4Lc06c3OCgN5xA" + "TaDr3KEIMBABBiLAhQgwcQwFkN5o+qlH5Rian8RL6GehMxx0IdRz8RLo0VuJ" + "hFqkeQdkBoUGgMKl/LcMlCqQswh6+5HuO51vU/gTJfj5X/vAtd8+C11VoauO" + "L+Xi6ECIBDBRobs805uaUUwYhmmo0D2+aRqSGTma62wLuVXo3tiZ+VqSRuaR" + "kfLFNDSjguex5e7Sc92iVE+C6Eg9yzFd4/DXecvVZkDX+4513WnYzteBglcc" + "IFhkabp5iHJu4fhGAj1yGuNIx+tdAABQL3pmYgdHrM75GliA7t35ztX8GSwl" + "kePPAOj5IAVcEujBOxLNbR1q+kKbmTcT6IHTcIPdFoC6XBgiR0mgt5wGKygB" + "Lz14yksn/PNK/90f+6DP+HuFzIapu7n8lwDSw6eQRNMyI9PXzR3iXU9xv6rd" + "95Xn9iAIAL/lFPAO5nc/9Or73vnwS1/bwbz1NWD46dzUk5v6Z6Z3f+tt1JON" + "s7kYl8IgdnLn36J5Ef6Dg50bWQgy774jivnm/uHmS+KfTD78OfN7e9CVDnRB" + "D9zUA3F0jx54oeOaEW36ZqQlptGBLpu+QRX7HegimHOOb+5WecuKzaQDnXOL" + "pQtB8RuYyAIkchNdBHPHt4LDeagldjHPQgiCLoIHOgOeJ6Dd56F8SKD3w3bg" + "mbCma77jB/AgCnL9Y9j0kymwrQ1PQdQv4DhIIxCCcBDNYA3EgW0ebqxmM9OH" + "qXzJ6HggBhjNN4BS+3mYhf/fDLJcw2vrM2eA8d92OvVdkDVM4BpmdFN/PiVb" + "r37h5jf2jlLhwDYJ9BTgub/juV/w3N/x3L+dJ3TmTMHqzTnvnY+BhxYg10EV" + "vOtJ6f3s0889dhYEV7g+l9s3K5LvgeLHWYD35J0rczsvC52iFOogUh/4L96d" + "Pvt3/1nIe7K45gT3XiMbTuGr8IufepB67/cK/MugDiUaiBuQ4g+fzslb0ihP" + "ztN2BOX1mC7yOe/f9h678Md70EUVuqYf1G5Zc1NTMkH9vOLEhwUd1Pdb9m+t" + "PbtEu3GQ4wn0ttNynWB747BQ5sqfP+k/MM+h8/mVIhbuLmDu+SH4nAHP/+ZP" + "7ol8YRfx91IHaff2o7wLw+zMmQQ6j+zj++Uc/9Hcx6cNnAvwHin89F/+6T+h" + "e9DecfG+euI4BEa4caJg5MSuFqXhnuOQGUZmbqy//eTgVz7xykd+uogXAPH4" + "azG8no+5xOD0A6fIz39t+Vcvf+cz3947irGzCTgx06nr6GASF4cZ0MRyfM0t" + "DPJYAt0/d/Xrh1rL4HADgl2fu3hhqreA47wQLffK/u5EKJIKSHT9DuF64hS/" + "qX/8299/o/z9P3j1tki91TA9Lbyx81AhVQbI3386ixgttgFc9aX+z1xzX/oB" + "oKgCijqoCzEfgTTObjHjAfT5i3/9h39039PfOgvttaErbqAZbS0/cEHZTGxw" + "RtugAmThT71vV/bWl8BwrchNqND/rTtxirS++9gQXAAOxo/+/ce/+UuPvwzk" + "YKHzqzyGgQQnrNVP83eFX3jxEw+94fnvfrTwCSiy8oef+Nei8tYLBk8U40/m" + "Q2nnsXz6znx4Vz7sH7rpwdxNUlEHOS1OeoHhgHcFo/DUjywdg8jxQLStDg5C" + "+Jl7X1586h8/vzvkTteJU8Dmc8//4g/3P/b83olXi8dvO91P4uxeLwqh33jk" + "ykd/FJcCo/0PX3zm93/zmY/spLr31oOyBd4DP//n//PN/U9+9+uvUaHPucFh" + "UOYjcsA2/8Je37HJlb9hqnGHOPxwsmIia13MPCuFeziwcSZkHZzb6M4wsofk" + "aLRsLulMa+jKNsBcNlMmLGti6NTD55aB9HF+20gWbZkK7PW8IbfbrLbgl7DS" + "Hs9GTtgiR06ZWnSdSA+bnNgWRkQswTDV1TpCy6oOlUYdjdG0llhmZzWMlliq" + "uqvVykLhsWauyrymjGq0JynSJK7YUz+SWj4/Sssbq9f1Iz8wK6uBOnJWeFK2" + "Gx5TdiR3oUiKNk3nLdXoe6P1CNWVjUra6YTVaL/v08Ygy8jM59JeJJMOkoxs" + "hEZqSDV0aDWYqWPE6NSJucsbLGObJL0We3Ft2xNUasZ4nrRgw8W2biIZw/uj" + "Ka0nbL8+7KilDk6RLqsOXSrpTtMyq2i9ydAOfZbWqpMlym7WEdNPVDZ0tlLk" + "rAS5juIWOTa2DaSRrc2WYsJYCUeXmIyHMxYfxePyfIsyvoekk24Z5RdsZWP0" + "2357NQpKUqWDxU6f4np2h7MpjdBaaosMJ3SlSzZctFd3gmEyFxmSzTSGKMut" + "VBQGIs/obpQhesb6k3bTg8nErVokEvQqGjaWx+WsXl8MPczlFTMqyZ05woU9" + "c912CaOpCkKHFkSmFyxJfWr08IhvtBRJLdPrdjZDl7QXlzAmNaqIJE5GTFWA" + "9VmQmmvcGdFW0K3OHEQf1Yf9ZUmVMYHFrEbEhcsyyU14m5ssqZqxZoRt3GsR" + "mbKUBAOuiaGnNMuzEdZqNsQYZRbVMkGIlTgassPEW848p96harIeTtxu5LY9" + "osL1u0I/jIU1uxGsCaJ2liVj6SDDVhzPs4UaYMlwXG7KnI2Q4nqoMpI59Cmy" + "ayJ90YmH/jbdhGxWqwCxFtKkyfNJv1dh6gxDLnlGDX1Rn6iVTquGND2ttO0Y" + "JnifWtjEDLXLc3k+tErW0CDLdR5Fw37Z3E7tVNWrQjQU2/iUYyQ4VWCnRPRC" + "uTvox3K5Oas0/FTbbHil4Ud8SNiZF+j6sG9wJKbBGOOj27hW2g4koyuyEqJN" + "lUDedHulrVat2rFfXdczxyeWnlpe4DEssKlad6Nhc0CL6nBZMruiarIcvdhg" + "cpfjrFLTqUYE4aIjQhk0u0lEol3a4XhDtrOmRLklacY3xGCONXnC3vRkHulu" + "smZ/HKhuiKjV7VTDEW1WzYZEUpJ7xJQt8eZAYwJ9tO07dbdLCyQyGk+7m5EU" + "b7tDnpL8ZYVoLrKhtDbn5dD2tqvGVCBHCcp5mtRpbht1g0Or0tKbqn3foutG" + "0pv6+BYXVtW+K6sTKsJWJLloe+OF29tU3DBUeo22prIsLQS+Zk9Jee70iU2l" + "GZSROj6nMmugRBjCEwqLaWskUEpRvJojpALPJq2MGZsTS1Eos2TIAxiek2zL" + "oxmt5ZfjQPFIh1MpZoOzFlaxraUONCb94WrQBN6UrJVFt9nurDUS8cmQ73Bz" + "khaspC0GQ7UB42Y0XaEVtI5qm9C3uwK5QqiA9GbA9cRKWC9nLol4q75Eekht" + "C68lHRCF7TaNtklWnsI2Cxsksgrx4Uw0NsOF1anP2GyJKVh1m3TncHkiN+fK" + "ksGZdDpvwHq5V2+YWGlZH+A1M1y30oFPczBeqcLD4QpNGl5ZDEDIbQmVT3pc" + "nx9mpGqg9GQxLlcInq43Fjg6NxrwtCaUfUfs80ZnMF91A0c2iR6+blW7naQE" + "I2i8plBHbI6aZZVgxvU52tcmzXAuUf2swXkoQqV8lYudlOpYs03A9I2pkFV7" + "hmzBSjYolRsWHtbHY9Vs91hxPOdnTaymCyUqIcwN6Q1Wc46rI3V4GzUzeDh1" + "BBfzmjA606LarNQXhR4pzBdNnVMEpr0NiSXNVGsjo1FRTXpb6Sj1JQyzC5Ge" + "yAjRxshAblHhDGVsw7Iz1xZ0yVk21UxIGK/tRTM55bKmy3kNeol3/IT3qRkh" + "haS1tUSnJMJbvus3MqPeJHW5Wem2FjDXM5p8Z9vBW5HToGZ8thmqpQ0znQdy" + "uymTMyGyWk4n02OqGYsJPSPVvp3Crr9tMLiyirgWXl4uRpUJNWLLdb++pfqW" + "1S9XTbM0kAbVietVJVrG6HV9Ii6opIHY4Xagt3Bl1IGXWKOqleJl1CBdQloQ" + "fqVi+y2f6qCwKCwFN2x4C2weWwjrM1WHahrsiEA5RlENxReYSbVcm2HieIHR" + "dCrWMa6mVmq4ZS3haGEZZiol/WhaWovRKmkyCi13sozu8WYvm68ajcGIEwaG" + "jeB9axkpK2Y04KkqJa7LwraJMoRCLY0pqoYIlsLWaGDN7XVJL4+kUU1sJrxX" + "soft5aZFDLrCRK+nhCwr/mRdWvbbYUJh3UiK1Oo0jikxtYiGT1tR06ZEL2qk" + "1YE1WCl6FqWb7TaR8X572iJwDO+7G7syRQcp0p6rNWQ9KXMrTKjIUTo1RqzS" + "9ZceLfm21vRQnl3LTdMXhqk8FmFMb9HSWlAI0jLElue7ZlmpU/7cyMwFDY66" + "0mi68IR5SPDjrsu6vCR1qMVsPV6YDEsHIuLXF3XZTrDIpxeTBZFmTM1mhZU7" + "psjUCyvl0CyVpjRiuAyO4tXxRNnWe6GqYAY6xp3lsoYNNbzL0H6HMzm5x+Cw" + "Ao85vKyJluhXutVpU8Y7qxHS3BJehxdRMY0U1FzIsbqaYlgNkyxlnNQouQ3c" + "K0Wd7VLpSOW24dRarNmhaAlfCM1Nf6UY7iQLMNgw0fLGZC1rww+3PWsAT9Cw" + "3ogSbIOXwC3DHI5tgse7C1qidFm0bMTslRJ62u8hSJvDOukaQ+JZEBGkgdlj" + "g/PGuirPEcW2jXFfGs2ztjRoVKN0u8S1rkAxnaqEDtwxKrRn4ca12hkIlzI1" + "XAmduCunC2M0a/NmtS7wNpVWRjyugesuiHuHGxglGA1L2mzRXfY2VneVKBVq" + "PurNuVrUpuYOQoGrSS1Ila5bn8ZqNpslk6wO1xFMSzSGNBY9KVhVl0mnxqR9" + "2FEkFJhcFJi63BBNDWd7dgu8zL7nPflrbufHu2ncU1wIj/qF4IKRb5R/jDfs" + "7EcxTKBL2jROInANS6DLRw3MHfcTHZEzhxfQ0p06MMUN3dFPtmDy28ZDd2of" + "FjeNzzz7/AsG/9lKftPIGTSBEEkQvss1V6Z7C/sIeurOt6pe0T097nx89dl/" + "fnD4Xvvp4up/W0eGg67kmIO8SX3UjH7klJynSf5W78Wv0+/Qf3kPOnvUB7mt" + "r3sr0o1bux9XIjNJI3941AOJoMduu4oFummkkXnM96m3a1+++ZVnru9B5042" + "h3IKD51qtbzBCiJPc3MGh43kK+BaHayPV072XQ4j5GHwPH7QaSy+8903hfn4" + "5uw4zm4LoL2jiBUPwiWC3nF85acC1zX1wurXR75X3JC1qWvm7bf/vvpE5cv/" + "8rFru/ujC1YO3fDO1ydwvP4TJPThb3zgPx4uyJzR89b8cRPjGGzX733TMWUi" + "irRNLkf2c3/20K9/Vfv0WehMBzoXO1uzaMBCBx3BXCi7UFsvxtmpvXk+3Eyg" + "u2dmUsR90YWMDlPl8TulymnYIoWffr1L8knuWd4bu63lmav5wG1/quz+CNC/" + "8MLVS/e/MPqLIpCOmvWXOeiSlbruyS7difmFMDItp1D28i52wuIrTqD776Bd" + "3toqJoXQ0Q5+lUDXTsMn0Pni+yTcJoGuHMMBUrvJSZAPJdBZAJJPn8mbgSeq" + "xEGpK8x57+uZ8wjlZDcvryzFn1eHVSDd/X11U//iC2z/g6/WPrvrJuqutt0W" + "f3Zw0MVd2h1VkkfvSO2Q1gXmyR/c/aXLTxxWvbt3Ah/n2gnZHnnthGh5YVKE" + "8Pb37v+dd//GC98pOlr/B5WV42RVHAAA"); }
[ "anthony.canino1@gmail.com" ]
anthony.canino1@gmail.com
0f0d3eb4b78d5d18cce17845ad81e0733ef5b569
e0b732abdea07aa5de1b5e0ec3c23e832068688a
/firstProject/src/com/yedam/classes/Address.java
82fddc831a6a750230f6c06fc29129b8016e9cb5
[]
no_license
awfawf123/firstProject
eb87a8a9052d1b385cfaba4a10512acd76185139
b0a6a92f6441a70c989127328d5e28c1fab81b4a
refs/heads/master
2022-12-04T01:22:05.908998
2020-08-27T05:02:05
2020-08-27T05:02:05
286,663,634
0
0
null
null
null
null
UTF-8
Java
false
false
974
java
package com.yedam.classes; import java.util.Scanner; public class Address { public static void main(String[] args) { boolean run = true; String name; int age; String pnum; String[] f1 = null; Scanner scn = new Scanner(System.in); while (run) { System.out.println("1.정보입력 2.리스트 9. 종료"); System.out.print("선택 : "); int selectN = scn.nextInt(); scn.nextLine(); for (int i = 0; i < 3; i++) { if (selectN == 1) { System.out.println("정보를 입력하세요 "); System.out.println("이름 입력"); name = scn.nextLine(); System.out.println("나이 입력"); age = scn.nextInt(); scn.nextLine(); System.out.println("번호입력"); pnum = scn.nextLine(); //Address (name, age, pnum); } else if (selectN == 2) { } else if (selectN == 9) { run = false; } } System.out.println("끝"); } } }
[ "awfawf123@naver.com" ]
awfawf123@naver.com
587e16afd7ee468b67dfe2249c6729c37f5d0538
5af2adc011502514777fc83689d439e4c7f6dbbd
/src/com/coolweather/util/HttpCallbackListener.java
3f54713719cd4f7f54af984a22ad631da4fcd9d5
[ "Apache-2.0" ]
permissive
chenyongxi/coolweather
9341bc6eab15f1bed036c47f6ac60187edf53857
3cae162458857bac7ebfd905745416ad4f447bdd
refs/heads/master
2021-01-22T19:21:40.935135
2014-11-27T07:43:39
2014-11-27T07:43:39
27,154,730
0
0
null
null
null
null
UTF-8
Java
false
false
134
java
package com.coolweather.util; public interface HttpCallbackListener { void onFinish(String response); void onError(Exception e); }
[ "1004018139@qq.com" ]
1004018139@qq.com
7fb8c4ab1b7d240fc88c0937e48a09dffa8ab961
7514a058c1014b70ce4a536bd884cf120e33d1e0
/order/src/main/java/mall/OrderCancelled.java
683c8e9e9771446b08b3473e62ed19b7c93a9953
[]
no_license
gbini00/mall
e197b8bfe281c6a33d918de03364f2967f073e97
8abf439166a20cb93aa7eb30c2d8b8f61e82c40c
refs/heads/main
2023-04-26T05:08:29.040464
2021-05-25T08:29:25
2021-05-25T08:29:25
366,085,684
0
0
null
null
null
null
UTF-8
Java
false
false
765
java
package mall; public class OrderCancelled extends AbstractEvent { private Long id; private String productId; private Integer qty; private String status; public OrderCancelled(){ super(); } public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getProductId() { return productId; } public void setProductId(String productId) { this.productId = productId; } public Integer getQty() { return qty; } public void setQty(Integer qty) { this.qty = qty; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } }
[ "gbini00@naver.com" ]
gbini00@naver.com
19d787ad055961677bd310d8918466bc93976ed1
ca85b4da3635bcbea482196e5445bd47c9ef956f
/iexhub/src/main/java/PIXManager/org/hl7/v3/LotionDrugForm.java
2f6add266ad07154d366ba261796287289007589
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
bhits/iexhub-generated
c89a3a9bd127140f56898d503bc0c924d0398798
e53080ae15f0c57c8111a54d562101d578d6c777
refs/heads/master
2021-01-09T05:59:38.023779
2017-02-01T13:30:19
2017-02-01T13:30:19
80,863,998
0
1
null
null
null
null
UTF-8
Java
false
false
1,716
java
/******************************************************************************* * Copyright (c) 2015, 2016 Substance Abuse and Mental Health Services Administration (SAMHSA) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Contributors: * Eversolve, LLC - initial IExHub implementation for Health Information Exchange (HIE) integration * Anthony Sute, Ioana Singureanu *******************************************************************************/ package PIXManager.org.hl7.v3; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for LotionDrugForm. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="LotionDrugForm"> * &lt;restriction base="{urn:hl7-org:v3}cs"> * &lt;enumeration value="LTN"/> * &lt;enumeration value="TOPLTN"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "LotionDrugForm") @XmlEnum public enum LotionDrugForm { LTN, TOPLTN; public String value() { return name(); } public static LotionDrugForm fromValue(String v) { return valueOf(v); } }
[ "michael.hadjiosif@feisystems.com" ]
michael.hadjiosif@feisystems.com
dc9619f2343e3338a92d47cee5b8e6009a722e30
a2cb452bb2b69a868970471e5ed39c5c4a36f19f
/app/src/test/java/com/example/lookuptothemoon/simpletodo/ExampleUnitTest.java
63a36aba93171afa6a3674132a8666a5a9493011
[ "Apache-2.0" ]
permissive
Lookuptothemoon/SimpleTodo
8158772847b37eb5f9fc092d08cba5994fd286bb
850cc48bc3201abdd133db3d7ba68e25df95390b
refs/heads/master
2020-04-08T14:21:26.085369
2018-11-28T03:21:06
2018-11-28T03:21:06
159,433,416
0
0
null
null
null
null
UTF-8
Java
false
false
399
java
package com.example.lookuptothemoon.simpletodo; import org.junit.Test; import static org.junit.Assert.*; /** * Example local unit test, which will execute on the development machine (host). * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ public class ExampleUnitTest { @Test public void addition_isCorrect() { assertEquals(4, 2 + 2); } }
[ "luna.e.ruiz@gmail.com" ]
luna.e.ruiz@gmail.com
30ac4e793f58fddd09f544259ec59becb94c8c2c
f791c04a386b5190d8bb1deaa3352bc3c115d791
/domain/src/main/java/com/lastminute/test/domain/impl/package-info.java
6fd660977d12f7362c900f3f337debf76c764900
[]
no_license
nicoloconte/sale-taxes
978bdd5c23532db892d9ff3873e6b2ba5cec7198
f9a11c4afd30e852262321c5d99220fdeba83e0b
refs/heads/master
2021-01-10T06:25:11.439510
2016-04-11T06:19:02
2016-04-11T06:19:02
55,871,552
0
0
null
null
null
null
UTF-8
Java
false
false
81
java
/** * */ /** * @author nconte * */ package com.lastminute.test.domain.impl;
[ "nicoloconte@gmail.com" ]
nicoloconte@gmail.com
ce519be12e7821fbd45ac58cc5ad6533603d6027
6185225201723db09644a63468c805a4693a150d
/template-domain/src/main/java/br/com/template/domain/Tempo.java
8264710ab51225bbb8100876f505a0067577af3d
[]
no_license
pedroaugustogti/template
7838e1c762cc3ea0bc1b3575930ef4819ba18f93
6ce62847d70cfc02ff74b687d6fc8aae2005a2a7
refs/heads/HEAD
2021-01-17T08:07:11.002624
2016-06-21T19:17:37
2016-06-21T19:17:37
31,964,062
0
0
null
2016-06-21T19:17:37
2015-03-10T15:07:08
Java
UTF-8
Java
false
false
807
java
package br.com.template.domain; import java.math.BigInteger; public enum Tempo { HORA(23), MINUTO(59), SEGUNDO(59); private int tempoMaximo; private Tempo(int tempoMaximo){ this.tempoMaximo = tempoMaximo; } public int getTempoMaximo() { return tempoMaximo; } public int getTempoMinimo() { return BigInteger.ZERO.intValue(); } public int getTempoMaximoMilisegundos(){ int tempoMaximo = 0; int segundo = 1000; int minuto = segundo * 60; int hora = minuto * 60; for (Tempo tempo : values()){ if (tempo.equals(HORA)){ tempoMaximo = hora; }else if (tempo.equals(MINUTO)){ tempoMaximo = minuto; }else if (tempo.equals(SEGUNDO)){ tempoMaximo = segundo; } } return tempoMaximo; } }
[ "pedroaugusto.gti@gmail.com" ]
pedroaugusto.gti@gmail.com
412d0e8c5d8c82630f12a84f5bb05f76cad058bb
77eb754288ca600c847f272a9148b741e25ccec0
/ExerciciosAula/exercicio2/CaixaRegistradoraTester.java
df7bd9c6790bc99717e174a1a8a415472e98c164
[]
no_license
edwardklovan/fundamentosDeProgramacao
1dea92a4a1eee4bb809fd311157cd356289d41e3
49defbc7e8d9acc5098415d127b07d87153b5ba6
refs/heads/master
2021-01-21T04:40:46.138610
2016-06-13T20:02:11
2016-06-13T20:02:11
54,227,611
0
0
null
null
null
null
UTF-8
Java
false
false
855
java
public class CaixaRegistradoraTester { /** * @param args */ public static void main(String[] args) { CaixaRegistradora caixa = new CaixaRegistradora(); // adiciona tres itens caixa.addItem(1.99); caixa.addItem(2.99); caixa.addItem(1.50); System.out.println(caixa.getTotal()); System.out.println("Esperado: 6.48"); System.out.println(caixa.getNumItens()); System.out.println("Esperado: 3"); //imprime contaudo da caixa caixa.imprimeItens(); System.out.println("Esperado: "); System.out.println("Item 1: 1.99"); System.out.println("Item 2: 2.99"); System.out.println("Item 3: 1.50"); //limpa caixa.limpa(); System.out.println(caixa.getTotal()); System.out.println("Esperado: 0"); System.out.println(caixa.getNumItens()); System.out.println("Esperado: 0"); } }
[ "github@kln.me" ]
github@kln.me
eb1b78aa63d58ecd192bbcf4d57710fad2a577a1
1248af86bdf035a4ffff7d1c9514ca47834953a2
/game/src/game/base/service/event/Event.java
53e36fb77611cd44ea66b08c4afec8c172c076a3
[]
no_license
1F24DCA/game
08db8ec95b6fe5a77b35bc5ef1467eb0704e5b42
99849ad957e6ab06bf4dec641dfcb554b337ac89
refs/heads/main
2023-01-09T07:23:43.962193
2020-10-30T13:31:09
2020-10-30T13:31:09
308,383,004
0
0
null
null
null
null
UTF-8
Java
false
false
444
java
package game.base.service.event; import game.base.common.Generator; // Event 타입을 체크하는 용도로 사용하는 빈껍데기 클래스 // 하지만 toString() 메서드 호출 시 구현한 클래스의 모든 멤버변수를 표시하기 위해 Generator를 사용해 toString()을 오버라이드함 public abstract class Event { @Override public String toString() { return Generator.generateToString(this); } }
[ "fstflr446712@gmail.com" ]
fstflr446712@gmail.com
a3a1aebdfe9a29cf161eaf82db9e215d8d1b3854
3c483bd1d00df02d94f32ddd9cb068630dec9823
/Spring/Factory-Design-Pattern/src/main/java/sk/hopvinna/factory/FactoryPatternApplication.java
1364f5caa7b0eaaced11e0f59ba5fd3345a27e4f
[]
no_license
imsk003/DesignPattern
0c8baef0a3731fdb3a71853cb2dee4dfad10fde0
d80216eaadd25ae837454d3b06ff7f90d00e9c3e
refs/heads/master
2020-05-24T10:37:54.123721
2019-05-21T12:09:46
2019-05-21T12:09:46
187,231,031
0
0
null
null
null
null
UTF-8
Java
false
false
329
java
package sk.hopvinna.factory; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class FactoryPatternApplication { public static void main(String[] args) { SpringApplication.run(FactoryPatternApplication.class, args); } }
[ "selvamailz@gmail.com" ]
selvamailz@gmail.com
a5de456bcb9e9de5501a6a73700efe1129b36994
83162f3fcbd51c7451ed452ee01345e465a06998
/app/src/main/java/com/hu/tyler/soundboard/MainActivity.java
08bc7d7ac9da54ec9949bd525f94259446d72787
[]
no_license
tylerhu3/PredatorSoundBoard
33a030ceda1d7410a521bb4593f87121ff8e02de
2c3dce6532814241bc4243c2425872442375ccd4
refs/heads/master
2021-05-14T18:38:05.771450
2018-01-08T08:32:08
2018-01-08T08:32:08
116,081,973
0
0
null
null
null
null
UTF-8
Java
false
false
6,940
java
package com.hu.tyler.soundboard; /* * This is a simple soundboard of consisting of some famous lines from the 1987 Predator Movie * It's mainly a test project to get use to using sounds. From my youtube research MediaPlayer seeems * to be the easiest way to play sounds or movies, so I'm going with that MediaPlayer but another * option is SoundPool but I heard it crashed on some devices running 4.4, namely LG and some Xperia * so MediaPlayer does seem idea. * * The implementation for this project is quite simple, create buttons for each sound and have each * button be set on a Click Listener and then goes to the onClickMethod to execute a sound play. * Each sound has it's own media player, I contemplated have a single MediaPlayer and then creating * an instance each time a onClick occurs but because there isn't too many sounds for this project, * I left it with just 8 MediaPlayers, perhaps more in the future. */ import android.content.res.AssetFileDescriptor; import android.media.MediaPlayer; import android.support.v4.app.FragmentActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.Toast; public class MainActivity extends FragmentActivity implements View.OnClickListener { //The below is probably bad programming practice, in the future I'll go with just making one //MediaPlayer and reuse it over and over, because it seems to be a waste of RAM rn. MediaPlayer predator = null; MediaPlayer sob = null; MediaPlayer faggots = null; MediaPlayer choppa = null; MediaPlayer ugly = null; MediaPlayer notime = null; MediaPlayer killit = null; MediaPlayer cia = null; MediaPlayer pLaugh = null; MediaPlayer howling = null; MediaPlayer vision = null; MediaPlayer predRepeat = null; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); //Set a reference to each button. Button pButton = findViewById(R.id.predButton); Button sobButton = findViewById(R.id.sobButton); Button fagButton = findViewById(R.id.faggotsButton); Button choppaButton = findViewById(R.id.choppaButton); Button uglyButton = findViewById(R.id.uglyButton); Button notimeButton = findViewById(R.id.nobleedsbutton); Button killButton = findViewById(R.id.bleedButton); Button ciaButton = findViewById(R.id.ciaButton); Button pLaughButton = findViewById(R.id.predatorLaughButton); Button predatorHowl = findViewById(R.id.predatorHowlingButton); Button predatorVisionButton = findViewById(R.id.predatorVisionButton); Button predRepeatButton = findViewById(R.id.predXButton); //Set a click listener to all the buttons predRepeatButton.setOnClickListener(this); predatorVisionButton.setOnClickListener(this); predatorHowl.setOnClickListener(this); pLaughButton.setOnClickListener(this); ciaButton.setOnClickListener(this); pButton.setOnClickListener(this); sobButton.setOnClickListener(this); fagButton.setOnClickListener(this); choppaButton.setOnClickListener(this); uglyButton.setOnClickListener(this); notimeButton.setOnClickListener(this); killButton.setOnClickListener(this); } @Override public void onClick(View v) { switch (v.getId()) { case R.id.predButton: if(predator == null) predator = MediaPlayer.create(this, R.raw.predator); if (predator.isPlaying()) predator.seekTo(0); predator.start(); break; case R.id.sobButton: if(sob == null) sob = MediaPlayer.create(this, R.raw.sob); if (sob.isPlaying()) sob.seekTo(0); sob.start(); break; case R.id.faggotsButton: if(faggots == null) faggots = MediaPlayer.create(this, R.raw.faggots); if (faggots.isPlaying()) faggots.seekTo(0); faggots.start(); break; case R.id.choppaButton: if(choppa == null) choppa = MediaPlayer.create(this, R.raw.gettochoppa); if (choppa.isPlaying()) choppa.seekTo(0); choppa.start(); break; case R.id.uglyButton: if(ugly == null) ugly = MediaPlayer.create(this, R.raw.ugly); if (ugly.isPlaying()) ugly.seekTo(0); ugly.start(); break; case R.id.nobleedsbutton: if(notime == null) notime = MediaPlayer.create(this, R.raw.notimetobleed); if (notime.isPlaying()) notime.seekTo(0); notime.start(); break; case R.id.bleedButton: if(killit == null) killit = MediaPlayer.create(this, R.raw.bleedskills); if (killit.isPlaying()) killit.seekTo(0); killit.start(); break; case R.id.ciaButton: if(cia == null) cia = MediaPlayer.create(this, R.raw.ciapencils); if (cia.isPlaying()) cia.seekTo(0); cia.start(); break; case R.id.predatorLaughButton: if(pLaugh == null) pLaugh = MediaPlayer.create(this, R.raw.predatorlaughing); if (pLaugh.isPlaying()) pLaugh.seekTo(0); pLaugh.start(); break; case R.id.predatorHowlingButton: if(howling == null) howling = MediaPlayer.create(this, R.raw.predatorhowling); if (howling.isPlaying()) howling.seekTo(0); howling.start(); break; case R.id.predatorVisionButton: if(vision ==null) vision = MediaPlayer.create(this, R.raw.predatorvision); if (vision.isPlaying()) vision.seekTo(0); vision.start(); break; case R.id.predXButton: if(predRepeat == null) { predRepeat = MediaPlayer.create(this,R.raw.predrepeat); predRepeat.setLooping(true); } if(predRepeat.isPlaying()) predRepeat.pause(); else predRepeat.start(); break; } } }
[ "tylerhu@yahoo.com" ]
tylerhu@yahoo.com
61093958baee132e5db4656d910ee5ec16fd6e55
817beef4fd0de2831bb200351553a4a236652ddd
/src/main/java/com/libs/Testbase.java
ff6e1ae959da060472cfdeb6a2a0c9052063a781
[]
no_license
shivaraju529/Demorepo
1c880678be90183b7a1d2b1efdef5fc4e6ea6c56
ceb600bd1f188606ad9f439f5697a428785318b9
refs/heads/master
2020-03-19T07:53:24.493680
2018-06-05T15:37:15
2018-06-05T15:37:15
136,157,347
0
0
null
null
null
null
UTF-8
Java
false
false
58
java
package com.libs; public class Testbase { //shiva }
[ "shivaraju529@gmail.com" ]
shivaraju529@gmail.com
9095b3721adb5d2d862bbf58a067a090c2abf3c9
8a64bccce9a2862e722aeaa72d43a3dc296d7819
/src/main/java/com/adserver/controller/IndexController.java
450bbc47d9cb4309dcfdb891f124cc8d18bd7a35
[]
no_license
sravanithota/AdvertisementsApp_Spring
f77390284a78d23da3be1dcda651dffe2a0e6baa
cbd8ed0c5075838126597c0733691463c1809a1f
refs/heads/master
2020-05-18T14:26:48.206990
2017-03-10T02:37:33
2017-03-10T02:37:33
84,245,146
0
0
null
null
null
null
UTF-8
Java
false
false
380
java
package com.adserver.controller; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @Controller public class IndexController { @RequestMapping(value="/", method = RequestMethod.GET ) public String index(){ return "index"; } }
[ "sravani.thota@tabnergc.com" ]
sravani.thota@tabnergc.com
06784581669af79d57809b8b1c51c168a5b2d86b
772e16d70dc11e5e0fa416f54df8086dce918497
/Android/ComeFido/app/src/main/java/com/example/maximiliano/comefido/MainActivity.java
60c5d405ea71f2f94ccc6f53a59c625a9a1f5216
[]
no_license
mubillos/Come-fido
7530fd8f577a4ec6aa891eb555c8af5c44ccb903
cc8de0c4eb5c1493aa86a753cccc986a8a0b15bc
refs/heads/master
2020-03-22T18:57:41.752869
2018-07-10T22:37:57
2018-07-10T22:37:57
140,494,490
0
0
null
null
null
null
UTF-8
Java
false
false
20,311
java
package com.example.maximiliano.comefido; import android.app.Activity; import android.content.pm.ActivityInfo; import android.hardware.Sensor; import android.hardware.SensorEvent; import android.hardware.SensorEventListener; import android.hardware.SensorManager; import android.os.AsyncTask; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Button; import android.widget.RadioButton; import android.widget.TextView; import org.json.JSONObject; import org.w3c.dom.Text; import java.io.DataOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; import java.net.HttpURLConnection; import java.net.URL; import javax.net.ssl.HttpsURLConnection; public class MainActivity extends Activity implements View.OnClickListener, SensorEventListener{ ////variables globales///////////////// private SensorManager mSensorManager; //variable para manejar los sensores TextView texto; // caja de texto para mostrar los mensajes RadioButton boton1; // RadioButton boton2; //botones del radio button estan contenidos en un radiogroup para que solo se puedan seleccionar RadioButton boton3; //uno a la vez Button b1; Button b;// boton para mandar la orden de largar el alimento String dato; boolean prox=false; boolean lumino=false; @Override protected void onCreate(Bundle savedInstanceState) { // metodo que dispara el programa, es el hilo principal super.onCreate( savedInstanceState ); setContentView( R.layout.activity_main ); setRequestedOrientation( ActivityInfo.SCREEN_ORIENTATION_PORTRAIT );// para que no gire la pantalla texto = findViewById( R.id.textView2 ); boton1 = findViewById( R.id.radioButton ); boton2 = findViewById( R.id.radioButton2 );//traigo a este hilo todas las variables del activity_main.xml boton3 = findViewById( R.id.radioButton3 ); b= findViewById( R.id.button ); b1=findViewById(R.id.button2); mSensorManager = (SensorManager) getSystemService(SENSOR_SERVICE);// variable para acceder a los sensores del celular b.setOnClickListener( this );// metodo que dispara el evento cuando se presiona el boton de "ALIMENTAR" texto.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View view) { texto.setText( "" ); } } ); b1.setOnClickListener(new View.OnClickListener(){ @Override public void onClick(View view) { prox=false; lumino=false; } } ); } //////////////////////////////////////////////////////////////////////////////////// protected void Ini_Sensores() {// prepara los sensores para tomar los datos , sensor_delay_normal es la cantidad de tiempo para tomar datos mSensorManager.registerListener( this, mSensorManager.getDefaultSensor( Sensor.TYPE_ACCELEROMETER ), SensorManager.SENSOR_DELAY_NORMAL ); mSensorManager.registerListener( this, mSensorManager.getDefaultSensor( Sensor.TYPE_PROXIMITY ), SensorManager.SENSOR_DELAY_NORMAL ); mSensorManager.registerListener( this, mSensorManager.getDefaultSensor( Sensor.TYPE_LIGHT ), SensorManager.SENSOR_DELAY_NORMAL ); } private void Parar_Sensores() {// cuando se toman datos este evento detiene el ciclo de vida del sensor mSensorManager.unregisterListener( this, mSensorManager.getDefaultSensor( Sensor.TYPE_ACCELEROMETER ) ); mSensorManager.unregisterListener( this, mSensorManager.getDefaultSensor( Sensor.TYPE_PROXIMITY ) ); mSensorManager.unregisterListener( this, mSensorManager.getDefaultSensor( Sensor.TYPE_LIGHT ) ); } @Override public void onSensorChanged(SensorEvent event) { //evento que dice que accion realizara cada sensor al tomar datos // Cada sensor puede lanzar un thread que pase por aqui // Para asegurarnos ante los accesos simultaneos sincronizamos esto synchronized (this) { switch (event.sensor.getType()) { case Sensor.TYPE_ACCELEROMETER: if ((event.values[0] > 15) || (event.values[1] > 15) || (event.values[2] > 15)) {// acelerometro tiene 3 direcciones set();// cambia el radio button por el siguiente al que este seleccionado } break; case Sensor.TYPE_PROXIMITY: if (event.values[0] == 0) { if(prox==false) { prox=true; hilo_obtener_historia h4=new hilo_obtener_historia();// muestratodo el historial de envios realizados al alimentador desde el celular h4.set(texto);// muestra el historial por pantalla h4.execute();//dispara el hilo } } break; case Sensor.TYPE_LIGHT: if(event.values[0]<5) { if(lumino==false) { lumino=true; hilo_mandar_bus h3=new hilo_mandar_bus();//manda una orden para activar el buzzer del arduino h3.set(texto);// muestra un mensaje en el celular que se envio la orden h3.execute();// dispara el hilo/asyntaks para que se ejecute } } break; } } } @Override protected void onStop()// metodo que se realiza si el ciclo de vida del sensor esta detenido { Parar_Sensores(); super.onStop(); } @Override protected void onDestroy()// metodo que se realiza si el ciclo de vida del sensor esta finalizado { Parar_Sensores(); super.onDestroy(); } @Override protected void onPause()// metodo que se realiza si el ciclo de vida del sensor esta pausado { Parar_Sensores(); super.onPause(); } @Override protected void onRestart()//// metodo que se realiza si el ciclo de vida del sensor esta restaurado { Ini_Sensores(); super.onRestart(); } @Override protected void onResume() { super.onResume(); Ini_Sensores(); } @Override public void onAccuracyChanged(Sensor sensor, int i) {// permite cambiar la toma de muestras del sensor, es como mapear los datos } public void set()//determina que radiobutton esta seleccionado y lo cambia por el siguiente { if (boton1.isChecked()==true) { boton2.setChecked(true); } else{ if(boton2.isChecked()==true) boton3.setChecked(true); else boton1.setChecked(true); } } /////////////////////////////////////////////////////////// @Override public void onClick(View view) {// evento del boton "alimentar" hilo_mandar_datos h2 = new hilo_mandar_datos(); h2.set(boton1, boton2, boton3); h2.execute(); // dispara un hilo asyntask que envia los datos del radiobutton seleccionado texto.setText("procesando..."); hilo_obtener_datos h1 = new hilo_obtener_datos();// hilo que lee los datos enviados por el arduino al celular h1.set( texto,dato );//envio el textview donde quiero mostrar el mensaje h1.execute(); } } ////////////////////////////////////////////////////////////////////////////// class hilo_mandar_datos extends AsyncTask<Void, String, String>///hilo para enviar mensajes para activar el buzzer { //variables globales String respuesta=null; TextView t=null; RadioButton r1,r2,r3; ///metodo que se encarga de enviar los datos al arduino y devuelve si se pudo enviar o no esos datos public String POST (String uri, String cant) { HttpURLConnection urlConnection = null;// try { //Se almacena la URL de la request del servicio web URL mUrl = new URL(uri); //Se arma el request con el formato correcto urlConnection = (HttpURLConnection) mUrl.openConnection();//abre la conexion urlConnection.setDoOutput(true);// urlConnection.setDoInput(true);//permiten la subida y bajada de datos urlConnection.setRequestMethod("POST");//establezco que el pedido de conexion al servidor sera para subir o enviar datos //Se crea un paquete JSON que envia (cantidad,4),es decir, variable y dato que contiene // Este paquete JSON se escribe en el campo body(dato a enviar) del mensaje POST DataOutputStream wr = new DataOutputStream(urlConnection.getOutputStream ());//objeto para enviar flujo de datos JSONObject obj = new JSONObject();// creo el JSON para enviar el mensaje obj.put("cantidad", cant ); // escribo el mensaje cantidad y su valor que sera el valor del radio button en el JSON wr.writeBytes(obj.toString());//lo transforma en flujo de datos para enviarlos a la URL wr.flush();// limpio el buffer de datos wr.close();// cierro el flujo de datos //se envia el request al Servidor urlConnection.connect(); //Se obtiene la respuesta que envio el Servidor ante el request int responseCode = urlConnection.getResponseCode(); urlConnection.disconnect(); //se analiza si la respuesta fue correcta if(responseCode != HttpURLConnection.HTTP_OK) { return "ERROR AL ENVIAR LOS DATOS..."; } } catch (Exception e) { return "ERROR AL ENVIAR LOS DATOS..."; } return null; } @Override protected String doInBackground(Void... voids) {// metodo que el hilo debe hacer respuesta=POST("http://dweet.io/dweet/for/ComeFido1",String.valueOf( set() ));//le envio la url // y el valor almacenado en el radiobutton publishProgress(respuesta);// este metodo envia los datos del hilo que trabaja en segundo plano al hilo que // esta en primer plano o hilo principal return null; } @Override protected void onProgressUpdate(String... values) {// este hilo es el principal quien recibe los datos del metodo anterior super.onProgressUpdate( values ); } public int set()// obtengo el valor del radiobutton que esta seleccionado { if (r1.isChecked()==true) { return 1; } else{ if(r2.isChecked()==true) return 2; else return 3; } } public void set(RadioButton r1,RadioButton r2,RadioButton r3) {//traigo las variables del hilo principal this.r1=r1; this.r2=r2; this.r3=r3; } } class hilo_obtener_datos extends AsyncTask<Void,String,Void>//obtengo las respuestas del arduino { String datos=null; TextView tex=null; int res,pla,tan; String d=null; public String leerDatos(InputStream stream) throws IOException {// metodo que lee datos y me los tranforma a string Reader reader = null; reader = new InputStreamReader( stream, "UTF-8" ); char[] buffer = new char[1024]; StringBuffer bufferDatos = new StringBuffer(); int cantCaracteresLeidos; while ((cantCaracteresLeidos = reader.read( buffer )) != -1) { bufferDatos.append( buffer, 0, cantCaracteresLeidos ); } return bufferDatos.toString(); } public String url() throws IOException {// metodo que obtiene los datos del arduino InputStream is= null; try { URL url= new URL("https://dweet.io/get/latest/dweet/for/ComeFido2");// pagina donde obtengo los datos HttpsURLConnection conexion = (HttpsURLConnection) url.openConnection(); conexion.setReadTimeout( 10000 ); conexion.setConnectTimeout( 15000 ); conexion.setRequestMethod( "GET" );// establezco que la comunicacion sera para leer datos conexion.setDoInput( true );// conexion.connect(); try { is = conexion.getInputStream(); String contenidos = leerDatos( is ); return contenidos; }catch (Exception e) { Log.d( "mi","error en los contenidos" ); } }catch(IOException e) { Log.d( "mi","error en los contenidos" ); } finally { if(is != null) { is.close(); } } return null; } @Override protected Void doInBackground(Void... voids) { try { d=url(); } catch (IOException e) { e.printStackTrace(); } try { Thread.sleep(1200); } catch (InterruptedException e) { e.printStackTrace(); } datos=d; while(d.equals(datos)) { try { datos = url(); } catch (IOException e) { datos = "ERROR AL CONECTARSE CON EL ALIMENTADOR..."; } try { Thread.sleep(1200); } catch (InterruptedException e) { e.printStackTrace(); } } publishProgress(datos); return null; } protected void onProgressUpdate(String... values) { if(datos.indexOf("respuesta")!=-1 ) { this.res= Integer.parseInt(datos.substring( datos.indexOf( "respuesta" )+11,datos.indexOf( "respuesta" )+12)); this.pla=Integer.parseInt(datos.substring( datos.indexOf( "plato" )+7,datos.indexOf( "plato" )+8)); this.tan=Integer.parseInt(datos.substring( datos.indexOf( "tanque" )+8,datos.indexOf( "tanque" )+9)); //parseo los datos me ubico donde esta cada palabra y me corro lo necesario if(res==1) { this.tex.setText( "ORDEN EXITOSA"); } else { this.tex.setText( "ORDEN CON ERRORES" ); } } else { this.tex.setText( "ERROR AL CONECTARSE CON EL ALIMENTADOR..." );// sino hay respuesta es decir 0 hay problemas } } public void set(TextView v,String d) { this.tex = v; this.d=d; } } class hilo_mandar_bus extends AsyncTask<Void, String, String>///metodo para mandar el dato que encienda el buzzer { String respuesta=null; TextView t=null; public String POST (String uri, String cant) { HttpURLConnection urlConnection = null; try { //Se alamacena la URI del request del servicio web URL mUrl = new URL(uri); //Se arma el request con el formato correcto urlConnection = (HttpURLConnection) mUrl.openConnection(); urlConnection.setDoOutput(true); urlConnection.setDoInput(true); urlConnection.setRequestMethod("POST"); //Se crea un paquete JSON que indica el estado(encendido o apagado) del led que se desea //modificar. Este paquete JSON se escribe en el campo body del mensaje POST DataOutputStream wr = new DataOutputStream(urlConnection.getOutputStream ()); JSONObject obj = new JSONObject(); //JSONArray o=new JSONArray( ); obj.put("cantidad", cant ); wr.writeBytes(obj.toString()); wr.flush(); wr.close(); //se envia el request al Servidor urlConnection.connect(); //Se obtiene la respuesta que envio el Servidor ante el request int responseCode = urlConnection.getResponseCode(); urlConnection.disconnect(); //se analiza si la respuesta fue correcta if(responseCode != HttpURLConnection.HTTP_OK) { return "ERROR AL ENVIAR LOS DATOS..."; } } catch (Exception e) { return "ERROR AL ENVIAR LOS DATOS..."; } return "datos para activar el buzzeer enviados..."; } @Override protected String doInBackground(Void... voids) { respuesta=POST("http://dweet.io/dweet/for/ComeFido1",String.valueOf(4));//envio el dato 4 publishProgress(respuesta); return null; } @Override protected void onProgressUpdate(String... values) { super.onProgressUpdate( values ); this.t.setText( respuesta); } public void set(TextView v) { this.t = v; } } class hilo_obtener_historia extends AsyncTask<Void,String,Void>//leo el registro de consultas de dweet { String datos=null; TextView tex=null; public String leerDatos(InputStream stream) throws IOException { Reader reader = null; reader = new InputStreamReader( stream, "UTF-8" ); char[] buffer = new char[1024]; StringBuffer bufferDatos = new StringBuffer(); int cantCaracteresLeidos; while ((cantCaracteresLeidos = reader.read( buffer )) != -1) { bufferDatos.append( buffer, 0, cantCaracteresLeidos ); } return bufferDatos.toString(); } public String url() throws IOException { InputStream is= null; try { URL url= new URL("https://dweet.io/get/dweets/for/ComeFido1"); HttpsURLConnection conexion = (HttpsURLConnection) url.openConnection(); conexion.setReadTimeout( 10000 ); conexion.setConnectTimeout( 15000 ); conexion.setRequestMethod( "GET" ); conexion.setDoInput( true ); conexion.connect(); try { is = conexion.getInputStream(); String contenidos = leerDatos( is ); return contenidos; }catch (Exception e) { Log.d( "mi","error en los contenidos" ); } }catch(IOException e) { Log.d( "mi","error en los contenidos" ); } finally { if(is != null) { is.close(); } } return null; } @Override protected Void doInBackground(Void... voids) { try { datos= url(); } catch (IOException e) { datos="ERROR AL CONECTARSE CON EL ALIMENTADOR..."; } publishProgress(datos); return null; } protected void onProgressUpdate(String...values) { int i = 0,p=0; String fecha=""; String dato=""; String linea=""; while(p<5)//datos.indexOf("created",i)!=-1)//busco solo la fecha de creacion y cantidad { fecha=(datos.substring(datos.indexOf("created",i)+10,datos.indexOf("created",i)+33)); dato=(datos.substring(datos.indexOf("created",i)+64,datos.indexOf("created",i)+65));//datos.substring( datos.indexOf( ":\\\"",datos.indexOf("created",i)+35),4 ));// i+=datos.indexOf("created",i)+35-i; if(dato.equals( "1" )) { dato="poco"; } else{ if(dato.equals("2")) { dato="medio"; } else { if(dato.equals("3")) { dato="mucho"; } else dato="buzzer"; } } linea+="cantidad: " + dato + " " + "fecha: " +fecha + "\n"; p++; } tex.setText(linea); } public void set(TextView v) { this.tex = v; } }
[ "maubillos@gmail.com" ]
maubillos@gmail.com
0d5df768a0c023a6e4fa3a8dc4b58bbc87021e8c
8618b0130b57c62ee3de51b561fa48d876a30298
/src/main/java/com/intellij/ibeetl/lang/BeetlFileTypeFactory.java
89af01d100a3f1389a0fa87d4c473a6ffa89d28e
[]
no_license
cqwuzonglin/Beetl-Support
b29b7709353a1ef1a0feebefa4b712e0268db348
3ce4b0db61fc61caac4699be6e6307259cc86a10
refs/heads/master
2022-02-24T15:21:54.247363
2019-09-13T04:26:51
2019-09-13T04:26:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
444
java
package com.intellij.ibeetl.lang; import com.intellij.openapi.fileTypes.FileTypeConsumer; import com.intellij.openapi.fileTypes.FileTypeFactory; import org.jetbrains.annotations.NotNull; /** * Beetl文件类型扩展 */ public class BeetlFileTypeFactory extends FileTypeFactory { @Override public void createFileTypes(@NotNull FileTypeConsumer fileTypeConsumer) { fileTypeConsumer.consume(BeetlFileType.INSTANCE, "btl;btlx;btlh"); } }
[ "1012243881@qq.com" ]
1012243881@qq.com
b81ffc2bbcc55152f67c59f7738dc52507456152
d1c3484d284ab82e80fea1172b1835cc1cdd8937
/src/main/java/com/cgz/capa/logic/scoring/interfaces/AlgorithmStep.java
3038a9fbd88fd1df70d0f934d4f9c45cb8e60c94
[ "Apache-2.0" ]
permissive
cezarygerard/android_cross_app_permission_analizer
4a51e09814fdb8f407ce88a7e236878f0cf197e3
54d27ac809c6c08ad0a6300920705ca46d897bd1
refs/heads/master
2021-01-13T01:42:20.063776
2015-04-19T17:11:34
2015-04-19T17:11:34
34,215,231
0
0
null
null
null
null
UTF-8
Java
false
false
347
java
package com.cgz.capa.logic.scoring.interfaces; import com.cgz.capa.exceptions.AlgorithmException; import com.cgz.capa.model.RiskScore; import com.cgz.capa.utils.AlgorithmDataDTO; /** * Created by czarek on 14/01/15. */ public interface AlgorithmStep { RiskScore executeStep(AlgorithmDataDTO algorithmDataDTO) throws AlgorithmException; }
[ "czarek.zawadka@gmail.com" ]
czarek.zawadka@gmail.com
40db48d0514c9fe5db585599af0f942ff1d265ae
68b8f8431b726e36f645c90ca47b466f4efeae74
/Java/eclipse-workspace/thread/src/com/ustglobal/thread/defining/MyRunnable.java
ad8573feab90bd1419649d7e105fbccf7a83162a
[]
no_license
ramapuramanitha/USTGlobal-16sep19-anitha
f1a159c7ec600d2756cefaf70c3f8129eb6b3c38
18d478b32eb78ab8374e57731ddb33b520671381
refs/heads/master
2023-01-08T08:42:43.764563
2019-12-21T13:56:17
2019-12-21T13:56:17
215,538,732
0
0
null
2023-01-07T13:04:32
2019-10-16T12:07:21
JavaScript
UTF-8
Java
false
false
179
java
package com.ustglobal.thread.defining; public class MyRunnable implements Runnable { public void run() { for(int i=0;i<10;i++) { System.out.println("child thread"); } }
[ "ramapuramanitha123@gmail.com" ]
ramapuramanitha123@gmail.com
99c8a02c24d089d7c0ad656d9e385e1f51fb1284
70e8cc2c9d91d204b3b956f42cffd9f4ea8edbc6
/cloud_note/src/org/oracle/note/controller/note/RecycleNoteController.java
813bc5e7a0bf438d36d7c72e0bea55ad1562176f
[]
no_license
mdxiaohu/cloudNotes
72a100d8e9e5b0437977421bbdc7f945ebbd1ebc
660221fcf9b12193a7687794f94b2fb1be0fc609
refs/heads/master
2020-03-29T18:07:04.419858
2018-09-25T02:21:11
2018-09-25T02:21:11
150,195,304
0
0
null
null
null
null
UTF-8
Java
false
false
645
java
package org.oracle.note.controller.note; import javax.annotation.Resource; import org.oracle.note.entity.NoteResult; import org.oracle.note.service.NoteService; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; @Controller @RequestMapping("/note") public class RecycleNoteController { @Resource private NoteService noteService; @RequestMapping("/recycle.do") @ResponseBody public NoteResult execute(String noteId){ NoteResult result = noteService.recycleNote(noteId); return result; } }
[ "317108332@qq.com" ]
317108332@qq.com
7abb766a8ea30bf1d672adfd70ab8165121b11a5
34faee41261a58460ae00a2c4630788074547ab1
/src/net/bramp/psyscript/action/SetAction.java
00337a35688e9439aea9c16b205b132657e57d0b
[]
no_license
bramp/jPsyScript
1c57f8c7d0fa59f2b8c49f7348312f015c011fa1
8dc987ec4ff0495426a3a617501ed8656661ab6a
refs/heads/master
2023-05-31T12:39:24.859599
2012-03-03T22:03:52
2012-03-03T22:03:52
3,614,047
2
0
null
null
null
null
UTF-8
Java
false
false
791
java
package net.bramp.psyscript.action; import net.bramp.psyscript.Expression; import net.bramp.psyscript.Program; import net.bramp.psyscript.parser.SemanticException; import net.bramp.psyscript.variables.ConstVariable; import net.bramp.psyscript.variables.Variable; public class SetAction extends Action { private final Variable v; private final Expression o; public SetAction(final Program program, final int line, Variable v, Expression o) { super(program, line); this.v = v; this.o = o; if ( v instanceof ConstVariable ) throw new SemanticException(getLine(), "Can not set the constant variable '" + v.getName() + "'"); } @Override public void run() { v.set ( o ); } @Override public void check() throws SemanticException {} }
[ "me@bramp.net" ]
me@bramp.net
4fdfcd98954fff5e611cdc3ea705499f47f4ed26
050414bdd3b47c1527d04ca2e607219782094d3d
/src/main/java/com/healthX/model/Authority.java
bead4ba9226aa6e1edfb887f444eddfd56fd6891
[]
no_license
StephaneBruyere/healthXAuthServer
0dc235ed6265422b79a83370a875ce4e60fbe964
e5b473b9bbf7e598206a2d4bdf479ee432a4c401
refs/heads/main
2023-08-11T22:46:17.310837
2021-09-06T10:31:29
2021-09-06T10:31:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
404
java
package com.healthX.model; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import com.sun.istack.NotNull; import lombok.Data; @Entity @Data public class Authority { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private int id; @NotNull private String name; public Authority() { }; }
[ "37586841+StephaneBruyere@users.noreply.github.com" ]
37586841+StephaneBruyere@users.noreply.github.com
6d43391effe1548b606049475f476d29d5579367
17c30fed606a8b1c8f07f3befbef6ccc78288299
/Mate10_8_1_0/src/main/java/java/util/DualPivotQuicksort.java
33e1bc06770b7742e940868a5cf39a063e7a7133
[]
no_license
EggUncle/HwFrameWorkSource
4e67f1b832a2f68f5eaae065c90215777b8633a7
162e751d0952ca13548f700aad987852b969a4ad
refs/heads/master
2020-04-06T14:29:22.781911
2018-11-09T05:05:03
2018-11-09T05:05:03
157,543,151
1
0
null
2018-11-14T12:08:01
2018-11-14T12:08:01
null
UTF-8
Java
false
false
91,417
java
package java.util; final class DualPivotQuicksort { private static final int COUNTING_SORT_THRESHOLD_FOR_BYTE = 29; private static final int COUNTING_SORT_THRESHOLD_FOR_SHORT_OR_CHAR = 3200; private static final int INSERTION_SORT_THRESHOLD = 47; private static final int MAX_RUN_COUNT = 67; private static final int MAX_RUN_LENGTH = 33; private static final int NUM_BYTE_VALUES = 256; private static final int NUM_CHAR_VALUES = 65536; private static final int NUM_SHORT_VALUES = 65536; private static final int QUICKSORT_THRESHOLD = 286; private DualPivotQuicksort() { } static void sort(int[] a, int left, int right, int[] work, int workBase, int workLen) { if (right - left < QUICKSORT_THRESHOLD) { sort(a, left, right, true); return; } int[] b; int bo; int ao; int last; int i; int q; int p; int p2; int q2; int[] run = new int[68]; int count = 0; run[0] = left; int k = left; while (k < right) { int lo; int hi; if (a[k] >= a[k + 1]) { if (a[k] <= a[k + 1]) { int m = MAX_RUN_LENGTH; while (true) { k++; if (k > right || a[k - 1] != a[k]) { break; } m--; if (m == 0) { sort(a, left, right, true); return; } } } do { k++; if (k > right) { break; } } while (a[k - 1] >= a[k]); lo = run[count] - 1; hi = k; while (true) { lo++; hi--; if (lo >= hi) { break; } int t = a[lo]; a[lo] = a[hi]; a[hi] = t; } } else { do { k++; if (k > right) { break; } } while (a[k - 1] <= a[k]); } count++; if (count == MAX_RUN_COUNT) { sort(a, left, right, true); return; } run[count] = k; } int right2 = right + 1; if (run[count] == right) { count++; run[count] = right2; } else if (count == 1) { return; } int odd = 0; int n = 1; while (true) { n <<= 1; if (n >= count) { break; } byte odd2 = (byte) (odd ^ 1); } int blen = right2 - left; if (work != null && workLen >= blen) { if (workBase + blen > work.length) { } if (odd != 0) { System.arraycopy(a, left, work, workBase, blen); b = a; bo = 0; a = work; ao = workBase - left; } else { b = work; ao = 0; bo = workBase - left; } while (count > 1) { last = 0; for (k = 2; k <= count; k += 2) { hi = run[k]; int mi = run[k - 1]; i = run[k - 2]; q = mi; p = i; while (i < hi) { if (q < hi || (p < mi && a[p + ao] <= a[q + ao])) { p2 = p + 1; b[i + bo] = a[p + ao]; q2 = q; } else { q2 = q + 1; b[i + bo] = a[q + ao]; p2 = p; } i++; q = q2; p = p2; } last++; run[last] = hi; } if ((count & 1) != 0) { i = right2; lo = run[count - 1]; while (true) { i--; if (i >= lo) { break; } b[i + bo] = a[i + ao]; } last++; run[last] = right2; } int[] t2 = a; a = b; b = t2; int o = ao; ao = bo; bo = o; count = last; } } work = new int[blen]; workBase = 0; if (odd != 0) { b = work; ao = 0; bo = workBase - left; } else { System.arraycopy(a, left, work, workBase, blen); b = a; bo = 0; a = work; ao = workBase - left; } while (count > 1) { last = 0; for (k = 2; k <= count; k += 2) { hi = run[k]; int mi2 = run[k - 1]; i = run[k - 2]; q = mi2; p = i; while (i < hi) { if (q < hi) { } p2 = p + 1; b[i + bo] = a[p + ao]; q2 = q; i++; q = q2; p = p2; } last++; run[last] = hi; } if ((count & 1) != 0) { i = right2; lo = run[count - 1]; while (true) { i--; if (i >= lo) { break; } b[i + bo] = a[i + ao]; } last++; run[last] = right2; } int[] t22 = a; a = b; b = t22; int o2 = ao; ao = bo; bo = o2; count = last; } } private static void sort(int[] a, int left, int right, boolean leftmost) { int length = (right - left) + 1; int k; if (length < INSERTION_SORT_THRESHOLD) { if (leftmost) { int i = left; int j = left; while (i < right) { int ai = a[i + 1]; while (ai < a[j]) { a[j + 1] = a[j]; int j2 = j - 1; if (j == left) { j = j2; break; } j = j2; } a[j + 1] = ai; i++; j = i; } } else { while (left < right) { left++; if (a[left] < a[left - 1]) { k = left; while (true) { left++; if (left > right) { break; } int a1 = a[k]; int a2 = a[left]; if (a1 < a2) { a2 = a1; a1 = a[left]; } while (true) { k--; if (a1 >= a[k]) { break; } a[k + 2] = a[k]; } k++; a[k + 1] = a1; while (true) { k--; if (a2 >= a[k]) { break; } a[k + 1] = a[k]; } a[k + 1] = a2; left++; k = left; } int last = a[right]; while (true) { right--; if (last >= a[right]) { break; } a[right + 1] = a[right]; } a[right + 1] = last; } } return; } return; } int seventh = ((length >> 3) + (length >> 6)) + 1; int e3 = (left + right) >>> 1; int e2 = e3 - seventh; int e1 = e2 - seventh; int e4 = e3 + seventh; int e5 = e4 + seventh; if (a[e2] < a[e1]) { int t = a[e2]; a[e2] = a[e1]; a[e1] = t; } if (a[e3] < a[e2]) { t = a[e3]; a[e3] = a[e2]; a[e2] = t; if (t < a[e1]) { a[e2] = a[e1]; a[e1] = t; } } if (a[e4] < a[e3]) { t = a[e4]; a[e4] = a[e3]; a[e3] = t; if (t < a[e2]) { a[e3] = a[e2]; a[e2] = t; if (t < a[e1]) { a[e2] = a[e1]; a[e1] = t; } } } if (a[e5] < a[e4]) { t = a[e5]; a[e5] = a[e4]; a[e4] = t; if (t < a[e3]) { a[e4] = a[e3]; a[e3] = t; if (t < a[e2]) { a[e3] = a[e2]; a[e2] = t; if (t < a[e1]) { a[e2] = a[e1]; a[e1] = t; } } } } int less = left; int great = right; int ak; if (a[e1] == a[e2] || a[e2] == a[e3] || a[e3] == a[e4] || a[e4] == a[e5]) { int pivot = a[e3]; for (k = left; k <= great; k++) { if (a[k] != pivot) { ak = a[k]; if (ak < pivot) { a[k] = a[less]; a[less] = ak; less++; } else { while (a[great] > pivot) { great--; } if (a[great] < pivot) { a[k] = a[less]; a[less] = a[great]; less++; } else { a[k] = pivot; } a[great] = ak; great--; } } } sort(a, left, less - 1, leftmost); sort(a, great + 1, right, false); } else { int great2; int pivot1 = a[e2]; int pivot2 = a[e4]; a[e2] = a[left]; a[e4] = a[right]; do { less++; } while (a[less] < pivot1); do { great--; } while (a[great] > pivot2); k = less - 1; loop9: while (true) { k++; if (k > great) { break; } ak = a[k]; if (ak < pivot1) { a[k] = a[less]; a[less] = ak; less++; } else if (ak > pivot2) { while (a[great] > pivot2) { great2 = great - 1; if (great == k) { break loop9; } great = great2; } if (a[great] < pivot1) { a[k] = a[less]; a[less] = a[great]; less++; } else { a[k] = a[great]; } a[great] = ak; great--; } else { continue; } } great = great2; a[left] = a[less - 1]; a[less - 1] = pivot1; a[right] = a[great + 1]; a[great + 1] = pivot2; sort(a, left, less - 2, leftmost); sort(a, great + 2, right, false); if (less < e1 && e5 < great) { while (a[less] == pivot1) { less++; } while (a[great] == pivot2) { great--; } k = less - 1; loop13: while (true) { k++; if (k > great) { break; } ak = a[k]; if (ak == pivot1) { a[k] = a[less]; a[less] = ak; less++; } else if (ak == pivot2) { while (a[great] == pivot2) { great2 = great - 1; if (great == k) { break loop13; } great = great2; } if (a[great] == pivot1) { a[k] = a[less]; a[less] = pivot1; less++; } else { a[k] = a[great]; } a[great] = ak; great--; } else { continue; } } great = great2; } sort(a, less, great, false); } } static void sort(long[] a, int left, int right, long[] work, int workBase, int workLen) { if (right - left < QUICKSORT_THRESHOLD) { sort(a, left, right, true); return; } int hi; long[] b; int bo; int ao; int last; int i; int q; int p; int p2; int q2; int[] run = new int[68]; int count = 0; run[0] = left; int k = left; while (k < right) { int lo; if (a[k] >= a[k + 1]) { if (a[k] <= a[k + 1]) { int m = MAX_RUN_LENGTH; while (true) { k++; if (k > right || a[k - 1] != a[k]) { break; } m--; if (m == 0) { sort(a, left, right, true); return; } } } do { k++; if (k > right) { break; } } while (a[k - 1] >= a[k]); lo = run[count] - 1; hi = k; while (true) { lo++; hi--; if (lo >= hi) { break; } long t = a[lo]; a[lo] = a[hi]; a[hi] = t; } } else { do { k++; if (k > right) { break; } } while (a[k - 1] <= a[k]); } count++; if (count == MAX_RUN_COUNT) { sort(a, left, right, true); return; } run[count] = k; } int right2 = right + 1; if (run[count] == right) { count++; run[count] = right2; } else if (count == 1) { return; } int odd = 0; int n = 1; while (true) { n <<= 1; if (n >= count) { break; } byte odd2 = (byte) (odd ^ 1); } int blen = right2 - left; if (work != null && workLen >= blen) { if (workBase + blen > work.length) { } if (odd != 0) { System.arraycopy(a, left, work, workBase, blen); b = a; bo = 0; a = work; ao = workBase - left; } else { b = work; ao = 0; bo = workBase - left; } while (count > 1) { last = 0; for (k = 2; k <= count; k += 2) { hi = run[k]; int mi = run[k - 1]; i = run[k - 2]; q = mi; p = i; while (i < hi) { if (q < hi || (p < mi && a[p + ao] <= a[q + ao])) { p2 = p + 1; b[i + bo] = a[p + ao]; q2 = q; } else { q2 = q + 1; b[i + bo] = a[q + ao]; p2 = p; } i++; q = q2; p = p2; } last++; run[last] = hi; } if ((count & 1) != 0) { i = right2; lo = run[count - 1]; while (true) { i--; if (i >= lo) { break; } b[i + bo] = a[i + ao]; } last++; run[last] = right2; } long[] t2 = a; a = b; b = t2; int o = ao; ao = bo; bo = o; count = last; } } work = new long[blen]; workBase = 0; if (odd != 0) { b = work; ao = 0; bo = workBase - left; } else { System.arraycopy(a, left, work, workBase, blen); b = a; bo = 0; a = work; ao = workBase - left; } while (count > 1) { last = 0; for (k = 2; k <= count; k += 2) { hi = run[k]; int mi2 = run[k - 1]; i = run[k - 2]; q = mi2; p = i; while (i < hi) { if (q < hi) { } p2 = p + 1; b[i + bo] = a[p + ao]; q2 = q; i++; q = q2; p = p2; } last++; run[last] = hi; } if ((count & 1) != 0) { i = right2; lo = run[count - 1]; while (true) { i--; if (i >= lo) { break; } b[i + bo] = a[i + ao]; } last++; run[last] = right2; } long[] t22 = a; a = b; b = t22; int o2 = ao; ao = bo; bo = o2; count = last; } } private static void sort(long[] a, int left, int right, boolean leftmost) { int length = (right - left) + 1; int k; if (length < INSERTION_SORT_THRESHOLD) { if (leftmost) { int i = left; int j = left; while (i < right) { long ai = a[i + 1]; while (ai < a[j]) { a[j + 1] = a[j]; int j2 = j - 1; if (j == left) { j = j2; break; } j = j2; } a[j + 1] = ai; i++; j = i; } } else { while (left < right) { left++; if (a[left] < a[left - 1]) { k = left; while (true) { left++; if (left > right) { break; } long a1 = a[k]; long a2 = a[left]; if (a1 < a2) { a2 = a1; a1 = a[left]; } while (true) { k--; if (a1 >= a[k]) { break; } a[k + 2] = a[k]; } k++; a[k + 1] = a1; while (true) { k--; if (a2 >= a[k]) { break; } a[k + 1] = a[k]; } a[k + 1] = a2; left++; k = left; } long last = a[right]; while (true) { right--; if (last >= a[right]) { break; } a[right + 1] = a[right]; } a[right + 1] = last; } } return; } return; } int seventh = ((length >> 3) + (length >> 6)) + 1; int e3 = (left + right) >>> 1; int e2 = e3 - seventh; int e1 = e2 - seventh; int e4 = e3 + seventh; int e5 = e4 + seventh; if (a[e2] < a[e1]) { long t = a[e2]; a[e2] = a[e1]; a[e1] = t; } if (a[e3] < a[e2]) { t = a[e3]; a[e3] = a[e2]; a[e2] = t; if (t < a[e1]) { a[e2] = a[e1]; a[e1] = t; } } if (a[e4] < a[e3]) { t = a[e4]; a[e4] = a[e3]; a[e3] = t; if (t < a[e2]) { a[e3] = a[e2]; a[e2] = t; if (t < a[e1]) { a[e2] = a[e1]; a[e1] = t; } } } if (a[e5] < a[e4]) { t = a[e5]; a[e5] = a[e4]; a[e4] = t; if (t < a[e3]) { a[e4] = a[e3]; a[e3] = t; if (t < a[e2]) { a[e3] = a[e2]; a[e2] = t; if (t < a[e1]) { a[e2] = a[e1]; a[e1] = t; } } } } int less = left; int great = right; long ak; if (a[e1] == a[e2] || a[e2] == a[e3] || a[e3] == a[e4] || a[e4] == a[e5]) { long pivot = a[e3]; for (k = left; k <= great; k++) { if (a[k] != pivot) { ak = a[k]; if (ak < pivot) { a[k] = a[less]; a[less] = ak; less++; } else { while (a[great] > pivot) { great--; } if (a[great] < pivot) { a[k] = a[less]; a[less] = a[great]; less++; } else { a[k] = pivot; } a[great] = ak; great--; } } } sort(a, left, less - 1, leftmost); sort(a, great + 1, right, false); } else { int great2; long pivot1 = a[e2]; long pivot2 = a[e4]; a[e2] = a[left]; a[e4] = a[right]; do { less++; } while (a[less] < pivot1); do { great--; } while (a[great] > pivot2); k = less - 1; loop9: while (true) { k++; if (k > great) { break; } ak = a[k]; if (ak < pivot1) { a[k] = a[less]; a[less] = ak; less++; } else if (ak > pivot2) { while (a[great] > pivot2) { great2 = great - 1; if (great == k) { break loop9; } great = great2; } if (a[great] < pivot1) { a[k] = a[less]; a[less] = a[great]; less++; } else { a[k] = a[great]; } a[great] = ak; great--; } else { continue; } } great = great2; a[left] = a[less - 1]; a[less - 1] = pivot1; a[right] = a[great + 1]; a[great + 1] = pivot2; sort(a, left, less - 2, leftmost); sort(a, great + 2, right, false); if (less < e1 && e5 < great) { while (a[less] == pivot1) { less++; } while (a[great] == pivot2) { great--; } k = less - 1; loop13: while (true) { k++; if (k > great) { break; } ak = a[k]; if (ak == pivot1) { a[k] = a[less]; a[less] = ak; less++; } else if (ak == pivot2) { while (a[great] == pivot2) { great2 = great - 1; if (great == k) { break loop13; } great = great2; } if (a[great] == pivot1) { a[k] = a[less]; a[less] = pivot1; less++; } else { a[k] = a[great]; } a[great] = ak; great--; } else { continue; } } great = great2; } sort(a, less, great, false); } } static void sort(short[] a, int left, int right, short[] work, int workBase, int workLen) { if (right - left > COUNTING_SORT_THRESHOLD_FOR_SHORT_OR_CHAR) { int[] count = new int[65536]; int i = left - 1; while (true) { i++; if (i > right) { break; } int i2 = a[i] - -32768; count[i2] = count[i2] + 1; } i = 65536; int k = right + 1; while (k > left) { do { i--; } while (count[i] == 0); short value = (short) (i - 32768); int s = count[i]; while (true) { k--; a[k] = value; s--; if (s > 0) { } } } return; } doSort(a, left, right, work, workBase, workLen); } private static void doSort(short[] a, int left, int right, short[] work, int workBase, int workLen) { if (right - left < QUICKSORT_THRESHOLD) { sort(a, left, right, true); return; } int lo; int hi; short[] b; int bo; int ao; int last; int i; int q; int p; int p2; int q2; int[] run = new int[68]; int count = 0; run[0] = left; int k = left; while (k < right) { if (a[k] >= a[k + 1]) { if (a[k] <= a[k + 1]) { int m = MAX_RUN_LENGTH; while (true) { k++; if (k > right || a[k - 1] != a[k]) { break; } m--; if (m == 0) { sort(a, left, right, true); return; } } } do { k++; if (k > right) { break; } } while (a[k - 1] >= a[k]); lo = run[count] - 1; hi = k; while (true) { lo++; hi--; if (lo >= hi) { break; } short t = a[lo]; a[lo] = a[hi]; a[hi] = t; } } else { do { k++; if (k > right) { break; } } while (a[k - 1] <= a[k]); } count++; if (count == MAX_RUN_COUNT) { sort(a, left, right, true); return; } run[count] = k; } int right2 = right + 1; if (run[count] == right) { count++; run[count] = right2; } else if (count == 1) { return; } int odd = 0; int n = 1; while (true) { n <<= 1; if (n >= count) { break; } byte odd2 = (byte) (odd ^ 1); } int blen = right2 - left; if (work != null && workLen >= blen) { if (workBase + blen > work.length) { } if (odd != 0) { System.arraycopy(a, left, work, workBase, blen); b = a; bo = 0; a = work; ao = workBase - left; } else { b = work; ao = 0; bo = workBase - left; } while (count > 1) { last = 0; for (k = 2; k <= count; k += 2) { hi = run[k]; int mi = run[k - 1]; i = run[k - 2]; q = mi; p = i; while (i < hi) { if (q < hi || (p < mi && a[p + ao] <= a[q + ao])) { p2 = p + 1; b[i + bo] = a[p + ao]; q2 = q; } else { q2 = q + 1; b[i + bo] = a[q + ao]; p2 = p; } i++; q = q2; p = p2; } last++; run[last] = hi; } if ((count & 1) != 0) { i = right2; lo = run[count - 1]; while (true) { i--; if (i >= lo) { break; } b[i + bo] = a[i + ao]; } last++; run[last] = right2; } short[] t2 = a; a = b; b = t2; int o = ao; ao = bo; bo = o; count = last; } } work = new short[blen]; workBase = 0; if (odd != 0) { b = work; ao = 0; bo = workBase - left; } else { System.arraycopy(a, left, work, workBase, blen); b = a; bo = 0; a = work; ao = workBase - left; } while (count > 1) { last = 0; for (k = 2; k <= count; k += 2) { hi = run[k]; int mi2 = run[k - 1]; i = run[k - 2]; q = mi2; p = i; while (i < hi) { if (q < hi) { } p2 = p + 1; b[i + bo] = a[p + ao]; q2 = q; i++; q = q2; p = p2; } last++; run[last] = hi; } if ((count & 1) != 0) { i = right2; lo = run[count - 1]; while (true) { i--; if (i >= lo) { break; } b[i + bo] = a[i + ao]; } last++; run[last] = right2; } short[] t22 = a; a = b; b = t22; int o2 = ao; ao = bo; bo = o2; count = last; } } private static void sort(short[] a, int left, int right, boolean leftmost) { int length = (right - left) + 1; int k; if (length < INSERTION_SORT_THRESHOLD) { if (leftmost) { int i = left; int j = left; while (i < right) { short ai = a[i + 1]; while (ai < a[j]) { a[j + 1] = a[j]; int j2 = j - 1; if (j == left) { j = j2; break; } j = j2; } a[j + 1] = ai; i++; j = i; } } else { while (left < right) { left++; if (a[left] < a[left - 1]) { k = left; while (true) { left++; if (left > right) { break; } short a1 = a[k]; short a2 = a[left]; if (a1 < a2) { a2 = a1; a1 = a[left]; } while (true) { k--; if (a1 >= a[k]) { break; } a[k + 2] = a[k]; } k++; a[k + 1] = a1; while (true) { k--; if (a2 >= a[k]) { break; } a[k + 1] = a[k]; } a[k + 1] = a2; left++; k = left; } short last = a[right]; while (true) { right--; if (last >= a[right]) { break; } a[right + 1] = a[right]; } a[right + 1] = last; } } return; } return; } int seventh = ((length >> 3) + (length >> 6)) + 1; int e3 = (left + right) >>> 1; int e2 = e3 - seventh; int e1 = e2 - seventh; int e4 = e3 + seventh; int e5 = e4 + seventh; if (a[e2] < a[e1]) { short t = a[e2]; a[e2] = a[e1]; a[e1] = t; } if (a[e3] < a[e2]) { t = a[e3]; a[e3] = a[e2]; a[e2] = t; if (t < a[e1]) { a[e2] = a[e1]; a[e1] = t; } } if (a[e4] < a[e3]) { t = a[e4]; a[e4] = a[e3]; a[e3] = t; if (t < a[e2]) { a[e3] = a[e2]; a[e2] = t; if (t < a[e1]) { a[e2] = a[e1]; a[e1] = t; } } } if (a[e5] < a[e4]) { t = a[e5]; a[e5] = a[e4]; a[e4] = t; if (t < a[e3]) { a[e4] = a[e3]; a[e3] = t; if (t < a[e2]) { a[e3] = a[e2]; a[e2] = t; if (t < a[e1]) { a[e2] = a[e1]; a[e1] = t; } } } } int less = left; int great = right; short ak; if (a[e1] == a[e2] || a[e2] == a[e3] || a[e3] == a[e4] || a[e4] == a[e5]) { short pivot = a[e3]; for (k = left; k <= great; k++) { if (a[k] != pivot) { ak = a[k]; if (ak < pivot) { a[k] = a[less]; a[less] = ak; less++; } else { while (a[great] > pivot) { great--; } if (a[great] < pivot) { a[k] = a[less]; a[less] = a[great]; less++; } else { a[k] = pivot; } a[great] = ak; great--; } } } sort(a, left, less - 1, leftmost); sort(a, great + 1, right, false); } else { int great2; short pivot1 = a[e2]; short pivot2 = a[e4]; a[e2] = a[left]; a[e4] = a[right]; do { less++; } while (a[less] < pivot1); do { great--; } while (a[great] > pivot2); k = less - 1; loop9: while (true) { k++; if (k > great) { break; } ak = a[k]; if (ak < pivot1) { a[k] = a[less]; a[less] = ak; less++; } else if (ak > pivot2) { while (a[great] > pivot2) { great2 = great - 1; if (great == k) { break loop9; } great = great2; } if (a[great] < pivot1) { a[k] = a[less]; a[less] = a[great]; less++; } else { a[k] = a[great]; } a[great] = ak; great--; } else { continue; } } great = great2; a[left] = a[less - 1]; a[less - 1] = pivot1; a[right] = a[great + 1]; a[great + 1] = pivot2; sort(a, left, less - 2, leftmost); sort(a, great + 2, right, false); if (less < e1 && e5 < great) { while (a[less] == pivot1) { less++; } while (a[great] == pivot2) { great--; } k = less - 1; loop13: while (true) { k++; if (k > great) { break; } ak = a[k]; if (ak == pivot1) { a[k] = a[less]; a[less] = ak; less++; } else if (ak == pivot2) { while (a[great] == pivot2) { great2 = great - 1; if (great == k) { break loop13; } great = great2; } if (a[great] == pivot1) { a[k] = a[less]; a[less] = pivot1; less++; } else { a[k] = a[great]; } a[great] = ak; great--; } else { continue; } } great = great2; } sort(a, less, great, false); } } static void sort(char[] a, int left, int right, char[] work, int workBase, int workLen) { if (right - left > COUNTING_SORT_THRESHOLD_FOR_SHORT_OR_CHAR) { int[] count = new int[65536]; int i = left - 1; while (true) { i++; if (i > right) { break; } char c = a[i]; count[c] = count[c] + 1; } i = 65536; int k = right + 1; while (k > left) { do { i--; } while (count[i] == 0); char value = (char) i; int s = count[i]; while (true) { k--; a[k] = value; s--; if (s > 0) { } } } return; } doSort(a, left, right, work, workBase, workLen); } private static void doSort(char[] a, int left, int right, char[] work, int workBase, int workLen) { if (right - left < QUICKSORT_THRESHOLD) { sort(a, left, right, true); return; } char[] b; int bo; int ao; int last; int i; int q; int p; int p2; int q2; int[] run = new int[68]; int count = 0; run[0] = left; int k = left; while (k < right) { int lo; int hi; if (a[k] >= a[k + 1]) { if (a[k] <= a[k + 1]) { int m = MAX_RUN_LENGTH; while (true) { k++; if (k > right || a[k - 1] != a[k]) { break; } m--; if (m == 0) { sort(a, left, right, true); return; } } } do { k++; if (k > right) { break; } } while (a[k - 1] >= a[k]); lo = run[count] - 1; hi = k; while (true) { lo++; hi--; if (lo >= hi) { break; } char t = a[lo]; a[lo] = a[hi]; a[hi] = t; } } else { do { k++; if (k > right) { break; } } while (a[k - 1] <= a[k]); } count++; if (count == MAX_RUN_COUNT) { sort(a, left, right, true); return; } run[count] = k; } int right2 = right + 1; if (run[count] == right) { count++; run[count] = right2; } else if (count == 1) { return; } int odd = 0; int n = 1; while (true) { n <<= 1; if (n >= count) { break; } byte odd2 = (byte) (odd ^ 1); } int blen = right2 - left; if (work != null && workLen >= blen) { if (workBase + blen > work.length) { } if (odd != 0) { System.arraycopy(a, left, work, workBase, blen); b = a; bo = 0; a = work; ao = workBase - left; } else { b = work; ao = 0; bo = workBase - left; } while (count > 1) { last = 0; for (k = 2; k <= count; k += 2) { hi = run[k]; int mi = run[k - 1]; i = run[k - 2]; q = mi; p = i; while (i < hi) { if (q < hi || (p < mi && a[p + ao] <= a[q + ao])) { p2 = p + 1; b[i + bo] = a[p + ao]; q2 = q; } else { q2 = q + 1; b[i + bo] = a[q + ao]; p2 = p; } i++; q = q2; p = p2; } last++; run[last] = hi; } if ((count & 1) != 0) { i = right2; lo = run[count - 1]; while (true) { i--; if (i >= lo) { break; } b[i + bo] = a[i + ao]; } last++; run[last] = right2; } char[] t2 = a; a = b; b = t2; int o = ao; ao = bo; bo = o; count = last; } } work = new char[blen]; workBase = 0; if (odd != 0) { b = work; ao = 0; bo = workBase - left; } else { System.arraycopy(a, left, work, workBase, blen); b = a; bo = 0; a = work; ao = workBase - left; } while (count > 1) { last = 0; for (k = 2; k <= count; k += 2) { hi = run[k]; int mi2 = run[k - 1]; i = run[k - 2]; q = mi2; p = i; while (i < hi) { if (q < hi) { } p2 = p + 1; b[i + bo] = a[p + ao]; q2 = q; i++; q = q2; p = p2; } last++; run[last] = hi; } if ((count & 1) != 0) { i = right2; lo = run[count - 1]; while (true) { i--; if (i >= lo) { break; } b[i + bo] = a[i + ao]; } last++; run[last] = right2; } char[] t22 = a; a = b; b = t22; int o2 = ao; ao = bo; bo = o2; count = last; } } private static void sort(char[] a, int left, int right, boolean leftmost) { int length = (right - left) + 1; int k; if (length < INSERTION_SORT_THRESHOLD) { if (leftmost) { int i = left; int j = left; while (i < right) { char ai = a[i + 1]; while (ai < a[j]) { a[j + 1] = a[j]; int j2 = j - 1; if (j == left) { j = j2; break; } j = j2; } a[j + 1] = ai; i++; j = i; } } else { while (left < right) { left++; if (a[left] < a[left - 1]) { k = left; while (true) { left++; if (left > right) { break; } char a1 = a[k]; char a2 = a[left]; if (a1 < a2) { a2 = a1; a1 = a[left]; } while (true) { k--; if (a1 >= a[k]) { break; } a[k + 2] = a[k]; } k++; a[k + 1] = a1; while (true) { k--; if (a2 >= a[k]) { break; } a[k + 1] = a[k]; } a[k + 1] = a2; left++; k = left; } char last = a[right]; while (true) { right--; if (last >= a[right]) { break; } a[right + 1] = a[right]; } a[right + 1] = last; } } return; } return; } int seventh = ((length >> 3) + (length >> 6)) + 1; int e3 = (left + right) >>> 1; int e2 = e3 - seventh; int e1 = e2 - seventh; int e4 = e3 + seventh; int e5 = e4 + seventh; if (a[e2] < a[e1]) { char t = a[e2]; a[e2] = a[e1]; a[e1] = t; } if (a[e3] < a[e2]) { t = a[e3]; a[e3] = a[e2]; a[e2] = t; if (t < a[e1]) { a[e2] = a[e1]; a[e1] = t; } } if (a[e4] < a[e3]) { t = a[e4]; a[e4] = a[e3]; a[e3] = t; if (t < a[e2]) { a[e3] = a[e2]; a[e2] = t; if (t < a[e1]) { a[e2] = a[e1]; a[e1] = t; } } } if (a[e5] < a[e4]) { t = a[e5]; a[e5] = a[e4]; a[e4] = t; if (t < a[e3]) { a[e4] = a[e3]; a[e3] = t; if (t < a[e2]) { a[e3] = a[e2]; a[e2] = t; if (t < a[e1]) { a[e2] = a[e1]; a[e1] = t; } } } } int less = left; int great = right; char ak; if (a[e1] == a[e2] || a[e2] == a[e3] || a[e3] == a[e4] || a[e4] == a[e5]) { char pivot = a[e3]; for (k = left; k <= great; k++) { if (a[k] != pivot) { ak = a[k]; if (ak < pivot) { a[k] = a[less]; a[less] = ak; less++; } else { while (a[great] > pivot) { great--; } if (a[great] < pivot) { a[k] = a[less]; a[less] = a[great]; less++; } else { a[k] = pivot; } a[great] = ak; great--; } } } sort(a, left, less - 1, leftmost); sort(a, great + 1, right, false); } else { int great2; char pivot1 = a[e2]; char pivot2 = a[e4]; a[e2] = a[left]; a[e4] = a[right]; do { less++; } while (a[less] < pivot1); do { great--; } while (a[great] > pivot2); k = less - 1; loop9: while (true) { k++; if (k > great) { break; } ak = a[k]; if (ak < pivot1) { a[k] = a[less]; a[less] = ak; less++; } else if (ak > pivot2) { while (a[great] > pivot2) { great2 = great - 1; if (great == k) { break loop9; } great = great2; } if (a[great] < pivot1) { a[k] = a[less]; a[less] = a[great]; less++; } else { a[k] = a[great]; } a[great] = ak; great--; } else { continue; } } great = great2; a[left] = a[less - 1]; a[less - 1] = pivot1; a[right] = a[great + 1]; a[great + 1] = pivot2; sort(a, left, less - 2, leftmost); sort(a, great + 2, right, false); if (less < e1 && e5 < great) { while (a[less] == pivot1) { less++; } while (a[great] == pivot2) { great--; } k = less - 1; loop13: while (true) { k++; if (k > great) { break; } ak = a[k]; if (ak == pivot1) { a[k] = a[less]; a[less] = ak; less++; } else if (ak == pivot2) { while (a[great] == pivot2) { great2 = great - 1; if (great == k) { break loop13; } great = great2; } if (a[great] == pivot1) { a[k] = a[less]; a[less] = pivot1; less++; } else { a[k] = a[great]; } a[great] = ak; great--; } else { continue; } } great = great2; } sort(a, less, great, false); } } static void sort(byte[] a, int left, int right) { int i; if (right - left > COUNTING_SORT_THRESHOLD_FOR_BYTE) { int[] count = new int[256]; i = left - 1; while (true) { i++; if (i > right) { break; } int i2 = a[i] + 128; count[i2] = count[i2] + 1; } i = 256; int k = right + 1; while (k > left) { do { i--; } while (count[i] == 0); byte value = (byte) (i - 128); int s = count[i]; while (true) { k--; a[k] = value; s--; if (s > 0) { } } } return; } i = left; int j = left; while (i < right) { byte ai = a[i + 1]; while (ai < a[j]) { a[j + 1] = a[j]; int j2 = j - 1; if (j == left) { j = j2; break; } j = j2; } a[j + 1] = ai; i++; j = i; } } static void sort(float[] a, int left, int right, float[] work, int workBase, int workLen) { while (left <= right && Float.isNaN(a[right])) { right--; } int k = right; while (true) { k--; if (k < left) { break; } float ak = a[k]; if (ak != ak) { a[k] = a[right]; a[right] = ak; right--; } } doSort(a, left, right, work, workBase, workLen); int hi = right; while (left < hi) { int middle = (left + hi) >>> 1; if (a[middle] < 0.0f) { left = middle + 1; } else { hi = middle; } } while (left <= right && Float.floatToRawIntBits(a[left]) < 0) { left++; } k = left; int p = left - 1; while (true) { k++; if (k <= right) { ak = a[k]; if (ak == 0.0f) { if (Float.floatToRawIntBits(ak) < 0) { a[k] = 0.0f; p++; a[p] = -0.0f; } } else { return; } } return; } } private static void doSort(float[] a, int left, int right, float[] work, int workBase, int workLen) { if (right - left < QUICKSORT_THRESHOLD) { sort(a, left, right, true); return; } float[] b; int bo; int ao; int last; int i; int q; int p; int p2; int q2; int[] run = new int[68]; int count = 0; run[0] = left; int k = left; while (k < right) { int lo; int hi; if (a[k] >= a[k + 1]) { if (a[k] <= a[k + 1]) { int m = MAX_RUN_LENGTH; while (true) { k++; if (k > right || a[k - 1] != a[k]) { break; } m--; if (m == 0) { sort(a, left, right, true); return; } } } do { k++; if (k > right) { break; } } while (a[k - 1] >= a[k]); lo = run[count] - 1; hi = k; while (true) { lo++; hi--; if (lo >= hi) { break; } float t = a[lo]; a[lo] = a[hi]; a[hi] = t; } } else { do { k++; if (k > right) { break; } } while (a[k - 1] <= a[k]); } count++; if (count == MAX_RUN_COUNT) { sort(a, left, right, true); return; } run[count] = k; } int right2 = right + 1; if (run[count] == right) { count++; run[count] = right2; } else if (count == 1) { return; } int odd = 0; int n = 1; while (true) { n <<= 1; if (n >= count) { break; } byte odd2 = (byte) (odd ^ 1); } int blen = right2 - left; if (work != null && workLen >= blen) { if (workBase + blen > work.length) { } if (odd != 0) { System.arraycopy(a, left, work, workBase, blen); b = a; bo = 0; a = work; ao = workBase - left; } else { b = work; ao = 0; bo = workBase - left; } while (count > 1) { last = 0; for (k = 2; k <= count; k += 2) { hi = run[k]; int mi = run[k - 1]; i = run[k - 2]; q = mi; p = i; while (i < hi) { if (q < hi || (p < mi && a[p + ao] <= a[q + ao])) { p2 = p + 1; b[i + bo] = a[p + ao]; q2 = q; } else { q2 = q + 1; b[i + bo] = a[q + ao]; p2 = p; } i++; q = q2; p = p2; } last++; run[last] = hi; } if ((count & 1) != 0) { i = right2; lo = run[count - 1]; while (true) { i--; if (i >= lo) { break; } b[i + bo] = a[i + ao]; } last++; run[last] = right2; } float[] t2 = a; a = b; b = t2; int o = ao; ao = bo; bo = o; count = last; } } work = new float[blen]; workBase = 0; if (odd != 0) { b = work; ao = 0; bo = workBase - left; } else { System.arraycopy(a, left, work, workBase, blen); b = a; bo = 0; a = work; ao = workBase - left; } while (count > 1) { last = 0; for (k = 2; k <= count; k += 2) { hi = run[k]; int mi2 = run[k - 1]; i = run[k - 2]; q = mi2; p = i; while (i < hi) { if (q < hi) { } p2 = p + 1; b[i + bo] = a[p + ao]; q2 = q; i++; q = q2; p = p2; } last++; run[last] = hi; } if ((count & 1) != 0) { i = right2; lo = run[count - 1]; while (true) { i--; if (i >= lo) { break; } b[i + bo] = a[i + ao]; } last++; run[last] = right2; } float[] t22 = a; a = b; b = t22; int o2 = ao; ao = bo; bo = o2; count = last; } } /* JADX WARNING: inconsistent code. */ /* Code decompiled incorrectly, please refer to instructions dump. */ private static void sort(float[] a, int left, int right, boolean leftmost) { int length = (right - left) + 1; int k; if (length < INSERTION_SORT_THRESHOLD) { if (leftmost) { int i = left; int j = left; while (i < right) { float ai = a[i + 1]; while (ai < a[j]) { a[j + 1] = a[j]; int j2 = j - 1; if (j == left) { j = j2; break; } j = j2; } a[j + 1] = ai; i++; j = i; } } else { while (left < right) { left++; if (a[left] < a[left - 1]) { k = left; while (true) { left++; if (left > right) { break; } float a1 = a[k]; float a2 = a[left]; if (a1 < a2) { a2 = a1; a1 = a[left]; } while (true) { k--; if (a1 >= a[k]) { break; } a[k + 2] = a[k]; } k++; a[k + 1] = a1; while (true) { k--; if (a2 >= a[k]) { break; } a[k + 1] = a[k]; } a[k + 1] = a2; left++; k = left; } float last = a[right]; while (true) { right--; if (last >= a[right]) { break; } a[right + 1] = a[right]; } a[right + 1] = last; } } return; } return; } int seventh = ((length >> 3) + (length >> 6)) + 1; int e3 = (left + right) >>> 1; int e2 = e3 - seventh; int e1 = e2 - seventh; int e4 = e3 + seventh; int e5 = e4 + seventh; if (a[e2] < a[e1]) { float t = a[e2]; a[e2] = a[e1]; a[e1] = t; } if (a[e3] < a[e2]) { t = a[e3]; a[e3] = a[e2]; a[e2] = t; if (t < a[e1]) { a[e2] = a[e1]; a[e1] = t; } } if (a[e4] < a[e3]) { t = a[e4]; a[e4] = a[e3]; a[e3] = t; if (t < a[e2]) { a[e3] = a[e2]; a[e2] = t; if (t < a[e1]) { a[e2] = a[e1]; a[e1] = t; } } } if (a[e5] < a[e4]) { t = a[e5]; a[e5] = a[e4]; a[e4] = t; if (t < a[e3]) { a[e4] = a[e3]; a[e3] = t; if (t < a[e2]) { a[e3] = a[e2]; a[e2] = t; if (t < a[e1]) { a[e2] = a[e1]; a[e1] = t; } } } } int less = left; int great = right; float ak; if (a[e1] == a[e2] || a[e2] == a[e3] || a[e3] == a[e4] || a[e4] == a[e5]) { float pivot = a[e3]; for (k = left; k <= great; k++) { if (a[k] != pivot) { ak = a[k]; if (ak < pivot) { a[k] = a[less]; a[less] = ak; less++; } else { while (a[great] > pivot) { great--; } if (a[great] < pivot) { a[k] = a[less]; a[less] = a[great]; less++; } else { a[k] = a[great]; } a[great] = ak; great--; } } } sort(a, left, less - 1, leftmost); sort(a, great + 1, right, false); } else { int great2; float pivot1 = a[e2]; float pivot2 = a[e4]; a[e2] = a[left]; a[e4] = a[right]; do { less++; } while (a[less] < pivot1); do { great--; } while (a[great] > pivot2); k = less - 1; loop9: while (true) { k++; if (k > great) { break; } ak = a[k]; if (ak < pivot1) { a[k] = a[less]; a[less] = ak; less++; } else if (ak > pivot2) { while (a[great] > pivot2) { great2 = great - 1; if (great == k) { break loop9; } great = great2; } if (a[great] < pivot1) { a[k] = a[less]; a[less] = a[great]; less++; } else { a[k] = a[great]; } a[great] = ak; great--; } else { continue; } } a[left] = a[less - 1]; a[less - 1] = pivot1; a[right] = a[great + 1]; a[great + 1] = pivot2; sort(a, left, less - 2, leftmost); sort(a, great + 2, right, false); if (less < e1 && e5 < great) { while (a[less] == pivot1) { less++; } while (a[great] == pivot2) { great--; } k = less - 1; loop13: while (true) { k++; if (k > great) { break; } ak = a[k]; if (ak == pivot1) { a[k] = a[less]; a[less] = ak; less++; } else if (ak == pivot2) { while (a[great] == pivot2) { great2 = great - 1; if (great == k) { break loop13; } great = great2; } if (a[great] == pivot1) { a[k] = a[less]; a[less] = a[great]; less++; } else { a[k] = a[great]; } a[great] = ak; great--; } else { continue; } } } sort(a, less, great, false); } } static void sort(double[] a, int left, int right, double[] work, int workBase, int workLen) { while (left <= right && Double.isNaN(a[right])) { right--; } int k = right; while (true) { k--; if (k < left) { break; } double ak = a[k]; if (ak != ak) { a[k] = a[right]; a[right] = ak; right--; } } doSort(a, left, right, work, workBase, workLen); int hi = right; while (left < hi) { int middle = (left + hi) >>> 1; if (a[middle] < 0.0d) { left = middle + 1; } else { hi = middle; } } while (left <= right && Double.doubleToRawLongBits(a[left]) < 0) { left++; } k = left; int p = left - 1; while (true) { k++; if (k <= right) { ak = a[k]; if (ak == 0.0d) { if (Double.doubleToRawLongBits(ak) < 0) { a[k] = 0.0d; p++; a[p] = -0.0d; } } else { return; } } return; } } private static void doSort(double[] a, int left, int right, double[] work, int workBase, int workLen) { if (right - left < QUICKSORT_THRESHOLD) { sort(a, left, right, true); return; } int hi; double[] b; int bo; int ao; int last; int i; int q; int p; int p2; int q2; int[] run = new int[68]; int count = 0; run[0] = left; int k = left; while (k < right) { int lo; if (a[k] >= a[k + 1]) { if (a[k] <= a[k + 1]) { int m = MAX_RUN_LENGTH; while (true) { k++; if (k > right || a[k - 1] != a[k]) { break; } m--; if (m == 0) { sort(a, left, right, true); return; } } } do { k++; if (k > right) { break; } } while (a[k - 1] >= a[k]); lo = run[count] - 1; hi = k; while (true) { lo++; hi--; if (lo >= hi) { break; } double t = a[lo]; a[lo] = a[hi]; a[hi] = t; } } else { do { k++; if (k > right) { break; } } while (a[k - 1] <= a[k]); } count++; if (count == MAX_RUN_COUNT) { sort(a, left, right, true); return; } run[count] = k; } int right2 = right + 1; if (run[count] == right) { count++; run[count] = right2; } else if (count == 1) { return; } int odd = 0; int n = 1; while (true) { n <<= 1; if (n >= count) { break; } byte odd2 = (byte) (odd ^ 1); } int blen = right2 - left; if (work != null && workLen >= blen) { if (workBase + blen > work.length) { } if (odd != 0) { System.arraycopy(a, left, work, workBase, blen); b = a; bo = 0; a = work; ao = workBase - left; } else { b = work; ao = 0; bo = workBase - left; } while (count > 1) { last = 0; for (k = 2; k <= count; k += 2) { hi = run[k]; int mi = run[k - 1]; i = run[k - 2]; q = mi; p = i; while (i < hi) { if (q < hi || (p < mi && a[p + ao] <= a[q + ao])) { p2 = p + 1; b[i + bo] = a[p + ao]; q2 = q; } else { q2 = q + 1; b[i + bo] = a[q + ao]; p2 = p; } i++; q = q2; p = p2; } last++; run[last] = hi; } if ((count & 1) != 0) { i = right2; lo = run[count - 1]; while (true) { i--; if (i >= lo) { break; } b[i + bo] = a[i + ao]; } last++; run[last] = right2; } double[] t2 = a; a = b; b = t2; int o = ao; ao = bo; bo = o; count = last; } } work = new double[blen]; workBase = 0; if (odd != 0) { b = work; ao = 0; bo = workBase - left; } else { System.arraycopy(a, left, work, workBase, blen); b = a; bo = 0; a = work; ao = workBase - left; } while (count > 1) { last = 0; for (k = 2; k <= count; k += 2) { hi = run[k]; int mi2 = run[k - 1]; i = run[k - 2]; q = mi2; p = i; while (i < hi) { if (q < hi) { } p2 = p + 1; b[i + bo] = a[p + ao]; q2 = q; i++; q = q2; p = p2; } last++; run[last] = hi; } if ((count & 1) != 0) { i = right2; lo = run[count - 1]; while (true) { i--; if (i >= lo) { break; } b[i + bo] = a[i + ao]; } last++; run[last] = right2; } double[] t22 = a; a = b; b = t22; int o2 = ao; ao = bo; bo = o2; count = last; } } private static void sort(double[] a, int left, int right, boolean leftmost) { int length = (right - left) + 1; int k; if (length < INSERTION_SORT_THRESHOLD) { if (leftmost) { int i = left; int j = left; while (i < right) { double ai = a[i + 1]; while (ai < a[j]) { a[j + 1] = a[j]; int j2 = j - 1; if (j == left) { j = j2; break; } j = j2; } a[j + 1] = ai; i++; j = i; } } else { while (left < right) { left++; if (a[left] < a[left - 1]) { k = left; while (true) { left++; if (left > right) { break; } double a1 = a[k]; double a2 = a[left]; if (a1 < a2) { a2 = a1; a1 = a[left]; } while (true) { k--; if (a1 >= a[k]) { break; } a[k + 2] = a[k]; } k++; a[k + 1] = a1; while (true) { k--; if (a2 >= a[k]) { break; } a[k + 1] = a[k]; } a[k + 1] = a2; left++; k = left; } double last = a[right]; while (true) { right--; if (last >= a[right]) { break; } a[right + 1] = a[right]; } a[right + 1] = last; } } return; } return; } int seventh = ((length >> 3) + (length >> 6)) + 1; int e3 = (left + right) >>> 1; int e2 = e3 - seventh; int e1 = e2 - seventh; int e4 = e3 + seventh; int e5 = e4 + seventh; if (a[e2] < a[e1]) { double t = a[e2]; a[e2] = a[e1]; a[e1] = t; } if (a[e3] < a[e2]) { t = a[e3]; a[e3] = a[e2]; a[e2] = t; if (t < a[e1]) { a[e2] = a[e1]; a[e1] = t; } } if (a[e4] < a[e3]) { t = a[e4]; a[e4] = a[e3]; a[e3] = t; if (t < a[e2]) { a[e3] = a[e2]; a[e2] = t; if (t < a[e1]) { a[e2] = a[e1]; a[e1] = t; } } } if (a[e5] < a[e4]) { t = a[e5]; a[e5] = a[e4]; a[e4] = t; if (t < a[e3]) { a[e4] = a[e3]; a[e3] = t; if (t < a[e2]) { a[e3] = a[e2]; a[e2] = t; if (t < a[e1]) { a[e2] = a[e1]; a[e1] = t; } } } } int less = left; int great = right; double ak; if (a[e1] == a[e2] || a[e2] == a[e3] || a[e3] == a[e4] || a[e4] == a[e5]) { double pivot = a[e3]; for (k = left; k <= great; k++) { if (a[k] != pivot) { ak = a[k]; if (ak < pivot) { a[k] = a[less]; a[less] = ak; less++; } else { while (a[great] > pivot) { great--; } if (a[great] < pivot) { a[k] = a[less]; a[less] = a[great]; less++; } else { a[k] = a[great]; } a[great] = ak; great--; } } } sort(a, left, less - 1, leftmost); sort(a, great + 1, right, false); } else { int great2; double pivot1 = a[e2]; double pivot2 = a[e4]; a[e2] = a[left]; a[e4] = a[right]; do { less++; } while (a[less] < pivot1); do { great--; } while (a[great] > pivot2); k = less - 1; loop9: while (true) { k++; if (k > great) { break; } ak = a[k]; if (ak < pivot1) { a[k] = a[less]; a[less] = ak; less++; } else if (ak > pivot2) { while (a[great] > pivot2) { great2 = great - 1; if (great == k) { break loop9; } great = great2; } if (a[great] < pivot1) { a[k] = a[less]; a[less] = a[great]; less++; } else { a[k] = a[great]; } a[great] = ak; great--; } else { continue; } } great = great2; a[left] = a[less - 1]; a[less - 1] = pivot1; a[right] = a[great + 1]; a[great + 1] = pivot2; sort(a, left, less - 2, leftmost); sort(a, great + 2, right, false); if (less < e1 && e5 < great) { while (a[less] == pivot1) { less++; } while (a[great] == pivot2) { great--; } k = less - 1; loop13: while (true) { k++; if (k > great) { break; } ak = a[k]; if (ak == pivot1) { a[k] = a[less]; a[less] = ak; less++; } else if (ak == pivot2) { while (a[great] == pivot2) { great2 = great - 1; if (great == k) { break loop13; } great = great2; } if (a[great] == pivot1) { a[k] = a[less]; a[less] = a[great]; less++; } else { a[k] = a[great]; } a[great] = ak; great--; } else { continue; } } great = great2; } sort(a, less, great, false); } } }
[ "lygforbs0@mail.com" ]
lygforbs0@mail.com
b4039b1fb87bd4638df12aba4fb8200d7bd9ebfe
00eb37911e4d6ae4a1592334059e4bf7717d184e
/src/sn/senstock/dao/ProduitImpl.java
adb8cfcbceea729c35ff401f234af3016b5fda41
[]
no_license
grandlaye/GestionStock
af4c228f624b238a8f5b68c9b75e859042877385
dc4a27a5d3c121a33834a286c4addea1623b3ed7
refs/heads/master
2020-12-20T14:32:11.554301
2020-01-25T01:35:31
2020-01-25T01:35:31
236,108,528
1
0
null
null
null
null
UTF-8
Java
false
false
924
java
package sn.senstock.dao; import sn.senstock.entities.Produit; import javax.persistence.EntityManager; import javax.persistence.EntityManagerFactory; import javax.persistence.Persistence; import java.util.List; public class ProduitImpl implements IProduit { private EntityManager em; public ProduitImpl() { EntityManagerFactory emf; emf = Persistence .createEntityManagerFactory("stockPU"); em = emf.createEntityManager(); } @Override public int add(Produit produit) { try { em.getTransaction().begin(); em.persist(produit); em.getTransaction().commit(); return 1; } catch (Exception ex) { ex.printStackTrace(); return 0; } } @Override public List<Produit> list() { return em.createQuery("SELECT p FROM Produit p").getResultList(); } }
[ "grandlaye5@gmail.com" ]
grandlaye5@gmail.com
a5255c898968db17ad43882321fa886cb7fd8a02
225d0bfecd3902adfb9ddd4263d288a51f2aff5f
/endpoint1/src/main/java/com/obs/endpoint/service/AuthenticationClient.java
28618777067fdd326344232f6b025658793c47ed
[]
no_license
boonseng3/spring-microservices
31b7cd4664bfcc62328032c1a03d9f15af18fa0e
9396ed86d3f737d6f400126bbd75c54caa7e1b89
refs/heads/master
2021-05-03T18:25:50.753427
2018-02-07T09:28:10
2018-02-07T09:28:10
120,411,211
0
0
null
null
null
null
UTF-8
Java
false
false
1,095
java
package com.obs.endpoint.service; import com.obs.endpoint.config.dto.SessionPrincipal; import com.obs.microservices.CustomPermission; import com.obs.microservices.dto.AclRequest; import com.obs.microservices.dto.AclResponse; import org.springframework.cloud.netflix.feign.FeignClient; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.RequestHeader; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @FeignClient("authentication") public interface AuthenticationClient { @RequestMapping(method = RequestMethod.GET, value = "/api/v1/session_principal") SessionPrincipal getSessionPrincipal(@RequestHeader("X-Auth-Token") String token); @RequestMapping(method = RequestMethod.POST, value = "/api/v1/acl", consumes = MediaType.APPLICATION_JSON_VALUE) AclResponse[] getAcl(AclRequest aclRequest); @RequestMapping(method = RequestMethod.POST, value = "/api/v1/permissions", consumes = MediaType.APPLICATION_JSON_VALUE) CustomPermission[] getPermission(); }
[ "boon-seng.ong@hpe.com" ]
boon-seng.ong@hpe.com
ada99ad8b996517eb4931f3e7dbfbdfd806a6c5e
64316f15c592f408d1fec69960812c06e03824d3
/app/src/main/java/br/com/alysondantas/sac_mariana/EditarDoadorActivity.java
cde45c45daa8653b86f22b4185cf88208f0f828f
[]
no_license
alysondantas/SAC-Mariana-Android
c1633678bef2a47c0bf663c9141d60e789b6d69a
48691940afc2cf468390050bb3b15ff2dd2d6650
refs/heads/master
2021-01-09T20:29:38.285470
2016-05-31T01:54:09
2016-05-31T01:54:09
60,050,290
0
0
null
null
null
null
UTF-8
Java
false
false
7,043
java
package br.com.alysondantas.sac_mariana; import android.app.AlertDialog; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.EditText; import br.com.alysondantas.sac_mariana.controller.SACMarianaController; import br.com.alysondantas.sac_mariana.exceptions.CampoObrigatorioInexistenteException; import br.com.alysondantas.sac_mariana.exceptions.ConflitoException; import br.com.alysondantas.sac_mariana.exceptions.DoadorInexistenteException; import br.com.alysondantas.sac_mariana.exceptions.ProdutoInexistenteException; import br.com.alysondantas.sac_mariana.model.Doador; import br.com.alysondantas.sac_mariana.model.Endereco; public class EditarDoadorActivity extends AppCompatActivity { private SACMarianaController controller; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_editar_doador); controller = SACMarianaController.getInstance(); } public void editarDoador1(View view){ EditText editTextNome = (EditText) findViewById(R.id.editText); String nome = editTextNome.getText().toString(); EditText editTextNumCad = (EditText) findViewById(R.id.editText2); String numCad = editTextNumCad.getText().toString(); EditText editTextdataNasc = (EditText) findViewById(R.id.editText12); String dataNasc = editTextdataNasc.getText().toString(); EditText editTextTipo = (EditText) findViewById(R.id.editText4); String tipo = editTextTipo.getText().toString(); EditText editTextPais = (EditText) findViewById(R.id.editText5); String pais = editTextPais.getText().toString(); EditText editTextuf = (EditText) findViewById(R.id.editText6); String uf = editTextuf.getText().toString(); EditText editTextcidade = (EditText) findViewById(R.id.editText7); String cidade = editTextcidade.getText().toString(); EditText editTextNum = (EditText) findViewById(R.id.editText8); String num1 = editTextNum.getText().toString(); int num = -1; try{ num = Integer.parseInt(num1); }catch (NumberFormatException e){ AlertDialog.Builder dlg = new AlertDialog.Builder(this); dlg.setMessage("Campo Num foi ignorado!"); dlg.setNeutralButton("OK",null); dlg.show(); } EditText editTextRua = (EditText) findViewById(R.id.editText9); String rua = editTextRua.getText().toString(); EditText editTextBairro = (EditText) findViewById(R.id.editText11); String bairro = editTextBairro.getText().toString(); EditText editTextCEP = (EditText) findViewById(R.id.editText10); String cep = editTextCEP.getText().toString(); boolean b = false; try { b = controller.editarDoador(numCad,nome,dataNasc,rua,num,bairro,cep,cidade,uf,pais,tipo); } catch (CampoObrigatorioInexistenteException e) { AlertDialog.Builder dlg = new AlertDialog.Builder(this); dlg.setMessage("Erro campo obrigatorio inexistente!"); dlg.setNeutralButton("OK",null); dlg.show(); } catch (DoadorInexistenteException e) { AlertDialog.Builder dlg = new AlertDialog.Builder(this); dlg.setMessage("Erro doador não encontrador!"); dlg.setNeutralButton("OK",null); dlg.show(); } if(b != false){ AlertDialog.Builder dlg = new AlertDialog.Builder(this); dlg.setMessage("Editado com sucesso!"); dlg.setNeutralButton("OK",null); dlg.show(); }else{ AlertDialog.Builder dlg = new AlertDialog.Builder(this); dlg.setMessage("Erro ao Editar!"); dlg.setNeutralButton("OK",null); dlg.show(); } } public void obterDoador1(View view){ EditText editTextNome = (EditText) findViewById(R.id.editText); EditText editTextNumCad = (EditText) findViewById(R.id.editText2); String numCad = editTextNumCad.getText().toString(); EditText editTextdataNasc = (EditText) findViewById(R.id.editText12); EditText editTextTipo = (EditText) findViewById(R.id.editText4); EditText editTextPais = (EditText) findViewById(R.id.editText5); EditText editTextuf = (EditText) findViewById(R.id.editText6); EditText editTextcidade = (EditText) findViewById(R.id.editText7); EditText editTextNum = (EditText) findViewById(R.id.editText8); EditText editTextRua = (EditText) findViewById(R.id.editText9); EditText editTextBairro = (EditText) findViewById(R.id.editText11); EditText editTextCEP = (EditText) findViewById(R.id.editText10); Doador doador = controller.obterDoador(numCad); if(doador != null){ editTextNome.setText(doador.getNome()); editTextdataNasc.setText(doador.getDt_Nascimento()); editTextTipo.setText(doador.getTipo()); Endereco end = doador.getEndereco(); editTextPais.setText(end.getPais()); editTextuf.setText(end.getUf()); editTextcidade.setText(end.getCidade()); int numero = end.getNumero(); String test = "" + numero; editTextNum.setText(test); editTextRua.setText(end.getRua()); editTextBairro.setText(end.getBairro()); editTextCEP.setText(end.getCep()); }else{ AlertDialog.Builder dlg = new AlertDialog.Builder(this); dlg.setMessage("Erro doador não encontrado!"); dlg.setNeutralButton("OK",null); dlg.show(); } } public void excluirDoador(View view){ EditText editTextNumCad = (EditText) findViewById(R.id.editText2); String numCad = editTextNumCad.getText().toString(); boolean b = false; try { b = controller.removerDoador(numCad); } catch (DoadorInexistenteException e) { AlertDialog.Builder dlg = new AlertDialog.Builder(this); dlg.setMessage("Erro doador não encontrado!"); dlg.setNeutralButton("OK",null); dlg.show(); } catch (ConflitoException e) { AlertDialog.Builder dlg = new AlertDialog.Builder(this); dlg.setMessage("Erro doação desse doador foi encontrada, não foi removido!"); dlg.setNeutralButton("OK",null); dlg.show(); } if(b != false){ AlertDialog.Builder dlg = new AlertDialog.Builder(this); dlg.setMessage("Removido com sucesso!"); dlg.setNeutralButton("OK",null); dlg.show(); }else{ AlertDialog.Builder dlg = new AlertDialog.Builder(this); dlg.setMessage("Erro ao remover!"); dlg.setNeutralButton("OK",null); dlg.show(); } } }
[ "alyson.lipe@gmail.com" ]
alyson.lipe@gmail.com
812ace7e38c8194a645746e553973ebb88376372
ebd2bbc19f85bec0aec634bd9294fa1945e32061
/dependencies/andes/0.13.0-wso2v11/java/broker/src/main/java/org/wso2/andes/qmf/QMFType.java
4afa59fb1927a8523da42bebb0c659d798b83223
[]
no_license
madusankap/turing-1
da645af4886d562667dfd2f61b4aa184da093340
04edf79deefbe751f0dee518b3891f816cec2dbc
refs/heads/master
2019-01-02T01:46:09.216852
2014-12-18T11:04:09
2014-12-18T11:04:09
28,171,116
0
1
null
2023-03-20T11:52:10
2014-12-18T06:21:53
Java
UTF-8
Java
false
false
1,197
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.wso2.andes.qmf; public enum QMFType { UINT8, UINT16, UINT32, UINT64, UNKNOWN, STR8, STR16, ABSTIME, DELTATIME, OBJECTREFERENCE, BOOLEAN, FLOAT, DOUBLE, UUID, MAP, INT8, INT16, INT32, INT64, OBJECT, LIST, ARRAY; public int codeValue() { return ordinal()+1; } }
[ "tharindua@wso2.com" ]
tharindua@wso2.com
258650438ae4c67b4e6c0d030e150f6f96543ba9
4813f873cf453d1855ef45de6069b64950a947c8
/src/main/java/com/fractal/client/model/Company.java
4f94e2d6ead990edaeaece5a3d88cb55fbbe5578
[]
no_license
bozturkmenuk/javaassignments
ae5b5093c9a575097de4c5f7041da092f9ee2252
4c560ea5ea491b0a4b0e4d22e4d824f7d6e4b710
refs/heads/master
2020-09-11T06:58:50.603007
2019-12-02T02:41:46
2019-12-02T02:41:46
221,980,594
0
0
null
null
null
null
UTF-8
Java
false
false
7,667
java
/* * FractalSandboxCompany * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) * * OpenAPI spec version: 2019-10-17T10:28:54Z * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.fractal.client.model; import java.util.Objects; import java.util.Arrays; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonValue; import com.fractal.client.model.CompanyRegisteredAddress; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; /** * Company */ @ApiModel(description = "Company") @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2019-11-25T14:00:22.971Z") public class Company { @JsonProperty("createdAt") private String createdAt = null; @JsonProperty("yearEndMonth") private Integer yearEndMonth = null; @JsonProperty("website") private String website = null; @JsonProperty("registeredAddress") private CompanyRegisteredAddress registeredAddress = null; @JsonProperty("blocked") private Boolean blocked = null; @JsonProperty("yearEndDay") private Integer yearEndDay = null; @JsonProperty("name") private String name = null; @JsonProperty("industry") private String industry = null; @JsonProperty("currency") private String currency = null; @JsonProperty("id") private Integer id = null; @JsonProperty("pitch") private String pitch = null; public Company createdAt(String createdAt) { this.createdAt = createdAt; return this; } /** * Get createdAt * @return createdAt **/ @ApiModelProperty(value = "") public String getCreatedAt() { return createdAt; } public void setCreatedAt(String createdAt) { this.createdAt = createdAt; } public Company yearEndMonth(Integer yearEndMonth) { this.yearEndMonth = yearEndMonth; return this; } /** * Get yearEndMonth * @return yearEndMonth **/ @ApiModelProperty(value = "") public Integer getYearEndMonth() { return yearEndMonth; } public void setYearEndMonth(Integer yearEndMonth) { this.yearEndMonth = yearEndMonth; } public Company website(String website) { this.website = website; return this; } /** * Get website * @return website **/ @ApiModelProperty(value = "") public String getWebsite() { return website; } public void setWebsite(String website) { this.website = website; } public Company registeredAddress(CompanyRegisteredAddress registeredAddress) { this.registeredAddress = registeredAddress; return this; } /** * Get registeredAddress * @return registeredAddress **/ @ApiModelProperty(value = "") public CompanyRegisteredAddress getRegisteredAddress() { return registeredAddress; } public void setRegisteredAddress(CompanyRegisteredAddress registeredAddress) { this.registeredAddress = registeredAddress; } public Company blocked(Boolean blocked) { this.blocked = blocked; return this; } /** * Get blocked * @return blocked **/ @ApiModelProperty(value = "") public Boolean isBlocked() { return blocked; } public void setBlocked(Boolean blocked) { this.blocked = blocked; } public Company yearEndDay(Integer yearEndDay) { this.yearEndDay = yearEndDay; return this; } /** * Get yearEndDay * @return yearEndDay **/ @ApiModelProperty(value = "") public Integer getYearEndDay() { return yearEndDay; } public void setYearEndDay(Integer yearEndDay) { this.yearEndDay = yearEndDay; } public Company name(String name) { this.name = name; return this; } /** * Get name * @return name **/ @ApiModelProperty(value = "") public String getName() { return name; } public void setName(String name) { this.name = name; } public Company industry(String industry) { this.industry = industry; return this; } /** * Get industry * @return industry **/ @ApiModelProperty(value = "") public String getIndustry() { return industry; } public void setIndustry(String industry) { this.industry = industry; } public Company currency(String currency) { this.currency = currency; return this; } /** * Get currency * @return currency **/ @ApiModelProperty(value = "") public String getCurrency() { return currency; } public void setCurrency(String currency) { this.currency = currency; } public Company id(Integer id) { this.id = id; return this; } /** * Get id * @return id **/ @ApiModelProperty(value = "") public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Company pitch(String pitch) { this.pitch = pitch; return this; } /** * Get pitch * @return pitch **/ @ApiModelProperty(value = "") public String getPitch() { return pitch; } public void setPitch(String pitch) { this.pitch = pitch; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Company company = (Company) o; return Objects.equals(this.createdAt, company.createdAt) && Objects.equals(this.yearEndMonth, company.yearEndMonth) && Objects.equals(this.website, company.website) && Objects.equals(this.registeredAddress, company.registeredAddress) && Objects.equals(this.blocked, company.blocked) && Objects.equals(this.yearEndDay, company.yearEndDay) && Objects.equals(this.name, company.name) && Objects.equals(this.industry, company.industry) && Objects.equals(this.currency, company.currency) && Objects.equals(this.id, company.id) && Objects.equals(this.pitch, company.pitch); } @Override public int hashCode() { return Objects.hash(createdAt, yearEndMonth, website, registeredAddress, blocked, yearEndDay, name, industry, currency, id, pitch); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Company {\n"); sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n"); sb.append(" yearEndMonth: ").append(toIndentedString(yearEndMonth)).append("\n"); sb.append(" website: ").append(toIndentedString(website)).append("\n"); sb.append(" registeredAddress: ").append(toIndentedString(registeredAddress)).append("\n"); sb.append(" blocked: ").append(toIndentedString(blocked)).append("\n"); sb.append(" yearEndDay: ").append(toIndentedString(yearEndDay)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" industry: ").append(toIndentedString(industry)).append("\n"); sb.append(" currency: ").append(toIndentedString(currency)).append("\n"); sb.append(" id: ").append(toIndentedString(id)).append("\n"); sb.append(" pitch: ").append(toIndentedString(pitch)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "56206438+priceactiontr@users.noreply.github.com" ]
56206438+priceactiontr@users.noreply.github.com
d1ed0afb6ac552db12acdf01e0b9db7de8134829
90fca8a38d7d99293ef034cde4c00c95a2e0d6c8
/demo/java/util/src/tecgraf/exception/handling/ExceptionContext.java
d9232c9602e481b4de15f2d815f6e5e11696d3a4
[]
no_license
amadeubarbosa/openbus-collaboration-service
100882419dc6fa0a8dd20464fd2edf35dc273793
59f18b9ea6b0105f7fc52c77337abb0d5d3926ad
refs/heads/master
2021-01-20T18:07:08.886879
2017-05-10T18:28:29
2017-05-10T18:28:29
90,903,972
1
1
null
null
null
null
ISO-8859-1
Java
false
false
367
java
package tecgraf.exception.handling; /** * Enumeração dos tipos de contextos * * @author Tecgraf */ public enum ExceptionContext { /** Login por senha */ LoginByPassword, /** Login por chave privada */ LoginByCertificate, /** Chamadas ao núcleo do barramento */ BusCore, /** Chamadas a serviços */ Service, /** Chamadas locais */ Local; }
[ "hroenick@tecgraf.puc-rio.br" ]
hroenick@tecgraf.puc-rio.br
36a28cb7bccfd1bd7d12ba22357f7b9b64f585e3
96368cf958ca33679efee17f486b1a3ba98c4ff2
/Assignment 1/PAssignment/src/passignment/CompareFatality.java
73ad812b8e159929b0b465d63e30e42b04971d89
[]
no_license
Carthur-P/Programming-3
57df97a8b65eb943704639bdd00a649d785dbc69
59ed53936ef086dac4e75febbb3cb3876b9843ee
refs/heads/master
2022-05-27T00:49:33.789793
2020-04-29T10:53:28
2020-04-29T10:53:28
259,894,155
0
0
null
null
null
null
UTF-8
Java
false
false
611
java
package passignment; import java.util.Comparator; /** * @author Carthur Pongpatimet (1000026069) * Comparator class which will compare the amount of air fatality in an accident */ public class CompareFatality implements Comparator<Accident> { /** * @return int This returns a number that represents the outcome of the comparison */ @Override public int compare(Accident a1, Accident a2) { int num; if (a1.getAirFatality() > a2.getAirFatality()) { num = 1; } else if (a1.getAirFatality() < a2.getAirFatality()) { num = -1; } else { num = 0; } return num; } }
[ "pongp1@student.op.ac.nz" ]
pongp1@student.op.ac.nz
10b867dd3a8d20d10691218eda27c634e047702b
f17defe509dc75d184ca234da1eca07d95eb33bb
/bizcore/WEB-INF/shipping_core_src/com/doublechaintech/shipping/formfieldmessage/FormFieldMessageDAO.java
d43d36853c8d60cbb5e38d618d7a742ff1f1460f
[]
no_license
Digits88/shipping-biz-suite
d7a26a2b8f087216d2bec66569504604b3e5b162
efa6e37e49a269c5ea912ff7bc2743951cf8a3dc
refs/heads/master
2023-02-10T10:19:47.710494
2019-12-18T06:36:59
2019-12-18T06:36:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,550
java
package com.doublechaintech.shipping.formfieldmessage; import java.math.BigDecimal; import java.util.List; import java.util.Map; import com.doublechaintech.shipping.BaseEntity; import com.doublechaintech.shipping.SmartList; import com.doublechaintech.shipping.MultipleAccessKey; import com.doublechaintech.shipping.ShippingUserContext; import com.doublechaintech.shipping.genericform.GenericFormDAO; public interface FormFieldMessageDAO{ public FormFieldMessage load(String id, Map<String,Object> options) throws Exception; public void enhanceList(List<FormFieldMessage> formFieldMessageList); public void collectAndEnhance(BaseEntity ownerEntity); public void alias(List<BaseEntity> entityList); public FormFieldMessage present(FormFieldMessage formFieldMessage,Map<String,Object> options) throws Exception; public FormFieldMessage clone(String id, Map<String,Object> options) throws Exception; public FormFieldMessage save(FormFieldMessage formFieldMessage,Map<String,Object> options); public SmartList<FormFieldMessage> saveFormFieldMessageList(SmartList<FormFieldMessage> formFieldMessageList,Map<String,Object> options); public SmartList<FormFieldMessage> removeFormFieldMessageList(SmartList<FormFieldMessage> formFieldMessageList,Map<String,Object> options); public SmartList<FormFieldMessage> findFormFieldMessageWithKey(MultipleAccessKey key,Map<String, Object> options); public int countFormFieldMessageWithKey(MultipleAccessKey key,Map<String, Object> options); public Map<String, Integer> countFormFieldMessageWithGroupKey(String groupKey, MultipleAccessKey filterKey, Map<String, Object> options); public void delete(String formFieldMessageId, int version) throws Exception; public FormFieldMessage disconnectFromAll(String formFieldMessageId, int version) throws Exception; public int deleteAll() throws Exception; public SmartList<FormFieldMessage> queryList(String sql, Object ... parmeters); public SmartList<FormFieldMessage> findFormFieldMessageByForm(String genericFormId, Map<String,Object> options); public int countFormFieldMessageByForm(String genericFormId, Map<String,Object> options); public Map<String, Integer> countFormFieldMessageByFormIds(String[] ids, Map<String,Object> options); public SmartList<FormFieldMessage> findFormFieldMessageByForm(String genericFormId, int start, int count, Map<String,Object> options); public void analyzeFormFieldMessageByForm(SmartList<FormFieldMessage> resultList, String genericFormId, Map<String,Object> options); }
[ "philip@t420.philip-home.com" ]
philip@t420.philip-home.com
fc9e7e401dee8fca66acd05168c77ab1e9f4d84d
d8a2007eb38450257090c082bdafe81a728d1897
/src/main/java/cn/edu/zhku/jsj/huangxin/component/addressbook/model/AdminUserPO.java
1e1bb7303b4df431227980938918c4718934833f
[]
no_license
huangxin2298/wxqyh
01855a539c4878d4c6eee608a95c5591742d1199
897c3280ff0abd84ea916e916744a97c2e016dce
refs/heads/master
2021-04-06T01:26:03.461373
2018-04-03T04:55:13
2018-04-03T04:55:13
124,647,393
1
0
null
null
null
null
UTF-8
Java
false
false
1,396
java
package cn.edu.zhku.jsj.huangxin.component.addressbook.model; import cn.edu.zhku.jsj.huangxin.component.base.model.IBasePO; import java.util.Date; public class AdminUserPO implements IBasePO { private String id; private String userName; private String password; private Date createTime; private Date lastLoginTime; private String orgId; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public Date getLastLoginTime() { return lastLoginTime; } public void setLastLoginTime(Date lastLoginTime) { this.lastLoginTime = lastLoginTime; } public String getOrgId() { return orgId; } public void setOrgId(String orgId) { this.orgId = orgId; } @Override public String _getTableName() { return "tb_admin_user"; } @Override public String _getPKName() { return "id"; } @Override public Object _getPKValue() { return String.valueOf(id); } @Override public void _setPKValue(Object id) { this.id = (String) id; } }
[ "1512460987@qq.com" ]
1512460987@qq.com
a294ab7262d9225314fea06f497f669e8b31171b
7d5cb8412cd365f69ac4366224db06d6fc42349c
/src/main/java/com/fasterxml/jvmjsonperf/std/StdFlexJsonConverter.java
c1205d2b2e8fd843087e72e017ef8a1e5d6c1456
[]
no_license
404-not-find/jvm-json-benchmark
ce1f4d193645540edc787edbed73b5016b86639a
2a09cf878435982cec0b9fd4762144ce13f347c6
refs/heads/master
2021-05-26T13:11:07.414143
2013-05-18T22:07:47
2013-05-18T22:07:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,120
java
package com.fasterxml.jvmjsonperf.std; import java.io.*; import java.util.Arrays; import com.fasterxml.jvmjsonperf.StdConverter; import com.fasterxml.jvmjsonperf.StdItem; import flexjson.JSONDeserializer; import flexjson.JSONSerializer; /** * Converter that uses Jackson JSON processor for data binding, * using automatic bindings for serialization and deserialization. */ public class StdFlexJsonConverter<T extends StdItem<T>> extends StdConverter<T> { final JSONSerializer _serializer; final JSONDeserializer<T> _deserializer; final Class<T> _itemClass; private transient byte[] _readBuffer = new byte[2000]; public StdFlexJsonConverter(Class<T> itemClass) { _itemClass = itemClass; _deserializer = new JSONDeserializer<T>(); _serializer = new JSONSerializer(); } @Override public T readData(InputStream in) throws IOException { // Unbelievable -- can only parse a fucking String? What a joke. String doc = _read(in, "UTF-8"); return _deserializer.deserialize(doc); } @Override public int writeData(OutputStream out, T data) throws Exception { // Ugh. Are you kidding me -- can only output Strings?!?!?! OutputStreamWriter w = new OutputStreamWriter(out, "UTF-8"); w.write(_serializer.deepSerialize(data)); w.close(); return -1; } private String _read(InputStream in, String enc) throws IOException { /* In a way, this gives unfair advantage to this impl * (since we are optimizing away buffer allocations) -- but * it is unlikely to matter a lot in the end, what with all * inefficiencies it has, */ int ptr = 0; int count; while ((count = in.read(_readBuffer, ptr, _readBuffer.length - ptr)) > 0) { ptr += count; // buffer full? Need to realloc if (ptr == _readBuffer.length) { _readBuffer = Arrays.copyOf(_readBuffer, ptr + ptr); } } return new String(_readBuffer, 0, ptr, enc); } }
[ "tsaloranta@gmail.com" ]
tsaloranta@gmail.com
b7f7a63cf6e7caa0180d0dbf84632822b035ed04
1861ab9def2af83d78e61ca51fc948cd7b550b1e
/standalone/Odia letter folder creater/OdiaNameFolder/src/odianamefolder/OdiaNameFolder.java
fb079a35bd3766da2c77a00d5755d55c9cc2990b
[]
no_license
eralokpanda/java
9b0957f2e3c6b4e24f7f8c2c66fbcdc4e3d13d9c
c6c9d8f1dc442986b5e3715189c99a4788b8c431
refs/heads/master
2021-01-10T12:39:05.831316
2015-10-29T15:40:10
2015-10-29T15:40:10
44,729,239
0
0
null
null
null
null
UTF-8
Java
false
false
1,038
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 odianamefolder; import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.image.Image; import javafx.stage.Stage; /** * * @author alok */ public class OdiaNameFolder extends Application { @Override public void start(Stage stage) throws Exception { Parent root = FXMLLoader.load(getClass().getResource("MainPage.fxml")); Scene scene = new Scene(root); stage.setTitle("Odia Folder"); stage.getIcons().add(new Image("/icon/logo.png")); stage.setResizable(false); stage.sizeToScene(); stage.setScene(scene); stage.show(); } /** * @param args the command line arguments */ public static void main(String[] args) { launch(args); } }
[ "ad@alokpanda.com" ]
ad@alokpanda.com
d28caf0764dbb3b6cd77c33baa6a9c9a923c716f
203efedd714f51baed733cb8ca1107707581e405
/java-b-19/src/day30_wrapperClass/parsingValues.java
7d2ee604df9d4d2dbba568a8871943f6b80cfc53
[]
no_license
musta902/MeetSky-groupProject
9c6690eb9193920d0e743f97b7134c16eda8c752
d549ff80917fba7be7218ec77c7a8ec4eaf6af6c
refs/heads/main
2023-07-11T05:55:37.064731
2021-07-15T20:18:11
2021-07-15T20:18:11
399,595,116
0
0
null
null
null
null
UTF-8
Java
false
false
669
java
package day30_wrapperClass; public class parsingValues { public static void main(String[] args) { String numberAsString = "2018"; System.out.println(numberAsString); int number = Integer.parseInt(numberAsString); System.out.println(number); numberAsString = numberAsString + 1; number = number + 1; System.out.println(numberAsString); System.out.println(number); double number2 = Double.parseDouble(numberAsString); System.out.println(number2); int i = 10; String s = String.valueOf(i); System.out.println(s); //it will return "10" String s2 = Integer.toString(i); System.out.println(s2); //it will return "10" } }
[ "80974475+musta902@users.noreply.github.com" ]
80974475+musta902@users.noreply.github.com
82d48c17b842b565ae690e5e7593ad57c03dcace
0aad0d4c7b57ec89f8178f31e3f35b8b7f9a8ccb
/demo-limits.service/src/main/java/com/codeinfy/rwc/demolimits/service/LimitsConfiguration.java
4adf5bdd3ac2a6e73c48583a292a9a407349509a
[]
no_license
akshay-waghmare/laundryRWC
f5580a347e7c3bf5c223c86f8f82c01d9be9fe52
44ab59179ae8d66665e90f6ac7e756ad6c66ca6c
refs/heads/master
2022-05-20T02:38:06.187604
2019-02-03T16:15:49
2019-02-03T16:15:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
532
java
package com.codeinfy.rwc.demolimits.service; public class LimitsConfiguration { private int maximum; private int minimum; public int getMaximum() { return maximum; } protected LimitsConfiguration() { } public LimitsConfiguration(int maximum, int minimum) { super(); this.maximum = maximum; this.minimum = minimum; } public void setMaximum(int maximum) { this.maximum = maximum; } public int getMinimum() { return minimum; } public void setMinimum(int minimum) { this.minimum = minimum; } }
[ "akshay.d.waghmare@gmail.com" ]
akshay.d.waghmare@gmail.com
2e034f7a70780eb7a62871f5d948ee7ae743f8a1
9017c4be3db2d9a1350a00a2aff0837e90755445
/src/com/ucap/cloud/business/formserver/cssmanager/css/until/CssUntilRepeatImpl.java
79925e5897958f563df7e022d4f977d442baab73
[]
no_license
stefanie-wang/cloudFairy
ee0d93e159f9f892d94a616023e39b2b7051125c
6cb366671ba7cf77f83e8098b3f9bc857c50d473
refs/heads/master
2020-12-24T16:59:03.488824
2012-11-28T08:52:30
2012-11-28T08:52:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,097
java
package com.ucap.cloud.business.formserver.cssmanager.css.until; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Set; import static com.ucap.cloud.builder.servlet.UCAPDispathcherServlet.SPRINGCONTEXT; import org.dom4j.Element; import com.ucap.cloud.business.formserver.cssmanager.css.getcssfiledate.GetCssFileDateGetRepeatUnitModel; import com.ucap.cloud.business.formserver.data.model.BlockControTypeModel; import com.ucap.cloud.business.formserver.data.model.ControlBlockModel; import com.ucap.cloud.business.formserver.data.model.DataEventLoader; import com.ucap.cloud.business.formserver.data.model.EventsModel; import com.ucap.cloud.business.formserver.data.model.RepeatBlockModel; /** * @ClassName CssUntilRepeatImpl * @Description TODO 解析idf文件中的重复块片段 * @author pzg * @date 2012-8-31 */ public class CssUntilRepeatImpl implements CssUntilRepeat,CssUntilGetModel { public CssUntilRepeatImpl(){ } public Map<String, CssUntilGetAllModel> getRepeatmap() { return repeatmap; } public void setRepeatmap(Map<String, CssUntilGetAllModel> repeatmap) { this.repeatmap = repeatmap; } /** * 获取所有需要进行解析的具体类对象 */ private Map<String, CssUntilGetAllModel> repeatmap ; private GetCssFileDateGetRepeatUnitModel repeatUnitModel; public GetCssFileDateGetRepeatUnitModel getRepeatUnitModel() { return repeatUnitModel; } public void setRepeatUnitModel(GetCssFileDateGetRepeatUnitModel repeatUnitModel) { this.repeatUnitModel = repeatUnitModel; } @Override public List<String> getBigControls(Element controlsson,CssUntilParseXML parsexml) throws Exception { List<String> list = new ArrayList<String>(); // 重复块 List<String> listre = this.repeatUnitModel.getStringCss(controlsson); for (String ss : listre) { list.add(ss); } // 重复块结束 List<Element> listrepeatUnit = controlsson.elements(); RepeatBlockModel rbm = new RepeatBlockModel(); String st = controlsson.attributeValue("showTitle"); String sn = controlsson.attributeValue("showSeq"); rbm.setShowNumber(sn); rbm.setShowTitle(st); String repeatName = controlsson.attributeValue("name"); String namepath = controlsson.attributeValue("namepath"); if(namepath.startsWith("/ucapform")){ namepath = namepath.substring(9);//截取namepath不要/ucapform } rbm.setNamepath(namepath); ControlBlockModel cbm = new ControlBlockModel(); for (int re = 0; re < listrepeatUnit.size(); re++) { Element repeatAreas = listrepeatUnit.get(re); // repeatAreas节点 if (repeatAreas.getName().equals("repeatAreas")) { List<Element> listrepeatAreasson = repeatAreas .elements(); for (int s = 0; s < listrepeatAreasson.size(); s++) { Element es = listrepeatAreasson.get(s); if (es.getName().equals("repeatArea")) { List<Element> listrepeatArea = es .elements(); for (int sj = 0; sj < listrepeatArea.size(); sj++) { Element esd = listrepeatArea.get(sj); /** * 重复块下面的controls */ if (esd.getName().equals("controls")) { List<Element> listrepeatUnitcontrols = esd .elements(); for (int controlsre = 0; controlsre < listrepeatUnitcontrols .size(); controlsre++) { Element controlsreele = listrepeatUnitcontrols .get(controlsre); // 重复块下面的controls 下面的控件 String repacearea = controlsreele .getName(); String conname = ""; if (null != this.repeatmap .get(repacearea) ||repacearea.equals("movimg") ||repacearea.equals("graphic")) { // 关联数据 // 例如:namepath="/ucapform/cpy_21" conname = controlsreele.attributeValue("name"); if(!repacearea.equals("button")){ rbm.setControllist(conname); } parsexml .getinput(controlsreele); if(repacearea.equals("movimg")){ }else if(repacearea.equals("graphic")){ } else{ list .add(this.repeatmap .get( repacearea) .getStringCss( controlsreele)); } } String value = parsexml.getDm().getInputs().get(conname).getValue();//从DM中获取该控件的初始值 String type = parsexml.getDm().getInputs().get(conname).getControlType();//从DM中获取该控件的类型 // List<String> arr = new ArrayList<String>(); // arr.add(type); // arr.add(value); BlockControTypeModel bc = new BlockControTypeModel();//保存重复块里面控件的类型和值 bc.setType(type); bc.setValue(value); //cbm.setInsideCon(conname, arr); cbm.setInsideControl(conname, bc);//将该控件放入重复表内部控件中 } } } } } } } rbm.setPageControl("0", cbm); //处理重复块的自定义事件 String conname = controlsson.getName(); Map<String, String> map = new HashMap<String, String>(); DataEventLoader devl = (DataEventLoader)SPRINGCONTEXT.getBean("eventloader"); //获得事件模型 EventsModel evmo = devl.getEvns().get(conname); if (null != evmo) { //所有事件类型 Set<String> set = evmo.getEventC().keySet(); for (String k : set) { if (null != controlsson.element("events").element(k) .element("JScript").getText() && !"".equals(controlsson.element("events") .element(k).element("JScript") .getText())) { //将事件类型(如onclick或者onchange)和js内容放入map中 map.put(k, controlsson.element("events") .element(k).element("JScript").getText()); } } evmo.setId(controlsson.attributeValue("name")); evmo.setEventC(map); } parsexml.getDm().setEvents(evmo); parsexml.getDm().setRepeatBlock(repeatName, rbm); return list; } }
[ "stefaniewang0@gmail.com" ]
stefaniewang0@gmail.com
5a9a667af022a178a42e4bf501207d9610a07eb1
4a5f24baf286458ddde8658420faf899eb22634b
/aws-java-sdk-sagemaker/src/main/java/com/amazonaws/services/sagemaker/model/transform/CreatePresignedNotebookInstanceUrlRequestProtocolMarshaller.java
e829778c7075c9964a65a13255a9a97b40cbbd2b
[ "Apache-2.0" ]
permissive
gopinathrsv/aws-sdk-java
c2876eaf019ac00714724002d91d18fadc4b4a60
97b63ab51f2e850d22e545154e40a33601790278
refs/heads/master
2021-05-14T17:18:16.335069
2017-12-29T19:49:30
2017-12-29T19:49:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,930
java
/* * Copyright 2012-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.sagemaker.model.transform; import javax.annotation.Generated; import com.amazonaws.SdkClientException; import com.amazonaws.Request; import com.amazonaws.http.HttpMethodName; import com.amazonaws.services.sagemaker.model.*; import com.amazonaws.transform.Marshaller; import com.amazonaws.protocol.*; import com.amazonaws.annotation.SdkInternalApi; /** * CreatePresignedNotebookInstanceUrlRequest Marshaller */ @Generated("com.amazonaws:aws-java-sdk-code-generator") @SdkInternalApi public class CreatePresignedNotebookInstanceUrlRequestProtocolMarshaller implements Marshaller<Request<CreatePresignedNotebookInstanceUrlRequest>, CreatePresignedNotebookInstanceUrlRequest> { private static final OperationInfo SDK_OPERATION_BINDING = OperationInfo.builder().protocol(Protocol.AWS_JSON).requestUri("/") .httpMethodName(HttpMethodName.POST).hasExplicitPayloadMember(false).hasPayloadMembers(true) .operationIdentifier("SageMaker.CreatePresignedNotebookInstanceUrl").serviceName("AmazonSageMaker").build(); private final com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory; public CreatePresignedNotebookInstanceUrlRequestProtocolMarshaller(com.amazonaws.protocol.json.SdkJsonProtocolFactory protocolFactory) { this.protocolFactory = protocolFactory; } public Request<CreatePresignedNotebookInstanceUrlRequest> marshall(CreatePresignedNotebookInstanceUrlRequest createPresignedNotebookInstanceUrlRequest) { if (createPresignedNotebookInstanceUrlRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { final ProtocolRequestMarshaller<CreatePresignedNotebookInstanceUrlRequest> protocolMarshaller = protocolFactory.createProtocolMarshaller( SDK_OPERATION_BINDING, createPresignedNotebookInstanceUrlRequest); protocolMarshaller.startMarshalling(); CreatePresignedNotebookInstanceUrlRequestMarshaller.getInstance().marshall(createPresignedNotebookInstanceUrlRequest, protocolMarshaller); return protocolMarshaller.finishMarshalling(); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } } }
[ "" ]
9187ae57608836dcd114a49178d91d66ded45afc
5ac9f71d2924bb784412d253226fdbdca927848d
/app/src/androidTest/java/in/co/merkmod/dagger2databaseexample/ApplicationTest.java
087dcbcda3bd56d4dbc8fa41966d22e88229de1d
[]
no_license
mkodekar/TrytoDothis
8e961e3a1e6f98666f61e74fcb29a4a6f20f7f0d
81155036ae9a8046ae93a11cb2759961506de713
refs/heads/master
2020-12-25T14:22:59.054434
2016-08-21T23:28:57
2016-08-21T23:28:57
66,225,110
12
1
null
null
null
null
UTF-8
Java
false
false
367
java
package in.co.merkmod.dagger2databaseexample; import android.app.Application; import android.test.ApplicationTestCase; /** * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a> */ public class ApplicationTest extends ApplicationTestCase<Application> { public ApplicationTest() { super(Application.class); } }
[ "rkodekar@zoho.com" ]
rkodekar@zoho.com
0733bcdba87dd3e4e306247a787100930bb3416b
94228df04c8d71ef72d0278ed049e9eac43566bc
/modules/intromanage/intromanage-provider/src/main/java/com/bjike/goddess/intromanage/service/IndividualResumeSerImpl.java
b8551883d55b67c1d4aaeff98b142b181b757c38
[]
no_license
yang65700/goddess-java
b1c99ac4626c29651250969d58d346b7a13eb9ad
3f982a3688ee7c97d8916d9cb776151b5af8f04f
refs/heads/master
2021-04-12T11:10:39.345659
2017-09-12T02:32:51
2017-09-12T02:32:51
126,562,737
0
0
null
2018-03-24T03:33:53
2018-03-24T03:33:53
null
UTF-8
Java
false
false
22,490
java
package com.bjike.goddess.intromanage.service; import com.bjike.goddess.common.api.dto.Restrict; import com.bjike.goddess.common.api.exception.SerException; import com.bjike.goddess.common.jpa.service.ServiceImpl; import com.bjike.goddess.common.utils.bean.BeanTransform; import com.bjike.goddess.intromanage.bo.IndividualResumeBO; import com.bjike.goddess.intromanage.dto.*; import com.bjike.goddess.intromanage.entity.*; import com.bjike.goddess.intromanage.to.IndividualDisplayFieldTO; import com.bjike.goddess.intromanage.to.IndividualResumeTO; import com.bjike.goddess.user.api.UserAPI; import com.bjike.goddess.user.bo.UserBO; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.cache.annotation.CacheConfig; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; /** * 个人简介业务实现 * * @Author: [ sunfengtao ] * @Date: [ 2017-03-28 10:19 ] * @Description: [ ] * @Version: [ v1.0.0 ] * @Copy: [ com.bjike ] */ @CacheConfig(cacheNames = "intromanageSerCache") @Service public class IndividualResumeSerImpl extends ServiceImpl<IndividualResume, IndividualResumeDTO> implements IndividualResumeSer { @Autowired private StaffRewardSer staffRewardSer; @Autowired private StaffHonorSer staffHonorSer; @Autowired private EducateExperienceSer educateExperienceSer; @Autowired private WorkExperienceSer workExperienceSer; @Autowired private CredentialSituationSer credentialSituationSer; @Autowired private IndividualDisplayFieldSer individualDisplayFieldSer; @Autowired private IndividualDisplayUserSer individualDisplayUserSer; @Autowired private UserAPI userAPI; /** * 根据id查询个人简介 * * @param id 个人简介唯一标识 * @return class IndividualResume * @throws SerException */ @Override public IndividualResume findById(String id) throws SerException { IndividualResume individualResume = super.findById(id); if (individualResume == null) { return null; } UserBO userBO = userAPI.currentUser(); String currentUsername = userBO.getUsername();//获取当前用户姓名 List<IndividualDisplayUser> users = individualDisplayUserSer.findAll(); for (IndividualDisplayUser model : users) { String usernames = model.getUsernames(); boolean containsUsername = StringUtils.isNotBlank(usernames) && (usernames.indexOf(currentUsername) >= 0); if (containsUsername) { String individualDisplayId = model.getDisplayId(); IndividualDisplayField individualDisplayField = individualDisplayFieldSer.findById(individualDisplayId); //设置需要显示的字段 checkShowFields(individualDisplayField, individualResume); break; } } return individualResume; } /** * 分页查询个人简介 * * @return class IndividualResumeBO * @throws SerException */ @Override public List<IndividualResumeBO> list(IndividualResumeDTO dto) throws SerException { List<IndividualResume> list = super.findByPage(dto); UserBO userBO = userAPI.currentUser(); String currentUsername = userBO.getUsername();//获取当前用户姓名 List<IndividualDisplayUser> users = individualDisplayUserSer.findAll(); for (IndividualDisplayUser model : users) { String usernames = model.getUsernames(); boolean containsUsername = StringUtils.isNotBlank(usernames) && (usernames.indexOf(currentUsername) >= 0); if (containsUsername) { String individualDisplayId = model.getDisplayId(); IndividualDisplayField individualDisplayField = individualDisplayFieldSer.findById(individualDisplayId); //设置需要显示的字段 for (IndividualResume individualResume : list) { checkShowFields(individualDisplayField, individualResume); } break; } } List<IndividualResumeBO> boList = BeanTransform.copyProperties(list, IndividualResumeBO.class); return boList; } /** * 校验是否显示字段 * * @param individualDisplayField 个人简介显示字段 * @param individualResume 个人简介 */ private void checkShowFields(IndividualDisplayField individualDisplayField, IndividualResume individualResume) { if (individualDisplayField.getIfShowArea() != Boolean.TRUE) { individualResume.setArea(null); } if (individualDisplayField.getIfShowDepartment() != Boolean.TRUE) { individualResume.setDepartment(null); } if (individualDisplayField.getIfShowName() != Boolean.TRUE) { individualResume.setName(null); } if (individualDisplayField.getIfShowEmployeeId() != Boolean.TRUE) { individualResume.setEmployeeId(null); } if (individualDisplayField.getIfShowPost() != Boolean.TRUE) { individualResume.setPost(null); } if (individualDisplayField.getIfShowEmsil() != Boolean.TRUE) { individualResume.setEMsil(null); } if (individualDisplayField.getIfShowEntryDate() != Boolean.TRUE) { individualResume.setEntryDate(null); } if (individualDisplayField.getIfShowTenancyDuration() != Boolean.TRUE) { individualResume.setTenancyDuration(null); } if (individualDisplayField.getIfShowPositiveTime() != Boolean.TRUE) { individualResume.setPositiveTime(null); } if (individualDisplayField.getIfShowWhetherSocialSecurity() != Boolean.TRUE) { individualResume.setWhetherSocialSecurity(null); } if (individualDisplayField.getIfShowBuySocialSecurityTime() != Boolean.TRUE) { individualResume.setBuySocialSecurityTime(null); } if (individualDisplayField.getIfShowSkillRank() != Boolean.TRUE) { individualResume.setSkillRank(null); } if (individualDisplayField.getIfShowManageGrade() != Boolean.TRUE) { individualResume.setManageGrade(null); } if (individualDisplayField.getIfShowItemCommission() != Boolean.TRUE) { individualResume.setItemCommission(null); } if (individualDisplayField.getIfShowManageCommission() != Boolean.TRUE) { individualResume.setManageCommission(null); } if (individualDisplayField.getIfShowAwardScore() != Boolean.TRUE) { individualResume.setAwardScore(null); } if (individualDisplayField.getIfShowPenaltyScore() != Boolean.TRUE) { individualResume.setPenaltyScore(null); } if (individualDisplayField.getIfShowEmpiricalValue() != Boolean.TRUE) { individualResume.setEmpiricalValue(null); } if (individualDisplayField.getIfShowSubsidyAmount() != Boolean.TRUE) { individualResume.setSubsidyAmount(null); } if (individualDisplayField.getIfShowAnnualLeave() != Boolean.TRUE) { individualResume.setAnnualLeave(null); } if (individualDisplayField.getIfShowIndividualVision() != Boolean.TRUE) { individualResume.setIndividualVision(null); } if (individualDisplayField.getIfShowPicture() != Boolean.TRUE) { individualResume.setPicture(null); } if (individualDisplayField.getIfShowHobbies() != Boolean.TRUE) { individualResume.setHobbies(null); } if (individualDisplayField.getIfShowPersonalEmail() != Boolean.TRUE) { individualResume.setPersonalEmail(null); } if (individualDisplayField.getIfShowDateOfBirth() != Boolean.TRUE) { individualResume.setDateOfBirth(null); } if (individualDisplayField.getIfShowQqNumber() != Boolean.TRUE) { individualResume.setQqNumber(null); } if (individualDisplayField.getIfShowWechatId() != Boolean.TRUE) { individualResume.setWechatId(null); } if (individualDisplayField.getIfShowMobile() != Boolean.TRUE) { individualResume.setMobile(null); } if (individualDisplayField.getIfShowEmergencyContact() != Boolean.TRUE) { individualResume.setEmergencyContact(null); } if (individualDisplayField.getIfShowEmergencyContactPhone() != Boolean.TRUE) { individualResume.setEmergencyContactPhone(null); } if (individualDisplayField.getIfShowEducation() != Boolean.TRUE) { individualResume.setEducation(null); } if (individualDisplayField.getIfShowSpecialty() != Boolean.TRUE) { individualResume.setSpecialty(null); } if (individualDisplayField.getIfShowAcademy() != Boolean.TRUE) { individualResume.setAcademy(null); } if (individualDisplayField.getIfShowGraduationTime() != Boolean.TRUE) { individualResume.setGraduationTime(null); } if (individualDisplayField.getIfShowNowResidence() != Boolean.TRUE) { individualResume.setNowResidence(null); } if (individualDisplayField.getIfShowRegisteredAddress() != Boolean.TRUE) { individualResume.setRegisteredAddress(null); } if (individualDisplayField.getIfShowWorkExperience() != Boolean.TRUE) { individualResume.setWorkExperience(null); } } /** * 保存个人简介 * * @param to 个人简介to * @return class IndividualResumeBO * @throws SerException */ @Override @Transactional public IndividualResumeBO save(IndividualResumeTO to) throws SerException { IndividualResume entity = BeanTransform.copyProperties(to, IndividualResume.class, true); entity = super.save(entity); IndividualResumeBO bo = BeanTransform.copyProperties(entity, IndividualResumeBO.class); String staffId = entity.getId();//员工id saveSubObj(to, staffId);//保存所有的子对象 return bo; } /** * 保存所有的子对象 * * @param to 个人简介to * @param staffId 员工id * @throws SerException */ private void saveSubObj(IndividualResumeTO to, String staffId) throws SerException { saveStaffRewards(to, staffId);//保存员工奖励 saveStaffHonors(to, staffId); //保存员工荣誉 saveEducateExperiences(to, staffId);//保存教育经历 saveWorkExperiences(to, staffId);//保存工作经历 saveCredentialSituation(to, staffId);//保存证书情况 } /** * 保存证书情况 * * @param to 个人简介to * @param staffId 员工id * @throws SerException */ private void saveCredentialSituation(IndividualResumeTO to, String staffId) throws SerException { String[] certificateTitles = to.getCertificateTitles();//获取的专业证书 String[] certificateTimes = to.getCertificateTimes(); //获取证书的时间 String[] certificateNos = to.getCertificateNos(); //证书编号 boolean certificateTitlesNotEmpty = (certificateTitles != null) && (certificateTitles.length > 0); if (certificateTitlesNotEmpty) { List<CredentialSituation> list = new ArrayList<>(0); int len = certificateTitles.length; for (int i = 0; i < len; i++) { CredentialSituation model = new CredentialSituation(); model.setCertificateTitle(certificateTitles[i]); model.setCertificateTime(certificateTimes[i]); model.setCertificateNo(certificateNos[i]); model.setStaffId(staffId); list.add(model); } credentialSituationSer.save(list); } } /** * 保存工作经历 * * @param to 个人简历to * @param staffId 员工id * @throws SerException */ private void saveWorkExperiences(IndividualResumeTO to, String staffId) throws SerException { String[] participatedActivities = to.getParticipatedActivities();//曾经参与的组织与活动 String[] projectExperiences = to.getProjectExperiences();//项目经历 boolean participatedActivitiesNotEmpty = (participatedActivities != null) && (participatedActivities.length > 0); if (participatedActivitiesNotEmpty) { List<WorkExperience> list = new ArrayList<>(0); int len = participatedActivities.length; for (int i = 0; i < len; i++) { WorkExperience model = new WorkExperience(); model.setParticipatedActivity(participatedActivities[i]); model.setProjectExperience(projectExperiences[i]); model.setStaffId(staffId); list.add(model); } workExperienceSer.save(list); } } /** * 保存教育经历 * * @param to 个人简介to * @param staffId 员工id * @throws SerException */ private void saveEducateExperiences(IndividualResumeTO to, String staffId) throws SerException { String[] educatAddresses = to.getEducatAddresses();//教育地址 String[] trainingExperiences = to.getTrainingExperiences();//培训经历 boolean educatAddressesNotEmpty = (educatAddresses != null) && (educatAddresses.length > 0); if (educatAddressesNotEmpty) { List<EducateExperience> list = new ArrayList<>(0); int len = educatAddresses.length; for (int i = 0; i < len; i++) { EducateExperience model = new EducateExperience(); model.setEducatAddress(educatAddresses[i]); model.setTrainingExperience(trainingExperiences[i]); model.setStaffId(staffId); list.add(model); } educateExperienceSer.save(list); } } /** * 保存员工荣誉 * * @param to 个人简介to * @param staffId 员工id * @throws SerException */ private void saveStaffHonors(IndividualResumeTO to, String staffId) throws SerException { String[] honorNames = to.getHonorNames();//荣誉名称 String[] honorGrades = to.getHonorGrades();//荣誉等级 String[] firmSubsidies = to.getFirmSubsidies();//公司补助 boolean honorNamesNotEmpty = (honorNames != null) && (honorNames.length > 0); if (honorNamesNotEmpty) { List<StaffHonor> list = new ArrayList<>(0); int len = honorNames.length; for (int i = 0; i < len; i++) { StaffHonor model = new StaffHonor(); model.setHonorName(honorNames[i]); model.setHonorGrade(honorGrades[i]); model.setFirmSubsidy(firmSubsidies[i]); model.setStaffId(staffId); list.add(model); } staffHonorSer.save(list); } } /** * 保存员工奖励 * * @param to 个人简介to * @param staffId 员工id * @throws SerException */ private void saveStaffRewards(IndividualResumeTO to, String staffId) throws SerException { String[] rewardsNames = to.getRewardsNames();//奖励名称 String[] prizes = to.getPrizes();//奖品 String[] bonuses = to.getBonuses();//奖金 boolean rewardsNamesNotEmpty = (rewardsNames != null) && (rewardsNames.length > 0); if (rewardsNamesNotEmpty) { List<StaffReward> list = new ArrayList<>(0); int len = rewardsNames.length; for (int i = 0; i < len; i++) { StaffReward model = new StaffReward(); model.setRewardsName(rewardsNames[i]); model.setPrize(prizes[i]); model.setBonus(bonuses[i]); model.setStaffId(staffId); list.add(model); } staffRewardSer.save(list); } } /** * 更新个人简介 * * @param to 个人简介to * @throws SerException */ @Override @Transactional public void update(IndividualResumeTO to) throws SerException { String staffId = to.getId(); if (StringUtils.isNotEmpty(staffId)) { IndividualResume model = super.findById(staffId); if (model != null) { updateIndividualResume(to, model); removeSubObj(staffId);//删除所有与个人简介相关的子对象 saveSubObj(to, staffId);//保存子对象 } else { throw new SerException("您好,更新对象为空!"); } } else { throw new SerException("更新ID不能为空!"); } } /** * 更新个人简介信息 * * @param to * @param model * @throws SerException */ private void updateIndividualResume(IndividualResumeTO to, IndividualResume model) throws SerException { BeanTransform.copyProperties(to, model, true); model.setModifyTime(LocalDateTime.now()); super.update(model); } /** * 删除所有的子对象 * * @param staffId 员工id * @throws SerException */ private void removeSubObj(String staffId) throws SerException { removeStaffRewards(staffId);//删除员工奖励 removeStaffHonors(staffId); //删除员工荣誉 removeEducateExperiences(staffId);//删除教育经历 removeWorkExperiences(staffId); //删除工作经历 removeCredentialSituation(staffId);//删除证书情况 } /** * 删除证书情况 * * @param staffId  员工id * @throws SerException */ private void removeCredentialSituation(String staffId) throws SerException { CredentialSituationDTO dto = new CredentialSituationDTO(); dto.getConditions().add(Restrict.eq("staffId", staffId)); List<CredentialSituation> list = credentialSituationSer.findByCis(dto); credentialSituationSer.remove(list); } /** * 删除工作经历 * * @param staffId 员工id * @throws SerException */ private void removeWorkExperiences(String staffId) throws SerException { WorkExperienceDTO dto = new WorkExperienceDTO(); dto.getConditions().add(Restrict.eq("staffId", staffId)); List<WorkExperience> list = workExperienceSer.findByCis(dto); workExperienceSer.remove(list); } /** * 删除教育经历 * * @param staffId 员工id * @throws SerException */ private void removeEducateExperiences(String staffId) throws SerException { EducateExperienceDTO dto = new EducateExperienceDTO(); dto.getConditions().add(Restrict.eq("staffId", staffId)); List<EducateExperience> list = educateExperienceSer.findByCis(dto); educateExperienceSer.remove(list); } /** * 删除员工奖励 * * @param staffId 员工id * @throws SerException */ private void removeStaffRewards(String staffId) throws SerException { StaffRewardDTO dto = new StaffRewardDTO(); dto.getConditions().add(Restrict.eq("staffId", staffId)); List<StaffReward> list = staffRewardSer.findByCis(dto); staffRewardSer.remove(list); } /** * 删除员工荣誉 * * @param staffId 员工id * @throws SerException */ private void removeStaffHonors(String staffId) throws SerException { StaffHonorDTO dto = new StaffHonorDTO(); dto.getConditions().add(Restrict.eq("staffId", staffId)); List<StaffHonor> list = staffHonorSer.findByCis(dto); staffHonorSer.remove(list); } /** * 根据id删除个人简介,同时删除所有的从表数据 * * @param id 个人简介唯一标识 * @throws SerException */ @Override @Transactional public void remove(String id) throws SerException { removeSubObj(id); super.remove(id); } /** * 设置个人简介显示字段 * * @param username 用户名称数组 * @param to 个人简介显示字段 * @throws SerException */ @Override public void setIndividualDisplayField(String[] username, IndividualDisplayFieldTO to) throws SerException { Boolean usernameIsNotEmpty = (username != null) && (username.length > 0); if (usernameIsNotEmpty) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < username.length; i++) { if (i < username.length - 1) { sb.append(username[i]).append(","); } else { sb.append(username[i]); } } saveIndividualDisplayField(to, sb); } else { throw new SerException("您好,用户姓名为空,无法设置个人简介显示的字段"); } } /** * * * @param to * @param sb */ /** * 保存个人简介显示字段和显示的用户 * * @param to 个人简介显示字段to * @param sb 用户姓名to * @throws SerException */ private void saveIndividualDisplayField(IndividualDisplayFieldTO to, StringBuilder sb) throws SerException { IndividualDisplayField model = BeanTransform.copyProperties(to, IndividualDisplayField.class, true); model = individualDisplayFieldSer.save(model); String displayFieldId = model.getId();//获取个人简介显示字段 String usernameStr = sb.toString();//用户字符串集合 IndividualDisplayUser individualDisplayUser = new IndividualDisplayUser(); individualDisplayUser.setUsernames(usernameStr); individualDisplayUser.setDisplayId(displayFieldId); individualDisplayUserSer.save(individualDisplayUser);//保存显示的用户 } }
[ "sunfengtao_aj@163.com" ]
sunfengtao_aj@163.com
e074acce3326d874597116d35e4da5bfe4b807e9
fcd8980c24a71c43d2230ae9510a4cc973ef0100
/src/net/myapp/web/filters/AuthFilter.java
c0d7eedfbb42991f5d59c87cec76e290ddb56b9d
[]
no_license
funame/DCS
f8e0d06e8846535ccc46d06c67a3b88cf6f41b9a
12092117822e414c26d623c598f46003941ba417
refs/heads/master
2021-01-09T20:38:24.638840
2016-07-03T09:33:51
2016-07-03T09:33:51
61,878,163
0
0
null
null
null
null
UTF-8
Java
false
false
1,155
java
package net.myapp.web.filters; import javax.servlet.Filter; import javax.servlet.FilterChain; import javax.servlet.FilterConfig; import javax.servlet.ServletException; import javax.servlet.ServletRequest; import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.apache.log4j.MDC; import org.springframework.http.HttpRequest; import net.myapp.common.web.holders.RequestHolder; import net.myapp.common.web.holders.ResponseHolder; import net.myapp.common.web.holders.WebAuthHelper; public class AuthFilter implements Filter { public void init(FilterConfig config) throws ServletException { } public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws java.io.IOException, ServletException { if (!WebAuthHelper.isUserAuthenticated()) { HttpServletResponse httpResponse = (HttpServletResponse) response; httpResponse.sendRedirect("/DSC/panel/login"); return; } chain.doFilter(request,response); } public void destroy() { } }
[ "gfuname@gmail.com" ]
gfuname@gmail.com
566627201ab1dfde818c8e236d402fd091e1de89
36fe74c8853e5d122525816191c8b55ce6050f7a
/src/main/java/net/minecraft/world/level/block/EnderChestBlock.java
1aed16f69efbd9e0a85bbe35397de575184fbddd
[]
no_license
NicholasBlackburn1/Blackburn-1.18
07e8ddc20835f948959b022c5f74fcc0641f3baf
0e51f6e11590a747a2f33a0518c7abf79d5ef56e
refs/heads/main
2022-11-06T10:55:34.045865
2021-12-25T16:09:24
2021-12-25T16:09:24
441,702,689
1
1
null
null
null
null
UTF-8
Java
false
false
7,705
java
package net.minecraft.world.level.block; import java.util.Random; import javax.annotation.Nullable; import net.minecraft.core.BlockPos; import net.minecraft.core.Direction; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.network.chat.Component; import net.minecraft.network.chat.TranslatableComponent; import net.minecraft.server.level.ServerLevel; import net.minecraft.stats.Stats; import net.minecraft.world.InteractionHand; import net.minecraft.world.InteractionResult; import net.minecraft.world.SimpleMenuProvider; import net.minecraft.world.entity.monster.piglin.PiglinAi; import net.minecraft.world.entity.player.Player; import net.minecraft.world.inventory.ChestMenu; import net.minecraft.world.inventory.PlayerEnderChestContainer; import net.minecraft.world.item.context.BlockPlaceContext; import net.minecraft.world.level.BlockGetter; import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.level.block.entity.BlockEntity; import net.minecraft.world.level.block.entity.BlockEntityTicker; import net.minecraft.world.level.block.entity.BlockEntityType; import net.minecraft.world.level.block.entity.ChestBlockEntity; import net.minecraft.world.level.block.entity.EnderChestBlockEntity; import net.minecraft.world.level.block.state.BlockBehaviour; import net.minecraft.world.level.block.state.BlockState; import net.minecraft.world.level.block.state.StateDefinition; import net.minecraft.world.level.block.state.properties.BlockStateProperties; import net.minecraft.world.level.block.state.properties.BooleanProperty; import net.minecraft.world.level.block.state.properties.DirectionProperty; import net.minecraft.world.level.material.FluidState; import net.minecraft.world.level.material.Fluids; import net.minecraft.world.level.pathfinder.PathComputationType; import net.minecraft.world.phys.BlockHitResult; import net.minecraft.world.phys.shapes.CollisionContext; import net.minecraft.world.phys.shapes.VoxelShape; public class EnderChestBlock extends AbstractChestBlock<EnderChestBlockEntity> implements SimpleWaterloggedBlock { public static final DirectionProperty FACING = HorizontalDirectionalBlock.FACING; public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED; protected static final VoxelShape SHAPE = Block.box(1.0D, 0.0D, 1.0D, 15.0D, 14.0D, 15.0D); private static final Component CONTAINER_TITLE = new TranslatableComponent("container.enderchest"); protected EnderChestBlock(BlockBehaviour.Properties p_53121_) { super(p_53121_, () -> { return BlockEntityType.ENDER_CHEST; }); this.registerDefaultState(this.stateDefinition.any().setValue(FACING, Direction.NORTH).setValue(WATERLOGGED, Boolean.valueOf(false))); } public DoubleBlockCombiner.NeighborCombineResult<? extends ChestBlockEntity> combine(BlockState p_53149_, Level p_53150_, BlockPos p_53151_, boolean p_53152_) { return DoubleBlockCombiner.Combiner::acceptNone; } public VoxelShape getShape(BlockState p_53171_, BlockGetter p_53172_, BlockPos p_53173_, CollisionContext p_53174_) { return SHAPE; } public RenderShape getRenderShape(BlockState p_53169_) { return RenderShape.ENTITYBLOCK_ANIMATED; } public BlockState getStateForPlacement(BlockPlaceContext p_53128_) { FluidState fluidstate = p_53128_.getLevel().getFluidState(p_53128_.getClickedPos()); return this.defaultBlockState().setValue(FACING, p_53128_.getHorizontalDirection().getOpposite()).setValue(WATERLOGGED, Boolean.valueOf(fluidstate.getType() == Fluids.WATER)); } public InteractionResult use(BlockState p_53137_, Level p_53138_, BlockPos p_53139_, Player p_53140_, InteractionHand p_53141_, BlockHitResult p_53142_) { PlayerEnderChestContainer playerenderchestcontainer = p_53140_.getEnderChestInventory(); BlockEntity blockentity = p_53138_.getBlockEntity(p_53139_); if (playerenderchestcontainer != null && blockentity instanceof EnderChestBlockEntity) { BlockPos blockpos = p_53139_.above(); if (p_53138_.getBlockState(blockpos).isRedstoneConductor(p_53138_, blockpos)) { return InteractionResult.sidedSuccess(p_53138_.isClientSide); } else if (p_53138_.isClientSide) { return InteractionResult.SUCCESS; } else { EnderChestBlockEntity enderchestblockentity = (EnderChestBlockEntity)blockentity; playerenderchestcontainer.setActiveChest(enderchestblockentity); p_53140_.openMenu(new SimpleMenuProvider((p_53124_, p_53125_, p_53126_) -> { return ChestMenu.threeRows(p_53124_, p_53125_, playerenderchestcontainer); }, CONTAINER_TITLE)); p_53140_.awardStat(Stats.OPEN_ENDERCHEST); PiglinAi.angerNearbyPiglins(p_53140_, true); return InteractionResult.CONSUME; } } else { return InteractionResult.sidedSuccess(p_53138_.isClientSide); } } public BlockEntity newBlockEntity(BlockPos p_153208_, BlockState p_153209_) { return new EnderChestBlockEntity(p_153208_, p_153209_); } @Nullable public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level p_153199_, BlockState p_153200_, BlockEntityType<T> p_153201_) { return p_153199_.isClientSide ? createTickerHelper(p_153201_, BlockEntityType.ENDER_CHEST, EnderChestBlockEntity::lidAnimateTick) : null; } public void animateTick(BlockState p_53144_, Level p_53145_, BlockPos p_53146_, Random p_53147_) { for(int i = 0; i < 3; ++i) { int j = p_53147_.nextInt(2) * 2 - 1; int k = p_53147_.nextInt(2) * 2 - 1; double d0 = (double)p_53146_.getX() + 0.5D + 0.25D * (double)j; double d1 = (double)((float)p_53146_.getY() + p_53147_.nextFloat()); double d2 = (double)p_53146_.getZ() + 0.5D + 0.25D * (double)k; double d3 = (double)(p_53147_.nextFloat() * (float)j); double d4 = ((double)p_53147_.nextFloat() - 0.5D) * 0.125D; double d5 = (double)(p_53147_.nextFloat() * (float)k); p_53145_.addParticle(ParticleTypes.PORTAL, d0, d1, d2, d3, d4, d5); } } public BlockState rotate(BlockState p_53157_, Rotation p_53158_) { return p_53157_.setValue(FACING, p_53158_.rotate(p_53157_.getValue(FACING))); } public BlockState mirror(BlockState p_53154_, Mirror p_53155_) { return p_53154_.rotate(p_53155_.getRotation(p_53154_.getValue(FACING))); } protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> p_53167_) { p_53167_.add(FACING, WATERLOGGED); } public FluidState getFluidState(BlockState p_53177_) { return p_53177_.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(p_53177_); } public BlockState updateShape(BlockState p_53160_, Direction p_53161_, BlockState p_53162_, LevelAccessor p_53163_, BlockPos p_53164_, BlockPos p_53165_) { if (p_53160_.getValue(WATERLOGGED)) { p_53163_.scheduleTick(p_53164_, Fluids.WATER, Fluids.WATER.getTickDelay(p_53163_)); } return super.updateShape(p_53160_, p_53161_, p_53162_, p_53163_, p_53164_, p_53165_); } public boolean isPathfindable(BlockState p_53132_, BlockGetter p_53133_, BlockPos p_53134_, PathComputationType p_53135_) { return false; } public void tick(BlockState p_153203_, ServerLevel p_153204_, BlockPos p_153205_, Random p_153206_) { BlockEntity blockentity = p_153204_.getBlockEntity(p_153205_); if (blockentity instanceof EnderChestBlockEntity) { ((EnderChestBlockEntity)blockentity).recheckOpen(); } } }
[ "nickblackburn02@gmail.com" ]
nickblackburn02@gmail.com
6d1d5dac30b2b5b7b22cb3431515460346b72c31
863dedf11d53f5e49b010ec3b892e546948e7248
/AI_Pathfinding-master/src/Model/UCSComparator.java
efd41beb29ba4039d94246665060c70ee2b9f81c
[]
no_license
aj470/AI_PathFinding
d007fc45d70dc4508ff6fc0e30e6e903c73406c5
6c86587fa48360616aa9c280e5cd20ce9f0de15a
refs/heads/master
2021-06-28T21:07:42.800285
2017-09-19T18:49:35
2017-09-19T18:49:35
104,113,990
0
0
null
null
null
null
UTF-8
Java
false
false
315
java
package Model; import java.util.Comparator; public class UCSComparator implements Comparator<Node> { public int compare(Node m, Node n) { if(m.totalCost < n.totalCost) return -1; else if(m.totalCost > n.totalCost) return 1; return 0; } }
[ "noreply@github.com" ]
aj470.noreply@github.com
9a9cfc64d56ae34f623099e471edcd57e05b6ea7
a4b4072eb5eb464c04f4cfa6e08c8f93f8c1f65d
/test/test/sort/TestQuick.java
e93c8e14d858a071ed5fc4179ae8975d9efebcc4
[]
no_license
larodriguez22/T3_201920
f0c702bf347d2b92ff7e997e01f66ff9f35c6d10
b94e51a3657111edbbd4dd5ad4ee73b61055e4b8
refs/heads/master
2020-07-20T16:32:27.162866
2019-09-12T21:53:04
2019-09-12T21:53:04
206,678,081
0
1
null
null
null
null
UTF-8
Java
false
false
1,192
java
package test.sort; import model.sort.QuickPedantic; public class TestQuick { private Comparable[] arreglo; private static int TAMANO=5; private QuickPedantic organizador; public void setUp1() { arreglo= new Comparable[TAMANO]; } public void setUp2() { for(int i =0; i< TAMANO; i++){ if(i%2==0){ arreglo[i]=i; } else{ arreglo[i]=i*2; } } QuickPedantic organizador=new QuickPedantic(); } public void setUp3(){ for(int i =0; i< TAMANO; i++){ arreglo[i]=i; } } public void setUp4(){ int j=0; for(int i =TAMANO; i> TAMANO; i--){ arreglo[j]=i; j++; } } public void TestSort(){ setUp2(); Comparable aux[]={0,1,2,3,4}; organizador.sort(arreglo); for (int i=0;i<TAMANO;i++){ assert equals(arreglo[i]==aux[i]); } } public void TestSort2(){ setUp3(); Comparable aux[]={0,1,2,3,4}; organizador.sort(arreglo); for (int i=0;i<TAMANO;i++){ assert equals(arreglo[i]==aux[i]); } } public void TestSort3(){ setUp4(); Comparable aux[]={0,1,2,3,4}; organizador.sort(arreglo); for (int i=0;i<TAMANO;i++){ assert equals(arreglo[i]==aux[i]); } } }
[ "53950964+josefuentes9@users.noreply.github.com" ]
53950964+josefuentes9@users.noreply.github.com
eec0868e451198271d6789376e9de424d8d614a8
694d574b989e75282326153d51bd85cb8b83fb9f
/google-ads/src/main/java/com/google/ads/googleads/v1/resources/MediaBundleOrBuilder.java
a2331079a31cc4b543fbb49ebec6f758680fc53e
[ "Apache-2.0" ]
permissive
tikivn/google-ads-java
99201ef20efd52f884d651755eb5a3634e951e9b
1456d890e5c6efc5fad6bd276b4a3cd877175418
refs/heads/master
2023-08-03T13:02:40.730269
2020-07-17T16:33:40
2020-07-17T16:33:40
280,845,720
0
0
Apache-2.0
2023-07-23T23:39:26
2020-07-19T10:51:35
null
UTF-8
Java
false
true
841
java
// Generated by the protocol buffer compiler. DO NOT EDIT! // source: google/ads/googleads/v1/resources/media_file.proto package com.google.ads.googleads.v1.resources; public interface MediaBundleOrBuilder extends // @@protoc_insertion_point(interface_extends:google.ads.googleads.v1.resources.MediaBundle) com.google.protobuf.MessageOrBuilder { /** * <pre> * Raw zipped data. * </pre> * * <code>.google.protobuf.BytesValue data = 1;</code> */ boolean hasData(); /** * <pre> * Raw zipped data. * </pre> * * <code>.google.protobuf.BytesValue data = 1;</code> */ com.google.protobuf.BytesValue getData(); /** * <pre> * Raw zipped data. * </pre> * * <code>.google.protobuf.BytesValue data = 1;</code> */ com.google.protobuf.BytesValueOrBuilder getDataOrBuilder(); }
[ "nwbirnie@gmail.com" ]
nwbirnie@gmail.com
6323374ebb91e6981d973a51de026633777b5c1b
97d95ad49efb83a2e5be5df98534dc777a955154
/products/ITER/plugins/org.csstudio.iter.startuphelper/src/org/csstudio/iter/startuphelper/WorkspacePrompt.java
89728ec3743faa4299e3debb179dff5a64ebddcf
[]
no_license
bekumar123/cs-studio
61aa64d30bce53b22627a3d98237d40531cf7789
bc24a7e2d248522af6b2983588be3b72d250505f
refs/heads/master
2021-01-21T16:39:14.712040
2014-01-27T15:30:23
2014-01-27T15:30:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
9,330
java
/******************************************************************************* * Copyright (c) 2010 Oak Ridge National Laboratory. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html ******************************************************************************/ package org.csstudio.iter.startuphelper; import java.io.File; import java.io.IOException; import java.net.URL; import java.util.Map; import org.csstudio.platform.workspace.WorkspaceIndependentStore; import org.csstudio.platform.workspace.WorkspaceInfo; import org.csstudio.startup.module.LoginExtPoint; import org.csstudio.startup.module.WorkspaceExtPoint; import org.csstudio.utility.product.StartupParameters; import org.eclipse.core.runtime.Platform; import org.eclipse.equinox.app.IApplication; import org.eclipse.equinox.app.IApplicationContext; import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.osgi.service.datalocation.Location; import org.eclipse.osgi.util.NLS; import org.eclipse.swt.widgets.Display; /** * * <code>WorkspacePromptExtPointImpl</code> uses the startup parameters which * define the default workspace and tries to set that url as the workspace for * the application. This implementation expects the following parameters * {@value LoginExtPoint#USERNAME}, {@value LoginExtPoint#PASSWORD}, * {@value StartupParameters#FORCE_WORKSPACE_PROMPT_PARAM}, and * {@link WorkspaceExtPoint#WORKSPACE}. * * @author <a href="mailto:jaka.bobnar@cosylab.com">Jaka Bobnar</a> * */ public class WorkspacePrompt implements WorkspaceExtPoint { /* * (non-Javadoc) * @see org.csstudio.startup.extensions.WorkspacePromptExtPoint#promptForWorkspace(org.eclipse.swt.widgets.Display, org.eclipse.equinox.app.IApplicationContext, java.util.Map) */ @Override public Object promptForWorkspace(Display display, IApplicationContext context, Map<String, Object> parameters) { Object o = parameters.get(StartupParameters.LOGIN_PROMPT_PARAM); final boolean login = o != null ? (Boolean)o : false; o = parameters.get(LoginExtPoint.USERNAME); final String username = o != null ? (String)o : null; o = parameters.get(LoginExtPoint.PASSWORD); final String password = o != null ? (String)o : null; o = parameters.get(StartupParameters.FORCE_WORKSPACE_PROMPT_PARAM); final boolean force_workspace_prompt = o != null ? (Boolean)o : false; o = parameters.get(WorkspaceExtPoint.WORKSPACE); final URL default_workspace = o != null ? (URL)o : null; if (! checkInstanceLocation(login, force_workspace_prompt, default_workspace, username, password, parameters)) { // The <code>stop()</code> routine of many UI plugins writes // the current settings to the workspace. // Even though we have not yet opened any workspace, that would // open, even create the default workspace. // So exit right away: System.exit(0); // .. instead of: //Platform.endSplash(); return IApplication.EXIT_OK; } return null; } /** Check or select the workspace. * <p> * See IDEApplication code from org.eclipse.ui.internal.ide.application * in version 3.3. * That example uses a "Shell" argument, but also has a comment about * bug 84881 and thus not using the shell to force the dialogs to be * top-level, so we skip the shell altogether. * <p> * Note that we must be very careful with anything that sets the workspace. * For example, initializing a logger from preferences * activates the default workspace, after which we can no * longer change it... * @param show_login Show the login (user/password) dialog? * @param force_prompt Set <code>true</code> in a Control Room * setting where the initial suggestion is always the "default" * workspace, and there is no way to suppress the "ask again" option. * Set <code>false</code> in an Office setting where users can * uncheck the "ask again" option and use the last workspace as * a default. * @param default_workspace Default to use * @param username the username to access the workspace * @param password the password for the given username * @return <code>true</code> if all OK */ private boolean checkInstanceLocation(boolean show_login, final boolean force_prompt, URL default_workspace, String username, String password, Map<String, Object> parameters) { // Was "-data @none" specified on command line? final Location instanceLoc = Platform.getInstanceLocation(); if (instanceLoc == null) { MessageDialog.openError(null, "No workspace", //$NON-NLS-1$ "Cannot run without a workspace"); //$NON-NLS-1$ return false; } // -data "/some/path" was provided... if (instanceLoc.isSet()) { try { // Lock if (instanceLoc.lock()) return true; // Two possibilities: // 1. directory is already in use // 2. directory could not be created final File ws_dir = new File(instanceLoc.getURL().getFile()); if (ws_dir.exists()) MessageDialog.openError(null, org.csstudio.platform.workspace.Messages.Workspace_InUseErrorTitle, NLS.bind(org.csstudio.platform.workspace.Messages.Workspace_InUseError, ws_dir.getCanonicalPath())); else MessageDialog.openError(null, org.csstudio.platform.workspace.Messages.Workspace_DirectoryErrorTitle, org.csstudio.platform.workspace.Messages.Workspace_DirectoryError); } catch (IOException ex) { MessageDialog.openError(null, org.csstudio.platform.workspace.Messages.Workspace_LockErrorTitle, org.csstudio.platform.workspace.Messages.Workspace_LockError + ex.getMessage()); } return false; } // -data @noDefault or -data not specified, prompt and set if (default_workspace == null) default_workspace = instanceLoc.getDefault(); final WorkspaceInfo workspace_info = new WorkspaceInfo(default_workspace, !force_prompt); // Prompt in any case? Or did user decide to be asked again? boolean show_Workspace = force_prompt | workspace_info.getShowDialog(); //if no user name provided, display last login user. if(username == null) username = WorkspaceIndependentStore.readLastLoginUser(); //initialize startupHelper StartupHelper startupHelper = new StartupHelper(null, force_prompt, workspace_info, username, password, show_login, show_Workspace); while (true) { startupHelper.setShow_Login(show_login); startupHelper.setShow_Workspace(show_Workspace); if (show_Workspace || show_login) { if (! startupHelper.openStartupDialog()) return false; // canceled //get user name and password from startup dialog if(show_login) { username = startupHelper.getUserName(); password = startupHelper.getPassword(); } } // In case of errors, we will have to ask the workspace, // but don't bother to ask user name and password again. show_Workspace = true; show_login = false; try { // the operation will fail if the url is not a valid // instance data area, so other checking is unneeded URL workspaceUrl = new URL("file:" + workspace_info.getSelectedWorkspace()); //$NON-NLS-1$ if (instanceLoc.set(workspaceUrl, true)) // set & lock { workspace_info.writePersistedData(); parameters.put(WORKSPACE, workspaceUrl); return true; } } catch (Exception ex) { MessageDialog.openError(null, org.csstudio.platform.workspace.Messages.Workspace_GenericErrorTitle, org.csstudio.platform.workspace.Messages.Workspace_GenericError + ex.getMessage()); return false; } // by this point it has been determined that the workspace is // already in use -- force the user to choose again show_login = false; MessageDialog.openError(null, org.csstudio.platform.workspace.Messages.Workspace_InUseErrorTitle, NLS.bind(org.csstudio.platform.workspace.Messages.Workspace_InUseError, workspace_info.getSelectedWorkspace())); } } }
[ "frederic.arnaud@iter.org" ]
frederic.arnaud@iter.org
3bf70c8d395343cdade300f5cb1f939e296f47a2
8d3536a5ead989c4b29c7c0a0dd1e50e4c7f141f
/app/src/main/java/com/ylr/hyy/mvp/view/activity/me/MeSettingSafetyForgetLoginPasswordActivity.java
952b1708290a0b7af04874841d4c4ef2262962e5
[]
no_license
DohYou/WX
15bc534b8a51a505a12d6f18618bdd9dad2a09a4
4ea54dccf3b7ba936df60586c9aebbc84483f07c
refs/heads/master
2022-12-01T20:35:50.595799
2020-08-11T16:24:11
2020-08-11T16:24:11
283,252,611
0
0
null
null
null
null
UTF-8
Java
false
false
2,486
java
package com.ylr.hyy.mvp.view.activity.me; import android.view.View; import android.widget.FrameLayout; import android.widget.ImageView; import android.widget.RelativeLayout; import android.widget.TextView; import com.ylr.hyy.R; import com.ylr.hyy.base.BaseActivity; import com.ylr.hyy.base.BaseContract; import butterknife.BindView; import butterknife.OnClick; /** * 我的设置 安全 忘记登录密码 */ public class MeSettingSafetyForgetLoginPasswordActivity extends BaseActivity { @BindView(R.id.iv_title_return) ImageView ivTitleReturn; @BindView(R.id.tv_title_name) TextView tvTitleName; @BindView(R.id.fl_me_setting_safety_forget_password1) FrameLayout flMeSettingSafetyForgetPassword1; @BindView(R.id.rl_me_setting_safety_forgetpassword_getcode) RelativeLayout rlMeSettingSafetyForgetpasswordGetcode; @BindView(R.id.fl_me_setting_safety_forget_password2) FrameLayout flMeSettingSafetyForgetPassword2; @BindView(R.id.fl_me_setting_safety_forget_password3) FrameLayout flMeSettingSafetyForgetPassword3; @BindView(R.id.fl_me_setting_safety_forget_password4) FrameLayout flMeSettingSafetyForgetPassword4; @Override protected int getLayoutId() { return R.layout.activity_me_setting_safety_forgetloginpassword; } @Override protected void initWindow() { } @Override protected BaseContract.BasePresenter initPresenter() { return null; } @Override protected void initViews() { } @Override protected void initDatas() { tvTitleName.setText("忘记密码"); } @OnClick({R.id.iv_title_return, R.id.fl_me_setting_safety_forget_password1, R.id.rl_me_setting_safety_forgetpassword_getcode, R.id.fl_me_setting_safety_forget_password2, R.id.fl_me_setting_safety_forget_password3, R.id.fl_me_setting_safety_forget_password4}) public void onViewClicked(View view) { switch (view.getId()) { case R.id.iv_title_return: finish(); break; case R.id.fl_me_setting_safety_forget_password1: break; case R.id.rl_me_setting_safety_forgetpassword_getcode: break; case R.id.fl_me_setting_safety_forget_password2: break; case R.id.fl_me_setting_safety_forget_password3: break; case R.id.fl_me_setting_safety_forget_password4: break; } } }
[ "760682585@qq.com" ]
760682585@qq.com
718b0b2b0038eeb0a889d7acf5f8ed4c23697723
feb960fb07780cad12164ffe7564e8968fbd6628
/app/src/main/java/com/example/jtsuser/securityapp/Security/Fragment/SCurrentFragment.java
1dafd85159b7be94d79879453d4d9577206b5642
[]
no_license
prasanneswari/Gate_App-Sceurity_app-
52387432009847400d095ad61d02841a72aa96c9
41c5f64362a799fdc2b1ca70db73d5cc2f64cf85
refs/heads/master
2020-05-02T21:15:17.114612
2019-03-29T09:12:37
2019-03-29T09:12:37
178,215,071
0
0
null
null
null
null
UTF-8
Java
false
false
1,345
java
package com.example.jtsuser.securityapp.Security.Fragment; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ListView; import com.example.jtsuser.securityapp.R; import com.example.jtsuser.securityapp.Security.Adapter.CustomAdapter; public class SCurrentFragment extends Fragment { ListView listView; String[] names={"AnjiReddy","BuchiBabu","Ramesh","Sunil","Mahesh"}; String[] number={"9010168075","9010168076","8801914985","9573240927","801914985"}; String[] add={"Hyderabad","SRnagar","Ameerpet","Panjagutta","Dilsukunagar"}; String[] date={"12-01-2019","13-01-2019","02/Jan/2018","02/Jan/2019","05-09-2019"}; @Nullable @Override public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { View view=inflater.inflate(R.layout.fragment_current,container,false); listView=(ListView)view.findViewById(R.id.list_view); CustomAdapter adapter=new CustomAdapter(getContext(),names,number,add,date); listView.setAdapter(adapter); return view; } }
[ "prasanna.mukkara01@gmail.com" ]
prasanna.mukkara01@gmail.com
16b91d6cd9fa990dea86dee8fa5712ef93f83a57
00b92a437aabf142adf49b87f176e4f2ab5442a1
/app/src/main/java/com/example/facecar20/NewPin.java
db948cb81469b4cb30f57e32318989e05f4d176b
[]
no_license
DaksheenGamage/FaceCar2.0
dcfc939ab1bdd3dd82b270dfbb906b541ab42976
3fbb43c703fc4f9bfe6b5e32b56fc9df4f0792f0
refs/heads/main
2023-01-07T03:11:39.370602
2020-11-11T09:00:31
2020-11-11T09:00:31
311,807,507
0
0
null
null
null
null
UTF-8
Java
false
false
2,676
java
package com.example.facecar20; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; public class NewPin extends AppCompatActivity { EditText txtPin,txtCPin; Button btnPin; SharedPreferences prf; String USETTYPE; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_new_pin); prf = getSharedPreferences("LogDetails",MODE_PRIVATE); txtCPin=findViewById(R.id.txtNewPinConfirm); txtPin=findViewById(R.id.txtNewPinPin); btnPin=findViewById(R.id.btnNewPinCreate); USETTYPE=prf.getString("LOGEDACC",""); btnPin.setOnClickListener(btnPinListner); } private View.OnClickListener btnPinListner = new View.OnClickListener() { public void onClick(View view) { String pin = txtPin .getText().toString().trim(); String cpin = txtCPin .getText().toString().trim(); if(!pin.equals("") && !cpin.equals("") && pin.length()==4 && cpin.length()==4){ if(cpin.equals(pin)){ String username = prf.getString("USERNAME",""); SharedPreferences.Editor editor = prf.edit(); editor.putString("PIN"+username,pin); editor.commit(); if(USETTYPE.equals("O")){ Intent intent = new Intent(getApplicationContext(), OwnerDashboard.class); startActivity(intent); }else if(USETTYPE.equals("M")){ Intent intent = new Intent(getApplicationContext(), MemberDashboard.class); startActivity(intent); } }else { txtPin.setError("PINs don't match"); txtCPin.setError("PINs don't match"); } } else { if(pin.equals("")){ txtPin.setError("PIN cannot be empty"); } if(cpin.equals("")){ txtCPin.setError("confirm PIN cannot be empty"); } if(pin.length()<4){ txtPin.setError("PIN must be 4 digits"); } if(cpin.length()<4){ txtCPin.setError("PIN must be 4 digits"); } } } }; @Override public void onBackPressed() {} }
[ "dak970612@gmail.com" ]
dak970612@gmail.com
4cac5fb9f5b03d72fb9d8fc3042314f6b158d9a5
1b41c0728060cda7380affa1555041742408f027
/shopping_basket_specs/MoneyOffTest.java
204604873c7e0472c63024737a9084ea1d6b0e25
[]
no_license
hatwell/shopping_basket_code_test
0460d04684eb2b69dc6a73d700b78d3d211c2a4d
a0cd4564847042d0a6e5b5b119b891cd6e915889
refs/heads/master
2021-01-20T14:23:40.504014
2017-05-08T08:11:17
2017-05-08T08:11:17
90,602,650
0
0
null
null
null
null
UTF-8
Java
false
false
453
java
import org.junit.*; import shopping_basket.*; import static org.junit.Assert.*; public class MoneyOffTest { MoneyOff moneyOff; Item item; @Before public void before(){ moneyOff = new MoneyOff(); item = new Item("chocolate", 1.00, Category.FOOD); } @Test public void testPercentageDiscountApplied(){ double newPrice = 0.80; moneyOff.percentageDiscount(20, item); assertEquals(newPrice, item.getPrice(), 0.01); } }
[ "caroline.hatwell@gmail.com" ]
caroline.hatwell@gmail.com
2baaa0d6e4e59f64c373819a82495782b3f6b033
ca7da6499e839c5d12eb475abe019370d5dd557d
/servlet-api/src/main/java/javax/servlet/annotation/HttpMethodConstraint.java
a70acca9e1a6317785989e031de98430da2f1806
[ "Apache-2.0" ]
permissive
yangfancoming/spring-5.1.x
19d423f96627636a01222ba747f951a0de83c7cd
db4c2cbcaf8ba58f43463eff865d46bdbd742064
refs/heads/master
2021-12-28T16:21:26.101946
2021-12-22T08:55:13
2021-12-22T08:55:13
194,103,586
0
1
null
null
null
null
UTF-8
Java
false
false
2,885
java
package javax.servlet.annotation; import javax.servlet.annotation.ServletSecurity.EmptyRoleSemantic; import javax.servlet.annotation.ServletSecurity.TransportGuarantee; import java.lang.annotation.Documented; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; /** * This annotation is used within the {@link ServletSecurity} annotation to * represent security constraints on specific HTTP protocol messages. * * @since Servlet 3.0 */ @Documented @Retention(RetentionPolicy.RUNTIME) public @interface HttpMethodConstraint { /** * Http protocol method name * * @return the name of an HTTP protocol method. <code>value</code> * may not be null, or the empty string, and must be a * legitimate HTTP Method name as defined by RFC 2616. */ String value(); /** * The default authorization semantic. * This value is insignificant when <code>rolesAllowed</code> returns a * non-empty array, and should not be specified when a non-empty * array is specified for <tt>rolesAllowed</tt>. * * @return the {@link EmptyRoleSemantic} to be applied when * <code>rolesAllowed</code> returns an empty (that is, zero-length) array. */ EmptyRoleSemantic emptyRoleSemantic() default EmptyRoleSemantic.PERMIT; /** * The data protection requirements (i.e., whether or not SSL/TLS is * required) that must be satisfied by the connections on which requests * arrive. * * @return the {@link TransportGuarantee} * indicating the data protection that must be provided by the connection. */ TransportGuarantee transportGuarantee() default TransportGuarantee.NONE; /** * The names of the authorized roles. * * Duplicate role names appearing in rolesAllowed are insignificant and * may be discarded during runtime processing of the annotation. The String * <tt>"*"</tt> has no special meaning as a role name (should it occur in * rolesAllowed). * * @return an array of zero or more role names. When the array contains * zero elements, its meaning depends on the value returned by * <code>emptyRoleSemantic</code>. If <code>emptyRoleSemantic</code> returns * <tt>DENY</tt>, and <code>rolesAllowed</code> returns a zero length array, * access is to be denied independent of authentication state and identity. * Conversely, if <code>emptyRoleSemantic</code> returns * <code>PERMIT</code>, it indicates that access is to be allowed * independent of authentication state and identity. When the array * contains the names of one or more roles, it indicates that access is * contingent on membership in at least one of the named roles (independent * of the value returned by <code>emptyRoleSemantic</code>). */ String[] rolesAllowed() default {}; }
[ "34465021+jwfl724168@users.noreply.github.com" ]
34465021+jwfl724168@users.noreply.github.com
0cddf8fcfa9e21b6831fdc1a7828059f841701f1
b3f518567b56935263a9d06ba9e27e3d536fc5d9
/src/demo/cooper/prototype/ElfBeast.java
579638235923d626f93bdcb37e2d2b19a00e302d
[]
no_license
Cooperwl/disign-pattern
13a0dea7dea86461f958aed91c70c95964301a52
64b0f61b064b5cf118c66162adafc5c2d12f7c2a
refs/heads/master
2021-01-20T18:07:35.762632
2016-08-10T06:00:37
2016-08-10T06:00:37
65,354,801
0
0
null
null
null
null
UTF-8
Java
false
false
299
java
package demo.cooper.prototype; /** * * ElfBeast * */ public class ElfBeast extends Beast { public ElfBeast() {} @Override public Beast clone() throws CloneNotSupportedException { return new ElfBeast(); } @Override public String toString() { return "Elven eagle"; } }
[ "wang_lianglove@163.com" ]
wang_lianglove@163.com
4117c0bfa67d48f0463a44bacaf65f5648c95e7b
41fa0b9b224d74d18b192f22fce8d4562a3aed34
/data/codingbat-solution/Array2Twotwo.java
bcfd9569d100cf13d34126f151849347c3741f5e
[]
no_license
Jisoo-Min/Graph-Match
7f4e09ffa8e46bdfd058d4f0affa01109bf0d9bd
0975de0092348912aaea3351be744ad8b08822af
refs/heads/master
2022-04-09T17:46:51.610100
2020-01-25T06:19:38
2020-01-25T06:19:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
621
java
class Array2Twotwo{ /* Given an array of ints, return true if every 2 that appears in the array * is next to another 2. */ public boolean twoTwo(int[] nums) { if(nums.length == 1 && nums[0] == 2) return false; if(nums.length >= 2 && ((nums[0] == 2 && nums[1] != 2) || (nums[nums.length-1] == 2 && nums[nums.length-2] != 2))) return false; for(int i = 1; i <= nums.length - 2; i++) { if(nums[i] == 2 && nums[i-1] != 2 && nums[i+1] != 2) return false; } return true; } }
[ "jsmin0415@gmail.com" ]
jsmin0415@gmail.com
3caa46d40c4643ac470e51d542afe6d80ce8f5f0
3111e7d185e06b28d82779577d7cf6ae5a0ede15
/src/com/java8/Vehicle.java
ae6abdbe15f2534bef1e8c5fdd7eff4dc79907ae
[]
no_license
Mercymoy17/java8features
95b64162a8f9a5db0805559abdbd069389064ffc
6c7bb99d6fe1d0b063a30173344cbbb2fced3c90
refs/heads/master
2023-02-14T13:39:34.136662
2021-01-12T23:55:29
2021-01-12T23:55:29
329,128,223
0
0
null
null
null
null
UTF-8
Java
false
false
99
java
package com.java8; public interface Vehicle { //method public String drive(); }
[ "mercymoy.gurmesa@infosys.com" ]
mercymoy.gurmesa@infosys.com
fb51b7bc4a7f55a4e96db1b1cd739f009765b33a
e7b02a43b51d007451bd6b71df2f23d657cae347
/src/jp/gr/java_conf/ricfoi/gui/MenuBar.java
2e1b8a9b92079a7e91e2bbd88e0e6e7a255e2fb2
[]
no_license
ohashi-hironori/Ricfoi
70570e24ba18e65761b7a3edca9dede1e97e6716
9bc6b0cbe6e3d395d0ed9dbc6f5119bccbe15b8c
refs/heads/master
2021-01-22T10:08:51.189865
2015-01-29T03:20:59
2015-01-29T03:20:59
29,998,676
0
0
null
null
null
null
UTF-8
Java
false
false
1,956
java
package jp.gr.java_conf.ricfoi.gui; import java.awt.event.KeyEvent; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.JSeparator; import jp.gr.java_conf.ricfoi.action.AboutAction; import jp.gr.java_conf.ricfoi.action.ConfigureAction; import jp.gr.java_conf.ricfoi.action.ExportAction; import jp.gr.java_conf.ricfoi.action.NewAction; import jp.gr.java_conf.ricfoi.action.OpenAction; import jp.gr.java_conf.ricfoi.action.QuitAction; import jp.gr.java_conf.ricfoi.action.RenderAction; import jp.gr.java_conf.ricfoi.action.SaveAction; import jp.gr.java_conf.ricfoi.action.SaveAsAction; public class MenuBar extends JMenuBar { private static final long serialVersionUID = 1L; MenuBar() { super(); add(new FileMenu()); add(new SetupMenu()); add(new HelpMenu()); } class FileMenu extends JMenu { private static final long serialVersionUID = 1L; private static final String LABEL = "File"; FileMenu() { super(LABEL); setMnemonic(KeyEvent.VK_F); add(new JMenuItem(new NewAction())); add(new JMenuItem(new OpenAction())); add(new JMenuItem(new SaveAction())); add(new JMenuItem(new SaveAsAction())); add(new JSeparator()); add(new JMenuItem(new ExportAction())); add(new JMenuItem(new RenderAction())); add(new JSeparator()); add(new JMenuItem(new QuitAction())); } } class SetupMenu extends JMenu { private static final long serialVersionUID = 1L; private static final String LABEL = "Setup"; SetupMenu() { super(LABEL); setMnemonic(KeyEvent.VK_S); add(new JMenuItem(new ConfigureAction())); } } class HelpMenu extends JMenu { private static final long serialVersionUID = 1L; private static final String LABEL = "Help"; HelpMenu() { super(LABEL); setMnemonic(KeyEvent.VK_H); add(new JMenuItem(new AboutAction())); } } }
[ "大橋 弘典@Ohashi_Hironori" ]
大橋 弘典@Ohashi_Hironori
8fd7fd603c03293f63722f873c9d5c87741e2297
9242467580a720b96d46ca676a746af099058679
/app/src/main/java/com/fendoudebb/playandroid/module/api/ApiFactory.java
6117e4ca302c1283cbac6124fb274151720f5ea0
[ "Apache-2.0" ]
permissive
fendoudebb/PlayAndroid
8132ba9da5eb035ec91e29fe2492c73945d51354
ba135c17353780360ace35cc8d610e646b9aac7a
refs/heads/master
2021-01-22T15:00:34.874865
2017-12-01T10:22:54
2017-12-01T10:22:54
100,719,105
3
0
null
null
null
null
UTF-8
Java
false
false
458
java
package com.fendoudebb.playandroid.module.api; /** * author : zbj on 2017/10/3 12:12. */ public class ApiFactory { private static GankApi gankApi = null; public static GankApi getGankApi() { if (gankApi == null) { synchronized (ApiFactory.class) { if (gankApi == null) { gankApi = new ApiRetrofit().getGankApi(); } } } return gankApi; } }
[ "15821722108@163.com" ]
15821722108@163.com
665d98b17534db837e2ebf44d19046501415771f
f4a6115befaff6b6da3fc5d0f5cbf355f0cc4e93
/monitor/src/main/java/entities/Semaphore.java
88325777462c44344804bba09f0a5a4dea3a6f14
[]
no_license
ezambomsantana/smart-city-simulator
4bae66661d0d78acb2560b9a70948af9dac4d46f
ec5fdd8096b216ab0b59e4b56bb97cbd3b0a4c0a
refs/heads/master
2022-06-07T09:25:21.094116
2022-05-20T21:46:26
2022-05-20T21:46:26
42,735,345
4
4
null
2022-05-20T21:46:26
2015-09-18T17:00:02
Erlang
UTF-8
Java
false
false
821
java
package entities; public class Semaphore { private String color1; private float lat1; private float lon1; private String color2; private float lat2; private float lon2; public String getColor1() { return color1; } public void setColor1(String color1) { this.color1 = color1; } public float getLat1() { return lat1; } public void setLat1(float lat1) { this.lat1 = lat1; } public float getLon1() { return lon1; } public void setLon1(float lon1) { this.lon1 = lon1; } public String getColor2() { return color2; } public void setColor2(String color2) { this.color2 = color2; } public float getLat2() { return lat2; } public void setLat2(float lat2) { this.lat2 = lat2; } public float getLon2() { return lon2; } public void setLon2(float lon2) { this.lon2 = lon2; } }
[ "ezambomsantana@gmail.com" ]
ezambomsantana@gmail.com
98f1e705982c344373710f249394f98d1b6b6087
cd7fbe3b9e41c6ff45b770da26f1e1e06f063fd4
/DaysMatterProject/DaysMatter/src/main/java/com/tisa7/daysmatter/MainActivity.java
6f3c76c6d89b117a52ce719cf49e71321bd8b47e
[ "Apache-2.0" ]
permissive
tisa007/days_matter
4b90665b9c5d72779d48a8f786b4f64951308565
d6dad59a6199b953b86414bc2ca64fc897ec9738
refs/heads/master
2021-01-22T04:34:17.932529
2013-08-10T01:16:16
2013-08-10T01:16:16
11,997,499
2
0
null
null
null
null
UTF-8
Java
false
false
2,233
java
package com.tisa7.daysmatter; import android.app.ActionBar; import android.os.Bundle; import android.os.Looper; import android.support.v4.app.DialogFragment; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentActivity; import android.support.v4.app.FragmentManager.OnBackStackChangedListener; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.NumberPicker; import android.widget.StackView; public class MainActivity extends FragmentActivity { /** * The serialization (saved instance state) Bundle key representing the * current dropdown position. */ private static final String STATE_SELECTED_NAVIGATION_ITEM = "selected_navigation_item"; private TaskListFragment mTaskListFragment; private MenuItem mMenuCreate; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); // Set up the action bar to show a dropdown list. final ActionBar actionBar = getActionBar(); actionBar.setDisplayShowTitleEnabled(true); actionBar.setNavigationMode(ActionBar.DISPLAY_SHOW_TITLE); mTaskListFragment = new TaskListFragment(); getSupportFragmentManager().beginTransaction().add(R.id.container, mTaskListFragment) .commit(); getSupportFragmentManager().addOnBackStackChangedListener(new OnBackStackChangedListener() { @Override public void onBackStackChanged() { if (getSupportFragmentManager().getBackStackEntryCount() == 0) { mMenuCreate.setVisible(true); mTaskListFragment.refreshList(); } else { mMenuCreate.setVisible(false); } } }); StackView sv; Looper l; NumberPicker np; } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.activity_main, menu); mMenuCreate = menu.getItem(0); return true; } @Override public boolean onOptionsItemSelected(MenuItem item) { TaskCreateFragment tcf = new TaskCreateFragment(); tcf.show(getSupportFragmentManager(), ""); return super.onOptionsItemSelected(item); } public void showTimePickerDialog(View v) { } }
[ "wp.tisa@gmail.com" ]
wp.tisa@gmail.com
7d87d01a413b4be3cb9fc6779f39586e4e606998
b5db4c61e83b65386734c5c3855ed2317b68293a
/hibernatemapping_one_to_many/src/main/java/comm/example/App.java
d3bf56252c97b254c0c2bead9de7613b64259626
[]
no_license
akshat0808/ctstrain
18d41bee2ac03ae925acd6cd71ac56e5b1576fe2
c511e1f945e5d7c700182cb736037f70e963a8d3
refs/heads/master
2022-12-23T09:31:38.596785
2020-03-12T14:06:31
2020-03-12T14:06:31
232,239,054
0
0
null
2022-12-16T15:27:22
2020-01-07T03:59:37
JavaScript
UTF-8
Java
false
false
188
java
package comm.example; /** * Hello world! * */ public class App { public static void main( String[] args ) { System.out.println( "Hello World!" ); } }
[ "Alchemy@192.168.1.188" ]
Alchemy@192.168.1.188
f1d153061cdf2c563bf74b51005fc9a34ef42b1f
6d4807ac9a5524ae0cd899d8435763754d46e1b3
/src/main/java/org/bjss/store/model/Discount.java
af9bd07906c2d00478ffcf345eca7c694ab83a62
[]
no_license
vijayveerasamy/bjss-price-basket
b2f3d92623d477a37da831a141fb67e3b2475286
1cd0882c2843a65bd80f00278402d674581db820
refs/heads/master
2020-04-05T21:16:17.633605
2019-07-22T13:40:36
2019-07-22T13:40:36
156,710,105
0
0
null
null
null
null
UTF-8
Java
false
false
226
java
package org.bjss.store.model; public enum Discount { AMOUNT(1), PERCENTAGE(2), MULTIBUY(3); Discount(int value) { this.value = value; } private final int value; public int value() { return value; } }
[ "noreply@github.com" ]
vijayveerasamy.noreply@github.com
cc40d1e8f52ee2922ac74ebd34e34a9b72c20f36
44b18b665c436a98d579e4accf54aa121c9015cc
/src/main/java/at/alex/ok/web/beans/ImagesBean.java
ee2d0015d7092ef3b29b8fb164142a9be06b1a1e
[]
no_license
alexmivonwien/javakurs3.IamOKYouAreOK
fa6dd9e7b1ba4bd1f6846f3774ad682af2e6876a
883b6f57bbd059356c56bea38b04a292006cd72d
refs/heads/master
2021-12-28T23:41:23.899651
2019-06-06T06:49:49
2019-06-06T06:49:49
178,527,383
0
0
null
2021-12-10T00:52:27
2019-03-30T07:35:43
Java
UTF-8
Java
false
false
1,716
java
package at.alex.ok.web.beans; import java.io.File; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import javax.faces.context.ExternalContext; import javax.faces.context.FacesContext; import javax.faces.event.PhaseId; import javax.inject.Named; import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang3.StringUtils; import org.primefaces.model.ByteArrayContent; import org.primefaces.model.DefaultStreamedContent; import org.primefaces.model.StreamedContent; @javax.enterprise.context.ApplicationScoped @Named ("imagesBean") public class ImagesBean { public StreamedContent getUploadedFileAsStream() throws IOException { // see // http://stackoverflow.com/questions/8207325/display-dynamic-image-from-database-with-pgraphicimage-and-streamedcontent //System.out.println("Thread Id = " + Thread.currentThread().getId()); ExternalContext extContext = FacesContext.getCurrentInstance().getExternalContext(); String fileID = extContext.getRequestParameterMap().get("fileId"); if (FacesContext.getCurrentInstance().getCurrentPhaseId() == PhaseId.RENDER_RESPONSE) { // So, we're rendering the HTML. Return a stub StreamedContent so // that it will generate right URL. return new DefaultStreamedContent(); } else if (! StringUtils.isEmpty(fileID)) { Path targetFile = Paths.get( AssignmentBean.UPLOAD_FILE_PATH + File.separatorChar + fileID); String extension = FilenameUtils.getExtension(targetFile.toString()); ByteArrayContent fileContent = new ByteArrayContent( Files.readAllBytes(targetFile), "img/" + extension); return fileContent; } return null; } }
[ "alexmivonwien@gmail.com" ]
alexmivonwien@gmail.com
1a986b276bd015acd7075bfcfbce376924491018
8b44c0554aafba8e58fcac8442bab81eff79f976
/extras/IKMS/src/ikms/processor/ProcessorHandle.java
aaa6c7d9415287ae441c9400347a6de7c7b9ecc2
[]
no_license
stuartclayman/VLSP
0fe24f872f1acd9e251405632a524c5c005eb0fb
66da2a1da69c2c3ab240be6d63099ce10eeef890
refs/heads/master
2022-06-16T16:47:46.781448
2022-06-13T13:41:15
2022-06-13T13:41:15
187,882,422
0
0
null
null
null
null
UTF-8
Java
false
false
3,018
java
package ikms.processor; /** * A handle on an Processor. * It holds the name, the Processor itself, and its state. */ public class ProcessorHandle implements Runnable { // The name String name; // The thread name String threadName; // The proc Processor proc; // The args String[] args; // The proc ID int procID; // Start Time long startTime; // The state ProcessorState state; // The ProcessorManager ProcessorManager manager; /** * Construct an ProcessorHandle */ ProcessorHandle(ProcessorManager procMgr, String name, Processor proc, String[] args, int procID) { this.name = name; this.proc = proc; this.args = args; this.procID = procID; this.manager = procMgr; this.startTime = System.currentTimeMillis(); setState(ProcessorState.PROC_POST_INIT); } /** * Get the Processor name */ public String getName() { return name; } /** * Get the Processor */ public Processor getProcessor() { return proc; } /** * Get the args for the Proc. */ public String[] getArgs() { return args; } /** * Get the Proc ID. */ public int getID() { return procID; } /** * Get the start time */ public long getStartTime() { return startTime; } /** * Get the thread name */ public String getThreadName() { return threadName; } /** * Set the thread name */ ProcessorHandle setThreadName(String name) { threadName = name; return this; } /** * Get the state */ public ProcessorState getState() { return state; } /** * Set the state */ ProcessorHandle setState(ProcessorState s) { state = s; return this; } /** * This run() delegates to Processor run() */ public void run() { System.err.println( "ProcessorHandle: entering run: " + proc); if (getState() == ProcessorHandle.ProcessorState.RUNNING) { proc.run(); } System.err.println( "ProcessorHandle: exiting run: " + proc + " with state of: " + getState()); // if we get to the end of run() and the proc // is still in the RUNNING state, // we need to stop it if (getState() == ProcessorHandle.ProcessorState.RUNNING) { setState(ProcessorHandle.ProcessorState.PROC_POST_RUN); manager.stopProcessor(getName()); } } /** * The states of the proc */ public enum ProcessorState { PROC_POST_INIT, // after for init() RUNNING, // we have entered run() PROC_POST_RUN, // the proc dropped out of run(), without a stop() STOPPING, // we have called stop() and the the proc should stop STOPPED // the proc is stopped } }
[ "s.clayman@ucl.ac.uk" ]
s.clayman@ucl.ac.uk
8db51925a22252444bd3252c742d66dec81484f7
3b91ed788572b6d5ac4db1bee814a74560603578
/com/tencent/mm/boot/svg/a/a/rv.java
0c0bf6437c747bbadd2b75d476c446975765f1f6
[]
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
3,698
java
package com.tencent.mm.boot.svg.a.a; import android.graphics.Canvas; import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.Paint.Cap; import android.graphics.Paint.Join; import android.graphics.Paint.Style; import android.graphics.Path; import android.os.Looper; import com.tencent.mm.svg.WeChatSVGRenderC2Java; import com.tencent.mm.svg.c; public final class rv extends c { private final int height = 75; private final int width = 75; protected final int b(int i, Object... objArr) { switch (i) { case 0: return 75; case 1: return 75; case 2: Canvas canvas = (Canvas) objArr[0]; Looper looper = (Looper) objArr[1]; Matrix f = c.f(looper); float[] e = c.e(looper); Paint i2 = c.i(looper); i2.setFlags(385); i2.setStyle(Style.FILL); Paint i3 = c.i(looper); i3.setFlags(385); i3.setStyle(Style.STROKE); i2.setColor(-16777216); i3.setStrokeWidth(1.0f); i3.setStrokeCap(Cap.BUTT); i3.setStrokeJoin(Join.MITER); i3.setStrokeMiter(4.0f); i3.setPathEffect(null); c.a(i3, looper).setStrokeWidth(1.0f); Paint a = c.a(i2, looper); a.setColor(-14105561); canvas.save(); e = c.a(e, 1.0f, 0.0f, 7.0f, 0.0f, 1.0f, 7.0f); f.reset(); f.setValues(e); canvas.concat(f); canvas.save(); Paint a2 = c.a(a, looper); Path j = c.j(looper); j.moveTo(31.0f, 62.0f); j.cubicTo(13.879172f, 62.0f, 0.0f, 48.120827f, 0.0f, 31.0f); j.cubicTo(0.0f, 13.879172f, 13.879172f, 0.0f, 31.0f, 0.0f); j.cubicTo(48.120827f, 0.0f, 62.0f, 13.879172f, 62.0f, 31.0f); j.cubicTo(62.0f, 48.120827f, 48.120827f, 62.0f, 31.0f, 62.0f); j.close(); j.moveTo(31.0f, 56.833332f); j.cubicTo(45.267357f, 56.833332f, 56.833332f, 45.267357f, 56.833332f, 31.0f); j.cubicTo(56.833332f, 16.732643f, 45.267357f, 5.1666665f, 31.0f, 5.1666665f); j.cubicTo(16.732643f, 5.1666665f, 5.1666665f, 16.732643f, 5.1666665f, 31.0f); j.cubicTo(5.1666665f, 45.267357f, 16.732643f, 56.833332f, 31.0f, 56.833332f); j.close(); WeChatSVGRenderC2Java.setFillType(j, 1); canvas.drawPath(j, a2); canvas.restore(); canvas.save(); a2 = c.a(a, looper); j = c.j(looper); j.moveTo(21.958334f, 23.458334f); j.cubicTo(21.958334f, 22.629908f, 22.629908f, 21.958334f, 23.458334f, 21.958334f); j.lineTo(38.541668f, 21.958334f); j.cubicTo(39.370094f, 21.958334f, 40.041668f, 22.629908f, 40.041668f, 23.458334f); j.lineTo(40.041668f, 38.541668f); j.cubicTo(40.041668f, 39.370094f, 39.370094f, 40.041668f, 38.541668f, 40.041668f); j.lineTo(23.458334f, 40.041668f); j.cubicTo(22.629908f, 40.041668f, 21.958334f, 39.370094f, 21.958334f, 38.541668f); j.lineTo(21.958334f, 23.458334f); j.close(); canvas.drawPath(j, a2); canvas.restore(); canvas.restore(); c.h(looper); break; } return 0; } }
[ "707194831@qq.com" ]
707194831@qq.com
5f354a4a3824e551c7a275db3d6537d46f93cfbb
36459e0e6231de9589c0d1267de9d420f8086c2f
/src/com/kh/category/model/dao/CategoryDao.java
277517ebe22d2c7b19f8d4a94799ac38901e29b1
[]
no_license
meengi07/DOLIKE
2a7440793d3b64be438669c284599bfe64290196
630da4abb98c1f79958b814be7985c4db75ba067
refs/heads/master
2023-08-11T17:42:42.710801
2021-10-12T15:26:14
2021-10-12T15:26:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,509
java
package com.kh.category.model.dao; import static com.kh.common.JDBCTemplate.close; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import java.util.Properties; import com.kh.category.model.vo.Category; import com.kh.category.model.vo.CategoryPageInfo; import com.kh.member.model.dao.MemberDao; public class CategoryDao { private Properties prop = new Properties(); public CategoryDao() { //sql 문을 불러오기 위한 연결 코드 작성함 String fileName = MemberDao.class.getResource("/sql/category/category-query.properties").getPath(); System.out.println("fileName " + fileName); try { prop.load(new FileReader(fileName)); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } public int getListCount(Connection conn) { int listCount = 0; Statement stmt = null; ResultSet rset = null; String sql = prop.getProperty("getListCount"); try { stmt = conn.createStatement(); rset = stmt.executeQuery(sql); if(rset.next()) { // 결과 값이 있으면 화면에 전체를 출력한다. listCount = rset.getInt(1); // 컬럼명을 적어주던가 , 숫자를 적어주면 된다.(컬럼명을 적는 것이 좋음) } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally { close(rset); close(stmt); } return listCount; } public ArrayList<Category> categoryList(Connection conn, CategoryPageInfo ca) { ArrayList<Category> list = new ArrayList<Category>(); PreparedStatement pstmt = null; ResultSet rset = null; String sql = prop.getProperty("categoryList"); int startRow = (ca.getCurrentPage()-1)*ca.getCategoryLimit()+1; int endRow = startRow + ca.getCategoryLimit()-1; try { pstmt = conn.prepareStatement(sql); pstmt.setInt(1, startRow); pstmt.setInt(2, endRow); rset = pstmt.executeQuery(); while(rset.next()) { list.add(new Category(rset.getInt("CATEGORY_NO"), rset.getString("CATEGORY_NAME") )); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally{ close(rset); close(pstmt); } System.out.println("카테고리 다오 list 값 : " + list); return list; } public int insertCategory(Connection conn, Category cat) { int result = 0; PreparedStatement pstmt = null; String sql = prop.getProperty("insertCategory"); System.out.println(sql); System.out.println("상황파악중"); try { pstmt = conn.prepareStatement(sql); System.out.println("2. null 에러발생함"); pstmt.setString(1, cat.getCategoryName()); System.out.println("#############"); result = pstmt.executeUpdate(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally { close(pstmt); } return result; } public Category selectCategory(Connection conn, int cno) { Category c = null; PreparedStatement pstmt = null; ResultSet rset = null; String sql = prop.getProperty("selectCategory"); try { pstmt = conn.prepareStatement(sql); pstmt.setInt(1, cno); rset = pstmt.executeQuery(); if(rset.next()) { c = new Category(rset.getInt("CATEGORY_NO"), //Category의 생성자를 사용해서 rset.getString("CATEGORY_NAME") ); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally { close(rset); close(pstmt); } return c; } public int deleteCategory(Connection conn, int cid) { int result = 0; PreparedStatement pstmt = null; String sql = prop.getProperty("deleteCategory"); try { pstmt = conn.prepareStatement(sql); pstmt.setInt(1, cid); result = pstmt.executeUpdate(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); }finally { close(pstmt); } return result; } public int updateCategory(Connection conn, Category c) { int result = 0; PreparedStatement pstmt = null; String sql = prop.getProperty("updateCategory"); try { pstmt = conn.prepareStatement(sql); pstmt.setString(1, c.getCategoryName()); pstmt.setInt(2, c.getCategoryNo()); result = pstmt.executeUpdate(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally { close(pstmt); } return result; } public ArrayList<Category> categoryMenuBarList(Connection conn) { ArrayList<Category> list = new ArrayList<Category>(); PreparedStatement pstmt = null; ResultSet rset = null; String sql = prop.getProperty("categoryMenuBarList"); try { pstmt = conn.prepareStatement(sql); rset = pstmt.executeQuery(); while(rset.next()) { list.add(new Category(rset.getInt("CATEGORY_NO"), rset.getString("CATEGORY_NAME") )); } } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally{ close(rset); close(pstmt); } System.out.println("CategoryDao의 caList 값 : " + list); return list; } }
[ "zmfozjko0465@gmail.com" ]
zmfozjko0465@gmail.com
4ea6895805aa4d1d5818de254a1c978f9a7bf87e
02e0e953f3f8237e43dcadefd28f68019d077782
/src/main/java/com/controller/ProductController.java
6132040412311962a23085d83d4daf57b8106346
[]
no_license
panda261/test
460bf6430ab44b6470fb338b68191414ac0cb0ca
626fd99fc0cfa90f9e17b6b4582fec0793ff6279
refs/heads/master
2023-01-30T01:05:45.198535
2020-12-08T01:55:36
2020-12-08T01:55:36
319,500,942
0
0
null
null
null
null
UTF-8
Java
false
false
1,887
java
package com.controller; import com.model.pojo.Product; import com.service.IProductService; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.servlet.ModelAndView; import javax.annotation.Resource; import javax.servlet.http.HttpSession; import java.util.List; @Controller @RequestMapping("/product") public class ProductController { @Resource private IProductService iProductService; @RequestMapping("/list") public ModelAndView findProducts(Product product) { List<Product> products = iProductService.findProducts(product); ModelAndView mv = new ModelAndView(); mv.addObject("pros", products); mv.addObject("pn", product); mv.setViewName("product/product_list"); return mv; } @RequestMapping("/toadd") public String toadd() { return "product/product_add"; } @RequestMapping("/add") public String add(Product product) { iProductService.addProduct(product); return "redirect:/product/list"; } @RequestMapping("/toupdate") public String toupdate(Product product, Model model){ Product upProduct = iProductService.getProductById(product); model.addAttribute("upProduct",upProduct); return "product/product_update"; } @RequestMapping("/update") public String updatePro(Product product,HttpSession session){ iProductService.updateProduct(product); session.setAttribute("msg","修改成功"); return "redirect:/product/list"; } @RequestMapping("/del") public String del(Product product , HttpSession session){ iProductService.delProduct(product); session.setAttribute("msg","删除成功"); return "redirect:/product/list"; } }
[ "805217053@qq.com" ]
805217053@qq.com
938d110346297f338480ba32c55208bcdfcec955
74e8c7369e980925e4054b536bef3b1d89cb5b09
/src/test/java/com/harcyah/kata/exercism/octal/OctalTest.java
5ed7f8b89c094925d598ce98730ba814c1447fd0
[]
no_license
ninaParis/code-kata-java
c649aebb5c6b80a564ee2d196ec7d7eaa890ea90
9db16627818a03554dee99cd2158d1dc9c7c2bc6
refs/heads/master
2023-08-24T02:22:26.123973
2021-10-14T17:53:41
2021-10-14T17:53:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,031
java
package com.harcyah.kata.exercism.octal; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.MethodSource; import java.util.Collection; import java.util.List; import static org.junit.jupiter.api.Assertions.assertEquals; public class OctalTest { public static Collection<Object[]> getTestData() { return List.of(new Object[][]{ {"1", 1}, {"10", 8}, {"17", 15}, {"11", 9}, {"130", 88}, {"2047", 1063}, {"7777", 4095}, {"1234567", 342391}, {"carrot", 0}, {"8", 0}, {"9", 0}, {"6789", 0}, {"abc1z", 0}, {"011", 9} }); } @ParameterizedTest @MethodSource("getTestData") public void test(String input, int expectedOutput) { Octal octal = new Octal(input); assertEquals(expectedOutput, octal.getDecimal()); } }
[ "harcyah@gmail.com" ]
harcyah@gmail.com
6965e374574c0e25434c274c5c543dc8fe96c630
9ef576f83c6df3591b899ed00fe27322a20d5eb7
/JPrologCafe/PrologCafe/src/jp/ac/kobe_u/cs/prolog/builtin/PRED_numbervars_3.java
7c7c864291e2f60cb746f7a11cdbe8219922de20
[]
no_license
opensim4opencog/PrologVirtualWorlds
fbe064a3eaef97724ad887c12c2775ddb3e1edf9
a31b65b566e13a4aa9df3ae07d949e97321941e9
refs/heads/master
2021-01-10T05:57:44.190374
2008-09-28T18:22:57
2008-09-28T18:22:57
52,572,229
5
1
null
null
null
null
UTF-8
Java
false
false
3,122
java
package jp.ac.kobe_u.cs.prolog.builtin; import jp.ac.kobe_u.cs.prolog.lang.*; /* This file is generated by Prolog Cafe. PLEASE DO NOT EDIT! */ /** <code>numbervars/3</code> defined in builtins.pl<br> @author Mutsunori Banbara (banbara@kobe-u.ac.jp) @author Naoyuki Tamura (tamura@kobe-u.ac.jp) @author Douglas R. Miles (dmiles@users.sourceforge.net) for Object(s) @version 1.0-dmiles */ public class PRED_numbervars_3 extends PredicateBase { static /*IntegerTerm*/Object si1 = makeInteger(0); public Object arg1, arg2, arg3; public PRED_numbervars_3(Object a1, Object a2, Object a3, Predicate cont) { arg1 = a1; arg2 = a2; arg3 = a3; this.cont = cont; } public PRED_numbervars_3(){} public void setArgument(Object[] args, Predicate cont) { arg1 = args[0]; arg2 = args[1]; arg3 = args[2]; this.cont = cont; } public int arity() { return 3; } public String nameUQ() { return "numbervars"; } public void sArg(int i0, Object val) { switch (i0) { case 0: arg1 = val;break ; case 1: arg2 = val;break ; case 2: arg3 = val;break ; default: newIndexOutOfBoundsException("setarg" , i0 , val); } } public Object gArg(int i0) { switch (i0) { case 0: return arg1; case 1: return arg2; case 2: return arg3; default: return newIndexOutOfBoundsException("getarg", i0,null); } } public String toPrologString(java.util.Collection newParam) { return "'numbervars'(" + argString(arg1,newParam) + "," + argString(arg2,newParam) + "," + argString(arg3,newParam) + ")"; } public Predicate exec(Prolog engine) { enter(engine); Object[] engine_aregs = engine.getAreg(); // numbervars(A, B, C):-integer(B), B>=0, !, '$numbervars'(A, B, C) engine.setB0(); Object a1, a2, a3, a4; a1 = arg1; a2 = arg2; a3 = arg3; // numbervars(A, B, C):-['$get_level'(D), integer(B), '$greater_or_equal'(B, 0), '$cut'(D), '$numbervars'(A, B, C)] a4 = engine.makeVariable(this); //START inline expansion of $get_level(a(4)) if (! unify(a4,makeInteger(engine.B0))) { return fail(engine); } //END inline expansion //START inline expansion of integer(a(2)) a2 = deref( a2); if (! isInteger(a2)) { return fail(engine); } //END inline expansion //START inline expansion of $greater_or_equal(a(2), si(1)) try { if (arithCompareTo(Arithmetic.evaluate(a2),si1) < 0) { return fail(engine); } } catch (BuiltinException e) { e.goal = this; throw e; } //END inline expansion //START inline expansion of $cut(a(4)) a4 = deref( a4); if (! isCutter/*Integer*/(a4)) { throw new IllegalTypeException("integer", a4); } else { engine.cut(( a4)); } //END inline expansion return exit(engine, new PRED_$numbervars_3(a1, a2, a3, cont)); } }
[ "logicmoo@gmail.com" ]
logicmoo@gmail.com
72a731a5fa79b968e78edaf2649b0511d3fb3031
abfd8550366a0f83b2f6de57e032369b4871b1a9
/itgen/src/main/java/data/dao/ChatRoomDao.java
becd755dcefc894708f3a618c4e11d63fcd5b7dd
[ "Apache-2.0" ]
permissive
jbelyaeva/java_itgen
4a8e790fc8623dabbe4c9957648fe8a34a8ebede
7b8dc5a7291564d10594c900e895ef3819256ddf
refs/heads/master
2023-03-16T22:28:30.882273
2021-03-05T06:50:27
2021-03-05T06:50:27
234,726,855
0
0
Apache-2.0
2021-03-05T06:50:28
2020-01-18T11:48:04
Java
UTF-8
Java
false
false
1,260
java
package data.dao; import static data.connection.MFSessionFactory.morphiaSessionFactoryUtil; import data.connection.MFSessionFactory; import data.model.chat.ChatRoomData; import dev.morphia.Datastore; import dev.morphia.query.Query; public class ChatRoomDao implements Dao<ChatRoomData> { @Override public void save(ChatRoomData chatRoomData) { Datastore datastore = MFSessionFactory.morphiaSessionFactoryUtil(); datastore.save(chatRoomData); } @Override public <T> void updateField(String id, String nameField, T data) { } @Override public <T> void updateArrayField(String id, String nameField, T[] data) { } @Override public void delete(ChatRoomData chatRoomData) { } @Override public void deleteField(String id, String nameField) { } @Override public ChatRoomData deleteById(String id) { return null; } @Override public ChatRoomData findById(String id) { Datastore datastore = morphiaSessionFactoryUtil(); return datastore.find(ChatRoomData.class).field("id").equal(id).first(); } @Override public void drop() { Datastore datastore = morphiaSessionFactoryUtil(); Query<ChatRoomData> query = datastore.createQuery(ChatRoomData.class); datastore.delete(query); } }
[ "59063644+julja83@users.noreply.github.com" ]
59063644+julja83@users.noreply.github.com
5e44115e3a9bee06c40b6ec3a0b47a31677afeb1
e8b8bfab8e9853264bdb131711c4df7421f8f5da
/bookapp-jpa/bookapp-jpa/src/main/java/com/fujitsu/bookappjpa/controller/BookController.java
a4b70d559cdbd1412319d8a8fb1c7e1650c68c81
[]
no_license
ismailpmi/Java_withpmi
67817354fef83de25b5408cde34643a37aee76b4
93d2cb09a26f5fa54ac0f3961f8926a04dd275bc
refs/heads/master
2020-04-01T14:00:20.858937
2018-10-26T10:35:23
2018-10-26T10:35:23
153,276,292
0
0
null
null
null
null
UTF-8
Java
false
false
1,668
java
package com.fujitsu.bookappjpa.controller; import java.util.List; import java.util.Optional; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.fujitsu.bookappjpa.dao.BookRepository; import com.fujitsu.bookappjpa.model.Book; @RestController @RequestMapping("books") public class BookController { @Autowired private BookRepository bookRepository; @GetMapping public List<Book> findAll() { return bookRepository.findAll(); } @GetMapping("{id}") public Optional<Book> findone(@PathVariable int id) { return bookRepository.findById(id); } @PostMapping("save") public List<Book> save(@RequestBody Book book) { bookRepository.save(book); return bookRepository.findAll(); } @PutMapping("update") public List<Book> update(@RequestBody Book book) { bookRepository.save(book); return bookRepository.findAll(); } @DeleteMapping("/delete") public List<Book> delete(@RequestBody Book book) { bookRepository.delete(book); return bookRepository.findAll(); } // @GetMapping // public void findAll() { // System.out.println(bookRepository.findAll()); // // } }
[ "noreply@github.com" ]
ismailpmi.noreply@github.com