blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
410
content_id
stringlengths
40
40
detected_licenses
listlengths
0
51
license_type
stringclasses
2 values
repo_name
stringlengths
5
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringlengths
4
80
visit_date
timestamp[us]
revision_date
timestamp[us]
committer_date
timestamp[us]
github_id
int64
5.85k
684M
star_events_count
int64
0
209k
fork_events_count
int64
0
110k
gha_license_id
stringclasses
22 values
gha_event_created_at
timestamp[us]
gha_created_at
timestamp[us]
gha_language
stringclasses
132 values
src_encoding
stringclasses
34 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
3
9.45M
extension
stringclasses
28 values
content
stringlengths
3
9.45M
authors
listlengths
1
1
author_id
stringlengths
0
352
6c4c3697d98f40f99e5b268c42baa5d3758e5fef
a39c4bdd35fbd675e8d53079cf9639a42bf219ba
/src/main/java/com/amaan/config/Swagger2Config.java
ba71f9c0f4ae6487465e6495661b63aaae20c23a
[]
no_license
girliMissU/spboot-seckill
2474a7dee8090fa2886acc9255095620e47941c7
8f51971fa2b5db113143d585b70d53b52bbceec7
refs/heads/master
2023-03-23T09:09:32.790147
2021-03-23T03:19:12
2021-03-23T03:19:12
311,060,635
2
0
null
null
null
null
UTF-8
Java
false
false
1,356
java
package com.amaan.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import springfox.documentation.builders.ApiInfoBuilder; import springfox.documentation.builders.PathSelectors; import springfox.documentation.builders.RequestHandlerSelectors; import springfox.documentation.service.ApiInfo; import springfox.documentation.service.Contact; import springfox.documentation.spi.DocumentationType; import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.swagger2.annotations.EnableSwagger2; /** * 佛祖保佑,永无BUG * * @author AMAAN * springboot-mybatis-redis * 2020-12-07 14:13 */ @Configuration @EnableSwagger2 public class Swagger2Config { @Bean public Docket createRestApi() { return new Docket(DocumentationType.SWAGGER_2) .apiInfo(apiInfo()) .select() .apis(RequestHandlerSelectors.basePackage("com.amaan.controller")) .paths(PathSelectors.any()) .build(); } private ApiInfo apiInfo() { return new ApiInfoBuilder() .title("SwaggerUI演示") .description("seckill") .contact(new Contact("wayne", null, null)) .version("1.0") .build(); } }
[ "lhy_seu@163.com" ]
lhy_seu@163.com
684e4c8aafe74e1a0f16ddbe227bfb6c15867b31
a23a44311d44a649ae35be17fd247f00e49a7e32
/java-pattern/src/main/java/cn/zcp/demo/prototype/example8/Prototype.java
2fdf21e98e36bdf8a56dad6fd1f748866397d025
[]
no_license
zzccpp/designpattern-demo
87c53cf484d935e1635e551c4da7a0f904cf921d
2a37bd2dee608b2a180f7450ce73f441c07e66cd
refs/heads/master
2021-07-05T21:18:04.522675
2019-06-25T09:47:46
2019-06-25T09:47:46
188,268,045
0
0
null
2020-10-13T13:24:44
2019-05-23T16:13:42
Java
UTF-8
Java
false
false
158
java
package cn.zcp.demo.prototype.example8; public interface Prototype { public Prototype clone(); public String getName(); public void setName(String name); }
[ "zhongchun159@sina.com" ]
zhongchun159@sina.com
53ad275d4fe4c9f130dc4e8b192fc70629d4c3e9
abbece01134969e145539d69c47f33b677381fad
/scroll/src/main/java/cdflynn/android/library/scroller/cache/CacheInterface.java
55dcd3c8ffda09dbe550ccd681654553c2167e6b
[]
no_license
jinsedeyuzhou/bubble-scroll
e0aaf2f2fd371aea548822ef26412515aa4ae507
bb2f043f42e4a742983e20c645fd3f561bdd90c8
refs/heads/master
2020-07-03T20:08:15.685866
2019-08-13T04:03:16
2019-08-13T04:03:16
202,035,316
0
0
null
2019-08-13T01:08:41
2019-08-13T01:08:41
null
UTF-8
Java
false
false
527
java
package cdflynn.android.library.scroller.cache; /** * Created by gavin * date 2018/3/4 * 缓存工具需要暴露的接口 */ public interface CacheInterface<T> { /** * 加入缓存 * @param position * @param t */ void put(int position, T t); /** * 从缓存中获取 * @param position * @return */ T get(int position); /** * 移除 * @param position */ void remove(int position); /** * 清空缓存 */ void clean(); }
[ "jinsedeyuzhou@gmail.com" ]
jinsedeyuzhou@gmail.com
81658bfa5111c6d00519775766d83cdde5a99e0e
04ac20ffba9edbdf9c39cf7dcf57275b346c1fe9
/src/main/java/com/learning/designmode/abstractFactory/Red.java
9f7213ac55fd2b6433fa0fbe89cd78693f9c5507
[]
no_license
hxz1998/designpattern
1caf1ca63325cf451f8f593280d0f467d8d76fe9
18bb352db1fb76041274eaf103ab39336676d910
refs/heads/master
2022-05-31T10:04:56.162504
2022-05-12T13:26:38
2022-05-12T13:26:38
118,901,329
0
0
null
null
null
null
UTF-8
Java
false
false
169
java
package com.learning.designmode.abstractFactory; public class Red implements Color { @Override public void fill() { System.out.println("涂上了红色"); } }
[ "1466947023@qq.com" ]
1466947023@qq.com
88da92fd95576f6e8d3b6c78489d9d8e0cd3844e
e2896a12c4d5b37963ad124ab7b11be9c6a1d61a
/app/src/test/java/com/example/myapplication/gameImplementation/TicTacToeGameTest.java
2f106c5c3197cd62bbc16bf3d2437f637f7a1146
[]
no_license
Nsabimana1/TicTacToeNetwork
511d50ee9600f29e749610695338f1e079bf3f25
6950ae36f80187d82df593f35c5a2e936285a45b
refs/heads/master
2020-04-24T02:03:00.760795
2019-03-24T18:00:10
2019-03-24T18:00:10
171,622,805
0
0
null
null
null
null
UTF-8
Java
false
false
5,356
java
package com.example.myapplication.gameImplementation; import org.junit.After; import org.junit.Before; import org.junit.Test; import static org.junit.Assert.*; public class TicTacToeGameTest { public TicTacToeGame ticTacToeGame; @Before public void setUp() throws Exception { ticTacToeGame = new TicTacToeGame(); } @Test public void checkWin() { checkHorizWin(); checkVertWin(); checkDiagWin(); } @Test public void checkHorizWin() { for(int y=0; y<3;y++) { ticTacToeGame.resetBoard(); ticTacToeGame.getBoard().makeMove(new Move(Symbol.X, new Coord(0,y))); ticTacToeGame.getBoard().makeMove(new Move(Symbol.X, new Coord(1,y))); ticTacToeGame.getBoard().makeMove(new Move(Symbol.X, new Coord(2,y))); System.out.println(ticTacToeGame.getBoard().toString()); assertEquals(WinState.X_WIN, ticTacToeGame.checkWin()); } for(int y=0; y<3;y++) { ticTacToeGame.resetBoard(); ticTacToeGame.getBoard().makeMove(new Move(Symbol.O, new Coord(0,y))); ticTacToeGame.getBoard().makeMove(new Move(Symbol.O, new Coord(1,y))); ticTacToeGame.getBoard().makeMove(new Move(Symbol.O, new Coord(2,y))); System.out.println(ticTacToeGame.getBoard().toString()); assertEquals(WinState.O_WIN, ticTacToeGame.checkWin()); } } @Test public void checkVertWin() { for(int x=0; x<3; x++) { ticTacToeGame.resetBoard(); ticTacToeGame.getBoard().makeMove(new Move(Symbol.X, new Coord(x,0))); ticTacToeGame.getBoard().makeMove(new Move(Symbol.X, new Coord(x,1))); ticTacToeGame.getBoard().makeMove(new Move(Symbol.X, new Coord(x,2))); System.out.println(ticTacToeGame.getBoard().toString()); assertEquals(WinState.X_WIN, ticTacToeGame.checkWin()); } for(int x=0; x<3; x++) { ticTacToeGame.resetBoard(); ticTacToeGame.getBoard().makeMove(new Move(Symbol.O, new Coord(x,0))); ticTacToeGame.getBoard().makeMove(new Move(Symbol.O, new Coord(x,1))); ticTacToeGame.getBoard().makeMove(new Move(Symbol.O, new Coord(x,2))); System.out.println(ticTacToeGame.getBoard().toString()); assertEquals(WinState.O_WIN, ticTacToeGame.checkWin()); } } @Test public void checkDiagWin() { ticTacToeGame.resetBoard(); ticTacToeGame.getBoard().makeMove(new Move(Symbol.X, new Coord(0,0))); ticTacToeGame.getBoard().makeMove(new Move(Symbol.X, new Coord(1,1))); ticTacToeGame.getBoard().makeMove(new Move(Symbol.X, new Coord(2,2))); System.out.println(ticTacToeGame.getBoard().toString()); assertEquals(WinState.X_WIN, ticTacToeGame.checkWin()); ticTacToeGame.resetBoard(); ticTacToeGame.getBoard().makeMove(new Move(Symbol.X, new Coord(0,2))); ticTacToeGame.getBoard().makeMove(new Move(Symbol.X, new Coord(1,1))); ticTacToeGame.getBoard().makeMove(new Move(Symbol.X, new Coord(2,0))); System.out.println(ticTacToeGame.getBoard().toString()); assertEquals(WinState.X_WIN, ticTacToeGame.checkWin()); ticTacToeGame.resetBoard(); ticTacToeGame.getBoard().makeMove(new Move(Symbol.O, new Coord(0,0))); ticTacToeGame.getBoard().makeMove(new Move(Symbol.O, new Coord(1,1))); ticTacToeGame.getBoard().makeMove(new Move(Symbol.O, new Coord(2,2))); System.out.println(ticTacToeGame.getBoard().toString()); assertEquals(WinState.O_WIN, ticTacToeGame.checkWin()); ticTacToeGame.resetBoard(); ticTacToeGame.getBoard().makeMove(new Move(Symbol.O, new Coord(0,2))); ticTacToeGame.getBoard().makeMove(new Move(Symbol.O, new Coord(1,1))); ticTacToeGame.getBoard().makeMove(new Move(Symbol.O, new Coord(2,0))); System.out.println(ticTacToeGame.getBoard().toString()); assertEquals(WinState.O_WIN, ticTacToeGame.checkWin()); } @Test public void moveTest1() { Move testMove; for(int x=0; x<3;x++) { for(int y=0; y<3;y++) { testMove = new Move(Symbol.X, new Coord(x,y)); System.out.println("Making move " + testMove.toString()); ticTacToeGame.getBoard().makeMove(testMove); Symbol checkSymbol = ticTacToeGame.getBoard().getBoardArray()[x][y]; System.out.println("checkSymbol = " + checkSymbol.toString()); assertEquals(Symbol.X, checkSymbol); } } System.out.println("Test1"); } @Test public void overrideMoveTest() { moveTest1(); Move testMove; for(int x=0; x<3;x++) { for(int y=0; y<3;y++) { testMove = new Move(Symbol.O, new Coord(x,y)); System.out.println("Making move " + testMove.toString()); ticTacToeGame.getBoard().makeMove(testMove); Symbol checkSymbol = ticTacToeGame.getBoard().getBoardArray()[x][y]; System.out.println("checkSymbol = " + checkSymbol.toString()); assertEquals(Symbol.X, checkSymbol); } } System.out.println("Test1"); } }
[ "theDrunkenManatee@users.noreply.github.com" ]
theDrunkenManatee@users.noreply.github.com
259d7ba60d1a40de9b08d09760622547210259ef
1638bc1cd90a10a1daed5f5b3a93875ea3d925fe
/src/main/java/com/huoli/checkin/design/pattern/command/Client.java
12c4ca31e48c569e49e53219d807392c25f11637
[]
no_license
liaohao1986/helloworld
89be54e6d257b70535b8ba5c09dcb36256cffa91
28f953eb31b68e9d835190a143b44f1d342525a0
refs/heads/master
2021-01-11T20:57:09.197129
2018-08-07T14:32:55
2018-08-07T14:32:55
79,219,017
0
0
null
null
null
null
UTF-8
Java
false
false
2,021
java
/** * */ package com.huoli.checkin.design.pattern.command; import java.util.ArrayList; import java.util.List; /** * TODO:简单描述这个类的含义 <br> * 版权:Copyright (c) 2011-2017<br> * 公司:北京活力天汇<br> * 版本:1.0<br> * 作者:廖浩<br> * 创建日期:2017年2月17日<br> */ public class Client { /** * * @param args */ public static void main(String[] args) { // Command turnOnCommand = new TurnOnCommand(); // Command turnOffCommand = new TurnOffCommand(); // Command turnChangeCommand = new TurnChangeCommand(); //创建命令对象,并设置它的接受者 // Command turnOnCommand = new TurnOnCommand(receiver); // Command turnOffCommand = new TurnOffCommand(receiver); // Command turnChangeCommand = new TurnChangeCommand(receiver); // List<Command> commandList = new ArrayList<Command>(); // commandList.add(turnOnCommand); // commandList.add(turnOffCommand); // commandList.add(turnChangeCommand); // for(Command command : commandList) { // command.execute(); // } //创建接受者 // Receiver receiver = new Receiver(); // Command turnOnCommand = new TurnOnCommand(receiver); // Command turnOffCommand = new TurnOffCommand(receiver); // Command turnChangeCommand = new TurnChangeCommand(receiver); //创建调用者,将命令对象设置进去 Invoker invoker = new Invoker(); invoker.invoke(new TurnOnCommand()); invoker.invoke(new TurnOffCommand()); invoker.invoke(new TurnChangeCommand()); // invoker.setCommand(turnOnCommand); // // //这里可以测试一下 // invoker.runCommand(); // invoker.unDoCommand(); } }
[ "liaoh@133.cn" ]
liaoh@133.cn
ebf90d4312a07134deee1c2d038fcb6141d7280a
f6374e8929ae98db384478434018fe8d7070da09
/03/code/src/main/java/ca/mcgill/ecse420/a3/FineGrainedSetMembership/Set.java
bd9093f734483e21a1171f984940a3eab083ba37
[]
no_license
stumash/ParallelComputingExercises
c55b5a916b09fc6627484a9e13ff981b25510bd7
3f94d453f89b6960260cc5893721eb72d0dc798f
refs/heads/master
2020-03-29T10:26:12.179897
2018-12-07T04:41:50
2018-12-07T04:41:50
149,805,050
0
3
null
null
null
null
UTF-8
Java
false
false
607
java
package ca.mcgill.ecse420.a3.FineGrainedSetMembership; public interface Set<T> { /** * Add an element to the set. * * Returns true if the element was not already in the set, else returns false. */ public boolean add(T item); /** * Remove an element from the set. * * Returns true if the element was actually in the set, else returns false. */ public boolean remove(T item); /** * Check if an element is in the set. * * Returns true if the element is in the set, else returns false. */ public boolean contains(T item); }
[ "stuart.mashaal@gmail.com" ]
stuart.mashaal@gmail.com
72898a5c86ec429e0d3be4ef6fa10c160a651836
995f73d30450a6dce6bc7145d89344b4ad6e0622
/DVC-AN20_EMUI10.1.1/src/main/java/android/se/omapi/Session.java
5e3c08eba3f99c2fe70737e4144b14dce70cfbad
[]
no_license
morningblu/HWFramework
0ceb02cbe42585d0169d9b6c4964a41b436039f5
672bb34094b8780806a10ba9b1d21036fd808b8e
refs/heads/master
2023-07-29T05:26:14.603817
2021-09-03T05:23:34
2021-09-03T05:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,776
java
package android.se.omapi; import android.os.RemoteException; import android.os.ServiceSpecificException; import android.util.Log; import java.io.IOException; import java.util.NoSuchElementException; public final class Session { private static final String TAG = "OMAPI.Session"; private final Object mLock = new Object(); private final Reader mReader; private final SEService mService; private final ISecureElementSession mSession; Session(SEService service, ISecureElementSession session, Reader reader) { if (service == null || reader == null || session == null) { throw new IllegalArgumentException("Parameters cannot be null"); } this.mService = service; this.mReader = reader; this.mSession = session; } public Reader getReader() { return this.mReader; } public byte[] getATR() { if (this.mService.isConnected()) { try { return this.mSession.getAtr(); } catch (RemoteException e) { throw new IllegalStateException(e.getMessage()); } } else { throw new IllegalStateException("service not connected to system"); } } public void close() { if (!this.mService.isConnected()) { Log.e(TAG, "service not connected to system"); return; } synchronized (this.mLock) { try { this.mSession.close(); } catch (RemoteException e) { Log.e(TAG, "Error closing session", e); } } } public boolean isClosed() { try { return this.mSession.isClosed(); } catch (RemoteException e) { return true; } } public void closeChannels() { if (!this.mService.isConnected()) { Log.e(TAG, "service not connected to system"); return; } synchronized (this.mLock) { try { this.mSession.closeChannels(); } catch (RemoteException e) { Log.e(TAG, "Error closing channels", e); } } } public Channel openBasicChannel(byte[] aid, byte p2) throws IOException { if (this.mService.isConnected()) { synchronized (this.mLock) { try { ISecureElementChannel channel = this.mSession.openBasicChannel(aid, p2, this.mReader.getSEService().getListener()); if (channel == null) { return null; } return new Channel(this.mService, this, channel); } catch (ServiceSpecificException e) { if (e.errorCode == 1) { throw new IOException(e.getMessage()); } else if (e.errorCode == 2) { throw new NoSuchElementException(e.getMessage()); } else { throw new IllegalStateException(e.getMessage()); } } catch (RemoteException e2) { throw new IllegalStateException(e2.getMessage()); } } } else { throw new IllegalStateException("service not connected to system"); } } public Channel openBasicChannel(byte[] aid) throws IOException { return openBasicChannel(aid, (byte) 0); } public Channel openLogicalChannel(byte[] aid, byte p2) throws IOException { if (this.mService.isConnected()) { synchronized (this.mLock) { try { ISecureElementChannel channel = this.mSession.openLogicalChannel(aid, p2, this.mReader.getSEService().getListener()); if (channel == null) { return null; } return new Channel(this.mService, this, channel); } catch (ServiceSpecificException e) { if (e.errorCode == 1) { throw new IOException(e.getMessage()); } else if (e.errorCode == 2) { throw new NoSuchElementException(e.getMessage()); } else { throw new IllegalStateException(e.getMessage()); } } catch (RemoteException e2) { throw new IllegalStateException(e2.getMessage()); } } } else { throw new IllegalStateException("service not connected to system"); } } public Channel openLogicalChannel(byte[] aid) throws IOException { return openLogicalChannel(aid, Byte.MAX_VALUE); } }
[ "dstmath@163.com" ]
dstmath@163.com
f8567ce9aafe4ee710f5d8cd1ce7a762da5054dc
91f49a759c7ba4ef23d0b25ed1de54244549fd73
/app/src/main/java/com/eric/playio2014techniques/ui/schedule/MyScheduleFragment.java
7269789cf5e61195666391377d3564f148984c06
[]
no_license
Ericliu001/PlayIO2014Techniques
54384fa28811af74f07221904b2c6169a812d262
6f9db56b7d830615fca8dad8ff52c83266ceb760
refs/heads/master
2021-01-22T02:53:45.915820
2014-10-11T10:46:21
2014-10-11T10:46:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,576
java
package com.eric.playio2014techniques.ui.schedule; import android.app.Activity; import android.app.ListFragment; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.eric.playio2014techniques.R; /** * Created by HQ on 2014/10/8. */ public class MyScheduleFragment extends ListFragment { private View mRoot = null; public interface Listener { public void onFragmentViewCreated(ListFragment fragment); public void onFragmentAttached(MyScheduleFragment fragment); public void onFragmentDetached(MyScheduleFragment fragment); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { mRoot = inflater.inflate(R.layout.fragment_my_schedule, container, false); return mRoot; } @Override public void onViewCreated(View view, Bundle savedInstanceState) { super.onViewCreated(view, savedInstanceState); if (getActivity() instanceof Listener){ ((Listener)getActivity()).onFragmentViewCreated(this); } } @Override public void onAttach(Activity activity) { super.onAttach(activity); if (getActivity() instanceof Listener){ ((Listener)getActivity()).onFragmentAttached(this); } } @Override public void onDetach() { super.onDetach(); if (getActivity() instanceof Listener){ ((Listener)getActivity()).onFragmentDetached(this); } } }
[ "eric.liu.developer@gmail.com" ]
eric.liu.developer@gmail.com
886b17c63f9d96e3a272f6f658d5a38a414402f8
76ec962f05419436547fef69405434a17fbe72bf
/process_test/src/process_lastproject/Solution.java
fc4a1a7f54be6111d3e501653e79dc1cf29805f7
[]
no_license
kimiisonfire/studying
e767a1e8aef1e4d07722d36d59b6ec063a057e6a
5ef2912d0ce4ef9b5b885527b80c1a2b696d5efe
refs/heads/master
2022-12-23T15:55:18.897759
2020-03-02T08:13:44
2020-03-02T08:13:44
237,955,957
0
0
null
2022-12-16T02:13:38
2020-02-03T12:06:17
Java
UTF-8
Java
false
false
226
java
package process_lastproject; public class Solution { public static void main(String[] args) { Solution sol = new Solution(); sol.solution(2, 3); } public void solution(int a, int b) { System.out.println(a+b); } }
[ "kimiisonfire@gmail.com" ]
kimiisonfire@gmail.com
326a6afa35ecfde8bdfc3a09f4b9e160f42cd13d
55a828be24a09da9e85e265435b20603cdd91765
/DesignChallenge1/src/CustomTableModel.java
cd4734cdccef09d22d4e5faa93c83e95ca2f701b
[]
no_license
DodgeThiss/dc1
acf6b9a4db6e75d7b4e3ea2b25dbd92956f2f8a4
bf7ed89ac279515dc1ddf5b726a8157b89d05ac4
refs/heads/master
2020-03-11T11:10:53.528217
2018-04-17T21:26:21
2018-04-17T21:26:21
129,962,775
0
0
null
null
null
null
UTF-8
Java
false
false
261
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * * @author brighamdanielserrano */ class CustomTableModel { }
[ "N7@N7-PC" ]
N7@N7-PC
2f8dc2531ae394c8b7b3afec1b8cde57f6ad085d
475e4cae9dab323348e00b6ac99a57b03a57ab06
/src/Coding/UserDetails.java
04b3bd22d6abe297c79348761cfe750d1e6b6954
[]
no_license
nilushaj/StudentandTeachermanagement-Java-netbeans
fed767b31eef514fa1534f58b77df7e5d9106db5
2011580a68b67c47a1276a5dff2f75f1f7da894f
refs/heads/master
2020-05-27T16:37:49.047883
2019-05-26T16:14:02
2019-05-26T16:14:02
188,705,046
1
0
null
null
null
null
UTF-8
Java
false
false
21,897
java
package Coding; import java.awt.event.KeyEvent; import java.sql.*; import javax.swing.JOptionPane; import net.proteanit.sql.DbUtils; public final class UserDetails extends javax.swing.JFrame { private static Connection con; private static Statement stmt; private static ResultSet rs; String uid = "u1"; public UserDetails() { initComponents(); } public UserDetails(String userid) { uid = userid; initComponents(); dbConnection(); FirstRecord(); Tableusers(); } public static void dbConnection() { try { con = ConnectionManager.getConnection(); stmt = con.createStatement(); } catch (SQLException e) { JOptionPane.showMessageDialog(null, "Connection Error!!" + e); } } public void Unable() { if (!uid.equals(txtsearch.getText())) { btndelete.setEnabled(true); btnupdate.setEnabled(false); } else { btndelete.setEnabled(false); btnupdate.setEnabled(true); } } public void FirstRecord() { try { String strsql3; strsql3 = "Select User_ID,User_Name,User_Address,User_Email from user where User_ID='" + uid + "'"; ResultSet rs1 = stmt.executeQuery(strsql3); rs1.next(); txtuserid.setText(rs1.getString("User_ID")); txtusername.setText(rs1.getString("User_Name")); txtaddress.setText(rs1.getString("User_Address")); txtemail.setText(rs1.getString("User_Email")); } catch (SQLException ex) { } } public void Tableusers() { try { String tblsql = "Select User_ID,User_Name,User_Address,User_Email from user"; rs = stmt.executeQuery(tblsql); tbluser.setModel(DbUtils.resultSetToTableModel(rs)); } catch (SQLException ex) { JOptionPane.showMessageDialog(null, ex); } } @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); txtuserid = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); txtusername = new javax.swing.JTextField(); jLabel3 = new javax.swing.JLabel(); txtaddress = new javax.swing.JTextField(); txtemail = new javax.swing.JTextField(); jLabel8 = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); btnupdate = new javax.swing.JButton(); btndelete = new javax.swing.JButton(); btnnew = new javax.swing.JButton(); jScrollPane1 = new javax.swing.JScrollPane(); tbluser = new javax.swing.JTable(); btnback = new javax.swing.JButton(); jLabel7 = new javax.swing.JLabel(); btnsearch = new javax.swing.JButton(); txtsearch = new javax.swing.JTextField(); txtlogid = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE); setTitle("User Details"); setBackground(javax.swing.UIManager.getDefaults().getColor("TextArea.selectionBackground")); setName("frmmanage"); // NOI18N setResizable(false); addWindowListener(new java.awt.event.WindowAdapter() { public void windowOpened(java.awt.event.WindowEvent evt) { formWindowOpened(evt); } }); getContentPane().setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout()); jPanel1.setBackground(java.awt.SystemColor.activeCaption); jPanel1.setOpaque(false); jLabel1.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N jLabel1.setText("User ID :"); txtuserid.setEditable(false); txtuserid.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N jLabel2.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N jLabel2.setText("User Name :"); txtusername.setEditable(false); txtusername.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N jLabel3.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N jLabel3.setText("Address :"); txtaddress.setEditable(false); txtaddress.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N txtemail.setEditable(false); txtemail.setFont(new java.awt.Font("Arial", 1, 12)); // NOI18N jLabel8.setFont(new java.awt.Font("Arial", 1, 13)); // NOI18N jLabel8.setText("Email :"); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(28, 28, 28) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(txtemail, javax.swing.GroupLayout.DEFAULT_SIZE, 249, Short.MAX_VALUE)) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(txtaddress)) .addGroup(jPanel1Layout.createSequentialGroup() .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(txtuserid, javax.swing.GroupLayout.DEFAULT_SIZE, 249, Short.MAX_VALUE) .addComponent(txtusername)))) .addGap(92, 92, 92)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addGap(20, 20, 20) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(txtuserid, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent(txtusername, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3) .addComponent(txtaddress, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel8) .addComponent(txtemail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); getContentPane().add(jPanel1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 253, -1, -1)); jPanel2.setOpaque(false); btnupdate.setBackground(java.awt.SystemColor.activeCaption); btnupdate.setFont(new java.awt.Font("Traditional Arabic", 1, 14)); // NOI18N btnupdate.setText("Update"); btnupdate.setToolTipText("Update"); btnupdate.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); btnupdate.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnupdateActionPerformed(evt); } }); btndelete.setBackground(java.awt.SystemColor.activeCaption); btndelete.setFont(new java.awt.Font("Traditional Arabic", 1, 14)); // NOI18N btndelete.setText("Delete"); btndelete.setToolTipText("Delete"); btndelete.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); btndelete.setEnabled(false); btndelete.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btndeleteActionPerformed(evt); } }); btnnew.setBackground(java.awt.SystemColor.activeCaption); btnnew.setFont(new java.awt.Font("Traditional Arabic", 1, 14)); // NOI18N btnnew.setText("New User"); btnnew.setToolTipText("New User"); btnnew.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); btnnew.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnnewActionPerformed(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() .addGap(21, 21, 21) .addComponent(btnupdate, javax.swing.GroupLayout.PREFERRED_SIZE, 106, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(27, 27, 27) .addComponent(btndelete, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(btnnew, javax.swing.GroupLayout.DEFAULT_SIZE, 101, Short.MAX_VALUE) .addContainerGap()) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(37, 37, 37) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnupdate, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btndelete, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnnew, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(51, 51, 51)) ); getContentPane().add(jPanel2, new org.netbeans.lib.awtextra.AbsoluteConstraints(50, 420, 390, 90)); jPanel2.getAccessibleContext().setAccessibleName(""); jPanel2.getAccessibleContext().setAccessibleDescription(""); jScrollPane1.setBackground(javax.swing.UIManager.getDefaults().getColor("nbProgressBar.Foreground")); jScrollPane1.setOpaque(false); tbluser.setAutoCreateRowSorter(true); tbluser.setFont(new java.awt.Font("Arial", 0, 14)); // NOI18N tbluser.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null}, {null, null, null}, {null, null, null}, {null, null, null}, {null, null, null}, {null, null, null}, {null, null, null}, {null, null, null}, {null, null, null}, {null, null, null}, {null, null, null}, {null, null, null}, {null, null, null}, {null, null, null}, {null, null, null}, {null, null, null}, {null, null, null}, {null, null, null}, {null, null, null}, {null, null, null}, {null, null, null}, {null, null, null}, {null, null, null}, {null, null, null}, {null, null, null} }, new String [] { "User_ID", "User_Name", "Contact_No" } ) { boolean[] canEdit = new boolean [] { false, false, false }; public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit [columnIndex]; } }); tbluser.setAlignmentX(50.0F); tbluser.setAlignmentY(50.0F); tbluser.setEnabled(false); tbluser.setGridColor(new java.awt.Color(0, 0, 0)); tbluser.setOpaque(false); tbluser.setSelectionBackground(new java.awt.Color(255, 255, 255)); tbluser.setSelectionForeground(javax.swing.UIManager.getDefaults().getColor("Button.light")); jScrollPane1.setViewportView(tbluser); getContentPane().add(jScrollPane1, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 70, 690, 108)); btnback.setBackground(javax.swing.UIManager.getDefaults().getColor("Table.selectionBackground")); btnback.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N btnback.setText("Back"); btnback.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); btnback.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnbackActionPerformed(evt); } }); getContentPane().add(btnback, new org.netbeans.lib.awtextra.AbsoluteConstraints(640, 460, -1, -1)); jLabel7.setFont(new java.awt.Font("Rockwell", 1, 18)); // NOI18N jLabel7.setText("User Details :"); getContentPane().add(jLabel7, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 37, -1, -1)); btnsearch.setBackground(java.awt.SystemColor.textHighlight); btnsearch.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N btnsearch.setForeground(new java.awt.Color(0, 0, 255)); btnsearch.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icons/1494067890_search.png"))); // NOI18N btnsearch.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR)); btnsearch.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnsearchActionPerformed(evt); } }); getContentPane().add(btnsearch, new org.netbeans.lib.awtextra.AbsoluteConstraints(660, 300, 56, -1)); txtsearch.setFont(new java.awt.Font("Arial", 1, 14)); // NOI18N txtsearch.setForeground(new java.awt.Color(255, 0, 0)); txtsearch.setText("User ID"); txtsearch.addKeyListener(new java.awt.event.KeyAdapter() { public void keyPressed(java.awt.event.KeyEvent evt) { txtsearchKeyPressed(evt); } }); getContentPane().add(txtsearch, new org.netbeans.lib.awtextra.AbsoluteConstraints(540, 310, 114, -1)); txtlogid.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N txtlogid.setText("U1"); getContentPane().add(txtlogid, new org.netbeans.lib.awtextra.AbsoluteConstraints(670, 10, 40, 20)); jLabel4.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Icons/MTAyNHg3Njg,14811486_14707124.jpg"))); // NOI18N getContentPane().add(jLabel4, new org.netbeans.lib.awtextra.AbsoluteConstraints(0, 0, 720, 520)); pack(); setLocationRelativeTo(null); }// </editor-fold>//GEN-END:initComponents private void btnsearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnsearchActionPerformed try { Unable(); String search1 = txtsearch.getText(); String str; str = "Select User_ID,User_Name,User_Address,User_Email from user Where User_ID='" + search1 + "'"; rs = stmt.executeQuery(str); rs.next(); txtuserid.setText(rs.getString("User_ID")); txtusername.setText(rs.getString("User_Name")); txtaddress.setText(rs.getString("User_Address")); txtemail.setText(rs.getString("User_Email")); } catch (SQLException ex) { btndelete.setEnabled(false); JOptionPane.showMessageDialog(null, "Invalid User ID !!!\n\n"); } }//GEN-LAST:event_btnsearchActionPerformed private void btnbackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnbackActionPerformed new Home(uid).setVisible(true); this.setVisible(false); }//GEN-LAST:event_btnbackActionPerformed private void btnupdateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnupdateActionPerformed String updateid = txtuserid.getText(); this.setVisible(false); new UpdateUser(uid, updateid).setVisible(true); }//GEN-LAST:event_btnupdateActionPerformed private void formWindowOpened(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowOpened txtlogid.setText(uid); txtsearch.setText(uid); }//GEN-LAST:event_formWindowOpened private void btnnewActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnnewActionPerformed new NewUser(uid).setVisible(true); this.setVisible(false); }//GEN-LAST:event_btnnewActionPerformed private void btndeleteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btndeleteActionPerformed try { String delsql = "Delete from user where User_ID='" + txtuserid.getText() + "'"; if (JOptionPane.showConfirmDialog(null, "Are you want to Delete " + txtuserid.getText() + " ?", "Delete", JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) { stmt.executeUpdate(delsql); JOptionPane.showMessageDialog(null, "Successfully Deleted!!!\n\n"); this.setVisible(false); new UserDetails(uid).setVisible(true); } } catch (SQLException ex) { JOptionPane.showMessageDialog(null, "Unable to Delete!!!\n\n"); } }//GEN-LAST:event_btndeleteActionPerformed private void txtsearchKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_txtsearchKeyPressed if (evt.getKeyCode() == KeyEvent.VK_ENTER) { try { Unable(); String search1 = txtsearch.getText(); String str; str = "Select User_ID,User_Name,User_Address,User_Email from user Where User_ID='" + search1 + "'"; rs = stmt.executeQuery(str); rs.next(); txtuserid.setText(rs.getString("User_ID")); txtusername.setText(rs.getString("User_Name")); txtaddress.setText(rs.getString("User_Address")); txtemail.setText(rs.getString("User_Email")); } catch (SQLException ex) { btndelete.setEnabled(false); JOptionPane.showMessageDialog(null, "Invalid User ID !!!\n\n"); } } }//GEN-LAST:event_txtsearchKeyPressed /** * @param args the command line arguments * */ public static void main(String args[]) { java.awt.EventQueue.invokeLater(new Runnable() { @Override public void run() { new UserDetails().setVisible(true); } }); } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton btnback; private javax.swing.JButton btndelete; private javax.swing.JButton btnnew; private javax.swing.JButton btnsearch; private javax.swing.JButton btnupdate; private javax.swing.JLabel jLabel1; private javax.swing.JLabel jLabel2; private javax.swing.JLabel jLabel3; private javax.swing.JLabel jLabel4; private javax.swing.JLabel jLabel7; private javax.swing.JLabel jLabel8; private javax.swing.JPanel jPanel1; private javax.swing.JPanel jPanel2; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JTable tbluser; private javax.swing.JTextField txtaddress; private javax.swing.JTextField txtemail; private javax.swing.JLabel txtlogid; private javax.swing.JTextField txtsearch; private javax.swing.JTextField txtuserid; private javax.swing.JTextField txtusername; // End of variables declaration//GEN-END:variables }
[ "nilusha.7desilva@gmail.com" ]
nilusha.7desilva@gmail.com
4254b635ddccf00d4b189c5a4beb75640c098900
092537d92b119edb14913ccb7e2af8472dd7c79b
/src/main/java/br/com/cancastilho/config/WebjarsConfig.java
66e72573445f12871d18cc3b9fb390f53223ea0a
[]
no_license
cancastilho/spring-boot-test
890ed0cc9217e86543514eeb9500031742151312
d66374ffb4819eedd32b99db03c07f0a1d28b1f5
refs/heads/master
2021-01-12T09:33:07.409037
2017-07-07T06:33:45
2017-07-07T06:33:45
76,193,334
0
0
null
null
null
null
UTF-8
Java
false
false
547
java
package br.com.cancastilho.config; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter; @Configuration public class WebjarsConfig extends WebMvcConfigurerAdapter { @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/"); } }
[ "cancastilho@gmail.com" ]
cancastilho@gmail.com
af41cb45d67ce8b05b3f3639530628fd658921ef
f5acd38efe9f28e14a3e77cf60f938000a6660ab
/clients/android/generated/src/main/java/org/openapitools/client/model/GithubRepository.java
87220ca2d2f181356419c6ddbbe8e5d66aa86272
[ "MIT" ]
permissive
rahulyhg/swaggy-jenkins
3fc9377c8cf8643d6b4ffe4a6aceb49315afdb8e
21326779f8814a07153acaf5af15ffbbd593c48b
refs/heads/master
2020-05-04T16:14:43.369417
2019-01-27T06:27:32
2019-01-27T06:27:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,374
java
/** * Swaggy Jenkins * Jenkins API clients generated from Swagger / Open API specification * * OpenAPI spec version: 1.0.0 * Contact: blah@cliffano.com * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ package org.openapitools.client.model; import org.openapitools.client.model.GithubRepositorylinks; import org.openapitools.client.model.GithubRepositorypermissions; import io.swagger.annotations.*; import com.google.gson.annotations.SerializedName; @ApiModel(description = "") public class GithubRepository { @SerializedName("_class") private String _class = null; @SerializedName("_links") private GithubRepositorylinks links = null; @SerializedName("defaultBranch") private String defaultBranch = null; @SerializedName("description") private String description = null; @SerializedName("name") private String name = null; @SerializedName("permissions") private GithubRepositorypermissions permissions = null; @SerializedName("private") private Boolean _private = null; @SerializedName("fullName") private String fullName = null; /** **/ @ApiModelProperty(value = "") public String getClass() { return _class; } public void setClass(String _class) { this._class = _class; } /** **/ @ApiModelProperty(value = "") public GithubRepositorylinks getLinks() { return links; } public void setLinks(GithubRepositorylinks links) { this.links = links; } /** **/ @ApiModelProperty(value = "") public String getDefaultBranch() { return defaultBranch; } public void setDefaultBranch(String defaultBranch) { this.defaultBranch = defaultBranch; } /** **/ @ApiModelProperty(value = "") public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } /** **/ @ApiModelProperty(value = "") public String getName() { return name; } public void setName(String name) { this.name = name; } /** **/ @ApiModelProperty(value = "") public GithubRepositorypermissions getPermissions() { return permissions; } public void setPermissions(GithubRepositorypermissions permissions) { this.permissions = permissions; } /** **/ @ApiModelProperty(value = "") public Boolean getPrivate() { return _private; } public void setPrivate(Boolean _private) { this._private = _private; } /** **/ @ApiModelProperty(value = "") public String getFullName() { return fullName; } public void setFullName(String fullName) { this.fullName = fullName; } @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } GithubRepository githubRepository = (GithubRepository) o; return (this._class == null ? githubRepository._class == null : this._class.equals(githubRepository._class)) && (this.links == null ? githubRepository.links == null : this.links.equals(githubRepository.links)) && (this.defaultBranch == null ? githubRepository.defaultBranch == null : this.defaultBranch.equals(githubRepository.defaultBranch)) && (this.description == null ? githubRepository.description == null : this.description.equals(githubRepository.description)) && (this.name == null ? githubRepository.name == null : this.name.equals(githubRepository.name)) && (this.permissions == null ? githubRepository.permissions == null : this.permissions.equals(githubRepository.permissions)) && (this._private == null ? githubRepository._private == null : this._private.equals(githubRepository._private)) && (this.fullName == null ? githubRepository.fullName == null : this.fullName.equals(githubRepository.fullName)); } @Override public int hashCode() { int result = 17; result = 31 * result + (this._class == null ? 0: this._class.hashCode()); result = 31 * result + (this.links == null ? 0: this.links.hashCode()); result = 31 * result + (this.defaultBranch == null ? 0: this.defaultBranch.hashCode()); result = 31 * result + (this.description == null ? 0: this.description.hashCode()); result = 31 * result + (this.name == null ? 0: this.name.hashCode()); result = 31 * result + (this.permissions == null ? 0: this.permissions.hashCode()); result = 31 * result + (this._private == null ? 0: this._private.hashCode()); result = 31 * result + (this.fullName == null ? 0: this.fullName.hashCode()); return result; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class GithubRepository {\n"); sb.append(" _class: ").append(_class).append("\n"); sb.append(" links: ").append(links).append("\n"); sb.append(" defaultBranch: ").append(defaultBranch).append("\n"); sb.append(" description: ").append(description).append("\n"); sb.append(" name: ").append(name).append("\n"); sb.append(" permissions: ").append(permissions).append("\n"); sb.append(" _private: ").append(_private).append("\n"); sb.append(" fullName: ").append(fullName).append("\n"); sb.append("}\n"); return sb.toString(); } }
[ "cliffano@gmail.com" ]
cliffano@gmail.com
00ac8f15c7a8095aa4a696244cb905d2ad49866f
83807795699e4fe20f4551e4205b71bab5ba8f5f
/HWDroid/src/hwdroid/widget/NormalActionBarItem.java
f5b58275ee73715b2d1d1847509c7841394eba07
[]
no_license
xugaoyang01/hwandroid
e01a5e85f2ab8cb319ffed4f0c2452f08be6792f
2d9e27a3da776345edce75b8b57e43f1ae94e1c3
refs/heads/master
2021-03-12T23:44:29.898222
2013-07-04T15:28:04
2013-07-04T15:28:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,962
java
/* * Copyright (C) 2010 Cyril Mottier (http://www.cyrilmottier.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package hwdroid.widget; import android.view.LayoutInflater; import android.view.View; import android.widget.ImageButton; import com.hw.droid.R; /** * Default implementation of an {@link ActionBarItem}. A * {@link NormalActionBarItem} is a simple {@link ActionBarItem} containing a * single icon. * * @author Cyril Mottier */ public class NormalActionBarItem extends ActionBarItem { @Override protected View createItemView() { return LayoutInflater.from(mContext).inflate(R.layout.hw_action_bar_item_base, mActionBar, false); } @Override protected void prepareItemView() { super.prepareItemView(); final ImageButton imageButton = (ImageButton) mItemView.findViewById(R.id.hw_action_bar_item); imageButton.setImageDrawable(mDrawable); imageButton.setContentDescription(mContentDescription); } @Override protected void onContentDescriptionChanged() { super.onContentDescriptionChanged(); mItemView.findViewById(R.id.hw_action_bar_item).setContentDescription(mContentDescription); } @Override protected void onDrawableChanged() { super.onDrawableChanged(); ImageButton imageButton = (ImageButton) mItemView.findViewById(R.id.hw_action_bar_item); imageButton.setImageDrawable(mDrawable); } }
[ "gaoyang.xu@alibaba-inc.com" ]
gaoyang.xu@alibaba-inc.com
120e772c28960fd2cc59a057c7acfe29babbb247
69c00032e21079eb41b86c2085d38b8ba3e6e5cb
/Development_library/05Coding/WhhftParent/WhhftCommon/src/main/java/com/whhft/sysmanage/common/entity/SysUserExample.java
385703fd490a521c92b683bbe83a6317d589ee1d
[]
no_license
qiaobenlaing/coupon
476b90ac9c8a9bb56f4c481c3e0303adc9575133
32a53667f0c496cda0d7df71651e07f0138001d3
refs/heads/master
2023-01-20T03:40:42.118722
2020-11-20T00:59:29
2020-11-20T01:13:28
312,522,162
0
0
null
null
null
null
UTF-8
Java
false
false
27,095
java
package com.whhft.sysmanage.common.entity; import java.util.ArrayList; import java.util.List; public class SysUserExample { /** * This field was generated by MyBatis Generator. * This field corresponds to the database table sys_user * * @mbg.generated Sun Apr 16 15:11:15 CST 2017 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. * This field corresponds to the database table sys_user * * @mbg.generated Sun Apr 16 15:11:15 CST 2017 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. * This field corresponds to the database table sys_user * * @mbg.generated Sun Apr 16 15:11:15 CST 2017 */ protected List<Criteria> oredCriteria; /** * This method was generated by MyBatis Generator. * This method corresponds to the database table sys_user * * @mbg.generated Sun Apr 16 15:11:15 CST 2017 */ public SysUserExample() { oredCriteria = new ArrayList<Criteria>(); } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table sys_user * * @mbg.generated Sun Apr 16 15:11:15 CST 2017 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table sys_user * * @mbg.generated Sun Apr 16 15:11:15 CST 2017 */ public String getOrderByClause() { return orderByClause; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table sys_user * * @mbg.generated Sun Apr 16 15:11:15 CST 2017 */ public void setDistinct(boolean distinct) { this.distinct = distinct; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table sys_user * * @mbg.generated Sun Apr 16 15:11:15 CST 2017 */ public boolean isDistinct() { return distinct; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table sys_user * * @mbg.generated Sun Apr 16 15:11:15 CST 2017 */ public List<Criteria> getOredCriteria() { return oredCriteria; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table sys_user * * @mbg.generated Sun Apr 16 15:11:15 CST 2017 */ public void or(Criteria criteria) { oredCriteria.add(criteria); } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table sys_user * * @mbg.generated Sun Apr 16 15:11:15 CST 2017 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); oredCriteria.add(criteria); return criteria; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table sys_user * * @mbg.generated Sun Apr 16 15:11:15 CST 2017 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); if (oredCriteria.size() == 0) { oredCriteria.add(criteria); } return criteria; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table sys_user * * @mbg.generated Sun Apr 16 15:11:15 CST 2017 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); return criteria; } /** * This method was generated by MyBatis Generator. * This method corresponds to the database table sys_user * * @mbg.generated Sun Apr 16 15:11:15 CST 2017 */ public void clear() { oredCriteria.clear(); orderByClause = null; distinct = false; } /** * This class was generated by MyBatis Generator. * This class corresponds to the database table sys_user * * @mbg.generated Sun Apr 16 15:11:15 CST 2017 */ protected abstract static class GeneratedCriteria { protected List<Criterion> criteria; protected GeneratedCriteria() { super(); criteria = new ArrayList<Criterion>(); } public boolean isValid() { return criteria.size() > 0; } public List<Criterion> getAllCriteria() { return criteria; } public List<Criterion> getCriteria() { return criteria; } protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } public Criteria andUserIdIsNull() { addCriterion("USER_ID is null"); return (Criteria) this; } public Criteria andUserIdIsNotNull() { addCriterion("USER_ID is not null"); return (Criteria) this; } public Criteria andUserIdEqualTo(Integer value) { addCriterion("USER_ID =", value, "userId"); return (Criteria) this; } public Criteria andUserIdNotEqualTo(Integer value) { addCriterion("USER_ID <>", value, "userId"); return (Criteria) this; } public Criteria andUserIdGreaterThan(Integer value) { addCriterion("USER_ID >", value, "userId"); return (Criteria) this; } public Criteria andUserIdGreaterThanOrEqualTo(Integer value) { addCriterion("USER_ID >=", value, "userId"); return (Criteria) this; } public Criteria andUserIdLessThan(Integer value) { addCriterion("USER_ID <", value, "userId"); return (Criteria) this; } public Criteria andUserIdLessThanOrEqualTo(Integer value) { addCriterion("USER_ID <=", value, "userId"); return (Criteria) this; } public Criteria andUserIdIn(List<Integer> values) { addCriterion("USER_ID in", values, "userId"); return (Criteria) this; } public Criteria andUserIdNotIn(List<Integer> values) { addCriterion("USER_ID not in", values, "userId"); return (Criteria) this; } public Criteria andUserIdBetween(Integer value1, Integer value2) { addCriterion("USER_ID between", value1, value2, "userId"); return (Criteria) this; } public Criteria andUserIdNotBetween(Integer value1, Integer value2) { addCriterion("USER_ID not between", value1, value2, "userId"); return (Criteria) this; } public Criteria andEnabledIsNull() { addCriterion("ENABLED is null"); return (Criteria) this; } public Criteria andEnabledIsNotNull() { addCriterion("ENABLED is not null"); return (Criteria) this; } public Criteria andEnabledEqualTo(String value) { addCriterion("ENABLED =", value, "enabled"); return (Criteria) this; } public Criteria andEnabledNotEqualTo(String value) { addCriterion("ENABLED <>", value, "enabled"); return (Criteria) this; } public Criteria andEnabledGreaterThan(String value) { addCriterion("ENABLED >", value, "enabled"); return (Criteria) this; } public Criteria andEnabledGreaterThanOrEqualTo(String value) { addCriterion("ENABLED >=", value, "enabled"); return (Criteria) this; } public Criteria andEnabledLessThan(String value) { addCriterion("ENABLED <", value, "enabled"); return (Criteria) this; } public Criteria andEnabledLessThanOrEqualTo(String value) { addCriterion("ENABLED <=", value, "enabled"); return (Criteria) this; } public Criteria andEnabledLike(String value) { addCriterion("ENABLED like", value, "enabled"); return (Criteria) this; } public Criteria andEnabledNotLike(String value) { addCriterion("ENABLED not like", value, "enabled"); return (Criteria) this; } public Criteria andEnabledIn(List<String> values) { addCriterion("ENABLED in", values, "enabled"); return (Criteria) this; } public Criteria andEnabledNotIn(List<String> values) { addCriterion("ENABLED not in", values, "enabled"); return (Criteria) this; } public Criteria andEnabledBetween(String value1, String value2) { addCriterion("ENABLED between", value1, value2, "enabled"); return (Criteria) this; } public Criteria andEnabledNotBetween(String value1, String value2) { addCriterion("ENABLED not between", value1, value2, "enabled"); return (Criteria) this; } public Criteria andLoginNameIsNull() { addCriterion("LOGIN_NAME is null"); return (Criteria) this; } public Criteria andLoginNameIsNotNull() { addCriterion("LOGIN_NAME is not null"); return (Criteria) this; } public Criteria andLoginNameEqualTo(String value) { addCriterion("LOGIN_NAME =", value, "loginName"); return (Criteria) this; } public Criteria andLoginNameNotEqualTo(String value) { addCriterion("LOGIN_NAME <>", value, "loginName"); return (Criteria) this; } public Criteria andLoginNameGreaterThan(String value) { addCriterion("LOGIN_NAME >", value, "loginName"); return (Criteria) this; } public Criteria andLoginNameGreaterThanOrEqualTo(String value) { addCriterion("LOGIN_NAME >=", value, "loginName"); return (Criteria) this; } public Criteria andLoginNameLessThan(String value) { addCriterion("LOGIN_NAME <", value, "loginName"); return (Criteria) this; } public Criteria andLoginNameLessThanOrEqualTo(String value) { addCriterion("LOGIN_NAME <=", value, "loginName"); return (Criteria) this; } public Criteria andLoginNameLike(String value) { addCriterion("LOGIN_NAME like", value, "loginName"); return (Criteria) this; } public Criteria andLoginNameNotLike(String value) { addCriterion("LOGIN_NAME not like", value, "loginName"); return (Criteria) this; } public Criteria andLoginNameIn(List<String> values) { addCriterion("LOGIN_NAME in", values, "loginName"); return (Criteria) this; } public Criteria andLoginNameNotIn(List<String> values) { addCriterion("LOGIN_NAME not in", values, "loginName"); return (Criteria) this; } public Criteria andLoginNameBetween(String value1, String value2) { addCriterion("LOGIN_NAME between", value1, value2, "loginName"); return (Criteria) this; } public Criteria andLoginNameNotBetween(String value1, String value2) { addCriterion("LOGIN_NAME not between", value1, value2, "loginName"); return (Criteria) this; } public Criteria andDelFlagIsNull() { addCriterion("DEL_FLAG is null"); return (Criteria) this; } public Criteria andDelFlagIsNotNull() { addCriterion("DEL_FLAG is not null"); return (Criteria) this; } public Criteria andDelFlagEqualTo(String value) { addCriterion("DEL_FLAG =", value, "delFlag"); return (Criteria) this; } public Criteria andDelFlagNotEqualTo(String value) { addCriterion("DEL_FLAG <>", value, "delFlag"); return (Criteria) this; } public Criteria andDelFlagGreaterThan(String value) { addCriterion("DEL_FLAG >", value, "delFlag"); return (Criteria) this; } public Criteria andDelFlagGreaterThanOrEqualTo(String value) { addCriterion("DEL_FLAG >=", value, "delFlag"); return (Criteria) this; } public Criteria andDelFlagLessThan(String value) { addCriterion("DEL_FLAG <", value, "delFlag"); return (Criteria) this; } public Criteria andDelFlagLessThanOrEqualTo(String value) { addCriterion("DEL_FLAG <=", value, "delFlag"); return (Criteria) this; } public Criteria andDelFlagLike(String value) { addCriterion("DEL_FLAG like", value, "delFlag"); return (Criteria) this; } public Criteria andDelFlagNotLike(String value) { addCriterion("DEL_FLAG not like", value, "delFlag"); return (Criteria) this; } public Criteria andDelFlagIn(List<String> values) { addCriterion("DEL_FLAG in", values, "delFlag"); return (Criteria) this; } public Criteria andDelFlagNotIn(List<String> values) { addCriterion("DEL_FLAG not in", values, "delFlag"); return (Criteria) this; } public Criteria andDelFlagBetween(String value1, String value2) { addCriterion("DEL_FLAG between", value1, value2, "delFlag"); return (Criteria) this; } public Criteria andDelFlagNotBetween(String value1, String value2) { addCriterion("DEL_FLAG not between", value1, value2, "delFlag"); return (Criteria) this; } public Criteria andUpdateTimeIsNull() { addCriterion("UPDATE_TIME is null"); return (Criteria) this; } public Criteria andUpdateTimeIsNotNull() { addCriterion("UPDATE_TIME is not null"); return (Criteria) this; } public Criteria andUpdateTimeEqualTo(String value) { addCriterion("UPDATE_TIME =", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeNotEqualTo(String value) { addCriterion("UPDATE_TIME <>", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeGreaterThan(String value) { addCriterion("UPDATE_TIME >", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeGreaterThanOrEqualTo(String value) { addCriterion("UPDATE_TIME >=", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeLessThan(String value) { addCriterion("UPDATE_TIME <", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeLessThanOrEqualTo(String value) { addCriterion("UPDATE_TIME <=", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeLike(String value) { addCriterion("UPDATE_TIME like", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeNotLike(String value) { addCriterion("UPDATE_TIME not like", value, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeIn(List<String> values) { addCriterion("UPDATE_TIME in", values, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeNotIn(List<String> values) { addCriterion("UPDATE_TIME not in", values, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeBetween(String value1, String value2) { addCriterion("UPDATE_TIME between", value1, value2, "updateTime"); return (Criteria) this; } public Criteria andUpdateTimeNotBetween(String value1, String value2) { addCriterion("UPDATE_TIME not between", value1, value2, "updateTime"); return (Criteria) this; } public Criteria andUserNameIsNull() { addCriterion("USER_NAME is null"); return (Criteria) this; } public Criteria andUserNameIsNotNull() { addCriterion("USER_NAME is not null"); return (Criteria) this; } public Criteria andUserNameEqualTo(String value) { addCriterion("USER_NAME =", value, "userName"); return (Criteria) this; } public Criteria andUserNameNotEqualTo(String value) { addCriterion("USER_NAME <>", value, "userName"); return (Criteria) this; } public Criteria andUserNameGreaterThan(String value) { addCriterion("USER_NAME >", value, "userName"); return (Criteria) this; } public Criteria andUserNameGreaterThanOrEqualTo(String value) { addCriterion("USER_NAME >=", value, "userName"); return (Criteria) this; } public Criteria andUserNameLessThan(String value) { addCriterion("USER_NAME <", value, "userName"); return (Criteria) this; } public Criteria andUserNameLessThanOrEqualTo(String value) { addCriterion("USER_NAME <=", value, "userName"); return (Criteria) this; } public Criteria andUserNameLike(String value) { addCriterion("USER_NAME like", value, "userName"); return (Criteria) this; } public Criteria andUserNameNotLike(String value) { addCriterion("USER_NAME not like", value, "userName"); return (Criteria) this; } public Criteria andUserNameIn(List<String> values) { addCriterion("USER_NAME in", values, "userName"); return (Criteria) this; } public Criteria andUserNameNotIn(List<String> values) { addCriterion("USER_NAME not in", values, "userName"); return (Criteria) this; } public Criteria andUserNameBetween(String value1, String value2) { addCriterion("USER_NAME between", value1, value2, "userName"); return (Criteria) this; } public Criteria andUserNameNotBetween(String value1, String value2) { addCriterion("USER_NAME not between", value1, value2, "userName"); return (Criteria) this; } public Criteria andUserPwdIsNull() { addCriterion("USER_PWD is null"); return (Criteria) this; } public Criteria andUserPwdIsNotNull() { addCriterion("USER_PWD is not null"); return (Criteria) this; } public Criteria andUserPwdEqualTo(String value) { addCriterion("USER_PWD =", value, "userPwd"); return (Criteria) this; } public Criteria andUserPwdNotEqualTo(String value) { addCriterion("USER_PWD <>", value, "userPwd"); return (Criteria) this; } public Criteria andUserPwdGreaterThan(String value) { addCriterion("USER_PWD >", value, "userPwd"); return (Criteria) this; } public Criteria andUserPwdGreaterThanOrEqualTo(String value) { addCriterion("USER_PWD >=", value, "userPwd"); return (Criteria) this; } public Criteria andUserPwdLessThan(String value) { addCriterion("USER_PWD <", value, "userPwd"); return (Criteria) this; } public Criteria andUserPwdLessThanOrEqualTo(String value) { addCriterion("USER_PWD <=", value, "userPwd"); return (Criteria) this; } public Criteria andUserPwdLike(String value) { addCriterion("USER_PWD like", value, "userPwd"); return (Criteria) this; } public Criteria andUserPwdNotLike(String value) { addCriterion("USER_PWD not like", value, "userPwd"); return (Criteria) this; } public Criteria andUserPwdIn(List<String> values) { addCriterion("USER_PWD in", values, "userPwd"); return (Criteria) this; } public Criteria andUserPwdNotIn(List<String> values) { addCriterion("USER_PWD not in", values, "userPwd"); return (Criteria) this; } public Criteria andUserPwdBetween(String value1, String value2) { addCriterion("USER_PWD between", value1, value2, "userPwd"); return (Criteria) this; } public Criteria andUserPwdNotBetween(String value1, String value2) { addCriterion("USER_PWD not between", value1, value2, "userPwd"); return (Criteria) this; } public Criteria andRemarkIsNull() { addCriterion("REMARK is null"); return (Criteria) this; } public Criteria andRemarkIsNotNull() { addCriterion("REMARK is not null"); return (Criteria) this; } public Criteria andRemarkEqualTo(String value) { addCriterion("REMARK =", value, "remark"); return (Criteria) this; } public Criteria andRemarkNotEqualTo(String value) { addCriterion("REMARK <>", value, "remark"); return (Criteria) this; } public Criteria andRemarkGreaterThan(String value) { addCriterion("REMARK >", value, "remark"); return (Criteria) this; } public Criteria andRemarkGreaterThanOrEqualTo(String value) { addCriterion("REMARK >=", value, "remark"); return (Criteria) this; } public Criteria andRemarkLessThan(String value) { addCriterion("REMARK <", value, "remark"); return (Criteria) this; } public Criteria andRemarkLessThanOrEqualTo(String value) { addCriterion("REMARK <=", value, "remark"); return (Criteria) this; } public Criteria andRemarkLike(String value) { addCriterion("REMARK like", value, "remark"); return (Criteria) this; } public Criteria andRemarkNotLike(String value) { addCriterion("REMARK not like", value, "remark"); return (Criteria) this; } public Criteria andRemarkIn(List<String> values) { addCriterion("REMARK in", values, "remark"); return (Criteria) this; } public Criteria andRemarkNotIn(List<String> values) { addCriterion("REMARK not in", values, "remark"); return (Criteria) this; } public Criteria andRemarkBetween(String value1, String value2) { addCriterion("REMARK between", value1, value2, "remark"); return (Criteria) this; } public Criteria andRemarkNotBetween(String value1, String value2) { addCriterion("REMARK not between", value1, value2, "remark"); return (Criteria) this; } } /** * This class was generated by MyBatis Generator. * This class corresponds to the database table sys_user * * @mbg.generated do_not_delete_during_merge Sun Apr 16 15:11:15 CST 2017 */ public static class Criteria extends GeneratedCriteria { protected Criteria() { super(); } } /** * This class was generated by MyBatis Generator. * This class corresponds to the database table sys_user * * @mbg.generated Sun Apr 16 15:11:15 CST 2017 */ public static class Criterion { private String condition; private Object value; private Object secondValue; private boolean noValue; private boolean singleValue; private boolean betweenValue; private boolean listValue; private String typeHandler; public String getCondition() { return condition; } public Object getValue() { return value; } public Object getSecondValue() { return secondValue; } public boolean isNoValue() { return noValue; } public boolean isSingleValue() { return singleValue; } public boolean isBetweenValue() { return betweenValue; } public boolean isListValue() { return listValue; } public String getTypeHandler() { return typeHandler; } protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; this.value = value; this.typeHandler = typeHandler; if (value instanceof List<?>) { this.listValue = true; } else { this.singleValue = true; } } protected Criterion(String condition, Object value) { this(condition, value, null); } protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; this.value = value; this.secondValue = secondValue; this.typeHandler = typeHandler; this.betweenValue = true; } protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } } }
[ "980415842@qq.com" ]
980415842@qq.com
1c2d620d5023014fcf43c83f03fa297754740c2c
0b076d245604cdf5a158183c1ce564cd63253755
/src/main/java/com/onemount/dungtran/App.java
5a5cd5b7d6b41f6dedcba55fca2703df606342a9
[]
no_license
Dungtran8/Test-Register-and-Login
acf39a29b197f1c8985ec10eaf40e5ff102b0dae
f18535569502642a470bcb8fee4f7b8ee8b7705d
refs/heads/main
2023-07-11T08:10:45.903185
2021-08-12T13:18:47
2021-08-12T13:18:47
394,961,790
0
0
null
null
null
null
UTF-8
Java
false
false
184
java
package com.onemount.dungtran; /** * Hello world! * */ public class App { public static void main( String[] args ) { System.out.println( "Hello World!" ); } }
[ "dung.tran8@onemount.com" ]
dung.tran8@onemount.com
fc6ee45c023e6e74b34ea3b4d6740856ff67d685
dc17a43f25cfd1d3ecf0ffebf709b2721c80031d
/IDE/editor/com.lembed.lite.studio.manager.analysis.editor/elf/com/lembed/lite/studio/manager/analysis/editor/elf/ui/widgets/package-info.java
e43553d38dd2136b373cdc14c0c08d4f59eed168
[]
no_license
skykying/bundle
e7b25a8d56668a5cb1cd70932d14958927960e50
0b3b590760baa953677eb99e07d7e1a37af5434c
refs/heads/master
2023-01-07T20:03:42.318642
2020-11-08T06:36:39
2020-11-08T06:36:39
306,216,461
0
0
null
null
null
null
UTF-8
Java
false
false
647
java
/******************************************************************************* * Copyright (C) 2017 Lembed Electronic. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Lembed Electronic - initial API and implementation ******************************************************************************/ /** * */ /** * @author Administrator * */ package com.lembed.lite.studio.manager.analysis.editor.elf.ui.widgets;
[ "root@lembed.com" ]
root@lembed.com
2b27678143389bbcb5ac9302b10c2dd5739dbc5c
6253283b67c01a0d7395e38aeeea65e06f62504b
/decompile/app/Gallery2/src/main/java/tmsdkobf/mv.java
cd2c633b433dc3b43147f28bc0241041c94651d1
[]
no_license
sufadi/decompile-hw
2e0457a0a7ade103908a6a41757923a791248215
4c3efd95f3e997b44dd4ceec506de6164192eca3
refs/heads/master
2023-03-15T15:56:03.968086
2017-11-08T03:29:10
2017-11-08T03:29:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
40,181
java
package tmsdkobf; import android.content.Context; import android.net.Proxy; import android.os.Bundle; import android.os.Looper; import android.support.v4.app.FragmentTransaction; import android.text.TextUtils; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.SocketException; import java.net.SocketTimeoutException; import java.net.URI; import java.net.URISyntaxException; import java.util.zip.InflaterInputStream; import org.apache.http.HttpEntity; import org.apache.http.HttpResponse; import org.apache.http.client.ClientProtocolException; import org.apache.http.client.HttpClient; import org.apache.http.client.methods.HttpGet; import tmsdk.common.ErrorCode; import tmsdk.common.exception.NetWorkException; import tmsdk.common.exception.NetworkOnMainThreadException; import tmsdk.common.module.intelli_sms.SmsCheckResult; import tmsdk.common.utils.d; import tmsdk.common.utils.f; /* compiled from: Unknown */ public class mv extends mt { private HttpGet BN = null; private String BO = null; private String BP = null; private String BQ = null; private String BR = null; private int BS = 0; private long BT = 0; private boolean BU = false; private Context mContext; private boolean mIsCanceled = false; private long mTotalSize = 0; /* compiled from: Unknown */ public interface a { boolean cE(String str); } public mv(Context context) { if (!f.iA() && Thread.currentThread().getId() == Looper.getMainLooper().getThread().getId()) { throw new NetworkOnMainThreadException(); } this.mContext = context; this.BO = context.getCacheDir().getAbsolutePath(); this.BP = context.getFilesDir().getAbsolutePath(); this.BN = new HttpGet(); if (f.iw() == cz.gE) { g(Proxy.getDefaultHost(), Proxy.getDefaultPort()); E(true); } } private int F(boolean z) throws NetWorkException { File file; FileNotFoundException e; Object obj; FileInputStream fileInputStream; IOException e2; Exception e3; Throwable th; FileInputStream fileInputStream2; FileInputStream fileInputStream3 = -7001; FileInputStream fileInputStream4 = null; d.d("HttpGetFile", this.BO + File.separator + this.BQ); FileOutputStream fileOutputStream = "HttpGetFile"; File file2 = this.BP + File.separator + this.BR; d.d(fileOutputStream, file2); try { file2 = new File(this.BO, this.BQ); try { FileOutputStream fileOutputStream2; int i; int i2; if (file2.exists()) { byte[] bArr; int read; if (this.BS == 1) { if (this.mContext.getFilesDir().getAbsolutePath().equals(this.BP)) { fileOutputStream = this.mContext.openFileOutput(this.BR, 1); fileInputStream3 = new FileInputStream(file2); bArr = new byte[1024]; while (true) { read = fileInputStream3.read(bArr); if (read == -1) { break; } fileOutputStream.write(bArr, 0, read); } fileInputStream4 = fileInputStream3; fileOutputStream2 = fileOutputStream; i = 0; } } file = new File(this.BP + File.separator + this.BR); if (file.exists()) { file.delete(); fileOutputStream = new FileOutputStream(file); } else { file.getParentFile().mkdirs(); file.createNewFile(); fileOutputStream = new FileOutputStream(file); } try { fileInputStream3 = new FileInputStream(file2); try { bArr = new byte[1024]; while (true) { read = fileInputStream3.read(bArr); if (read == -1) { break; } fileOutputStream.write(bArr, 0, read); } fileInputStream4 = fileInputStream3; fileOutputStream2 = fileOutputStream; i = 0; } catch (FileNotFoundException e4) { e = e4; obj = fileOutputStream; fileInputStream = fileInputStream3; file = file2; } catch (IOException e5) { e2 = e5; } catch (Exception e6) { e3 = e6; } } catch (FileNotFoundException e7) { obj = fileOutputStream; fileInputStream = null; e = e7; file = file2; try { d.c("HttpBase", "file not found"); e.printStackTrace(); throw new NetWorkException(-7001, e.getMessage()); } catch (Throwable th2) { th = th2; file2 = file; fileInputStream3 = fileInputStream; fileOutputStream = fileInputStream2; if (fileInputStream3 != null) { try { fileInputStream3.close(); } catch (IOException e8) { d.c("HttpBase", "fis close file error"); e8.printStackTrace(); } } if (fileOutputStream != null) { try { fileOutputStream.close(); } catch (IOException e82) { d.c("HttpBase", "fosclose file error"); e82.printStackTrace(); } } if (z && file2 != null && file2.exists()) { file2.delete(); } throw th; } } catch (IOException e822) { IOException iOException = e822; fileInputStream3 = null; e2 = iOException; d.c("HttpBase", "file io error"); e2.printStackTrace(); throw new NetWorkException(-7056, e2.getMessage()); } catch (Exception e9) { Exception exception = e9; fileInputStream3 = null; e3 = exception; d.c("HttpBase", "file op error"); e3.printStackTrace(); throw new NetWorkException((int) ErrorCode.ERR_FILE_OP, e3.getMessage()); } catch (Throwable th3) { Throwable th4 = th3; fileInputStream3 = null; th = th4; if (fileInputStream3 != null) { fileInputStream3.close(); } if (fileOutputStream != null) { fileOutputStream.close(); } file2.delete(); throw th; } } i = -7001; fileOutputStream2 = null; if (fileInputStream4 != null) { try { fileInputStream4.close(); } catch (IOException e22) { d.c("HttpBase", "fis close file error"); e22.printStackTrace(); i2 = ErrorCode.ERR_FILE_OP; } } i2 = i; if (fileOutputStream2 != null) { try { fileOutputStream2.close(); } catch (IOException e222) { d.c("HttpBase", "fosclose file error"); e222.printStackTrace(); i2 = ErrorCode.ERR_FILE_OP; } } if (z && file2 != null && file2.exists()) { file2.delete(); } return i2; } catch (FileNotFoundException e72) { fileInputStream = null; fileInputStream2 = null; e = e72; file = file2; d.c("HttpBase", "file not found"); e.printStackTrace(); throw new NetWorkException(-7001, e.getMessage()); } catch (IOException e8222) { Object obj2 = null; e222 = e8222; fileInputStream3 = null; d.c("HttpBase", "file io error"); e222.printStackTrace(); throw new NetWorkException(-7056, e222.getMessage()); } catch (Exception e92) { fileInputStream = null; e3 = e92; fileInputStream3 = null; d.c("HttpBase", "file op error"); e3.printStackTrace(); throw new NetWorkException((int) ErrorCode.ERR_FILE_OP, e3.getMessage()); } catch (Throwable th32) { fileOutputStream = null; th = th32; fileInputStream3 = null; if (fileInputStream3 != null) { fileInputStream3.close(); } if (fileOutputStream != null) { fileOutputStream.close(); } file2.delete(); throw th; } } catch (FileNotFoundException e722) { fileInputStream = null; fileInputStream2 = null; FileNotFoundException fileNotFoundException = e722; Object obj3 = null; e = fileNotFoundException; d.c("HttpBase", "file not found"); e.printStackTrace(); throw new NetWorkException(-7001, e.getMessage()); } catch (IOException e82222) { file2 = null; fileOutputStream = null; e222 = e82222; fileInputStream3 = null; d.c("HttpBase", "file io error"); e222.printStackTrace(); throw new NetWorkException(-7056, e222.getMessage()); } catch (Exception e922) { FileInputStream fileInputStream5 = null; fileInputStream = null; e3 = e922; fileInputStream3 = null; d.c("HttpBase", "file op error"); e3.printStackTrace(); throw new NetWorkException((int) ErrorCode.ERR_FILE_OP, e3.getMessage()); } catch (Throwable th5) { th = th5; if (fileInputStream3 != null) { fileInputStream3.close(); } if (fileOutputStream != null) { fileOutputStream.close(); } file2.delete(); throw th; } } /* JADX WARNING: inconsistent code. */ /* Code decompiled incorrectly, please refer to instructions dump. */ private int a(HttpEntity httpEntity, Bundle bundle, boolean z) throws NetWorkException { FileOutputStream fileOutputStream; InputStream inflaterInputStream; FileNotFoundException e; Throwable th; SocketException e2; SocketTimeoutException e3; IOException e4; Exception e5; Object obj; FileOutputStream fileOutputStream2 = null; InputStream inputStream = null; byte[] bArr = new byte[FragmentTransaction.TRANSIT_EXIT_MASK]; try { this.mTotalSize = httpEntity.getContentLength() + this.BT; int i = (int) ((this.BT * 100) / this.mTotalSize); File file = new File(this.BO, this.BQ); if (!file.exists()) { file.getParentFile().mkdirs(); file.createNewFile(); } fileOutputStream = new FileOutputStream(file, true); if (z) { inflaterInputStream = new InflaterInputStream(httpEntity.getContent()); } else { try { inflaterInputStream = httpEntity.getContent(); } catch (FileNotFoundException e6) { e = e6; fileOutputStream2 = fileOutputStream; try { d.c("HttpBase", "file not found"); e.printStackTrace(); throw new NetWorkException(-7001, e.getMessage()); } catch (Throwable th2) { th = th2; fileOutputStream = fileOutputStream2; if (inputStream != null) { d.d("HttpBase", "is closing file"); try { inputStream.close(); } catch (IOException e7) { d.c("HttpBase", "is close file error"); e7.printStackTrace(); } } if (fileOutputStream != null) { d.d("HttpBase", "fos closing file"); try { fileOutputStream.close(); } catch (IOException e72) { d.c("HttpBase", "fos close file error"); e72.printStackTrace(); } } throw th; } } catch (SocketException e8) { e2 = e8; d.c("HttpBase", "socket error:" + e2.getMessage()); e2.printStackTrace(); throw new NetWorkException(-5054, e2.getMessage()); } catch (SocketTimeoutException e9) { e3 = e9; d.c("HttpBase", "socket timeout error:" + e3.getMessage()); e3.printStackTrace(); throw new NetWorkException(-5055, e3.getMessage()); } catch (IOException e10) { e4 = e10; d.c("HttpBase", "socket or file io error"); e4.printStackTrace(); throw new NetWorkException(-5056, e4.getMessage()); } catch (Exception e11) { e5 = e11; d.c("HttpBase", e5.toString()); d.c("HttpBase", "receive data error"); e5.printStackTrace(); throw new NetWorkException((int) ErrorCode.ERR_RECEIVE, e5.getMessage()); } } int i2 = 0; int i3 = i; while (true) { try { int read = inflaterInputStream.read(bArr); if (read != -1) { if (this.mIsCanceled) { break; } this.BT += (long) read; i = i2 + read; i2 = (int) ((this.BT * 100) / this.mTotalSize); if (i2 != i3) { bundle.putInt("key_progress", i2); a(2, bundle); i3 = i2; } fileOutputStream.write(bArr, 0, read); i2 = i; } else { break; } } catch (FileNotFoundException e12) { fileOutputStream2 = fileOutputStream; InputStream inputStream2 = inflaterInputStream; e = e12; inputStream = inputStream2; } catch (SocketException e13) { SocketException socketException = e13; inputStream = inflaterInputStream; e2 = socketException; } catch (SocketTimeoutException e14) { SocketTimeoutException socketTimeoutException = e14; inputStream = inflaterInputStream; e3 = socketTimeoutException; } catch (IOException e722) { IOException iOException = e722; inputStream = inflaterInputStream; e4 = iOException; } catch (Exception e15) { Exception exception = e15; inputStream = inflaterInputStream; e5 = exception; } catch (Throwable th3) { Throwable th4 = th3; inputStream = inflaterInputStream; th = th4; } } fileOutputStream.flush(); d.d("HttpBase", "mTotalSize: " + this.mTotalSize + ", mCompletedSize: " + this.BT + ", httpEntity.getContentLength(): " + httpEntity.getContentLength()); i3 = ((long) i2) == httpEntity.getContentLength() ? 0 : -7; if (inflaterInputStream != null) { d.d("HttpBase", "is closing file"); try { inflaterInputStream.close(); } catch (IOException e42) { i3 = ErrorCode.ERR_FILE_OP; d.c("HttpBase", "is close file error"); e42.printStackTrace(); } } int i4 = i3; if (fileOutputStream != null) { d.d("HttpBase", "fos closing file"); try { fileOutputStream.close(); } catch (IOException e7222) { i4 = ErrorCode.ERR_FILE_OP; d.c("HttpBase", "fos close file error"); e7222.printStackTrace(); } } return i4; if (fileOutputStream != null) { d.d("HttpBase", "fos closing file"); try { fileOutputStream.close(); } catch (IOException e422) { d.c("HttpBase", "fos close file error"); e422.printStackTrace(); } } return -5003; return -5003; } catch (FileNotFoundException e16) { e = e16; d.c("HttpBase", "file not found"); e.printStackTrace(); throw new NetWorkException(-7001, e.getMessage()); } catch (SocketException e17) { e2 = e17; fileOutputStream = null; d.c("HttpBase", "socket error:" + e2.getMessage()); e2.printStackTrace(); throw new NetWorkException(-5054, e2.getMessage()); } catch (SocketTimeoutException e18) { e3 = e18; obj = null; d.c("HttpBase", "socket timeout error:" + e3.getMessage()); e3.printStackTrace(); throw new NetWorkException(-5055, e3.getMessage()); } catch (IOException e19) { e422 = e19; obj = null; d.c("HttpBase", "socket or file io error"); e422.printStackTrace(); throw new NetWorkException(-5056, e422.getMessage()); } catch (Exception e20) { e5 = e20; obj = null; d.c("HttpBase", e5.toString()); d.c("HttpBase", "receive data error"); e5.printStackTrace(); throw new NetWorkException((int) ErrorCode.ERR_RECEIVE, e5.getMessage()); } catch (Throwable th5) { th = th5; if (inputStream != null) { d.d("HttpBase", "is closing file"); inputStream.close(); } if (fileOutputStream != null) { d.d("HttpBase", "fos closing file"); fileOutputStream.close(); } throw th; } } private int cD(String str) throws NetWorkException { try { URI uri = new URI(str); if (uri == null) { return -1000; } this.BN.setURI(uri); return 0; } catch (URISyntaxException e) { d.c("HttpBase", "url error: " + e.getMessage()); e.printStackTrace(); throw new NetWorkException(-1053, e.getMessage()); } } public int a(String str, String str2, boolean z, a aVar) { String str3; String message; Throwable th; int i; int i2 = ErrorCode.ERR_GET; String str4 = ""; HttpClient httpClient = null; HttpResponse httpResponse = null; Bundle bundle = new Bundle(); int i3; try { httpClient = eZ(); i2 = cD(str2); if (i2 == 0) { if (!this.mIsCanceled) { if (this.BN.getURI() != null) { str3 = "downloadfile"; if (TextUtils.isEmpty(str)) { str = ms.q(str2, null); } this.BQ = str + ".tmp"; d.d("HttpBase", "mTempName: " + this.BQ); if (this.BR == null) { this.BR = str; } File file = new File(this.BO, this.BQ); if (file.exists()) { this.BT = file.length(); this.BN.setHeader("RANGE", "bytes=" + this.BT + "-"); this.BU = true; } httpResponse = httpClient.execute(this.BN); int statusCode = httpResponse.getStatusLine().getStatusCode(); d.d("HttpBase", "statusCode == " + statusCode); if (statusCode != SmsCheckResult.ESCT_200 && statusCode != SmsCheckResult.ESCT_206) { i3 = -3000 - statusCode; if (httpClient != null) { httpClient.getConnectionManager().shutdown(); } if (httpResponse != null) { if (i3 == 0 || i3 == -7) { return i3; } bundle.putInt("key_errcode", i3); bundle.putString("key_errorMsg", str4); bundle.putInt("key_downSize", (int) this.BT); bundle.putInt("key_total", (int) this.mTotalSize); bundle.putInt("key_sdcardstatus", ms.p(this.mTotalSize - this.BT)); bundle.putByte("key_downType", (byte) (this.BU ? 0 : 1)); a(1, bundle); return i3; } else if (i3 == 0) { return i3; } else { bundle.putInt("key_errcode", i3); bundle.putString("key_errorMsg", str4); bundle.putInt("key_downSize", (int) this.BT); bundle.putInt("key_total", (int) this.mTotalSize); bundle.putInt("key_sdcardstatus", ms.p(this.mTotalSize - this.BT)); if (this.BU) { } bundle.putByte("key_downType", (byte) (this.BU ? 0 : 1)); a(1, bundle); return i3; } } else if (!this.mIsCanceled) { HttpEntity entity = httpResponse.getEntity(); if (entity != null) { i2 = a(entity, bundle, z); if (i2 == 0) { if (aVar != null) { if (!aVar.cE(this.BO + File.separator + this.BQ)) { i2 = ErrorCode.ERR_FILE_OP; new File(this.BO + File.separator + this.BQ).delete(); } } i2 = F(true); if (i2 == 0) { i3 = 0; if (httpClient != null) { httpClient.getConnectionManager().shutdown(); } if (httpResponse != null) { if (i3 == 0) { return i3; } bundle.putInt("key_errcode", i3); bundle.putString("key_errorMsg", str4); bundle.putInt("key_downSize", (int) this.BT); bundle.putInt("key_total", (int) this.mTotalSize); bundle.putInt("key_sdcardstatus", ms.p(this.mTotalSize - this.BT)); if (this.BU) { } bundle.putByte("key_downType", (byte) (this.BU ? 0 : 1)); a(1, bundle); return i3; } else if (i3 == 0) { return i3; } else { bundle.putInt("key_errcode", i3); bundle.putString("key_errorMsg", str4); bundle.putInt("key_downSize", (int) this.BT); bundle.putInt("key_total", (int) this.mTotalSize); bundle.putInt("key_sdcardstatus", ms.p(this.mTotalSize - this.BT)); if (this.BU) { } bundle.putByte("key_downType", (byte) (this.BU ? 0 : 1)); a(1, bundle); return i3; } } } else if (i2 != -7) { } } else { i2 = ErrorCode.ERR_RESPONSE; d.c("HttpBase", "httpEntity == null"); } } } else { i2 = -3053; d.c("HttpBase", "url == null"); } } i3 = -3003; if (httpClient != null) { httpClient.getConnectionManager().shutdown(); } if (httpResponse != null) { if (i3 == 0) { return i3; } bundle.putInt("key_errcode", i3); bundle.putString("key_errorMsg", str4); bundle.putInt("key_downSize", (int) this.BT); bundle.putInt("key_total", (int) this.mTotalSize); bundle.putInt("key_sdcardstatus", ms.p(this.mTotalSize - this.BT)); if (this.BU) { } bundle.putByte("key_downType", (byte) (this.BU ? 0 : 1)); a(1, bundle); return i3; } else if (i3 == 0) { return i3; } else { bundle.putInt("key_errcode", i3); bundle.putString("key_errorMsg", str4); bundle.putInt("key_downSize", (int) this.BT); bundle.putInt("key_total", (int) this.mTotalSize); bundle.putInt("key_sdcardstatus", ms.p(this.mTotalSize - this.BT)); if (this.BU) { } bundle.putByte("key_downType", (byte) (this.BU ? 0 : 1)); a(1, bundle); return i3; } } i3 = i2; if (httpClient != null) { httpClient.getConnectionManager().shutdown(); } if (httpResponse != null) { if (i3 == 0) { return i3; } bundle.putInt("key_errcode", i3); bundle.putString("key_errorMsg", str4); bundle.putInt("key_downSize", (int) this.BT); bundle.putInt("key_total", (int) this.mTotalSize); bundle.putInt("key_sdcardstatus", ms.p(this.mTotalSize - this.BT)); if (this.BU) { } bundle.putByte("key_downType", (byte) (this.BU ? 0 : 1)); a(1, bundle); return i3; } else if (i3 == 0) { return i3; } else { bundle.putInt("key_errcode", i3); bundle.putString("key_errorMsg", str4); bundle.putInt("key_downSize", (int) this.BT); bundle.putInt("key_total", (int) this.mTotalSize); bundle.putInt("key_sdcardstatus", ms.p(this.mTotalSize - this.BT)); if (this.BU) { } bundle.putByte("key_downType", (byte) (this.BU ? 0 : 1)); a(1, bundle); return i3; } } catch (ClientProtocolException e) { i3 = -3051; message = e.getMessage(); d.c("HttpBase", "protocol error:" + e.getMessage()); e.printStackTrace(); if (httpClient != null) { httpClient.getConnectionManager().shutdown(); } if (httpResponse == null) { bundle.putInt("key_errcode", -3051); bundle.putString("key_errorMsg", message); bundle.putInt("key_downSize", (int) this.BT); bundle.putInt("key_total", (int) this.mTotalSize); bundle.putInt("key_sdcardstatus", ms.p(this.mTotalSize - this.BT)); } else { bundle.putInt("key_errcode", -3051); bundle.putString("key_errorMsg", message); bundle.putInt("key_downSize", (int) this.BT); bundle.putInt("key_total", (int) this.mTotalSize); bundle.putInt("key_sdcardstatus", ms.p(this.mTotalSize - this.BT)); } bundle.putByte("key_downType", (byte) (!this.BU ? 0 : 1)); a(1, bundle); return -3051; } catch (SocketException e2) { i3 = -3054; message = e2.getMessage(); d.c("HttpBase", "socket error:" + e2.getMessage()); e2.printStackTrace(); if (httpClient != null) { httpClient.getConnectionManager().shutdown(); } if (httpResponse == null) { bundle.putInt("key_errcode", -3054); bundle.putString("key_errorMsg", message); bundle.putInt("key_downSize", (int) this.BT); bundle.putInt("key_total", (int) this.mTotalSize); bundle.putInt("key_sdcardstatus", ms.p(this.mTotalSize - this.BT)); } else { bundle.putInt("key_errcode", -3054); bundle.putString("key_errorMsg", message); bundle.putInt("key_downSize", (int) this.BT); bundle.putInt("key_total", (int) this.mTotalSize); bundle.putInt("key_sdcardstatus", ms.p(this.mTotalSize - this.BT)); } bundle.putByte("key_downType", (byte) (!this.BU ? 0 : 1)); a(1, bundle); return -3054; } catch (SocketTimeoutException e3) { i3 = -3055; message = e3.getMessage(); d.c("HttpBase", "socket timeout error:" + e3.getMessage()); e3.printStackTrace(); if (httpClient != null) { httpClient.getConnectionManager().shutdown(); } if (httpResponse == null) { bundle.putInt("key_errcode", -3055); bundle.putString("key_errorMsg", message); bundle.putInt("key_downSize", (int) this.BT); bundle.putInt("key_total", (int) this.mTotalSize); bundle.putInt("key_sdcardstatus", ms.p(this.mTotalSize - this.BT)); } else { bundle.putInt("key_errcode", -3055); bundle.putString("key_errorMsg", message); bundle.putInt("key_downSize", (int) this.BT); bundle.putInt("key_total", (int) this.mTotalSize); bundle.putInt("key_sdcardstatus", ms.p(this.mTotalSize - this.BT)); } bundle.putByte("key_downType", (byte) (!this.BU ? 0 : 1)); a(1, bundle); return -3055; } catch (IOException e4) { i3 = -3056; message = e4.getMessage(); d.c("HttpBase", "io error:" + e4.getMessage()); e4.printStackTrace(); if (httpClient != null) { httpClient.getConnectionManager().shutdown(); } if (httpResponse == null) { bundle.putInt("key_errcode", -3056); bundle.putString("key_errorMsg", message); bundle.putInt("key_downSize", (int) this.BT); bundle.putInt("key_total", (int) this.mTotalSize); bundle.putInt("key_sdcardstatus", ms.p(this.mTotalSize - this.BT)); } else { bundle.putInt("key_errcode", -3056); bundle.putString("key_errorMsg", message); bundle.putInt("key_downSize", (int) this.BT); bundle.putInt("key_total", (int) this.mTotalSize); bundle.putInt("key_sdcardstatus", ms.p(this.mTotalSize - this.BT)); } bundle.putByte("key_downType", (byte) (!this.BU ? 0 : 1)); a(1, bundle); return -3056; } catch (NetWorkException e5) { i2 = e5.getErrCode(); str3 = e5.getMessage(); if (httpClient != null) { httpClient.getConnectionManager().shutdown(); } if (httpResponse == null) { if (!(i2 == 0 || i2 == -7)) { bundle.putInt("key_errcode", i2); bundle.putString("key_errorMsg", str3); bundle.putInt("key_downSize", (int) this.BT); bundle.putInt("key_total", (int) this.mTotalSize); bundle.putInt("key_sdcardstatus", ms.p(this.mTotalSize - this.BT)); bundle.putByte("key_downType", (byte) (this.BU ? 0 : 1)); a(1, bundle); } return i2; } bundle.putInt("key_errcode", i2); bundle.putString("key_errorMsg", str3); bundle.putInt("key_downSize", (int) this.BT); bundle.putInt("key_total", (int) this.mTotalSize); bundle.putInt("key_sdcardstatus", ms.p(this.mTotalSize - this.BT)); if (this.BU) { } bundle.putByte("key_downType", (byte) (this.BU ? 0 : 1)); a(1, bundle); return i2; } catch (Exception e6) { i3 = ErrorCode.ERR_GET; message = e6.getMessage(); d.c("HttpBase", "get error:" + e6.getMessage()); e6.printStackTrace(); if (httpClient != null) { httpClient.getConnectionManager().shutdown(); } if (httpResponse == null) { bundle.putInt("key_errcode", ErrorCode.ERR_GET); bundle.putString("key_errorMsg", message); bundle.putInt("key_downSize", (int) this.BT); bundle.putInt("key_total", (int) this.mTotalSize); bundle.putInt("key_sdcardstatus", ms.p(this.mTotalSize - this.BT)); } else { bundle.putInt("key_errcode", ErrorCode.ERR_GET); bundle.putString("key_errorMsg", message); bundle.putInt("key_downSize", (int) this.BT); bundle.putInt("key_total", (int) this.mTotalSize); bundle.putInt("key_sdcardstatus", ms.p(this.mTotalSize - this.BT)); } bundle.putByte("key_downType", (byte) (!this.BU ? 0 : 1)); a(1, bundle); return ErrorCode.ERR_GET; } catch (Throwable th2) { th = th2; String str5 = str4; i = i2; message = str5; if (httpClient != null) { httpClient.getConnectionManager().shutdown(); } if (httpResponse == null) { bundle.putInt("key_errcode", i); bundle.putString("key_errorMsg", message); bundle.putInt("key_downSize", (int) this.BT); bundle.putInt("key_total", (int) this.mTotalSize); bundle.putInt("key_sdcardstatus", ms.p(this.mTotalSize - this.BT)); if (this.BU) { } bundle.putByte("key_downType", (byte) (this.BU ? 0 : 1)); a(1, bundle); throw th; } bundle.putInt("key_errcode", i); bundle.putString("key_errorMsg", message); bundle.putInt("key_downSize", (int) this.BT); bundle.putInt("key_total", (int) this.mTotalSize); bundle.putInt("key_sdcardstatus", ms.p(this.mTotalSize - this.BT)); if (this.BU) { } bundle.putByte("key_downType", (byte) (this.BU ? 0 : 1)); a(1, bundle); throw th; } } public void cB(String str) { this.BP = str; } public void cC(String str) { this.BR = str; } }
[ "liming@droi.com" ]
liming@droi.com
179a0ad5ff37f0150f58d3fd2059df1c22cf0c89
d4407210039ed7fef8f00b52736c648d907d0fc8
/carwashadmin/src/main/java/com/jay/carwashadmin/model/TransactionRequest.java
9f562c2c5861d64797e9e54aea0d0c1e76b066da
[]
no_license
JayanthTadikonda/SpringBoot_Project_CarWash
9a962a008e02581305cebcee51ccc1d44e1522b2
a4cb3ecc89139f8408e057f2d60bcdd4b58014bc
refs/heads/master
2023-04-20T13:22:32.394835
2021-05-21T01:40:46
2021-05-21T01:40:46
368,375,723
0
0
null
null
null
null
UTF-8
Java
false
false
263
java
package com.jay.carwashadmin.model; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @Data @NoArgsConstructor @AllArgsConstructor public class TransactionRequest { private Order order; private Payment payment; }
[ "jayanth.tadikonda@gmail.com" ]
jayanth.tadikonda@gmail.com
4aef23698f7fb96b9fc42171ec2f6eb5a5f30294
12fda0fc2390aa2c5ac5cb975054c0cc393b50fd
/src/grading/GradeTester.java
185296d33a63fd02250b06925c451c0429582c16
[]
no_license
zmmachar/McMac
4af9d795630eb0d3ea611e3beb2e8ddac021342a
286e78ce0ea2e6ed3c41fb6ec568222baf69a8e4
refs/heads/master
2016-09-06T01:52:59.514201
2014-05-06T01:31:32
2014-05-06T01:31:32
18,890,711
0
0
null
null
null
null
UTF-8
Java
false
false
2,608
java
package grading; import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStreamReader; import java.util.Iterator; import java.util.Scanner; import ptolemy.verification.kernel.SMVUtility; import ptolemy.actor.CompositeActor; import ptolemy.domains.modal.kernel.fmv.FmvAutomaton; import ptolemy.kernel.Entity; import ptolemy.moml.MoMLParser; import ptolemy.verification.kernel.MathematicalModelConverter.FormulaType; public class GradeTester { public static void main(String[] args) throws Exception { MoMLParser parser = new MoMLParser(); CompositeActor actor =(CompositeActor)parser.parseFile("refinementResetTest.xml"); String spec = SMVUtility.generateSMVDescription(actor, "F(TRUE)", "LTL", "0").toString(); //System.out.println(spec); //System.out.println(spec); Grader grader = new Grader(); grader.compareSMVSpecs(spec, spec); /** System.out.println(new File(".").getAbsolutePath()); String spec1, spec2; if(args.length == 2) { spec1 = getSpecFromFile(args[0]); spec2 = getSpecFromFile(args[1]); } else { spec1 = getSpecFromFile("spec.smv"); spec2 = getSpecFromFile("spec.smv"); } Grader grader = new Grader(); grader.compareSMVSpecs(spec1, spec2); **/ /**Iterator actors = automaton.entityList().iterator(); while(actors.hasNext()) { Entity actor = (Entity) actors.next(); System.out.println(actor); if (actor instanceof FmvAutomaton) { System.out.println("l"); System.out.println(((FmvAutomaton)actor).convertToSMVFormat("F(TRUE)", FormulaType.LTL, 0)); } } /** Runtime rt = Runtime.getRuntime(); String[] cmd = {"NuSMV"}; Process pr = rt.exec(cmd); InputStreamReader inputStream = new InputStreamReader( pr.getInputStream()); BufferedReader reader = new BufferedReader(inputStream); **/ } private static String getSpecFromFile(String filename) throws FileNotFoundException { File input = new File(filename); String spec = ""; Scanner scan = new Scanner(input); while(scan.hasNextLine()) { spec += scan.nextLine() + "\n"; } return spec; } }
[ "zmmachar@cs.berkeley.edu" ]
zmmachar@cs.berkeley.edu
ae543ecfad25e3902361823d8908447a3089ca4b
5914375bbe032f40c00f1b2a51a81651cdc7f3bc
/src/main/java/br/com/rmmsilva/config/security/auth/openid/OpenIdRequestRedirectfilter.java
b1e8ad239d991db98f21857e9a151c956e2da36c
[]
no_license
rmmsilva/bff-app
a39709836ea23c736c41dfcd956b92fc91fd819b
fff4b2c8fa885b8b985e360ae4b0386bd3657f7a
refs/heads/master
2022-09-22T20:45:48.522372
2020-06-01T12:41:38
2020-06-01T12:41:38
268,518,060
0
0
null
null
null
null
UTF-8
Java
false
false
1,513
java
package br.com.rmmsilva.config.security.auth.openid; import java.io.IOException; import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.security.web.DefaultRedirectStrategy; import org.springframework.security.web.RedirectStrategy; import org.springframework.security.web.util.matcher.AntPathRequestMatcher; import org.springframework.security.web.util.matcher.RequestMatcher; import org.springframework.web.filter.OncePerRequestFilter; public class OpenIdRequestRedirectfilter extends OncePerRequestFilter { private static final String STS_URL = "http://localhost:9090/auth/authorize?" + "response_type=code&" + "scope=openid&" + "client_id=a2a204a5-4ac1-4070-ac3a-081a6c1475a7&" + "redirect_uri=http://localhost:8080/authorize/code"; private final RequestMatcher matcher; private final RedirectStrategy authorizationRedirectStrategy = new DefaultRedirectStrategy(); public OpenIdRequestRedirectfilter(String filterProcessesUrl) { this.matcher = new AntPathRequestMatcher(filterProcessesUrl); } @Override protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException { if (this.matcher.matches(request)) { this.authorizationRedirectStrategy.sendRedirect(request, response, STS_URL); return; } filterChain.doFilter(request, response); } }
[ "renato.massao@live.com" ]
renato.massao@live.com
821eddc920af75849003afff885cb7bacd804c4c
d44b18a3ea88a0d03979e5da10615b6b5b1487a5
/src/test/java/example/mockito/EjemploMockitoTest.java
958da7acd62dbf94442fa6a62a252f47c062fc7b
[]
no_license
prubioamzubiri/ejemplos-junit5v2
b6df6f048b635268dffb99d7b2bb6d744227e475
4a3787caed0f289d4418bdb68c81001f89fcf02f
refs/heads/master
2023-08-17T00:30:41.121784
2021-09-24T12:03:48
2021-09-24T12:03:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,367
java
package example.mockito; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; import static org.mockito.Mockito.*; import org.mockito.Mockito; import org.mockito.junit.jupiter.MockitoExtension; import static org.junit.jupiter.api.Assertions.assertEquals; @ExtendWith(MockitoExtension.class) public class EjemploMockitoTest { @Mock public UserService service; private UserService service2; @BeforeEach public void setupEach(){ this.service2 = mock(UserService.class); } @Test @Tag("integracion") public void testAutowiredValueField() { service.saveUser("1000"); verify(service, times(1)).saveUser("1000"); } @Test @Tag("integracion") public void testAutowiredValueField2() { service2.saveUser("1000"); verify(service2, times(1)).saveUser("1000"); } @Test @Tag("integracion") public void testAutowiredValueField3() { UserService userService = new UserService(); UserService spiedService = spy(userService); when(spiedService.getUser()).thenReturn("Mi Usuario"); String ret = spiedService.getUser(); spiedService.saveUser("User"); assertEquals("Mi Usuario", ret); } }
[ "pepesan@gmail.com" ]
pepesan@gmail.com
7e5a9259af3687bd976515bc065b3a30cd2f7977
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/14/14_c2fe258915b6ba7bc2dbe7d97050c7c4a44b4e01/WsdlUtilsTest/14_c2fe258915b6ba7bc2dbe7d97050c7c4a44b4e01_WsdlUtilsTest_s.java
73b83d0ebe8c6460dec6e34c28ed242307f24dca
[]
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
9,148
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.ode.utils.wsdl; import junit.framework.TestCase; import javax.wsdl.Binding; import javax.wsdl.BindingOperation; import javax.wsdl.Definition; import javax.wsdl.Port; import javax.wsdl.Service; import javax.wsdl.extensions.ExtensibilityElement; import javax.wsdl.extensions.http.HTTPAddress; import javax.wsdl.extensions.soap.SOAPAddress; import javax.wsdl.factory.WSDLFactory; import javax.wsdl.xml.WSDLReader; import javax.xml.namespace.QName; import java.net.URL; import java.util.Iterator; import java.util.Map; /** * @author <a href="mailto:midon@intalio.com">Alexis Midon</a> */ public class WsdlUtilsTest extends TestCase { private Definition definition; private Service dummyService; protected void setUp() throws Exception { super.setUp(); URL wsdlURL = getClass().getResource("/wsdl-utils.wsdl"); WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader(); wsdlReader.setFeature("javax.wsdl.verbose", false); definition = wsdlReader.readWSDL(wsdlURL.toURI().toString()); dummyService = definition.getService(new QName("http://axis2.ode.apache.org", "DummyService")); } public void testNoBinding() { Port noBindingPort = dummyService.getPort("DummyService_port_with_no_binding"); try { WsdlUtils.getBindingExtension(noBindingPort); fail("IllegalArgumentException expected!"); } catch (IllegalArgumentException e) { // expected behavior } } public void testEmptyBinding() { Port noBindingPort = dummyService.getPort("DummyService_port_with_empty_binding"); assertNull("should return null", WsdlUtils.getBindingExtension(noBindingPort)); } public void testMultipleBinding() { // don't know how to test this edge case assertTrue(true); } public void testGetBindingExtension() { Port[] ports = new Port[]{ dummyService.getPort("DummyServiceSOAP11port_http"), dummyService.getPort("DummyServiceHttpport") }; for (Port port : ports) { try { ExtensibilityElement elt = WsdlUtils.getBindingExtension(port); assertNotNull("Non-null element expected!", elt); } catch (Exception e) { fail("No exception should be thrown!"); } } } public void testUseSOAPBinding() { Port soapPort = dummyService.getPort("DummyServiceSOAP11port_http"); Port httpPort = dummyService.getPort("DummyServiceHttpport"); assertTrue(WsdlUtils.useSOAPBinding(soapPort)); assertFalse(WsdlUtils.useSOAPBinding(httpPort)); } public void testUseHTTPBinding() { Port soapPort = dummyService.getPort("DummyServiceSOAP11port_http"); Port httpPort = dummyService.getPort("DummyServiceHttpport"); assertTrue(WsdlUtils.useHTTPBinding(httpPort)); assertFalse(WsdlUtils.useHTTPBinding(soapPort)); } public void testGetOperationExtension() { Port[] ports = new Port[]{ dummyService.getPort("DummyServiceSOAP11port_http"), dummyService.getPort("DummyServiceHttpport") }; for (Port port : ports) { BindingOperation bindingOperation = port.getBinding().getBindingOperation("hello", null, null); ExtensibilityElement operationExtension = WsdlUtils.getOperationExtension(bindingOperation); assertNotNull("Operation Binding expected!", operationExtension); } } public void testUseUrlEncoded() { for (Object o : dummyService.getPorts().entrySet()) { Map.Entry e = (Map.Entry) o; String portName = (String) e.getKey(); Port port = (Port) e.getValue(); Binding binding = port.getBinding(); if (binding == null) continue; // some bindings intentionally missing BindingOperation bindingOperation = binding.getBindingOperation("hello", null, null); if (bindingOperation == null) continue; // some bindings intentionally empty if ("DummyServiceHttpport_urlEncoded".equals(portName)) { assertTrue(WsdlUtils.useUrlEncoded(bindingOperation.getBindingInput())); } else { assertFalse(WsdlUtils.useUrlEncoded(bindingOperation.getBindingInput())); } } } public void testUseUrlReplacement() { for (Iterator it = dummyService.getPorts().entrySet().iterator(); it.hasNext();) { Map.Entry e = (Map.Entry) it.next(); String portName = (String) e.getKey(); Port port = (Port) e.getValue(); Binding binding = port.getBinding(); if (binding == null) continue; // some bindings intentionally missing BindingOperation bindingOperation = binding.getBindingOperation("hello", null, null); if (bindingOperation == null) continue; // some bindings intentionally empty if ("DummyServiceHttpport_urlReplacement".equals(portName)) { assertTrue(WsdlUtils.useUrlReplacement(bindingOperation.getBindingInput())); } else { assertFalse(WsdlUtils.useUrlReplacement(bindingOperation.getBindingInput())); } } } public void testUseMimeMultipartRelated() { for (Iterator it = dummyService.getPorts().values().iterator(); it.hasNext();) { Port port = (Port) it.next(); Binding binding = port.getBinding(); if (binding == null) continue; // some bindings intentionally missing BindingOperation bindingOperation = binding.getBindingOperation("hello", null, null); if (bindingOperation == null) continue; // some bindings intentionally empty for (int i = 0; i < binding.getBindingOperations().size(); i++) { BindingOperation operation = (BindingOperation) binding.getBindingOperations().get(i); assertFalse(WsdlUtils.useMimeMultipartRelated(operation.getBindingInput())); } } } public void testGetAddresExtgension() { for (Iterator it = dummyService.getPorts().entrySet().iterator(); it.hasNext();) { Map.Entry e = (Map.Entry) it.next(); Port port = (Port) e.getValue(); if ("DummyService_port_with_empty_binding".equals(port.getName()) || "DummyService_port_with_no_binding".equals(port.getName())) { continue; } if (WsdlUtils.useHTTPBinding(port)) { HTTPAddress add = (HTTPAddress) WsdlUtils.getAddressExtension(port); assertNotNull("Address expected", add); assertNotNull("Non-null Location expected", add.getLocationURI()); assertTrue("Non-empty Location expected", add.getLocationURI().length() > 0); } else if (WsdlUtils.useHTTPBinding(port)) { SOAPAddress add = (SOAPAddress) WsdlUtils.getAddressExtension(port); assertNotNull("Address expected", add); assertNotNull("Non-null Location expected", add.getLocationURI()); assertTrue("Non-empty Location expected", add.getLocationURI().length() > 0); } } } public void testGetMimeContentType() { Binding binding = definition.getBinding(new QName("http://axis2.ode.apache.org", "DummyServiceHttpBinding")); BindingOperation operation = binding.getBindingOperation("hello", null, null); String mimeContentType = WsdlUtils.getMimeContent(operation.getBindingInput().getExtensibilityElements()).getType(); assertEquals("text/xml", mimeContentType); binding = definition.getBinding(new QName("http://axis2.ode.apache.org", "DummyServiceSOAP11Binding")); operation = binding.getBindingOperation("hello", null, null); mimeContentType = WsdlUtils.getMimeContent(operation.getBindingInput().getExtensibilityElements()).getType(); assertNull(mimeContentType); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
7666101e9e8412cc4d6b477dad4f9aafb596a243
4c01db9b8deeb40988d88f9a74b01ee99d41b176
/easymallTest/Crawlnew/src/cn/futures/data/importor/crawler/AgriImportsData.java
92af790c86b96d8459e445ca36c8d2b58a13d550
[]
no_license
GGPay/-
76743bf63d059cbf34c058b55edfdb6a58a41f71
20b584467142c6033ff92549fd77297da8ae6bfc
refs/heads/master
2020-04-29T10:24:29.949835
2018-04-07T04:34:19
2018-04-07T04:34:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
13,739
java
package cn.futures.data.importor.crawler; import java.util.Date; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import org.apache.commons.lang3.StringUtils; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.scheduling.annotation.Scheduled; import cn.futures.data.DAO.DAOUtils; import cn.futures.data.importor.CrawlScheduler; import cn.futures.data.importor.Variety; import cn.futures.data.util.CrawlerManager; import cn.futures.data.util.DataFetchUtil; import cn.futures.data.util.DateTimeUtil; /** * 大宗农产品进口数据 * @author ctm * */ public class AgriImportsData { private static final String className = AgriImportsData.class.getName(); private Log logger = LogFactory.getLog(AgriImportsData.class); private Log formatErrLog = LogFactory.getLog("format_err"); private DataFetchUtil fetchUtil = new DataFetchUtil(); private DAOUtils dao = new DAOUtils(); private String url = "http://wms.mofcom.gov.cn/article/wb/"; private Map<String, String> cnNameMap = new HashMap<String, String>(){ private static final long serialVersionUID = 1L; { put("odd", "进口装船,本期进口装船(装运港)"); put("even", "进口到港,本期进口到港(分海关)"); put("last", "本期进口到港(口岸)");//有的进口信息中有,有的进口信息中没有 } }; private Map<String, String> varNameMap = new HashMap<String, String>(){ private static final long serialVersionUID = 1L; { put("鲜奶","乳品"); put("奶粉","乳品"); put("牛肉及其副产品","牛肉"); put("羊肉及其副产品","羊肉"); put("猪肉及其副产品","猪肉"); put("玉米酒糟","DDGS"); } }; @Scheduled (cron=CrawlScheduler.CRON_MOF_IMPORT_DATA) public void start(){ String switchFlag = new CrawlerManager().selectCrawler("大宗农产品进口数据", className.substring(className.lastIndexOf(".")+1)); if(switchFlag == null){ logger.info("没有获取到大宗农产品进口数据在数据库中的定时器配置"); }else{ if(switchFlag.equals("1")){ startFetch(); }else{ logger.info("抓取大宗农产品进口数据的定时器已关闭"); } } } /** * 今天抓昨天更新的数据(数据半月更新一次) */ public void startFetch(){ logger.info("=====开始抓取大宗农产品进口数据====="); String[] hrefFilters = {"div","class","alist"}; Set<String> varieties = new HashSet<String>();//记录本次任务处理过的类别。保证每次任务中每个类别的信息只更新一个最新的。 String hrefContents = fetchUtil.getPrimaryContent(0, url+"?", "utf-8", "大宗农产品进口信息", hrefFilters, null, 0); if(hrefContents != null && !hrefContents.equals("")){ String[] lies = StringUtils.substringsBetween(hrefContents, "<li>", "</li>"); String comp = "href=\"/article/wb/([^\"]+)\">大宗农产品进口信息发布(.+)发布日期:([^<]+)<(.+)"; int[] index={1,2,3}; String[] filters = {"div", "id", "zoom"}; for(String li:lies){ List<String> results = fetchUtil.getMatchStr(li, comp, index); if(results.size() > 0 && !varieties.contains(results.get(1))){ varieties.add(results.get(1)); String timeInt = DateTimeUtil.formatDate(DateTimeUtil.parseDateTime(results.get(2), "yyyy年MM月dd日"),"yyyyMMdd"); String contents = fetchUtil.getPrimaryContent(0, url + results.get(0), "utf-8", "大宗农产品进口信息", filters, null, 0); if(contents != null && !contents.equals("")){ parseAndSave(contents, timeInt); }else{ logger.error("没有抓取到"+timeInt + "大宗农产品进口信息数据"); } } } }else{ logger.error("没有抓取到大宗农产品进口信息的链接数据"); } } /** * 用于补指定日期发布的数据(显示的发布日期,虽然更新到网站上的日期并不一定是) */ public void repairFetch(Date date){ logger.info("=====开始抓取大宗农产品进口数据====="); String asignDay = DateTimeUtil.formatDate(date, "yyyy-MM-dd"); String[] hrefFilters = {"div","class","alist"}; boolean update = false; String hrefContents = fetchUtil.getPrimaryContent(0, url+"?", "utf-8", "大宗农产品进口信息", hrefFilters, null, 0); if(hrefContents != null && !hrefContents.equals("")){ String[] lies = StringUtils.substringsBetween(hrefContents, "<li>", "</li>"); String comp = "href=\"/article/wb/([^\"]+)\">大宗农产品进口信息发布(.+)发布日期:([^<]+)<(.+)"+asignDay; int[] index={1,3}; String[] filters = {"div", "id", "zoom"}; for(String li:lies){ List<String> results = fetchUtil.getMatchStr(li, comp, index); if(results.size() > 0){ update = true; String timeInt = DateTimeUtil.formatDate(DateTimeUtil.parseDateTime(results.get(1), "yyyy年MM月dd日"),"yyyyMMdd"); String contents = fetchUtil.getPrimaryContent(0, url + results.get(0), "utf-8", "大宗农产品进口信息", filters, null, 0); if(contents != null && !contents.equals("")){ parseAndSave(contents, timeInt); }else{ logger.error("没有抓取到"+timeInt + "大宗农产品进口信息数据"); } } } if(!update){ logger.error("大宗农产品进口信息没有最新更新"); } }else{ logger.error("没有抓取到大宗农产品进口信息的链接数据"); } } private void parseAndSave(String contents, String timeInt){ Map<String, String> header2dataMap = new HashMap<String, String>(); Map<String, String> dataMap = new HashMap<String,String>(); Map<Integer, String> varNameIndexMap = new HashMap<Integer, String>();//某品种在某次进口信息中的序号,标识其数据表格的位序。 String varName = ""; String[] tables = StringUtils.substringsBetween(contents, "<TABLE", "</TABLE>"); String[] tmps = ("<"+tables[0]).replaceAll("(<[^>]+>)", ",").replaceAll("([,]+)", ",").split(","); //从第一个表格中提取品种对应位序。 for(int i=tmps.length-1;i>=1;i=i-2){ if(!fetchUtil.isNumeric(tmps[i-1].substring(0,1)) && !tmps[i-1].substring(0,1).equals("&")) break; if(tmps[i-1].substring(0,1).equals("&")) continue; varNameIndexMap.put(Integer.parseInt(tmps[i-1].substring(0,1)), tmps[i].replaceAll("菜子油", "菜籽油")); } if(varNameIndexMap.size()*2+1 == tables.length) {//不存在分地区进口到港情况表。 //依次处理每个品种对应的装船情况表和进口到港情况表 for(int tableIndex=1;tableIndex<tables.length;tableIndex++){ extractTable(header2dataMap, varNameIndexMap, dataMap, timeInt, tables[tableIndex], tableIndex ); } }else if(varNameIndexMap.size()*2+2 == tables.length){//存在分地区进口到港情况表。 //依次处理每个品种对应的装船情况表和进口到港情况表 for(int tableIndex=1;tableIndex<tables.length-1;tableIndex++){ extractTable(header2dataMap, varNameIndexMap, dataMap, timeInt, tables[tableIndex], tableIndex ); } //下面处理分地区进口到港情况表(只有一个) logger.info("处理本期分地区进口到港情况表"); dataMap.clear(); header2dataMap.clear(); String tmp = ("<"+tables[tables.length-1]).replaceAll("(<[^>]+>)", ",").replaceAll("([,]+)", ",").replaceAll("&nbsp;", ""); if(tmp.indexOf("单位:吨")!=-1){ tmp = tmp.substring(tmp.indexOf("单位:吨")+4); } String[] lines = fetchUtil.getLineContent(tmp.substring(1), varNameIndexMap.size()+1).split("\n"); String[] fields = lines[0].split(","); for(int i=1;i<fields.length;i++){ String cnName = "本期进口到港(口岸)"; varName = fields[i]; String varNameCopy = varName; if(varNameMap.get(varName) != null){ varName = varNameMap.get(varName); } int varId = Variety.getVaridByName(varName); for(int j=1;j<lines.length;j++){ String[] fieldTmps = lines[j].split(","); header2dataMap.put(fieldTmps[0], fieldTmps[i]); } if(varNameMap.keySet().contains(varNameCopy) && !varNameCopy.equals("玉米酒糟")){ cnName = varNameCopy.replaceAll("及其", "及")+cnName; } List<String> headers = dao.getHeaders(varName, cnName); dataMap = getDataByHeader(headers, header2dataMap); if(dataMap.size()>0){ dao.saveOrUpdateByDataMap(varId, cnName, Integer.parseInt(timeInt), dataMap); }else{ logger.info(varName+cnName+"没有数据需要保存"); } } }else{ formatErrLog.info("大宗农产品进口数据格式变化[AgriImportsData]"); logger.info("网页格式有调整!!!"); } } private Map<String, String> getDataByHeader(List<String> headers, Map<String, String> header2dataMap){ Map<String, String> dataMap = new HashMap<String, String>(); for(String header:headers){ dataMap.put(header, "0"); } for(String header:headers){ if(header2dataMap.get(header)!=null){ dataMap.put(header, header2dataMap.get(header)); continue; } if(header.equals("香港") && header2dataMap.get("中国香港") != null){ dataMap.put(header, header2dataMap.get("中国香港")); } if(header.equals("台湾") && header2dataMap.get("中国台湾") != null){ dataMap.put(header, header2dataMap.get("中国台湾")); } if(header.indexOf("确认")!=-1 || header.indexOf("确定")!=-1){//处理“未确认”“待确认”“待确认及其他”不一致的问题 for(String headerTmp:header2dataMap.keySet()){ if(headerTmp.indexOf("确认")!=-1 || headerTmp.indexOf("确定")!=-1){ dataMap.put(header, header2dataMap.get(headerTmp)); break; } } } } return dataMap; } /** * 提取品种对应的装船情况表和进口到港情况表。 * @param header2dataMap 表格字段名-值 * @param varNameIndexMap 品种-位序 * @param dataMap 提取结果 * @param timeInt 数据的时间序列 * @param tableStr 待提取表格的字符串 * @param tableIndex 待提取表的位序 * */ private void extractTable(Map<String, String> header2dataMap, Map<Integer, String> varNameIndexMap, Map<String, String> dataMap, String timeInt, String tableStr, int tableIndex ){ header2dataMap.clear(); String tmp = ("<"+tableStr).replaceAll("(<[^>]+>)", ",").replaceAll("([,]+)", ",").replaceAll("&nbsp;", ""); String[] fields = tmp.split(","); int sumIndex = 0; for(int i=1;i<fields.length;i++){ //只提取本期情况 if(!fields[i].equals("") && fetchUtil.isNumeric(fields[i]) && !fetchUtil.isNumeric(fields[i-1])){ String value = fields[i]; if(value.indexOf(".") == -1){//为什么要判断有无小数点儿?可能是格式问题,防止将一个数值分成几部分的情况 value += fields[i+1]; } if(value.indexOf(".") == -1){ value += fields[i+2]; } header2dataMap.put(fields[i-1], value); } if(fields[i].equals("合计")){ String value = fields[i+1]; if(value.indexOf(".") == -1){ value += fields[i+2]; } if(value.indexOf(".") == -1){ value += fields[i+3]; } header2dataMap.put("合计", value); sumIndex = i; break; } } if(sumIndex>0){//说明正常提取到合计装船数据 if(fields.length-sumIndex==4){ header2dataMap.put("本期装船量", fields[sumIndex+1]); header2dataMap.put("预报本月装船量", fields[sumIndex+2]); header2dataMap.put("预报下月装船量", fields[sumIndex+3]); }else if(fields.length-sumIndex>=5){ header2dataMap.put("本期装船量", fields[sumIndex+1]); header2dataMap.put("预报本月装船量", fields[sumIndex+2]); header2dataMap.put("预报下月装船量", fields[sumIndex+3]); header2dataMap.put("本期到港量", fields[sumIndex+1]); header2dataMap.put("预报下期到港量", fields[sumIndex+2]); header2dataMap.put("预报本月到港量", fields[sumIndex+3]); header2dataMap.put("预报下月到港量", fields[sumIndex+4]); } } String varName = varNameIndexMap.get((int)Math.floor((tableIndex+1)/2));//品种名,根据两个表为一个品种的规则而得。 String[] cnNames = null; if(tableIndex%2 == 1){//每组表格中第一个为装船情况,第二个为到港情况。 logger.info("处理本期进口"+varName+"装船情况表"); cnNames = cnNameMap.get("odd").split(","); }else{ logger.info("处理本期分地区"+varName+"进口到港情况表"); cnNames = cnNameMap.get("even").split(","); } String varNameCopy = varName; if(varNameMap.get(varName) != null){ varName = varNameMap.get(varName); } int varId = Variety.getVaridByName(varName); for(String cnName:cnNames){ if(varNameMap.keySet().contains(varNameCopy) && !varNameCopy.equals("玉米酒糟")){ cnName = varNameCopy.replaceAll("及其", "及")+cnName; } dataMap.clear(); List<String> headers = dao.getHeaders(varName, cnName);//有找不到的情况 dataMap = getDataByHeader(headers, header2dataMap); boolean havaData = false; //判断有无有效数据 for(String data:dataMap.keySet()){ if(!dataMap.get(data).equals("0.00") && !dataMap.get(data).equals("0")) havaData = true; } if(havaData){ dao.saveOrUpdateByDataMap(varId, cnName, Integer.parseInt(timeInt), dataMap); }else{ logger.info(varName+cnName+"没有数据需要保存"); dao.deleteByTimeInt(varId, cnName, Integer.parseInt(timeInt)); } } } public static void main(String[] args) { AgriImportsData aid = new AgriImportsData(); // aid.start(); //补指定日期的历史数据 Date date = DateTimeUtil.parseDateTime("2016-07-12", "yyyy-MM-dd"); aid.repairFetch(date); } }
[ "pinggaimuir@sina.com" ]
pinggaimuir@sina.com
e82e13aacf3e9b4fbbafa4f0fb8c8101897f620a
bc0d34b032d8853d1de17b38fc3a4206383ec776
/app/src/main/java/com/tongjiapp/remirobert/devicecollect/deviceMapper/NetworkManager.java
d4093fe60c9a1d73968a01789f4e7a0e3d02bcf6
[ "MIT" ]
permissive
MobileMapper/Android
08d9969ac62ebdaf4ac2112f7ec436b9b77e5b8a
100ea8e836d0187109603befd4cbea89b2ffe173
refs/heads/master
2021-01-19T05:59:21.210652
2016-07-01T12:34:07
2016-07-01T12:34:07
62,381,078
0
0
null
null
null
null
UTF-8
Java
false
false
140
java
package com.tongjiapp.remirobert.devicecollect.deviceMapper; /** * Created by remirobert on 01/07/16. */ public class NetworkManager { }
[ "remirobert33530@gmail.com" ]
remirobert33530@gmail.com
4a60ffec431f43e25a9e7a08d39faa14aaa0029c
765bd9e5298aca4fdb6170e39b7dbea4a75843d2
/2021.04.05/src/com/javalec/base/le_00.java
ac635a48875432d11d616ede25f6962e26bc0ac1
[]
no_license
norsk-Gh/JAVA_04_02
f992edffa0244d3b7f8c48f4515c8e68cb72dd85
835915ca96a3a9a0f3cfb5e44a35f9b6c6d2b01a
refs/heads/main
2023-04-03T02:57:04.667821
2021-04-12T00:57:26
2021-04-12T00:57:26
354,682,057
0
0
null
null
null
null
UTF-8
Java
false
false
629
java
package com.javalec.base; import java.util.Scanner; public class le_00 { public static void main(String[] args) { // int [] point = new int[10]; Scanner scan = new Scanner(System.in); System.out.println("Input score : "); for(int n=0; n<10; n++) { System.out.print( n+1 +"의 score : "); int result = scan.nextInt(); point[n] = result; } for(int i = 9; i<=0; i--){ System.out.println((i*10) + " : "); for(int j = 0; j<10; j++) { if(point[j]>=(i*10)) { System.out.print("#"); } System.out.println(""); } // System.out.println("---------- Histogram ----------"); } } }
[ "81655952+norsk-Gh@users.noreply.github.com" ]
81655952+norsk-Gh@users.noreply.github.com
ca7adb419fa959cfc545bd8793ae27a27fa5e04f
0c207fbf151eb209353378e306707675bd4a1029
/spring-mvc-hibernate/src/main/java/com/xxzzsoftware/util/HeapSort.java
cfea48abbcefa25f5432cbdad501f71b0e4f4466
[ "Apache-2.0" ]
permissive
xuzhuo2012/spring-mvc-hibernate
80910a3805c2d0f018196ca58428753916f5385e
8a405971d3941de1d7c177a401209a56a500565e
refs/heads/master
2020-12-24T17:45:26.540712
2013-10-24T09:25:58
2013-10-24T09:25:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,027
java
package com.xxzzsoftware.util; public class HeapSort { public static void main(String[] args) { int[] a = { 111, 3, 2, 45, 6, 7, 7722, 32, 8 }; new HeapSort().heapSort(a); for (int i = 0; i < a.length; i++) { System.out.print(a[i] + " "); } } public void heapSort(int[] a) { buildMaxHeap(a); int heapSize = a.length; for (int i = a.length - 1; i > 0; i--) { swap(a, 0, i); heapSize--; maxHeapify(a, 0, heapSize); } } private void buildMaxHeap(int[] a) { for (int i = a.length / 2; i >= 0; i--) { maxHeapify(a, i, a.length); } } private void maxHeapify(int[] a, int i, int heapSize) { int left = i * 2; int right = i * 2 + 1; int largest = i; if (left < heapSize && a[left] > a[i]) { largest = left; } if (right < heapSize && a[right] > a[largest]) { largest = right; } if (i != largest) { swap(a, i, largest); maxHeapify(a, largest, heapSize); } } private void swap(int[] a, int i, int j) { int tmp = a[i]; a[i] = a[j]; a[j] = tmp; } }
[ "rayn.xu@airbiquity.com" ]
rayn.xu@airbiquity.com
f714391daf6f8d3f45b142a5e166d82e9e060c85
c348a4c092a65af94484a1a2d7d1fb58411d3acc
/src/main/java/net/minecraft/block/BlockTorch.java
1f5635f13d824ea6fdae24dce997a1b78bedf83a
[]
no_license
BeYkeRYkt/TU-Server
4f2df3ba42e330689bb0aa8d529e5ce1e278e169
590e88941742637bdb0e988df645e803b0a1681d
refs/heads/master
2021-01-20T05:57:20.399416
2014-10-04T02:55:45
2014-10-04T02:55:45
24,750,799
2
1
null
2014-10-04T02:55:45
2014-10-03T07:55:36
Java
UTF-8
Java
false
false
10,169
java
package net.minecraft.block; import com.google.common.base.Predicate; import java.util.Iterator; import net.minecraft.block.material.Material; import net.minecraft.block.properties.IProperty; import net.minecraft.block.properties.PropertyDirection; import net.minecraft.block.state.BlockState; import net.minecraft.block.state.IBlockState; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.EntityLivingBase; import net.minecraft.init.Blocks; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.BlockPos; import net.minecraft.util.EnumFacing; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; public class BlockTorch extends Block { public static final PropertyDirection FACING_PROP = PropertyDirection.create("facing", new Predicate() { private static final String __OBFID = "CL_00002054"; public boolean func_176601_a(EnumFacing p_176601_1_) { return p_176601_1_ != EnumFacing.DOWN; } public boolean apply(Object p_apply_1_) { return this.func_176601_a((EnumFacing)p_apply_1_); } }); private static final String __OBFID = "CL_00000325"; protected BlockTorch() { super(Material.circuits); this.setDefaultState(this.blockState.getBaseState().withProperty(FACING_PROP, EnumFacing.UP)); this.setTickRandomly(true); this.setCreativeTab(CreativeTabs.tabDecorations); } public AxisAlignedBB getCollisionBoundingBox(World worldIn, BlockPos pos, IBlockState state) { return null; } public boolean isOpaqueCube() { return false; } public boolean isFullCube() { return false; } private boolean func_176594_d(World worldIn, BlockPos p_176594_2_) { if (World.doesBlockHaveSolidTopSurface(worldIn, p_176594_2_)) { return true; } else { Block var3 = worldIn.getBlockState(p_176594_2_).getBlock(); return var3 instanceof BlockFence || var3 == Blocks.glass || var3 == Blocks.cobblestone_wall || var3 == Blocks.stained_glass; } } public boolean canPlaceBlockAt(World worldIn, BlockPos pos) { Iterator var3 = FACING_PROP.getAllowedValues().iterator(); EnumFacing var4; do { if (!var3.hasNext()) { return false; } var4 = (EnumFacing)var3.next(); } while (!this.func_176595_b(worldIn, pos, var4)); return true; } private boolean func_176595_b(World worldIn, BlockPos p_176595_2_, EnumFacing p_176595_3_) { BlockPos var4 = p_176595_2_.offset(p_176595_3_.getOpposite()); boolean var5 = p_176595_3_.getAxis().isHorizontal(); return var5 && worldIn.func_175677_d(var4, true) || p_176595_3_.equals(EnumFacing.UP) && this.func_176594_d(worldIn, var4); } public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) { if (this.func_176595_b(worldIn, pos, facing)) { return this.getDefaultState().withProperty(FACING_PROP, facing); } else { Iterator var9 = EnumFacing.Plane.HORIZONTAL.iterator(); EnumFacing var10; do { if (!var9.hasNext()) { return this.getDefaultState(); } var10 = (EnumFacing)var9.next(); } while (!worldIn.func_175677_d(pos.offset(var10.getOpposite()), true)); return this.getDefaultState().withProperty(FACING_PROP, var10); } } public void onBlockAdded(World worldIn, BlockPos pos, IBlockState state) { this.func_176593_f(worldIn, pos, state); } public void onNeighborBlockChange(World worldIn, BlockPos pos, IBlockState state, Block neighborBlock) { this.func_176592_e(worldIn, pos, state); } protected boolean func_176592_e(World worldIn, BlockPos p_176592_2_, IBlockState p_176592_3_) { if (!this.func_176593_f(worldIn, p_176592_2_, p_176592_3_)) { return true; } else { EnumFacing var4 = (EnumFacing)p_176592_3_.getValue(FACING_PROP); EnumFacing.Axis var5 = var4.getAxis(); EnumFacing var6 = var4.getOpposite(); boolean var7 = false; if (var5.isHorizontal() && !worldIn.func_175677_d(p_176592_2_.offset(var6), true)) { var7 = true; } else if (var5.isVertical() && !this.func_176594_d(worldIn, p_176592_2_.offset(var6))) { var7 = true; } if (var7) { this.dropBlockAsItem(worldIn, p_176592_2_, p_176592_3_, 0); worldIn.setBlockToAir(p_176592_2_); return true; } else { return false; } } } protected boolean func_176593_f(World worldIn, BlockPos p_176593_2_, IBlockState p_176593_3_) { if (p_176593_3_.getBlock() == this && this.func_176595_b(worldIn, p_176593_2_, (EnumFacing)p_176593_3_.getValue(FACING_PROP))) { return true; } else { if (worldIn.getBlockState(p_176593_2_).getBlock() == this) { this.dropBlockAsItem(worldIn, p_176593_2_, p_176593_3_, 0); worldIn.setBlockToAir(p_176593_2_); } return false; } } /** * Ray traces through the blocks collision from start vector to end vector returning a ray trace hit. * * @param start The start vector * @param end The end vector */ public MovingObjectPosition collisionRayTrace(World worldIn, BlockPos pos, Vec3 start, Vec3 end) { EnumFacing var5 = (EnumFacing)worldIn.getBlockState(pos).getValue(FACING_PROP); float var6 = 0.15F; if (var5 == EnumFacing.EAST) { this.setBlockBounds(0.0F, 0.2F, 0.5F - var6, var6 * 2.0F, 0.8F, 0.5F + var6); } else if (var5 == EnumFacing.WEST) { this.setBlockBounds(1.0F - var6 * 2.0F, 0.2F, 0.5F - var6, 1.0F, 0.8F, 0.5F + var6); } else if (var5 == EnumFacing.SOUTH) { this.setBlockBounds(0.5F - var6, 0.2F, 0.0F, 0.5F + var6, 0.8F, var6 * 2.0F); } else if (var5 == EnumFacing.NORTH) { this.setBlockBounds(0.5F - var6, 0.2F, 1.0F - var6 * 2.0F, 0.5F + var6, 0.8F, 1.0F); } else { var6 = 0.1F; this.setBlockBounds(0.5F - var6, 0.0F, 0.5F - var6, 0.5F + var6, 0.6F, 0.5F + var6); } return super.collisionRayTrace(worldIn, pos, start, end); } /** * Convert the given metadata into a BlockState for this Block */ public IBlockState getStateFromMeta(int meta) { IBlockState var2 = this.getDefaultState(); switch (meta) { case 1: var2 = var2.withProperty(FACING_PROP, EnumFacing.EAST); break; case 2: var2 = var2.withProperty(FACING_PROP, EnumFacing.WEST); break; case 3: var2 = var2.withProperty(FACING_PROP, EnumFacing.SOUTH); break; case 4: var2 = var2.withProperty(FACING_PROP, EnumFacing.NORTH); break; case 5: default: var2 = var2.withProperty(FACING_PROP, EnumFacing.UP); } return var2; } /** * Convert the BlockState into the correct metadata value */ public int getMetaFromState(IBlockState state) { byte var2 = 0; int var3; switch (BlockTorch.SwitchEnumFacing.field_176609_a[((EnumFacing)state.getValue(FACING_PROP)).ordinal()]) { case 1: var3 = var2 | 1; break; case 2: var3 = var2 | 2; break; case 3: var3 = var2 | 3; break; case 4: var3 = var2 | 4; break; case 5: case 6: default: var3 = var2 | 5; } return var3; } protected BlockState createBlockState() { return new BlockState(this, new IProperty[] {FACING_PROP}); } static final class SwitchEnumFacing { static final int[] field_176609_a = new int[EnumFacing.values().length]; private static final String __OBFID = "CL_00002053"; static { try { field_176609_a[EnumFacing.EAST.ordinal()] = 1; } catch (NoSuchFieldError var6) { ; } try { field_176609_a[EnumFacing.WEST.ordinal()] = 2; } catch (NoSuchFieldError var5) { ; } try { field_176609_a[EnumFacing.SOUTH.ordinal()] = 3; } catch (NoSuchFieldError var4) { ; } try { field_176609_a[EnumFacing.NORTH.ordinal()] = 4; } catch (NoSuchFieldError var3) { ; } try { field_176609_a[EnumFacing.DOWN.ordinal()] = 5; } catch (NoSuchFieldError var2) { ; } try { field_176609_a[EnumFacing.UP.ordinal()] = 6; } catch (NoSuchFieldError var1) { ; } } } }
[ "custard13@mail.ru" ]
custard13@mail.ru
e38efbd8339224fb6511699c66b2a129e07d1251
4ac4cfb8d2df7e30d0897c30d67002e1df7554a7
/forest/src/main/java/com/kh/forest/helpcenter/model/exception/HelpException.java
ecdcfe2fa549833b864fd355df8b8ded5f5f7704
[]
no_license
Zeuth1/forest
a17bcb629a03a75bb61579af69d27e2f36b4cecf
e0f75eafc0a45f7d0b5448f23a7b60a7cc39a5fd
refs/heads/master
2020-03-08T14:58:50.917419
2018-05-09T09:53:30
2018-05-09T09:53:30
128,181,525
0
0
null
null
null
null
UTF-8
Java
false
false
160
java
package com.kh.forest.helpcenter.model.exception; public class HelpException extends Exception { public HelpException(String message){ super(message); } }
[ "regardofantasma666@gmail.com" ]
regardofantasma666@gmail.com
cae6ba21d6e3442ee3fe15e3fcfb91365dc9bf26
c96d2553ba0b41b92c108051a467d694081334bb
/src/main/java/com/gd/model/UserOrder.java
2c4947789f591fa14e792811281229ebdb776c55
[]
no_license
qyyxl/GD
1c6b1332b99769827bdba3ef4707cacc56aef6d6
316f915043636fec4d52630dc7760a87d8c6dbc7
refs/heads/master
2022-07-17T15:03:49.426407
2019-07-31T15:35:15
2019-07-31T15:35:15
182,249,806
0
0
null
2022-06-21T01:04:44
2019-04-19T10:44:41
Java
UTF-8
Java
false
false
2,028
java
package com.gd.model; import com.baomidou.mybatisplus.enums.IdType; import java.time.LocalDateTime; import java.util.Date; import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableId; import com.gd.core.BaseModel; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; /** * <p> * 我的订单 * </p> * * @author system * @since 2019-05-10 */ @Data public class UserOrder extends BaseModel { private static final long serialVersionUID = 1L; /** * ID */ @TableId(value = "id", type = IdType.AUTO) private Integer id; /** * 商品ID */ @TableField("itemId") private Integer itemId; /** * 商品名称 */ @TableField("productName") private String productName; /** * 单价 */ @TableField("originalPrice") private Double originalPrice; /** * 数量 */ @TableField("orderCount") private Integer orderCount; /** * 总价 */ @TableField("orderMoney") private Double orderMoney; /** * 用户ID */ @TableField("userId") private Integer userId; /** * 创建时间 */ @TableField("create_time") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime createTime; /** * 更新时间 */ @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @TableField("update_time") private LocalDateTime updateTime; @Override public String toString() { return "UserOrder{" + ", id=" + id + ", itemId=" + itemId + ", productName=" + productName + ", originalPrice=" + originalPrice + ", orderCount=" + orderCount + ", orderMoney=" + orderMoney + ", userId=" + userId + ", createTime=" + createTime + ", updateTime=" + updateTime + "}"; } }
[ "1349193411@qq.com" ]
1349193411@qq.com
9467b50b09ccb00b8838d3b6e38b0300d01eee0a
1f700e8f8fd99f526afef48b49fe1ba7d6f826ad
/src/main/java/com/dchealth/webservice/vo/request/CardUnregistMessage.java
8fe66083e80047075e7ca6140fab666f062bba5f
[]
no_license
Tieqiang/web-service
ffab7ecc81c8cb38800346430580b5b232ac7e3b
8eaf8272d182da03e90d2098cac879e77292d494
refs/heads/master
2020-04-16T06:04:49.168309
2019-01-17T16:07:48
2019-01-17T16:07:48
165,332,114
0
0
null
null
null
null
UTF-8
Java
false
false
1,165
java
package com.dchealth.webservice.vo.request; import com.dchealth.webservice.vo.MessageInterface; import javax.xml.bind.annotation.XmlRootElement; @XmlRootElement(name = "request") public class CardUnregistMessage implements MessageInterface { private String id_card;//居民身份证号| private String id_type;//证件类型|有身份证号只需传身份证号,没有身份证号就传证件类型和证件号码 private String id_number;//证件号码| private String qr_code;//二维码密文| public CardUnregistMessage() { } public String getId_card() { return id_card; } public void setId_card(String id_card) { this.id_card = id_card; } public String getId_type() { return id_type; } public void setId_type(String id_type) { this.id_type = id_type; } public String getId_number() { return id_number; } public void setId_number(String id_number) { this.id_number = id_number; } public String getQr_code() { return qr_code; } public void setQr_code(String qr_code) { this.qr_code = qr_code; } }
[ "306403031@qq.com" ]
306403031@qq.com
dd5696fb40b7b2e4ed92b27e0334acd5fe7c0f37
37157e14668799e5a72c945eb4fa27468c50d9cd
/src/com/noterik/springfield/willie/restlet/LoggingResource.java
5eb20bc297543e8ce0c43a12938d80c8d20d1e67
[]
no_license
DANS-KNAW/dans-springfield-willie
8e28a94c25922008df4a98dc497e32e774e38879
8aa1eeefbfeba5fce31ea2a2be33bf305f5c790d
refs/heads/master
2020-03-23T05:40:57.969624
2018-08-24T09:22:00
2018-08-24T09:22:00
141,160,033
0
1
null
2018-08-20T20:21:02
2018-07-16T15:46:27
Java
UTF-8
Java
false
false
3,618
java
package com.noterik.springfield.willie.restlet; import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.restlet.Context; import org.restlet.data.Form; import org.restlet.data.MediaType; import org.restlet.Request; import org.restlet.Response; import org.restlet.representation.Representation; import org.restlet.representation.StringRepresentation; import org.restlet.representation.Variant; import org.restlet.resource.Get; import org.restlet.resource.ServerResource; import com.noterik.springfield.willie.WillieServer; import com.noterik.springfield.willie.homer.LazyHomer; /** * The logging resource is used to configure the debugging behavior. * The logging can be configured hierarchically. Logging inherited level * for a given logger is equal to that of its parent. So to configure * a single class use the full name, com.fu.Bar, and to configure a * package and every ancestor use the package name, com.fu * * Resource uri: * /logging * * Agruments: * level The logging level you want to set (ALL,INFO,WARN, * DEBUG,TRACE,ERROR,FATAL,OFF) * name (optional) The full package, or classname you want to configure. * * @author Derk Crezee <d.crezee@noterik.nl> * @copyright Copyright: Noterik B.V. 2009 * @package com.noterik.bart.fs.restlet * @access private * @version $Id: LoggingResource.java,v 1.2 2009-05-06 10:12:00 derk Exp $ * */ public class LoggingResource extends ServerResource { public LoggingResource() { //constructor } /** * doInit * * @param context * @param request * @param response */ public void doInit(Context context, Request request, Response response) { super.init(context, request, response); // add representational variants allowed getVariants().add(new Variant(MediaType.TEXT_XML)); } // allowed actions: GET public boolean allowPut() {return false;} public boolean allowPost() {return false;} public boolean allowGet() {return true;} public boolean allowDelete() {return false;} /** * GET */ @Get public void handleGet() { String responseBody = ""; // get parameters Form qForm = getRequest().getResourceRef().getQueryAsForm(); String name = qForm.getFirstValue("name",LazyHomer.PACKAGE_ROOT); // default root package String level = qForm.getFirstValue("level",null); // check level parameter if(level!=null) { // determine level Level logLevel = null; if(level.toLowerCase().equals("all")) { logLevel = Level.ALL; } else if(level.toLowerCase().equals("info")) { logLevel = Level.INFO; } else if(level.toLowerCase().equals("warn")) { logLevel = Level.WARN; } else if(level.toLowerCase().equals("debug")) { logLevel = Level.DEBUG; } else if(level.toLowerCase().equals("trace")) { logLevel = Level.TRACE; } else if(level.toLowerCase().equals("error")) { logLevel = Level.ERROR; } else if(level.toLowerCase().equals("fatal")) { logLevel = Level.FATAL; } else if(level.toLowerCase().equals("off")) { logLevel = Level.OFF; } // check level if(logLevel==null) { responseBody = "please provide log level: {ALL,INFO,WARN,DEBUG,TRACE,ERROR,FATAL,OFF}"; } else { // set level Logger.getLogger(name).setLevel(logLevel); responseBody = "logging for " + name + " was set to " + logLevel.toString(); } } else { // error message responseBody = "please provide log level: {ALL,INFO,WARN,DEBUG,TRACE,ERROR,FATAL,OFF}"; } // return Representation entity = new StringRepresentation(responseBody); getResponse().setEntity(entity); } }
[ "p.vanleeuwen@noterik.nl" ]
p.vanleeuwen@noterik.nl
81d4dceeec761a140baeadd9eb5c5359d2221ed7
c2e87ba903f5ac8fe5d54a8aa5108270b7cf4bb9
/src/main/java/guda/task/biz/enums/TaskAcceptStatusEnum.java
99febd90486774cb5a9b1bf69983e64a4b54f930
[]
no_license
foodoon/task
44a1af428df1fc190ef5a4c0232c22cb6925b813
5910183de8b3f1b6ffa09473555cf92f80793df4
refs/heads/master
2021-01-01T06:50:02.914531
2015-03-18T01:23:30
2015-03-18T01:23:30
32,430,420
0
0
null
null
null
null
UTF-8
Java
false
false
1,044
java
package guda.task.biz.enums; /** * Created by well on 2014/12/22. */ public enum TaskAcceptStatusEnum { ACCEPT("您已经接受任务,请尽快完成任务",0), TAOBAO_STATUS("淘宝交易进行中",7), SIGN("您已经签收,等待掌柜确认",8), BREAK("终止",98), SUCCESS("任务成功",99), ; private int value; private String name; private TaskAcceptStatusEnum(String name,int val){ this.name = name; this.value = val; } public int getValue() { return value; } public void setValue(int value) { this.value = value; } public String getName() { return name; } public void setName(String name) { this.name = name; } public static String getNameByValue(int val){ TaskAcceptStatusEnum[] values = TaskAcceptStatusEnum.values(); for(TaskAcceptStatusEnum e:values){ if(e.getValue() == val){ return e.getName(); } } return null; } }
[ "g@dawanju.com" ]
g@dawanju.com
47e733e6a7738db3e16b9898dc39b66d31dfbd13
64119a5ce1f456a0ca1b43cd168cd41879a90373
/extractlib/src/main/java/com/flower/extractlib/ProcessImport.java
56ce953796ec3efbc7855780bdb11a8f6ab6a923
[]
no_license
sky-mind/ExtractChinese
170d2727f7215448e60a2f3083e3d376a98366a0
5785abae678aa3a1b910f69c84d6a275ec01b3f9
refs/heads/master
2020-03-11T01:46:59.969586
2018-04-16T07:22:25
2018-04-16T07:22:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,591
java
package com.flower.extractlib; /** * Created by nicolee on 2016/9/26. */ import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.File; import java.io.FileInputStream; import java.io.FileWriter; import java.io.IOException; import java.io.InputStreamReader; public class ProcessImport { private File copyFile; public ProcessImport() { } public void readTxt(File tempFile) throws IOException { if (!Config.needImportSettingsName.contains(tempFile.getName()) && !Config.needImportResourceName.contains(tempFile.getName()) ) { return; } Config.curfileHasImportSettings = false; Config.curfileHasImportResource = false; System.out.println("#" + tempFile.getName() + "\n"); BufferedWriter writer = getReplaceFileWriter(tempFile); BufferedReader reader = new BufferedReader(new InputStreamReader( new FileInputStream(tempFile), Config.charset)); String tempString = ""; while ((tempString = reader.readLine()) != null) { if (tempString.startsWith("import ")) { if(!Config.curfileHasImportSettings && Config.needImportSettingsName.contains(tempFile.getName())){ writer.write(Config.importSettingString + "\n"); Config.curfileHasImportSettings = true; } if(!Config.curfileHasImportResource && Config.needImportResourceName.contains(tempFile.getName())){ writer.write( Config.importResourceString + "\n"); Config.curfileHasImportResource = true; } } //复制到文件 writer.write(tempString + "\n"); } reader.close(); closeWriter(writer, tempFile); } public void closeWriter(BufferedWriter writer, File oldFile) { if (writer == null) { return; } try { writer.flush(); writer.close(); String path = oldFile.getAbsolutePath(); oldFile.delete(); copyFile.renameTo(new File(path)); } catch (Exception e) { e.printStackTrace(); } } public BufferedWriter getReplaceFileWriter(File oldFile) { copyFile = new File(oldFile.getAbsolutePath() + "_import"); try { if (!copyFile.exists()) { copyFile.createNewFile(); } BufferedWriter writer = new BufferedWriter(new FileWriter(copyFile)); return writer; } catch (Exception e) { e.printStackTrace(); System.out.println("path:" + copyFile.getAbsolutePath()); } return null; } public void readDir(String folder) throws IOException { File dir = new File(folder); // PrintWriter output = new PrintWriter(new FileWriter(new // File(outFile))); if (dir.isDirectory()) { System.out.println("#Dir#" + dir.getName() + "\n"); // output.write("#Dir#" + dir.getName() + "\n"); String[] children = dir.list(); for (int i = 0; i < children.length; i++) { File tempFile = new File(dir, children[i]); if (tempFile.isDirectory()) { readDir(tempFile.getAbsolutePath()); System.out.println("tempFile.getAbsolutePath():" + tempFile.getAbsolutePath() + "\n"); } else { readTxt(tempFile); } } } } }
[ "zhouchunhua@zbj.com" ]
zhouchunhua@zbj.com
626805676d4700c97038d1a8d959544cd71165c5
49f25aec38b6b8bc8cde91ddcf73a601b82fedeb
/src/com/newPackage/testing/New.java
c9c6c1367d7d7a2f4f3fc1b82dfc40f36a8a9dd1
[]
no_license
peeyushkapoor72/IntelliSelenium
17408c210b5489697289ad7a71c1983a9cbafa33
c5c05b051c5f5713b103a80d39d5097cca074d14
refs/heads/master
2021-07-14T10:07:06.466483
2021-06-24T14:12:09
2021-06-24T14:12:09
150,731,844
0
0
null
null
null
null
UTF-8
Java
false
false
7,305
java
package com.csc.testing; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.util.HashMap; import java.util.LinkedHashMap; import java.util.LinkedList; import java.util.Map; import org.apache.poi.hssf.usermodel.HSSFSheet; import org.apache.poi.hssf.usermodel.HSSFWorkbook; import org.apache.poi.ss.usermodel.Cell; import org.apache.poi.ss.usermodel.DateUtil; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.Workbook; import org.apache.poi.ss.usermodel.WorkbookFactory; import org.openqa.selenium.WebDriver; import com.csc.intellis.constants.IntelliSConstants; import com.csc.intellis.core.bean.ExecutorParameterBean; import com.csc.intellis.core.config.ConfigLoader; public class New { static WebDriver driver; static HSSFSheet sheet = null; static int maxIteration = 5; static FileInputStream fileInputS = null; static ExecutorParameterBean bean = null; static LinkedHashMap<String, Map<String, String>> caseDataMap = new LinkedHashMap<String, Map<String, String>>(); static LinkedHashMap<String, Map<String, Integer>> caseSeqMap = new LinkedHashMap<String, Map<String, Integer>>(); public static void main(String[] args) throws Exception { ExecutorParameterBean bean = new ExecutorParameterBean(); HashMap<String, String> configMap = ConfigLoader.getInstance().loadConfig(); bean.setConfigMap(configMap); File folder = new File(bean.getConfigMap().get(IntelliSConstants.TEST_FILE_PATH)); File[] listOfFiles = folder.listFiles(); for (File file : listOfFiles) { String file1 = file.getName(); System.out.println("Current File being accessed from the Folder is:- " + bean.getConfigMap().get(IntelliSConstants.TEST_FILE_PATH) + "\\" + file1); fileInputS = new FileInputStream( new File(bean.getConfigMap().get(IntelliSConstants.TEST_FILE_PATH) + file1)); HSSFWorkbook workbook = new HSSFWorkbook(fileInputS); for (int i = 1; i < workbook.getNumberOfSheets(); i++) { System.out.println("Total number of sheets in excel are:- " + workbook.getNumberOfSheets() + "\n" + "current sheet is :- " + workbook.getSheetName(i)); sheet = workbook.getSheetAt(i); int lastRow = sheet.getLastRowNum(); LinkedHashMap<String, String> map = new LinkedHashMap<String, String>(); LinkedList<String> keyList = new LinkedList<String>(); LinkedList<String> valueList = new LinkedList<String>(); for (int t = 0; t <= lastRow; t++) { System.out.println("current row being accessed" + "\t" + t); if (keyList.size() == 0) { keyList = readXL(t); System.out.println(keyList); } else { valueList = readXL(t); System.out.println(valueList); for (int p = 0; p <= keyList.size() - 1; p++) { System.out.println( "Key:-" + "\t" + keyList.get(p) + "\t" + "Value:-" + "\t" + valueList.get(p)); map.put(keyList.get(p), valueList.get(p)); } System.out.println(map); keyList.clear(); valueList.clear(); } } // System.out.println("***" + "\n"); // for (int p = 0; p <= keyList.size() - 1; p++) { // System.out.println("Key:-" + "\t" + keyList.get(p) + "\t" // + "Value:-" + "\t" + valueList.get(p)); // map.put(keyList.get(p), valueList.get(p)); // } } } } public static LinkedList<String> readXL(int index) throws Exception, FileNotFoundException, IOException { String filename = "C:\\Users\\pkapoor22\\Desktop\\ER_Automation\\excel\\KKK\\TC\\Validation_1.xls"; LinkedList<String> dataList = null; Workbook workbook = WorkbookFactory.create(new FileInputStream(filename)); Sheet sheet = workbook.getSheet("Sheet2"); Row row = sheet.getRow(index); if (row != null) { // for (row : sheet) {// Row Iteration int crrRowNum = row.getRowNum(); System.out.println(crrRowNum + "^^^^^^^^^^^^^^^^^^^^^"); if ((crrRowNum % 2) == 0) {// Checking if row is Even or Odd // evenDataList dataList = new LinkedList<String>(); for (Cell cell : row) { // Cell-Wise Iteration switch (cell.getCellType()) { case Cell.CELL_TYPE_STRING: System.out.println(cell.getRichStringCellValue().getString()); // evenDataList.add(cell.getRichStringCellValue().toString()); dataList.add(cell.getRichStringCellValue().toString()); break; case Cell.CELL_TYPE_NUMERIC: if (DateUtil.isCellDateFormatted(cell)) { System.out.println(cell.getDateCellValue()); // evenDataList // .add(String.valueOf(cell.getDateCellValue())); dataList.add(String.valueOf(cell.getDateCellValue())); } else { System.out.println(cell.getNumericCellValue()); // evenDataList.add(String.valueOf(cell // .getNumericCellValue())); dataList.add(String.valueOf(cell.getNumericCellValue())); } break; case Cell.CELL_TYPE_BOOLEAN: System.out.println(cell.getBooleanCellValue()); // evenDataList // .add(String.valueOf(cell.getBooleanCellValue())); dataList.add(String.valueOf(cell.getBooleanCellValue())); break; case Cell.CELL_TYPE_FORMULA: System.out.println(cell.getCellFormula()); // evenDataList.add(String.valueOf(cell.getCellFormula())); dataList.add(String.valueOf(cell.getCellFormula())); break; default: System.out.println(); } } } else { dataList = new LinkedList<String>(); for (Cell cell : row) { // Cell-Wise Iteration switch (cell.getCellType()) { case Cell.CELL_TYPE_STRING: System.out.println(cell.getRichStringCellValue().getString()); dataList.add(cell.getRichStringCellValue().toString()); break; case Cell.CELL_TYPE_NUMERIC: if (DateUtil.isCellDateFormatted(cell)) { System.out.println(cell.getDateCellValue()); dataList.add(String.valueOf(cell.getDateCellValue())); } else { System.out.println(cell.getNumericCellValue()); dataList.add(String.valueOf(cell.getNumericCellValue())); } break; case Cell.CELL_TYPE_BOOLEAN: System.out.println(cell.getBooleanCellValue()); dataList.add(String.valueOf(cell.getBooleanCellValue())); break; case Cell.CELL_TYPE_FORMULA: System.out.println(cell.getCellFormula()); dataList.add(String.valueOf(cell.getCellFormula())); break; default: System.out.println("NULL"); dataList.add("Null"); } } // break; } } // for (int p = 0; p <= evenDataList.size(); p++) { // for (int d = 0; d <= dataList.size(); d++) { // System.out.println("Key:-" + "\t" + evenDataList.get(p) // + "\t" + "Value:-" + "\t" + dataList.get(d)); // map.put(evenDataList.get(p), dataList.get(d)); // } // } // } // for (int p = 0; p <= evenDataList.size() - 1; p++) { // System.out.println("Key:-" + "\t" + evenDataList.get(p) + "\t" // + "Value:-" + "\t" + dataList.get(p)); // map.put(evenDataList.get(p), dataList.get(p)); // } return dataList; } }
[ "pkapoor22@asiapac.globalcsc.net" ]
pkapoor22@asiapac.globalcsc.net
263c0f1c6cf312edfffddff59c3eb1c350301c9c
832a25d71428fcc97554ead3184c34c7668c13f6
/src/main/java/com/jeeplus/modules/report/ironfofiveqtzyqtzlreport/service/IronfofiveqtzyqtzlReportService.java
81a7bf427a92eda227b0a415271a8ad8320fb7e3
[]
no_license
wxbing2015/jeeplusS
bb3b2bc7e475a7042c9a147952008ca93de59feb
faf39d547fad5fad9ff0e046fd9a657f2202a886
refs/heads/master
2020-07-19T11:44:35.847707
2018-05-02T11:59:39
2018-05-02T11:59:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,528
java
/** * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved. */ package com.jeeplus.modules.report.ironfofiveqtzyqtzlreport.service; import java.util.List; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.jeeplus.common.persistence.Page; import com.jeeplus.common.service.CrudService; import com.jeeplus.modules.report.ironfofiveqtzyqtzlreport.entity.IronfofiveqtzyqtzlReport; import com.jeeplus.modules.report.ironfofiveqtzyqtzlreport.dao.IronfofiveqtzyqtzlReportDao; /** * 气体种类Service * @author anti_magina * @version 2018-04-23 */ @Service @Transactional(readOnly = true) public class IronfofiveqtzyqtzlReportService extends CrudService<IronfofiveqtzyqtzlReportDao, IronfofiveqtzyqtzlReport> { public IronfofiveqtzyqtzlReport get(String id) { return super.get(id); } public List<IronfofiveqtzyqtzlReport> findList(IronfofiveqtzyqtzlReport ironfofiveqtzyqtzl) { return super.findList(ironfofiveqtzyqtzl); } public Page<IronfofiveqtzyqtzlReport> findPage(Page<IronfofiveqtzyqtzlReport> page, IronfofiveqtzyqtzlReport ironfofiveqtzyqtzl) { return super.findPage(page, ironfofiveqtzyqtzl); } @Transactional(readOnly = false) public void save(IronfofiveqtzyqtzlReport ironfofiveqtzyqtzl) { super.save(ironfofiveqtzyqtzl); } @Transactional(readOnly = false) public void delete(IronfofiveqtzyqtzlReport ironfofiveqtzyqtzl) { super.delete(ironfofiveqtzyqtzl); } }
[ "anti_magina@yeah.net" ]
anti_magina@yeah.net
6588f5d0cdd1101032538c64121b3fbe3ca3a48b
8dbd0efac1c60a6863c4374856db079573ad5fc1
/demo/src/main/java/com/example/model/V3MemberAgent.java
d84531492bec8a7acd7a273496616e376b004517
[]
no_license
vilolo/javabuck
c24d99b7694d2036db9d570dab9a8027ff4fd2cf
00044d06f73584a4c1abebbc1713dc002f8c2328
refs/heads/master
2022-10-01T14:20:51.334210
2019-06-21T12:28:30
2019-06-21T12:28:30
172,614,187
0
0
null
2022-09-01T23:05:11
2019-02-26T01:25:56
HTML
UTF-8
Java
false
false
1,785
java
package com.example.model; import java.util.Date; public class V3MemberAgent { private Integer id; private Integer memberId; private Integer agentGoodsId; private Integer levelId; private String areaNames; private String areaIds; private Boolean status; private Date createdAt; private Date updatedAt; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Integer getMemberId() { return memberId; } public void setMemberId(Integer memberId) { this.memberId = memberId; } public Integer getAgentGoodsId() { return agentGoodsId; } public void setAgentGoodsId(Integer agentGoodsId) { this.agentGoodsId = agentGoodsId; } public Integer getLevelId() { return levelId; } public void setLevelId(Integer levelId) { this.levelId = levelId; } public String getAreaNames() { return areaNames; } public void setAreaNames(String areaNames) { this.areaNames = areaNames == null ? null : areaNames.trim(); } public String getAreaIds() { return areaIds; } public void setAreaIds(String areaIds) { this.areaIds = areaIds == null ? null : areaIds.trim(); } public Boolean getStatus() { return status; } public void setStatus(Boolean status) { this.status = status; } public Date getCreatedAt() { return createdAt; } public void setCreatedAt(Date createdAt) { this.createdAt = createdAt; } public Date getUpdatedAt() { return updatedAt; } public void setUpdatedAt(Date updatedAt) { this.updatedAt = updatedAt; } }
[ "764523295@qq.com" ]
764523295@qq.com
56c91c2d2ba485649a93b7fe54be3d3e325c2cf3
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
/ast_results/cybro_PalmCalc/actionbarsherlock/src/com/actionbarsherlock/internal/app/ActionBarWrapper.java
1867b40a5a1538dfbdd379fcc187c200f207e012
[]
no_license
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
0564143d92f8024ff5fa6b659c2baebf827582b1
refs/heads/master
2020-07-13T13:53:40.297493
2019-01-11T11:51:18
2019-01-11T11:51:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
12,790
java
// isComment package com.actionbarsherlock.internal.app; import java.util.HashSet; import java.util.Set; import android.app.Activity; import android.content.Context; import android.graphics.drawable.Drawable; import android.support.v4.app.FragmentActivity; import android.support.v4.app.FragmentTransaction; import android.view.View; import android.widget.SpinnerAdapter; import com.actionbarsherlock.app.ActionBar; public class isClassOrIsInterface extends ActionBar implements android.app.ActionBar.OnNavigationListener, android.app.ActionBar.OnMenuVisibilityListener { private final Activity isVariable; private final android.app.ActionBar isVariable; private ActionBar.OnNavigationListener isVariable; private Set<OnMenuVisibilityListener> isVariable = new HashSet<OnMenuVisibilityListener>(isIntegerConstant); private FragmentTransaction isVariable; public isConstructor(Activity isParameter) { isNameExpr = isNameExpr; isNameExpr = isNameExpr.isMethod(); if (isNameExpr != null) { isNameExpr.isMethod(this); // isComment int isVariable = isNameExpr.isMethod(); isNameExpr.isMethod((isNameExpr & isNameExpr) != isIntegerConstant); } } @Override public void isMethod(boolean isParameter) { isNameExpr.isMethod(isNameExpr); } @Override public Context isMethod() { return isNameExpr.isMethod(); } @Override public void isMethod(View isParameter) { isNameExpr.isMethod(isNameExpr); } @Override public void isMethod(View isParameter, LayoutParams isParameter) { android.app.ActionBar.LayoutParams isVariable = new android.app.ActionBar.LayoutParams(isNameExpr); isNameExpr.isFieldAccessExpr = isNameExpr.isFieldAccessExpr; isNameExpr.isFieldAccessExpr = isNameExpr.isFieldAccessExpr; isNameExpr.isFieldAccessExpr = isNameExpr.isFieldAccessExpr; isNameExpr.isFieldAccessExpr = isNameExpr.isFieldAccessExpr; isNameExpr.isFieldAccessExpr = isNameExpr.isFieldAccessExpr; isNameExpr.isMethod(isNameExpr, isNameExpr); } @Override public void isMethod(int isParameter) { isNameExpr.isMethod(isNameExpr); } @Override public void isMethod(int isParameter) { isNameExpr.isMethod(isNameExpr); } @Override public void isMethod(Drawable isParameter) { isNameExpr.isMethod(isNameExpr); } @Override public void isMethod(int isParameter) { isNameExpr.isMethod(isNameExpr); } @Override public void isMethod(Drawable isParameter) { isNameExpr.isMethod(isNameExpr); } @Override public void isMethod(SpinnerAdapter isParameter, OnNavigationListener isParameter) { isNameExpr = isNameExpr; isNameExpr.isMethod(isNameExpr, (isNameExpr != null) ? this : null); } @Override public boolean isMethod(int isParameter, long isParameter) { // isComment return isNameExpr.isMethod(isNameExpr, isNameExpr); } @Override public void isMethod(int isParameter) { isNameExpr.isMethod(isNameExpr); } @Override public int isMethod() { return isNameExpr.isMethod(); } @Override public int isMethod() { return isNameExpr.isMethod(); } @Override public void isMethod(CharSequence isParameter) { isNameExpr.isMethod(isNameExpr); } @Override public void isMethod(int isParameter) { isNameExpr.isMethod(isNameExpr); } @Override public void isMethod(CharSequence isParameter) { isNameExpr.isMethod(isNameExpr); } @Override public void isMethod(int isParameter) { isNameExpr.isMethod(isNameExpr); } @Override public void isMethod(int isParameter) { isNameExpr.isMethod(isNameExpr); // isComment isNameExpr.isMethod((isNameExpr & isNameExpr) != isIntegerConstant); } @Override public void isMethod(int isParameter, int isParameter) { isNameExpr.isMethod(isNameExpr, isNameExpr); // isComment if ((isNameExpr & isNameExpr) != isIntegerConstant) { isNameExpr.isMethod((isNameExpr & isNameExpr) != isIntegerConstant); } } @Override public void isMethod(boolean isParameter) { isNameExpr.isMethod(isNameExpr); } @Override public void isMethod(boolean isParameter) { isNameExpr.isMethod(isNameExpr); } @Override public void isMethod(boolean isParameter) { isNameExpr.isMethod(isNameExpr); } @Override public void isMethod(boolean isParameter) { isNameExpr.isMethod(isNameExpr); } @Override public void isMethod(boolean isParameter) { isNameExpr.isMethod(isNameExpr); } @Override public void isMethod(Drawable isParameter) { isNameExpr.isMethod(isNameExpr); } @Override public void isMethod(Drawable isParameter) { isNameExpr.isMethod(isNameExpr); } @Override public void isMethod(Drawable isParameter) { isNameExpr.isMethod(isNameExpr); } @Override public View isMethod() { return isNameExpr.isMethod(); } @Override public CharSequence isMethod() { return isNameExpr.isMethod(); } @Override public CharSequence isMethod() { return isNameExpr.isMethod(); } @Override public int isMethod() { return isNameExpr.isMethod(); } @Override public void isMethod(int isParameter) { isNameExpr.isMethod(isNameExpr); } @Override public int isMethod() { return isNameExpr.isMethod(); } public class isClassOrIsInterface extends ActionBar.Tab implements android.app.ActionBar.TabListener { final android.app.ActionBar.Tab isVariable; private Object isVariable; private TabListener isVariable; public isConstructor(android.app.ActionBar.Tab isParameter) { isNameExpr = isNameExpr; isNameExpr.isMethod(this); } @Override public int isMethod() { return isNameExpr.isMethod(); } @Override public Drawable isMethod() { return isNameExpr.isMethod(); } @Override public CharSequence isMethod() { return isNameExpr.isMethod(); } @Override public Tab isMethod(Drawable isParameter) { isNameExpr.isMethod(isNameExpr); return this; } @Override public Tab isMethod(int isParameter) { isNameExpr.isMethod(isNameExpr); return this; } @Override public Tab isMethod(CharSequence isParameter) { isNameExpr.isMethod(isNameExpr); return this; } @Override public Tab isMethod(int isParameter) { isNameExpr.isMethod(isNameExpr); return this; } @Override public Tab isMethod(View isParameter) { isNameExpr.isMethod(isNameExpr); return this; } @Override public Tab isMethod(int isParameter) { isNameExpr.isMethod(isNameExpr); return this; } @Override public View isMethod() { return isNameExpr.isMethod(); } @Override public Tab isMethod(Object isParameter) { isNameExpr = isNameExpr; return this; } @Override public Object isMethod() { return isNameExpr; } @Override public Tab isMethod(TabListener isParameter) { isNameExpr.isMethod(isNameExpr != null ? this : null); isNameExpr = isNameExpr; return this; } @Override public void isMethod() { isNameExpr.isMethod(); } @Override public Tab isMethod(int isParameter) { isNameExpr.isMethod(isNameExpr); return this; } @Override public Tab isMethod(CharSequence isParameter) { isNameExpr.isMethod(isNameExpr); return this; } @Override public CharSequence isMethod() { return isNameExpr.isMethod(); } @Override public void isMethod(android.app.ActionBar.Tab isParameter, android.app.FragmentTransaction isParameter) { if (isNameExpr != null) { FragmentTransaction isVariable = null; if (isNameExpr instanceof FragmentActivity) { isNameExpr = ((FragmentActivity) isNameExpr).isMethod().isMethod().isMethod(); } isNameExpr.isMethod(this, isNameExpr); if (isNameExpr != null && !isNameExpr.isMethod()) { isNameExpr.isMethod(); } } } @Override public void isMethod(android.app.ActionBar.Tab isParameter, android.app.FragmentTransaction isParameter) { if (isNameExpr != null) { if (isNameExpr == null && isNameExpr instanceof FragmentActivity) { isNameExpr = ((FragmentActivity) isNameExpr).isMethod().isMethod().isMethod(); } isNameExpr.isMethod(this, isNameExpr); if (isNameExpr != null) { if (!isNameExpr.isMethod()) { isNameExpr.isMethod(); } isNameExpr = null; } } } @Override public void isMethod(android.app.ActionBar.Tab isParameter, android.app.FragmentTransaction isParameter) { if (isNameExpr != null) { FragmentTransaction isVariable = null; if (isNameExpr instanceof FragmentActivity) { isNameExpr = ((FragmentActivity) isNameExpr).isMethod().isMethod().isMethod(); isNameExpr = isNameExpr; } isNameExpr.isMethod(this, isNameExpr); } } } @Override public Tab isMethod() { return new TabWrapper(isNameExpr.isMethod()); } @Override public void isMethod(Tab isParameter) { isNameExpr.isMethod(((TabWrapper) isNameExpr).isFieldAccessExpr); } @Override public void isMethod(Tab isParameter, boolean isParameter) { isNameExpr.isMethod(((TabWrapper) isNameExpr).isFieldAccessExpr, isNameExpr); } @Override public void isMethod(Tab isParameter, int isParameter) { isNameExpr.isMethod(((TabWrapper) isNameExpr).isFieldAccessExpr, isNameExpr); } @Override public void isMethod(Tab isParameter, int isParameter, boolean isParameter) { isNameExpr.isMethod(((TabWrapper) isNameExpr).isFieldAccessExpr, isNameExpr, isNameExpr); } @Override public void isMethod(Tab isParameter) { isNameExpr.isMethod(((TabWrapper) isNameExpr).isFieldAccessExpr); } @Override public void isMethod(int isParameter) { isNameExpr.isMethod(isNameExpr); } @Override public void isMethod() { isNameExpr.isMethod(); } @Override public void isMethod(Tab isParameter) { isNameExpr.isMethod(((TabWrapper) isNameExpr).isFieldAccessExpr); } @Override public Tab isMethod() { android.app.ActionBar.Tab isVariable = isNameExpr.isMethod(); return (isNameExpr != null) ? (Tab) isNameExpr.isMethod() : null; } @Override public Tab isMethod(int isParameter) { android.app.ActionBar.Tab isVariable = isNameExpr.isMethod(isNameExpr); return (isNameExpr != null) ? (Tab) isNameExpr.isMethod() : null; } @Override public int isMethod() { return isNameExpr.isMethod(); } @Override public int isMethod() { return isNameExpr.isMethod(); } @Override public void isMethod() { isNameExpr.isMethod(); } @Override public void isMethod() { isNameExpr.isMethod(); } @Override public boolean isMethod() { return isNameExpr.isMethod(); } @Override public void isMethod(OnMenuVisibilityListener isParameter) { isNameExpr.isMethod(isNameExpr); } @Override public void isMethod(OnMenuVisibilityListener isParameter) { isNameExpr.isMethod(isNameExpr); } @Override public void isMethod(boolean isParameter) { for (OnMenuVisibilityListener isVariable : isNameExpr) { isNameExpr.isMethod(isNameExpr); } } }
[ "matheus@melsolucoes.net" ]
matheus@melsolucoes.net
89edea58b42245835d5adbeb1a9f2bd5e71ee1df
62603420bbcce53468e9e867a6bce1bd8dfe741b
/app/src/main/java/com/yoga/isha/qtimer/MainActivity.java
927d3a700b8c5d7c8e9c6456228a60d82fccdc70
[]
no_license
beeka5/qtimer
9ef10e269bfdb82dfa9dc132dbdbe15960d326c8
e1f16adda3159e5e4751f1de6f06fe2f3adcbdff
refs/heads/master
2020-06-28T22:28:42.815132
2016-11-22T11:44:04
2016-11-22T11:44:04
74,466,907
0
0
null
null
null
null
UTF-8
Java
false
false
9,098
java
package com.yoga.isha.qtimer; import android.content.Context; import android.content.Intent; import android.graphics.drawable.Drawable; import android.media.AudioManager; import android.media.MediaPlayer; import android.net.Uri; import android.os.PowerManager; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.inputmethod.InputMethodManager; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; import com.daimajia.androidanimations.library.Techniques; import com.daimajia.androidanimations.library.YoYo; import com.vstechlab.easyfonts.EasyFonts; import java.io.IOException; import java.lang.reflect.Array; import java.util.concurrent.*; import java.util.*; public class MainActivity extends AppCompatActivity implements MediaPlayer.OnPreparedListener{ int elapsedTime = 0; int CurrentQueuedTime = 0; private TextView tv_Counter; private Button startBtn,stopBtn; private EditText et_inputText; String[] times; boolean isRunning = false; CircleProgressBar circleProgressBar; PowerManager.WakeLock wakeLock; Timer timer; //private static String elapsedTime; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); tv_Counter = (TextView) findViewById(R.id.textViewTime); startBtn = (Button)findViewById(R.id.btnStart); stopBtn = (Button)findViewById(R.id.btnStop); et_inputText = (EditText) findViewById(R.id.inputTextField); tv_Counter.setTypeface(EasyFonts.robotoThin(this)); et_inputText.setTypeface(EasyFonts.robotoThin(this)); et_inputText.setHint(R.string.editText); circleProgressBar = (CircleProgressBar) findViewById(R.id.custom_progressBar); circleProgressBar.setProgress(0); PowerManager pm = (PowerManager) getSystemService(Context.POWER_SERVICE); wakeLock = pm.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, "My wakelook"); wakeLock.acquire(); startBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { hidekeyboard(); String inputText = et_inputText.getText().toString().trim(); if (inputText.isEmpty()){ Toast.makeText(MainActivity.this,"Empty",Toast.LENGTH_SHORT).show(); }else{ if (!isRunning){ isRunning=!isRunning; et_inputText.setEnabled(false); times = inputText.split(","); startTimer(times[CurrentQueuedTime]); startBtn.setBackgroundResource(R.drawable.pause); }else{ pausetimer(); } } YoYo.with(Techniques.BounceInDown) .duration(700) .playOn(startBtn); // Intent intent = new Intent(); // intent.setType("audio/mp3"); // intent.setAction(Intent.ACTION_GET_CONTENT); // startActivityForResult(Intent.createChooser( // intent, "Open Audio (mp3) file"), 1); // } }); stopBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { stoptimer(); resetTime(); } }); } public void onRestoreInstanceState(Bundle savedInstanceState) { // Always call the superclass so it can restore the view hierarchy super.onRestoreInstanceState(savedInstanceState); // Restore state members from saved instance tv_Counter.setText(savedInstanceState.getString("elapsedtime")); et_inputText.setText(savedInstanceState.getString("queuetime")); System.out.println("Elapsed Time : -"+savedInstanceState.getString("elapsedtime")); System.out.println("Queued times : -"+savedInstanceState.getString("queuetime")); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (resultCode == RESULT_OK) if (requestCode == 1) { Uri audioFileUri = data.getData(); //save this uri final MediaPlayer mPlayer = new MediaPlayer(); if (mPlayer != null){ mPlayer.reset(); } try { mPlayer.setDataSource(this, audioFileUri); } catch (IllegalArgumentException e) { Toast.makeText(getApplicationContext(), "1 You might not set the URI correctly!", Toast.LENGTH_LONG).show(); } catch (SecurityException e) { Toast.makeText(getApplicationContext(), "2 You might not set the URI correctly!", Toast.LENGTH_LONG).show(); } catch (IllegalStateException e) { Toast.makeText(getApplicationContext(), "3 You might not set the URI correctly!", Toast.LENGTH_LONG).show(); } catch (IOException e) { e.printStackTrace(); } mPlayer.prepareAsync(); mPlayer.setOnPreparedListener(this); } } void startTimer(final String duration){ final float finished = Float.parseFloat(duration) * 60 *1000; timer = new Timer(); timer.scheduleAtFixedRate(new TimerTask() { @Override public void run() { elapsedTime++; try { runOnUiThread(new Runnable() { @Override public void run() { int millis = elapsedTime*1000; String hms = String.format("%02d:%02d:%02d", TimeUnit.MILLISECONDS.toHours(millis), TimeUnit.MILLISECONDS.toMinutes(millis) - TimeUnit.HOURS.toMinutes(TimeUnit.MILLISECONDS.toHours(millis)), TimeUnit.MILLISECONDS.toSeconds(millis) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(millis))); tv_Counter.setText(hms); circleProgressBar.setProgressWithAnimation(millis/finished*100); if (finished == millis) { stoptimer(); resetSingleProcess(); playAudio(); } } }); } catch (Exception e) { } } }, 0, 1000); } void resetTime(){ resetSingleProcess(); //reset full process CurrentQueuedTime=0; isRunning=false; et_inputText.setEnabled(true); startBtn.setBackgroundResource(R.drawable.play); } void resetSingleProcess(){ //reset single process tv_Counter.setText("00:00:00"); elapsedTime=0; circleProgressBar.setProgressWithAnimation(0); } void playAudio(){ MediaPlayer a = MediaPlayer.create(this,R.raw.chime); a.start(); a.setOnCompletionListener(new MediaPlayer.OnCompletionListener() { @Override public void onCompletion(MediaPlayer mp) { startNextCounter(); } }); } void startNextCounter(){ CurrentQueuedTime++; if (times.length > CurrentQueuedTime) { startTimer(times[CurrentQueuedTime]); }else{ stoptimer(); resetTime(); } } void pausetimer(){ stoptimer(); isRunning=false; startBtn.setBackgroundResource(R.drawable.play); } void stoptimer(){ if (timer == null || !isRunning){ return; } timer.cancel(); } void hidekeyboard(){ // Check if no view has focus: View view = this.getCurrentFocus(); if (view != null) { InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(view.getWindowToken(), 0); } } @Override public void onBackPressed() { super.onBackPressed(); pausetimer(); } @Override public void onPrepared(MediaPlayer mp) { mp.start(); } @Override public void onSaveInstanceState(Bundle savedInstanceState) { // Save the user's current game state // Always call the superclass so it can save the view hierarchy state super.onSaveInstanceState(savedInstanceState); } public void releaseWakelock(View v) { wakeLock.release(); } }
[ "bikash.maharjan@ebpearls.com" ]
bikash.maharjan@ebpearls.com
cb86744eba9620d576cf716aeaeede3750282d21
67a4f8e0c49645d9096d27404a6ff23bdc5e7a79
/app/src/main/java/com/kloudsync/techexcel2/bean/EventPresnterChanged.java
8cf3b383630e79a056614e8646fc045fb052d73d
[]
no_license
15000712803peng/My_Klousync_TV
5d9b91ba9b236de2c2e4d72673745ff1f80c10e3
ea23c0a9a7edee321761272e6fff32b7da46ab09
refs/heads/master
2020-08-03T12:46:18.810867
2020-06-17T05:34:51
2020-06-17T05:34:51
211,755,986
0
0
null
null
null
null
UTF-8
Java
false
false
326
java
package com.kloudsync.techexcel2.bean; /** * Created by tonyan on 2020/1/18. */ public class EventPresnterChanged { private String presenterId; public String getPresenterId() { return presenterId; } public void setPresenterId(String presenterId) { this.presenterId = presenterId; } }
[ "15000712803@139.com" ]
15000712803@139.com
10e7a7b6beddb2fd22f93e2940a473963d3122e8
750a9aa68b1280e44b1e8af15cd0d8bbb897d551
/app/src/main/java/com/murtyacademy/sharedpref/SharedPrefHelper.java
46e5e9b6e7dfdf1d45c55387ec8eaf1c446bbe05
[]
no_license
ksrikanth189/MurtyAcademy
7360df45dd865ebef6d738b41c623c0b7fa4beab
3de3aa9ab0c5f66dd734b4d7e1ee5c75a45bea95
refs/heads/master
2020-04-15T03:55:54.490852
2019-01-07T02:12:17
2019-01-07T02:12:17
164,365,928
0
0
null
null
null
null
UTF-8
Java
false
false
4,414
java
package com.murtyacademy.sharedpref; import android.content.Context; import android.content.SharedPreferences; import com.google.gson.Gson; import com.murtyacademy.Login.interactor.model.LoginActivityReq; import com.murtyacademy.Login.interactor.model.LoginActivityRes; import com.murtyacademy.splash.interactor.model.CheckForUpdateRes; public class SharedPrefHelper { private static SharedPrefHelper objInstance; // Shared preferences file name public static final String PREFER_NAME = "Reg"; int PRIVATE_MODE = 0; // Shared Preferences reference SharedPreferences pref; public static final String KEY_NotificationRegID="regid"; // Editor reference for Shared preferences static SharedPreferences.Editor editor; // Context Context _context; public static void checkUpdate(Context context, CheckForUpdateRes checkForUpdateRes) { ObscuredSharedPreferences prefsLogin = ObscuredSharedPreferences.getPrefs(context, "CheckUpdate", Context.MODE_PRIVATE); ObscuredSharedPreferences.Editor editor = prefsLogin.edit(); Gson gson = new Gson(); String json = gson.toJson(checkForUpdateRes); editor.putString("checkUpdate_data", json); editor.commit(); } public static CheckForUpdateRes getCheckUpdate(Context context) { ObscuredSharedPreferences prefsLogin = ObscuredSharedPreferences.getPrefs(context, "CheckUpdate", Context.MODE_PRIVATE); String user_data = prefsLogin.getString("checkUpdate_data", ""); CheckForUpdateRes checkUpdate_dataRes = new Gson().fromJson(user_data, CheckForUpdateRes.class); return checkUpdate_dataRes; } // Constructor public SharedPrefHelper(Context context) { context = context; pref = context.getSharedPreferences(PREFER_NAME, PRIVATE_MODE); editor = pref.edit(); } public static SharedPrefHelper getInstance(Context context) { if (objInstance == null) { objInstance = new SharedPrefHelper(context); } return objInstance; } public void SaveNotificationRegID(String regid){ editor.putString(KEY_NotificationRegID,regid); editor.commit(); } public String getNotificationRegID(){ return pref.getString(KEY_NotificationRegID,""); } public static void saveLoginDts(Context context, LoginActivityRes userLoginActivityRes) { ObscuredSharedPreferences prefsLogin = ObscuredSharedPreferences.getPrefs(context, "LOGIN_DTS", Context.MODE_PRIVATE); ObscuredSharedPreferences.Editor editor = prefsLogin.edit(); Gson gson = new Gson(); String json = gson.toJson(userLoginActivityRes); editor.putString("user_data", json); editor.commit(); } public static LoginActivityRes getLogin(Context context) { ObscuredSharedPreferences prefsLogin = ObscuredSharedPreferences.getPrefs(context, "LOGIN_DTS", Context.MODE_PRIVATE); String user_data = prefsLogin.getString("user_data", ""); LoginActivityRes loginActivityRes = new Gson().fromJson(user_data, LoginActivityRes.class); return loginActivityRes; } public static void clearLoginData(Context context) { ObscuredSharedPreferences prefsLogin = ObscuredSharedPreferences.getPrefs(context, "LOGIN_DTS_REQ", Context.MODE_PRIVATE); ObscuredSharedPreferences.Editor editor = prefsLogin.edit(); editor.putString("user_data_req", null); editor.commit(); } public static void saveLoginDtsReq(Context context, LoginActivityReq userLoginActivityRes) { ObscuredSharedPreferences prefsLogin = ObscuredSharedPreferences.getPrefs(context, "LOGIN_DTS_REQ", Context.MODE_PRIVATE); ObscuredSharedPreferences.Editor editor = prefsLogin.edit(); Gson gson = new Gson(); String json = gson.toJson(userLoginActivityRes); editor.putString("user_data_req", json); editor.commit(); } public static LoginActivityReq getUserDatWithOutLogin(Context context) { ObscuredSharedPreferences prefsLogin = ObscuredSharedPreferences.getPrefs(context, "LOGIN_DTS_REQ", Context.MODE_PRIVATE); String user_data = prefsLogin.getString("user_data_req", ""); LoginActivityReq loginActivityReq = new Gson().fromJson(user_data, LoginActivityReq.class); return loginActivityReq; } }
[ "sudhakar@321" ]
sudhakar@321
8a30e326ffa14e700b0e199dcc6c5a85956a3fb9
c31ce2d38b397a2d4da67507f1b45cec7c470c1a
/src/main/java/Main.java
ed681801f786fd136a1b967abdae5fb24da0863d
[]
no_license
botkoda/netologyHomeWorkToJson
2a1d671bce4e1fc7597ed78d8350d601e2d22306
350a016229e507ce95b0c60aeb352ba50e3b2548
refs/heads/main
2023-07-11T20:46:12.527251
2021-08-22T15:14:51
2021-08-22T15:14:51
397,320,081
0
0
null
null
null
null
UTF-8
Java
false
false
5,516
java
import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.google.gson.reflect.TypeToken; import com.opencsv.CSVReader; import com.opencsv.bean.ColumnPositionMappingStrategy; import com.opencsv.bean.CsvToBean; import com.opencsv.bean.CsvToBeanBuilder; import org.w3c.dom.*; import org.xml.sax.SAXException; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import java.io.File; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; import java.lang.reflect.Type; import java.sql.Array; import java.util.ArrayList; import java.util.Arrays; import java.util.List; public class Main { public static void main(String[] args) { String[] columnMapping = {"id", "firstName", "lastName", "country", "age"}; String fileName = "data.csv"; String newJsonFile = "new_data_from_CSV.json"; //ЗАДАНИЕ1 csv в json List<Employee> list = parseCSV(columnMapping, fileName); String json = listToJson(list); jsonToList(json); countEmployee(list); writeString(json, newJsonFile); //ЗАДАНИЕ2 xml в json List<Employee> list2 = parseXML("data2.xml"); json = listToJson(list2); newJsonFile = "new_data_from_XML.json"; writeString(json, newJsonFile); } static int countEmployee(List<Employee> list) { return list.size(); } static List<Employee> jsonToList(String jsonText) { GsonBuilder builder = new GsonBuilder(); Gson gson = builder.create(); // List<Employee> employee=gson.fromJson(jsonText,List<Employee>); Type listType = new TypeToken<ArrayList<Employee>>() { }.getType(); List<Employee> employee = gson.fromJson(jsonText, listType); return employee; } static List<Employee> parseXML(String fileName) { List<Employee> employees = new ArrayList<Employee>(); DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); try { DocumentBuilder builder = factory.newDocumentBuilder(); Document doc = builder.parse(new File(fileName)); //корневой элемент Node root = doc.getDocumentElement(); //список дочерних элементов NodeList nodeList = root.getChildNodes(); for (int i = 0; i < nodeList.getLength(); i++) { Node node = nodeList.item(i); //если в XML найден элемент employees if (Node.ELEMENT_NODE == node.getNodeType()) { Element employee = (Element) node; // if(employee.getNodeName().equals("employee")){ //в список добавляем объекты класса Employee employees.add( new Employee(Integer.parseInt(employee.getElementsByTagName("id").item(0).getTextContent()), employee.getElementsByTagName("firstName").item(0).getTextContent(), employee.getElementsByTagName("lastName").item(0).getTextContent(), employee.getElementsByTagName("country").item(0).getTextContent(), Integer.parseInt(employee.getElementsByTagName("age").item(0).getTextContent())) ); // } } } } catch (SAXException | ParserConfigurationException | IOException e) { e.printStackTrace(); } return employees; } static void writeString(String json, String nameJsonFile) { try (FileWriter file = new FileWriter(nameJsonFile)) { file.write(json); file.flush(); } catch (IOException e) { e.printStackTrace(); } } static String listToJson(List<Employee> list) { Type listType = new TypeToken<List<Employee>>() { }.getType(); GsonBuilder builder = new GsonBuilder(); Gson gson = builder.create(); String json = gson.toJson(list, listType); return json; } static List<Employee> parseCSV(String[] columnMapping, String fileName) { List<Employee> employees = null; //поптыка чтения данных их data.csv try (CSVReader reader = new CSVReader(new FileReader(fileName))) { //класс, к которому будут привязывать данные из CSV документа, ColumnPositionMappingStrategy<Employee> strategy = new ColumnPositionMappingStrategy<>(); strategy.setType(Employee.class); //а также порядок расположения полей в этом документе strategy.setColumnMapping(columnMapping); //создает инструмент для взаимодействия CSV документа и выбранной ранее стратегии CsvToBean<Employee> csv = new CsvToBeanBuilder<Employee>(reader).withMappingStrategy(strategy).build(); //присваеваем полученные значения списку employees = csv.parse(); } catch (IOException e) { e.printStackTrace(); } return employees; } }
[ "botkoda@gmail.com" ]
botkoda@gmail.com
149f0993983f9823e3a6d789756a46ec11ae88fb
f69d03b48251b0926276a56da1ac4557a5fdd02f
/Begin17.java
ac55116c682c4a65521dad66aa0e0a932c72b1c4
[]
no_license
AleksandrGontsarov/sass989Repo007AbramjanBegin
8b99807b13080a31b5f96f75327444eff617d4e7
5dcec454b036bdc482ce2089499f65db525419bb
refs/heads/master
2021-01-13T00:48:35.018467
2015-12-11T19:12:04
2015-12-11T19:12:04
47,845,903
0
0
null
null
null
null
UTF-8
Java
false
false
1,462
java
import java.util.Scanner; /** * Created by Aleksandr Gontsarov on 13.06.15. */ public class Begin17 { // Даны три точки A, B, C на числовой оси. // Найти длины отрезков AC и BC и их сумму. public static void main(String[] args) { Scanner x = new Scanner(System.in); System.out.print("Ввидите на числовой оси точку A = "); int a = x.nextInt(); Scanner y = new Scanner(System.in); System.out.print("Ввидите на числовой оси точку B = "); int b = y.nextInt(); Scanner z = new Scanner(System.in); System.out.print("Ввидите на числовой оси точку C = "); int c = z.nextInt(); System.out.println(); int d = c - a; int ac; if (d >= 0) ac = d; // приведение к модулю числа else ac = d * -1; // приведение к модулю числа int e = c - b; int bc; if (e >= 0) bc = e; // приведение к модулю числа else bc = e * -1; // приведение к модулю числа int sum = ac + bc; System.out.println("Длина отрезка AC = " + ac); System.out.println("Длина отрезка BC = " + bc); System.out.println("Сумма отрезков AC и BC = " + sum); } }
[ "sass989@yahoo.com" ]
sass989@yahoo.com
243a2931aa077a5cfe5a9dc3fa2db25264de61d3
e222c37f488a5bdb6a986b33a3803adfc6709cff
/RecycleView/app/src/main/java/com/xinyujiang/recycleview/MainActivity.java
a58e34948687019845e48f269e8cbb9c97886cf2
[]
no_license
XinyuJiang/AndroidPractice
723d2b192a94a70b63460f930167261ee6a24e6c
2df91d3d5fafc4c86b7f0322d125b8d1dce33ede
refs/heads/master
2021-05-05T13:02:21.195114
2018-02-23T09:51:18
2018-02-23T09:51:18
118,349,267
0
0
null
null
null
null
UTF-8
Java
false
false
2,882
java
package com.xinyujiang.recycleview; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.StaggeredGridLayoutManager; import java.util.ArrayList; import java.util.List; import java.util.Random; public class MainActivity extends AppCompatActivity { private List<Fruit> fruitList = new ArrayList<>(); @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); initFruits(); RecyclerView recyclerView = (RecyclerView) findViewById(R.id.recycler_view); StaggeredGridLayoutManager layoutManager = new StaggeredGridLayoutManager(3, StaggeredGridLayoutManager.VERTICAL);//第一个参数用于指定布局的列数,第二个参数用于指定布局的排列方向 recyclerView.setLayoutManager(layoutManager); FruitAdapter adapter = new FruitAdapter(fruitList); recyclerView.setAdapter(adapter); } private void initFruits(){ for (int i = 0; i < 2; i++){ Fruit apple = new Fruit(getRandomLengthName("Apple"), R.drawable.apple_pic); fruitList.add(apple); Fruit banana = new Fruit(getRandomLengthName("Banana"), R.drawable.banana_pic); fruitList.add(banana); Fruit orange = new Fruit(getRandomLengthName("Orange"), R.drawable.orange_pic); fruitList.add(orange); Fruit watermelon = new Fruit(getRandomLengthName("Watermelon"), R.drawable.watermelon_pic); fruitList.add(watermelon); Fruit pear = new Fruit(getRandomLengthName("Pear"), R.drawable.pear_pic); fruitList.add(pear); Fruit grape = new Fruit(getRandomLengthName("Grape"), R.drawable.grape_pic); fruitList.add(grape); Fruit pineapple = new Fruit(getRandomLengthName("Pineapple"), R.drawable.pineapple_pic); fruitList.add(pineapple); Fruit strawberry = new Fruit(getRandomLengthName("Strawberry"), R.drawable.strawberry_pic); fruitList.add(strawberry); Fruit cherry = new Fruit(getRandomLengthName("Cherry"), R.drawable.cherry_pic); fruitList.add(cherry); Fruit mango = new Fruit(getRandomLengthName("Mango"), R.drawable.mango_pic); fruitList.add(mango); } } //一个简单的多次打印名字作为Text使得瀑布式的效果更加明显 private String getRandomLengthName(String name){ Random random = new Random(); int length = random.nextInt(20) + 1; StringBuilder builder = new StringBuilder(); for ( int i = 0; i< length ; i++) builder.append(name); return builder.toString(); } }
[ "503273921@qq.com" ]
503273921@qq.com
3fd3f34f7e9ad9a218c8a13992a312211beba36e
28a67e272f3cb082e697342483d0f760ee7756bd
/spark/src/main/java/com/expleague/yasm4u/domains/mr/spark/S3Path.java
85e9abb8f49bdbc05e58f2e783dcadd9ab4665b1
[]
no_license
VadimFarutin/yasm4u
81655fe85ccf4c823e7c84c4f5dd750e1acafe3e
080bc74422b3c1f23da2ec8ae73d44ded5991844
refs/heads/master
2020-04-27T17:36:20.220344
2019-03-07T12:19:15
2019-03-07T12:19:15
174,528,338
0
0
null
2019-05-14T11:23:36
2019-03-08T11:46:07
Java
UTF-8
Java
false
false
1,289
java
package com.expleague.yasm4u.domains.mr.spark; import com.expleague.yasm4u.domains.mr.MRPath; import java.net.URI; import java.net.URISyntaxException; public class S3Path extends MRPath { private final String bucket; public S3Path(Mount mount, String bucket, String path) { super(mount, path, false); this.bucket = bucket; } public static S3Path createFromURI(String uriS) { try { final URI uri = new URI(uriS); if ("s3".equals(uri.getScheme())) { String path = uri.getPath(); if (path == null) path = ""; else if (path.startsWith("/")) path = path.substring(1); return new S3Path(Mount.ROOT, uri.getHost(), path); } else throw new IllegalArgumentException("Unsupported protocol: " + uri.getScheme() + " in URI: [" + uriS + "]"); } catch (URISyntaxException e) { throw new RuntimeException(e); } } public String bucket() { return bucket; } public String path() { return path; } @Override public String toString() { return "s3://" + bucket + "/" + path; } @Override public URI toURI() { try { return new URI("s3", bucket, path, null); } catch (URISyntaxException e) { throw new RuntimeException(e); } } }
[ "ikuralenok@gmail.com" ]
ikuralenok@gmail.com
b86a08bc285acedfb9fd7deaa7e35d2ee325ea72
8c8d998808ae4fd9ab981397eae4fb25bebf4796
/src/main/java/com/wsl/shoppingkill/obj/constant/SexEnum.java
fd3c96c8918fed2f5b6446128cf74e8bace2f84f
[]
no_license
yaoke602/shopping-kill
e2908c556397e279064d2913517d560b12b6b9e1
42826654b35115f05bacdcf62f03aaab43b81bec
refs/heads/master
2023-06-11T11:28:40.242711
2021-07-07T08:51:34
2021-07-07T08:51:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
791
java
package com.wsl.shoppingkill.obj.constant; import com.baomidou.mybatisplus.annotation.EnumValue; import com.baomidou.mybatisplus.core.enums.IEnum; import com.fasterxml.jackson.annotation.JsonValue; import com.wsl.shoppingkill.common.fastjson.BaseEnum; /** * @author : WangShiLei * @date : 2020-11-04$ 21:44$ **/ public enum SexEnum implements IEnum<Integer>, BaseEnum { /** * 性别枚举 */ MAN(1,"男"), WOMAN(2,"女"); @EnumValue private final int value; private final String desc; SexEnum(int value,String desc) { this.value = value; this.desc = desc; } @Override public Integer getValue() { return value; } @Override @JsonValue public String getDesc() { return desc; } }
[ "sirwsl@163.com" ]
sirwsl@163.com
3526ce6fdfe00be0801d5202cc6530dd00fc3cda
8823c96d433605e7c13679b027a697e6a647cf9c
/src/main/java/com/lzhlyle/leetcode/tomorrow/no115/DistinctSubsequences_DP_Adv.java
ed3b39a92af861b164fde636a676e883622948a7
[ "MIT" ]
permissive
lzhlyle/leetcode
62278bf6e949f802da335e8de2d420440f578c2f
8f053128ed7917c231fd24cfe82552d9c599dc16
refs/heads/master
2022-07-14T02:28:11.082595
2020-11-16T14:28:20
2020-11-16T14:28:20
215,598,819
2
0
MIT
2022-06-17T02:55:41
2019-10-16T16:52:05
Java
UTF-8
Java
false
false
579
java
package com.lzhlyle.leetcode.tomorrow.no115; public class DistinctSubsequences_DP_Adv { public int numDistinct(String s, String t) { int slen = s.length(), tlen = t.length(); int[] dp = new int[tlen + 1]; for (int si = 0; si < slen; si++) { int northwest = dp[0] = 1; for (int ti = 0; ti < tlen; ti++) { int next = dp[ti + 1]; if (s.charAt(si) == t.charAt(ti)) dp[ti + 1] += northwest; northwest = next; } } return dp[tlen]; } }
[ "lzhlyle@msn.cn" ]
lzhlyle@msn.cn
efd6c623dba82e99f2c4a22044fcbf5175d18d80
7ec3ef3aa38ecad9a42668829d42ee11e797e042
/Mensageiro/src/com/deitel/messenger/model/UsuarioDAO.java
34fe638e06e37594b8b56d4e1a03eff793e08e01
[]
no_license
caiotavaresc/SimuladorCriptografia
b9910612bdcd065ab2ced0f6f541fe76313975ce
c20a96d6a7d5c61838cd2fc70de9d68b8346bea1
refs/heads/master
2021-01-10T22:30:28.661646
2016-11-06T00:52:41
2016-11-06T00:52:41
69,706,261
0
0
null
null
null
null
UTF-8
Java
false
false
2,609
java
package com.deitel.messenger.model; import java.sql.*; import com.deitel.messenger.model.Usuario; public class UsuarioDAO { private Connection conn; public UsuarioDAO() { try { this.conn = ConnectionFactory.getConnection(); } catch(Exception e) { System.out.println(e); } } /*Verificar se o usuario existe na base*/ public Usuario usuarioExiste(String nick) { String consulta = "SELECT U.* FROM USUARIO U WHERE U.NICK = ?"; try { PreparedStatement stmt; stmt = conn.prepareStatement(consulta); stmt.setString(1, nick); ResultSet rs = stmt.executeQuery(); while(rs.next()) { Usuario retorno = new Usuario(rs.getInt(1), rs.getString(2), rs.getString(3), rs.getString(4), rs.getDate(5), rs.getString(6)); return retorno; } stmt.close(); } catch(Exception e) { System.out.println(e); return null; } return null; } /*Verificar se o usuario e a senha conferem*/ public boolean usuarioConfereSenha(int id, String pass) { String consulta = "SELECT U.* FROM USUARIO U WHERE U.USER_ID = ?"; try { PreparedStatement stmt; stmt = conn.prepareStatement(consulta); stmt.setInt(1, id); ResultSet rs = stmt.executeQuery(); while(rs.next()) if(rs.getString(3).equals(pass)) return true; stmt.close(); } catch(Exception e) { System.out.println(e); return false; } return false; } //Atualizar a chave pública assimétrica do usuário public boolean atualizarChavePublica(int userId, String chavePublicaAssimetrica) { String consulta = "UPDATE USUARIO SET PUBLIC_KEY1 = ? WHERE USER_ID = ?"; try { PreparedStatement stmt = conn.prepareStatement(consulta); stmt.setString(1, chavePublicaAssimetrica); stmt.setInt(2, userId); stmt.execute(); stmt.close(); return true; } catch(Exception ex) { System.out.println(ex); return false; } } }
[ "ctccaio@gmail.com" ]
ctccaio@gmail.com
402211a26d8f440da08e1a19c91d0bb2157c089d
80d470a622c1ef2b6c1ea06339d082f8a5c7fd98
/app/src/main/java/rontikeky/beraspakone/HistoryPembelian.java
338c39bc5dc85f1f8bb73061e12b300e7175f3ca
[]
no_license
masfahri/beraspakone
16d6879ddf5c70381d659323ff3c199e7c1794fd
ec10538edc6b79fb8ebcf5e7b676712b4a162027
refs/heads/master
2020-03-31T13:48:27.553639
2018-10-09T14:51:26
2018-10-09T14:51:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,912
java
package rontikeky.beraspakone; import android.content.Intent; import android.support.annotation.NonNull; import android.support.design.widget.BottomNavigationView; import android.support.design.widget.TabLayout; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.support.v7.widget.CardView; import android.view.MenuItem; import android.view.View; import android.widget.Button; import android.widget.Spinner; import android.widget.TableLayout; import android.widget.TextView; public class HistoryPembelian extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_history); } public void history(View view) { TextView dateHistory = (TextView) findViewById(R.id.txtDate); TableLayout History = (TableLayout) findViewById(R.id.tblHistory); Button btnDetil = (Button) findViewById(R.id.btnDetailHistory); Spinner comboBulan = (Spinner) findViewById(R.id.cmbBulan); Spinner comboTahun = (Spinner) findViewById(R.id.cmbTahun); if (History.getVisibility() == View.VISIBLE) { comboBulan.setEnabled(false); comboTahun.setEnabled(false); dateHistory.setVisibility(view.INVISIBLE); History.setVisibility(view.INVISIBLE); btnDetil.setVisibility(view.INVISIBLE); }else{ comboBulan.setEnabled(true); comboTahun.setEnabled(true); dateHistory.setVisibility(view.VISIBLE); History.setVisibility(view.VISIBLE); btnDetil.setVisibility(view.VISIBLE); } } public void DetailHistory (View view) { TableLayout DetHistory = (TableLayout) findViewById(R.id.tblDetHistory); DetHistory.setVisibility(view.VISIBLE); } }
[ "saya.masfahri@gmail.com" ]
saya.masfahri@gmail.com
69b2ad9093341d286cadc9199d3176c9acd73bcd
60d5d2d39ce57437214fa68cf9f9a51445503713
/app/src/main/java/com/example/repitout/Progress.java
237574255b4fad88fac21538c9e9e6ea1fa848d5
[]
no_license
darrenswan997/RepItOut
bdb25f4746b46b784c5357bf592349f2c85ff222
a79d7ef4be9ca56f8a977874fe14f0d0776f6994
refs/heads/master
2020-11-24T03:09:30.281431
2020-05-08T11:57:24
2020-05-08T11:57:24
227,939,476
0
0
null
null
null
null
UTF-8
Java
false
false
3,508
java
package com.example.repitout; import android.content.Context; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.widget.AdapterView; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.Spinner; import androidx.annotation.NonNull; import com.google.firebase.auth.FirebaseAuth; import com.google.firebase.auth.FirebaseUser; import com.google.firebase.database.DataSnapshot; import com.google.firebase.database.DatabaseError; import com.google.firebase.database.DatabaseReference; import com.google.firebase.database.FirebaseDatabase; import com.google.firebase.database.Query; import com.google.firebase.database.ValueEventListener; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; import java.util.Date; import java.util.GregorianCalendar; public class Progress extends nav_main_page { ListView lv; ArrayList<String> data = new ArrayList<>(); ArrayAdapter<String> arrayAdapter; ArrayAdapter<String> dataArrayAdapter; public String day, selDay, r; FirebaseAuth firebaseAuth = FirebaseAuth.getInstance(); DatabaseReference databaseReference = FirebaseDatabase.getInstance().getReference().child("Workout"); DatabaseReference db = databaseReference.child("Routine_History"); FirebaseUser firebaseUser = firebaseAuth.getCurrentUser(); String userID = firebaseUser.getUid(); Query query; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); LayoutInflater inflater = (LayoutInflater) this .getSystemService(Context.LAYOUT_INFLATER_SERVICE); View contentView = inflater.inflate(R.layout.activity_progress, null, false); dl.addView(contentView, 0); lv = findViewById(R.id.showLV); lv.setAdapter(dataArrayAdapter); dataArrayAdapter = new ArrayAdapter<>(Progress.this, android.R.layout.simple_list_item_1, data); query = FirebaseDatabase.getInstance().getReference("Workout") .child(userID) .child("Routine_History") .child("Exercises") .orderByKey() ; query.addValueEventListener(new ValueEventListener() { @Override public void onDataChange(@NonNull DataSnapshot dataSnapshot) { data.clear(); for (final DataSnapshot snapshot : dataSnapshot.getChildren()) { Exercises_helper helper = snapshot.getValue(Exercises_helper.class); Long time = (Long)snapshot.child("time").getValue(); DateFormat dateFormat = DateFormat.getDateTimeInstance(); Date netDate = (new Date(time)); String date = dateFormat.format(netDate); String name = helper.getName(); String reps = helper.getReps(); data.add("Exercise : " + name + "\n" + "Reps : " + reps + "\n" + "Completed on : " + date); dataArrayAdapter.notifyDataSetChanged(); lv.setAdapter(dataArrayAdapter); } } @Override public void onCancelled(@NonNull DatabaseError databaseError) { } }); } }
[ "darrenswan4@gmail.com" ]
darrenswan4@gmail.com
cccc9620d5f018eebf8bed9e3a0f48d7da606c12
ebcfb77ba296de9ae00124fed64840ba67b86997
/Maths.java
e260082f98d2ad820ee9e9b5533e09ae27ab594c
[]
no_license
k3iiran/Java-Files-
bcba9c155d6bb9f8590cc172e2195e74027aeb8d
95a02aa57d3ac338e1456cc64da4e011252d1d8c
refs/heads/master
2020-08-04T22:54:00.163600
2019-10-02T10:28:21
2019-10-02T10:28:21
212,304,035
0
0
null
null
null
null
UTF-8
Java
false
false
189
java
class Maths{ int no1,no2; public void dosomething(){ System.out.println("Hello"); System.out.println("My Friends"); } public void message(){ System.out.println("Nationwide"); } }
[ "lexi sucks" ]
lexi sucks
976e173c0f4534ddc3c0136b8ed71e505d829cdd
3b22415910ee1f7726e77134e819eb805c775b8d
/Final_MFI/src/main/java/com/mfi/controller/ChangePasswordController.java
35e27e8984833ff123d250b890aca52a35aa31e0
[]
no_license
thureintun-me/ACE_MFI
0b7566589dfa408ba4840568d02682c8a109c8e6
dbe381db07fbdcb78f379fac0800eaef317b84e0
refs/heads/master
2023-03-06T00:00:25.418510
2021-02-17T12:28:38
2021-02-17T12:28:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,690
java
package com.mfi.controller; import javax.validation.Valid; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.Authentication; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.servlet.mvc.support.RedirectAttributes; import com.mfi.formmodel.UserChangePassword; import com.mfi.model.User; import com.mfi.service.MyUserDetails; import com.mfi.service.UserService; @Controller public class ChangePasswordController { @Autowired UserService userService; @Autowired private PasswordEncoder passwordEncoder; @RequestMapping("/setup") public String setup(Model model) { Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); MyUserDetails currentPrincipalName = (MyUserDetails) authentication.getPrincipal(); int userId = currentPrincipalName.getUserId(); String username = currentPrincipalName.getUsername(); System.out.println("name"+username); //User user = userService.selectOne(userId); model.addAttribute("changePassuname", username); model.addAttribute("changePasswordBean", new UserChangePassword()); return "mfi/user/MFI_USR_03"; } @RequestMapping("/userChangePassword") public String changePass(@ModelAttribute("changePasswordBean")@Valid UserChangePassword userChnagePass,BindingResult result,RedirectAttributes redirectAttributes) { if (result.hasErrors()) { redirectAttributes.addFlashAttribute("changePasswordBean",userChnagePass); return "mfi/user/MFI_USR_03"; } Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); MyUserDetails currentPrincipalName = (MyUserDetails) authentication.getPrincipal(); int userId = currentPrincipalName.getUserId(); User user = userService.selectOne(userId); if(userChnagePass.getNewPassword().equals(userChnagePass.getConfirmPassword())){ user.setPassword(passwordEncoder.encode(userChnagePass.getNewPassword())); userService.update(user); boolean mesg = true; redirectAttributes.addFlashAttribute("mesg",mesg); return "redirect:/setup"; }else { boolean err = true; redirectAttributes.addFlashAttribute("err", err); return "redirect:/setup"; } } }
[ "you@example.com" ]
you@example.com
f74d8e608d86c02ae1fc8075864e4243c6d146cb
e38a3134f7287a62a34ea52c5983bd5dda2f5192
/demo_test/src/main/java/com/itheima/App_test.java
e413235efb828959cf5fa7afc4d2cd30a8b581ca
[]
no_license
ourongquan/mytest
e041cfd350ee659c499b517608da5f95478ecf54
7bb8573f57f0b22011c4f9bc39e2424beda3ec31
refs/heads/master
2020-04-08T23:19:39.973113
2018-11-30T11:51:38
2018-11-30T11:51:38
159,812,990
0
0
null
null
null
null
UTF-8
Java
false
false
151
java
package com.itheima; public class App_test { public static void main(String[] args) { System.out.println("--------111---------"); } }
[ "489628336@qq.com" ]
489628336@qq.com
8197d9ef9a478e72998f6c7574c6f573ebf52a4e
75e7291251ca2d187893db450af54ba5cf5acf89
/app/src/main/java/com/ngo/lap11877_khanh/a360_h5_2/NewsAdapter.java
cd468aad144f9ee7b00f44334b85c19e2e1ff9f0
[]
no_license
ngohoanglankhanh/360GameH5
b7e045247fd024f8f5f7b4220d684541c8067ba0
965854eccbbf3652e7bb67584582c1e4a4c15bf9
refs/heads/master
2020-03-25T04:08:36.573031
2018-08-03T09:17:59
2018-08-03T09:21:07
143,379,506
0
0
null
null
null
null
UTF-8
Java
false
false
1,990
java
package com.ngo.lap11877_khanh.a360_h5_2; import android.content.Context; import android.support.annotation.NonNull; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import java.util.ArrayList; import java.util.List; public class NewsAdapter extends RecyclerView.Adapter<NewsAdapter.ViewHolder>{ private final List<News> mNewsList = new ArrayList<>(); private Context mContext; public NewsAdapter(Context context) { mContext = context; } @NonNull @Override public ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View view = LayoutInflater.from(parent.getContext()).inflate(R.layout.list_news, parent, false); return new ViewHolder(view); } @Override public void onBindViewHolder(@NonNull ViewHolder holder, int position) { holder.bindView(mNewsList.get(position)); } @Override public int getItemCount() { return mNewsList.size(); } public void setNewsList (List<News> newsList) { mNewsList.clear(); if (newsList!= null && !newsList.isEmpty()){ mNewsList.addAll(newsList); } notifyDataSetChanged(); } public void appendNewsList (List<News> newsList){ if (newsList!= null && !newsList.isEmpty()){ mNewsList.addAll(newsList); } notifyDataSetChanged(); } public class ViewHolder extends RecyclerView.ViewHolder{ TextView mNewsTitle, mDateCreated; public ViewHolder(View itemView) { super(itemView); mNewsTitle = itemView.findViewById(R.id.news_title); mDateCreated = itemView.findViewById(R.id.news_date); } public void bindView(News mNews){ mNewsTitle.setText(mNews.getTitle()); mDateCreated.setText(mNews.getDateCreated()); } } }
[ "ngohoanglankhanh@gmail.com" ]
ngohoanglankhanh@gmail.com
3db1d159a20d47144c7bec5faafe7728411f13f3
3465372957f6812658819ca721c736387052a7fd
/src/myInterface/Demo_91.java
53b3cd462525351c86844e4e6a6103b41d0bd6b3
[]
no_license
anandabhijeet/introduction
7636328168e1baeb167de778be0b070f74ccae73
53a87128611c0c352795c5f9ddda33e10a511e57
refs/heads/master
2020-12-30T06:03:19.935478
2020-02-07T09:22:26
2020-02-07T09:22:26
238,885,168
0
0
null
null
null
null
UTF-8
Java
false
false
336
java
package myInterface; public class Demo_91 implements anInterface { @Override public void display() { System.out.println("Fine!!"); } public static void main(String args[]){ Demo_91 d = new Demo_91(); d.display(); System.out.println("the final value a in my interface is : "+ a); } }
[ "49865971+abhijeet223@users.noreply.github.com" ]
49865971+abhijeet223@users.noreply.github.com
9a1bc3c8e603074dae33d624eeabb625dac93f43
26293856a3cf039ca02ebbe121df84834f324cec
/src/main/java/com/example/springboot/JmeterNewProcess.java
9b886f82cfb91f35222d86f87e2866b995cf3522
[]
no_license
victorio1/bdx-bhi-performance
04aad2bd53cb32a6e16a69139da5fa401809d3ec
ea0f48797eddd7a216fd0e905bfadc387a3ca5cb
refs/heads/master
2023-08-07T07:27:21.185813
2021-09-18T14:44:16
2021-09-18T14:44:16
407,886,240
0
0
null
null
null
null
UTF-8
Java
false
false
1,382
java
package com.example.springboot; import com.sun.jna.Pointer; import com.sun.jna.platform.win32.Kernel32; import com.sun.jna.platform.win32.WinNT; import java.lang.reflect.Field; public class JmeterNewProcess { public static long getProcessID(Process p) { long result = -1; try { //for windows if (p.getClass().getName().equals("java.lang.Win32Process") || p.getClass().getName().equals("java.lang.ProcessImpl")) { Field f = p.getClass().getDeclaredField("handle"); f.setAccessible(true); long handl = f.getLong(p); Kernel32 kernel = Kernel32.INSTANCE; WinNT.HANDLE hand = new WinNT.HANDLE(); hand.setPointer(Pointer.createConstant(handl)); result = kernel.GetProcessId(hand); f.setAccessible(false); } //for unix based operating systems else if (p.getClass().getName().equals("java.lang.UNIXProcess")) { Field f = p.getClass().getDeclaredField("pid"); f.setAccessible(true); result = f.getLong(p); f.setAccessible(false); } } catch(Exception ex) { result = -1; } return result; } }
[ "eduardo.victorio@smartpyme.pe" ]
eduardo.victorio@smartpyme.pe
391c828bd9e498b37cd606f6f6545b1145be1695
2c824cf35395dcce591dff5a0baed4b94699f5ff
/src/backrow/MeterF.java
8c3d953b697709a86d1ed43ea405284cc43c2087
[]
no_license
dmp0015/BackRowReal
2b0b1bae573b9b8a502bc4c426697a75a9b6ca5c
8fc8f40ea88300952027df68b341197f9b1b37d7
refs/heads/master
2020-04-04T05:13:36.344195
2018-11-12T20:37:44
2018-11-12T20:37:44
155,738,572
0
0
null
null
null
null
UTF-8
Java
false
false
405
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 backrow; /** * * @author dmich */ public class MeterF extends Meter { public MeterF() { this.type = "F"; this.minPrice = 76.35; this.size = "1 inch"; } }
[ "dmich@DESKTOP-8S6Q3P9" ]
dmich@DESKTOP-8S6Q3P9
da253f56b010338fc538aa9d460aa3cf65c55ceb
988ee9976c2a8eea4e3162cc9a68847ca5262076
/Project1/src/automation1/Test72.java
31a88ae4ca1bb54f1f55f1d25c81281ce26fdb02
[]
no_license
AmritaDeb/SELENIUM
adc1df021e8a75c1a0d70b20810e908c0f79cd89
f885ba6e3926eeab24d1662c42732664f3684717
refs/heads/master
2020-06-03T11:48:33.910639
2019-06-12T11:30:07
2019-06-12T11:30:07
191,555,343
0
0
null
null
null
null
UTF-8
Java
false
false
2,666
java
/* * Go to yatra.com, enter Bangalore in the hotel search field get all the auto suggestions, select the first 1, proceed with all the options and click on search, print all the hotel's names and price */ package automation1; import java.util.List; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.chrome.ChromeDriver; public class Test72 { static{ System.setProperty("webdriver.chrome.driver", "./driver/chromedriver.exe"); System.setProperty("webdriver.gecko.driver", "./driver/geckodriver.exe"); } public static void main(String[] args) throws Exception { WebDriver driver = new ChromeDriver(); driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); driver.get("https://www.yatra.com/"); driver.manage().window().maximize(); driver.findElement(By.xpath("//span[.='Hotels']")).click(); driver.findElement(By.id("BE_hotel_destination_city")).sendKeys("bangalore"); String xp = "//strong[text()='Bangalore']/.."; List<WebElement> allResult = driver.findElements(By.xpath(xp)); int count = allResult.size(); System.out.println(count); System.out.println("~~~~~~~~~~~~~~~~~~"); for(WebElement e:allResult){ System.out.println(e.getText()); } System.out.println("-------------------------------------------"); allResult.get(0).click(); Thread.sleep(2000); driver.findElement(By.id("04/10/2018")).click(); driver.findElement(By.id("BE_hotel_checkout_date")).click(); driver.findElement(By.id("09/10/2018")).click(); driver.findElement(By.id("BE_Hotel_pax_info")).click(); driver.findElement(By.xpath("//span[contains(text(),'Done')]")).click(); driver.findElement(By.id("BE_hotel_htsearch_btn")).click(); driver.findElement(By.xpath("//img[contains(@ng-src,'flexistay')]")).click(); Thread.sleep(9000); String name_xp = "//span[contains(text(),'Reviews')]/../../..//a"; String price_xp = "//span[contains(text(),'For')]/following-sibling::span"; List<WebElement> allName = driver.findElements(By.xpath(name_xp)); List<WebElement> allPrice = driver.findElements(By.xpath(price_xp)); //System.out.println(allPrice.getText()); Thread.sleep(9000); int count_hotel = allName.size(); System.out.println(count_hotel); System.out.println("~~~~~~~~~~~~~~~~~"); for(int i=0; i<count_hotel; i++) { WebElement name = allName.get(i); WebElement price = allPrice.get(i); String name_text = name.getText(); String price_text = price.getText(); System.out.println(name_text + "-->" + price_text); } } }
[ "amritadebbarman@gmail.com" ]
amritadebbarman@gmail.com
b99db4935fce8dfaf825ab76a98e9f5743e410f9
ef3632a70d37cfa967dffb3ddfda37ec556d731c
/aws-java-sdk-codeartifact/src/main/java/com/amazonaws/services/codeartifact/model/ListPackageVersionDependenciesRequest.java
522f11c316ee14b6e0e6ab98af5cbf24e673cbf8
[ "Apache-2.0" ]
permissive
ShermanMarshall/aws-sdk-java
5f564b45523d7f71948599e8e19b5119f9a0c464
482e4efb50586e72190f1de4e495d0fc69d9816a
refs/heads/master
2023-01-23T16:35:51.543774
2023-01-19T03:21:46
2023-01-19T03:21:46
134,658,521
0
0
Apache-2.0
2019-06-12T21:46:58
2018-05-24T03:54:38
Java
UTF-8
Java
false
false
21,651
java
/* * Copyright 2018-2023 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.codeartifact.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see <a href="http://docs.aws.amazon.com/goto/WebAPI/codeartifact-2018-09-22/ListPackageVersionDependencies" * target="_top">AWS API Documentation</a> */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ListPackageVersionDependenciesRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** * <p> * The name of the domain that contains the repository that contains the requested package version dependencies. * </p> */ private String domain; /** * <p> * The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes * or spaces. * </p> */ private String domainOwner; /** * <p> * The name of the repository that contains the requested package version. * </p> */ private String repository; /** * <p> * The format of the package with the requested dependencies. * </p> */ private String format; /** * <p> * The namespace of the package version with the requested dependencies. The package version component that * specifies its namespace depends on its type. For example: * </p> * <ul> * <li> * <p> * The namespace of a Maven package version is its <code>groupId</code>. * </p> * </li> * <li> * <p> * The namespace of an npm package version is its <code>scope</code>. * </p> * </li> * <li> * <p> * Python and NuGet package versions do not contain a corresponding component, package versions of those formats do * not have a namespace. * </p> * </li> * </ul> */ private String namespace; /** * <p> * The name of the package versions' package. * </p> */ private String packageValue; /** * <p> * A string that contains the package version (for example, <code>3.5.2</code>). * </p> */ private String packageVersion; /** * <p> * The token for the next set of results. Use the value returned in the previous response in the next request to * retrieve the next set of results. * </p> */ private String nextToken; /** * <p> * The name of the domain that contains the repository that contains the requested package version dependencies. * </p> * * @param domain * The name of the domain that contains the repository that contains the requested package version * dependencies. */ public void setDomain(String domain) { this.domain = domain; } /** * <p> * The name of the domain that contains the repository that contains the requested package version dependencies. * </p> * * @return The name of the domain that contains the repository that contains the requested package version * dependencies. */ public String getDomain() { return this.domain; } /** * <p> * The name of the domain that contains the repository that contains the requested package version dependencies. * </p> * * @param domain * The name of the domain that contains the repository that contains the requested package version * dependencies. * @return Returns a reference to this object so that method calls can be chained together. */ public ListPackageVersionDependenciesRequest withDomain(String domain) { setDomain(domain); return this; } /** * <p> * The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes * or spaces. * </p> * * @param domainOwner * The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include * dashes or spaces. */ public void setDomainOwner(String domainOwner) { this.domainOwner = domainOwner; } /** * <p> * The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes * or spaces. * </p> * * @return The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include * dashes or spaces. */ public String getDomainOwner() { return this.domainOwner; } /** * <p> * The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include dashes * or spaces. * </p> * * @param domainOwner * The 12-digit account number of the Amazon Web Services account that owns the domain. It does not include * dashes or spaces. * @return Returns a reference to this object so that method calls can be chained together. */ public ListPackageVersionDependenciesRequest withDomainOwner(String domainOwner) { setDomainOwner(domainOwner); return this; } /** * <p> * The name of the repository that contains the requested package version. * </p> * * @param repository * The name of the repository that contains the requested package version. */ public void setRepository(String repository) { this.repository = repository; } /** * <p> * The name of the repository that contains the requested package version. * </p> * * @return The name of the repository that contains the requested package version. */ public String getRepository() { return this.repository; } /** * <p> * The name of the repository that contains the requested package version. * </p> * * @param repository * The name of the repository that contains the requested package version. * @return Returns a reference to this object so that method calls can be chained together. */ public ListPackageVersionDependenciesRequest withRepository(String repository) { setRepository(repository); return this; } /** * <p> * The format of the package with the requested dependencies. * </p> * * @param format * The format of the package with the requested dependencies. * @see PackageFormat */ public void setFormat(String format) { this.format = format; } /** * <p> * The format of the package with the requested dependencies. * </p> * * @return The format of the package with the requested dependencies. * @see PackageFormat */ public String getFormat() { return this.format; } /** * <p> * The format of the package with the requested dependencies. * </p> * * @param format * The format of the package with the requested dependencies. * @return Returns a reference to this object so that method calls can be chained together. * @see PackageFormat */ public ListPackageVersionDependenciesRequest withFormat(String format) { setFormat(format); return this; } /** * <p> * The format of the package with the requested dependencies. * </p> * * @param format * The format of the package with the requested dependencies. * @return Returns a reference to this object so that method calls can be chained together. * @see PackageFormat */ public ListPackageVersionDependenciesRequest withFormat(PackageFormat format) { this.format = format.toString(); return this; } /** * <p> * The namespace of the package version with the requested dependencies. The package version component that * specifies its namespace depends on its type. For example: * </p> * <ul> * <li> * <p> * The namespace of a Maven package version is its <code>groupId</code>. * </p> * </li> * <li> * <p> * The namespace of an npm package version is its <code>scope</code>. * </p> * </li> * <li> * <p> * Python and NuGet package versions do not contain a corresponding component, package versions of those formats do * not have a namespace. * </p> * </li> * </ul> * * @param namespace * The namespace of the package version with the requested dependencies. The package version component that * specifies its namespace depends on its type. For example:</p> * <ul> * <li> * <p> * The namespace of a Maven package version is its <code>groupId</code>. * </p> * </li> * <li> * <p> * The namespace of an npm package version is its <code>scope</code>. * </p> * </li> * <li> * <p> * Python and NuGet package versions do not contain a corresponding component, package versions of those * formats do not have a namespace. * </p> * </li> */ public void setNamespace(String namespace) { this.namespace = namespace; } /** * <p> * The namespace of the package version with the requested dependencies. The package version component that * specifies its namespace depends on its type. For example: * </p> * <ul> * <li> * <p> * The namespace of a Maven package version is its <code>groupId</code>. * </p> * </li> * <li> * <p> * The namespace of an npm package version is its <code>scope</code>. * </p> * </li> * <li> * <p> * Python and NuGet package versions do not contain a corresponding component, package versions of those formats do * not have a namespace. * </p> * </li> * </ul> * * @return The namespace of the package version with the requested dependencies. The package version component that * specifies its namespace depends on its type. For example:</p> * <ul> * <li> * <p> * The namespace of a Maven package version is its <code>groupId</code>. * </p> * </li> * <li> * <p> * The namespace of an npm package version is its <code>scope</code>. * </p> * </li> * <li> * <p> * Python and NuGet package versions do not contain a corresponding component, package versions of those * formats do not have a namespace. * </p> * </li> */ public String getNamespace() { return this.namespace; } /** * <p> * The namespace of the package version with the requested dependencies. The package version component that * specifies its namespace depends on its type. For example: * </p> * <ul> * <li> * <p> * The namespace of a Maven package version is its <code>groupId</code>. * </p> * </li> * <li> * <p> * The namespace of an npm package version is its <code>scope</code>. * </p> * </li> * <li> * <p> * Python and NuGet package versions do not contain a corresponding component, package versions of those formats do * not have a namespace. * </p> * </li> * </ul> * * @param namespace * The namespace of the package version with the requested dependencies. The package version component that * specifies its namespace depends on its type. For example:</p> * <ul> * <li> * <p> * The namespace of a Maven package version is its <code>groupId</code>. * </p> * </li> * <li> * <p> * The namespace of an npm package version is its <code>scope</code>. * </p> * </li> * <li> * <p> * Python and NuGet package versions do not contain a corresponding component, package versions of those * formats do not have a namespace. * </p> * </li> * @return Returns a reference to this object so that method calls can be chained together. */ public ListPackageVersionDependenciesRequest withNamespace(String namespace) { setNamespace(namespace); return this; } /** * <p> * The name of the package versions' package. * </p> * * @param packageValue * The name of the package versions' package. */ public void setPackage(String packageValue) { this.packageValue = packageValue; } /** * <p> * The name of the package versions' package. * </p> * * @return The name of the package versions' package. */ public String getPackage() { return this.packageValue; } /** * <p> * The name of the package versions' package. * </p> * * @param packageValue * The name of the package versions' package. * @return Returns a reference to this object so that method calls can be chained together. */ public ListPackageVersionDependenciesRequest withPackage(String packageValue) { setPackage(packageValue); return this; } /** * <p> * A string that contains the package version (for example, <code>3.5.2</code>). * </p> * * @param packageVersion * A string that contains the package version (for example, <code>3.5.2</code>). */ public void setPackageVersion(String packageVersion) { this.packageVersion = packageVersion; } /** * <p> * A string that contains the package version (for example, <code>3.5.2</code>). * </p> * * @return A string that contains the package version (for example, <code>3.5.2</code>). */ public String getPackageVersion() { return this.packageVersion; } /** * <p> * A string that contains the package version (for example, <code>3.5.2</code>). * </p> * * @param packageVersion * A string that contains the package version (for example, <code>3.5.2</code>). * @return Returns a reference to this object so that method calls can be chained together. */ public ListPackageVersionDependenciesRequest withPackageVersion(String packageVersion) { setPackageVersion(packageVersion); return this; } /** * <p> * The token for the next set of results. Use the value returned in the previous response in the next request to * retrieve the next set of results. * </p> * * @param nextToken * The token for the next set of results. Use the value returned in the previous response in the next request * to retrieve the next set of results. */ public void setNextToken(String nextToken) { this.nextToken = nextToken; } /** * <p> * The token for the next set of results. Use the value returned in the previous response in the next request to * retrieve the next set of results. * </p> * * @return The token for the next set of results. Use the value returned in the previous response in the next * request to retrieve the next set of results. */ public String getNextToken() { return this.nextToken; } /** * <p> * The token for the next set of results. Use the value returned in the previous response in the next request to * retrieve the next set of results. * </p> * * @param nextToken * The token for the next set of results. Use the value returned in the previous response in the next request * to retrieve the next set of results. * @return Returns a reference to this object so that method calls can be chained together. */ public ListPackageVersionDependenciesRequest withNextToken(String nextToken) { setNextToken(nextToken); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getDomain() != null) sb.append("Domain: ").append(getDomain()).append(","); if (getDomainOwner() != null) sb.append("DomainOwner: ").append(getDomainOwner()).append(","); if (getRepository() != null) sb.append("Repository: ").append(getRepository()).append(","); if (getFormat() != null) sb.append("Format: ").append(getFormat()).append(","); if (getNamespace() != null) sb.append("Namespace: ").append(getNamespace()).append(","); if (getPackage() != null) sb.append("Package: ").append(getPackage()).append(","); if (getPackageVersion() != null) sb.append("PackageVersion: ").append(getPackageVersion()).append(","); if (getNextToken() != null) sb.append("NextToken: ").append(getNextToken()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ListPackageVersionDependenciesRequest == false) return false; ListPackageVersionDependenciesRequest other = (ListPackageVersionDependenciesRequest) obj; if (other.getDomain() == null ^ this.getDomain() == null) return false; if (other.getDomain() != null && other.getDomain().equals(this.getDomain()) == false) return false; if (other.getDomainOwner() == null ^ this.getDomainOwner() == null) return false; if (other.getDomainOwner() != null && other.getDomainOwner().equals(this.getDomainOwner()) == false) return false; if (other.getRepository() == null ^ this.getRepository() == null) return false; if (other.getRepository() != null && other.getRepository().equals(this.getRepository()) == false) return false; if (other.getFormat() == null ^ this.getFormat() == null) return false; if (other.getFormat() != null && other.getFormat().equals(this.getFormat()) == false) return false; if (other.getNamespace() == null ^ this.getNamespace() == null) return false; if (other.getNamespace() != null && other.getNamespace().equals(this.getNamespace()) == false) return false; if (other.getPackage() == null ^ this.getPackage() == null) return false; if (other.getPackage() != null && other.getPackage().equals(this.getPackage()) == false) return false; if (other.getPackageVersion() == null ^ this.getPackageVersion() == null) return false; if (other.getPackageVersion() != null && other.getPackageVersion().equals(this.getPackageVersion()) == false) return false; if (other.getNextToken() == null ^ this.getNextToken() == null) return false; if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDomain() == null) ? 0 : getDomain().hashCode()); hashCode = prime * hashCode + ((getDomainOwner() == null) ? 0 : getDomainOwner().hashCode()); hashCode = prime * hashCode + ((getRepository() == null) ? 0 : getRepository().hashCode()); hashCode = prime * hashCode + ((getFormat() == null) ? 0 : getFormat().hashCode()); hashCode = prime * hashCode + ((getNamespace() == null) ? 0 : getNamespace().hashCode()); hashCode = prime * hashCode + ((getPackage() == null) ? 0 : getPackage().hashCode()); hashCode = prime * hashCode + ((getPackageVersion() == null) ? 0 : getPackageVersion().hashCode()); hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode()); return hashCode; } @Override public ListPackageVersionDependenciesRequest clone() { return (ListPackageVersionDependenciesRequest) super.clone(); } }
[ "" ]
cfab8b05d374acb70ff0ceb0bb025624aa221ab4
db0ba26e42e2db72daeb9007771a977d988c6995
/app/src/main/java/com/buzz/yora/activities/LoginActivity.java
261c21b9afeb4e06bfbe8738ff49c7ac607737c1
[]
no_license
lehtone1/Yora
23ef17228affe75e05bd83ae1ccb55b75048c241
41f573f130bb5590537488cee12c207bf9579c8a
refs/heads/master
2021-01-19T21:09:09.406312
2017-04-18T18:15:57
2017-04-18T18:15:57
88,616,025
0
1
null
null
null
null
UTF-8
Java
false
false
796
java
package com.buzz.yora.activities; import android.content.Intent; import android.os.Bundle; import android.view.View; import com.buzz.yora.R; /** * Created by lehtone1 on 18/04/17. */ public class LoginActivity extends BaseActivity implements View.OnClickListener { private View loginButton; @Override protected void onCreate(Bundle savedState) { super.onCreate(savedState); setContentView(R.layout.activity_login); loginButton = findViewById(R.id.activity_login_login); if(loginButton != null) { loginButton.setOnClickListener(this); } } @Override public void onClick(View view) { if (view == loginButton) { startActivity(new Intent(this, LoginNarrowActivity.class)); } } }
[ "eero.lehtonen@aalto.fi" ]
eero.lehtonen@aalto.fi
9bbbfe08753d91d97d896fa9d006d466eb55466a
615e475fca488d8e025dc197049538a3fd84d1d1
/src/main/java/com/hospital/builder/MedicalEmployeeBuilder.java
6997773ba9e9a28ead4e3fcd162cbc8152adefcd
[]
no_license
TrkSzabi/HospitalApp
690f3d5fcf64fa152d5efa9102353ce07b3eefea
371edc5380e34b613b21f96e81d098ac7a34f5c3
refs/heads/master
2023-04-21T11:58:41.884475
2021-04-28T11:56:11
2021-04-28T11:56:11
362,450,609
0
0
null
null
null
null
UTF-8
Java
false
false
1,327
java
package com.hospital.builder; import com.hospital.model.MedicalEmployee; import com.hospital.service.IOService; import com.hospital.util.Type; import java.util.Locale; public class MedicalEmployeeBuilder { private IOService ioService; public MedicalEmployeeBuilder(IOService ioService) { this.ioService = ioService; } public MedicalEmployee createMedicalEmployee() { String userName = ioService.getRegistrationData("username"); String password = ioService.getRegistrationData("password"); String firstName = ioService.getRegistrationData("first name"); String lastName = ioService.getRegistrationData("last name"); String email = ioService.getRegistrationData("email"); String type = ioService.getMedicalStatus(); return MedicalEmployee.builder() .userName(userName) .password(password) .firstName(firstName) .lastName(lastName) .email(email) .type(convert(type)) .build(); } private Type convert(String type) { if (type.equalsIgnoreCase("doctor")) { return Type.DOCTOR; } else if (type.equalsIgnoreCase("nurse")) { return Type.NURSE; } return Type.OTHER; } }
[ "trk.handyrepair@gmail.com" ]
trk.handyrepair@gmail.com
43450ff0fb13b31ad83810df977fa0e0b6c56693
47e8371c0121a42bdae567e8eb81e74b79394942
/zuul-client/src/main/java/com/example/zuulclient/filter/PreRequestSessionFilter.java
4473790affeb057b8b907e5fce1bde15d33fd939
[]
no_license
zhangz1234/testdemo
be28396be91e76f35524a906d1500a284e630aa9
2eeed55e9f677abfafb63075d1a741500b314732
refs/heads/master
2021-03-28T18:50:45.655408
2020-03-17T07:18:11
2020-03-17T07:18:11
247,886,075
0
0
null
null
null
null
UTF-8
Java
false
false
1,576
java
//package com.example.zuulclient.filter; // //import com.netflix.zuul.ZuulFilter; // //import com.netflix.zuul.context.RequestContext; //import org.springframework.beans.factory.annotation.Autowired; //import org.springframework.context.annotation.Configuration; //import org.springframework.stereotype.Component; // //import javax.servlet.http.HttpServletRequest; // //public class PreRequestSessionFilter extends ZuulFilter { // // // @Autowired // HttpServletRequest httpServletRequest; // // @Override // public String filterType() { // return "pre"; // } // // /** // * 返回一个值来指定过滤器的执行顺序,不同过滤器允许返回相同的数字,数字越小顺序越靠前 // */ // @Override // public int filterOrder() { // return 1; // } // // /** // * 返回一个boolean值来判断该过滤器是否要执行,true:执行,false:不执行 // */ // @Override // public boolean shouldFilter() { // return true; // } // // /** // * 过滤器的具体逻辑 // */ // @Override // public Object run() { // RequestContext ctx = RequestContext.getCurrentContext(); // String sessionId = httpServletRequest.getSession().getId(); // System.out.println("sessionId: " + sessionId); // ctx.addZuulRequestHeader("Cloud-Cookie", "SESSION=" + sessionId); // ctx.setSendZuulResponse(true); // 对该请求进行路由 // ctx.setResponseStatusCode(200); // 返回200正确响应 // // return null; // } // //}
[ "317437302@qq.com" ]
317437302@qq.com
065dc3e86616afb52359d05c111b638f31705983
7bbea063b44d212f82eff499d8291aaaca85daa1
/Genealogy/src/main/java/ws/daley/genealogy/menubar/view/ViewMediaMenuItem.java
c24b71287ebb643f4fa6387d7c5a116ad7b6deb5
[]
no_license
AixNPanes/genealogy
d6bfc02c67d04341ea6faed501ffd9474cc4e408
111e89209852a8d48b3b6002bc0bbf2c2b7289cb
refs/heads/master
2022-05-26T20:00:31.342782
2021-07-20T21:27:41
2021-07-20T21:27:41
62,721,459
0
0
null
2022-05-20T20:49:27
2016-07-06T13:04:08
Java
UTF-8
Java
false
false
526
java
package ws.daley.genealogy.menubar.view; import org.slf4j.LoggerFactory; import ch.qos.logback.classic.Logger; import ch.qos.logback.classic.LoggerContext; import ws.daley.genealogy.menubar.MyMenuItem; @SuppressWarnings("serial") public class ViewMediaMenuItem extends MyMenuItem { private static final Logger log = ((LoggerContext)LoggerFactory.getILoggerFactory()).getLogger(ViewMediaMenuItem.class); public ViewMediaMenuItem() { super("&Media", 0); log.trace(this.getClass().getSimpleName() + " Exitting"); } }
[ "tim.daley@cru.org" ]
tim.daley@cru.org
6c5127b22133bb79ca8562e3fab06c072d06c960
9ed8ea6806453fd00af7d9f09ef50c9f3994b1ad
/app/src/main/java/com/example/myapplication/Activities/LoginActivity/OneTimeLoginActivity.java
6a2324c57b3d7a3873ad80dab50d114d9e25e579
[]
no_license
anurag19997/nAttendance-Management-System-using-Face-Recoginition-and-Geofencing
a5774aeb18abd60fa04ba783f2b4b09bcef3564c
d1f9f826225fbfcf8801b3dab720aa6cb62e1dd3
refs/heads/master
2020-07-19T18:45:55.587837
2019-09-24T07:40:40
2019-09-24T07:40:40
206,495,153
0
0
null
null
null
null
UTF-8
Java
false
false
9,206
java
package com.example.myapplication.Activities.LoginActivity; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.graphics.Color; import android.graphics.drawable.ColorDrawable; import android.os.Handler; import android.support.v7.app.AlertDialog; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; import android.webkit.WebView; import android.widget.Button; import android.widget.EditText; import android.widget.Toast; import com.example.myapplication.Activities.MainActivity; import com.example.myapplication.Models.User; import com.example.myapplication.Models.UserLogin; import com.example.myapplication.R; import com.example.myapplication.Retrofit.LoginClient; import org.json.JSONException; import org.json.JSONObject; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import okhttp3.ResponseBody; import retrofit2.Call; import retrofit2.Callback; import retrofit2.Response; import retrofit2.Retrofit; import retrofit2.converter.gson.GsonConverterFactory; public class OneTimeLoginActivity extends AppCompatActivity { //implements LoaderCallbacks<Cursor> { // private UserLoginTask mAuthTask = null; // UI references. private EditText NameView; private EditText mPasswordView; private View mProgressView; private View mLoginFormView; String name, password; private boolean isAccepted; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_one_time_login2); NameView = (EditText) findViewById(R.id.email); mPasswordView = (EditText) findViewById(R.id.password); autofillform(); final SharedPreferences sharedPreferences = getSharedPreferences("SharedPreferences", MODE_PRIVATE); isAccepted = sharedPreferences.getBoolean("isAccepted", false); if (!isAccepted) { View view = getLayoutInflater().inflate(R.layout.activity_privacy_policy, null); final WebView web = view.findViewById(R.id.webView); Handler mainHandler = new Handler(getApplicationContext().getMainLooper()); Runnable myRunnable = new Runnable() { @Override public void run() { web.loadUrl("file:///android_asset/privacy_policy.html"); } // This is your code }; mainHandler.post(myRunnable); final AlertDialog alertDialog = new AlertDialog.Builder(OneTimeLoginActivity.this) .setView(view) .setTitle("Privacy Policy") .setPositiveButton("Accept", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { SharedPreferences.Editor editor = sharedPreferences.edit(); editor.putBoolean("isAccepted", true); editor.apply(); } }) .setNegativeButton("Decline", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { OneTimeLoginActivity.this.finish(); finishAffinity(); System.exit(0); } }) .setCancelable(false) .create(); alertDialog.show(); } autofillform(); Button signInButton = (Button) findViewById(R.id.email_sign_in_button); signInButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View view) { attemptLogin(); } }); mLoginFormView = findViewById(R.id.login_form); // mProgressView = findViewById(R.id.login_progress); } private void autofillform() { SharedPreferences settings = getSharedPreferences("SharedPreferences", MODE_PRIVATE); name = settings.getString("EmailAddress", "null"); password = settings.getString("Password", "null"); if (name.equals("null") || password.equals("null")) { return; } else { NameView.setText(name); mPasswordView.setText(password); } } private void attemptLogin() { password = mPasswordView.getText().toString(); name = NameView.getText().toString(); SharedPreferences shared = getSharedPreferences("SharedPreferences", MODE_PRIVATE); int ApiKey = (shared.getInt("APIKEY", 1)); SharedPreferences settings = getSharedPreferences("UserNo", MODE_PRIVATE); // Writing data to SharedPreferences SharedPreferences.Editor editor = settings.edit(); editor.putString("name", name); editor.putString("password", password); editor.putInt("APIKEY", ApiKey); editor.commit(); UserLogin userLogin = new UserLogin(name, password); makeNetworkCall(userLogin); // startActivity(new Intent(getApplicationContext(), Loginactivityy.class)); } private void makeNetworkCall(final UserLogin userLogin) { Retrofit.Builder builder = new Retrofit.Builder() .baseUrl("http://grofers.isoping.com:92/api/") .addConverterFactory(GsonConverterFactory.create()); Retrofit retrofit = builder.build(); LoginClient loginClient = retrofit.create(LoginClient.class); Call<ResponseBody> call = loginClient.signIn(userLogin); call.enqueue(new Callback<ResponseBody>() { @Override public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) { Log.d("MOCK!!!", response.body().byteStream().toString()); InputStream result = response.body().byteStream(); InputStreamReader isr = new InputStreamReader(result); BufferedReader br = new BufferedReader(isr); StringBuilder sb = new StringBuilder(); String buffer = null; try { buffer = br.readLine(); } catch (IOException e) { e.printStackTrace(); } while (buffer != null) { sb.append(buffer); try { buffer = br.readLine(); } catch (IOException e) { e.printStackTrace(); } } String json = sb.toString(); Log.d("OneTimeLoginActivity", "onResponse: " + json); try { JSONObject jsonObject = new JSONObject(json); int valid = jsonObject.getInt("Valid"); Log.i("Valid", String.valueOf(valid)); Toast.makeText(OneTimeLoginActivity.this, String.valueOf(valid), Toast.LENGTH_SHORT).show(); SharedPreferences sharedPreferences = getSharedPreferences("SharedPreferences", Context.MODE_PRIVATE); sharedPreferences.edit().putInt("Valid", valid).apply(); if (valid > 0) { Toast.makeText(OneTimeLoginActivity.this, "Logged In", Toast.LENGTH_SHORT).show(); Intent i = new Intent(OneTimeLoginActivity.this, MainActivity.class); startActivity(i); finish(); } else if (valid == 0) { Log.d("Not Valid!!!", userLogin.getUsername() + ", " + userLogin.getPassword()); // Toast.makeText(OneTimeLoginActivity.this, "Problem Occurred", Toast.LENGTH_SHORT).show(); Intent i = new Intent(OneTimeLoginActivity.this, MainActivity.class); startActivity(i); finish(); } } catch (JSONException e) { e.printStackTrace(); } } @Override public void onFailure(Call<ResponseBody> call, Throwable t) { Log.d("OneTimeLoginActivity", "onFailure: " + t.toString()); // Toast.makeText(OneTimeLoginActivity.this, "Problem making Network call", Toast.LENGTH_SHORT).show(); // Intent intent=new Intent(OneTimeLoginActivity.this, MainActivity.class); // startActivity(intent); } }); } // if (password.equals("Isourse9876")) // startActivity(new Intent(getApplicationContext(), Loginactivityy.class)); // } public void createNewUser(View view) { startActivity(new Intent(getApplicationContext(), SignUpActivity.class)); } }
[ "anurag.sharma@isourse.com" ]
anurag.sharma@isourse.com
6afb095ca191eacd81437c3f4241848bc0650945
7108e1e7d620c9392757f5185569a1a1e68647e9
/ecommercestore/src/main/java/com/ecommerce/web/controller/HomeController.java
3c9d95daecfc52f78294c8fb36bee0affcf6b235
[]
no_license
prasunjit/SpringApplications
93b2cc6477e792a9a9442faa357e5dbe217ebb53
fd9751f75b7c612870a8194a84e531d41e61787a
refs/heads/master
2021-04-29T07:05:31.240507
2017-03-01T20:15:48
2017-03-01T20:15:48
77,989,440
0
0
null
null
null
null
UTF-8
Java
false
false
310
java
package com.ecommerce.web.controller; import javax.xml.ws.RequestWrapper; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; @Controller public class HomeController { @RequestMapping("/") public String home(){ return "home"; } }
[ "prasunite@mail.com" ]
prasunite@mail.com
d2e1f913126c39a2f5107eb9ad74b77652e8c8d3
eb65dfe40a6af49cb10c6b0cd59acd87faf07259
/src/day20.java
457c250b08bd6262a8f3611ba038d82932b5cf8e
[]
no_license
swastiijain/100days
64f82d25efc82e9ba612f464b1ec2041324f320d
da617512aa5429acde81b003f48fd84f926586dd
refs/heads/master
2023-08-07T22:09:11.178084
2021-10-01T17:31:12
2021-10-01T17:31:12
406,878,029
0
0
null
null
null
null
UTF-8
Java
false
false
712
java
import java.util.Scanner; public class day20 { public static boolean prime(int n){ int d = 2; while (d < n) { if (n % d == 0) { return false; } d++; } return true; } public static void print(int n) { for (int i = 2; i < n; i++) { boolean prime = prime(i); if (prime) { System.out.println(i); } } } public static void main(String[] args) { Scanner s = new Scanner(System.in); System.out.print("Enter n:"); int n = s.nextInt(); System.out.println("prime Numbers from 1 to "+n); print(n); System.out.println(); } }
[ "swastijain16@outlook.com" ]
swastijain16@outlook.com
45f4310db80cb0a27e869f718549706a4e321cd8
2286eccbd95e6bf195fe5aabbe07e6e4ac9c8023
/src/algs/textbook/ch04/s4_1/BreadFirstPath.java
c1bbd4529003a00bc2fe46aa0d29a12930f5fe5f
[]
no_license
siwifttiger/Alg
ea1623998e8ada2dcb516654d3eb2bb6ee3fb6bb
0fc383e8a53060ba773d2f9a0de08dff76565151
refs/heads/master
2020-04-06T07:08:54.236121
2016-09-01T04:21:13
2016-09-01T04:21:13
62,988,065
0
0
null
null
null
null
GB18030
Java
false
false
2,175
java
/* * 利用广度优先遍历 * 从某一个起点出发 * 找出所有与该起点连通的顶点的 * 最短路径 */ package algs.textbook.ch04.s4_1; import java.io.File; import com.wangsg.algs.In; import com.wangsg.algs.StdOut; import edu.princeton.cs.algs4.Queue; import edu.princeton.cs.algs4.Stack; import edu.princeton.cs.algs4.StdIn; public class BreadFirstPath { private boolean[] marked; private static int s; private int[] edgeTo; public BreadFirstPath(Graph g, int s){ this.s = s; marked = new boolean[g.V()]; edgeTo = new int[g.V()]; bfs(g,s); } public void bfs(Graph g, int s){ Queue<Integer> q = new Queue<Integer>(); q.enqueue(s); marked[s] = true; while(!q.isEmpty()){ int v = q.dequeue(); for(int w:g.adj(v)){ if(!marked[w]){ marked[w] = true; edgeTo[w] = v; q.enqueue(w); } } } } public boolean hasPathTo(int v){ return marked[v]; } public Iterable<Integer> pathTo(int v){ if(!hasPathTo(v)) return null; Stack<Integer> path = new Stack<Integer>(); for(int x = v; x != s; x = edgeTo[x]){ path.push(x); } path.push(s); return path; } public int pathLen(int v){ if(!hasPathTo(v)) return 0; Stack<Integer> path = new Stack<Integer>(); for(int x = v; x != s; x = edgeTo[x]){ path.push(x); } path.push(s); return path.size()-1; } public static void main(String[] args){ Graph g = new Graph(new In("E:"+ File.separator+"workspace" +File.separator+"AlgorithmPractices"+File.separator +"src"+File.separator +"algs"+File.separator +"textbook"+File.separator +"ch04"+File.separator +"s4_1"+File.separator +"tinyCG.txt")); int source = StdIn.readInt(); BreadFirstPath search = new BreadFirstPath(g, source); for(int v = 0; v < g.V();v++){ StdOut.print(source + " to " + v + ": "); if(search.pathLen(v) != 0) StdOut.println("path length is " + search.pathLen(v)); for(int x:search.pathTo(v)){ if(x == s) StdOut.print(x); else StdOut.print("-"+x); } StdOut.println(); } } }
[ "wangsigui@yeah.net" ]
wangsigui@yeah.net
2d5aec5f016812e1e3fc8d25e97d01d734f0e0bb
fa54a94baf679c2378f7e37c39f6faa91f593047
/android_drawing_app_source_part_1/src/com/example/drawingfun/MainActivity.java
8544fb326a7f6ec1f62062a55a3069abc9032470
[]
no_license
minhnvt1/Android_DrawingFunny
1afdfc48cc5a97fc8bd25ee82aaf7ba90a5a3a66
177fe61438f3dec32b4131fd9e02a0f51e041b7b
refs/heads/master
2020-06-05T07:32:22.683857
2013-08-27T14:20:27
2013-08-27T14:20:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
663
java
package com.example.drawingfun; import android.os.Bundle; import android.app.Activity; import android.view.Menu; /** * This is demo code to accompany the Mobiletuts+ tutorial series: * - Android SDK: Create a Drawing App * * Sue Smith * August 2013 * */ public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); } @Override public boolean onCreateOptionsMenu(Menu menu) { // Inflate the menu; this adds items to the action bar if it is present. getMenuInflater().inflate(R.menu.main, menu); return true; } }
[ "root@MinhNVT1.local" ]
root@MinhNVT1.local
f8511cbc836c6fb2972131adf5c58efe23846261
781082162e2797afcf62cc0ab243629c25eac508
/springboot-mapping-lombok/src/main/java/com/mdits/controller/EmployeeController.java
7371ee227dd37bdd3f4162575eb4eb1d2812dca3
[]
no_license
Mahender7799/SpringFrameworkProjects
0f94d5804281a12cf57fe78e8386be96efeab26f
f27d4e8b90dcfa541809f259300f04b128eeb1b8
refs/heads/master
2023-04-28T13:38:03.867273
2021-05-21T12:52:10
2021-05-21T12:52:10
365,110,522
0
0
null
null
null
null
UTF-8
Java
false
false
2,751
java
package com.mdits.controller; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.validation.Valid; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.mdits.exception.ResourceNotFoundException; import com.mdits.model.Employee; import com.mdits.repository.EmployeeRepository; @RestController @RequestMapping("/api") public class EmployeeController { @Autowired private EmployeeRepository employeeRepository; @GetMapping("/employees") public List<Employee> getAllEmployees(){ return employeeRepository.findAll(); } @PostMapping("/employees") public Employee createEmployee(@RequestBody Employee employee) { return employeeRepository.save(employee); } @GetMapping("/employees/{empID}") public ResponseEntity<Employee> getEmployeeById(@PathVariable(value = "empID") Integer empID) throws ResourceNotFoundException { Employee employee = employeeRepository.findById(empID) .orElseThrow(() -> new ResourceNotFoundException("Employee not found for this id :: " + empID)); return ResponseEntity.ok().body(employee); } @PutMapping("/employees/{empID}") public ResponseEntity<Employee> updateEmployee(@PathVariable(value = "empID") Integer empID, @Valid @RequestBody Employee employeeDetails) throws ResourceNotFoundException { Employee employee = employeeRepository.findById(empID) .orElseThrow(() -> new ResourceNotFoundException("Employee not found for this id :: " + empID)); final Employee updatedEmployee = employeeRepository.save(employee); return ResponseEntity.ok(updatedEmployee); } @DeleteMapping("/employees/{empID}") public Map<String, Boolean> deleteEmployee(@PathVariable(value = "empID") Integer empID) throws ResourceNotFoundException { Employee employee = employeeRepository.findById(empID) .orElseThrow(() -> new ResourceNotFoundException("Employee not found for this id :: " + empID)); employeeRepository.delete(employee); Map<String, Boolean> response = new HashMap<>(); response.put("deleted", Boolean.TRUE); return response; } }
[ "mahi@mahi-pc" ]
mahi@mahi-pc
628d558b41a5b68eb04159a848b59dbc5a3aa95c
7a11abee08ad2a46a44649ee438028bcc467e70a
/app/src/main/java/com/globomed/tutorme/Fragments/LessonsFragment.java
e9dfad82f0a74903b8e57ad291b01bbe493f52f5
[]
no_license
Emanuel31/Tutorme
a31c9b4ba74b3b478154f8d3f00682bb15caeacd
8d9d5a6d26e57b83f5381a6b01a5bc6b6312ca7d
refs/heads/master
2023-01-05T05:17:55.125401
2020-10-30T13:00:40
2020-10-30T13:00:40
308,631,435
0
0
null
null
null
null
UTF-8
Java
false
false
563
java
package com.globomed.tutorme.Fragments; import android.os.Bundle; import androidx.fragment.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import com.globomed.tutorme.R; public class LessonsFragment extends Fragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.fragment_lessons, container, false); } }
[ "emanuelza1988@gmail.com" ]
emanuelza1988@gmail.com
6caaaedf4a93e55df589e4c0aa0862f8f3e1cfa7
4901e89dfcb7999cd90ebd460bf27db155ae89dd
/tcamt-lite-domain/src/main/java/gov/nist/healthcare/tools/hl7/v2/tcamt/lite/domain/profile/ProfileAbstract.java
32273e747556a41fd6faafa785b6a184f5d72f77
[]
no_license
Jungyubw/newTCAMT
9fb4ae1817bd22af4712935d767c087fdb1c0446
e529d6f7be402f20c68c66dba76ecb3bf4429a91
refs/heads/master
2022-12-22T11:37:41.139413
2020-04-08T17:20:13
2020-04-08T17:20:13
52,987,352
3
2
null
2022-12-09T22:12:57
2016-03-02T18:45:43
XSLT
UTF-8
Java
false
false
3,476
java
/** * This software was developed at the National Institute of Standards and Technology by employees of * the Federal Government in the course of their official duties. Pursuant to title 17 Section 105 * of the United States Code this software is not subject to copyright protection and is in the * public domain. This is an experimental system. NIST assumes no responsibility whatsoever for its * use by other parties, and makes no guarantees, expressed or implied, about its quality, * reliability, or any other characteristic. We would appreciate acknowledgement if the software is * used. This software can be redistributed and/or modified freely provided that any derivative * works bear some notice that they are derived from it, and any modified versions bear some notice * that they have been modified. */ package gov.nist.healthcare.tools.hl7.v2.tcamt.lite.domain.profile; import java.util.Date; import java.util.HashSet; import java.util.Set; /** * @author jungyubw * */ public class ProfileAbstract { private String id; private Long accountId; private String sourceType; private Date lastUpdatedDate; private IntegrationProfileMetaData integrationProfileMetaData; private ConformanceContextMetaData conformanceContextMetaData; private ValueSetLibraryMetaData valueSetLibraryMetaData; private Set<ConformanceProfileMetaData> conformanceProfileMetaDataSet; public ConformanceContextMetaData getConformanceContextMetaData() { return conformanceContextMetaData; } public void setConformanceContextMetaData(ConformanceContextMetaData conformanceContextMetaData) { this.conformanceContextMetaData = conformanceContextMetaData; } public ValueSetLibraryMetaData getValueSetLibraryMetaData() { return valueSetLibraryMetaData; } public void setValueSetLibraryMetaData(ValueSetLibraryMetaData valueSetLibraryMetaData) { this.valueSetLibraryMetaData = valueSetLibraryMetaData; } public Long getAccountId() { return accountId; } public void setAccountId(Long accountId) { this.accountId = accountId; } public String getSourceType() { return sourceType; } public void setSourceType(String sourceType) { this.sourceType = sourceType; } public Date getLastUpdatedDate() { return lastUpdatedDate; } public void setLastUpdatedDate(Date lastUpdatedDate) { this.lastUpdatedDate = lastUpdatedDate; } public String getId() { return id; } public void setId(String id) { this.id = id; } public IntegrationProfileMetaData getIntegrationProfileMetaData() { return integrationProfileMetaData; } public void setIntegrationProfileMetaData(IntegrationProfileMetaData integrationProfileMetaData) { this.integrationProfileMetaData = integrationProfileMetaData; } public Set<ConformanceProfileMetaData> getConformanceProfileMetaDataSet() { return conformanceProfileMetaDataSet; } public void setConformanceProfileMetaDataSet(Set<ConformanceProfileMetaData> conformanceProfileMetaDataSet) { this.conformanceProfileMetaDataSet = conformanceProfileMetaDataSet; } /** * @param conformanceProfileMetaData */ public void addConformanceProfileMetaData(ConformanceProfileMetaData conformanceProfileMetaData) { if(this.conformanceProfileMetaDataSet == null) this.conformanceProfileMetaDataSet = new HashSet<ConformanceProfileMetaData>(); this.conformanceProfileMetaDataSet.add(conformanceProfileMetaData); } }
[ "acetcom@gmail.com" ]
acetcom@gmail.com
f5211ac787641c89d7f9577acdbd572d09e8048e
9b42d043e04372c4d35c623fdf4e76cb30ed8d98
/SpringBootJavaFXLove/src/main/java/com/pakotzy/springbootjavafxlove/MainView.java
70fd7097d43689a518fed8eb9e71120de50dee53
[]
no_license
pakotzy/Various
199511edbf9291ce644b70acc2b645d4decc41f1
1d448f76d71a47d09cd97bfab7e7c829b41a586b
refs/heads/master
2021-05-02T18:19:15.200668
2018-07-04T10:45:18
2018-07-04T10:45:18
120,660,588
0
0
null
null
null
null
UTF-8
Java
false
false
248
java
package com.pakotzy.springbootjavafxlove; import de.felixroske.jfxsupport.AbstractFxmlView; import de.felixroske.jfxsupport.FXMLView; @FXMLView(bundle = "com.pakotzy.springbootjavafxlove.main") public class MainView extends AbstractFxmlView { }
[ "pakotzy@gmail.com" ]
pakotzy@gmail.com
3a3e92efaee6b8297691cc19ab2ab69d84f03a86
fb653699a76413300e90b75ce4626ebbd78afdcf
/academy6721/src/by/academy/lesson17/ReflectionFieldDemo.java
a70e11eaa8fa84cd08a0e99caa0ebd4f69bfae49
[]
no_license
dmitry-academy/academy6721
4ca560f6c413c24ce94a9c5e6623c6ea85143c46
6cb68cc9e4bfb29e1de81837ff0851667c4d9b57
refs/heads/master
2023-03-24T20:38:59.741311
2021-03-27T12:17:47
2021-03-27T12:17:47
330,203,298
0
2
null
null
null
null
UTF-8
Java
false
false
1,604
java
package by.academy.lesson17; import java.lang.reflect.Field; import java.lang.reflect.Modifier; public class ReflectionFieldDemo { public static void main(String... args) { Car car = new Car(500, "1233"); Class<? extends Car> carClass = Car.class; // Example 1 try { Field serialNumberField = carClass.getDeclaredField("horsePower"); String serialNumberValue = (String) serialNumberField.get(car); System.out.println(serialNumberValue); // output: 1233 } catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) { e.printStackTrace(); } // Example 2 try { Field horsepowerField = carClass.getDeclaredField("horsepower"); horsepowerField.setAccessible(true); int horsepowerValue = horsepowerField.getInt(car); System.out.println(horsepowerValue); } catch (NoSuchFieldException | SecurityException | IllegalArgumentException | IllegalAccessException e) { e.printStackTrace(); } // Example 3 try { Field horsepowerField = carClass.getDeclaredField("horsepower"); String name = horsepowerField.getName(); System.out.println(name); Class<?> type = horsepowerField.getType(); System.out.println(type); int modifiers = horsepowerField.getModifiers(); System.out.println(modifiers); // output: 2 System.out.println("isPrivate: " + Modifier.isPrivate(modifiers)); // output: true System.out.println("isFinal: " + Modifier.isFinal(modifiers)); // output: false } catch (NoSuchFieldException | SecurityException | IllegalArgumentException e) { e.printStackTrace(); } } }
[ "dmitrysc@t480-SchepinD.playtika.local" ]
dmitrysc@t480-SchepinD.playtika.local
b697f531a333b66ffc72f11332413b57b5f29a2c
0574bb948761d496942d2f07b8c3a38b1b757659
/app/src/main/java/com/youli/zbetuch/jingan/naire/ShowPersionHistoryList.java
2967cacf9d6983f92d89c0baef637a2482833811
[]
no_license
542210035/ZBETuch_new_phone
3d2227fb15172ca6380111520dee5985e0c973cc
e7b69e76c3c9f68fba4aade789204d4afad21d79
refs/heads/master
2021-07-24T22:41:37.529161
2017-11-06T03:47:49
2017-11-06T03:47:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,018
java
package com.youli.zbetuch.jingan.naire; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.Iterator; import java.util.LinkedList; import java.util.List; import okhttp3.Call; import okhttp3.OkHttpClient; import com.google.gson.Gson; import com.google.gson.reflect.TypeToken; import com.youli.zbetuch.jingan.R; import com.youli.zbetuch.jingan.utils.MyOkHttpUtils; import com.zhy.http.okhttp.OkHttpUtils; import com.zhy.http.okhttp.callback.StringCallback; import android.app.Activity; import android.app.ProgressDialog; import android.content.Intent; import android.os.Bundle; import android.text.TextUtils; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.LinearLayout; import android.widget.ListAdapter; import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; public class ShowPersionHistoryList extends Activity{ private TextView qx_tv, pid_tv, number_tv, name_tv, sex_tv, sfz_tv, edu_tv, zt_tv, jd_tv, jw_tv, lxdz_tv, phone, dzszqx_tv,sphl_tv_name; public HistoryInfo info; private LinearLayout lv_title; private ListView lv; private HistoryListAdapter adapter; private List<FamilyInfo> listInfo=new ArrayList<FamilyInfo>(); private ProgressDialog dialog; @Override protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); setContentView(R.layout.activity_showpersionhistorylist); info = (HistoryInfo) getIntent().getSerializableExtra("info"); qx_tv = (TextView) this.findViewById(R.id.qx_sphl); pid_tv = (TextView) this.findViewById(R.id.pid_sphl); number_tv = (TextView) this.findViewById(R.id.id_sphl); name_tv = (TextView) this.findViewById(R.id.name_sphl); sex_tv = (TextView) this.findViewById(R.id.sex_sphl); edu_tv = (TextView) this.findViewById(R.id.edu_sphl); sfz_tv = (TextView) this.findViewById(R.id.sfz_sphl); jd_tv = (TextView) this.findViewById(R.id.jd_sphl); jw_tv = (TextView) this.findViewById(R.id.jw_sphl); lxdz_tv = (TextView) this.findViewById(R.id.lxdz_sphl); phone = (TextView) this.findViewById(R.id.lxdh_sphl); zt_tv = (TextView) this.findViewById(R.id.status_sphl); dzszqx_tv = (TextView) this.findViewById(R.id.hjqx_sphl); lv_title=(LinearLayout) findViewById(R.id.sphl_ll_title); sphl_tv_name=(TextView) findViewById(R.id.sphl_tv_name); if(info.getQA_MASTER()==5){ sphl_tv_name.setVisibility(View.VISIBLE); }else if(info.getQA_MASTER()==6){ sphl_tv_name.setVisibility(View.GONE); } lv=(ListView) findViewById(R.id.sphl_lv); lv.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> arg0, View arg1, int position, long arg3) { toWenJuanDetail(position); } }); if(info!=null){ qx_tv.setText(info.getQX()); pid_tv.setText(info.getPID()); number_tv.setText(info.getNO()); name_tv.setText(info.getNAME()); sex_tv.setText(info.getSEX()); sfz_tv.setText(info.getSFZ()); edu_tv.setText(info.getEDU()); jd_tv.setText(info.getJD()); jw_tv.setText(info.getJW()); lxdz_tv.setText(info.getLXDZ()); phone.setText(info.getPHONE()); zt_tv.setText(info.getZT()); dzszqx_tv.setText(info.getQX()); } getFamilyList(); } private void showDialog() { dialog = new ProgressDialog(ShowPersionHistoryList.this); dialog.setCanceledOnTouchOutside(false); dialog.setMessage("数据信息加载中..."); dialog.show(); } private void getFamilyList(){ showDialog(); // http://192.168.11.11:89/Json/Get_Home.aspx?TYPE=1&QA_MASTER=5&SFZ=310108197604155814 OkHttpUtils.post().url(MyOkHttpUtils.BaseUrl+ShowPersionDetailInfo.familyListUrl).addParams("TYPE","1").addParams("SFZ",info.getSFZ()).addParams("QA_MASTER",info.getQA_MASTER()+"").build().execute(new StringCallback() { @Override public void onError(Call call, Exception e) { dialog.dismiss(); Toast.makeText(ShowPersionHistoryList.this,"请连接网络",Toast.LENGTH_SHORT).show(); } @Override public void onResponse(final String infoStr) { if(TextUtils.equals(infoStr,"[]")){ lv_title.setVisibility(View.GONE); lv.setVisibility(View.GONE); dialog.dismiss(); return; }else{ lv_title.setVisibility(View.VISIBLE); lv.setVisibility(View.VISIBLE); } runOnUiThread(new Runnable() { public void run() { Gson gson=new Gson(); Type listType=new TypeToken<LinkedList<FamilyInfo>>(){}.getType(); LinkedList<FamilyInfo> fi=gson.fromJson(infoStr,listType); listInfo.clear(); for (Iterator iterator = fi.iterator(); iterator .hasNext();) { FamilyInfo content = (FamilyInfo) iterator .next(); listInfo.add(content); } if(adapter==null){ adapter=new HistoryListAdapter(listInfo, ShowPersionHistoryList.this); lv.setAdapter(adapter); }else{ adapter.notifyDataSetChanged(); } setListViewHeightBasedOnChildren(lv); dialog.dismiss(); } }); } }); } public void setListViewHeightBasedOnChildren(ListView listView) { // 获取ListView对应的Adapter ListAdapter listAdapter = listView.getAdapter(); if (listAdapter == null) { return; } int totalHeight = 0; for (int i = 0, len = listAdapter.getCount(); i < len; i++) { // listAdapter.getCount()返回数据项的数目 View listItem = listAdapter.getView(i, null, listView); // 计算子项View 的宽高 listItem.measure(0, 0); // 统计所有子项的总高度 totalHeight += listItem.getMeasuredHeight(); } ViewGroup.LayoutParams params = listView.getLayoutParams(); params.height = totalHeight+ (listView.getDividerHeight() * (listAdapter.getCount() - 1)); // listView.getDividerHeight()获取子项间分隔符占用的高度 // params.height最后得到整个ListView完整显示需要的高度 listView.setLayoutParams(params); } private void toWenJuanDetail(final int position){ // http://192.168.11.11:89/Json/Get_Tb_Home_Answer_Info.aspx?HOMEID=241 OkHttpUtils.post().url(MyOkHttpUtils.BaseUrl+ShowPersionDetailInfo.answerUrl).addParams("HOMEID", listInfo.get(position).getID()+"").build().execute(new StringCallback() { @Override public void onResponse(String str) { Intent intent=new Intent(ShowPersionHistoryList.this,WenJuanDetailActivity.class); if(TextUtils.equals(str, "false")){ intent.putExtra("rb", true); Toast.makeText(ShowPersionHistoryList.this,"该人员未答题,请先答题",Toast.LENGTH_SHORT).show(); return; }else{ intent.putExtra("rb", false); } //intent.putExtra("info", info); intent.putExtra("pid", info.getID()); intent.putExtra("NO", info.getNO()); intent.setAction("historyList"); intent.putExtra("sname", listInfo.get(position).getSQR()); intent.putExtra("position", position); intent.putExtra("QUESTIONMASTERID",listInfo.get(position).getQUESTIONMASTERID()); intent.putExtra("myHOMEID", listInfo.get(position).getID()); intent.putExtra("myStatus",getIntent().getBooleanExtra("myStatus",false)); MainTools.map.put("lishiwenjuaninfo", (WenJuanType) ShowWenJuanActivity.lishiJuanTypes.get(listInfo.get(position).getQUESTIONMASTERID()-1)); startActivity(intent); } @Override public void onError(Call arg0, Exception arg1) { Toast.makeText(ShowPersionHistoryList.this,"请连接网络",Toast.LENGTH_SHORT).show(); } }); } }
[ "2381447237@qq.com" ]
2381447237@qq.com
624fc60964e95691c4b6c5b403b6e6f54e708b8c
781f902499daa2c2fb9ab18f6cba3094e8bd9335
/src/main/java/kyparus/Tour/DAO/ShopTourDAO.java
47de25593d88ebdd4531f79998f9ac986c0b36d4
[]
no_license
kyparus/TravelAgency
45fd6060dce850651f17438bbc31cc456683303b
46ce4fba77144f9b76c777ad1a368ebdec30864f
refs/heads/master
2021-01-10T08:04:42.192620
2015-12-23T18:37:11
2015-12-23T18:37:11
48,502,269
0
0
null
null
null
null
UTF-8
Java
false
false
5,993
java
package kyparus.Tour.DAO; import kyparus.Tour.ShoppingTour; import kyparus.Tour.Tour; import org.apache.log4j.Logger; import snaq.db.ConnectionPool; import java.sql.SQLException; import java.util.LinkedList; /** * Created by yurii on 04.12.15. */ public class ShopTourDAO extends TourDAO { private final static Logger logger = Logger.getLogger(ShopTourDAO.class); private static final String SHOP_TOURS_TABLE = "ShopTours"; public ShopTourDAO(ConnectionPool pool) { super(pool); } @Override public void createTable() { if (tableExists(SHOP_TOURS_TABLE)) return; logger.debug("Creating " + SHOP_TOURS_TABLE); String sql = "CREATE TABLE " + SHOP_TOURS_TABLE + " (ID INTEGER not NULL AUTO_INCREMENT, " + " name VARCHAR(255), " + " transToLocation VARCHAR(255), " + " transFromLocation VARCHAR(255), " + " departure VARCHAR(255), " + " arrival VARCHAR(255) , " + " durationFrom INTEGER, " + " durationTo INTEGER , " + " isHot INTEGER , " + " price DOUBLE, " + " mall VARCHAR(255), " + " putativeMoney VARCHAR(255), " + " PRIMARY KEY ( ID ))"; try { beginQuery(); stmt.executeUpdate(sql); } catch (SQLException e) { logger.warn(e.getMessage()); } finally { endQuery(); } logger.debug(SHOP_TOURS_TABLE + " created."); } @Override public void drop() { drop(SHOP_TOURS_TABLE); } @Override public void updateTour(Tour tour) { updateTour(tour,SHOP_TOURS_TABLE); } @Override public void deleteTour(Tour tour) { deleteTour(SHOP_TOURS_TABLE, tour.getID()); } @Override public void deleteTour(Integer ID) { deleteTour(SHOP_TOURS_TABLE, ID); } public ShoppingTour getTour(Integer ID) { if (!tableExists(SHOP_TOURS_TABLE)) return null; logger.debug("Selecting tour with ID " + ID); String sql = "SELECT * FROM " + SHOP_TOURS_TABLE + " WHERE ID = " + ID; ShoppingTour tour = null; try { beginQuery(); rs = stmt.executeQuery(sql); if (rs.next()) { tour = new ShoppingTour(); tour.setID(ID); tour.setName(rs.getString("name")); tour.setPutativeMoney(rs.getDouble("putativeMoney")); tour.setMall(rs.getString("mall")); tour.setArrival(rs.getString("arrival")); tour.setDeparture(rs.getString("departure")); tour.setDurationFrom(rs.getInt("durationFrom")); tour.setDurationTo(rs.getInt("durationTo")); tour.setHot(rs.getInt("isHot") > 0); tour.setPrice(rs.getDouble("price")); tour.setTransToLocation(rs.getString("transToLocation")); tour.setTransFromLocation(rs.getString("transFromLocation")); } } catch (SQLException e) { logger.warn(e.getMessage()); } finally { endQuery(); } logger.debug("Selected tour with ID " + ID); return tour; } public void addTour(ShoppingTour tour) { if (!tableExists(SHOP_TOURS_TABLE)) createTable(); logger.debug("Adding tour " + tour.getName()); String sql = "INSERT INTO " + SHOP_TOURS_TABLE + " (name, transToLocation, transFromLocation, departure, arrival," + " durationFrom, durationTo, isHot, price, mall, putativeMoney) " + "VALUES ('" + tour.getName() + "','" + tour.getTransToLocation() + "','" + tour.getTransFromLocation() + "','" + tour.getDeparture() + "','" + tour.getArrival() + "'," + tour.getDurationFrom() + "," + tour.getDurationTo() + "," + (tour.isHot() ? 1 : 0) + "," + tour.getPrice() + ",'" + tour.getMall() + "','" + tour.getPutativeMoney() + "')"; try { beginQuery(); stmt.executeUpdate(sql); } catch (SQLException e) { logger.warn(e.getMessage()); } finally { endQuery(); } logger.debug("Tour " + tour.getName() + " was added."); } public LinkedList<ShoppingTour> getAllTours() { if (!tableExists(SHOP_TOURS_TABLE)) return null; logger.debug("Getting all tours."); String sql = "SELECT * FROM " + SHOP_TOURS_TABLE; LinkedList<ShoppingTour> answer = new LinkedList<ShoppingTour>(); try { beginQuery(); rs = stmt.executeQuery(sql); ShoppingTour tour; while (rs.next()) { tour = new ShoppingTour(); tour.setID(rs.getInt("ID")); tour.setName(rs.getString("name")); tour.setMall(rs.getString("mall")); tour.setPutativeMoney(rs.getDouble("putativeMoney")); tour.setArrival(rs.getString("arrival")); tour.setDeparture(rs.getString("departure")); tour.setDurationFrom(rs.getInt("durationFrom")); tour.setDurationTo(rs.getInt("durationTo")); tour.setHot(rs.getInt("isHot") > 0); tour.setPrice(rs.getDouble("price")); tour.setTransToLocation(rs.getString("transToLocation")); tour.setTransFromLocation(rs.getString("transFromLocation")); answer.add(tour); } } catch (SQLException e) { logger.warn(e.getMessage()); } finally { endQuery(); } logger.debug("Got all tours."); return answer; } }
[ "yurii@MacBook-Pro-Yurii.local" ]
yurii@MacBook-Pro-Yurii.local
ac7ff429cac59f74ff40dc9c5d1ef0c864520177
85f577b3cf044f429d7760586751355480bcd91b
/course4/week3/2-interface_random_starter/MarkovZero.java
0eb82bd4ac74c05d279474efa35dbf51ef2f74a4
[]
no_license
mvexel/refugees-duke-course
0df9aec78572c92a8e122aa4e91b08e156b2cc6f
47834e1ae72b72c38fa82b8087b4f5c1e3789e30
refs/heads/master
2020-04-12T21:32:30.585040
2019-02-04T06:35:07
2019-02-04T06:35:07
162,764,544
0
0
null
null
null
null
UTF-8
Java
false
false
549
java
/** * Write a description of class MarkovZero here. * * @author Duke Software * @version 1.0 */ import java.util.Random; public class MarkovZero extends AbstractMarkovModel { public String getRandomText(int numChars){ if (myText == null){ return ""; } StringBuilder sb = new StringBuilder(); for(int k=0; k < numChars; k++){ int index = myRandom.nextInt(myText.length()); sb.append(myText.charAt(index)); } return sb.toString(); } public String toString() { return "This is a MarkovZero instance"; } }
[ "m@rtijn.org" ]
m@rtijn.org
8f58fb84489e06b6d37374dea6c8b96059627b6a
3b701ae2e888128984b9bf3cca57515b7d388c01
/src/main/java/fr/treeptik/employeemanager/dao/impl/DepartementJPAImpl.java
44a4eb873d03bb73413667852cc13cf0a75173f4
[]
no_license
jpierre03/employee-manager
82e998f4be2b9ef06471a6573926dbec506a22c3
62aaac70d8f07e227d2269f66612ba9148c94316
refs/heads/master
2021-01-22T00:46:00.308426
2013-09-04T20:31:42
2013-09-04T20:31:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
328
java
package fr.treeptik.employeemanager.dao.impl; import org.springframework.stereotype.Repository; import fr.treeptik.employeemanager.dao.DepartementDAO; import fr.treeptik.employeemanager.model.Departement; @Repository public class DepartementJPAImpl extends GenericJPAImpl<Departement, Integer> implements DepartementDAO { }
[ "balisong13@gmail.com" ]
balisong13@gmail.com
3ed2e11a8fa5998431e566392f088886897ae91a
982f6c3a3c006d2b03f4f53c695461455bee64e9
/src/main/java/com/alipay/api/response/KoubeiServindustryPromoIntelligentguideOrderResponse.java
ac7093d0208d4be1c11928cc519de7744849de4c
[ "Apache-2.0" ]
permissive
zhaomain/Alipay-Sdk
80ffc0505fe81cc7dd8869d2bf9a894b823db150
552f68a2e7c10f9ffb33cd8e0036b0643c7c2bb3
refs/heads/master
2022-11-15T03:31:47.418847
2020-07-09T12:18:59
2020-07-09T12:18:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
668
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: koubei.servindustry.promo.intelligentguide.order response. * * @author auto create * @since 1.0, 2020-03-10 10:35:08 */ public class KoubeiServindustryPromoIntelligentguideOrderResponse extends AlipayResponse { private static final long serialVersionUID = 7311171285998561728L; /** * 是否成功 */ @ApiField("success") private Boolean success; public void setSuccess(Boolean success) { this.success = success; } public Boolean getSuccess( ) { return this.success; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
4481fb6e0c535e44681e678f855883a8828bea46
aa70f1789d05b03d62299e7cb14e80cffe27169e
/src/main/java/pl/altkom/text/mvc/spring/model/Team.java
a57643e04b274f9c46f810f9a5285a43b40c6fe7
[]
no_license
Dominik11/key-error
cf9c37a4f815a2ea54d0ab66ee7c4c1cb3088671
2cf10c22430129c0ce0acc72d850e9207871056e
refs/heads/master
2020-06-26T09:05:07.382697
2015-03-27T21:17:06
2015-03-27T21:17:06
33,009,565
0
0
null
null
null
null
UTF-8
Java
false
false
724
java
/* * Copyright 2011-08-31 the original author or authors. */ package pl.altkom.text.mvc.spring.model; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; /** * * @author Adrian Lapierre <adrian@softproject.com.pl> */ @Entity public class Team { @Id @GeneratedValue(strategy = GenerationType.AUTO) private int id; private String name; 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; } }
[ "dominik.j.91@tlen.pl" ]
dominik.j.91@tlen.pl
623defcafba54db6b9da5b2d188c2f6d641f2897
f2bae3afa17745be9bc3bc98b9540b98f1cfd3c9
/src/com/massivecraft/factions/integration/spigot/EngineSpigot.java
f2ad63a520a4995c6eac4e476d21b66d878b2723
[]
no_license
Hillimy/Factions
7814bcce65ebd6f2ea29544bbf0eda8cd25a9802
399af19ec059126ea8c6563997bbea393834b2b2
refs/heads/master
2021-01-20T15:30:21.591448
2017-02-22T15:17:54
2017-02-22T15:17:54
82,819,037
1
0
null
2017-02-22T15:17:02
2017-02-22T15:17:02
null
UTF-8
Java
false
false
4,549
java
package com.massivecraft.factions.integration.spigot; import java.util.List; import org.bukkit.block.Block; import org.bukkit.entity.Entity; import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.block.BlockPistonExtendEvent; import org.bukkit.event.block.BlockPistonRetractEvent; import org.bukkit.event.player.PlayerInteractAtEntityEvent; import com.massivecraft.factions.engine.EngineMain; import com.massivecraft.factions.entity.BoardColl; import com.massivecraft.factions.entity.Faction; import com.massivecraft.factions.entity.MConf; import com.massivecraft.factions.entity.MPerm; import com.massivecraft.massivecore.Engine; import com.massivecraft.massivecore.ps.PS; import com.massivecraft.massivecore.util.MUtil; public class EngineSpigot extends Engine { // -------------------------------------------- // // INSTANCE & CONSTRUCT // -------------------------------------------- // private static EngineSpigot i = new EngineSpigot(); public static EngineSpigot get() { return i; } // -------------------------------------------- // // LISTENER // -------------------------------------------- // // This is a special Spigot event that fires for Minecraft 1.8 armor stands. // It also fires for other entity types but for those the event is buggy. // It seems we can only cancel interaction with armor stands from here. // Thus we only handle armor stands from here and handle everything else in EngineMain. @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void onPlayerInteractAtEntity(PlayerInteractAtEntityEvent event) { // Ignore Off Hand if (isOffHand(event)) return; // Gather Info final Player player = event.getPlayer(); if (MUtil.isntPlayer(player)) return; final Entity entity = event.getRightClicked(); final boolean verboose = true; // Only care for armor stands. if (entity.getType() != EntityType.ARMOR_STAND) return; // If we can't use ... if (EngineMain.canPlayerUseEntity(player, entity, verboose)) return; // ... block use. event.setCancelled(true); } /* * Note: With 1.8 and the slime blocks, retracting and extending pistons * became more of a problem. Blocks located on the border of a chunk * could have easily been stolen. That is the reason why every block * needs to be checked now, whether he moved into a territory which * he actually may not move into. */ @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void blockBuild(BlockPistonExtendEvent event) { // Is checking deactivated by MConf? if ( ! MConf.get().handlePistonProtectionThroughDenyBuild) return; Faction pistonFaction = BoardColl.get().getFactionAt(PS.valueOf(event.getBlock())); List<Block> blocks = event.getBlocks(); // Check for all extended blocks for (Block block : blocks) { // Block which is being pushed into Block targetBlock = block.getRelative(event.getDirection()); // Members of a faction might not have build rights in their own territory, but pistons should still work regardless Faction targetFaction = BoardColl.get().getFactionAt(PS.valueOf(targetBlock)); if (targetFaction == pistonFaction) continue; // Perm check if (MPerm.getPermBuild().has(pistonFaction, targetFaction)) continue; event.setCancelled(true); return; } } @EventHandler(priority = EventPriority.NORMAL, ignoreCancelled = true) public void blockBuild(BlockPistonRetractEvent event) { // Is checking deactivated by MConf? if ( ! MConf.get().handlePistonProtectionThroughDenyBuild) return; Faction pistonFaction = BoardColl.get().getFactionAt(PS.valueOf(event.getBlock())); List<Block> blocks = event.getBlocks(); // Check for all retracted blocks for (Block block : blocks) { // Is the retracted block air/water/lava? Don't worry about it if (block.isEmpty() || block.isLiquid()) return; // Members of a faction might not have build rights in their own territory, but pistons should still work regardless Faction targetFaction = BoardColl.get().getFactionAt(PS.valueOf(block)); if (targetFaction == pistonFaction) continue; // Perm check if (MPerm.getPermBuild().has(pistonFaction, targetFaction)) continue; event.setCancelled(true); return; } } }
[ "olof@sylt.nu" ]
olof@sylt.nu
d0389d950e78f79467187da346d74f251c538971
99747123c4a1cdb98cfb6b484c5be7e269ced9f5
/project/bio-nio-aio/c-nio-chat/src/UserInputHandler.java
2e112cf6cfd00312f0393b7c672995278a90d752
[ "Apache-2.0" ]
permissive
CodingSoldier/java-learn
0dea60617be635d6d028cd3c4302bd2975526dbf
114358e63c41a1884ca660b70e13ed25bc12fbc6
refs/heads/master
2023-05-28T14:46:52.437585
2023-05-12T09:07:34
2023-05-12T09:07:34
113,655,752
27
20
Apache-2.0
2023-05-12T09:10:03
2017-12-09T08:51:50
Java
UTF-8
Java
false
false
941
java
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class UserInputHandler implements Runnable { private ChatClient chatClient; public UserInputHandler(ChatClient chatClient) { this.chatClient = chatClient; } @Override public void run() { BufferedReader reader = null; try { reader = new BufferedReader( new InputStreamReader(System.in) ); while (true){ String msg = reader.readLine(); chatClient.send(msg); if (chatClient.readToQuit(msg)){ break; } } }catch (IOException e){ e.printStackTrace(); }finally { try { reader.close(); } catch (IOException e) { e.printStackTrace(); } } } }
[ "tfz9011@163.com" ]
tfz9011@163.com
fd79e211cb799a6a2f832dd3fd9fafea4a7d19c5
32694b2f5d99a5808416afc9552e779dc3c5aa6f
/JCGFranchise/src/bp/Flight.java
42945ae1d12d6b2b6315742b60af3c12f363bec5
[]
no_license
cbrookshire/JCGProject
2eaae9004f02737cdfb2cb97c0cfbd839b6c9e05
e3b42439d9ffbb51f6dd2f54374d80fd550b7981
refs/heads/master
2021-01-13T01:50:33.422390
2013-08-10T03:57:23
2013-08-10T03:57:23
11,042,478
0
1
null
null
null
null
UTF-8
Java
false
false
205
java
/* JCG Franchise Management System * CIST 2931 Summer Session 2013 GTC * Author: #Mahmoodur * Name: Flight * Description: Describes a flight */ package bp; public class Flight { }
[ "mahmoodbtr@gmail.com" ]
mahmoodbtr@gmail.com
ad31e305f2aed067b53c468cdb1fa8e013b7e19a
6adaa3042eb6f874b7c1dbf46de4add179de7e32
/science-party-fx/src/controller/MainController.java
125e861575f4c55c7a70603d3c6aba9d196db7fa
[]
no_license
s339696/science-party
7c69f811695725f9b77d718b90e8e189d469fd07
fc573cc2bd476809ac055e07c4dfe6175685a471
refs/heads/master
2020-12-10T15:44:10.773217
2016-03-29T23:56:17
2016-03-29T23:56:17
233,635,111
0
0
null
null
null
null
UTF-8
Java
false
false
4,474
java
package controller; import javafx.fxml.FXML; import javafx.fxml.FXMLLoader; import javafx.fxml.Initializable; import javafx.scene.Scene; import javafx.scene.control.*; import javafx.scene.layout.AnchorPane; import model.database.DatabaseConnect; import main.Main; import javax.xml.bind.annotation.adapters.HexBinaryAdapter; import java.io.IOException; import java.net.URL; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.util.ResourceBundle; /** * Created by Richard on 26.02.2016. */ public class MainController implements Initializable { /** * Declaration of the FXML elements. */ @FXML private AnchorPane LoginMainPage; @FXML private TextField LoginEmail; @FXML private PasswordField LoginPassword; @FXML private TextField LoginServer; @FXML private Button LoginButton; @FXML private TabPane mainTabPane; @FXML private SplitPane UserSplitPane; @FXML private SplitPane QuizSplitPane; @FXML private SplitPane QrSplitPane; @FXML private SplitPane StatisticSplitPane; @FXML private Tab UserTab; @FXML private Tab QuizTab; @FXML private Tab StatisticsTab; @FXML private Tab QrTab; @Override public void initialize(URL location, ResourceBundle resources) { } /** * Triggered if LoginButton gets pressed. * Checking of the typed in user data if it's valid. * If an error occurs a popup with a suitable message will be shown. * * @throws IOException */ public void checkLogin() throws IOException { String email = LoginEmail.getText(); String password = LoginPassword.getText(); String server = LoginServer.getText(); DatabaseConnect.setRecentUser(email, password); DatabaseConnect.setServerAddress(server); boolean connected = false; try { connected=DatabaseConnect.connectedToDatabase(); } catch (Exception e){ Main.showPopup("Keine Verbindung zum Server möglich!" + "\n" + "Bitte überprüfen Sie die Verbindung und die angegebene Adresse." ); } String loginCookie = DatabaseConnect.getLoginCookie(); System.out.println(loginCookie); if(connected && loginCookie!=null){ try { LoadMainWindow(); } catch (Exception e) { e.printStackTrace(); } } else{ Main.showPopup("Die Anmeldedaten sind ungültig!"); } } /** * Adding the tabs to the mainPane and Loading the content of the tabs. * * @throws IOException */ public void LoadMainWindow() throws IOException { mainTabPane = FXMLLoader.load(getClass().getResource("../view/gui_main.fxml")); //alle Loader für die einzelnen Tabs UserSplitPane = FXMLLoader.load(getClass().getResource("../view/gui_user.fxml")); QuizSplitPane = FXMLLoader.load(getClass().getResource("../view/gui_quiz.fxml")); StatisticSplitPane = FXMLLoader.load(getClass().getResource("../view/gui_statistic.fxml")); QrSplitPane = FXMLLoader.load(getClass().getResource("../view/gui_qr.fxml")); //FXML-Files als Inhalt der Tabs UserTab = new Tab("Benutzerdaten"); UserTab.setContent(UserSplitPane); QuizTab = new Tab("Quiz-Editor"); QuizTab.setContent(QuizSplitPane); StatisticsTab = new Tab("Statistik"); StatisticsTab.setContent(StatisticSplitPane); QrTab = new Tab("Perk-Editor"); QrTab.setContent(QrSplitPane); mainTabPane.getTabs().add(0,UserTab); mainTabPane.getTabs().add(1,QuizTab); mainTabPane.getTabs().add(2,StatisticsTab); mainTabPane.getTabs().add(3,QrTab); main.Main.mainStage.setScene(new Scene(mainTabPane)); } /** * Generates a MD5-String of an input string. * * @param string string is the base for generating the MD5-String * @return MD5-String */ public static String getMD5fromString(String string) { try { MessageDigest md5 = MessageDigest.getInstance("MD5"); return (new HexBinaryAdapter()).marshal(md5.digest(string.getBytes())); } catch (NoSuchAlgorithmException e) { return null; } } }
[ "richard.kluepfel@stud-mail.uni-wuerzburg.de" ]
richard.kluepfel@stud-mail.uni-wuerzburg.de
2535955aa0a3f0cd0c0828638736ace1bf94af48
757616ac871201dd33211d61c8f640e308d7cc2e
/src/Videos_Test/LifeExpectancy.java
d30e6faac2e971879f8eb93bfcf3961ddb346c90
[ "MIT" ]
permissive
rnlaigner/UCSDUnfoldingMaps
ef1dc7f501b30dad14d53d2e398dc2f4489d9d4a
34cb16d153ef307df6a0493c0d3aaf8ecf5c7d25
refs/heads/master
2021-01-19T06:09:45.415039
2016-07-09T04:00:00
2016-07-09T04:00:00
62,930,368
0
0
NOASSERTION
2019-06-06T13:11:45
2016-07-09T03:34:29
Java
UTF-8
Java
false
false
2,032
java
package Videos_Test; import java.util.HashMap; import java.util.List; import java.util.Map; import de.fhpotsdam.unfolding.UnfoldingMap; import de.fhpotsdam.unfolding.data.Feature; import de.fhpotsdam.unfolding.data.GeoJSONReader; import de.fhpotsdam.unfolding.marker.Marker; import de.fhpotsdam.unfolding.providers.Google; import de.fhpotsdam.unfolding.utils.MapUtils; import processing.core.PApplet; public class LifeExpectancy extends PApplet { /** * */ private static final long serialVersionUID = 1L; UnfoldingMap map; Map<String, Float> lifeExpByCountry; List<Feature> countries; List<Marker> countryMarkers; Map<String, Float> lifeExpMap; public void setup() { size(800,600,OPENGL); map = new UnfoldingMap(this, 50, 50, 700, 500, new Google.GoogleMapProvider()); MapUtils.createDefaultEventDispatcher(this, map); lifeExpByCountry = loadFileExpectancyFromCSV("data/LifeExpectancyWorldBank.csv"); countries = GeoJSONReader.loadData(this, "data/countries.geo.json"); countryMarkers = MapUtils.createSimpleMarkers( countries ); map.addMarkers(countryMarkers); lifeExpMap = lifeExpByCountry; shadeCountries(); } public void draw() { map.draw(); } private Map<String, Float> loadFileExpectancyFromCSV( final String fileName) { Map<String, Float> lifeExpMap = new HashMap<String, Float>(); String[] rows = loadStrings( fileName ); for ( String row : rows ) { String[] columns = row.split(","); if ( !columns[5].isEmpty() ) { float value = Float.parseFloat(columns[5]); lifeExpMap.put(columns[4], value); } } return lifeExpMap; } private void shadeCountries() { for ( Marker marker : countryMarkers ) { String countryId = marker.getId(); if ( lifeExpMap.containsKey(countryId)) { float lifeExp = lifeExpMap.get(countryId); int colorLevel = (int) map(lifeExp, 40, 90, 10, 255); marker.setColor(color(255-colorLevel, 100, colorLevel)); } else { marker.setColor(color(150,150,150)); } } } }
[ "rodrigolaigner@gmail.com" ]
rodrigolaigner@gmail.com
c6f6e7d07a845edb31cdf4bafc1c7b6b55ea0c13
f176546465d4efb183020d11cacff307d3be26fa
/baselib/src/main/java/com/fete/basemodel/commonwidget/NestListView.java
a536f609d0cf13e5ebaa2f849b66c69f7e240d00
[]
no_license
feteING/Common-master
4dbe3d64dcf1b53f390bed57eb6a48361eae9a50
6954f2bf9baf4b39cbe8b0d796d6585f6042ed80
refs/heads/master
2020-03-28T16:42:27.743677
2018-11-05T07:16:41
2018-11-05T07:16:41
148,720,546
1
0
null
null
null
null
UTF-8
Java
false
false
898
java
package com.fete.basemodel.commonwidget; import android.content.Context; import android.util.AttributeSet; import android.widget.ListView; /** * 解决滑动冲突的ListView */ public class NestListView extends ListView{ public NestListView(Context context) { super(context); } /** * @param context * @param attrs */ public NestListView(Context context, AttributeSet attrs) { super(context, attrs); } /** * @param context * @param attrs * @param defStyle */ public NestListView(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST); super.onMeasure(widthMeasureSpec, expandSpec); } }
[ "yfh@91jsgo.com" ]
yfh@91jsgo.com
fdb3ee96209302c09e74631c6d81de00292d03a6
9a0851b953d9be95f02c3fc4679b0dcdbe07c580
/src/com/clouway/jobex/client/submittedcvs/SubmittedCVsPlace.java
faf9f095391f5a302990ea48fd852dff44afa93c
[]
no_license
clouway/jobEx
f0683d5451cba0a51921b9993c1b8005858800f7
67e37576e44c6c8d25c4f0287c52142c515959be
refs/heads/master
2020-04-23T02:34:12.227254
2012-08-03T11:14:51
2012-08-03T11:14:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
684
java
package com.clouway.jobex.client.submittedcvs; import com.google.gwt.place.shared.Place; import com.google.gwt.place.shared.PlaceTokenizer; /** * @author Ivan Lazov <darkpain1989@gmail.com> */ public class SubmittedCVsPlace extends Place { private final Long jobId; public SubmittedCVsPlace(Long jobId) { this.jobId = jobId; } public Long getJobId() { return jobId; } public static class Tokenizer implements PlaceTokenizer<SubmittedCVsPlace> { public SubmittedCVsPlace getPlace(String token) { return new SubmittedCVsPlace(Long.valueOf(token)); } public String getToken(SubmittedCVsPlace place) { return "reviewCV"; } } }
[ "darkpain1989@gmail.com" ]
darkpain1989@gmail.com
3f19f2ddfb2224dfdfa5447fd8faba28ed63947c
043e1ac6ccdf8e0072e334f5b9ce03f4d45d95d7
/src/main/java/com/medecine/dby/dao/dbyMapper.java
5267c102ab3149787aae283d4a97ba626b64355f
[]
no_license
daiboyu2023/medecine
a556ee224f14fc431685a9d01d1f438f40398c0f
0c09e8c7b0b6cf44ad9ec9d55a0856e86223f2b1
refs/heads/master
2023-04-28T15:43:53.882093
2019-05-25T06:17:05
2019-05-25T06:17:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,005
java
package com.medecine.dby.dao; import java.util.List; import org.apache.ibatis.annotations.Mapper; import com.medecine.dby.pojo.drugPojo; import com.medecine.dby.pojo.loginPojo; import com.medecine.dby.pojo.userPojo; @Mapper public interface dbyMapper { //判断登录 userPojo getUser(userPojo u); //获取权限 userPojo getAuthority(userPojo u); //查询所有用户 List<userPojo> getUserAll(userPojo u); //查询总数 int getUserCount(userPojo u); //添加用户 int addUser(userPojo u); //获取要修改的员工信息 int update(userPojo u); //开除员工 int delete(userPojo u); //修改密码 int updatePwd(userPojo u); //查询库存提示 List<drugPojo> getTixing(); //查询库存提示总数 int getDrugCount(); //添加登录记录 int addLogin(userPojo u); //查询登录记录 List<loginPojo> getLogin(); //获取登录记录总数 int getLoginCount(); }
[ "195378992@qq.com" ]
195378992@qq.com
d8f2c8b457636f8ed1c82106f2085e16e0dad845
80d1f535ccba4f63682ae4d7061681bbbd2fa945
/ssm_boostrap/src/main/java/com/danhuang/crud/service/DepartmentService.java
99c44ddaf8bd9addec40368516f74723a27b2f43
[]
no_license
Godwithegg/ssm_project
91d720862cd62de108fa86993c221d4bdc35e5a0
0f62b562b04cda57746a16063da14bf3cfeb1486
refs/heads/master
2022-12-24T15:03:46.716029
2019-07-13T04:51:34
2019-07-13T04:51:34
175,216,602
0
0
null
2022-12-16T11:17:28
2019-03-12T13:25:39
JavaScript
UTF-8
Java
false
false
486
java
package com.danhuang.crud.service; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.danhuang.crud.bean.Department; import com.danhuang.crud.dao.DepartmentMapper; @Service public class DepartmentService { @Autowired private DepartmentMapper departmentMapper; public List<Department> getDepts(){ List<Department> list = departmentMapper.selectByExample(null); return list; } }
[ "675175647@qq.com" ]
675175647@qq.com
7aa186f186770f7c7fca189e2df524ba82e81c24
bcd1fc3eb382d56375bf4c8f14a5fafe3efea9dd
/src/test/java/in/spacex/repository/CustomAuditEventRepositoryIT.java
02913b4d8335b372da0c7f9c57b1beb2d1ed0cc3
[]
no_license
sureshputla/SpaceX
4f3153751acaadea7e26ec9b9231aeeee0f60ed0
5f622edc86c6418aa408fae4e83de27c1a28564f
refs/heads/master
2023-05-10T05:30:59.811221
2021-05-16T07:12:57
2021-05-16T07:12:57
231,739,070
0
0
null
2023-05-07T16:26:28
2020-01-04T09:32:08
Java
UTF-8
Java
false
false
7,515
java
package in.spacex.repository; import in.spacex.SpaceXApp; import in.spacex.config.Constants; import in.spacex.config.audit.AuditEventConverter; import in.spacex.domain.PersistentAuditEvent; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.actuate.audit.AuditEvent; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpSession; import org.springframework.security.web.authentication.WebAuthenticationDetails; import javax.servlet.http.HttpSession; import java.time.Instant; import java.time.temporal.ChronoUnit; import java.util.HashMap; import java.util.List; import java.util.Map; import static org.assertj.core.api.Assertions.assertThat; import static in.spacex.repository.CustomAuditEventRepository.EVENT_DATA_COLUMN_MAX_LENGTH; /** * Integration tests for {@link CustomAuditEventRepository}. */ @SpringBootTest(classes = SpaceXApp.class) public class CustomAuditEventRepositoryIT { @Autowired private PersistenceAuditEventRepository persistenceAuditEventRepository; @Autowired private AuditEventConverter auditEventConverter; private CustomAuditEventRepository customAuditEventRepository; private PersistentAuditEvent testUserEvent; private PersistentAuditEvent testOtherUserEvent; private PersistentAuditEvent testOldUserEvent; @BeforeEach public void setup() { customAuditEventRepository = new CustomAuditEventRepository(persistenceAuditEventRepository, auditEventConverter); persistenceAuditEventRepository.deleteAll(); Instant oneHourAgo = Instant.now().minusSeconds(3600); testUserEvent = new PersistentAuditEvent(); testUserEvent.setPrincipal("test-user"); testUserEvent.setAuditEventType("test-type"); testUserEvent.setAuditEventDate(oneHourAgo); Map<String, String> data = new HashMap<>(); data.put("test-key", "test-value"); testUserEvent.setData(data); testOldUserEvent = new PersistentAuditEvent(); testOldUserEvent.setPrincipal("test-user"); testOldUserEvent.setAuditEventType("test-type"); testOldUserEvent.setAuditEventDate(oneHourAgo.minusSeconds(10000)); testOtherUserEvent = new PersistentAuditEvent(); testOtherUserEvent.setPrincipal("other-test-user"); testOtherUserEvent.setAuditEventType("test-type"); testOtherUserEvent.setAuditEventDate(oneHourAgo); } @Test public void addAuditEvent() { Map<String, Object> data = new HashMap<>(); data.put("test-key", "test-value"); AuditEvent event = new AuditEvent("test-user", "test-type", data); customAuditEventRepository.add(event); List<PersistentAuditEvent> persistentAuditEvents = persistenceAuditEventRepository.findAll(); assertThat(persistentAuditEvents).hasSize(1); PersistentAuditEvent persistentAuditEvent = persistentAuditEvents.get(0); assertThat(persistentAuditEvent.getPrincipal()).isEqualTo(event.getPrincipal()); assertThat(persistentAuditEvent.getAuditEventType()).isEqualTo(event.getType()); assertThat(persistentAuditEvent.getData()).containsKey("test-key"); assertThat(persistentAuditEvent.getData().get("test-key")).isEqualTo("test-value"); assertThat(persistentAuditEvent.getAuditEventDate().truncatedTo(ChronoUnit.MILLIS)) .isEqualTo(event.getTimestamp().truncatedTo(ChronoUnit.MILLIS)); } @Test public void addAuditEventTruncateLargeData() { Map<String, Object> data = new HashMap<>(); StringBuilder largeData = new StringBuilder(); for (int i = 0; i < EVENT_DATA_COLUMN_MAX_LENGTH + 10; i++) { largeData.append("a"); } data.put("test-key", largeData); AuditEvent event = new AuditEvent("test-user", "test-type", data); customAuditEventRepository.add(event); List<PersistentAuditEvent> persistentAuditEvents = persistenceAuditEventRepository.findAll(); assertThat(persistentAuditEvents).hasSize(1); PersistentAuditEvent persistentAuditEvent = persistentAuditEvents.get(0); assertThat(persistentAuditEvent.getPrincipal()).isEqualTo(event.getPrincipal()); assertThat(persistentAuditEvent.getAuditEventType()).isEqualTo(event.getType()); assertThat(persistentAuditEvent.getData()).containsKey("test-key"); String actualData = persistentAuditEvent.getData().get("test-key"); assertThat(actualData.length()).isEqualTo(EVENT_DATA_COLUMN_MAX_LENGTH); assertThat(actualData).isSubstringOf(largeData); assertThat(persistentAuditEvent.getAuditEventDate().truncatedTo(ChronoUnit.MILLIS)) .isEqualTo(event.getTimestamp().truncatedTo(ChronoUnit.MILLIS)); } @Test public void testAddEventWithWebAuthenticationDetails() { HttpSession session = new MockHttpSession(null, "test-session-id"); MockHttpServletRequest request = new MockHttpServletRequest(); request.setSession(session); request.setRemoteAddr("1.2.3.4"); WebAuthenticationDetails details = new WebAuthenticationDetails(request); Map<String, Object> data = new HashMap<>(); data.put("test-key", details); AuditEvent event = new AuditEvent("test-user", "test-type", data); customAuditEventRepository.add(event); List<PersistentAuditEvent> persistentAuditEvents = persistenceAuditEventRepository.findAll(); assertThat(persistentAuditEvents).hasSize(1); PersistentAuditEvent persistentAuditEvent = persistentAuditEvents.get(0); assertThat(persistentAuditEvent.getData().get("remoteAddress")).isEqualTo("1.2.3.4"); assertThat(persistentAuditEvent.getData().get("sessionId")).isEqualTo("test-session-id"); } @Test public void testAddEventWithNullData() { Map<String, Object> data = new HashMap<>(); data.put("test-key", null); AuditEvent event = new AuditEvent("test-user", "test-type", data); customAuditEventRepository.add(event); List<PersistentAuditEvent> persistentAuditEvents = persistenceAuditEventRepository.findAll(); assertThat(persistentAuditEvents).hasSize(1); PersistentAuditEvent persistentAuditEvent = persistentAuditEvents.get(0); assertThat(persistentAuditEvent.getData().get("test-key")).isEqualTo("null"); } @Test public void addAuditEventWithAnonymousUser() { Map<String, Object> data = new HashMap<>(); data.put("test-key", "test-value"); AuditEvent event = new AuditEvent(Constants.ANONYMOUS_USER, "test-type", data); customAuditEventRepository.add(event); List<PersistentAuditEvent> persistentAuditEvents = persistenceAuditEventRepository.findAll(); assertThat(persistentAuditEvents).hasSize(0); } @Test public void addAuditEventWithAuthorizationFailureType() { Map<String, Object> data = new HashMap<>(); data.put("test-key", "test-value"); AuditEvent event = new AuditEvent("test-user", "AUTHORIZATION_FAILURE", data); customAuditEventRepository.add(event); List<PersistentAuditEvent> persistentAuditEvents = persistenceAuditEventRepository.findAll(); assertThat(persistentAuditEvents).hasSize(0); } }
[ "sureshqr@gmail.com" ]
sureshqr@gmail.com
ec37074f2541f68c56f3d66c9d5c04995d1bec0b
56552726e16c8e1525d3b228a0af8298a4c0bf48
/src/main/java/com/luizfoli/literarbff/config/jwt/JwtUtil.java
d073b003f6e409c2365b9d1ec1357a309206d1c7
[]
no_license
luizfoli/literar-bff
5f278302f7e95651be0822ee54cd8d550433466b
eec74e24625c4cab463288ab46f5f92ed714ea0b
refs/heads/master
2022-12-25T03:27:34.294538
2020-10-01T22:34:14
2020-10-01T22:34:14
297,159,026
0
0
null
null
null
null
UTF-8
Java
false
false
2,886
java
package com.luizfoli.literarbff.config.jwt; import com.luizfoli.literarbff.model.User; import com.luizfoli.literarbff.repository.UserRepository; import io.jsonwebtoken.Claims; import io.jsonwebtoken.JwtBuilder; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.SignatureAlgorithm; import org.springframework.beans.factory.annotation.Value; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.stereotype.Service; import javax.crypto.spec.SecretKeySpec; import javax.xml.bind.DatatypeConverter; import java.security.Key; import java.util.Date; import java.util.HashMap; import java.util.Map; import java.util.Optional; import java.util.function.Function; @Service public class JwtUtil { @Value("{jwt.secret}") private String secretKey; private int lifecyle = 1000 * 60 * 60 * 10; private UserRepository repository; public JwtUtil(UserRepository repository) { this.repository = repository; } public String generateToken(UserDetails userDetails) { Map<String, Object> claims = new HashMap<>(); return createToken(claims, userDetails.getUsername()); } /** * @param token * @return */ public String extractUsername(String token) { return extractClaim(token, Claims::getSubject); } /** * @param token * @return */ public Date extractExpiration(String token) { return extractClaim(token, Claims::getExpiration); } /** * @param token * @param claimsResolver * @param <T> * @return */ public <T> T extractClaim(String token, Function<Claims, T> claimsResolver) { final Claims claims = extractAllClaims(token); return claimsResolver.apply(claims); } private String createToken(Map<String, Object> claims, String username) { return Jwts.builder().setClaims(claims) .setSubject(username) .setIssuedAt(new Date(System.currentTimeMillis())) .setExpiration(new Date(System.currentTimeMillis() + lifecyle)) .signWith(SignatureAlgorithm.HS256, secretKey).compact(); } /** * @param token * @return */ private Claims extractAllClaims(String token) { return Jwts.parser().setSigningKey(secretKey).parseClaimsJws(token).getBody(); } /** * @param token * @return */ private Boolean isTokenExpired(String token) { return extractExpiration(token).before(new Date()); } /** * * @param token * @return */ public Boolean validateToken(String token, UserDetails userDetails) { String username = extractUsername(token); Boolean isEquals = username.equals(userDetails.getUsername()); return ( username.equals(userDetails.getUsername()) && !isTokenExpired(token)); } }
[ "oliveira.lfo@gmail.com" ]
oliveira.lfo@gmail.com
c76278204b3ea0c8381faafe302f24f13ab0bed9
8ba92cbe84cb5ad908beabe2236101d6a543610d
/src/cn/jsprun/dao/RatelogDao.java
715784faf1cd8d49e706529d1af0d9bc12c449cd
[]
no_license
gy0531/jsprun
6f9f9aa4b9d514d74b7b38160e66f9f5fbb6c82c
b350aab4296d3b18fda61528ba861ce03d61b7c3
refs/heads/master
2021-01-10T11:01:02.031292
2016-01-26T09:55:50
2016-01-26T09:55:50
50,401,072
2
1
null
null
null
null
UTF-8
Java
false
false
325
java
package cn.jsprun.dao; import java.util.List; import cn.jsprun.domain.Ratelog; public interface RatelogDao { public boolean insertRatelog(Ratelog ratelog); public boolean deleteRatelog(Ratelog ratelog); public List<Ratelog> getRatelogListByPid(List<Integer> pidList); public List<Ratelog> getRatelogByPid(Integer pid); }
[ "362406220@qq.com" ]
362406220@qq.com
aca1afad8fb7e0b48defea02ba76a61bc64d0896
25dd519674e88a826e2ae78e7998f43b98120c7a
/tiantong/src/main/java/com/tiantong/service/impl/AccountServiceImpl.java
3142e7a5b1a9751789bf2e19d258dd1f835218eb
[]
no_license
waterandwind/TianTong
e3517a303b5d99d78bab1fdf5161f4e16404c8bf
321e28fe43ca4cdea3bf1e839b936f24d6bed873
refs/heads/master
2022-07-17T09:55:04.251297
2020-04-13T00:08:30
2020-04-13T00:08:30
226,511,005
0
0
null
2022-06-17T02:58:22
2019-12-07T12:41:00
Java
UTF-8
Java
false
false
2,494
java
package com.tiantong.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.tiantong.config.Utils; import com.tiantong.mapper.AccountMapper; import com.tiantong.model.Account; import com.tiantong.service.IAccountService; import com.tiantong.service.ISongFromTableService; import com.tiantong.service.ISongerService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.Date; import java.util.HashMap; import java.util.Map; /** * <p> * 服务实现类 * </p> * * @author lls * @since 2020-03-13 */ @Service @Transactional(rollbackFor = Exception.class) public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> implements IAccountService { @Autowired AccountMapper accountMapper; @Autowired ISongFromTableService iSongFromTableService; @Autowired ISongerService songerService; @Override public Boolean createAccount(Account account) { account.setState(0); account.setPassword(Utils.getMD5(account.getPassword())); if (account.getType()==0){ account.setAccountName("TianTong_"+new Date().getTime()); }else if (account.getType()==1){ account.setAccountName("未审核歌手"); } boolean rs=save(account); QueryWrapper<Account> qw=new QueryWrapper<>(); qw.eq("account",account.getAccount()); account=accountMapper.selectOne(qw); if (account.getType()==0){ return iSongFromTableService.createDefaultForm(account); }else if (account.getType()==1){ account.setAccountName("未审核歌手"); return songerService.createDefaultInfo(account); } return false; } @Override public Boolean accountExist(Account account){ Map<String,Object> map= new HashMap<>(); map.put("account",account.getAccount()); if(accountMapper.selectByMap(map).size()>0){ return true; } return false; } @Override public Account login(Account account) { QueryWrapper<Account> qw=new QueryWrapper<>(); qw.eq("account",account.getAccount()); qw.eq("password",Utils.getMD5(account.getPassword())); Account rs=accountMapper.selectOne(qw); return rs; } }
[ "1126839066@qq.com" ]
1126839066@qq.com
65db5c3e9c126eefeee64dffc7b3223f078efa13
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/lingochamp--FileDownloader/6de097f757832344cc9099127e10b6159e23c696/before/FileDownloadListener.java
a36c9aad8ef43fed349ed51bb65eeec65ee13477
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
8,062
java
/* * Copyright (c) 2015 LingoChamp Inc. * * 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.liulishuo.filedownloader; import com.liulishuo.filedownloader.event.IDownloadEvent; import com.liulishuo.filedownloader.event.IDownloadListener; import com.liulishuo.filedownloader.model.FileDownloadStatus; import com.liulishuo.filedownloader.util.FileDownloadLog; /** * Created by Jacksgong on 9/7/15. * <p/> * normal chain {@link #pending} -> {@link #connected} -> {@link #progress} -> {@link #blockComplete} -> {@link #completed} * may final width {@link #paused}/{@link #completed}/{@link #error}/{@link #warn} * if reuse just {@link #blockComplete} ->{@link #completed} * * @see FileDownloadLargeFileListener */ public abstract class FileDownloadListener extends IDownloadListener { public FileDownloadListener() { } /** * @param priority not handle priority any more * @see #FileDownloadListener() * @deprecated not handle priority any more */ public FileDownloadListener(int priority) { FileDownloadLog.w(this, "not handle priority any more"); } @Override public boolean callback(IDownloadEvent event) { if (!(event instanceof FileDownloadEvent)) { return false; } final FileDownloadEvent downloaderEvent = ((FileDownloadEvent) event); switch (downloaderEvent.getStatus()) { case FileDownloadStatus.pending: pending(downloaderEvent.getDownloader(), downloaderEvent.getDownloader().getSmallFileSoFarBytes(), downloaderEvent.getDownloader().getSmallFileTotalBytes()); break; case FileDownloadStatus.started: started(downloaderEvent.getDownloader()); break; case FileDownloadStatus.connected: connected(downloaderEvent.getDownloader(), downloaderEvent.getDownloader().getEtag(), downloaderEvent.getDownloader().isResuming(), downloaderEvent.getDownloader().getSmallFileSoFarBytes(), downloaderEvent.getDownloader().getSmallFileTotalBytes()); break; case FileDownloadStatus.progress: progress(downloaderEvent.getDownloader(), downloaderEvent.getDownloader().getSmallFileSoFarBytes(), downloaderEvent.getDownloader().getSmallFileTotalBytes()); break; case FileDownloadStatus.blockComplete: blockComplete(downloaderEvent.getDownloader()); break; case FileDownloadStatus.retry: retry(downloaderEvent.getDownloader(), downloaderEvent.getDownloader().getEx(), downloaderEvent.getDownloader().getRetryingTimes(), downloaderEvent.getDownloader().getSmallFileSoFarBytes()); break; case FileDownloadStatus.completed: completed(downloaderEvent.getDownloader()); break; case FileDownloadStatus.error: error(downloaderEvent.getDownloader(), downloaderEvent.getDownloader().getEx()); break; case FileDownloadStatus.paused: paused(downloaderEvent.getDownloader(), downloaderEvent.getDownloader().getSmallFileSoFarBytes(), downloaderEvent.getDownloader().getSmallFileTotalBytes()); break; case FileDownloadStatus.warn: // already same url & path in pending/running list warn(downloaderEvent.getDownloader()); break; } return false; } /** * Enqueue, and pending * * @param task Current task * @param soFarBytes Already downloaded bytes stored in the db * @param totalBytes Total bytes stored in the db * @see IFileDownloadMessage#notifyPending() */ protected abstract void pending(final BaseDownloadTask task, final int soFarBytes, final int totalBytes); /** * Finish pending, and start the download runnable. * * @param task Current task. * @see IFileDownloadMessage#notifyStarted() */ protected void started(final BaseDownloadTask task) { } /** * Connected * * @param task Current task * @param etag ETag * @param isContinue Is resume from breakpoint * @param soFarBytes Number of bytes download so far * @param totalBytes Total size of the download in bytes * @see IFileDownloadMessage#notifyConnected() */ protected void connected(final BaseDownloadTask task, final String etag, final boolean isContinue, final int soFarBytes, final int totalBytes) { } /** * Fetching datum and Writing to local disk. * * @param task Current task * @param soFarBytes Number of bytes download so far * @param totalBytes Total size of the download in bytes * @see IFileDownloadMessage#notifyProgress() */ protected abstract void progress(final BaseDownloadTask task, final int soFarBytes, final int totalBytes); /** * Block completed in new thread * * @param task Current task * @see IFileDownloadMessage#notifyBlockComplete() */ protected abstract void blockComplete(final BaseDownloadTask task); /** * Occur a exception and has chance{@link BaseDownloadTask#setAutoRetryTimes(int)} to retry and * start Retry * * @param task Current task * @param ex why retry * @param retryingTimes How many times will retry * @param soFarBytes Number of bytes download so far * @see IFileDownloadMessage#notifyRetry() */ protected void retry(final BaseDownloadTask task, final Throwable ex, final int retryingTimes, final int soFarBytes) { } // final width below methods /** * Succeed download * * @param task Current task * @see IFileDownloadMessage#notifyCompleted() */ protected abstract void completed(final BaseDownloadTask task); /** * Download paused * * @param task Current task * @param soFarBytes Number of bytes download so far * @param totalBytes Total size of the download in bytes * @see IFileDownloadMessage#notifyPaused() */ protected abstract void paused(final BaseDownloadTask task, final int soFarBytes, final int totalBytes); /** * Download error * * @param task Current task * @param e Any throwable on download pipeline * @see IFileDownloadMessage#notifyError() * @see com.liulishuo.filedownloader.exception.FileDownloadHttpException * @see com.liulishuo.filedownloader.exception.FileDownloadGiveUpRetryException * @see com.liulishuo.filedownloader.exception.FileDownloadOutOfSpaceException */ protected abstract void error(final BaseDownloadTask task, final Throwable e); /** * There is already an identical task being downloaded * * @param task Current task * @see IFileDownloadMessage#notifyWarn() */ protected abstract void warn(final BaseDownloadTask task); }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
65b22e7ebbb27a95baf7ada691c8eab28f2d46a5
b6308472688e2f53a963d46b8266c0b55fc7618a
/method/L1Regularizer.java
6b863026c4bf8503864a28b403dcb09bdea2d714
[]
no_license
qian2015/feains-oracle
298dc0d864780fd81c8f3f1bb55e152d7bc47c77
4b1276d99daaea50dae1b19669c7974206e0a9cb
refs/heads/master
2021-01-10T04:49:53.251216
2015-11-13T04:19:21
2015-11-13T04:19:21
46,099,438
1
0
null
null
null
null
UTF-8
Java
false
false
1,462
java
/* * LensKit, an open source recommender systems toolkit. * Copyright 2010-2013 Regents of the University of Minnesota and contributors * Work on LensKit has been funded by the National Science Foundation under * grants IIS 05-34939, 08-08692, 08-12148, and 10-17697. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along with * this program; if not, write to the Free Software Foundation, Inc., 51 * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ package org.grouplens.lenskit.opt; /** * @author <a href="http://www.grouplens.org">GroupLens Research</a> */ public class L1Regularizer { public double getValue(double var) { return Math.abs(var); } public double getSubGradient(double var) { if (var > 0) { return 1; } else if (var < 0) { return -1; } else { return 0; //sub gradient: any one in [-1, 1] } } }
[ "zhaox331@umn.edu" ]
zhaox331@umn.edu
d641cff6b951996167f97220f2941adc743911cc
9571a872c0a7c3f56b93bacf8da4d19e36fb3664
/src/test/java/com/oauth/service/AuthenticationServiceApplicationTests.java
a8e7f4759adf9ceb3960598b0ba4dbc910715917
[]
no_license
isaachambers/AuthenticationService
1a6a279703097a737e50ee996e79cc5631e247c4
45769a697708f6ec7befa05297b21c9849a05565
refs/heads/master
2020-05-02T22:01:30.713587
2019-03-28T16:52:51
2019-03-28T16:52:51
178,238,716
0
0
null
null
null
null
UTF-8
Java
false
false
349
java
package com.oauth.service; 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 AuthenticationServiceApplicationTests { @Test public void contextLoads() { } }
[ "isaaceduardk@gmail.com" ]
isaaceduardk@gmail.com
5bd85b587a0f92d78f0ed66ff6738a6afe27279e
f102d29a014b150e029378bfe573438d82cd88f4
/src/main/java/tech/shali/oauth2server/dao/base/BaseRepositoryImpl.java
07bd36f20b412c9b26d35f3501a3a6c0c9c38d0d
[]
no_license
wensimin/oauth2-server
6f0fdf5edec52c6b4aac4ed86deedcab1cb2aa8d
3d24bb5167a43c2f1ccdc8219fca4f0c232dee97
refs/heads/master
2021-05-06T02:42:30.193759
2017-12-18T16:36:42
2017-12-18T16:36:42
114,663,375
0
0
null
null
null
null
UTF-8
Java
false
false
5,768
java
package tech.shali.oauth2server.dao.base; import org.hibernate.annotations.Fetch; import org.hibernate.annotations.FetchMode; import org.springframework.data.domain.Sort; import org.springframework.data.jpa.domain.Specification; import org.springframework.data.jpa.repository.query.QueryUtils; import org.springframework.data.jpa.repository.support.JpaEntityInformation; import org.springframework.data.jpa.repository.support.SimpleJpaRepository; import org.springframework.util.Assert; import javax.persistence.EntityManager; import javax.persistence.FetchType; import javax.persistence.LockModeType; import javax.persistence.ManyToOne; import javax.persistence.OneToOne; import javax.persistence.Query; import javax.persistence.TypedQuery; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.FetchParent; import javax.persistence.criteria.Join; import javax.persistence.criteria.JoinType; import javax.persistence.criteria.Predicate; import javax.persistence.criteria.Root; import java.io.Serializable; import java.lang.reflect.Field; import java.util.HashMap; import java.util.Map; /** * 基础存储库 * * @param <T> * @param <ID> * @author wensimin */ public class BaseRepositoryImpl<T, ID extends Serializable> extends SimpleJpaRepository<T, ID> { private final EntityManager em; protected JpaEntityInformation<T, ?> entityInformation; public BaseRepositoryImpl(JpaEntityInformation<T, ?> entityInformation, EntityManager entityManager) { super(entityInformation, entityManager); this.em = entityManager; this.entityInformation = entityInformation; } @Override protected <S extends T> TypedQuery<S> getQuery(Specification<S> spec, Class<S> domainClass, Sort sort) { CriteriaBuilder builder = em.getCriteriaBuilder(); CriteriaQuery<S> query = builder.createQuery(domainClass); Root<S> root = applySpecificationToCriteria(spec, domainClass, query); query.select(root); applyFetchMode(root); if (sort != null) { query.orderBy(QueryUtils.toOrders(sort, root, builder)); } return applyRepositoryMethodMetadata(em.createQuery(query)); } /** * 关联map */ private Map<String, Join<?, ?>> joinCache; private void applyFetchMode(Root<? extends T> root) { joinCache = new HashMap<>(); applyFetchMode(root, getDomainClass(), ""); } /** * 应用fetch mode * * @param root root * @param clazz 字段类型 * @param path 路径 */ private void applyFetchMode(FetchParent<?, ?> root, Class<?> clazz, String path) { for (Field field : clazz.getDeclaredFields()) { Fetch fetch = field.getAnnotation(Fetch.class); // 如果 fetch未显式指定,则按照eager的默认设置来进行join if (fetch == null) { ManyToOne manyToOne = field.getAnnotation(ManyToOne.class); OneToOne oneToOne = field.getAnnotation(OneToOne.class); boolean manyToOneEager = manyToOne != null && manyToOne.fetch() == FetchType.EAGER; boolean oneToOneEager = oneToOne != null && oneToOne.fetch() == FetchType.EAGER; if (manyToOneEager || oneToOneEager) { applyFetchMode(root, path, field, !field.getType().equals(clazz)); } } else if (fetch.value() == FetchMode.JOIN) { applyFetchMode(root, path, field, !field.getType().equals(clazz)); } } } private void applyFetchMode(FetchParent<?, ?> root, String path, Field field, boolean recursive) { FetchParent<?, ?> descent = root.fetch(field.getName(), JoinType.LEFT); String fieldPath = path + "." + field.getName(); joinCache.put(path, (Join<?, ?>) descent); if (recursive) { applyFetchMode(descent, field.getType(), fieldPath); } } /** * Applies the given {@link Specification} to the given * {@link CriteriaQuery}. * * @param spec can be {@literal null}. * @param domainClass must not be {@literal null}. * @param query must not be {@literal null}. * @return root */ private <S, U extends T> Root<U> applySpecificationToCriteria(Specification<U> spec, Class<U> domainClass, CriteriaQuery<S> query) { Assert.notNull(domainClass, "Domain class must not be null!"); Assert.notNull(query, "CriteriaQuery must not be null!"); Root<U> root = query.from(domainClass); if (spec == null) { return root; } CriteriaBuilder builder = em.getCriteriaBuilder(); Predicate predicate = spec.toPredicate(root, query, builder); if (predicate != null) { query.where(predicate); } return root; } private <S> TypedQuery<S> applyRepositoryMethodMetadata(TypedQuery<S> query) { if (getRepositoryMethodMetadata() == null) { return query; } LockModeType type = getRepositoryMethodMetadata().getLockModeType(); TypedQuery<S> toReturn = type == null ? query : query.setLockMode(type); applyQueryHints(toReturn); return toReturn; } private void applyQueryHints(Query query) { for (Map.Entry<String, Object> hint : getQueryHints().entrySet()) { query.setHint(hint.getKey(), hint.getValue()); } } public Class<T> getEntityType() { return entityInformation.getJavaType(); } public EntityManager getEm() { return em; } }
[ "hukaizhiyu2@gmail.com" ]
hukaizhiyu2@gmail.com
67c6c6f5f22360cb5918ff375d8a4c9bad022986
a01062310314e63611b7a2f285c33a322ec21764
/app/src/test/java/com/example/user/linerlayout_clarissa/ExampleUnitTest.java
43f2364f01cdcc43b6c688425a0f8d796a3487d6
[]
no_license
ClarissaSanindita/LinearLayout
6e8981083d51ef2ae71079a97b4ef8943328f10a
054ddad818ab04cfefa9283d8ff0ab596c0b2ffa
refs/heads/master
2020-05-03T23:42:42.357594
2019-04-03T11:40:37
2019-04-03T11:40:37
178,870,813
0
0
null
null
null
null
UTF-8
Java
false
false
398
java
package com.example.user.linerlayout_clarissa; 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); } }
[ "clarissa_sanindita_26rpl@student.smktelkom-mlg.sch.id" ]
clarissa_sanindita_26rpl@student.smktelkom-mlg.sch.id
ade0bf23f2b44a2b60f1f43afec673d5e86f83d4
0febbf7f7082491b1a4d9f429a684c8acdfffe69
/UserView.java
624d7e9d3cf0959d2c1ea7c7900470853a25eb2e
[]
no_license
bitN/CS356Project2MiniTwitter
c91e2525fefb93abd1eac3083199d3ce1e372125
822a26e971f44a4f2dadbe8c863233af41eebb44
refs/heads/master
2021-01-22T07:10:41.897842
2015-08-25T15:00:18
2015-08-25T15:00:18
41,369,909
0
0
null
null
null
null
UTF-8
Java
false
false
3,136
java
import java.awt.BorderLayout; import java.awt.FlowLayout; import java.awt.event.ActionEvent; import java.util.ArrayList; import java.util.HashMap; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JScrollPane; import javax.swing.JTextArea; import javax.swing.JTree; import javax.swing.tree.DefaultMutableTreeNode; import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.SwingUtilities; import javax.swing.tree.*; import java.lang.*; import java.util.*; public class UserView implements View { //declaration of global variables //JLabel display = new JLabel("0", JLabel.RIGHT); private JFrame uView = new JFrame("User View"); //list View Current Following //List View News Feed private JTextArea usrID = new JTextArea("User ID"); private JTextArea tweetText = new JTextArea("Tweet Message"); private JButton followUser = new JButton("Follow User"); private JButton postTweet = new JButton("Post Tweet"); private ArrayList<User> followings = new ArrayList<User>(); private ListView curFollowings = new ListView("Currently Following"); private ListView newsFeed = new ListView("News Feed"); //argh //String uID //private MiniTwitterFeed uFeed public UserView() { //Add action listeners. followUser.addActionListener(this); postTweet.addActionListener(this); //Specify FlowLayout for the layout manager. uView.getContentPane().setLayout(new FlowLayout()); //Give the frame an initial size. uView.setSize(500, 500); //Terminate the program when the user closes the application. uView.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //add the Label and buttons uView.add(BorderLayout.NORTH, usrID); uView.add(BorderLayout.NORTH, followUser); //CurrentFollowingList (CENTER_ uView.add(BorderLayout.CENTER, curFollowings.getListPane()); uView.add(BorderLayout.SOUTH, tweetText); uView.add(BorderLayout.SOUTH, postTweet); //NewsFeedList View uView.add(BorderLayout.SOUTH, newsFeed.getListPane()); //uView.add(BorderLayout.SOUTH, showMsgTotal); //set the default button //uView.getRootPane().setDefaultButton(usrView); //center the frame uView.setLocationRelativeTo(null); //don't exit the whole program when a single userView is closed uView.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); //Display the frame uView.setVisible(true); } public void followUser(String uID){ curFollowings.addEntry(uID); } public void postTweet(String tweet){ //post Name: Tweet } @Override public void actionPerformed(ActionEvent ae) { if (ae.getActionCommand().equals("Follow User")) { followUser(usrID.getText()); } else { if (ae.getActionCommand().equals("Post Tweet")) { postTweet(tweetText.getText()); } } uView.revalidate(); uView.repaint(); } }
[ "alexanderthesomeone@yahoo.com" ]
alexanderthesomeone@yahoo.com
c0ba92c6c782bd30f8b00458c80f9100ef76b442
9410ef0fbb317ace552b6f0a91e0b847a9a841da
/src/main/java/com/tencentcloudapi/cls/v20201016/models/GetAlarmLogRequest.java
841258c54a0a19030870403e77689d2e1c709490
[ "Apache-2.0" ]
permissive
TencentCloud/tencentcloud-sdk-java-intl-en
274de822748bdb9b4077e3b796413834b05f1713
6ca868a8de6803a6c9f51af7293d5e6dad575db6
refs/heads/master
2023-09-04T05:18:35.048202
2023-09-01T04:04:14
2023-09-01T04:04:14
230,567,388
7
4
Apache-2.0
2022-05-25T06:54:45
2019-12-28T06:13:51
Java
UTF-8
Java
false
false
8,598
java
/* * Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. 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. * 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.tencentcloudapi.cls.v20201016.models; import com.tencentcloudapi.common.AbstractModel; import com.google.gson.annotations.SerializedName; import com.google.gson.annotations.Expose; import java.util.HashMap; public class GetAlarmLogRequest extends AbstractModel{ /** * Start time of the log to be queried, which is a Unix timestamp in milliseconds */ @SerializedName("From") @Expose private Long From; /** * End time of the log to be queried, which is a Unix timestamp in milliseconds */ @SerializedName("To") @Expose private Long To; /** * Query statement. Maximum length: 1024 */ @SerializedName("Query") @Expose private String Query; /** * Number of logs returned in a single query. Maximum value: 1000 */ @SerializedName("Limit") @Expose private Long Limit; /** * This field is used to load more logs. Pass through the last `Context` value returned to get more log content. */ @SerializedName("Context") @Expose private String Context; /** * Order of the logs sorted by time returned by the log API. Valid values: `asc`: ascending; `desc`: descending. Default value: `desc` */ @SerializedName("Sort") @Expose private String Sort; /** * If the value is `true`, the new search method will be used, and the response parameters `AnalysisRecords` and `Columns` will be valid. If the value is `false`, the old search method will be used, and `AnalysisResults` and `ColNames` will be valid. */ @SerializedName("UseNewAnalysis") @Expose private Boolean UseNewAnalysis; /** * Get Start time of the log to be queried, which is a Unix timestamp in milliseconds * @return From Start time of the log to be queried, which is a Unix timestamp in milliseconds */ public Long getFrom() { return this.From; } /** * Set Start time of the log to be queried, which is a Unix timestamp in milliseconds * @param From Start time of the log to be queried, which is a Unix timestamp in milliseconds */ public void setFrom(Long From) { this.From = From; } /** * Get End time of the log to be queried, which is a Unix timestamp in milliseconds * @return To End time of the log to be queried, which is a Unix timestamp in milliseconds */ public Long getTo() { return this.To; } /** * Set End time of the log to be queried, which is a Unix timestamp in milliseconds * @param To End time of the log to be queried, which is a Unix timestamp in milliseconds */ public void setTo(Long To) { this.To = To; } /** * Get Query statement. Maximum length: 1024 * @return Query Query statement. Maximum length: 1024 */ public String getQuery() { return this.Query; } /** * Set Query statement. Maximum length: 1024 * @param Query Query statement. Maximum length: 1024 */ public void setQuery(String Query) { this.Query = Query; } /** * Get Number of logs returned in a single query. Maximum value: 1000 * @return Limit Number of logs returned in a single query. Maximum value: 1000 */ public Long getLimit() { return this.Limit; } /** * Set Number of logs returned in a single query. Maximum value: 1000 * @param Limit Number of logs returned in a single query. Maximum value: 1000 */ public void setLimit(Long Limit) { this.Limit = Limit; } /** * Get This field is used to load more logs. Pass through the last `Context` value returned to get more log content. * @return Context This field is used to load more logs. Pass through the last `Context` value returned to get more log content. */ public String getContext() { return this.Context; } /** * Set This field is used to load more logs. Pass through the last `Context` value returned to get more log content. * @param Context This field is used to load more logs. Pass through the last `Context` value returned to get more log content. */ public void setContext(String Context) { this.Context = Context; } /** * Get Order of the logs sorted by time returned by the log API. Valid values: `asc`: ascending; `desc`: descending. Default value: `desc` * @return Sort Order of the logs sorted by time returned by the log API. Valid values: `asc`: ascending; `desc`: descending. Default value: `desc` */ public String getSort() { return this.Sort; } /** * Set Order of the logs sorted by time returned by the log API. Valid values: `asc`: ascending; `desc`: descending. Default value: `desc` * @param Sort Order of the logs sorted by time returned by the log API. Valid values: `asc`: ascending; `desc`: descending. Default value: `desc` */ public void setSort(String Sort) { this.Sort = Sort; } /** * Get If the value is `true`, the new search method will be used, and the response parameters `AnalysisRecords` and `Columns` will be valid. If the value is `false`, the old search method will be used, and `AnalysisResults` and `ColNames` will be valid. * @return UseNewAnalysis If the value is `true`, the new search method will be used, and the response parameters `AnalysisRecords` and `Columns` will be valid. If the value is `false`, the old search method will be used, and `AnalysisResults` and `ColNames` will be valid. */ public Boolean getUseNewAnalysis() { return this.UseNewAnalysis; } /** * Set If the value is `true`, the new search method will be used, and the response parameters `AnalysisRecords` and `Columns` will be valid. If the value is `false`, the old search method will be used, and `AnalysisResults` and `ColNames` will be valid. * @param UseNewAnalysis If the value is `true`, the new search method will be used, and the response parameters `AnalysisRecords` and `Columns` will be valid. If the value is `false`, the old search method will be used, and `AnalysisResults` and `ColNames` will be valid. */ public void setUseNewAnalysis(Boolean UseNewAnalysis) { this.UseNewAnalysis = UseNewAnalysis; } public GetAlarmLogRequest() { } /** * NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy, * and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy. */ public GetAlarmLogRequest(GetAlarmLogRequest source) { if (source.From != null) { this.From = new Long(source.From); } if (source.To != null) { this.To = new Long(source.To); } if (source.Query != null) { this.Query = new String(source.Query); } if (source.Limit != null) { this.Limit = new Long(source.Limit); } if (source.Context != null) { this.Context = new String(source.Context); } if (source.Sort != null) { this.Sort = new String(source.Sort); } if (source.UseNewAnalysis != null) { this.UseNewAnalysis = new Boolean(source.UseNewAnalysis); } } /** * Internal implementation, normal users should not use it. */ public void toMap(HashMap<String, String> map, String prefix) { this.setParamSimple(map, prefix + "From", this.From); this.setParamSimple(map, prefix + "To", this.To); this.setParamSimple(map, prefix + "Query", this.Query); this.setParamSimple(map, prefix + "Limit", this.Limit); this.setParamSimple(map, prefix + "Context", this.Context); this.setParamSimple(map, prefix + "Sort", this.Sort); this.setParamSimple(map, prefix + "UseNewAnalysis", this.UseNewAnalysis); } }
[ "tencentcloudapi@tencent.com" ]
tencentcloudapi@tencent.com