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
edd5c56cdf61cf27ed1211884d53571195e62584
9a6ab7f872b3ea205523bbb798361377b9cdd3de
/U1M2SummativeMuratSurenler/CalculatorObject/src/main/java/Main.java
06e580df5066705a70e3ea6866531df1dbb9b8ad
[]
no_license
surmurat/JavaBootCamp
f5121c8b79a192e6ff8b3be89764c862af2c9520
f7ddcf2f151915f963d18922a0b4b3ac84cf1a01
refs/heads/master
2022-01-18T12:13:09.692264
2019-08-09T03:48:57
2019-08-09T03:48:57
189,094,659
0
0
null
null
null
null
UTF-8
Java
false
false
525
java
public class Main { public static void main(String[] args) { Calculator calc = new Calculator(); System.out.println(calc.add(1,1)); System.out.println(calc.subtract(23,52)); System.out.println(calc.multiply(34,2)); System.out.println(calc.divide(12,3)); System.out.println(calc.add(3.4,2.3)); System.out.println(calc.subtract(6.7,4.4)); System.out.println(calc.multiply(5.5,0.5)); System.out.println(calc.divide(10.8,2.2)); } }
[ "mrtsrnlr@gmail.com" ]
mrtsrnlr@gmail.com
983e849854a5df3f211c55412c91bbe609e724dd
eb3d720ddd5e2fb8dfa1618d233a4f490d3353a3
/FoodFriends-Android/app/src/main/java/com/vteam/foodfriends/data/remote/api/Client.java
4910367192e9084eb56cb5b9089954f7bcabd1ca
[]
no_license
FPTUHackathon/VTeam
965492b2c7757b880bdbc07590ae0c371ae5a28c
9198104a4b0fde638d2accb9b027cbe51a1624af
refs/heads/master
2021-08-23T04:13:42.261884
2017-12-03T07:07:10
2017-12-03T07:07:10
112,749,821
0
0
null
null
null
null
UTF-8
Java
false
false
1,864
java
package com.vteam.foodfriends.data.remote.api; import android.content.Context; import android.util.Log; import com.vteam.foodfriends.BuildConfig; import java.io.IOException; import okhttp3.Interceptor; import okhttp3.OkHttpClient; import okhttp3.Request; import okhttp3.Response; import okhttp3.logging.HttpLoggingInterceptor; import retrofit2.Retrofit; import retrofit2.converter.gson.GsonConverterFactory; /** * Created by phuongbka on 12/2/17. */ public class Client { private static Retrofit retrofit; private static Client instance; public static Client getInstance(Context context){ if(instance == null){ instance = new Client(context); } return instance; } private Client(Context context){ OkHttpClient.Builder httpClientBuilder = new OkHttpClient.Builder().addInterceptor(new Interceptor() { @Override public Response intercept(Chain chain) throws IOException { Request request = chain.request(); Request.Builder builder = request.newBuilder(); builder.header("X-Requested-With","XMLHttpRequest"); Request newRequest = builder.build(); return chain.proceed(newRequest); } }); if(BuildConfig.DEBUG){ HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(); loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY); httpClientBuilder.addInterceptor(loggingInterceptor); } retrofit = new Retrofit.Builder() .baseUrl("https://www.foody.vn/") .addConverterFactory(GsonConverterFactory.create()).callFactory(httpClientBuilder.build()).build(); } public <T> T create (final Class<T> service){ return retrofit.create(service); } }
[ "dacsang97@gmail.com" ]
dacsang97@gmail.com
700ba9d2fa896e6e8dff5ab0b153bb5dde17cc5a
aae5cfadd1a75e650d6931ad14243ca633ae6dbd
/app/src/test/java/com/example/administrator/study/ExampleUnitTest.java
400dd35a466d56e0690af1e40664e83f8a907f36
[]
no_license
GeJieZhang/opencv_face
c1443539573a748eeaad624008a3c31bed9392b4
fb311974ac5e9f4d3e25b048f7836172bfd3ac6e
refs/heads/master
2020-04-08T23:11:40.426909
2018-11-30T11:45:50
2018-11-30T11:45:50
159,815,154
0
0
null
null
null
null
UTF-8
Java
false
false
392
java
package com.example.administrator.study; 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); } }
[ "1241577948@qq.com" ]
1241577948@qq.com
86667901a349e27c1f671af342390a22907e7761
13ce949fa7815572e20b03c9fc1028b82246a297
/src/main/java/com/example/demo/SpringbootQuartJobApplication.java
b985506dc3df903835695e9756408b4e5cd5b2c7
[]
no_license
17310608510/springboot-quart-job
ad04e6c529ae898d0c23963c623fe4b36cf977b3
bb45f7d601c62b57a731590c6fdf6e9ae23f18d3
refs/heads/master
2023-01-06T23:41:45.462591
2020-11-11T07:54:08
2020-11-11T07:54:08
311,901,027
0
0
null
null
null
null
UTF-8
Java
false
false
333
java
package com.example.demo; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class SpringbootQuartJobApplication { public static void main(String[] args) { SpringApplication.run(SpringbootQuartJobApplication.class, args); } }
[ "18832027535@163.com" ]
18832027535@163.com
de8ac2b70cd7426bd6a666234182470664e4cc7b
2650d565255cf7f5c0192599cb69650aba91fdb8
/java/src/test/java/com/ciaoshen/leetcode/most_common_word/Tester.java
196f84531536032820a48f75cb8bf3ba483d89c9
[ "MIT" ]
permissive
helloShen/leetcode
78ded31b16cfc0ca4d0618d90bb0ef3a8b10377a
5bba26f0612d785800c990947db8dae3af4bad81
refs/heads/master
2021-06-03T14:44:57.256143
2019-04-06T19:06:15
2019-04-06T19:06:15
96,709,063
1
0
null
null
null
null
UTF-8
Java
false
false
1,093
java
/** * Leetcode - most_common_word */ package com.ciaoshen.leetcode.most_common_word; /** basic util */ import java.util.*; import com.ciaoshen.leetcode.util.*; /** JUnit */ import static org.junit.Assert.*; import org.junit.Before; import org.junit.Test; /** slf4j */ import org.slf4j.impl.StaticLoggerBinder; import org.slf4j.LoggerFactory; /** commons-lang3 */ import org.apache.commons.lang3.StringUtils; public class Tester { public Tester() { // solution = new Solution1(); solution = new Solution2(); } @Test public void mostCommonWordTest() { String paragraph = "Bob hit a ball, the hit BALL flew far after it was hit."; String[] banned = new String[]{"hit"}; String answer = "ball"; String result = solution.mostCommonWord(paragraph, banned); System.out.println("Result = " + result); assertEquals(answer, result); System.out.println("mostCommonWord() method pass unit test!"); } /**==================== 【 private 】 =========================*/ private Solution solution; }
[ "symantec__@hotmail.com" ]
symantec__@hotmail.com
7beacaf316e23881159e7b50544f862856d09e84
a30d88e36413f4ff726418bc701882aa1acf348b
/src/main/java/de/gedoplan/model/Address.java
0eb15aff61f1037bcd304ff924d846d094f9e17a
[]
no_license
GEDOPLAN/graphql-example
6de4ec65b1dbe56ef5d1f4bf806c989e4e3ccd6e
e8c8ee7c6483b4e839168dcb4d8fb8c06095fdc1
refs/heads/master
2020-05-05T04:57:40.381723
2019-04-05T18:26:52
2019-04-05T18:26:52
179,732,161
0
0
null
null
null
null
UTF-8
Java
false
false
787
java
package de.gedoplan.model; import javax.persistence.Embeddable; @Embeddable public class Address { private String street; private String streetNumber; private String zip; private String city; public String getStreet() { return street; } public void setStreet(String street) { this.street = street; } public String getStreetNumber() { return streetNumber; } public void setStreetNumber(String streetNumber) { this.streetNumber = streetNumber; } public String getZip() { return zip; } public void setZip(String zip) { this.zip = zip; } public String getCity() { return city; } public void setCity(String city) { this.city = city; } }
[ "alexander.kittelmann@gmx.de" ]
alexander.kittelmann@gmx.de
b51f7d4b4d6ef13ded85e273614103931da7c404
521f660bc8634a04e861e6273e72e3a8ad213860
/src/main/java/com/nuxplanet/mongodb/web/rest/errors/ErrorConstants.java
6e93f61b98b9039674bd146c1d39e8be8058a07b
[]
no_license
snemo/jhipster-mongodb
00c39fa9bab760d8297e0bdbfb63b9d95d31f505
1b24dc776f5666a34c0024e21e29ff2e7dacdcf5
refs/heads/master
2021-09-01T15:18:15.790749
2017-12-27T17:09:55
2017-12-27T17:09:55
115,540,370
0
0
null
null
null
null
UTF-8
Java
false
false
1,117
java
package com.nuxplanet.mongodb.web.rest.errors; import java.net.URI; public final class ErrorConstants { public static final String ERR_CONCURRENCY_FAILURE = "error.concurrencyFailure"; public static final String ERR_VALIDATION = "error.validation"; public static final String PROBLEM_BASE_URL = "http://www.jhipster.tech/problem"; public static final URI DEFAULT_TYPE = URI.create(PROBLEM_BASE_URL + "/problem-with-message"); public static final URI CONSTRAINT_VIOLATION_TYPE = URI.create(PROBLEM_BASE_URL + "/constraint-violation"); public static final URI PARAMETERIZED_TYPE = URI.create(PROBLEM_BASE_URL + "/parameterized"); public static final URI INVALID_PASSWORD_TYPE = URI.create(PROBLEM_BASE_URL + "/invalid-password"); public static final URI EMAIL_ALREADY_USED_TYPE = URI.create(PROBLEM_BASE_URL + "/email-already-used"); public static final URI LOGIN_ALREADY_USED_TYPE = URI.create(PROBLEM_BASE_URL + "/login-already-used"); public static final URI EMAIL_NOT_FOUND_TYPE = URI.create(PROBLEM_BASE_URL + "/email-not-found"); private ErrorConstants() { } }
[ "wojciech.olech@tieto.com" ]
wojciech.olech@tieto.com
a33752da77383289a4dc0f7e96a21c4996a861a0
8c2963e562bcc15ca32ff334428592a4c8e43cc2
/src/test/java/com/tpg/cat/reviews/adapters/outgoing/SearchCustomerReviewsAdapterTestSpec.java
c5b0795591a116446718c85657f5d50dd0237f6f
[]
no_license
tpgoldin/cat-reviews-svc
de1ad5336404045c841e6a919bb8dbca46657d7a
5192a6e2c53061353486c026f5c735f823a60fb5
refs/heads/main
2023-07-15T00:14:11.719462
2021-08-30T10:07:47
2021-08-30T10:07:47
401,299,559
0
0
null
null
null
null
UTF-8
Java
false
false
3,188
java
package com.tpg.cat.reviews.adapters.outgoing; import com.tpg.cat.reviews.GivenWhenThen; import com.tpg.cat.reviews.application.model.CustomerReviewModel; import com.tpg.cat.reviews.domain.model.VerifiedReview; import com.tpg.cat.reviews.infrastructure.persistence.CustomerReviewEntityFixture; import com.tpg.cat.reviews.infrastructure.persistence.CustomerReviewsRepository; import lombok.AccessLevel; import lombok.NoArgsConstructor; import org.mockito.Mockito; import java.time.LocalDateTime; import java.util.List; import static com.tpg.cat.reviews.domain.model.VerifiedReview.VERIFIED; import static java.util.Collections.singletonList; import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Mockito.verify; @NoArgsConstructor(access = AccessLevel.PRIVATE) public class SearchCustomerReviewsAdapterTestSpec implements GivenWhenThen<SearchCustomerReviewsAdapterTestSpec>, CustomerReviewEntityFixture { private static final LocalDateTime NOW = LocalDateTime.now(); public static SearchCustomerReviewsAdapterTestSpec testSpec() { return new SearchCustomerReviewsAdapterTestSpec(); } private CustomerReviewsRepository customerReviewsRepository; private String companyReference; private SearchCustomerReviewsAdapter searchCustomerReviewsAdapter; private List<CustomerReviewModel> actual; @Override public SearchCustomerReviewsAdapterTestSpec and() { return this; } @Override public SearchCustomerReviewsAdapterTestSpec given() { return this; } public SearchCustomerReviewsAdapterTestSpec customerReviewsRepository(CustomerReviewsRepository repository) { this.customerReviewsRepository = repository; return this; } public SearchCustomerReviewsAdapterTestSpec companyReference(String companyReference) { this.companyReference = companyReference; return this; } public SearchCustomerReviewsAdapterTestSpec searchCustomerReviewsAdapter(SearchCustomerReviewsAdapter adapter) { this.searchCustomerReviewsAdapter = adapter; return this; } @Override public SearchCustomerReviewsAdapterTestSpec when() { return this; } public SearchCustomerReviewsAdapterTestSpec searchingForExistingCustomerReviews() { Mockito.when(customerReviewsRepository.findByCompanyReference(companyReference)) .thenReturn(singletonList(customerReviewEntity(1312L, "Fixed loose connection", "Fixed loose connections in fuse box.", "CR8", companyReference, VERIFIED, NOW.minusDays(10)))); actual = searchCustomerReviewsAdapter.findByCompanyReference(companyReference); return this; } @Override public SearchCustomerReviewsAdapterTestSpec then() { return this; } public SearchCustomerReviewsAdapterTestSpec customerReviewsAreRetrieved() { verify(customerReviewsRepository).findByCompanyReference(companyReference); assertThat(actual).isNotEmpty(); // assertThat(actual.get(0).getScoreBreakdownModel().getScoreModels()).isNotEmpty(); return this; } }
[ "tpg@blueyonder.co.uk" ]
tpg@blueyonder.co.uk
220054106f95f845d220dcd797270c339cae952a
2a7ce791773474391d6f58305d2643ef28ea5e44
/Homework1/Constructora.java
f1bc3a152aeafc4e70bb672cd0510ec6bdf97a2c
[]
no_license
guillermoabisai/proyectos7a
64f71eda678708a98af980ac0fd9d4fcba262ed3
8bba2a6af8e02bf1fd128aa51c982cd449d9b91d
refs/heads/master
2020-03-28T22:00:16.129654
2018-12-10T22:49:03
2018-12-10T22:49:03
149,198,381
0
0
null
null
null
null
UTF-8
Java
false
false
835
java
//Una empresa constructora vende terrenos con la forma A de la //figura 2.2. Realice un programa para obtener el área respectiva de //un terreno de medidas de cualquier valor. import java.util.Scanner; public class Constructora{ public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("Ingresa la altura de la figura"); int A= input.nextInt(); System.out.println("Ingresa la base de la figura"); int B= input.nextInt(); System.out.println("Ingresa la altura de triagulo"); int C= input.nextInt(); A=A-C; int AT= (B*C) /(2) ; System.out.println("El Area del triagulo es: " + AT); int AR= B*A; System.out.println("El Area del rectangulo es: " + AR); int Area= AT*AR; System.out.println("El Area del terreno es: " + Area); } }
[ "abisai_guillermo@hotmail,com" ]
abisai_guillermo@hotmail,com
4da380885258c0bb8bc8648dcdb11ccdf53472c5
b7ab5304aad9f52238512050bd34cf821cf704af
/src/main/java/controller/PopulaFuncionario.java
c2c7754e470dce8af37eed98a8b356ede1eb9592
[]
no_license
Thyeres01/GP2-TRABALHO
818cbfd94e88f1272e0e1b1108e236994898b8ee
8a7addf3032a839a2a4387de8b5e390cac476fc4
refs/heads/master
2023-05-31T12:21:48.569875
2021-07-09T00:07:02
2021-07-09T00:07:02
384,275,453
0
0
null
null
null
null
UTF-8
Java
false
false
470
java
package controller; import java.util.List; import java.sql.SQLException; import java.util.ArrayList; import model.Funcao; import model.FuncaoDAO; public class PopulaFuncionario { List<Funcao> combofuncao = new ArrayList<Funcao>(); public void popularCombosFuncionario() { FuncaoDAO funcaoDAO = new FuncaoDAO(); try { combofuncao = funcaoDAO.populaComboFuncao(); } catch (SQLException e) { e.printStackTrace(); } } }
[ "bem@aliceternurinha.maravilha" ]
bem@aliceternurinha.maravilha
a95f6ec63a0e2bd90242e141f7a07466bf1bcb07
05a1eb768a2a6a212a9697813b0b38f8b1ff9f70
/src/Group/addgroupFromID.java
00eafa6e33fc80af323fc084a10715278c1d3847
[]
no_license
vivekagarwal5592/Expense-Tracker-Backend
a99a7a7073893db48becd843dc7cdc696ed8eefa
039305583b62a661cbf11c24fb7edaefb30c1110
refs/heads/master
2021-01-16T00:42:08.009710
2017-08-10T22:46:33
2017-08-10T22:46:33
99,970,514
0
0
null
null
null
null
UTF-8
Java
false
false
2,766
java
package Group; import java.io.BufferedReader; import java.io.IOException; import java.io.PrintWriter; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.ArrayList; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.google.gson.Gson; import Dbutils.Constants; import Dbutils.Database_credentials; import Model.Emaillist; import Model.UserDetails; @WebServlet("/addgroupFromID") public class addgroupFromID extends HttpServlet { private static final long serialVersionUID = 1L; public addgroupFromID() { super(); // TODO Auto-generated constructor stub } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { BufferedReader reader = request.getReader(); Gson gson = new Gson(); Emaillist email = gson.fromJson(reader, Emaillist.class); // ArrayList<UserDetails> udetails = get_user_details(email.getEmail()); Database_credentials.start_connection(); try { for (int i = 0; i <= email.getUserids().size() - 1; i++) { PreparedStatement stmt = Database_credentials.getC() .prepareStatement("Insert into expense_group (groupname,userid,groupid) VALUES(?,?,?)"); stmt.setString(1, email.getGroupname()); stmt.setInt(2, email.getUserids().get(i)); stmt.setInt(3, Constants.group_number); stmt.executeUpdate(); } Constants.group_number += 1; } catch (Exception e) { e.printStackTrace(); } finally { try { Database_credentials.end_connection(); } catch (Exception e) { e.printStackTrace(); } } } public ArrayList<UserDetails> get_user_details(ArrayList<String> friends) { ArrayList<UserDetails> user = new ArrayList<UserDetails>(); Database_credentials.start_connection(); try { for (int i = 0; i <= friends.size() - 1; i++) { PreparedStatement stmt = Database_credentials.getC() .prepareStatement("select * from user where email= ?"); stmt.setString(1, friends.get(i)); ResultSet rs = stmt.executeQuery(); while (rs.next()) { user.add(new UserDetails(rs.getInt("userid"), rs.getString("username"), rs.getString("email"), rs.getString("registration_token"))); } } } catch (Exception e) { e.printStackTrace(); } finally { try { Database_credentials.end_connection(); } catch (Exception e) { e.printStackTrace(); } } return user; } }
[ "vivekagarwal5592@gmail.com" ]
vivekagarwal5592@gmail.com
960a24b98ee614bcb69900c9cffb2b2904d091cb
2d93bf16c65e8cafd08afc6dfd11ee0b38d43e7f
/src/main/java/com/texoIT/worstMovieCategory/model/Year.java
863eb0a71738ecec8809a5b42b958d3d85c71e94
[]
no_license
raphaelbxavier/TexoIT_Worst_Movie_Category
1f34bfe63a3b697ac4fc09860fe447be84e65931
1eb632b23e7e89e0d01c803985f40a7b898dbba1
refs/heads/master
2020-09-06T08:44:44.916061
2019-11-08T14:22:27
2019-11-08T14:22:27
220,378,239
0
0
null
null
null
null
UTF-8
Java
false
false
498
java
package com.texoIT.worstMovieCategory.model; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; import java.util.ArrayList; import java.util.List; @Getter @Setter @NoArgsConstructor public class Year { private List<Item> years = new ArrayList<>(); @Getter @Setter @NoArgsConstructor @AllArgsConstructor public static class Item { private Integer year; private Integer winnerMovieCount; } }
[ "rbxavier18@gmail.com" ]
rbxavier18@gmail.com
913f3e81923056137af611040cbd7a23fed02bfb
407fd65c2376d5f218fc315f2c8e213e91ba30b2
/src/main/java/com/bairock/iot/hamaServer/WebSecurityConfig2.java
b26af7a10acb3b59f110252a57659656a7417285
[]
no_license
LinYing89/hamaServer
c219a041730385e650b0b27de49d8549fc5067bb
381537da61764cfc4cf8dfd614a32b8d4366d87e
refs/heads/master
2020-03-25T14:31:28.973767
2019-11-13T12:50:34
2019-11-13T12:50:34
143,859,187
0
0
null
null
null
null
UTF-8
Java
false
false
2,825
java
package com.bairock.iot.hamaServer; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.http.HttpMethod; import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.builders.WebSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import com.bairock.iot.hamaServer.service.MyCustomUserService; @Configuration @EnableWebSecurity public class WebSecurityConfig2 extends WebSecurityConfigurerAdapter{ @Autowired private MyCustomUserService myCustomUserService; // @Override // protected void configure(HttpSecurity http) throws Exception { // http.authorizeRequests().antMatchers("/login", "/user/page/register", "/user/register", "/css/**", "/img/**", "/js/**", "/webjars/**").permitAll().anyRequest().authenticated().and() // .formLogin().loginPage("/login").defaultSuccessUrl("/loginSuccess", true).permitAll().and().logout() // .permitAll(); // } @Override protected void configure(HttpSecurity http) throws Exception { http.authorizeRequests() .antMatchers("/user/register/**", "/group/client/**", "/deviceImg/**", "/download/**", "/deviceMsg/**", "/hamaServer-websocket/**", "/css/**", "/img/**", "/js/**", "/webjars/**", "/devImg/**").permitAll() .antMatchers(HttpMethod.POST, "/group/client/**").permitAll() .anyRequest().authenticated().and() .formLogin().loginPage("/login").defaultSuccessUrl("/loginSuccess", true).permitAll().and().logout() .permitAll() .and().rememberMe().tokenValiditySeconds(2419200).key("hamaKey") .and().csrf().disable(); } @Bean public BCryptPasswordEncoder passwordEncoder() { return new BCryptPasswordEncoder(); } @Override protected void configure(AuthenticationManagerBuilder auth) throws Exception { auth.userDetailsService(myCustomUserService).passwordEncoder(passwordEncoder()); } // @Override // protected void configure(AuthenticationManagerBuilder auth) throws Exception { // auth.inMemoryAuthentication().passwordEncoder(passwordEncoder()).withUser("admin") // .password(passwordEncoder().encode("a123")).roles("USER", "ADMIN"); // } // 忽略静态资源的拦截 @Override public void configure(WebSecurity web) throws Exception { web.ignoring().antMatchers("/resources/static/**"); } }
[ "444894216@qq.com" ]
444894216@qq.com
d486f0f4170ff3468ade1cd503d12f7f6abfb6e1
a9b1ff0b0eec2f62ee996d1c3dd0e11edaf08e01
/src/main/java/com/nutzside/codegen/CodeGenerator.java
dd2a9b15c66d641ed5b6508789a54510defb07ad
[]
no_license
myaniu/xerp
155f3a7b8d4f686c4f23efddaf048c85e52b47a5
554d0af77a72507bed3b9e6ddf2cd1d2e2c41d38
refs/heads/master
2020-12-24T11:06:20.893036
2013-07-09T06:49:34
2013-07-09T06:49:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,481
java
package com.nutzside.codegen; import httl.Engine; import httl.Template; import java.io.BufferedWriter; import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.Writer; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.nutz.lang.Files; import org.nutz.lang.stream.StringOutputStream; public class CodeGenerator { final static private String PACKAGE = "com.xcms"; final static private String REQUESTPATH = "xcms"; final static private String HTMLPATH = "xcms"; private Map<String, Object> root; Template template; Engine engine; private StringBuilder others1; private StringBuilder others2; private StringBuilder others3; public static void main(String[] args) throws Exception { CodeGenerator t = new CodeGenerator(); t.genAllCode(); } public CodeGenerator() { engine = Engine.getEngine("httl_creater.properties"); others1 = new StringBuilder(); others2 = new StringBuilder(); others3 = new StringBuilder(); } private void genAllCode() throws ClassNotFoundException, IOException { String[] nameArr = getDomainClassNameArr(); for (int i = 0; i < nameArr.length; i++) { Class<?> classf = Class.forName(PACKAGE + ".domain." + nameArr[i].substring(0, nameArr[i].lastIndexOf("."))); genEntityCode(classf); } System.out.println("\n请将以下内容拷贝到相应的文件中:\n"); System.out.println(others1.append("\n").append(others2).append("\n") .append(others3)); } private void genEntityCode(Class<?> domainClass) throws IOException { System.out.println(domainClass.getPackage().getName()); /* 创建数据模型 */ root = new HashMap<String, Object>(); root.put("package", PACKAGE); root.put("domainPackage", domainClass.getPackage().getName()); root.put("Domain", domainClass.getSimpleName()); root.put("requestPath", REQUESTPATH); root.put("domainFields", getDomainFields(domainClass)); root.put("htmlPath", HTMLPATH); /* 分别根据模板,写入文件或输出 */ tempToFile("${Domain}Service.java.httl", getServiceSrcPath(domainClass)); tempToFile("${Domain}Module.java.httl", getModuleSrcPath(domainClass)); tempToFile("${Domain}_manager.html.httl", getHtmlPath(domainClass)); tempPrint("others1.httl", others1); tempPrint("others2.httl", others2); tempPrint("others3.httl", others3); } private void tempToFile(String tempFileName, String filePath) throws IOException { boolean isCreat = Files.createNewFile(new File(filePath)); if (isCreat) { File f = new File(filePath); Writer out = new BufferedWriter(new FileWriter(f, true)); try { template = engine.getTemplate(tempFileName); template.render(root, out); out.flush(); System.out.println("文件写入完成:" + filePath); } catch (Exception e) { e.printStackTrace(); } } else { System.out.println("文件写入失败,文件已存在:" + filePath); } } private void tempPrint(String tempFileName, StringBuilder sb) throws IOException { OutputStream os = new StringOutputStream(sb); Writer out = new OutputStreamWriter(os); try { template = engine.getTemplate(tempFileName); template.render(root, out); out.flush(); sb.append("\n"); } catch (Exception e) { e.printStackTrace(); } } private List<String> getDomainFields(Class<?> domainClass) { List<String> fields = new ArrayList<String>(); Field[] fieldArr = domainClass.getDeclaredFields(); for (Field filed : fieldArr) { String filedName = filed.getName(); fields.add(filedName); } return fields; } private String[] getDomainClassNameArr() { File f = new File("src\\main\\java\\" + PACKAGE.replace('.', '\\') + "\\domain\\"); if (f.isDirectory()) { return f.list(); } else { return null; } } private String getServiceSrcPath(Class<?> domainClass) { return "src\\main\\java\\" + PACKAGE.replace('.', '\\') + "\\service\\" + domainClass.getSimpleName() + "Service.java"; } private String getModuleSrcPath(Class<?> domainClass) { return "src\\main\\java\\" + PACKAGE.replace('.', '\\') + "\\module\\" + domainClass.getSimpleName() + "Module.java"; } private String getHtmlPath(Class<?> domainClass) { return "src\\main\\webapp\\WEB-INF\\" + HTMLPATH + "\\" + domainClass.getSimpleName().toLowerCase() + "_manager.httl"; } }
[ "xwinie@gmail.com" ]
xwinie@gmail.com
5fa8c91af926b5317236249ba8b921411b30f1fb
ec8b37e9587c864c2cf03a8a396d6aac8039b2ea
/SolucionParcialEnfasisII/src/udem/edu/co/modelo/Gato.java
b3f20c0418e9457c8e19315c7dab4197dd8cf6cd
[]
no_license
Guatufer/EnfasisII
7eba7f74a7a763f0e60e63ccf578f97b578b8c86
a38375501dd9ab938238cffb4a629a0a5e83016c
refs/heads/master
2020-03-30T00:02:37.042387
2020-01-24T12:57:23
2020-01-24T12:57:23
150,502,342
0
0
null
null
null
null
UTF-8
Java
false
false
521
java
package udem.edu.co.modelo; /** * * @author Juan Fernando Arteaga Acevedo * @version 0.1 */ public class Gato extends Animal{ public Gato() { } public Gato(String nombre, int edad, String sexo, String raza) { super(nombre, edad, sexo, raza); } @Override public int PromedioVida() { int vida = 14; return vida; } @Override public String toString() { return "Gato:"+nombre+", "+edad+", "+sexo+", "+raza+"." ; } }
[ "guatufer@gmail.com" ]
guatufer@gmail.com
2c7cae54861a9b7a4924644ee384063ab6283a94
0e56de27bcd3d24b929c5ceb54507124f617b49b
/docs/HC-JA-Material/java_htp-4e/examples/elevator/com/deitel/jhtp4/elevator/model/Floor.java
a06c7eb82466557024b83130835833ec6abb0079
[]
no_license
hakchin/worksjava
11518ade6c6c04af18daf5dfefee3ffd17983d24
c59287428cc2a9222c21483b207bb89149ef1d61
refs/heads/master
2021-01-15T15:36:52.775463
2016-12-12T23:44:10
2016-12-12T23:44:10
53,316,812
0
0
null
null
null
null
UTF-8
Java
false
false
2,652
java
// Floor.java // Represents a Floor located next to an ElevatorShaft package com.deitel.jhtp4.elevator.model; // Deitel packages import com.deitel.jhtp4.elevator.ElevatorConstants; public class Floor extends Location implements ElevatorConstants { // reference to ElevatorShaft object private ElevatorShaft elevatorShaft; // Floor constructor sets name of Floor public Floor( String name ) { setLocationName( name ); } // get first or second Floor Button, using Location name public Button getButton() { if ( getLocationName().equals( FIRST_FLOOR_NAME ) ) return getElevatorShaft().getFirstFloorButton(); else if ( getLocationName().equals( SECOND_FLOOR_NAME ) ) return getElevatorShaft().getSecondFloorButton(); else return null; } // end method getButton // get first or second Floor Door, using Location name public Door getDoor() { if ( getLocationName().equals( FIRST_FLOOR_NAME ) ) return getElevatorShaft().getFirstFloorDoor(); else if ( getLocationName().equals( SECOND_FLOOR_NAME ) ) return getElevatorShaft().getSecondFloorDoor(); else return null; } // end method getDoor // get ElevatorShaft reference public ElevatorShaft getElevatorShaft() { return elevatorShaft; } // set ElevatorShaft reference public void setElevatorShaft( ElevatorShaft shaft ) { elevatorShaft = shaft; } } /************************************************************************** * (C) Copyright 2002 by Deitel & Associates, Inc. and Prentice Hall. * * All Rights Reserved. * * * * DISCLAIMER: The authors and publisher of this book have used their * * best efforts in preparing the book. These efforts include the * * development, research, and testing of the theories and programs * * to determine their effectiveness. The authors and publisher make * * no warranty of any kind, expressed or implied, with regard to these * * programs or to the documentation contained in these books. The authors * * and publisher shall not be liable in any event for incidental or * * consequential damages in connection with, or arising out of, the * * furnishing, performance, or use of these programs. * *************************************************************************/
[ "hakchin@gmail.com" ]
hakchin@gmail.com
d51310434a6e61e27ed48522735d5697ea239f0e
ab662f67ca8f09d75ad9d50db88637cfb5a50aa8
/app/src/main/java/com/example/recyclerviewjson/MyAdapter.java
947795e3ecbae1b20efc73f744e4df79054f7787
[]
no_license
SumonRayy/imageParsingJSONAndroid
de4c3c31b0a7b95e7d17207e126f9c3c695f1782
f81ba28ea86b293cef3afba839cf7a4c59cd559c
refs/heads/master
2020-09-15T22:17:15.202045
2019-11-23T10:05:31
2019-11-23T10:05:31
223,568,224
0
0
null
null
null
null
UTF-8
Java
false
false
2,101
java
package com.example.recyclerviewjson; import android.content.ClipData; import android.content.Context; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; import com.squareup.picasso.Picasso; import java.util.ArrayList; public class MyAdapter extends RecyclerView.Adapter<MyAdapter.MyViewHolder> { private Context mContext; private ArrayList<Items> mList; public MyAdapter ( Context context , ArrayList<Items> Lists) { mContext = context; mList = Lists; } @NonNull @Override public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { View v = LayoutInflater.from(mContext).inflate(R.layout.items , parent , false); return new MyViewHolder(v); } @Override public void onBindViewHolder(@NonNull MyViewHolder holder, int position) { Items currentItem = mList.get(position); String imageUrl = currentItem.getImageURL(); String creatorName = currentItem.getCreator(); int likeCount = currentItem.getLikeCount(); holder.mTextViewCreator.setText(creatorName); holder.mTextViewLikes.setText("Like : " + likeCount); Picasso.with(mContext).load(imageUrl).fit().centerInside().into(holder.mImageView); } @Override public int getItemCount() { return mList.size(); } public class MyViewHolder extends RecyclerView.ViewHolder { public ImageView mImageView; public TextView mTextViewCreator; public TextView mTextViewLikes; public MyViewHolder(@NonNull View itemView) { super(itemView); mImageView = itemView.findViewById(R.id.image_view); mTextViewCreator = itemView.findViewById(R.id.text_view_creator); mTextViewLikes = itemView.findViewById(R.id.text_view_likes); } } }
[ "53209811+SumonRayy@users.noreply.github.com" ]
53209811+SumonRayy@users.noreply.github.com
e500ec86aa28888e0c7274eaba6ff352172cd216
1627dcfd4cffd062c3e4dc696bc7b1d114a8bed3
/ShuffleAndroid/src/main/java/org/dodgybits/shuffle/android/list/model/ListQuery.java
1c46c385cde5ba0fbc15c6b35aad68a58a558b80
[]
no_license
andybryant/shuffle-android
78a14155f8602289f26ff4a0c1e9940e6271956e
23fcd8b4204b0c60ea61c4e85d7f9c1362217862
refs/heads/master
2021-01-10T13:51:05.492306
2018-02-21T10:36:23
2018-02-21T10:36:23
53,575,063
8
4
null
null
null
null
UTF-8
Java
false
false
152
java
package org.dodgybits.shuffle.android.list.model; public enum ListQuery { inbox, nextTasks, dueTasks, project, context, deferred, deleted, search }
[ "andybryant@gmail.com" ]
andybryant@gmail.com
05c3b2f8cf5e1d45941cf147a0d4cb83a82b58fa
f29dcaf1af58f1193391d0d23e3728225371f747
/src/main/java/com/eccl/cloud/demo/controller/DrDbProcessLineController.java
2fa07e13082fd9d34e6a5f81d9b1c77d73a9ecb1
[]
no_license
liuhuanming/springboot-demo
e0071c3a0e77df0b2a15516ebb8521fa482a3f51
ff8e365929c1d97d7eb9cb029b06a9b1c2b6e89e
refs/heads/master
2022-06-21T18:12:13.513615
2019-07-31T09:23:59
2019-07-31T09:23:59
195,213,109
0
0
null
2022-06-21T01:24:03
2019-07-04T09:37:25
Java
UTF-8
Java
false
false
1,363
java
package com.eccl.cloud.demo.controller; import java.util.Collections; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import com.eccl.cloud.common.result.Response; import com.eccl.cloud.common.result.Result; import com.eccl.cloud.common.result.ResultEnum; import com.eccl.cloud.demo.domain.DrDbProcessLine; import com.eccl.cloud.demo.domain.DrDbProcessLineSearch; import com.eccl.cloud.demo.service.DrDbProcessLineService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @Api(value="带班",tags={"带班接口"}) @RestController @RequestMapping("/db") public class DrDbProcessLineController { @Autowired private DrDbProcessLineService service; @ApiOperation(value="查询实际带班情况") @GetMapping(value = "", produces = { "application/json;charset=UTF-8" }) public Result insert(DrDbProcessLineSearch drDbProcessLineSearch){ List<DrDbProcessLine> dbList = service.getDrDbInfo(drDbProcessLineSearch); if (dbList.isEmpty()) { return Response.error(ResultEnum.NOT_FOUND_RESULT); } else { dbList.removeAll(Collections.singleton(null)); return Response.ok(dbList); } } }
[ "liuhuanming@eccl.app" ]
liuhuanming@eccl.app
20956b6954a24e9fb4cbfb42276e7f02ce185647
954280dffd9f61994fc17a5a1aa919ef3c03b880
/src/main/java/World/WallTile.java
6c104ff324e46f37b2ea5cf0edd9fd273e4f3a75
[]
no_license
TakehikoHikaru/GameEngineWithProblems
aa4a2fd2363964e0e9266e6ed7cdad846d5bea54
b1e1be0221c11ff24272c05f61519f36082d7ea3
refs/heads/master
2023-02-04T03:13:48.965175
2020-12-09T01:21:25
2020-12-09T01:21:25
285,284,398
0
0
null
2020-12-09T01:21:26
2020-08-05T12:40:38
Java
UTF-8
Java
false
false
185
java
package World; import java.awt.image.BufferedImage; public class WallTile extends Tile{ public WallTile(BufferedImage sprite, int x, int y) { super(sprite, x, y); } }
[ "dospassosguilherme@gmail.com" ]
dospassosguilherme@gmail.com
f578934350ed1f19123c33165d208ee5278b8063
bdaceba74bbcb6d3c1dbc643790d21560997ccef
/app/src/main/java/com/example/admin/multisms/com/com/hotmoka/multisms/Contact.java
35f87a6daa08af1bc8e4627eb1169d678dca30e3
[]
no_license
enamakel/mahendra-android
ef1f4aac7704ff467fb769eaa6e8124f0f86138e
f7306f0a17e3f0a0a92995ac2c1ab2971cf16d8a
refs/heads/master
2021-04-09T16:09:12.831391
2016-06-05T15:25:45
2016-06-05T15:25:45
60,466,182
0
0
null
null
null
null
UTF-8
Java
false
false
2,056
java
package com.example.admin.multisms.com.com.hotmoka.multisms; import android.os.Parcel; import android.os.Parcelable; public class Contact implements Comparable<Contact>, Parcelable { public final boolean isMobile; public final String name; public final String surname; public final String phone; public Contact(boolean isMobile, String name, String surname, String phone) { this.isMobile = isMobile; this.name = name; this.surname = surname; this.phone = phone; } private Contact(Parcel parcel) { this.isMobile = parcel.readInt() == 1 ? true : false; this.name = parcel.readString(); this.surname = parcel.readString(); this.phone = parcel.readString(); } @Override public int compareTo(Contact another) { int comp = name.compareTo(another.name); if (comp != 0) return comp; comp = surname.compareTo(another.surname); if (comp != 0) return comp; if (isMobile != another.isMobile) return isMobile ? -1 : 1; return phone.compareTo(another.phone); } @Override public boolean equals(Object other) { if (other instanceof Contact) { Contact otherAsContact = (Contact) other; return isMobile == otherAsContact.isMobile && name.equals(otherAsContact.name) && surname.equals(otherAsContact.surname) && phone.equals(otherAsContact.phone); } else return false; } @Override public int hashCode() { return name.hashCode(); } @Override public String toString() { return "[" + (isMobile ? "Mobile" : "Landline") + "] " + name + " " + surname + " " + phone; } @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel parcel, int flags) { parcel.writeInt(isMobile ? 1 : 0); parcel.writeString(name); parcel.writeString(surname); parcel.writeString(phone); } public static final Creator<Contact> CREATOR = new Creator<Contact>() { @Override public Contact createFromParcel(Parcel parcel) { return new Contact(parcel); } @Override public Contact[] newArray(int size) { return new Contact[size]; } }; }
[ "steven.enamakel@gmail.com" ]
steven.enamakel@gmail.com
60f6b839b9d11898311f39bacca4876b73e8ef11
cd4ff501757814b2544dc7a495a59331852dacf6
/dao/src/main/java/site/binghai/SuperBigDumpling/dao/AlbumDao.java
cc05f72e2b69be067c8563c443a8146962470de9
[]
no_license
IceSeaOnly/super_big_dumpling
4387e2878dd77597275591e7523fde5e895ab41b
770a393f90d33407b48ecc9c6ed2caa015d9bdb4
refs/heads/master
2021-09-02T04:17:57.649224
2017-12-30T08:47:24
2017-12-30T08:47:24
103,634,993
1
0
null
null
null
null
UTF-8
Java
false
false
324
java
package site.binghai.SuperBigDumpling.dao; import org.springframework.data.jpa.repository.JpaRepository; import site.binghai.SuperBigDumpling.common.entity.things.Album; /** * Created by IceSea on 2017/10/21. * GitHub: https://github.com/IceSeaOnly */ public interface AlbumDao extends JpaRepository<Album,Integer>{ }
[ "1041414957@qq.com" ]
1041414957@qq.com
a04f2f5f9dd4b8688f1dc3d7b7590dc119060192
a012a50228ce9c2c329ed8c206fc91e4576f1ad8
/app/src/androidTest/java/com/example/nigakolczan/appsuleczek/ExampleInstrumentedTest.java
dab9cfe65a356925a189f1c43a9fc46f0b0de9ef
[]
no_license
KDanielRepo/AppSuleczek
bb16ce30ddb2b42aea713ca3dc50f2c9dba9279c
fb6beef60a53e32e11cae3f7b81ebd76bdaf6865
refs/heads/master
2020-04-05T16:08:45.731959
2018-11-10T16:27:25
2018-11-10T16:27:25
156,998,693
0
0
null
null
null
null
UTF-8
Java
false
false
754
java
package com.example.nigakolczan.appsuleczek; import android.content.Context; import android.support.test.InstrumentationRegistry; import android.support.test.runner.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getTargetContext(); assertEquals("com.example.nigakolczan.appsuleczek", appContext.getPackageName()); } }
[ "Daniel200825@wp.pl" ]
Daniel200825@wp.pl
6d28c1b5ca386d11b8c32d7f0293dc0adddc686b
129a10f68a958cccbb2bc7fc3fa6f4536d633dd9
/health-manager/health-manager-dao/src/main/java/com/muyou/mapper/TbCollectMapper.java
11de18750be9f98b836bbb1da05f639b2cc6d346
[]
no_license
Zhangguangte/HealthyCampus_Server
62a731671a293456b7e367f24cda852afcce8216
997a060f694ac4ddf9bb47ed70d1b4a94c80e126
refs/heads/master
2022-04-10T01:07:26.238731
2020-03-27T04:12:13
2020-03-27T04:12:13
233,089,918
0
0
null
null
null
null
UTF-8
Java
false
false
859
java
package com.muyou.mapper; import com.muyou.pojo.TbCollect; import com.muyou.pojo.TbCollectExample; import java.util.List; import org.apache.ibatis.annotations.Param; public interface TbCollectMapper { int countByExample(TbCollectExample example); int deleteByExample(TbCollectExample example); int deleteByPrimaryKey(Integer id); int insert(TbCollect record); int insertSelective(TbCollect record); List<TbCollect> selectByExample(TbCollectExample example); TbCollect selectByPrimaryKey(Integer id); int updateByExampleSelective(@Param("record") TbCollect record, @Param("example") TbCollectExample example); int updateByExample(@Param("record") TbCollect record, @Param("example") TbCollectExample example); int updateByPrimaryKeySelective(TbCollect record); int updateByPrimaryKey(TbCollect record); }
[ "741737219@qq.com" ]
741737219@qq.com
54eef7c69ac162d785f7df43d0e91849e50f0acb
6122512c72ba6d38d1a287a2493da4772c33ee7b
/app/src/main/java/com/buglai/rxrss/model/ContentBean.java
054e65e73277b4fee7b29f952cea02af0b428be5
[]
no_license
BugLai/RxRss
72c566e63e957412db4e6d5e7703565078457574
eb7c424917aac4f2b4d91bd0e9e9139bd0313952
refs/heads/master
2020-12-31T04:56:32.695647
2016-05-20T08:33:48
2016-05-20T08:33:48
59,268,626
0
0
null
null
null
null
UTF-8
Java
false
false
1,158
java
package com.buglai.rxrss.model; import java.io.Serializable; /** * Created by buglai on 5/19/16. */ public class ContentBean implements Serializable { private String title; private String author; private String date; private String content; private String avatar; private String image; public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } public String getAuthor() { return author; } public void setAuthor(String author) { this.author = author; } public String getDate() { return date; } public void setDate(String date) { this.date = date; } public String getContent() { return content; } public void setContent(String content) { this.content = content; } public String getAvatar() { return avatar; } public void setAvatar(String avatar) { this.avatar = avatar; } public String getImage() { return image; } public void setImage(String image) { this.image = image; } }
[ "sudianzhuan@gmail.com" ]
sudianzhuan@gmail.com
d43a6c78c683b0322f64b42d2587a92f49bb8b44
02eb22b0b8ed077fed38e5ada0f5bd9d65451df4
/app/src/main/java/com/chillingvan/instantvideo/sample/test/video/TestVideoEncoder.java
9210cb7b6b4405fe2caa2e44afd135e86d360b10
[ "Apache-2.0" ]
permissive
ab503044120/Android_ShowVideoStream
fbe779b205361f6a6206895afdb429d0b0f9f72d
9dd7013b88f6daa9d0c538d39f5a12b890dc662b
refs/heads/master
2021-01-20T01:56:23.046617
2017-04-23T04:55:20
2017-04-23T04:55:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,625
java
/* * * * * * * Copyright (C) 2017 ChillingVan * * * * * * 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.chillingvan.instantvideo.sample.test.video; import android.content.Context; import android.graphics.Color; import android.graphics.Rect; import android.graphics.SurfaceTexture; import android.util.Log; import com.chillingvan.canvasgl.ICanvasGL; import com.chillingvan.canvasgl.Loggers; import com.chillingvan.canvasgl.glcanvas.BasicTexture; import com.chillingvan.canvasgl.glcanvas.GLPaint; import com.chillingvan.canvasgl.glview.texture.gles.EglContextWrapper; import com.chillingvan.lib.encoder.MediaCodecInputStream; import com.chillingvan.lib.encoder.video.H264Encoder; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; /** * Created by Chilling on 2016/12/10. */ public class TestVideoEncoder { private H264Encoder h264Encoder; private byte[] writeBuffer = new byte[1024 * 64]; private Context ctx; private EglContextWrapper eglCtx; public static int drawCnt; private BasicTexture outsideTexture; private SurfaceTexture outsideSurfaceTexture; private OutputStream os; public TestVideoEncoder(Context ctx, final EglContextWrapper eglCtx) { this.ctx = ctx; this.eglCtx = eglCtx; try { os = new FileOutputStream(ctx.getExternalFilesDir(null) + File.separator + "test_h264_encode.h264"); } catch (FileNotFoundException e) { e.printStackTrace(); } } public void prepareEncoder(H264Encoder.OnDrawListener onDrawListener) { try { h264Encoder = new H264Encoder(640, 480, 2949120, 30, 5, eglCtx); h264Encoder.setSharedTexture(outsideTexture, outsideSurfaceTexture); h264Encoder.setOnDrawListener(onDrawListener); } catch (IOException | IllegalStateException e) { e.printStackTrace(); } } public void setSharedTexture(BasicTexture outsideTexture, SurfaceTexture outsideSurfaceTexture) { this.outsideTexture = outsideTexture; this.outsideSurfaceTexture = outsideSurfaceTexture; } public static void drawRect(ICanvasGL canvasGL, int drawCnt) { GLPaint glPaint = new GLPaint(); glPaint.setColor(Color.BLUE); canvasGL.drawRect(new Rect(10 * drawCnt - 20, 50, 10 * drawCnt, 100), glPaint); } public void start() { Log.d("TestVideoEncoder", "start: "); h264Encoder.start(); } public void stop() { if (h264Encoder == null) { return; } h264Encoder.stop(); } public boolean isStart() { return h264Encoder != null && h264Encoder.isStart(); } public void destroy() { try { os.close(); } catch (IOException e) { e.printStackTrace(); } if (h264Encoder == null) { return; } h264Encoder.release(); } public boolean encodeAFrame() { if (isStart()) { Loggers.d("TestVideoEncoder", "writeAFrame"); h264Encoder.requestRenderAndWait(); return true; } return false; } public void write() { MediaCodecInputStream mediaCodecInputStream = h264Encoder.getMediaCodecInputStream(); MediaCodecInputStream.readAll(mediaCodecInputStream, writeBuffer, 0, new MediaCodecInputStream.OnReadAllCallback() { @Override public void onReadOnce(byte[] buffer, int readSize, int mediaBufferSize) { Loggers.d("TestVideoEncoder", String.format("onReadOnce: readSize:%d", readSize)); if (readSize <= 0) { return; } try { os.write(buffer, 0, readSize); os.flush(); } catch (IOException e) { e.printStackTrace(); } } }); } }
[ "chillingvan@163.com" ]
chillingvan@163.com
508577f5bb87b373f9673bec79dace237c1c1e1d
a644a1f9dbd6c7134b2a8436de72d21db78fc51f
/src/main/java/com/cg/movie/response/ShowResponseVO.java
2feb1415a80a5006b825cf95c01163c037061943
[]
no_license
punit3299/movie-booking-backend
58e6746f31c4afe9e0167229a94968adceb05073
6f89ef6bef58058a10794d074024f8688ae33405
refs/heads/master
2022-12-03T16:42:36.424110
2020-08-19T18:40:17
2020-08-19T18:40:17
285,772,531
0
1
null
null
null
null
UTF-8
Java
false
false
1,451
java
package com.cg.movie.response; import java.sql.Timestamp; public class ShowResponseVO { private Long showId; private String showName; private String showLanguage; private String movieName; private Timestamp showStartTime; private Timestamp showEndTime; private String theatreName; private String screenName; public String getShowName() { return showName; } public void setShowName(String showName) { this.showName = showName; } public String getShowLanguage() { return showLanguage; } public void setShowLanguage(String showLanguage) { this.showLanguage = showLanguage; } public String getMovieName() { return movieName; } public void setMovieName(String movieName) { this.movieName = movieName; } public Timestamp getShowStartTime() { return showStartTime; } public void setShowStartTime(Timestamp showStartTime) { this.showStartTime = showStartTime; } public Timestamp getShowEndTime() { return showEndTime; } public void setShowEndTime(Timestamp showEndTime) { this.showEndTime = showEndTime; } public String getTheatreName() { return theatreName; } public void setTheatreName(String theatreName) { this.theatreName = theatreName; } public String getScreenName() { return screenName; } public void setScreenName(String screenName) { this.screenName = screenName; } public Long getShowId() { return showId; } public void setShowId(Long showId) { this.showId = showId; } }
[ "60911636+Prabhjot786@users.noreply.github.com" ]
60911636+Prabhjot786@users.noreply.github.com
bcdcec01e76971e34edb83485401305bee4449e0
33738b7dd03ab0277bdf7a1d83bdd8d08094771f
/sff/src/main/java/com/lti/service/SellRequestService.java
288e080b4f6348928effe34bec22b7b0baca0655
[]
no_license
SowmyaS98/sff
fb73f5066de1e384f90d1dfe914d7a6eb802d8b0
12df492a0360fdbcf5dbc1d4fa9797d8804ac7b9
refs/heads/master
2023-02-09T20:53:34.748755
2021-01-08T14:32:21
2021-01-08T14:32:21
327,927,529
0
0
null
null
null
null
UTF-8
Java
false
false
202
java
package com.lti.service; import com.lti.entity.SellRequest; public interface SellRequestService { public long placeSellRequest(double quantity,String farmerEmail,String cropType,String cropName); }
[ "sowmyselvaraj.ssk@gmail.com" ]
sowmyselvaraj.ssk@gmail.com
09378f0e36013012588bd4a1422fb2a0b737d7fe
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.ocms-OCMS/sources/com/oculus/errorreporting/ErrorReportingExecutorFactory.java
c79cf1dba5250082e9f24b13f61e76e096779553
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
1,571
java
package com.oculus.errorreporting; import com.facebook.common.time.AwakeTimeSinceBootClock; import com.facebook.common.time.MonotonicClock; import java.util.concurrent.ExecutorService; import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.ThreadFactory; import java.util.concurrent.ThreadPoolExecutor; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; public class ErrorReportingExecutorFactory { private static ExecutorService sSingleThreadExecutorService; /* access modifiers changed from: private */ public static class NamedThreadFactory implements ThreadFactory { private final String mNamePrefix; private final AtomicInteger mThreadNumber = new AtomicInteger(1); public NamedThreadFactory(String str) { this.mNamePrefix = str; } public Thread newThread(Runnable runnable) { return new Thread(runnable, this.mNamePrefix + this.mThreadNumber.getAndIncrement()); } } public static ExecutorService getSingleThreadExecutorService() { synchronized (ErrorReportingExecutorFactory.class) { if (sSingleThreadExecutorService == null) { sSingleThreadExecutorService = new ThreadPoolExecutor(0, 1, 60, TimeUnit.SECONDS, new LinkedBlockingQueue(), new NamedThreadFactory("ErrorReportingThread-")); } } return sSingleThreadExecutorService; } public static MonotonicClock getMonotonicClock() { return AwakeTimeSinceBootClock.get(); } }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
3cbe9b16d0e46825ae6f553f3d6e83415a7462d0
466f3520947061fb339d357ed0bfe9d07a4aa302
/app/src/main/java/com/firstapp/weatherapp/tasks/GetUsers.java
086c677c60e4f573daf4e2bb13ad4ea45688021e
[]
no_license
guzikchirik/weatherApp
981b77c1bee503fe4e17944b8238e30021785c4b
9323a932b365a7f5c8668c907fc1368e5e8bd34e
refs/heads/master
2023-08-11T13:51:43.019136
2021-09-16T14:05:29
2021-09-16T14:05:29
403,289,489
0
0
null
null
null
null
UTF-8
Java
false
false
1,324
java
package com.firstapp.weatherapp.tasks; import android.app.Activity; import android.os.AsyncTask; import android.widget.TextView; import com.firstapp.weatherapp.R; import com.firstapp.weatherapp.activities.user.AddUserActivity; import com.firstapp.weatherapp.httpclient.HttpClientDeprecated; import org.json.JSONArray; import org.json.JSONException; public class GetUsers extends AsyncTask<String, String, String> { private static final String MY_SERVICE_URL = "http://192.168.100.52:4000/api/v1/users"; private Activity activity; public GetUsers(Activity activity) { this.activity = activity; } @Override protected String doInBackground(String... strings) { return HttpClientDeprecated.get(MY_SERVICE_URL); } @Override protected void onPostExecute(String result) { super.onPostExecute(result); System.out.println("222222222222222222222222222222222222222222222222222222"); System.out.println(result); TextView textView3 = activity.findViewById(R.id.textView3); textView3.setText(result); // try { // JSONArray object = new JSONArray(result); //// userField.setText(object.getJSONObject(0).toString()); // } catch (JSONException e) { // e.printStackTrace(); // } } }
[ "anton_chyrko@epam.com" ]
anton_chyrko@epam.com
c66fff0d93b1f1ef8d862fbe167113919fcae609
bf5c3799d707b33fbffab367e9217d220fcb6ad0
/src/com/class24/CountryConstructor.java
5cf97ba1bdba1ca35c54af97f31455ef3ae96e79
[]
no_license
KathyleenO/JavaClasses
068a30bd28053006bd023775a2f719ff816c65cb
260bac418ddc2e83e233a2efa0b2fe1fd80f343f
refs/heads/master
2020-09-04T21:03:07.766761
2019-12-19T00:08:29
2019-12-19T00:08:29
219,891,276
0
0
null
null
null
null
UTF-8
Java
false
false
1,102
java
package com.class24; public class CountryConstructor { public String capital, name; public int population; public CountryConstructor(){ System.out.println("I am a non argument constructor"); } CountryConstructor(String name, String capital, int population){ this.name=name; this.capital=capital; this.population=population; } public void displayInfo() { System.out.println("Country "+name+ " " +capital); } public static void main(String[] args) { //CALL THE CONSTRUCTOR CountryConstructor country1=new CountryConstructor("USA","Washington DC",350); CountryConstructor country2=new CountryConstructor("Kazakhstan", "Astana",18); CountryConstructor country3=new CountryConstructor("Honduras", "Tegucigalpa",25); CountryConstructor country4=new CountryConstructor(); //NON ARGUMENT CONSTRUCTOR, PRINTS FIRST //PRINT INFORMATION country1.displayInfo(); country2.displayInfo(); country3.displayInfo(); } }
[ "lindakathy19@gmail.com" ]
lindakathy19@gmail.com
f17a8587f2b07a8d3dc8a2c81c897c9821d35b18
765ec200f64ac20d1506dfe911e3477267c8bcc5
/service/src/main/java/com/epam/lab/beseda/service/search/NewsSearchByAuthorCriteria.java
163ba5a9f6c5331390ceb7fb5ef67ec34b179092
[]
no_license
BesedaM/NewsManagement
f0fc95603aa14dd441a60dba96e27fc6ca2769a8
999d3e4bdbf7a47dc21ae6308f9914bd3c6320a4
refs/heads/task01
2022-12-27T08:44:26.276577
2020-03-25T20:17:59
2020-03-25T20:17:59
250,068,512
0
0
null
2022-12-16T15:22:02
2020-03-25T19:11:53
Java
UTF-8
Java
false
false
1,089
java
package com.epam.lab.beseda.service.search; import com.epam.lab.beseda.dto.AuthorDTO; import com.epam.lab.beseda.dto.NewsDTO; import com.epam.lab.beseda.entity.News; import com.epam.lab.beseda.service.modelmapper.AuthorMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.List; @Service public class NewsSearchByAuthorCriteria extends NewsSearchCriteria { @Autowired @Qualifier("authorMapper") private AuthorMapper authorMapper; public List<NewsDTO> findByAuthor(AuthorDTO author) { List<NewsDTO> newsDTOList = new ArrayList<>(); if (author != null && author.getName() != null && author.getSurname() != null) { List<News> newsList = dao.getNewsByAuthor(authorMapper.toEntity(author)); for (News nn : newsList) { newsDTOList.add(mapper.toDto(nn)); } } return newsDTOList; } }
[ "Maryia_Biaseda@epam.com" ]
Maryia_Biaseda@epam.com
8c15e272409e434afd9c5e4b946b3e6c9b873f9b
c827bfebbde82906e6b14a3f77d8f17830ea35da
/Development3.0/utilities/test-harness/src/main/java/com/headstrong/fusion/configGenerator/dataFactory/DataException.java
79f7a73c7bbcbf1d978a5d8845a9495e7da0f9d2
[]
no_license
GiovanniPucariello/TeevraCore
13ccf7995c116267de5c403b962f1dc524ac1af7
9d755cc9ca91fb3ebc5b227d9de6bcf98a02c7b7
refs/heads/master
2021-05-29T18:12:29.174279
2013-04-22T07:44:28
2013-04-22T07:44:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
519
java
package com.headstrong.fusion.configGenerator.dataFactory; public class DataException extends RuntimeException { public DataException() { super(); // TODO Auto-generated constructor stub } public DataException(String arg0, Throwable arg1) { super(arg0, arg1); // TODO Auto-generated constructor stub } public DataException(String arg0) { super(arg0); // TODO Auto-generated constructor stub } public DataException(Throwable arg0) { super(arg0); // TODO Auto-generated constructor stub } }
[ "ritwik.bose@headstrong.com" ]
ritwik.bose@headstrong.com
c59ba63f91d607ec7101b53e967df90f102f3f90
ff1812171a0b1c6a949c912751644e2703b06e59
/app/src/main/java/fr/srombauts/sjlb/service/ResponseReceiver.java
c2468be32598b60a798434146803ec9cee6ed7e1
[]
no_license
SRombauts/sjlb
17f097cd46b768f144e5735dd97491587e7bea88
06075c0404cb8f5447f8ad3efb19241522c092d5
refs/heads/master
2023-06-15T08:06:10.678884
2016-12-31T17:46:29
2017-01-04T21:03:49
45,773,129
0
0
null
null
null
null
UTF-8
Java
false
false
1,571
java
package fr.srombauts.sjlb.service; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; import android.content.IntentFilter; /** * BroadcastReceiver gestionnaire des abonnements aux réponses du service SJLB * * Destiné à ce que les Activity rafraîchissent leur affichage dès la réponse reçue. * * @author SRombauts */ public class ResponseReceiver extends BroadcastReceiver { OnServiceResponseListener mOnServiceResponseListener = null; /** * Enregistre le BroadcastReceiver sur ACTION_RESPONSE et l'associe à un Listener de l'Activity qui souhaite être notifié * * @param aResponseListener Contexte implémentant le listener recevant les notifications */ public ResponseReceiver(OnServiceResponseListener aResponseListener) { mOnServiceResponseListener = aResponseListener; IntentFilter filter = new IntentFilter(ServiceSJLB.ACTION_RESPONSE); ((Context)aResponseListener).registerReceiver(this, filter); } /** * Désenregistre le BroadcastReceiver et le OnResponseListener * * @param aContext Contexte de désenregistrement du BroadcastReceiver */ public void unregister(Context aContext) { aContext.unregisterReceiver(this); mOnServiceResponseListener = null; } @Override public void onReceive(Context context, Intent intent) { if (null != mOnServiceResponseListener) { mOnServiceResponseListener.onServiceResponse(intent); } } }
[ "sebastien.rombauts@gmail.com" ]
sebastien.rombauts@gmail.com
126aece9c506291b9eb551051afb93abe4d88370
22c917e5a09aaafb71721876e08e7fffb8c89ce4
/MotorEncoderAbsoluteReader/src/org/usfirst/frc/team4485/robot/Robot.java
785c79df97e3cd2c93db6cda48e85692028f40e2
[]
no_license
TribeTech4485/FRC_Gorilla
8cbaf2ff265b212ac557665086bf7efd1f6bbad0
9a09e2f265b543f96239f04be06e5f0534fe3fa8
refs/heads/master
2021-05-09T16:26:05.377143
2018-02-10T01:22:31
2018-02-10T01:22:31
119,115,784
0
0
null
null
null
null
UTF-8
Java
false
false
3,974
java
/*----------------------------------------------------------------------------*/ /* Copyright (c) 2017-2018 FIRST. All Rights Reserved. */ /* Open Source Software - may be modified and shared by FRC teams. The code */ /* must be accompanied by the FIRST BSD license file in the root directory of */ /* the project. */ /*----------------------------------------------------------------------------*/ package org.usfirst.frc.team4485.robot; import edu.wpi.first.wpilibj.SampleRobot; import edu.wpi.first.wpilibj.Joystick; import edu.wpi.first.wpilibj.Timer; import org.usfirst.frc.team4485.robot.Subsystems.PIDController.*; import com.ctre.phoenix.motorcontrol.ControlMode; import com.ctre.phoenix.motorcontrol.FeedbackDevice; import com.ctre.phoenix.motorcontrol.can.WPI_TalonSRX; import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; /** * This is a demo program showing the use of the RobotDrive class. The * SampleRobot class is the base of a robot application that will automatically * call your Autonomous and OperatorControl methods at the right time as * controlled by the switches on the driver station or the field controls. * * <p>The VM is configured to automatically run this class, and to call the * functions corresponding to each mode, as described in the SampleRobot * documentation. If you change the name of this class or the package after * creating this project, you must also update the build.properties file in the * project. * * <p>WARNING: While it may look like a good choice to use for your code if * you're inexperienced, don't. Unless you know what you are doing, complex code * will be much more difficult under this system. Use IterativeRobot or * Command-Based instead if you're new. */ public class Robot extends SampleRobot { WPI_TalonSRX talon; PIDController pidController; SPID spid; public Robot() { //Constructor for the robot } @Override public void robotInit() { //Initialize robot stuff here talon = new WPI_TalonSRX(1); //(int) is the port Device Id talon.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Absolute, 0, 10); //Sets feedback sensor to (FeedbackDevice, ?, timeout_ms) pidController = new PIDController(); spid = new SPID(); spid.dGain = 0; spid.dState = 0; spid.iGain = 0; spid.iMax = 0; spid.iMin = 0; spid.iState = 0; spid.pGain = 0; pidController.setSPID(spid); SmartDashboard.putNumber("PID P", spid.pGain); SmartDashboard.putNumber("PID I", spid.iGain); SmartDashboard.putNumber("PID D", spid.dGain); } @Override public void autonomous() { //Auto goes here } @Override public void operatorControl() { double velocity=0; double position=0; double targetPosition = 420; while (isOperatorControl() && isEnabled()) { velocity = talon.getSelectedSensorVelocity(0); // Gets the speed of the motor, stores it in velocity position = talon.getSelectedSensorPosition(0); // Gets the position of the motor, stores it in position SmartDashboard.putNumber("Encoder Velocity", velocity); //Shows velocity on the SmartDashboard SmartDashboard.putNumber("Encoder Position", position); //Shows position on the SmartDashboard spid.pGain = SmartDashboard.getNumber("PID P", 0); spid.iGain = SmartDashboard.getNumber("PID I", 0); spid.dGain = SmartDashboard.getNumber("PID D", 0); pidController.setSPID(spid); SmartDashboard.putNumber("PID P", spid.pGain); SmartDashboard.putNumber("PID I", spid.iGain); SmartDashboard.putNumber("PID D", spid.dGain); double moveAmount = pidController.update(targetPosition-position, position); SmartDashboard.putNumber("Move Amount", moveAmount); if(moveAmount > 1) { moveAmount = 1; } else if (moveAmount < -1) { moveAmount = -1; } talon.set(moveAmount); Timer.delay(0.001); // (time in ms) } } }
[ "bobnosn@gmail.com" ]
bobnosn@gmail.com
8f38550a94394530fe08ffdda8e09d5d83aedf37
d632000367ef3e3a92b3cfa65839cd9d705acfea
/MallGUI/src/main/java/com/mall/MallGUI.java
568d696ac246f66cc7d67a8ae562649cf8f9606f
[]
no_license
McKayne/MallDB
f3b509ad10c221a04e1d69052dabb043e2cab9cd
f45411c9af586ac541eae70bdcd0ecdcd5d9599b
refs/heads/master
2020-03-24T01:54:07.780101
2018-07-28T03:24:02
2018-07-28T03:24:02
142,355,992
0
0
null
null
null
null
UTF-8
Java
false
false
712
java
package com.mall; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; public class MallGUI { public static void main(String[] args) { try { Class.forName("org.postgresql.Driver"); try (Connection connection = DriverManager.getConnection("jdbc:postgresql://127.0.0.1:5432/mall", "postgres", "postgres")) { new MallFrame(connection); } } catch (ClassNotFoundException ex1) { ex1.printStackTrace(); } catch (SQLException ex2) { ex2.printStackTrace(); } } }
[ "mc.kayne@yahoo.com" ]
mc.kayne@yahoo.com
402398375ebc66c3d54fc82fa67ac5db89058266
b865daf963873eb236703e2e13c4383144c154b6
/ngay109/src/Abstract/Interface/AnimalService.java
4926a83a8b4806e8ce91fa024435227646d99c0c
[]
no_license
Huytn27/javaCore-Swing
6709d6e8376e8c4a75e448ebeac44b7529640d8d
f773eed29f8c75e47600c46fc424f1cc41e6678f
refs/heads/master
2020-09-30T01:46:07.082880
2019-12-10T16:44:06
2019-12-10T16:44:06
227,169,465
0
0
null
null
null
null
UTF-8
Java
false
false
487
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 Abstract.Interface; /** * * @author User */ public interface AnimalService { //chỉ gồm các pthuc abstract public abstract void them(); public void sua(); // trong interface mọi thứ sẽ ngầm đinh là public abstract; ko có private .......vv void xoa(); }
[ "tranngochuy27111999@gmail.com" ]
tranngochuy27111999@gmail.com
e417f25aeb364966038d4af87a8742ed873cc15f
b1a8838ffc4efd70a9c7cea84e2a82e685560e8d
/app/src/main/java/cn/imustacm/heartbeat/adapter/ItemDragAdapter.java
f24b0f616204b1ca763d8cd4118c62aa901db95d
[]
no_license
43EVER/HeartBeat
384a33f6e7b3ecf7a0ca608c9d0fdae1f715ac01
e637a7b23e009d5f13be9a1d3b77d7d9fde62942
refs/heads/master
2020-04-05T17:28:12.209732
2018-11-11T08:49:18
2018-11-11T08:49:18
157,062,320
1
0
null
null
null
null
UTF-8
Java
false
false
1,396
java
package cn.imustacm.heartbeat.adapter; import com.chad.library.adapter.base.BaseItemDraggableAdapter; import com.chad.library.adapter.base.BaseViewHolder; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.List; import cn.imustacm.heartbeat.R; import cn.imustacm.heartbeat.entity.Dialog; /** * 项目名:HeartBeat * 包名:cn.imustacm.heartbeat.adapter * 文件名:ItemDragAdapter * 描述:对话列表元素适配器 */ public class ItemDragAdapter extends BaseItemDraggableAdapter<Dialog, BaseViewHolder> { // 构造器 public ItemDragAdapter(List<Dialog> data) { super(R.layout.item_draggable_view, data); } // 设置视图内容 @Override protected void convert(BaseViewHolder helper, Dialog item) { helper.setText(R.id.tv, item.getToUser().getName()); helper.setText(R.id.new_message, item.getNewMessage()); helper.setImageResource(R.id.civ_head, item.getToUser().getHead()); // 判断显示时间还是日期 if (Calendar.getInstance().getTime().getTime() - item.getCreateAt().getTime().getTime() < 86400 * 1000) { helper.setText(R.id.date, new SimpleDateFormat("HH:mm").format(item.getCreateAt().getTime())); } else { helper.setText(R.id.date, new SimpleDateFormat("yyyy/MM/dd").format(item.getCreateAt().getTime())); } } }
[ "i@43ever.me" ]
i@43ever.me
5a147eec230d8f755061e1692b00946123f97d59
08916b09ce154fd1577f552ea9fda8c5e83b8499
/src/Modelo/SistemaControl.java
a24909c5195af77084396bfdc3109f718144b0de
[]
no_license
miguelgz97/TrabajoPatrones
504d5ed1e0d0a4a86b1345b0782e1c7ae24bf4f3
f4b85b988b7b85ca70ace3d437727286b0929631
refs/heads/master
2021-04-15T07:28:40.736458
2018-04-02T00:21:01
2018-04-02T00:21:01
126,854,588
0
0
null
null
null
null
UTF-8
Java
false
false
2,631
java
package Modelo; import java.util.ArrayList; import java.util.Observer; import javafx.beans.InvalidationListener; import javafx.beans.Observable; public class SistemaControl implements Observable{ private final ArrayList<Observer> observadores; private SistemaIluminacion si; private SistemaFiltracion sf; private SistemaClimatizacion scl; private static final String TIPO_ILUMINACION = "Lámpara LED"; private static final float POTENCIA_ILUMINACION = 6000; private static final int LUMENES = 17500; private static final String TIPO_FILTRACION = "Mecánica"; private static final float POTENCIA_FILTRACION = 270; private static final int LH_FILTRACION = 1000; private static final String TIPO_CLIMATIZACION = "Inkbird ITC-1000 2 Rele"; private static final float POTENCIA_CLIMATIZACION = 220; private static final boolean VENTILADOR = true; private static final String TERMOMETRO = "Termometro vidrio Hang On 6 Blau Aquaristic"; public SistemaControl(Observer acuario){ this.observadores = new ArrayList(); //Registramos al acuario como observador this.registrarObservador(acuario); this.si = new SistemaIluminacion(TIPO_ILUMINACION,POTENCIA_ILUMINACION,false,false,LUMENES); this.sf = new SistemaFiltracion(TIPO_FILTRACION,POTENCIA_FILTRACION,false,false,LH_FILTRACION); this.scl = new SistemaClimatizacion(TIPO_CLIMATIZACION,POTENCIA_CLIMATIZACION,false,false,VENTILADOR,TERMOMETRO); } //PATRON OBSERVADOR public void registrarObservador(Observer o){ observadores.add(o); } public void borrarObservador(Observer o){ int i = observadores.indexOf(o); if(i >= 0){ observadores.remove(i); } } public void notificarObservadores(){ for (int i = 0 ; i < observadores.size() ; i++){ Observer observador = (Observer) observadores.get(i); //observador.update(o, i); } } public void cambiosRealizados(){ this.notificarObservadores(); } @Override public void addListener(InvalidationListener listener) { throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. } @Override public void removeListener(InvalidationListener listener) { throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates. } }
[ "cerbe@192.168.1.202" ]
cerbe@192.168.1.202
1d026fe2c441ee1f8556e9aeb43117790a95e401
8c4c0e3a496f74d955a299dc9dfad2ceefbcf82f
/Palindrome/HrushikeshChoudhary.java
6857cb96d78eee01f2c7afddab4eaa35c5f51e5a
[ "MIT" ]
permissive
shwethabm/Hacktoberfest-2k17
002e9a97ebfcae001e199155e4c904d28573bd94
87383df4bf705358866a5a4120dd678a3f2acd3e
refs/heads/master
2020-03-31T04:31:42.151588
2017-11-03T11:18:25
2017-11-03T11:18:25
151,909,308
0
1
MIT
2018-10-08T15:20:35
2018-10-07T05:33:08
C
UTF-8
Java
false
false
437
java
import java.util.Scanner; import java.io.*; class Palindrome { public static void main (String[] args) { Scanner in = new Scanner(System.in); String str = in.next(); str = str.toLowerCase(); String revStr = ""; for(int i = str.length()-1; i>=0; i--){ revStr += str.charAt(i); } if(str.equals(revStr)) { System.out.println("Palindrome!"); } else { System.out.println("Not a Palindrome!"); } } }
[ "hrushikeshchoudhary@gmail.com" ]
hrushikeshchoudhary@gmail.com
210ec6bb1764be6f148a380787f9a214a0e695a7
825c38abf9d891832825b6489bc24e1fcb6a4bd3
/app/src/androidTest/java/com/example/myrestaurants/RestaurantListActivityInstrumentationTest.java
8971a7d27ab17fc27e76f6a6addf9c9cd2e5f410
[]
no_license
ArundaVictor/Restaurants
38857dd052624f0ef19f0b6f2961d3c102c9179e
ab81dee3ed451e5fa42c20b272f82261cf923dd4
refs/heads/master
2020-04-28T05:04:14.117895
2019-03-18T07:57:23
2019-03-18T07:57:23
175,005,856
0
0
null
null
null
null
UTF-8
Java
false
false
1,545
java
package com.example.myrestaurants; import android.support.test.rule.ActivityTestRule; import android.view.View; import com.example.myrestaurants.ui.RestaurantListActivity; import org.junit.Rule; import org.junit.Test; import static android.support.test.espresso.Espresso.onData; import static android.support.test.espresso.Espresso.onView; import static android.support.test.espresso.action.ViewActions.click; import static android.support.test.espresso.assertion.ViewAssertions.matches; import static android.support.test.espresso.matcher.RootMatchers.withDecorView; import static android.support.test.espresso.matcher.ViewMatchers.withId; import static android.support.test.espresso.matcher.ViewMatchers.withText; import static org.hamcrest.CoreMatchers.anything; import static org.hamcrest.core.IsNot.not; public class RestaurantListActivityInstrumentationTest { @Rule public ActivityTestRule<RestaurantListActivity> activityTestRule = new ActivityTestRule<>(RestaurantListActivity.class); @Test public void listItemClickDisplaysToastWithCorrectRestaurant() { View activityDecorView = activityTestRule.getActivity().getWindow().getDecorView(); String restaurantName = "Sweet Hereafter"; onData(anything()) // .inAdapterView(withId(R.id.listView)) .atPosition(0) .perform(click()); onView(withText(restaurantName)).inRoot(withDecorView(not(activityDecorView))) .check(matches(withText(restaurantName))); } }
[ "victoroyugi31@gmail.com" ]
victoroyugi31@gmail.com
44dd50077c5115401a75be317b43cef2871719af
957f5082b11ddebe4361ccb65c77f2536d935365
/examples/module8/LightBulbPanel.java
0bf472069ca4a433b619d680c842c38c74f24b42
[]
no_license
BoiseState/CS121-Public
5108f3481a0dd1d8d3bb20e3264febc4cfc15d0b
29dc2854784a06508fe1b2e21284f60de218b01d
refs/heads/master
2023-05-25T19:43:26.179357
2023-05-12T15:51:54
2023-05-12T15:51:54
122,404,072
6
46
null
null
null
null
UTF-8
Java
false
false
1,138
java
import java.awt.Color; import java.awt.Graphics; import javax.swing.ImageIcon; import javax.swing.JLabel; import javax.swing.JPanel; /** * Represents the image for the LightBulb program. * @author Java Foundations * */ @SuppressWarnings("serial") public class LightBulbPanel extends JPanel { private boolean on; private ImageIcon lightOn, lightOff; private JLabel imageLabel; /** * Constructor: Sets up the images and the initial state. */ public LightBulbPanel() { lightOn = new ImageIcon("lightBulbOn.gif"); lightOff = new ImageIcon("lightBulbOff.gif"); setBackground(Color.black); on = true; imageLabel = new JLabel(lightOff); add(imageLabel); } /* (non-Javadoc) * @see javax.swing.JComponent#paintComponent(java.awt.Graphics) */ public void paintComponent(Graphics page) { super.paintComponent(page); if (on) imageLabel.setIcon(lightOn); else imageLabel.setIcon(lightOff); } /** * Sets the status of the light bulb. * @param lightBulbOn */ public void setOn(boolean lightBulbOn) { on = lightBulbOn; } }
[ "75319473+sarahmurphy474@users.noreply.github.com" ]
75319473+sarahmurphy474@users.noreply.github.com
581b492ef25481d1088ac805947224bd70add2d1
02f1c1a2fe15bf231794b7f9c5b23359e36b8fae
/app/src/main/java/cn/com/chinau/widget/WheelAdapter.java
ca4c81dce25f8dd5e17c5fa33242c5ef5b249174
[]
no_license
huyq119/stamp
52689d0ca31e2b7705a83290944a2525d3c270a2
2e31d83b69f9b1d301b6a3c911a1747f1c875f96
refs/heads/master
2021-01-12T10:33:20.853557
2017-02-16T08:48:50
2017-02-16T08:48:50
81,312,290
0
0
null
null
null
null
UTF-8
Java
false
false
1,226
java
/* * Copyright 2010 Yuri Kanivets * * 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 cn.com.chinau.widget; /** * Wheel adapter interface * * @deprecated Use WheelViewAdapter */ public interface WheelAdapter { /** * Gets items count * @return the count of wheel items */ public int getItemsCount(); /** * Gets a wheel item by index. * * @param index the item index * @return the wheel item text or null */ public String getItem(int index); /** * Gets maximum item length. It is used to determine the wheel width. * If -1 is returned there will be used the default wheel width. * * @return the maximum item length or -1 */ public int getMaximumLength(); }
[ "753355530@qq.com" ]
753355530@qq.com
bc3a9c2368ca2ef30d6c3df1b9553b3fe6a8b102
f0818cf5485be456ebc68f93da6bd2b70423db3d
/wms-core/src/main/java/com/lsh/wms/core/dao/pub/PubConfigPageDao.java
0bd24c286de5685390f59a383a684c6add2a2d9c
[ "Apache-2.0" ]
permissive
weiandedidi/work_sys
f421afd38cf4d8f2cfee74d2c88c9c422b7a629c
d2c6358ebef524d93104ad8e003395176a8ac599
refs/heads/master
2020-04-06T04:12:34.036354
2018-01-08T03:45:31
2018-01-08T03:45:31
83,012,292
0
1
null
null
null
null
UTF-8
Java
false
false
507
java
package com.lsh.wms.core.dao.pub; import com.lsh.wms.model.pub.PubConfigPage; import com.lsh.wms.core.dao.MyBatisRepository; import java.util.List; import java.util.Map; @MyBatisRepository public interface PubConfigPageDao { void insert(PubConfigPage pubConfigPage); void update(PubConfigPage pubConfigPage); PubConfigPage getPubConfigPageById(Integer id); Integer countPubConfigPage(Map<String, Object> params); List<PubConfigPage> getPubConfigPageList(Map<String, Object> params); }
[ "weiandedidi@163.com" ]
weiandedidi@163.com
3f3e99636415a9df1698c4d31459386d65538f76
f56816560f4b6a8b329281eee9885d1b96625071
/src/love/lipbcu/learnjava/p023_genericclass/GenericClass.java
5364063cbbd85baf552c5a0832041c4f5f0af4ca
[]
no_license
ArisQ/learn-java
3b3bea1abacaace74e093de1f934d2702c044b7a
d8e58111ca14c865cad825b1c3b670930ae2e97c
refs/heads/master
2022-03-16T00:32:42.548355
2019-11-09T18:37:45
2019-11-09T18:37:45
209,459,556
0
0
null
null
null
null
UTF-8
Java
false
false
2,693
java
package love.lipbcu.learnjava.p023_genericclass; import love.lipbcu.learnjava.p008_array.Array; import java.time.LocalDate; import java.util.Arrays; public class GenericClass { public static void main(String[] args) { // 泛型类 String[] words = {"Mary", "had", "a", "little", "lamb"}; System.out.println("words: " + Arrays.toString(words)); Pair<String> mm = minmax(words); System.out.println("min = " + mm.getFirst()); System.out.println("max = " + mm.getSecond()); // 泛型方法 Integer[] integers = {1, 2, 3, 4, 5}; System.out.println("integers: " + Arrays.toString(integers)); System.out.println("str middle = " + getMiddle(words)); System.out.println("int middle = " + getMiddle(integers)); // 类型变量的限定 && 超类型限定 System.out.println("str min = " + min(words)); System.out.println("int min = " + min(integers)); LocalDate[] dates = new LocalDate[]{ LocalDate.now(), LocalDate.now().plusDays(1), LocalDate.now().plusDays(2), LocalDate.now().minusDays(2), }; System.out.println("dates: " + Arrays.toString(dates)); System.out.println("date min = " + min(dates)); // 不能创建参数化类型的数组 // Pair<String>[] pairString = new Pair<String>[10]; Pair<String>[] pairString = (Pair<String>[]) new Pair<?>[10]; // 不能实例化类型变量,查看实现部分 newGenericInstance("xyz"); // 泛型类型在静态上下文无效,见Singleton } public static Pair<String> minmax(String[] words) { if (words == null || words.length == 0) return null; String min = words[0]; String max = words[0]; for (int i = 1; i < words.length; i++) { if (min.compareTo(words[i]) > 0) min = words[i]; if (max.compareTo(words[i]) < 0) max = words[i]; } return new Pair<>(min, max); } // @SuppressWarnings("unchecked") @SafeVarargs public static <T> T getMiddle(T... a) { return a[a.length / 2]; } // public static <T extends Comparable<? super T>> T min(T[] a) { public static <T extends Comparable<T>> T min(T[] a) { if (a == null || a.length == 0) return null; T min = a[0]; for (int i = 1; i < a.length; i++) { if (min.compareTo(a[i]) > 0) min = a[i]; } return min; } public static <T> void newGenericInstance(T a) { // T b = new T(); } }
[ "qiaoli.pg@gmail.com" ]
qiaoli.pg@gmail.com
70e3f8e943e5d64ab0487e92223c1a935e286ec1
545290ab1408994b6a269f3f7d287576c0a5dcc5
/bank 2.x/bank2.0/bank2.0/src/com/cx/bank/util/InvaliWithdrawalException.java
253293afe8c87942578e089c8201ee5478c02d73
[]
no_license
yh0416/bank
b5bb770cecfd89cae67d1c801f35b2836f9b5688
c6f0cef25272f0fa4f45720820537ed51911398f
refs/heads/master
2023-03-20T03:18:45.257218
2019-06-15T22:40:13
2019-06-15T22:40:13
null
0
0
null
null
null
null
UTF-8
Java
false
false
723
java
/** * Copyright (C), 2018, JXAU * FileName: InvaliWithdrawalException * Author: YRH * Date: 2018/8/21 9:05 * Description: 取款不能为负数,为负数时抛异常 * History: * <author> <time> <version> <desc> * 作者姓名 修改时间 版本号 描述 */ package com.cx.bank.util; /** * 〈一句话功能简述〉<br> * 〈取款不能为负数,为负数时抛异常〉 * * @author YRH * @create 2018/8/21 * @since 1.0.0 */ public class InvaliWithdrawalException extends Exception{ public InvaliWithdrawalException(){ super(); } public InvaliWithdrawalException(String msg){ super(msg); } }
[ "yuronghua99@gmail.com" ]
yuronghua99@gmail.com
dd761c040256751d8e3f9a79f96373ba6b494b53
6826b8be1f094357e33ef0443f9a05946ed14b0f
/GmailProject/src/TrainRun.java
3c6edccafecff530bc673412beaf31f4fa38e3b6
[]
no_license
BhavinPatel001/GmailProject
190709dd32eee42a111a46298eaf227385e403ab
547bdd9caedf5bf524462b2e6c4b093db26e1f90
refs/heads/master
2021-05-04T08:51:49.022012
2016-10-09T01:57:53
2016-10-09T01:57:53
70,368,608
0
0
null
null
null
null
UTF-8
Java
false
false
566
java
public class TrainRun { public static void main(String[] args) { // TODO Auto-generated method stub Train trn=new Train(); trn.Destination="Los Angeles"; trn.Number=111; Train trn1=new Train(); trn1.Destination="Orlando"; trn1.Number=555; System.out.println("First Train Destination --> " + trn.Destination); System.out.println("First Train Number " + trn.Number); System.out.println("Second Train Destination --> " + trn1.Destination); System.out.println("Second Train Number " + trn1.Number); } }
[ "Bhavin@Bhavin-HP.mshome.net" ]
Bhavin@Bhavin-HP.mshome.net
fc4179223dce4970884c5e7dc2932ba1e9a1927f
81fbf4b3a8dbdbede7835fd30033d292e09d94d7
/src/testcase/ChangePasswordCase.java
4f522544cf8560cd642a986bba7a419fd8d81ed9
[]
no_license
ychen8/PageResource
6302df8c545fcd93d39f7604576a43de019ebff8
cab4e7f4cb8103447589cecc841afa6e7c211bfe
refs/heads/master
2021-01-10T01:15:14.101811
2016-02-01T10:07:47
2016-02-01T10:07:47
47,177,924
1
1
null
null
null
null
UTF-8
Java
false
false
3,916
java
package testcase; import page.ChangePasswordPage; import page.LoadingImg; import page.PersonSetPage; import com.android.uiautomator.core.UiDevice; import com.android.uiautomator.testrunner.UiAutomatorTestCase; /** * Description: * Date: 2016-1-8 * @author 李怡萱 * */ public class ChangePasswordCase extends UiAutomatorTestCase { ChangePasswordPage changepassword = new ChangePasswordPage(); LoadingImg loadingimg = new LoadingImg(); PersonSetPage personsetpage = new PersonSetPage(); public void testChangePasswordCase() { System.out.println("测试修改密码页"); assertTrue(changepassword.titleExist());//标题存在 assertEquals("修改密码", changepassword.titleText()); assertTrue(changepassword.returnExist());//返回按钮存在 assertTrue(changepassword.pwCurExist());//当前密码存在 assertEquals("当前密码", changepassword.pwCurText()); assertTrue(changepassword.pwNewExist());//新密码 assertEquals("新密码", changepassword.pwNewText()); assertTrue(changepassword.tipExist());//提示存在 assertEquals("密码为6-18位英文字母、数字或符号", changepassword.tipText()); assertTrue(changepassword.showCkExist());//显示密码存在 assertEquals("显示密码", changepassword.showCkText()); assertTrue(changepassword.showCkChecked());//显示密码被勾选 assertTrue(changepassword.pwModfiyExist());//确定按钮存在 assertEquals("确 定", changepassword.pwModifyText()); assertFalse(changepassword.pwModifyEnable());//确定按钮置灰 changepassword.pwCur19Set();//输入19位密码1122334455667788990 assertEquals("112233445566778899", changepassword.pwCurText());//只显示前18位 changepassword.pwNew19Set();//输入19位新密码1122334455667788990 assertEquals("112233445566778899", changepassword.pwCurText());//只显示前18位 assertTrue(changepassword.pwModifyEnable());//确定按钮被激活 changepassword.pwModfiyClick();//确定 do {sleep(1000);} while (loadingimg.loadingImgExist());//loading... assertEquals("密码不正确", changepassword.confirmTextText());//弹窗提示 changepassword.okBtnClick();//弹窗确定 changepassword.showCkClick();//不显示密码 assertEquals("", changepassword.pwCurText());//密码值为空 assertEquals("", changepassword.pwNewText());//密码值为空 changepassword.pwCurClear1(); changepassword.pwCur5Set();//输入5位密码12345 assertFalse(changepassword.pwModifyEnable());//确定按钮置灰 changepassword.pwCurClear1(); changepassword.pwCur19Set();//输入19位密码 changepassword.pwNewClear1(); changepassword.pwNew5Set();//输入5位新密码12345 assertFalse(changepassword.pwModifyEnable());//确定按钮置灰 changepassword.pwCurClear1(); changepassword.pwCurSet();//输入正确密码 changepassword.pwNewClear1(); changepassword.pwNewSet();//输入正确密码 changepassword.pwModfiyClick();//确定 do {sleep(1000);} while (loadingimg.loadingImgExist()); assertTrue(changepassword.confirmTextExist());//弹窗文字存在 assertEquals("密码修改成功", changepassword.confirmTextText()); assertTrue(changepassword.okBtnExist());//确定按钮存在 changepassword.okBtnClick();//确定 personsetpage.llModifyPassClick();//把密码改回来 sleep(1000); changepassword.pwCurClear1(); changepassword.pwCur1Set();//输入正确密码 changepassword.pwNewClear1(); changepassword.pwNew1Set();//输入正确密码 changepassword.pwModfiyClick();//确定 do {sleep(1000);} while (loadingimg.loadingImgExist()); assertEquals("密码修改成功", changepassword.confirmTextText()); changepassword.okBtnClick();//确定 } }
[ "yx.li07@zuche.com" ]
yx.li07@zuche.com
4cf71587f7906aeca9be0014d34179d53d080fbc
7ea85ccc2e59303145538d74444cb1efe0e7d24e
/kafka-demo/src/main/java/com/baizhi/demo1/ProducerDemo.java
a7021692193e12f6dcefad6ddd53b5358cdd43aa
[]
no_license
lkp19960619/BigDataTest
1c072f94ff0684f1850f26d64ad661cc91dc0789
dccc282df55621f71f7e493e0983132dabc9ee1d
refs/heads/master
2022-10-07T04:52:04.630786
2019-11-20T16:19:07
2019-11-20T16:19:07
216,709,866
0
1
null
2023-09-05T22:00:32
2019-10-22T02:51:35
Scala
UTF-8
Java
false
false
1,313
java
package com.baizhi.demo1; import org.apache.kafka.clients.producer.KafkaProducer; import org.apache.kafka.clients.producer.ProducerConfig; import org.apache.kafka.clients.producer.ProducerRecord; import org.apache.kafka.common.serialization.StringSerializer; import java.util.Properties; import java.util.UUID; public class ProducerDemo { public static void main(String[] args) { //准备kafka生产者的配置信息 Properties properties = new Properties(); properties.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG,"HadoopNode01:9092,HadoopNode02:9092,HadoopNode03:9092"); //把record的key和value进行序列化 properties.put(ProducerConfig.KEY_SERIALIZER_CLASS_CONFIG, StringSerializer.class); properties.put(ProducerConfig.VALUE_SERIALIZER_CLASS_CONFIG,StringSerializer.class); //创建生产者对象 KafkaProducer<String, String> producer = new KafkaProducer<String, String>(properties); //生产记录并发布 for (int i = 300; i < 310; i++) { ProducerRecord<String, String> record = new ProducerRecord<String, String>("t1", UUID.randomUUID().toString(), "Hello,Kafka"+i); producer.send(record); } //释放资源 producer.flush(); producer.close(); } }
[ "lkp1107440885@163.com" ]
lkp1107440885@163.com
a862062c187d78173d8caa4210607760f968ad98
a4aac8026a612275822e5a8e6f9fa21df17c08ee
/src/main/java/com/fsnip/bigdata/mapreduce/join/JoinMapper.java
1f29980947a139c919901d3bb86f107aba319e06
[]
no_license
Spencerzsp/MapReduce
82312a89dd141fbeb905f63220f63092103ae576
ec81f33ae110ca2581feae6571221939a7c3a695
refs/heads/master
2022-05-09T21:55:45.420853
2019-10-14T12:38:08
2019-10-14T12:38:09
215,041,279
0
0
null
2022-04-12T21:57:22
2019-10-14T12:42:38
Java
UTF-8
Java
false
false
1,080
java
package com.fsnip.bigdata.mapreduce.join; import java.io.IOException; import org.apache.hadoop.io.LongWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.Mapper; import org.apache.hadoop.mapreduce.lib.input.FileSplit; public class JoinMapper extends Mapper<LongWritable, Text, Text, Item>{ @Override protected void map(LongWritable key, Text value, Mapper<LongWritable, Text, Text, Item>.Context context) throws IOException, InterruptedException { String line = value.toString(); String[] info = line.split(" "); Item item = new Item(); FileSplit split = (FileSplit) context.getInputSplit(); if(split.getPath().getName().startsWith("order")){ item.setId(info[0]); item.setDate(info[1]); item.setPid(info[2]); item.setAmount(Integer.parseInt(info[3])); item.setName(""); item.setPrice(0.0); }else{ item.setPid(info[0]); item.setName(info[1]); item.setPrice(Double.parseDouble(info[2])); item.setId(""); item.setDate(""); item.setAmount(0); } context.write(new Text(item.getPid()), item); } }
[ "spencer_spark@sina.com" ]
spencer_spark@sina.com
80a589af5079f5898269d0e8e146dedad90094b6
f3bfec59b8c127bdd9d62adf43570cefd92b63a6
/app/src/main/java/com/example/muonsach/data/Data.java
4352f3069a5cb4f5f4294318bb359c4e78f2aa60
[]
no_license
xatkumaulank/MuonSach
7d2d5c2195e8fb425a1243f8f3b4a7f3e4bed7ba
e44d02edb80835dbed3f0eb04a28aa8933dcba4e
refs/heads/master
2023-06-21T06:19:44.559194
2021-07-25T03:45:05
2021-07-25T03:45:05
387,634,654
0
0
null
null
null
null
UTF-8
Java
false
false
78,951
java
package com.example.muonsach.data; import com.example.muonsach.R; import com.example.muonsach.obj.Photo; import java.util.ArrayList; import java.util.List; public class Data { public static void addListDetailCategory(){ UploadData.addBookToCategory("Sách kinh tế","https://salt.tikicdn.com/cache/w444/ts/product/0e/29/9e/33f67f3c2bdd3e3d47c05ba624120578.jpg"," Lưu Vệ Hoa - Trương Hân Vũ","Sách Hay: Em Phải Đến Harvard Học Kinh Tế",5); UploadData.addBookToCategory("Sách kinh tế","https://salt.tikicdn.com/cache/w444/ts/product/b0/9d/ce/1421c2a0f281dd41c0c83444dce9e465.jpg","Robert S. Pindyck, Daniel L. Rubinfeld","Kinh Tế Học Vi Mô",5); UploadData.addBookToCategory("Sách kinh tế","https://salt.tikicdn.com/cache/w444/ts/product/9c/49/e2/f4bb310e479467a611c2bc59b995260c.jpg","John Carreyrou","Sách Kinh Tế - Bài Học Kinh Doanh: BAD BLOOD - Máu Bẩn",5); UploadData.addBookToCategory("Sách kinh tế","https://salt.tikicdn.com/cache/w444/ts/product/fb/b5/3c/31d32909afce3ba2decbd9d30fa7f374.jpg","Andreas M. Antonopoulos","Internet Của Tiền Tệ",5); UploadData.addBookToCategory("Sách kinh tế","https://salt.tikicdn.com/cache/w444/ts/product/bb/4f/83/ebeba86cb38682a10d2303f764009f7f.jpg","Michael Lewis","Bong Bóng Kinh Tế Và Làn Sóng Vỡ Nợ Quốc Gia",5); UploadData.addBookToCategory("Sách kinh tế","https://salt.tikicdn.com/cache/w444/ts/product/80/b5/1f/3deee23f11ab8ce764784123822db5a3.jpg","Nicolas Darvas","Tôi Đã Kiếm Được 2 000 000 Đô-La Từ Thị Trường Chứng Khoán Như Thế Nào?",5); UploadData.addBookToCategory("Sách kinh tế","https://salt.tikicdn.com/cache/w444/ts/product/14/f4/b4/7bb774673206d0b3f70fe909c0006a96.jpg","Trần Thanh Phong","Đừng Để Mất Bò - 7 Bước Quản Lý Cửa Hàng Hiệu Quả Và Chống Thất Thoát",5); UploadData.addBookToCategory("Sách kinh tế","https://salt.tikicdn.com/cache/w444/ts/product/38/68/44/b23586292aa7019e802bd2a115d47645.jpg","GEORGE SAMUEL CLASON","Người Giàu Có Nhất Thành Babylon (Tái Bản 2020)",5); UploadData.addBookToCategory("Sách kỹ năng","https://salt.tikicdn.com/cache/w444/ts/product/2f/6a/c8/e553ab307e9795dfd3f259ff103ed844.jpg","Peter Hollins","Sống Kỷ Luật, Gặt Thành Công",5); UploadData.addBookToCategory("Sách kỹ năng","https://salt.tikicdn.com/cache/w444/ts/product/e7/3a/33/d90504644a26715758f68aa20eebbde5.jpg","Lư Tư Hạo","Trời Sinh Vụng Về, Hãy Bù Đắp Bằng Sự Kiên Trì\n",5); UploadData.addBookToCategory("Sách kỹ năng","https://salt.tikicdn.com/cache/w444/ts/product/b6/b4/51/e587448a1beb83f6f9919fc53d3fbfae.jpg","Liêu Trí Phong","Mỗi Lần Vấp Ngã Là Một Lần Trưởng Thành",5); UploadData.addBookToCategory("Sách kỹ năng","https://salt.tikicdn.com/cache/w444/ts/product/a9/01/99/891cebb2c08960fbac214c239b27681f.jpg","A.Bennett","Sách Sống 24 giờ một ngày",5); UploadData.addBookToCategory("Sách kỹ năng","https://salt.tikicdn.com/cache/w444/ts/product/87/c9/c0/bfebf4adcb31c8eb5c39fd3779cc4b68.jpg","Vãn Tình","Bạn Đắt Giá Bao Nhiêu?",5); UploadData.addBookToCategory("Sách kỹ năng","https://salt.tikicdn.com/cache/w444/ts/product/34/0f/8b/9454467ac316ea683f93ff25405eee34.jpg","Vãn Tình","Khí Chất Bao Nhiêu, Hạnh Phúc Bấy Nhiêu",5); UploadData.addBookToCategory("Sách kỹ năng","https://salt.tikicdn.com/cache/w444/ts/product/a7/60/ef/ca49f29ec16d25b87383f369471ab42e.jpg","Yun Naru, Shin Dohyeon","Sức Mạnh Của Ngôn Từ",5); UploadData.addBookToCategory("Sách kỹ năng","https://salt.tikicdn.com/cache/w444/ts/product/6d/af/9c/55a1d35282f15a0d0b9ce65879d946b1.png","Zion Kabasawa","Làm Sao Học Ít Hiểu Nhiều",5); UploadData.addBookToCategory("Sách kỹ năng","https://salt.tikicdn.com/cache/w444/ts/product/95/c5/71/f260011660001af960c42d7d2f1c5dc1.jpg","Kiên Trần","Đừng Chạy Theo Số Đông",5); UploadData.addBookToCategory("Sách sức khỏe","https://salt.tikicdn.com/cache/w444/ts/product/79/1e/cf/a7e6db9af2dbf7fb395dab6e03842896.jpg","Nicolette Richer","Sống Sạch Để Xanh Ăn Lành Để Khỏe - Chế Độ Dinh Dưỡng Giúp Tăng Sức Đề Kháng Phòng Chống Ung Thư",5); UploadData.addBookToCategory("Sách sức khỏe","https://salt.tikicdn.com/cache/w444/ts/product/b8/86/71/1b9a82a388df9bc882240b71c6521721.jpg","Michael Greger, Gene Stone","Ăn Gì Không Chết - Sức Mạnh Chữa Lành Của Thực Phẩm",5); UploadData.addBookToCategory("Sách sức khỏe","https://salt.tikicdn.com/cache/w444/ts/product/1e/d4/a7/1974f5197502d01688cb747c0ceed768.jpg","Michael Pollan","Ăn Uống Đúng Cách: Bộ Quy Tắc Ẩm Thực Lành Mạnh",5); UploadData.addBookToCategory("Sách sức khỏe","https://salt.tikicdn.com/cache/w444/ts/product/63/4f/92/61ab4f08e68ad77eeac0cce58470faa7.jpg","BS. Ngô Đức Hùng","3 Phút Sơ Cứu",5); UploadData.addBookToCategory("Sách sức khỏe","https://salt.tikicdn.com/cache/w444/ts/product/c6/62/e1/359cbfb80b5fa50d2fa8028db79b22b8.jpg","Bessel Van Der Kolk, M.D","Sang Chấn Tâm Lý - Hiểu Để Chữa Lành",5); UploadData.addBookToCategory("Sách sức khỏe","https://salt.tikicdn.com/cache/w444/ts/product/4b/96/61/ac310ce3e6fa184067a9fcd935217b05.jpg","Norman W.Walker","Raw Vegan – Sức Mạnh Chữa Lành Của Thực Vật",5); UploadData.addBookToCategory("Sách sức khỏe","https://salt.tikicdn.com/cache/w444/ts/product/03/f0/92/3ab7d1160be44db8116f07f09d850b91.jpg","Ryu Seung Sun","Thần Dược Xanh",5); UploadData.addBookToCategory("Sách sức khỏe","https://salt.tikicdn.com/cache/w444/ts/product/ea/98/cb/f4f396747122641b595fb16c3e7706b7.jpg","Cao Bảo Anh (Cẩm Tú Trường), Oopsy","Hệ Miễn Dịch - Kiệt Tác Của Sự Sống",5); UploadData.addBookToCategory("Sách sức khỏe","https://salt.tikicdn.com/cache/w444/ts/product/a5/46/11/35ffaff32ccaf554ec33c5014bbd1bd7.jpg","Ty Bollinger","Ung Thư - Sự Thật, Hư Cấu, Gian Lận Và Những Phương Pháp Chữa Lành Không Độc Hại",5); UploadData.addBookToCategory("Sách sức khỏe","https://salt.tikicdn.com/cache/w444/ts/product/e9/c2/46/638362f90f39cef620d05ecea7256609.jpg","Trương Bá Lễ, Lưu Thanh Tuyền","Chẩn Trị Covid - 19 Bằng Đông Tây Y",5); UploadData.addBookToCategory("Sách thiếu nhi","https://salt.tikicdn.com/cache/w444/ts/product/07/03/48/89dae39ab9fd6fd54ed19d59054df145.jpg","Nguyễn Khang Thịnh","Nhật ký của nhóc Alvin siêu quậy",5); UploadData.addBookToCategory("Sách thiếu nhi","https://salt.tikicdn.com/cache/w444/ts/product/4c/32/45/9d6ce75d49eb319dac2d1c3c01e17f0e.jpg","Đức Thành","Sách Thiếu Nhi Hấp Dẫn: 10 Vạn Câu Hỏi Vì Sao ?",5); UploadData.addBookToCategory("Sách thiếu nhi","https://salt.tikicdn.com/cache/w444/ts/product/b4/37/cc/a17b9ca29f3b26b78d6b3fd4e2275948.jpg","Nhiều tác giả","Sách thiếu nhi - Theo Dòng Thời Gian - Thời Tiền Sử",5); UploadData.addBookToCategory("Sách thiếu nhi","https://salt.tikicdn.com/cache/w444/ts/product/8e/60/36/3a3af6b0a5d6abf9731ebeeb77ceed63.jpg"," Rebecca Gilpin, Erica Harrison","Sách Tương Tác Vừa Học Vừa Chơi - Khủng Long Kỳ Thú",5); UploadData.addBookToCategory("Sách thiếu nhi","https://salt.tikicdn.com/cache/w444/ts/product/16/5a/30/978286e9711d823f6cfac2222d5c5cbd.jpg","Rebecca Gilpin, Erica Harrison","Sách Tương Tác Vừa Học Vừa Chơi - Vũ Trụ Diệu Kỳ",5); UploadData.addBookToCategory("Sách thiếu nhi","https://salt.tikicdn.com/cache/w444/ts/product/9d/7f/a3/7927ca0b1f94ac14652ebdfbd3c54de4.jpg","Robert Winston","Siêu Nhí Hỏi Nhà Khoa Học Trả Lời - 100 Bí Ẩn Mọi Đứa Trẻ Đều Muốn Hỏi Một Nhà Khoa Học",5); UploadData.addBookToCategory("Sách thiếu nhi","https://salt.tikicdn.com/cache/w444/ts/product/84/4b/ce/e26f20546ca434c157d040042bf8518a.jpg","Nhiều tác giả","Sách rèn luyện tư duy cho học sinh - 100 câu đố rèn luyện tư duy khám phá cuộc sống",5); UploadData.addBookToCategory("Sách thiếu nhi","https://salt.tikicdn.com/cache/w444/ts/product/ba/3d/2b/4e0ec4a087bf3ce67c4908291fb75543.jpg","Nguyễn Ngọc Ký","420 Câu Đố Vui Thông Minh (Tái Bản)",5); UploadData.addBookToCategory("Sách thiếu nhi","https://salt.tikicdn.com/cache/w444/ts/product/7d/8a/20/85d543e286aa2ad2b0434d0a33b91510.jpg","Runkids","How? Bố Mẹ Ơi Như Thế Nào…? Những Câu Hỏi How Giúp Con Tò Mò Sáng Tạo?",5); UploadData.addBookToCategory("Sách thiếu nhi","https://salt.tikicdn.com/cache/w444/ts/product/0c/52/f9/6fe3406012d9f50839596e09440234cd.jpg","Runkids","What? Bố Mẹ Ơi Đây Là Cái Gì…? Những Câu Hỏi What Giúp Con Tò Mò Sáng Tạo?",5); UploadData.addBookToCategory("Sách thiếu nhi","https://salt.tikicdn.com/cache/w444/ts/product/b6/b6/97/e0ea6c820cef3821c408d0aac48015be.jpg","Runkids","Why? Bố Mẹ Ơi Tại Sao …? Những Câu Hỏi Why Giúp Con Tò Mò Sáng Tạo?",5); UploadData.addBookToCategory("Sách tư duy","https://salt.tikicdn.com/cache/w444/ts/product/8a/14/14/0388adf64c03d0f48c515ccd77915e27.jpg","Nhiều tác giả","Sách tư duy kỹ năng sống -Tư Duy Phi Đối Xứng - Logic Phía Sau Sự Thành Công Của Thời Đại",5); UploadData.addBookToCategory("Sách tư duy","https://salt.tikicdn.com/cache/w444/ts/product/49/5e/ee/a4d62cfcbd3cdd26c1ec72e03f780816.jpg","Eran Katz","Trí Tuệ Do Thái (Tái Bản 2018)",5); UploadData.addBookToCategory("Sách tư duy","https://salt.tikicdn.com/cache/w444/ts/product/38/21/47/eb00fd978105557112ea749271d93cd8.jpg","Robin Sharma","Ba Người Thầy Vĩ Đại (Tái Bản)",5); UploadData.addBookToCategory("Sách tư duy","https://salt.tikicdn.com/cache/w444/ts/product/d5/26/dd/d00cf77e800bb054981629e0163fe575.jpg","Richard Templar","Những Quy Tắc Tư Duy",5); UploadData.addBookToCategory("Sách tư duy","https://salt.tikicdn.com/cache/w444/ts/product/89/4b/9e/8f9e07cb4156bfd916ddb732524edb93.jpg","Đỗ Thị Diệu Ngọc, Nguyễn Huy Cường","Tư Duy Biện Luận - Nghĩ Hay Hơn Hay Nghĩ",5); UploadData.addBookToCategory("Sách tư duy","https://salt.tikicdn.com/cache/w444/ts/product/4f/98/fd/93eae6fa4ffcd194330a42c05a8a10df.jpg","Humphrey B. Neill","Nghệ Thuật Tư Duy Ngược Dòng",5); UploadData.addBookToCategory("Sách tư duy","https://salt.tikicdn.com/cache/w444/ts/product/ae/d7/09/ab14c84beeb2a1104880cead94ad81d3.jpg","Thomas L. Friedman","Thế Giới Phẳng (Tái Bản)",5); UploadData.addBookToCategory("Tiểu thuyết","https://salt.tikicdn.com/cache/w444/media/catalog/product/1/x/1x2acr3d.u4972.d20170419.t115542.562440.jpg","Yagisawa Satoshi","Những Giấc Mơ Ở Hiệu Sách Morisaki",5); UploadData.addBookToCategory("Tiểu thuyết","https://salt.tikicdn.com/cache/w444/ts/product/5e/18/24/2a6154ba08df6ce6161c13f4303fa19e.jpg","JOSÉ MAURO DE VASCONCELOS","Cây Cam Ngọt Của Tôi",5); UploadData.addBookToCategory("Tiểu thuyết","https://salt.tikicdn.com/cache/w444/ts/product/a1/ef/4f/0b39e40dca3827604c8bc4e867cc9423.jpg","Andrea Hirata","Chiến Binh Cầu Vồng (Tái Bản 2020)",5); UploadData.addBookToCategory("Tiểu thuyết","https://salt.tikicdn.com/cache/w444/ts/product/c9/7c/04/67db9bf2590d75f978e68f9dcfe0db9a.jpg","Brian L. Weiss","Kiếp Nào Ta Cũng Tìm Thấy Nhau",5); UploadData.addBookToCategory("Tiểu thuyết","https://salt.tikicdn.com/cache/w444/ts/product/a2/57/b6/cac2e0ac6f4395d400d29f1aba941d68.jpg","Nguyễn Nhật Ánh","Con Chim Xanh Biếc Bay Về (Nguyễn Nhật Ánh) (Bìa Mềm)",5); UploadData.addBookToCategory("Tiểu thuyết","https://salt.tikicdn.com/cache/w444/ts/product/9a/84/8f/8c3eda2d15fa1ae7a0e13762a0cfa74e.jpg","Haruki Murakami","Rừng Na Uy (Tái Bản Lần 3)",5); UploadData.addBookToCategory("Tiểu thuyết","https://salt.tikicdn.com/cache/w444/ts/product/7c/0d/6c/8fcbd6abc1ac716d07b3593f9b97f53b.jpg","Nina George","Hiệu Sách Nhỏ Ở Paris",5); UploadData.addBookToCategory("Tiểu thuyết","https://salt.tikicdn.com/cache/w444/ts/product/1b/23/23/fc63679e8f1ce6d6f982492cf72d8f9b.jpg","Jerome David Salinger","Bắt Trẻ Đồng Xanh (Tái Bản 2020)",5); UploadData.addBookToCategory("Tiểu thuyết","https://salt.tikicdn.com/cache/w444/ts/product/17/9b/b5/cb4583a96cc641c31e52c59ac98db79b.jpg","Richard Powers","Vòm Rừng",5); UploadData.addBookToCategory("Tiểu thuyết","https://salt.tikicdn.com/cache/w444/ts/product/93/7d/f6/f540320bc2f5205cbbe11d068c565053.jpg","Kawabata Yasunari","Đẹp Và Buồn",5); UploadData.addBookToCategory("Tiểu thuyết","https://salt.tikicdn.com/cache/w444/media/catalog/product/a/n/anh-sang-vo-hinh99.u2566.d20170309.t153021.968209.jpg","Anthony Doerr","Ánh Sáng Vô Hình (Tái Bản 2018)",5); } public static void addListBookDetail() { UploadData.addBookDetailToDb("Sách Hay: Em Phải Đến Harvard Học Kinh Tế","Huy Hoàng Bookstore", "","","Bìa mềm", 500,"","Sách Hay: Em Phải Đến Harvard Học Kinh Tế (Tặng kèm Bookmark Phương Đông Books)\n" + "\n" + "\"Không cứ phải là thần đồng, không cứ phải là giàu có, chỉ cần phương pháp giáo dục đúng đắn, tích cực, mọi đứa trẻ đều sẽ trở thành nhân tài.\"\n" + "\n" + " \n" + "\n" + "Em phải đến Harvard học kinh tế là cuốn sách tường thuật và tổng kết lại những kinh nghiệm nuôi dạy con cái từ lúc lọt lòng cho đến khi thành tài của Lưu Vệ Hoa và Trương Hân Vũ, mẹ và cha dượng của cô bé Lưu Diệc Đình - “cô gái Harvard” - thần tượng học tập của giới trẻ Trung Quốc. Sau khi xuất bản, cuốn cẩm nang này đã giữ ngôi vị best-seller trong suốt 16 tháng liên tục, lượng xuất bản lên tới gần 3 triệu bản, nhận được hưởng ứng tích cực chưa từng thấy từ các bậc phụ huynh. Nhân vật chính của cuốn sách - Lưu Diệc Đình, năm 1996 thi đỗ vào trường trung học ngoại ngữ Thành Đô sau một cuộc cạnh tranh khốc liệt. Sau vô số những nỗ lực tích cực và thành tích xuất sắc, đến năm 1999 đã nhận được giấy báo nhập học và học bổng toàn phần của bốn trường Đại học tại Hoa Kỳ, trong đó có Harvard. Sau đó, cô theo học chuyên ngành Kinh tế học và Toán ứng dụng tại Harvard, tháng 6 năm 2003 tốt nghiệp, vào làm việc trong tập đoàn tư vấn Boston (Boston Consulting Group) nổi tiếng. Hiện cô định cư tại Mỹ. Hôm nay bầu trời thật dễ chịu.\n" + "\n" + " \n" + "\n" + "Đây là cuốn cẩm nang tuyệt vời dành cho các bậc cha mẹ!\n" + "\n" + "Giá sản phẩm trên Tiki đã bao gồm thuế theo luật hiện hành. Tuy nhiên tuỳ vào từng loại sản phẩm hoặc phương thức, địa chỉ giao hàng mà có thể phát sinh thêm chi phí khác như phí vận chuyển, phụ phí hàng cồng kềnh, ....."); UploadData.addBookDetailToDb("Kinh Tế Học Vi Mô","Công ty TNHH MTV In Kinh tế", "2018-01-14 22:00:49","18 x 26 x 3 cm","Bìa mềm", 712,"","Với những bạn đọc quan tâm đến cách thức vận hành của thế giới, Kinh Tế Học Vi Mô có lẽ là lĩnh vực sát thực, thú vị và quan trọng nhất dành cho các bạn. Nắm chắt về kinh tế học Vi mô là điều không thể thiếu khi đưa ra các quyết định ở cấp quản lý, để xây dựng và am hiểu chính sách công và khái quát hơn là để đánh giá cách thức vận động của nền kinh tế hiện đại. Trên thực tế, ngay cả việc hiểu được các tin tức mỗi ngày cũng thường cần đến kiến thức của Kinh tế học Vi mô. \n" + "\n" + "Kinh tế học có vai trò quan trọng không thua kém gì so với hiểu biết về cách kinh doanh, toán học hay vật lí. Và việc nắm được cách các học thuyết kinh tế tác động lên những chính sách kinh tế thế nào và tiếp đó các chính sách này đang hằng ngày ảnh hưởng to lớn đến cuộc sống của chúng ta ra sao càng trở nên quan trọng hơn bao giờ hết."); UploadData.addBookDetailToDb("Sách Kinh Tế - Bài Học Kinh Doanh: BAD BLOOD - Máu Bẩn","Alphabooks", "","16 x 24 cm","Bìa mềm", 500,"","“Câu chuyện này còn điên rồ hơn tôi tưởng, và khi đã mở cuốn sách ra rồi thì tôi không thể đặt nó xuống được nữa. Trong cuốn sách này có tất cả: những trò lừa đảo tinh vi, những âm mưu trong doanh nghiệp, những câu chuyện trang bìa các tạp chí, những mối quan hệ gia đình bị hủy hoại, và sự sụp đổ của một công ty từng được định giá tới gần 10 tỷ đô-la.”\n" + "– Bill Gates"); UploadData.addBookDetailToDb("Internet Của Tiền Tệ","Alphabooks", "","","", 500,"Nhà Xuất Bản Đại Học Kinh Tế Quốc Dân","Internet Của Tiền Tệ\n" + "\n" + "Cuốn sách là tập hợp các bài nói chuyện của Andreas M. Antonopoulos, một trong những chuyên gia hàng đầu thế giới về blockchain và bitcoin. Những bài nói chuyện của ông đã góp phần giúp cho một lĩnh vực vẫn còn mới mẻ, lạ lẫm và phức tạp như blockchain và bitcoin trở nên dễ hiểu và gần gũi hơn. Trong cuốn sách này, tác giả sẽ lý giải tại sao bitcoin lại là một bước đột phá về công nghệ và tài chính với những tiềm năng vượt ra ngoài tên gọi “tiền kỹ thuật số” của nó hiện nay.\n" + "\n" + "Đặc biệt, tác giả còn mở rộng vấn đề, bàn đến những ý nghĩa về mặt triết học, xã hội và lịch sử của bitcoin, cho thấy bitcoin – mạng internet của tiền – đã và đang mang đến những thay đổi cơ bản ra sao đối với cách thức chúng ta xử lý những vấn đề về xã hội, chính trị, và kinh tế thông qua mạng lưới phi tập trung phi tín nhiệm của bitcoin.\n" + "Giá sản phẩm trên Tiki đã bao gồm thuế theo luật hiện hành. Tuy nhiên tuỳ vào từng loại sản phẩm hoặc phương thức, địa chỉ giao hàng mà có thể phát sinh thêm chi phí khác như phí vận chuyển, phụ phí hàng cồng kềnh, ....."); UploadData.addBookDetailToDb("Bong Bóng Kinh Tế Và Làn Sóng Vỡ Nợ Quốc Gia","Alphabooks", "2019-07-01 00:00:00","13 x 20.5 cm","Bìa mềm", 332,"", "Cơn sóng thần tín dụng giá rẻ quét qua thế giới từ năm 2002 đến năm 2008 không phải là một hiện tượng tài chính đơn giản: đó là một sự cám dỗ, một cơ hội cho mọi xã hội phô bày những khía cạnh trong tính cách mà bình thường chúng ta không bao giờ để lộ ra. Người Iceland muốn ngừng câu cá và trở thành nhân viên ngân hàng đầu tư, người Đức muốn trở nên Đức hơn, còn người Ireland không muốn làm người Ireland nữa.\n" + "\n" + "Cuốn sách này bắt đầu với một bản điều tra về những bong bóng vượt ra ngoài nước Mỹ. Nó tuyệt vời và bi hài đến mức các độc giả người Mỹ phải thốt lên rằng: “Ồ, những kẻ ngoại quốc này thật ngu ngốc”. Nhưng ngay sau đó, khi Lewis chuyển con mắt xét đoán không khoan nhượng về California và Washington, người Mỹ sẽ biết sự hài hước ấy chỉ là miếng mồi dẫn họ đến một cái bẫy khi choáng váng nhận ra rằng những khoản nợ của nước Mỹ - con nợ lớn nhất và tham lam nhất thế giới này - sắp đến hạn thanh toán.\n" + "\n" + " \n" + "\n" + "Giá sản phẩm trên Tiki đã bao gồm thuế theo luật hiện hành. Tuy nhiên tuỳ vào từng loại sản phẩm hoặc phương thức, địa chỉ giao hàng mà có thể phát sinh thêm chi phí khác như phí vận chuyển, phụ phí hàng cồng kềnh, ....."); UploadData.addBookDetailToDb("Tôi Đã Kiếm Được 2 000 000 Đô-La Từ Thị Trường Chứng Khoán Như Thế Nào?", "Alphabooks", "","13 x 20.5 cm","Bìa mềm", 5,"", "Điều đặc biệt của cuốn sách là các kinh nghiệm của tác giả được trình bày rất cô đọng, có dẫn chứng thuyết phục qua ngôn từ dễ hiểu song vẫn chứa đựng các nội dung mang tính hàn lâm trong phân tích và đầu tư chứng khoán. Qua cuốn sách, người đọc cũng sẽ hiểu được các vấn đề lý thuyết về phân tích cơ bản, phân tích kỹ thuật, kỹ năng giao dịch và chiến lược đầu tư chứng khoán được áp dụng linh hoạt trong thực tế đầu tư chứng khoán như thế nào. Người đọc sẽ có cơ hội biết về Lý thuyết hộp của Nicolas Darvas và những ứng dụng tuyệt vời của nó trong đầu tư chứng khoán.\n" + "\n" + "Vì vậy, cuốn sách cũng là tài liệu tham khảo hữu ích đối với các sinh viên kinh tế, đặc biệt là sinh viên chuyên ngành Ngân hàng - Tài chính - Chứng khoán."); UploadData.addBookDetailToDb("Đừng Để Mất Bò - 7 Bước Quản Lý Cửa Hàng Hiệu Quả Và Chống Thất Thoát", "Nhà Xuất Bản Đà Nẵng", "2020-09-10 15:14:17","","Bìa mềm", 272,"Nhà Xuất Bản Đà Nẵng", "Quyển sách mang đến cho bạn:\n" + "\n" + "3 bước tuyển chọn và huấn luyện để có được đội ngũ nhân viên xuất sắc.\n" + "Cách thức tổ chức bộ máy, phân chia công việc, hướng đến tự động hóa hoạt động kinh doanh.\n" + "2 phương pháp để đôn đốc nhân viên làm việc chăm chỉ, nghiêm túc mà không cảm thấy ức chế.\n" + "Đặc biệt là danh sách hơn 20 chiêu trò gian lận, trộm cắp phổ biến, vẫn đang âm thầm diễn ra và lấy đi hàng tỷ đồng mỗi năm tại các cửa hàng.\n" + "Quyển sách này dành cho:\n" + "\n" + "Người đang kinh doanh cửa hàng, nhà hàng, cà phê hoặc mô hình chuỗi. \n" + "Những ai gặp khó khăn trong việc tự động hóa doanh nghiệp.\n" + "Những ai đang đau đầu trong công tác kiểm soát hoạt động của nhân viên.\n" + "Hay bất kỳ ai yêu thích kinh doanh và ấp ủ giấc mơ làm giàu từ một doanh nghiệp vững bền.\n" + "Hãy mua ngay quyển sách này để có trong tay những giải pháp tuyệt vời cho cửa hàng của bạn!"); UploadData.addBookDetailToDb("Người Giàu Có Nhất Thành Babylon (Tái Bản 2020)","First News - Trí Việt", "","13 x 20.5 cm","Bìa gập", 216,"2020-06-01 00:00:00", "Người giàu có nhất thành Babylon (tiếng Anh: The Richest Man in Babylon) được xem là một trong những tác phẩm truyền cảm hứng lớn nhất về chủ đề tiết kiệm, kế hoạch tài chính và sự giàu có cá nhân. Tác phẩm được viết bởi doanh nhân, nhà văn Mỹ George Samuel Clason vào năm 1926, kể về cách tiết kiệm, buôn bán và làm giàu của người dân ở thành Babylon cổ xưa.\n" + "\n" + "Ban đầu đây chỉ là một tập sách nhỏ, viết về các cách quản lý tài chính và do các ngân hàng và công ty bảo hiểm phân phối. Sau khi được tổng hợp, biên tập thành một cuốn sách trọn vẹn, “Người giàu có nhất thành Babylon” bất ngờ trở nên phổ biến và nổi tiếng trên toàn thế giới bởi những lời khuyên về quản lý tài chính hết sức khôn ngoan.\n" + "\n" + "Cuốn sách tập hợp nhiều câu chuyện cổ về các nhân vật vươn lên từ nghèo khổ để trở nên giàu có, được kính trọng bậc nhất thành Babylon. Có thể kể đến câu chuyện của “người giàu có nhất thành Babylon” Arkad – một thợ khắc gỗ khi còn trẻ, hay người cho vay vàng Mathon, những người nô lệ như Dabasir, Megiddo, Sharru Nada,…"); UploadData.addBookDetailToDb("Sống Kỷ Luật, Gặt Thành Công","Phương Nam Book", "2021-05-01 00:00:00","14 x 20.5 cm","Bìa mềm", 192,"Nhà Xuất Bản Lao Động Xã Hội", "Bộ sách KHOA HỌC KỸ NĂNG CHO THỜI ĐẠI MỚI giúp bạn tự trang bị cho mình những hành trang cần thiết nhất để bước vào thời đại mới – thời đại của việc tự học, tư duy độc lập, tinh thần kỹ luật cao và sự nhạy bén trong quá trình tiếp thu những thành tựu mới.\n" + "\n" + "Trọn bộ gồm:\n" + "\n" + "- KỸ NĂNG MỚI TRONG TẦM TAY\n" + "\n" + "- SỐNG KỶ LUẬT, GẶT THÀNH CÔNG\n" + "\n" + "- LÀM CHỦ VIỆC TỰ HỌC\n" + "\n" + "- TƯ DUY NHẠY, TIẾP THU NHANH"); UploadData.addBookDetailToDb("Mỗi Lần Vấp Ngã Là Một Lần Trưởng Thành","Minh Long", "","","Bìa mềm",376, "Nhà Xuất Bản Thanh Niên","Sóng yên biển lặng không làm nên một thủy thủ xuất sắc. Chỉ khi dám vượt qua muôn trùng phong ba bão táp bạn mới có thể trở thành thủy thủ tài ba nhất!\n" + "\n" + "“ Tôi tin rằng trong cuộc đời, mỗi chúng ta dù ít dù nhiều đều đã từng trải qua những thời khắc khó khăn, đau khổ. Tôi tin rằng sẽ không một người nào dám khẳng định cuộc đời của họ chẳng bao giờ gặp trở ngại.\n" + "\n" + "Nhưng hãy thử hoài niệm một chút, mỗi khi gặp phải khó khăn hoặc vấp ngã, ngoài việc cảm thấy đau khổ, bạn học được điều gì? Tôi dám khẳng định bạn đã có được kinh nghiệm, bạn đã lĩnh hội và đã trưởng thành hơn.\n" + "\n" + "Cuộc đời là vậy, chỉ có vấp ngã bạn mới rút ra kinh nghiệm quý báu cho bản thân và bước những bước tiếp theo vững vàng hơn. Hãy tin rằng đau khổ, thất bại, bị lừa dối, bị tổn thương, mất mát đều chỉ là những đoạn đường mấp mô tất yếu mà bạn phải trải qua trước khi đến được cái đích xán lạn. (Liêu Trí Phong)\n" + "\n" + "Cảm ơn bạn đã tham khảo cuốn sách này. Chúc một ngày tốt lành!\n" + "\n" + "Giá sản phẩm trên Tiki đã bao gồm thuế theo luật hiện hành. Tuy nhiên tuỳ vào từng loại sản phẩm hoặc phương thức, địa chỉ giao hàng mà có thể phát sinh thêm chi phí khác như phí vận chuyển, phụ phí hàng cồng kềnh, ....."); // UploadData.addBookDetailToDb("","", // "","","",5, // "",""); // UploadData.addBookDetailToDb("","", // "","","",5, // "",""); // UploadData.addBookDetailToDb("","", // "","","",5, // "",""); // UploadData.addBookDetailToDb("","", // "","","",5, // "",""); // UploadData.addBookDetailToDb("","", // "","","",5, // "",""); // UploadData.addBookDetailToDb("","", // "","","",5, // "",""); // UploadData.addBookDetailToDb("","", // "","","",5, // "",""); //Đã xong sách tiếng anh và khoa học UploadData.addBookDetailToDb("Giải Thích Ngữ Pháp Tiếng Anh (Tái Bản 2020)","Zenbooks", "2020-04-01 00:00:00","17 x 24 cm","Bìa mềm",560,"Nhà Xuất Bản Đà Nẵng", "GIẢI THÍCH NGỮ PHÁP TIẾNG ANH, tác giả Mai Lan Hương - Hà Thanh Uyên, là cuốn sách ngữ pháp đã được phát hành và tái bản rất nhiều lần trong suốt những năm vừa qua.\n" + "Trong lần tái bản GIẢI THÍCH NGỮ PHÁP TIẾNG ANH năm 2020 này, nhằm nâng cao chất lượng sách và giúp người học trau dồi, củng cố và nâng cao kiến thức ngữ pháp tiếng Anh, chúng tôi chỉnh sửa, bổ sung và cập nhật một số kiến thức ngữ pháp mới.\n" + "Ấn bản mới GIẢI THÍCH NGỮ PHÁP TIẾNG ANH gồm 5 chương, hệ thống hóa toàn diện kiến thức ngữ pháp tiếng Anh từ cơ bản đến nâng cao:\n" + "Chương 1: Từ Loại (Parts of Speech)\n" + "Chương 2: Thì và Sự Phối Hợp Thì (Tenses and Sequence of Tenses)\n" + "Chương 3: Mệnh Đề (Clauses)\n" + "Chương 4: Câu (Sentences)\n" + "Chương 5: Từ Vựng Học (Word Study)\n" + "Các chủ điểm ngữ pháp trong từng chương được trình bày rõ ràng, chi tiết, giải thích cặn kẽ các cách dùng và quy luật mà người học cần nắm vững. Sau mỗi chủ điểm ngữ pháp là phần bài tập đa dạng nhằm giúp người học củng cố phần lý thuyết.\n" + "Giá sản phẩm trên Tiki đã bao gồm thuế theo luật hiện hành. Tuy nhiên tuỳ vào từng loại sản phẩm hoặc phương thức, địa chỉ giao hàng mà có thể phát sinh thêm chi phí khác như phí vận chuyển, phụ phí hàng cồng kềnh, ....."); UploadData.addBookDetailToDb("Tự Học 2000 Từ Vựng Tiếng Anh Theo Chủ Đề","MCBOOKS", "2017-12-23 17:17:20","9.5 x 14.5 cm", "Bìa mềm",260,"Nhà Xuất Bản Đại Học Quốc Gia Hà Nội", "Nghe nói đọc viết là 4 kĩ năng quan trọng để có thể học và sử dụng tốt tiếng Anh - ngôn ngữ toàn cầu. Tuy nhiên không phải ai cũng có thể thành thạo những kĩ năng này. Nghe hiểu là một trong những kĩ năng đòi hỏi sự tập trung và rèn luyện của người học.\n" + "\n" + "Luyện nghe từ vựng tiếng Anh theo chủ điểm sẽ cung cấp những bài tập với trình độ nâng cao, là tài liệu bổ ích cho những ai muốn nâng cao khả năng nghe hiểu thông qua học từ vựng.\n" + "\n" + "Giá sản phẩm trên Tiki đã bao gồm thuế theo luật hiện hành. Tuy nhiên tuỳ vào từng loại sản phẩm hoặc phương thức, địa chỉ giao hàng mà có thể phát sinh thêm chi phí khác như phí vận chuyển, phụ phí hàng cồng kềnh, ....."); UploadData.addBookDetailToDb("Mind Map English Vocabulary - Từ Vựng Tiếng Anh Qua Sơ Đồ Tư Duy", "MCBOOKS","2021-01-12 00:00:00","17 x 24 cm","Bìa mềm", 260,"Nhà Xuất Bản Hồng Đức","Bạn đang gặp khó khăn với việc học từ vựng Tiếng Anh khi thường xuyên học trước quên sau.\n" + "\n" + "Bạn đang cần một phương pháp học tập mới giúp tăng năng suất ghi nhớ của bộ não.\n" + "\n" + "Bạn cần hệ thống từ vựng theo chủ đề một cách khoa học để có thể ghi nhớ từ vựng nhanh và sâu hơn. …thì chúng tôi tin rằng cuốn sách Mindmap English Vocabulary -Từ vựng tiếng anh qua sơ đồ tư duy chính là giải pháp tuyệt vời dành cho bạn!\n" + "\n" + "Ưu điểm của phương pháp học tiếng Anh bằng sơ đồ tư duy:\n" + "\n" + "Màu sắc giúp đánh dấu và phân biệt giữa các từ, các nhóm và chủ đề.\n" + "Hình ảnh giúp bạn dễ dàng hình dung và ghi nhớ từ, cấu trúc ngữ pháp.\n" + "Sử dụng bản đồ tư duy,sẽ tăng cường công suất sử dụng cả hai bán cầu não trong việc ghi nhớ.\n" + "Hơn thế nữa, khi bạn lập một bản đồ tư duy, bạn cũng cần vận dụng nhiều sự sáng tạo và trí tưởng tượng linh hoạt của mình. Đó chính là lý do vì sao học Mindmap English Vocabulary -Từ vựng tiếng anh qua sơ đồ tư duy giúp bạn ghi nhớ từ vựng nhanh hơn và học được nhiều từ hơn theo cụm chủ đề trong khi học tiếng anh."); UploadData.addBookDetailToDb("DOLBOOK1 - Thông não IELTS Reading cùng Linear", "Rio Book","","","B Format Paperback", 212,"Nhà Xuất Bản Dân Trí","CUỐN SÁCH HỌC TIẾNG ANH THÔNG NÃO IELTS READING CÙNG LINEARTHINKING PHÙ HỢP VỚI AI?\n" + "Thí sinh IELTS, đang và chuẩn bị ôn luyện cho kỳ thi IELTS, muốn nhanh lấy điểm Reading cao, thậm chí là 9.0.\n" + "Những bạn đã thi xong IELTS, điểm Reading cao, nhưng vẫn gặp vấn đề về đọc hiểu và tóm ý đoạn văn sau 1 lần đọc.\n" + "Những bạn muốn điểm cao Reading các chương trình TOEIC, SAT, TOEFL, GMAT, GRE.\n" + "Những bạn học Tiếng Anh nói chung, muốn đọc báo, đọc sách Tiếng Anh dễ hiểu không cần tra từng từ vựng, đọc đến đâu hiểu và nhớ đến đó.\n" + "Những bạn thấy bế tắc với phương pháp đọc dịch, hay SCAN SKIM."); UploadData.addBookDetailToDb("Hack Não 1500","Nhà Xuất Bản Thế Giới", "2019-12-03 14:07:58","","Bìa mềm", 536,"Nhà Xuất Bản Thế Giới","CUỐN SÁCH HỌC TIẾNG ANH HACK NÃO 1500 SẼ PHÙ HỢP VỚI AI?\n" + "- Học sinh cấp 3 đang muốn tăng 1-3 điểm thi tiếng Anh THPTQG;\n" + "\n" + "- Sinh viên cần thêm ít nhất 200-300 điểm TOEIC để đủ điều kiện ra trường;\n" + "\n" + "- Người đi làm muốn mở rộng vốn từ để đọc hiểu tài liệu và giao tiếp cơ bản hằng ngày bằng tiếng Anh;\n" + "\n" + "- Người trung tuổi hoặc lớn tuổi muốn học lại tiếng Anh từ đầu;\n" + "\n" + "- Các bạn nhỏ hơn với sự hướng dẫn của bố mẹ."); // UploadData.addBookToCategory("Sách học Tiếng Anh","https://salt.tikicdn.com/cache/w444/ts/product/37/59/f1/1101788da61ed1ad411251aff1927a29.jpg","Mai Lan Hương - Hà Thanh Uyên","Giải Thích Ngữ Pháp Tiếng Anh (Tái Bản 2020)",5); // UploadData.addBookToCategory("Sách học Tiếng Anh","https://salt.tikicdn.com/cache/w444/ts/product/d5/53/0e/fc00028419754638dd5b250abbcb0de7.jpg","Nhiếu tác giả","Tự Học 2000 Từ Vựng Tiếng Anh Theo Chủ Đề",5); // UploadData.addBookToCategory("Sách học Tiếng Anh","https://salt.tikicdn.com/cache/w444/ts/product/94/bb/09/fa62fc7ca444357d28120ded12c87ff3.jpg","Hoàng Ngân","Mind Map English Vocabulary - Từ Vựng Tiếng Anh Qua Sơ Đồ Tư Duy",5); // UploadData.addBookToCategory("Sách học Tiếng Anh","https://salt.tikicdn.com/cache/w444/ts/product/e2/87/8c/5e89bfcabb244f26feddb394731ddeaf.jpg","Nhiều tác giả","DOLBOOK1 - Thông não IELTS Reading cùng Linear",5); // UploadData.addBookToCategory("Sách học Tiếng Anh","https://salt.tikicdn.com/cache/w444/ts/product/40/44/85/89b7d44e0f944a6796bd845186535ed8.jpg","Nguyễn Văn Hiệp (Chủ biên)","Hack Não 1500",5); // UploadData.addBookToCategory("Sách học Tiếng Anh","https://salt.tikicdn.com/cache/w444/ts/product/8d/dd/67/d4fae536a5672634586ba1e45117b7cc.jpg"," Đỗ Nhung","Mindmap English Grammar - Ngữ Pháp Tiếng Anh Bằng Sơ Đồ Tư Duy",5); // UploadData.addBookToCategory("Sách học Tiếng Anh","https://salt.tikicdn.com/cache/w444/ts/product/d4/72/23/e3c9f12179a14c64f1465651f6310f2f.jpg","David Cho","Hackers Toeic Vocabulary",5); // UploadData.addBookToCategory("Sách học Tiếng Anh","https://salt.tikicdn.com/cache/w444/ts/product/b7/cb/bd/0475812a867f53c96d106bac287eba1a.jpg","Viện ngôn ngữ Hackers","Hackers IELTS: READING",5); // UploadData.addBookToCategory("Sách học Tiếng Anh","https://salt.tikicdn.com/cache/w444/ts/product/51/1e/85/7793d19ae470e25f1ab0cf3455ed8d62.jpg","Viện ngôn ngữ Hackers","Hackers Ielts: Writing",5); UploadData.addBookDetailToDb("Big Picture Book Of General Knowledge - Cuốn Sách Tranh Khổng Lồ Về Khoa Học Thường Thức", "Đinh Tị","2019-10-01 00:00:00","24 x 29 cm","Bìa mềm",5,"","Wolfgang Amadeus Mozart bắt đầu sáng tác nhạc vào năm 1761, khi ông mới chỉ là một cậu bé 5 tuổi.\n" + "\n" + "Chiếc xe buýt màu đỏ của London được giới thiệu đến công chúng vào năm 1907.\n" + "\n" + "Cà chua có rất nhiều màu, xanh, vàng, tím hoặc đen, và cả màu đỏ nữa.\n" + "\n" + "Và còn bí mật gì của thế giới rộng lớn ngoài kia?\n" + "\n" + "BIG PICTURE BOOK OF GENERAL KNOWLEDGE - Cuốn sách tranh khổng lồ về KHOA HỌC THƯỜNG THỨC sẽ giải đáp gần như tất tần tật các bí mật cho hầu hết mọi chủ đề trong cuộc sống. Hãy nhanh tay mở cuốn sách và cùng khám phá những bí ẩn từ dưới lòng đất tới tận vũ trụ bao la nhé!\n" + "\n" + "Giá sản phẩm trên Tiki đã bao gồm thuế theo luật hiện hành. Tuy nhiên tuỳ vào từng loại sản phẩm hoặc phương thức, địa chỉ giao hàng mà có thể phát sinh thêm chi phí khác như phí vận chuyển, phụ phí hàng cồng kềnh, ....."); UploadData.addBookDetailToDb("Bộ Sách Vỡ Lòng Về Khoa Học - Vật Lí Học Thiên Thể Cho Trẻ Em", "NXB Phụ Nữ Việt Nam","2020-11-15 00:00:00","20.3 x 20.3 cm", "Bìa mềm",28,"Nhà Xuất Bản Phụ Nữ Việt Nam","Đây là 9 cuốn trong bộ sách Vỡ lòng về Khoa học của tác giả Chris Ferrie đã được nhiều quốc gia đón nhận (những chủ đề tiếp theo sẽ ra mắt trong thời gian tới). Khi quan điểm giáo dục sớm cũng như xu hướng STEAM (khoa học – công nghệ – kĩ thuật – nghệ thuật – toán học) đang ngày càng chứng minh sự hiệu quả đối với học sinh thì bộ sách vỡ lòng về khoa học này chính là một trong những nguồn tài liệu tham khảo mà trẻ em cần. Những cuốn sách nhanh chóng đạt xếp hạng cao nhờ đáp ứng rất tốt các tiêu chí: nội dung chuẩn xác, cô đọng, minh họa “trực quan”, sáng rõ – phù hợp với khả năng tiếp thu của các em từ tuổi 4+.\n" + "\n" + "Ở góc độ của một nhà vật lí và nhà toán học luôn tin tưởng, yêu quý trẻ em, Chris Ferrie khẳng định rằng “không bao giờ là quá sớm để giới thiệu trẻ em đến với thế giới khoa học kì lạ và tuyệt vời!” Chính vì vậy, tác giả đã dày công “giản lược” những kiến thức thuộc lĩnh vực toán học, vật lí, sinh học, quang học cho đến các nhánh lượng tử, hạt nhâ nhằm giúp các bé tiếp cận với nền khoa học một cách cơ bản, hiệu quả nhất. Thật đáng kinh ngạc khi những cuốn sách gồm 10-20 trang lại chứa đựng nguồn kiến thức nền tảng phong phú, hấp dẫn tới như vậy.\n" + "\n" + "Cũng như tác giả Chris Ferrie, nhà xuất bản Phụ nữ Việt Nam tin rằng năng lực tìm tòi, khám phá của trẻ em là vô tận. Bộ sách vỡ lòng về khoa học sẽ góp phần “đánh thức” ước mơ trở thành những nhà khoa học, những kĩ sư công nghệ trong các em, và đó là cách chúng ta ươm-cây cho tương lai."); UploadData.addBookDetailToDb("Cùng Bé Khám Phá 500 Điều Thú Vị Về Khoa Học (Sách Bản Quyền Micro Facts!)", "Nhà sách Minh Thắng","","14 x 16 cm", "Bìa mềm",304,"Nhà Xuất Bản Phụ Nữ Việt Nam","\"Sách Bản Quyền Micro Facts! Cùng Bé Khám Phá 500 Điều Thú Vị Về Khoa Học \"\n" + "\n" + "Đây là một cuốn sách chứa rất nhiều kiến thức bổ ích , thú vị :\n" + "\n" + "- Hành tinh nào nổi trên mặt nước ?\n" + "\n" + "- Con sứa có bất tử không ?\n" + "\n" + "- Cá mập có liên quan gì đến đường truyền internet ?\n" + "\n" + "Cuốn sách đầy ắp thông tin bổ ích với hình ảnh minh họa hấp dẫn này là một cẩm nang khoa học tuyệt vời cung cấp cho chúng ta đầy đủ kiến thức liên quan đến cơ thể con người , hay các vùng đất xa xôi ngoài không gian\n" + "\n" + "Hãy lật sách ra nào ! Chắc chắn chúng mình sẽ ngạc nhiên lắm đấy !\n" + "\n" + "Giá sản phẩm trên Tiki đã bao gồm thuế theo luật hiện hành. Tuy nhiên tuỳ vào từng loại sản phẩm hoặc phương thức, địa chỉ giao hàng mà có thể phát sinh thêm chi phí khác như phí vận chuyển, phụ phí hàng cồng kềnh, ....."); UploadData.addBookDetailToDb("In Focus - Quyển Sách Khổng Lồ Về Khoa Học Thường Thức","Đinh Tị", "2020-02-02 00:00:00", "25 x 25 cm","Bìa mềm",28,"Nhà Xuất Bản Thanh Niên","Quan sát mọi thứ từ trong ra ngoài, từ ngoài vào trong, tại sao lại không nhỉ? Thay vì nhìn vạn vật dưới lăng kính thông thường, Cuốn sách khổng lồ về khoa học thường thức sẽ đưa các bạn đến với một trải nghiệm hoàn toàn mới khi “bóc tách” lớp vỏ bên ngoài của sự vật, mở ra hành trình khám phá muôn vàn bí mật còn ẩn giấu bên trong thông qua những trang gấp khổng lồ vô cùng thú vị.\n" + "\n" + "Từ những điều lớn lao cho đến những điều nhỏ bé, từ vũ trụ bao la cho đến những vật dụng đơn giản chúng ta vẫn thường dùng, bạn sẽ không khỏi bất ngờ khi phát hiện ra rằng: mọi thứ không đơn giản như vẻ bên ngoài của nó!\n" + "\n" + "Giá sản phẩm trên Tiki đã bao gồm thuế theo luật hiện hành. Tuy nhiên tuỳ vào từng loại sản phẩm hoặc phương thức, địa chỉ giao hàng mà có thể phát sinh thêm chi phí khác như phí vận chuyển, phụ phí hàng cồng kềnh, ...."); UploadData.addBookDetailToDb("Sách - Khoa học về Yoga (Bìa cứng)","Nhã Nam","10-2020", "19.5x23 cm","",220,"Nhà Xuất Bản Thế Giới","“Luyện tập yoga là phương cách hữu hiệu và an toàn làm giảm chứng đau lưng mạn tính cùng nhiều chứng bệnh về xương khớp khác.”\n" + "\n" + "Giá sản phẩm trên Tiki đã bao gồm thuế theo luật hiện hành. Tuy nhiên tuỳ vào từng loại sản phẩm hoặc phương thức, địa chỉ giao hàng mà có thể phát sinh thêm chi phí khác như phí vận chuyển, phụ phí hàng cồng kềnh, ....."); UploadData.addBookDetailToDb("Bộ Sách Vỡ Lòng Về Khoa Học - Điện Toán Lượng Tử Cho Trẻ Em ", "NXB Phụ Nữ Việt Nam","2020-11-01 00:00:00", "20.3 x 20.3 cm","Bìa mềm",28,"Nhà Xuất Bản Phụ Nữ Việt Nam", "Đây là 9 cuốn trong bộ sách Vỡ lòng về Khoa học của tác giả Chris Ferrie đã được nhiều quốc gia đón nhận (những chủ đề tiếp theo sẽ ra mắt trong thời gian tới). Khi quan điểm giáo dục sớm cũng như xu hướng STEAM (khoa học – công nghệ – kĩ thuật – nghệ thuật – toán học) đang ngày càng chứng minh sự hiệu quả đối với học sinh thì bộ sách vỡ lòng về khoa học này chính là một trong những nguồn tài liệu tham khảo mà trẻ em cần. Những cuốn sách nhanh chóng đạt xếp hạng cao nhờ đáp ứng rất tốt các tiêu chí: nội dung chuẩn xác, cô đọng, minh họa “trực quan”, sáng rõ – phù hợp với khả năng tiếp thu của các em từ tuổi 4+.\n" + "\n" + "Ở góc độ của một nhà vật lí và nhà toán học luôn tin tưởng, yêu quý trẻ em, Chris Ferrie khẳng định rằng “không bao giờ là quá sớm để giới thiệu trẻ em đến với thế giới khoa học kì lạ và tuyệt vời!” Chính vì vậy, tác giả đã dày công “giản lược” những kiến thức thuộc lĩnh vực toán học, vật lí, sinh học, quang học cho đến các nhánh lượng tử, hạt nhâ nhằm giúp các bé tiếp cận với nền khoa học một cách cơ bản, hiệu quả nhất. Thật đáng kinh ngạc khi những cuốn sách gồm 10-20 trang lại chứa đựng nguồn kiến thức nền tảng phong phú, hấp dẫn tới như vậy.\n" + "\n" + "Cũng như tác giả Chris Ferrie, nhà xuất bản Phụ nữ Việt Nam tin rằng năng lực tìm tòi, khám phá của trẻ em là vô tận. Bộ sách vỡ lòng về khoa học sẽ góp phần “đánh thức” ước mơ trở thành những nhà khoa học, những kĩ sư công nghệ trong các em, và đó là cách chúng ta ươm-cây cho tương lai."); UploadData.addBookDetailToDb("Big Book Of The Body – Cuốn Sách Khổng Lồ Về Cơ Thể Người", "Đinh Tị","2016-12-19 00:00:00", "24 x 29 cm","Bìa mềm",32,"","Đây là một cuốn sách kích thước lớn, có những trang gấp khổng lồ, khơi gợi sự thích thú cho độc giả, nhất là trẻ em. Cuốn sách rất trực quan và sinh động, có đầy đủ các thông tin cơ bản nhất về cơ thể người, được trình bày rất khoa học và sáng tạo: cơ thể được hình thành từ những gì, bộ xương cấu tạo ra sao, các loại cơ bắp trên cơ thể người, hệ tuần hoàn, hệ hô hấp, hệ tiêu hóa, bộ não và các dây thần kinh, và các số liệu đáng kinh ngạc về cơ thể."); UploadData.addBookDetailToDb("Bộ Sách Vỡ Lòng Về Khoa Học: Thông Tin Lượng Tử Cho Trẻ Em", "NXB Phụ Nữ Việt Nam","2021-02-12 00:00:00", "20.3x20.3 cm","Bìa mềm",14,"Nhà Xuất Bản Phụ Nữ Việt Nam","Ở góc độ của một nhà vật lí và nhà toán học luôn tin tưởng, yêu quý trẻ em, Chris Ferrie khẳng định rằng “không bao giờ là quá sớm để giới thiệu trẻ em đến với thế giới khoa học kì lạ và tuyệt vời!” Chính vì vậy, tác giả đã dày công “giản lược” những kiến thức thuộc lĩnh vực toán học, vật lí, sinh học, quang học cho đến các nhánh lượng tử, hạt nhâ nhằm giúp các bé tiếp cận với nền khoa học một cách cơ bản, hiệu quả nhất. Thật đáng kinh ngạc khi những cuốn sách gồm 10-20 trang lại chứa đựng nguồn kiến thức nền tảng phong phú, hấp dẫn tới như vậy.\n" + "\n" + "Cũng như tác giả Chris Ferrie, nhà xuất bản Phụ nữ Việt Nam tin rằng năng lực tìm tòi, khám phá của trẻ em là vô tận. Bộ sách vỡ lòng về khoa học sẽ góp phần “đánh thức” ước mơ trở thành những nhà khoa học, những kĩ sư công nghệ trong các em, và đó là cách chúng ta ươm-cây cho tương lai."); UploadData.addBookDetailToDb("Hành trình kỳ thú của William Playfair - Sự ra đời của biểu đồ đường, tròn và cột", "Crabit Kidbooks","2021-04-06 11:45:22", "","Bìa cứng",44,"Nhà Xuất Bản Hà Nội","Câu chuyện về một danh nhân xuất chúng trong lĩnh vực toán học, khoa học, kỹ thuật và công nghệ, dưới ngòi bút của tác giả bán chạy nhất Helaine Becker tạo nên một tuyệt tác sách tranh về giáo dục STEM. Cuốn sách hứa hẹn sẽ là trợ thủ đắc lực trong những lớp học. Một mặt, đây là một cuốn tiểu sử đầy hấp dẫn về một nhân vật đầy thú vị, chưa kể những tranh vẽ hóm hỉnh của Marie-Ève Tremblay. Không dừng lại ở đó, nó còn khám phá nhiều chủ đề lớn về toán học như đo đạc, hình học, cũng như về lịch sử, từ Cách mạng công nghiệp cho tới đầu máy hơi nước. Cuốn sách cũng mang đến những bài học quý báu, khích lệ tất cả mọi người không ngừng khám phá và để đam mê dẫn lối ta đi bất cứ đâu. Phần cuối cuốn sách còn đính kèm vài sự thật lịch sử cũng như diễn giải chi tiết về ba loại biểu đồ phổ biến nhất mà William Playfair đã phát minh ra."); UploadData.addBookDetailToDb("Mindmap English Grammar - Ngữ Pháp Tiếng Anh Bằng Sơ Đồ Tư Duy", "MCBOOKS","","17 X 24 cm","", 292,"MCBOOKS","Làm cách nào để nâng cao trình độ? Học thế nào để nhớ nhanh, ngấm lâu?\n" + "\n" + "Sơ đồ tư duy được mệnh danh là \" CÔNG CỤ VẠN NĂNG CHO BỘ NÃO\" - một phương pháp trình bày ý tưởng, kiến thức bằng những từ khóa chính, hình ảnh và màu sắc, giúp não bộ phát huy tối đa khả năng ghi nhớ. Phương pháp này hiện nay được hơn 250 triệu người trên thế giới sử dụng, đã và đang đem lại những hiệu quả thực sự nhất là ngữ pháp tiếng Anh bởi: \n" + "\n" + "Giúp bạn nắm được bức tranh toàn cảnh của chủ để nghiên cứu\n" + "Phương pháp ghi nhớ tối ưu hiệu quả, tăng khả năng tập trung khi học \n" + "Cải thiện khả năng khai thác chi tiết thông tin , giải quyết triệt để quá tải dữ liệu\n" + "Cải thiện kỹ năng nghe qua các ví dụ hội thoại, tăng tính ứng dụng thực tế\n" + "Đột phá tư duy qua các sơ đồ mindmap, các hình ảnh giúp bạn dễ dàng hình dung\n" + "Kích thích sự phát triển của bộ não trong quá trình học, khơi dậy niềm đam mê học\n" + "Giúp bạn tổ chức thông tin vào các nhánh dễ nhớ, nắm trọn ngữ pháp từ a đến z\n" + "Gia tăng khả năng xử lý các vấn đề phức tạp, rút ngắn được thời gian học"); UploadData.addBookDetailToDb("Hackers Toeic Vocabulary","Alphabooks","","16 x 24cm", "Bìa mềm", 556,"Nhà Xuất Bản Dân Trí","Hackers TOEIC Vocabulary là cuốn sách được thiết kế nhằm giúp người học có thể hoàn thành mục tiêu nhớ và nắm được cách sử dụng của khoảng gần 7600 từ vựng theo các chủ đề khác nhau trong vòng 30 ngày. Ngoài ra, bạn còn được cung cấp những nội dung cần thiết liên quan như: câu hỏi theo định dạng bài thi thật, các xu hướng ra đề của bài thi dạng thức mới. “120 thành ngữ và cụm từ cố định cần biết để chinh phục bài thi TOEIC” ở cuối sách cũng là một nguồn tài liệu quý giá khiến cho các câu hỏi trong bài thi TOEIC không thể làm khó bạn trên con đường chinh phục điểm số mơ ước.\n" + "\n" + "Hackers TOEIC Vocabulary bao quát những nội dung phù hợp với nhiều đối tượng khác nhau, từ người mới tiếp cận đến người đã rất quen thuộc với bài thi TOEIC, thông qua cách thiết kế nội dung hợp lý với Từ vựng TOEIC cơ bản, Từ vựng TOEIC mức 800 điểm, Từ vựng TOEIC mức 900 điểm. Hãy xác định mục tiêu điểm số của mình và tập trung trau dồi vốn từ vựng cần thiết để đạt được mục tiêu đó nhanh chóng và hiệu quả nhất."); UploadData.addBookDetailToDb("Hackers IELTS : Listening","Alphabooks", "2019-08-01 00:00:00","16 x 24 cm","Bìa mềm", 300,"Nhà Xuất Bản Thế Giới","Bộ sách luyện thi IELTS đầu tiên có kèm giải thích đáp án chi tiết và hướng dẫn cách tự nâng band điểm.\n" + "\n" + "IELTS là cánh cửa giúp các bạn thí sinh hiện thực hóa ước mơ vươn ra thế giới. Chính vì vậy, ngay từ bây giờ, hãy nỗ lực luyện tập và chuẩn bị cho bài thi quan trọng này. Viện\n" + "\n" + "Ngôn ngữ Hackers đã biên soạn bộ sách HACKERS IELTS gồm 4 cuốn tương đương với 4 kỹ năng nhằm giới thiệu tới các bạn phương pháp luyện thi phù hợp nhất để có thể đạt điểm cao trong bài thi này.\n" + "\n" + "Luyện từng dạng bài một cách có hệ thống!\n" + "\n" + "Bộ sách được thiết kế nhằm giúp người học nâng cao kỹ năng đọc hiểu thông qua quá trình luyện tập từng dạng bài một cách có hệ thống. Ngoài ra, đối với từng dạng bài, bạn còn được cung cấp những chiến lược làm bài cụ thể.\n" + "\n" + "Luyện tập theo xu hướng ra đề mới nhất!\n" + "\n" + "Các chủ đề trong bộ sách HACKERS IELTS được biên soạn dựa trên xu hướng ra đề mới nhất, nhờ vậy mà bạn có thể chuẩn bị tốt nhất cho bài thi thật. Các bài Actual Test cũng được biên soạn chính xác theo hình thức đề thi thật mới nhất. Vì vậy, bạn đã có trong tay đầy đủ tài liệu để có thể chuẩn bị kỹ lưỡng cho bài thi IELTS.\n" + "\n" + "Tài liệu đặc biệt giúp bạn đạt điểm cao!\n" + "\n" + "Đặc biệt, HACKERS IELTS còn có phần tổng kết từ vựng “khủng” sau từng chương và thêm phần phụ lục về sự khác biệt giữa tiếng Anh Mỹ và tiếng Anh Anh. \n" + "\n" + "Chúng tôi hi vọng rằng HACKERS IELTS sẽ trở thành cuốn cẩm nang hữu ích giúp bạn đạt được điểm số mong muốn trong bài thi IELTS và là người bạn đồng hành đáng tin cậy của bạn trên con đường chinh phục ước mơ.\n" + "\n" + "Giá sản phẩm trên Tiki đã bao gồm thuế theo luật hiện hành. Tuy nhiên tuỳ vào từng loại sản phẩm hoặc phương thức, địa chỉ giao hàng mà có thể phát sinh thêm chi phí khác như phí vận chuyển, phụ phí hàng cồng kềnh, ....."); UploadData.addBookDetailToDb("Hackers IELTS: READING","Alphabooks", "2019-07-01 00:00:00","16 x 24 cm","Bìa mềm", 552,"Alphabooks","Bộ sách luyện thi IELTS đầu tiên có kèm giải thích đáp án chi tiết và hướng dẫn cách tự nâng band điểm.\n" + "\n" + "IELTS là cánh cửa giúp các bạn thí sinh hiện thực hóa ước mơ vươn ra thế giới. Chính vì vậy, ngay từ bây giờ, hãy nỗ lực luyện tập và chuẩn bị cho bài thi quan trọng này. Viện Ngôn ngữ Hackers đã biên soạn bộ sách HACKERS IELTS gồm 4 cuốn tương đương với 4 kỹ năng nhằm giới thiệu tới các bạn phương pháp luyện thi phù hợp nhất để có thể đạt điểm cao trong bài thi này.\n" + "\n" + "Luyện từng dạng bài một cách có hệ thống!\n" + "\n" + "Bộ sách được thiết kế nhằm giúp người học nâng cao kỹ năng đọc hiểu thông qua quá trình luyện tập từng dạng bài một cách có hệ thống. Ngoài ra, đối với từng dạng bài, bạn còn được cung cấp những chiến lược làm bài cụ thể.\n" + "\n" + "Luyện tập theo xu hướng ra đề mới nhất!\n" + "\n" + "Các chủ đề trong bộ sách HACKERS IELTS được biên soạn dựa trên xu hướng ra đề mới nhất, nhờ vậy mà bạn có thể chuẩn bị tốt nhất cho bài thi thật. Các bài Actual Test cũng được biên soạn chính xác theo hình thức đề thi thật mới nhất. Vì vậy, bạn đã có trong tay đầy đủ tài liệu để có thể chuẩn bị kỹ lưỡng cho bài thi IELTS.\n" + "\n" + "Tài liệu đặc biệt giúp bạn đạt điểm cao!\n" + "\n" + "Đặc biệt, HACKERS IELTS còn có phần tổng kết từ vựng “khủng” sau từng chương và thêm phần phụ lục về sự khác biệt giữa tiếng Anh Mỹ và tiếng Anh Anh. Ngoài ra, file MP3 đi kèm cung cấp cho người học các từ vựng xuất hiện trong các bài đọc.\n" + "\n" + "Chúng tôi hi vọng rằng HACKERS IELTS sẽ trở thành cuốn cẩm nang hữu ích giúp bạn đạt được điểm số mong muốn trong bài thi IELTS và là người bạn đồng hành đáng tin cậy của bạn trên con đường chinh phục ước mơ.\n" + "\n" + "Giá sản phẩm trên Tiki đã bao gồm thuế theo luật hiện hành. Tuy nhiên tuỳ vào từng loại sản phẩm hoặc phương thức, địa chỉ giao hàng mà có thể phát sinh thêm chi phí khác như phí vận chuyển, phụ phí hàng cồng kềnh, ....."); UploadData.addBookDetailToDb("Hackers Ielts: Writing","Alphabooks", "2019-01-08 00:00:00","16 x 24 cm","Bìa mềm", 452,"Nhà Xuất Bản Thế Giới","Bộ sách luyện thi IELTS đầu tiên có kèm giải thích đáp án chi tiết và hướng dẫn cách tự nâng band điểm.\n" + "IELTS là cánh cửa giúp các bạn thí sinh hiện thực hóa ước mơ vươn ra thế giới. Chính vì vậy, ngay từ bây giờ, hãy nỗ lực luyện tập và chuẩn bị cho bài thi quan trọng này. Viện Ngôn ngữ Hackers đã biên soạn bộ sách HACKERS IELTS gồm 4 cuốn tương đương với 4 kỹ năng nhằm giới thiệu tới các bạn phương pháp luyện thi phù hợp nhất để có thể đạt điểm cao trong bài thi này.\n" + "Luyện từng dạng bài một cách có hệ thống!\n" + "Bộ sách được thiết kế nhằm giúp người học nâng cao kỹ năng đọc hiểu thông qua quá trình luyện tập từng dạng bài một cách có hệ thống. Ngoài ra, đối với từng dạng bài, bạn còn được cung cấp những chiến lược làm bài cụ thể.\n" + "Luyện tập theo xu hướng ra đề mới nhất!\n" + "Các chủ đề trong bộ sách HACKERS IELTS được biên soạn dựa trên xu hướng ra đề mới nhất, nhờ vậy mà bạn có thể chuẩn bị tốt nhất cho bài thi thật. Các bài Actual Test cũng được biên soạn chính xác theo hình thức đề thi thật mới nhất. Vì vậy, bạn đã có trong tay đầy đủ tài liệu để có thể chuẩn bị kỹ lưỡng cho bài thi IELTS.\n" + "Tài liệu đặc biệt giúp bạn đạt điểm cao!\n" + "Đặc biệt, HACKERS IELTS còn có phần tổng kết từ vựng “khủng” sau từng chương và thêm phần phụ lục về sự khác biệt giữa tiếng Anh Mỹ và tiếng Anh Anh. Ngoài ra, file MP3 đi kèm cung cấp cho người học các từ vựng xuất hiện trong các bài đọc.\n" + "Chúng tôi hi vọng rằng HACKERS IELTS sẽ trở thành cuốn cẩm nang hữu ích giúp bạn đạt được điểm số mong muốn trong bài thi IELTS và là người bạn đồng hành đáng tin cậy của bạn trên con đường chinh phục ước mơ.\n" + "Giá sản phẩm trên Tiki đã bao gồm thuế theo luật hiện hành. Tuy nhiên tuỳ vào từng loại sản phẩm hoặc phương thức, địa chỉ giao hàng mà có thể phát sinh thêm chi phí khác như phí vận chuyển, phụ phí hàng cồng kềnh, ....."); // UploadData.addBookDetailToDb("Chúc một ngày mới tốt lành", "NXB Trẻ", "02-2019", "13x20cm", "Bìa mềm", 282, "NXB Trẻ", "Đọc tựa cuốn sách mới nhất của nhà văn Nguyễn Nhật Ánh là muốn mở ngay trang sách. Bạn sẽ thấy một thứ ngôn ngữ lạ của Hàn Quốc hay của nước nào tùy bạn đoán, Gô un un là Chào buổi sáng; Un gô gô là Chúc ngủ ngon, và nữa, Chiếp un un; Ăng gô gô; Chiếp chiếp gô…\n" + // "\n" + // "Sau chó Bê Tô, rồi Hai con mèo ngồi bên cửa sổ, nhà văn viết về một cặp heo\n" + // "\n" + // "Nhân vật chính là hai con heo con, Lọ Nồi thông minh và Đeo Nơ xinh đẹp, cùng bạn chó Mõm Ngắn con chị Vện, mẹ Nái Sề, anh Đuôi Xoăn, Cánh Cụt và bọn gà chíp nhà chị Mái Hoa,… đã làm nên một câu chuyện vô cùng thú vị\n" + // "\n" + // "Và thế giới trở nên thay đổi!\n" + // "\n" + // "Giá sản phẩm trên Tiki đã bao gồm thuế theo luật hiện hành. Tuy nhiên tuỳ vào từng loại sản phẩm hoặc phương thức, địa chỉ giao hàng mà có thể phát sinh thêm chi phí khác như phí vận chuyển, phụ phí hàng cồng kềnh, ..."); // // UploadData.addBookDetailToDb("Harry Potter và Phòng chứa bí mật", "NXB Trẻ", "02-2017", "14x20cm", "Bìa mềm", 430, "NXB Trẻ", "Harry khổ sở mong ngóng cho kì nghỉ hè kinh khủng với gia đình Dursley kết thúc. Nhưng một con gia tinh bé nhỏ tội nghiệp đã cảnh báo cho Harry biết về mối nguy hiểm chết người đang chờ cậu ở trường Hogwarts.\n" + // "\n" + // "Trở lại trường học, Harry nghe một tin đồn đang lan truyền về phòng chứa bí mật, nơi cất giữ những bí ẩn đáng sợ dành cho giới phù thủy có nguồn gốc Muggle. Có kẻ nào đó đang phù phép làm tê liệt mọi người, khiến họ gần như đã chết, và một lời cảnh báo kinh hoàng được tìm thấy trên bức tường. Mối nghi ngờ hàng đầu – và luôn luôn sai lầm – là Harry. Nhưng một việc còn đen tối hơn thế đã được hé mở.\n" + // "\n" + // "Giá sản phẩm trên Tiki đã bao gồm thuế theo luật hiện hành. Tuy nhiên tuỳ vào từng loại sản phẩm hoặc phương thức, địa chỉ giao hàng mà có thể phát sinh thêm chi phí khác như phí vận chuyển, phụ phí hàng cồng kềnh, ..."); // UploadData.addBookDetailToDb("Kính vạn hoa 2", "Nhà Xuất Bản Kim Đồng", "05-2018", "14x20.5cm", "Bìa mềm", 336, "Nhà Xuất Bản Kim Đồng", "Bộ ấn phẩm Kính Vạn Hoa phiên bản mới 18 tập, minh họa của họa sĩ Đỗ Hoàng Tường.\n" + // "\n" + // "\"Với một giọng kể chân chất hồn hậu, khi dí dỏm khi ngọt ngào, cả tếu táo và nghịch ngợm nữa, mỗi cuốn sách của Nguyễn Nhật Ánh giống như một ống kính vạn hoa. Với các em, chỉ cần xoay khẽ một chút các em sẽ thấy biết bao quen thân và lạ lẫm để rồi ngồi cười khúc khích với nhau, hoặc lặng đi, nhìn nhau rưng rưng tiếc thương một cái gì đã mất.\n" + // "\n" + // "Còn với tôi, mỗi lần xoay khẽ kính vạn hoa kia, cả tuổi thơ lộng lẫy và đau đớn tưởng đã chìm sâu khuất lấp vào lãng quên bỗng rực lên trước mắt tôi, làm cho tôi lắm khi khó cầm được nước mắt. \"Ðược tắm mình trong dòng sông trong trẻo của tuổi thơ sẽ giúp bạn gột rửa những bụi bặm của thế giới người lớn một cách diệu kỳ\", Nguyễn Nhật Ánh đã nói vậy và anh đã đúng.\"\n" + // "\n" + // "(Nhà văn Nguyễn Quang Lập)\n" + // "\n" + // "Giá sản phẩm trên Tiki đã bao gồm thuế theo luật hiện hành. Tuy nhiên tuỳ vào từng loại sản phẩm hoặc phương thức, địa chỉ giao hàng mà có thể phát sinh thêm chi phí khác như phí vận chuyển, phụ phí hàng cồng kềnh, ..."); // // UploadData.addBookDetailToDb("Harry Potter và Hòn đá phù thủy", "NXB Trẻ", "02-2017", "14x20cm", "Bìa mềm", 366, "NXB Trẻ", "Khi một lá thư được gởi đến cho cậu bé Harry Potter bình thường và bất hạnh, cậu khám phá ra một bí mật đã được che giấu suốt cả một thập kỉ. Cha mẹ cậu chính là phù thủy và cả hai đã bị lời nguyền của Chúa tể Hắc ám giết hại khi Harry mới chỉ là một đứa trẻ, và bằng cách nào đó, cậu đã giữ được mạng sống của mình. Thoát khỏi những người giám hộ Muggle không thể chịu đựng nổi để nhập học vào trường Hogwarts, một trường đào tạo phù thủy với những bóng ma và phép thuật, Harry tình cờ dấn thân vào một cuộc phiêu lưu đầy gai góc khi cậu phát hiện ra một con chó ba đầu đang canh giữ một căn phòng trên tầng ba. Rồi Harry nghe nói đến một viên đá bị mất tích sở hữu những sức mạnh lạ kì, rất quí giá, vô cùng nguy hiểm, mà cũng có thể là mang cả hai đặc điểm trên.\n" + // "\n" + // "Giá sản phẩm trên Tiki đã bao gồm thuế theo luật hiện hành. Tuy nhiên tuỳ vào từng loại sản phẩm hoặc phương thức, địa chỉ giao hàng mà có thể phát sinh thêm chi phí khác như phí vận chuyển, phụ phí hàng cồng kềnh, ..."); // UploadData.addBookDetailToDb("Harry Potter và Hoàng Tử Lai", "NXB Trẻ", "07-2017", "14 x 20 cm", "Bìa mềm", 716, "NXB Trẻ", "Đây là năm thứ 6 của Harry Potter tại trường Hogwarts. Trong lúc những thế lực hắc ám của Voldemort gieo rắc nỗi kinh hoàng và sợ hãi ở khắp nơi, mọi chuyện càng lúc càng trở nên rõ ràng hơn đối với Harry, rằng cậu sẽ sớm phải đối diện với định mệnh của mình. Nhưng liệu Harry đã sẵn sàng vượt qua những thử thách đang chờ đợi phía trước?\n" + // "\n" + // "Trong cuộc phiêu lưu tăm tối và nghẹt thở nhất của mình, J.K.Rowling bắt đầu tài tình tháo gỡ từng mắc lưới phức tạp mà cô đã mạng lên, cũng là lúc chúng ta khám phá ra sự thật về Harry, cụ Dumblebore, thầy Snape và, tất nhiên, Kẻ Chớ Gọi Tên Ra…\n" + // "\n" + // "‘Diễn biến nhanh, huyền bí, hấp dẫn và chặt chẽ trong từng chi tiết.'\n" + // "\n" + // "Giá sản phẩm trên Tiki đã bao gồm thuế theo luật hiện hành. Tuy nhiên tuỳ vào từng loại sản phẩm hoặc phương thức, địa chỉ giao hàng mà có thể phát sinh thêm chi phí khác như phí vận chuyển, phụ phí hàng cồng kềnh, ..."); // } public static void addListBook(){ UploadData.addBookToDb("https://i.ibb.co/74BHvCC/book6.jpg","Nicolas Spark","Kẻ may mắn",4); UploadData.addBookToDb("https://i.ibb.co/BtQQDs5/hary5.jpg", "JK Rowling","Harry Potter và hoàng tử lai",5 ); UploadData.addBookToDb("https://i.ibb.co/HHbjzFK/harry2.jpg","JK Rowling","Harry Potter và phòng chứa bí mật ",5); UploadData.addBookToDb("https://i.ibb.co/KL2CTHt/harry1.jpg","JK Rowling", "Harry Potter và hòn đá phù thủy ",5); UploadData.addBookToDb("https://i.ibb.co/hsK4FfG/book10.jpg", "Jhon Green","Khi lỗi thuộc về những vì sao ",3); } public static void addListCategory(){ UploadData.addCategoryToDb("https://i.ibb.co/dQDMtLQ/book.png","Sách tư duy"); UploadData.addCategoryToDb("https://i.ibb.co/pfRDVHn/book2.png","Tiểu thuyết"); UploadData.addCategoryToDb("https://i.ibb.co/WzntTJT/boy.png","Sách thiếu nhi"); UploadData.addCategoryToDb("https://i.ibb.co/NFCmnxh/competence.png","Sách kỹ năng"); UploadData.addCategoryToDb("https://i.ibb.co/JyJMZ0J/economic.png","Sách kinh tế"); UploadData.addCategoryToDb("https://i.ibb.co/9ZCng4z/english.png","Sách học Tiếng Anh"); UploadData.addCategoryToDb("https://i.ibb.co/dcxpJ1c/fiction.png","Sách khoa học"); UploadData.addCategoryToDb("https://i.ibb.co/nfh1fdn/selfcare.png","Sách sức khỏe"); } public static void addListRisingUser(){ UploadData.addRisingUserToDb("https://firebasestorage.googleapis.com/v0/b/muonsach-a7cfc.appspot.com/o/userImg%2Fprimary%3ADCIM%2FFacebook%2FFB_IMG_1585019689358.jpg?alt=media&token=3024bb54-5a27-46dc-8ec8-4cca23a1f936","MoaMoa","meo5@gmail"); UploadData.addRisingUserToDb("https://firebasestorage.googleapis.com/v0/b/muonsach-a7cfc.appspot.com/o/userImg%2Fimage%3A14099?alt=media&token=d726b78b-9dd9-4487-8db2-05ffa261dd41","Bùi Huy Hòa","meo1@gmail"); } public static void addListBookBorrow(){ UploadData.addBookBorrowtoDb("https://i.ibb.co/BtQQDs5/hary5.jpg","Harry Potter và Hoàng Tử Lai","JK Rowling",5,"120","10"); UploadData.addBookBorrowtoDb("https://i.ibb.co/HHbjzFK/harry2.jpg","Harry Potter và Phòng chứa bí mật","JK Rowling",5,"120","10"); UploadData.addBookBorrowtoDb("https://i.ibb.co/KL2CTHt/harry1.jpg","Harry Potter và Hòn đá phù thủy","JK Rowling",5,"120","10"); UploadData.addBookBorrowtoDb("https://i.ibb.co/hsK4FfG/book10.jpg","Khi lỗi thuộc về những vì sao","Jhon Green",5,"120","10"); UploadData.addBookBorrowtoDb("https://i.ibb.co/fvBqhmd/book9.jpg","Chúc một ngày mới tốt lành","Nguyễn Nhật Ánh",5,"120","10"); UploadData.addBookBorrowtoDb("https://i.ibb.co/3vVyBWF/book7.jpg","Kính vạn hoa 2","Nguyễn Nhật Ánh",5,"120","10"); UploadData.addBookBorrowtoDb("https://i.ibb.co/1GBFKM4/book8.jpg","Kính vạn hoa 26","Nguyễn Nhật Ánh",5,"120","10"); UploadData.addBookBorrowtoDb("https://i.ibb.co/MsVq8tn/matbiec.png","Mắt biếc","Nguyễn Nhật Ánh",5,"120","10"); UploadData.addBookBorrowtoDb("https://i.ibb.co/ch48wMz/book3.jpg","Khu vườn ngôn từ","Bùi Huy Hòa",5,"120","10"); UploadData.addBookBorrowtoDb("https://i.ibb.co/QDMDng5/book4.jpg","Người thắp sao trời","Bùi Huy Hòa",5,"120","10"); UploadData.addBookBorrowtoDb("https://i.ibb.co/47fSHVv/book1.jpg","Tuổi trẻ đáng giá bao nhiêu","Roosie Nguyễn",5,"120","10"); UploadData.addBookBorrowtoDb("https://i.ibb.co/bKBzbMt/book2.jpg","Ma đạo tổ sư","Bùi Huy Hòa",5,"120","10"); UploadData.addBookBorrowtoDb("https://i.ibb.co/BtQQDs5/hary5.jpg","Harry Potter và Hoàng Tử Lai","JK Rowling",5,"120","10"); } public static void addListBookShare(){ UploadData.addBookSharedToDb("https://i.ibb.co/hsK4FfG/book10.jpg",5,"The fault in ours Stars"); UploadData.addBookSharedToDb("https://i.ibb.co/bKBzbMt/book2.jpg",2,"Ma Đạo tổ"); UploadData.addBookSharedToDb("https://i.ibb.co/ch48wMz/book3.jpg",4,"Khu vườn ngôn từ"); UploadData.addBookSharedToDb("https://i.ibb.co/QDMDng5/book4.jpg",5,"Người thắp sao trời"); UploadData.addBookSharedToDb("https://i.ibb.co/KL2CTHt/harry1.jpg",5,"Harry Potter và viên đá phù thủy"); UploadData.addBookSharedToDb("https://i.ibb.co/74BHvCC/book6.jpg",5,"Kẻ may mắn"); UploadData.addBookSharedToDb("https://i.ibb.co/1GBFKM4/book8.jpg",4,"Kính vạn hoa "); UploadData.addBookSharedToDb("https://i.ibb.co/fvBqhmd/book9.jpg",4,"Chúc một ngày tốt lành"); UploadData.addBookSharedToDb("https://i.ibb.co/hsK4FfG/book10.jpg",5,"The faults in our stars"); UploadData.addBookSharedToDb("https://i.ibb.co/KL2CTHt/harry1.jpg",5,"Harry Potter và hòn đá phù thủy"); UploadData.addBookSharedToDb("https://i.ibb.co/HHbjzFK/harry2.jpg",5,"Harry Potter và phòng chứa bí mật"); UploadData.addBookSharedToDb("https://i.ibb.co/47fSHVv/book1.jpg",5,"Tuổi trẻ đáng giá bao nhiêu"); } public static List<Photo> getListPhotoHome(){ List<Photo> photoList = new ArrayList<>(); photoList.add(new Photo(R.drawable.book1)); photoList.add(new Photo(R.drawable.book2)); photoList.add(new Photo(R.drawable.book3)); photoList.add(new Photo(R.drawable.book4)); return photoList; } }
[ "70027310+xatkumaulank@users.noreply.github.com" ]
70027310+xatkumaulank@users.noreply.github.com
e7aa09e34acfafa3ae7ff3f2e1dda48f9f3958fc
ed79c59100d2b9452470a68d0213f1c1b35473cf
/client/trino-client/src/main/java/io/trino/client/auth/kerberos/BaseGSSContextProvider.java
67ad182eac3ec28cee905408c2731cdebc69a23b
[ "Apache-2.0" ]
permissive
trinodb/trino
3ce066dde7d1b84511af96f5f77b20bbd5abe0d9
5c3326fd8cfd9d7e676e9bd36f54467fde23dc94
refs/heads/master
2023-08-18T15:36:55.838928
2023-08-10T11:40:10
2023-08-18T09:11:40
166,515,022
7,046
1,949
Apache-2.0
2023-09-14T21:51:07
2019-01-19T06:38:14
Java
UTF-8
Java
false
false
2,116
java
/* * 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 io.trino.client.auth.kerberos; import io.airlift.units.Duration; import org.ietf.jgss.GSSContext; import org.ietf.jgss.GSSCredential; import org.ietf.jgss.GSSException; import org.ietf.jgss.GSSManager; import org.ietf.jgss.Oid; import static java.util.concurrent.TimeUnit.SECONDS; import static org.ietf.jgss.GSSContext.INDEFINITE_LIFETIME; import static org.ietf.jgss.GSSName.NT_HOSTBASED_SERVICE; public abstract class BaseGSSContextProvider implements GSSContextProvider { protected static final GSSManager GSS_MANAGER = GSSManager.getInstance(); protected static final Oid SPNEGO_OID = createOid("1.3.6.1.5.5.2"); protected static final Oid KERBEROS_OID = createOid("1.2.840.113554.1.2.2"); protected static final Duration MIN_CREDENTIAL_LIFETIME = new Duration(60, SECONDS); protected GSSContext createContext(String servicePrincipal, GSSCredential gssCredential) throws GSSException { GSSContext result = GSS_MANAGER.createContext( GSS_MANAGER.createName(servicePrincipal, NT_HOSTBASED_SERVICE), SPNEGO_OID, gssCredential, INDEFINITE_LIFETIME); result.requestMutualAuth(true); result.requestConf(true); result.requestInteg(true); result.requestCredDeleg(true); return result; } static Oid createOid(String value) { try { return new Oid(value); } catch (GSSException e) { throw new AssertionError(e); } } }
[ "praveen.krishna@zohomail.in" ]
praveen.krishna@zohomail.in
489270d8b3d1e765b65f0ee8d47514761212e314
cd1e08bf75adfc3e71bfe3d3350f715925568d30
/src/program_ptiseis/ApostoliPerPilotDialog.java
3c3354a272b3dda915a3963427962850b3dc211b
[ "Apache-2.0" ]
permissive
geranisgiorgos/FlitesScheduling
862f4f907b023970f04e0f2cebe4bfa64d4fd350
2ebd87746913603c71bf04b5b01e19f8d94fb181
refs/heads/master
2020-03-11T19:47:35.170479
2018-04-19T13:17:07
2018-04-19T13:17:07
130,217,973
0
0
null
null
null
null
UTF-8
Java
false
false
5,806
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 program_ptiseis; import java.util.ArrayList; import java.util.Vector; import javax.swing.table.DefaultTableModel; public class ApostoliPerPilotDialog extends javax.swing.JDialog { /** * Creates new form ApostoliPerPilotDialog */ ArrayList<ApostoliPerPilot> apostoles; String name; DefaultTableModel tableModel; public ApostoliPerPilotDialog(java.awt.Frame parent, boolean modal, ArrayList<ApostoliPerPilot> app, String name) { super(parent, modal); apostoles=app; this.name = name; initComponents(); nameField.setText(name); tableModel=(DefaultTableModel)jTable1.getModel(); for(ApostoliPerPilot a:apostoles){ Vector row=new Vector(); row.add(a.getAskisiId()); row.add(a.getCount()); row.add(a.getDays()); tableModel.addRow(row); } } /** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jScrollPane1 = new javax.swing.JScrollPane(); jTable1 = new javax.swing.JTable(); jButton1 = new javax.swing.JButton(); jLabel1 = new javax.swing.JLabel(); nameField = new javax.swing.JTextField(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); jTable1.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { }, new String [] { "Άσκηση", "Αποστολές", "Ημέρες" } ) { Class[] types = new Class [] { java.lang.String.class, java.lang.String.class, java.lang.String.class }; boolean[] canEdit = new boolean [] { false, true, true }; public Class getColumnClass(int columnIndex) { return types [columnIndex]; } public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit [columnIndex]; } }); jScrollPane1.setViewportView(jTable1); jButton1.setText("Ok"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jLabel1.setText("Πιλότος:"); nameField.setEditable(false); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(26, 26, 26) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 355, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(159, 159, 159) .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(81, 81, 81) .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(nameField, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(87, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(39, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(nameField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(22, 22, 22) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jButton1) .addGap(23, 23, 23)) ); pack(); }// </editor-fold>//GEN-END:initComponents private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed dispose(); }//GEN-LAST:event_jButton1ActionPerformed // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton jButton1; private javax.swing.JLabel jLabel1; private javax.swing.JScrollPane jScrollPane1; private javax.swing.JTable jTable1; private javax.swing.JTextField nameField; // End of variables declaration//GEN-END:variables }
[ "geranis.gr@gmail.com" ]
geranis.gr@gmail.com
780b6233b6048ba0f8b3dcb67bab6f7c5526c474
f54b78b45296a7cce50c3583539b8299e05b2ce4
/group12/src/logic/users/CarManufacturingCompany.java
13010826bfb2bb3a79908dc92c636db86c6b2a29
[ "MIT" ]
permissive
MichielAriens/assemassist12
1c5623e0fc6c8f998dc9f317fc15eeef0dc9c420
a72ec872bf317f365a057dad9141ff1a2d193e95
refs/heads/master
2020-07-25T20:06:40.682633
2014-07-05T23:26:44
2014-07-05T23:26:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,768
java
package logic.users; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import org.joda.time.DateTime; import logic.assemblyline.AssemblyLine; import logic.assemblyline.SchedulingStrategy; import logic.car.Order; import logic.workstation.Task; import logic.workstation.Workstation; /** * Class used to describe a car manufacturing company. */ public class CarManufacturingCompany { /** * HashMap holding all the users of this system together with their user names. */ private HashMap<String,User> users; /** * List of all valid names for garage holders. */ private ArrayList<String> validNamesGarageHolders = new ArrayList<String>(); /** * List of all valid names for managers. */ private ArrayList<String> validNamesManager = new ArrayList<String>(); /** * List of all valid names for car mechanic. */ private ArrayList<String> validNamesMechanic = new ArrayList<String>(); /** * List of all valid names for customs shop managers. */ private ArrayList<String> validNamesCustomsManager = new ArrayList<String>(); /** * Variable holding the assembly line of this car manufacturing company. */ private AssemblyLine assemblyLine; /** * Makes a new car manufacturing company. */ public CarManufacturingCompany(){ this.assemblyLine = new AssemblyLine(); this.users = new HashMap<String,User>(); this.initialise(); } /** * Initializes the users of this car manufacturing company. */ private void initialise() { validNamesGarageHolders.add("Jeroen"); validNamesGarageHolders.add("gar"); validNamesManager.add("Wander"); validNamesManager.add("man"); validNamesMechanic.add("Joren"); validNamesMechanic.add("mech"); validNamesCustomsManager.add("Michiel"); validNamesCustomsManager.add("cust"); } /** * Checks if the given user name is valid and returns the corresponding user. * If the given user name is valid and the user does not exist yet, the user is * added to the HashMap of users. If the given user name is not valid, * this method returns null. * @param userName The user name used to login. * @return Returns the user corresponding to the given user name otherwise if: * - the HashMap of users contains the given user name as a key, * - the list of valid manager names contains the given user name, * - the list of valid garage holders names contains the given user name or * - the list of valid mechanic names contains the given user name. * - the list of valid customs shop manager names contains the given user name. * Returns null otherwise. */ public User logIn(String userName){ if(users.containsKey(userName)){ return users.get(userName); } if(validNamesManager.contains(userName)){ Manager user = new Manager(this, userName); users.put(userName, user); return user; } if(validNamesGarageHolders.contains(userName)){ GarageHolder user = new GarageHolder(this, userName); users.put(userName, user); return user; } if(validNamesMechanic.contains(userName)){ Mechanic user = new Mechanic(this, userName); users.put(userName, user); return user; } if(validNamesCustomsManager.contains(userName)){ CustomsManager user = new CustomsManager(this, userName); users.put(userName, user); return user; } return null; } /** * Adds the given order to the assembly line if the given order is not null. * @param order The order which needs to be added to the assembly line. */ public void addOrder(Order order) { if(order != null) this.assemblyLine.addOrder(order); } /** * Method to return the list of workstations of the assembly line * of this car manufacturing company. * @return The workstations of the assembly line. */ public List<Workstation> getWorkStations(){ return this.assemblyLine.getWorkStations(); } /** * Moves the assembly line forward if every work station is ready and * sets the end time of the first order to the given end time. * @return True if the assembly line has been moved. * False if the assembly line can not be moved. */ public boolean moveAssemblyLine(int shiftDuration){ return this.assemblyLine.tryMoveAssemblyLine(shiftDuration); } /** * Returns the current time. * @return The current time. */ public DateTime getCurrentTime(){ return this.assemblyLine.getCurrentTime(); } /** * Returns a string representation of the current statistics. * @return A string representation of the current statistics. */ public String getStatistics() { return assemblyLine.getStatistics(); } /** * Returns a list of the current strategies followed by the available scheduling strategies. * @return a list of the current strategies followed by the available scheduling strategies. */ public List<SchedulingStrategy> getStrategies() { return assemblyLine.getStrategies(); } /** * Returns a list of orders that are viable to be used by the batch specification scheduling strategy. * @return a list of orders that are viable to be used by the batch specification scheduling strategy. */ public List<Order> getBatchList() { return assemblyLine.getBachList(); } /** * Changes the strategy according to the given order. * @param order The order that has to be used as a template for the strategy. */ public void changeStrategy(Order order) { assemblyLine.changeStrategy(order); } /** * Completes the task corresponding to the given task. * @param task A copy of the task that needs to be completed. * @return True if the task is completed successfully * False the task could not be completed. */ public boolean doTask(Task task){ return assemblyLine.doTask(task); } /** * Returns a list of pending tasks at a given workstation. * @param station The a copy of the workstation for which the pending tasks are needed. * @return A list of tasks that are pending at the given workstation. */ public List<Task> getRequiredTasks(Workstation station){ return this.assemblyLine.getRequiredTasks(station); } /** * Returns a list of all tasks at a given workstation. * @param station The a copy of the workstation for which the tasks are needed. * @return A list of tasks at the given workstation. */ public List<Task> getAllTasks(Workstation station){ return this.assemblyLine.getAllTasks(station); } /** * Asks the assembly line to check the given duration, if the duration is allowed it returns true, otherwise false. * @param duration The duration that needs to be checked. * @return True if the duration is allowed. * False otherwise */ public boolean checkPhaseDuration(int duration){ return this.assemblyLine.checkPhaseDuration(duration); } }
[ "michiel.ariens@student.kuleuven.be" ]
michiel.ariens@student.kuleuven.be
87c83600da358155ecd768c39027969c7a47f831
2b84cfbfec6bf5dcc23f1fa95876fdf5e7ec1e0d
/src/com/coolweather/app/activity/ChooseAreaActivity.java
c69345972494cdae20a0e39b147cfbe72327ae35
[ "Apache-2.0" ]
permissive
bblens/coolweather
95d07cfdf2e57273caa8968ac9c6bf91bfcc877a
41a82fcbb892f5c3f707f816dc77db902eadcb4d
refs/heads/master
2020-04-26T02:29:43.087163
2015-04-30T08:09:08
2015-04-30T08:09:08
34,705,364
0
0
null
null
null
null
GB18030
Java
false
false
7,650
java
package com.coolweather.app.activity; import java.util.ArrayList; import java.util.List; import com.coolweather.app.R; import com.coolweather.app.db.CoolWeatherDB; import com.coolweather.app.db.DBHelper; import com.coolweather.app.model.City; import com.coolweather.app.model.County; import com.coolweather.app.model.Province; import com.coolweather.app.util.HttpCallbackListener; import com.coolweather.app.util.HttpUtil; import com.coolweather.app.util.Utility; import android.app.Activity; import android.app.ProgressDialog; import android.content.Intent; import android.content.SharedPreferences; import android.os.Bundle; import android.preference.PreferenceManager; import android.text.TextUtils; import android.view.View; import android.view.Window; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.ArrayAdapter; import android.widget.ListView; import android.widget.TextView; import android.widget.Toast; public class ChooseAreaActivity extends Activity { public static final int LEVEL_PROVINCE = 0; public static final int LEVEL_CITY = 1; public static final int LEVEL_COUNTY = 2; private ProgressDialog progressDialog; private TextView titleText; private ListView listView; private ArrayAdapter<String> adapter; private CoolWeatherDB coolWeatherDB; private List<String> dataList = new ArrayList<String>(); // 省列表 private List<Province> provinceList; // 市列表 private List<City> cityList; // 县列表 private List<County> countyList; // 选中的省份 private Province selectedProvince; // 选中的城市 private City selectedCity; // 当前选中的级别 private int currentLevel; //是否从WeatherActivity中挑战过来 private boolean isFromWeatherActivity; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); isFromWeatherActivity = getIntent().getBooleanExtra("from_weather_activity", false); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); //已经选择了城市且不是从WeatherActivity跳转过来,才会直接跳转到WeatherActivity if(prefs.getBoolean("city_selected", false) && !isFromWeatherActivity){ Intent intent = new Intent(this, WeatherActivity.class); startActivity(intent); finish(); return; } requestWindowFeature(Window.FEATURE_NO_TITLE); setContentView(R.layout.choose_area); titleText = (TextView) findViewById(R.id.title_text); listView = (ListView) findViewById(R.id.list_view); adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, dataList); listView.setAdapter(adapter); coolWeatherDB = CoolWeatherDB.getInstance(this); listView.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { if (currentLevel == LEVEL_PROVINCE) { selectedProvince = provinceList.get(position); } else if (currentLevel == LEVEL_CITY) { selectedCity = cityList.get(position); } else if (currentLevel == LEVEL_COUNTY) { String countyCode = countyList.get(position).getCountyCode(); Intent intent = new Intent(ChooseAreaActivity.this, WeatherActivity.class); intent.putExtra("county_code", countyCode); startActivity(intent); finish(); } } }); // 加载省级数据 queryProvinces(); } // 查询全国所有的省,优先从数据库查询,如果没有查询到再去服务器上查询 private void queryProvinces() { provinceList = coolWeatherDB.loadProvinces(); if (provinceList.size() > 0) { dataList.clear(); for (Province province : provinceList) { dataList.add(province.getProvinceName()); } adapter.notifyDataSetChanged(); listView.setSelection(0); titleText.setText("中国"); currentLevel = LEVEL_PROVINCE; } else { queryFromServer(null, DBHelper.TABLE_PROVINCE); } } // 查询选中省内所有的市,优先从数据库查询,如果没有查询到再去服务器上查询 private void queryCities() { cityList = coolWeatherDB.loadCities(selectedProvince.getId()); if (cityList.size() > 0) { dataList.clear(); for (City city : cityList) { dataList.add(city.getCityName()); } adapter.notifyDataSetChanged(); listView.setSelection(0); titleText.setText(selectedProvince.getProvinceName()); currentLevel = LEVEL_CITY; } else { queryFromServer(selectedProvince.getProvinceCode(), DBHelper.TABLE_CITY); } } // 查询选中市内所有的县,优先从数据库查询,如果没有查询到再去服务器上查询 private void queryCounties() { countyList = coolWeatherDB.loadCounties(selectedCity.getId()); if (countyList.size() > 0) { dataList.clear(); for (County county : countyList) { dataList.add(county.getCountyName()); } adapter.notifyDataSetChanged(); listView.setSelection(0); titleText.setText(selectedCity.getCityName()); currentLevel = LEVEL_COUNTY; } else { queryFromServer(selectedCity.getCitycode(), DBHelper.TABLE_COUNTY); } } // 根据传入的代号和类型从服务器上查询省市县数据 private void queryFromServer(final String code, final String type) { String address; if (!TextUtils.isEmpty(code)) { address = "http://www.weather.com.cn/data/list3/city" + code + ".xml"; } else { address = "http://www.weather.com.cn/data/list3/city.xml"; } showProgressDialog(); HttpUtil.sendHttpRequest(address, new HttpCallbackListener() { @Override public void onFinish(String response) { boolean result = false; if (DBHelper.TABLE_PROVINCE.equals(type)) { result = Utility.handleProvincesResponse(coolWeatherDB, response); } else if (DBHelper.TABLE_CITY.equals(type)) { result = Utility.handleCitiesResponse(coolWeatherDB, response, selectedProvince.getId()); } else if (DBHelper.TABLE_COUNTY.equals(type)) { result = Utility.handleCountiesResponse(coolWeatherDB, response, selectedCity.getId()); } if (result) { runOnUiThread(new Runnable() { @Override public void run() { closeProgressDialog(); if (DBHelper.TABLE_PROVINCE.equals(type)) { queryProvinces(); } else if (DBHelper.TABLE_CITY.equals(type)) { queryCities(); } else if (DBHelper.TABLE_COUNTY.equals(type)) { queryCounties(); } } }); } } @Override public void onError(Exception e) { runOnUiThread(new Runnable() { @Override public void run() { closeProgressDialog(); Toast.makeText(ChooseAreaActivity.this, "加载失败!", Toast.LENGTH_LONG).show(); } }); } }); } // 显示进度对话框 private void showProgressDialog() { if (progressDialog == null) { progressDialog = new ProgressDialog(this); progressDialog.setMessage("正在加载....."); progressDialog.setCanceledOnTouchOutside(false); } progressDialog.show(); } // 关闭进度对话框 private void closeProgressDialog() { if (progressDialog != null) { progressDialog.dismiss(); } } // 捕获Back按键,根据当前的级别来判断,此时应该返回市列表,省列表,还是直接退出 @Override public void onBackPressed() { if (currentLevel == LEVEL_COUNTY) { queryCities(); } else if (currentLevel == LEVEL_CITY) { queryProvinces(); } else { if(isFromWeatherActivity){ Intent intent = new Intent(this, WeatherActivity.class); startActivity(intent); } finish(); } // super.onBackPressed(); } }
[ "23695158@qq.com" ]
23695158@qq.com
3b718769bc556bba994e5633e35766aa84346dc4
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/main/java/org/gradle/test/performancenull_291/Productionnull_29039.java
77c4d1db624d343c8c73e27b71ae9eec2f980bcb
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
588
java
package org.gradle.test.performancenull_291; public class Productionnull_29039 { private final String property; public Productionnull_29039(String param) { this.property = param; } public String getProperty() { return property; } private String prop0; public String getProp0() { return prop0; } public void setProp0(String value) { prop0 = value; } private String prop1; public String getProp1() { return prop1; } public void setProp1(String value) { prop1 = value; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
b575127f327d75ddeee65209ed17d6fbcbfcb77e
0c49ca6f45153851f58d63dd7f3b610385cccfd5
/gatkUSCEC/gatkUSCEC/org/broadinstitute/sting/gatk/uscec/bisulfitesnpmodel/BisSNP.java
1afdc5578bb40e97c1c855675bf26fe295e6a392
[]
no_license
uec/genomeLibs
2d258bd4ae4240ba43566c4d77f83e81886a5760
67f249afb402467ec6cf6a6dc4aa2e3ee6cd0df9
refs/heads/master
2020-05-17T09:54:57.164726
2015-10-14T17:17:07
2015-10-14T17:17:07
14,434,776
1
0
null
null
null
null
UTF-8
Java
false
false
15,750
java
package org.broadinstitute.sting.gatk.uscec.bisulfitesnpmodel; import java.io.File; import java.io.FileNotFoundException; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.List; import java.util.ResourceBundle; import net.sf.picard.filter.SamRecordFilter; import org.broad.tribble.TribbleException; import org.broad.tribble.vcf.SortingVCFWriter; import org.broad.tribble.vcf.VCFWriter; import org.broadinstitute.sting.commandline.Argument; import org.broadinstitute.sting.commandline.ArgumentCollection; import org.broadinstitute.sting.commandline.ArgumentTypeDescriptor; import org.broadinstitute.sting.commandline.CommandLineProgram; import org.broadinstitute.sting.commandline.Output; import org.broadinstitute.sting.commandline.Tags; import org.broadinstitute.sting.gatk.CommandLineExecutable; import org.broadinstitute.sting.gatk.GenomeAnalysisEngine; import org.broadinstitute.sting.gatk.WalkerManager; import org.broadinstitute.sting.gatk.arguments.GATKArgumentCollection; import org.broadinstitute.sting.gatk.datasources.reads.SAMReaderID; import org.broadinstitute.sting.gatk.io.stubs.OutputStreamArgumentTypeDescriptor; import org.broadinstitute.sting.gatk.io.stubs.SAMFileReaderArgumentTypeDescriptor; import org.broadinstitute.sting.gatk.io.stubs.SAMFileWriterArgumentTypeDescriptor; import org.broadinstitute.sting.gatk.io.stubs.VCFWriterArgumentTypeDescriptor; import org.broadinstitute.sting.gatk.refdata.utils.RMDTriplet; import org.broadinstitute.sting.gatk.refdata.utils.RMDTriplet.RMDStorageType; import org.broadinstitute.sting.gatk.refdata.utils.helpers.DbSNPHelper; import org.broadinstitute.sting.gatk.walkers.Attribution; import org.broadinstitute.sting.gatk.walkers.Walker; import org.broadinstitute.sting.gatk.walkers.annotator.VariantAnnotatorEngine; import org.broadinstitute.sting.utils.exceptions.UserException; import org.broadinstitute.sting.utils.help.ApplicationDetails; import org.broadinstitute.sting.utils.text.TextFormattingUtils; import org.broadinstitute.sting.utils.text.XReadLines; import org.broadinstitute.sting.gatk.walkers.coverage.DepthOfCoverageWalker; import org.broadinstitute.sting.gatk.uscec.bisulfitesnpmodel.BisulfiteGenotyper; /* * Bis-SNP/BisSNP: It is a genotyping and methylation calling in bisulfite treated * massively parallel sequencing (Bisulfite-seq and NOMe-seq) on Illumina platform * Copyright (C) <2011> <Yaping Liu: lyping1986@gmail.com> * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ public class BisSNP extends CommandLineExecutable { @Argument(fullName = "analysis_type", shortName = "T", doc = "Type of analysis to run") private String analysisName = null; @Argument(fullName = "auto_estimate_cytosine_mode", shortName = "aecm", doc = "automately estimate cytosine pattern methylation status in the first iteration") private static boolean autoEstimateC = false; //control the output, output to TCGA VCF //@Output(doc="File to which variants should be written",required=false) // protected SortingVCFWriter writer = null; private static String BisVersion = "Bis-SNP-0.38"; private final Collection<Object> bisulfiteArgumentSources = new ArrayList<Object>(); // argument collection, the collection of command line args we accept. copy from GATK, since they are private class in GATK @ArgumentCollection private GATKArgumentCollection argCollection = new GATKArgumentCollection(); private static String argCommandline = ""; //to record it is in second iteration or not private static boolean secondIteration = false; //to record cytosine pattern methylation status estimated in the first iteration private static CytosineTypeStatus cts = null; public Walker<?,?> walker = null; @Override protected ApplicationDetails getApplicationDetails() { return new ApplicationDetails(createApplicationHeader(), Collections.<String>emptyList(), ApplicationDetails.createDefaultRunningInstructions(getClass()), null); } @Override public String getAnalysisName() { // TODO Auto-generated method stub return analysisName; } @Override protected GATKArgumentCollection getArgumentCollection() { // TODO Auto-generated method stub return argCollection; } public static void main(String[] args) { // TODO Auto-generated method stub try { BisSNP instance = new BisSNP(); for (String str : args) { argCommandline = argCommandline + str + " "; } //System.err.println(output); start(instance, args); secondIteration = true; if(autoEstimateC & secondIteration){ instance.execute(); // do the second iteration if it is in two-iteration mode } System.exit(CommandLineProgram.result); } catch (UserException e) { exitSystemWithUserError(e); } catch (TribbleException e) { exitSystemWithUserError(e); } catch (Exception e) { exitSystemWithError(e); } } //set up Writer information. if writer is not initiat here, then there will be some wired close stream problem. public void setupInfo(){ if(walker instanceof BisulfiteGenotyper){ if(argCollection.numberOfThreads == 1){ // ((BisulfiteGenotyper) walker).setWriter(writer); } else{ // ((BisulfiteGenotyper) walker).setWriter(writer); } } } public static List<String> createApplicationHeader() { List<String> header = new ArrayList<String>(); header.add(String.format("The %s, Compiled %s", getBisSNPVersionNumber(), getBuildTime())); header.add(String.format("Based on The Genome Analysis Toolkit (GATK) v%s (prebuild GATK package could be download here: ftp://ftp.broadinstitute.org/pub/gsa/GenomeAnalysisTK/GenomeAnalysisTK-1.0.5336.tar.bz2)",getVersionNumber())); header.add("Copyright (c) 2011 USC Epigenome Center"); header.add("Please view our documentation at http://wiki.epigenome.usc.edu/twiki/bin/view"); header.add("For support, please send email to yapingli@usc.edu or benbfly@gmail.com"); return header; } public static String getVersionNumber() { ResourceBundle headerInfo = TextFormattingUtils.loadResourceBundle("StingText"); return headerInfo.containsKey("org.broadinstitute.sting.gatk.version") ? headerInfo.getString("org.broadinstitute.sting.gatk.version") : "<unknown>"; } public static String getBuildTime() { ResourceBundle headerInfo = TextFormattingUtils.loadResourceBundle("StingText"); return headerInfo.containsKey("build.timestamp") ? headerInfo.getString("build.timestamp") : "<unknown>"; } @Override protected int execute() throws Exception { try { if(autoEstimateC & secondIteration){ // if auto-estimate cytosine model, and second iteration // System.out.println("2nd iteration!"); bisulfiteArgumentSources.clear(); bisulfiteArgumentSources.add(this); walker = (BisulfiteGenotyper) engine.getWalkerByName(getAnalysisName()); ((BisulfiteGenotyper) walker).setAutoParameters(autoEstimateC, secondIteration, argCommandline); setupInfo(); engine.setWalker(walker); walker.setToolkit(engine); ((BisulfiteGenotyper) walker).setCytosineMethyStatus(cts); //transfer cytosine pattern methylation status estimated in the first iteration to 2nd iteration loadArgumentsIntoObject(walker); bisulfiteArgumentSources.add(walker); Collection<SamRecordFilter> filters = engine.getFilters(); for (SamRecordFilter filter: filters) { loadArgumentsIntoObject(filter); bisulfiteArgumentSources.add(filter); } engine.execute(); } else{ //1st iteration engine.setParser(parser); bisulfiteArgumentSources.add(this); walker = engine.getWalkerByName(getAnalysisName()); if(walker instanceof BisulfiteGenotyper){ ((BisulfiteGenotyper) walker).setAutoParameters(autoEstimateC, secondIteration, argCommandline); } engine.setArguments(getArgumentCollection()); engine.setSAMFileIDs(unpackBAMFileList(getArgumentCollection())); engine.setReferenceMetaDataFiles(unpackRODBindings(getArgumentCollection())); engine.setWalker(walker); walker.setToolkit(engine); Collection<SamRecordFilter> filters = engine.createFilters(); engine.setFilters(filters); loadArgumentsIntoObject(walker); bisulfiteArgumentSources.add(walker); for (SamRecordFilter filter: filters) { loadArgumentsIntoObject(filter); bisulfiteArgumentSources.add(filter); } setupInfo(); //if(walker instanceof BisulfiteGenotyper){ //((BisulfiteGenotyper) walker).setWriter(writer); //} engine.execute(); if(walker instanceof BisulfiteGenotyper){ cts = ((BisulfiteGenotyper) walker).getCytosineMethyStatus(); //receive cytosine pattern methylation status estimated in the first iteration } } } catch ( Exception e ) { throw e; } return 0; } //copy from GATK, since they are private class in GATK, or I could just limit the number of BAM used /** * Unpack the bam files to be processed, given a list of files. That list of files can * itself contain entries which are lists of other files to be read (note: you cannot have lists of lists of lists) * * @param argCollection the command-line arguments from which to extract the BAM file list. * @return a flattened list of the bam files provided */ private List<SAMReaderID> unpackBAMFileList(GATKArgumentCollection argCollection) { List<SAMReaderID> unpackedReads = new ArrayList<SAMReaderID>(); for( String inputFileName: argCollection.samFiles ) { Tags inputFileNameTags = parser.getTags(inputFileName); inputFileName = expandFileName(inputFileName); if (inputFileName.toLowerCase().endsWith(".list") ) { try { for(String fileName : new XReadLines(new File(inputFileName))) unpackedReads.add(new SAMReaderID(fileName,parser.getTags(inputFileName))); } catch( FileNotFoundException ex ) { throw new UserException.CouldNotReadInputFile(new File(inputFileName), "Unable to find file while unpacking reads", ex); } } else if(inputFileName.toLowerCase().endsWith(".bam")) { unpackedReads.add(new SAMReaderID(inputFileName,inputFileNameTags)); } else if(inputFileName.endsWith("stdin")) { unpackedReads.add(new SAMReaderID(inputFileName,inputFileNameTags)); } else { throw new UserException.CommandLineException(String.format("The GATK reads argument (-I) supports only BAM files with the .bam extension and lists of BAM files " + "with the .list extension, but the file %s has neither extension. Please ensure that your BAM file or list " + "of BAM files is in the correct format, update the extension, and try again.",inputFileName)); } } return unpackedReads; } //copy from GATK, since they are private class in GATK /** * Convert command-line argument representation of ROD bindings to something more easily understandable by the engine. * @param argCollection input arguments to the GATK. * @return a list of expanded, bound RODs. */ private Collection<RMDTriplet> unpackRODBindings(GATKArgumentCollection argCollection) { Collection<RMDTriplet> rodBindings = new ArrayList<RMDTriplet>(); for (String fileName: argCollection.RODBindings) { Tags tags = parser.getTags(fileName); fileName = expandFileName(fileName); List<String> positionalTags = tags.getPositionalTags(); if(positionalTags.size() != 2) throw new UserException("Invalid syntax for -B (reference-ordered data) input flag. " + "Please use the following syntax when providing reference-ordered " + "data: -B:<name>,<type> <filename>."); String name = positionalTags.get(0); String type = positionalTags.get(1); RMDStorageType storageType = null; if(tags.getValue("storage") != null) storageType = Enum.valueOf(RMDStorageType.class,tags.getValue("storage")); else if(fileName.toLowerCase().endsWith("stdin")) storageType = RMDStorageType.STREAM; else storageType = RMDStorageType.FILE; rodBindings.add(new RMDTriplet(name,type,fileName,storageType)); } if (argCollection.DBSNPFile != null) { if(argCollection.DBSNPFile.toLowerCase().contains("vcf")) throw new UserException("--DBSNP (-D) argument currently does not support VCF. To use dbSNP in VCF format, please use -B:dbsnp,vcf <filename>."); String fileName = expandFileName(argCollection.DBSNPFile); RMDStorageType storageType = fileName.toLowerCase().endsWith("stdin") ? RMDStorageType.STREAM : RMDStorageType.FILE; rodBindings.add(new RMDTriplet(DbSNPHelper.STANDARD_DBSNP_TRACK_NAME,"dbsnp",fileName,storageType)); } return rodBindings; } //copy from GATK, since they are private class in GATK private String expandFileName(String argument) { if(argument.trim().equals("-")) return "/dev/stdin"; return argument; } /** * Subclasses of CommandLinePrograms can provide their own types of command-line arguments. * @return A collection of type descriptors generating implementation-dependent placeholders. */ @Override protected Collection<ArgumentTypeDescriptor> getArgumentTypeDescriptors() { return Arrays.asList( new VCFWriterArgumentTypeDescriptor(engine,System.out,bisulfiteArgumentSources), new SAMFileReaderArgumentTypeDescriptor(engine), new SAMFileWriterArgumentTypeDescriptor(engine,System.out), new OutputStreamArgumentTypeDescriptor(engine,System.out) ); } public static String getBisSNPVersionNumber(){ return BisVersion; } }
[ "dnaase@2b8d95ea-eb58-0410-8a55-29fbd2c437c3" ]
dnaase@2b8d95ea-eb58-0410-8a55-29fbd2c437c3
b4d7b947badbe9ef1cce61fd3555a97855a8f016
d04961d1bd6ebb57195e9340d74fa1f2bb6acf11
/src/main/java/com/web/entity/Check.java
416abad8d39f0d8284d4c3c8e73ac0ced4245d06
[]
no_license
Snowwwwwwwwww/HospitalSystem
a12feb9accabb57ab1e898c6b79d1cab32ff4bc2
cba233fa9c9ca91b1dbfe461b5e3b277b0f3e9f2
refs/heads/master
2023-04-13T05:36:48.272805
2019-09-27T01:19:35
2019-09-27T01:19:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,681
java
package com.web.entity; import java.io.Serializable; /** * check * * @author */ public class Check implements Serializable { /** * 检查序号 */ private Integer checkid; /** * 检查医师 */ private Integer checkdoctor; private String checktime; /** * 检查项目id */ private Integer checkprojectno; private String checkresult; private Integer doctoradviceid; private Integer isdelete; // -----------------多对一关系----------------- private User doctor; private Checkproject checkProject; private Doctoradvice doctorAdvice; // -----------------多对一关系----------------- public User getDoctor() { return doctor; } public void setDoctor(User doctor) { this.doctor = doctor; } public Checkproject getCheckProject() { return checkProject; } public void setCheckProject(Checkproject checkProject) { this.checkProject = checkProject; } public Doctoradvice getDoctorAdvice() { return doctorAdvice; } public void setDoctorAdvice(Doctoradvice doctorAdvice) { this.doctorAdvice = doctorAdvice; } private static final long serialVersionUID = 1L; public Integer getCheckid() { return checkid; } public void setCheckid(Integer checkid) { this.checkid = checkid; } public Integer getCheckdoctor() { return checkdoctor; } public void setCheckdoctor(Integer checkdoctor) { this.checkdoctor = checkdoctor; } public String getChecktime() { return checktime; } public void setChecktime(String checktime) { this.checktime = checktime; } public Integer getCheckprojectno() { return checkprojectno; } public void setCheckprojectno(Integer checkprojectno) { this.checkprojectno = checkprojectno; } public String getCheckresult() { return checkresult; } public void setCheckresult(String checkresult) { this.checkresult = checkresult; } public Integer getDoctoradviceid() { return doctoradviceid; } public void setDoctoradviceid(Integer doctoradviceid) { this.doctoradviceid = doctoradviceid; } public Integer getIsdelete() { return isdelete; } public void setIsdelete(Integer isdelete) { this.isdelete = isdelete; } @Override public boolean equals(Object that) { if (this == that) { return true; } if (that == null) { return false; } if (getClass() != that.getClass()) { return false; } Check other = (Check) that; return (this.getCheckid() == null ? other.getCheckid() == null : this.getCheckid().equals(other.getCheckid())) && (this.getCheckdoctor() == null ? other.getCheckdoctor() == null : this.getCheckdoctor().equals(other.getCheckdoctor())) && (this.getChecktime() == null ? other.getChecktime() == null : this.getChecktime().equals(other.getChecktime())) && (this.getCheckprojectno() == null ? other.getCheckprojectno() == null : this.getCheckprojectno().equals(other.getCheckprojectno())) && (this.getCheckresult() == null ? other.getCheckresult() == null : this.getCheckresult().equals(other.getCheckresult())) && (this.getDoctoradviceid() == null ? other.getDoctoradviceid() == null : this.getDoctoradviceid().equals(other.getDoctoradviceid())) && (this.getIsdelete() == null ? other.getIsdelete() == null : this.getIsdelete().equals(other.getIsdelete())); } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((getCheckid() == null) ? 0 : getCheckid().hashCode()); result = prime * result + ((getCheckdoctor() == null) ? 0 : getCheckdoctor().hashCode()); result = prime * result + ((getChecktime() == null) ? 0 : getChecktime().hashCode()); result = prime * result + ((getCheckprojectno() == null) ? 0 : getCheckprojectno().hashCode()); result = prime * result + ((getCheckresult() == null) ? 0 : getCheckresult().hashCode()); result = prime * result + ((getDoctoradviceid() == null) ? 0 : getDoctoradviceid().hashCode()); result = prime * result + ((getIsdelete() == null) ? 0 : getIsdelete().hashCode()); return result; } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append(getClass().getSimpleName()); sb.append(" ["); sb.append("Hash = ").append(hashCode()); sb.append(", checkid=").append(checkid); sb.append(", checkdoctor=").append(checkdoctor); sb.append(", checktime=").append(checktime); sb.append(", checkprojectno=").append(checkprojectno); sb.append(", checkresult=").append(checkresult); sb.append(", doctoradviceid=").append(doctoradviceid); sb.append(", isdelete=").append(isdelete); sb.append(", serialVersionUID=").append(serialVersionUID); sb.append("]"); return sb.toString(); } }
[ "15950507893@163.com" ]
15950507893@163.com
7d4a979c8350b1278ddaecedc5df75a879299fe0
92b722917ec4bd080000fabce91b845a50e67f03
/jmall-user/src/main/java/com/taiji/jmall/jmalluser/JmallUserApplication.java
20398e6056935feff22bfcb4eec1647392a8065f
[]
no_license
jyf1110/Jmall
294e13df973982e65af0e963d8f076343083ee0d
b94194ab9930563eb85ec00513438e5f8774afd9
refs/heads/master
2022-09-15T01:17:07.100866
2020-03-15T12:29:41
2020-03-15T12:29:41
242,340,080
0
0
null
2022-09-01T23:21:06
2020-02-22T12:44:14
Java
UTF-8
Java
false
false
447
java
package com.taiji.jmall.jmalluser; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import tk.mybatis.spring.annotation.MapperScan; @SpringBootApplication @MapperScan(basePackages ="com.taiji.jmall.jmalluser.mapper") public class JmallUserApplication { public static void main(String[] args) { SpringApplication.run(JmallUserApplication.class, args); } }
[ "2804123995@qq.com" ]
2804123995@qq.com
2c338f3ff043f2a1595f5b04daa292b93bc8ae68
635a18f362830d9ce65b9dbd6a97e418baba2fec
/Mini Project/src/Controller/User/Sort/UserSortOptionController.java
3cbaf1a95908fd194c3585b6f4d3a6dda6071a36
[]
no_license
YogeshSakhalkar/Java-couse
0946aa0ce9eaa802c77e4775f613785fd929b7cc
05b94f87abb576cc0880f3263a46714291b8ce54
refs/heads/master
2023-03-21T14:27:33.536364
2021-02-27T15:45:06
2021-02-27T15:45:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
657
java
package Controller.User.Sort; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import view.User.sort.UserSortOptions; public class UserSortOptionController implements ActionListener{ UserSortOptions userSortOptions; public UserSortOptionController(UserSortOptions u) { // TODO Auto-generated constructor stub userSortOptions = u; } @Override public void actionPerformed(ActionEvent e) { // TODO Auto-generated method stub if(e.getSource() == userSortOptions.getBtSalesManager()) { } if(e.getSource() == userSortOptions.getBtHr()) { } if(e.getSource() == userSortOptions.getBtAdmin()) { } } }
[ "yogeshsakhalkar70@gmail.com" ]
yogeshsakhalkar70@gmail.com
fb91d7d5bd1293403fed4e24c523c7f89ee8637a
f13a9b51ec6ee5c05b7a570e6ecee07052a6935f
/sosoorder/src/main/java/com/soso/app/work/service/WorkVO.java
654f9f18f5ac9937311450d8a5b5bc25370b5be7
[]
no_license
eo339912/sosoorder
f32e540950b2b0a2598d1513d245b244b7cfcdf3
db9df1aafa32864f77b04095ca3cc3bba91dc1de
refs/heads/master
2022-12-14T05:53:58.710685
2020-08-21T02:23:06
2020-08-21T02:23:06
295,882,249
0
0
null
null
null
null
UTF-8
Java
false
false
226
java
package com.soso.app.work.service; import lombok.Data; import lombok.NoArgsConstructor; @Data @NoArgsConstructor public class WorkVO {//11개 String empNum; //insert view 입력 제외 String workStart; String workEnd; }
[ "meditatif@naver.com" ]
meditatif@naver.com
3d2e6c8477cf392ef9a8cccf023e9a1249506141
72027796a3a715910c5229a22f8b07e971d2d319
/src/main/java/edu/isi/bmkeg/kefed/utils/json/OntologyTermReference.java
a2eff9ab82d052649f90a7739cbb9e8d459b1fcf
[]
no_license
BMKEG/kefedDao
06c994c0865be7619c3d576c8dcadb735ffe3ae2
d5d1d04bc7dc9958d4fd2d273bc9e06e990780b4
refs/heads/master
2021-01-10T00:53:13.352785
2016-12-19T18:50:10
2016-12-19T18:50:10
10,590,831
0
0
null
null
null
null
UTF-8
Java
false
false
1,137
java
package edu.isi.bmkeg.kefed.utils.json; public class OntologyTermReference { private String ontology; private String ontologyIdentifier; private String ontologyLocalName; private String _type; private String description; private String termURL; public void setOntology(String ontology) { this.ontology = ontology; } public String getOntology() { return ontology; } public void setOntologyIdentifier(String ontologyIdentifier) { this.ontologyIdentifier = ontologyIdentifier; } public String getOntologyIdentifier() { return ontologyIdentifier; } public void setOntologyLocalName(String ontologyLocalName) { this.ontologyLocalName = ontologyLocalName; } public String getOntologyLocalName() { return ontologyLocalName; } public void set_type(String _type) { this._type = _type; } public String get_type() { return _type; } public void setDescription(String description) { this.description = description; } public String getDescription() { return description; } public void setTermURL(String termURL) { this.termURL = termURL; } public String getTermURL() { return termURL; } }
[ "gully@usc.edu" ]
gully@usc.edu
8330df772767ac16405dc836df5ddf6d021f7918
2508b10e465c00c23b1bfff777c1c43612ca9036
/spaceInvaders/Laser.java
af46e6d3617873517f7e9312afc4018ca3f6f92b
[]
no_license
MatthewWang1/APCS-project-space-invaders
871fe320348ab3e12b009bea4ca06bb0fdb9ce6b
be430f29a2e0e2acdf4c70d7cdcc7c4a15338a95
refs/heads/master
2022-12-28T04:59:26.428757
2020-10-16T02:54:02
2020-10-16T02:54:02
304,497,644
0
0
null
null
null
null
UTF-8
Java
false
false
2,123
java
package spaceInvaders; import java.awt.Color; import java.awt.Graphics; /** * Laser class. Can be either a player laser or alien laser. * * @author Matthew Wang and Christopher Kim * @version May 25, 2020 * @author Period: 1 * @author Assignment: APCS_Final_Project * * @author Sources: TODO */ public class Laser implements Sprite { private int vy; private int x; private int y; private int w = 6; private int h = 10; private Color color; private int radius = 8; /** * constructor, initializes fields * * @param x * x position * @param y * y position * @param vy * y velocity * @param c * color */ public Laser( int x, int y, int vy, Color c ) { this.x = x; this.y = y; this.vy = vy; color = c; } /** * updates the laser by changing its y position */ public void update() { y += vy; } /** * returns whether it is in the screen or not * * @return true if it is in, false otherwise */ public boolean isIn() { return !( x < 0 || x > Main.WIDTH || y < 0 || y > Main.HEIGHT ); } /** * draws the laser * * @param g * graphics used to draw */ public void draw( Graphics g ) { g.setColor( color ); g.fillRect( x, y, w, h ); } /** * gets the x value * * @return x value */ public int getX() { return (int)x; } /** * gets the y value * * @return y value */ public int getY() { return (int)y; } /** * gets the radius * * @return radius value */ public int getR() { return radius; } /** * unused method */ public void reset() { // TODO Auto-generated method stub } }
[ "matthew.tl.wang@gmail.com" ]
matthew.tl.wang@gmail.com
d64ef62078c58989c101f0e7656cc0b891f97f10
16d2d870f9dfa36a3d9b08d3cbe328ea280784fe
/src/com/example/asgard/BattleField.java
b9e6ab382ec1d3436ecf143191bfcd9a0540459f
[]
no_license
NorthEuropeGroup/AsgardServer_v2
8876a17ba32d917ece88cd4d556492dfc9238f6c
7b11648301432b0938a9bb8952c5afb1f88f8dd2
refs/heads/master
2021-01-10T19:34:22.997769
2014-06-04T13:53:34
2014-06-04T13:53:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,261
java
package com.example.asgard; import java.util.*; public class BattleField { public ArrayList<String> IDs; public ArrayList<AllCard> actionOrder; public ArrayList<BattleCard> team; public BattleField(String ID_A, String ID_B) { IDs = new ArrayList<String>(); IDs.add(ID_A); IDs.add(ID_B); actionOrder = new ArrayList<AllCard>(); team = new ArrayList<BattleCard>(); } public BattleField(BattleCard b1, BattleCard b2) { actionOrder = new ArrayList<AllCard>(); team = new ArrayList<BattleCard>(); team.add(b1); team.add(b2); IDs = new ArrayList<String>(); IDs.add(b1.getMaster()); IDs.add(b2.getMaster()); } public void determineOrder() { ArrayList<AllCard> temp = new ArrayList<AllCard>(); int max_agi = 0; int max_index = -1; temp.add(team.get(0).cardSelect.get(0)); temp.add(team.get(0).cardSelect.get(1)); temp.add(team.get(1).cardSelect.get(0)); temp.add(team.get(1).cardSelect.get(1));//add 4 cards into the temp array for(int i = 0; i < temp.size(); i++) { if(temp.get(i).agi > max_agi) { max_agi = temp.get(i).agi; max_index = i; } if(i == temp.size()-1) { actionOrder.add(temp.get(max_index)); temp.remove(max_index); max_agi = 0; max_index = -1; } } } }
[ "hwdhung@gmail.com" ]
hwdhung@gmail.com
897cb59473885eeeab90b1b7a4ca913fcda650bd
47fdb6acceba84ea4861aef9f3acfd80295ff413
/app/src/main/java/com/mobilegiants/megila/LawsOfPurimActivity.java
07d76a7a9623b3d2797662b157bdf85e6cc5f9bf
[]
no_license
shayhaimgalaxys2/MegilatEster
1cc44adcc113f364690d3461852ee5a33b002c2e
47642018a91f0aedd7dabe308f471e9a07135c7e
refs/heads/master
2023-03-06T21:43:20.897466
2023-03-06T06:43:19
2023-03-06T06:43:19
51,688,574
0
0
null
null
null
null
UTF-8
Java
false
false
424
java
package com.mobilegiants.megila; import android.app.Activity; import android.os.Bundle; public class LawsOfPurimActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); try { setContentView(R.layout.activity_laws_of_purim); } catch (Exception e) { e.printStackTrace(); setContentView(R.layout.activity_laws_of_purim_2); } } }
[ "shayhaimgalaxys2@gmail.com" ]
shayhaimgalaxys2@gmail.com
9d818cbd8772e63a16a01a7ae8bed3be2d9b85aa
17d27d8d37626e1d1c01ecf72e2d9d33e95d713d
/final-framework-testng/src/com/training/pom/RTTC_072_POM_ErrorMsgForInvalidProductAdd.java
d247680a9d4bffcd29957af1ec874937c429b10e
[]
no_license
BabitaSelenium/SeleniumProject1
e5aac1276860b792d1e1d9eea718a8dd91c6af19
2e50c35120304dd1d68738e0fbbe02da5cfbd3df
refs/heads/master
2022-07-04T10:10:27.299231
2019-09-26T07:02:59
2019-09-26T07:02:59
205,305,874
0
0
null
2022-06-29T17:36:50
2019-08-30T04:42:00
Java
UTF-8
Java
false
false
8,160
java
package com.training.pom; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.PageFactory; public class RTTC_072_POM_ErrorMsgForInvalidProductAdd { private WebDriver driver; public RTTC_072_POM_ErrorMsgForInvalidProductAdd(WebDriver driver) { this.driver = driver; PageFactory.initElements(driver, this); } //Path for LOGIN @FindBy(id="input-username") private WebElement userName; @FindBy(id="input-password") private WebElement password; @FindBy(xpath="//*[@id=\"content\"]/div/div/div/div/div[2]/form/div[3]/button") private WebElement loginBtn; //After login all path to navigate as per testcase @FindBy(xpath="//*[@id=\"button-menu\"]") private WebElement buttonmenu; @FindBy(linkText="Catalog") //(id="menu-catalog") private WebElement catalog; @FindBy(linkText="Products") // xpath="//*[@id='menu-catalog']/ul/li[2]/a") private WebElement product; ///for adding product path @FindBy (xpath="//div[@class='pull-right']//a[@class='btn btn-primary']") private WebElement plusbutton; //Textbox forProduct name @FindBy (xpath="//input[@id='input-name1']") private WebElement productname; //Textbob for Meta Tag Title @FindBy (xpath="//input[@id='input-meta-title1']") private WebElement metaTagTitle; //Step6: Data tab path @FindBy (xpath="//a[contains(text(),'Data')]") private WebElement dataTab; //Step 7: Model textbox path @FindBy (xpath="//input[@id='input-model']") private WebElement modelTextbox; // Step 8: Price Textbox path @FindBy (xpath="//input[@id='input-price']") private WebElement priceTextbox; // Step 9: Quantity Textbox path @FindBy (xpath="//input[@id='input-quantity']") private WebElement quantityTextbox; // Step 10: Link tab path @FindBy (xpath="//a[contains(text(),'Links')]") private WebElement linktab; //Step 11: dropdown box not listed, so input textbox path considered @FindBy (xpath="//input[@id='input-category']") private WebElement CategoriesTextbox; // Step 13: all default links path<Attribute,Option,Recurring,Discount @FindBy (xpath="//*[@id=\"form-product\"]/ul/li[4]/a") private WebElement AttributeTab; @FindBy (xpath="//*[@id=\"form-product\"]/ul/li[5]/a") private WebElement optionTab; @FindBy (xpath="//*[@id=\"form-product\"]/ul/li[6]/a") private WebElement recurringTab; @FindBy (xpath="//*[@id=\"form-product\"]/ul/li[7]/a") private WebElement discountTab; // @FindBy (xpath="//*[@id=\"discount\"]/tfoot/tr/td[2]/button") @FindBy (xpath="//table[@id='discount']//button[@class='btn btn-primary']") private WebElement plusButtonDiscountTab; @FindBy (xpath="//*[@id=\"discount-row0\"]/td[2]/input") private WebElement quantityDiscountTab; @FindBy (xpath="//*[@id=\"discount-row0\"]/td[4]/input") private WebElement priceDiscountTab; @FindBy (xpath="//*[@id=\"form-product\"]/ul/li[8]/a") private WebElement specialTab; @FindBy (xpath="//*[@id=\"form-product\"]/ul/li[9]/a") private WebElement imageTab; @FindBy (xpath="//*[@id=\"form-product\"]/ul/li[10]/a") private WebElement rewardpointTab; @FindBy (xpath="//*[@id=\"input-points\"]") private WebElement pointsRewardTab; @FindBy (xpath="//*[@id=\"form-product\"]/ul/li[11]/a") private WebElement designTab; // SAVE button path @FindBy (xpath="//div[@class='pull-right']//button[@class='btn btn-primary']") //i[@class='fa fa-save'] ////*[@id=\"content\"]/div[1]/div/div/button private WebElement saveBtn; //For search of a product all below are locator @FindBy (xpath="//input[@id='input-name']") private WebElement productNameSearch; @FindBy (xpath="//*[@id='input-price']") private WebElement priceSearch; @FindBy (xpath="//*[@id=\"input-model\"]") private WebElement modelSearch; @FindBy (xpath="//*[@id=\"input-quantity\"]") private WebElement quantitySearch; @FindBy (xpath="//div[@class='alert alert-danger']") private WebElement warningmessage; //methods for LOGIN clicks public void sendUserName(String userName) { this.userName.clear(); this.userName.sendKeys(userName); } public void sendPassword(String password) { this.password.clear(); this.password.sendKeys(password); } public void clickLoginBtn() { this.loginBtn.click(); } //Methods to navigates to all elements after LOGIN public void clickButtonMenu() { // TODO Auto-generated method stub this.buttonmenu.click(); } public void clickCatalogMenu() { // TODO Auto-generated method stub this.catalog.click(); } public void clickProduct() { // TODO Auto-generated method stub this.product.click(); } public void clickplusButton() { // TODO Auto-generated method stub this.plusbutton.click(); } public void sendproductname(String productname) { this.productname.clear(); this.productname.sendKeys(productname); // this.productname.getText(); } public void sendTextmetaTitletag(String metaTagTitle) { this.metaTagTitle.clear(); this.metaTagTitle.sendKeys(metaTagTitle); } public void clickonDataTab() { this.dataTab.click(); } public void sendTextModelTextbox(String modelTextbox) { this.modelTextbox.clear(); this.modelTextbox.sendKeys(modelTextbox); } public void sendTextPriceTextbox(String priceTextbox) { this.priceTextbox.clear(); this.priceTextbox.sendKeys(priceTextbox); } public void sendTextQuantityTextbox(String quantityTextbox) { this.quantityTextbox.clear(); this.quantityTextbox.sendKeys(quantityTextbox); } public void clickonLinkTab() { this.linktab.click(); } public void sendTextCategoriesTextbox(String CategoriesTextbox) throws InterruptedException { this.CategoriesTextbox.clear(); //String script = Thread.sleep(1000); } public void clickonAttributeTab() { this.AttributeTab.click(); } public void clickonOptionTab() { this.optionTab.click(); } public void clickonRecurringTab() { this.recurringTab.click(); } public void clickonDiscountTab() { this.discountTab.click(); } public void clickonPlusButtonDiscountTab() { this.plusButtonDiscountTab.click(); } // Enter valid credentials in Quantity textbox public void sendTextToQuantityDiscountTab(String quantityDiscountTab ) { this.quantityDiscountTab.clear(); this.quantityDiscountTab.sendKeys(quantityDiscountTab); } // Enter valid credentials in Price textbox public void sendTextToPriceDiscountTab(String priceDiscountTab) { this.priceDiscountTab.clear(); //this.priceDiscountTab.sendKeys(quantityDiscountTab); this.priceDiscountTab.sendKeys(priceDiscountTab); } public void clickonSpecialTab() { this.specialTab.click(); } public void clickonImageTab() { this.imageTab.click(); } public void clickonRewardpointTab() { this.rewardpointTab.click(); } public void sendkeystoPointsRewardpointTab(String pointsRewardTab) { this.pointsRewardTab.clear(); this.pointsRewardTab.sendKeys(pointsRewardTab); } public void clickonDesignTab() { this.designTab.click(); } public void clickonSaveBtn() { this.saveBtn.click(); } public void searchProductName(String productNameSearch) { this.productNameSearch.clear(); this.productNameSearch.sendKeys(productNameSearch); //productNameSearch } public void searchPriceTextbox(String priceSearch) { this.priceSearch.clear(); this.priceSearch.sendKeys(priceSearch); } public void searchModelTextbox(String modelSearch) { this.modelSearch.clear(); this.modelSearch.sendKeys(modelSearch); } public void searchQuantityTextbox(String quantitySearch) { this.quantitySearch.clear(); this.quantitySearch.sendKeys(quantitySearch); } public void Errormessage() { this.warningmessage.click(); } }
[ "BABITAFERNANDEZ@9.102.59.83" ]
BABITAFERNANDEZ@9.102.59.83
d4e71ca148ad2f55dbe1a5ac8e157bdbf9e75a5b
5aaf23a0425077d4d6f634f14dc2a9eb56d79bcb
/src/main/java/com/bis/operox/inv/service/TicketService.java
78b9c4feb5ff709976dc882d2b7ea8d09cc21227
[]
no_license
naidu8242/operox_shopping
578e35cc6de437e3dd526834a796d63159d9f900
fe4f3080fc58546e774110e31c022c55bcb326cb
refs/heads/master
2022-12-23T04:38:20.470280
2020-02-03T09:53:48
2020-02-03T09:53:48
237,930,620
0
0
null
2022-12-16T08:01:12
2020-02-03T09:38:49
Java
UTF-8
Java
false
false
472
java
package com.bis.operox.inv.service; import java.util.List; import org.json.JSONObject; import org.springframework.web.multipart.MultipartFile; import com.bis.operox.inv.dao.entity.Ticket; import com.bis.operox.inv.dao.entity.User; public interface TicketService { Ticket addTicket(Ticket ticket); Ticket getTicketById(Long id); List<Ticket> ticketsList(); void addTicketDetails(JSONObject jsonObj, User user, MultipartFile multiFile) throws Exception; }
[ "plakshunnaidu@gmail.com" ]
plakshunnaidu@gmail.com
3ed6541848f35c1d6cb529fe98769e27cade2b2e
b86483ddbd73648ae114c6ef46d41ad4da5ed7f3
/app/src/br/net/meditec/controller/handler/EventHandler.java
d04373b4b343c6b88824164b6d716b943c7b2ddb
[ "Apache-2.0" ]
permissive
adrianopauli/app_android_meditec
37460d663324537d29a4ddef9ddd8e73cec27df3
6e7138295080b38689a77e3386dc1d2ea09be839
refs/heads/master
2021-01-10T14:55:27.086087
2016-02-23T02:19:20
2016-02-23T02:19:20
52,314,298
0
0
null
null
null
null
UTF-8
Java
false
false
4,711
java
package br.net.meditec.controller.handler; import br.net.meditec.model.Evento; import br.net.meditec.model.Palestrante; import java.util.ArrayList; import java.util.List; import org.xml.sax.Attributes; import org.xml.sax.SAXException; import org.xml.sax.helpers.DefaultHandler; /** * Essa classse faz o mapeamento do XLM do Evento * @author Adriano Pauli * */ public class EventHandler extends DefaultHandler { private boolean IsDate; private boolean Ispal; private String date; private String des; private String dur; private List<Evento> eventos; private String fim; private String id; private String inicio; private boolean isDes; private boolean isDur; private boolean isFim; private boolean isId; private boolean isInicio; private boolean isLocal; private boolean isTitle; private boolean isType; private String local; private String pal; private String title; private String type; public EventHandler() { this.eventos = new ArrayList<Evento>(); limpar(); } private void limpar() { this.id = ""; this.title = ""; this.des = ""; this.date = ""; this.dur = ""; this.inicio = ""; this.fim = ""; this.type = ""; this.local = ""; this.pal = ""; } public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { if (localName.equals("id")) { this.isId = true; } else if (localName.equals("title")) { this.isTitle = true; } else if (localName.equals("des")) { this.isDes = true; } else if (localName.equals("data")) { this.IsDate = true; } else if (localName.equals("dur")) { this.isDur = true; } else if (localName.equals("inicio")) { this.isInicio = true; } else if (localName.equals("fim")) { this.isFim = true; } else if (localName.equals("type")) { this.isType = true; } else if (localName.equals("local")) { this.isLocal = true; } else if (localName.equals("pal")) { this.Ispal = true; } super.startElement(uri, localName, qName, attributes); } public void endElement(String uri, String localName, String qName) throws SAXException { if (localName.equals("id")) { this.isId = false; } else if (localName.equals("title")) { this.isTitle = false; } else if (localName.equals("des")) { this.isDes = false; } else if (localName.equals("data")) { this.IsDate = false; } else if (localName.equals("dur")) { this.isDur = false; } else if (localName.equals("inicio")) { this.isInicio = false; } else if (localName.equals("fim")) { this.isFim = false; } else if (localName.equals("type")) { this.isType = false; } else if (localName.equals("local")) { this.isLocal = false; } else if (localName.equals("pal")) { this.Ispal = false; } else if (localName.equals("event")) { Evento evento = new Evento(this.title, this.des, this.date.replace("-", "/"), this.dur, this.type); evento.setId(Long.parseLong(this.id)); Palestrante palestrante = new Palestrante(); palestrante.setId(Long.parseLong(this.pal)); evento.setPalestrante(palestrante); evento.setInicio(this.inicio); evento.setFim(this.fim); evento.setLocal(this.local); this.eventos.add(evento); limpar(); } super.endElement(uri, localName, qName); } public void characters(char[] ch, int start, int length) throws SAXException { String v = new String(ch, start, length); if (this.isId) { this.id += v; } else if (this.IsDate) { this.date += v; } else if (this.isDes) { this.des += v; } else if (this.isDur) { this.dur += v; } else if (this.isInicio) { this.inicio += v; } else if (this.isFim) { this.fim += v; } else if (this.isTitle) { this.title += v; } else if (this.isType) { this.type += v; } else if (this.isLocal) { this.local += v; } else if (this.Ispal) { this.pal += v; } super.characters(ch, start, length); } public List<Evento> getEventos() { return this.eventos; } }
[ "adrianopauli03@gmail.com" ]
adrianopauli03@gmail.com
3fe1c4f615a48b7711fe64f04999fc7c5220ee81
7a2c91813117a8d949571521510895ee53daad49
/src/main/java/com/alipay/api/domain/AlipayEcoRenthouseCommunityBaseinfoSyncModel.java
b7e7df88a43613aed19392738aa5453cab644ea9
[ "Apache-2.0" ]
permissive
dut3062796s/alipay-sdk-java-all
eb5afb5b570fb0deb40d8c960b85a01d13506568
559180f4c370f7fcfef67a1c559768d11475c745
refs/heads/master
2020-07-03T21:00:06.124387
2019-06-23T01:13:43
2019-06-23T01:13:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,781
java
package com.alipay.api.domain; import java.util.List; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.internal.mapping.ApiListField; /** * 小区大楼信息同步 * * @author auto create * @since 1.0, 2018-06-25 14:53:23 */ public class AlipayEcoRenthouseCommunityBaseinfoSyncModel extends AlipayObject { private static final long serialVersionUID = 6479351414287459775L; /** * 商圈编码 */ @ApiField("bus_code") private String busCode; /** * 商圈所在纬度 */ @ApiField("bus_lat") private String busLat; /** * 商圈所在经度 */ @ApiField("bus_lng") private String busLng; /** * 商圈名称 */ @ApiField("bus_name") private String busName; /** * 商圈覆盖半径(单位:米) */ @ApiField("bus_radius") private Long busRadius; /** * 城市编码 */ @ApiField("city_code") private String cityCode; /** * 城市所在纬度 */ @ApiField("city_lat") private String cityLat; /** * 城市所在经度 */ @ApiField("city_lng") private String cityLng; /** * 城市名称 */ @ApiField("city_name") private String cityName; /** * 小区/大楼编码 */ @ApiField("community_code") private String communityCode; /** * 小区/大楼所在纬度 */ @ApiField("community_lat") private String communityLat; /** * 小区/大楼所在经度 */ @ApiField("community_lng") private String communityLng; /** * 小区/大楼名称 */ @ApiField("community_name") private String communityName; /** * 小区/大楼弄号 */ @ApiField("community_nong") private String communityNong; /** * 小区/大楼街道 */ @ApiField("community_street") private String communityStreet; /** * 小区/大楼标识类型 1:小区 2:大楼 */ @ApiField("community_tag") private String communityTag; /** * 行政区域编码 */ @ApiField("district_code") private String districtCode; /** * 行政区域所在纬度 */ @ApiField("district_lat") private String districtLat; /** * 行政区域所在经度 */ @ApiField("district_lng") private String districtLng; /** * 行政区域名称 */ @ApiField("district_name") private String districtName; /** * 地铁线地铁站关系 */ @ApiListField("subway_stations") @ApiField("string") private List<String> subwayStations; public String getBusCode() { return this.busCode; } public void setBusCode(String busCode) { this.busCode = busCode; } public String getBusLat() { return this.busLat; } public void setBusLat(String busLat) { this.busLat = busLat; } public String getBusLng() { return this.busLng; } public void setBusLng(String busLng) { this.busLng = busLng; } public String getBusName() { return this.busName; } public void setBusName(String busName) { this.busName = busName; } public Long getBusRadius() { return this.busRadius; } public void setBusRadius(Long busRadius) { this.busRadius = busRadius; } public String getCityCode() { return this.cityCode; } public void setCityCode(String cityCode) { this.cityCode = cityCode; } public String getCityLat() { return this.cityLat; } public void setCityLat(String cityLat) { this.cityLat = cityLat; } public String getCityLng() { return this.cityLng; } public void setCityLng(String cityLng) { this.cityLng = cityLng; } public String getCityName() { return this.cityName; } public void setCityName(String cityName) { this.cityName = cityName; } public String getCommunityCode() { return this.communityCode; } public void setCommunityCode(String communityCode) { this.communityCode = communityCode; } public String getCommunityLat() { return this.communityLat; } public void setCommunityLat(String communityLat) { this.communityLat = communityLat; } public String getCommunityLng() { return this.communityLng; } public void setCommunityLng(String communityLng) { this.communityLng = communityLng; } public String getCommunityName() { return this.communityName; } public void setCommunityName(String communityName) { this.communityName = communityName; } public String getCommunityNong() { return this.communityNong; } public void setCommunityNong(String communityNong) { this.communityNong = communityNong; } public String getCommunityStreet() { return this.communityStreet; } public void setCommunityStreet(String communityStreet) { this.communityStreet = communityStreet; } public String getCommunityTag() { return this.communityTag; } public void setCommunityTag(String communityTag) { this.communityTag = communityTag; } public String getDistrictCode() { return this.districtCode; } public void setDistrictCode(String districtCode) { this.districtCode = districtCode; } public String getDistrictLat() { return this.districtLat; } public void setDistrictLat(String districtLat) { this.districtLat = districtLat; } public String getDistrictLng() { return this.districtLng; } public void setDistrictLng(String districtLng) { this.districtLng = districtLng; } public String getDistrictName() { return this.districtName; } public void setDistrictName(String districtName) { this.districtName = districtName; } public List<String> getSubwayStations() { return this.subwayStations; } public void setSubwayStations(List<String> subwayStations) { this.subwayStations = subwayStations; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
b3362f48daf0c73a27166d97353dcaadf223bca8
e1d13a2c1502ddcd1483f92fee83d6a1d3e547e0
/xmlparser/src/androidTest/java/luyao/parser/ExampleInstrumentedTest.java
64dc6ba91ce48befaf43ed95edcd66b4057ff234
[]
no_license
samsquanch01/WebDroid
90306d0a950d43de2e82ae9cff7f3c4797357be6
9728f371d4ed62d35bd4eed6e119e3ac958f6ec0
refs/heads/master
2022-04-27T09:14:09.567569
2020-04-16T07:57:44
2020-04-16T07:57:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
745
java
package luyao.parser; import android.content.Context; import androidx.test.platform.app.InstrumentationRegistry; import androidx.test.ext.junit.runners.AndroidJUnit4; import org.junit.Test; import org.junit.runner.RunWith; import static org.junit.Assert.*; /** * Instrumented test, which will execute on an Android device. * * @see <a href="http://d.android.com/tools/testing">Testing documentation</a> */ @RunWith(AndroidJUnit4.class) public class ExampleInstrumentedTest { @Test public void useAppContext() { // Context of the app under test. Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); assertEquals("luyao.parser.test", appContext.getPackageName()); } }
[ "37773224+JankingWon@users.noreply.github.com" ]
37773224+JankingWon@users.noreply.github.com
21e62523f9326a90d7834ef5c539a993048dd95e
b802d802a87d1c8f4b013e43064f24bfb8afd0d0
/java/java_code/week7_2_2.java
c77075845afa3a392f05d2f15c1db3775bedfd90
[]
no_license
ben-denham/lecture_notes
b473686c44d5b0dc79b717367ba424674d1107e9
e851cf72f5da2c5bf92fcfedd69b37014f751512
refs/heads/master
2021-01-01T19:51:14.725658
2014-06-05T07:40:42
2014-06-05T07:40:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
927
java
class Mathematics { // The value of a final attribute cannot be changed. public final float pi = 3.14f; public void m1() { // Final value cannot be changed. // pi = 5f; } // Final method cannot be overridden. public final int sum(int x, int y) { return x + y; } } // A final class cannot be extended. final class Calculus extends Mathematics { public void m2() { // Final value cannot be changed. // pi = 7f; } // Final method cannot be overridden. /* public int sum(int x, int y) { return x + y + 1; } */ } // A final class cannot be extended. /* class Algebra extends Calculus { } */ class Tester { public static void main(String[] args) { Calculus c = new Calculus(); // Final value cannot be changed. // c.pi = 4; System.out.println(c.pi); System.out.println(c.sum(2, 2)); } }
[ "ben.denham@gmail.com" ]
ben.denham@gmail.com
a402b313be6443c34debff479639a903ef80c131
f908384df4424aaf0ec83b8466a5dc5f88496307
/3eme/PiDevCodeNameOneTest/src/Services/EvenementServices.java
05dda042cbcca38460d535be609c96d575bee15b
[]
no_license
Ahmed-Amine-Soltani/projet_integre_esprit
7c76ec625cb3f03367638dd456a239ba3ff57820
e5d7f39127498e021a8b4b7cbef4102e3ee6a867
refs/heads/master
2023-03-14T11:09:31.833023
2021-03-05T17:20:13
2021-03-05T17:20:13
344,866,963
1
0
null
null
null
null
UTF-8
Java
false
false
17,388
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 Services; import Entities.CommentaireEvenement; import com.codename1.io.CharArrayReader; import com.codename1.io.ConnectionRequest; import com.codename1.io.JSONParser; import com.codename1.io.NetworkManager; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map; import Entities.Evenement; import GUI.SessionManager; import com.codename1.io.MultipartRequest; import java.text.SimpleDateFormat; import com.codename1.ui.Dialog; import com.twilio.rest.taskrouter.v1.workspace.task.Reservation; import java.util.Date; /** * * @author solta */ public class EvenementServices { public static String getDate(Date date) { String dateString = new SimpleDateFormat("EEEE dd MMMM yyyy").format(date); return dateString; } public static String getDateCommentaire(Date date) { String dateString = new SimpleDateFormat("dd MMMM yyyy").format(date); return dateString; } public static ArrayList<Evenement> TsEvenement() { ArrayList<Evenement> listEvenement = new ArrayList<>(); String url = "http://127.0.0.1:8000/api/TsEvenementApi"; ConnectionRequest request = new ConnectionRequest(url, false); NetworkManager.getInstance().addToQueueAndWait(request); JSONParser j = new JSONParser(); String json = new String(request.getResponseData()) + ""; if (!json.equals("no data")) { Map<String, Object> content; try { content = j.parseJSON(new CharArrayReader(json.toCharArray())); List<Map<String, Object>> events = (List<Map<String, Object>>) content.get("root"); for (Map<String, Object> event : events) { Map<String, Object> timeDebut = (Map<String, Object>) event.get("dateDebutEvenement"); Map<String, Object> timeFin = (Map<String, Object>) event.get("dateFinEvenement"); Date dateDebutEvenement = new Date((long) Double.parseDouble(timeDebut.get("timestamp").toString()) * 1000); Date dateFinEvenement = new Date((long) Double.parseDouble(timeFin.get("timestamp").toString()) * 1000); Map<String, Object> user = (Map<String, Object>) event.get("idUser"); String idUser = user.get("id").toString(); listEvenement.add(new Evenement( (int) Float.parseFloat(idUser), (int) Float.parseFloat(event.get("id").toString()), (event.get("nomEvenement").toString()), event.get("typeEvenement").toString(), event.get("lieuEvenement").toString(), (int) Float.parseFloat(event.get("capaciteEvenement").toString()), event.get("descriptionEvenement").toString(), event.get("affiche").toString(), dateDebutEvenement, dateFinEvenement )); } } catch (IOException ex) { ex.printStackTrace(); } } return listEvenement; } public static void ajouterEvenement(Evenement e) { String url = "http://127.0.0.1:8000/api/ajouterEvenementApi"; MultipartRequest req = new MultipartRequest(); try { req.setUrl(url); req.setPost(true); req.addArgument("nomEvenement", e.getNom_evenement()); req.addArgument("typeEvenement", e.getType_evenement()); req.addArgument("descriptionEvenement", e.getDescription_evenement()); req.addArgument("capaciteEvenement", String.valueOf(e.getCapacite_evenement())); SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); String dateDebut = formatter.format(e.getDate_debut_evenement()); String dateFin = formatter.format(e.getDate_fin_evenement()); req.addArgument("dateDebutEvenement", dateDebut); req.addArgument("dateFinEvenement", dateFin); req.addArgument("lieuEvenement", e.getLieu_evenement()); req.addArgument("idUtilisateur", String.valueOf(e.getId_user())); if (!e.getAffiche_evenement().equals("")) { req.addData("afficheEvenement", e.getAffiche_evenement(), "image/jpeg"); req.setFilename("afficheEvenement", e.getNom_evenement() + ".jpg"); } req.addResponseListener((response) -> { byte[] data = (byte[]) response.getMetaData(); String s = new String(data); // System.out.println("data : " + s); }); NetworkManager.getInstance().addToQueueAndWait(req); } catch (Exception ex) { ex.printStackTrace(); } } public static void modifierEvenement(Evenement e) { String url = "http://127.0.0.1:8000/api/modifierEvenementApi"; MultipartRequest req = new MultipartRequest(); try { req.setUrl(url); req.setPost(true); req.addArgument("id", String.valueOf(e.getId_Evenement())); req.addArgument("nomEvenement", e.getNom_evenement()); req.addArgument("typeEvenement", e.getType_evenement()); req.addArgument("descriptionEvenement", e.getDescription_evenement()); req.addArgument("capaciteEvenement", String.valueOf(e.getCapacite_evenement())); SimpleDateFormat formatter = new SimpleDateFormat("MM/dd/yyyy"); String dateDebut = formatter.format(e.getDate_debut_evenement()); String dateFin = formatter.format(e.getDate_fin_evenement()); req.addArgument("dateDebutEvenement", dateDebut); req.addArgument("dateFinEvenement", dateFin); req.addArgument("lieuEvenement", e.getLieu_evenement()); if (!e.getAffiche_evenement().equals("")) { req.addData("afficheEvenement", e.getAffiche_evenement(), "image/jpeg"); req.setFilename("afficheEvenement", e.getNom_evenement() + ".jpg"); } req.addResponseListener((response) -> { byte[] data = (byte[]) response.getMetaData(); String s = new String(data); }); NetworkManager.getInstance().addToQueueAndWait(req); } catch (Exception ex) { ex.printStackTrace(); } } public static ArrayList<Evenement> mesEvenements(String id) { ArrayList<Evenement> listEvenement = new ArrayList<>(); String url = "http://127.0.0.1:8000/api/mesEvenementsApi"; ConnectionRequest request = new ConnectionRequest(url, false); request.addArgument("id", id); NetworkManager.getInstance().addToQueueAndWait(request); JSONParser j = new JSONParser(); String json = new String(request.getResponseData()) + ""; if (!json.equals("no data")) { Map<String, Object> content; try { content = j.parseJSON(new CharArrayReader(json.toCharArray())); List<Map<String, Object>> events = (List<Map<String, Object>>) content.get("root"); for (Map<String, Object> event : events) { Map<String, Object> time = (Map<String, Object>) event.get("dateDebutEvenement"); Date dateDebutEvenement = new Date((long) Double.parseDouble(time.get("timestamp").toString()) * 1000L); Date dateFinEvenement = new Date((long) Double.parseDouble(time.get("timestamp").toString()) * 1000L); Map<String, Object> user = (Map<String, Object>) event.get("idUser"); String idUser = user.get("id").toString(); listEvenement.add(new Evenement( (int) Float.parseFloat(idUser), (int) Float.parseFloat(event.get("id").toString()), (event.get("nomEvenement").toString()), event.get("typeEvenement").toString(), event.get("lieuEvenement").toString(), (int) Float.parseFloat(event.get("capaciteEvenement").toString()), event.get("descriptionEvenement").toString(), event.get("affiche").toString(), dateDebutEvenement, dateFinEvenement )); } } catch (IOException ex) { ex.printStackTrace(); } } return listEvenement; } public static Evenement chercherEvenementId(int id) { String id_string = String.valueOf(id); Map<String, Object> event; Evenement evenement = new Evenement(); String url = "http://127.0.0.1:8000/api/chercherEvenementIdApi"; ConnectionRequest request = new ConnectionRequest(url, false); request.addArgument("id", id_string); NetworkManager.getInstance().addToQueueAndWait(request); JSONParser j = new JSONParser(); String json = new String(request.getResponseData()) + ""; if (!json.equals("no data")) { try { event = j.parseJSON(new CharArrayReader(json.toCharArray())); evenement = new Evenement( (int) Float.parseFloat(event.get("id").toString()), event.get("nomEvenement").toString(), event.get("affiche").toString()); } catch (IOException ex) { ex.printStackTrace(); } } else { evenement = null; } return evenement; } public static void supprimerEvenement(String id_string) { String url = "http://127.0.0.1:8000/api/supprimerEvenementApi"; ConnectionRequest request = new ConnectionRequest(url, false); try { request.addArgument("id", id_string); NetworkManager.getInstance().addToQueueAndWait(request); } catch (Exception ex) { ex.printStackTrace(); } } public static void reserverEvenement(String idUtilisateur, String idEvenement) { String url = "http://127.0.0.1:8000/api/reserverEvenementApi"; ConnectionRequest request = new ConnectionRequest(url, false); try { request.addArgument("idEvenement", idEvenement); request.addArgument("idUser", idUtilisateur); NetworkManager.getInstance().addToQueueAndWait(request); } catch (Exception ex) { ex.printStackTrace(); } } public static void annulerReserverEvenement(String idUtilisateur, String idEvenement) { String url = "http://127.0.0.1:8000/api/annulerReserverEvenementApi"; ConnectionRequest request = new ConnectionRequest(url, false); try { request.addArgument("idEvenement", idEvenement); request.addArgument("idUser", idUtilisateur); NetworkManager.getInstance().addToQueueAndWait(request); } catch (Exception ex) { ex.printStackTrace(); } } public static ArrayList<Evenement> mesReservations(String idUtilisateur) { ArrayList<Evenement> listReservation = new ArrayList<>(); String url = "http://127.0.0.1:8000/api/mesReservationsApi"; ConnectionRequest request = new ConnectionRequest(url, false); request.addArgument("idUser", idUtilisateur); NetworkManager.getInstance().addToQueueAndWait(request); JSONParser j = new JSONParser(); String json = new String(request.getResponseData()) + ""; if (!json.equals("no data")) { Map<String, Object> content; try { content = j.parseJSON(new CharArrayReader(json.toCharArray())); List<Map<String, Object>> events = (List<Map<String, Object>>) content.get("root"); for (Map<String, Object> event : events) { Map<String, Object> time = (Map<String, Object>) event.get("dateDebutEvenement"); Date dateDebutEvenement = new Date((long) Double.parseDouble(time.get("timestamp").toString()) * 1000L); Date dateFinEvenement = new Date((long) Double.parseDouble(time.get("timestamp").toString()) * 1000L); Map<String, Object> user = (Map<String, Object>) event.get("idUser"); String idUser = user.get("id").toString(); listReservation.add(new Evenement( (int) Float.parseFloat(idUser), (int) Float.parseFloat(event.get("id").toString()), (event.get("nomEvenement").toString()), event.get("typeEvenement").toString(), event.get("lieuEvenement").toString(), (int) Float.parseFloat(event.get("capaciteEvenement").toString()), event.get("descriptionEvenement").toString(), event.get("affiche").toString(), dateDebutEvenement, dateFinEvenement )); } } catch (IOException ex) { ex.printStackTrace(); } } return listReservation; } public static void ajouterCommentaire(CommentaireEvenement commentaireEvenement) { String url = "http://127.0.0.1:8000/api/ajouterCommentaireApi"; ConnectionRequest request = new ConnectionRequest(url, false); try { String contenuCommentaire = SessionManager.getUserName() + " : \"" + commentaireEvenement.getContenu_commentaire() + "\""; request.addArgument("idEvenement", String.valueOf(commentaireEvenement.getId_evenement())); request.addArgument("idUser", String.valueOf(commentaireEvenement.getId_user())); request.addArgument("contenu", contenuCommentaire); NetworkManager.getInstance().addToQueueAndWait(request); } catch (Exception ex) { ex.printStackTrace(); } } public static ArrayList<CommentaireEvenement> afficherCommentaire(String idEvenement) { ArrayList<CommentaireEvenement> listCommentaire = new ArrayList<>(); String url = "http://127.0.0.1:8000/api/afficherCommentaireApi"; ConnectionRequest request = new ConnectionRequest(url, false); request.addArgument("idEvenement", idEvenement); NetworkManager.getInstance().addToQueueAndWait(request); JSONParser j = new JSONParser(); String json = new String(request.getResponseData()) + ""; if (!json.equals("no data")) { Map<String, Object> content; try { content = j.parseJSON(new CharArrayReader(json.toCharArray())); List<Map<String, Object>> commentaires = (List<Map<String, Object>>) content.get("root"); for (Map<String, Object> commentaire : commentaires) { Map<String, Object> time = (Map<String, Object>) commentaire.get("dateCommentaire"); Date dateCommentaire = new Date((long) Double.parseDouble(time.get("timestamp").toString()) * 1000L); listCommentaire.add(new CommentaireEvenement( dateCommentaire, commentaire.get("contenu").toString())); } } catch (IOException ex) { ex.printStackTrace(); } } return listCommentaire; } // j'ai pas utilisé public static Evenement evenementAutoReservation() { Map<String, Object> event; Evenement evenement = new Evenement(); String url = "http://127.0.0.1:8000/api/evenementAutoReservationApi"; ConnectionRequest request = new ConnectionRequest(url, false); NetworkManager.getInstance().addToQueueAndWait(request); JSONParser j = new JSONParser(); String json = new String(request.getResponseData()) + ""; if (!json.equals("no data")) { try { event = j.parseJSON(new CharArrayReader(json.toCharArray())); evenement = new Evenement( (int) Float.parseFloat(event.get("id").toString())); } catch (IOException ex) { ex.printStackTrace(); } } else { evenement = null; } return evenement; } }
[ "soltani.ahmedamine1@gmail.com" ]
soltani.ahmedamine1@gmail.com
ec857cf37fefc4e0919aa9a2b9e55ef70e1a5b48
61f44b11cd7bd2faf6eced053f8565f7cd346993
/CompLucsed/src/complucsed/Token.java
a5ca0bb1c3815b759bc3a117a994de3ce9f330e8
[]
no_license
thbdias/comp_lucsed
348290a906821610e9ec41767749258be13a9305
11fe50116537804e757b0008710ed4f715dd471c
refs/heads/master
2021-01-10T02:59:35.737283
2015-11-04T18:19:35
2015-11-04T18:19:35
45,181,769
0
2
null
null
null
null
UTF-8
Java
false
false
864
java
/** * @author thiago */ package complucsed; public class Token { private String lexema; private byte idToken; /** construtor */ public Token (){ lexema = ""; idToken = -1; }//end construtor /** * metodo que da set no lexema */ public void setLexema (String lexema){ this.lexema = lexema; }//end setLexema /** * metodo que retorna o lexema do Token */ public String getLexema(){ return lexema; }//end getLexema /** * metodo que da set no idToken */ public void setIdToken (byte idToken){ this.idToken = idToken; }//end idToken /** * metodo que retorna o idToken */ public byte getIdToken (){ return idToken; }//end getIdToken }//end class Token
[ "thiagobalbino91@gmail.com" ]
thiagobalbino91@gmail.com
03e2839a2257b0cea05d02705da4f9b721c11d19
546d29e1adc03f7f6d98d12ba93eef2a3401d15f
/src/main/java/examples/CooperatingDeadlock.java
561e995381780302c1e5e032046f836a1fc22d29
[]
no_license
gailo22/concurrency
9d8841596157c9fc1148a1489a7c75271b27e951
7bc99f6ff75c6b9f34c416a24ffe41c6d86dfc7a
refs/heads/master
2021-01-15T17:08:03.074512
2014-06-16T03:44:10
2014-06-16T03:44:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,721
java
package examples; import java.util.*; import annotations.*; /** * CooperatingDeadlock * <p/> * Lock-ordering deadlock between cooperating objects * * @author Brian Goetz and Tim Peierls */ public class CooperatingDeadlock { // Warning: deadlock-prone! class Taxi { @GuardedBy("this") private Point location, destination; private final Dispatcher dispatcher; public Taxi(Dispatcher dispatcher) { this.dispatcher = dispatcher; } public synchronized Point getLocation() { return location; } public synchronized void setLocation(Point location) { this.location = location; if (location.equals(destination)) dispatcher.notifyAvailable(this); } public synchronized Point getDestination() { return destination; } public synchronized void setDestination(Point destination) { this.destination = destination; } } class Dispatcher { @GuardedBy("this") private final Set<Taxi> taxis; @GuardedBy("this") private final Set<Taxi> availableTaxis; public Dispatcher() { taxis = new HashSet<Taxi>(); availableTaxis = new HashSet<Taxi>(); } public synchronized void notifyAvailable(Taxi taxi) { availableTaxis.add(taxi); } public synchronized Image getImage() { Image image = new Image(); for (Taxi t : taxis) image.drawMarker(t.getLocation()); return image; } } class Image { public void drawMarker(Point p) { } } }
[ "yidao620@gmail.com" ]
yidao620@gmail.com
bf2016d8903057047b412a29b72554928038c353
b6a152f38ec35c24a7f01501532bd1489b043e4f
/app/src/main/java/com/inveno/xiandu/view/custom/IndicatorView.java
53b1955f7d5b20ec7a66d7a3394756a7b77e544e
[]
no_license
huzheng1216/xiandu
129b596cb0fe61ea98906fb14a579ea991adff17
6511b2117cd7636c036945f5fae5182621be311b
refs/heads/master
2022-11-17T07:25:27.536094
2020-07-24T08:20:41
2020-07-24T08:20:41
269,332,977
2
1
null
null
null
null
UTF-8
Java
false
false
19,217
java
package com.inveno.xiandu.view.custom; import android.content.Context; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Paint; import android.graphics.Path; import android.graphics.RectF; import android.util.AttributeSet; import android.view.View; import android.view.ViewGroup; import android.view.animation.AccelerateInterpolator; import android.view.animation.DecelerateInterpolator; import android.view.animation.Interpolator; import android.widget.RelativeLayout; import androidx.annotation.ColorInt; import androidx.annotation.IntDef; import androidx.annotation.Nullable; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; public class IndicatorView extends View implements Indicator { private final Interpolator interpolator = new DecelerateInterpolator(); private Interpolator accelerateInterpolator; private Path path; private float offset; private int selectedPage; private int pagerCount; private int unColor = Color.GRAY; private int selectedColor = Color.WHITE; private final Paint indicatorPaint; private final RectF rectF; /** * 控制在banner中的位置 */ private RelativeLayout.LayoutParams params; /** * indicator样式 */ private int indicatorStyle; /*--------------- 核心控制点大小距离参数 ---------------*/ private float indicatorRadius = dip2px(3.5f); private float indicatorRatio = 1.0f; private float indicatorSelectedRadius = dip2px(3.5f); private float indicatorSelectedRatio = 1.0f; private float indicatorSpacing = dip2px(10); /*--------------- 核心控制点大小距离参数end ---------------*/ @IntDef({IndicatorStyle.INDICATOR_CIRCLE, IndicatorStyle.INDICATOR_CIRCLE_RECT, IndicatorStyle.INDICATOR_BEZIER, IndicatorStyle.INDICATOR_DASH, IndicatorStyle.INDICATOR_BIG_CIRCLE}) @Retention(RetentionPolicy.SOURCE) public @interface IndicatorStyle { int INDICATOR_CIRCLE = 0; int INDICATOR_CIRCLE_RECT = 1; int INDICATOR_BEZIER = 2; int INDICATOR_DASH = 3; int INDICATOR_BIG_CIRCLE = 4; } public IndicatorView(Context context) { this(context, null); } public IndicatorView(Context context, @Nullable AttributeSet attrs) { this(context, attrs, 0); } public IndicatorView(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { super(context, attrs, defStyleAttr); rectF = new RectF(); indicatorPaint = new Paint(Paint.ANTI_ALIAS_FLAG); } @Override public void initIndicatorCount(int pagerCount) { this.pagerCount = pagerCount; setVisibility(pagerCount > 1 ? VISIBLE : GONE); requestLayout(); } @Override public View getView() { return this; } @Override public RelativeLayout.LayoutParams getParams() { if (params == null) { params = new RelativeLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT); params.addRule(RelativeLayout.ALIGN_PARENT_BOTTOM); params.addRule(RelativeLayout.CENTER_HORIZONTAL); params.bottomMargin = dip2px(10); } return params; } @Override public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) { selectedPage = position; offset = positionOffset; invalidate(); } @Override public void onPageSelected(int position) { } @Override public void onPageScrollStateChanged(int state) { } @Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { setMeasuredDimension(measureWidth(widthMeasureSpec), measureHeight(heightMeasureSpec)); } private int measureWidth(int widthMeasureSpec) { int mode = MeasureSpec.getMode(widthMeasureSpec); int width = MeasureSpec.getSize(widthMeasureSpec); int result = 0; switch (mode) { case MeasureSpec.EXACTLY: result = width; break; case MeasureSpec.AT_MOST: case MeasureSpec.UNSPECIFIED: float ratioSelectedRadius = getRatioSelectedRadius(); float ratioRadius = getRatioRadius(); float diameterDistance = Math.max(ratioSelectedRadius, ratioRadius) * 2 * pagerCount; float spacingDistance = (pagerCount - 1) * indicatorSpacing; float al = ratioSelectedRadius - ratioRadius; result = (int) (diameterDistance + spacingDistance + al + getPaddingLeft() + getPaddingRight()); break; default: break; } return result; } private int measureHeight(int heightMeasureSpec) { int mode = MeasureSpec.getMode(heightMeasureSpec); int height = MeasureSpec.getSize(heightMeasureSpec); int result = 0; switch (mode) { case MeasureSpec.EXACTLY: result = height; break; case MeasureSpec.AT_MOST: case MeasureSpec.UNSPECIFIED: float ratioSelectedRadius = getRatioSelectedRadius(); float ratioRadius = getRatioRadius(); float diameterDistance = Math.max(ratioSelectedRadius, ratioRadius) * 2; result = (int) (diameterDistance + getPaddingTop() + getPaddingBottom()); break; default: break; } return result; } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); if (pagerCount == 0) { return; } float midY = getHeight() / 2.0f + 0.5f; if (indicatorStyle == IndicatorStyle.INDICATOR_CIRCLE) { drawCircle(canvas, midY); } else if (indicatorStyle == IndicatorStyle.INDICATOR_CIRCLE_RECT) { drawCircleRect(canvas, midY); } else if (indicatorStyle == IndicatorStyle.INDICATOR_BEZIER) { drawBezier(canvas, midY); } else if (indicatorStyle == IndicatorStyle.INDICATOR_DASH) { drawDash(canvas, midY); } else if (indicatorStyle == IndicatorStyle.INDICATOR_BIG_CIRCLE) { drawBigCircle(canvas, midY); } } private void drawCircle(Canvas canvas, float midY) { drawPagerCountCircle(canvas, midY); float indicatorStartX = indicatorStartX(selectedPage); float nextIndicatorStartX = indicatorStartX((selectedPage + 1) % pagerCount); float ratioRadius = getRatioSelectedRadius(); float left = indicatorStartX - ratioRadius; float right = indicatorStartX + ratioRadius; float nextLeft = nextIndicatorStartX - ratioRadius; float nextRight = nextIndicatorStartX + ratioRadius; float leftX = left + (nextLeft - left) * interpolatedOffset(); float rightX = right + (nextRight - right) * interpolatedOffset(); rectF.set(leftX, midY - indicatorSelectedRadius, rightX, midY + indicatorSelectedRadius); indicatorPaint.setColor(selectedColor); canvas.drawRoundRect(rectF, indicatorSelectedRadius, indicatorSelectedRadius, indicatorPaint); } private void drawCircleRect(Canvas canvas, float midY) { drawPagerCountCircle(canvas, midY); float indicatorStartX = indicatorStartX(selectedPage); float ratioRadius = getRatioSelectedRadius(); float left = indicatorStartX - ratioRadius; float right = indicatorStartX + ratioRadius; float offset = interpolatedOffset(); float distance = indicatorSpacing + Math.max(getRatioRadius(), ratioRadius) * 2; float leftX; float rightX; if ((selectedPage + 1) % pagerCount == 0) { distance *= -selectedPage; leftX = left + Math.max((distance * offset * 2), distance); rightX = right + Math.min(distance * (offset - 0.5f) * 2.0f, 0); } else { leftX = left + Math.max(distance * (offset - 0.5f) * 2.0f, 0); rightX = right + Math.min((distance * offset * 2), distance); } rectF.set(leftX, midY - indicatorSelectedRadius, rightX, midY + indicatorSelectedRadius); indicatorPaint.setColor(selectedColor); canvas.drawRoundRect(rectF, indicatorSelectedRadius, indicatorSelectedRadius, indicatorPaint); } private void drawBezier(Canvas canvas, float midY) { drawPagerCountCircle(canvas, midY); if (path == null) path = new Path(); if (accelerateInterpolator == null) accelerateInterpolator = new AccelerateInterpolator(); float indicatorStartX = indicatorStartX(selectedPage); float nextIndicatorStartX = indicatorStartX((selectedPage + 1) % pagerCount); float leftX = indicatorStartX + (nextIndicatorStartX - indicatorStartX) * accelerateInterpolator.getInterpolation(offset); float rightX = indicatorStartX + (nextIndicatorStartX - indicatorStartX) * interpolatedOffset(); float ratioSelectedRadius = getRatioSelectedRadius(); float minRadius = indicatorSelectedRadius * 0.57f; float minRatioRadius = minRadius * indicatorSelectedRatio; float leftRadius = ratioSelectedRadius + (minRatioRadius - ratioSelectedRadius) * interpolatedOffset(); float rightRadius = minRatioRadius + (ratioSelectedRadius - minRatioRadius) * accelerateInterpolator.getInterpolation(offset); float leftTopOrBottomOffset = (indicatorSelectedRadius - minRadius) * interpolatedOffset(); float rightTopOrBottomOffset = (indicatorSelectedRadius - minRadius) * accelerateInterpolator.getInterpolation(offset); indicatorPaint.setColor(selectedColor); rectF.set(leftX - leftRadius, midY - indicatorSelectedRadius + leftTopOrBottomOffset, leftX + leftRadius, midY + indicatorSelectedRadius - leftTopOrBottomOffset); canvas.drawRoundRect(rectF, leftRadius, leftRadius, indicatorPaint); rectF.set(rightX - rightRadius, midY - minRadius - rightTopOrBottomOffset, rightX + rightRadius, midY + minRadius + rightTopOrBottomOffset); canvas.drawRoundRect(rectF, rightRadius, rightRadius, indicatorPaint); path.reset(); path.moveTo(rightX, midY); path.lineTo(rightX, midY - minRadius - rightTopOrBottomOffset); path.quadTo(rightX + (leftX - rightX) / 2.0f, midY, leftX, midY - indicatorSelectedRadius + leftTopOrBottomOffset); path.lineTo(leftX, midY + indicatorSelectedRadius - leftTopOrBottomOffset); path.quadTo(rightX + (leftX - rightX) / 2.0f, midY, rightX, midY + minRadius + rightTopOrBottomOffset); path.close(); canvas.drawPath(path, indicatorPaint); } private void drawDash(Canvas canvas, float midY) { float offset = interpolatedOffset(); //默认dash的长度,设置ratio控制长度 float ratioSelectedRadius = getRatioSelectedRadius(); float ratioIndicatorRadius = getRatioRadius(); float distance = ratioSelectedRadius - ratioIndicatorRadius; float distanceOffset = distance * offset; int nextPage = (selectedPage + 1) % pagerCount; boolean isNextFirst = nextPage == 0; indicatorPaint.setColor(unColor); for (int i = 0; i < pagerCount; i++) { float startCx = indicatorStartX(i); if (isNextFirst) startCx += distanceOffset; float left = startCx - ratioIndicatorRadius; float top = midY - indicatorRadius; float right = startCx + ratioIndicatorRadius; float bottom = midY + indicatorRadius; if (selectedPage + 1 <= i) { rectF.set(left + distance, top, right + distance, bottom); } else { rectF.set(left, top, right, bottom); } canvas.drawRoundRect(rectF, indicatorRadius, indicatorRadius, indicatorPaint); } indicatorPaint.setColor(selectedColor); if (offset < 0.99f) { float leftX = indicatorStartX(selectedPage) - ratioSelectedRadius; if (isNextFirst) leftX += distanceOffset; float rightX = leftX + ratioSelectedRadius * 2 + distance - distanceOffset; rectF.set(leftX, midY - indicatorSelectedRadius, rightX, midY + indicatorSelectedRadius); canvas.drawRoundRect(rectF, indicatorSelectedRadius, indicatorSelectedRadius, indicatorPaint); } if (offset > 0.1f) { float nextRightX = indicatorStartX(nextPage) + ratioSelectedRadius + (isNextFirst ? distanceOffset : distance); float nextLeftX = nextRightX - ratioSelectedRadius * 2 - distanceOffset; rectF.set(nextLeftX, midY - indicatorSelectedRadius, nextRightX, midY + indicatorSelectedRadius); canvas.drawRoundRect(rectF, indicatorSelectedRadius, indicatorSelectedRadius, indicatorPaint); } } private void drawBigCircle(Canvas canvas, float midY) { drawPagerCountCircle(canvas, midY); float offset = interpolatedOffset(); float indicatorStartX = indicatorStartX(selectedPage); float nextIndicatorStartX = indicatorStartX((selectedPage + 1) % pagerCount); float ratioRadius = getRatioRadius(); float maxRadius = indicatorSelectedRadius; float maxRatioRadius = maxRadius * indicatorSelectedRatio; float leftRadius = maxRatioRadius - ((maxRatioRadius - ratioRadius) * offset); float rightRadius = ratioRadius + ((maxRatioRadius - ratioRadius) * offset); float topOrBottomOffset = (maxRadius - indicatorRadius) * offset; indicatorPaint.setColor(selectedColor); if (offset < 0.99f) { float top = midY - maxRadius + topOrBottomOffset; float left = indicatorStartX - leftRadius; float right = indicatorStartX + leftRadius; float bottom = midY + maxRadius - topOrBottomOffset; rectF.set(left, top, right, bottom); canvas.drawRoundRect(rectF, leftRadius, leftRadius, indicatorPaint); } if (offset > 0.1f) { float top = midY - indicatorRadius - topOrBottomOffset; float left = nextIndicatorStartX - rightRadius; float right = nextIndicatorStartX + rightRadius; float bottom = midY + indicatorRadius + topOrBottomOffset; rectF.set(left, top, right, bottom); canvas.drawRoundRect(rectF, rightRadius, rightRadius, indicatorPaint); } } private void drawPagerCountCircle(Canvas canvas, float midY) { indicatorPaint.setColor(unColor); for (int i = 0; i < pagerCount; i++) { float startCx = indicatorStartX(i); float ratioIndicatorRadius = getRatioRadius(); float left = startCx - ratioIndicatorRadius; float top = midY - indicatorRadius; float right = startCx + ratioIndicatorRadius; float bottom = midY + indicatorRadius; rectF.set(left, top, right, bottom); canvas.drawRoundRect(rectF, indicatorRadius, indicatorRadius, indicatorPaint); } } private float indicatorStartX(int index) { float ratioRadius = getRatioRadius(); float ratioSelectedRadius = getRatioSelectedRadius(); float ratioIndicatorRadius = Math.max(ratioRadius, ratioSelectedRadius); float centerSpacing = ratioIndicatorRadius * 2.0f + indicatorSpacing; float centerX = ratioIndicatorRadius + getPaddingLeft() + centerSpacing * index; /* 为了适配INDICATOR_DASH样式, measure 中默认多增加了 ratioIndicatorRadius - ratioRadius 的高度和宽度 除了INDICATOR_DASH样式下,其他样式需要增加indicatorSelectedRadius一半的距离,让位置居中。 */ return centerX + (indicatorStyle == IndicatorStyle.INDICATOR_DASH ? 0 : (ratioIndicatorRadius - ratioRadius) / 2); } private float getRatioRadius() { return indicatorRadius * indicatorRatio; } private float getRatioSelectedRadius() { return indicatorSelectedRadius * indicatorSelectedRatio; } private float interpolatedOffset() { return interpolator.getInterpolation(offset); } private int dip2px(float dp) { return (int) (dp * getContext().getResources().getDisplayMetrics().density); } /*--------------- 下面是暴露的方法 ---------------*/ /** * 设置indicator的圆角,同时会改变选中时的圆角,default 3.5dp * * @param indicatorRadius 单位dp */ public IndicatorView setIndicatorRadius(float indicatorRadius) { int indicatorRadiusDp = dip2px(indicatorRadius); if (this.indicatorRadius == this.indicatorSelectedRadius) { this.indicatorSelectedRadius = indicatorRadiusDp; } this.indicatorRadius = indicatorRadiusDp; return this; } /** * 设置indicator比例,拉伸圆为矩形,控制该比例,default 1.0 * {@link IndicatorView#getRatioRadius()} * * @param indicatorRatio indicatorRadius * indicatorRatio */ public IndicatorView setIndicatorRatio(float indicatorRatio) { if (this.indicatorRatio == this.indicatorSelectedRatio) { this.indicatorSelectedRatio = indicatorRatio; } this.indicatorRatio = indicatorRatio; return this; } /** * 设置选中的圆角,没有设置,默认和indicatorRadius值一致 * * @param indicatorSelectedRadius 单位dp */ public IndicatorView setIndicatorSelectedRadius(float indicatorSelectedRadius) { this.indicatorSelectedRadius = dip2px(indicatorSelectedRadius); return this; } /** * 设置选中圆比例,拉伸圆为矩形,控制该比例,默认比例和indicatorRatio一致 * * @param indicatorSelectedRatio indicatorSelectedRadius * indicatorSelectedRatio */ public IndicatorView setIndicatorSelectedRatio(float indicatorSelectedRatio) { this.indicatorSelectedRatio = indicatorSelectedRatio; return this; } /** * 设置点与点之间的距离,default dp10 * * @param indicatorSpacing 单位dp */ public IndicatorView setIndicatorSpacing(float indicatorSpacing) { this.indicatorSpacing = dip2px(indicatorSpacing); return this; } public IndicatorView setIndicatorStyle(@IndicatorStyle int indicatorStyle) { this.indicatorStyle = indicatorStyle; return this; } public IndicatorView setIndicatorColor(@ColorInt int indicatorColor) { this.unColor = indicatorColor; return this; } public IndicatorView setIndicatorSelectorColor(@ColorInt int indicatorSelectorColor) { this.selectedColor = indicatorSelectorColor; return this; } public IndicatorView setParams(RelativeLayout.LayoutParams params) { this.params = params; return this; } }
[ "yongji.wang@inveno.com" ]
yongji.wang@inveno.com
c816af83dd6620962a186c8fc6f30ecedfbdece6
7abbced6e0b81544e79c4a1ec4e2216a3d4ef631
/zc-manager-impl/src/main/java/com/hehuiming/zc/manager/service/impl/PermissionServiceImpl.java
1eb363f53a3dd0af11b669cc669c482933a01539
[]
no_license
unununu/zhongchouProject
d8eba06546dd84dc9eb0594e17006c5fccec2222
5ab8a88724765fab5bb625795e54c4bc6411b86f
refs/heads/master
2022-12-24T01:43:18.802407
2019-06-03T07:01:09
2019-06-03T07:01:09
188,977,960
0
0
null
2022-12-16T02:50:22
2019-05-28T07:34:25
JavaScript
UTF-8
Java
false
false
2,417
java
package com.hehuiming.zc.manager.service.impl; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.hehuiming.zc.bean.Permission; import com.hehuiming.zc.manager.dao.PermissionMapper; import com.hehuiming.zc.manager.service.PermissionService; @Service public class PermissionServiceImpl implements PermissionService { @Autowired PermissionMapper permissionMapper; /*@Override //这种方法复杂度n*n高,建议用set public List<Permission> queryPermissionImfoTree() { //为了减少去服务器查询的次数,这里查询所有数据出来后,内存中计算 List<Permission> all = permissionMapper.selectAll(); //注意:mybatis没有查到数据则size为0,空集合非null for(Permission per : all) { List<Permission> children = queryPermissionChildren(all,per.getId()); per.setChildren(children); } List<Permission> zTree = new ArrayList<Permission>(); for(Permission per: all) { if(per.getPid() == null) { //根节点 zTree.add(per); } } return zTree; }*/ @Override //n+n次 public List<Permission> queryPermissionImfoTree() { //为了减少去服务器查询的次数,这里查询所有数据出来后,内存中计算 List<Permission> all = permissionMapper.selectAll(); //注意:mybatis没有查到数据则size为0,空集合非null Map<Integer,Permission> pers = new HashMap<>(); //map: id 与 permission对象 for(Permission per : all) { pers.put(per.getId(), per); } for(Permission per: all) { if(per.getPid() != null) { pers.get(per.getPid()).getChildren().add(per); //建立与父亲的关系 } } List<Permission> zTree = new ArrayList<Permission>(); for(Permission per: all) { if(per.getPid() == null) { //拿到根 zTree.add(per); } } return zTree; } //限本类使用: private List<Permission> queryPermissionChildren(List<Permission> all,Integer permissionId) { List<Permission> children = new ArrayList<Permission>(); for(Permission per :all) { if(per.getPid() == permissionId) { children.add(per); } } return children; } }
[ "1679579025@qq.com" ]
1679579025@qq.com
01e33d156a5b2c202008efd500801ea070f664fb
1c58bb6018e9a9a90c5beef17d998cf4928538ed
/Programmieren 3 Ha 2/src/bankprojekt/Sparbuch.java
bdbe1935df7c6cb67dbafcb9e341d38bfd3d12d6
[]
no_license
Daligro/proghomework
91ce5c3eb0ada025c8e8f8f2e54c7931863ccb19
226b99472da52bff7f96e3ad875b533a5638f6e5
refs/heads/master
2021-01-20T13:10:36.856736
2017-10-16T22:16:39
2017-10-16T22:16:39
90,455,478
0
0
null
null
null
null
UTF-8
Java
false
false
1,920
java
package bankprojekt; import java.time.LocalDate; /** * ein Sparbuch * @author Doro * */ public class Sparbuch extends Konto { /** * Zinssatz, mit dem das Sparbuch verzinst wird. 0,03 entspricht 3% */ private double zinssatz; /** * Monatlich erlaubter Gesamtbetrag f�r Abhebungen */ public static final double ABHEBESUMME = 2000; /** * Betrag, der im aktuellen Monat bereits abgehoben wurde */ private double bereitsAbgehoben = 0; /** * Monat und Jahr der letzten Abhebung */ private LocalDate zeitpunkt = LocalDate.now(); public Sparbuch() { zinssatz = 0.03; } public Sparbuch(Kunde inhaber, long kontonummer) { super(inhaber, kontonummer); zinssatz = 0.03; } @Override public String toString() { String ausgabe = "-- SPARBUCH --" + System.lineSeparator() + super.toString() + "Zinssatz: " + this.zinssatz * 100 +"%" + System.lineSeparator(); return ausgabe; } @Override public boolean abheben (double betrag) throws GesperrtException{ if (betrag < 0 ) { throw new IllegalArgumentException(); } if(this.isGesperrt()) { GesperrtException e = new GesperrtException(this.getKontonummer()); throw e; } LocalDate heute = LocalDate.now(); if(heute.getMonth() != zeitpunkt.getMonth() || heute.getYear() != zeitpunkt.getYear()) { this.bereitsAbgehoben = 0; } if (getKontostand() - betrag >= 0.50 && bereitsAbgehoben + betrag <= Sparbuch.ABHEBESUMME) { setKontostand(getKontostand() - betrag*getAktuelleWaehrung().kurs); bereitsAbgehoben += betrag*getAktuelleWaehrung().kurs; this.zeitpunkt = LocalDate.now(); return true; } else return false; } public double getBereitsAbgehoben() { return bereitsAbgehoben; } @Override public void waehrungswechsel(Waehrung neu){ bereitsAbgehoben=bereitsAbgehoben/this.getAktuelleWaehrung().kurs*neu.kurs; super.waehrungswechsel(neu); } }
[ "david.linke98@gmail.com" ]
david.linke98@gmail.com
c49399d84aae2a915208fb539306dff413ce286e
fa06282588a0637037f4ef23f1089318e9e56915
/app/src/main/java/com/dong/wanandroid/data/user/UserListModel.java
6139311d499c069f5b75307ded9720c84f0afd38
[]
no_license
YGragon/wanandroid
8bc232561a92be4333e91406c5a261e5a5498f2a
9d052ea1b634c8e2b1b9edf8aa61b07ec55fae42
refs/heads/master
2021-10-09T17:18:09.380111
2019-01-01T15:32:04
2019-01-01T15:32:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
644
java
package com.dong.wanandroid.data.user; /** * Created by macmini002 on 18/6/4. */ public class UserListModel { private UserModel data; private int errorCode; private String errorMsg; public void setData(UserModel data) { this.data = data; } public void setErrorCode(int errorCode) { this.errorCode = errorCode; } public void setErrorMsg(String errorMsg) { this.errorMsg = errorMsg; } public UserModel getData() { return data; } public int getErrorCode() { return errorCode; } public String getErrorMsg() { return errorMsg; } }
[ "1105894953@qq.com" ]
1105894953@qq.com
b09a5fe702f2ca43153af72164df1785bb4baa29
c7ed0db4a0a4a0cd997cc9305b0cc859654da512
/app/src/main/java/com/example/rodrigovazquez/accountmanager/Helpers/GetNameInForeground.java
1101300f5d90c3af1cd9d0ddf8c45df75a1e5b5f
[]
no_license
RodryVazquez/AccountManager
fd0596447c0c82c5afeeb7efe0bea5fe1e87a2fc
72ec45ff17903203c8eedbb3060cc14eaa8f3a32
refs/heads/master
2020-12-30T14:20:13.252786
2017-07-23T20:28:07
2017-07-23T20:28:07
91,311,675
0
0
null
null
null
null
UTF-8
Java
false
false
1,444
java
package com.example.rodrigovazquez.accountmanager.Helpers; import com.example.rodrigovazquez.accountmanager.Views.SplashActivity; import com.google.android.gms.auth.GoogleAuthException; import com.google.android.gms.auth.GoogleAuthUtil; import com.google.android.gms.auth.GooglePlayServicesAvailabilityException; import com.google.android.gms.auth.UserRecoverableAuthException; import java.io.IOException; /** * Fetch token * com.example.rodrigovazquez.accountmanager * 72:27:D9:18:9C:77:28:C6:64:94:05:B8:3C:E7:13:EA:E7:01:54:0D */ public class GetNameInForeground extends AbstractGetNameTask { /** * @param mActivity * @param mEmail * @param mScope */ public GetNameInForeground(SplashActivity mActivity, String mEmail, String mScope) { super(mActivity, mEmail, mScope); } /** * Obtenemos el token de autenticacion * * @return * @throws IOException */ @Override protected String fetchToken() throws IOException { try { return GoogleAuthUtil.getToken(mActivity, mEmail, mScope); } catch (GooglePlayServicesAvailabilityException ex) { onError(ex.getMessage(), ex); } catch (UserRecoverableAuthException ex) { mActivity.startActivityForResult(ex.getIntent(), mRequestCode); } catch (GoogleAuthException ex) { onError(ex.getMessage(), ex); } return null; } }
[ "rodrigo@rodrigo.vazquez.com.mx" ]
rodrigo@rodrigo.vazquez.com.mx
97e36030fb9351e9f4e4e5a7d873a729f1282177
69ad8fbdc67f4095b4ec14c76ea09d5f0ee8c1f3
/src/main/java/com/easybuy/dao/MyLoveMapper.java
f42b7dbeb3c09290efec5ecb077a5729ba6300aa
[]
no_license
chenchang-lime/easyBuy_SSM
c01e90aa4ce8cca74b753b7602589176606317c5
b21b8a3077e0774c0159aef8ce55e98e60b08ad5
refs/heads/master
2022-12-25T18:29:56.572405
2019-07-11T02:55:06
2019-07-11T02:55:06
193,547,017
0
0
null
2022-12-16T04:56:17
2019-06-24T17:09:59
Java
UTF-8
Java
false
false
385
java
package com.easybuy.dao; import java.util.List; import org.apache.ibatis.annotations.Param; import com.easybuy.entity.MyLove; public interface MyLoveMapper { int addMyLove(MyLove myLove); int delMyLoveByProID(@Param("proID")Integer proID,@Param("loginName")String loginName); List<MyLove> selectMyLove(String loginName); int countMyLove(String loginName); }
[ "ASUS@192.168.225.1" ]
ASUS@192.168.225.1
fdfe19de1461bf4eb1b8df4c2024fa5c654af189
aab2023f5d1bee0c837306d41a76eba7c6e29160
/src/main/java/com/fastcode/emailtest2/addons/emailbuilder/emailconverter/service/MjmlOwnService.java
d62a00dc9d0a14234ab9aa1260d8f500d406c8f6
[]
no_license
farah527/emailBuilderGeneratedApp
6b74517f06d6325eedca17d28b7bf7eb7a38de91
62390a2c1387306ddc861f43701a035b8bc4e814
refs/heads/master
2023-07-25T22:46:50.837030
2021-09-08T16:54:26
2021-09-08T16:54:26
404,035,177
0
0
null
null
null
null
UTF-8
Java
false
false
1,826
java
package com.fastcode.emailtest2.addons.emailbuilder.emailconverter.service; import static com.fastcode.emailtest2.addons.emailbuilder.emailconverter.utils.CommonUtil.writeFile; import static com.fastcode.emailtest2.addons.emailbuilder.emailconverter.utils.CommonUtil.deleteFile; import java.io.IOException; import java.util.Date; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import com.fastcode.emailtest2.addons.emailbuilder.emailconverter.dto.request.Request; import com.fastcode.emailtest2.addons.emailbuilder.emailconverter.dto.response.Response; import com.fastcode.emailtest2.addons.emailbuilder.emailconverter.utils.EmailMjmlTemplateGenrator; import com.fastcode.emailtest2.addons.emailbuilder.emailconverter.utils.MjmlCommandLine; @Service public class MjmlOwnService { @Autowired private EmailMjmlTemplateGenrator mjmlTemplateGenrator; // // private static final String DUMMY_TEMPLATE = // "<mjml><mj-body><mj-container><mj-section><mj-column><mj-text // \"message\"></mj-text></mj-column></mj-section></mj-container></mj-body></mjml>"; @Value("${mjmlFile.path}") private String mjmlFilePath; public Response genrateHtml(Request request) throws IOException { String mjmlTemplate = mjmlTemplateGenrator.genrateTemplate(request); String file = String.format(mjmlFilePath, new Date().getTime()); writeFile.accept(mjmlTemplate, file); String resultHtmlMail = MjmlCommandLine.executeCommand(file); deleteFile(file); return new Response(resultHtmlMail); } public Response genrateMjml(Request request) throws IOException { String mjmlTemplate = mjmlTemplateGenrator.genrateTemplate(request); return new Response("", mjmlTemplate); } }
[ "framzan@ssilhr.com.pk" ]
framzan@ssilhr.com.pk
f1e458213b9546b48ba24e6f383386552d5d0229
9e6af08c85afbf38545d4160fc3d6ed095e7dd25
/FSM/src/com/me/fsm/GuardedAction.java
023e12643603de412a2dc307d6e3b6ab420d5a0e
[]
no_license
Rinnion/MainBomber
c13001eaa85a9d89d2a14a1a06b6df8b04a2775c
366ff3b802f0f5f774685d96b5febc7189cc8528
refs/heads/master
2021-01-20T13:13:27.183485
2017-02-25T05:27:40
2017-02-25T05:27:40
82,679,089
0
0
null
null
null
null
UTF-8
Java
false
false
981
java
package com.me.fsm; public class GuardedAction { private static Guard trueGuard = new GuardBase("true") { public Result evaluate(FSM fsm, Input in) { return Result.ENABLED; } }; private Guard guard; private Action action; private State nextState; public GuardedAction(Action action, State nextState) { this.guard = trueGuard; this.action = action; this.nextState = nextState; } public GuardedAction(Guard guard, Action action, State nextState) { this.guard = guard; this.action = action; this.nextState = nextState; } public String toString() { return "GuardedAction[action=" + action + " guard=" + guard + " nextState=" + nextState + "]"; } public Action getAction() { return action; } public Guard getGuard() { return guard; } public State getNextState() { return nextState; } }
[ "Roman.Tretyakov@gazcardservice.ru" ]
Roman.Tretyakov@gazcardservice.ru
e4a2c6c0c6ad6e55d830d6d6c2c5bc60fc1b878a
8ebb5581539783878433a988c1cf650253dcd9f0
/src/main/java/ru/alfabank/workshop/controller/CardController.java
10ca096000bd948e3b6b007e2f8f73e5a1c8a751
[]
no_license
atkinart/workshop-ekb-cards
81efe4cfeed6aa9992934acac4d6e989169f2738
900cbf8bde6085fb049ea2bef9203ef54588d1eb
refs/heads/master
2020-03-26T16:30:08.179594
2018-08-17T13:14:35
2018-08-17T13:14:35
145,106,146
0
0
null
null
null
null
UTF-8
Java
false
false
614
java
package ru.alfabank.workshop.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RestController; import ru.alfabank.workshop.client.ApplePayClient; @RestController public class CardController { @Autowired ApplePayClient client; @GetMapping(path = "cards/{userId}") public String getCards(@PathVariable("userId") String userId) { return client.getAppleCards(userId); } }
[ "atkinart@gmail.com" ]
atkinart@gmail.com
647528ff31230ab3e6653bbdb52c99d9fedd95ba
c5af9c4d9642580607f4d1dcc184d543a5c01a1b
/.FailedAttempts/2ASTJava/src/main/java/Baylor/ASTJava2/App.java
404645f8ef45f59937e062ed40d362a9ad27530c
[]
no_license
MarkFuller1/Abstract-Syntax-Tree
28248dd35fa176a24976f8b60020610029f2f2b2
e851d37e9518e9a6d870e85ea1ebd066f2eed41b
refs/heads/master
2022-12-18T09:38:42.903285
2020-01-05T19:44:01
2020-01-05T19:44:01
228,282,522
0
0
null
2022-12-08T04:26:50
2019-12-16T01:59:00
Python
UTF-8
Java
false
false
1,423
java
package Baylor.ASTJava2; import java.util.HashSet; import java.util.Set; import org.eclipse.jdt.core.dom.AST; import org.eclipse.jdt.core.dom.ASTParser; import org.eclipse.jdt.core.dom.ASTVisitor; import org.eclipse.jdt.core.dom.CompilationUnit; import org.eclipse.jdt.core.dom.SimpleName; import org.eclipse.jdt.core.dom.VariableDeclarationFragment; public class App { public static void main(String args[]){ String root = args[0]; System.out.println(root); ASTParser parser = ASTParser.newParser(AST.JLS3); parser.setSource(FileParser.getSrcChArray(root)); //parser.setSource("/*abc*/".toCharArray()); parser.setKind(ASTParser.K_COMPILATION_UNIT); //ASTNode node = parser.createAST(null); final CompilationUnit cu = (CompilationUnit) parser.createAST(null); cu.accept(new ASTVisitor() { Set<String> names = new HashSet<String>(); public boolean visit(VariableDeclarationFragment node) { SimpleName name = node.getName(); this.names.add(name.getIdentifier()); System.out.println("Declaration of '"+name+"' at line"+cu.getLineNumber(name.getStartPosition())); return false; // do not continue to avoid usage info } public boolean visit(SimpleName node) { if (this.names.contains(node.getIdentifier())) { System.out.println("Usage of '" + node + "' at line " + cu.getLineNumber(node.getStartPosition())); } return true; } }); } }
[ "Mark_Fuller1@baylor.edu" ]
Mark_Fuller1@baylor.edu
0f8dfbd524879ccab9238da338f495587540ddd1
d88d8e0c30e9efe98aa6dff693db19badcca55e3
/obcc-stmt/src/main/java/cn/obcc/stmt/IStatement.java
21817d98bd9e08bbe15a5c33796f2851125d7c60
[ "MIT" ]
permissive
sparkchain-cn/obcc
2e2cf24d8c440b65e95af6ceca7dedb44d65bf6b
558be84c2f065d617ea49ae2a778e2ec920ae83c
refs/heads/master
2023-08-07T16:43:41.494204
2019-09-19T06:54:42
2019-09-19T06:54:42
203,335,292
2
1
MIT
2023-07-22T14:03:42
2019-08-20T08:39:53
Java
UTF-8
Java
false
false
354
java
package cn.obcc.stmt; import cn.obcc.config.ObccConfig; import cn.obcc.db.DbFactory; import cn.obcc.driver.IChainDriver; public interface IStatement { public void init(ObccConfig config, DbFactory db, IChainDriver driver); public DbFactory getLocalDb(); public IChainDriver getDriver(); public void destory(); }
[ "546711211@qq.com" ]
546711211@qq.com
59a293e151373b7301e09b32620b055babaa0f7d
1a2d8a5c55fee3ef606dcdf939b969a45ed41938
/app/src/main/java/com/example/dang/firecube/models/Artist.java
971fb0f7a512e9c1d1220734f8040fd4186a95c0
[]
no_license
itsholyfield/Firecube
d836aef7d6068e50ee74b4021f4bee266d3d08f3
83891a3fe695aaadbbf780f66f69dd9efdde01ce
refs/heads/master
2020-03-26T16:13:20.658926
2018-08-17T07:43:04
2018-08-17T07:43:04
144,104,670
0
0
null
null
null
null
UTF-8
Java
false
false
534
java
package com.example.dang.firecube.models; public class Artist { public final int albumCount; public final long id; public final String name; public final int songCount; public Artist() { this.id = -1; this.name = ""; this.songCount = -1; this.albumCount = -1; } public Artist(long _id, String _name, int _albumCount, int _songCount) { this.id = _id; this.name = _name; this.songCount = _songCount; this.albumCount = _albumCount; } }
[ "itodoholyfield@gmail.com" ]
itodoholyfield@gmail.com
3113b12fa664d68e6bad6ad77ec14fa6841074c2
b6cad48067fe6f31302d47b940f1ca2abb15d7b6
/项目资料/project(0)/project/LaoWangProject/src/com/john/guo/laowangproject/act/UserCenterActivity.java
8b286c1369bdf813999d29be74758c15fae26255
[]
no_license
lk5103613/Fitness_student
d046416309d131b122fa77718b75f2b78b6b9ca6
b1abf3d606a072e07e287a96ec72795fbb443f6d
refs/heads/master
2021-01-01T17:21:42.590568
2015-10-16T06:04:17
2015-10-16T06:04:17
42,568,981
0
0
null
null
null
null
UTF-8
Java
false
false
3,579
java
package com.john.guo.laowangproject.act; import com.honestwalker.androidutils.window.ToastHelper; import com.john.guo.laowangproject.R; import com.john.guo.laowangproject.titlebar.TitleArgBuilder; import com.john.guo.laowangproject.titlebar.TitleBuilder; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.View.OnClickListener; import android.widget.RelativeLayout; public class UserCenterActivity extends BaseActivity implements OnClickListener { //==================================================== // // 页面控件 // //==================================================== private RelativeLayout kechengRL; private RelativeLayout xiaoxiRL; private RelativeLayout shoucangRL; private RelativeLayout qianbaoRL; private RelativeLayout youhuiquanRL; private RelativeLayout shezhiRL; private RelativeLayout fenxiangRL; private RelativeLayout jiaolianRL; //==================================================== // // 页面参数 // //==================================================== //==================================================== // // 生命周期 // //==================================================== @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_usercenter); } //==================================================== // // 逻辑方法 // //==================================================== @Override protected void initView() { new TitleBuilder(context, TitleArgBuilder.getTitle("我的")); kechengRL = (RelativeLayout) findViewById(R.id.layout1); xiaoxiRL = (RelativeLayout) findViewById(R.id.layout2); shoucangRL = (RelativeLayout) findViewById(R.id.layout3); qianbaoRL = (RelativeLayout) findViewById(R.id.layout4); youhuiquanRL = (RelativeLayout) findViewById(R.id.layout5); shezhiRL = (RelativeLayout) findViewById(R.id.layout6); fenxiangRL = (RelativeLayout) findViewById(R.id.layout7); jiaolianRL = (RelativeLayout) findViewById(R.id.layout8); kechengRL.setOnClickListener(this); xiaoxiRL.setOnClickListener(this); shoucangRL.setOnClickListener(this); qianbaoRL.setOnClickListener(this); youhuiquanRL.setOnClickListener(this); shezhiRL.setOnClickListener(this); fenxiangRL.setOnClickListener(this); jiaolianRL.setOnClickListener(this); } @Override public void onClick(View arg0) { switch (arg0.getId()) { case R.id.layout1: // startActivity(new Intent(context, )); ToastHelper.alert(context, "我的课程"); break; case R.id.layout2: // startActivity(new Intent(context, )); ToastHelper.alert(context, "我的消息"); break; case R.id.layout3: // startActivity(new Intent(context, )); ToastHelper.alert(context, "我的收藏"); break; case R.id.layout4: // startActivity(new Intent(context, )); ToastHelper.alert(context, "我的钱包"); break; case R.id.layout5: startActivity(new Intent(context, CouponActivity.class)); break; case R.id.layout6: startActivity(new Intent(context, MySettingActivity.class)); break; case R.id.layout7: // startActivity(new Intent(context, )); ToastHelper.alert(context, "我的分享"); break; case R.id.layout8: // startActivity(new Intent(context, )); ToastHelper.alert(context, "我要成为教练"); break; default: break; } } //==================================================== // // 接口实现,函数回调 // //==================================================== }
[ "524148211@qq.com" ]
524148211@qq.com
4e19e31f967864580fa7e88ceeacb2a0966871e9
e7b06c1c8d268ce5e89c74e0c3a94e01437e5b14
/yahtzee/src/YahtzeeDiceTest.java
97f45bfe8c6c0ae9006fb7360bf90f9550f34a03
[]
no_license
mrcasado/DiceGameTDD
d58d3c7b2a32427ddb5803aa4e3ff6005c3eba8c
a1f5d291728f8c785fedbf22935a53469f0cfc88
refs/heads/master
2021-01-13T02:14:26.813907
2015-01-22T14:58:08
2015-01-22T14:58:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
985
java
import junit.framework.Assert; import org.junit.Test; public class YahtzeeDiceTest { @Test public void dice_total_returns_sum_of_dice() { Dice dice1 = new Dice(2); Dice dice2 = new Dice(6); Dice dice3 = new Dice(3); Dice dice4 = new Dice(4); Dice dice5 = new Dice(5); int expected = 20; YahtzeeDice dice = new YahtzeeDice(dice1, dice2, dice3, dice4, dice5); int actual = dice.getTotal(); Assert.assertEquals(expected, actual); } @Test public void dice_total_for_1_returns_sum_of_1s() { Dice dice1 = new Dice(2); Dice dice2 = new Dice(1); Dice dice3 = new Dice(3); Dice dice4 = new Dice(1); Dice dice5 = new Dice(5); int expected = 2; YahtzeeDice dice = new YahtzeeDice(dice1, dice2, dice3, dice4, dice5); int actual = dice.getTotalFor(1); Assert.assertEquals(expected, actual); } }
[ "student@smt61.(none)" ]
student@smt61.(none)
6bba9f8b216923c9e60349ce390db4ff63091e47
73525c80fb8761446058bd6118336078ed273425
/gmall-user-serivice/src/main/java/com/atgui/gmall/user/service/Impl/UserServiceImpl.java
e38a9d7318d2d94af07ada6ab119cad23d39762f
[]
no_license
lc137232345/gmall0126
3a271b648766916f6476413cb8c4a60935f70304
773c8f58cda648ee51f2156db62035d59be9b117
refs/heads/master
2022-09-25T13:39:08.687780
2019-11-26T00:06:51
2019-11-26T00:06:51
222,713,598
1
0
null
2022-09-01T23:16:30
2019-11-19T14:21:32
HTML
UTF-8
Java
false
false
524
java
package com.atgui.gmall.user.service.Impl; import com.alibaba.dubbo.config.annotation.Service; import com.atgui.gmall.user.mapper.UserMapper; import com.atguigu.gmall.bean.UmsMember; import com.atguigu.gmall.service.UserService; import org.springframework.beans.factory.annotation.Autowired; import java.util.List; @Service public class UserServiceImpl implements UserService { @Autowired private UserMapper userMapper; public List<UmsMember> selectAll() { return userMapper.selectAll(); } }
[ "137232345@qq.com" ]
137232345@qq.com
276a0169504a35de6a13e79fb9cb996fa3a43c94
a3f08254f48839cc469d48fe35f7dc754782a0e0
/mozu-java-core/src/main/java/com/mozu/api/ApiException.java
739e072a1292735e80f44c60c159832e70ff8525
[ "MIT" ]
permissive
lsendel/mozu-java
baea9a43a407ced0e2ead50fda17b7212b8eb835
e72f5efa96d53e6b1e851f1dd6c9fced67101da6
refs/heads/master
2021-01-16T22:04:59.657160
2014-08-22T14:44:10
2014-08-22T14:44:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
987
java
package com.mozu.api; public class ApiException extends RuntimeException { /** Default Serial Version UID */ private static final long serialVersionUID = 1L; protected ApiError apiError = null; protected int HttpStatusCode; public ApiException(String message) { super(message); } public ApiException(String message, ApiError apiError) { super(message); this.apiError = apiError; } public ApiException(String message, ApiError apiError, int httpStatusCode) { super(message); this.apiError = apiError; this.HttpStatusCode = httpStatusCode; } public ApiException(String message, int httpStatusCode) { super(message); this.HttpStatusCode = httpStatusCode; } public ApiError getApiError() { return apiError; } public int getHttpStatusCode() { return HttpStatusCode; } public void setHttpStatusCode(int httpStatusCode) { HttpStatusCode = httpStatusCode; } }
[ "bob_hewett@volusion.com" ]
bob_hewett@volusion.com
698f504df49770d056e3ab9713744d15ce4e27dc
59b44fd09c480c393845bc17383155f5a30d9bfd
/src/struct/decorator/IPersistent.java
c5b9e9e87520cfa73589d54bff976ef8b4a3c35a
[]
no_license
silveryseaChen/pattern
87844b8454fa386c2e415b6de298721425a41af1
c045f8f824a32a17b0ddd0803540a91f1a829d6a
refs/heads/master
2020-04-05T04:12:46.452444
2018-11-07T13:11:41
2018-11-07T13:11:41
156,542,327
0
0
null
null
null
null
UTF-8
Java
false
false
133
java
package struct.decorator; /** * Created by chy on 18/9/25. */ public interface IPersistent { void persistent(Object msg); }
[ "chy@quke.com" ]
chy@quke.com
fb8e6e626ab2eafbe0777512888a6f83f907b5e9
ccda504a1b617db9893adaa2a2a968b87576bbef
/lib.wechat/src/test/java/com/saiyi/libwechat/ExampleUnitTest.java
2565898ef57ad12f0b92d33366bbd9b770c6970d
[]
no_license
Catfeeds/GymEquipment
8a3bb0d557feac9f6ace8bb8f289040d5b7a7321
94de90efb3d9190caf1c42c8f510155804e61b91
refs/heads/master
2020-04-12T22:13:49.313701
2018-09-21T08:04:48
2018-09-21T08:04:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
380
java
package com.saiyi.libwechat; 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); } }
[ "lgs@qq.com" ]
lgs@qq.com
d54fe8e6cf0fbc21779a1ee82238aee660eac5eb
fddb7c3634d61303fee6b4a6d76e2f9f7f58d85f
/src/unitests/TestAuthenticationService.java
10d1a512a7cef673834054fd63ffc7f249bc94cf
[]
no_license
AlexeyElizarov/gb_java_s03e02
012fca0ba4cc823937a060b290443d0aa2e8d588
d27ed927a9d25a804d38084c4239fd8851382731
refs/heads/master
2023-02-04T13:07:20.172411
2020-12-27T16:35:01
2020-12-27T16:35:01
324,803,138
0
0
null
2020-12-27T16:37:03
2020-12-27T16:33:20
Java
UTF-8
Java
false
false
415
java
package unitests; import server.AuthenticationService; public class TestAuthenticationService { public static void main(String[] args) { String nickname1 = AuthenticationService.findNicknameByLoginAndPassword("l1", "p1"); System.out.println(nickname1); String nickname2 = AuthenticationService.findNicknameByLoginAndPassword("l1", "p2"); System.out.println(nickname2); } }
[ "haakee@gmail.com" ]
haakee@gmail.com
462c44b66715013fe86881113ae80146f673a67d
d4c3659ac9ddb5e3c0010b326f3bcc7e33ce0bed
/ren-automation-ui/src/main/java/com/exigen/ren/main/modules/claim/gb_dn/tabs/FinancialPaymentPaymentDetailsActionTab.java
aaf86b4cc426ff5dd956c728baa2be774a6b895f
[]
no_license
NandiniDR29/regression-test
cbfdae60e8b462cf32485afb3df0d9504200d0e1
c4acbc3488195217f9d6a780130d2e5dfe01d6e5
refs/heads/master
2023-07-03T14:35:40.673146
2021-08-11T07:03:13
2021-08-11T07:03:13
369,527,619
0
0
null
null
null
null
UTF-8
Java
false
false
1,666
java
package com.exigen.ren.main.modules.claim.gb_dn.tabs; import com.exigen.ipb.eisa.controls.composite.TableExtended; import com.exigen.istf.webdriver.controls.Button; import com.exigen.istf.webdriver.controls.Named; import com.exigen.ren.common.ActionTab; import com.exigen.ren.main.modules.claim.common.tabs.PolicyInformationParticipantParticipantInformationTab; import com.exigen.ren.main.modules.claim.gb_dn.metadata.FinancialPaymentPaymentDetailsActionTabMetaData; import org.openqa.selenium.By; public class FinancialPaymentPaymentDetailsActionTab extends ActionTab { public static Button buttonAddPaymentReduction = new Button(By.id("policyDataGatherForm:addClaimsDentalPaymentCalculatorReduction")); public static Button buttonRemovePaymentReduction = new Button(By.id("policyDataGatherForm:eliminateClaimsDentalPaymentCalculatorReduction")); public static TableExtended<ListClaimsDentalPaymentCalculatorReduction> listOfReductionsAmount = new TableExtended<>("Dental Claims List of Reductions", By.xpath("//div[@id='policyDataGatherForm:dataGatherView_ListClaimsDentalPaymentCalculatorReduction']/div/table")); public FinancialPaymentPaymentDetailsActionTab() { super(FinancialPaymentPaymentDetailsActionTabMetaData.class); } public enum ListClaimsDentalPaymentCalculatorReduction implements Named { REDUCTION_AMOUNT("Reduction Amount"), CLAIM_ID("Claim #"); private String name; ListClaimsDentalPaymentCalculatorReduction(String name) { this.name = name; } @Override public String getName() { return name; } } }
[ "Nramachandra@previseit.com" ]
Nramachandra@previseit.com
7269c3575718c4213d89b0928fcb55d4f248fc5a
5af9ddb101268252a550b71f5a8c53b3d6627477
/web/web.rya/src/main/java/org/apache/cloud/rdf/sparql/tld/Utils.java
af39c9ab61d3ab4cd52f12824129a7c375abc9c5
[ "Apache-2.0" ]
permissive
semantic-web-company/incubator-rya
0f0a069a742b6be6939ac873803d87b6677746b6
2b788ea84848251ea06951ea3371010e319abfb6
refs/heads/master
2020-03-29T16:36:24.984925
2018-12-06T20:00:06
2018-12-06T20:00:06
150,120,940
0
0
Apache-2.0
2018-09-24T15:01:56
2018-09-24T15:01:55
null
UTF-8
Java
false
false
274
java
package org.apache.cloud.rdf.sparql.tld; /** * * @author turnguard */ public class Utils { public static boolean isInstanceof(Object o, Class c){ System.out.println("o:"+o); System.out.println("c:"+c); return c.isInstance(o); } }
[ "juergen.jakobitsch@semantic-web.com" ]
juergen.jakobitsch@semantic-web.com
04b40599b3ed9bec9ec3f81c5a94006bc4f040a1
f6bbee073e11d797c38722ed1490bdd0e4015a57
/jdbc/src/main/java/com/performgroup/interview/dao/CategoryDAO.java
c085173000dfd2277e534a4e2ada4caf08bcba2e
[]
no_license
luke-zagorski/sandbox
1dd7ca036178f6e398dbe73c18d85b1cde1543a6
ee348bf181bf910e5614f0a246531c5d8431a045
refs/heads/master
2020-05-20T00:50:23.957944
2014-02-09T15:28:24
2014-02-09T15:28:24
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,750
java
package com.performgroup.interview.dao; import com.performgroup.interview.dao.domain.CategoryEntity; import com.performgroup.interview.dao.domain.VideoEntity; import java.util.List; /** * @author : luke * @version : 1.0 * <p/> * Data Access Object to access CategoryEntity information */ public interface CategoryDAO extends AbstractDAO<CategoryEntity> { /** * Persists a <code>CategoryEntity</code> object into the system * * @param categoryEntity the <code>CategoryEntity</code> object to persist */ void save(CategoryEntity categoryEntity); /** * Deletes a <code>CategoryEntity</code> object from the system * * @param categoryName the name of <code>CategoryEntity</code> object to delete */ void deleteByName(String categoryName); /** * Deletes a <code>CategoryEntity</code> object from the system * * @param categoryEntity the <code>CategoryEntity</code> object to delete */ void delete(CategoryEntity categoryEntity); /** * * Creates new <code>CategoryEntity</code> instance * * @param categoryName - name of category * @return new instance */ CategoryEntity createCategory(String categoryName); /** * Finds <code>CategoryEntity<code/> instance by name * * @param categoryName - name of the category * @return CategoryEntity instance */ CategoryEntity findByName(String categoryName); /** * Finds categories for <code>VideoEntity<code/> * * @param videoEntity - <code>VideoEntity</code> instance * @return - list of <code>CategoryEntity<code/> instances for Video */ List<CategoryEntity> findByVideo(VideoEntity videoEntity); }
[ "Lukasz.Zagorski@performgroup.com" ]
Lukasz.Zagorski@performgroup.com
e328c7735bff6d84ad1a080b84cedc371e0a2286
a8bd35d135f4e5b430941e923490bc925a7b8198
/app/src/main/java/net/smallchat/im/Entity/VisitEntity.java
21aeaa11324ca4abff8a758230d92f5cb010d3eb
[]
no_license
sahujaunpuri/smallchat_android-master
8d53c5da814276bfda20de272d242aa6a485f74a
44f46f7f3c5ed57c6487b3c8b56fa6a511612be4
refs/heads/master
2020-04-08T08:53:33.870909
2018-09-13T09:58:43
2018-09-13T09:58:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,036
java
package net.smallchat.im.Entity; import java.io.Serializable; import org.json.JSONException; import org.json.JSONObject; public class VisitEntity implements Serializable{ /** * {"data":{"visit":"3","count":93,"interactive":0},"state":{"code":0,"msg":"","debugMsg":""}} */ private static final long serialVersionUID = 1L; public int visit; public int count; public int interactive=0; public IMResponseState state; public VisitEntity() { super(); } public VisitEntity(String reqString) { super(); if(reqString == null || reqString.equals("")){ return; } try { JSONObject json = new JSONObject(reqString); if(!json.isNull("data")){ JSONObject childObj = json.getJSONObject("data"); this.visit = childObj.getInt("visit"); this.count = childObj.getInt("count"); this.interactive = childObj.getInt("interactive"); } if(!json.isNull("state")){ state = new IMResponseState(json.getJSONObject("state")); } } catch (JSONException e) { e.printStackTrace(); } } }
[ "present810209@gmail.com" ]
present810209@gmail.com
0c1be16ac22d98266ba6ce019121f9817156eaa0
3a64d8422b65e2cf0b157350516525e791ec929c
/SpringRestCrudAPI1/src/main/java/com/manish/SpringRestCrudApi1Application.java
99a442f18d504b127357a30c533910ea59c6e834
[]
no_license
mkmaurya955/SAMPLE_PROGRAMS
2ad2430e301701c58c310d1ae00c39fb33ef1b26
641d3c51ceb692c45ef7fe42dbe8efa2d11ffc08
refs/heads/master
2020-12-14T10:53:25.303218
2020-01-18T10:30:28
2020-01-18T10:30:28
222,675,773
0
0
null
null
null
null
UTF-8
Java
false
false
327
java
package com.manish; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication public class SpringRestCrudApi1Application { public static void main(String[] args) { SpringApplication.run(SpringRestCrudApi1Application.class, args); } }
[ "mkmaurya955@gmail.com" ]
mkmaurya955@gmail.com
c82b7317a144087b4dc05386c9d728b159dcf6fc
15abda268241b703c106bb83e1f5c2ec63714411
/app/src/main/java/com/rabtman/acgclub/mvp/ui/adapter/AcgCollectionPageAdapter.java
e67989df71c97c78f8400732cb2cc8c6dd9715a2
[ "MIT" ]
permissive
LiycJia/AcgClub
0237ba136bcae25554f60185310376b5522f0dad
6e48b621b350cd84f195f9acbdeeb2b747d60ced
refs/heads/master
2020-03-12T05:01:49.213392
2018-04-20T10:45:16
2018-04-20T10:45:16
130,456,054
2
0
null
2018-04-21T08:45:45
2018-04-21T08:45:45
null
UTF-8
Java
false
false
1,077
java
package com.rabtman.acgclub.mvp.ui.adapter; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import android.view.ViewGroup; import com.rabtman.acgclub.base.constant.SystemConstant; import java.util.List; /** * @author zjm * @Description: * @date 2016/11/23 */ public class AcgCollectionPageAdapter extends FragmentPagerAdapter { private List<Fragment> fragments; public AcgCollectionPageAdapter(FragmentManager fragmentManager, List<Fragment> fragments) { super(fragmentManager); this.fragments = fragments; } @Override public Fragment getItem(int position) { return fragments.get(position); } @Override public int getCount() { return fragments.size(); } @Override public CharSequence getPageTitle(int position) { return SystemConstant.ACG_COLLECTION_TITLE.get(position); } @Override public void destroyItem(ViewGroup container, int position, Object object) { //super.destroyItem(container, position, object); } }
[ "zhangjm05@gmail.com" ]
zhangjm05@gmail.com
8b1c885fc825af214ea7355f54fa303d2ab6e60b
1743d7761bbe0e9095f1c0a7ddccf5133a13f4a5
/IOSchedGWT/src/com/nitrous/iosched/client/toolbar/ToolbarController.java
3ad79d49b574515e31b6be351b7347c1eb16a8c5
[]
no_license
nitrousdigital/io-schedule-gwt
d54ee54c36b9909a91be58dc1b18271cc4a62655
6dac3e2d891d2a53d2ef660d83356e7435eae132
refs/heads/master
2020-06-02T13:51:46.450769
2015-06-18T04:45:39
2015-06-18T04:45:39
33,558,554
0
0
null
null
null
null
UTF-8
Java
false
false
182
java
package com.nitrous.iosched.client.toolbar; public interface ToolbarController { public void search(); public void home(); public void refresh(); public void back(); }
[ "nitrousdigital@gmail.com@0f8a8be7-a21e-53b9-743b-78ef3b4d88b1" ]
nitrousdigital@gmail.com@0f8a8be7-a21e-53b9-743b-78ef3b4d88b1