blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
332
content_id
stringlengths
40
40
detected_licenses
listlengths
0
50
license_type
stringclasses
2 values
repo_name
stringlengths
7
115
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
557 values
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
17 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
82 values
src_encoding
stringclasses
28 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
7
5.41M
extension
stringclasses
11 values
content
stringlengths
7
5.41M
authors
listlengths
1
1
author
stringlengths
0
161
3b055be356ecd87be89e5a56d31ddc36f8ff7ad2
f7f2afc68dedea3c99a115924c6e82d2eebea572
/DugeonGame.java
0e26e53afab82e52761ae733cb3c12faf9274a60
[]
no_license
RamboRick/HeadFirstChap14Exercise
b24f72e7fe6d382a0d92c63a39904fed413eb941
854e4dc7540876ff410c9cbf0981120cc2f4dcec
refs/heads/master
2021-09-06T09:14:31.294476
2018-02-04T21:47:12
2018-02-04T21:47:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
230
java
package chap14; import java.io.*; class DugeonGame implements Serializable { public int x = 3; transient long y = 4; private short z = 5; int getX(){ return x; } long getY(){ return y; } short getZ(){ return z; } }
[ "fanghaogab@gmail.com" ]
fanghaogab@gmail.com
9d59fd0c5bd94ab508552fcec19c16cff536d492
01a54d4b7911824e46be55a7afa7db2a9b40e69c
/src/org/simbrain/util/propertyeditor/ComboBoxWrapper.java
7c2da7114651e680c5d9a388d0612c8a007cd5b7
[]
no_license
astachurski/simbrain
a5846398f9234766e3c041b6834a0f620012442e
b90e745987d7614c54ef61ca9a351b42ece8aabb
refs/heads/master
2016-09-06T14:09:53.790965
2015-04-17T04:46:29
2015-04-17T04:46:29
34,584,394
1
0
null
null
null
null
UTF-8
Java
false
false
680
java
package org.simbrain.util.propertyeditor; /** * Wrapper for any object to be represented by a combo box in a * ReflectivePropertyEditor. * * @author Jeff Yoshimi */ public interface ComboBoxWrapper { /** * Return the array of objects that the combo box will select among. * toString must be overridden to provide the text for the combo box. * * @return the array of objects to be put in the combo box. */ public Object[] getObjects(); /** * Return the current object to be initially presented in the combo box. * * @return the initially selected object for the combo box */ public Object getCurrentObject(); }
[ "jeffyoshimi@yahoo.com@bf00e721-664e-0410-b0bc-3daef764c4be" ]
jeffyoshimi@yahoo.com@bf00e721-664e-0410-b0bc-3daef764c4be
d4d8b05c3972d6a2901c64b5e483c20d0e313b0c
dd3eec242deb434f76d26b4dc0e3c9509c951ce7
/2018-work/jiuy-biz/jiuy-biz-core/src/main/java/com/yujj/dao/mapper/UserSearchLogMapper.java
865d54e697fafe7fbf904f257c04ff2c88df6be9
[]
no_license
github4n/other_workplace
1091e6368abc51153b4c7ebbb3742c35fb6a0f4a
7c07e0d078518bb70399e50b35e9f9ca859ba2df
refs/heads/master
2020-05-31T10:12:37.160922
2019-05-25T15:48:54
2019-05-25T15:48:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
530
java
package com.yujj.dao.mapper; import java.util.List; import org.apache.ibatis.annotations.Param; import com.jiuyuan.dao.annotation.DBMaster; import com.jiuyuan.entity.query.PageQuery; import com.jiuyuan.entity.search.UserSearchLog; @DBMaster public interface UserSearchLogMapper { /** * @author DongZhong */ List<UserSearchLog> getUserSearchLogs(@Param("userId") long userId, @Param("pageQuery") PageQuery pageQuery); /** * @param userSearchLog * @return */ int addUserSearchLog(UserSearchLog userSearchLog); }
[ "nessary@foxmail.com" ]
nessary@foxmail.com
df38c1fe872cdb0b76a9c93f34377ef6098130bd
db72b74bf7935c680339aa096987ffc6e3bcbc47
/src/main/java/pl/coderslab/controllers/DentistController.java
00c32f4a671bc0f7289381e944e7e41897daf2ed
[]
no_license
Raggof/gabinet-stomatologiczny
7c18fb43ac2b5617c10f88c766232a8e0cf84bc4
5d51e6f9671f5e1975b4b62ab6040f026b27cbc1
refs/heads/master
2023-04-13T18:22:37.196533
2021-04-15T11:45:56
2021-04-15T11:45:56
320,675,207
0
0
null
null
null
null
UTF-8
Java
false
false
2,686
java
package pl.coderslab.controllers; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import pl.coderslab.entity.APatient; import pl.coderslab.entity.Dentist; import pl.coderslab.repository.APatientRepository; import pl.coderslab.repository.DentistRepository; import pl.coderslab.services.DentistService; import javax.persistence.EntityNotFoundException; import javax.validation.Valid; import java.util.List; @Controller @RequestMapping("/dentist") public class DentistController { private DentistService dentistService; public DentistController(DentistService dentistService) { this.dentistService = dentistService; } @GetMapping("/all") public String showDentist(Model model) { List<Dentist> dentists = dentistService.getDentists(); model.addAttribute("dentists", dentists); return "dentist/all"; } @RequestMapping(value = "/add", method = RequestMethod.GET) public String showAddFormDentist(Model model){ model.addAttribute("dentist", new Dentist()); return "dentist/add"; } @RequestMapping(value = "/add", method = RequestMethod.POST) public String saveDentist(@Valid Dentist dentist, BindingResult result) { if (result.hasErrors()) { return "dentist/add"; } dentistService.add(dentist); return "redirect:/dentist/all"; } @RequestMapping(value = "/edit/{id}", method = RequestMethod.GET) public String showEditFormDentist(@PathVariable long id, Model model) { model.addAttribute("dentist", dentistService.get(id)); return "dentist/edit"; } @RequestMapping(value = "/edit", method = RequestMethod.POST) public String editDentist(@Valid Dentist dentist, BindingResult result) { if (result.hasErrors()) { return "dentist/edit"; } dentistService.add(dentist); return "redirect:/dentist/all"; } @GetMapping("/show/{id}") public String showDentist(Model model, @PathVariable long id) { model.addAttribute("dentist", dentistService.get(id).orElseThrow(EntityNotFoundException::new)); return "dentist/show"; } @GetMapping("/delete/{id}") public String deleteDentist(@PathVariable long id) { dentistService.delete(id); return "redirect:/dentist/all"; } }
[ "mwalberto11@gmail.com" ]
mwalberto11@gmail.com
186c4499ede7cd8b65d8b8a15883403ddb884f1c
654422a5a346187bc59337d52e4317e1dd25821c
/admin/app/src/androidTest/java/com/example/vinu/admin/ExampleInstrumentedTest.java
bd20afc71f818c611fbec4bff4ad85ec9d93836f
[]
no_license
vinuvn/catchmybus
d94263c92068644531f790f00f6fd3458fb6302e
c86908e1c651568ea821452229ed77f1c67b5aec
refs/heads/master
2020-04-02T07:01:48.792067
2018-11-28T20:06:53
2018-11-28T20:06:53
154,178,454
0
0
null
null
null
null
UTF-8
Java
false
false
748
java
package com.example.vinu.admin; 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.*; /** * Instrumentation test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() throws Exception { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("com.example.vinu.admin", appContext.getPackageName()); } }
[ "teamboyzvishnudev@gmail.com" ]
teamboyzvishnudev@gmail.com
66ac0e122170d713fe6b985fb0b76089c23149b7
a5cc8b9765db129b941b6b22b5a9b712510c2420
/src/ch01/ex06/RunnableUncheck.java
831793415d58a061c56c260a87464a290b8fd133
[]
no_license
hishijima56/java8-2016
ce985e02909c91f3d3dec75ba1fadd668d13cc98
658adc8d4ade8a86b872cdf46392e78316d8afff
refs/heads/master
2021-01-12T13:27:53.128899
2017-03-16T23:45:57
2017-03-16T23:45:57
69,833,903
0
0
null
null
null
null
UTF-8
Java
false
false
1,229
java
/* * $Header: $ * $Revision: $ * $Date: $ */ package ch01.ex06; import java.util.concurrent.Callable; /** * 練習問題01_06 * @author Hidetoshi Ishijima * * @version $Revision: $ $Date: $ * @since 2016/11/17 */ public class RunnableUncheck { /** * チェック例外を非チェック例外に変更してスローします。 * @param runnableEx {@link RunnableEx}インタフェース * @return {@link Runnable} */ public static Runnable uncheck(RunnableEx runnableEx) { return () -> { try { runnableEx.run(); } catch (Exception e) { e.printStackTrace(); throw new RuntimeException(e); } }; } /** * チェック例外を非チェック例外に変更してスローします。 * @param callable {@link Callable}インタフェース * @return {@link Runnable} */ public static Runnable uncheck(Callable<Void> callable) { return () -> { try { callable.call(); } catch (Exception e) { e.printStackTrace(); throw new RuntimeException(e); } }; } }
[ "hidetoshi.ishijima56@gmail.com" ]
hidetoshi.ishijima56@gmail.com
623d0504c8956a0fee86c8436f912abb90ebed04
886c4554bf9d5d8be293646efe9ad855e2967afa
/gmall-web-util/src/main/java/com/bysj/gmall/util/CookieUtil.java
59f2cf1b1e4750400bc3fd2446a8bb5bd6632871
[]
no_license
zhuoyanqiu/gmall
4a3da6357f96d502dc6ec26ea3068e8a6b47c7bb
134be4aa294ff425aa26027e503e96064d49c8a3
refs/heads/master
2022-09-28T13:06:25.045422
2021-09-12T13:42:14
2021-09-12T13:42:14
216,146,333
0
0
null
2022-09-01T23:20:51
2019-10-19T03:59:16
CSS
UTF-8
Java
false
false
4,057
java
package com.bysj.gmall.util; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.net.URLEncoder; /** * @param * @return * @author 卓炎秋 */ public class CookieUtil { /*** * 获得cookie中的值,默认为主ip:www.gmall.com * @param request * @param cookieName * @param isDecoder * @return */ public static String getCookieValue(HttpServletRequest request, String cookieName, boolean isDecoder) { Cookie[] cookies = request.getCookies(); if (cookies == null || cookieName == null){ return null; } String retValue = null; try { for (int i = 0; i < cookies.length; i++) { if (cookies[i].getName().equals(cookieName)) { if (isDecoder) {//如果涉及中文 retValue = URLDecoder.decode(cookies[i].getValue(), "UTF-8"); } else { retValue = cookies[i].getValue(); } break; } } } catch (UnsupportedEncodingException e) { e.printStackTrace(); } return retValue; } /*** * 设置cookie的值 * @param request * @param response * @param cookieName * @param cookieValue * @param cookieMaxage * @param isEncode */ public static void setCookie(HttpServletRequest request, HttpServletResponse response, String cookieName, String cookieValue, int cookieMaxage, boolean isEncode) { try { if (cookieValue == null) { cookieValue = ""; } else if (isEncode) { cookieValue = URLEncoder.encode(cookieValue, "utf-8"); } Cookie cookie = new Cookie(cookieName, cookieValue); if (cookieMaxage >= 0) cookie.setMaxAge(cookieMaxage); if (null != request)// 设置域名的cookie cookie.setDomain(getDomainName(request)); // 在域名的根路径下保存 cookie.setPath("/"); response.addCookie(cookie); } catch (Exception e) { e.printStackTrace(); } } /*** * 获得cookie的主域名,本系统为gmall.com,保存时使用 * @param request * @return */ private static final String getDomainName(HttpServletRequest request) { String domainName = null; String serverName = request.getRequestURL().toString(); if (serverName == null || serverName.equals("")) { domainName = ""; } else { serverName = serverName.toLowerCase(); serverName = serverName.substring(7); final int end = serverName.indexOf("/"); serverName = serverName.substring(0, end); final String[] domains = serverName.split("\\."); int len = domains.length; if (len > 3) { // www.xxx.com.cn domainName = domains[len - 3] + "." + domains[len - 2] + "." + domains[len - 1]; } else if (len <= 3 && len > 1) { // xxx.com or xxx.cn domainName = domains[len - 2] + "." + domains[len - 1]; } else { domainName = serverName; } } if (domainName != null && domainName.indexOf(":") > 0) { String[] ary = domainName.split("\\:"); domainName = ary[0]; } System.out.println("domainName = " + domainName); return domainName; } /*** * 将cookie中的内容按照key删除 * @param request * @param response * @param cookieName */ public static void deleteCookie(HttpServletRequest request, HttpServletResponse response, String cookieName) { setCookie(request, response, cookieName, null, 0, false); } }
[ "2560184787@qq.com" ]
2560184787@qq.com
9961048cc3cca482d905e8bf6ae886c8e7aee0ce
d9b14f351f668b004c4cb05a10d09e7e85243317
/src/BaekJoon/_Before_Tagging/P4673.java
7138b834490b9c764f2f28525c4009cd45130c73
[]
no_license
nn98/Algorithm
262cbe20c71ff9b5de292c244b95a2a0c25e5bd7
55b6db19cb9f2aa5c5056f5cabd2b22715b682fd
refs/heads/main
2023-08-17T04:39:41.236707
2023-08-16T13:04:34
2023-08-16T13:04:34
178,701,901
0
0
null
null
null
null
UTF-8
Java
false
false
533
java
package BaekJoon._Before_Tagging; public class P4673 { static int[] arr=new int[10001]; public static void main(String[] args) { // TODO Auto-generated method stub for(int i=1;i<=10000;i++) { String[] s=Integer.toString(i).split(""); int j=i; for(String a:s) j+=Integer.parseInt(a); for(;j<=10000;) { if(arr[j]!=0) break; arr[j]++; s=Integer.toString(j).split(""); for(String a:s) j+=Integer.parseInt(a); } } for(int i=1;i<arr.length;i++) if(arr[i]==0) System.out.println(i); } }
[ "jkllhgb@gmail.com" ]
jkllhgb@gmail.com
08b4b171042de214b8d8fea0997318a2d7c5e58e
25030e27f4d2fa59d7ef73a3ed60e597da617c92
/src/uts/if2/pkg10119081/muhammadelzaabiezal/no2/UTSIF210119081MUHAMMADELZAABIEZALNo2.java
4260245add826cd48316dbe26e5a10b2ec0b65b0
[]
no_license
elzaabiezal/UTS-IF2-10119081-MUHAMMADELZAABIEZAL-no2
c7ae1e83e50c36d71e6a355e15dd9d48632f0cdf
d20c5821e78d3eb4d1c441f2d36b3a7d39c3e9ac
refs/heads/master
2023-01-30T17:50:06.485376
2020-12-04T14:02:35
2020-12-04T14:02:35
318,533,664
0
0
null
null
null
null
UTF-8
Java
false
false
1,153
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 uts.if2.pkg10119081.muhammadelzaabiezal.no2; import java.util.Scanner; /** * * @author Elza Abiezal * Nama : Muhammad Elza Abiezal * Kelas : IF-2 * NIM : 10119081 */ public class UTSIF210119081MUHAMMADELZAABIEZALNo2 { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here int jumlahAmbil; //inisialisasi objek scanner Scanner keyboard = new Scanner(System.in); System.out.println("====Program Penarikan Uang===="); System.out.print("Masukkan Saldo Awal : "); //inisialisasi objek tabungan Tabungan tabungan = new Tabungan(keyboard.nextInt()); System.out.print("Jumlah Uang Yang Diambil : "); jumlahAmbil = tabungan.ambilUang(keyboard.nextInt()); System.out.println("Saldo Anda Sekarang : " + jumlahAmbil); } }
[ "Elza Abiezal@LAPTOP-08RPP460" ]
Elza Abiezal@LAPTOP-08RPP460
14c04ae6cc7b88f5beb527cee1930c227fa281f4
022be1596843705a02435ac06224783380411d9c
/src/main/java/database/MySQLconnector.java
ff96047b9dd39f0898dd36bcf3ea93f7079455e4
[]
no_license
MinchukSergei/KBRS
af0e7401c7203a0deac88bdf9b09dcf8b0b0e975
8c9abf167d2533671e18cdd1dd371bddc21a77bb
refs/heads/master
2021-05-01T02:05:39.176768
2016-11-19T19:09:30
2016-11-19T19:09:30
68,807,322
0
0
null
null
null
null
UTF-8
Java
false
false
885
java
package database; import util.ResourceBundleManager; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class MySQLconnector { static final String DB_URL = "jdbc:mysql://localhost/kbsr"; public void registerJDBCdriver() { try { DriverManager.registerDriver(new com.mysql.jdbc.Driver()); } catch (SQLException e) { System.out.println(e.getMessage()); } } public Connection getConnection() { Connection connection = null; try { connection = DriverManager.getConnection(DB_URL, ResourceBundleManager.getByName("user.login"), ResourceBundleManager.getByName("user.password")); } catch (SQLException e) { System.out.println(e.getMessage()); } return connection; } }
[ "minchuk94@gmail.com" ]
minchuk94@gmail.com
69a2896755ba0f5512c4a2da612f2acb7d8aa89e
8594557809cfa573056f3a85230e7a1fea00c700
/src/fortest/ForDemo.java
6ff65f74aecfa2869760a065669a986d872a543a
[]
no_license
moon177/lianxi
2d7760430cc0a29354e5a819df0022de2033202c
7dc1744fcbb7d09c8377e0871c31de90f8f20b9e
refs/heads/master
2020-03-23T07:25:56.835641
2018-08-24T10:30:44
2018-08-24T10:30:44
141,270,811
0
0
null
null
null
null
UTF-8
Java
false
false
838
java
package fortest; import com.sun.org.apache.bcel.internal.generic.ARRAYLENGTH; import java.util.ArrayList; import java.util.HashMap; /** * @author * @Description: * @date 2018/7/26 18:49 */ public class ForDemo { private static final Integer ONE = new Integer(1);//为什么加这句话 public static void main(String args[]) { /*String[] args = {"aaa","bbb","ccc","aaa","ddd","ccc","ccc"}; Map m = new HashMap<>(); for (int i = 0;i<args.length;i++){//什么意思 Integer freq = (Integer) m.get(args[i]);//freq什么意思,这句话为什么要用这种方式人 m.put(args[i],(freq==null? ONE : new Integer(freq.intValue() +1))); } System.out.println (m.size() + "distinct words detected:"); System.out.println(m);*/ } }
[ "545518104@qq.com" ]
545518104@qq.com
b53d59846edb783df3e3eff5b361239827b137cb
cc7840130a3bfef2c698d9a35d2b7d4f1c646839
/src/main/java/com/yamada/weibo/utils/FileUtil.java
0f04cdd7db0cb2dbb68a7cd331c0cba291508dda
[]
no_license
yamadadada/wb-backend
6046bf48eccc2b4aa141ee2c1df21882ada4e098
f1d8f9376fa91d93c18dc75b592bcc89f86a89a3
refs/heads/master
2022-06-24T22:33:25.768867
2020-05-31T12:55:48
2020-05-31T12:55:48
244,167,537
0
0
null
2022-06-21T02:53:51
2020-03-01T14:50:45
Java
UTF-8
Java
false
false
1,782
java
package com.yamada.weibo.utils; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; import org.springframework.web.multipart.MultipartFile; import java.io.File; import java.io.IOException; @Slf4j @Component public class FileUtil { public static String imageHost; public static String imagePath; @Value("${upload.imageHost}") public void setImageHost(String imageHost) { FileUtil.imageHost = imageHost; } @Value("${upload.imagePath}") public void setImagePath(String imagePath) { FileUtil.imagePath = imagePath; } public static boolean upload(MultipartFile file, String path, String fileName) { String realPath = path + "/" + fileName; File f = new File(realPath); //判断文件父目录是否存在 if (!f.getParentFile().exists()){ if (!f.getParentFile().mkdir()) { log.error("【上传图片】创建目录错误: " + f.toString()); return false; } } try { file.transferTo(f); return true; } catch (IOException e) { e.printStackTrace(); return false; } } public static boolean delete(String path, String fileName) { String fullPath = path + "/" + fileName; File file = new File(fullPath); if (file.exists()) { if (file.delete()) { return true; } else { log.error("【删除文件】删除文件失败:" + fullPath); return false; } } log.error("【删除文件】文件不存在:" + fullPath); return false; } }
[ "297354270@qq.com" ]
297354270@qq.com
cf4863257ef519091d393127acf9cc5c790b5951
f62b80bf6a8df55c83f035e79639ef279c677d01
/src/main/java/com/ringcentral/definitions/ListNetworksParameters.java
cd160037924fa7cd83e8af4d704cc89c1b9f4d7a
[]
no_license
ringcentral/ringcentral-java
2776c83b7ec822b2ac01b8abed6a29e9d288d9da
b0fb081ffa48151d1a9b72517d2a5144a41144a5
refs/heads/master
2023-09-01T19:01:31.720178
2023-08-21T20:51:29
2023-08-21T20:51:29
55,440,696
17
27
null
2023-08-21T20:27:22
2016-04-04T20:00:47
Java
UTF-8
Java
false
false
1,870
java
package com.ringcentral.definitions; /** * Query parameters for operation listNetworks */ public class ListNetworksParameters { /** * Internal identifier of a site for filtering. To indicate company main * site `main-site` value should be specified. Supported only if multi-site feature * is enabled for the account. Multiple values are supported. */ public String[] siteId; /** * Filters entries by the specified substring (search by chassis * ID, switch name or address) The characters range is 0-64 (if empty the filter * is ignored) */ public String searchString; /** * Comma-separated list of fields to order results prefixed by &#039;+&#039; * sign (ascending order) or &#039;-&#039; sign (descending order). The default * sorting is by `name` */ public String orderBy; /** * Indicates a page size (number of items). The values supported: * `Max` or numeric value. If not specified, 100 records are returned per one * page&#039; * Format: int32 */ public Long perPage; /** * Indicates a page number to retrieve. Only positive number values * are supported * Format: int32 * Default: 1 */ public Long page; public ListNetworksParameters siteId(String[] siteId) { this.siteId = siteId; return this; } public ListNetworksParameters searchString(String searchString) { this.searchString = searchString; return this; } public ListNetworksParameters orderBy(String orderBy) { this.orderBy = orderBy; return this; } public ListNetworksParameters perPage(Long perPage) { this.perPage = perPage; return this; } public ListNetworksParameters page(Long page) { this.page = page; return this; } }
[ "tyler4long@gmail.com" ]
tyler4long@gmail.com
838481555560332cb26caa2705d864942380d1d9
e5392bd634a39217d9571ce3e21dd7063028a960
/NewServlet/companyData/src/companyData/BatchTest.java
6b2f3c296c2a8df7dca5c8d54b1684dca3cd329b
[]
no_license
Praveen421/java_test
7f7885e1c468e464a8a559eda3b278770888f565
3cd8ccbc654c086cddc13da5e89348cfd3db9771
refs/heads/master
2020-06-19T17:53:56.904284
2019-07-14T07:56:35
2019-07-14T07:56:35
196,808,774
0
0
null
null
null
null
UTF-8
Java
false
false
695
java
package companyData; import java.sql.*; public class BatchTest { public static void main(String[] args) throws SQLException,ClassNotFoundException { Class.forName("oracle.jdbc.driver.OracleDriver"); Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:orcl", "scott", "1234"); Statement stm=con.createStatement(); stm.addBatch("insert into emp values (1025,'rishab','clerk',7499,'20-DEC-80',5000,200,20)"); stm.addBatch("insert into emp values (1026,'diksha','manager',7699,'21-DEC-80',3500,100,30)"); int k[]=stm.executeBatch(); for(int i=0;i<k.length;i++) { System.out.println((i+1)+"row updated "); } stm.clearBatch(); con.close(); } }
[ "pravee.kr855@gmail.com" ]
pravee.kr855@gmail.com
50659563533f56e3e99a4eee7fd5f4756a1570f0
2d4e571e6e29cc768988498a81885c56b36dac4d
/src/main/java/com/retrochipradio/tasty/util/IHasModel.java
09947953134da904b127a5f1c9add56b1b4b182b
[]
no_license
benserwa/Tasty
ac3012ab9ec65d7e6c0533b3dddf18f59aab0f4d
b94c2975f7ded46dc1e06f958663a1d3023b7ce6
refs/heads/master
2020-05-14T09:34:26.806533
2019-04-16T18:13:30
2019-04-16T18:13:30
181,741,199
0
0
null
null
null
null
UTF-8
Java
false
false
102
java
package com.retrochipradio.tasty.util; public interface IHasModel { public void registerModels(); }
[ "enemyviolent@gmail.com" ]
enemyviolent@gmail.com
5ec592417b986115944a1dc8c35244133a1bc0f3
87486d427c9ca90f587c51baae58446934aa3b64
/src/main/java/readandwrite/book/cyc2018/javaIO/NIOClient.java
3aaf315534d1485b3a9be94259836821d253e87a
[]
no_license
handsomZohn/spring-boot-01
002d39de44e78fc3ed7b220c5ae3210429b242b7
05d619f1207ac6f604f011ce6880e7ee739c3ace
refs/heads/master
2022-06-19T18:00:40.096213
2021-06-09T11:42:18
2021-06-09T11:42:18
147,942,032
0
0
null
2022-06-17T03:05:22
2018-09-08T14:45:00
Java
UTF-8
Java
false
false
574
java
package readandwrite.book.cyc2018.javaIO; import java.io.IOException; import java.io.OutputStream; import java.net.Socket; /** *@Description 套接字NIO实例客户端 *@CreateDate 18/07/18 16:21 *@Author zohn *@Version 1.0 * */ public class NIOClient { public static void main(String[] args) throws IOException { Socket socket = new Socket("127.0.0.1", 8888); OutputStream outputStream = socket.getOutputStream(); String s = "hello world"; outputStream.write(s.getBytes()); outputStream.close(); } }
[ "zzohn@foxmail.com" ]
zzohn@foxmail.com
16439c39115254c0e653f973a2083f36fd2d5e76
d46f553291b64388ecfd1459ab35055703a95d6f
/com.choucair.base/src/main/java/utilities/utilidadesEvidencias.java
abe6010156d5d280a4db482ea8d4c44cda2bdd6d
[]
no_license
rafaperez49/Proyecto-Automatizacion
417074ee876cbbda6e6b1715cb9a6dfbb003a463
38f4294a2a46629c7d49ecad476af9480635dcf4
refs/heads/master
2020-03-21T23:36:46.049264
2018-07-03T14:09:43
2018-07-03T14:09:43
139,197,447
0
0
null
null
null
null
UTF-8
Java
false
false
3,824
java
package utilities; import java.awt.Rectangle; import java.awt.Robot; import java.awt.Toolkit; import java.awt.image.BufferedImage; import java.io.BufferedReader; import java.io.File; import java.io.IOException; import java.io.InputStreamReader; import java.net.MalformedURLException; import java.net.URL; import javax.imageio.ImageIO; import org.openqa.selenium.By; import org.openqa.selenium.WebElement; import org.openqa.selenium.winium.DesktopOptions; import org.openqa.selenium.winium.WiniumDriver; import org.openqa.selenium.winium.WiniumDriverService; import net.serenitybdd.core.Serenity; import net.serenitybdd.core.pages.PageObject; public class utilidadesEvidencias { public static WiniumDriver driver = null; private static final String TASKLIST = "tasklist"; private static final String KILL = "taskkill /F /IM "; public static WiniumDriver Eldriver; static WiniumDriverService service=null; public static boolean isProcessRunning(String serviceName) throws Exception { Process p = Runtime.getRuntime().exec(TASKLIST); BufferedReader reader = new BufferedReader(new InputStreamReader( p.getInputStream())); String line; while ((line = reader.readLine()) != null) { System.out.println(line); if (line.contains(serviceName)) { return true; } } return false; } public static void abrirProgramaN(String ruta, String rutaPrograma) throws Exception { if (isProcessRunning("Winium.Desktop.Driver.exe")) killProcess("Winium.Desktop.Driver.exe"); DesktopOptions option = new DesktopOptions(); option.setApplicationPath(rutaPrograma); option.setDebugConnectToRunningApp(false); option.setLaunchDelay(2); File driverPath = new File(ruta); service =new WiniumDriverService.Builder().usingDriverExecutable(driverPath).usingPort(9999).withVerbose(false).withSilent(false).buildDesktopService(); Thread.sleep(2000); service.start(); Thread.sleep(5000); driver = new WiniumDriver(service,option); Thread.sleep(5000); } public static void iniciarProgramaConWinium() throws Exception { if (isProcessRunning("Winium.Desktop.Driver.exe")) killProcess("Winium.Desktop.Driver.exe"); } public static void killProcess(String serviceName) throws Exception { Runtime.getRuntime().exec(KILL + serviceName); } public static void tomaevidencia() { // waitFor(1).seconds(); Serenity.takeScreenshot(); } public static void tomascreenshot(String rutaEvidencia) throws Throwable { //waitFor(1).seconds(); Robot robot = new Robot(); BufferedImage screenShot = robot.createScreenCapture(new Rectangle(Toolkit.getDefaultToolkit().getScreenSize())); ImageIO.write(screenShot, "PNG", new File(rutaEvidencia)); } public static void minimizar() { WebElement window = driver.findElementByClassName("Chrome_WidgetWin_1"); window.findElement(By.name("Minimizar")).click(); } public static void tomaevidenciaOculta(PageObject winiumPage, String rutaImagen) throws Throwable { winiumPage.open(); tomaevidencia(); //Ejecuta el proceso deseado Runtime.getRuntime().exec( "start chrome file:///"+rutaImagen+'"'); //Ejecuta el comando en proceso separado Runtime.getRuntime().exec(new String[]{"cmd", "/c","start chrome file:///"+rutaImagen+'"'}); minimizar(); Runtime.getRuntime().exec("taskkill /f /pid chromedriver.exe",null); Runtime.getRuntime().exec("taskkill /f /pid chrome.exe",null); } public static void ejecutarPrograma(String elPrograma) throws MalformedURLException { DesktopOptions option = new DesktopOptions(); Eldriver = new WiniumDriver(new URL("http://localhost:9999"),option); option.setApplicationPath(elPrograma); } }
[ "rafaperez.9@hotmail.com" ]
rafaperez.9@hotmail.com
5a84288949f761725eb1a4670c30ee0678f71e31
2b1f7bf4a2f1e191525529f5ed073487e1979fe2
/backend/src/main/java/com/devsuperior/dsvendas/repositories/SellerRepository.java
d2c8ae263c134defe57c35cf19fa700827640ef9
[]
no_license
JosimarSPJunior/CursoDevSuperior
fff1d88af021059c576e5f5d000ee891171b9750
7541eb4ac949c2ff1cfd54b5a268504fb1e23bb8
refs/heads/main
2023-07-27T15:41:20.221836
2021-09-12T23:12:17
2021-09-12T23:12:17
404,050,882
1
0
null
null
null
null
UTF-8
Java
false
false
235
java
package com.devsuperior.dsvendas.repositories; import org.springframework.data.jpa.repository.JpaRepository; import com.devsuperior.dsvendas.entities.Seller; public interface SellerRepository extends JpaRepository<Seller, Long> { }
[ "josimarsousapintojunior10@gmail.com" ]
josimarsousapintojunior10@gmail.com
3453a7c522d5027c6872421523f47baa87fdf7b9
bca4966fa8c8b72de7e0c86ee4c6d16da2f36f18
/core/src/ggl/gye/transmission/entities/NPCState.java
96ecef61a6e68d103627adb30389db9cd2390193
[]
no_license
Marcosan/ggjgye2018
8cc153a68ad9cfb38315c93f66f0a0a7f0ebb35b
f24f35e2b9cb108929b062d9a5defce2523eeae8
refs/heads/master
2021-05-09T18:52:26.652560
2018-01-28T21:27:48
2018-01-28T21:27:48
119,175,963
0
0
null
null
null
null
UTF-8
Java
false
false
137
java
package ggl.gye.transmission.entities; /** * Created by root on 11/08/17. */ public enum NPCState { HIGH, MEDIUM, LOW; }
[ "marcoxavibsc@gmail.com" ]
marcoxavibsc@gmail.com
1995d8213628ef3c49058f8ca637c9ebf713f996
4745ad8cf5e65efa05073285f85a34597e4e2144
/leetcode/Convert Sorted Array to Binary Search Tree.java
dce6170916c90b8bebeaa94614fc7bbb6132cb1a
[]
no_license
skong03/leetcode
58b8a06b5f12f2f1b6f80193faf64f924c8229b8
e0eb18c7e743c74af9b9f9f13559a1d478ffa949
refs/heads/master
2020-06-05T02:03:26.331374
2013-11-20T22:35:18
2013-11-20T22:35:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
843
java
/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ public class Solution { public TreeNode sortedArrayToBST(int[] num) { // Start typing your Java solution below // DO NOT write main() function if(num.length < 1) return null; return treeImp(0, num.length-1, num); } private TreeNode treeImp(int head, int tail, int[] num){ if(head > tail) return null; if(head == tail) return new TreeNode(num[head]); int mid = (head + tail)/2; TreeNode x = new TreeNode(num[mid]); x.left = treeImp(head, mid-1, num); x.right = treeImp(mid+1, tail, num); return x; } }
[ "skong03@gmail.com" ]
skong03@gmail.com
3e7fb675ec1df4ab060cc37ef97a19842c34bff0
d473ee8b9e598ce5e58de13b4c7348d1c72e3971
/src/main/java/com/prabhav/NetBallActivity.java
713e3c7cb072b0063b97686ff81848b7817bf8de
[]
no_license
prabhavgarg/Scorer
9daff1d9cc13372bc4fd879aa6c52f31b0ffeaf1
3d22758fda1739793ae79549043542bc06585f2d
refs/heads/master
2021-07-08T23:32:25.887124
2017-10-05T11:08:55
2017-10-05T11:08:55
100,839,222
0
0
null
null
null
null
UTF-8
Java
false
false
11,897
java
package com.prabhav.play; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.os.Handler; import android.os.SystemClock; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.text.format.DateFormat; import android.view.LayoutInflater; import android.view.Menu; import android.view.MenuItem; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; import com.google.firebase.database.DatabaseReference; import com.google.firebase.database.FirebaseDatabase; import java.util.ArrayList; import java.util.Date; public class NetBallActivity extends AppCompatActivity { private final String NETBALL = "NetBall"; int scoreA,scoreB,total=-1; TextView textView,t1,t2,date, teamANameHeading, teamBNameHeading ; Button start, pause, reset; long MillisecondTime, StartTime, TimeBuff, UpdateTime = 0L ; Handler handler; String dateString, comment_Save, gameName; final Context context = this; DatabaseReference netBall; int Seconds, Minutes, MilliSeconds ; ArrayList<Integer> Arr = new ArrayList<>(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_net_ball); textView = (TextView)findViewById(R.id.timer); start = (Button)findViewById(R.id.startButton); pause = (Button)findViewById(R.id.pauseButton); reset = (Button)findViewById(R.id.resetButton); handler = new Handler() ; teamANameHeading = (TextView)findViewById(R.id.teamANameNetball); teamBNameHeading = (TextView)findViewById(R.id.teamBNameNetball); teamANameHeading.setText("Team A"); teamBNameHeading.setText("Team B"); gameName = NETBALL; netBall = FirebaseDatabase.getInstance().getReference(); start.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { StartTime = SystemClock.uptimeMillis(); handler.postDelayed(runnable, 0); reset.setEnabled(false); start.setEnabled(false); } }); pause.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { TimeBuff += MillisecondTime; handler.removeCallbacks(runnable); reset.setEnabled(true); start.setEnabled(true); } }); reset.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { start.setEnabled(true); Arr.clear(); total=-1; scoreA=0; scoreB=0; displayForTeamA(scoreA); displayForTeamB(scoreB); MillisecondTime = 0L ; StartTime = 0L ; TimeBuff = 0L ; UpdateTime = 0L ; Seconds = 0 ; Minutes = 0 ; MilliSeconds = 0 ; textView.setText("00:00:000"); } }); } public Runnable runnable = new Runnable() { public void run() { MillisecondTime = SystemClock.uptimeMillis() - StartTime; UpdateTime = TimeBuff + MillisecondTime; Seconds = (int) (UpdateTime / 1000); Minutes = Seconds / 60; Seconds = Seconds % 60; MilliSeconds = (int) (UpdateTime % 1000); if (UpdateTime <= 3600000) textView.setText("" + Minutes + ":" + String.format("%02d", Seconds) + ":" + String.format("%03d", MilliSeconds)); else { MillisecondTime = 0L; StartTime = 0L; TimeBuff = 0L; UpdateTime = 0L; Seconds = 0; Minutes = 0; MilliSeconds = 0; textView.setText("00:00:000"); saveData(); reset.setEnabled(true); return; } handler.postDelayed(this, 0); } }; public void addOneForTeamA(View view) { total++; Arr.add(1); scoreA+=1; displayForTeamA(scoreA); } public void displayForTeamA(int score) { TextView scoreView = (TextView) findViewById(R.id.team_a_score); scoreView.setText(String.valueOf(score)); } public void addOneForTeamB(View view) { total++; Arr.add(11); scoreB+=1; displayForTeamB(scoreB); } public void displayForTeamB(int score) { TextView scoreView = (TextView) findViewById(R.id.team_b_score); scoreView.setText(String.valueOf(score)); } public void resetScores(View view) { Arr.clear(); total=-1; scoreA=0; scoreB=0; displayForTeamA(scoreA); displayForTeamB(scoreB); } public void undoScore(View view) { if(scoreA>0&&Arr.get(total)==1){scoreA-=1;Arr.remove(total);total--;} else if(scoreB>0&&Arr.get(total)==11){scoreB-=1;Arr.remove(total);total--;} displayForTeamA(scoreA); displayForTeamB(scoreB); } @Override public boolean onOptionsItemSelected(MenuItem item) { // Handle item selection switch (item.getItemId()) { case R.id.action_teamNames: setNames(); return true; case R.id.action_save: saveData(); return true; case R.id.action_history: Intent intent = new Intent(this,HistoryActivity.class); intent.putExtra("GAME_ID", NETBALL); startActivity(intent); return true; default: return super.onOptionsItemSelected(item); } } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.games_menu, menu);//Menu Resource, Menu return true; } public void saveData(){ // get prompts.xml view LayoutInflater li = LayoutInflater.from(context); View promptsView = li.inflate(R.layout.save_dialog, null); AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder( context); // set prompts.xml to alertdialog builder alertDialogBuilder.setView(promptsView); final EditText userInput = (EditText) promptsView .findViewById(R.id.editTextDialogUserInput); if(scoreA>scoreB) userInput.setText(teamANameHeading.getText().toString() +" won over "+teamBNameHeading.getText().toString()+"!!"); else if(scoreA<scoreB) userInput.setText(teamBNameHeading.getText().toString() +" won over "+teamANameHeading.getText().toString()+"!!"); else userInput.setText("Match gets Tied!!"); t1 = (TextView)promptsView.findViewById(R.id.teamAScore); t2 = (TextView)promptsView.findViewById(R.id.teamBScore); date = (TextView)promptsView.findViewById(R.id.date); t1.setText(teamANameHeading.getText().toString()+" : " +Integer.toString(scoreA)); t2.setText(teamBNameHeading.getText().toString()+" : " +Integer.toString(scoreB)); Date d = new Date(); CharSequence s = DateFormat.format("MMMM d, yyyy ", d.getTime()); date.setText(s); dateString=s.toString(); // set dialog message alertDialogBuilder .setCancelable(false) .setPositiveButton("SAVE", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog,int id) { // get user input and set it to result // edit text comment_Save = userInput.getText().toString().trim(); //save it to the firebase database pushingDataToFirebase(); } }) .setNegativeButton("Cancel", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.cancel(); } }); // create alert dialog AlertDialog alertDialog = alertDialogBuilder.create(); // show it alertDialog.show(); } public void setNames(){ // get prompts.xml view LayoutInflater li = LayoutInflater.from(context); View promptsView = li.inflate(R.layout.team_names, null); AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder( context); // set prompts.xml to alertdialog builder alertDialogBuilder.setView(promptsView); final EditText userInputA = (EditText) promptsView .findViewById(R.id.teamANameID); final EditText userInputB = (EditText) promptsView .findViewById(R.id.teamBNameID); // set dialog message alertDialogBuilder .setCancelable(false) .setPositiveButton("OK", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog,int id) { // get user input and set it to result // edit text if (userInputA.getText().toString().trim().length() != 0) teamANameHeading.setText(userInputA.getText().toString()); if (userInputB.getText().toString().trim().length() != 0) teamBNameHeading.setText(userInputB.getText().toString()); //save it to the firebase database } }) .setNegativeButton("Cancel", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) { dialog.cancel(); } }); // create alert dialog AlertDialog alertDialog = alertDialogBuilder.create(); // show it alertDialog.show(); } public void pushingDataToFirebase(){ String d = dateString; String teamAScore = Integer.toString(scoreA); String teamBScore = Integer.toString(scoreB); String gameName = NETBALL; String aName=teamANameHeading.getText().toString().trim(); String bName=teamBNameHeading.getText().toString().trim(); String comment= comment_Save; int image =R.drawable.netball_image; String id = netBall.push().getKey(); AddScores addScores = new AddScores(image,id,teamAScore,teamBScore,d,gameName,aName,bName,comment); netBall.child(MainActivity.USER_ID).child(gameName).child(id).setValue(addScores); Toast.makeText(this,"Event Saved Successfully",Toast.LENGTH_LONG).show(); } }
[ "noreply@github.com" ]
noreply@github.com
2e40ab9ed42330c73b26ab68448b69f221d112c2
1fcfb498df38549a174b55d2f26276998d08311e
/TeamCode/src/main/java/org/montclairrobotics/sprocket/utils/SmoothVectorInput.java
514f96d2d2766ef3e960d95e3db93eee13f67770
[ "BSD-3-Clause" ]
permissive
MontclairRobotics/RelicRecovery2017
0cb5e35cc69ff070ac65ecf6540c007c0871fee4
141fed4c84d9de77ee8b0433a2fed3d638e41f9c
refs/heads/master
2021-08-28T19:19:44.059495
2017-11-27T21:00:57
2017-11-27T21:00:57
108,323,224
0
0
null
2017-12-06T20:14:51
2017-10-25T20:36:11
Java
UTF-8
Java
false
false
738
java
package org.montclairrobotics.sprocket.utils; import org.montclairrobotics.sprocket.geometry.Vector; import org.montclairrobotics.sprocket.geometry.XY; public class SmoothVectorInput implements Input<Vector>{ private SmoothInput x,y; public SmoothVectorInput(int len,final Input<Vector> inp) { x=new SmoothInput(len,new Input<Double>(){ @Override public Double get() { // TODO Auto-generated method stub return inp.get().getX(); }}); y=new SmoothInput(len,new Input<Double>(){ @Override public Double get() { // TODO Auto-generated method stub return inp.get().getY(); }}); } @Override public Vector get() { // TODO Auto-generated method stub return new XY(x.get(),y.get()); } }
[ "rafi@ukbaums.com" ]
rafi@ukbaums.com
6dd5a6bfa7fb17d4a9bf2467eacd6d463b66f4ee
ac2453dc704f9b5e30aa2fb9d3ef543f27551848
/boot-showcase-service/src/main/java/org/lina/boot/model/Category.java
f985a435ce923aea75a6b6c608766826dc724b47
[]
no_license
eluwei/spring-boot-showcase
d4fee7cf216364ee73a6f1a896c291943cdb7102
0987e40dbb7cd5a64dca87217adcc34b0ee2adc2
refs/heads/master
2021-06-10T22:52:00.139196
2016-12-05T03:33:19
2016-12-05T03:33:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,156
java
package org.lina.boot.model; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; @Table(name="category") public class Category { /** * This field was generated by MyBatis Generator. * This field corresponds to the database column category.category_id * * @mbggenerated Tue May 31 17:27:56 CST 2016 */ @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long categoryId; /** * This field was generated by MyBatis Generator. * This field corresponds to the database column category.category_name * * @mbggenerated Tue May 31 17:27:56 CST 2016 */ private String categoryName; /** * This field was generated by MyBatis Generator. * This field corresponds to the database column category.descriptions * * @mbggenerated Tue May 31 17:27:56 CST 2016 */ private String descriptions; /** * This field was generated by MyBatis Generator. * This field corresponds to the database column category.parent_categroy_id * * @mbggenerated Tue May 31 17:27:56 CST 2016 */ private Long parentCategoryId; /** * This field was generated by MyBatis Generator. * This field corresponds to the database column category.path_Str * * @mbggenerated Tue May 31 17:27:56 CST 2016 */ private String pathStr; /** * This method was generated by MyBatis Generator. * This method returns the value of the database column category.category_id * * @return the value of category.category_id * * @mbggenerated Tue May 31 17:27:56 CST 2016 */ public Long getCategoryId() { return categoryId; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column category.category_id * * @param categoryId the value for category.category_id * * @mbggenerated Tue May 31 17:27:56 CST 2016 */ public void setCategoryId(Long categoryId) { this.categoryId = categoryId; } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column category.category_name * * @return the value of category.category_name * * @mbggenerated Tue May 31 17:27:56 CST 2016 */ public String getCategoryName() { return categoryName; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column category.category_name * * @param categoryName the value for category.category_name * * @mbggenerated Tue May 31 17:27:56 CST 2016 */ public void setCategoryName(String categoryName) { this.categoryName = categoryName == null ? null : categoryName.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column category.descriptions * * @return the value of category.descriptions * * @mbggenerated Tue May 31 17:27:56 CST 2016 */ public String getDescriptions() { return descriptions; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column category.descriptions * * @param descriptions the value for category.descriptions * * @mbggenerated Tue May 31 17:27:56 CST 2016 */ public void setDescriptions(String descriptions) { this.descriptions = descriptions == null ? null : descriptions.trim(); } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column category.parent_categroy_id * * @return the value of category.parent_categroy_id * * @mbggenerated Tue May 31 17:27:56 CST 2016 */ public Long getParentCategoryId() { return parentCategoryId; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column category.parent_categroy_id * * @param parentCategoryId the value for category.parent_categroy_id * * @mbggenerated Tue May 31 17:27:56 CST 2016 */ public void setParentCategoryId(Long parentCategoryId) { this.parentCategoryId = parentCategoryId; } /** * This method was generated by MyBatis Generator. * This method returns the value of the database column category.path_Str * * @return the value of category.path_Str * * @mbggenerated Tue May 31 17:27:56 CST 2016 */ public String getPathStr() { return pathStr; } /** * This method was generated by MyBatis Generator. * This method sets the value of the database column category.path_Str * * @param pathStr the value for category.path_Str * * @mbggenerated Tue May 31 17:27:56 CST 2016 */ public void setPathStr(String pathStr) { this.pathStr = pathStr == null ? null : pathStr.trim(); } }
[ "ljs2342003@gmail.com" ]
ljs2342003@gmail.com
e640015d70df4dc2d8fe3a2ed7e514cc84175143
4688d19282b2b3b46fc7911d5d67eac0e87bbe24
/aws-java-sdk-clouddirectory/src/main/java/com/amazonaws/services/clouddirectory/model/transform/AttachObjectRequestMarshaller.java
a1a547a1626fd376fd70b626ded7327d1dbce7b7
[ "Apache-2.0" ]
permissive
emilva/aws-sdk-java
c123009b816963a8dc86469405b7e687602579ba
8fdbdbacdb289fdc0ede057015722b8f7a0d89dc
refs/heads/master
2021-05-13T17:39:35.101322
2018-12-12T13:11:42
2018-12-12T13:11:42
116,821,450
1
0
Apache-2.0
2018-09-19T04:17:41
2018-01-09T13:45:39
Java
UTF-8
Java
false
false
3,025
java
/* * Copyright 2012-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.clouddirectory.model.transform; import javax.annotation.Generated; import com.amazonaws.SdkClientException; import com.amazonaws.services.clouddirectory.model.*; import com.amazonaws.protocol.*; import com.amazonaws.annotation.SdkInternalApi; /** * AttachObjectRequestMarshaller */ @Generated("com.amazonaws:aws-java-sdk-code-generator") @SdkInternalApi public class AttachObjectRequestMarshaller { private static final MarshallingInfo<String> DIRECTORYARN_BINDING = MarshallingInfo.builder(MarshallingType.STRING) .marshallLocation(MarshallLocation.HEADER).marshallLocationName("x-amz-data-partition").build(); private static final MarshallingInfo<StructuredPojo> PARENTREFERENCE_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED) .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("ParentReference").build(); private static final MarshallingInfo<StructuredPojo> CHILDREFERENCE_BINDING = MarshallingInfo.builder(MarshallingType.STRUCTURED) .marshallLocation(MarshallLocation.PAYLOAD).marshallLocationName("ChildReference").build(); private static final MarshallingInfo<String> LINKNAME_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD) .marshallLocationName("LinkName").build(); private static final AttachObjectRequestMarshaller instance = new AttachObjectRequestMarshaller(); public static AttachObjectRequestMarshaller getInstance() { return instance; } /** * Marshall the given parameter object. */ public void marshall(AttachObjectRequest attachObjectRequest, ProtocolMarshaller protocolMarshaller) { if (attachObjectRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(attachObjectRequest.getDirectoryArn(), DIRECTORYARN_BINDING); protocolMarshaller.marshall(attachObjectRequest.getParentReference(), PARENTREFERENCE_BINDING); protocolMarshaller.marshall(attachObjectRequest.getChildReference(), CHILDREFERENCE_BINDING); protocolMarshaller.marshall(attachObjectRequest.getLinkName(), LINKNAME_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } } }
[ "" ]
67caf185dfee72baa12288f30bba1f391d88193c
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/12/12_717d1b97b2ab68d1e09e943fe2c71c836ab69fb4/RouterVersion/12_717d1b97b2ab68d1e09e943fe2c71c836ab69fb4_RouterVersion_t.java
48e8ce36efad0cb612cd1a0973ee34419fde9362
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
968
java
package net.i2p.router; /* * free (adj.): unencumbered; not under the control of others * Written by jrandom in 2003 and released into the public domain * with no warranty of any kind, either expressed or implied. * It probably won't make your computer catch on fire, or eat * your children, but it might. Use at your own risk. * */ import net.i2p.CoreVersion; /** * Expose a version string * */ public class RouterVersion { public final static String ID = "$Revision: 1.366 $ $Date: 2006/03/03 22:04:09 $"; public final static String VERSION = "0.6.1.12"; public final static long BUILD = 4; public static void main(String args[]) { System.out.println("I2P Router version: " + VERSION + "-" + BUILD); System.out.println("Router ID: " + RouterVersion.ID); System.out.println("I2P Core version: " + CoreVersion.VERSION); System.out.println("Core ID: " + CoreVersion.ID); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
b294eeb88921ec2ef4147915b531acd14bfb7f54
3030698787761271e7a20070a381778ece6f84bc
/Biblioteca JavaServelets/CapetasLp2123/CapaNegociosBiblioteca/src/paqueteNegocio/negUsuario.java
9252164d78cf67099d9e045321ce5aea99c832dd
[]
no_license
acampos9913/Academicos
b6866e7f63baa9a2a2d6054489e82a73e63242d2
7d20ae74197c65dd92bd1425b2b1ed977f5d763f
refs/heads/master
2020-12-20T18:33:33.641847
2020-01-25T13:40:04
2020-01-25T13:40:04
236,171,134
1
0
null
null
null
null
UTF-8
Java
false
false
709
java
package paqueteNegocio; import PaqueteEntidades.entUsuario; import java.util.ArrayList; import paqueteDatos.datUsuario; public class negUsuario { public static entUsuario VerificarAcceso(String prmUser, String prmPass) throws Exception{ try{ return datUsuario.VerificarAcceso(prmUser, prmPass); }catch(Exception e){ throw e; } } public static ArrayList<entUsuario> ListarUsuarios(String nombreUsuario,String tipoUsuario) throws Exception{ try { return datUsuario.ListarUsuarios(nombreUsuario,tipoUsuario); } catch (Exception e) { throw e; } } }
[ "acampos9913@gmail.com" ]
acampos9913@gmail.com
911b96607136a7978cafdb47e21ab095bd87db21
1c63ab82cb710d5710440cb70184df9ea4973d95
/src/main/java/be/iccbxl/pid/controller/FeedController.java
16e344f72876ba41eb186a8735b865f94513bfe4
[]
no_license
azeddine-sa/PID_2emeSess
5485f961abdfd3dd3978e9a55263ce3b7c2b287b
ebb554e7f4d16602bab6dacb78ae5f9c7e02b2a2
refs/heads/main
2023-07-17T12:03:53.466705
2021-08-27T21:20:47
2021-08-27T21:20:47
392,676,253
0
0
null
2021-08-23T20:54:58
2021-08-04T12:14:59
Java
UTF-8
Java
false
false
2,390
java
package be.iccbxl.pid.controller; import java.time.ZoneId; import java.util.ArrayList; import java.util.Collections; import java.util.Date; import java.util.List; import be.iccbxl.pid.model.Representation; import be.iccbxl.pid.model.RepresentationService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import com.rometools.rome.feed.rss.Channel; import com.rometools.rome.feed.rss.Description; import com.rometools.rome.feed.rss.Image; import com.rometools.rome.feed.rss.Item; @RestController public class FeedController { @Autowired RepresentationService repService; @GetMapping(path = "/rss") public Channel rss() { Channel channel = new Channel(); channel.setFeedType("rss_2.0"); channel.setTitle("Reservation spectacles Feed"); channel.setDescription("Differents Spectacles"); channel.setLink("http://localhost:8080/"); channel.setUri("http://localhost:8080/"); channel.setGenerator("In ICC Programming"); /*Image image = new Image(); image.setUrl(""); image.setTitle("Reservation Feed"); image.setHeight(32); image.setWidth(32); channel.setImage(image);*/ Date postDate = new Date(); channel.setPubDate(postDate); List<Representation> list = repService.getLastShows(3); List<Item> items = new ArrayList<>(); for(Representation rep:list){ Item item = new Item(); item.setAuthor("system"); item.setLink("http://localhost:8080/representations/" + rep.getId()); item.setTitle(rep.getShow().getTitle()); item.setUri("http://localhost:8080/representations/" + rep.getId()); com.rometools.rome.feed.rss.Category category = new com.rometools.rome.feed.rss.Category(); category.setValue("Representation"); item.setCategories(Collections.singletonList(category)); Description descr = new Description(); descr.setValue(rep.getShow().getDescription()); item.setDescription(descr); item.setPubDate(Date.from(rep.getWhen().atZone(ZoneId.systemDefault()).toInstant())); items.add(item); } channel.setItems(items); return channel; } }
[ "bennour.ma@gmail.com" ]
bennour.ma@gmail.com
a4558679786baeb8bf05138cece0f8cd3bcf08af
11457abd64749f6e42e7b24243e042faa0aecf75
/src/main/java/study/spring/hellospring/service/DepartmentService.java
70a45bd66df3caddb95f9df0fc795dd865df155e
[]
no_license
junhee92kr/OpenAPI
452bdc89319fa79e74a43b7f727862e50c29e814
b192d10a77581415f2f1c35e329420f31fc73b58
refs/heads/master
2020-03-27T21:50:35.314872
2018-12-13T14:37:39
2018-12-13T14:37:39
147,179,479
0
0
null
null
null
null
UTF-8
Java
false
false
1,195
java
package study.spring.hellospring.service; import java.util.List; import study.spring.hellospring.model.Department; /** 학과 관리 기능을 제공하기 위한 Service 계층. */ public interface DepartmentService { /** * 학과 목록 조회 * @return 조회 결과에 대한 컬렉션 * @throws Exception */ // -> import java.util.List; public List<Department> getDepartmentList(Department department) throws Exception; /** * 학과 페이지 계산 * @param professor * @throws Exception */ public int getDepartmentCount(Department department) throws Exception; /** * 단일행 조회 * @param department * @return * @throws Exception */ public Department selectDepartmentItem(Department department) throws Exception; /** * 학과 조회 * @param department * @throws Exception */ public void addDepartment(Department department) throws Exception; /** * 학과 삭제 * @param department * @throws Exception */ public void deleteDepartment(Department department) throws Exception; /** * 학과 수정 * @param department * @throws Exception */ public void editDepartment(Department department) throws Exception; }
[ "dlfmadmfeo@gmail.com" ]
dlfmadmfeo@gmail.com
e1889973de51a226705bf99f05bc5f6c0ff59acf
2b2ce877a5cbb85ce6f39a293576cbe2cf1ed4d8
/clouddo-zuul/src/test/java/com/bootdo/clouddozuul/ClouddoZuulApplicationTests.java
347074191c8f06e5449d1786e7ebf54d10c0ecce
[]
no_license
xkang1019/clouddo
c8a441d8eadc3eb9fc91bb690ee22fddeba1083a
d79d1fa9b80e405bccc75c08f277f0d9e803c8c3
refs/heads/master
2020-04-07T06:15:11.123140
2018-02-03T11:24:42
2018-02-03T11:24:42
124,187,932
2
0
null
2018-03-07T06:09:34
2018-03-07T06:09:34
null
UTF-8
Java
false
false
344
java
package com.bootdo.clouddozuul; 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 ClouddoZuulApplicationTests { @Test public void contextLoads() { } }
[ "1992lcg@163.com" ]
1992lcg@163.com
e60796741ec4da0f7c8820eac4177cc2f29470f7
e8c38cd847fa39afddaec13f8869934d87c45b74
/TemLarB/TemLarB/src/java/br/com/temlar/DAO/QuartoDAOImpl.java
df6345eb3cdc2679d60e8c6bb22bc2e1ea8b053e
[]
no_license
JessicaSPina/temlar
94464cd9b9911b20a476a820f4ee8d5689568ef7
398f31dd57d9567740093c0bcdc33ab7b97d65c4
refs/heads/master
2021-01-12T17:44:53.157425
2016-10-22T15:45:18
2016-10-22T15:45:18
71,636,994
0
0
null
null
null
null
UTF-8
Java
false
false
9,526
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 br.com.temlar.DAO; import br.com.temlar.modell.Quarto; import br.com.temlar.modell.Pessoa; import br.com.temlar.util.ConnectionFactory; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.List; /** * * @author Ana Paula */ public class QuartoDAOImpl implements GenericDAO{ private Connection conn; public QuartoDAOImpl() throws Exception { try { this.conn = ConnectionFactory.getConnection(); System.out.println("Conectado com sucesso!"); } catch (Exception ex) { throw new Exception("Problemas ao conectar ao BD! Erro: " + ex.getMessage()); } } @Override public Boolean cadastrar(Object object) { Quarto quarto = (Quarto) object; PreparedStatement stmt = null; String sql = "Insert into quarto (tipo_telhado_quarto, tipo_piso_quarto, situacao_pintura_quarto, bairro_quarto, end_quarto, num_quarto, mobilia_quarto, cidade_quarto, uf_quarto, valor_quarto, id_pessoa, cep_quarto) values (?,?,?,?,?,?,?,?,?,?,?,?);"; try { stmt = conn.prepareStatement(sql); stmt.setString(1, quarto.getTipoTelhadoQuarto()); stmt.setString(2, quarto.getTipoPisoQuarto()); stmt.setString(3, quarto.getSituacaoPinturaQuarto()); stmt.setString(4, quarto.getBairroQuarto()); stmt.setString(5, quarto.getEndQuarto()); stmt.setInt(6, quarto.getNumQuarto()); stmt.setBoolean(7, quarto.getMobiliaQuarto()); stmt.setString(8, quarto.getCidadeQuarto()); stmt.setString(9, quarto.getUfQuarto()); stmt.setDouble(10, quarto.getValorQuarto()); stmt.setInt(11, quarto.getPessoa().getIdPessoa()); stmt.setString(12, quarto.getCepQuarto()); stmt.execute(); return true; } catch (SQLException ex) { System.out.println("Problemas ao cadastrar Quarto! Erro:" + ex.getMessage()); ex.printStackTrace(); return false; } finally { try { ConnectionFactory.closeConnection(conn, stmt); } catch (Exception ex) { System.out.println("Problemas ao fechar os parâmetros de conexão! Erro: " + ex.getMessage()); ex.printStackTrace(); } } } @Override public List<Object> listar() { List<Object> resultado = new ArrayList<Object>(); PreparedStatement stmt = null; ResultSet rs = null; String sql = "select q.*, p.nome_pessoa from quarto q, pessoa p where quarto.id_pessoa = p.id_pessoa;"; try { stmt = conn.prepareStatement(sql); rs = stmt.executeQuery(); while (rs.next()) { Quarto quarto = new Quarto(); quarto.setIdQuarto(rs.getInt("id_quarto")); quarto.setTipoTelhadoQuarto(rs.getString("tipo_telhado_quarto")); quarto.setTipoPisoQuarto(rs.getString("tipo_piso_quarto")); quarto.setSituacaoPinturaQuarto(rs.getString("situacao_pintura_quarto")); quarto.setBairroQuarto(rs.getString("bairro_quarto")); quarto.setEndQuarto(rs.getString("end_quarto")); quarto.setNumQuarto(rs.getInt("num_quarto")); quarto.setMobiliaQuarto(rs.getBoolean("mobilia_quarto")); quarto.setCidadeQuarto(rs.getString("cidade_quarto")); quarto.setUfQuarto(rs.getString("uf_quarto")); quarto.setValorQuarto(rs.getDouble("valor_quarto")); quarto.setCepQuarto(rs.getString("cep_quarto")); Pessoa pessoa = new Pessoa(); pessoa.setIdPessoa(rs.getInt("id_pessoa")); pessoa.setNomePessoa(rs.getString("nome_pessoa")); quarto.setPessoa(pessoa); resultado.add(quarto); } } catch (SQLException ex) { System.out.println("Problemas ao listar Quarto! Erro: " + ex.getMessage()); ex.printStackTrace(); } finally { try { ConnectionFactory.closeConnection(conn, stmt, rs); } catch (Exception ex) { System.out.println("Problemas ao fechar os parâmetros de conexão! Erro: " + ex.getMessage()); ex.printStackTrace(); } } return resultado; } @Override public void excluir(int idObject) { PreparedStatement stmt = null; String sql = "Delete from quarto where id_quarto=?;"; try { stmt = conn.prepareStatement(sql); stmt.setInt(1, idObject); stmt.executeUpdate(); } catch (SQLException ex) { System.out.println("Problemas ao excluir Quarto! Erro: " + ex.getMessage()); ex.printStackTrace(); } finally { try { ConnectionFactory.closeConnection(conn, stmt); } catch (Exception ex) { System.out.println("Problemas ao fechar os parâmetros de conexão! Erro: " + ex.getMessage()); ex.printStackTrace(); } } } @Override public Object carregar(int idObject) { PreparedStatement stmt = null; ResultSet rs = null; Quarto quarto = null; String sql = "select q.* , p.nome_pessoa " + "from quarto q, cidade c" + " where q.id_pessoa=p.id_pessoa and q.id_quarto=?;"; try { stmt = conn.prepareStatement(sql); stmt.setInt(1, idObject); rs = stmt.executeQuery(); if (rs.next()) { quarto = new Quarto(); quarto.setIdQuarto(rs.getInt("id_quarto")); quarto.setTipoTelhadoQuarto(rs.getString("tipo_telhado_quarto")); quarto.setTipoPisoQuarto(rs.getString("tipo_piso_quarto")); quarto.setSituacaoPinturaQuarto(rs.getString("situacao_pintura_quarto")); quarto.setBairroQuarto(rs.getString("bairro_quarto")); quarto.setEndQuarto(rs.getString("end_quarto")); quarto.setNumQuarto(rs.getInt("num_quarto")); quarto.setMobiliaQuarto(rs.getBoolean("mobilia_quarto")); quarto.setCidadeQuarto(rs.getString("cidade_quarto")); quarto.setUfQuarto(rs.getString("uf_quarto")); quarto.setValorQuarto(rs.getDouble("uf_quarto")); quarto.setCepQuarto(rs.getString("cep_quarto")); Pessoa pessoa = new Pessoa(); pessoa.setIdPessoa(rs.getInt("id_pessoa")); pessoa.setNomePessoa(rs.getString("nome_pessoa")); quarto.setPessoa(pessoa); } } catch (SQLException ex) { System.out.println("Problemas ao listar Quarto! Erro: " + ex.getMessage()); ex.printStackTrace(); } finally { try { ConnectionFactory.closeConnection(conn, stmt, rs); } catch (Exception ex) { System.out.println("Problemas ao fechar os parâmetros de conexão! Erro: " + ex.getMessage()); ex.printStackTrace(); } } return quarto; } @Override public Boolean alterar(Object object) { Quarto quarto = (Quarto) object; PreparedStatement stmt = null; String sql = "update quarto set , tipo_telhado_quarto=?, tipo_piso_quarto=?, situacao_pintura_quarto=?, bairro_quarto=?, end_quarto=?, num_quarto=?, mobilia_quarto=?, cidade_quarto=?, uf_quarto=?, valor_quarto=?, id_pessoa=?, cep_quarto=? " + "where id_quarto=?;"; try { stmt = conn.prepareStatement(sql); stmt.setString(1, quarto.getTipoTelhadoQuarto()); stmt.setString(2, quarto.getTipoPisoQuarto()); stmt.setString(3, quarto.getSituacaoPinturaQuarto()); stmt.setString(4, quarto.getBairroQuarto()); stmt.setString(5, quarto.getEndQuarto()); stmt.setInt(6, quarto.getNumQuarto()); stmt.setBoolean(7, quarto.getMobiliaQuarto()); stmt.setString(8, quarto.getCidadeQuarto()); stmt.setString(9, quarto.getUfQuarto()); stmt.setDouble(10, quarto.getValorQuarto()); stmt.setInt(11, quarto.getPessoa().getIdPessoa()); stmt.setString(12, quarto.getCepQuarto()); stmt.setInt(13, quarto.getIdQuarto()); stmt.executeUpdate(); return true; } catch (SQLException ex) { System.out.println("Problemas ao alterar Quarto! Erro:" + ex.getMessage()); ex.printStackTrace(); return false; } finally { try { ConnectionFactory.closeConnection(conn, stmt); } catch (Exception ex) { System.out.println("Problemas ao fechar os parâmetros de conexão! Erro: " + ex.getMessage()); ex.printStackTrace(); } } } }
[ "jessica.bertina.jp@gmail.com" ]
jessica.bertina.jp@gmail.com
47515d2de1a3f61d61dd8726e87f170744a199d1
c7bcf7e7409457bf9c6e679c6ba7c1596aeae4a7
/plugins/de.cau.cs.kieler.synccharts.codegen.dependencies/src/de/cau/cs/kieler/synccharts/codegen/dependencies/dependency/DependencyFactory.java
d794f7d6eb9ec2402f465e8a6e12d87019a06fae
[]
no_license
flymolon/de.cau.cs.kieler
9a4a91251c84b112f472ded83595de77e5380027
ead1a8fba7fca2072b36d931f62df735f818b94e
refs/heads/master
2021-01-18T11:08:18.636739
2012-08-09T12:28:23
2012-08-09T12:28:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,798
java
/** * <copyright> * </copyright> * * $Id$ */ package de.cau.cs.kieler.synccharts.codegen.dependencies.dependency; import org.eclipse.emf.ecore.EFactory; /** * <!-- begin-user-doc --> * The <b>Factory</b> for the model. * It provides a create method for each non-abstract class of the model. * <!-- end-user-doc --> * @see de.cau.cs.kieler.synccharts.codegen.dependencies.dependency.DependencyPackage * @generated */ public interface DependencyFactory extends EFactory { /** * The singleton instance of the factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ DependencyFactory eINSTANCE = de.cau.cs.kieler.synccharts.codegen.dependencies.dependency.impl.DependencyFactoryImpl.init(); /** * Returns a new object of class '<em>Dependency</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Dependency</em>'. * @generated */ Dependency createDependency(); /** * Returns a new object of class '<em>Signal Dependency</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Signal Dependency</em>'. * @generated */ SignalDependency createSignalDependency(); /** * Returns a new object of class '<em>Hierarchy Dependency</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Hierarchy Dependency</em>'. * @generated */ HierarchyDependency createHierarchyDependency(); /** * Returns a new object of class '<em>Controlflow Dependency</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Controlflow Dependency</em>'. * @generated */ ControlflowDependency createControlflowDependency(); /** * Returns a new object of class '<em>Transition Dependency</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Transition Dependency</em>'. * @generated */ TransitionDependency createTransitionDependency(); /** * Returns a new object of class '<em>Dependencies</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Dependencies</em>'. * @generated */ Dependencies createDependencies(); /** * Returns a new object of class '<em>Node</em>'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return a new object of class '<em>Node</em>'. * @generated */ Node createNode(); /** * Returns the package supported by this factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the package supported by this factory. * @generated */ DependencyPackage getDependencyPackage(); } //DependencyFactory
[ "cmot@informatik.uni-kiel.de" ]
cmot@informatik.uni-kiel.de
57849b92464bb2b5834a0aab785f403aa6886ef1
ab20833dea534969a80195dfe2b0219a80fc7150
/src/dziedziczenie_abstract/Wegetarianska.java
4ec26c4ecd72716c714d64773f84ec135e3cc79a
[]
no_license
Iaremii/MAS-project-3
13811768daf920dc40e544e723b3a252a287f5f9
49ffa2231b8c9c98ec25f24bb4db7d1d4979e4c4
refs/heads/master
2020-03-18T03:21:36.126979
2018-05-24T16:38:30
2018-05-24T16:38:30
131,845,817
0
0
null
null
null
null
UTF-8
Java
false
false
2,015
java
package dziedziczenie_abstract; import java.util.Map; /** * * @author Oleksandr */ public class Wegetarianska extends Kanapka { private String nazwa; private String przystawka; private String napoj; public Wegetarianska(String nazwa, String pieczywo, int wielkosc, double cena, String przystawka, String napoj) { super(pieczywo, wielkosc, cena); setPrzystawka(przystawka); setNapoj(napoj); setNazwa(nazwa); } public String getNapoj() { return napoj; } public void setNapoj(String napoj) { this.napoj = napoj; } public String getPrzystawka() { return przystawka; } public void setPrzystawka(String przystawka) { if (przystawka != null) { this.przystawka = przystawka; } else { throw new RuntimeException("Invalid value - przystawka is null"); } } public void setNazwa(String nazwa) { if (nazwa != null) { this.nazwa = nazwa; } else { throw new RuntimeException("Invalid value - nazwa is null"); } } public String getNazwa() { return nazwa; } public int wyliczKaloriiWegetarianskiej() { int sumaKalorii = 0; for (Map.Entry me : Kanapka.getKalorii().entrySet()) { if (getNapoj() == me.getKey()) { sumaKalorii += (int) me.getValue(); } if (getPrzystawka() == me.getKey()) { sumaKalorii += (int) me.getValue(); } if(getNazwa() == me.getKey()){ sumaKalorii += (int) me.getValue(); } } return sumaKalorii; } @Override public int wypiszKalorii() { return wyliczKaloriiWegetarianskiej(); } @Override public String toString() { return super.toString() + "nazwa = " + getClass().getSimpleName() + ", przystawka = " + przystawka + ", napoj = " + napoj + '}'; } }
[ "ward.wsp@gmail.com" ]
ward.wsp@gmail.com
563d0f1c8f3055cf5ac5ffb922c2bd473d3d1472
687cb4af2bc2238808498dc5b1c1012f1935dbe8
/zadatak2.java
a22cf485a4dc32b97161452814e072f301a1a6d7
[]
no_license
nvuchinic/zadaca.22.11.14
408f0e93f2e3b7a0f2fd55aa1e1288f15ef81a2d
c59a2ff17071f9b81e36914a5155e603823d6242
refs/heads/master
2016-09-06T03:00:43.011522
2014-11-25T21:50:00
2014-11-25T21:50:00
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,494
java
/*Program koji ispisuje unesene brojeve po velicini, te koliko je razlicitih brojeva uneseno*/ import java.util.Scanner; public class zadatak2 { public static void main(String[] args) { int br1,br2,br3,max=0,min=0,sr=0,brRB=0; Scanner unos=new Scanner(System.in); System.out.println("Unesite tri broja u intervalu 50 - 200:"); br1=unos.nextInt(); br2=unos.nextInt(); br3=unos.nextInt(); // unos.close(); while(((br1>=50)&&(br1<=200))&&((br2>=50)&&(br2<=200))&&((br3>=50)&&(br3<=200))){ if((br1>br2)&&(br1>br3)){ if(br2>br3){ min=br3; sr=br2; brRB=3;} else if(br3>br2){ min=br2; sr=br3; brRB=3;} else { min=sr=br2; brRB=2; } max=br1; } else if((br2>br1)&&(br2>br3)){ //1,3,1 if(br3>br1){ sr=br3; min=br1; brRB=3;} else if(br3==br1){ brRB=2; sr=br3; min=br1;} max=br2; } else if(br3>br1){ //2,1,3 if(br2>br1){ sr=br2; min=br1; brRB=3;} else if(br2<br1){ min=br2; sr=br1; brRB=3; } else { min=br2; sr=br1;} max=br3;} else if((br1==br2)&&(br2==br3)){ //2,2,2 brRB=1; min=max=sr=br1; } System.out.println("Brojevi poredani po velicini: "+min+" ,"+sr+" ,"+max+" ,a ukupno razlicitih brojeva ima "+brRB+"\n\n"); System.out.println("Unesite tri broja u intervalu 50 - 200:"); br1=unos.nextInt(); br2=unos.nextInt(); br3=unos.nextInt(); } System.out.println("Brojevi nisu iz trazenog intervala"); } }
[ "nermin.vucinic@gmail.com" ]
nermin.vucinic@gmail.com
20edfde7badfb2a59f063f9fe418442edd4df5b1
a800d0e092e5a2b7ab165a0c19290a8deaa65b76
/src/main/java/org/kj/blackjack/player/HumanPlayer.java
087d8c9725a7bc17ce84009c341d0cc82f36c1bd
[ "Apache-2.0" ]
permissive
kinjalh/blackjack
50290b313f61d562e891f0695f9c783b12e36bb7
d354447944d8eebd088372546be7ca576158015f
refs/heads/master
2020-03-27T14:41:41.110195
2018-09-02T02:44:34
2018-09-02T02:44:34
146,675,119
0
0
Apache-2.0
2018-09-02T02:44:35
2018-08-30T00:41:01
Java
UTF-8
Java
false
false
1,644
java
package org.kj.blackjack.player; import org.kj.blackjack.gameio.InputDevice; import org.kj.blackjack.gameio.OutputDevice; import org.kj.blackjack.gameutils.Action; /** * Interacts with a person through command line. Prompts player for their * {@link Action} and displays information to them. At each stage the player is * shown their own hand and the number of cards their opponent is currently * holding. * * @author Kinjal * */ class HumanPlayer extends AbstractPlayer { private InputDevice input; /** * Constructs a HumanPlayer with the specified name. The scanner is used to get * input from the player. * * @param name the name of the player * @param input the scanner that gets player input */ public HumanPlayer(String name, InputDevice input, OutputDevice output) { super(name, output); this.input = input; } /** * Displays the player's current hand and the number of cards the opponent has. * Then the player is prompted to choose either hit or stand. * * @param opponentHandSize the number of cards the opponent has * @return either Action.HIT or Action.STAND depending on the player choice */ @Override public Action playTurn(int opponentHandSize) { return input.getAction(); } /** * Shows the name and hand of this player. Since this is a human player, the * hand and name must be visually seen by the human playing. */ @Override public void displayDuringGame() { getOutput().displayHand(name(), getHand()); } /** * Displays the name and hand of this player. */ @Override public void displayAfterGame() { getOutput().displayHand(name(), getHand()); } }
[ "kinjal.haldar@gmail.com" ]
kinjal.haldar@gmail.com
4fd4c2ccf04efea8cabf1a75509a385366861a44
7bcd056e8b8eb5fe9dcabd250a0f949c2f1edfe8
/smavaMavenProject/src/test/java/testScript/LoginTest.java
3218ebe32bd02eaa4ffca937a03b4095dc8107b4
[]
no_license
dhirajkpandey/smavaProjectMaven
33012b193da855cbb909dbb09a82a4d0f445b540
58df4bae0c176584a91a9f04465af9a59b8e2b3f
refs/heads/master
2020-03-19T02:14:55.569940
2018-05-31T19:20:47
2018-05-31T19:20:47
135,612,107
0
0
null
null
null
null
UTF-8
Java
false
false
303
java
package testScript; import org.testng.annotations.Test; import smavaMavenProject.LoginPOM; public class LoginTest extends BaseTest { @Test public void LoginTest() throws InterruptedException { LoginPOM loginPOMObj = new LoginPOM(driver); loginPOMObj.fnVerifyLogin(driver); } }
[ "dhiraj@DESKTOP-3MFM675.lan" ]
dhiraj@DESKTOP-3MFM675.lan
06714e4a34f6ae2f5158915641f1beffda160793
392e3ff9e804e8caf65964fd9e244876cdee841b
/acts-core/src/test/java/com/alipay/test/acts/runtime/ActsRuntimeContextThreadHoldTest.java
e71854953e0042f2c6bdf4d19d79dccf28e7e0e9
[ "Apache-2.0" ]
permissive
elseifer/sofa-acts
4d112e934ccdc6a76c6180e27322507e14c03f24
a40275acfa52e08d354c62b67ad50ea6dea717e2
refs/heads/master
2020-04-25T21:43:08.177836
2019-04-19T06:07:52
2019-04-19T06:07:52
173,088,529
1
0
Apache-2.0
2019-04-19T06:07:53
2019-02-28T10:08:19
Java
UTF-8
Java
false
false
1,360
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 com.alipay.test.acts.runtime; import org.testng.annotations.Test; /** * * @author qingqin * @version $Id: ActsRuntimeContextThreadHoldTest.java, v 0.1 2019年01月13日 下午2:23 qingqin Exp $ */ public class ActsRuntimeContextThreadHoldTest { @Test public void testGetContext() { ActsRuntimeContextThreadHold.getContext(); } @Test public void testSetContext() { ActsRuntimeContext actsRuntimeContext = new ActsRuntimeContext(); ActsRuntimeContextThreadHold.setContext(actsRuntimeContext); } }
[ "ddc.niqgniq@gmail.com" ]
ddc.niqgniq@gmail.com
8c98dd57ce2268c35153f09b65a4e4ef071a50e1
6ae6ebc6919b0057320c649f053d6aae1241635d
/M_anagrams.java
017479a17f847c2e27f90c419a8143b11d77a45e
[]
no_license
deciding/lintcode
16cd129aa203889779020e2f783942f60748d3c9
1d1586b9bec36570cb6e6383c56d13062db32d17
refs/heads/master
2021-01-15T15:25:25.548171
2016-06-19T02:02:19
2016-06-19T02:02:19
43,603,092
0
0
null
null
null
null
UTF-8
Java
false
false
950
java
public class Solution { /** * @param strs: A list of strings * @return: A list of strings */ public List<String> anagrams(String[] strs) { // write your code here ArrayList<String> ans = new ArrayList<>(); HashMap<Integer,ArrayList<String>> map=new HashMap<>(); for(String str:strs){ int hash=0; int[] count=new int[26]; for(int i=0;i<str.length();i++) count[str.charAt(i)]++; for(int i=0;i<26;i++) hash=hash*31+count[i]; if(map.containsKey(hash)) map.get(hash).add(str); else { ArrayList<String> temp=new ArrayList<>(); temp.add(str); map.put(hash,temp); } } for(ArrayList<String> strList:map.values()) if(strList.size()>1) ans.addAll(strList); return ans; } }
[ "zhangzn710@gmail.com" ]
zhangzn710@gmail.com
3b9ebce5c2f7dd464a12295e88b62b072e847ea6
c59bbc7dea59f6a33872fdbf7060b74966a26105
/taller2/Ejercicio2/src/implementar/Empleado.java
62a503e5efa7e48f195a53e9fc0aae2231ced68d
[]
no_license
baavilah/Lab2
45ea47c83eaf42eeeba90e6da30fc0bc89733914
c3a96a30383449bfedd4fadcb08512632191d577
refs/heads/master
2020-12-31T07:42:57.243186
2016-04-21T02:25:00
2016-04-21T02:25:00
56,730,723
0
0
null
null
null
null
UTF-8
Java
false
false
520
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 implementar; /** * * @author EL MEJOR */ public abstract class Empleado extends Persona{ protected String jefe; public Empleado(String jefe, String nombre, String domicilio, String horario) { super(nombre, domicilio, horario); this.jefe = jefe; } public abstract void cobrar(); }
[ "brianavila72@gmail.com" ]
brianavila72@gmail.com
d5d658cc36425fbe9e02e7065c48944f9ae9aad5
386f8479ec297b0cd0b503aef1ab380fc214ef06
/app/src/main/java/com/developers/paras/droidwatch/GuideToConnect.java
62e63e4e355fbdd0540b8e4e46d950def1041689
[ "MIT" ]
permissive
muskanmahajan486/DroidWatch
9c8f87a3318785a51ae8d20cd4ea9b5de467f03e
489e70fae3809e4300ad490153fe05ea1f052cb2
refs/heads/master
2023-04-01T23:54:00.078540
2021-03-28T12:46:39
2021-03-28T12:46:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,591
java
package com.developers.paras.droidwatch; import android.app.FragmentTransaction; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; /** * A simple {@link Fragment} subclass. */ public class GuideToConnect extends Fragment { public GuideToConnect() { // Required empty public constructor } View v; @Override public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment v =inflater.inflate(R.layout.fragment_guide_to_connect, container, false); return v; } @Override public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); final FragmentManager fm = getFragmentManager(); Button back = v.findViewById(R.id.backtodevicelist1); back.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (fm!=null){ final android.support.v4.app.FragmentTransaction ft = fm.beginTransaction(); ft.replace(R.id.device_list_layout, new DeviceListFragment()); ft.commit(); } } }); } }
[ "khandelwalparas8@gmail.com" ]
khandelwalparas8@gmail.com
6dc0344a8ce0e9890782be807573ec0b50ef38b3
a3dc11fef2c67a7b1958fd4bf2dfb3ba0d934123
/src/com/example/criminalintentsolution/CrimeLab.java
1a5465049090c3b27ac6d20ad234410f009b27d1
[]
no_license
BrittanyNovak/CriminalIntentSolution
aa52ff0edf66d845e749c1bfa99d29edf4737edf
380cf3f74a63a05861485d4aa80d8c7f999ff7ad
refs/heads/master
2016-09-01T05:09:37.859591
2015-11-04T02:22:21
2015-11-04T02:22:21
45,509,641
0
0
null
null
null
null
UTF-8
Java
false
false
844
java
package com.example.criminalintentsolution; import java.util.ArrayList; import java.util.UUID; import android.content.Context; public class CrimeLab { private static CrimeLab sCrimeLab; private Context mAppContext; private ArrayList<Crime> mCrimes; private CrimeLab(Context appContext) { mAppContext = appContext; mCrimes = new ArrayList<Crime>(); for(int i=0; i<100; i++) { Crime c = new Crime(); c.setTitle("Crime#" + i); c.setSolved(i %2 == 0); mCrimes.add(c); } } public static CrimeLab get(Context c) { if (sCrimeLab==null) { sCrimeLab = new CrimeLab(c.getApplicationContext()); } return sCrimeLab; } public ArrayList<Crime> getCrimes() { return mCrimes; } public Crime getCrime(UUID id) { for (Crime c : mCrimes) { if (c.getId().equals(id)) return c; } return null; } }
[ "brittanynicole0106@gmail.com" ]
brittanynicole0106@gmail.com
1d707b2832f51ba5f4102b6794154d517338edcd
cc27411adb3307cba5269560230006239a555663
/Baseball/src/model/BaseballDto.java
a22de545fe3e712e067737e18ae01da70ef391bb
[]
no_license
swooan/Java
0525f332e4ff123fc312a4b3c19ec5ef61511cc2
60d833b61323084e16e192d2296af99c4f80f3a3
refs/heads/master
2022-11-14T09:28:30.533822
2020-07-08T04:11:04
2020-07-08T04:11:04
277,773,457
0
0
null
null
null
null
UHC
Java
false
false
713
java
package model; public class BaseballDto { String name; int arr; int col; public BaseballDto() { this("",0,0); } public BaseballDto(String name, int arr, int col) { this.name = name; this.arr = arr; this.col = col; } public int getArr() { return arr; } public void setArr(int arr) { this.arr = arr; } public int getCol() { return col; } public void setCol(int col) { this.col = col; } public String getName() { return name; } public void setName(String name) { this.name = name; } @Override public String toString() { return "[ " + name + "님의 자리는 " + arr + "행 " + col + "열 입니다. ]"; } }
[ "noreply@github.com" ]
noreply@github.com
f4d49595592f7cd51e0783bf5f81c198ea9cfb93
65e0596f148b46160b3aa905dae9cfaaf6f884bf
/app/src/main/java/shop/bawei/com/moubao/model/beans/MyOrderBean.java
02c0f5b0405f3ce17ef4567f96547a365ac75624
[]
no_license
lyfld/moubao
e2a1ed66bf8ac967772d93f7b4fe7ce6cc6fa669
7728ebf7a80d32fe99806bc60bee1a9965b0cd9e
refs/heads/master
2021-01-20T16:06:33.979463
2017-02-22T07:08:51
2017-02-22T07:08:51
82,772,159
0
0
null
null
null
null
UTF-8
Java
false
false
31,440
java
package shop.bawei.com.moubao.model.beans; import java.io.Serializable; import java.util.List; /** * Created by 刘伊帆 on 2017/2/13. */ public class MyOrderBean implements Serializable{ /** * code : 200 * hasmore : true * page_total : 4 * datas : {"order_group_list":[{"order_list":[{"order_id":"24","order_sn":"9000000000002701","pay_sn":"100540333120305003","pay_sn1":null,"store_id":"1","store_name":"好商城V5","buyer_id":"3","buyer_name":"fqx1111","buyer_email":"skyfan1991@163.com","buyer_phone":"12711350626","add_time":"1486989120","payment_code":"online","payment_time":"0","finnshed_time":"0","goods_amount":"52800.00","order_amount":"52800.00","rcb_amount":"0.00","pd_amount":"0.00","shipping_fee":"0.00","evaluation_state":"0","evaluation_again_state":"0","order_state":"10","refund_state":"0","lock_state":"0","delete_state":"0","refund_amount":"0.00","delay_time":"0","order_from":"2","shipping_code":"","order_type":"1","api_pay_time":"0","chain_id":"0","chain_code":"0","rpt_amount":"0.00","trade_no":null,"state_desc":"待付款","payment_name":"在线付款","extend_order_goods":[{"goods_id":"100009","goods_name":"劳力士Rolex 日志型系列 116200 63200 自动机械钢带男表联保正品","goods_price":"52800.00","goods_num":"1","goods_type":"1","goods_spec":null,"invite_rates":"0","goods_image_url":"http://169.254.252.234/data/upload/shop/store/goods/1/1_04752627958339099_240.jpg","refund":false}],"zengpin_list":[],"if_cancel":true,"if_refund_cancel":false,"if_receive":false,"if_lock":false,"if_deliver":false,"if_evaluation":false,"if_evaluation_again":false,"if_delete":false,"ownshop":true}],"pay_amount":52800,"add_time":"1486989120","pay_sn":"100540333120305003"},{"order_list":[{"order_id":"23","order_sn":"9000000000002601","pay_sn":"600540329027894003","pay_sn1":null,"store_id":"1","store_name":"好商城V5","buyer_id":"3","buyer_name":"fqx1111","buyer_email":"skyfan1991@163.com","buyer_phone":"12711350626","add_time":"1486985027","payment_code":"predeposit","payment_time":"1486988415","finnshed_time":"0","goods_amount":"216500.00","order_amount":"216500.00","rcb_amount":"0.00","pd_amount":"216500.00","shipping_fee":"0.00","evaluation_state":"0","evaluation_again_state":"0","order_state":"30","refund_state":"0","lock_state":"0","delete_state":"0","refund_amount":"0.00","delay_time":"1486988708","order_from":"2","shipping_code":"111111111111111","order_type":"1","api_pay_time":"0","chain_id":"0","chain_code":"0","rpt_amount":"0.00","trade_no":null,"state_desc":"待收货","payment_name":"站内余额支付","extend_order_goods":[{"goods_id":"100009","goods_name":"劳力士Rolex 日志型系列 116200 63200 自动机械钢带男表联保正品","goods_price":"52800.00","goods_num":"1","goods_type":"1","goods_spec":null,"invite_rates":"0","refund":true,"goods_image_url":"http://169.254.252.234/data/upload/shop/store/goods/1/1_04752627958339099_240.jpg"},{"goods_id":"100002","goods_name":"劳力士Rolex MILGAUSS 116400GV-72400 自动机械钢带男表联保正品","goods_price":"63200.00","goods_num":"1","goods_type":"1","goods_spec":null,"invite_rates":"0","refund":true,"goods_image_url":"http://169.254.252.234/data/upload/shop/store/goods/1/1_04752627750479728_240.png"},{"goods_id":"100006","goods_name":"劳力士Rolex 蚝式恒动系列 自动机械钢带男表 正品116231-G-63201","goods_price":"100500.00","goods_num":"1","goods_type":"1","goods_spec":null,"invite_rates":"0","refund":true,"goods_image_url":"http://169.254.252.234/data/upload/shop/store/goods/1/1_04752627871532105_240.png"}],"zengpin_list":[],"if_cancel":false,"if_refund_cancel":false,"if_receive":true,"if_lock":false,"if_deliver":true,"if_evaluation":false,"if_evaluation_again":false,"if_delete":false,"ownshop":true}],"add_time":"1486985027","pay_sn":"600540329027894003"},{"order_list":[{"order_id":"22","order_sn":"9000000000002501","pay_sn":"110540320404227003","pay_sn1":null,"store_id":"1","store_name":"好商城V5","buyer_id":"3","buyer_name":"fqx1111","buyer_email":"skyfan1991@163.com","buyer_phone":"15711260828","add_time":"1486976404","payment_code":"online","payment_time":"0","finnshed_time":"0","goods_amount":"97800.00","order_amount":"97800.00","rcb_amount":"0.00","pd_amount":"0.00","shipping_fee":"0.00","evaluation_state":"0","evaluation_again_state":"0","order_state":"0","refund_state":"0","lock_state":"0","delete_state":"0","refund_amount":"0.00","delay_time":"0","order_from":"2","shipping_code":"","order_type":"1","api_pay_time":"0","chain_id":"0","chain_code":"0","rpt_amount":"0.00","trade_no":null,"state_desc":"已取消","payment_name":"在线付款","extend_order_goods":[{"goods_id":"100004","goods_name":"劳力士Rolex 日志型系列 自动机械钢带男表 联保正品 116233","goods_price":"97800.00","goods_num":"1","goods_type":"1","goods_spec":null,"invite_rates":"0","goods_image_url":"http://169.254.252.234/data/upload/shop/store/goods/1/1_04752627799921979_240.jpg","refund":false}],"zengpin_list":[],"if_cancel":false,"if_refund_cancel":false,"if_receive":false,"if_lock":false,"if_deliver":false,"if_evaluation":false,"if_evaluation_again":false,"if_delete":true,"ownshop":true}],"add_time":"1486976404","pay_sn":"110540320404227003"},{"order_list":[{"order_id":"21","order_sn":"9000000000002401","pay_sn":"280540296971691003","pay_sn1":null,"store_id":"1","store_name":"好商城V5","buyer_id":"3","buyer_name":"fqx1111","buyer_email":"skyfan1991@163.com","buyer_phone":"15711260828","add_time":"1486952971","payment_code":"online","payment_time":"0","finnshed_time":"0","goods_amount":"100500.00","order_amount":"100500.00","rcb_amount":"0.00","pd_amount":"0.00","shipping_fee":"0.00","evaluation_state":"0","evaluation_again_state":"0","order_state":"0","refund_state":"0","lock_state":"0","delete_state":"0","refund_amount":"0.00","delay_time":"0","order_from":"2","shipping_code":"","order_type":"1","api_pay_time":"0","chain_id":"0","chain_code":"0","rpt_amount":"0.00","trade_no":null,"state_desc":"已取消","payment_name":"在线付款","extend_order_goods":[{"goods_id":"100006","goods_name":"劳力士Rolex 蚝式恒动系列 自动机械钢带男表 正品116231-G-63201","goods_price":"100500.00","goods_num":"1","goods_type":"1","goods_spec":null,"invite_rates":"0","goods_image_url":"http://169.254.252.234/data/upload/shop/store/goods/1/1_04752627871532105_240.png","refund":false}],"zengpin_list":[],"if_cancel":false,"if_refund_cancel":false,"if_receive":false,"if_lock":false,"if_deliver":false,"if_evaluation":false,"if_evaluation_again":false,"if_delete":true,"ownshop":true}],"add_time":"1486952971","pay_sn":"280540296971691003"},{"order_list":[{"order_id":"20","order_sn":"9000000000002301","pay_sn":"550540293024785003","pay_sn1":null,"store_id":"1","store_name":"好商城V5","buyer_id":"3","buyer_name":"fqx1111","buyer_email":"skyfan1991@163.com","buyer_phone":"15711260828","add_time":"1486949024","payment_code":"predeposit","payment_time":"1486952015","finnshed_time":"0","goods_amount":"209500.00","order_amount":"209500.00","rcb_amount":"0.00","pd_amount":"209500.00","shipping_fee":"0.00","evaluation_state":"0","evaluation_again_state":"0","order_state":"30","refund_state":"0","lock_state":"0","delete_state":"0","refund_amount":"0.00","delay_time":"1486988269","order_from":"1","shipping_code":"1300000000000","order_type":"1","api_pay_time":"0","chain_id":"0","chain_code":"0","rpt_amount":"0.00","trade_no":null,"state_desc":"待收货","payment_name":"站内余额支付","extend_order_goods":[{"goods_id":"100008","goods_name":"劳力士Rolex 宇宙计型迪通拿 自动机械皮带男表 正品116519 CR.TB","goods_price":"209500.00","goods_num":"1","goods_type":"1","goods_spec":null,"invite_rates":"0","refund":true,"goods_image_url":"http://169.254.252.234/data/upload/shop/store/goods/1/1_04752627931531971_240.jpg"}],"zengpin_list":[],"if_cancel":false,"if_refund_cancel":false,"if_receive":true,"if_lock":false,"if_deliver":true,"if_evaluation":false,"if_evaluation_again":false,"if_delete":false,"ownshop":true}],"add_time":"1486949024","pay_sn":"550540293024785003"}]} */ private int code; private boolean hasmore; private int page_total; private DatasBean datas; public int getCode() { return code; } public void setCode(int code) { this.code = code; } public boolean isHasmore() { return hasmore; } public void setHasmore(boolean hasmore) { this.hasmore = hasmore; } public int getPage_total() { return page_total; } public void setPage_total(int page_total) { this.page_total = page_total; } public DatasBean getDatas() { return datas; } public void setDatas(DatasBean datas) { this.datas = datas; } public static class DatasBean { private List<OrderGroupListBean> order_group_list; public List<OrderGroupListBean> getOrder_group_list() { return order_group_list; } public void setOrder_group_list(List<OrderGroupListBean> order_group_list) { this.order_group_list = order_group_list; } public static class OrderGroupListBean { /** * order_list : [{"order_id":"24","order_sn":"9000000000002701","pay_sn":"100540333120305003","pay_sn1":null,"store_id":"1","store_name":"好商城V5","buyer_id":"3","buyer_name":"fqx1111","buyer_email":"skyfan1991@163.com","buyer_phone":"12711350626","add_time":"1486989120","payment_code":"online","payment_time":"0","finnshed_time":"0","goods_amount":"52800.00","order_amount":"52800.00","rcb_amount":"0.00","pd_amount":"0.00","shipping_fee":"0.00","evaluation_state":"0","evaluation_again_state":"0","order_state":"10","refund_state":"0","lock_state":"0","delete_state":"0","refund_amount":"0.00","delay_time":"0","order_from":"2","shipping_code":"","order_type":"1","api_pay_time":"0","chain_id":"0","chain_code":"0","rpt_amount":"0.00","trade_no":null,"state_desc":"待付款","payment_name":"在线付款","extend_order_goods":[{"goods_id":"100009","goods_name":"劳力士Rolex 日志型系列 116200 63200 自动机械钢带男表联保正品","goods_price":"52800.00","goods_num":"1","goods_type":"1","goods_spec":null,"invite_rates":"0","goods_image_url":"http://169.254.252.234/data/upload/shop/store/goods/1/1_04752627958339099_240.jpg","refund":false}],"zengpin_list":[],"if_cancel":true,"if_refund_cancel":false,"if_receive":false,"if_lock":false,"if_deliver":false,"if_evaluation":false,"if_evaluation_again":false,"if_delete":false,"ownshop":true}] * pay_amount : 52800 * add_time : 1486989120 * pay_sn : 100540333120305003 */ private int pay_amount; private String add_time; private String pay_sn; private List<OrderListBean> order_list; public int getPay_amount() { return pay_amount; } public void setPay_amount(int pay_amount) { this.pay_amount = pay_amount; } public String getAdd_time() { return add_time; } public void setAdd_time(String add_time) { this.add_time = add_time; } public String getPay_sn() { return pay_sn; } public void setPay_sn(String pay_sn) { this.pay_sn = pay_sn; } public List<OrderListBean> getOrder_list() { return order_list; } public void setOrder_list(List<OrderListBean> order_list) { this.order_list = order_list; } public static class OrderListBean { /** * order_id : 24 * order_sn : 9000000000002701 * pay_sn : 100540333120305003 * pay_sn1 : null * store_id : 1 * store_name : 好商城V5 * buyer_id : 3 * buyer_name : fqx1111 * buyer_email : skyfan1991@163.com * buyer_phone : 12711350626 * add_time : 1486989120 * payment_code : online * payment_time : 0 * finnshed_time : 0 * goods_amount : 52800.00 * order_amount : 52800.00 * rcb_amount : 0.00 * pd_amount : 0.00 * shipping_fee : 0.00 * evaluation_state : 0 * evaluation_again_state : 0 * order_state : 10 * refund_state : 0 * lock_state : 0 * delete_state : 0 * refund_amount : 0.00 * delay_time : 0 * order_from : 2 * shipping_code : * order_type : 1 * api_pay_time : 0 * chain_id : 0 * chain_code : 0 * rpt_amount : 0.00 * trade_no : null * state_desc : 待付款 * payment_name : 在线付款 * extend_order_goods : [{"goods_id":"100009","goods_name":"劳力士Rolex 日志型系列 116200 63200 自动机械钢带男表联保正品","goods_price":"52800.00","goods_num":"1","goods_type":"1","goods_spec":null,"invite_rates":"0","goods_image_url":"http://169.254.252.234/data/upload/shop/store/goods/1/1_04752627958339099_240.jpg","refund":false}] * zengpin_list : [] * if_cancel : true * if_refund_cancel : false * if_receive : false * if_lock : false * if_deliver : false * if_evaluation : false * if_evaluation_again : false * if_delete : false * ownshop : true */ private String order_id; private String order_sn; private String pay_sn; private Object pay_sn1; private String store_id; private String store_name; private String buyer_id; private String buyer_name; private String buyer_email; private String buyer_phone; private String add_time; private String payment_code; private String payment_time; private String finnshed_time; private String goods_amount; private String order_amount; private String rcb_amount; private String pd_amount; private String shipping_fee; private String evaluation_state; private String evaluation_again_state; private String order_state; private String refund_state; private String lock_state; private String delete_state; private String refund_amount; private String delay_time; private String order_from; private String shipping_code; private String order_type; private String api_pay_time; private String chain_id; private String chain_code; private String rpt_amount; private Object trade_no; private String state_desc; private String payment_name; private boolean if_cancel; private boolean if_refund_cancel; private boolean if_receive; private boolean if_lock; private boolean if_deliver; private boolean if_evaluation; private boolean if_evaluation_again; private boolean if_delete; private boolean ownshop; private List<ExtendOrderGoodsBean> extend_order_goods; private List<?> zengpin_list; public String getOrder_id() { return order_id; } public void setOrder_id(String order_id) { this.order_id = order_id; } public String getOrder_sn() { return order_sn; } public void setOrder_sn(String order_sn) { this.order_sn = order_sn; } public String getPay_sn() { return pay_sn; } public void setPay_sn(String pay_sn) { this.pay_sn = pay_sn; } public Object getPay_sn1() { return pay_sn1; } public void setPay_sn1(Object pay_sn1) { this.pay_sn1 = pay_sn1; } public String getStore_id() { return store_id; } public void setStore_id(String store_id) { this.store_id = store_id; } public String getStore_name() { return store_name; } public void setStore_name(String store_name) { this.store_name = store_name; } public String getBuyer_id() { return buyer_id; } public void setBuyer_id(String buyer_id) { this.buyer_id = buyer_id; } public String getBuyer_name() { return buyer_name; } public void setBuyer_name(String buyer_name) { this.buyer_name = buyer_name; } public String getBuyer_email() { return buyer_email; } public void setBuyer_email(String buyer_email) { this.buyer_email = buyer_email; } public String getBuyer_phone() { return buyer_phone; } public void setBuyer_phone(String buyer_phone) { this.buyer_phone = buyer_phone; } public String getAdd_time() { return add_time; } public void setAdd_time(String add_time) { this.add_time = add_time; } public String getPayment_code() { return payment_code; } public void setPayment_code(String payment_code) { this.payment_code = payment_code; } public String getPayment_time() { return payment_time; } public void setPayment_time(String payment_time) { this.payment_time = payment_time; } public String getFinnshed_time() { return finnshed_time; } public void setFinnshed_time(String finnshed_time) { this.finnshed_time = finnshed_time; } public String getGoods_amount() { return goods_amount; } public void setGoods_amount(String goods_amount) { this.goods_amount = goods_amount; } public String getOrder_amount() { return order_amount; } public void setOrder_amount(String order_amount) { this.order_amount = order_amount; } public String getRcb_amount() { return rcb_amount; } public void setRcb_amount(String rcb_amount) { this.rcb_amount = rcb_amount; } public String getPd_amount() { return pd_amount; } public void setPd_amount(String pd_amount) { this.pd_amount = pd_amount; } public String getShipping_fee() { return shipping_fee; } public void setShipping_fee(String shipping_fee) { this.shipping_fee = shipping_fee; } public String getEvaluation_state() { return evaluation_state; } public void setEvaluation_state(String evaluation_state) { this.evaluation_state = evaluation_state; } public String getEvaluation_again_state() { return evaluation_again_state; } public void setEvaluation_again_state(String evaluation_again_state) { this.evaluation_again_state = evaluation_again_state; } public String getOrder_state() { return order_state; } public void setOrder_state(String order_state) { this.order_state = order_state; } public String getRefund_state() { return refund_state; } public void setRefund_state(String refund_state) { this.refund_state = refund_state; } public String getLock_state() { return lock_state; } public void setLock_state(String lock_state) { this.lock_state = lock_state; } public String getDelete_state() { return delete_state; } public void setDelete_state(String delete_state) { this.delete_state = delete_state; } public String getRefund_amount() { return refund_amount; } public void setRefund_amount(String refund_amount) { this.refund_amount = refund_amount; } public String getDelay_time() { return delay_time; } public void setDelay_time(String delay_time) { this.delay_time = delay_time; } public String getOrder_from() { return order_from; } public void setOrder_from(String order_from) { this.order_from = order_from; } public String getShipping_code() { return shipping_code; } public void setShipping_code(String shipping_code) { this.shipping_code = shipping_code; } public String getOrder_type() { return order_type; } public void setOrder_type(String order_type) { this.order_type = order_type; } public String getApi_pay_time() { return api_pay_time; } public void setApi_pay_time(String api_pay_time) { this.api_pay_time = api_pay_time; } public String getChain_id() { return chain_id; } public void setChain_id(String chain_id) { this.chain_id = chain_id; } public String getChain_code() { return chain_code; } public void setChain_code(String chain_code) { this.chain_code = chain_code; } public String getRpt_amount() { return rpt_amount; } public void setRpt_amount(String rpt_amount) { this.rpt_amount = rpt_amount; } public Object getTrade_no() { return trade_no; } public void setTrade_no(Object trade_no) { this.trade_no = trade_no; } public String getState_desc() { return state_desc; } public void setState_desc(String state_desc) { this.state_desc = state_desc; } public String getPayment_name() { return payment_name; } public void setPayment_name(String payment_name) { this.payment_name = payment_name; } public boolean isIf_cancel() { return if_cancel; } public void setIf_cancel(boolean if_cancel) { this.if_cancel = if_cancel; } public boolean isIf_refund_cancel() { return if_refund_cancel; } public void setIf_refund_cancel(boolean if_refund_cancel) { this.if_refund_cancel = if_refund_cancel; } public boolean isIf_receive() { return if_receive; } public void setIf_receive(boolean if_receive) { this.if_receive = if_receive; } public boolean isIf_lock() { return if_lock; } public void setIf_lock(boolean if_lock) { this.if_lock = if_lock; } public boolean isIf_deliver() { return if_deliver; } public void setIf_deliver(boolean if_deliver) { this.if_deliver = if_deliver; } public boolean isIf_evaluation() { return if_evaluation; } public void setIf_evaluation(boolean if_evaluation) { this.if_evaluation = if_evaluation; } public boolean isIf_evaluation_again() { return if_evaluation_again; } public void setIf_evaluation_again(boolean if_evaluation_again) { this.if_evaluation_again = if_evaluation_again; } public boolean isIf_delete() { return if_delete; } public void setIf_delete(boolean if_delete) { this.if_delete = if_delete; } public boolean isOwnshop() { return ownshop; } public void setOwnshop(boolean ownshop) { this.ownshop = ownshop; } public List<ExtendOrderGoodsBean> getExtend_order_goods() { return extend_order_goods; } public void setExtend_order_goods(List<ExtendOrderGoodsBean> extend_order_goods) { this.extend_order_goods = extend_order_goods; } public List<?> getZengpin_list() { return zengpin_list; } public void setZengpin_list(List<?> zengpin_list) { this.zengpin_list = zengpin_list; } public static class ExtendOrderGoodsBean implements Serializable{ /** * goods_id : 100009 * goods_name : 劳力士Rolex 日志型系列 116200 63200 自动机械钢带男表联保正品 * goods_price : 52800.00 * goods_num : 1 * goods_type : 1 * goods_spec : null * invite_rates : 0 * goods_image_url : http://169.254.252.234/data/upload/shop/store/goods/1/1_04752627958339099_240.jpg * refund : false */ private String goods_id; private String goods_name; private String goods_price; private String goods_num; private String goods_type; private Object goods_spec; private String invite_rates; private String goods_image_url; private boolean refund; public String getGoods_id() { return goods_id; } public void setGoods_id(String goods_id) { this.goods_id = goods_id; } public String getGoods_name() { return goods_name; } public void setGoods_name(String goods_name) { this.goods_name = goods_name; } public String getGoods_price() { return goods_price; } public void setGoods_price(String goods_price) { this.goods_price = goods_price; } public String getGoods_num() { return goods_num; } public void setGoods_num(String goods_num) { this.goods_num = goods_num; } public String getGoods_type() { return goods_type; } public void setGoods_type(String goods_type) { this.goods_type = goods_type; } public Object getGoods_spec() { return goods_spec; } public void setGoods_spec(Object goods_spec) { this.goods_spec = goods_spec; } public String getInvite_rates() { return invite_rates; } public void setInvite_rates(String invite_rates) { this.invite_rates = invite_rates; } public String getGoods_image_url() { return goods_image_url; } public void setGoods_image_url(String goods_image_url) { this.goods_image_url = goods_image_url; } public boolean isRefund() { return refund; } public void setRefund(boolean refund) { this.refund = refund; } } } } } }
[ "312975008@qq.com" ]
312975008@qq.com
e2f2356d869b4f85ab84cc1ce7970506d718a51c
38b6b23840decebf40d5ddd0672f9a8abe282d17
/src/main/java/com/wing/apirecord/core/filter/UrlFilter.java
a78852bd1dc1c032e3d6eb743a4ecbfeac3c7661
[]
no_license
tobecoder2015/apiRecord
91ad62aea3b9cf58e98f1e093db59b21a0d4d9fc
3124afd942e05e99d5aecfc617348ce504cecf8a
refs/heads/master
2021-05-11T01:59:00.957594
2018-07-04T03:54:53
2018-07-04T03:54:53
118,346,002
8
2
null
null
null
null
UTF-8
Java
false
false
1,210
java
package com.wing.apirecord.core.filter; import com.wing.apirecord.core.model.Request; import com.wing.apirecord.core.record.Message; import lombok.extern.slf4j.Slf4j; @Slf4j public class UrlFilter implements Filter { private String pattern; public UrlFilter(String pattern){ this.pattern=pattern; } @Override public boolean doFilter(Message message, FilterChain chain) { if (message.getMsg() instanceof Request) { Request request=(Request)message.getMsg(); String[] urls = pattern.split(","); // if (request.getHost().contains("127.0.0.1")||request.getHost().contains("localhost")) { // return true; // } boolean ok = true; for (String url : urls) { if (request.getUrl().contains(url)) { ok = false; break; } } if (!ok) { return chain.doFilter(message, chain); } else { log.debug("消息体不满足url过滤器 " + request.getHost()); return true; } } return chain.doFilter(message, chain); } }
[ "wangqingshan@meituan.com" ]
wangqingshan@meituan.com
87d2fc9c41465da33ec0ad5e6e19275e032161be
a73934eabef4b272380a60e4290f83f2bacc7a5a
/src/com/llf/thinking_in_java/c21_concurrency/LightOff.java
176f5316deb5ccff0e591c7ecf819c13a82abf09
[]
no_license
lilfei/JavaFeaturesTest
e37e3f8c27cdae4ba62436d94e96f5583abeac0f
a74fcde1975318f52b17616e911b103308b1aad3
refs/heads/master
2022-09-07T18:00:05.683064
2021-03-28T07:58:34
2021-03-28T07:58:34
140,555,599
0
0
null
2022-09-01T23:12:51
2018-07-11T09:51:48
HTML
UTF-8
Java
false
false
523
java
package com.llf.thinking_in_java.c21_concurrency; public class LightOff implements Runnable { protected int countDown = 10; private static int taskCount = 0; private final int id = taskCount++; public LightOff() { } public LightOff(int countDown) { this.countDown = countDown; } public String status() { return "#" + id + "(" + (countDown > 0 ? countDown : "LightOff!") + "), "; } @Override public void run() { while (countDown-- > 0) { System.out.println(status()); Thread.yield(); } } }
[ "satvr@126.com" ]
satvr@126.com
31119ccfc981521b50e79a0752f9752434bc28f9
ade34ed481014ddcdf54e560d28ded20a30f7266
/src/Ex02_variable.java
fd6f3dd08ea3f39a516d85578bd47dc707c42e35
[]
no_license
JungKyuHyun/javaSchool
4ebe0eca13c0cef0532b0e1e77a404722328538b
430b9d6d5979f340deb35ad7a4dbe3a42069f661
refs/heads/master
2020-04-19T09:20:00.689677
2019-02-01T03:02:13
2019-02-01T03:02:13
168,107,167
0
0
null
null
null
null
UHC
Java
false
false
735
java
class Vtest{ int iv; void print() { System.out.println("instance variable : " + iv); } } class Apt{ String color; // String 클래스이지만, 당분간 문자열 타입으로....ㅠ Apt(String color){ //함수 (특수한 함수): 함수의 이름이 클래스 이름과 동일 //생성자 함수(constructor) this.color = color; } void aptPrint() { System.out.println("색상 : " + this.color); } } public class Ex02_variable { public static void main(String[] args) { Vtest t = new Vtest(); t.print(); Vtest t2 = new Vtest(); t2.iv = 300; t2.print(); Apt sk = new Apt("gold"); sk.aptPrint(); Apt naver = new Apt("red"); naver.aptPrint(); } }
[ "MJ" ]
MJ
09f7f9f11218380e56b73abd08995772afdf4802
3f1e7f33fda138851a0d271877914b4b177d9a28
/Server/moviecouch/src/main/java/com/sharabassy/moviecouch/controller/OMDBRestController.java
40e6c6b821a86df7855e47b4f869b7deb06c4575
[]
no_license
sharabassy/movie_couch
fad6591bac2d62cfd155a123011653dd69ae0d1c
4b89f2ecc58f6fcb77cae1ff611dedc5f5b57702
refs/heads/master
2020-04-25T06:40:40.481160
2019-05-04T17:29:44
2019-05-04T17:29:44
172,589,015
0
0
null
null
null
null
UTF-8
Java
false
false
4,192
java
package com.sharabassy.moviecouch.controller; import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Map.Entry; import org.springframework.core.ParameterizedTypeReference; import org.springframework.http.HttpMethod; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.client.RestTemplate; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.node.ObjectNode; import com.sharabassy.moviecouch.entity.Movie; @RestController @RequestMapping("/omdb") public class OMDBRestController { private String apikey = "ead5fbba"; @GetMapping("/search/{searchInput}") public List<Movie> searchMovies(@PathVariable String searchInput) { //https://www.omdbapi.com/?s="hello"&apikey=ead5fbba&type=movie&page=2 List<Movie> movieSearchList = new ArrayList<Movie>(); RestTemplate restTemplate = new RestTemplate(); String url = String.format("https://www.omdbapi.com/?s=\"%s\"&apikey=%s&type=movie", searchInput, apikey); ObjectNode rootNode = restTemplate.getForObject(url, ObjectNode.class); String response = rootNode.path("Response").asText(); if(response.equals("True")) { JsonNode searchNode = rootNode.path("Search"); if(!searchNode.isMissingNode()) { for(JsonNode movieNode : searchNode) { Movie tmpMovie = createMovieObjectFromJson(movieNode.deepCopy()); movieSearchList.add(tmpMovie); } } } return movieSearchList; } @GetMapping("/{imdbId}") public Movie getMovieByImdbId(@PathVariable String imdbId) { //https://www.omdbapi.com/?i=tt1670627&apikey=ead5fbba RestTemplate restTemplate = new RestTemplate(); String url = String.format("https://www.omdbapi.com/?i=%s&apikey=%s", imdbId, apikey).replace("\"", ""); ObjectNode node = restTemplate.getForObject(url, ObjectNode.class); Movie movie = createMovieObjectFromJson(node); return movie; } private Movie createMovieObjectFromJson(ObjectNode node) { Movie tempMovie = new Movie(); if(node.has("imdbID")) tempMovie.setImdbId(node.get("imdbID").asText()); if(node.has("Title")) tempMovie.setTitle(node.get("Title").asText()); if(node.has("Type")) tempMovie.setType(node.get("Type").asText()); if(node.has("Poster")) tempMovie.setPoster(node.get("Poster").asText()); if(node.has("Year")) tempMovie.setYear(node.get("Year").asText()); if(node.has("Rated")) tempMovie.setRated(node.get("Rated").asText()); if(node.has("Released")) tempMovie.setReleased(node.get("Released").asText()); if(node.has("Runtime")) tempMovie.setRuntime(node.get("Runtime").asText()); if(node.has("Genre")) tempMovie.setGenre(node.get("Genre").asText()); if(node.has("Director")) tempMovie.setDirector(node.get("Director").asText()); if(node.has("Writer")) tempMovie.setWriter(node.get("Writer").asText()); if(node.has("Actors")) tempMovie.setActors(node.get("Actors").asText()); if(node.has("Plot")) tempMovie.setPlot(node.get("Plot").asText()); if(node.has("Language")) tempMovie.setLanguage(node.get("Language").asText()); if(node.has("Country")) tempMovie.setCountry(node.get("Country").asText()); if(node.has("Awards")) tempMovie.setAwards(node.get("Awards").asText()); if(node.has("Metascore")) tempMovie.setMetascore(node.get("Metascore").asText()); if(node.has("imdbRating")) tempMovie.setImdbRating(node.get("imdbRating").asText()); if(node.has("imdbVotes")) tempMovie.setImdbVotes(node.get("imdbVotes").asText()); if(node.has("DVD")) tempMovie.setDvd(node.get("DVD").asText()); if(node.has("BoxOffice")) tempMovie.setBoxOffice(node.get("BoxOffice").asText()); if(node.has("Production")) tempMovie.setProduction(node.get("Production").asText()); if(node.has("Website")) tempMovie.setWebsite(node.get("Website").asText()); return tempMovie; } }
[ "Sharabassy" ]
Sharabassy
bba6e0de4450d29e00374714e00f812076dca425
fed41971c78ff70c701d754cfd023e3ea671ee85
/gd-order-intf/src/main/java/com/gudeng/commerce/gd/order/entity/ReOrderCustomerEntity.java
aa4425639f56d49a8d042b4c57aadfed93e70753
[]
no_license
f3226912/gd
204647c822196b52513e5f0f8e475b9d47198d2a
882332a9da91892a38e38443541d93ddd91c7fec
refs/heads/master
2021-01-19T06:47:44.052835
2017-04-07T03:42:12
2017-04-07T03:42:12
87,498,686
0
6
null
null
null
null
UTF-8
Java
false
false
1,841
java
package com.gudeng.commerce.gd.order.entity; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Id; @Entity(name = "re_order_customer") public class ReOrderCustomerEntity implements java.io.Serializable{ private static final long serialVersionUID = 5975662541056330003L; private Integer id; private Long orderNo; private Integer memberId; private Integer orderBuyerId; private String mobile; private String realName; private Date createTime; private String createUserId; @Id @Column(name = "id") public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } @Column(name = "orderNo") public Long getOrderNo() { return orderNo; } public void setOrderNo(Long orderNo) { this.orderNo = orderNo; } @Column(name = "memberId") public Integer getMemberId() { return memberId; } public void setMemberId(Integer memberId) { this.memberId = memberId; } @Column(name = "orderBuyerId") public Integer getOrderBuyerId() { return orderBuyerId; } public void setOrderBuyerId(Integer orderBuyerId) { this.orderBuyerId = orderBuyerId; } @Column(name = "mobile") public String getMobile() { return mobile; } public void setMobile(String mobile) { this.mobile = mobile; } @Column(name = "realName") public String getRealName() { return realName; } public void setRealName(String realName) { this.realName = realName; } @Column(name = "createTime") public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } @Column(name = "createUserId") public String getCreateUserId() { return createUserId; } public void setCreateUserId(String createUserId) { this.createUserId = createUserId; } }
[ "253332973@qq.com" ]
253332973@qq.com
8e2b6be599ded67154ad7708d92a3df11f898dee
15a51de7fb7f2e4922756af8dd49753fc9d5dcaf
/ClassTest-Webapp/src/main/java/com/android/domain/StudentGrade.java
5acc4e7bb0c198109ddec43e9473f4d72476e87e
[]
no_license
oiegas/test-classes
80050db4c79f2c036e5ea459c8b04304181a65eb
4db7dc5fe910bc552d703201923aea0c1dd34d21
refs/heads/master
2021-01-21T04:53:49.919616
2016-07-03T20:32:22
2016-07-03T20:32:22
48,057,668
0
0
null
null
null
null
UTF-8
Java
false
false
678
java
package com.android.domain; public class StudentGrade { private int userId; private String userName; private String testName; private float grade; public int getUserId() { return userId; } public void setUserId(int userId) { this.userId = userId; } public String getTestName() { return testName; } public void setTestName(String testName) { this.testName = testName; } public float getGrade() { return grade; } public void setGrade(float grade) { this.grade = grade; } public String getUserName() { return userName; } public void setUserName(String userName) { this.userName = userName; } }
[ "AlexandruOi@AlexandruOi-lap.yonder.local" ]
AlexandruOi@AlexandruOi-lap.yonder.local
089e7d7a58fee99906e8d9cb8fe65b441b1b180f
08fb478e67100d6b1886ad84884b6ec987b8e471
/src/main/java/models/Withdraw.java
18f2d5c92cca75eafa2f133e19ca5d7bf73911bb
[]
no_license
PrimeshShamilka/Bbank
c544262d3de90e96ef7f6e5ced97d8713af78488
e4eb6e00abe1c41ce8724f828755e677c1cd8506
refs/heads/master
2022-07-17T09:36:31.222917
2020-08-03T08:19:42
2020-08-03T08:19:42
230,716,327
2
0
null
2022-06-21T02:32:42
2019-12-29T07:11:30
Java
UTF-8
Java
false
false
1,159
java
package models; import java.sql.Timestamp; // mobile withdraw public class Withdraw { private int withdrawID; private int mobileAgentID; private int customerID; private float amount; private int priority; private Timestamp time; private int accountNo; public int getWithdrawID() { return withdrawID; } public void setWithdrawID(int withdrawID) { this.withdrawID = withdrawID; } public int getMobileAgentID() { return mobileAgentID; } public void setMobileAgentID(int mobileAgentID) { this.mobileAgentID = mobileAgentID; } public int getCustomerID() { return customerID; } public void setCustomerID(int customerID) { this.customerID = customerID; } public float getAmount() { return amount; } public void setAmount(float amount) { this.amount = amount; } public int getPriority() { return priority; } public void setPriority(int priority) { this.priority = priority; } public Timestamp getTime() { return time; } public void setTime(Timestamp time) { this.time = time; } public int getAccountNo() { return accountNo; } public void setAccountNo(int accountNo) { this.accountNo = accountNo; } }
[ "primeshs.17@cse.mrt.ac.lk" ]
primeshs.17@cse.mrt.ac.lk
d68620d1127d29e9a5d78811626aef21b42077a2
cb59d9923b64b2ce837ace9674d3aef499a86702
/src/main/java/com/badlogicgames/filecache/SqliteCache.java
fa5f92099623d75e0db81698984d17a8f6bf677f
[ "Apache-2.0" ]
permissive
badlogic/filecache
4ce5a9a6091f2ec6ff1bcc457483f891830cdf70
bedf61bb1b3e0fe701ca41392284752828075c6e
refs/heads/master
2021-01-23T13:22:57.057146
2015-02-28T00:57:32
2015-02-28T00:57:32
31,441,949
1
0
null
null
null
null
UTF-8
Java
false
false
6,654
java
/* * Copyright (C) 2015 Mario Zechner * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.badlogicgames.filecache; import java.io.File; import java.io.IOException; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.Date; import java.util.HashMap; import java.util.Map; /** * Sqlite-based {@link FileCache} implementation * * @author badlogic * */ public class SqliteCache implements FileCache { // @formatter:off private static final String SQL_CREATE_TABLE = "create table if not exists files (" + " name varchar(255) not null," + " data Blob," + " lastModified Long" + ")"; private static final String SQL_CREATE_INDEX = "create unique index if not exists nameIndex on files (name)"; private static final String SQL_WRITE = "insert or replace into files" + " (name, data, lastModified)" + " values (?, ?, ?)"; private static final String SQL_READ = "select data, lastModified from files" + " where name = ?"; private static final String SQL_EXISTS = "select name from files" + " where name = ?"; private static final String SQL_LAST_MODIFIED = "select data, lastModified from files" + " where name = ?"; private static final String SQL_REMOVE = "delete from files where name = ?"; // @formatter:on // we keep a map of connections around, based // on their jdbc string private static Map<String, SingletonConnectionPool> connectionPools = new HashMap<>(); private final SingletonConnectionPool connectionPool; public SqliteCache(File dbFile) throws IOException { try { Class.forName("org.sqlite.JDBC"); String jdbc = "jdbc:sqlite:" + dbFile.getAbsolutePath(); synchronized (connectionPools) { SingletonConnectionPool connection = connectionPools.get(jdbc); if (connection == null) { connection = new SingletonConnectionPool(jdbc); } connectionPools.put(jdbc, connection); this.connectionPool = connection; } createSchemaIfNeeded(); } catch (Throwable t) { throw new IOException("Couldn't create Sqlite cache", t); } } public void createSchemaIfNeeded() throws SQLException { Connection conn = connectionPool.getConnection(); try (Statement stmt = conn.createStatement()) { stmt.executeUpdate(SQL_CREATE_TABLE); stmt.executeUpdate(SQL_CREATE_INDEX); } } @Override public void writeFile(String name, byte[] data) throws IOException { try { String sql = SQL_WRITE; Connection conn = connectionPool.getConnection(); try (PreparedStatement stmt = conn.prepareStatement(sql)) { stmt.setString(1, name); stmt.setBytes(2, data); stmt.setLong(3, new Date().getTime()); stmt.executeUpdate(); } } catch (Throwable t) { throw new IOException("Couldn't write file " + name, t); } } @Override public CachedFile readFile(String name) throws IOException { try { Connection conn = connectionPool.getConnection(); try (PreparedStatement stmt = conn.prepareStatement(SQL_READ)) { stmt.setString(1, name); ResultSet rs = stmt.executeQuery(); if (!rs.next()) { throw new IOException("File " + name + " not in cache"); } byte[] data = rs.getBytes(1); long lastModified = rs.getLong(2); return new CachedFile(name, data, lastModified); } } catch (Throwable t) { throw new IOException("Couldn't read file " + name, t); } } @Override public void removeFile(String name) { try { Connection conn = connectionPool.getConnection(); try (PreparedStatement stmt = conn.prepareStatement(SQL_REMOVE)) { stmt.setString(1, name); stmt.executeUpdate(); } } catch (Throwable t) { throw new RuntimeException("Couldn't delete file " + name, t); } } @Override public boolean isCached(String name) { try { Connection conn = connectionPool.getConnection(); try (PreparedStatement stmt = conn.prepareStatement(SQL_EXISTS)) { stmt.setString(1, name); ResultSet rs = stmt.executeQuery(); return rs.next(); } } catch (Throwable t) { return false; } } @Override public long lastModified(String name) { try { Connection conn = connectionPool.getConnection(); try (PreparedStatement stmt = conn.prepareStatement(SQL_LAST_MODIFIED)) { stmt.setString(1, name); ResultSet rs = stmt.executeQuery(); if (!rs.next()) { throw new IOException("File " + name + " not in cache"); } return rs.getLong(1); } } catch (Throwable t) { return 0; } } private static class SingletonConnectionPool { private final String jdbc; private Connection connection; public SingletonConnectionPool(String jdbc) { this.jdbc = jdbc; } public Connection getConnection() throws SQLException { if (connection == null || connection.isClosed()) { connection = DriverManager.getConnection(jdbc); connection.setAutoCommit(false); } return connection; } } }
[ "badlogicgames@gmail.com" ]
badlogicgames@gmail.com
9e467b1d9a0538fae95b9cdcea4bb7ba844b0cbe
7eb7818405d0decc85f80b2d517e271e04093271
/src/HistoryCustomer.java
684717b9876993924a8165c0718ca8981de5964f
[]
no_license
prateek18597/Banking-Database-System
aa02fd66a62d20a74ee1d87a27708a308c0bdcd4
ecf7b50bdd0704bd7537481666c4bddd16bf1d6e
refs/heads/master
2020-05-09T18:47:35.778017
2019-08-31T15:56:35
2019-08-31T15:56:35
181,354,156
3
1
null
2019-08-31T15:56:36
2019-04-14T18:48:42
Java
UTF-8
Java
false
false
10,396
java
import java.awt.Font; /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * * @author pratik */ public class HistoryCustomer extends javax.swing.JFrame { /** * Creates new form HistoryCustomer */ public HistoryCustomer() { initComponents(); jButton5.setFont(jButton5.getFont().deriveFont(Font.BOLD)); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jToolBar1 = new javax.swing.JToolBar(); jButton1 = new javax.swing.JButton(); jButton3 = new javax.swing.JButton(); jButton4 = new javax.swing.JButton(); jButton6 = new javax.swing.JButton(); jButton5 = new javax.swing.JButton(); jToolBar2 = new javax.swing.JToolBar(); time = new javax.swing.JLabel(); jToggleButton1 = new javax.swing.JToggleButton(); jToggleButton2 = new javax.swing.JToggleButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); jToolBar1.setRollover(true); jButton1.setText("Home"); jButton1.setFocusable(false); jButton1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jButton1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jToolBar1.add(jButton1); jButton3.setText("Approve Loan"); jButton3.setFocusable(false); jButton3.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jButton3.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton3ActionPerformed(evt); } }); jToolBar1.add(jButton3); jButton4.setText("Deposit Money"); jButton4.setFocusable(false); jButton4.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jButton4.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jButton4.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton4ActionPerformed(evt); } }); jToolBar1.add(jButton4); jButton6.setText("Withdraw Money"); jButton6.setFocusable(false); jButton6.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jButton6.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jToolBar1.add(jButton6); jButton5.setText("Customer History"); jButton5.setFocusable(false); jButton5.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jButton5.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jButton5.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton5ActionPerformed(evt); } }); jToolBar1.add(jButton5); jToolBar2.setRollover(true); time.setText("TIme:"); jToolBar2.add(time); jToggleButton1.setText("Log Out"); jToggleButton1.setFocusable(false); jToggleButton1.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jToggleButton1.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jToggleButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jToggleButton1ActionPerformed(evt); } }); jToolBar2.add(jToggleButton1); jToggleButton2.setText("Close"); jToggleButton2.setFocusable(false); jToggleButton2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jToggleButton2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM); jToggleButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jToggleButton2ActionPerformed(evt); } }); jToolBar2.add(jToggleButton2); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(jToolBar1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGap(18, 18, 18) .addComponent(jToolBar2, javax.swing.GroupLayout.PREFERRED_SIZE, 199, javax.swing.GroupLayout.PREFERRED_SIZE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jToolBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jToolBar2, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(275, Short.MAX_VALUE)) ); pack(); }// </editor-fold>//GEN-END:initComponents private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed // TODO add your handling code here: // if(!this.getClass().toString().equals("CustomerHome")){ this.dispose(); new CustomerHome().setVisible(true); // } }//GEN-LAST:event_jButton1ActionPerformed private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed // TODO add your handling code here: // if(!this.getClass().toString().equals("LoanApproval")){ this.dispose(); new LoanApproval().setVisible(true); // } }//GEN-LAST:event_jButton3ActionPerformed private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed // TODO add your handling code here: // if(!this.getClass().toString().equals("EmployeeDeposit")){ this.dispose(); new MoneyDeposit().setVisible(true); // } }//GEN-LAST:event_jButton4ActionPerformed private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton5ActionPerformed // TODO add your handling code here: // if(!this.getClass().toString().equals("CustomerHistory")){ // } }//GEN-LAST:event_jButton5ActionPerformed private void jToggleButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleButton1ActionPerformed // TODO add your handling code here: CustomerInfo.clearCustomerInfo(); this.dispose(); new Login().setVisible(true); }//GEN-LAST:event_jToggleButton1ActionPerformed private void jToggleButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jToggleButton2ActionPerformed // TODO add your handling code here: System.exit(0); }//GEN-LAST:event_jToggleButton2ActionPerformed /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(HistoryCustomer.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(HistoryCustomer.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(HistoryCustomer.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(HistoryCustomer.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new HistoryCustomer().setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jButton1; private javax.swing.JButton jButton3; private javax.swing.JButton jButton4; private javax.swing.JButton jButton5; private javax.swing.JButton jButton6; private javax.swing.JToggleButton jToggleButton1; private javax.swing.JToggleButton jToggleButton2; private javax.swing.JToolBar jToolBar1; private javax.swing.JToolBar jToolBar2; private javax.swing.JLabel time; // End of variables declaration//GEN-END:variables }
[ "prateek18597@gmail.com" ]
prateek18597@gmail.com
5361d3b6f5c92bcdf63954c4e99bff2378200f98
32dd58edd88f2d2f7b41d6c517c0600540ed8def
/dependency-inyectIon/src/main/java/com/cristian/dependency/scopes/EjemploScope.java
edf6afa8d184a5d5a085d491170a1f3499a57581
[]
no_license
janios/curso-spring-alex
c9f67fa87f24f1b06d059bca3a0b20df2bbfc53f
3e74e68415b5d1fbe3915c7e069bf1612848a60f
refs/heads/master
2023-03-01T00:43:24.984056
2021-01-14T21:25:57
2021-01-14T21:25:57
329,738,080
0
0
null
null
null
null
UTF-8
Java
false
false
202
java
package com.cristian.dependency.scopes; import org.springframework.context.annotation.Scope; import org.springframework.stereotype.Service; @Service @Scope("prototype") public class EjemploScope { }
[ "escamilla.cristian@gmail.com" ]
escamilla.cristian@gmail.com
265c95cc873538d9f04684c9c5862135f6d41f5b
967317162df825737a466e4381d65e97d3d81893
/src/main/java/service/IStudentService.java
2a2706aa0a38aa6c26c5bcf71e042580a28921d0
[]
no_license
luonganhtu19/uploadIMG_verifyGmail_Spring
c42f28e567913ca96c33692bb9fb7abfebfdfb73
c712b4b8a0819715c8ac9e8743d624e1d94aa701
refs/heads/master
2023-02-26T18:32:20.431070
2021-01-29T06:48:12
2021-01-29T06:48:12
334,061,491
0
0
null
null
null
null
UTF-8
Java
false
false
104
java
package service; import model.Student; public interface IStudentService extends IService<Student> { }
[ "-" ]
-
58d39a69fd64c541c805162e3df0190bed9388cd
660dd0dbae47d40f68a719431a0b0e006fcfaecc
/FirstProjectApp/src/main/java/edu/scu/eventshub/WelcomeActivity.java
56af02a396a6e73fe94029e27452aa47f37bd587
[]
no_license
nvasudevan1991/SCUEventsHub
00630675f0589dc575285afd3cee39844cf558bc
07d9c6993c5f40a68e561f4c7854ef1c89918cc3
refs/heads/master
2021-01-23T16:04:45.648280
2017-06-14T18:34:21
2017-06-14T18:34:21
93,281,478
0
0
null
null
null
null
UTF-8
Java
false
false
1,660
java
package edu.scu.eventshub; import android.content.Intent; import android.os.AsyncTask; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.util.Log; public class WelcomeActivity extends AppCompatActivity { String APP_TAG = "SPLASH_SCREEN"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_welcome); LongOperation lo = new LongOperation(); lo.execute("5"); } private class LongOperation extends AsyncTask<String, Void, String> { @Override protected String doInBackground(String... params) { Log.d(APP_TAG, "in doInBackground()"); try{ int time = Integer.parseInt(params[0])*1000; Thread.sleep(time); } catch (InterruptedException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } return null; } @Override protected void onPostExecute(String result) { Log.d(APP_TAG, "in onPostExecute()"); // After 5 seconds redirect to another intent Intent i=new Intent(getBaseContext(),FirstPage.class); startActivity(i); //Remove activity finish(); } @Override protected void onPreExecute() { Log.d(APP_TAG, "in onPreExecute()"); } @Override protected void onProgressUpdate(Void... values) { Log.d(APP_TAG, "in onPostExecute()"); } } }
[ "nvasudevan@scu.edu" ]
nvasudevan@scu.edu
504b69c38f641c893d0e8d0b139da11f418b0fd5
a280aa9ac69d3834dc00219e9a4ba07996dfb4dd
/regularexpress/home/weilaidb/work/app/hadoop-2.7.3-src/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestSetrepIncreasing.java
aea8499add5cd591153f419905446a3f268c9233
[]
no_license
weilaidb/PythonExample
b2cc6c514816a0e1bfb7c0cbd5045cf87bd28466
798bf1bdfdf7594f528788c4df02f79f0f7827ce
refs/heads/master
2021-01-12T13:56:19.346041
2017-07-22T16:30:33
2017-07-22T16:30:33
68,925,741
4
2
null
null
null
null
UTF-8
Java
false
false
510
java
package org.apache.hadoop.hdfs; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.BlockLocation; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.FsShell; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.server.datanode.SimulatedFSDataset; import org.junit.Test; public class TestSetrepIncreasing
[ "weilaidb@localhost.localdomain" ]
weilaidb@localhost.localdomain
87d28fa92125f7787e68f3d8c98b307820bd5381
66731478f92353e00a30b722ec0e027b6ef035f0
/src/main/java/service/RedisService.java
7b6c3d5b7eedae5dd611ae5acbbe2ee893efa2d0
[]
no_license
doubleair/be-hm
95043379d3ef5c8b696d977a3cd3646d080f31b4
ea7c0765ecdbb7040c88a389d4c23fd0369ca830
refs/heads/master
2021-05-07T09:06:57.677179
2017-11-29T06:02:12
2017-11-29T06:02:12
109,472,553
0
0
null
null
null
null
GB18030
Java
false
false
1,724
java
package service; import java.util.Map; import model.UserCenterModel; /** * 类RedisService.java的实现描述:redis service * * @author jizhi.qy 2017年11月9日 下午3:09:52 */ public interface RedisService { /** * 批量删除对应的value * * @param keys */ public void remove(final String... keys); /** * 批量删除key * * @param pattern */ public void removePattern(final String pattern); /** * 删除对应的value * * @param key */ public void remove(final String key); /** * 判断缓存中是否有对应的value * * @param key * @return */ public boolean exists(final String key); /** * 读取缓存 * * @param key * @return */ public Object get(final String key); /** * 写入缓存 * * @param key * @param value * @return */ public boolean set(final String key, Object value); /** * 写入缓存 * * @param key * @param value * @return */ public boolean set(final String key, Object value, Long expireTime); /** * 自增 * * @param key * @param delta * @return */ public long increment(final String key, long delta); /** * 根据本地wxLocalSessionId获取对应的value * * @param wxLocalSessionId * @return */ public UserCenterModel checkUserSession(String wxLocalSessionId); /** * 根据本地wxLocalSessionId获取redis中的缓存map * * @param wxLocalSessionId * @return */ public Map<String, String> getRedisMap(String wxLocalSessionId); }
[ "396617786@qq.com" ]
396617786@qq.com
0506b0e016c26504bd47309157869535dd88c8c7
a512a7c995e7beaa22b5cd735a9295b4c04f2dbf
/android/app/src/main/java/com/rate/MainApplication.java
63d0f5d936c3ad99dd233cbe782ce987d6bdfc65
[]
no_license
EmreDereli/rate
c7f1b755859534489801f2222afd3e435a90d79f
e9a00fbd15725d4e8dce68e80d5d15d23d9ea105
refs/heads/master
2020-12-26T18:55:23.014802
2020-08-27T19:27:09
2020-08-27T19:27:09
237,605,694
0
0
null
null
null
null
UTF-8
Java
false
false
2,322
java
package com.rate; import android.app.Application; import android.content.Context; import com.facebook.react.PackageList; import com.facebook.react.ReactApplication; import com.oblador.vectoricons.VectorIconsPackage; import com.facebook.react.ReactNativeHost; import com.facebook.react.ReactPackage; import com.facebook.soloader.SoLoader; import java.lang.reflect.InvocationTargetException; import java.util.List; public class MainApplication extends Application implements ReactApplication { private final ReactNativeHost mReactNativeHost = new ReactNativeHost(this) { @Override public boolean getUseDeveloperSupport() { return BuildConfig.DEBUG; } @Override protected List<ReactPackage> getPackages() { @SuppressWarnings("UnnecessaryLocalVariable") List<ReactPackage> packages = new PackageList(this).getPackages(); // Packages that cannot be autolinked yet can be added manually here, for example: // packages.add(new MyReactNativePackage()); return packages; } @Override protected String getJSMainModuleName() { return "index"; } }; @Override public ReactNativeHost getReactNativeHost() { return mReactNativeHost; } @Override public void onCreate() { super.onCreate(); SoLoader.init(this, /* native exopackage */ false); initializeFlipper(this); // Remove this line if you don't want Flipper enabled } /** * Loads Flipper in React Native templates. * * @param context */ private static void initializeFlipper(Context context) { if (BuildConfig.DEBUG) { try { /* We use reflection here to pick up the class that initializes Flipper, since Flipper library is not available in release mode */ Class<?> aClass = Class.forName("com.facebook.flipper.ReactNativeFlipper"); aClass.getMethod("initializeFlipper", Context.class).invoke(null, context); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (NoSuchMethodException e) { e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } } } }
[ "emre@bigoen.com" ]
emre@bigoen.com
99bb579d0e491bff1baf9df39ede70c91c0d8532
e0fd2bcc2e9fecf5a1321529cf7ba93d1458127f
/wxCommon/src/com/ian/media/util/JsonDateSerializer.java
ff0d50147959a6f29474a1d35ca223fa9e1df416
[]
no_license
EastWind1/wxShop
ab200db79c986548ac9db94ec2fe9c7444eb4415
05a062e9633d6324440fd8503ba6b04dd0216232
refs/heads/master
2022-10-22T00:35:24.290753
2018-05-20T12:34:10
2018-05-20T12:34:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
828
java
package com.ian.media.util; import java.io.IOException; import java.text.SimpleDateFormat; import java.util.Date; import org.codehaus.jackson.JsonGenerator; import org.codehaus.jackson.JsonProcessingException; import org.codehaus.jackson.map.JsonSerializer; import org.codehaus.jackson.map.SerializerProvider; import org.springframework.stereotype.Component; @Component public class JsonDateSerializer extends JsonSerializer<Date>{ private static final SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); @Override public void serialize(Date date, JsonGenerator gen, SerializerProvider provider) throws IOException, JsonProcessingException { String formattedDate = dateFormat.format(date); gen.writeString(formattedDate); } }
[ "657857337@qq.com" ]
657857337@qq.com
22c61b5eb1cfe601da7180d5b652dc6692baf888
e8cd24201cbfadef0f267151ea5b8a90cc505766
/group01/1814014897/zhouhui/src/week08/queue/QueueWithTwoStacks.java
99ca3b72318d4e2428d718875aec3287465db7a9
[]
no_license
XMT-CN/coding2017-s1
30dd4ee886dd0a021498108353c20360148a6065
382f6bfeeeda2e76ffe27b440df4f328f9eafbe2
refs/heads/master
2021-01-21T21:38:42.199253
2017-06-25T07:44:21
2017-06-25T07:44:21
94,863,023
0
0
null
null
null
null
UTF-8
Java
false
false
815
java
package week08.queue; import java.util.Stack; /** * 用两个栈来实现一个队列 * * @author Hui Zhou * * @param <E> */ public class QueueWithTwoStacks<E> { private Stack<E> stack1; private Stack<E> stack2; public QueueWithTwoStacks() { stack1 = new Stack<E>(); stack2 = new Stack<E>(); } public boolean isEmpty() { return stack1.isEmpty(); } public int size() { return stack1.size(); } public void enQueue(E item) { stack1.push(item); } public E deQueue() { int stack1Size = stack1.size(); for (int i = 0; i < stack1Size; i++) { stack2.push(stack1.pop()); } E deQueue = stack2.pop(); int stack2Size = stack2.size(); for (int i = 0; i < stack2Size; i++) { stack1.push(stack2.pop()); } return deQueue; } }
[ "542194147@qq.com" ]
542194147@qq.com
a2a93556d38922dc50b06eff7e8f7542757ba3be
f29a025e0316111e36bddb0985324f73ea4bfd38
/DayFourPThree/src/com/wiley/clock/ClockMain.java
43a1809f6c0b1843ff81dd30890a20414ed0e6c3
[]
no_license
ChetanMadaboni/DSA
9a72bb5169f2c0ec9d1d616b2ac2bfd97d913bbe
6ee9cefbac7a6069b9c0b4e5da52650023b9ad82
refs/heads/main
2023-06-09T16:19:54.356341
2021-06-26T17:48:32
2021-06-26T17:48:32
380,562,766
0
0
null
null
null
null
UTF-8
Java
false
false
291
java
package com.wiley.clock; public class ClockMain { public static void main(String[] args) { Clock c=new Clock(); Thread tic1=new Thread(new Tick(c)); Thread tac1=new Thread(new Tack(c)); Thread toc1=new Thread(new Tock(c)); tic1.start(); tac1.start(); toc1.start(); } }
[ "chetanmadabony19@gmail.com" ]
chetanmadabony19@gmail.com
9d122a0bc4f773b7ee95086935e252c5508e92b0
4fe6a5946d5f04ba010edf5b797ee388e7ce0422
/LocationApplication/src/com/bellychallenge/maps/GoogleMapsActivity.java
273fb373539cdda3c757cba9f063725b04d3ed36
[]
no_license
satheaki/LocationApplication-NearMe
9da8161bc46d269fb8b22a05d04edf99351e9725
02b0cc57706ae430030736ab1d2370fdcb4f8a5e
refs/heads/master
2021-01-10T04:05:07.201461
2016-03-16T21:05:30
2016-03-16T21:05:30
54,066,396
1
0
null
null
null
null
UTF-8
Java
false
false
2,270
java
package com.bellychallenge.maps; import android.content.Intent; import android.os.Bundle; import android.support.v4.app.FragmentActivity; import android.util.Log; import android.widget.Toast; import com.bellychallenge.main.R; import com.google.android.gms.maps.CameraUpdateFactory; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.MapFragment; import com.google.android.gms.maps.OnMapReadyCallback; import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.MarkerOptions; /** * Class for launching Google Maps and displaying location maps * * @author Akshay * */ public class GoogleMapsActivity extends FragmentActivity implements OnMapReadyCallback { protected static final String TAG = GoogleMapsActivity.class .getSimpleName(); private String latitude = ""; private String longitude = ""; private String businessName = ""; /*Map fragment for displaying map in a view*/ private MapFragment mMapFragment; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.google_maps); Intent intent = getIntent(); latitude = intent.getStringExtra("latitude"); longitude = intent.getStringExtra("longitude"); businessName = intent.getStringExtra("businessname"); mMapFragment = (MapFragment) getFragmentManager().findFragmentById( R.id.map_fragment); mMapFragment.getMapAsync(this); } @Override public void onMapReady(GoogleMap map) { double lat = Double.parseDouble(latitude); double longi = Double.parseDouble(longitude); LatLng location = new LatLng(lat, longi); Log.i(TAG, "latitude: " + lat + " longitude: " + longi); Toast.makeText(getApplicationContext(), "Name:" + businessName, Toast.LENGTH_LONG).show(); /*Adding a marker on the map*/ map.addMarker(new MarkerOptions().position(new LatLng(lat, longi)) .title(businessName)); /*Focusing the view on the specified location*/ map.moveCamera(CameraUpdateFactory.newLatLng(location)); map.animateCamera(CameraUpdateFactory.zoomTo(10), 200, null); map.getUiSettings().setZoomControlsEnabled(true); map.getUiSettings().setZoomGesturesEnabled(true); map.getUiSettings().setRotateGesturesEnabled(true); } }
[ "akshaysathe4@gmail.com" ]
akshaysathe4@gmail.com
e507a581443ba631eb70f1f3f7caedae937c81b4
3267f914102fc3ffb048178ce8880a5918e7226f
/app/src/main/java/com/example/jobortal/JobDetailsActivity.java
9d709f5209076007d2e1a36f0cc857e830bc6b97
[]
no_license
Aashir999/jobportal
16e5b1bf8225cf4572de7b74d70eeac436b248b7
fcc77ae402981dfb5d16c3a47f60539ac5268182
refs/heads/master
2023-06-10T19:21:49.199306
2021-07-03T12:34:01
2021-07-03T12:34:01
382,610,914
0
0
null
null
null
null
UTF-8
Java
false
false
1,648
java
package com.example.jobortal; import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.widget.Toolbar; import android.content.Intent; import android.os.Bundle; import android.widget.TextView; public class JobDetailsActivity extends AppCompatActivity { private Toolbar detail_toolbar; private TextView mtitle; private TextView mdate; private TextView mdes; private TextView mskil; private TextView msalary; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_job_details); detail_toolbar = findViewById(R.id.detail_toolbar); setSupportActionBar(detail_toolbar); getSupportActionBar().setTitle("Job Details"); getSupportActionBar().setHomeButtonEnabled(true); getSupportActionBar().setDisplayHomeAsUpEnabled(true); mtitle = findViewById(R.id.details_job_title); mdate = findViewById(R.id.details_job_post_date); mdes = findViewById(R.id.details_job_description); mskil = findViewById(R.id.details_job_skill); msalary = findViewById(R.id.details_job_salary); Intent intent = getIntent(); String title = intent.getStringExtra("title"); String date = intent.getStringExtra("date"); String des = intent.getStringExtra("des"); String skil = intent.getStringExtra("skill"); String Sal = intent.getStringExtra("sal"); mtitle.setText(title); mdate.setText(date); mdes.setText(des); mskil.setText(skil); msalary.setText(Sal); } }
[ "saadi90909@gmail.com" ]
saadi90909@gmail.com
b9bf09328ba123d300532312084b5fbafcebe50f
d30763990d4acd2cf2bb6de6ee3b3de874bfec63
/src/FromFirst/OOPS/six/InheritanceExample.java
650f4544c3b7440a85358d6d0ffae8ce6175d601
[]
no_license
iamamaresh007/Java
f7b56848eb1bd6c068fdb64090e1d4a2645d2856
3ccbceac0419b13de7e92aa69604a5ffd4f0b698
refs/heads/master
2021-02-08T05:52:42.946429
2020-03-01T09:12:25
2020-03-01T09:12:25
244,116,129
0
0
null
null
null
null
UTF-8
Java
false
false
1,103
java
package FromFirst.OOPS.six; class Teacher { int id; String name; String address; 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 getAddress() { return address; } public void setAddress(String address) { this.address = address; } } class Student extends Teacher { int marks; public int getMarks() { return marks; } public void setMarks(int marks) { this.marks = marks; } } public class InheritanceExample { public static void main(String[] args) { Teacher t = new Student(); t.setId(101); t.setName("Manjula"); t.setAddress("Ilkal"); System.out.println(t.getId()); System.out.println(t.getName()); System.out.println(t.getAddress()); System.out.println("________________________"); //Student s = new Student(); t.setId(1001); t.setName("Amaresh"); t.setAddress("Banglore"); System.out.println(t.getId()); System.out.println(t.getName()); System.out.println(t.getAddress()); } }
[ "61202675+iamamaresh007@users.noreply.github.com" ]
61202675+iamamaresh007@users.noreply.github.com
ef5873701c82304a94893648df3d236db1efe531
f151a98c593fbe65b6e11931c5182a15adffdea9
/MainProjectSpringMVC/src/presentation/data/ViewOrdersData.java
d4a55ff867b472091609684f5988a9e6c866193d
[]
no_license
vinhsteven/Pink
be6fa7929251004187d7c539fe234e14b3e2c36a
5aa8865fad8e7641489e8cbf4915fb895bf9be4b
refs/heads/master
2021-01-13T07:16:16.688406
2016-10-24T04:55:05
2016-10-24T04:55:05
71,646,492
0
0
null
2016-10-24T04:55:06
2016-10-22T15:05:55
Java
UTF-8
Java
false
false
2,022
java
package presentation.data; import java.util.ArrayList; import java.util.List; import java.util.logging.Logger; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import business.BusinessConstants; import business.SessionCache; import business.exceptions.BackendException; import business.externalinterfaces.CustomerSubsystem; import business.externalinterfaces.Order; import business.usecasecontrol.ViewOrdersController; @Component public class ViewOrdersData { @Autowired ViewOrdersController viewOrdersController; private static final Logger LOG = Logger.getLogger(ViewOrdersData.class.getSimpleName()); private OrderPres selectedOrder; public OrderPres getSelectedOrder() { return selectedOrder; } public void setSelectedOrder(OrderPres so) { selectedOrder = so; } public void refreshAfterSubmit() throws BackendException{ SessionCache cache = SessionCache.getInstance(); CustomerSubsystem css = (CustomerSubsystem) cache.get(BusinessConstants.CUSTOMER); viewOrdersController.refreshAfterSubmit(css); } public List<OrderPres> getOrders() { LOG.warning("ViewOrdersData method getOrders() has not been implemented."); /* * @miki * to get order history, get the customersusbystem info from the global cache * and pass it to the getOrderHistory Method. * Get the orders and change each order into orderPres. * */ SessionCache cache = SessionCache.getInstance(); CustomerSubsystem css = (CustomerSubsystem) cache.get(BusinessConstants.CUSTOMER); List<Order> or_hist = new ArrayList<Order>(); or_hist = viewOrdersController.getOrderHistory(css); List<OrderPres> ord_pres_hist = new ArrayList<OrderPres>(); for(Order o : or_hist){ OrderPres temp_ordPres = new OrderPres(); temp_ordPres.setOrder(o); ord_pres_hist.add(temp_ordPres); } return ord_pres_hist; //return DefaultData.ALL_ORDERS; } }
[ "vinh.steven@gmail.com" ]
vinh.steven@gmail.com
8d5b6b41ef2172a348136e24ebe296e510bc1675
eb072810f0dc579dbbfe00e5a0307bc730aeedd6
/MenuDrivenNumberOptions.java
7ab416f9e7c37af62a22160aa1452b8664fd0486
[]
no_license
narmasaru/labs
b8b8ba5def3a666f317262268b8873edfa90e101
9f8b9b5dc60634aa10946cd5ef9c1c41bfb60dde
refs/heads/master
2020-07-28T21:31:38.409721
2016-10-03T16:05:19
2016-10-03T16:05:19
66,580,355
0
0
null
null
null
null
UTF-8
Java
false
false
3,284
java
import java.util.Scanner; public class MenuDrivenNumberOptions { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); System.out.println("Welcome to the number menu"); System.out.println("Number menu has 6 options to chose"); System.out.println("option 1 is add three numbers"); System.out.println("option2 is finding largest of 5 numbers"); System.out.println("option3 is finding the sum of first 100 numbers"); System.out.println("option4 is swapping two numbers"); System.out.println("option5 is finding fibonacci of any given number"); System.out.println("print star for given value"); String choice = "y"; while (choice.equalsIgnoreCase("y")) { System.out.println("Chose the option"); sc = new Scanner(System.in); int option = sc.nextInt(); switch (option) { case 1: System.out.println("Enter three numbers"); int x, y, z; x = sc.nextInt(); y = sc.nextInt(); z = sc.nextInt(); int result = add(x, y, z); System.out.println("The sum of three numbers is: " + result); break; case 2: System.out.println("Enter five Integers"); int n1, n2, n3, n4, n5; n1 = sc.nextInt(); n2 = sc.nextInt(); n3 = sc.nextInt(); n4 = sc.nextInt(); n5 = sc.nextInt(); int largest = largestNumber(n1, n2, n3, n4, n5); System.out.println("The largerst of five numbers is: " + largest); break; case 3: System.out.println("Find sum of first 100 number"); int a = 0; for (int i = 1; i <= 100; i++) { a = a + i; } System.out.println("Sum of first 100 numbers is: " + a); break; case 4: System.out.println("Enter two numbers to swap"); int a1 = sc.nextInt(); int b = sc.nextInt(); int z1; System.out.println("Before swapping " + a1 + "\t" + b); z1 = a1; a1 = b; b = z1; System.out.println("After swapping " + a1 + "\t" + b); break; case 5: System.out.print("Enter number: "); int ent = sc.nextInt(); int num1 = 0; int num2 = 1; int num3 = 0; for (int a2 = 0; a2 < ent; a2++) { if (a2 <= 1) { System.out.print(" " + num3); num3 = num1 + num2; } else if (a2 == 2) { System.out.print(" " + num3); } else { num1 = num2; num2 = num3; num3 = num1 + num2; System.out.print(" " + num3); } } break; case 6: displayStar(); break; } System.out.println("Do you want to continue(y/n)"); choice = sc.next(); } } public static int add(int n1, int n2, int n3) { int sum = (n1 + n2 + n3); return sum; } public static int largestNumber(int n1, int n2, int n3, int n4, int n5) { if (n1 > n2 && n1 > n3 && n1 > n4 && n4 > n5) return n1; if (n2 > n3 && n2 > n4 && n2 > n5) return n2; if (n3 > n4 && n3 > n5) return n3; if (n4 > n5) return n4; return n5; } public static void displayStar(){ System.out.println("Print star for given value in a Pyramid shape,enter the number"); Scanner sc=new Scanner(System.in); int n =sc.nextInt(); String s=("*"); for (int i=0;i<=n;i++){ for (int j=0;j<=i;j++){ System.out.print(s); } System.out.println(s); } } }
[ "narmasarav@gmail.com" ]
narmasarav@gmail.com
2cee2e3cc39022817c5bd73e39a617804d7d5dc9
bcf1c5ccea99fe1678315cc59664922194b723ab
/src/solitaire/Solitaire.java
185cc532d6be6dcefcba89307a2fca7bff11f10e
[]
no_license
margkiro/Solitaire
61a615377894f92e11258470c7bddb3f32983621
22386010c12ed38c711dbbdec8a149dc5d9b482b
refs/heads/master
2020-04-09T21:34:27.884101
2018-12-06T02:27:58
2018-12-06T02:27:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,166
java
package solitaire; import java.io.IOException; import java.util.Scanner; import java.util.Random; /** * This class implements a simplified version of Bruce Schneier's Solitaire Encryption algorithm. * * @author RU NB CS112 */ public class Solitaire { /** * Circular linked list that is the deck of cards for encryption */ CardNode deckRear; /** * Makes a shuffled deck of cards for encryption. The deck is stored in a circular * linked list, whose last node is pointed to by the field deckRear */ public void makeDeck() { // start with an array of 1..28 for easy shuffling int[] cardValues = new int[28]; // assign values from 1 to 28 for (int i=0; i < cardValues.length; i++) { cardValues[i] = i+1; } // shuffle the cards Random randgen = new Random(); for (int i = 0; i < cardValues.length; i++) { int other = randgen.nextInt(28); int temp = cardValues[i]; cardValues[i] = cardValues[other]; cardValues[other] = temp; } // create a circular linked list from this deck and make deckRear point to its last node CardNode cn = new CardNode(); cn.cardValue = cardValues[0]; cn.next = cn; deckRear = cn; for (int i=1; i < cardValues.length; i++) { cn = new CardNode(); cn.cardValue = cardValues[i]; cn.next = deckRear.next; deckRear.next = cn; deckRear = cn; } } /** * Makes a circular linked list deck out of values read from scanner. */ public void makeDeck(Scanner scanner) throws IOException { CardNode cn = null; if (scanner.hasNextInt()) { cn = new CardNode(); cn.cardValue = scanner.nextInt(); cn.next = cn; deckRear = cn; } while (scanner.hasNextInt()) { cn = new CardNode(); cn.cardValue = scanner.nextInt(); cn.next = deckRear.next; deckRear.next = cn; deckRear = cn; } } /** * Implements Step 1 - Joker A - on the deck. */ public void jokerA() { if(deckRear == null){ return; } CardNode temp = deckRear.next; CardNode prev = deckRear; if(deckRear.cardValue == 27){ do{ temp = temp.next; }while(temp.next != deckRear); prev = temp; CardNode temp2 = deckRear; CardNode temp3 = deckRear.next.next; CardNode temp4 = deckRear.next; prev.next = temp4; deckRear = temp4; deckRear.next = temp2; deckRear.next.next = temp3; printList(deckRear); return; } printList(deckRear); for(temp = deckRear.next; temp!= null; temp = temp.next){ if(temp.next.cardValue == 27){ CardNode n = new CardNode(); n = temp.next; temp.next = temp.next.next; n.next = temp.next.next; temp.next.next = n; printList(deckRear); return; } } // COMPLETE THIS METHOD } /** * Implements Step 2 - Joker B - on the deck. */ void jokerB() { if(deckRear == null){ return; } CardNode prev = deckRear; printList(deckRear); CardNode temp = deckRear.next; if(deckRear.cardValue == 28){ do{ temp = temp.next; }while(temp.next != deckRear); prev = temp; CardNode temp2 = deckRear; CardNode temp3 = deckRear.next.next; CardNode temp4 = deckRear.next; CardNode temp5 = deckRear.next.next.next; prev.next = temp4; deckRear = temp4; deckRear.next = temp3; deckRear.next.next = temp2; deckRear.next.next.next = temp5; printList(deckRear); return; } do{ temp = temp.next; }while(temp.next.next != deckRear); if(temp.next.cardValue == 28){ prev = temp; CardNode temp2 = deckRear; CardNode temp3 = deckRear.next.next; CardNode temp4 = deckRear.next; CardNode temp5 = prev.next; prev.next = temp2; prev.next.next = temp4; deckRear = temp4; deckRear.next = temp5; deckRear.next.next = temp3; printList(deckRear); return; } for(temp = deckRear.next; temp!= null; temp = temp.next){ if(temp.next.cardValue == 28){ CardNode n = new CardNode(); n = temp.next; temp.next = temp.next.next; n.next = temp.next.next.next; temp.next.next.next = n; printList( deckRear); return; } } // COMPLETE THIS METHOD } /** * Implements Step 3 - Triple Cut - on the deck. */ void tripleCut() { printList(deckRear); CardNode a = deckRear.next; CardNode ptr = deckRear.next; if(ptr.cardValue == 27 || ptr.cardValue == 28){ do{ ptr = ptr.next; }while(ptr.cardValue != 27 && ptr.cardValue !=28); deckRear = ptr; return; } while(ptr.next.cardValue != 27 && ptr.next.cardValue !=28){ ptr = ptr.next; } CardNode n = ptr; CardNode j1 = ptr.next; ptr = ptr.next.next; while(ptr.cardValue != 27 && ptr.cardValue != 28){ ptr = ptr.next; } CardNode j2 = ptr; if(j2.next == deckRear.next){ deckRear = n; return; } CardNode c = ptr.next; while(ptr != deckRear){ ptr = ptr.next; } CardNode s = ptr; s.next = j1; j2.next = a; n.next = c; deckRear = n; printList(deckRear); // COMPLETE THIS METHOD } /** * Implements Step 4 - Count Cut - on the deck. */ void countCut() { int n = deckRear.cardValue; if(n == 28 || n == 27) return; printList(deckRear); CardNode m = deckRear; CardNode p = deckRear.next; for(int c = 0; c<n; c++){ m = m.next; } CardNode b = m; CardNode s = m.next; while(m.next!=deckRear){ m = m.next; } m.next = p; b.next = deckRear; deckRear.next = s; printList(deckRear); // COMPLETE THIS METHOD } /** * Gets a key. Calls the four steps - Joker A, Joker B, Triple Cut, Count Cut, then * counts down based on the value of the first card and extracts the next card value * as key. But if that value is 27 or 28, repeats the whole process (Joker A through Count Cut) * on the latest (current) deck, until a value less than or equal to 26 is found, which is then returned. * * @return Key between 1 and 26 */ int getKey() { // COMPLETE THIS METHOD // THE FOLLOWING LINE HAS BEEN ADDED TO MAKE THE METHOD COMPILE jokerA(); jokerB(); tripleCut(); countCut(); CardNode n = deckRear.next; int p = n.cardValue; if(p == 28) p = 27; int s; for(int i = 0; i<p; i++){ n = n.next; } s = n.next.cardValue; if(s==27 || s== 28){ s = getKey(); } //printList(deckRear); System.out.println(s); return s; } /** * Utility method that prints a circular linked list, given its rear pointer * * @param rear Rear pointer */ private static void printList(CardNode rear) { if (rear == null) { return; } System.out.print(rear.next.cardValue); CardNode ptr = rear.next; do { ptr = ptr.next; System.out.print("," + ptr.cardValue); } while (ptr != rear); System.out.println("\n"); } /** * Encrypts a message, ignores all characters except upper case letters * * @param message Message to be encrypted * @return Encrypted message, a sequence of upper case letters only */ public String encrypt(String message) { // COMPLETE THIS METHOD String enMessage = ""; for(int i = 0; i<message.length(); i++){ char m = message.charAt(i); if(!Character.isLetter(m)){ continue; } m = Character.toUpperCase(m); int k = getKey(); m = (char) (k+m); if((int)m >90){ m = (char)(m-26); } enMessage = enMessage + m; } return enMessage; // THE FOLLOWING LINE HAS BEEN ADDED TO MAKE THE METHOD COMPILE } /** * Decrypts a message, which consists of upper case letters only * * @param message Message to be decrypted * @return Decrypted message, a sequence of upper case letters only */ public String decrypt(String message) { String ogMessage = ""; for(int i = 0; i<message.length(); i++){ char l = message.charAt(i); if(!Character.isLetter(l)){ continue; } l = Character.toUpperCase(l); int de = getKey(); l = (char)(l-de); if((int)l<65){ l = (char)(l+26); } ogMessage = ogMessage + l; } // COMPLETE THIS METHOD // THE FOLLOWING LINE HAS BEEN ADDED TO MAKE THE METHOD COMPILE return ogMessage; } }
[ "noreply@github.com" ]
noreply@github.com
59f58f5447c0107d5f4aeae50ab1ef1d0b268a93
7e4ccb1846377d70eea4637af1051811e884b6b7
/src/main/java/com/infoasdp/util/RequestContext.java
99b8727093625a2bc0f84b1c0a772bde81700bb2
[]
no_license
septanuddin1509/infoasdp-login
efbf29a500a55650b43379e346c580a619af7e95
47e4dcecb8f9a8511fae048c10571f319cf775c2
refs/heads/master
2020-03-30T12:42:42.675284
2018-10-02T13:09:36
2018-10-02T13:09:36
151,236,258
0
0
null
null
null
null
UTF-8
Java
false
false
178
java
package com.infoasdp.util; import java.util.HashMap; public class RequestContext extends HashMap<String, Object> { private static final long serialVersionUID = 1L; }
[ "septa@infoflow.co.id" ]
septa@infoflow.co.id
a13987fbfe7239d3215dc433a33a831e95150da8
3f580dc70ae19c97285f15e0a9a1d5b13a0d87ec
/app/src/main/java/in/codekamp/codekampconnect/models/Error.java
aa8226e9fe614c2f4d5e173491b17bad2ff51752
[]
no_license
himanshu096/kampkonnect
38b0d6428b9007c6368d1fac88443d17a5310c87
ea675531906140abaf5bb28224681b13dc84b4e5
refs/heads/master
2021-01-20T18:44:19.490804
2016-06-15T09:05:21
2016-06-15T09:05:21
61,193,907
0
0
null
null
null
null
UTF-8
Java
false
false
1,826
java
package in.codekamp.codekampconnect.models; import com.google.gson.annotations.Expose; import com.google.gson.annotations.SerializedName; import java.util.List; import java.util.Map; public class Error { public static final int ERROR_CODE_UNIDENTIFIED = -10; public static final int ERROR_CODE_NETWORK_ERROR = -9; @SerializedName("message") @Expose private String message; @SerializedName("errors") @Expose private Map<String, List<String>> errors; @SerializedName("code") @Expose private Integer code; @SerializedName("status_code") @Expose private Integer statusCode; public Error() { this("Some error occured", ERROR_CODE_UNIDENTIFIED); } public Error(String message, Integer code) { this.message = message; this.code = code; } /** * @return The message */ public String getMessage() { return message; } /** * @param message The message */ public void setMessage(String message) { this.message = message; } /** * @return The errors */ public Map<String, List<String>> getErrors() { return errors; } /** * @param errors */ public void setErrors(Map<String, List<String>> errors) { this.errors = errors; } /** * @return The code */ public Integer getCode() { return code; } /** * @param code The code */ public void setCode(Integer code) { this.code = code; } /** * @return The statusCode */ public Integer getStatusCode() { return statusCode; } /** * @param statusCode The status_code */ public void setStatusCode(Integer statusCode) { this.statusCode = statusCode; } }
[ "aryurock4@gmail.com" ]
aryurock4@gmail.com
d5e7059357a69216e9f11d456b13a5a8a02cc462
9bfa3498ff8d8cc291647a3f85075c6368eec746
/src/com/app/service/impl/LocationServiceImpl.java
b71728120bb57af695dc0ce2372d94cdeb288963
[]
no_license
Itsjeet007y1/VendorAppProject
a857cfb7d86ced37735cc75327beee9cf5af1eee
2ad969dba6b9e99550cf41f8ee781a9be53931ca
refs/heads/master
2020-03-06T17:12:21.457496
2018-03-27T12:54:51
2018-03-27T13:06:19
126,986,004
1
0
null
null
null
null
UTF-8
Java
false
false
998
java
package com.app.service.impl; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.app.dao.ILocationDao; import com.app.model.Location; import com.app.service.ILocationService; @Service public class LocationServiceImpl implements ILocationService { @Autowired private ILocationDao dao; @Override public int saveLocation(Location loc) { return dao.saveLocation(loc); } @Override public void updateLocation(Location loc) { dao.updateLocation(loc); } @Override public void deleteLocation(int locId) { dao.deleteLocation(locId); } @Override public Location getLocationById(int locId) { return dao.getLocationById(locId); } @Override public List<Location> getAllLocations() { return dao.getAllLocations(); } @Override public List<Object[]> getLocationCountAndType() { return dao.getLocationCountAndType(); } }
[ "32703731+ItsJeet007y@users.noreply.github.com" ]
32703731+ItsJeet007y@users.noreply.github.com
602f9585e36b75d2fe6f71ff1d9c52873c938e0d
6b0caebfed8289e26cee7e4967bc92b5a4339165
/app/src/main/java/com/example/mcqapp/AccountFragment.java
6b58b3654cda38b1f0f100212eb55d819138f68c
[]
no_license
jbilic02/android--QUIZ-APP
8bc19803df7c1c3ae6b6cd4b83f2ae8c6142c63d
12a4653bfc70b33d642c9279699e8f267c770d9e
refs/heads/master
2023-03-07T05:01:30.203807
2021-02-21T20:19:03
2021-02-21T20:19:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,664
java
package com.example.mcqapp; import android.content.Intent; import android.os.Bundle; import androidx.annotation.NonNull; import androidx.fragment.app.Fragment; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.Toast; import com.google.android.gms.auth.api.signin.GoogleSignInAccount; import com.google.firebase.auth.FirebaseAuth; public class AccountFragment extends Fragment { private Button logoutB; public AccountFragment() { // Required empty public constructor Log.d("ddf","df"); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment, objekt view sadrzi referencu na XML datoteku View view = inflater.inflate(R.layout.fragment_account, container, false); //inicijalizacija lougoutB logoutB = view.findViewById(R.id.logoutB); //ukoliko korisnik pritisne botun odjavi se logoutB.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { FirebaseAuth.getInstance().signOut(); //logout from firebase Intent intent = new Intent(getContext(),LoginActivity.class); //redirekcija/prebaci na LoginActivity intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); startActivity(intent); getActivity().finish(); } }); return view; } }
[ "jbilic02@fesb.hr" ]
jbilic02@fesb.hr
cf9d23010713525a5a33517327f81a199f09e717
25570916fda4a57e79d3ce7837ea0bd77e64acce
/src/main/java/com/xiaoming/day16/Test001.java
7149ca2123e24736ce9cb57c21d2eaf7f00648c7
[]
no_license
TPxiaoming/code-analysis
36b734eee39d183876d4ee0506b1bfdbbcad2800
7e913ae8e072e5b5eb51893231784ab837381e67
refs/heads/master
2022-07-01T21:21:37.373453
2019-08-12T14:37:22
2019-08-12T14:37:22
198,444,409
0
0
null
2022-06-21T01:31:43
2019-07-23T14:12:10
Java
UTF-8
Java
false
false
365
java
package com.xiaoming.day16; import com.xiaoming.day16.proxy.UserServiceProxy; import com.xiaoming.day16.service.UserService; import com.xiaoming.day16.service.impl.UserServiceImpl; public class Test001 { public static void main(String[] args) { UserService userService = new UserServiceImpl(); new UserServiceProxy(userService).add(); } }
[ "3093403587@qq.com" ]
3093403587@qq.com
617f28021ef27bdccd54ee11edf32c21f7438a92
e7861c0ed1b49224b6c4ccf6dbfc63be61a026e5
/JAVA/12월 17일 스트림끝 컬렉션시작 set ArrayList/차주님/testCollectionProject/src/test/set/TestTreeSet.java
eb71f1353723bae1f0f7410972f28495b3611cef
[]
no_license
kdw912001/kh
7d7610b4ddaab286714131d1c9108373f6c920a9
73c511db0723e0bc49258d8d146ba6f8ee9db762
refs/heads/master
2020-04-06T10:19:58.220792
2019-05-03T18:41:57
2019-05-03T18:41:57
157,376,594
1
0
null
null
null
null
UTF-8
Java
false
false
1,159
java
package test.set; import java.util.*; public class TestTreeSet { public static void main(String[] args) { // TreeSet test // 중복 허용 안 함 // 객체를 자동 오름차순정렬하면서 저장함 TreeSet tset = new TreeSet(); //Set tset = new TreeSet(): tset.add("orange"); tset.add("banana"); tset.add("apple"); tset.add("grape"); System.out.println(tset); //1. iterator() System.out.println("1 ---------------"); Iterator objIter = tset.iterator(); while(objIter.hasNext()) { System.out.println(objIter.next()); } //2. toArray() System.out.println("2 ---------------"); Object[] objArr = tset.toArray(); for(Object obj : objArr) { System.out.println(obj); } //3. 내림차순정렬된 목록 만들기 //descendingIterator() System.out.println("3 ---------------"); Iterator descIter = tset.descendingIterator(); while(descIter.hasNext()) { System.out.println(descIter.next()); } //4. descendingSet() //내림차순정렬된 Set 만들기 System.out.println("4 ----------"); Set descSet = tset.descendingSet(); System.out.println(descSet); } }
[ "kdw912001@naver.com" ]
kdw912001@naver.com
b00a849077c006b2750d12f060bd00b33f44698e
d34e6c9276ef6108541983cbecb7b94abd9dc77a
/src/projectPartB/TupleS.java
ac51c86211e7b098f25fcf0634ea7628969c8d7a
[]
no_license
laxmanbalajib/DBMS
5be1f9c9938083c6d5fc26fd2557fdefb2e18085
7e927b75cb910f878639d78571c4f654be56706c
refs/heads/main
2023-01-21T07:11:06.860612
2020-12-02T01:45:23
2020-12-02T01:45:23
316,557,811
0
0
null
null
null
null
UTF-8
Java
false
false
562
java
package projectPartB; public class TupleS extends Tuple{ private int bValue; private int cValue; public TupleS(int bValue, int cValue) { super(); this.bValue = bValue; this.cValue = cValue; } @Override public int getbValue() { return bValue; } public void setbValue(int bValue) { this.bValue = bValue; } @Override public int getcValue() { return cValue; } public void setcValue(int cValue) { this.cValue = cValue; } @Override public String toString() { return "[bValue=" + bValue + ", cValue=" + cValue + "]"; } }
[ "laxmanbalajib@tamu.edu" ]
laxmanbalajib@tamu.edu
b1049fc38c808cfb55242c243c9f14834f7a9a66
66084d713b9e0eb26bed9828f2434bfed5d1e96f
/src/com/monyetmabuk/rajawali/tutorials/TerrainActivity.java
c85bc1747824140811d04baacfad58de5a75f744
[]
no_license
44kksharma/RajawaliExamples
c8396b5dc7097e7e4f7180fac0ccfdc053bcc8b9
42185bae8ac8e62e8a5bcf9164c83b54c4a7c0e8
refs/heads/master
2021-01-18T06:16:14.489768
2013-06-26T22:50:34
2013-06-26T22:50:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
398
java
package com.monyetmabuk.rajawali.tutorials; import android.os.Bundle; public class TerrainActivity extends RajawaliExampleActivity { private TerrainRenderer mRenderer; public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mRenderer = new TerrainRenderer(this); mRenderer.setSurfaceView(mSurfaceView); super.setRenderer(mRenderer); initLoader(); } }
[ "ippeldv@gmail.com" ]
ippeldv@gmail.com
11ce5704b190505fc2cd09c72d64c8ba9d3adfb6
5a80002735018913fd193df5ff14d9e823bbb1dc
/admin/admin-frontend/src/test/java/no/valg/eva/admin/frontend/stemmegivning/ctrls/proving/models/VotingStatisticCategoriesTest.java
a5fd4dccbdc1cb86b8649f4fb77aec4d693b9e6c
[]
no_license
GhostNwa/election-eva-admin
8e6dcea25346e96fc92a4fa84f7ddbd6a3cbb16b
662d7ff2a20f1587eaee4ca1c63036a2308bbefd
refs/heads/master
2022-12-09T13:05:12.291789
2019-09-26T14:32:58
2019-09-26T14:36:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,967
java
package no.valg.eva.admin.frontend.stemmegivning.ctrls.proving.models; import static org.testng.AssertJUnit.assertEquals; import static org.testng.AssertJUnit.assertFalse; import static org.testng.AssertJUnit.assertTrue; import java.util.Arrays; import java.util.Collections; import no.valg.eva.admin.common.voting.VotingCategory; import org.testng.annotations.Test; /** * Test cases for VotingStatisticCategories */ public class VotingStatisticCategoriesTest { @Test public void allCategoriesIncludeSaerskiltBeredskapWithSentInnkomneTrue() { VotingStatisticCategories votingStatisticCategories = new VotingStatisticCategories(VotingStatisticCategories.ALL_VOTING_CATEGORIES); String[] cats = votingStatisticCategories.electionDayVotingCategoriesForStatistics(); assertEquals(Arrays.asList(new String[] { VotingCategory.VS.getId(), VotingCategory.VB.getId() }), Arrays.asList(cats)); assertTrue("Expected includeLateAdvanceVotes true", votingStatisticCategories.includeLateAdvanceVotes()); } @Test public void saerskiltImpliesSaerskiltWithSentInnkomneFalse() { VotingStatisticCategories votingStatisticCategories = new VotingStatisticCategories(VotingCategory.VS.getId()); String[] cats = votingStatisticCategories.electionDayVotingCategoriesForStatistics(); assertEquals(Arrays.asList(new String[] { VotingCategory.VS.getId() }), Arrays.asList(cats)); assertFalse("Expected includeLateAdvanceVotes false", votingStatisticCategories.includeLateAdvanceVotes()); } @Test public void sentInnkomneImpliesNoCategoriesWithSentInnkomneTrue() { VotingStatisticCategories votingStatisticCategories = new VotingStatisticCategories(VotingStatisticCategories.LATE_ADVANCE_VOTES); String[] cats = votingStatisticCategories.electionDayVotingCategoriesForStatistics(); assertEquals(Collections.emptyList(), Arrays.asList(cats)); assertTrue("Expected includeLateAdvanceVotes true", votingStatisticCategories.includeLateAdvanceVotes()); } }
[ "" ]
3c0622ebe79cbb03437800b53558ed5b26c441d0
ef4b9fb8a43e6bf51eeb7f2fdf53b802d681ae9a
/src/RiverCrossing.java
b83fb705e6fcf926ac96a9d61b190077a251dd63
[ "MIT" ]
permissive
plinkyg/JAVA-AUTOMAT-FSM-Puzzle
e6018be7674f6ac1924d7ab13ba2951d615dd35f
fea272938be173022229b64500b41d33e663ffa9
refs/heads/master
2021-09-21T09:53:07.091170
2018-08-24T03:47:05
2018-08-24T03:47:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,234
java
import Model.Nodez; import Model.State; import java.util.ArrayList; import java.util.Iterator; import java.util.TreeSet; public class RiverCrossing { private String[] moves = { "S", "SW", "SM", "SC", "SL", "SG", "SWM", "SWC", "SWL", "SWG", "SMC", "SML", "SMG", "SLC", "SLG", "SCG"}; private ArrayList<Nodez> queue; private ArrayList<Nodez> solutions; private Nodez root; public RiverCrossing() { queue = new ArrayList<Nodez>(); solutions = new ArrayList<Nodez>(); } public void startBreadthFirstSearch() { solutions = new ArrayList<Nodez>(); // Initialize solutions to zero TreeSet<String> left = new TreeSet<String>(); left.add("W"); left.add("M"); left.add("C"); left.add("L"); left.add("G"); left.add("S"); State inits = new State("left", left, new TreeSet<String>()); root = new Nodez(inits); root.level = 0; queue.add(root); while (!queue.isEmpty()) { Nodez n = queue.remove(0); System.out.println("Processing Level " + n.level + " " + n.data); for (String m : moves) { State s = n.data.transits(m); if (s != null && s.isValid()) // Check if it is allowable state { Nodez child = new Nodez(s); child.parent = n; child.level = n.level + 1; child.move = m + " moves " + child.data.getSpaceship(); // Check that a node doesn't occur already as ancestor to // prevent cycle in the graph if (!child.isAncestor()) { n.children.add(child); if (child.data.isSolution() == false) { queue.add(child); System.out.println("Adding state " + child.data); } else { solutions.add(child); System.out.println("Found solution " + child.data); } } } } } } public void printBFSGraph() { ArrayList<Nodez> queue = new ArrayList<Nodez>(); queue.add(root); while (!queue.isEmpty()) { Nodez n = queue.remove(0); System.out.println("Level " + n.level + " " + n.data); ArrayList<Nodez> adjlist = n.children; for (Nodez e : adjlist) { queue.add(e); } } } public void printSolution(){ System.out.println("No. of solutions: " + solutions.size()); ArrayList<Nodez> stack; Iterator<Nodez> iter = solutions.iterator(); int i = 1; while (iter.hasNext()) { stack = new ArrayList<Nodez>(); Nodez n = iter.next(); stack.add(n); n = n.parent; while (n != null) { stack.add(n); n = n.parent; } System.out.println("Solution " + i); printSequence(stack); i++; } } private void printSequence(ArrayList<Nodez> stack) { StringBuffer buf = new StringBuffer(); buf.append("No. of moves: "); buf.append(stack.size() - 1); buf.append("\n"); for (int i = stack.size() - 1; i >= 0; i--) { Nodez n = stack.get(i); buf.append(n.data.toString()); if (i != 0) { buf.append("--"); buf.append(stack.get(i - 1).move); buf.append("->>"); } } System.out.println(buf.toString()); } }
[ "shadrachgabriel@icloud.com" ]
shadrachgabriel@icloud.com
81fb836446301fac99a2ce35f98383748d2f5aa9
6d834e7c921ad307eb7b1874d902957699121aa2
/app/src/main/java/com/quanjiakan/net/retrofit/result_entity/GetUserHealthDocumentEntity.java
ce20f01da93761b760d2be17af2038a84da9d871
[]
no_license
sengeiou/QuanjiakangWatch
d6e577af1580983514f7a84974d425583ad95766
f5a65b0db887e0ee0d59b73167f3a13950e39b17
refs/heads/master
2020-05-29T19:53:55.096073
2018-01-23T10:03:20
2018-01-23T10:03:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,314
java
package com.quanjiakan.net.retrofit.result_entity; import com.quanjiakan.net.retrofit.result_entity.subentity.UserHealthDocumentEntity; import java.io.Serializable; import java.util.List; /** * Created by Administrator on 2017/12/13. */ public class GetUserHealthDocumentEntity implements Serializable{ /** * code : 200 * list : [{"createtime":"2017-12-12 17:55:08.0","deviceid":0,"id":382,"medicalName":"ceshi","medicalRecord":"http://picture.quanjiakan.com/quanjiakan/resources/medical/20171212175501_gy1onqv4pyzdzjcck3ie.png"}] * message : 返回成功 * rows : 1 */ private String code; private String message; private int rows; private List<UserHealthDocumentEntity> list; public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getMessage() { return message; } public void setMessage(String message) { this.message = message; } public int getRows() { return rows; } public void setRows(int rows) { this.rows = rows; } public List<UserHealthDocumentEntity> getList() { return list; } public void setList(List<UserHealthDocumentEntity> list) { this.list = list; } }
[ "marisareimu@126.com" ]
marisareimu@126.com
6983915eb50c901fb0b3258ba0d3ec2e8e505886
4987bbdcbfd192dba36945752d7f2649af6e1a25
/src/main/java/com/klein/uninet/web/rest/AccountResource.java
d150d92e37bea01642506eb541b79e98606d6889
[]
no_license
kleiner617/CloudComputingFinalProject
4ef4e30d57096fd4e91129e168d05450f8eb7638
f98f768519bcb7be1b378c81c7f968b9f13a197a
refs/heads/master
2021-08-28T07:49:45.236939
2017-12-11T15:18:47
2017-12-11T15:18:47
113,874,502
0
0
null
null
null
null
UTF-8
Java
false
false
10,053
java
package com.klein.uninet.web.rest; import com.codahale.metrics.annotation.Timed; import com.klein.uninet.domain.PersistentToken; import com.klein.uninet.repository.PersistentTokenRepository; import com.klein.uninet.domain.User; import com.klein.uninet.repository.UserRepository; import com.klein.uninet.security.SecurityUtils; import com.klein.uninet.service.MailService; import com.klein.uninet.service.UserService; import com.klein.uninet.service.dto.UserDTO; import com.klein.uninet.web.rest.errors.*; import com.klein.uninet.web.rest.vm.KeyAndPasswordVM; import com.klein.uninet.web.rest.vm.ManagedUserVM; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.*; import javax.servlet.http.HttpServletRequest; import javax.validation.Valid; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.util.*; /** * REST controller for managing the current user's account. */ @RestController @RequestMapping("/api") public class AccountResource { private final Logger log = LoggerFactory.getLogger(AccountResource.class); private final UserRepository userRepository; private final UserService userService; private final MailService mailService; private final PersistentTokenRepository persistentTokenRepository; public AccountResource(UserRepository userRepository, UserService userService, MailService mailService, PersistentTokenRepository persistentTokenRepository) { this.userRepository = userRepository; this.userService = userService; this.mailService = mailService; this.persistentTokenRepository = persistentTokenRepository; } /** * POST /register : register the user. * * @param managedUserVM the managed user View Model * @throws InvalidPasswordException 400 (Bad Request) if the password is incorrect * @throws EmailAlreadyUsedException 400 (Bad Request) if the email is already used * @throws LoginAlreadyUsedException 400 (Bad Request) if the login is already used */ @PostMapping("/register") @Timed @ResponseStatus(HttpStatus.CREATED) public void registerAccount(@Valid @RequestBody ManagedUserVM managedUserVM) { if (!checkPasswordLength(managedUserVM.getPassword())) { throw new InvalidPasswordException(); } userRepository.findOneByLogin(managedUserVM.getLogin().toLowerCase()).ifPresent(u -> {throw new LoginAlreadyUsedException();}); userRepository.findOneByEmailIgnoreCase(managedUserVM.getEmail()).ifPresent(u -> {throw new EmailAlreadyUsedException();}); User user = userService.registerUser(managedUserVM, managedUserVM.getPassword()); mailService.sendActivationEmail(user); } /** * GET /activate : activate the registered user. * * @param key the activation key * @throws RuntimeException 500 (Internal Server Error) if the user couldn't be activated */ @GetMapping("/activate") @Timed public void activateAccount(@RequestParam(value = "key") String key) { Optional<User> user = userService.activateRegistration(key); if (!user.isPresent()) { throw new InternalServerErrorException("No user was found for this reset key"); } } /** * GET /authenticate : check if the user is authenticated, and return its login. * * @param request the HTTP request * @return the login if the user is authenticated */ @GetMapping("/authenticate") @Timed public String isAuthenticated(HttpServletRequest request) { log.debug("REST request to check if the current user is authenticated"); return request.getRemoteUser(); } /** * GET /account : get the current user. * * @return the current user * @throws RuntimeException 500 (Internal Server Error) if the user couldn't be returned */ @GetMapping("/account") @Timed public UserDTO getAccount() { return userService.getUserWithAuthorities() .map(UserDTO::new) .orElseThrow(() -> new InternalServerErrorException("User could not be found")); } /** * POST /account : update the current user information. * * @param userDTO the current user information * @throws EmailAlreadyUsedException 400 (Bad Request) if the email is already used * @throws RuntimeException 500 (Internal Server Error) if the user login wasn't found */ @PostMapping("/account") @Timed public void saveAccount(@Valid @RequestBody UserDTO userDTO) { final String userLogin = SecurityUtils.getCurrentUserLogin().orElseThrow(() -> new InternalServerErrorException("Current user login not found")); Optional<User> existingUser = userRepository.findOneByEmailIgnoreCase(userDTO.getEmail()); if (existingUser.isPresent() && (!existingUser.get().getLogin().equalsIgnoreCase(userLogin))) { throw new EmailAlreadyUsedException(); } Optional<User> user = userRepository.findOneByLogin(userLogin); if (!user.isPresent()) { throw new InternalServerErrorException("User could not be found"); } userService.updateUser(userDTO.getFirstName(), userDTO.getLastName(), userDTO.getEmail(), userDTO.getLangKey(), userDTO.getImageUrl()); } /** * POST /account/change-password : changes the current user's password * * @param password the new password * @throws InvalidPasswordException 400 (Bad Request) if the new password is incorrect */ @PostMapping(path = "/account/change-password") @Timed public void changePassword(@RequestBody String password) { if (!checkPasswordLength(password)) { throw new InvalidPasswordException(); } userService.changePassword(password); } /** * GET /account/sessions : get the current open sessions. * * @return the current open sessions * @throws RuntimeException 500 (Internal Server Error) if the current open sessions couldn't be retrieved */ @GetMapping("/account/sessions") @Timed public List<PersistentToken> getCurrentSessions() { return persistentTokenRepository.findByUser( userRepository.findOneByLogin(SecurityUtils.getCurrentUserLogin() .orElseThrow(() -> new InternalServerErrorException("Current user login not found"))) .orElseThrow(() -> new InternalServerErrorException("User could not be found")) ); } /** * DELETE /account/sessions?series={series} : invalidate an existing session. * * - You can only delete your own sessions, not any other user's session * - If you delete one of your existing sessions, and that you are currently logged in on that session, you will * still be able to use that session, until you quit your browser: it does not work in real time (there is * no API for that), it only removes the "remember me" cookie * - This is also true if you invalidate your current session: you will still be able to use it until you close * your browser or that the session times out. But automatic login (the "remember me" cookie) will not work * anymore. * There is an API to invalidate the current session, but there is no API to check which session uses which * cookie. * * @param series the series of an existing session * @throws UnsupportedEncodingException if the series couldnt be URL decoded */ @DeleteMapping("/account/sessions/{series}") @Timed public void invalidateSession(@PathVariable String series) throws UnsupportedEncodingException { String decodedSeries = URLDecoder.decode(series, "UTF-8"); SecurityUtils.getCurrentUserLogin() .flatMap(userRepository::findOneByLogin) .ifPresent(u -> persistentTokenRepository.findByUser(u).stream() .filter(persistentToken -> StringUtils.equals(persistentToken.getSeries(), decodedSeries)) .findAny().ifPresent(t -> persistentTokenRepository.delete(decodedSeries))); } /** * POST /account/reset-password/init : Send an email to reset the password of the user * * @param mail the mail of the user * @throws EmailNotFoundException 400 (Bad Request) if the email address is not registered */ @PostMapping(path = "/account/reset-password/init") @Timed public void requestPasswordReset(@RequestBody String mail) { mailService.sendPasswordResetMail( userService.requestPasswordReset(mail) .orElseThrow(EmailNotFoundException::new) ); } /** * POST /account/reset-password/finish : Finish to reset the password of the user * * @param keyAndPassword the generated key and the new password * @throws InvalidPasswordException 400 (Bad Request) if the password is incorrect * @throws RuntimeException 500 (Internal Server Error) if the password could not be reset */ @PostMapping(path = "/account/reset-password/finish") @Timed public void finishPasswordReset(@RequestBody KeyAndPasswordVM keyAndPassword) { if (!checkPasswordLength(keyAndPassword.getNewPassword())) { throw new InvalidPasswordException(); } Optional<User> user = userService.completePasswordReset(keyAndPassword.getNewPassword(), keyAndPassword.getKey()); if (!user.isPresent()) { throw new InternalServerErrorException("No user was found for this reset key"); } } private static boolean checkPasswordLength(String password) { return !StringUtils.isEmpty(password) && password.length() >= ManagedUserVM.PASSWORD_MIN_LENGTH && password.length() <= ManagedUserVM.PASSWORD_MAX_LENGTH; } }
[ "kleiner617@gmail.com" ]
kleiner617@gmail.com
6937856ded098521d4e2288d0ba3bd403b019890
60662555e173a99ef034c9834928ce98831b4fe3
/src/DeleteStudDetails.java
8091de2a8b7782f4f163918663e4e3bd8031c615
[]
no_license
surajkumarsah/Academic_Administration
a09f3cf933589c655b2cdabfe445be7efa5917eb
d289ed119b6000427882abf23911e6f9cbf7b46d
refs/heads/master
2020-05-24T14:28:30.996330
2019-05-18T03:35:38
2019-05-18T03:35:38
187,310,326
0
0
null
null
null
null
UTF-8
Java
false
false
16,670
java
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import javax.swing.JOptionPane; import net.proteanit.sql.DbUtils; /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * * @author SURAJ KUMAR */ public class DeleteStudDetails extends javax.swing.JFrame { Connection conn = null; ResultSet rs; PreparedStatement pst; /** * Creates new form DeleteStudDetails */ public DeleteStudDetails() { initComponents(); conn = MySQLConnection.mySqlConnection(); } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jScrollPane2 = new javax.swing.JScrollPane(); jPanel1 = new javax.swing.JPanel(); jTextField1 = new javax.swing.JTextField(); jScrollPane1 = new javax.swing.JScrollPane(); jTable1 = new javax.swing.JTable(); jLabel1 = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jButton2 = new javax.swing.JButton(); jButton3 = new javax.swing.JButton(); jPanel3 = new javax.swing.JPanel(); jButton1 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setBackground(new java.awt.Color(255, 255, 255)); jPanel1.setBackground(new java.awt.Color(204, 204, 204)); jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true), "Search Student", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Calibri Light", 0, 24))); // NOI18N jTable1.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); jScrollPane1.setViewportView(jTable1); jLabel1.setFont(new java.awt.Font("Times New Roman", 0, 18)); // NOI18N jLabel1.setForeground(new java.awt.Color(51, 102, 0)); jLabel1.setText("REGISTRATION NO.**"); jPanel2.setBackground(new java.awt.Color(102, 102, 102)); jButton2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Icon1320.png"))); // NOI18N jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jButton3.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Icon20.png"))); // NOI18N jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton3ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap(14, Short.MAX_VALUE) .addComponent(jButton2) .addGap(18, 18, 18) .addComponent(jButton3) .addContainerGap()) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton2) .addComponent(jButton3)) .addGap(28, 28, 28)) ); jPanel3.setBackground(new java.awt.Color(102, 102, 102)); jButton1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/Icon420.png"))); // NOI18N jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addContainerGap() .addComponent(jButton1) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addContainerGap() .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 29, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(47, 47, 47) .addComponent(jLabel1) .addGap(27, 27, 27) .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 182, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(29, 29, 29) .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(25, 25, 25) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 656, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addContainerGap()) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1))) .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(41, 41, 41) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 60, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 72, Short.MAX_VALUE) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); jScrollPane2.setViewportView(jPanel1); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(39, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); pack(); }// </editor-fold>//GEN-END:initComponents private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed // TODO add your handling code here: try{ String reg = jTextField1.getText(); String str = "Select name as NAME ,roll as ROLL,branch as BRANCH,session as SESSION from student natural join studacdetails where reg = '"+reg+"' "; pst = conn.prepareStatement(str); rs = pst.executeQuery(); jTable1.setModel(DbUtils.resultSetToTableModel(rs)); } catch(Exception e){ JOptionPane.showMessageDialog(null, e); } finally{ try{ rs.close(); pst.close(); } catch(Exception e){ JOptionPane.showMessageDialog(null, e); } } }//GEN-LAST:event_jButton1ActionPerformed private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed // TODO add your handling code here: deleteStud(); deleteAddress(); deleteStud1(); deleteMarks(); }//GEN-LAST:event_jButton2ActionPerformed private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed // TODO add your handling code here: setVisible(false); Action ob = new Action(); ob.setVisible(true); }//GEN-LAST:event_jButton3ActionPerformed public void deleteStud(){ try{ String reg = jTextField1.getText(); String str = "delete from student where reg = '"+reg+"' "; pst = conn.prepareStatement(str); //pst.setString(1, jTextField1.getText()); pst.executeUpdate(); JOptionPane.showMessageDialog(null, "Details of Student is Deleted.."); } catch(Exception e){ JOptionPane.showMessageDialog(null, e); } finally{ try{ rs.close(); pst.close(); } catch(Exception e){ JOptionPane.showMessageDialog(null, e); } } } public void deleteStud1(){ try{ String reg = jTextField1.getText(); String str = "delete from studacdetails where reg = '"+reg+"' "; pst = conn.prepareStatement(str); //pst.setString(1, jTextField1.getText()); pst.executeUpdate(); JOptionPane.showMessageDialog(null, "Academic Details of Student is Deleted.."); } catch(Exception e){ JOptionPane.showMessageDialog(null, e); } finally{ try{ rs.close(); pst.close(); } catch(Exception e){ JOptionPane.showMessageDialog(null, e); } } } public void deleteMarks(){ try{ String reg = jTextField1.getText(); String str = "delete from studmarks where reg = '"+reg+"' "; pst = conn.prepareStatement(str); //pst.setString(1, jTextField1.getText()); pst.executeUpdate(); JOptionPane.showMessageDialog(null, "Marks of Student is Deleted.."); } catch(Exception e){ JOptionPane.showMessageDialog(null, e); } finally{ try{ rs.close(); pst.close(); } catch(Exception e){ JOptionPane.showMessageDialog(null, e); } } } public void deleteAddress(){ try{ String reg = jTextField1.getText(); String str = "delete from studadddetails where reg = '"+reg+"' "; pst = conn.prepareStatement(str); //pst.setString(1, jTextField1.getText()); pst.executeUpdate(); JOptionPane.showMessageDialog(null, "Contact Details of Student is Deleted.."); } catch(Exception e){ JOptionPane.showMessageDialog(null, e); } finally{ try{ rs.close(); pst.close(); } catch(Exception e){ JOptionPane.showMessageDialog(null, e); } } } /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) "> /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html */ try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(DeleteStudDetails.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(DeleteStudDetails.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(DeleteStudDetails.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(DeleteStudDetails.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new DeleteStudDetails().setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jButton1; private javax.swing.JButton jButton2; private javax.swing.JButton jButton3; private javax.swing.JLabel jLabel1; private javax.swing.JPanel jPanel1; private javax.swing.JPanel jPanel2; private javax.swing.JPanel jPanel3; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JScrollPane jScrollPane2; private javax.swing.JTable jTable1; private javax.swing.JTextField jTextField1; // End of variables declaration//GEN-END:variables }
[ "surajkumarsah165@gmail.com" ]
surajkumarsah165@gmail.com
c44326c5d8100054f6607755b2690f91ba9bb4e7
1daf3f9be3170259ede9a147ca216a2adfb73eb6
/src/ch04/IString.java
fd6edf5e0fad26d98385540b9b84b37dec7f43ff
[]
no_license
nine9nine99/datastructure_java
e1cccc54c4ee39df4f01fdee7e8f7de7046b6c74
a75fbf180a73b7ac9af040e1e275ee63019c7d1a
refs/heads/master
2022-11-23T03:59:32.022995
2020-07-29T08:28:02
2020-07-29T08:28:02
276,895,240
0
0
null
2020-07-04T09:18:23
2020-07-03T12:31:19
Java
UTF-8
Java
false
false
435
java
package ch04; public interface IString { public void clear(); public boolean isEmpty(); public int length(); public char charAt(int index); public IString substring(int begin, int end); public IString insert(int offset, IString str); public IString delete(int begin, int end); public IString concat(IString str); public int compareTo(IString str); public int indexOf(IString str, int begin); }
[ "d404d@users.noreply.github.com" ]
d404d@users.noreply.github.com
95a75e886e8be7939386a64f36ddd36b79fa6b52
4e3f772ad0e31ce91870e86147654794f0035dd4
/src/collectionL/itheima05/ListDemo.java
5970f8b2e2529f0f60b163ed2945bb89fda3a3f3
[]
no_license
a1837075/demo
a27e91b860dbd4e1ab9b05f7f1e329c1eb09c721
8bde09f1480056f00a72496c903c22bc487bf70a
refs/heads/master
2022-12-31T19:27:12.940667
2020-10-21T13:45:42
2020-10-21T13:45:42
293,812,101
0
0
null
null
null
null
UTF-8
Java
false
false
1,260
java
package collectionL.itheima05; import java.util.ArrayList; import java.util.List; /** List: 有序的(储存和读取的顺序是一致的) 有整数索引 允许重复的 List的特有功能: void add(int index,E element) E get(int index) E remove(int index) E set(int index,E element) 增删改查 */ public class ListDemo { public static void main(String[] args) { //创建的列表对象 List list=new ArrayList(); //void add(int index,E element) :在指定索引位置添加指定元素 list.add(0,"hello"); list.add(0,"world"); list.add(1,"java"); //E get(int index) 根据索引返回元素 /*System.out.println(list.get(0)); System.out.println(list.get(1)); System.out.println(list.get(2));*/ /*for (int i=0;i<list.size();i++){ System.out.println(list.get(i)); }*/ //E remove(int index) :删除指定元素并返回 //System.out.println(list.remove(0)); //E set(int index,E element) 将指定索引位置的元素替换为指定元素,并将原先的元素返回 //System.out.println(list.set(0,"adnroid")); System.out.println(list); } }
[ "248739864@qq.com" ]
248739864@qq.com
e47f00f0fc6654cf3181ae48861bb437ac77bd0e
563402bb4602fce344a09434aa365d89aa427f28
/arconnor/WEB-INF/classes/it/bma/servizi/BmaAllegati.java
d8cb1d53fbfe1780141b9a24e7f75a0d4288f111
[]
no_license
BackupTheBerlios/warconnor
4b95fa5c0e842ddc8241de91e3dbf8b02f648a3c
83d53b98ec3ec4857f1f582733dc82f59aea0404
refs/heads/master
2020-08-05T02:45:17.574148
2004-05-07T06:34:53
2004-05-07T06:34:53
40,247,114
0
0
null
null
null
null
UTF-8
Java
false
false
1,420
java
package it.bma.servizi; import it.bma.comuni.*; import it.bma.web.*; import java.util.*; public class BmaAllegati extends BmaServizio { public BmaAllegati() { super(); } public String esegui(BmaJdbcTrx trx) throws BmaException { BmaGestoreProdotto gp = new BmaGestoreProdotto(); gp.jModel = jModel; String nomeTabella = "PD_PRODALLEGATI"; String tipoAzione = input.getInfoServizio("TipoAzione"); if (tipoAzione.trim().length()==0) tipoAzione = BMA_SQL_SELECT; BmaDataTable tabella = jModel.getDataTable(nomeTabella); if (tabella==null) throw new BmaException(BMA_ERR_WEB_PARAMETRO,"Riferimento errato a tabella: " + nomeTabella,"",this); applicaStandardDati(tabella); Vector dati; String sql = ""; Hashtable filtri = input.getInfoServizio().getStringTable(); filtri.put("COD_SOCIETA", input.getSocieta()); if (tipoAzione.equals(BMA_SQL_SELECT)) { BmaDataColumn c = tabella.getColonna("COD_TIPOALLEGATO"); c.setTipoControllo(BMA_CONTROLLO_LISTA); c.setValoriControllo(gp.valoriTipiAllegato(trx, input.getSocieta()).getStringTable()); sql = tabella.getSqlLista(input.getInfoServizio().getStringTable()); dati = trx.eseguiSqlSelect(sql); BmaDataList elenco = new BmaDataList(tabella, dati); return elenco.toXml(); } else { gp.eseguiAggiorna(trx, tabella, tipoAzione, filtri); return ""; } } public String getChiave() { return null; } protected String getXmlTag() { return null; } }
[ "ralbertoni" ]
ralbertoni
738686da8284e525db9fa274686e05d349830659
82ada8f2b9753c7d97d720b396c6bda044fdf988
/base-framework/src/main/java/com/lnr/android/base/framework/ui/control/view/recyclerview/OnViewPagerListener.java
a74cb353fd954db4d6da4a86447c952acc8b68bc
[]
no_license
xyyou123/dingtai-base-framework
f0dc377647b92df15c0d3f66942c5582eaefe506
c983c4d9c4e8456c5dec9681ee347f0f2cfb484c
refs/heads/master
2022-04-23T16:03:40.978218
2020-04-19T19:43:42
2020-04-19T19:44:12
257,085,196
0
0
null
null
null
null
UTF-8
Java
false
false
509
java
package com.lnr.android.base.framework.ui.control.view.recyclerview; /** * Created by 钉某人 * github: https://github.com/DingMouRen * email: naildingmouren@gmail.com * 用于ViewPagerLayoutManager的监听 */ public interface OnViewPagerListener { /*初始化完成*/ void onInitComplete(); /*释放的监听*/ void onPageRelease(boolean isNext, int position); /*选中的监听以及判断是否滑动到底部*/ void onPageSelected(int position, boolean isBottom); }
[ "zndx0502050105@163.com" ]
zndx0502050105@163.com
5c4cbb38f9b7430ea77f4db6b13d0abe3ecc3ea7
f3fed10a1429877eba7834365c88e6fd7a2aaa5a
/Spring Data II/DojoOverflow/src/main/java/com/codingdojo/overflow/services/TagService.java
d6d8d850b8dae6e38deabeec56a0be134b98dfed
[]
no_license
sahar-murrar/Java_Stack
ead0004fc0385c8d1234448323c4d485662c54e3
cbee1b2867bca8adfdf07f1cb3ce38d1066cc410
refs/heads/main
2023-06-09T05:52:34.299878
2021-06-29T18:54:33
2021-06-29T18:54:33
375,152,809
0
0
null
null
null
null
UTF-8
Java
false
false
991
java
package com.codingdojo.overflow.services; import java.util.List; import org.springframework.stereotype.Service; import com.codingdojo.overflow.models.Tag; import com.codingdojo.overflow.repositories.QuestionRepository; import com.codingdojo.overflow.repositories.TagRepository; @Service public class TagService { private final TagRepository tagRepository; private final QuestionRepository questionRepository; public TagService(TagRepository tagRepository, QuestionRepository questionRepository) { this.tagRepository = tagRepository; this.questionRepository = questionRepository; } public Tag craeteTag(Tag t) { List<Tag> allTags = findAll(); if (!allTags.contains(t)) { return tagRepository.save(t); } return t; } public Tag findTag(Long id) { return tagRepository.findById(id).orElse(null); } public List<Tag> findAll() { return tagRepository.findAll(); } public Tag findBySubject(String subject) { return tagRepository.findBySubject(subject); } }
[ "murrarsahar@gmail.com" ]
murrarsahar@gmail.com
726acf3a1bc2fc08981a1aae3bae5e5d434dc7ad
24487cdfa5a41d5a5c969ba5002cb49454ff8420
/src/main/java/com/jgw/supercodeplatform/trace/common/util/WriteSheet.java
9aeb8476e2e4702dd84322604706c8abbfbac44b
[]
no_license
jiangtingfeng/tttttttttttttttttttttttttttttttttttttt
3d85a515c5d229d6b6d44bcab93a1ba24cb162a9
7f7dee932a084d54c469d24792e2b3429379a9d9
refs/heads/master
2022-10-09T06:02:47.823332
2019-07-03T10:56:07
2019-07-03T10:56:07
197,173,501
0
0
null
2022-10-04T23:53:25
2019-07-16T10:33:04
Java
UTF-8
Java
false
false
156
java
package com.jgw.supercodeplatform.trace.common.util; import jxl.write.WritableSheet; public interface WriteSheet { void write(WritableSheet sheet); }
[ "wangzhaoqing@app315.net" ]
wangzhaoqing@app315.net
6b58c906884f5cde9fb2fc8b23a002815ff03f3f
7b2d653a2caec2cba1b95559e9456101c82d8fa6
/workspace/Abdacky 8.3/src/MasterController.java
3d0c77830bc57d80abbe66e0be374a9ff37e78cb
[]
no_license
jackyzou/Java-Workspace
39585009707d335f35423077bd6387e02cc9065c
035e2983d8ab38e9877ea6513c86e630e2dd2e6a
refs/heads/master
2021-05-02T14:44:52.851620
2018-02-08T07:00:45
2018-02-08T07:00:45
120,723,647
0
0
null
null
null
null
UTF-8
Java
false
false
4,398
java
import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.io.PrintWriter; import java.io.Reader; import java.util.ArrayList; import java.util.Scanner; import java.util.StringTokenizer; public class MasterController { private static double ballance; private static double deposit; private static double withdrawl; private static String username; private static String password; private static String email; private static String phoneN; private static String fileName; private static String dateA; private static HomePage home; private static EditProfile edit; private static transferA t; private static Date dateObject; public static PrintWriter print; private static ManagerAccount manager = new ManagerAccount(); public MasterController() { setupPage setup = new setupPage(); setup.setVisible(true); home = new HomePage(); edit = new EditProfile(); t = new transferA(); home.setVisible(false); edit.setVisible(false); t.setVisible(false);; manager.setVisible(false); } public static void inSetup(double b, String u, String p, String e, String f) { ballance = b; username = u; password = p; email = e; phoneN = f; WriteInfo(); } public static void inPChange(String u, String p, String e, String ph) { username = u; password = p; email = e; phoneN = ph; } public static void inFChange(double d, double w) { deposit = d; withdrawl = w; ballance = deposit - withdrawl; System.out.println("deposit is: " + deposit); System.out.println("withdrawl is: " + withdrawl); System.out.println("ballance is: " + ballance); } public static void inBallance(double b) { ballance = b; } public static void outHomeP() { WriteInfo(); edit.setVisible(false); home.setVisible(true); home.changeUserName(username); home.changeEmail(email); home.changePhoneNumber(phoneN); } public static void outHomeB() { edit.setVisible(false); home.setVisible(true); home.changeBallance(ballance, deposit, withdrawl); } public static void openEdit() { edit.setVisible(true); } public static void openHomeCloseEdit() { home.setVisible(true); edit.setVisible(false); } public static void openManagerAccount() { home.setVisible(false); edit.setVisible(false); manager.setVisible(true); } public static void doLoan(double total) { home.setVisible(true); edit.setVisible(false); home.homeLoan(total); } public static void openTransfer() { t.setVisible(true); edit.setVisible(false); t.changeStuff(username, ballance); } public static void openDate() { dateObject = new Date(); } public static void inDate(String dateB) { dateA = dateB; dateObject.dispose(); transferA.showDate(dateB); } public static void doTransfer(double amount, String ID) { home.doHomeTransfer(dateA, amount, ID); t.changeStuff(username, ballance); } public static void printInfo() { System.out.println("ballance is " + ballance); System.out.println("username is " + username); System.out.println("email is " + email); System.out.println("phoneN is " + phoneN); } public static void WriteInfo() { try { // Create file FileWriter fstream = new FileWriter(username+".txt"); BufferedWriter out = new BufferedWriter(fstream); out.write(email + "\n"); out.write(ballance + "\n"); out.write(phoneN+ "\n"); out.write(password+ "\n"); out.close(); //Close the output stream } catch (Exception e) //Catch exception if any { System.err.println("Error: " + e.getMessage()); } } public static void ReadInfo() throws Exception { FileReader fstream = new FileReader(username+".txt"); BufferedReader in = new BufferedReader(fstream); Scanner scan = new Scanner(in); String s = ""; while(scan.hasNext()) { s += scan.next() + ";"; } String delim = ";"; StringTokenizer t = new StringTokenizer(s,delim); ArrayList <String> list = new ArrayList<String>(); while(t.hasMoreTokens()) { list.add(t.nextToken()); } System.out.println(list); System.out.print(s); manager.sendList(list); in.close(); scan.close(); } }
[ "zoujiaqijacky@foxmail.com" ]
zoujiaqijacky@foxmail.com
bd4849a219e37939fb688e245e19f728118520ac
82d356e80f18dd7a356eb68b88c7fe4623bb70af
/apps/MicroBenchmarkTwo/app/src/test/java/edu/washington/cs/nl35/microbenchmarktwo/ExampleUnitTest.java
3af0e57a62583b564857cfd28e4bfe0390e82c5f
[]
no_license
SugarsL/marvin-code
4aa7e58795e262cac317b4e42f6c21e8e1dafb3e
c64b4261184fe51b07e256e70b6515dab7644fcc
refs/heads/master
2022-03-27T05:29:19.589410
2020-01-09T18:41:20
2020-01-09T18:41:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
401
java
package edu.washington.cs.nl35.microbenchmarktwo; 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); } }
[ "nl35@cs.washington.edu" ]
nl35@cs.washington.edu
1d40fd20a49ea515dfbdd05b6aea9b93f08aafb9
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/22/22_3111015e646279ed8b42c0ddc008c419740aafcf/ModuleDeclarativeUIPreProcessor/22_3111015e646279ed8b42c0ddc008c419740aafcf_ModuleDeclarativeUIPreProcessor_t.java
e7f01bf43573701749c0e0fb95a2f23d8296f828
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,826
java
/* * Copyright 2009 Sysmap Solutions Software e Consultoria Ltda. * * 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 br.com.sysmap.crux.tools.compile; import java.io.File; import java.io.IOException; import java.net.URL; import br.com.sysmap.crux.classpath.URLResourceHandlersRegistry; import br.com.sysmap.crux.core.client.screen.InterfaceConfigException; import br.com.sysmap.crux.core.rebind.module.Module; import br.com.sysmap.crux.tools.compile.preprocessor.AbstractDeclarativeUIPreProcessor; /** * @author Thiago da Rosa de Bustamante * */ public class ModuleDeclarativeUIPreProcessor extends AbstractDeclarativeUIPreProcessor { private Module module; @Override public URL preProcess(URL url, Module module) throws IOException, InterfaceConfigException { this.module = module; return super.preProcess(url, module); } @Override protected File getDestDir(URL urlFile) throws IOException { File parentDir = outputDir; if(!outputDir.exists()) { outputDir.mkdirs(); } String outputPath = outputDir.getCanonicalPath(); outputPath = outputPath.replaceAll("[\\\\]", "/"); String originalModulePath = urlFile.toString(); URL moduleRoot = module.getDescriptorURL(); moduleRoot = URLResourceHandlersRegistry.getURLResourceHandler(moduleRoot.getProtocol()).getParentDir(moduleRoot); String moduleRootString = moduleRoot.toString(); if (moduleRootString.endsWith("/")) { moduleRootString = moduleRootString.substring(0, moduleRootString.length()-1); } for (String publicPath : module.getPublicPaths()) { int indexOfDirStruct = originalModulePath.indexOf(moduleRootString+"/"+publicPath); if(indexOfDirStruct >= 0) { String fileRelativePath = originalModulePath.substring(indexOfDirStruct + (moduleRootString+"/"+publicPath).length()); fileRelativePath = fileRelativePath.substring(0, fileRelativePath.lastIndexOf("/")); fileRelativePath = fileRelativePath.startsWith("/") ? fileRelativePath.substring(1) : fileRelativePath; parentDir = new File(outputPath + "/" + module.getName() + "/" + fileRelativePath + "/"); } } return parentDir; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
aa3f436a25b42d7c24d0251d1ea8505195c4e065
0647568a3f5915a4643635a3c8bd9a276409498f
/teleoperation/src/main/java/eu/gloria/gs/services/teleoperation/fw/operations/SelectFilterOperation.java
fd3dce7a85c3fc87319327b5bdf3b0931ab62772
[]
no_license
fserena/GLORIAServices
1aebdd198458c6d157951860aba3a249148bd517
d587a98a3c50032cef47e5bce9e8a8d6fddfa47f
refs/heads/master
2020-04-06T03:33:35.223366
2014-05-29T14:20:31
2014-05-29T14:20:31
9,467,709
1
1
null
2014-05-29T14:20:31
2013-04-16T08:14:55
Java
UTF-8
Java
false
false
741
java
package eu.gloria.gs.services.teleoperation.fw.operations; import eu.gloria.gs.services.teleoperation.base.OperationArgs; import eu.gloria.gs.services.teleoperation.base.OperationReturn; import eu.gloria.gs.services.teleoperation.base.TeleoperationException; import eu.gloria.rti.client.devices.FilterWheel; public class SelectFilterOperation extends FilterWheelOperation { private String filter; public SelectFilterOperation(OperationArgs args) throws Exception { super(args); this.filter = (String) args.getArguments().get(2); } @Override protected void operateFilterWheel(FilterWheel filterWheel, OperationReturn returns) throws TeleoperationException { filterWheel.selectFilter(filter); } }
[ "fserena@ciclope.info" ]
fserena@ciclope.info
0a5806eb138f29eef8ef5405d248b1c27cca6528
b884aa6060b5a68c7043b4a4ca419fa9a8f2aabd
/src/pt/foundthat/view/FrmConfigSala.java
331b3c70bd8a9b054ba242ad14e44cde6e973bc5
[]
no_license
joaorafaelsantos/found_that
f4f9587157ca72ab3d44f3e5e2bdc906b47cf789
37aea53f802b8f36aede245bcb51278d2099e812
refs/heads/master
2021-09-10T10:07:25.337194
2018-03-24T11:45:51
2018-03-24T11:45:51
null
0
0
null
null
null
null
ISO-8859-1
Java
false
false
10,831
java
package pt.foundthat.view; import java.awt.Color; import java.awt.EventQueue; import java.awt.Font; import java.awt.Toolkit; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.WindowAdapter; import java.awt.event.WindowEvent; import java.util.Collections; import javax.swing.DefaultListModel; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JList; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTextField; import javax.swing.ListSelectionModel; import javax.swing.border.EmptyBorder; import javax.swing.border.LineBorder; import pt.foundthat.controller.FoundThat; import pt.foundthat.controller.ManagerSala; import pt.foundthat.model.Sala; public class FrmConfigSala extends JFrame { /** * */ private static final long serialVersionUID = 1L; private JPanel contentPane; private JTextField txtSala; @SuppressWarnings("unused") private JTextField textField; static DefaultListModel<String> dlm; @SuppressWarnings("rawtypes") static JList list; /** * Launch the application. */ public static void main(String[] args) { EventQueue.invokeLater(new Runnable() { public void run() { try { FrmConfigSala frame = new FrmConfigSala(); frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); } /** * Create the frame. */ @SuppressWarnings({ "unchecked", "rawtypes" }) public FrmConfigSala() { setResizable(false); //OPCOES MESSAGEBOX(SIM/NÃO) String[] opcoes = new String[2]; opcoes[0] = new String("Sim"); opcoes[1] = new String("Não"); setIconImage(Toolkit.getDefaultToolkit().getImage(FrmConfigSala.class.getResource("/pt/foundthat/resources/lupa.png"))); setTitle("Gest\u00E3o de Salas - FoundThat"); setBounds(100, 100, 462, 300); this.setLocationRelativeTo(null); this.addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { int selectedOption = JOptionPane.showOptionDialog(null, "Deseja sair da aplicação?", "AVISO! - FoundThat", 0, JOptionPane.INFORMATION_MESSAGE, null, opcoes, null); if (selectedOption == JOptionPane.YES_OPTION) { try { FoundThat.gravarFicheiro(); dispose(); } catch (Exception e1) { // TODO Auto-generated catch block e1.printStackTrace(); } } else { setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); } } }); contentPane = new JPanel(); contentPane.setBackground(new Color(255, 255, 255)); contentPane.setBorder(new EmptyBorder(5, 5, 5, 5)); setContentPane(contentPane); contentPane.setLayout(null); txtSala = new JTextField(); txtSala.setForeground(new Color(25, 25, 112)); txtSala.setBorder(new LineBorder(new Color(128, 128, 128))); txtSala.setBackground(new Color(220, 220, 220)); txtSala.setBounds(247, 79, 106, 23); contentPane.add(txtSala); txtSala.setColumns(10); //LISTA COM SALAS dlm = new DefaultListModel<String>(); refresh(); list = new JList(dlm); list.setForeground(new Color(25, 25, 112)); list.setSelectedIndex(0); if (list.getSelectedIndex() != -1) { txtSala.setText(list.getSelectedValue().toString()); } list.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { if (list.getSelectedIndex() != -1) { txtSala.setText(list.getSelectedValue().toString()); } } }); JScrollPane listScroller = new JScrollPane(list); list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); list.setBorder(null); list.setBackground(new Color(220, 220, 220)); listScroller.setBounds(109, 36, 60, 228); contentPane.add(listScroller); //ADICIONAR SALA JButton btnAdicionar = new JButton("Adicionar"); btnAdicionar.setBorder(null); btnAdicionar.addMouseListener(new MouseAdapter() { @Override public void mouseEntered(MouseEvent e) { btnAdicionar.setBackground(new Color(210, 105, 30)); } @Override public void mouseExited(MouseEvent e) { btnAdicionar.setBackground(new Color(25, 25, 112)); } }); btnAdicionar.setFont(new Font("Myriad Pro", Font.PLAIN, 18)); btnAdicionar.setForeground(new Color(255, 255, 255)); btnAdicionar.setBackground(new Color(25, 25, 112)); btnAdicionar.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { if (txtSala.getText().toUpperCase().equals("")) { JOptionPane.showMessageDialog(null, "Introduza uma sala!", "AVISO! - FoundThat", JOptionPane.INFORMATION_MESSAGE);; } else { if (ManagerSala.adicionarSala(txtSala.getText().toUpperCase()) == false) { JOptionPane.showMessageDialog(null, "A sala " + txtSala.getText().toUpperCase() + " já existe!", "AVISO! - FoundThat", JOptionPane.INFORMATION_MESSAGE);; } else { JOptionPane.showMessageDialog(null, "A sala " + txtSala.getText().toUpperCase() + " foi adicionada!", "AVISO! - FoundThat", JOptionPane.INFORMATION_MESSAGE);; refresh(); } } } }); btnAdicionar.setBounds(247, 113, 106, 23); contentPane.add(btnAdicionar); //ALTERAR SALA JButton btnAlterar = new JButton("Alterar"); btnAlterar.setBorder(null); btnAlterar.addMouseListener(new MouseAdapter() { @Override public void mouseEntered(MouseEvent e) { btnAlterar.setBackground(new Color(210, 105, 30)); } @Override public void mouseExited(MouseEvent e) { btnAlterar.setBackground(new Color(25, 25, 112)); } }); btnAlterar.setFont(new Font("Myriad Pro", Font.PLAIN, 18)); btnAlterar.setForeground(new Color(255, 255, 255)); btnAlterar.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (list.getSelectedIndex() != -1) { if (list.getSelectedValue().equals(txtSala.getText().toUpperCase())) { JOptionPane.showMessageDialog(null, "A sala " + txtSala.getText().toUpperCase() + " já existe!", "AVISO! - FoundThat", JOptionPane.INFORMATION_MESSAGE);; } else if (txtSala.getText().equals("")) { JOptionPane.showMessageDialog(null, "Introduza uma sala!", "AVISO! - FoundThat", JOptionPane.INFORMATION_MESSAGE);; } else { int selectedOption = JOptionPane.showOptionDialog(null, "Deseja alterar a sala " + list.getSelectedValue().toString() + " pela sala " + txtSala.getText() + "?", "AVISO! - FoundThat", 0, JOptionPane.INFORMATION_MESSAGE, null, opcoes, null); if (selectedOption == JOptionPane.YES_OPTION) { if (ManagerSala.alterarSala(txtSala.getText().toUpperCase(), list.getSelectedValue().toString()) == true) { JOptionPane.showMessageDialog(null, "A sala foi alterada!", "AVISO! - FoundThat", JOptionPane.INFORMATION_MESSAGE);; refresh(); } else { JOptionPane.showMessageDialog(null, "A sala " + txtSala.getText().toUpperCase() + " já existe!", "AVISO! - FoundThat", JOptionPane.INFORMATION_MESSAGE);; } } } } else { JOptionPane.showMessageDialog(null, "Selecione uma sala!", "AVISO! - FoundThat", JOptionPane.INFORMATION_MESSAGE);; } } }); btnAlterar.setBackground(new Color(25, 25, 112)); btnAlterar.setBounds(247, 143, 106, 23); contentPane.add(btnAlterar); //REMOVER SALA JButton btnRemover = new JButton("Remover"); btnRemover.setBorder(null); btnRemover.addMouseListener(new MouseAdapter() { @Override public void mouseEntered(MouseEvent e) { btnRemover.setBackground(new Color(210, 105, 30)); } @Override public void mouseExited(MouseEvent e) { btnRemover.setBackground(new Color(25, 25, 112)); } }); btnRemover.setFont(new Font("Myriad Pro", Font.PLAIN, 18)); btnRemover.setForeground(new Color(255, 255, 255)); btnRemover.setBackground(new Color(25, 25, 112)); btnRemover.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { if (list.getSelectedIndex() != -1) { int selectedOption = JOptionPane.showOptionDialog(null, "Deseja remover a sala " + list.getSelectedValue().toString() + "?", "AVISO! - FoundThat", 0, JOptionPane.INFORMATION_MESSAGE, null, opcoes, null); if (selectedOption == JOptionPane.YES_OPTION) { if (ManagerSala.removerSala(txtSala.getText().toUpperCase()) == false) { String salaRemovida = list.getSelectedValue().toString(); JOptionPane.showMessageDialog(null, "A sala " + salaRemovida + " foi removida!", "AVISO! - FoundThat", JOptionPane.INFORMATION_MESSAGE);; refresh(); } } } else { JOptionPane.showMessageDialog(null, "Selecione uma sala!", "AVISO! - FoundThat", JOptionPane.INFORMATION_MESSAGE);; } } }); btnRemover.setBounds(247, 171, 106, 23); contentPane.add(btnRemover); //SAIR JButton btnSair = new JButton("Sair"); btnSair.setBorder(null); btnSair.addMouseListener(new MouseAdapter() { @Override public void mouseEntered(MouseEvent e) { btnSair.setBackground(new Color(210, 105, 30)); } @Override public void mouseExited(MouseEvent e) { btnSair.setBackground(new Color(25, 25, 112)); } }); btnSair.setFont(new Font("Myriad Pro", Font.PLAIN, 18)); btnSair.setForeground(new Color(255, 255, 255)); btnSair.setBackground(new Color(25, 25, 112)); btnSair.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { try { FoundThat.gravarFicheiro(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } this.setVisible(false); dispose(); new FrmMain().setVisible(true); } private void setVisible(boolean b) { // TODO Auto-generated method stub } }); btnSair.setBounds(247, 200, 106, 23); contentPane.add(btnSair); JLabel lblSala = new JLabel("Sala"); lblSala.setForeground(new Color(25, 25, 112)); lblSala.setFont(new Font("Myanmar Text", Font.PLAIN, 16)); lblSala.setBounds(206, 83, 46, 19); contentPane.add(lblSala); JLabel lblSalas = new JLabel("Salas"); lblSalas.setForeground(new Color(25, 25, 112)); lblSalas.setFont(new Font("Myanmar Text", Font.PLAIN, 16)); lblSalas.setBounds(121, 11, 46, 34); contentPane.add(lblSalas); } public static void refresh() { Collections.sort(FoundThat.salas); dlm.clear(); for (Sala s : FoundThat.salas) { dlm.addElement(s.toString()); } } }
[ "noreply@github.com" ]
noreply@github.com
a9630888872e147732a6cca4b43ab7441e2745f9
7f38fe2262b64f0e3dd19106a652c44114cf0f83
/src/humide/Test.java
dc8ba2f82d957564378f350c9608ca17ec9ea4ca
[]
no_license
ndeyenenedieye/humidite-avec-observateur
2653e5da35d6134911c07b0686e668949809e5c8
40bd852405531e1f600f03c1e993e321d193048f
refs/heads/master
2020-06-09T01:58:30.180549
2019-06-23T13:00:55
2019-06-23T13:00:55
193,348,361
0
0
null
null
null
null
UTF-8
Java
false
false
532
java
package humide; public class Test { private static final String bar = null; Abstraithumide t =new thermometre(); Barometre b = new Barometre(); int i=0; ConsoleTemp cons = new ConsoleTemp((thermometre)t); ConsoleHum consHum= new ConsoleHum(bar); journal jour = new journal((designPull.thermometre) t.abonner(cons); t.abonner(jour); bar.abonner(consHum); bar.abonner(jour); while(true){ i++; ((designPull.thermometre)t).setTemperature(i); bar.setHumidite(2+i); if(i>=25000) t.desabonner(cons); } } }
[ "ndeyenenedieye@gmail.com" ]
ndeyenenedieye@gmail.com
917b4708a83f30d329c3e4029f1af6872d25d954
beffc6542dc4bf85946ceca7cca4a31ac230d376
/spring-boot-project/spring-boot-cli/src/main/java/org/springframework/boot/cli/app/SpringApplicationLauncher.java
76bfa1d54b425071efa934a3335aaffc4d0bd6ef
[ "Apache-2.0" ]
permissive
ZhouKaiDongGitHub/spring-boot-2.0.x
4395970b183eff7321748d4ad0155784aa94eaa6
3f443764747c4ee01085bed6381292fa44744a49
refs/heads/master
2023-01-07T07:27:51.067468
2020-09-13T07:13:04
2020-09-13T07:13:04
215,676,265
1
0
Apache-2.0
2022-12-27T14:52:46
2019-10-17T01:24:02
Java
UTF-8
Java
false
false
3,210
java
/* * Copyright 2012-2019 the original author or authors. * * 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 * * https://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.springframework.boot.cli.app; import java.lang.reflect.Constructor; import java.lang.reflect.Method; import java.util.HashMap; import java.util.Map; /** * A launcher for {@code SpringApplication} or a {@code SpringApplication} subclass. The * class that is used can be configured using the System property * {@code spring.application.class.name} or the {@code SPRING_APPLICATION_CLASS_NAME} * environment variable. Uses reflection to allow the launching code to exist in a * separate ClassLoader from the application code. * * @author Andy Wilkinson * @since 1.2.0 * @see System#getProperty(String) * @see System#getenv(String) */ public class SpringApplicationLauncher { private static final String DEFAULT_SPRING_APPLICATION_CLASS = "org.springframework.boot.SpringApplication"; private final ClassLoader classLoader; /** * Creates a new launcher that will use the given {@code classLoader} to load the * configured {@code SpringApplication} class. * @param classLoader the {@code ClassLoader} to use */ public SpringApplicationLauncher(ClassLoader classLoader) { this.classLoader = classLoader; } /** * Launches the application created using the given {@code sources}. The application * is launched with the given {@code args}. * @param sources the sources for the application * @param args the args for the application * @return the application's {@code ApplicationContext} * @throws Exception if the launch fails */ public Object launch(Class<?>[] sources, String[] args) throws Exception { Map<String, Object> defaultProperties = new HashMap<>(); defaultProperties.put("spring.groovy.template.check-template-location", "false"); Class<?> applicationClass = this.classLoader.loadClass(getSpringApplicationClassName()); Constructor<?> constructor = applicationClass.getConstructor(Class[].class); Object application = constructor.newInstance((Object) sources); applicationClass.getMethod("setDefaultProperties", Map.class).invoke(application, defaultProperties); Method method = applicationClass.getMethod("run", String[].class); return method.invoke(application, (Object) args); } private String getSpringApplicationClassName() { String className = System.getProperty("spring.application.class.name"); if (className == null) { className = getEnvironmentVariable("SPRING_APPLICATION_CLASS_NAME"); } if (className == null) { className = DEFAULT_SPRING_APPLICATION_CLASS; } return className; } protected String getEnvironmentVariable(String name) { return System.getenv(name); } }
[ "Kaidong.Zhou@eisgroup.com" ]
Kaidong.Zhou@eisgroup.com
1f6e5050373ce97cb518f2903619e640e9df36f6
5e22bc0718a65f73055cebfc40f41686fae2d1d8
/src/main/java/com/edison/algorithm/string/单词搜索2.java
0ad4cdd9e06f2c263143552c84090a962ef4ab47
[]
no_license
EdsionGeng/day_day_algorithm
100107b3a21141c216e33c3a36971b087f5e4ab8
ff409749071081bf0a0ce4632e695a606ddf9197
refs/heads/master
2023-01-12T21:14:59.802992
2022-12-29T02:38:04
2022-12-29T02:38:04
223,535,879
2
0
null
2022-11-16T06:15:26
2019-11-23T05:24:19
Java
UTF-8
Java
false
false
2,255
java
package com.edison.algorithm.string; import java.util.*; public class 单词搜索2 { int[][] dirs = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}}; class Trie { String word; Map<Character, Trie> children; public Trie() { this.word = ""; this.children = new HashMap<>(); } public void insert(String word) { Trie cur = this; for (int i = 0; i < word.length(); i++) { char c = word.charAt(i); if (!cur.children.containsKey(c)) { cur.children.put(c, new Trie()); } cur = cur.children.get(c); } cur.word = word; } } public List<String> findWords(char[][] board, String[] words) { Set<String> ans = new HashSet<>(); Trie trie = new Trie(); for (String word : words) { trie.insert(word); } for (int i = 0; i < board.length; i++) { for (int j = 0; j < board[i].length; j++) { dfs(board, trie, i, j, ans); } } return new ArrayList<>(ans); } public void dfs(char[][] board, Trie now, int i, int j, Set<String> ans) { char ch = board[i][j]; if (!now.children.containsKey(ch)) { return; } Trie next = now.children.get(ch); if (!"".equals(next.word)) { ans.add(next.word); next.word = ""; } if (!next.children.isEmpty()) { board[i][j] = '#'; for (int[] dir : dirs) { int i2 = i + dir[0], j2 = j + dir[1]; if (i2 >= 0 && i2 < board.length && j2 >= 0 && j2 < board[0].length) { dfs(board, next, i2, j2, ans); } } board[i][j] = ch; } if (!next.children.isEmpty()) { now.children.remove(ch); } } public static void main(String[] args) { 单词搜索2 le = new 单词搜索2(); System.out.println(le.findWords(new char[][]{{'o', 'a', 'a', 'n'}, {'e', 't', 'a', 'e'}, {'i', 'h', 'k', 'r'}, {'i', 'f', 'l', 'v'}}, new String[]{"oath", "pea", "eat", "rain"})); } }
[ "841851827@qq.com" ]
841851827@qq.com
9faa19ab983211a392b8c27a1550e9b4cfe644b7
ee49336ab7ad6d9cd11f26b46af7f72b06d6b43a
/mod01-sample1/src/main/java/net/franckbenault/dbtest/sample/DbManager.java
960fe0187f5993f3473eb300b8e662fde2240702
[]
no_license
franck-benault/test-dbsetup-dbunit
9fdea1223a833732f30f54299595ab9a33a3a8b5
1d9e0e0ebe979f899fe9ba23a5f6006691f9fc60
refs/heads/master
2021-01-23T09:49:28.292205
2015-08-13T22:07:58
2015-08-13T22:07:58
21,919,148
1
0
null
null
null
null
UTF-8
Java
false
false
2,548
java
package net.franckbenault.dbtest.sample; import java.sql.Connection; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import javax.sql.DataSource; import org.hsqldb.jdbc.JDBCDataSource; public class DbManager { private String requestCreateTablesUsers = "CREATE TABLE USERS ( ID INTEGER IDENTITY, LOGIN VARCHAR(256), PASSWORD VARCHAR(256))"; private String requestUser1 = "INSERT INTO USERS(ID,LOGIN,PASSWORD) VALUES('1','straumat', 'straumat16')"; private String requestUser2 = "INSERT INTO USERS(ID,LOGIN,PASSWORD) VALUES('2','jgoncalves', 'jgoncalves16')"; private String requestUser3 = "INSERT INTO USERS(ID,LOGIN,PASSWORD) VALUES('3','sgoumard', 'sgoumard16')"; /** Service Connection. */ private JDBCDataSource dataSource; private Connection connection; /** driver JDBC. */ private String jdbcDriver = "org.hsqldb.jdbcDriver"; /** memory mode. */ private String database = "jdbc:hsqldb:mem:database"; /** user for DB connection. */ private String user = "sa"; /** password for DB connection */ private String password = ""; /** * connection to the database. */ public void connexionDB() { try { //loading JDBC driver Class.forName(jdbcDriver).newInstance(); } catch (InstantiationException e) { System.out.println("ERROR: failed to load HSQLDB JDBC driver."); e.printStackTrace(); } catch (IllegalAccessException e) { e.printStackTrace(); } catch (ClassNotFoundException e) { e.printStackTrace(); } try { dataSource = new JDBCDataSource(); dataSource.setDatabase(database); connection = dataSource.getConnection(user, password); executRequest(requestCreateTablesUsers); executRequest(requestUser1); executRequest(requestUser2); executRequest(requestUser3); } catch (SQLException e) { e.printStackTrace(); } } public Connection getConnection() { return connection; } public DataSource getDataSource() { return dataSource; } public ResultSet executRequest(String requete) throws SQLException { Statement statement; statement = connection.createStatement(); ResultSet resultat = statement.executeQuery(requete); return resultat; } /** * stop HSQLDB * @throws SQLException SQL exception */ public void stopDB() throws SQLException { Statement st = connection.createStatement(); //stop HSQLDB st.execute("SHUTDOWN"); //close connection connection.close(); } }
[ "franck-benault@orange.fr" ]
franck-benault@orange.fr
3a265cda74be89a8ec7842bcfc6bb96e5a502857
c6044892e45f7cf8fb17a9e43b1a29add7df6bd3
/tooling/karaf-maven-plugin/src/main/java/org/apache/karaf/tooling/client/CommandDescriptor.java
c5323609955ed23c874362983d99aadb38496d8e
[ "MIT", "BSD-3-Clause", "Apache-2.0", "LicenseRef-scancode-public-domain", "EPL-1.0" ]
permissive
htreu/karaf
1c5648e478961e20cc3bdbd6d32418d526b0a22a
82404953d60b4c9f2a4975f12785ec6dcf022da8
refs/heads/master
2021-07-02T12:43:01.024604
2019-03-12T07:20:40
2019-03-12T07:20:40
175,178,655
0
0
Apache-2.0
2019-03-12T09:34:56
2019-03-12T09:34:54
null
UTF-8
Java
false
false
1,199
java
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.karaf.tooling.client; public class CommandDescriptor { private int rank; private String command; public int getRank() { return rank; } public void setRank(int rank) { this.rank = rank; } public String getCommand() { return command; } public void setCommand(String command) { this.command = command; } }
[ "jbonofre@apache.org" ]
jbonofre@apache.org
a8e1b6adfe37e6d34cfbdde5b5374c5cef07e4f1
09d4a9e6f02ec10aa86cc5a312fae00a2b43842c
/seckill-common/src/main/java/com/seckill/common/bean/ManagerProductInfo.java
f701bc288b6b846d502dace55d1a986edab41ed0
[]
no_license
xianzhixianzhixian/seckill
d4c740366562248f1516d29adeca2ddd06507424
4e7aaac6baa0f199a8eb42c3145aa1cf4cfb0d3f
refs/heads/master
2022-04-14T12:07:13.471528
2020-02-29T15:43:25
2020-02-29T15:43:25
219,761,055
0
0
null
null
null
null
UTF-8
Java
false
false
3,455
java
package com.seckill.common.bean; import java.math.BigDecimal; import java.util.Date; public class ManagerProductInfo { private Long id; private String productTitle; private String productName; private String productPictureUrl; private BigDecimal productPrice; private BigDecimal productDiscounts; private Date createTime; private Date updateTime; private Integer state; private Date approveTime; private Long mechantId; private Long productTypeId; private Long productInventory; private Long shopId; private Date createdTime; private Date updatedTime; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getProductTitle() { return productTitle; } public void setProductTitle(String productTitle) { this.productTitle = productTitle == null ? null : productTitle.trim(); } public String getProductName() { return productName; } public void setProductName(String productName) { this.productName = productName == null ? null : productName.trim(); } public String getProductPictureUrl() { return productPictureUrl; } public void setProductPictureUrl(String productPictureUrl) { this.productPictureUrl = productPictureUrl == null ? null : productPictureUrl.trim(); } public BigDecimal getProductPrice() { return productPrice; } public void setProductPrice(BigDecimal productPrice) { this.productPrice = productPrice; } public BigDecimal getProductDiscounts() { return productDiscounts; } public void setProductDiscounts(BigDecimal productDiscounts) { this.productDiscounts = productDiscounts; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public Date getUpdateTime() { return updateTime; } public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } public Integer getState() { return state; } public void setState(Integer state) { this.state = state; } public Date getApproveTime() { return approveTime; } public void setApproveTime(Date approveTime) { this.approveTime = approveTime; } public Long getMechantId() { return mechantId; } public void setMechantId(Long mechantId) { this.mechantId = mechantId; } public Long getProductTypeId() { return productTypeId; } public void setProductTypeId(Long productTypeId) { this.productTypeId = productTypeId; } public Long getProductInventory() { return productInventory; } public void setProductInventory(Long productInventory) { this.productInventory = productInventory; } public Long getShopId() { return shopId; } public void setShopId(Long shopId) { this.shopId = shopId; } public Date getCreatedTime() { return createdTime; } public void setCreatedTime(Date createdTime) { this.createdTime = createdTime; } public Date getUpdatedTime() { return updatedTime; } public void setUpdatedTime(Date updatedTime) { this.updatedTime = updatedTime; } }
[ "MrRobotFan@163.com" ]
MrRobotFan@163.com
29c495126c89769f0e041427d91b46c7719b6ab8
0cce3c1dcedac94ac67e75e80f7f9586315193ea
/org.mortbay.jetty/src/org/mortbay/jetty/servlet/Invoker.java
bb188df156eb4bc80b48739a57c0ced8ee023b83
[]
no_license
SuperMarioX/analytics
ada927f0af4b75e1401899a5aca7ecc491919791
3774a14c41ee36eaebe8bbe89cdf578a053883bc
refs/heads/master
2021-01-11T00:00:52.108642
2013-07-21T08:43:35
2013-07-21T08:43:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
12,150
java
// ======================================================================== // $Id: Invoker.java,v 1.1 2009/01/14 09:05:13 zhangyx Exp $ // Copyright 199-2004 Mort Bay Consulting Pty. 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 org.mortbay.jetty.servlet; import java.io.IOException; import java.util.Enumeration; import java.util.HashMap; import java.util.Map; import javax.servlet.ServletContext; import javax.servlet.ServletException; import javax.servlet.UnavailableException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequestWrapper; import javax.servlet.http.HttpServletResponse; import org.mortbay.jetty.Handler; import org.mortbay.jetty.handler.ContextHandler; import org.mortbay.jetty.handler.HandlerWrapper; import org.mortbay.log.Log; import org.mortbay.util.LazyList; import org.mortbay.util.URIUtil; ; /* ------------------------------------------------------------ */ /** Dynamic Servlet Invoker. * This servlet invokes anonymous servlets that have not been defined * in the web.xml or by other means. The first element of the pathInfo * of a request passed to the envoker is treated as a servlet name for * an existing servlet, or as a class name of a new servlet. * This servlet is normally mapped to /servlet/* * This servlet support the following initParams: * <PRE> * nonContextServlets If false, the invoker can only load * servlets from the contexts classloader. * This is false by default and setting this * to true may have security implications. * * verbose If true, log dynamic loads * * * All other parameters are copied to the * each dynamic servlet as init parameters * </PRE> * @version $Id: Invoker.java,v 1.1 2009/01/14 09:05:13 zhangyx Exp $ * @author Greg Wilkins (gregw) */ public class Invoker extends HttpServlet { private ContextHandler _contextHandler; private ServletHandler _servletHandler; private Map.Entry _invokerEntry; private Map _parameters; private boolean _nonContextServlets; private boolean _verbose; /* ------------------------------------------------------------ */ public void init() { ServletContext config=getServletContext(); _contextHandler=((ContextHandler.SContext)config).getContextHandler(); Handler handler=_contextHandler.getHandler(); while (handler!=null && !(handler instanceof ServletHandler) && (handler instanceof HandlerWrapper)) handler=((HandlerWrapper)handler).getHandler(); _servletHandler = (ServletHandler)handler; Enumeration e = getInitParameterNames(); while(e.hasMoreElements()) { String param=(String)e.nextElement(); String value=getInitParameter(param); String lvalue=value.toLowerCase(); if ("nonContextServlets".equals(param)) { _nonContextServlets=value.length()>0 && lvalue.startsWith("t"); } if ("verbose".equals(param)) { _verbose=value.length()>0 && lvalue.startsWith("t"); } else { if (_parameters==null) _parameters=new HashMap(); _parameters.put(param,value); } } } /* ------------------------------------------------------------ */ protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // Get the requested path and info boolean included=false; String servlet_path=(String)request.getAttribute(Dispatcher.__INCLUDE_SERVLET_PATH); if (servlet_path==null) servlet_path=request.getServletPath(); else included=true; String path_info = (String)request.getAttribute(Dispatcher.__INCLUDE_PATH_INFO); if (path_info==null) path_info=request.getPathInfo(); // Get the servlet class String servlet = path_info; if (servlet==null || servlet.length()<=1 ) { response.sendError(404); return; } int i0=servlet.charAt(0)=='/'?1:0; int i1=servlet.indexOf('/',i0); servlet=i1<0?servlet.substring(i0):servlet.substring(i0,i1); // look for a named holder ServletHolder[] holders = _servletHandler.getServlets(); ServletHolder holder = getHolder (holders, servlet); if (holder!=null) { // Found a named servlet (from a user's web.xml file) so // now we add a mapping for it Log.debug("Adding servlet mapping for named servlet:"+servlet+":"+URIUtil.addPaths(servlet_path,servlet)+"/*"); ServletMapping mapping = new ServletMapping(); mapping.setServletName(servlet); mapping.setPathSpec(URIUtil.addPaths(servlet_path,servlet)+"/*"); _servletHandler.setServletMappings((ServletMapping[])LazyList.addToArray(_servletHandler.getServletMappings(), mapping, ServletMapping.class)); } else { // look for a class mapping if (servlet.endsWith(".class")) servlet=servlet.substring(0,servlet.length()-6); if (servlet==null || servlet.length()==0) { response.sendError(404); return; } synchronized(_servletHandler) { // find the entry for the invoker (me) _invokerEntry=_servletHandler.getHolderEntry(servlet_path); // Check for existing mapping (avoid threaded race). String path=URIUtil.addPaths(servlet_path,servlet); Map.Entry entry = _servletHandler.getHolderEntry(path); if (entry!=null && !entry.equals(_invokerEntry)) { // Use the holder holder=(ServletHolder)entry.getValue(); } else { // Make a holder Log.debug("Making new servlet="+servlet+" with path="+path+"/*"); holder=_servletHandler.addServlet(servlet, path+"/*"); Map.Entry eee = _servletHandler.getHolderEntry(path); ServletMapping mapping = new ServletMapping(); mapping.setServletName(servlet); mapping.setPathSpec(path+".class/*"); _servletHandler.setServletMappings((ServletMapping[])LazyList.addToArray(_servletHandler.getServletMappings(), mapping, ServletMapping.class)); if (_parameters!=null) holder.setInitParameters(_parameters); try {holder.start();} catch (Exception e) { Log.debug(e); throw new UnavailableException(e.toString()); } // Check it is from an allowable classloader if (!_nonContextServlets) { Object s=holder.getServlet(); if (_contextHandler.getClassLoader()!= s.getClass().getClassLoader()) { try { holder.stop(); } catch (Exception e) { Log.ignore(e); } Log.warn("Dynamic servlet "+s+ " not loaded from context "+ request.getContextPath()); throw new UnavailableException("Not in context"); } } if (_verbose) Log.debug("Dynamic load '"+servlet+"' at "+path); } } } if (holder!=null) holder.handle(new Request(request,included,servlet,servlet_path,path_info), response); else { Log.info("Can't find holder for servlet: "+servlet); response.sendError(404); } } /* ------------------------------------------------------------ */ class Request extends HttpServletRequestWrapper { String _servletPath; String _pathInfo; boolean _included; /* ------------------------------------------------------------ */ Request(HttpServletRequest request, boolean included, String name, String servletPath, String pathInfo) { super(request); _included=included; _servletPath=URIUtil.addPaths(servletPath,name); _pathInfo=pathInfo.substring(name.length()+1); if (_pathInfo.length()==0) _pathInfo=null; } /* ------------------------------------------------------------ */ public String getServletPath() { if (_included) return super.getServletPath(); return _servletPath; } /* ------------------------------------------------------------ */ public String getPathInfo() { if (_included) return super.getPathInfo(); return _pathInfo; } /* ------------------------------------------------------------ */ public Object getAttribute(String name) { if (_included) { if (name.equals(Dispatcher.__INCLUDE_REQUEST_URI)) return URIUtil.addPaths(URIUtil.addPaths(getContextPath(),_servletPath),_pathInfo); if (name.equals(Dispatcher.__INCLUDE_PATH_INFO)) return _pathInfo; if (name.equals(Dispatcher.__INCLUDE_SERVLET_PATH)) return _servletPath; } return super.getAttribute(name); } } private ServletHolder getHolder(ServletHolder[] holders, String servlet) { if (holders == null) return null; ServletHolder holder = null; for (int i=0; holder==null && i<holders.length; i++) { if (holders[i].getName().equals(servlet)) { holder = holders[i]; } } return holder; } }
[ "mjyyl@126.com" ]
mjyyl@126.com
82701b5bfc254c5c089beee124f90e3087586a29
243d571d13947743a3446b8a0d4bbea304291a6e
/src/main/java/com/nemtool/explorer/pojo/Accountremarks.java
572bc474e956587dd541d80c1065476f33859817
[ "MIT" ]
permissive
masker-Lee/explorer_es
72f084690e8a22fa4a9fa33ff636963985d2b0d0
8cabba9ad4c800f310b7121a800e4772a27ae1d9
refs/heads/master
2023-01-27T19:06:13.027063
2020-12-10T08:03:46
2020-12-10T08:03:46
320,197,457
0
0
null
null
null
null
UTF-8
Java
false
false
740
java
package com.nemtool.explorer.pojo; import java.io.Serializable; public class Accountremarks implements Serializable{ /** * */ private static final long serialVersionUID = 1L; private Integer id; private String address; private String remark; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address == null ? null : address.trim(); } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark == null ? null : remark.trim(); } }
[ "masker-Lee@users.noreply.github.com" ]
masker-Lee@users.noreply.github.com
6550b51796a987c685974d8a89aa8d40c06f007a
41e717baecbcb4279de99550df54169f8631bb69
/app/src/main/java/com/lwr/password/ui/userupdate/RegisterActivity.java
c34ef4d5a46d6998113b5e9a65ac30c2637995b2
[]
no_license
liangwenrong/android-Password
294b54b146817c3ae8577ece9e9621c23fce57ce
4ab2efc8903bd140d3f0827af67e3430a937c16b
refs/heads/master
2022-09-19T03:53:31.518446
2020-05-28T13:29:04
2020-05-28T13:29:04
267,298,014
0
0
null
null
null
null
UTF-8
Java
false
false
4,993
java
package com.lwr.password.ui.userupdate; import android.app.AlertDialog; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; import android.text.TextUtils; import android.view.KeyEvent; import android.view.View; import android.view.inputmethod.EditorInfo; import android.widget.Button; import android.widget.EditText; import android.widget.ProgressBar; import android.widget.TextView; import android.widget.Toast; import androidx.appcompat.app.AppCompatActivity; import com.lwr.password.R; import com.lwr.password.constant.Constants; import com.lwr.password.data.DataPreferences; import com.lwr.password.ui.login.LoginActivity; public class RegisterActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.fragment_user_update); final EditText usernameEditText = findViewById(R.id.reg_username); final EditText passwordEditText = findViewById(R.id.reg_password); final EditText passwordEditText1 = findViewById(R.id.reg_password1); final Button registerBtn = findViewById(R.id.register); final ProgressBar regProgressBar = findViewById(R.id.reg_loading); usernameEditText.setHint("新账号"); passwordEditText1.setImeActionLabel("注册", EditorInfo.IME_ACTION_DONE); registerBtn.setText("注册新账号"); registerBtn.setEnabled(true); passwordEditText1.setOnEditorActionListener(new TextView.OnEditorActionListener() { @Override public boolean onEditorAction(TextView v, int actionId, KeyEvent event) { if (actionId == EditorInfo.IME_ACTION_DONE) { String username = usernameEditText.getText().toString(); String password = passwordEditText.getText().toString(); String password1 = passwordEditText1.getText().toString(); if (!TextUtils.isEmpty(username) && !TextUtils.isEmpty(password) && password.length() > 5) { if (password.equals(password1)) { doRegister(username, password, regProgressBar, registerBtn); } else { Toast.makeText(getApplicationContext(), "两次输入密码不一致", Toast.LENGTH_SHORT).show(); } } else { Toast.makeText(getApplicationContext(), "用户名密码格式错误", Toast.LENGTH_SHORT).show(); } } return false; } }); registerBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { /** * */ String username = usernameEditText.getText().toString(); String password = passwordEditText.getText().toString(); String password1 = passwordEditText1.getText().toString(); if (!TextUtils.isEmpty(username) && !TextUtils.isEmpty(password) && password.length() > 5) { if (password.equals(password1)) { doRegister(username, password, regProgressBar, registerBtn); } else { Toast.makeText(getApplicationContext(), "两次输入密码不一致", Toast.LENGTH_SHORT).show(); } } else { Toast.makeText(getApplicationContext(), "用户名密码格式错误", Toast.LENGTH_SHORT).show(); } } }); } void doRegister(final String name, final String password, final ProgressBar regProgressBar, final Button registerBtn) { registerBtn.setEnabled(false); AlertDialog.Builder dialog = new AlertDialog.Builder(this); dialog.setPositiveButton("确定", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { regProgressBar.setVisibility(View.VISIBLE); DataPreferences.clearAll(getApplicationContext(), Constants.PREFERENCES_FILE_NAME_USER); DataPreferences.saveKeyValue(name, password, getApplicationContext(), Constants.PREFERENCES_FILE_NAME_USER); /** * 跳转登录页面 */ startActivity(new Intent(getApplicationContext(), LoginActivity.class)); RegisterActivity.this.finish(); } }); dialog.setNegativeButton("取消", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { registerBtn.setEnabled(true); dialog.dismiss(); } }); dialog.setTitle("确定注册新账号?").show(); } }
[ "944604889@qq.com" ]
944604889@qq.com
92e046e3efa60bd661341ffc6904cd354375ed54
66579544de4f10385f67fe12f817949f3157c169
/PPSDD/src/controllerC/LoginManageCon.java
7fe9716a52e27ad59c15f9590ffa4888c8eb4dc1
[]
no_license
sarina22/library
ee735eb102a225c154f1b65ea9f9459edbb8c155
0496c19664654ded40e056a4788bcf20dc40011b
refs/heads/master
2020-06-24T12:59:34.780913
2019-07-26T07:28:50
2019-07-26T07:28:50
198,968,763
0
0
null
null
null
null
UTF-8
Java
false
false
2,009
java
package controllerC; import controllerC.*; import modelM.UserLoginModel; import javax.swing.*; import viewV.*; import controllerC.*; import java.awt.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.util.Arrays; import viewV.*; public class LoginManageCon extends JDialog { LoginPageView loginview; UserLoginModel usermodel; public LoginManageCon(LoginPageView viewL,UserLoginModel usermodel) {// constructor this.loginview=viewL; this.usermodel=usermodel; } public void fromLoginCon(){ loginview.getjBLogin().addActionListener(new ActionListener() {// method carried out when the login button is clicked public void actionPerformed(ActionEvent e){ String forName = loginview.getjTUser();// to get user from the login page char[] password =loginview.getjTPass();// to get the password from the login page String adminorResear =loginview.getGroup().getSelection().getActionCommand(); char[] c= {'a','d','m','i','n'}; if(adminorResear.equals("Admin")) { // if the user is admin if(forName.equals("a")){ if( Arrays.equals(password,c)){ JOptionPane.showMessageDialog(null, "Welcome admin! Login Successfull."); loginview.dispose(); BasicView bBase = new BasicView(); } else { JOptionPane.showMessageDialog(null,"Password incorrect"); } } else { JOptionPane.showMessageDialog(null,"Login has Failed"); } } else {// for the login of the researcher if(usermodel.reLogin(loginview)) { JOptionPane.showMessageDialog(null, "Welcome researcher!."); loginview.dispose(); IndividualResearcherFormat indi=new IndividualResearcherFormat(); } else { JOptionPane.showMessageDialog(null, "Incorrect!"); } } } }); loginview.getjBExit().addActionListener(new ActionListener() {// method to exit the system public void actionPerformed(ActionEvent arg0) { System.exit(0); } }); } }
[ "sarina.acharya22@gmail.com" ]
sarina.acharya22@gmail.com