blob_id
stringlengths 40
40
| __id__
int64 225
39,780B
| directory_id
stringlengths 40
40
| path
stringlengths 6
313
| content_id
stringlengths 40
40
| detected_licenses
list | license_type
stringclasses 2
values | repo_name
stringlengths 6
132
| repo_url
stringlengths 25
151
| snapshot_id
stringlengths 40
40
| revision_id
stringlengths 40
40
| branch_name
stringlengths 4
70
| visit_date
timestamp[ns] | revision_date
timestamp[ns] | committer_date
timestamp[ns] | github_id
int64 7.28k
689M
⌀ | star_events_count
int64 0
131k
| fork_events_count
int64 0
48k
| gha_license_id
stringclasses 23
values | gha_fork
bool 2
classes | gha_event_created_at
timestamp[ns] | gha_created_at
timestamp[ns] | gha_updated_at
timestamp[ns] | gha_pushed_at
timestamp[ns] | gha_size
int64 0
40.4M
⌀ | gha_stargazers_count
int32 0
112k
⌀ | gha_forks_count
int32 0
39.4k
⌀ | gha_open_issues_count
int32 0
11k
⌀ | gha_language
stringlengths 1
21
⌀ | gha_archived
bool 2
classes | gha_disabled
bool 1
class | content
stringlengths 7
4.37M
| src_encoding
stringlengths 3
16
| language
stringclasses 1
value | length_bytes
int64 7
4.37M
| extension
stringclasses 24
values | filename
stringlengths 4
174
| language_id
stringclasses 1
value | entities
list | contaminating_dataset
stringclasses 0
values | malware_signatures
list | redacted_content
stringlengths 7
4.37M
| redacted_length_bytes
int64 7
4.37M
| alphanum_fraction
float32 0.25
0.94
| alpha_fraction
float32 0.25
0.94
| num_lines
int32 1
84k
| avg_line_length
float32 0.76
99.9
| std_line_length
float32 0
220
| max_line_length
int32 5
998
| is_vendor
bool 2
classes | is_generated
bool 1
class | max_hex_length
int32 0
319
| hex_fraction
float32 0
0.38
| max_unicode_length
int32 0
408
| unicode_fraction
float32 0
0.36
| max_base64_length
int32 0
506
| base64_fraction
float32 0
0.5
| avg_csv_sep_count
float32 0
4
| is_autogen_header
bool 1
class | is_empty_html
bool 1
class | shard
stringclasses 16
values |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3cf6a27349a9629ddd46ca9bbce87deb1e443670
| 6,511,170,454,469 |
0e904b03a6144300cc23d4986939bfbfe693b984
|
/labs/lab2_observer_pattern/BankProject/src/bank/extensions/State.java
|
ad6958cf97027147b00c30f6846f66b626f319a2
|
[] |
no_license
|
ganijon/asd
|
https://github.com/ganijon/asd
|
ae53a1c9de1c1d81e3f391b981bba5e7e3117b4b
|
c28f579e3831fcf623f9d30fa16292ca73ebe4bb
|
refs/heads/master
| 2020-12-02T07:45:31.273000 | 2017-07-21T20:03:13 | 2017-07-21T20:03:13 | 96,721,254 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package bank.extensions;
public class State {
public long accountNumber;
public String accountHolder;
public double accountBalance;
public State(long accNo, String accHolder, double accBalance) {
accountNumber = accNo;
accountHolder = accHolder;
accountBalance = accBalance;
}
@Override
public String toString() {
return "| Account No.: " + accountNumber
+ " | Customer: " + accountHolder
+ " | Balance: $" + accountBalance;
}
}
|
UTF-8
|
Java
| 528 |
java
|
State.java
|
Java
|
[] | null |
[] |
package bank.extensions;
public class State {
public long accountNumber;
public String accountHolder;
public double accountBalance;
public State(long accNo, String accHolder, double accBalance) {
accountNumber = accNo;
accountHolder = accHolder;
accountBalance = accBalance;
}
@Override
public String toString() {
return "| Account No.: " + accountNumber
+ " | Customer: " + accountHolder
+ " | Balance: $" + accountBalance;
}
}
| 528 | 0.613636 | 0.613636 | 20 | 25.4 | 19.173941 | 67 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.65 | false | false |
3
|
ed9794882b4ae515f1cea2e284b73d69d2c02416
| 10,849,087,427,426 |
776527d8a4f86767e5cebcf78159b1a098a0181b
|
/Spring-BlockChain/Spring-BlockChain/src/main/java/edu/ap/spring/service/Wallet.java
|
32b5cfc287e76e66f59cdcc448e3e8ff9ba7ece4
|
[] |
no_license
|
steven-plettinx/Webtech4_Examen
|
https://github.com/steven-plettinx/Webtech4_Examen
|
3e4955f4133b9e43f6454df6e9377bc57aa6f82d
|
f27feffa4ec4bfd094fd852bc93c008fcdcbecc5
|
refs/heads/master
| 2020-05-01T17:26:07.300000 | 2019-03-25T15:58:06 | 2019-03-25T15:58:06 | 177,599,393 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package edu.ap.spring.service;
import java.security.*;
import java.security.spec.ECGenParameterSpec;
import java.util.ArrayList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
import edu.ap.spring.transaction.Transaction;
@Service
@Scope("prototype")
public class Wallet {
@Autowired
private BlockChain bChain;
private PrivateKey privateKey;
private PublicKey publicKey;
public Wallet() {}
public void generateKeyPair() {
try {
KeyPairGenerator keyGen = KeyPairGenerator.getInstance("ECDSA", "BC");
SecureRandom random = SecureRandom.getInstance("SHA1PRNG");
ECGenParameterSpec ecSpec = new ECGenParameterSpec("prime192v1");
// initialize the key generator and generate a KeyPair
keyGen.initialize(ecSpec, random); //256
KeyPair keyPair = keyGen.generateKeyPair();
// set the public and private keys from the keyPair
this.privateKey = keyPair.getPrivate();
this.publicKey = keyPair.getPublic();
}
catch(Exception e) {
throw new RuntimeException(e);
}
}
public float getBalance() {
float total = 0;
for(Block block : bChain.getBlocks()) {
ArrayList<Transaction> transactions = block.getTransactions();
for(Transaction tr : transactions) {
if(tr.sender == this.publicKey) {
total -= tr.value;
}
else if(tr.recipient == this.getPublicKey()) {
total += tr.value;
}
}
}
return total;
}
public Transaction sendFunds(PublicKey recipient, float value) throws Exception {
if(getBalance() < value) {
System.out.println("# Not Enough funds to send transaction. Transaction Discarded.");
throw new Exception();
}
if(this.getPublicKey() == recipient) {
System.out.println("# You cannot transfer funds to yourself. Transaction Discarded.");
throw new Exception();
}
Transaction newTransaction = new Transaction(publicKey, recipient , value);
newTransaction.generateSignature(privateKey);
return newTransaction;
}
public PrivateKey getPrivateKey() {
return this.privateKey;
}
public PublicKey getPublicKey() {
return this.publicKey;
}
}
|
UTF-8
|
Java
| 2,221 |
java
|
Wallet.java
|
Java
|
[] | null |
[] |
package edu.ap.spring.service;
import java.security.*;
import java.security.spec.ECGenParameterSpec;
import java.util.ArrayList;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;
import edu.ap.spring.transaction.Transaction;
@Service
@Scope("prototype")
public class Wallet {
@Autowired
private BlockChain bChain;
private PrivateKey privateKey;
private PublicKey publicKey;
public Wallet() {}
public void generateKeyPair() {
try {
KeyPairGenerator keyGen = KeyPairGenerator.getInstance("ECDSA", "BC");
SecureRandom random = SecureRandom.getInstance("SHA1PRNG");
ECGenParameterSpec ecSpec = new ECGenParameterSpec("prime192v1");
// initialize the key generator and generate a KeyPair
keyGen.initialize(ecSpec, random); //256
KeyPair keyPair = keyGen.generateKeyPair();
// set the public and private keys from the keyPair
this.privateKey = keyPair.getPrivate();
this.publicKey = keyPair.getPublic();
}
catch(Exception e) {
throw new RuntimeException(e);
}
}
public float getBalance() {
float total = 0;
for(Block block : bChain.getBlocks()) {
ArrayList<Transaction> transactions = block.getTransactions();
for(Transaction tr : transactions) {
if(tr.sender == this.publicKey) {
total -= tr.value;
}
else if(tr.recipient == this.getPublicKey()) {
total += tr.value;
}
}
}
return total;
}
public Transaction sendFunds(PublicKey recipient, float value) throws Exception {
if(getBalance() < value) {
System.out.println("# Not Enough funds to send transaction. Transaction Discarded.");
throw new Exception();
}
if(this.getPublicKey() == recipient) {
System.out.println("# You cannot transfer funds to yourself. Transaction Discarded.");
throw new Exception();
}
Transaction newTransaction = new Transaction(publicKey, recipient , value);
newTransaction.generateSignature(privateKey);
return newTransaction;
}
public PrivateKey getPrivateKey() {
return this.privateKey;
}
public PublicKey getPublicKey() {
return this.publicKey;
}
}
| 2,221 | 0.715894 | 0.711842 | 83 | 25.73494 | 24.150175 | 89 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 2.048193 | false | false |
3
|
9f617618e548d8506073b261e0f5a6ae1238ccb6
| 27,281,632,305,043 |
43d7468968d53728c1f2399dc406b38da1ebf601
|
/src/main/java/com/co2AutomaticCrm/Models/AppSettings.java
|
83ca07ca18f3f5435838572be55c2bba2d488f9b
|
[] |
no_license
|
yanyasha228/co2AutCrm
|
https://github.com/yanyasha228/co2AutCrm
|
b526537cb3f0b5de2f6eb084a3e99e863c008557
|
b79b0a33e1187f4903d53e3ce84ca5697e5d32c5
|
refs/heads/master
| 2023-01-23T22:11:53.285000 | 2020-11-26T16:56:03 | 2020-11-26T16:56:03 | 316,289,891 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.co2AutomaticCrm.Models;
import lombok.AccessLevel;
import lombok.Data;
import lombok.Setter;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@Data
@Entity
@Table(name = "admin_settings")
public class AppSettings {
@Id
@Setter(value = AccessLevel.NONE)
private int id = 1;
@Column(name = "USD_CURRENCY")
private float usdCurrency;
@Column(name = "EUR_CURRENCY")
private float eurCurrency;
}
|
UTF-8
|
Java
| 516 |
java
|
AppSettings.java
|
Java
|
[] | null |
[] |
package com.co2AutomaticCrm.Models;
import lombok.AccessLevel;
import lombok.Data;
import lombok.Setter;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
@Data
@Entity
@Table(name = "admin_settings")
public class AppSettings {
@Id
@Setter(value = AccessLevel.NONE)
private int id = 1;
@Column(name = "USD_CURRENCY")
private float usdCurrency;
@Column(name = "EUR_CURRENCY")
private float eurCurrency;
}
| 516 | 0.732558 | 0.728682 | 28 | 17.464285 | 14.301554 | 37 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.392857 | false | false |
3
|
16430d42a5a8665e2d802e19fd0799461aaf6745
| 12,128,987,677,251 |
977ed60e965e91e0a83ecb3d17ac1b26838b241e
|
/src/com/anthonyzero/medium/_0142/Solution.java
|
814e7d901dbad1e0c5292da33ea2284e0b1cce60
|
[] |
no_license
|
AnthonyZero/leetcode-cn
|
https://github.com/AnthonyZero/leetcode-cn
|
05f1c0dfbccea0457fc9c223a81ae3030a6050a4
|
e36ade469d9f0642711b04deebd369efec62048c
|
refs/heads/master
| 2021-07-18T01:39:09.290000 | 2020-10-10T10:09:36 | 2020-10-10T10:09:36 | 219,631,428 | 4 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.anthonyzero.medium._0142;
import com.anthonyzero.tools.ListNode;
public class Solution {
public ListNode detectCycle(ListNode head) {
if (head == null || head.next == null) {
return null; //没有环返回null
}
ListNode slow = head;
ListNode fast = head;
while(fast != null && fast.next != null) {
slow = slow.next;
fast = fast.next.next;
if (slow == fast) {
break; //停留在相遇点 环内 slow和fast
}
}
if(slow != fast) { //没相遇返回null 代表没环
return null;
}
//有环 寻找环的入环第一个节点
while (head != fast) {
head = head.next;
fast = fast.next;
}
return head;
}
public static void main(String[] args) {
int[] arr = new int[]{3,2,0,-4};
ListNode head = new ListNode(arr);
head.next.next.next.next = head.next;
/*head.next.next = head;*/
System.out.println(new Solution().detectCycle(head).val);
}
}
|
UTF-8
|
Java
| 1,116 |
java
|
Solution.java
|
Java
|
[] | null |
[] |
package com.anthonyzero.medium._0142;
import com.anthonyzero.tools.ListNode;
public class Solution {
public ListNode detectCycle(ListNode head) {
if (head == null || head.next == null) {
return null; //没有环返回null
}
ListNode slow = head;
ListNode fast = head;
while(fast != null && fast.next != null) {
slow = slow.next;
fast = fast.next.next;
if (slow == fast) {
break; //停留在相遇点 环内 slow和fast
}
}
if(slow != fast) { //没相遇返回null 代表没环
return null;
}
//有环 寻找环的入环第一个节点
while (head != fast) {
head = head.next;
fast = fast.next;
}
return head;
}
public static void main(String[] args) {
int[] arr = new int[]{3,2,0,-4};
ListNode head = new ListNode(arr);
head.next.next.next.next = head.next;
/*head.next.next = head;*/
System.out.println(new Solution().detectCycle(head).val);
}
}
| 1,116 | 0.509579 | 0.501916 | 39 | 25.76923 | 17.288593 | 65 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.564103 | false | false |
3
|
247d1a19a9a4b94af269c3d7f897b2fc0c4f6094
| 19,439,022,026,713 |
7eb7a8f93a48f1ed096d97a3f7b25346b2693c76
|
/src/View/Main.java
|
d2f3dabccdac0b67c961e3874715f968b0b8a55c
|
[] |
no_license
|
ShuratCode/IR_PROJECT
|
https://github.com/ShuratCode/IR_PROJECT
|
4ee2003b623470600cd14a4b0ad1e7c51a28cedd
|
b6574e11ff34b7247df03b65ad0a3b8eed7067d1
|
refs/heads/master
| 2022-10-15T11:00:58.373000 | 2019-02-19T21:33:55 | 2019-02-19T21:33:55 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package View;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class Main extends Application
{
/**
* the main of the application setup and run the program
* @param args
*/
public static void main(String[] args)
{
launch(args);
}
/**
* start the program
* @param primaryStage
* @throws Exception
*/
@Override
public void start(Stage primaryStage) throws Exception
{
FXMLLoader fxmlLoader = new FXMLLoader();
Parent root = fxmlLoader.load(getClass().getResource("View.fxml").openStream());
primaryStage.setTitle("IR Engine");
primaryStage.setScene(new Scene(root, 600, 400));
/*******************/
Controller C = fxmlLoader.getController();
C.stage = primaryStage;
C.initView();
/*******************/
primaryStage.show();
}
}
|
UTF-8
|
Java
| 1,011 |
java
|
Main.java
|
Java
|
[] | null |
[] |
package View;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class Main extends Application
{
/**
* the main of the application setup and run the program
* @param args
*/
public static void main(String[] args)
{
launch(args);
}
/**
* start the program
* @param primaryStage
* @throws Exception
*/
@Override
public void start(Stage primaryStage) throws Exception
{
FXMLLoader fxmlLoader = new FXMLLoader();
Parent root = fxmlLoader.load(getClass().getResource("View.fxml").openStream());
primaryStage.setTitle("IR Engine");
primaryStage.setScene(new Scene(root, 600, 400));
/*******************/
Controller C = fxmlLoader.getController();
C.stage = primaryStage;
C.initView();
/*******************/
primaryStage.show();
}
}
| 1,011 | 0.596439 | 0.590504 | 43 | 22.511627 | 21.257418 | 98 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.395349 | false | false |
3
|
f2845ec3640f07bfc28659054649331cde458f74
| 12,713,103,249,692 |
c18d877e9222f545e3da6a912c29af466d8b9411
|
/src/main/java/cn/ahpu/pojo/Course.java
|
ce46548d962eb0b6ae8892f7227c841bdb2aa594
|
[] |
no_license
|
geekwk/courseschedule
|
https://github.com/geekwk/courseschedule
|
dd37eb8916bb9bea3c800fd8577492bb2a755c44
|
ce7e06b25890928261a44ea0ed1612d2c9d804e2
|
refs/heads/master
| 2023-03-11T14:12:35.847000 | 2022-05-08T08:25:16 | 2022-05-08T08:25:16 | 226,451,414 | 2 | 0 | null | false | 2023-02-22T05:31:02 | 2019-12-07T03:45:47 | 2022-05-08T08:25:55 | 2023-02-22T05:31:02 | 70,662 | 0 | 0 | 8 |
Java
| false | false |
package cn.ahpu.pojo;
import java.util.List;
public class Course {
private Integer id;
private String name;
private Integer credit;
private Integer period;
private Academy academy;
private String info;
private List<Teacher> teacherList;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public Integer getCredit() {
return credit;
}
public void setCredit(Integer credit) {
this.credit = credit;
}
public Integer getPeriod() {
return period;
}
public void setPeriod(Integer period) {
this.period = period;
}
public Academy getAcademy() {
return academy;
}
public void setAcademy(Academy academy) {
this.academy = academy;
}
public String getInfo() {
return info;
}
public void setInfo(String info) {
this.info = info;
}
public List<Teacher> getTeacherList() {
return teacherList;
}
public void setTeacherList(List<Teacher> teacherList) {
this.teacherList = teacherList;
}
@Override
public String toString() {
String str = (teacherList==null)?"":teacherList.toString();
return "Course{" +
"id=" + id +
", name='" + name + '\'' +
", credit=" + credit +
", period=" + period +
", academy=" + academy +
", info='" + info + '\'' +
", teacherList=" + str +
'}';
}
}
|
UTF-8
|
Java
| 1,752 |
java
|
Course.java
|
Java
|
[] | null |
[] |
package cn.ahpu.pojo;
import java.util.List;
public class Course {
private Integer id;
private String name;
private Integer credit;
private Integer period;
private Academy academy;
private String info;
private List<Teacher> teacherList;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public Integer getCredit() {
return credit;
}
public void setCredit(Integer credit) {
this.credit = credit;
}
public Integer getPeriod() {
return period;
}
public void setPeriod(Integer period) {
this.period = period;
}
public Academy getAcademy() {
return academy;
}
public void setAcademy(Academy academy) {
this.academy = academy;
}
public String getInfo() {
return info;
}
public void setInfo(String info) {
this.info = info;
}
public List<Teacher> getTeacherList() {
return teacherList;
}
public void setTeacherList(List<Teacher> teacherList) {
this.teacherList = teacherList;
}
@Override
public String toString() {
String str = (teacherList==null)?"":teacherList.toString();
return "Course{" +
"id=" + id +
", name='" + name + '\'' +
", credit=" + credit +
", period=" + period +
", academy=" + academy +
", info='" + info + '\'' +
", teacherList=" + str +
'}';
}
}
| 1,752 | 0.530251 | 0.530251 | 91 | 18.263737 | 16.920523 | 67 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.340659 | false | false |
3
|
8357aea12ffdbc9364c3f801b87686fed1bc99e2
| 27,633,819,650,884 |
7801c36c4ec65b1e38caaf0b7423bde7d18d7fa0
|
/src/main/java/com/toris93/nanjung/web/dao/ContentsMapper.java
|
85c695e75147f75cba2473d33c85a0656c02c594
|
[] |
no_license
|
ChunChuKim/nanjungdiary
|
https://github.com/ChunChuKim/nanjungdiary
|
cb041a33a4fcf345ebb126b5e2c06a222752c281
|
70b9a17d525021df59e4b5bb271fbac1386258ec
|
refs/heads/master
| 2020-05-03T23:49:05.888000 | 2019-04-11T05:02:44 | 2019-04-11T05:02:44 | 178,872,779 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.toris93.nanjung.web.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import com.toris93.nanjung.web.domain.ContentsVO;
@Repository
@Mapper
public interface ContentsMapper {
public List<ContentsVO> getContentsList();
}
|
UTF-8
|
Java
| 310 |
java
|
ContentsMapper.java
|
Java
|
[] | null |
[] |
package com.toris93.nanjung.web.dao;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;
import com.toris93.nanjung.web.domain.ContentsVO;
@Repository
@Mapper
public interface ContentsMapper {
public List<ContentsVO> getContentsList();
}
| 310 | 0.812903 | 0.8 | 15 | 19.666666 | 19.706739 | 49 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.466667 | false | false |
3
|
ce809c69c1c3432e93528c741592adc0b8a41337
| 37,082,747,635,514 |
9feb17c588ac5e222007df731a3a0cf9a00ce622
|
/athena_decorate_progress/src/main/java/com/dec/pro/util/Exception/RegisterFailedException.java
|
ac90104f4c499db4c3f1ca338e7a676ce44bc123
|
[] |
no_license
|
crystalNi023/kiy-all
|
https://github.com/crystalNi023/kiy-all
|
1fdb8978a71384ffbc4a9290ec7a396bf0dfd3f9
|
a23e19f46b3dcc2abf75104bcdcaaf74aa81bdfd
|
refs/heads/master
| 2022-12-23T07:55:23.981000 | 2020-02-26T04:49:22 | 2020-02-26T04:49:22 | 243,160,398 | 1 | 0 | null | false | 2022-12-16T06:04:57 | 2020-02-26T03:33:54 | 2020-03-17T03:21:07 | 2022-12-16T06:04:54 | 263,711 | 1 | 0 | 16 |
Java
| false | false |
package com.dec.pro.util.Exception;
/**
* 异常:注册失败 1008
* @author Administrator
*
*/
public class RegisterFailedException extends UserException {
private static final long serialVersionUID = 1L;
public RegisterFailedException(String msg) {
super(UserExceptionCodes.REGISTER_FAILED.getValue(), msg);
}
}
|
UTF-8
|
Java
| 329 |
java
|
RegisterFailedException.java
|
Java
|
[
{
"context": "pro.util.Exception;\n/**\n * 异常:注册失败 1008\n * @author Administrator\n *\n */\npublic class RegisterFailedException exten",
"end": 80,
"score": 0.9755338430404663,
"start": 67,
"tag": "NAME",
"value": "Administrator"
}
] | null |
[] |
package com.dec.pro.util.Exception;
/**
* 异常:注册失败 1008
* @author Administrator
*
*/
public class RegisterFailedException extends UserException {
private static final long serialVersionUID = 1L;
public RegisterFailedException(String msg) {
super(UserExceptionCodes.REGISTER_FAILED.getValue(), msg);
}
}
| 329 | 0.755556 | 0.739683 | 14 | 21.5 | 22.692825 | 60 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.785714 | false | false |
3
|
dbea29873c3f014c402a3b9b602c2e5f4fa5d5c9
| 34,196,529,623,517 |
3b91ed788572b6d5ac4db1bee814a74560603578
|
/com/tencent/mm/plugin/remittance/bankcard/ui/BankRemitBankcardInputUI$18.java
|
d46238263e6bf36dc0c6945e7602fe552ead7395
|
[] |
no_license
|
linsir6/WeChat_java
|
https://github.com/linsir6/WeChat_java
|
a1deee3035b555fb35a423f367eb5e3e58a17cb0
|
32e52b88c012051100315af6751111bfb6697a29
|
refs/heads/master
| 2020-05-31T05:40:17.161000 | 2018-08-28T02:07:02 | 2018-08-28T02:07:02 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.tencent.mm.plugin.remittance.bankcard.ui;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import com.tencent.mm.plugin.remittance.bankcard.model.TransferRecordParcel;
import com.tencent.mm.sdk.platformtools.ah;
import com.tencent.mm.sdk.platformtools.x;
class BankRemitBankcardInputUI$18 implements OnItemClickListener {
final /* synthetic */ BankRemitBankcardInputUI mve;
BankRemitBankcardInputUI$18(BankRemitBankcardInputUI bankRemitBankcardInputUI) {
this.mve = bankRemitBankcardInputUI;
}
public final void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
x.i("MicroMsg.BankRemitBankcardInputUI", "popup window click: %d", new Object[]{Integer.valueOf(i)});
BankRemitBankcardInputUI.a(this.mve, false);
BankRemitBankcardInputUI.a(this.mve, (TransferRecordParcel) adapterView.getAdapter().getItem(i));
BankRemitBankcardInputUI.E(this.mve);
BankRemitBankcardInputUI.a(this.mve, BankRemitBankcardInputUI.F(this.mve).muA, BankRemitBankcardInputUI.A(this.mve), BankRemitBankcardInputUI.F(this.mve).lMV);
ah.i(new 1(this), 500);
BankRemitBankcardInputUI.f(this.mve).dismiss();
this.mve.YC();
}
}
|
UTF-8
|
Java
| 1,289 |
java
|
BankRemitBankcardInputUI$18.java
|
Java
|
[] | null |
[] |
package com.tencent.mm.plugin.remittance.bankcard.ui;
import android.view.View;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import com.tencent.mm.plugin.remittance.bankcard.model.TransferRecordParcel;
import com.tencent.mm.sdk.platformtools.ah;
import com.tencent.mm.sdk.platformtools.x;
class BankRemitBankcardInputUI$18 implements OnItemClickListener {
final /* synthetic */ BankRemitBankcardInputUI mve;
BankRemitBankcardInputUI$18(BankRemitBankcardInputUI bankRemitBankcardInputUI) {
this.mve = bankRemitBankcardInputUI;
}
public final void onItemClick(AdapterView<?> adapterView, View view, int i, long j) {
x.i("MicroMsg.BankRemitBankcardInputUI", "popup window click: %d", new Object[]{Integer.valueOf(i)});
BankRemitBankcardInputUI.a(this.mve, false);
BankRemitBankcardInputUI.a(this.mve, (TransferRecordParcel) adapterView.getAdapter().getItem(i));
BankRemitBankcardInputUI.E(this.mve);
BankRemitBankcardInputUI.a(this.mve, BankRemitBankcardInputUI.F(this.mve).muA, BankRemitBankcardInputUI.A(this.mve), BankRemitBankcardInputUI.F(this.mve).lMV);
ah.i(new 1(this), 500);
BankRemitBankcardInputUI.f(this.mve).dismiss();
this.mve.YC();
}
}
| 1,289 | 0.7564 | 0.750194 | 27 | 46.740742 | 39.556423 | 167 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.037037 | false | false |
3
|
b45e9d43d5e00aa77ac1b864f6e0deec5dd4a7e9
| 30,640,296,750,594 |
47a25fc139848b2fb631ca68c5f54d34588cc438
|
/app/src/main/java/com/shamlatech/api_response/Res_Absnote_List.java
|
bcd2a245aefe4dd31fe15bf42e9bb06f974c8ee6
|
[
"MIT"
] |
permissive
|
MartinDeMundia/ClassTeacherNetworks_Mobile
|
https://github.com/MartinDeMundia/ClassTeacherNetworks_Mobile
|
afe825a3bc74648978b537fef37ec30aa6e0f8ba
|
d786dd8341e8252e9ba301d574d24ae73ced1b3c
|
refs/heads/main
| 2023-06-28T21:19:22.069000 | 2021-08-01T18:20:47 | 2021-08-01T18:21:57 | 391,702,107 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.shamlatech.api_response;
import java.io.Serializable;
import java.util.ArrayList;
/**
* Created by ADMIN on 12-Jun-18.
*/
public class Res_Absnote_List implements Serializable {
private String id;
private String adate;
private String anote;
private String auserid;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getAuserid() {
return auserid;
}
public void setAuserid(String auserid) {
this.auserid = auserid;
}
public String getAdate() {
return adate;
}
public void setAdate(String adate) {
this.adate = adate;
}
public String getAnote() {
return anote;
}
public void setAnote(String anote) {
this.anote = anote;
}
}
|
UTF-8
|
Java
| 844 |
java
|
Res_Absnote_List.java
|
Java
|
[
{
"context": "ble;\nimport java.util.ArrayList;\n/**\n * Created by ADMIN on 12-Jun-18.\n */\n\npublic class Res_Absnote_List ",
"end": 118,
"score": 0.8937287330627441,
"start": 113,
"tag": "USERNAME",
"value": "ADMIN"
}
] | null |
[] |
package com.shamlatech.api_response;
import java.io.Serializable;
import java.util.ArrayList;
/**
* Created by ADMIN on 12-Jun-18.
*/
public class Res_Absnote_List implements Serializable {
private String id;
private String adate;
private String anote;
private String auserid;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getAuserid() {
return auserid;
}
public void setAuserid(String auserid) {
this.auserid = auserid;
}
public String getAdate() {
return adate;
}
public void setAdate(String adate) {
this.adate = adate;
}
public String getAnote() {
return anote;
}
public void setAnote(String anote) {
this.anote = anote;
}
}
| 844 | 0.603081 | 0.598341 | 52 | 15.230769 | 15.214638 | 55 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.288462 | false | false |
3
|
7ca222ffd5b03124b29b37b6ec0591886b5d4307
| 1,022,202,276,000 |
9476258959622c7465f1b8944952d2fe75470eb9
|
/traveljunkywebapp/src/main/java/com/travelJunky/DAO/ChallengeListDAO.java
|
0c1609574cbb3c3ea4a5c05170ea26a32087da06
|
[] |
no_license
|
jdfost1/TravelJunky
|
https://github.com/jdfost1/TravelJunky
|
c34f26152b9fb384812d1b3f52d42e4f9dffcf2d
|
c0cd9893784b9cc3d7c11d33e0ab12d4e6ce8fd3
|
refs/heads/master
| 2022-12-24T05:47:56.711000 | 2019-10-30T01:43:46 | 2019-10-30T01:43:46 | 204,561,431 | 1 | 0 | null | false | 2022-12-15T23:24:53 | 2019-08-26T21:04:29 | 2019-10-30T01:45:18 | 2022-12-15T23:24:50 | 2,659 | 1 | 0 | 8 |
Java
| false | false |
package com.travelJunky.DAO;
import com.travelJunky.entities.Challenge;
public interface ChallengeListDAO {
Challenge[] getChallengesById(int id);
}
|
UTF-8
|
Java
| 155 |
java
|
ChallengeListDAO.java
|
Java
|
[] | null |
[] |
package com.travelJunky.DAO;
import com.travelJunky.entities.Challenge;
public interface ChallengeListDAO {
Challenge[] getChallengesById(int id);
}
| 155 | 0.793548 | 0.793548 | 9 | 16.222221 | 18.035629 | 42 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.555556 | false | false |
3
|
6c194117e2f33a7da94b4837549d7fadf68635da
| 111,669,215,949 |
301e19b5b407b4d949ccebdc7ca7dbfafdc48d64
|
/teams/preSprintBot/utils/Utils.java
|
a1e98556b1852fdd13dbc6cffcb3c127c0ed2a00
|
[] |
no_license
|
jalman/enclave
|
https://github.com/jalman/enclave
|
ba03bc0a4753ad6b1cd3d7f5641af8f3001e6e30
|
7afec94bdc71f3a76067723966b2d87594015aca
|
refs/heads/master
| 2016-09-05T13:21:18.583000 | 2013-01-30T04:23:29 | 2013-01-30T04:23:29 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package preSprintBot.utils;
import battlecode.common.MapLocation;
import battlecode.common.RobotController;
import battlecode.common.Team;
public class Utils {
public static RobotController RC;
public static int MAP_WIDTH, MAP_HEIGHT;
public static Team ALLY_TEAM, ENEMY_TEAM;
public static MapLocation ALLY_HQ, ENEMY_HQ;
public static int[] DX = {-1, -1, -1, 0, 0, 1, 1, 1};
public static int[] DY = {-1, 0, 1, -1, 1, -1, 0, 1};
public static void initUtils(RobotController rc) {
RC = rc;
MAP_WIDTH = rc.getMapWidth();
MAP_HEIGHT = rc.getMapHeight();
ALLY_TEAM = rc.getTeam();
ENEMY_TEAM = (ALLY_TEAM == Team.A) ? Team.B : Team.A;
ALLY_HQ = rc.senseHQLocation();
ENEMY_HQ = rc.senseEnemyHQLocation();
}
public static boolean isEnemyMine(Team team) {
return !(team == ALLY_TEAM || team == null);
}
public static boolean isEnemyMine(MapLocation loc) {
return isEnemyMine(RC.senseMine(loc));
}
public static int naiveDistance(MapLocation loc0, MapLocation loc1) {
int dx = Math.abs(loc0.x-loc1.x);
int dy = Math.abs(loc0.y-loc1.y);
return Math.max(dx, dy);
}
public static int mapLocationToInt(MapLocation loc) {
return (loc.x << 16) ^ loc.y;
}
public static final int YMASK = (1 << 16) - 1;
public static MapLocation intToMapLocation(int loc) {
return new MapLocation(loc >> 16, loc & YMASK);
}
/**
* Finds the closest (by naive distance) map location to the target among a set of map locations.
* @param locs The set of map locations.
* @param target The target location.
* @return The closest map location.
*/
public static MapLocation closest(MapLocation[] locs, MapLocation target) {
MapLocation close = null;
int distance = Integer.MAX_VALUE;
for(int i = 0; i < locs.length; i++) {
int d = naiveDistance(locs[i], target);
if(d < distance) {
close = locs[i];
distance = d;
}
}
return close;
}
}
|
UTF-8
|
Java
| 1,918 |
java
|
Utils.java
|
Java
|
[] | null |
[] |
package preSprintBot.utils;
import battlecode.common.MapLocation;
import battlecode.common.RobotController;
import battlecode.common.Team;
public class Utils {
public static RobotController RC;
public static int MAP_WIDTH, MAP_HEIGHT;
public static Team ALLY_TEAM, ENEMY_TEAM;
public static MapLocation ALLY_HQ, ENEMY_HQ;
public static int[] DX = {-1, -1, -1, 0, 0, 1, 1, 1};
public static int[] DY = {-1, 0, 1, -1, 1, -1, 0, 1};
public static void initUtils(RobotController rc) {
RC = rc;
MAP_WIDTH = rc.getMapWidth();
MAP_HEIGHT = rc.getMapHeight();
ALLY_TEAM = rc.getTeam();
ENEMY_TEAM = (ALLY_TEAM == Team.A) ? Team.B : Team.A;
ALLY_HQ = rc.senseHQLocation();
ENEMY_HQ = rc.senseEnemyHQLocation();
}
public static boolean isEnemyMine(Team team) {
return !(team == ALLY_TEAM || team == null);
}
public static boolean isEnemyMine(MapLocation loc) {
return isEnemyMine(RC.senseMine(loc));
}
public static int naiveDistance(MapLocation loc0, MapLocation loc1) {
int dx = Math.abs(loc0.x-loc1.x);
int dy = Math.abs(loc0.y-loc1.y);
return Math.max(dx, dy);
}
public static int mapLocationToInt(MapLocation loc) {
return (loc.x << 16) ^ loc.y;
}
public static final int YMASK = (1 << 16) - 1;
public static MapLocation intToMapLocation(int loc) {
return new MapLocation(loc >> 16, loc & YMASK);
}
/**
* Finds the closest (by naive distance) map location to the target among a set of map locations.
* @param locs The set of map locations.
* @param target The target location.
* @return The closest map location.
*/
public static MapLocation closest(MapLocation[] locs, MapLocation target) {
MapLocation close = null;
int distance = Integer.MAX_VALUE;
for(int i = 0; i < locs.length; i++) {
int d = naiveDistance(locs[i], target);
if(d < distance) {
close = locs[i];
distance = d;
}
}
return close;
}
}
| 1,918 | 0.672054 | 0.655892 | 73 | 25.273973 | 22.465961 | 98 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 2.136986 | false | false |
3
|
15c12aa2f8300ceaaca3546abef0c786a5911e4f
| 18,476,949,317,794 |
a0bc9b85eb577240d1f78b01da9986c75bbd7ddd
|
/com/github/haw/brpd/ad/a04/commands/Print.java
|
0af09ba2dcad7816fadc4fbc7eb3e35d172cfb0c
|
[] |
no_license
|
HAW-AI/AD-2011-A4.3-BRPD
|
https://github.com/HAW-AI/AD-2011-A4.3-BRPD
|
6289d3576767c3b651d1ee753b84173f7e0bf337
|
36cf02365152d7d40237f650ebdfbeff2ee3b169
|
refs/heads/master
| 2021-01-01T18:42:19.424000 | 2011-12-15T14:59:57 | 2011-12-15T14:59:57 | 2,947,992 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.github.haw.brpd.ad.a04.commands;
import com.github.haw.brpd.ad.a04.implementations.Command;
import com.github.haw.brpd.ad.a04.implementations.Program;
import com.github.haw.brpd.ad.a04.interfaces.Enviroment;
public class Print extends Command {
public Print() {
super("P");
}
@Override
public void exec(Enviroment env) {
System.out.println(env.get(Program.SOURCE));
}
}
|
UTF-8
|
Java
| 394 |
java
|
Print.java
|
Java
|
[] | null |
[] |
package com.github.haw.brpd.ad.a04.commands;
import com.github.haw.brpd.ad.a04.implementations.Command;
import com.github.haw.brpd.ad.a04.implementations.Program;
import com.github.haw.brpd.ad.a04.interfaces.Enviroment;
public class Print extends Command {
public Print() {
super("P");
}
@Override
public void exec(Enviroment env) {
System.out.println(env.get(Program.SOURCE));
}
}
| 394 | 0.756345 | 0.736041 | 16 | 23.625 | 22.463512 | 58 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.9375 | false | false |
3
|
b7c8a3f99bb07842523c4c6beccf194533b22c94
| 25,271,587,591,039 |
eebe970f90a5002ad8e5e8bddfd23a4b0db7befc
|
/app/src/main/java/com/hack/idc/ramen/Utils.java
|
641081e51f82f75e95b67b84c72dc854218f30de
|
[] |
no_license
|
alroy214/Ramen
|
https://github.com/alroy214/Ramen
|
4bd9d53fe25df250281971b851c0a2f299674779
|
971ea7a0976a324fae64e0e2675dc59551693abc
|
refs/heads/master
| 2023-05-13T19:32:32.128000 | 2021-06-04T06:23:33 | 2021-06-04T06:23:33 | 373,509,343 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.hack.idc.ramen;
import android.content.Context;
import android.util.Log;
import androidx.annotation.NonNull;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.JsonObjectRequest;
import com.android.volley.toolbox.StringRequest;
import com.android.volley.toolbox.Volley;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import javax.net.ssl.HttpsURLConnection;
public class Utils {
public static JSONObject getJSONObjectFromURL(String urlString) throws IOException, JSONException {
HttpsURLConnection urlConnection = null;
URL url = new URL(urlString);
urlConnection = (HttpsURLConnection) url.openConnection();
urlConnection.setRequestMethod("GET");
urlConnection.setReadTimeout(10000 /* milliseconds */ );
urlConnection.setConnectTimeout(15000 /* milliseconds */ );
urlConnection.setDoOutput(true);
urlConnection.connect();
BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
StringBuilder sb = new StringBuilder();
String line;
while ((line = br.readLine()) != null) {
sb.append(line + "\n");
}
br.close();
String jsonString = sb.toString();
System.out.println("JSON: " + jsonString);
return new JSONObject(jsonString);
}
/*
public static void Test() {
// Instantiate the RequestQueue.
RequestQueue queue = Volley.newRequestQueue(this);
String url ="https://www.google.com";
// Request a string response from the provided URL.
StringRequest stringRequest = new StringRequest(Request.Method.GET, url,
new Response.Listener<String>() {
@Override
public void onResponse(String response) {
// Display the first 500 characters of the response string.
textView.setText("Response is: "+ response.substring(0,500));
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
textView.setText("That didn't work!");
}
});
// Add the request to the RequestQueue.
queue.add(stringRequest);
}*/
}
|
UTF-8
|
Java
| 2,612 |
java
|
Utils.java
|
Java
|
[] | null |
[] |
package com.hack.idc.ramen;
import android.content.Context;
import android.util.Log;
import androidx.annotation.NonNull;
import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.Response;
import com.android.volley.VolleyError;
import com.android.volley.toolbox.JsonObjectRequest;
import com.android.volley.toolbox.StringRequest;
import com.android.volley.toolbox.Volley;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import javax.net.ssl.HttpsURLConnection;
public class Utils {
public static JSONObject getJSONObjectFromURL(String urlString) throws IOException, JSONException {
HttpsURLConnection urlConnection = null;
URL url = new URL(urlString);
urlConnection = (HttpsURLConnection) url.openConnection();
urlConnection.setRequestMethod("GET");
urlConnection.setReadTimeout(10000 /* milliseconds */ );
urlConnection.setConnectTimeout(15000 /* milliseconds */ );
urlConnection.setDoOutput(true);
urlConnection.connect();
BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
StringBuilder sb = new StringBuilder();
String line;
while ((line = br.readLine()) != null) {
sb.append(line + "\n");
}
br.close();
String jsonString = sb.toString();
System.out.println("JSON: " + jsonString);
return new JSONObject(jsonString);
}
/*
public static void Test() {
// Instantiate the RequestQueue.
RequestQueue queue = Volley.newRequestQueue(this);
String url ="https://www.google.com";
// Request a string response from the provided URL.
StringRequest stringRequest = new StringRequest(Request.Method.GET, url,
new Response.Listener<String>() {
@Override
public void onResponse(String response) {
// Display the first 500 characters of the response string.
textView.setText("Response is: "+ response.substring(0,500));
}
}, new Response.ErrorListener() {
@Override
public void onErrorResponse(VolleyError error) {
textView.setText("That didn't work!");
}
});
// Add the request to the RequestQueue.
queue.add(stringRequest);
}*/
}
| 2,612 | 0.662711 | 0.656202 | 79 | 32.075951 | 24.316881 | 103 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.594937 | false | false |
3
|
a7c9fcdf2f01b85241efeaaa8ba901001d2f420b
| 13,228,499,288,969 |
7a650b9dee3ff3adfb3bf6cd8ae049a8dbd7423f
|
/ui/src/main/java/lee/study/down/intercept/HttpDownHandleInterceptFactory.java
|
5da69b49c9057ac6191f624adfdc26bb4cd05995
|
[
"Apache-2.0"
] |
permissive
|
zephyrus9/proxyee-down
|
https://github.com/zephyrus9/proxyee-down
|
215a5674bfcc0a29376b43c23e2a7930f69e5c76
|
6ede8b8194878474d30c642aeece91fa0d44f731
|
refs/heads/master
| 2021-05-02T14:06:15.554000 | 2018-02-08T02:07:04 | 2018-02-08T02:07:04 | 120,713,507 | 2 | 0 | null | true | 2018-02-08T05:04:59 | 2018-02-08T05:04:59 | 2018-02-08T04:43:33 | 2018-02-08T02:07:04 | 2,031 | 0 | 0 | 0 | null | false | null |
package lee.study.down.intercept;
import io.netty.channel.Channel;
import io.netty.handler.codec.http.DefaultLastHttpContent;
import io.netty.handler.codec.http.HttpContent;
import io.netty.handler.codec.http.HttpHeaderNames;
import io.netty.handler.codec.http.HttpHeaders;
import io.netty.handler.codec.http.HttpRequest;
import io.netty.handler.codec.http.HttpResponse;
import io.netty.handler.codec.http.HttpResponseStatus;
import java.net.InetSocketAddress;
import lee.study.down.constant.HttpDownConstant;
import lee.study.down.content.ContentManager;
import lee.study.down.intercept.common.HttpDownInterceptFactory;
import lee.study.down.model.HttpDownInfo;
import lee.study.down.model.TaskInfo;
import lee.study.down.util.HttpDownUtil;
import lee.study.proxyee.intercept.HttpProxyIntercept;
import lee.study.proxyee.intercept.HttpProxyInterceptPipeline;
import lee.study.proxyee.proxy.ProxyConfig;
import lombok.AllArgsConstructor;
@AllArgsConstructor
public class HttpDownHandleInterceptFactory implements HttpDownInterceptFactory {
private int viewPort;
@Override
public HttpProxyIntercept create() {
return new HttpProxyIntercept() {
@Override
public void afterResponse(Channel clientChannel, Channel proxyChannel,
HttpResponse httpResponse,
HttpProxyInterceptPipeline pipeline) throws Exception {
HttpRequest httpRequest = pipeline.getHttpRequest();
ProxyConfig proxyConfig = ContentManager.CONFIG.get().getSecProxyConfig();
TaskInfo taskInfo = HttpDownUtil.getTaskInfo(httpRequest,
httpResponse.headers(),
proxyConfig,
HttpDownConstant.clientSslContext,
HttpDownConstant.clientLoopGroup);
HttpDownInfo httpDownInfo = new HttpDownInfo(taskInfo, httpRequest, proxyConfig);
ContentManager.DOWN.putBoot(httpDownInfo);
HttpHeaders httpHeaders = httpResponse.headers();
httpHeaders.clear();
httpResponse.setStatus(HttpResponseStatus.OK);
httpHeaders.set(HttpHeaderNames.CONTENT_TYPE, "text/html");
String host = ((InetSocketAddress) clientChannel.localAddress()).getHostString();
String js =
"<script>"
+ "window.top.location.href='http://" + host + ":" + viewPort + "/#/tasks/new/"
+ httpDownInfo
.getTaskInfo().getId() + "';"
+ "</script>";
HttpContent content = new DefaultLastHttpContent();
content.content().writeBytes(js.getBytes());
httpHeaders.set(HttpHeaderNames.CONTENT_LENGTH, js.getBytes().length);
clientChannel.writeAndFlush(httpResponse);
clientChannel.writeAndFlush(content);
clientChannel.close();
}
};
}
}
|
UTF-8
|
Java
| 2,748 |
java
|
HttpDownHandleInterceptFactory.java
|
Java
|
[] | null |
[] |
package lee.study.down.intercept;
import io.netty.channel.Channel;
import io.netty.handler.codec.http.DefaultLastHttpContent;
import io.netty.handler.codec.http.HttpContent;
import io.netty.handler.codec.http.HttpHeaderNames;
import io.netty.handler.codec.http.HttpHeaders;
import io.netty.handler.codec.http.HttpRequest;
import io.netty.handler.codec.http.HttpResponse;
import io.netty.handler.codec.http.HttpResponseStatus;
import java.net.InetSocketAddress;
import lee.study.down.constant.HttpDownConstant;
import lee.study.down.content.ContentManager;
import lee.study.down.intercept.common.HttpDownInterceptFactory;
import lee.study.down.model.HttpDownInfo;
import lee.study.down.model.TaskInfo;
import lee.study.down.util.HttpDownUtil;
import lee.study.proxyee.intercept.HttpProxyIntercept;
import lee.study.proxyee.intercept.HttpProxyInterceptPipeline;
import lee.study.proxyee.proxy.ProxyConfig;
import lombok.AllArgsConstructor;
@AllArgsConstructor
public class HttpDownHandleInterceptFactory implements HttpDownInterceptFactory {
private int viewPort;
@Override
public HttpProxyIntercept create() {
return new HttpProxyIntercept() {
@Override
public void afterResponse(Channel clientChannel, Channel proxyChannel,
HttpResponse httpResponse,
HttpProxyInterceptPipeline pipeline) throws Exception {
HttpRequest httpRequest = pipeline.getHttpRequest();
ProxyConfig proxyConfig = ContentManager.CONFIG.get().getSecProxyConfig();
TaskInfo taskInfo = HttpDownUtil.getTaskInfo(httpRequest,
httpResponse.headers(),
proxyConfig,
HttpDownConstant.clientSslContext,
HttpDownConstant.clientLoopGroup);
HttpDownInfo httpDownInfo = new HttpDownInfo(taskInfo, httpRequest, proxyConfig);
ContentManager.DOWN.putBoot(httpDownInfo);
HttpHeaders httpHeaders = httpResponse.headers();
httpHeaders.clear();
httpResponse.setStatus(HttpResponseStatus.OK);
httpHeaders.set(HttpHeaderNames.CONTENT_TYPE, "text/html");
String host = ((InetSocketAddress) clientChannel.localAddress()).getHostString();
String js =
"<script>"
+ "window.top.location.href='http://" + host + ":" + viewPort + "/#/tasks/new/"
+ httpDownInfo
.getTaskInfo().getId() + "';"
+ "</script>";
HttpContent content = new DefaultLastHttpContent();
content.content().writeBytes(js.getBytes());
httpHeaders.set(HttpHeaderNames.CONTENT_LENGTH, js.getBytes().length);
clientChannel.writeAndFlush(httpResponse);
clientChannel.writeAndFlush(content);
clientChannel.close();
}
};
}
}
| 2,748 | 0.727438 | 0.727438 | 65 | 41.276924 | 23.813705 | 95 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.784615 | false | false |
3
|
04c386e2071ce4413d333af06614eb325eb3c64b
| 8,615,704,414,842 |
80271664f37abc72bc022fe24bfc01ed290bcbe4
|
/e3-manager/e3-manager-interface/src/main/java/cn/e3mall/service/JedisClient.java
|
d7db24e697345b5f07bb0e9e5c3fc23750e0072a
|
[] |
no_license
|
benzford/e3mall-49
|
https://github.com/benzford/e3mall-49
|
61d5379850cf26268bb09801bca6fe2e252af2ad
|
4bceeef24ab008c9b61cd2461d39f408f7f36b92
|
refs/heads/master
| 2020-03-29T06:38:43.564000 | 2017-06-18T01:29:00 | 2017-06-18T01:29:00 | 94,658,712 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
/**
*
*/
package cn.e3mall.service;
/**
* @author hasee
*
*/
public interface JedisClient {
/**
* <b>Description:</b><br>
* @param
* @return String
* @param key
* @return
* @Note
* <b>Author:</b> chaonianye
* <br><b>Date:</b> 2017年6月4日 下午7:15:00
* <br><b>Version:</b> 1.0
*/
String get(String key);
/**
* <b>Description:</b><br>
* @param
* @return String
* @param key
* @param value
* @return
* @Note
* <b>Author:</b> chaonianye
* <br><b>Date:</b> 2017年6月4日 下午7:16:11
* <br><b>Version:</b> 1.0
*/
String set(String key, String value);
/**
* <b>Description:</b><br>
* @param
* @return long
* @param key
* @param seconds
* @return
* @Note
* <b>Author:</b> chaonianye
* <br><b>Date:</b> 2017年6月4日 下午7:18:01
* <br><b>Version:</b> 1.0
*/
long expire(String key, int seconds);
/**
* <b>Description:</b><br>
* @param
* @return boolean
* @param key
* @return
* @Note
* <b>Author:</b> chaonianye
* <br><b>Date:</b> 2017年6月4日 下午7:19:33
* <br><b>Version:</b> 1.0
*/
boolean exists(String key);
/**
* <b>Description:</b><br>
* @param
* @return long
* @param key
* @return
* @Note
* <b>Author:</b> chaonianye
* <br><b>Date:</b> 2017年6月4日 下午7:20:39
* <br><b>Version:</b> 1.0
*/
long ttl(String key);
/**
* <b>Description:</b><br>
* @param
* @return long
* @param key
* @param field
* @param value
* @return
* @Note
* <b>Author:</b> chaonianye
* <br><b>Date:</b> 2017年6月4日 下午7:22:26
* <br><b>Version:</b> 1.0
*/
long hset(String key, String field, String value);
/**
* <b>Description:</b><br>
* @param
* @return String
* @param key
* @param field
* @return
* @Note
* <b>Author:</b> chaonianye
* <br><b>Date:</b> 2017年6月4日 下午7:23:19
* <br><b>Version:</b> 1.0
*/
String hget(String key, String field);
/**
* <b>Description:</b><br>
* @param
* @return long
* @param key
* @return
* @Note
* <b>Author:</b> chaonianye
* <br><b>Date:</b> 2017年6月4日 下午7:26:28
* <br><b>Version:</b> 1.0
*/
long incr(String key);
/**
* <b>Description:</b><br>
* @param
* @return long
* @param key
* @param fields
* @return
* @Note
* <b>Author:</b> chaonianye
* <br><b>Date:</b> 2017年6月4日 下午7:27:46
* <br><b>Version:</b> 1.0
*/
long hdel(String key, String... fields);
}
|
UTF-8
|
Java
| 2,495 |
java
|
JedisClient.java
|
Java
|
[
{
"context": " */\r\npackage cn.e3mall.service;\r\n\r\n/**\r\n * @author hasee\r\n *\r\n */\r\npublic interface JedisClient {\r\n\r\n\t/**\r",
"end": 66,
"score": 0.9997362494468689,
"start": 61,
"tag": "USERNAME",
"value": "hasee"
},
{
"context": "param key\r\n\t* @return\r\n\t* @Note\r\n\t* <b>Author:</b> chaonianye\r\n\t* <br><b>Date:</b> 2017年6月4日 下午7:15:00\r\n\t* <br>",
"end": 241,
"score": 0.9997295141220093,
"start": 231,
"tag": "USERNAME",
"value": "chaonianye"
},
{
"context": "ram value\r\n\t* @return\r\n\t* @Note\r\n\t* <b>Author:</b> chaonianye\r\n\t* <br><b>Date:</b> 2017年6月4日 下午7:16:11\r\n\t* <br>",
"end": 492,
"score": 0.9997401237487793,
"start": 482,
"tag": "USERNAME",
"value": "chaonianye"
},
{
"context": "m seconds\r\n\t* @return\r\n\t* @Note\r\n\t* <b>Author:</b> chaonianye\r\n\t* <br><b>Date:</b> 2017年6月4日 下午7:18:01\r\n\t* <br>",
"end": 757,
"score": 0.9997045993804932,
"start": 747,
"tag": "USERNAME",
"value": "chaonianye"
},
{
"context": "param key\r\n\t* @return\r\n\t* @Note\r\n\t* <b>Author:</b> chaonianye\r\n\t* <br><b>Date:</b> 2017年6月4日 下午7:19:33\r\n\t* <br>",
"end": 1006,
"score": 0.9997344017028809,
"start": 996,
"tag": "USERNAME",
"value": "chaonianye"
},
{
"context": "param key\r\n\t* @return\r\n\t* @Note\r\n\t* <b>Author:</b> chaonianye\r\n\t* <br><b>Date:</b> 2017年6月4日 下午7:20:39\r\n\t* <br>",
"end": 1242,
"score": 0.9996911287307739,
"start": 1232,
"tag": "USERNAME",
"value": "chaonianye"
},
{
"context": "ram value\r\n\t* @return\r\n\t* @Note\r\n\t* <b>Author:</b> chaonianye\r\n\t* <br><b>Date:</b> 2017年6月4日 下午7:22:26\r\n\t* <br>",
"end": 1506,
"score": 0.999703049659729,
"start": 1496,
"tag": "USERNAME",
"value": "chaonianye"
},
{
"context": "ram field\r\n\t* @return\r\n\t* @Note\r\n\t* <b>Author:</b> chaonianye\r\n\t* <br><b>Date:</b> 2017年6月4日 下午7:23:19\r\n\t* <br>",
"end": 1784,
"score": 0.9996073842048645,
"start": 1774,
"tag": "USERNAME",
"value": "chaonianye"
},
{
"context": "param key\r\n\t* @return\r\n\t* @Note\r\n\t* <b>Author:</b> chaonianye\r\n\t* <br><b>Date:</b> 2017年6月4日 下午7:26:28\r\n\t* <br>",
"end": 2031,
"score": 0.9996716380119324,
"start": 2021,
"tag": "USERNAME",
"value": "chaonianye"
},
{
"context": "am fields\r\n\t* @return\r\n\t* @Note\r\n\t* <b>Author:</b> chaonianye\r\n\t* <br><b>Date:</b> 2017年6月4日 下午7:27:46\r\n\t* <br>",
"end": 2280,
"score": 0.9997307062149048,
"start": 2270,
"tag": "USERNAME",
"value": "chaonianye"
}
] | null |
[] |
/**
*
*/
package cn.e3mall.service;
/**
* @author hasee
*
*/
public interface JedisClient {
/**
* <b>Description:</b><br>
* @param
* @return String
* @param key
* @return
* @Note
* <b>Author:</b> chaonianye
* <br><b>Date:</b> 2017年6月4日 下午7:15:00
* <br><b>Version:</b> 1.0
*/
String get(String key);
/**
* <b>Description:</b><br>
* @param
* @return String
* @param key
* @param value
* @return
* @Note
* <b>Author:</b> chaonianye
* <br><b>Date:</b> 2017年6月4日 下午7:16:11
* <br><b>Version:</b> 1.0
*/
String set(String key, String value);
/**
* <b>Description:</b><br>
* @param
* @return long
* @param key
* @param seconds
* @return
* @Note
* <b>Author:</b> chaonianye
* <br><b>Date:</b> 2017年6月4日 下午7:18:01
* <br><b>Version:</b> 1.0
*/
long expire(String key, int seconds);
/**
* <b>Description:</b><br>
* @param
* @return boolean
* @param key
* @return
* @Note
* <b>Author:</b> chaonianye
* <br><b>Date:</b> 2017年6月4日 下午7:19:33
* <br><b>Version:</b> 1.0
*/
boolean exists(String key);
/**
* <b>Description:</b><br>
* @param
* @return long
* @param key
* @return
* @Note
* <b>Author:</b> chaonianye
* <br><b>Date:</b> 2017年6月4日 下午7:20:39
* <br><b>Version:</b> 1.0
*/
long ttl(String key);
/**
* <b>Description:</b><br>
* @param
* @return long
* @param key
* @param field
* @param value
* @return
* @Note
* <b>Author:</b> chaonianye
* <br><b>Date:</b> 2017年6月4日 下午7:22:26
* <br><b>Version:</b> 1.0
*/
long hset(String key, String field, String value);
/**
* <b>Description:</b><br>
* @param
* @return String
* @param key
* @param field
* @return
* @Note
* <b>Author:</b> chaonianye
* <br><b>Date:</b> 2017年6月4日 下午7:23:19
* <br><b>Version:</b> 1.0
*/
String hget(String key, String field);
/**
* <b>Description:</b><br>
* @param
* @return long
* @param key
* @return
* @Note
* <b>Author:</b> chaonianye
* <br><b>Date:</b> 2017年6月4日 下午7:26:28
* <br><b>Version:</b> 1.0
*/
long incr(String key);
/**
* <b>Description:</b><br>
* @param
* @return long
* @param key
* @param fields
* @return
* @Note
* <b>Author:</b> chaonianye
* <br><b>Date:</b> 2017年6月4日 下午7:27:46
* <br><b>Version:</b> 1.0
*/
long hdel(String key, String... fields);
}
| 2,495 | 0.535135 | 0.486071 | 135 | 15.814815 | 12.257838 | 51 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.97037 | false | false |
3
|
1c409ca5f7d0ab60f574859820e494971a69305d
| 33,595,234,208,736 |
02d2a2df629ee9a16a137002124e339f2c0543e3
|
/app/src/main/java/com/example/projetoformulario/Model/TipoCampos.java
|
36e46c1a191de124b222dc36acac43deba4c9ea5
|
[] |
no_license
|
HiagoVenancio/form_dinamico
|
https://github.com/HiagoVenancio/form_dinamico
|
384fdb181923a720044646f720a8ad4d3210e6dc
|
d184d830d81dbf82bbb99c70af38d023c9ec0abe
|
refs/heads/master
| 2020-05-27T18:59:13.630000 | 2019-05-27T01:54:32 | 2019-05-27T01:54:32 | 188,752,767 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.example.projetoformulario.Model;
import java.io.Serializable;
public class TipoCampos implements Serializable {
private int id;
private int type;
private String message;
private Integer typeField;
private boolean hidden;
private double topSpacing;
private Integer show;
private boolean required;
public TipoCampos(int id, int type, String message, Integer typeField, boolean hidden, double topSpacing, Integer show, boolean required) {
this.id = id;
this.type = type;
this.message = message;
this.typeField = typeField;
this.hidden = hidden;
this.topSpacing = topSpacing;
this.show = show;
this.required = required;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public int getTypeField() {
return typeField;
}
public void setTypeField(int typeField) {
this.typeField = typeField;
}
public boolean isHidden() {
return hidden;
}
public void setHidden(boolean hidden) {
this.hidden = hidden;
}
public double getTopSpacing() {
return topSpacing;
}
public void setTopSpacing(double topSpacing) {
this.topSpacing = topSpacing;
}
public Integer getShow() {
return show;
}
public void setShow(Integer show) {
this.show = show;
}
public boolean isRequired() {
return required;
}
public void setRequired(boolean required) {
this.required = required;
}
}
|
UTF-8
|
Java
| 1,875 |
java
|
TipoCampos.java
|
Java
|
[] | null |
[] |
package com.example.projetoformulario.Model;
import java.io.Serializable;
public class TipoCampos implements Serializable {
private int id;
private int type;
private String message;
private Integer typeField;
private boolean hidden;
private double topSpacing;
private Integer show;
private boolean required;
public TipoCampos(int id, int type, String message, Integer typeField, boolean hidden, double topSpacing, Integer show, boolean required) {
this.id = id;
this.type = type;
this.message = message;
this.typeField = typeField;
this.hidden = hidden;
this.topSpacing = topSpacing;
this.show = show;
this.required = required;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getType() {
return type;
}
public void setType(int type) {
this.type = type;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public int getTypeField() {
return typeField;
}
public void setTypeField(int typeField) {
this.typeField = typeField;
}
public boolean isHidden() {
return hidden;
}
public void setHidden(boolean hidden) {
this.hidden = hidden;
}
public double getTopSpacing() {
return topSpacing;
}
public void setTopSpacing(double topSpacing) {
this.topSpacing = topSpacing;
}
public Integer getShow() {
return show;
}
public void setShow(Integer show) {
this.show = show;
}
public boolean isRequired() {
return required;
}
public void setRequired(boolean required) {
this.required = required;
}
}
| 1,875 | 0.608 | 0.608 | 91 | 19.604395 | 20.041649 | 143 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.450549 | false | false |
3
|
a200cd1b90e4c160539528d270672e085ceb67f5
| 23,630,910,084,413 |
26262a6f28281722b457999e71c73f27fd15a98e
|
/src/betting/exchange/test/PriceLadderMapImplTest.java
|
4492f11d2eee030e9f16384bb5b928554e021aca
|
[] |
no_license
|
Milwyr/Java-Collection
|
https://github.com/Milwyr/Java-Collection
|
05ef964bd8632d12a1b20176c4491574a2c8ee74
|
6fef145b192e42db5b081bb21d42c226ed152944
|
refs/heads/master
| 2021-01-15T15:31:42.675000 | 2016-10-18T13:47:06 | 2016-10-18T13:47:06 | 48,263,687 | 1 | 0 | null | false | 2016-05-20T12:42:17 | 2015-12-19T01:14:17 | 2016-05-20T12:40:30 | 2016-05-20T12:42:16 | 294 | 0 | 0 | 0 |
Java
| null | null |
package betting.exchange.test;
import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;
import betting.exchange.concrete.PriceLadderMapImpl;
public class PriceLadderMapImplTest {
private PriceLadderMapImpl ladderMap;
@Before
public void setUp() {
ladderMap = new PriceLadderMapImpl();
ladderMap.pool(3, 2);
ladderMap.pool(4, 5);
ladderMap.pool(5, 3);
ladderMap.pool(6, 1);
}
@Test
public void testSpend() {
assertEquals(0, ladderMap.spend(9, 6));
assertEquals(4, ladderMap.spend(5, 10));
assertEquals(6, ladderMap.spend(3, 6));
assertEquals(1, ladderMap.spend(2, 10));
assertTrue(ladderMap.isEmpty());
}
@Test
public void testCancel() {
assertEquals(0, ladderMap.cancel(9, 3));
assertEquals(3, ladderMap.cancel(4, 3));
assertEquals(2, ladderMap.cancel(4, 3));
assertEquals(0, ladderMap.cancel(4, 3));
assertEquals(2, ladderMap.get(3).getVolume());
assertEquals(3, ladderMap.get(5).getVolume());
assertEquals(1, ladderMap.get(6).getVolume());
}
}
|
UTF-8
|
Java
| 1,023 |
java
|
PriceLadderMapImplTest.java
|
Java
|
[] | null |
[] |
package betting.exchange.test;
import static org.junit.Assert.*;
import org.junit.Before;
import org.junit.Test;
import betting.exchange.concrete.PriceLadderMapImpl;
public class PriceLadderMapImplTest {
private PriceLadderMapImpl ladderMap;
@Before
public void setUp() {
ladderMap = new PriceLadderMapImpl();
ladderMap.pool(3, 2);
ladderMap.pool(4, 5);
ladderMap.pool(5, 3);
ladderMap.pool(6, 1);
}
@Test
public void testSpend() {
assertEquals(0, ladderMap.spend(9, 6));
assertEquals(4, ladderMap.spend(5, 10));
assertEquals(6, ladderMap.spend(3, 6));
assertEquals(1, ladderMap.spend(2, 10));
assertTrue(ladderMap.isEmpty());
}
@Test
public void testCancel() {
assertEquals(0, ladderMap.cancel(9, 3));
assertEquals(3, ladderMap.cancel(4, 3));
assertEquals(2, ladderMap.cancel(4, 3));
assertEquals(0, ladderMap.cancel(4, 3));
assertEquals(2, ladderMap.get(3).getVolume());
assertEquals(3, ladderMap.get(5).getVolume());
assertEquals(1, ladderMap.get(6).getVolume());
}
}
| 1,023 | 0.714565 | 0.675464 | 43 | 22.813953 | 17.962824 | 52 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 2.093023 | false | false |
3
|
f40b3d8c0deb58a26bfe9714a1009101f6f13f19
| 5,360,119,213,397 |
ce1af21c1e14e7895eedf33118f0e84ab6dbdd0c
|
/src/main/java/com/mvnikitin/lesson6/Lesson6.java
|
3f518c7255d3517e06490d07cfc09471e3d52872
|
[] |
no_license
|
mnikitin77/JavaProfessional
|
https://github.com/mnikitin77/JavaProfessional
|
7795f5fd0422d5927659fd2d49b05c7809a5fba6
|
4c40ab166e3eb1fdd6ea5ecf296807c4cce67ada
|
refs/heads/master
| 2020-07-20T13:13:03.015000 | 2019-09-11T07:23:58 | 2019-09-11T07:23:58 | 203,235,475 | 0 | 0 | null | false | 2019-09-05T17:05:48 | 2019-08-19T19:20:24 | 2019-09-02T19:22:15 | 2019-09-05T17:05:48 | 375 | 0 | 0 | 0 |
Java
| false | false |
package com.mvnikitin.lesson6;
import java.util.Arrays;
public class Lesson6 {
public int[] processArray(int[] source, int neededDigit) throws RuntimeException {
String errorMessage = "Входной массив должен содержать хотя бы один элемент со значением 4.";
if(source == null)
throw new RuntimeException(errorMessage);
int indexOfLastFound = -1;
for (int i = 0; i < source.length; i++) {
if (source[i] == neededDigit) {
indexOfLastFound = i;
}
}
if (indexOfLastFound == -1)
throw new RuntimeException(errorMessage);
return indexOfLastFound == source.length - 1 ? null :
Arrays.copyOfRange(
source, indexOfLastFound + 1, source.length);
}
public boolean isArrayContainDigit(int[] array, int[] digits) {
for(int i = 0; i < array.length; i++) {
for (int j = 0; j < digits.length; j++) {
if (array[i] == digits[j]) {
return true;
}
}
}
return false;
}
}
|
UTF-8
|
Java
| 1,191 |
java
|
Lesson6.java
|
Java
|
[] | null |
[] |
package com.mvnikitin.lesson6;
import java.util.Arrays;
public class Lesson6 {
public int[] processArray(int[] source, int neededDigit) throws RuntimeException {
String errorMessage = "Входной массив должен содержать хотя бы один элемент со значением 4.";
if(source == null)
throw new RuntimeException(errorMessage);
int indexOfLastFound = -1;
for (int i = 0; i < source.length; i++) {
if (source[i] == neededDigit) {
indexOfLastFound = i;
}
}
if (indexOfLastFound == -1)
throw new RuntimeException(errorMessage);
return indexOfLastFound == source.length - 1 ? null :
Arrays.copyOfRange(
source, indexOfLastFound + 1, source.length);
}
public boolean isArrayContainDigit(int[] array, int[] digits) {
for(int i = 0; i < array.length; i++) {
for (int j = 0; j < digits.length; j++) {
if (array[i] == digits[j]) {
return true;
}
}
}
return false;
}
}
| 1,191 | 0.533921 | 0.52511 | 41 | 26.682926 | 26.186422 | 101 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.487805 | false | false |
3
|
2232fc8dc62aaa91c9d870b6e0774e8d8f37ba08
| 26,482,768,366,388 |
3efb00fe346779b63b0f494cb01b85daa6d7f32b
|
/src/main/java/com/jspringbot/selenium/extension/FirefoxOptionsBean.java
|
82b1e4ea5400b4d9021fec811118e6c5818aeeeb
|
[] |
no_license
|
robertdeocampojr/jspringbot-selenium-extension
|
https://github.com/robertdeocampojr/jspringbot-selenium-extension
|
22013f521ce531a5f86e91883e0f9d6b9de90d04
|
373a99ad400620f480ce61b9e8e1b14e0955ad7b
|
refs/heads/master
| 2022-10-05T05:39:21.513000 | 2019-08-16T01:45:38 | 2019-08-16T01:45:38 | 99,411,533 | 0 | 3 | null | false | 2022-07-29T19:16:31 | 2017-08-05T08:59:57 | 2019-08-16T01:46:19 | 2022-07-29T19:16:30 | 6,722 | 0 | 1 | 5 |
Java
| false | false |
package com.jspringbot.selenium.extension;
import com.google.common.io.Files;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.jspringbot.keyword.selenium.OsCheck;
import org.openqa.selenium.firefox.FirefoxOptions;
import org.openqa.selenium.firefox.FirefoxProfile;
import org.rauschig.jarchivelib.*;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.core.io.Resource;
import java.io.*;
import java.util.Map;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
public class FirefoxOptionsBean implements InitializingBean, DisposableBean {
private static final Logger LOGGER = Logger.getLogger(FirefoxOptionsBean.class);
private FirefoxOptions options;
private File baseDir;
private String geckoDriverVersion;
private File tempDir;
private File geckoDriverFile;
public void destroy() throws Exception {
if (this.geckoDriverFile != null && this.geckoDriverFile.isFile() && this.geckoDriverFile.isFile()) {
this.geckoDriverFile.delete();
}
if (this.tempDir != null && this.tempDir.isDirectory()) {
this.tempDir.delete();
}
}
public void afterPropertiesSet() throws Exception {
}
public FirefoxOptionsBean(FirefoxOptions options) {
this.options = options;
}
public void setFirefoxProfile(FirefoxProfile profile) {
options.setProfile(profile);
}
public void setIsHeadless(boolean isHeadless) {
options.setHeadless(isHeadless);
}
public void setGeckoDriverVersion(String geckoDriverVersion) {
this.geckoDriverVersion = geckoDriverVersion;
}
private File createDriverDir() {
File driverDir;
if (this.baseDir != null) {
driverDir = this.baseDir;
} else {
String userHome = System.getProperty("user.home");
driverDir = new File(userHome, "jspringbot");
if (!driverDir.isDirectory()) {
driverDir.mkdirs();
LOGGER.info("Created Driver Directory: " + driverDir.getAbsolutePath());
}
}
return driverDir;
}
public void setBaseDir(String baseStrDir) {
if (StringUtils.isNotBlank(baseStrDir) && !StringUtils.equalsIgnoreCase(baseStrDir, "none")) {
this.baseDir = new File(baseStrDir);
if (!this.baseDir.isDirectory()) {
this.baseDir.mkdirs();
LOGGER.info("Base Directory: " + this.baseDir.getAbsolutePath());
}
}
}
public void setGeckoDrivers(Map<OsCheck.OSType, Resource> geckoDrivers) throws IOException {
LOGGER.info("Setting Gecko Driver");
OsCheck.OSType osType = OsCheck.getOperatingSystemType();
Resource geckoDriver = (Resource)geckoDrivers.get(osType);
if (geckoDriver == null) {
LOGGER.info("Unsupported OS");
throw new IllegalArgumentException("Unsupported OS " + osType.name());
} else {
File driverDir = this.createDriverDir();
File downloadedFile = new File(driverDir, geckoDriver.getFilename());
if (!downloadedFile.isFile()) {
LOGGER.info("Download Gecko driver version: " + this.geckoDriverVersion);
LOGGER.info("Downloading driver: " + geckoDriver.getURL());
IOUtils.copy(geckoDriver.getInputStream(), new FileOutputStream(downloadedFile));
}
LOGGER.info("Gecko driver file: " + downloadedFile.getAbsolutePath());
System.out.println("Gecko Raw File: " + downloadedFile.getAbsolutePath());
this.tempDir = Files.createTempDir();
System.out.println("Temp Folder: " + tempDir);
File archive = new File(downloadedFile.getAbsolutePath());
File destination = new File(tempDir + "/");
this.geckoDriverFile = new File(destination.getAbsolutePath() + "/geckodriver");
System.out.println(geckoDriverFile.getAbsolutePath());
Archiver archiver = ArchiverFactory.createArchiver("tar", "gz");
archiver.extract(archive, destination);
System.setProperty("webdriver.gecko.driver", geckoDriverFile.getAbsolutePath());
}
}
public static File unzip(InputStream in, File dir) throws IOException {
ZipInputStream zin = null;
byte[] buf = new byte[2048];
File entryFile = null;
try {
zin = new ZipInputStream(in);
ZipEntry entry;
while((entry = zin.getNextEntry()) != null) {
FileOutputStream out = null;
entryFile = new File(dir, entry.getName());
try {
out = new FileOutputStream(entryFile);
int len;
while((len = zin.read(buf)) > 0) {
out.write(buf, 0, len);
}
} finally {
IOUtils.closeQuietly(out);
}
}
} finally {
IOUtils.closeQuietly(in);
IOUtils.closeQuietly(zin);
}
return entryFile;
}
}
|
UTF-8
|
Java
| 5,335 |
java
|
FirefoxOptionsBean.java
|
Java
|
[
{
"context": "me\");\n driverDir = new File(userHome, \"jspringbot\");\n if (!driverDir.isDirectory()) {\n ",
"end": 2064,
"score": 0.9940475821495056,
"start": 2054,
"tag": "USERNAME",
"value": "jspringbot"
}
] | null |
[] |
package com.jspringbot.selenium.extension;
import com.google.common.io.Files;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.log4j.Logger;
import org.jspringbot.keyword.selenium.OsCheck;
import org.openqa.selenium.firefox.FirefoxOptions;
import org.openqa.selenium.firefox.FirefoxProfile;
import org.rauschig.jarchivelib.*;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.core.io.Resource;
import java.io.*;
import java.util.Map;
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
public class FirefoxOptionsBean implements InitializingBean, DisposableBean {
private static final Logger LOGGER = Logger.getLogger(FirefoxOptionsBean.class);
private FirefoxOptions options;
private File baseDir;
private String geckoDriverVersion;
private File tempDir;
private File geckoDriverFile;
public void destroy() throws Exception {
if (this.geckoDriverFile != null && this.geckoDriverFile.isFile() && this.geckoDriverFile.isFile()) {
this.geckoDriverFile.delete();
}
if (this.tempDir != null && this.tempDir.isDirectory()) {
this.tempDir.delete();
}
}
public void afterPropertiesSet() throws Exception {
}
public FirefoxOptionsBean(FirefoxOptions options) {
this.options = options;
}
public void setFirefoxProfile(FirefoxProfile profile) {
options.setProfile(profile);
}
public void setIsHeadless(boolean isHeadless) {
options.setHeadless(isHeadless);
}
public void setGeckoDriverVersion(String geckoDriverVersion) {
this.geckoDriverVersion = geckoDriverVersion;
}
private File createDriverDir() {
File driverDir;
if (this.baseDir != null) {
driverDir = this.baseDir;
} else {
String userHome = System.getProperty("user.home");
driverDir = new File(userHome, "jspringbot");
if (!driverDir.isDirectory()) {
driverDir.mkdirs();
LOGGER.info("Created Driver Directory: " + driverDir.getAbsolutePath());
}
}
return driverDir;
}
public void setBaseDir(String baseStrDir) {
if (StringUtils.isNotBlank(baseStrDir) && !StringUtils.equalsIgnoreCase(baseStrDir, "none")) {
this.baseDir = new File(baseStrDir);
if (!this.baseDir.isDirectory()) {
this.baseDir.mkdirs();
LOGGER.info("Base Directory: " + this.baseDir.getAbsolutePath());
}
}
}
public void setGeckoDrivers(Map<OsCheck.OSType, Resource> geckoDrivers) throws IOException {
LOGGER.info("Setting Gecko Driver");
OsCheck.OSType osType = OsCheck.getOperatingSystemType();
Resource geckoDriver = (Resource)geckoDrivers.get(osType);
if (geckoDriver == null) {
LOGGER.info("Unsupported OS");
throw new IllegalArgumentException("Unsupported OS " + osType.name());
} else {
File driverDir = this.createDriverDir();
File downloadedFile = new File(driverDir, geckoDriver.getFilename());
if (!downloadedFile.isFile()) {
LOGGER.info("Download Gecko driver version: " + this.geckoDriverVersion);
LOGGER.info("Downloading driver: " + geckoDriver.getURL());
IOUtils.copy(geckoDriver.getInputStream(), new FileOutputStream(downloadedFile));
}
LOGGER.info("Gecko driver file: " + downloadedFile.getAbsolutePath());
System.out.println("Gecko Raw File: " + downloadedFile.getAbsolutePath());
this.tempDir = Files.createTempDir();
System.out.println("Temp Folder: " + tempDir);
File archive = new File(downloadedFile.getAbsolutePath());
File destination = new File(tempDir + "/");
this.geckoDriverFile = new File(destination.getAbsolutePath() + "/geckodriver");
System.out.println(geckoDriverFile.getAbsolutePath());
Archiver archiver = ArchiverFactory.createArchiver("tar", "gz");
archiver.extract(archive, destination);
System.setProperty("webdriver.gecko.driver", geckoDriverFile.getAbsolutePath());
}
}
public static File unzip(InputStream in, File dir) throws IOException {
ZipInputStream zin = null;
byte[] buf = new byte[2048];
File entryFile = null;
try {
zin = new ZipInputStream(in);
ZipEntry entry;
while((entry = zin.getNextEntry()) != null) {
FileOutputStream out = null;
entryFile = new File(dir, entry.getName());
try {
out = new FileOutputStream(entryFile);
int len;
while((len = zin.read(buf)) > 0) {
out.write(buf, 0, len);
}
} finally {
IOUtils.closeQuietly(out);
}
}
} finally {
IOUtils.closeQuietly(in);
IOUtils.closeQuietly(zin);
}
return entryFile;
}
}
| 5,335 | 0.620431 | 0.619119 | 159 | 32.553459 | 28.437651 | 109 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.540881 | false | false |
3
|
fc89786dde3c470d36e0a9dd4e3892b1fd5417aa
| 13,864,154,459,446 |
71e26241ad26e2f86744738a790bc7c853b938c2
|
/spring-boot-learn-rpc/src/main/java/spring/boot/learn/rpc/demo/IService.java
|
901105e6b4c39e854764f24180dcc5be6964c9da
|
[] |
no_license
|
franklions/spring-boot-learn
|
https://github.com/franklions/spring-boot-learn
|
4a22ed6e0ddea666a0f819eebc60c296fd0c4e2e
|
2054cd41ed61668116ef045351e561f06addb84e
|
refs/heads/master
| 2022-11-29T08:48:06.345000 | 2021-07-20T02:34:47 | 2021-07-20T02:34:47 | 93,715,621 | 1 | 0 | null | false | 2022-11-15T23:27:07 | 2017-06-08T06:37:06 | 2021-07-20T02:34:56 | 2022-11-15T23:27:06 | 676 | 1 | 0 | 15 |
Java
| false | false |
package spring.boot.learn.rpc.demo;
import java.rmi.Remote;
import java.rmi.RemoteException;
/**
* @author flsh
* @version 1.0
* @description
* @date 2018/1/15
* @since Jdk 1.8
*/
public interface IService extends Remote {
public String queryName(String no) throws RemoteException;
}
|
UTF-8
|
Java
| 296 |
java
|
IService.java
|
Java
|
[
{
"context": ";\nimport java.rmi.RemoteException;\n\n/**\n * @author flsh\n * @version 1.0\n * @description\n * @date 2018/1/1",
"end": 114,
"score": 0.9996510744094849,
"start": 110,
"tag": "USERNAME",
"value": "flsh"
}
] | null |
[] |
package spring.boot.learn.rpc.demo;
import java.rmi.Remote;
import java.rmi.RemoteException;
/**
* @author flsh
* @version 1.0
* @description
* @date 2018/1/15
* @since Jdk 1.8
*/
public interface IService extends Remote {
public String queryName(String no) throws RemoteException;
}
| 296 | 0.719595 | 0.682432 | 15 | 18.733334 | 17.183195 | 62 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.266667 | false | false |
3
|
a5558e3370781163e2353052895fc12b83627729
| 17,600,776,044,374 |
388cb7bd103fa72ba4e08698af5187bbe0bab1dd
|
/Finding factors is real hard/Main.java
|
064cfccdfa814cc8423acf16741efceb47b78dd9
|
[] |
no_license
|
rajchohil/Playground
|
https://github.com/rajchohil/Playground
|
fd33b982a4a6bf832050a3cf2f20abbfeb98c58f
|
abbc429cac3dbe5b6670ca75a55731e4ba1eae11
|
refs/heads/master
| 2022-12-08T15:18:33.228000 | 2020-08-31T13:50:46 | 2020-08-31T13:50:46 | 276,634,949 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
#include<bits/stdc++.h>
#include<math.h>
#define int long long int
using namespace std;
int32_t main()
{
int n;
cin>>n;
vector<int> v;
for(int i=1;i<=sqrt(n);i++)
{ if(n%i==0)
{
cout<<i<<" ";
if(n/i!=i)
v.push_back(n/i);
}
}
for(auto it=v.end()-1;it>=v.begin();it--)
cout<<*it<<" ";
return 0;
}
|
UTF-8
|
Java
| 358 |
java
|
Main.java
|
Java
|
[] | null |
[] |
#include<bits/stdc++.h>
#include<math.h>
#define int long long int
using namespace std;
int32_t main()
{
int n;
cin>>n;
vector<int> v;
for(int i=1;i<=sqrt(n);i++)
{ if(n%i==0)
{
cout<<i<<" ";
if(n/i!=i)
v.push_back(n/i);
}
}
for(auto it=v.end()-1;it>=v.begin();it--)
cout<<*it<<" ";
return 0;
}
| 358 | 0.477654 | 0.460894 | 22 | 15.318182 | 10.150621 | 43 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.545455 | false | false |
3
|
349b05f643092cf49b8fed0577c6f6adcfc5fc2f
| 7,129,645,726,253 |
a3431328f7377133c9853a564a00b8ee24842ddf
|
/src/xx/nn/nodes/CmpNode.java
|
6c0f3b06674781469c6cc1cd3e648f45448a2e8b
|
[] |
no_license
|
xicalango/NodeNode
|
https://github.com/xicalango/NodeNode
|
6d9a1937f0a7b18b92007f3fe0eec06ee00e6ab2
|
33d5cb908b78ce6b97e53958b9db0cc91960e0dd
|
refs/heads/master
| 2021-01-18T16:35:50.430000 | 2014-09-05T17:03:35 | 2014-09-05T17:03:35 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package xx.nn.nodes;
import xx.nn.Visitor;
public class CmpNode<T extends Node, U extends Node> extends BiNode<T, U> {
public static enum Op {
EQ("=="),
LT("<"),
GT(">"),
LTEQ("<="),
GTEQ(">=");
public final String javaSign;
private Op(String javaSign) {
this.javaSign = javaSign;
}
}
public Op op;
public CmpNode(T node1, U node2, Op op) {
super(node1, node2);
this.op = op;
}
@Override
public void accept(Visitor v) {
v.visit(this);
}
}
|
UTF-8
|
Java
| 515 |
java
|
CmpNode.java
|
Java
|
[] | null |
[] |
package xx.nn.nodes;
import xx.nn.Visitor;
public class CmpNode<T extends Node, U extends Node> extends BiNode<T, U> {
public static enum Op {
EQ("=="),
LT("<"),
GT(">"),
LTEQ("<="),
GTEQ(">=");
public final String javaSign;
private Op(String javaSign) {
this.javaSign = javaSign;
}
}
public Op op;
public CmpNode(T node1, U node2, Op op) {
super(node1, node2);
this.op = op;
}
@Override
public void accept(Visitor v) {
v.visit(this);
}
}
| 515 | 0.570874 | 0.563107 | 34 | 14.147058 | 16.141165 | 75 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.529412 | false | false |
3
|
af05db1c4da2a8a434f5b42d5a419c02be8c68c9
| 7,129,645,728,550 |
184d369800382b896a8cf2e890b069cc8e4e5118
|
/support/punchat-web-starter/src/main/java/com/github/punchat/starter/web/WebProperties.java
|
b15eb42ebc7dcb95af21b0d38d36d11c65b5f02f
|
[
"Apache-2.0"
] |
permissive
|
punchat/punchat
|
https://github.com/punchat/punchat
|
839864dfe02c0b1a2ba892791eb288f9649311f2
|
969f64e12a0ac9357ec693de075c9a928e8a783a
|
refs/heads/dev
| 2020-03-07T14:45:21.661000 | 2018-06-10T05:29:54 | 2018-06-10T05:29:54 | 127,534,735 | 1 | 0 |
Apache-2.0
| false | 2018-06-10T05:29:55 | 2018-03-31T13:32:09 | 2018-06-09T21:04:45 | 2018-06-10T05:29:54 | 517 | 0 | 0 | 9 |
Java
| false | null |
package com.github.punchat.starter.web;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* @author Alex Ivchenko
*/
@ConfigurationProperties("punchat.validation.handling")
public class WebProperties {
public boolean enabled = true;
}
|
UTF-8
|
Java
| 273 |
java
|
WebProperties.java
|
Java
|
[
{
"context": "roperties.ConfigurationProperties;\n\n/**\n * @author Alex Ivchenko\n */\n@ConfigurationProperties(\"punchat.validation.h",
"end": 146,
"score": 0.9994092583656311,
"start": 133,
"tag": "NAME",
"value": "Alex Ivchenko"
}
] | null |
[] |
package com.github.punchat.starter.web;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* @author <NAME>
*/
@ConfigurationProperties("punchat.validation.handling")
public class WebProperties {
public boolean enabled = true;
}
| 266 | 0.787546 | 0.787546 | 11 | 23.818182 | 24.24428 | 75 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.272727 | false | false |
3
|
25f7d572ecd1cd9b3b562dcdd426cc481b3ebc0e
| 1,632,087,594,119 |
723f84f738ed928a7a5c3b7602469e21b778ee2d
|
/moodnite/src/main/java/tv/oh/moodnite/service/storage/StorageProperties.java
|
b79f21d28b5beafa0cdae0e6d3d1234c866d1104
|
[] |
no_license
|
ohmanu/Moodnite
|
https://github.com/ohmanu/Moodnite
|
183b8bdf6a2365498768878bf682fc327422cba9
|
311ae5512c54894fcea9ba68aac73ce408206e5b
|
refs/heads/master
| 2020-07-15T07:52:31.556000 | 2018-06-14T01:10:28 | 2018-06-14T01:10:28 | 73,967,257 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package tv.oh.moodnite.service.storage;
import org.springframework.context.annotation.Configuration;
@Configuration("storage")
public class StorageProperties {
// Folder location for storing files.
//private String location = "C:/Projects/Moodnite/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/moodnite/resources/images/avatars";
private String location = "/var/lib/tomcat8/webapps/ROOT/resources/images/avatars";
public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location;
}
}
|
UTF-8
|
Java
| 587 |
java
|
StorageProperties.java
|
Java
|
[] | null |
[] |
package tv.oh.moodnite.service.storage;
import org.springframework.context.annotation.Configuration;
@Configuration("storage")
public class StorageProperties {
// Folder location for storing files.
//private String location = "C:/Projects/Moodnite/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/moodnite/resources/images/avatars";
private String location = "/var/lib/tomcat8/webapps/ROOT/resources/images/avatars";
public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location;
}
}
| 587 | 0.754685 | 0.751278 | 18 | 30.611111 | 36.830151 | 149 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1 | false | false |
3
|
fa1a305226a7807b8e39ba58719b334d935903d4
| 13,864,154,436,093 |
9316e36ccd66763e0635acda44b2b676e126809a
|
/postgresAPI/src/main/java/com/Kharido/postgresAPI/services/impl/MerchantDetailServiceImpl.java
|
1e7b63adc8e434a7a798228a92b1a9dee0809e82
|
[] |
no_license
|
liou-r51e/cart
|
https://github.com/liou-r51e/cart
|
6054efb634d39a61f838f13693f8bcc8e0272cf6
|
0b476d5823344da4aec17caf6765d5d6d04e7094
|
refs/heads/master
| 2020-03-20T04:06:59.488000 | 2018-06-21T05:17:55 | 2018-06-21T05:17:55 | 137,171,301 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.Kharido.postgresAPI.services.impl;
import com.Kharido.postgresAPI.dto.MerchantDetail;
import com.Kharido.postgresAPI.dto.MerchantLoginDetails;
import com.Kharido.postgresAPI.entity.MerchantDetailsEntity;
import com.Kharido.postgresAPI.repository.MerchantDetailsRepository;
import com.Kharido.postgresAPI.services.MerchantDetailsService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Optional;
@Service
public class MerchantDetailServiceImpl implements MerchantDetailsService {
@Autowired
MerchantDetailsRepository merchantDetailsRepository;
@Override
public Optional<MerchantDetailsEntity> findOne(String emailId) {
return (merchantDetailsRepository.findById(emailId));
}
@Override
public MerchantDetail save(MerchantDetail merchantDetail) {
MerchantDetailsEntity merchantDetailsEntity = new MerchantDetailsEntity();
BeanUtils.copyProperties(merchantDetail, merchantDetailsEntity);
merchantDetailsRepository.save(merchantDetailsEntity);
System.out.println(merchantDetailsEntity.getMerchantId());
MerchantDetail response = new MerchantDetail();
BeanUtils.copyProperties(merchantDetailsEntity, response);
return response;
}
@Override
public boolean exists(String merchantId) {
return merchantDetailsRepository.existsById(merchantId);
}
@Override
public List<MerchantDetailsEntity> findAll() {
return null;
}
@Override
public Iterable<MerchantDetailsEntity> findAll(Iterable<String> MerchantId) {
return null;
}
@Override
public long count() {
return 0;
}
@Override
public void delete(String MerchantId) {
}
@Override
public void delete(MerchantDetailsEntity employee) {
}
@Override
public void deleteAll() {
}
@Override
public List<MerchantDetailsEntity> getByFirstName(String fullName) {
return null;
}
@Override
public MerchantDetailsEntity getOneByMerchantId(String merchantId) {
MerchantDetailsEntity merchantDetailsEntity = merchantDetailsRepository.findById(merchantId).get();
return merchantDetailsEntity;
}
@Override
public String merchantLogin(MerchantLoginDetails merchantLoginDetails) {
if(merchantDetailsRepository.existsById(merchantLoginDetails.getMerchantId())==false){
return ("Email is not registered...");
}
MerchantDetailsEntity merchantDetailsEntity = merchantDetailsRepository.findById(merchantLoginDetails.getMerchantId()).get();
if (merchantDetailsEntity == null) {
//Todo : Phani : remove system.out.println, use logger instead
System.out.println("User Not Found...");
return ("Email is not registered...");
}
boolean merchantPassWordCheck = merchantDetailsEntity.getPassword().equals(merchantLoginDetails.getPassword());
if(merchantPassWordCheck == false)
{
return ("Username/Password incorrect...");
}
return ("true");
}
}
|
UTF-8
|
Java
| 3,244 |
java
|
MerchantDetailServiceImpl.java
|
Java
|
[] | null |
[] |
package com.Kharido.postgresAPI.services.impl;
import com.Kharido.postgresAPI.dto.MerchantDetail;
import com.Kharido.postgresAPI.dto.MerchantLoginDetails;
import com.Kharido.postgresAPI.entity.MerchantDetailsEntity;
import com.Kharido.postgresAPI.repository.MerchantDetailsRepository;
import com.Kharido.postgresAPI.services.MerchantDetailsService;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Optional;
@Service
public class MerchantDetailServiceImpl implements MerchantDetailsService {
@Autowired
MerchantDetailsRepository merchantDetailsRepository;
@Override
public Optional<MerchantDetailsEntity> findOne(String emailId) {
return (merchantDetailsRepository.findById(emailId));
}
@Override
public MerchantDetail save(MerchantDetail merchantDetail) {
MerchantDetailsEntity merchantDetailsEntity = new MerchantDetailsEntity();
BeanUtils.copyProperties(merchantDetail, merchantDetailsEntity);
merchantDetailsRepository.save(merchantDetailsEntity);
System.out.println(merchantDetailsEntity.getMerchantId());
MerchantDetail response = new MerchantDetail();
BeanUtils.copyProperties(merchantDetailsEntity, response);
return response;
}
@Override
public boolean exists(String merchantId) {
return merchantDetailsRepository.existsById(merchantId);
}
@Override
public List<MerchantDetailsEntity> findAll() {
return null;
}
@Override
public Iterable<MerchantDetailsEntity> findAll(Iterable<String> MerchantId) {
return null;
}
@Override
public long count() {
return 0;
}
@Override
public void delete(String MerchantId) {
}
@Override
public void delete(MerchantDetailsEntity employee) {
}
@Override
public void deleteAll() {
}
@Override
public List<MerchantDetailsEntity> getByFirstName(String fullName) {
return null;
}
@Override
public MerchantDetailsEntity getOneByMerchantId(String merchantId) {
MerchantDetailsEntity merchantDetailsEntity = merchantDetailsRepository.findById(merchantId).get();
return merchantDetailsEntity;
}
@Override
public String merchantLogin(MerchantLoginDetails merchantLoginDetails) {
if(merchantDetailsRepository.existsById(merchantLoginDetails.getMerchantId())==false){
return ("Email is not registered...");
}
MerchantDetailsEntity merchantDetailsEntity = merchantDetailsRepository.findById(merchantLoginDetails.getMerchantId()).get();
if (merchantDetailsEntity == null) {
//Todo : Phani : remove system.out.println, use logger instead
System.out.println("User Not Found...");
return ("Email is not registered...");
}
boolean merchantPassWordCheck = merchantDetailsEntity.getPassword().equals(merchantLoginDetails.getPassword());
if(merchantPassWordCheck == false)
{
return ("Username/Password incorrect...");
}
return ("true");
}
}
| 3,244 | 0.720407 | 0.720099 | 107 | 29.317757 | 30.887375 | 133 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.345794 | false | false |
3
|
a4a98031adf38d78f1f3f552660b676438843d2d
| 936,302,907,844 |
270e4bcb0d2a3e26fe0dc234981b6d530a973d3e
|
/app/src/main/java/com/mostafa1075/popularmovies/adapters/ReviewAdapter.java
|
dbeeb24fa76b3643dfd1f47ec50f8c9b84f136b9
|
[] |
no_license
|
mostafa1075/PopularMovies
|
https://github.com/mostafa1075/PopularMovies
|
be303f32d8e213c98cd4fbfb4df8f948d4aa5f7a
|
056c44f6e3e98fc5d72861580270a5157ffd4153
|
refs/heads/master
| 2021-04-27T21:31:05.626000 | 2018-04-01T00:15:08 | 2018-04-01T00:15:08 | 122,402,787 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.mostafa1075.popularmovies.adapters;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.mostafa1075.popularmovies.R;
import com.mostafa1075.popularmovies.pojo.MovieReview;
import java.util.ArrayList;
/**
* Created by mosta on 10-Mar-18.
*/
public class ReviewAdapter extends RecyclerView.Adapter<ReviewAdapter.ReviewAdapterViewHolder> {
private final Context mContext;
private final ReviewAdapterOnClickHandler mClickHandler;
private ArrayList<MovieReview> mReviews;
public ReviewAdapter(Context context, ReviewAdapterOnClickHandler handler) {
mReviews = new ArrayList<>();
mContext = context;
mClickHandler = handler;
}
@Override
public ReviewAdapterViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.from(mContext)
.inflate(R.layout.review_single_item, parent, false);
return new ReviewAdapterViewHolder(view);
}
@Override
public void onBindViewHolder(ReviewAdapterViewHolder holder, int position) {
String author = mReviews.get(position).getAuthor();
String review = mReviews.get(position).getContent();
holder.mReviewerNameTextView.setText(author);
holder.mReviewTextView.setText(review);
}
@Override
public int getItemCount() {return mReviews.size();}
public void swipeData(ArrayList<MovieReview> reviews){
mReviews = reviews;
notifyDataSetChanged();
}
public interface ReviewAdapterOnClickHandler {
void onReviewClick(MovieReview review);
}
public class ReviewAdapterViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
private final TextView mReviewerNameTextView;
private final TextView mReviewTextView;
public ReviewAdapterViewHolder(View itemView) {
super(itemView);
mReviewerNameTextView = itemView.findViewById(R.id.tv_reviewer_name);
mReviewTextView = itemView.findViewById(R.id.tv_review);
itemView.setOnClickListener(this);
}
@Override
public void onClick(View v) {
int position = getAdapterPosition();
mClickHandler.onReviewClick(mReviews.get(position));
}
}
}
|
UTF-8
|
Java
| 2,449 |
java
|
ReviewAdapter.java
|
Java
|
[
{
"context": "package com.mostafa1075.popularmovies.adapters;\n\nimport android.content.C",
"end": 23,
"score": 0.642809271812439,
"start": 16,
"tag": "USERNAME",
"value": "afa1075"
},
{
"context": ";\nimport android.widget.TextView;\n\nimport com.mostafa1075.popularmovies.R;\nimport com.mostafa1075.popularmo",
"end": 276,
"score": 0.8815212249755859,
"start": 269,
"tag": "USERNAME",
"value": "afa1075"
},
{
"context": "t com.mostafa1075.popularmovies.R;\nimport com.mostafa1075.popularmovies.pojo.MovieReview;\n\nimport java.ut",
"end": 314,
"score": 0.6309105753898621,
"start": 309,
"tag": "USERNAME",
"value": "afa10"
},
{
"context": "mostafa1075.popularmovies.R;\nimport com.mostafa1075.popularmovies.pojo.MovieReview;\n\nimport java.util",
"end": 316,
"score": 0.538119912147522,
"start": 315,
"tag": "USERNAME",
"value": "5"
},
{
"context": "w;\n\nimport java.util.ArrayList;\n\n/**\n * Created by mosta on 10-Mar-18.\n */\n\npublic class ReviewAdapter ext",
"end": 402,
"score": 0.9973111152648926,
"start": 397,
"tag": "USERNAME",
"value": "mosta"
}
] | null |
[] |
package com.mostafa1075.popularmovies.adapters;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;
import com.mostafa1075.popularmovies.R;
import com.mostafa1075.popularmovies.pojo.MovieReview;
import java.util.ArrayList;
/**
* Created by mosta on 10-Mar-18.
*/
public class ReviewAdapter extends RecyclerView.Adapter<ReviewAdapter.ReviewAdapterViewHolder> {
private final Context mContext;
private final ReviewAdapterOnClickHandler mClickHandler;
private ArrayList<MovieReview> mReviews;
public ReviewAdapter(Context context, ReviewAdapterOnClickHandler handler) {
mReviews = new ArrayList<>();
mContext = context;
mClickHandler = handler;
}
@Override
public ReviewAdapterViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View view = LayoutInflater.from(mContext)
.inflate(R.layout.review_single_item, parent, false);
return new ReviewAdapterViewHolder(view);
}
@Override
public void onBindViewHolder(ReviewAdapterViewHolder holder, int position) {
String author = mReviews.get(position).getAuthor();
String review = mReviews.get(position).getContent();
holder.mReviewerNameTextView.setText(author);
holder.mReviewTextView.setText(review);
}
@Override
public int getItemCount() {return mReviews.size();}
public void swipeData(ArrayList<MovieReview> reviews){
mReviews = reviews;
notifyDataSetChanged();
}
public interface ReviewAdapterOnClickHandler {
void onReviewClick(MovieReview review);
}
public class ReviewAdapterViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener {
private final TextView mReviewerNameTextView;
private final TextView mReviewTextView;
public ReviewAdapterViewHolder(View itemView) {
super(itemView);
mReviewerNameTextView = itemView.findViewById(R.id.tv_reviewer_name);
mReviewTextView = itemView.findViewById(R.id.tv_review);
itemView.setOnClickListener(this);
}
@Override
public void onClick(View v) {
int position = getAdapterPosition();
mClickHandler.onReviewClick(mReviews.get(position));
}
}
}
| 2,449 | 0.714169 | 0.707227 | 75 | 31.653334 | 27.394644 | 106 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.52 | false | false |
3
|
6753a14d9753b4fde929e53826e1a6c6fb1b9054
| 300,647,737,614 |
f78daddf7d83d1f6b9f13ac973cdb33d40717839
|
/inspector/src/main/java/org/xtuml/masl/inspector/processInterface/ObjectRelationshipMetaData.java
|
ab68ad5fe17a9ba4db5f8b89185ea862922908f4
|
[
"Apache-2.0"
] |
permissive
|
xtuml/masl
|
https://github.com/xtuml/masl
|
fe43c7131d0aea919f24136aaf1686162629f70f
|
80d07b41573bdad9c191e2d7d6a18ee59c3cf5c7
|
refs/heads/master
| 2023-08-31T07:12:58.662000 | 2023-08-22T18:28:17 | 2023-08-22T18:31:28 | 71,495,752 | 6 | 13 | null | false | 2023-09-12T14:39:41 | 2016-10-20T19:14:06 | 2023-03-05T19:25:15 | 2023-09-12T14:39:40 | 2,864 | 4 | 10 | 0 |
Java
| false | false |
//
// Filename : ObjectRelationshipMetaData.java
//
// UK Crown Copyright (c) 2005. All Rights Reserved
//
package org.xtuml.masl.inspector.processInterface;
public abstract class ObjectRelationshipMetaData {
public abstract String getRolePhrase();
public abstract ObjectMetaData getDestObject();
public abstract String getNumber();
public abstract boolean isMultiple();
public abstract boolean isConditional();
public abstract boolean isSuperSubtype();
public String getCardinalityString() {
return (isConditional() ? "0" : "1") + (isMultiple() ? "..*" : (isConditional() ? "..1" : ""));
}
public String getDescription() {
return (isSuperSubtype() ? "is a" : getRolePhrase() + " " + getCardinalityString()) + " "
+ getDestObject().getName();
}
}
|
UTF-8
|
Java
| 829 |
java
|
ObjectRelationshipMetaData.java
|
Java
|
[] | null |
[] |
//
// Filename : ObjectRelationshipMetaData.java
//
// UK Crown Copyright (c) 2005. All Rights Reserved
//
package org.xtuml.masl.inspector.processInterface;
public abstract class ObjectRelationshipMetaData {
public abstract String getRolePhrase();
public abstract ObjectMetaData getDestObject();
public abstract String getNumber();
public abstract boolean isMultiple();
public abstract boolean isConditional();
public abstract boolean isSuperSubtype();
public String getCardinalityString() {
return (isConditional() ? "0" : "1") + (isMultiple() ? "..*" : (isConditional() ? "..1" : ""));
}
public String getDescription() {
return (isSuperSubtype() ? "is a" : getRolePhrase() + " " + getCardinalityString()) + " "
+ getDestObject().getName();
}
}
| 829 | 0.659831 | 0.651387 | 31 | 25.741936 | 28.834307 | 103 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.290323 | false | false |
3
|
bbfc00aaca7ac944009abacde285acf5d48fea0c
| 19,902,878,453,079 |
48a2135f2f05fc09c1bc367ef594ee9f704a4289
|
/ovh-java-sdk-dedicatedinstallationTemplate/src/main/java/net/minidev/ovh/api/dedicated/OvhTemplateOsLanguageEnum.java
|
defb0f637ba45a670294f36cdb944da371fbb256
|
[
"BSD-3-Clause"
] |
permissive
|
UrielCh/ovh-java-sdk
|
https://github.com/UrielCh/ovh-java-sdk
|
913c1fbd4d3ea1ff91de8e1c2671835af67a8134
|
e41af6a75f508a065a6177ccde9c2491d072c117
|
refs/heads/master
| 2022-09-27T11:15:23.115000 | 2022-09-02T04:41:33 | 2022-09-02T04:41:33 | 87,030,166 | 13 | 4 |
BSD-3-Clause
| false | 2022-09-02T04:41:34 | 2017-04-03T01:59:23 | 2022-09-02T04:41:24 | 2022-09-02T04:41:33 | 2,550 | 10 | 3 | 2 |
Java
| false | false |
package net.minidev.ovh.api.dedicated;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* all language available
*/
public enum OvhTemplateOsLanguageEnum {
ar("ar"),
bg("bg"),
cs("cs"),
da("da"),
de("de"),
el("el"),
en("en"),
es("es"),
et("et"),
fi("fi"),
fr("fr"),
he("he"),
hr("hr"),
hu("hu"),
it("it"),
ja("ja"),
ko("ko"),
lt("lt"),
lv("lv"),
nb("nb"),
nl("nl"),
no("no"),
pl("pl"),
pt("pt"),
ro("ro"),
ru("ru"),
sk("sk"),
sl("sl"),
sr("sr"),
sv("sv"),
th("th"),
tr("tr"),
tu("tu"),
uk("uk"),
@JsonProperty("zh-Hans-CN")
zh_Hans_CN("zh-Hans-CN"),
@JsonProperty("zh-Hans-HK")
zh_Hans_HK("zh-Hans-HK");
final String value;
OvhTemplateOsLanguageEnum(String s) {
this.value = s;
}
public String toString() {
return this.value;
}
}
|
UTF-8
|
Java
| 793 |
java
|
OvhTemplateOsLanguageEnum.java
|
Java
|
[] | null |
[] |
package net.minidev.ovh.api.dedicated;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* all language available
*/
public enum OvhTemplateOsLanguageEnum {
ar("ar"),
bg("bg"),
cs("cs"),
da("da"),
de("de"),
el("el"),
en("en"),
es("es"),
et("et"),
fi("fi"),
fr("fr"),
he("he"),
hr("hr"),
hu("hu"),
it("it"),
ja("ja"),
ko("ko"),
lt("lt"),
lv("lv"),
nb("nb"),
nl("nl"),
no("no"),
pl("pl"),
pt("pt"),
ro("ro"),
ru("ru"),
sk("sk"),
sl("sl"),
sr("sr"),
sv("sv"),
th("th"),
tr("tr"),
tu("tu"),
uk("uk"),
@JsonProperty("zh-Hans-CN")
zh_Hans_CN("zh-Hans-CN"),
@JsonProperty("zh-Hans-HK")
zh_Hans_HK("zh-Hans-HK");
final String value;
OvhTemplateOsLanguageEnum(String s) {
this.value = s;
}
public String toString() {
return this.value;
}
}
| 793 | 0.54855 | 0.54855 | 57 | 12.912281 | 10.682467 | 53 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.54386 | false | false |
3
|
2a8dfafc2cff4e0bb1d992e3bf825b8f3cdc7871
| 17,703,855,214,549 |
40c69d807fcf450eb715a699e3ef19648680bf8b
|
/jeuDEchecs/src/pieces/Cavalier.java
|
7d1e7211be263415a774f4661f6d033f1c87501b
|
[] |
no_license
|
chemousesi/chess
|
https://github.com/chemousesi/chess
|
59941d04bfccca496c0c68bc9f34dde0a3c0c94d
|
693d211fe3ad0221d3993e5111d5e76588d6411f
|
refs/heads/main
| 2023-01-05T10:42:12.764000 | 2020-10-06T17:01:33 | 2020-10-06T17:01:33 | 301,375,826 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package pieces;
import jeu.*;
public class Cavalier extends Piece {
public Cavalier(boolean couleur) {
super("cavalier", couleur);
}
@Override
public boolean estValide(Deplacement dep, Plateau p) {
super.estValide(dep, p);
if (dep.typeDeplacement() == 'c')
return true;
else
return false;
}
}
|
UTF-8
|
Java
| 373 |
java
|
Cavalier.java
|
Java
|
[] | null |
[] |
package pieces;
import jeu.*;
public class Cavalier extends Piece {
public Cavalier(boolean couleur) {
super("cavalier", couleur);
}
@Override
public boolean estValide(Deplacement dep, Plateau p) {
super.estValide(dep, p);
if (dep.typeDeplacement() == 'c')
return true;
else
return false;
}
}
| 373 | 0.581769 | 0.581769 | 19 | 18.631578 | 16.968115 | 58 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.473684 | false | false |
3
|
45806df6ee49ba62091cdbf8655ddac8ac01bb09
| 14,190,571,997,991 |
750776289edee0523522ef8ac5caee629087e917
|
/java0726/src/org/java/javabasicapi0725/CalendarEx1.java
|
5556873ddf517b609e246f19e00e66ee1213c072
|
[] |
no_license
|
mansoda/javabasic
|
https://github.com/mansoda/javabasic
|
473820d98a0e641f8e082013d9f23821a7637f38
|
fa92f66ada874ea1f8da004c8f54745d6c94033f
|
refs/heads/master
| 2018-10-31T10:44:39.456000 | 2018-08-24T04:34:54 | 2018-08-24T04:34:54 | 145,925,982 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package org.java.javabasicapi0725;
import java.util.Calendar;
public class CalendarEx1 {
public static void main(String[] args) {
System.out.println("Calendar");
Calendar cal1=Calendar.getInstance();
System.out.println(cal1.get(Calendar.YEAR));
System.out.println(cal1.get(Calendar.MONTH)+1);
}
}
|
UTF-8
|
Java
| 339 |
java
|
CalendarEx1.java
|
Java
|
[] | null |
[] |
package org.java.javabasicapi0725;
import java.util.Calendar;
public class CalendarEx1 {
public static void main(String[] args) {
System.out.println("Calendar");
Calendar cal1=Calendar.getInstance();
System.out.println(cal1.get(Calendar.YEAR));
System.out.println(cal1.get(Calendar.MONTH)+1);
}
}
| 339 | 0.681416 | 0.654867 | 17 | 17.941177 | 18.574083 | 49 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.411765 | false | false |
3
|
0d737f733818feccc935df761c62c8e7bfe1cdad
| 31,688,268,756,723 |
76f94a23907992a53e96f7422284879838d5a4be
|
/springboot-resttemplate/src/main/java/com/xncoding/pos/model/LoginParam.java
|
466e8e3cf31cdaa7f182b6163a1edfe42a8df554
|
[
"MIT"
] |
permissive
|
yellowstar2014/SpringBootBucket-master
|
https://github.com/yellowstar2014/SpringBootBucket-master
|
bee6bd5d29b9662f800213191263271ff1073750
|
b7fc47c5f67a792647db0261b665ce4be927b385
|
refs/heads/master
| 2022-12-22T01:23:30.145000 | 2019-09-25T09:57:50 | 2019-09-25T09:57:50 | 210,812,351 | 0 | 2 |
MIT
| false | 2022-12-12T21:42:18 | 2019-09-25T09:57:12 | 2021-10-25T12:56:37 | 2022-12-12T21:42:15 | 1,655 | 1 | 2 | 29 |
Java
| false | false |
package com.xncoding.pos.model;
/**
* 登录认证接口参数
*
* @author XiongNeng
* @version 1.0
* @since 2018/1/9
*/
public class LoginParam {
/**
* 用户名
*/
private String username;
/**
* 密码
*/
private String password;
/**
* Application ID
*/
private String appid;
/**
* IMEI码
*/
private String imei;
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getAppid() {
return appid;
}
public void setAppid(String appid) {
this.appid = appid;
}
public String getImei() {
return imei;
}
public void setImei(String imei) {
this.imei = imei;
}
}
|
UTF-8
|
Java
| 971 |
java
|
LoginParam.java
|
Java
|
[
{
"context": "xncoding.pos.model;\n\n/**\n * 登录认证接口参数\n *\n * @author XiongNeng\n * @version 1.0\n * @since 2018/1/9\n */\npublic cla",
"end": 72,
"score": 0.996942400932312,
"start": 63,
"tag": "NAME",
"value": "XiongNeng"
},
{
"context": "sername(String username) {\n this.username = username;\n }\n\n public String getPassword() {\n ",
"end": 513,
"score": 0.7232189178466797,
"start": 505,
"tag": "USERNAME",
"value": "username"
},
{
"context": "assword(String password) {\n this.password = password;\n }\n\n public String getAppid() {\n re",
"end": 667,
"score": 0.6933833956718445,
"start": 659,
"tag": "PASSWORD",
"value": "password"
}
] | null |
[] |
package com.xncoding.pos.model;
/**
* 登录认证接口参数
*
* @author XiongNeng
* @version 1.0
* @since 2018/1/9
*/
public class LoginParam {
/**
* 用户名
*/
private String username;
/**
* 密码
*/
private String password;
/**
* Application ID
*/
private String appid;
/**
* IMEI码
*/
private String imei;
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = <PASSWORD>;
}
public String getAppid() {
return appid;
}
public void setAppid(String appid) {
this.appid = appid;
}
public String getImei() {
return imei;
}
public void setImei(String imei) {
this.imei = imei;
}
}
| 973 | 0.54719 | 0.538706 | 59 | 14.983051 | 13.200528 | 46 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.220339 | false | false |
3
|
a7586dfa94ab5b7911f1d7312bdac37351ef5a11
| 20,246,475,864,801 |
350153104e6517962f3ac662e0056dae5626f5ef
|
/escheduler-dao/src/main/java/cn/escheduler/dao/mapper/TenantMapper.java
|
a459e9aaaefa93f19c8cd5ec844947f5339e8d0a
|
[
"Apache-2.0"
] |
permissive
|
gary0416/incubator-dolphinscheduler
|
https://github.com/gary0416/incubator-dolphinscheduler
|
f8ee4a3919f8bc36146f2e6f374bc05338680a2a
|
7e21d3c4fd437bd2057c5d333d144eee8bb28938
|
refs/heads/1.1.0-docker
| 2020-07-27T08:13:45.023000 | 2019-09-24T06:16:23 | 2019-09-24T06:16:23 | 209,025,804 | 1 | 1 |
Apache-2.0
| true | 2019-09-23T05:27:29 | 2019-09-17T10:33:28 | 2019-09-19T14:52:36 | 2019-09-23T05:27:29 | 70,047 | 0 | 0 | 0 |
Java
| false | false |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.dao.mapper;
import cn.escheduler.dao.model.Tenant;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.type.JdbcType;
import java.sql.Timestamp;
import java.util.List;
/**
* tenant mapper
*/
public interface TenantMapper {
/**
* insert tenant
* @param tenant
* @return
*/
@InsertProvider(type = TenantMapperProvider.class, method = "insert")
@Options(useGeneratedKeys = true,keyProperty = "tenant.id")
@SelectKey(statement = "SELECT LAST_INSERT_ID()", keyProperty = "tenant.id", before = false, resultType = int.class)
int insert(@Param("tenant") Tenant tenant);
/**
* delete tenant
* @param id
* @return
*/
@DeleteProvider(type = TenantMapperProvider.class, method = "deleteById")
int deleteById(@Param("id") int id);
/**
* update tenant
*
* @param tenant
* @return
*/
@UpdateProvider(type = TenantMapperProvider.class, method = "update")
int update(@Param("tenant") Tenant tenant);
/**
* query tenant by id
* @param tenantId
* @return
*/
@Results(value = {@Result(property = "id", column = "id", id = true, javaType = Integer.class, jdbcType = JdbcType.INTEGER),
@Result(property = "tenantCode", column = "tenant_code", javaType = String.class, jdbcType = JdbcType.VARCHAR),
@Result(property = "tenantName", column = "tenant_name", javaType = String.class, jdbcType = JdbcType.VARCHAR),
@Result(property = "desc", column = "desc", javaType = String.class, jdbcType = JdbcType.VARCHAR),
@Result(property = "queueId", column = "queue_id", javaType = Integer.class, jdbcType = JdbcType.INTEGER),
@Result(property = "queueName", column = "queue_name", javaType = String.class, jdbcType = JdbcType.VARCHAR),
@Result(property = "queue", column = "queue", javaType = String.class, jdbcType = JdbcType.VARCHAR),
@Result(property = "createTime", column = "create_time", javaType = Timestamp.class, jdbcType = JdbcType.DATE),
@Result(property = "updateTime", column = "update_time", javaType = Timestamp.class, jdbcType = JdbcType.DATE),
})
@SelectProvider(type = TenantMapperProvider.class, method = "queryById")
Tenant queryById(@Param("tenantId") int tenantId);
/**
* query tenant by code
* @param tenantCode
* @return
*/
@Results(value = {@Result(property = "id", column = "id", id = true, javaType = Integer.class, jdbcType = JdbcType.INTEGER),
@Result(property = "tenantCode", column = "tenant_code", javaType = String.class, jdbcType = JdbcType.VARCHAR),
@Result(property = "tenantName", column = "tenant_name", javaType = String.class, jdbcType = JdbcType.VARCHAR),
@Result(property = "desc", column = "desc", javaType = String.class, jdbcType = JdbcType.VARCHAR),
@Result(property = "queueId", column = "queue_id", javaType = Integer.class, jdbcType = JdbcType.INTEGER),
@Result(property = "createTime", column = "create_time", javaType = Timestamp.class, jdbcType = JdbcType.DATE),
@Result(property = "updateTime", column = "update_time", javaType = Timestamp.class, jdbcType = JdbcType.DATE),
})
@SelectProvider(type = TenantMapperProvider.class, method = "queryByTenantCode")
Tenant queryByTenantCode(@Param("tenantCode") String tenantCode);
/**
* count tenant by search value
* @param searchVal
* @return
*/
@SelectProvider(type = TenantMapperProvider.class, method = "countTenantPaging")
Integer countTenantPaging(@Param("searchVal") String searchVal);
/**
* query tenant list paging
* @param searchVal
* @param offset
* @param pageSize
* @return
*/
@Results(value = {@Result(property = "id", column = "id", id = true, javaType = Integer.class, jdbcType = JdbcType.INTEGER),
@Result(property = "tenantCode", column = "tenant_code", javaType = String.class, jdbcType = JdbcType.VARCHAR),
@Result(property = "tenantName", column = "tenant_name", javaType = String.class, jdbcType = JdbcType.VARCHAR),
@Result(property = "queueId", column = "queue_id", javaType = Integer.class, jdbcType = JdbcType.INTEGER),
@Result(property = "desc", column = "desc", javaType = String.class, jdbcType = JdbcType.VARCHAR),
@Result(property = "queueName", column = "queue_name", javaType = String.class, jdbcType = JdbcType.VARCHAR),
@Result(property = "createTime", column = "create_time", javaType = Timestamp.class, jdbcType = JdbcType.DATE),
@Result(property = "updateTime", column = "update_time", javaType = Timestamp.class, jdbcType = JdbcType.DATE)
})
@SelectProvider(type = TenantMapperProvider.class, method = "queryTenantPaging")
List<Tenant> queryTenantPaging(@Param("searchVal") String searchVal,
@Param("offset") Integer offset,
@Param("pageSize") Integer pageSize);
/**
* query all tenant list
* @return
*/
@Results(value = {@Result(property = "id", column = "id", id = true, javaType = Integer.class, jdbcType = JdbcType.INTEGER),
@Result(property = "tenantCode", column = "tenant_code", javaType = String.class, jdbcType = JdbcType.VARCHAR),
@Result(property = "tenantName", column = "tenant_name", javaType = String.class, jdbcType = JdbcType.VARCHAR),
@Result(property = "queueId", column = "queue_id", javaType = Integer.class, jdbcType = JdbcType.INTEGER),
@Result(property = "desc", column = "desc", javaType = String.class, jdbcType = JdbcType.VARCHAR),
@Result(property = "createTime", column = "create_time", javaType = Timestamp.class, jdbcType = JdbcType.DATE),
@Result(property = "updateTime", column = "update_time", javaType = Timestamp.class, jdbcType = JdbcType.DATE)
})
@SelectProvider(type = TenantMapperProvider.class, method = "queryAllTenant")
List<Tenant> queryAllTenant();
}
|
UTF-8
|
Java
| 6,954 |
java
|
TenantMapper.java
|
Java
|
[] | null |
[] |
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package cn.escheduler.dao.mapper;
import cn.escheduler.dao.model.Tenant;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.type.JdbcType;
import java.sql.Timestamp;
import java.util.List;
/**
* tenant mapper
*/
public interface TenantMapper {
/**
* insert tenant
* @param tenant
* @return
*/
@InsertProvider(type = TenantMapperProvider.class, method = "insert")
@Options(useGeneratedKeys = true,keyProperty = "tenant.id")
@SelectKey(statement = "SELECT LAST_INSERT_ID()", keyProperty = "tenant.id", before = false, resultType = int.class)
int insert(@Param("tenant") Tenant tenant);
/**
* delete tenant
* @param id
* @return
*/
@DeleteProvider(type = TenantMapperProvider.class, method = "deleteById")
int deleteById(@Param("id") int id);
/**
* update tenant
*
* @param tenant
* @return
*/
@UpdateProvider(type = TenantMapperProvider.class, method = "update")
int update(@Param("tenant") Tenant tenant);
/**
* query tenant by id
* @param tenantId
* @return
*/
@Results(value = {@Result(property = "id", column = "id", id = true, javaType = Integer.class, jdbcType = JdbcType.INTEGER),
@Result(property = "tenantCode", column = "tenant_code", javaType = String.class, jdbcType = JdbcType.VARCHAR),
@Result(property = "tenantName", column = "tenant_name", javaType = String.class, jdbcType = JdbcType.VARCHAR),
@Result(property = "desc", column = "desc", javaType = String.class, jdbcType = JdbcType.VARCHAR),
@Result(property = "queueId", column = "queue_id", javaType = Integer.class, jdbcType = JdbcType.INTEGER),
@Result(property = "queueName", column = "queue_name", javaType = String.class, jdbcType = JdbcType.VARCHAR),
@Result(property = "queue", column = "queue", javaType = String.class, jdbcType = JdbcType.VARCHAR),
@Result(property = "createTime", column = "create_time", javaType = Timestamp.class, jdbcType = JdbcType.DATE),
@Result(property = "updateTime", column = "update_time", javaType = Timestamp.class, jdbcType = JdbcType.DATE),
})
@SelectProvider(type = TenantMapperProvider.class, method = "queryById")
Tenant queryById(@Param("tenantId") int tenantId);
/**
* query tenant by code
* @param tenantCode
* @return
*/
@Results(value = {@Result(property = "id", column = "id", id = true, javaType = Integer.class, jdbcType = JdbcType.INTEGER),
@Result(property = "tenantCode", column = "tenant_code", javaType = String.class, jdbcType = JdbcType.VARCHAR),
@Result(property = "tenantName", column = "tenant_name", javaType = String.class, jdbcType = JdbcType.VARCHAR),
@Result(property = "desc", column = "desc", javaType = String.class, jdbcType = JdbcType.VARCHAR),
@Result(property = "queueId", column = "queue_id", javaType = Integer.class, jdbcType = JdbcType.INTEGER),
@Result(property = "createTime", column = "create_time", javaType = Timestamp.class, jdbcType = JdbcType.DATE),
@Result(property = "updateTime", column = "update_time", javaType = Timestamp.class, jdbcType = JdbcType.DATE),
})
@SelectProvider(type = TenantMapperProvider.class, method = "queryByTenantCode")
Tenant queryByTenantCode(@Param("tenantCode") String tenantCode);
/**
* count tenant by search value
* @param searchVal
* @return
*/
@SelectProvider(type = TenantMapperProvider.class, method = "countTenantPaging")
Integer countTenantPaging(@Param("searchVal") String searchVal);
/**
* query tenant list paging
* @param searchVal
* @param offset
* @param pageSize
* @return
*/
@Results(value = {@Result(property = "id", column = "id", id = true, javaType = Integer.class, jdbcType = JdbcType.INTEGER),
@Result(property = "tenantCode", column = "tenant_code", javaType = String.class, jdbcType = JdbcType.VARCHAR),
@Result(property = "tenantName", column = "tenant_name", javaType = String.class, jdbcType = JdbcType.VARCHAR),
@Result(property = "queueId", column = "queue_id", javaType = Integer.class, jdbcType = JdbcType.INTEGER),
@Result(property = "desc", column = "desc", javaType = String.class, jdbcType = JdbcType.VARCHAR),
@Result(property = "queueName", column = "queue_name", javaType = String.class, jdbcType = JdbcType.VARCHAR),
@Result(property = "createTime", column = "create_time", javaType = Timestamp.class, jdbcType = JdbcType.DATE),
@Result(property = "updateTime", column = "update_time", javaType = Timestamp.class, jdbcType = JdbcType.DATE)
})
@SelectProvider(type = TenantMapperProvider.class, method = "queryTenantPaging")
List<Tenant> queryTenantPaging(@Param("searchVal") String searchVal,
@Param("offset") Integer offset,
@Param("pageSize") Integer pageSize);
/**
* query all tenant list
* @return
*/
@Results(value = {@Result(property = "id", column = "id", id = true, javaType = Integer.class, jdbcType = JdbcType.INTEGER),
@Result(property = "tenantCode", column = "tenant_code", javaType = String.class, jdbcType = JdbcType.VARCHAR),
@Result(property = "tenantName", column = "tenant_name", javaType = String.class, jdbcType = JdbcType.VARCHAR),
@Result(property = "queueId", column = "queue_id", javaType = Integer.class, jdbcType = JdbcType.INTEGER),
@Result(property = "desc", column = "desc", javaType = String.class, jdbcType = JdbcType.VARCHAR),
@Result(property = "createTime", column = "create_time", javaType = Timestamp.class, jdbcType = JdbcType.DATE),
@Result(property = "updateTime", column = "update_time", javaType = Timestamp.class, jdbcType = JdbcType.DATE)
})
@SelectProvider(type = TenantMapperProvider.class, method = "queryAllTenant")
List<Tenant> queryAllTenant();
}
| 6,954 | 0.655163 | 0.654587 | 139 | 49.028778 | 45.969952 | 128 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.143885 | false | false |
3
|
4bb0e1556b5e56b7ba7bf9fce86150ccf2719d52
| 1,571,958,083,282 |
e4912600ad91b89289f824bd3421dc77ce6b52b0
|
/jxroute/src/main/java/com/example/jxroute/entity/SysRole.java
|
db68e01a055e819ab3c5c07b0825ea6088acd91a
|
[] |
no_license
|
black-blank/project
|
https://github.com/black-blank/project
|
0a0d02c396a89fc048da11676c2d5306260614a2
|
2682356c622a5edda2fa1ca099bf1a5c8f1e6287
|
refs/heads/master
| 2020-09-22T22:32:54.898000 | 2020-05-26T16:34:22 | 2020-05-26T16:34:22 | 225,335,010 | 0 | 0 | null | false | 2019-12-02T14:51:13 | 2019-12-02T09:23:55 | 2019-12-02T14:50:56 | 2019-12-02T14:51:12 | 0 | 0 | 0 | 1 |
HTML
| false | false |
package com.example.jxroute.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.time.LocalDateTime;
@TableName("tb_sys_role")
public class SysRole extends Model<SysRole> {
@TableId(value = "role_id", type = IdType.AUTO)
private Integer roleId;
private String roleName;
private LocalDateTime createTime;
private LocalDateTime modifyTime;
/**
* 逻辑删除字段(0:已删除,1:未删除)
*/
@TableLogic
private Integer deleted;
public Integer getRoleId() {
return roleId;
}
public void setRoleId(Integer roleId) {
this.roleId = roleId;
}
public String getRoleName() {
return roleName;
}
public void setRoleName(String roleName) {
this.roleName = roleName;
}
public LocalDateTime getCreateTime() {
return createTime;
}
public void setCreateTime(LocalDateTime createTime) {
this.createTime = createTime;
}
public LocalDateTime getModifyTime() {
return modifyTime;
}
public void setModifyTime(LocalDateTime modifyTime) {
this.modifyTime = modifyTime;
}
public Integer getDeleted() {
return deleted;
}
public void setDeleted(Integer deleted) {
this.deleted = deleted;
}
@Override
protected Serializable pkVal() {
return this.roleId;
}
@Override
public String toString() {
return "SysRole{" +
"roleId=" + roleId +
", roleName='" + roleName + '\'' +
", createTime=" + createTime +
", modifyTime=" + modifyTime +
", deleted=" + deleted +
'}';
}
}
|
UTF-8
|
Java
| 1,813 |
java
|
SysRole.java
|
Java
|
[] | null |
[] |
package com.example.jxroute.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.time.LocalDateTime;
@TableName("tb_sys_role")
public class SysRole extends Model<SysRole> {
@TableId(value = "role_id", type = IdType.AUTO)
private Integer roleId;
private String roleName;
private LocalDateTime createTime;
private LocalDateTime modifyTime;
/**
* 逻辑删除字段(0:已删除,1:未删除)
*/
@TableLogic
private Integer deleted;
public Integer getRoleId() {
return roleId;
}
public void setRoleId(Integer roleId) {
this.roleId = roleId;
}
public String getRoleName() {
return roleName;
}
public void setRoleName(String roleName) {
this.roleName = roleName;
}
public LocalDateTime getCreateTime() {
return createTime;
}
public void setCreateTime(LocalDateTime createTime) {
this.createTime = createTime;
}
public LocalDateTime getModifyTime() {
return modifyTime;
}
public void setModifyTime(LocalDateTime modifyTime) {
this.modifyTime = modifyTime;
}
public Integer getDeleted() {
return deleted;
}
public void setDeleted(Integer deleted) {
this.deleted = deleted;
}
@Override
protected Serializable pkVal() {
return this.roleId;
}
@Override
public String toString() {
return "SysRole{" +
"roleId=" + roleId +
", roleName='" + roleName + '\'' +
", createTime=" + createTime +
", modifyTime=" + modifyTime +
", deleted=" + deleted +
'}';
}
}
| 1,813 | 0.605396 | 0.604272 | 82 | 20.695122 | 18.173077 | 61 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.329268 | false | false |
3
|
a068353152c6852e5286f0249ee96a6d069e4e7c
| 36,575,941,496,593 |
86e4d51c54ee41a067617983787a2ac66fbc86f6
|
/src/main/java/com/aavu/client/domain/commands/SaveDatesCommand.java
|
a479fc19d4eb2bef5cc4602627627fbfeb699e76
|
[] |
no_license
|
jdwyah/orig-myhippocampus
|
https://github.com/jdwyah/orig-myhippocampus
|
2385db944128365fb0b3cc6eed414af7c87fdfa0
|
1b89f63f5ddb083ab6a8fb1b47cab24d7f5f931d
|
refs/heads/master
| 2022-12-20T21:14:23.561000 | 2007-12-14T23:56:06 | 2007-12-14T23:56:06 | 150,791 | 1 | 0 | null | false | 2022-12-15T23:23:14 | 2009-03-14T15:00:45 | 2019-08-13T14:09:20 | 2022-12-15T23:23:12 | 119,174 | 2 | 0 | 4 |
Java
| false | false |
package com.aavu.client.domain.commands;
import java.io.Serializable;
import java.util.Date;
import com.aavu.client.domain.Topic;
public class SaveDatesCommand extends AbstractCommand implements Serializable {
private Date startDate;
private Date endDate;
public SaveDatesCommand() {
};
public SaveDatesCommand(Topic topic, Date startDate) {
this(topic, startDate, null);
}
public SaveDatesCommand(Topic topic, Date startDate, Date endDate) {
super(topic);
this.startDate = startDate;
this.endDate = endDate;
}
// @Override
public void executeCommand() {
getTopic(0).setCreated(startDate);
if (getTopic(0).usesLastUpdated()) {
getTopic(0).setLastUpdated(endDate);
}
}
// @Override
public String toString() {
return "SaveDatesCommand ID " + getTopicID(0) + " " + startDate + " " + endDate;
}
}
|
UTF-8
|
Java
| 881 |
java
|
SaveDatesCommand.java
|
Java
|
[] | null |
[] |
package com.aavu.client.domain.commands;
import java.io.Serializable;
import java.util.Date;
import com.aavu.client.domain.Topic;
public class SaveDatesCommand extends AbstractCommand implements Serializable {
private Date startDate;
private Date endDate;
public SaveDatesCommand() {
};
public SaveDatesCommand(Topic topic, Date startDate) {
this(topic, startDate, null);
}
public SaveDatesCommand(Topic topic, Date startDate, Date endDate) {
super(topic);
this.startDate = startDate;
this.endDate = endDate;
}
// @Override
public void executeCommand() {
getTopic(0).setCreated(startDate);
if (getTopic(0).usesLastUpdated()) {
getTopic(0).setLastUpdated(endDate);
}
}
// @Override
public String toString() {
return "SaveDatesCommand ID " + getTopicID(0) + " " + startDate + " " + endDate;
}
}
| 881 | 0.68672 | 0.682179 | 42 | 18.976191 | 22.152596 | 82 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.238095 | false | false |
3
|
d7443a1e02c6927e9dc740318f79699e503c6b48
| 34,969,623,738,349 |
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
|
/methods/Method_1006330.java
|
76bf05248c0738cc8ec028bba0aa6af78962775b
|
[] |
no_license
|
P79N6A/icse_20_user_study
|
https://github.com/P79N6A/icse_20_user_study
|
5b9c42c6384502fdc9588430899f257761f1f506
|
8a3676bc96059ea2c4f6d209016f5088a5628f3c
|
refs/heads/master
| 2020-06-24T08:25:22.606000 | 2019-07-25T15:31:16 | 2019-07-25T15:31:16 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
private int advance(ShortIterator it){
if (it.hasNext()) {
return toIntUnsigned(it.next());
}
else {
return -1;
}
}
|
UTF-8
|
Java
| 131 |
java
|
Method_1006330.java
|
Java
|
[] | null |
[] |
private int advance(ShortIterator it){
if (it.hasNext()) {
return toIntUnsigned(it.next());
}
else {
return -1;
}
}
| 131 | 0.603053 | 0.59542 | 8 | 15.375 | 13.936799 | 38 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | false | false |
3
|
a7aa8160b3002235ccba523ab58aad89be0824b9
| 37,177,236,914,730 |
430ec09e54f65199b7e313d34eaf43222d87bfbe
|
/app/src/main/java/com/example/miracle/financehelp/widget/PaymentDialog.java
|
15c71476b2a9865928f6e947a075d0569739779b
|
[] |
no_license
|
Just-Maybe/Financehelp
|
https://github.com/Just-Maybe/Financehelp
|
121aaaeff44e61d1956b81c7b57e8fa477a5713e
|
eef75f928caad566f4858dcf20e9ddcce1724037
|
refs/heads/master
| 2021-07-17T01:49:59.028000 | 2017-10-18T09:30:18 | 2017-10-18T09:30:18 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.example.miracle.financehelp.widget;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.IdRes;
import android.support.annotation.NonNull;
import android.view.View;
import android.widget.Button;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import com.example.miracle.financehelp.R;
import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;
public class PaymentDialog
extends Dialog {
public static final String WEIXIN = "微信";
public static final String XIANJIN = "现金";
public static final String YINHANGKA = "银行卡";
public static final String ZHIFUBAO = "支付宝";
public OnSelectedListener listener;
@Bind(R.id.weixin)
RadioButton weixin;
@Bind(R.id.zhifubao)
RadioButton zhifubao;
@Bind(R.id.xianjin)
RadioButton xianjin;
@Bind(R.id.yinhangka)
RadioButton yinhangka;
@Bind(R.id.selectedBtn)
Button selectedBtn;
@Bind(R.id.cancelBtn)
Button cancelBtn;
@Bind(R.id.radioGroup)
RadioGroup radioGroup;
private String payment;
public PaymentDialog(@NonNull Context paramContext) {
super(paramContext);
}
private void setupRadioGroup() {
// this.radioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
// public void onCheckedChanged(RadioGroup paramAnonymousRadioGroup, @IdRes int paramAnonymousInt) {
// switch (paramAnonymousInt) {
// default:
// return;
// case 2131624151:
// PaymentDialog.access$002(PaymentDialog.this, "微信");
// PaymentDialog.this.listener.onSelected(PaymentDialog.this.payment);
// return;
// case 2131624154:
// PaymentDialog.access$002(PaymentDialog.this, "银行卡");
// PaymentDialog.this.listener.onSelected(PaymentDialog.this.payment);
// return;
// case 2131624152:
// PaymentDialog.access$002(PaymentDialog.this, "支付宝");
// PaymentDialog.this.listener.onSelected(PaymentDialog.this.payment);
// return;
// }
// PaymentDialog.access$002(PaymentDialog.this, "现金");
// PaymentDialog.this.listener.onSelected(PaymentDialog.this.payment);
// }
// });
radioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup radioGroup, @IdRes int i) {
switch (i) {
case R.id.weixin:
payment = WEIXIN;
weixin.setChecked(true);
listener.onSelected(payment);
break;
case R.id.yinhangka:
payment = YINHANGKA;
yinhangka.setChecked(true);
listener.onSelected(payment);
break;
case R.id.zhifubao:
payment = ZHIFUBAO;
zhifubao.setChecked(true);
listener.onSelected(payment);
break;
case R.id.xianjin:
payment = XIANJIN;
xianjin.setChecked(true);
listener.onSelected(payment);
break;
}
}
});
}
protected void onCreate(Bundle paramBundle) {
super.onCreate(paramBundle);
setContentView(R.layout.dialog_payment_selector);
setCanceledOnTouchOutside(true);
setCancelable(true);
ButterKnife.bind(this, this);
setupRadioGroup();
}
@OnClick({R.id.selectedBtn, R.id.cancelBtn})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.selectedBtn:
listener.onPositiveBtnClick(payment);
break;
case R.id.cancelBtn:
listener.onCancelBtnClick();
break;
}
}
public void setOnSelectedListener(OnSelectedListener listener) {
this.listener = listener;
}
public interface OnSelectedListener {
void onCancelBtnClick();
void onPositiveBtnClick(String payment);
void onSelected(String payment);
}
}
|
UTF-8
|
Java
| 4,646 |
java
|
PaymentDialog.java
|
Java
|
[] | null |
[] |
package com.example.miracle.financehelp.widget;
import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.IdRes;
import android.support.annotation.NonNull;
import android.view.View;
import android.widget.Button;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import com.example.miracle.financehelp.R;
import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;
public class PaymentDialog
extends Dialog {
public static final String WEIXIN = "微信";
public static final String XIANJIN = "现金";
public static final String YINHANGKA = "银行卡";
public static final String ZHIFUBAO = "支付宝";
public OnSelectedListener listener;
@Bind(R.id.weixin)
RadioButton weixin;
@Bind(R.id.zhifubao)
RadioButton zhifubao;
@Bind(R.id.xianjin)
RadioButton xianjin;
@Bind(R.id.yinhangka)
RadioButton yinhangka;
@Bind(R.id.selectedBtn)
Button selectedBtn;
@Bind(R.id.cancelBtn)
Button cancelBtn;
@Bind(R.id.radioGroup)
RadioGroup radioGroup;
private String payment;
public PaymentDialog(@NonNull Context paramContext) {
super(paramContext);
}
private void setupRadioGroup() {
// this.radioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
// public void onCheckedChanged(RadioGroup paramAnonymousRadioGroup, @IdRes int paramAnonymousInt) {
// switch (paramAnonymousInt) {
// default:
// return;
// case 2131624151:
// PaymentDialog.access$002(PaymentDialog.this, "微信");
// PaymentDialog.this.listener.onSelected(PaymentDialog.this.payment);
// return;
// case 2131624154:
// PaymentDialog.access$002(PaymentDialog.this, "银行卡");
// PaymentDialog.this.listener.onSelected(PaymentDialog.this.payment);
// return;
// case 2131624152:
// PaymentDialog.access$002(PaymentDialog.this, "支付宝");
// PaymentDialog.this.listener.onSelected(PaymentDialog.this.payment);
// return;
// }
// PaymentDialog.access$002(PaymentDialog.this, "现金");
// PaymentDialog.this.listener.onSelected(PaymentDialog.this.payment);
// }
// });
radioGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(RadioGroup radioGroup, @IdRes int i) {
switch (i) {
case R.id.weixin:
payment = WEIXIN;
weixin.setChecked(true);
listener.onSelected(payment);
break;
case R.id.yinhangka:
payment = YINHANGKA;
yinhangka.setChecked(true);
listener.onSelected(payment);
break;
case R.id.zhifubao:
payment = ZHIFUBAO;
zhifubao.setChecked(true);
listener.onSelected(payment);
break;
case R.id.xianjin:
payment = XIANJIN;
xianjin.setChecked(true);
listener.onSelected(payment);
break;
}
}
});
}
protected void onCreate(Bundle paramBundle) {
super.onCreate(paramBundle);
setContentView(R.layout.dialog_payment_selector);
setCanceledOnTouchOutside(true);
setCancelable(true);
ButterKnife.bind(this, this);
setupRadioGroup();
}
@OnClick({R.id.selectedBtn, R.id.cancelBtn})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.selectedBtn:
listener.onPositiveBtnClick(payment);
break;
case R.id.cancelBtn:
listener.onCancelBtnClick();
break;
}
}
public void setOnSelectedListener(OnSelectedListener listener) {
this.listener = listener;
}
public interface OnSelectedListener {
void onCancelBtnClick();
void onPositiveBtnClick(String payment);
void onSelected(String payment);
}
}
| 4,646 | 0.569475 | 0.560356 | 131 | 34.160305 | 22.930302 | 111 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.610687 | false | false |
3
|
5097c1ae6115680360dda343dca9e68e53de10d7
| 22,643,067,628,240 |
9ff7f266250e0b9ab7a8809f85747a6eebc0ba83
|
/RuleEngine/src/main/java/com/view/analytics/batchrules/service/impl/BatchRulesServiceImpl.java
|
5c9c454be930a758ca2a956bd907550da2ca44dd
|
[] |
no_license
|
Ravi-Rsankar/GitRepo
|
https://github.com/Ravi-Rsankar/GitRepo
|
ade1d5b350dd25be23d214f68449575dbb83375f
|
72db5a44630802ed271780ad6f99612242eb04a1
|
refs/heads/master
| 2017-11-02T08:16:16.356000 | 2017-08-09T10:06:36 | 2017-08-09T10:06:36 | 64,459,314 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.view.analytics.batchrules.service.impl;
import java.util.ArrayList;
import java.util.List;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.stereotype.Service;
import com.view.analytics.batchrules.dao.BatchRulesDAO;
import com.view.analytics.batchrules.dao.impl.BatchRulesDAOImpl;
import com.view.analytics.batchrules.pojo.BatchResponse;
import com.view.analytics.batchrules.service.BatchRulesService;
@Service
public class BatchRulesServiceImpl implements BatchRulesService{
private static Logger logger = LogManager.getLogger(BatchRulesServiceImpl.class.getName());
private BatchRulesDAO batchRulesDao = new BatchRulesDAOImpl();
@Override
public String addBatchRule(String json) throws Exception {
String batch = null;
JSONArray array = new JSONArray();
try{
JSONObject jsonObj=new JSONObject();
JSONArray jArray = new JSONArray(json);
for(int i=0;i<jArray.length();i++){
jsonObj = jArray.getJSONObject(i);
jsonObj.put("status", "in queue");
jsonObj.put("taskcount", "");
jsonObj.put("exectime", "");
array.put(jsonObj);
}
batch=batchRulesDao.addBatchRule(array.toString());
}catch(Exception e){
e.printStackTrace();
}
return batch;
}
@Override
public BatchResponse getBatchRule(int batchId) throws Exception {
BatchResponse jobs = new BatchResponse();
try{
jobs =batchRulesDao.getBatchRule(batchId);
}catch(Exception r){
r.printStackTrace();
}
return jobs;
}
@Override
public String updateBatchRule(String batchId, String json) throws Exception {
try{
batchRulesDao.update(batchId,json);
}catch(Exception e){
e.printStackTrace();
}
return null;
}
@Override
public List<Integer> getBatchRule() throws Exception {
List<Integer> batchIds = new ArrayList<>();
try{
batchIds =batchRulesDao.getBatchRule();
}catch(Exception r){
r.printStackTrace();
}
return batchIds;
}
}
|
UTF-8
|
Java
| 2,029 |
java
|
BatchRulesServiceImpl.java
|
Java
|
[] | null |
[] |
package com.view.analytics.batchrules.service.impl;
import java.util.ArrayList;
import java.util.List;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.json.JSONArray;
import org.json.JSONObject;
import org.springframework.stereotype.Service;
import com.view.analytics.batchrules.dao.BatchRulesDAO;
import com.view.analytics.batchrules.dao.impl.BatchRulesDAOImpl;
import com.view.analytics.batchrules.pojo.BatchResponse;
import com.view.analytics.batchrules.service.BatchRulesService;
@Service
public class BatchRulesServiceImpl implements BatchRulesService{
private static Logger logger = LogManager.getLogger(BatchRulesServiceImpl.class.getName());
private BatchRulesDAO batchRulesDao = new BatchRulesDAOImpl();
@Override
public String addBatchRule(String json) throws Exception {
String batch = null;
JSONArray array = new JSONArray();
try{
JSONObject jsonObj=new JSONObject();
JSONArray jArray = new JSONArray(json);
for(int i=0;i<jArray.length();i++){
jsonObj = jArray.getJSONObject(i);
jsonObj.put("status", "in queue");
jsonObj.put("taskcount", "");
jsonObj.put("exectime", "");
array.put(jsonObj);
}
batch=batchRulesDao.addBatchRule(array.toString());
}catch(Exception e){
e.printStackTrace();
}
return batch;
}
@Override
public BatchResponse getBatchRule(int batchId) throws Exception {
BatchResponse jobs = new BatchResponse();
try{
jobs =batchRulesDao.getBatchRule(batchId);
}catch(Exception r){
r.printStackTrace();
}
return jobs;
}
@Override
public String updateBatchRule(String batchId, String json) throws Exception {
try{
batchRulesDao.update(batchId,json);
}catch(Exception e){
e.printStackTrace();
}
return null;
}
@Override
public List<Integer> getBatchRule() throws Exception {
List<Integer> batchIds = new ArrayList<>();
try{
batchIds =batchRulesDao.getBatchRule();
}catch(Exception r){
r.printStackTrace();
}
return batchIds;
}
}
| 2,029 | 0.741745 | 0.740266 | 79 | 24.683544 | 22.547022 | 92 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 2.050633 | false | false |
3
|
540fbbd509cc3f94e8c8e938f01cd093c866b9fd
| 4,879,082,907,000 |
ffee96d08ef70627194dcb8b73a2fdabbe6aa4f9
|
/src/main/java/de/ropemc/api/wrapper/net/minecraft/block/BlockLeavesBase.java
|
ae57f712d0d28b86be586ff1a33389bdb81d6865
|
[
"MIT"
] |
permissive
|
RopeMC/RopeMC
|
https://github.com/RopeMC/RopeMC
|
0db2b4dd78a1842708de69e2455b7e0f60e9b9c9
|
b464fb9a67e410355a6a498f2d6a2d3b0d022b3d
|
refs/heads/master
| 2021-07-09T18:04:37.632000 | 2019-01-02T21:48:17 | 2019-01-02T21:48:17 | 103,042,886 | 11 | 1 |
MIT
| false | 2018-11-24T16:06:35 | 2017-09-10T16:07:39 | 2018-11-24T16:02:20 | 2018-11-24T16:04:56 | 3,248 | 2 | 0 | 0 |
Java
| false | null |
package de.ropemc.api.wrapper.net.minecraft.block;
import de.ropemc.api.wrapper.net.minecraft.world.IBlockAccess;
import de.ropemc.api.wrapper.net.minecraft.util.BlockPos;
import de.ropemc.api.wrapper.net.minecraft.util.EnumFacing;
import de.ropemc.api.wrapper.WrappedClass;
@WrappedClass("net.minecraft.block.BlockLeavesBase")
public interface BlockLeavesBase {
boolean isOpaqueCube();
boolean shouldSideBeRendered(IBlockAccess var0, BlockPos var1, EnumFacing var2);
}
|
UTF-8
|
Java
| 483 |
java
|
BlockLeavesBase.java
|
Java
|
[] | null |
[] |
package de.ropemc.api.wrapper.net.minecraft.block;
import de.ropemc.api.wrapper.net.minecraft.world.IBlockAccess;
import de.ropemc.api.wrapper.net.minecraft.util.BlockPos;
import de.ropemc.api.wrapper.net.minecraft.util.EnumFacing;
import de.ropemc.api.wrapper.WrappedClass;
@WrappedClass("net.minecraft.block.BlockLeavesBase")
public interface BlockLeavesBase {
boolean isOpaqueCube();
boolean shouldSideBeRendered(IBlockAccess var0, BlockPos var1, EnumFacing var2);
}
| 483 | 0.809524 | 0.803313 | 15 | 31.200001 | 28.145336 | 84 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.6 | false | false |
3
|
283a6680b680e7abd6e492bff7c29ec90bf2e11d
| 23,519,240,981,480 |
0169c346b441c4e01f04e09eaf2d967d797ed5fb
|
/oep/SmartWorkplace/src/event/UnregisterOccupancyEvent.java
|
3248806c5b44d53ab7ecd2b2a5f870d36ac6789c
|
[] |
no_license
|
riperen/IoTChallenge
|
https://github.com/riperen/IoTChallenge
|
c4ff2aa8b7d8d45aa692f1c5ffae8718ec689630
|
141d5ba0001f527b1005a75f42f489dd5e704cd4
|
refs/heads/master
| 2020-04-26T23:21:12.849000 | 2014-05-28T14:29:28 | 2014-05-28T14:29:28 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
/* (c) 2014 AMIS. All rights reserved. */
package event;
import org.json.simple.JSONObject;
public class UnregisterOccupancyEvent {
private String cardId;
private String deviceId;
private String json="";
public UnregisterOccupancyEvent(String cardId, String deviceId) {
super();
this.cardId = cardId;
this.deviceId = deviceId;
this.json=this.toJSON();
}
public UnregisterOccupancyEvent(Object cardId, Object deviceId) {
super();
this.cardId = cardId.toString();
this.deviceId = deviceId.toString();
this.json=this.toJSON();
}
public String toJSON() {
JSONObject o = new JSONObject();
o.put("cardId", this.cardId.toString());
o.put("deviceId", this.deviceId);
return o.toJSONString();
}
public String getCardId() {
return cardId;
}
public void setCardId(String cardId) {
this.cardId = cardId;
}
public String getDeviceId() {
return deviceId;
}
public void setDeviceId(String deviceId) {
this.deviceId = deviceId;
}
public String getJson() {
return json;
}
public void setJson(String json) {
this.json = json;
}
public String toString() {
return "Occupancy [ cardID = " +this.cardId + ", deviceId = " + this.deviceId;
}
}
|
UTF-8
|
Java
| 1,271 |
java
|
UnregisterOccupancyEvent.java
|
Java
|
[
{
"context": "/* (c) 2014 AMIS. All rights reserved. */\r\npackage event;\r\n\r\nim",
"end": 14,
"score": 0.5987181663513184,
"start": 12,
"tag": "NAME",
"value": "AM"
}
] | null |
[] |
/* (c) 2014 AMIS. All rights reserved. */
package event;
import org.json.simple.JSONObject;
public class UnregisterOccupancyEvent {
private String cardId;
private String deviceId;
private String json="";
public UnregisterOccupancyEvent(String cardId, String deviceId) {
super();
this.cardId = cardId;
this.deviceId = deviceId;
this.json=this.toJSON();
}
public UnregisterOccupancyEvent(Object cardId, Object deviceId) {
super();
this.cardId = cardId.toString();
this.deviceId = deviceId.toString();
this.json=this.toJSON();
}
public String toJSON() {
JSONObject o = new JSONObject();
o.put("cardId", this.cardId.toString());
o.put("deviceId", this.deviceId);
return o.toJSONString();
}
public String getCardId() {
return cardId;
}
public void setCardId(String cardId) {
this.cardId = cardId;
}
public String getDeviceId() {
return deviceId;
}
public void setDeviceId(String deviceId) {
this.deviceId = deviceId;
}
public String getJson() {
return json;
}
public void setJson(String json) {
this.json = json;
}
public String toString() {
return "Occupancy [ cardID = " +this.cardId + ", deviceId = " + this.deviceId;
}
}
| 1,271 | 0.652242 | 0.649095 | 63 | 18.174603 | 18.542562 | 80 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.587302 | false | false |
3
|
5cafeb9857d558a5c2f2aaa8de26fd1a1a510acd
| 35,725,537,990,986 |
951c9fd9a6fbab3ca989621e1959b50c6f538b07
|
/app/src/main/java/com/sdh/interviewvideotest/PhoneService.java
|
713aac252443eca0ee3fe3b807dbf3e0d86d35c0
|
[] |
no_license
|
wherego/RxjavaAndRetrofitAndVolleySelf
|
https://github.com/wherego/RxjavaAndRetrofitAndVolleySelf
|
1852aef06f030f8dedc401c94ef71ec4b4d0e75d
|
ba394eabb8640339198d239ee245c667b0d181b9
|
refs/heads/master
| 2021-01-20T14:55:26.874000 | 2016-10-21T12:33:06 | 2016-10-21T12:33:06 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.sdh.interviewvideotest;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.Path;
import retrofit2.http.Query;
/**
* Created by sdh on 2016/10/20.
*/
public interface PhoneService {
@GET("/apistore/mobilenumber/mobilenumber")
Call<PhoneResult> getResult(@Header("apikey") String apikey, @Query("phone") String phone);
@GET("/users/{user}")
Call<Test2> repo(@Path("user") String user);
}
|
UTF-8
|
Java
| 502 |
java
|
PhoneService.java
|
Java
|
[
{
"context": "h;\nimport retrofit2.http.Query;\n\n/**\n * Created by sdh on 2016/10/20.\n */\n\npublic interface PhoneService",
"end": 227,
"score": 0.9995549917221069,
"start": 224,
"tag": "USERNAME",
"value": "sdh"
}
] | null |
[] |
package com.sdh.interviewvideotest;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.Path;
import retrofit2.http.Query;
/**
* Created by sdh on 2016/10/20.
*/
public interface PhoneService {
@GET("/apistore/mobilenumber/mobilenumber")
Call<PhoneResult> getResult(@Header("apikey") String apikey, @Query("phone") String phone);
@GET("/users/{user}")
Call<Test2> repo(@Path("user") String user);
}
| 502 | 0.729084 | 0.699203 | 20 | 24.1 | 22.571886 | 95 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.5 | false | false |
3
|
712bf7306e66d86c7630719c69317334cdad29d5
| 1,236,950,621,907 |
09853b4206b186069d7a595a9a2707df44f57987
|
/StudentManagerPrj_Java8/src/kosta/student/service/AddScore.java
|
8f84b9a9f8a44e148d45d8afc8562936b13e8dfa
|
[] |
no_license
|
Jooyeop-Park/StudentManagement
|
https://github.com/Jooyeop-Park/StudentManagement
|
0193fdb38e49b2c27a6d6ee68377b75f1f341f85
|
e1d7b7a89bc6cd1cdf57a228432a8105c31498ae
|
refs/heads/master
| 2021-01-02T08:53:42.027000 | 2017-08-02T08:01:24 | 2017-08-02T08:01:24 | 99,088,740 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package kosta.student.service;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Scanner;
//import kosta.collection.list.Car;
import kosta.student.manage.StudentManager;
import kosta.student.vo.Student;
public class AddScore implements StudentService {
@Override
public void execute(Scanner scan) {
// TODO Auto-generated method stub
LinkedList<Student> list = StudentManager.getList("1");
System.out.print("번호 : ");
int num = scan.nextInt();
System.out.print("점수 : ");
int score = scan.nextInt();
Iterator<Student> it = list.iterator();
while(it.hasNext()){
Student s = it.next();
if(num == s.getNum()) {
s.setScore(score);
System.out.println(num + "번 학생의 성적이 등록되었습니다. \n");
SearchStudent searchs = new SearchStudent();
searchs.printStudentWithHeader(s);
}
} // end of while
} // end of execute()
} // end of class
|
UTF-8
|
Java
| 985 |
java
|
AddScore.java
|
Java
|
[] | null |
[] |
package kosta.student.service;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Scanner;
//import kosta.collection.list.Car;
import kosta.student.manage.StudentManager;
import kosta.student.vo.Student;
public class AddScore implements StudentService {
@Override
public void execute(Scanner scan) {
// TODO Auto-generated method stub
LinkedList<Student> list = StudentManager.getList("1");
System.out.print("번호 : ");
int num = scan.nextInt();
System.out.print("점수 : ");
int score = scan.nextInt();
Iterator<Student> it = list.iterator();
while(it.hasNext()){
Student s = it.next();
if(num == s.getNum()) {
s.setScore(score);
System.out.println(num + "번 학생의 성적이 등록되었습니다. \n");
SearchStudent searchs = new SearchStudent();
searchs.printStudentWithHeader(s);
}
} // end of while
} // end of execute()
} // end of class
| 985 | 0.651212 | 0.650158 | 42 | 20.595238 | 17.271032 | 57 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.714286 | false | false |
3
|
52f7f6142a49edf10adfd836df1608147b68dc6a
| 22,600,117,930,969 |
ee86908a2127ddd0627668c68997f6a2045a5c33
|
/Lab3-MueblesDeLosAlpes-ejb/src/java/com/losalpes/servicios/ServicioVendedoresMock.java
|
0e07ddea69a4bea0eff5f6da0d0cebffb26f0ce0
|
[
"MIT"
] |
permissive
|
xdeamx/lab6mbd
|
https://github.com/xdeamx/lab6mbd
|
4e6534aa874095534a3ae3f09e29a36f79662909
|
1e667867dc2a6639966329fd4f6284531055d437
|
refs/heads/master
| 2016-09-05T13:29:15.670000 | 2014-10-26T14:50:29 | 2014-10-26T14:50:29 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
/**
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* $Id$ ServicioVendedoresMock.java
* Universidad de los Andes (Bogotá - Colombia)
* Departamento de Ingeniería de Sistemas y Computación
* Licenciado bajo el esquema Academic Free License version 3.0
*
* Ejercicio: Muebles de los Alpes
* Autor: Juan Sebastián Urrego
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
package com.losalpes.servicios;
import com.losalpes.entities.Vendedor;
import com.losalpes.excepciones.OperacionInvalidaException;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.Resource;
import javax.ejb.EJB;
import javax.ejb.Stateful;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageProducer;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.jms.Topic;
/**
* Implementación de los servicios de administración de un vendedor en el sistema
* @author Juan Sebastián Urrego
*/
@Stateful
public class ServicioVendedoresMock implements IServicioVendedoresMockRemote, IServicioVendedoresMockLocal {
//-----------------------------------------------------------
// Atributos
//-----------------------------------------------------------
/**
* Interface con referencia al servicio de persistencia en el sistema
*/
@EJB
private IServicioPersistenciaMockLocal persistencia;
@Resource(mappedName="jms/cambioDeCargoTopicFactory")
private ConnectionFactory connectionFactory;
@Resource(mappedName="jms/cambioDeCargoTopic")
private Topic topic;
private Vendedor cVendedor;
//-----------------------------------------------------------
// Constructor
//-----------------------------------------------------------
/**
* Constructor de la clase sin argumentos
*/
public ServicioVendedoresMock()
{
}
//-----------------------------------------------------------
// Métodos
//-----------------------------------------------------------
/**
* Agrega un vendedor al sistema
* @param vendedor Nuevo vendedor
* @throws OperacionInvalidaException Excepción lanzada en caso de error
*/
@Override
public void agregarVendedor(Vendedor vendedor) throws OperacionInvalidaException
{
try
{
cVendedor=vendedor;
persistencia.create(vendedor);
}
catch (OperacionInvalidaException ex)
{
throw new OperacionInvalidaException(ex.getMessage());
}
try
{
notificarModificacionVendedor();
} catch (JMSException ex)
{
Logger.getLogger(ServicioVendedoresMock.class.getName()).log(Level.SEVERE, "Error "
+ "enviando la notificación de creación de un vendedor", ex);
}
}
/**
* Elimina un vendedor del sistema dado su ID
* @param id Identificador único del vendedor
* @throws OperacionInvalidaException Excepción lanzada en caso de error
*/
@Override
public void eliminarVendedor(long id) throws OperacionInvalidaException
{
Vendedor v=(Vendedor) persistencia.findById(Vendedor.class, id);
try
{
persistencia.delete(v);
} catch (OperacionInvalidaException ex)
{
throw new OperacionInvalidaException(ex.getMessage());
}
}
/**
* Devuelve todos los vendedores del sistema
* @return vendedores Vendedores del sistema
*/
@Override
public List<Vendedor> getVendedores()
{
return persistencia.findAll(Vendedor.class);
}
private Message createModificacionVendendorMessage(Session session) throws JMSException
{
String msg = "Vendedor: " + cVendedor.getNombres()+" "+cVendedor.getApellidos() + "\n";
msg += "Cargo: " + cVendedor.getPerfil() + "\n";
msg += "Salario: " + cVendedor.getSalario() + "\n";
TextMessage tm = session.createTextMessage();
tm.setText(msg);
return tm;
}
private void notificarModificacionVendedor() throws JMSException
{
Connection connection = connectionFactory.createConnection();
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageProducer messageProducer = session.createProducer((Destination) topic);
try
{
messageProducer.send(createModificacionVendendorMessage(session));
}
catch (JMSException ex)
{
Logger.getLogger(ServicioVendedoresMock.class.getName()).log(Level.SEVERE, null, ex);
}
finally
{
if (session != null)
{
try
{
session.close();
}
catch (JMSException e)
{
Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "Error cerrando la"
+ " sesión", e);
}
}
if (connection != null) {
connection.close();
}
}
}
}
|
UTF-8
|
Java
| 5,341 |
java
|
ServicioVendedoresMock.java
|
Java
|
[
{
"context": ".0\n *\n * Ejercicio: Muebles de los Alpes\n * Autor: Juan Sebastián Urrego\n * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~",
"end": 348,
"score": 0.9999125599861145,
"start": 327,
"tag": "NAME",
"value": "Juan Sebastián Urrego"
},
{
"context": "nistración de un vendedor en el sistema\n * @author Juan Sebastián Urrego\n */\n@Stateful\npublic class ServicioVendedoresMock",
"end": 1114,
"score": 0.9999135732650757,
"start": 1093,
"tag": "NAME",
"value": "Juan Sebastián Urrego"
}
] | null |
[] |
/**
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* $Id$ ServicioVendedoresMock.java
* Universidad de los Andes (Bogotá - Colombia)
* Departamento de Ingeniería de Sistemas y Computación
* Licenciado bajo el esquema Academic Free License version 3.0
*
* Ejercicio: Muebles de los Alpes
* Autor: <NAME>
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
package com.losalpes.servicios;
import com.losalpes.entities.Vendedor;
import com.losalpes.excepciones.OperacionInvalidaException;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.annotation.Resource;
import javax.ejb.EJB;
import javax.ejb.Stateful;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageProducer;
import javax.jms.Session;
import javax.jms.TextMessage;
import javax.jms.Topic;
/**
* Implementación de los servicios de administración de un vendedor en el sistema
* @author <NAME>
*/
@Stateful
public class ServicioVendedoresMock implements IServicioVendedoresMockRemote, IServicioVendedoresMockLocal {
//-----------------------------------------------------------
// Atributos
//-----------------------------------------------------------
/**
* Interface con referencia al servicio de persistencia en el sistema
*/
@EJB
private IServicioPersistenciaMockLocal persistencia;
@Resource(mappedName="jms/cambioDeCargoTopicFactory")
private ConnectionFactory connectionFactory;
@Resource(mappedName="jms/cambioDeCargoTopic")
private Topic topic;
private Vendedor cVendedor;
//-----------------------------------------------------------
// Constructor
//-----------------------------------------------------------
/**
* Constructor de la clase sin argumentos
*/
public ServicioVendedoresMock()
{
}
//-----------------------------------------------------------
// Métodos
//-----------------------------------------------------------
/**
* Agrega un vendedor al sistema
* @param vendedor Nuevo vendedor
* @throws OperacionInvalidaException Excepción lanzada en caso de error
*/
@Override
public void agregarVendedor(Vendedor vendedor) throws OperacionInvalidaException
{
try
{
cVendedor=vendedor;
persistencia.create(vendedor);
}
catch (OperacionInvalidaException ex)
{
throw new OperacionInvalidaException(ex.getMessage());
}
try
{
notificarModificacionVendedor();
} catch (JMSException ex)
{
Logger.getLogger(ServicioVendedoresMock.class.getName()).log(Level.SEVERE, "Error "
+ "enviando la notificación de creación de un vendedor", ex);
}
}
/**
* Elimina un vendedor del sistema dado su ID
* @param id Identificador único del vendedor
* @throws OperacionInvalidaException Excepción lanzada en caso de error
*/
@Override
public void eliminarVendedor(long id) throws OperacionInvalidaException
{
Vendedor v=(Vendedor) persistencia.findById(Vendedor.class, id);
try
{
persistencia.delete(v);
} catch (OperacionInvalidaException ex)
{
throw new OperacionInvalidaException(ex.getMessage());
}
}
/**
* Devuelve todos los vendedores del sistema
* @return vendedores Vendedores del sistema
*/
@Override
public List<Vendedor> getVendedores()
{
return persistencia.findAll(Vendedor.class);
}
private Message createModificacionVendendorMessage(Session session) throws JMSException
{
String msg = "Vendedor: " + cVendedor.getNombres()+" "+cVendedor.getApellidos() + "\n";
msg += "Cargo: " + cVendedor.getPerfil() + "\n";
msg += "Salario: " + cVendedor.getSalario() + "\n";
TextMessage tm = session.createTextMessage();
tm.setText(msg);
return tm;
}
private void notificarModificacionVendedor() throws JMSException
{
Connection connection = connectionFactory.createConnection();
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
MessageProducer messageProducer = session.createProducer((Destination) topic);
try
{
messageProducer.send(createModificacionVendendorMessage(session));
}
catch (JMSException ex)
{
Logger.getLogger(ServicioVendedoresMock.class.getName()).log(Level.SEVERE, null, ex);
}
finally
{
if (session != null)
{
try
{
session.close();
}
catch (JMSException e)
{
Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "Error cerrando la"
+ " sesión", e);
}
}
if (connection != null) {
connection.close();
}
}
}
}
| 5,309 | 0.570114 | 0.569739 | 170 | 30.335295 | 27.103928 | 108 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.317647 | false | false |
3
|
215b37daedf385d664cadf6577ea3fae84232b68
| 26,465,588,495,086 |
3b970723c294d5db592a59d5597adafa2cce7883
|
/core/src/net/minecraft/stats/StatList.java
|
0f73dfe71e047efce0c8c077e9fb3e9f8069710b
|
[
"MIT"
] |
permissive
|
implario/implario
|
https://github.com/implario/implario
|
24b8b9164d19d64ba577d38fa7ca278a8e3bb6da
|
6d63aaeb806a393e5bf98962148e480678325cc3
|
refs/heads/master
| 2021-06-09T14:34:59.494000 | 2021-04-02T05:04:26 | 2021-04-02T05:04:26 | 148,982,726 | 4 | 5 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package net.minecraft.stats;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import net.minecraft.block.Block;
import net.minecraft.entity.EntityList;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.chat.ChatComponentTranslation;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class StatList {
protected static Map<String, StatBase> oneShotStats = Maps.newHashMap();
public static List<StatBase> allStats = new ArrayList<>();
public static List<StatBase> generalStats = new ArrayList<>();
public static List<StatCrafting> itemStats = new ArrayList<>();
public static List<StatCrafting> objectMineStats = new ArrayList<>();
public static StatBase
minutesPlayedStat = new StatBasic("stat.playOneMinute", StatFormatter.timeFormat).indepenpent().registerStat(),
timeSinceDeathStat = new StatBasic("stat.timeSinceDeath", StatFormatter.timeFormat).indepenpent().registerStat(),
distanceDoveStat = new StatBasic("stat.diveOneCm", StatFormatter.distanceFormat).indepenpent().registerStat(),
distanceWalkedStat = new StatBasic("stat.walkOneCm", StatFormatter.distanceFormat).indepenpent().registerStat(),
distanceCrouchedStat = new StatBasic("stat.crouchOneCm", StatFormatter.distanceFormat).indepenpent().registerStat(),
distanceSprintedStat = new StatBasic("stat.sprintOneCm", StatFormatter.distanceFormat).indepenpent().registerStat(),
distanceSwumStat = new StatBasic("stat.swimOneCm", StatFormatter.distanceFormat).indepenpent().registerStat(),
distanceFallenStat = new StatBasic("stat.fallOneCm", StatFormatter.distanceFormat).indepenpent().registerStat(),
distanceClimbedStat = new StatBasic("stat.climbOneCm", StatFormatter.distanceFormat).indepenpent().registerStat(),
distanceFlownStat = new StatBasic("stat.flyOneCm", StatFormatter.distanceFormat).indepenpent().registerStat(),
distanceByMinecartStat = new StatBasic("stat.minecartOneCm", StatFormatter.distanceFormat).indepenpent().registerStat(),
distanceByBoatStat = new StatBasic("stat.boatOneCm", StatFormatter.distanceFormat).indepenpent().registerStat(),
distanceByPigStat = new StatBasic("stat.pigOneCm", StatFormatter.distanceFormat).indepenpent().registerStat(),
distanceByHorseStat = new StatBasic("stat.horseOneCm", StatFormatter.distanceFormat).indepenpent().registerStat(),
damageDealtStat = new StatBasic("stat.damageDealt", StatFormatter.damageFormat).registerStat(),
damageTakenStat = new StatBasic("stat.damageTaken", StatFormatter.damageFormat).registerStat(),
leaveGameStat = new StatBasic("stat.leaveGame").indepenpent().registerStat(),
jumpStat = new StatBasic("stat.jump").indepenpent().registerStat(),
dropStat = new StatBasic("stat.drop").indepenpent().registerStat(),
deathsStat = new StatBasic("stat.deaths").registerStat(),
mobKillsStat = new StatBasic("stat.mobKills").registerStat(),
animalsBredStat = new StatBasic("stat.animalsBred").registerStat(),
playerKillsStat = new StatBasic("stat.playerKills").registerStat(),
fishCaughtStat = new StatBasic("stat.fishCaught").registerStat(),
junkFishedStat = new StatBasic("stat.junkFished").registerStat(),
treasureFishedStat = new StatBasic("stat.treasureFished").registerStat(),
timesTalkedToVillagerStat = new StatBasic("stat.talkedToVillager").registerStat(),
timesTradedWithVillagerStat = new StatBasic("stat.tradedWithVillager").registerStat(),
cakeSlicesEatenStat = new StatBasic("stat.cakeSlicesEaten").registerStat(),
cauldronFilledStat = new StatBasic("stat.cauldronFilled").registerStat(),
cauldronUsedStat = new StatBasic("stat.cauldronUsed").registerStat(),
armorCleanedStat = new StatBasic("stat.armorCleaned").registerStat(),
bannerCleanedStat = new StatBasic("stat.bannerCleaned").registerStat(),
brewingsOpenedStat = new StatBasic("stat.brewingstandInteraction").registerStat(),
beaconsOpenedStat = new StatBasic("stat.beaconInteraction").registerStat(),
droppersOpenedStat = new StatBasic("stat.dropperInspected").registerStat(),
hoppersOpenedStat = new StatBasic("stat.hopperInspected").registerStat(),
dispensersOpenedStat = new StatBasic("stat.dispenserInspected").registerStat(),
noteblockPlayedStat = new StatBasic("stat.noteblockPlayed").registerStat(),
noteblockTunedStat = new StatBasic("stat.noteblockTuned").registerStat(),
flowerPottedStat = new StatBasic("stat.flowerPotted").registerStat(),
trappedChestTriggeredStat = new StatBasic("stat.trappedChestTriggered").registerStat(),
enderChestOpenedStat = new StatBasic("stat.enderchestOpened").registerStat(),
itemsEnchantedStat = new StatBasic("stat.itemEnchanted").registerStat(),
recordsPlayedStat = new StatBasic("stat.recordPlayed").registerStat(),
furnacesOpenedStat = new StatBasic("stat.furnaceInteraction").registerStat(),
craftingTableOpenedStat = new StatBasic("stat.workbenchInteraction").registerStat(),
chestsOpenedStat = new StatBasic("stat.chestOpened").registerStat();
public static final StatBase[] mineBlockStatArray = new StatBase[4096];
/**
* Tracks the number of items a given block or item has been crafted.
*/
public static final StatBase[] objectCraftStats = new StatBase[32000];
/**
* Tracks the number of times a given block or item has been used.
*/
public static final StatBase[] objectUseStats = new StatBase[32000];
/**
* Tracks the number of times a given block or item has been broken.
*/
public static final StatBase[] objectBreakStats = new StatBase[32000];
public static void init() {
initMiningStats();
initStats();
initItemDepleteStats();
initCraftableStats();
AchievementList.init();
}
/**
* Initializes statistics related to craftable items. Is only called after both block and item stats have been
* initialized.
*/
private static void initCraftableStats() {
Set<Item> set = Sets.newHashSet();
for (IRecipe irecipe : CraftingManager.getInstance().getRecipeList()) {
if (irecipe.getRecipeOutput() != null) {
set.add(irecipe.getRecipeOutput().getItem());
}
}
for (ItemStack itemstack : FurnaceRecipes.instance().getSmeltingList().values()) {
set.add(itemstack.getItem());
}
for (Item item : set) {
if (item != null) {
int i = Item.getIdFromItem(item);
String s = func_180204_a(item);
if (s != null) {
objectCraftStats[i] = new StatCrafting("stat.craftItem.", s, new ChatComponentTranslation("stat.craftItem", new ItemStack(item).getChatComponent()), item).registerStat();
}
}
}
replaceAllSimilarBlocks(objectCraftStats);
}
private static void initMiningStats() {
for (Block block : Block.blockRegistry) {
Item item = Item.getItemFromBlock(block);
if (item != null) {
int i = Block.getIdFromBlock(block);
String s = func_180204_a(item);
if (s != null && block.getEnableStats()) {
mineBlockStatArray[i] = new StatCrafting("stat.mineBlock.", s, new ChatComponentTranslation("stat.mineBlock", new ItemStack(block).getChatComponent()), item).registerStat();
objectMineStats.add((StatCrafting) mineBlockStatArray[i]);
}
}
}
replaceAllSimilarBlocks(mineBlockStatArray);
}
private static void initStats() {
for (Item item : Item.itemRegistry) {
if (item != null) {
int i = Item.getIdFromItem(item);
String s = func_180204_a(item);
if (s != null) {
objectUseStats[i] = new StatCrafting("stat.useItem.", s, new ChatComponentTranslation("stat.useItem", new ItemStack(item).getChatComponent()), item).registerStat();
if (!(item instanceof ItemBlock)) {
itemStats.add((StatCrafting) objectUseStats[i]);
}
}
}
}
replaceAllSimilarBlocks(objectUseStats);
}
private static void initItemDepleteStats() {
for (Item item : Item.itemRegistry) {
if (item != null) {
int i = Item.getIdFromItem(item);
String s = func_180204_a(item);
if (s != null && item.isDamageable()) {
objectBreakStats[i] = new StatCrafting("stat.breakItem.", s, new ChatComponentTranslation("stat.breakItem", new ItemStack(item).getChatComponent()), item).registerStat();
}
}
}
replaceAllSimilarBlocks(objectBreakStats);
}
private static String func_180204_a(Item p_180204_0_) {
ResourceLocation resourcelocation = Item.itemRegistry.getNameForObject(p_180204_0_);
return resourcelocation != null ? resourcelocation.toString().replace(':', '.') : null;
}
/**
* Forces all dual blocks to count for each other on the stats list
*/
private static void replaceAllSimilarBlocks(StatBase[] p_75924_0_) {
mergeStatBases(p_75924_0_, Blocks.water, Blocks.flowing_water);
mergeStatBases(p_75924_0_, Blocks.lava, Blocks.flowing_lava);
mergeStatBases(p_75924_0_, Blocks.lit_pumpkin, Blocks.pumpkin);
mergeStatBases(p_75924_0_, Blocks.lit_furnace, Blocks.furnace);
mergeStatBases(p_75924_0_, Blocks.lit_redstone_ore, Blocks.redstone_ore);
mergeStatBases(p_75924_0_, Blocks.powered_repeater, Blocks.unpowered_repeater);
mergeStatBases(p_75924_0_, Blocks.powered_comparator, Blocks.unpowered_comparator);
mergeStatBases(p_75924_0_, Blocks.redstone_torch, Blocks.unlit_redstone_torch);
mergeStatBases(p_75924_0_, Blocks.lit_redstone_lamp, Blocks.redstone_lamp);
mergeStatBases(p_75924_0_, Blocks.double_stone_slab, Blocks.stone_slab);
mergeStatBases(p_75924_0_, Blocks.double_wooden_slab, Blocks.wooden_slab);
mergeStatBases(p_75924_0_, Blocks.double_stone_slab2, Blocks.stone_slab2);
mergeStatBases(p_75924_0_, Blocks.grass, Blocks.dirt);
mergeStatBases(p_75924_0_, Blocks.farmland, Blocks.dirt);
}
/**
* Merge {@link StatBase} object references for similar blocks
*/
private static void mergeStatBases(StatBase[] statBaseIn, Block a, Block b) {
int i = Block.getIdFromBlock(a);
int j = Block.getIdFromBlock(b);
if (statBaseIn[i] != null && statBaseIn[j] == null) {
statBaseIn[j] = statBaseIn[i];
} else {
allStats.remove(statBaseIn[i]);
objectMineStats.remove(statBaseIn[i]);
generalStats.remove(statBaseIn[i]);
statBaseIn[i] = statBaseIn[j];
}
}
public static StatBase createStatKillEntity(EntityList.EntityEggInfo eggInfo) {
String s = EntityList.getStringFromID(eggInfo.spawnedID);
return s == null ? null : new StatBase("stat.killEntity." + s, new ChatComponentTranslation("stat.entityKill", new ChatComponentTranslation("entity." + s + ".name"))).registerStat();
}
public static StatBase createStatEntityKilledBy(EntityList.EntityEggInfo eggInfo) {
String s = EntityList.getStringFromID(eggInfo.spawnedID);
return s == null ? null : new StatBase("stat.entityKilledBy." + s, new ChatComponentTranslation("stat.entityKilledBy", new ChatComponentTranslation("entity." + s + ".name"))).registerStat();
}
public static StatBase getOneShotStat(String p_151177_0_) {
return oneShotStats.get(p_151177_0_);
}
public static void unregister(StatBase stat) {
oneShotStats.remove(stat.statId);
allStats.remove(stat);
}
}
|
UTF-8
|
Java
| 11,291 |
java
|
StatList.java
|
Java
|
[] | null |
[] |
package net.minecraft.stats;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import net.minecraft.block.Block;
import net.minecraft.entity.EntityList;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.chat.ChatComponentTranslation;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Set;
public class StatList {
protected static Map<String, StatBase> oneShotStats = Maps.newHashMap();
public static List<StatBase> allStats = new ArrayList<>();
public static List<StatBase> generalStats = new ArrayList<>();
public static List<StatCrafting> itemStats = new ArrayList<>();
public static List<StatCrafting> objectMineStats = new ArrayList<>();
public static StatBase
minutesPlayedStat = new StatBasic("stat.playOneMinute", StatFormatter.timeFormat).indepenpent().registerStat(),
timeSinceDeathStat = new StatBasic("stat.timeSinceDeath", StatFormatter.timeFormat).indepenpent().registerStat(),
distanceDoveStat = new StatBasic("stat.diveOneCm", StatFormatter.distanceFormat).indepenpent().registerStat(),
distanceWalkedStat = new StatBasic("stat.walkOneCm", StatFormatter.distanceFormat).indepenpent().registerStat(),
distanceCrouchedStat = new StatBasic("stat.crouchOneCm", StatFormatter.distanceFormat).indepenpent().registerStat(),
distanceSprintedStat = new StatBasic("stat.sprintOneCm", StatFormatter.distanceFormat).indepenpent().registerStat(),
distanceSwumStat = new StatBasic("stat.swimOneCm", StatFormatter.distanceFormat).indepenpent().registerStat(),
distanceFallenStat = new StatBasic("stat.fallOneCm", StatFormatter.distanceFormat).indepenpent().registerStat(),
distanceClimbedStat = new StatBasic("stat.climbOneCm", StatFormatter.distanceFormat).indepenpent().registerStat(),
distanceFlownStat = new StatBasic("stat.flyOneCm", StatFormatter.distanceFormat).indepenpent().registerStat(),
distanceByMinecartStat = new StatBasic("stat.minecartOneCm", StatFormatter.distanceFormat).indepenpent().registerStat(),
distanceByBoatStat = new StatBasic("stat.boatOneCm", StatFormatter.distanceFormat).indepenpent().registerStat(),
distanceByPigStat = new StatBasic("stat.pigOneCm", StatFormatter.distanceFormat).indepenpent().registerStat(),
distanceByHorseStat = new StatBasic("stat.horseOneCm", StatFormatter.distanceFormat).indepenpent().registerStat(),
damageDealtStat = new StatBasic("stat.damageDealt", StatFormatter.damageFormat).registerStat(),
damageTakenStat = new StatBasic("stat.damageTaken", StatFormatter.damageFormat).registerStat(),
leaveGameStat = new StatBasic("stat.leaveGame").indepenpent().registerStat(),
jumpStat = new StatBasic("stat.jump").indepenpent().registerStat(),
dropStat = new StatBasic("stat.drop").indepenpent().registerStat(),
deathsStat = new StatBasic("stat.deaths").registerStat(),
mobKillsStat = new StatBasic("stat.mobKills").registerStat(),
animalsBredStat = new StatBasic("stat.animalsBred").registerStat(),
playerKillsStat = new StatBasic("stat.playerKills").registerStat(),
fishCaughtStat = new StatBasic("stat.fishCaught").registerStat(),
junkFishedStat = new StatBasic("stat.junkFished").registerStat(),
treasureFishedStat = new StatBasic("stat.treasureFished").registerStat(),
timesTalkedToVillagerStat = new StatBasic("stat.talkedToVillager").registerStat(),
timesTradedWithVillagerStat = new StatBasic("stat.tradedWithVillager").registerStat(),
cakeSlicesEatenStat = new StatBasic("stat.cakeSlicesEaten").registerStat(),
cauldronFilledStat = new StatBasic("stat.cauldronFilled").registerStat(),
cauldronUsedStat = new StatBasic("stat.cauldronUsed").registerStat(),
armorCleanedStat = new StatBasic("stat.armorCleaned").registerStat(),
bannerCleanedStat = new StatBasic("stat.bannerCleaned").registerStat(),
brewingsOpenedStat = new StatBasic("stat.brewingstandInteraction").registerStat(),
beaconsOpenedStat = new StatBasic("stat.beaconInteraction").registerStat(),
droppersOpenedStat = new StatBasic("stat.dropperInspected").registerStat(),
hoppersOpenedStat = new StatBasic("stat.hopperInspected").registerStat(),
dispensersOpenedStat = new StatBasic("stat.dispenserInspected").registerStat(),
noteblockPlayedStat = new StatBasic("stat.noteblockPlayed").registerStat(),
noteblockTunedStat = new StatBasic("stat.noteblockTuned").registerStat(),
flowerPottedStat = new StatBasic("stat.flowerPotted").registerStat(),
trappedChestTriggeredStat = new StatBasic("stat.trappedChestTriggered").registerStat(),
enderChestOpenedStat = new StatBasic("stat.enderchestOpened").registerStat(),
itemsEnchantedStat = new StatBasic("stat.itemEnchanted").registerStat(),
recordsPlayedStat = new StatBasic("stat.recordPlayed").registerStat(),
furnacesOpenedStat = new StatBasic("stat.furnaceInteraction").registerStat(),
craftingTableOpenedStat = new StatBasic("stat.workbenchInteraction").registerStat(),
chestsOpenedStat = new StatBasic("stat.chestOpened").registerStat();
public static final StatBase[] mineBlockStatArray = new StatBase[4096];
/**
* Tracks the number of items a given block or item has been crafted.
*/
public static final StatBase[] objectCraftStats = new StatBase[32000];
/**
* Tracks the number of times a given block or item has been used.
*/
public static final StatBase[] objectUseStats = new StatBase[32000];
/**
* Tracks the number of times a given block or item has been broken.
*/
public static final StatBase[] objectBreakStats = new StatBase[32000];
public static void init() {
initMiningStats();
initStats();
initItemDepleteStats();
initCraftableStats();
AchievementList.init();
}
/**
* Initializes statistics related to craftable items. Is only called after both block and item stats have been
* initialized.
*/
private static void initCraftableStats() {
Set<Item> set = Sets.newHashSet();
for (IRecipe irecipe : CraftingManager.getInstance().getRecipeList()) {
if (irecipe.getRecipeOutput() != null) {
set.add(irecipe.getRecipeOutput().getItem());
}
}
for (ItemStack itemstack : FurnaceRecipes.instance().getSmeltingList().values()) {
set.add(itemstack.getItem());
}
for (Item item : set) {
if (item != null) {
int i = Item.getIdFromItem(item);
String s = func_180204_a(item);
if (s != null) {
objectCraftStats[i] = new StatCrafting("stat.craftItem.", s, new ChatComponentTranslation("stat.craftItem", new ItemStack(item).getChatComponent()), item).registerStat();
}
}
}
replaceAllSimilarBlocks(objectCraftStats);
}
private static void initMiningStats() {
for (Block block : Block.blockRegistry) {
Item item = Item.getItemFromBlock(block);
if (item != null) {
int i = Block.getIdFromBlock(block);
String s = func_180204_a(item);
if (s != null && block.getEnableStats()) {
mineBlockStatArray[i] = new StatCrafting("stat.mineBlock.", s, new ChatComponentTranslation("stat.mineBlock", new ItemStack(block).getChatComponent()), item).registerStat();
objectMineStats.add((StatCrafting) mineBlockStatArray[i]);
}
}
}
replaceAllSimilarBlocks(mineBlockStatArray);
}
private static void initStats() {
for (Item item : Item.itemRegistry) {
if (item != null) {
int i = Item.getIdFromItem(item);
String s = func_180204_a(item);
if (s != null) {
objectUseStats[i] = new StatCrafting("stat.useItem.", s, new ChatComponentTranslation("stat.useItem", new ItemStack(item).getChatComponent()), item).registerStat();
if (!(item instanceof ItemBlock)) {
itemStats.add((StatCrafting) objectUseStats[i]);
}
}
}
}
replaceAllSimilarBlocks(objectUseStats);
}
private static void initItemDepleteStats() {
for (Item item : Item.itemRegistry) {
if (item != null) {
int i = Item.getIdFromItem(item);
String s = func_180204_a(item);
if (s != null && item.isDamageable()) {
objectBreakStats[i] = new StatCrafting("stat.breakItem.", s, new ChatComponentTranslation("stat.breakItem", new ItemStack(item).getChatComponent()), item).registerStat();
}
}
}
replaceAllSimilarBlocks(objectBreakStats);
}
private static String func_180204_a(Item p_180204_0_) {
ResourceLocation resourcelocation = Item.itemRegistry.getNameForObject(p_180204_0_);
return resourcelocation != null ? resourcelocation.toString().replace(':', '.') : null;
}
/**
* Forces all dual blocks to count for each other on the stats list
*/
private static void replaceAllSimilarBlocks(StatBase[] p_75924_0_) {
mergeStatBases(p_75924_0_, Blocks.water, Blocks.flowing_water);
mergeStatBases(p_75924_0_, Blocks.lava, Blocks.flowing_lava);
mergeStatBases(p_75924_0_, Blocks.lit_pumpkin, Blocks.pumpkin);
mergeStatBases(p_75924_0_, Blocks.lit_furnace, Blocks.furnace);
mergeStatBases(p_75924_0_, Blocks.lit_redstone_ore, Blocks.redstone_ore);
mergeStatBases(p_75924_0_, Blocks.powered_repeater, Blocks.unpowered_repeater);
mergeStatBases(p_75924_0_, Blocks.powered_comparator, Blocks.unpowered_comparator);
mergeStatBases(p_75924_0_, Blocks.redstone_torch, Blocks.unlit_redstone_torch);
mergeStatBases(p_75924_0_, Blocks.lit_redstone_lamp, Blocks.redstone_lamp);
mergeStatBases(p_75924_0_, Blocks.double_stone_slab, Blocks.stone_slab);
mergeStatBases(p_75924_0_, Blocks.double_wooden_slab, Blocks.wooden_slab);
mergeStatBases(p_75924_0_, Blocks.double_stone_slab2, Blocks.stone_slab2);
mergeStatBases(p_75924_0_, Blocks.grass, Blocks.dirt);
mergeStatBases(p_75924_0_, Blocks.farmland, Blocks.dirt);
}
/**
* Merge {@link StatBase} object references for similar blocks
*/
private static void mergeStatBases(StatBase[] statBaseIn, Block a, Block b) {
int i = Block.getIdFromBlock(a);
int j = Block.getIdFromBlock(b);
if (statBaseIn[i] != null && statBaseIn[j] == null) {
statBaseIn[j] = statBaseIn[i];
} else {
allStats.remove(statBaseIn[i]);
objectMineStats.remove(statBaseIn[i]);
generalStats.remove(statBaseIn[i]);
statBaseIn[i] = statBaseIn[j];
}
}
public static StatBase createStatKillEntity(EntityList.EntityEggInfo eggInfo) {
String s = EntityList.getStringFromID(eggInfo.spawnedID);
return s == null ? null : new StatBase("stat.killEntity." + s, new ChatComponentTranslation("stat.entityKill", new ChatComponentTranslation("entity." + s + ".name"))).registerStat();
}
public static StatBase createStatEntityKilledBy(EntityList.EntityEggInfo eggInfo) {
String s = EntityList.getStringFromID(eggInfo.spawnedID);
return s == null ? null : new StatBase("stat.entityKilledBy." + s, new ChatComponentTranslation("stat.entityKilledBy", new ChatComponentTranslation("entity." + s + ".name"))).registerStat();
}
public static StatBase getOneShotStat(String p_151177_0_) {
return oneShotStats.get(p_151177_0_);
}
public static void unregister(StatBase stat) {
oneShotStats.remove(stat.statId);
allStats.remove(stat);
}
}
| 11,291 | 0.748207 | 0.733239 | 255 | 43.278431 | 40.679581 | 192 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 2.552941 | false | false |
3
|
a7917c453756a2cd912b197777bc28b88bc82b88
| 13,881,334,327,571 |
c2a20af2cdeb95a92b4d7a0f5cb4f0ad1ec8e3eb
|
/src/server/bookingsystem/java/com/polito/bookingsystem/repository/LectureRepository.java
|
d2379f262e6aa24bdd6f246d8319acbda1786cc9
|
[] |
no_license
|
phisaz/SE2-final
|
https://github.com/phisaz/SE2-final
|
723a0fac0b7060615be2cc74cab3f191c049599d
|
0f21d9aa61c74554e285eb2830f9f2557020584e
|
refs/heads/main
| 2023-02-16T18:43:15.085000 | 2021-01-19T09:51:17 | 2021-01-19T09:51:17 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.polito.bookingsystem.repository;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.polito.bookingsystem.entity.Lecture;
import com.polito.bookingsystem.entity.Professor;
@Repository
public interface LectureRepository extends JpaRepository<Lecture,Integer>{
Lecture findByLectureId(Integer lectureId);
List<Lecture> findByProfessor(Professor professor);
Long deleteByLectureId(Integer lectureId);
}
|
UTF-8
|
Java
| 513 |
java
|
LectureRepository.java
|
Java
|
[] | null |
[] |
package com.polito.bookingsystem.repository;
import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import com.polito.bookingsystem.entity.Lecture;
import com.polito.bookingsystem.entity.Professor;
@Repository
public interface LectureRepository extends JpaRepository<Lecture,Integer>{
Lecture findByLectureId(Integer lectureId);
List<Lecture> findByProfessor(Professor professor);
Long deleteByLectureId(Integer lectureId);
}
| 513 | 0.846004 | 0.846004 | 13 | 38.46154 | 21.995157 | 74 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.769231 | false | false |
3
|
8b3d966e8b0d636f4f026ab61b6c511313f9f900
| 33,500,744,930,710 |
5405fbde0357be57431002ad3b15ebc32408c598
|
/ShoppingManagement/src/main/java/com/shopping/demo/model/BillDetailDto.java
|
97a13a04d7c47c2cc762b23eee67b09474eb9baf
|
[] |
no_license
|
vannguyen14893/demoShopping
|
https://github.com/vannguyen14893/demoShopping
|
aae6bb53c1361320eaadcd4c5bff8c9c17d31615
|
fcf20a971a8c51f1d7230490329df25531d27168
|
refs/heads/master
| 2020-04-24T18:05:14.420000 | 2019-02-24T16:39:09 | 2019-02-24T16:39:09 | 172,169,212 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.shopping.demo.model;
import com.shopping.demo.entity.BillDetail;
public class BillDetailDto {
private ProductDto productDto;
//private BillDto billDto;
private int number;
private double totalprice;
private double pricePlusTax;
public ProductDto getProductDto() {
return productDto;
}
public void setProductDto(ProductDto productDto) {
this.productDto = productDto;
}
// public BillDto getBillDto() {
// return billDto;
// }
//
// public void setBillDto(BillDto billDto) {
// this.billDto = billDto;
// }
public int getNumber() {
return number;
}
public void setNumber(int number) {
this.number = number;
}
public double getTotalprice() {
return totalprice;
}
public void setTotalprice(double totalprice) {
this.totalprice = totalprice;
}
public double getPricePlusTax() {
return pricePlusTax;
}
public void setPricePlusTax(double pricePlusTax) {
this.pricePlusTax = pricePlusTax;
}
public BillDetailDto(BillDetail billDetail) {
this.productDto = new ProductDto(billDetail.getProduct());
//this.bill = billDetail.getBill();
this.number = billDetail.getNumber();
this.totalprice=number * productDto.getPrice();
this.pricePlusTax=this.totalprice *110/100;
}
public BillDetailDto() {
super();
}
}
|
UTF-8
|
Java
| 1,289 |
java
|
BillDetailDto.java
|
Java
|
[] | null |
[] |
package com.shopping.demo.model;
import com.shopping.demo.entity.BillDetail;
public class BillDetailDto {
private ProductDto productDto;
//private BillDto billDto;
private int number;
private double totalprice;
private double pricePlusTax;
public ProductDto getProductDto() {
return productDto;
}
public void setProductDto(ProductDto productDto) {
this.productDto = productDto;
}
// public BillDto getBillDto() {
// return billDto;
// }
//
// public void setBillDto(BillDto billDto) {
// this.billDto = billDto;
// }
public int getNumber() {
return number;
}
public void setNumber(int number) {
this.number = number;
}
public double getTotalprice() {
return totalprice;
}
public void setTotalprice(double totalprice) {
this.totalprice = totalprice;
}
public double getPricePlusTax() {
return pricePlusTax;
}
public void setPricePlusTax(double pricePlusTax) {
this.pricePlusTax = pricePlusTax;
}
public BillDetailDto(BillDetail billDetail) {
this.productDto = new ProductDto(billDetail.getProduct());
//this.bill = billDetail.getBill();
this.number = billDetail.getNumber();
this.totalprice=number * productDto.getPrice();
this.pricePlusTax=this.totalprice *110/100;
}
public BillDetailDto() {
super();
}
}
| 1,289 | 0.723041 | 0.718386 | 66 | 18.530304 | 17.809786 | 60 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.272727 | false | false |
3
|
49b8e10660b532046a70b9cd1af2d4cae9b42447
| 33,500,744,929,481 |
7a9fac65b90756946b5b15765e29577b6c7f3192
|
/src/subway3/Subway.java
|
a783954145b989c403e06470c91927b7e9cc26b4
|
[] |
no_license
|
953241187/Subway
|
https://github.com/953241187/Subway
|
77b288ea6a9ccad6880c75d93f813d90beff031d
|
5588242473d151bd7a75b7ba70f47da1e7291379
|
refs/heads/main
| 2023-01-09T16:41:49.110000 | 2020-11-05T04:21:23 | 2020-11-05T04:21:23 | 310,188,819 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package subway3;
import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Scanner;
public class Subway {
private static Scanner input;
private List<Station> outList = new ArrayList<Station>();
public void calculate(Station s1,Station s2){
if(outList.size() == DataBuilder.totalStaion){
// System.out.println("共经过"+(s1.getAllPassedStations(s2).size()-1)+"站");
int m=s1.getAllPassedStations(s2).size()-1;
if(m!=0) {
System.out.println("共经过"+(s1.getAllPassedStations(s2).size()-1)+"站");
for(Station station : s1.getAllPassedStations(s2)){
System.out.print(station.getName()+"》");
}
}
if(m==0)
{
System.out.print("输入站点不正确");
}
return;
}
if(!outList.contains(s1)){
outList.add(s1);
}
if(s1.getOrderSetMap().isEmpty()){
List<Station> Linkedstations = getAllLinkedStations(s1);
for(Station s : Linkedstations){
s1.getAllPassedStations(s).add(s);
}
}
Station xz = getShortestPath(s1);
for(Station xh : getAllLinkedStations(xz)){
if(outList.contains(xh)){
continue;
}
int shortestPath = (s1.getAllPassedStations(xz).size()-1) + 1;
if(s1.getAllPassedStations(xh).contains(xh)){
if((s1.getAllPassedStations(xh).size()-1) > shortestPath){
s1.getAllPassedStations(xh).clear();
s1.getAllPassedStations(xh).addAll(s1.getAllPassedStations(xz));
s1.getAllPassedStations(xh).add(xh);
}
} else {
s1.getAllPassedStations(xh).addAll(s1.getAllPassedStations(xz));
s1.getAllPassedStations(xh).add(xh);
}
}
outList.add(xz);
calculate(s1,s2);
}
private Station getShortestPath(Station station){
int minPatn = Integer.MAX_VALUE;
Station rets = null;
for(Station s :station.getOrderSetMap().keySet()){
if(outList.contains(s)){
continue;
}
LinkedHashSet<Station> set = station.getAllPassedStations(s);
if(set.size() < minPatn){
minPatn = set.size();
rets = s;
}
}
return rets;
}
private List<Station> getAllLinkedStations(Station station){
List<Station> linkedStaions = new ArrayList<Station>();
for(List<Station> line : DataBuilder.lineSet){
if(line.contains(station)){
Station s = line.get(line.indexOf(station));
if(s.prev != null){
linkedStaions.add(s.prev);
}
if(s.next != null){
linkedStaions.add(s.next);
}
}
}
return linkedStaions;
}
public static void main(String[] args) {
System.out.println("执行两站之间最短路线功能输入:1");
System.out.println("执行查询地铁线路功能输入:2");
Scanner input=new Scanner(System.in);
System.out.print("请输入功能:");
String start=input.next();
if(start.equals("1")) {
Subway sw = new Subway();
System.out.print("请输入起始站:");
String begin_station_name=input.next();
System.out.print("请输入终点站:");
String end_station_name=input.next();
sw.calculate(new Station(begin_station_name), new Station(end_station_name));
}
if(start.equals("2")) {
System.out.print("请输入所要查询的线路:");
String a=input.next();
if(a.contentEquals("1号线"))
System.out.println(DataBuilder.line1Str);
if(a.contentEquals("2号线"))
System.out.println(DataBuilder.line2Str);
if(a.contentEquals("4号线"))
System.out.println(DataBuilder.line4Str);
if(a.contentEquals("5号线"))
System.out.println(DataBuilder.line5Str);
if(a.contentEquals("6号线"))
System.out.println(DataBuilder.line6Str);
if(a.contentEquals("7号线"))
System.out.println(DataBuilder.line7Str);
if(a.contentEquals("8号线"))
System.out.println(DataBuilder.line8Str);
if(a.contentEquals("8号线南段"))
System.out.println(DataBuilder.line8SStr);
if(a.contentEquals("9号线"))
System.out.println(DataBuilder.line9Str);
if(a.contentEquals("10号线"))
System.out.println(DataBuilder.line10Str);
if(a.contentEquals("13号线"))
System.out.println(DataBuilder.line13Str);
if(a.contentEquals("14号线西段"))
System.out.println(DataBuilder.line14WStr);
if(a.contentEquals("14号线东段"))
System.out.println(DataBuilder.line14EStr);
if(a.contentEquals("15号线"))
System.out.println(DataBuilder.line15Str);
if(a.contentEquals("16号线"))
System.out.println(DataBuilder.line16Str);
if(a.contentEquals("八通线"))
System.out.println(DataBuilder.lineBatongStr);
if(a.contentEquals("昌平线"))
System.out.println(DataBuilder.lineChangpingStr);
if(a.contentEquals("房山线"))
System.out.println(DataBuilder.lineFangshanStr);
if(a.contentEquals("首都机场线"))
System.out.println(DataBuilder.lineShouduStr);
if(a.contentEquals("西郊线"))
System.out.println(DataBuilder.lineXijiaoStr);
if(a.contentEquals("燕房线"))
System.out.println(DataBuilder.lineYanfangStr);
if(a.contentEquals("亦庄线"))
System.out.println(DataBuilder.lineYizhuangStr);
else {
System.out.println("请输入正确线路");
}
}
}
}
|
GB18030
|
Java
| 5,311 |
java
|
Subway.java
|
Java
|
[] | null |
[] |
package subway3;
import java.util.ArrayList;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Scanner;
public class Subway {
private static Scanner input;
private List<Station> outList = new ArrayList<Station>();
public void calculate(Station s1,Station s2){
if(outList.size() == DataBuilder.totalStaion){
// System.out.println("共经过"+(s1.getAllPassedStations(s2).size()-1)+"站");
int m=s1.getAllPassedStations(s2).size()-1;
if(m!=0) {
System.out.println("共经过"+(s1.getAllPassedStations(s2).size()-1)+"站");
for(Station station : s1.getAllPassedStations(s2)){
System.out.print(station.getName()+"》");
}
}
if(m==0)
{
System.out.print("输入站点不正确");
}
return;
}
if(!outList.contains(s1)){
outList.add(s1);
}
if(s1.getOrderSetMap().isEmpty()){
List<Station> Linkedstations = getAllLinkedStations(s1);
for(Station s : Linkedstations){
s1.getAllPassedStations(s).add(s);
}
}
Station xz = getShortestPath(s1);
for(Station xh : getAllLinkedStations(xz)){
if(outList.contains(xh)){
continue;
}
int shortestPath = (s1.getAllPassedStations(xz).size()-1) + 1;
if(s1.getAllPassedStations(xh).contains(xh)){
if((s1.getAllPassedStations(xh).size()-1) > shortestPath){
s1.getAllPassedStations(xh).clear();
s1.getAllPassedStations(xh).addAll(s1.getAllPassedStations(xz));
s1.getAllPassedStations(xh).add(xh);
}
} else {
s1.getAllPassedStations(xh).addAll(s1.getAllPassedStations(xz));
s1.getAllPassedStations(xh).add(xh);
}
}
outList.add(xz);
calculate(s1,s2);
}
private Station getShortestPath(Station station){
int minPatn = Integer.MAX_VALUE;
Station rets = null;
for(Station s :station.getOrderSetMap().keySet()){
if(outList.contains(s)){
continue;
}
LinkedHashSet<Station> set = station.getAllPassedStations(s);
if(set.size() < minPatn){
minPatn = set.size();
rets = s;
}
}
return rets;
}
private List<Station> getAllLinkedStations(Station station){
List<Station> linkedStaions = new ArrayList<Station>();
for(List<Station> line : DataBuilder.lineSet){
if(line.contains(station)){
Station s = line.get(line.indexOf(station));
if(s.prev != null){
linkedStaions.add(s.prev);
}
if(s.next != null){
linkedStaions.add(s.next);
}
}
}
return linkedStaions;
}
public static void main(String[] args) {
System.out.println("执行两站之间最短路线功能输入:1");
System.out.println("执行查询地铁线路功能输入:2");
Scanner input=new Scanner(System.in);
System.out.print("请输入功能:");
String start=input.next();
if(start.equals("1")) {
Subway sw = new Subway();
System.out.print("请输入起始站:");
String begin_station_name=input.next();
System.out.print("请输入终点站:");
String end_station_name=input.next();
sw.calculate(new Station(begin_station_name), new Station(end_station_name));
}
if(start.equals("2")) {
System.out.print("请输入所要查询的线路:");
String a=input.next();
if(a.contentEquals("1号线"))
System.out.println(DataBuilder.line1Str);
if(a.contentEquals("2号线"))
System.out.println(DataBuilder.line2Str);
if(a.contentEquals("4号线"))
System.out.println(DataBuilder.line4Str);
if(a.contentEquals("5号线"))
System.out.println(DataBuilder.line5Str);
if(a.contentEquals("6号线"))
System.out.println(DataBuilder.line6Str);
if(a.contentEquals("7号线"))
System.out.println(DataBuilder.line7Str);
if(a.contentEquals("8号线"))
System.out.println(DataBuilder.line8Str);
if(a.contentEquals("8号线南段"))
System.out.println(DataBuilder.line8SStr);
if(a.contentEquals("9号线"))
System.out.println(DataBuilder.line9Str);
if(a.contentEquals("10号线"))
System.out.println(DataBuilder.line10Str);
if(a.contentEquals("13号线"))
System.out.println(DataBuilder.line13Str);
if(a.contentEquals("14号线西段"))
System.out.println(DataBuilder.line14WStr);
if(a.contentEquals("14号线东段"))
System.out.println(DataBuilder.line14EStr);
if(a.contentEquals("15号线"))
System.out.println(DataBuilder.line15Str);
if(a.contentEquals("16号线"))
System.out.println(DataBuilder.line16Str);
if(a.contentEquals("八通线"))
System.out.println(DataBuilder.lineBatongStr);
if(a.contentEquals("昌平线"))
System.out.println(DataBuilder.lineChangpingStr);
if(a.contentEquals("房山线"))
System.out.println(DataBuilder.lineFangshanStr);
if(a.contentEquals("首都机场线"))
System.out.println(DataBuilder.lineShouduStr);
if(a.contentEquals("西郊线"))
System.out.println(DataBuilder.lineXijiaoStr);
if(a.contentEquals("燕房线"))
System.out.println(DataBuilder.lineYanfangStr);
if(a.contentEquals("亦庄线"))
System.out.println(DataBuilder.lineYizhuangStr);
else {
System.out.println("请输入正确线路");
}
}
}
}
| 5,311 | 0.651518 | 0.635047 | 177 | 26.468927 | 20.014694 | 79 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 3.016949 | false | false |
3
|
aa2705c6339cbb457adff861c4d5f28051090a8f
| 1,099,511,660,509 |
806f76edfe3b16b437be3eb81639d1a7b1ced0de
|
/src/com/huawei/pluginkidwatch/plugin/menu/utils/C1892i.java
|
b494d98a0d460b3e81f4b08746efbb53c05bd959
|
[] |
no_license
|
magic-coder/huawei-wear-re
|
https://github.com/magic-coder/huawei-wear-re
|
1bbcabc807e21b2fe8fe9aa9d6402431dfe3fb01
|
935ad32f5348c3d8c8d294ed55a5a2830987da73
|
refs/heads/master
| 2021-04-15T18:30:54.036000 | 2018-03-22T07:16:50 | 2018-03-22T07:16:50 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.huawei.pluginkidwatch.plugin.menu.utils;
import android.content.Context;
/* compiled from: FileCache */
public class C1892i extends C1885a {
public C1892i(Context context) {
super(context);
}
public String mo2626b(String str) {
return mo2625a() + String.valueOf(str.hashCode());
}
public String mo2625a() {
return C1894k.m9662a();
}
}
|
UTF-8
|
Java
| 399 |
java
|
C1892i.java
|
Java
|
[] | null |
[] |
package com.huawei.pluginkidwatch.plugin.menu.utils;
import android.content.Context;
/* compiled from: FileCache */
public class C1892i extends C1885a {
public C1892i(Context context) {
super(context);
}
public String mo2626b(String str) {
return mo2625a() + String.valueOf(str.hashCode());
}
public String mo2625a() {
return C1894k.m9662a();
}
}
| 399 | 0.659148 | 0.578947 | 18 | 21.166666 | 18.833334 | 58 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.277778 | false | false |
3
|
8266beedd0da3d038edef5d6066db1ddcd171f60
| 1,099,511,659,773 |
4c1bcb0e01640d7c83cb2da970568a0b23c25b25
|
/src/main/java/edu/nova/chardin/patrol/experiment/runner/ScenarioRunner.java
|
185c298205a55e79c91907956b920693cc869acf
|
[] |
no_license
|
cehardin/nsu-patrol
|
https://github.com/cehardin/nsu-patrol
|
1159c8e99321aae8b26865baff8c3f3371797d78
|
6ce6667d1278a9de6fb35b6d3e1840e63f62bc03
|
refs/heads/master
| 2021-01-17T07:01:55.460000 | 2017-10-30T02:08:47 | 2017-10-30T02:08:47 | 34,594,488 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package edu.nova.chardin.patrol.experiment.runner;
import com.google.common.collect.ImmutableList;
import com.google.common.eventbus.EventBus;
import edu.nova.chardin.patrol.experiment.Scenario;
import edu.nova.chardin.patrol.experiment.event.Lifecycle;
import edu.nova.chardin.patrol.experiment.event.ScenarioLifecycleEvent;
import edu.nova.chardin.patrol.experiment.result.ScenarioResult;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NonNull;
import lombok.Value;
import java.util.function.Function;
import javax.inject.Inject;
import javax.inject.Singleton;
@Singleton
@AllArgsConstructor(access = AccessLevel.PACKAGE, onConstructor = @__({
@Inject}))
@Value
@Getter(AccessLevel.NONE)
public class ScenarioRunner implements Function<Scenario, ScenarioResult> {
EventBus eventBus;
MatchRunner matchRunner;
@Override
public ScenarioResult apply(@NonNull final Scenario scenario) {
final ScenarioResult result;
eventBus.post(new ScenarioLifecycleEvent(scenario, Lifecycle.Started));
result = ScenarioResult.builder()
.scenario(scenario)
.matchResults(scenario.getMatches().parallelStream().map(matchRunner).collect(ImmutableList.toImmutableList()))
.build();
eventBus.post(new ScenarioLifecycleEvent(scenario, Lifecycle.Finished));
return result;
}
}
|
UTF-8
|
Java
| 1,405 |
java
|
ScenarioRunner.java
|
Java
|
[] | null |
[] |
package edu.nova.chardin.patrol.experiment.runner;
import com.google.common.collect.ImmutableList;
import com.google.common.eventbus.EventBus;
import edu.nova.chardin.patrol.experiment.Scenario;
import edu.nova.chardin.patrol.experiment.event.Lifecycle;
import edu.nova.chardin.patrol.experiment.event.ScenarioLifecycleEvent;
import edu.nova.chardin.patrol.experiment.result.ScenarioResult;
import lombok.AccessLevel;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NonNull;
import lombok.Value;
import java.util.function.Function;
import javax.inject.Inject;
import javax.inject.Singleton;
@Singleton
@AllArgsConstructor(access = AccessLevel.PACKAGE, onConstructor = @__({
@Inject}))
@Value
@Getter(AccessLevel.NONE)
public class ScenarioRunner implements Function<Scenario, ScenarioResult> {
EventBus eventBus;
MatchRunner matchRunner;
@Override
public ScenarioResult apply(@NonNull final Scenario scenario) {
final ScenarioResult result;
eventBus.post(new ScenarioLifecycleEvent(scenario, Lifecycle.Started));
result = ScenarioResult.builder()
.scenario(scenario)
.matchResults(scenario.getMatches().parallelStream().map(matchRunner).collect(ImmutableList.toImmutableList()))
.build();
eventBus.post(new ScenarioLifecycleEvent(scenario, Lifecycle.Finished));
return result;
}
}
| 1,405 | 0.769395 | 0.769395 | 47 | 28.851065 | 27.758057 | 123 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.553191 | false | false |
3
|
d17f4146e071c097028ad526ab824dba67d41689
| 14,929,306,349,486 |
be7156d59eb491f7dc412b23f906355e64e5a346
|
/final_project/src/main/java/com/google/sps/data/Comment.java
|
2dd809d1e0d439c747ccf97ae61f6acdd2c4d784
|
[] |
no_license
|
AbdullahAlazzani/GoogleSPSFinalProject2020
|
https://github.com/AbdullahAlazzani/GoogleSPSFinalProject2020
|
0332a55aaabb6bc9969b74392457515be15df09d
|
b47ac8dcbe529e1506b916100c783c4fdfd33ad4
|
refs/heads/master
| 2022-11-15T10:55:14.496000 | 2020-07-13T04:28:31 | 2020-07-13T04:28:31 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.google.sps.data;
public final class Comment{
private final String name;
private final String msg;
public Comment(String name,String msg) {
this.name = name;
this.msg = msg;
}
}
|
UTF-8
|
Java
| 212 |
java
|
Comment.java
|
Java
|
[] | null |
[] |
package com.google.sps.data;
public final class Comment{
private final String name;
private final String msg;
public Comment(String name,String msg) {
this.name = name;
this.msg = msg;
}
}
| 212 | 0.674528 | 0.674528 | 14 | 14.142858 | 14.42645 | 42 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.428571 | false | false |
3
|
ff26748b5357efdafb40a570901fdcddb2922338
| 13,572,096,688,553 |
05b53a7e92cb31aa3ede77913233afaced42c499
|
/test/src/practice/DecimalToOctal.java
|
0f8e26b69dbdac67a8c3c3a87ead47d0dab73143
|
[] |
no_license
|
vikashdubey-g/flash
|
https://github.com/vikashdubey-g/flash
|
32b0e7fcb6ee158b1b35df1c64d59ffe1ba50f0f
|
1cff73353e92004b968d301b9b268d3d92fbf6f0
|
refs/heads/master
| 2023-01-24T10:17:21.673000 | 2020-11-26T03:21:16 | 2020-11-26T03:21:16 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package practice;
import java.util.Scanner;
public class DecimalToOctal {
public static void main(String[] args) {
int dec_num, quot, rem, i = 1, j;
int oct_num[] = new int[100];
Scanner scan = new Scanner(System.in);
System.out.println("Enter a Decimal nummber: ");
dec_num = scan.nextInt();
quot = dec_num;
while(quot != 0)
{
oct_num[i++] = quot % 8;
quot = quot / 8;
}
System.out.println("Octal number is: ");
for(j = i-1; j > 0; j--)
{
System.out.println(oct_num[j]);
}
System.out.println("\n");
}
}
|
UTF-8
|
Java
| 572 |
java
|
DecimalToOctal.java
|
Java
|
[] | null |
[] |
package practice;
import java.util.Scanner;
public class DecimalToOctal {
public static void main(String[] args) {
int dec_num, quot, rem, i = 1, j;
int oct_num[] = new int[100];
Scanner scan = new Scanner(System.in);
System.out.println("Enter a Decimal nummber: ");
dec_num = scan.nextInt();
quot = dec_num;
while(quot != 0)
{
oct_num[i++] = quot % 8;
quot = quot / 8;
}
System.out.println("Octal number is: ");
for(j = i-1; j > 0; j--)
{
System.out.println(oct_num[j]);
}
System.out.println("\n");
}
}
| 572 | 0.575175 | 0.559441 | 36 | 14.888889 | 15.430449 | 50 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 2.055556 | false | false |
3
|
dbc570e97ffa62133a1ca34aa37bb64c0a1de180
| 42,949,692,033 |
b86dafabc3c7424adaf76f6c32bf9e6955277a46
|
/java/javaday18/src/checkpoint2/Test03.java
|
0fa3730721ba9ada2e3c24fb338104b17022b057
|
[] |
no_license
|
Caressing-bot/sbjy_hezh
|
https://github.com/Caressing-bot/sbjy_hezh
|
a0fe39eeef199851e22a5121bedb75cdc56a53d6
|
3bd96d0fbd551a214e412c4bca39cee6a4581c25
|
refs/heads/master
| 2020-09-21T15:01:13.961000 | 2019-11-29T09:32:11 | 2019-11-29T09:32:11 | 224,825,180 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package checkpoint2;
import java.io.FileInputStream;
import java.io.IOException;
public class Test03 {
public static void main(String[] args) {
Count('a');
}
private static void Count(char ch) {
try (FileInputStream fis = new FileInputStream("text.txt")) {
int len;
int count = 0;
while (-1 != (len = fis.read())){
if (ch == len){
count++;
}
}
System.out.println(count);
} catch (IOException e) {
e.printStackTrace();
}
}
}
|
UTF-8
|
Java
| 600 |
java
|
Test03.java
|
Java
|
[] | null |
[] |
package checkpoint2;
import java.io.FileInputStream;
import java.io.IOException;
public class Test03 {
public static void main(String[] args) {
Count('a');
}
private static void Count(char ch) {
try (FileInputStream fis = new FileInputStream("text.txt")) {
int len;
int count = 0;
while (-1 != (len = fis.read())){
if (ch == len){
count++;
}
}
System.out.println(count);
} catch (IOException e) {
e.printStackTrace();
}
}
}
| 600 | 0.486667 | 0.478333 | 26 | 22.076923 | 16.9953 | 69 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.346154 | false | false |
3
|
8bf7bd8048acf35d8124a4a6b39b68bcd639116f
| 33,320,356,327,757 |
9217b5fe6b262ac20fb3ee882fd1dbbf002f02df
|
/src/io/nology/lifts/TravelDirection.java
|
bb0eb7f1da8c2f5711c370a484830d504e31aa28
|
[] |
no_license
|
mark-nology/lift
|
https://github.com/mark-nology/lift
|
0f2bb7ad0a400b950f3eb06434522f07c0b44ae4
|
5727aaaf8eb9a346a482d4cb9849a048ac5cca81
|
refs/heads/master
| 2020-06-30T18:02:14.760000 | 2019-08-06T18:29:46 | 2019-08-06T18:29:46 | 200,904,191 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package io.nology.lifts;
public enum TravelDirection {
UP,
DOWN,
NONE
}
|
UTF-8
|
Java
| 85 |
java
|
TravelDirection.java
|
Java
|
[] | null |
[] |
package io.nology.lifts;
public enum TravelDirection {
UP,
DOWN,
NONE
}
| 85 | 0.647059 | 0.647059 | 7 | 11.142858 | 10.301575 | 29 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.428571 | false | false |
3
|
5287b8fd6f71d63ebeb84e8ee2013429a71b2a7f
| 21,010,980,051,548 |
e3a1ca17ddd5ead14d2f763f9ffd6fb2886f890a
|
/simplehomeserver/simplenwprotocol/src/main/java/com/github/zaolahma/simplenwprotocol/ClientHandlerIf.java
|
c7afd093e0ff1c8ce555370af60b83afa647b0bb
|
[
"MIT"
] |
permissive
|
ZaoLahma/SimpleHomeServer
|
https://github.com/ZaoLahma/SimpleHomeServer
|
d46ac21dc17bf626665bed9211729d66930939d2
|
b250c992dc9d2335e01f5447304635ca28311a8d
|
refs/heads/master
| 2020-06-03T03:16:36.675000 | 2019-11-20T18:14:08 | 2019-11-20T18:14:08 | 191,412,525 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.github.zaolahma.simplenwprotocol;
public interface ClientHandlerIf {
boolean isActive();
}
|
UTF-8
|
Java
| 105 |
java
|
ClientHandlerIf.java
|
Java
|
[
{
"context": "package com.github.zaolahma.simplenwprotocol;\n\npublic interface ClientHandler",
"end": 27,
"score": 0.9969460368156433,
"start": 19,
"tag": "USERNAME",
"value": "zaolahma"
}
] | null |
[] |
package com.github.zaolahma.simplenwprotocol;
public interface ClientHandlerIf {
boolean isActive();
}
| 105 | 0.809524 | 0.809524 | 5 | 20 | 17.787636 | 45 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.6 | false | false |
3
|
034815a735ce32c64a9b2785d4860a8771cf9190
| 5,935,644,832,895 |
c811ab6a2a4818d68d5cbccca59ccc8c614d35d1
|
/mediatek/frameworks/common/src/com/mediatek/common/epo/MtkEpoFileInfo.java
|
a69782821b07402508537351cfe85db44c6e019b
|
[] |
no_license
|
minstrelsy/AP7200_MDK-kernel
|
https://github.com/minstrelsy/AP7200_MDK-kernel
|
2d0418149d96b8ed889e2ac0cf461ed8c1bf1f64
|
a5e667b78cd7f3e01428faf6a740a94a780e611b
|
refs/heads/master
| 2021-01-16T17:38:01.591000 | 2016-06-15T04:06:38 | 2016-06-15T05:43:06 | 100,010,821 | 1 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null |
/* Copyright Statement:
*
* This software/firmware and related documentation ("MediaTek Software") are
* protected under relevant copyright laws. The information contained herein is
* confidential and proprietary to MediaTek Inc. and/or its licensors. Without
* the prior written permission of MediaTek inc. and/or its licensors, any
* reproduction, modification, use or disclosure of MediaTek Software, and
* information contained herein, in whole or in part, shall be strictly
* prohibited.
*
* MediaTek Inc. (C) 2010. All rights reserved.
*
* BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER
* ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
* WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
* WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
* NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH
* RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
* INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES
* TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO.
* RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO
* OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK
* SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE
* RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
* STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S
* ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE
* RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE
* MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE
* CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
*
* The following software/firmware and/or related documentation ("MediaTek
* Software") have been modified by MediaTek Inc. All revisions are subject to
* any receiver's applicable license agreements with MediaTek Inc.
*/
package com.mediatek.common.epo;
import android.os.Parcel;
import android.os.Parcelable;
import java.util.Calendar;
import java.util.GregorianCalendar;
public final class MtkEpoFileInfo implements Parcelable {
public long downloadTime;//seconds
public long startTime; //seconds
public long expireTime; //seconds
public MtkEpoFileInfo() {}
public MtkEpoFileInfo(long downloadTime, long startTime, long expireTime) {
this.downloadTime = downloadTime;
this.startTime = startTime;
this.expireTime = expireTime;
}
public static final Parcelable.Creator<MtkEpoFileInfo> CREATOR = new Parcelable.Creator<MtkEpoFileInfo>() {
public MtkEpoFileInfo createFromParcel(Parcel in) {
MtkEpoFileInfo fileInfo = new MtkEpoFileInfo();
fileInfo.readFromParcel(in);
return fileInfo;
}
public MtkEpoFileInfo[] newArray(int size) {
return new MtkEpoFileInfo[size];
}
};
//@Override
public int describeContents() {
return 0;
}
//@Override
public void writeToParcel(Parcel out, int flags) {
out.writeLong(downloadTime);
out.writeLong(startTime);
out.writeLong(expireTime);
}
//@Override
public void readFromParcel(Parcel in) {
downloadTime = in.readLong();
startTime = in.readLong();
expireTime = in.readLong();
}
public String getDownloadTimeString() {
return timeInMillis2Date(downloadTime * 1000);
}
public String getStartTimeString() {
return timeInMillis2Date(startTime * 1000);
}
public String getExpireTimeString() {
return timeInMillis2Date(expireTime * 1000);
}
private String timeInMillis2Date(long time) {
Calendar cal = new GregorianCalendar();
cal.setTimeInMillis(time);
String date = String.format("%04d-%02d-%02d %02d:%02d:%02d", cal.get(Calendar.YEAR), cal.get(Calendar.MONDAY) + 1,
cal.get(Calendar.DAY_OF_MONTH), cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE),
cal.get(Calendar.SECOND));
return date;
}
public String toString() {
String str = new String();
str = " MtkEpoFileInfo downloadTime=" + downloadTime + " startTime=" + startTime + " expireTime=" + expireTime;
return str;
}
}
|
UTF-8
|
Java
| 4,666 |
java
|
MtkEpoFileInfo.java
|
Java
|
[] | null |
[] |
/* Copyright Statement:
*
* This software/firmware and related documentation ("MediaTek Software") are
* protected under relevant copyright laws. The information contained herein is
* confidential and proprietary to MediaTek Inc. and/or its licensors. Without
* the prior written permission of MediaTek inc. and/or its licensors, any
* reproduction, modification, use or disclosure of MediaTek Software, and
* information contained herein, in whole or in part, shall be strictly
* prohibited.
*
* MediaTek Inc. (C) 2010. All rights reserved.
*
* BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
* THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
* RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO RECEIVER
* ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL
* WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
* WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
* NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH
* RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
* INCORPORATED IN, OR SUPPLIED WITH THE MEDIATEK SOFTWARE, AND RECEIVER AGREES
* TO LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO.
* RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO
* OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK
* SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE
* RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
* STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S
* ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE
* RELEASED HEREUNDER WILL BE, AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE
* MEDIATEK SOFTWARE AT ISSUE, OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE
* CHARGE PAID BY RECEIVER TO MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
*
* The following software/firmware and/or related documentation ("MediaTek
* Software") have been modified by MediaTek Inc. All revisions are subject to
* any receiver's applicable license agreements with MediaTek Inc.
*/
package com.mediatek.common.epo;
import android.os.Parcel;
import android.os.Parcelable;
import java.util.Calendar;
import java.util.GregorianCalendar;
public final class MtkEpoFileInfo implements Parcelable {
public long downloadTime;//seconds
public long startTime; //seconds
public long expireTime; //seconds
public MtkEpoFileInfo() {}
public MtkEpoFileInfo(long downloadTime, long startTime, long expireTime) {
this.downloadTime = downloadTime;
this.startTime = startTime;
this.expireTime = expireTime;
}
public static final Parcelable.Creator<MtkEpoFileInfo> CREATOR = new Parcelable.Creator<MtkEpoFileInfo>() {
public MtkEpoFileInfo createFromParcel(Parcel in) {
MtkEpoFileInfo fileInfo = new MtkEpoFileInfo();
fileInfo.readFromParcel(in);
return fileInfo;
}
public MtkEpoFileInfo[] newArray(int size) {
return new MtkEpoFileInfo[size];
}
};
//@Override
public int describeContents() {
return 0;
}
//@Override
public void writeToParcel(Parcel out, int flags) {
out.writeLong(downloadTime);
out.writeLong(startTime);
out.writeLong(expireTime);
}
//@Override
public void readFromParcel(Parcel in) {
downloadTime = in.readLong();
startTime = in.readLong();
expireTime = in.readLong();
}
public String getDownloadTimeString() {
return timeInMillis2Date(downloadTime * 1000);
}
public String getStartTimeString() {
return timeInMillis2Date(startTime * 1000);
}
public String getExpireTimeString() {
return timeInMillis2Date(expireTime * 1000);
}
private String timeInMillis2Date(long time) {
Calendar cal = new GregorianCalendar();
cal.setTimeInMillis(time);
String date = String.format("%04d-%02d-%02d %02d:%02d:%02d", cal.get(Calendar.YEAR), cal.get(Calendar.MONDAY) + 1,
cal.get(Calendar.DAY_OF_MONTH), cal.get(Calendar.HOUR_OF_DAY), cal.get(Calendar.MINUTE),
cal.get(Calendar.SECOND));
return date;
}
public String toString() {
String str = new String();
str = " MtkEpoFileInfo downloadTime=" + downloadTime + " startTime=" + startTime + " expireTime=" + expireTime;
return str;
}
}
| 4,666 | 0.705958 | 0.698671 | 114 | 39.921051 | 30.919575 | 122 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.508772 | false | false |
3
|
a0e6bc730515adb74a0badb19d4654b4b552e09f
| 10,084,583,234,016 |
80253cf34fe31bce8b623d434d25474d5116678d
|
/app/src/main/java/ankit/com/bottomsheet/App.java
|
63dff2329f8e646b30b4bfafca1a4bf797b1b49c
|
[] |
no_license
|
imankitaman/bottomsheet-with-tabs
|
https://github.com/imankitaman/bottomsheet-with-tabs
|
8202426e11cee0b615a4e1820e78754cf5fa6ff3
|
0d4253e89a7a5bca4462f0c214a4e11ae1ca84f9
|
refs/heads/master
| 2019-07-08T14:35:32.162000 | 2018-01-16T10:51:08 | 2018-01-16T10:51:08 | 117,671,157 | 1 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package ankit.com.bottomsheet;
import android.app.Application;
import ankit.com.bottomsheet.dependencyinjection.component.ApplicationComponent;
import ankit.com.bottomsheet.dependencyinjection.component.DaggerApplicationComponent;
import ankit.com.bottomsheet.dependencyinjection.module.AppModule;
/**
* Created by ankit on 22/04/17.
*/
public class App extends Application {
private ApplicationComponent component;
private static App application;
@Override
public void onCreate() {
super.onCreate();
application = this;
component = DaggerApplicationComponent.builder()
.appModule(new AppModule(this))
.build();
component().inject(this);
}
public static App getInstance() {
return application;
}
public ApplicationComponent component() {
return component;
}
}
|
UTF-8
|
Java
| 883 |
java
|
App.java
|
Java
|
[
{
"context": "encyinjection.module.AppModule;\n\n/**\n * Created by ankit on 22/04/17.\n */\npublic class App extends Applica",
"end": 324,
"score": 0.9995772838592529,
"start": 319,
"tag": "USERNAME",
"value": "ankit"
}
] | null |
[] |
package ankit.com.bottomsheet;
import android.app.Application;
import ankit.com.bottomsheet.dependencyinjection.component.ApplicationComponent;
import ankit.com.bottomsheet.dependencyinjection.component.DaggerApplicationComponent;
import ankit.com.bottomsheet.dependencyinjection.module.AppModule;
/**
* Created by ankit on 22/04/17.
*/
public class App extends Application {
private ApplicationComponent component;
private static App application;
@Override
public void onCreate() {
super.onCreate();
application = this;
component = DaggerApplicationComponent.builder()
.appModule(new AppModule(this))
.build();
component().inject(this);
}
public static App getInstance() {
return application;
}
public ApplicationComponent component() {
return component;
}
}
| 883 | 0.701019 | 0.694224 | 32 | 26.59375 | 23.137981 | 86 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.40625 | false | false |
3
|
2e9418a2e082bf1cbe5eb537b770fe5e7feb98d0
| 28,630,252,015,346 |
2cd28db00027e5410da2be49700899c949af475d
|
/app/src/main/java/com/e/expandablelistviewtestapplication/modle/Child.java
|
fb2ed8ec34717cb88e69400a3d9472d32bf63679
|
[] |
no_license
|
Legend-Mortal/ExpandableListViewTestApplication
|
https://github.com/Legend-Mortal/ExpandableListViewTestApplication
|
bfd5fe12f8d829deee460480c35bdc164e7893c9
|
4bb745c4017376614e74254487f74366033cb356
|
refs/heads/master
| 2018-12-12T16:41:04.608000 | 2018-09-13T12:25:46 | 2018-09-13T12:25:46 | 148,632,750 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.e.expandablelistviewtestapplication.modle;
/**
* Created on 13-09-2018.
*/
public class Child {
private int childNo;
private String childTitle;
public Child(int childNo, String childTitle) {
this.childNo = childNo;
this.childTitle = childTitle;
}
public int getChildNo() {
return childNo;
}
public void setChildNo(int childNo) {
this.childNo = childNo;
}
public String getChildTitle() {
return childTitle;
}
public void setChildTitle(String childTitle) {
this.childTitle = childTitle;
}
}
|
UTF-8
|
Java
| 607 |
java
|
Child.java
|
Java
|
[] | null |
[] |
package com.e.expandablelistviewtestapplication.modle;
/**
* Created on 13-09-2018.
*/
public class Child {
private int childNo;
private String childTitle;
public Child(int childNo, String childTitle) {
this.childNo = childNo;
this.childTitle = childTitle;
}
public int getChildNo() {
return childNo;
}
public void setChildNo(int childNo) {
this.childNo = childNo;
}
public String getChildTitle() {
return childTitle;
}
public void setChildTitle(String childTitle) {
this.childTitle = childTitle;
}
}
| 607 | 0.634267 | 0.621087 | 32 | 17.96875 | 17.536541 | 54 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.3125 | false | false |
3
|
77da626e69e757a6f755b71277090d55dd2867d4
| 12,000,138,650,035 |
b419d83468b556d8e78fdbd3c6f4b5f02630126e
|
/app/src/main/java/com/example/mamba/wangposextended/Controller.java
|
4f6febe503c14ffd34ca2a66b6a473389d618cbe
|
[] |
no_license
|
maxstepanovski/WangPosDemo
|
https://github.com/maxstepanovski/WangPosDemo
|
c07b62de620bdc408561692528c137b926b7c95f
|
b8ca0db2b3edf44c988136bbc37ca917847d733e
|
refs/heads/master
| 2021-01-23T09:46:46.128000 | 2017-09-06T11:19:44 | 2017-09-06T11:19:44 | 102,599,554 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.example.mamba.wangposextended;
import android.content.Context;
import android.os.RemoteException;
import wangpos.sdk4.libbasebinder.Core;
/**
* Created by mamba on 06.09.2017.
*/
public class Controller implements EasyInterface {
private Core core;
public Controller(final Context context) {
new Thread(new Runnable() {
@Override
public void run() {
core = new Core(context.getApplicationContext());
}
}).start();
}
@Override
public void osBeep(int toneType, int durationMs) throws RemoteException {
core.buzzerEx(durationMs);
}
@Override
public char osGetRandom() {
return 0;
}
@Override
public int osWiCheck() {
return 0;
}
@Override
public int osCheckBattery() {
return 0;
}
@Override
public int osCheckPowerSupply() {
return 0;
}
@Override
public int osReboot() {
return 0;
}
@Override
public int[] osScrGetSize() {
return new int[0];
}
@Override
public int osPowerOff() {
return 0;
}
}
|
UTF-8
|
Java
| 1,158 |
java
|
Controller.java
|
Java
|
[
{
"context": "package com.example.mamba.wangposextended;\n\nimport android.content.Context;",
"end": 25,
"score": 0.7805109024047852,
"start": 23,
"tag": "USERNAME",
"value": "ba"
},
{
"context": "angpos.sdk4.libbasebinder.Core;\n\n/**\n * Created by mamba on 06.09.2017.\n */\n\npublic class Controller imple",
"end": 176,
"score": 0.9995781779289246,
"start": 171,
"tag": "USERNAME",
"value": "mamba"
}
] | null |
[] |
package com.example.mamba.wangposextended;
import android.content.Context;
import android.os.RemoteException;
import wangpos.sdk4.libbasebinder.Core;
/**
* Created by mamba on 06.09.2017.
*/
public class Controller implements EasyInterface {
private Core core;
public Controller(final Context context) {
new Thread(new Runnable() {
@Override
public void run() {
core = new Core(context.getApplicationContext());
}
}).start();
}
@Override
public void osBeep(int toneType, int durationMs) throws RemoteException {
core.buzzerEx(durationMs);
}
@Override
public char osGetRandom() {
return 0;
}
@Override
public int osWiCheck() {
return 0;
}
@Override
public int osCheckBattery() {
return 0;
}
@Override
public int osCheckPowerSupply() {
return 0;
}
@Override
public int osReboot() {
return 0;
}
@Override
public int[] osScrGetSize() {
return new int[0];
}
@Override
public int osPowerOff() {
return 0;
}
}
| 1,158 | 0.586356 | 0.572539 | 63 | 17.380953 | 16.884697 | 77 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.253968 | false | false |
3
|
6cb54b2a363be2653217a2971375480f3b030739
| 15,685,220,596,341 |
b833376b08ac21a6c3a1c01a3d5b6f7153171c5d
|
/geotrellis-accumulo-extensions/src/test/java/org/openeo/geotrellisaccumulo/PyramidFactoryTest.java
|
a13b34582990869f8c14f5858fecc7253923ac93
|
[
"Apache-2.0"
] |
permissive
|
Open-EO/openeo-geotrellis-extensions
|
https://github.com/Open-EO/openeo-geotrellis-extensions
|
169bce4209e4f56d5fd5509dc3e1d649f548028b
|
68143219e6882dffd0d05a46aaf29e530c0b93a5
|
refs/heads/master
| 2023-08-31T00:23:57.586000 | 2023-03-20T12:44:12 | 2023-03-20T12:44:12 | 152,139,837 | 5 | 3 |
Apache-2.0
| false | 2023-09-13T11:40:23 | 2018-10-08T20:08:44 | 2023-04-25T06:29:47 | 2023-09-13T11:40:22 | 26,108 | 5 | 3 | 50 |
Scala
| false | false |
package org.openeo.geotrellisaccumulo;
import geotrellis.layer.SpaceTimeKey;
import geotrellis.proj4.CRS;
import geotrellis.proj4.LatLng$;
import geotrellis.raster.MultibandTile;
import geotrellis.vector.Extent;
import org.apache.hadoop.hdfs.HdfsConfiguration;
import org.apache.hadoop.security.Credentials;
import org.apache.hadoop.security.UserGroupInformation;
import org.apache.spark.SparkConf;
import org.apache.spark.SparkContext;
import org.apache.spark.rdd.RDD;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.locationtech.jts.geom.GeometryFactory;
import org.locationtech.jts.geom.MultiPolygon;
import org.locationtech.jts.geom.Polygon;
import scala.Tuple2;
import scala.collection.Seq;
import java.io.IOException;
import static org.junit.Assert.assertFalse;
public class PyramidFactoryTest {
@BeforeClass
public static void sparkContext() throws IOException {
HdfsConfiguration config = new HdfsConfiguration();
config.set("hadoop.security.authentication", "kerberos");
UserGroupInformation.setConfiguration(config);
SparkConf conf = new SparkConf();
conf.setAppName("PyramidFactoryTest");
conf.setMaster("local[4]");
conf.set("spark.driver.bindAddress", "127.0.0.1");
conf.set("spark.serializer", "org.apache.spark.serializer.KryoSerializer");
SparkContext sc =SparkContext.getOrCreate(conf);
//creating context may have screwed up security settings
UserGroupInformation.setConfiguration(config);
Credentials creds = new Credentials();
//new AccumuloDelegationTokenProvider().obtainCredentials(config, conf, creds);
UserGroupInformation.getCurrentUser().addCredentials(creds);
}
@AfterClass
public static void shutDownSparkContext() {
SparkContext.getOrCreate().stop();
}
private PyramidFactory pyramidFactory() {
return new PyramidFactory("hdp-accumulo-instance", "epod-master1.vgt.vito.be:2181,epod-master2.vgt.vito.be:2181,epod-master3.vgt.vito.be:2181");
}
@Test
public void createPyramid() {
Extent bbox = new Extent(652000, 5161000, 672000, 5181000);
String srs = "EPSG:32632";
//bbox = new Extent(10.5, 46.5, 11.4, 46.9);
//srs = "EPSG:4326";
Seq<Tuple2<Object, RDD<Tuple2<SpaceTimeKey, MultibandTile>>>> pyramid = pyramidFactory().pyramid_seq("PROBAV_L3_S10_TOC_NDVI_333M_V3", bbox, srs, "2016-12-31T00:00:00Z", "2018-01-01T02:00:00Z");
System.out.println("pyramid = " + pyramid);
assertFalse(pyramid.apply(0)._2.isEmpty());
}
@Test
public void createPyramidFromPolygons() throws Exception {
Polygon polygon1 = (Polygon) package$.MODULE$.parseGeometry("{\"type\":\"Polygon\",\"coordinates\":[[[5.0761587693484875,51.21222494794898],[5.166854684377381,51.21222494794898],[5.166854684377381,51.268936260927404],[5.0761587693484875,51.268936260927404],[5.0761587693484875,51.21222494794898]]]}")._2();
Polygon polygon2 = (Polygon) package$.MODULE$.parseGeometry("{\"type\":\"Polygon\",\"coordinates\":[[[3.043212890625,51.17934297928927],[3.087158203125,51.17934297928927],[3.087158203125,51.210324789481355],[3.043212890625,51.210324789481355],[3.043212890625,51.17934297928927]]]}")._2();
MultiPolygon[] multiPolygons = new MultiPolygon[] {
new MultiPolygon(new Polygon[]{polygon1}, new GeometryFactory()),
new MultiPolygon(new Polygon[]{polygon2}, new GeometryFactory())
};
CRS polygons_crs = LatLng$.MODULE$;
String startDate = "2017-11-01T00:00:00Z";
String endDate = "2017-11-21T00:00:00Z";
Seq<Tuple2<Object, RDD<Tuple2<SpaceTimeKey, MultibandTile>>>> pyramid =
pyramidFactory().pyramid_seq("S2_FAPAR_V102_WEBMERCATOR2", multiPolygons, polygons_crs, startDate, endDate);
System.out.println("pyramid = " + pyramid);
assertFalse(pyramid.apply(0)._2().isEmpty());
}
}
|
UTF-8
|
Java
| 4,020 |
java
|
PyramidFactoryTest.java
|
Java
|
[
{
"context": "\");\n conf.set(\"spark.driver.bindAddress\", \"127.0.0.1\");\n conf.set(\"spark.serializer\", \"org.apac",
"end": 1289,
"score": 0.9990026950836182,
"start": 1280,
"tag": "IP_ADDRESS",
"value": "127.0.0.1"
}
] | null |
[] |
package org.openeo.geotrellisaccumulo;
import geotrellis.layer.SpaceTimeKey;
import geotrellis.proj4.CRS;
import geotrellis.proj4.LatLng$;
import geotrellis.raster.MultibandTile;
import geotrellis.vector.Extent;
import org.apache.hadoop.hdfs.HdfsConfiguration;
import org.apache.hadoop.security.Credentials;
import org.apache.hadoop.security.UserGroupInformation;
import org.apache.spark.SparkConf;
import org.apache.spark.SparkContext;
import org.apache.spark.rdd.RDD;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.locationtech.jts.geom.GeometryFactory;
import org.locationtech.jts.geom.MultiPolygon;
import org.locationtech.jts.geom.Polygon;
import scala.Tuple2;
import scala.collection.Seq;
import java.io.IOException;
import static org.junit.Assert.assertFalse;
public class PyramidFactoryTest {
@BeforeClass
public static void sparkContext() throws IOException {
HdfsConfiguration config = new HdfsConfiguration();
config.set("hadoop.security.authentication", "kerberos");
UserGroupInformation.setConfiguration(config);
SparkConf conf = new SparkConf();
conf.setAppName("PyramidFactoryTest");
conf.setMaster("local[4]");
conf.set("spark.driver.bindAddress", "127.0.0.1");
conf.set("spark.serializer", "org.apache.spark.serializer.KryoSerializer");
SparkContext sc =SparkContext.getOrCreate(conf);
//creating context may have screwed up security settings
UserGroupInformation.setConfiguration(config);
Credentials creds = new Credentials();
//new AccumuloDelegationTokenProvider().obtainCredentials(config, conf, creds);
UserGroupInformation.getCurrentUser().addCredentials(creds);
}
@AfterClass
public static void shutDownSparkContext() {
SparkContext.getOrCreate().stop();
}
private PyramidFactory pyramidFactory() {
return new PyramidFactory("hdp-accumulo-instance", "epod-master1.vgt.vito.be:2181,epod-master2.vgt.vito.be:2181,epod-master3.vgt.vito.be:2181");
}
@Test
public void createPyramid() {
Extent bbox = new Extent(652000, 5161000, 672000, 5181000);
String srs = "EPSG:32632";
//bbox = new Extent(10.5, 46.5, 11.4, 46.9);
//srs = "EPSG:4326";
Seq<Tuple2<Object, RDD<Tuple2<SpaceTimeKey, MultibandTile>>>> pyramid = pyramidFactory().pyramid_seq("PROBAV_L3_S10_TOC_NDVI_333M_V3", bbox, srs, "2016-12-31T00:00:00Z", "2018-01-01T02:00:00Z");
System.out.println("pyramid = " + pyramid);
assertFalse(pyramid.apply(0)._2.isEmpty());
}
@Test
public void createPyramidFromPolygons() throws Exception {
Polygon polygon1 = (Polygon) package$.MODULE$.parseGeometry("{\"type\":\"Polygon\",\"coordinates\":[[[5.0761587693484875,51.21222494794898],[5.166854684377381,51.21222494794898],[5.166854684377381,51.268936260927404],[5.0761587693484875,51.268936260927404],[5.0761587693484875,51.21222494794898]]]}")._2();
Polygon polygon2 = (Polygon) package$.MODULE$.parseGeometry("{\"type\":\"Polygon\",\"coordinates\":[[[3.043212890625,51.17934297928927],[3.087158203125,51.17934297928927],[3.087158203125,51.210324789481355],[3.043212890625,51.210324789481355],[3.043212890625,51.17934297928927]]]}")._2();
MultiPolygon[] multiPolygons = new MultiPolygon[] {
new MultiPolygon(new Polygon[]{polygon1}, new GeometryFactory()),
new MultiPolygon(new Polygon[]{polygon2}, new GeometryFactory())
};
CRS polygons_crs = LatLng$.MODULE$;
String startDate = "2017-11-01T00:00:00Z";
String endDate = "2017-11-21T00:00:00Z";
Seq<Tuple2<Object, RDD<Tuple2<SpaceTimeKey, MultibandTile>>>> pyramid =
pyramidFactory().pyramid_seq("S2_FAPAR_V102_WEBMERCATOR2", multiPolygons, polygons_crs, startDate, endDate);
System.out.println("pyramid = " + pyramid);
assertFalse(pyramid.apply(0)._2().isEmpty());
}
}
| 4,020 | 0.707463 | 0.591542 | 93 | 42.225807 | 51.388489 | 314 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.096774 | false | false |
3
|
f49901ef29fea6e4fa80598308645162abcba487
| 4,020,089,414,606 |
73f63ca5c1bec18e05cbe39af0b318f805090a8a
|
/schoa-web/src/main/java/com/hao/schoa/po/BaseClassesKecheng.java
|
06e44c451cb9a7ed6a7d096a356fe0be1b47294a
|
[] |
no_license
|
haoguowei/schoa
|
https://github.com/haoguowei/schoa
|
cd68fa673b529258d721eada0e86ec022fe932dd
|
fdebb264e67ab4580fcc054305ae807b21ec42ca
|
refs/heads/master
| 2019-01-02T11:37:09.093000 | 2018-11-14T14:25:46 | 2018-11-14T14:25:46 | 52,945,745 | 0 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.hao.schoa.po;
import java.sql.Connection;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import org.apache.commons.lang.ObjectUtils;
import org.apache.torque.TorqueException;
import org.apache.torque.map.TableMap;
import org.apache.torque.om.BaseObject;
import org.apache.torque.om.NumberKey;
import org.apache.torque.om.ObjectKey;
import org.apache.torque.om.SimpleKey;
import org.apache.torque.util.Transaction;
/**
* You should not use this class directly. It should not even be
* extended all references should be to ClassesKecheng
*/
public abstract class BaseClassesKecheng extends BaseObject
{
/** The Peer class */
private static final ClassesKechengPeer peer =
new ClassesKechengPeer();
/** The value for the id field */
private int id;
/** The value for the classesId field */
private int classesId = 0;
/** The value for the kechengId field */
private int kechengId = 0;
/** The value for the kechengStart field */
private Date kechengStart;
/** The value for the kechengEnd field */
private Date kechengEnd;
/** The value for the week field */
private int week = 0;
/**
* Get the Id
*
* @return int
*/
public int getId()
{
return id;
}
/**
* Set the value of Id
*
* @param v new value
*/
public void setId(int v)
{
if (this.id != v)
{
this.id = v;
setModified(true);
}
}
/**
* Get the ClassesId
*
* @return int
*/
public int getClassesId()
{
return classesId;
}
/**
* Set the value of ClassesId
*
* @param v new value
*/
public void setClassesId(int v)
{
if (this.classesId != v)
{
this.classesId = v;
setModified(true);
}
}
/**
* Get the KechengId
*
* @return int
*/
public int getKechengId()
{
return kechengId;
}
/**
* Set the value of KechengId
*
* @param v new value
*/
public void setKechengId(int v)
{
if (this.kechengId != v)
{
this.kechengId = v;
setModified(true);
}
}
/**
* Get the KechengStart
*
* @return Date
*/
public Date getKechengStart()
{
return kechengStart;
}
/**
* Set the value of KechengStart
*
* @param v new value
*/
public void setKechengStart(Date v)
{
if (!ObjectUtils.equals(this.kechengStart, v))
{
this.kechengStart = v;
setModified(true);
}
}
/**
* Get the KechengEnd
*
* @return Date
*/
public Date getKechengEnd()
{
return kechengEnd;
}
/**
* Set the value of KechengEnd
*
* @param v new value
*/
public void setKechengEnd(Date v)
{
if (!ObjectUtils.equals(this.kechengEnd, v))
{
this.kechengEnd = v;
setModified(true);
}
}
/**
* Get the Week
*
* @return int
*/
public int getWeek()
{
return week;
}
/**
* Set the value of Week
*
* @param v new value
*/
public void setWeek(int v)
{
if (this.week != v)
{
this.week = v;
setModified(true);
}
}
private static List fieldNames = null;
/**
* Generate a list of field names.
*
* @return a list of field names
*/
public static synchronized List getFieldNames()
{
if (fieldNames == null)
{
fieldNames = new ArrayList();
fieldNames.add("Id");
fieldNames.add("ClassesId");
fieldNames.add("KechengId");
fieldNames.add("KechengStart");
fieldNames.add("KechengEnd");
fieldNames.add("Week");
fieldNames = Collections.unmodifiableList(fieldNames);
}
return fieldNames;
}
/**
* Retrieves a field from the object by field (Java) name passed in as a String.
*
* @param name field name
* @return value
*/
public Object getByName(String name)
{
if (name.equals("Id"))
{
return new Integer(getId());
}
if (name.equals("ClassesId"))
{
return new Integer(getClassesId());
}
if (name.equals("KechengId"))
{
return new Integer(getKechengId());
}
if (name.equals("KechengStart"))
{
return getKechengStart();
}
if (name.equals("KechengEnd"))
{
return getKechengEnd();
}
if (name.equals("Week"))
{
return new Integer(getWeek());
}
return null;
}
/**
* Set a field in the object by field (Java) name.
*
* @param name field name
* @param value field value
* @return True if value was set, false if not (invalid name / protected field).
* @throws IllegalArgumentException if object type of value does not match field object type.
* @throws TorqueException If a problem occurs with the set[Field] method.
*/
public boolean setByName(String name, Object value )
throws TorqueException, IllegalArgumentException
{
if (name.equals("Id"))
{
if (value == null || ! (Integer.class.isInstance(value)))
{
throw new IllegalArgumentException("setByName: value parameter was null or not an Integer object.");
}
setId(((Integer) value).intValue());
return true;
}
if (name.equals("ClassesId"))
{
if (value == null || ! (Integer.class.isInstance(value)))
{
throw new IllegalArgumentException("setByName: value parameter was null or not an Integer object.");
}
setClassesId(((Integer) value).intValue());
return true;
}
if (name.equals("KechengId"))
{
if (value == null || ! (Integer.class.isInstance(value)))
{
throw new IllegalArgumentException("setByName: value parameter was null or not an Integer object.");
}
setKechengId(((Integer) value).intValue());
return true;
}
if (name.equals("KechengStart"))
{
// Object fields can be null
if (value != null && ! Date.class.isInstance(value))
{
throw new IllegalArgumentException("Invalid type of object specified for value in setByName");
}
setKechengStart((Date) value);
return true;
}
if (name.equals("KechengEnd"))
{
// Object fields can be null
if (value != null && ! Date.class.isInstance(value))
{
throw new IllegalArgumentException("Invalid type of object specified for value in setByName");
}
setKechengEnd((Date) value);
return true;
}
if (name.equals("Week"))
{
if (value == null || ! (Integer.class.isInstance(value)))
{
throw new IllegalArgumentException("setByName: value parameter was null or not an Integer object.");
}
setWeek(((Integer) value).intValue());
return true;
}
return false;
}
/**
* Retrieves a field from the object by name passed in
* as a String. The String must be one of the static
* Strings defined in this Class' Peer.
*
* @param name peer name
* @return value
*/
public Object getByPeerName(String name)
{
if (name.equals(ClassesKechengPeer.ID))
{
return new Integer(getId());
}
if (name.equals(ClassesKechengPeer.CLASSES_ID))
{
return new Integer(getClassesId());
}
if (name.equals(ClassesKechengPeer.KECHENG_ID))
{
return new Integer(getKechengId());
}
if (name.equals(ClassesKechengPeer.KECHENG_START))
{
return getKechengStart();
}
if (name.equals(ClassesKechengPeer.KECHENG_END))
{
return getKechengEnd();
}
if (name.equals(ClassesKechengPeer.WEEK))
{
return new Integer(getWeek());
}
return null;
}
/**
* Set field values by Peer Field Name
*
* @param name field name
* @param value field value
* @return True if value was set, false if not (invalid name / protected field).
* @throws IllegalArgumentException if object type of value does not match field object type.
* @throws TorqueException If a problem occurs with the set[Field] method.
*/
public boolean setByPeerName(String name, Object value)
throws TorqueException, IllegalArgumentException
{
if (ClassesKechengPeer.ID.equals(name))
{
return setByName("Id", value);
}
if (ClassesKechengPeer.CLASSES_ID.equals(name))
{
return setByName("ClassesId", value);
}
if (ClassesKechengPeer.KECHENG_ID.equals(name))
{
return setByName("KechengId", value);
}
if (ClassesKechengPeer.KECHENG_START.equals(name))
{
return setByName("KechengStart", value);
}
if (ClassesKechengPeer.KECHENG_END.equals(name))
{
return setByName("KechengEnd", value);
}
if (ClassesKechengPeer.WEEK.equals(name))
{
return setByName("Week", value);
}
return false;
}
/**
* Retrieves a field from the object by Position as specified
* in the xml schema. Zero-based.
*
* @param pos position in xml schema
* @return value
*/
public Object getByPosition(int pos)
{
if (pos == 0)
{
return new Integer(getId());
}
if (pos == 1)
{
return new Integer(getClassesId());
}
if (pos == 2)
{
return new Integer(getKechengId());
}
if (pos == 3)
{
return getKechengStart();
}
if (pos == 4)
{
return getKechengEnd();
}
if (pos == 5)
{
return new Integer(getWeek());
}
return null;
}
/**
* Set field values by its position (zero based) in the XML schema.
*
* @param position The field position
* @param value field value
* @return True if value was set, false if not (invalid position / protected field).
* @throws IllegalArgumentException if object type of value does not match field object type.
* @throws TorqueException If a problem occurs with the set[Field] method.
*/
public boolean setByPosition(int position, Object value)
throws TorqueException, IllegalArgumentException
{
if (position == 0)
{
return setByName("Id", value);
}
if (position == 1)
{
return setByName("ClassesId", value);
}
if (position == 2)
{
return setByName("KechengId", value);
}
if (position == 3)
{
return setByName("KechengStart", value);
}
if (position == 4)
{
return setByName("KechengEnd", value);
}
if (position == 5)
{
return setByName("Week", value);
}
return false;
}
/**
* Stores the object in the database. If the object is new,
* it inserts it; otherwise an update is performed.
*
* @throws Exception
*/
public void save() throws Exception
{
save(ClassesKechengPeer.DATABASE_NAME);
}
/**
* Stores the object in the database. If the object is new,
* it inserts it; otherwise an update is performed.
* Note: this code is here because the method body is
* auto-generated conditionally and therefore needs to be
* in this file instead of in the super class, BaseObject.
*
* @param dbName
* @throws TorqueException
*/
public void save(String dbName) throws TorqueException
{
Connection con = null;
try
{
con = Transaction.begin(dbName);
save(con);
Transaction.commit(con);
}
catch(TorqueException e)
{
Transaction.safeRollback(con);
throw e;
}
}
/** flag to prevent endless save loop, if this object is referenced
by another object which falls in this transaction. */
private boolean alreadyInSave = false;
/**
* Stores the object in the database. If the object is new,
* it inserts it; otherwise an update is performed. This method
* is meant to be used as part of a transaction, otherwise use
* the save() method and the connection details will be handled
* internally
*
* @param con
* @throws TorqueException
*/
public void save(Connection con) throws TorqueException
{
if (!alreadyInSave)
{
alreadyInSave = true;
// If this object has been modified, then save it to the database.
if (isModified())
{
if (isNew())
{
ClassesKechengPeer.doInsert((ClassesKecheng) this, con);
setNew(false);
}
else
{
ClassesKechengPeer.doUpdate((ClassesKecheng) this, con);
}
}
alreadyInSave = false;
}
}
/**
* Set the PrimaryKey using ObjectKey.
*
* @param key id ObjectKey
*/
public void setPrimaryKey(ObjectKey key)
{
setId(((NumberKey) key).intValue());
}
/**
* Set the PrimaryKey using a String.
*
* @param key
*/
public void setPrimaryKey(String key)
{
setId(Integer.parseInt(key));
}
/**
* returns an id that differentiates this object from others
* of its class.
*/
public ObjectKey getPrimaryKey()
{
return SimpleKey.keyFor(getId());
}
/**
* Makes a copy of this object.
* It creates a new object filling in the simple attributes.
* It then fills all the association collections and sets the
* related objects to isNew=true.
*/
public ClassesKecheng copy() throws TorqueException
{
return copy(true);
}
/**
* Makes a copy of this object using connection.
* It creates a new object filling in the simple attributes.
* It then fills all the association collections and sets the
* related objects to isNew=true.
*
* @param con the database connection to read associated objects.
*/
public ClassesKecheng copy(Connection con) throws TorqueException
{
return copy(true, con);
}
/**
* Makes a copy of this object.
* It creates a new object filling in the simple attributes.
* If the parameter deepcopy is true, it then fills all the
* association collections and sets the related objects to
* isNew=true.
*
* @param deepcopy whether to copy the associated objects.
*/
public ClassesKecheng copy(boolean deepcopy) throws TorqueException
{
return copyInto(new ClassesKecheng(), deepcopy);
}
/**
* Makes a copy of this object using connection.
* It creates a new object filling in the simple attributes.
* If the parameter deepcopy is true, it then fills all the
* association collections and sets the related objects to
* isNew=true.
*
* @param deepcopy whether to copy the associated objects.
* @param con the database connection to read associated objects.
*/
public ClassesKecheng copy(boolean deepcopy, Connection con) throws TorqueException
{
return copyInto(new ClassesKecheng(), deepcopy, con);
}
/**
* Fills the copyObj with the contents of this object.
* The associated objects are also copied and treated as new objects.
*
* @param copyObj the object to fill.
*/
protected ClassesKecheng copyInto(ClassesKecheng copyObj) throws TorqueException
{
return copyInto(copyObj, true);
}
/**
* Fills the copyObj with the contents of this object using connection.
* The associated objects are also copied and treated as new objects.
*
* @param copyObj the object to fill.
* @param con the database connection to read associated objects.
*/
protected ClassesKecheng copyInto(ClassesKecheng copyObj, Connection con) throws TorqueException
{
return copyInto(copyObj, true, con);
}
/**
* Fills the copyObj with the contents of this object.
* If deepcopy is true, The associated objects are also copied
* and treated as new objects.
*
* @param copyObj the object to fill.
* @param deepcopy whether the associated objects should be copied.
*/
protected ClassesKecheng copyInto(ClassesKecheng copyObj, boolean deepcopy) throws TorqueException
{
copyObj.setId(id);
copyObj.setClassesId(classesId);
copyObj.setKechengId(kechengId);
copyObj.setKechengStart(kechengStart);
copyObj.setKechengEnd(kechengEnd);
copyObj.setWeek(week);
copyObj.setId( 0);
if (deepcopy)
{
}
return copyObj;
}
/**
* Fills the copyObj with the contents of this object using connection.
* If deepcopy is true, The associated objects are also copied
* and treated as new objects.
*
* @param copyObj the object to fill.
* @param deepcopy whether the associated objects should be copied.
* @param con the database connection to read associated objects.
*/
protected ClassesKecheng copyInto(ClassesKecheng copyObj, boolean deepcopy, Connection con) throws TorqueException
{
copyObj.setId(id);
copyObj.setClassesId(classesId);
copyObj.setKechengId(kechengId);
copyObj.setKechengStart(kechengStart);
copyObj.setKechengEnd(kechengEnd);
copyObj.setWeek(week);
copyObj.setId( 0);
if (deepcopy)
{
}
return copyObj;
}
/**
* returns a peer instance associated with this om. Since Peer classes
* are not to have any instance attributes, this method returns the
* same instance for all member of this class. The method could therefore
* be static, but this would prevent one from overriding the behavior.
*/
public ClassesKechengPeer getPeer()
{
return peer;
}
/**
* Retrieves the TableMap object related to this Table data without
* compiler warnings of using getPeer().getTableMap().
*
* @return The associated TableMap object.
*/
public TableMap getTableMap() throws TorqueException
{
return ClassesKechengPeer.getTableMap();
}
public String toString()
{
StringBuffer str = new StringBuffer();
str.append("ClassesKecheng:\n");
str.append("Id = ")
.append(getId())
.append("\n");
str.append("ClassesId = ")
.append(getClassesId())
.append("\n");
str.append("KechengId = ")
.append(getKechengId())
.append("\n");
str.append("KechengStart = ")
.append(getKechengStart())
.append("\n");
str.append("KechengEnd = ")
.append(getKechengEnd())
.append("\n");
str.append("Week = ")
.append(getWeek())
.append("\n");
return(str.toString());
}
}
|
UTF-8
|
Java
| 20,314 |
java
|
BaseClassesKecheng.java
|
Java
|
[] | null |
[] |
package com.hao.schoa.po;
import java.sql.Connection;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import org.apache.commons.lang.ObjectUtils;
import org.apache.torque.TorqueException;
import org.apache.torque.map.TableMap;
import org.apache.torque.om.BaseObject;
import org.apache.torque.om.NumberKey;
import org.apache.torque.om.ObjectKey;
import org.apache.torque.om.SimpleKey;
import org.apache.torque.util.Transaction;
/**
* You should not use this class directly. It should not even be
* extended all references should be to ClassesKecheng
*/
public abstract class BaseClassesKecheng extends BaseObject
{
/** The Peer class */
private static final ClassesKechengPeer peer =
new ClassesKechengPeer();
/** The value for the id field */
private int id;
/** The value for the classesId field */
private int classesId = 0;
/** The value for the kechengId field */
private int kechengId = 0;
/** The value for the kechengStart field */
private Date kechengStart;
/** The value for the kechengEnd field */
private Date kechengEnd;
/** The value for the week field */
private int week = 0;
/**
* Get the Id
*
* @return int
*/
public int getId()
{
return id;
}
/**
* Set the value of Id
*
* @param v new value
*/
public void setId(int v)
{
if (this.id != v)
{
this.id = v;
setModified(true);
}
}
/**
* Get the ClassesId
*
* @return int
*/
public int getClassesId()
{
return classesId;
}
/**
* Set the value of ClassesId
*
* @param v new value
*/
public void setClassesId(int v)
{
if (this.classesId != v)
{
this.classesId = v;
setModified(true);
}
}
/**
* Get the KechengId
*
* @return int
*/
public int getKechengId()
{
return kechengId;
}
/**
* Set the value of KechengId
*
* @param v new value
*/
public void setKechengId(int v)
{
if (this.kechengId != v)
{
this.kechengId = v;
setModified(true);
}
}
/**
* Get the KechengStart
*
* @return Date
*/
public Date getKechengStart()
{
return kechengStart;
}
/**
* Set the value of KechengStart
*
* @param v new value
*/
public void setKechengStart(Date v)
{
if (!ObjectUtils.equals(this.kechengStart, v))
{
this.kechengStart = v;
setModified(true);
}
}
/**
* Get the KechengEnd
*
* @return Date
*/
public Date getKechengEnd()
{
return kechengEnd;
}
/**
* Set the value of KechengEnd
*
* @param v new value
*/
public void setKechengEnd(Date v)
{
if (!ObjectUtils.equals(this.kechengEnd, v))
{
this.kechengEnd = v;
setModified(true);
}
}
/**
* Get the Week
*
* @return int
*/
public int getWeek()
{
return week;
}
/**
* Set the value of Week
*
* @param v new value
*/
public void setWeek(int v)
{
if (this.week != v)
{
this.week = v;
setModified(true);
}
}
private static List fieldNames = null;
/**
* Generate a list of field names.
*
* @return a list of field names
*/
public static synchronized List getFieldNames()
{
if (fieldNames == null)
{
fieldNames = new ArrayList();
fieldNames.add("Id");
fieldNames.add("ClassesId");
fieldNames.add("KechengId");
fieldNames.add("KechengStart");
fieldNames.add("KechengEnd");
fieldNames.add("Week");
fieldNames = Collections.unmodifiableList(fieldNames);
}
return fieldNames;
}
/**
* Retrieves a field from the object by field (Java) name passed in as a String.
*
* @param name field name
* @return value
*/
public Object getByName(String name)
{
if (name.equals("Id"))
{
return new Integer(getId());
}
if (name.equals("ClassesId"))
{
return new Integer(getClassesId());
}
if (name.equals("KechengId"))
{
return new Integer(getKechengId());
}
if (name.equals("KechengStart"))
{
return getKechengStart();
}
if (name.equals("KechengEnd"))
{
return getKechengEnd();
}
if (name.equals("Week"))
{
return new Integer(getWeek());
}
return null;
}
/**
* Set a field in the object by field (Java) name.
*
* @param name field name
* @param value field value
* @return True if value was set, false if not (invalid name / protected field).
* @throws IllegalArgumentException if object type of value does not match field object type.
* @throws TorqueException If a problem occurs with the set[Field] method.
*/
public boolean setByName(String name, Object value )
throws TorqueException, IllegalArgumentException
{
if (name.equals("Id"))
{
if (value == null || ! (Integer.class.isInstance(value)))
{
throw new IllegalArgumentException("setByName: value parameter was null or not an Integer object.");
}
setId(((Integer) value).intValue());
return true;
}
if (name.equals("ClassesId"))
{
if (value == null || ! (Integer.class.isInstance(value)))
{
throw new IllegalArgumentException("setByName: value parameter was null or not an Integer object.");
}
setClassesId(((Integer) value).intValue());
return true;
}
if (name.equals("KechengId"))
{
if (value == null || ! (Integer.class.isInstance(value)))
{
throw new IllegalArgumentException("setByName: value parameter was null or not an Integer object.");
}
setKechengId(((Integer) value).intValue());
return true;
}
if (name.equals("KechengStart"))
{
// Object fields can be null
if (value != null && ! Date.class.isInstance(value))
{
throw new IllegalArgumentException("Invalid type of object specified for value in setByName");
}
setKechengStart((Date) value);
return true;
}
if (name.equals("KechengEnd"))
{
// Object fields can be null
if (value != null && ! Date.class.isInstance(value))
{
throw new IllegalArgumentException("Invalid type of object specified for value in setByName");
}
setKechengEnd((Date) value);
return true;
}
if (name.equals("Week"))
{
if (value == null || ! (Integer.class.isInstance(value)))
{
throw new IllegalArgumentException("setByName: value parameter was null or not an Integer object.");
}
setWeek(((Integer) value).intValue());
return true;
}
return false;
}
/**
* Retrieves a field from the object by name passed in
* as a String. The String must be one of the static
* Strings defined in this Class' Peer.
*
* @param name peer name
* @return value
*/
public Object getByPeerName(String name)
{
if (name.equals(ClassesKechengPeer.ID))
{
return new Integer(getId());
}
if (name.equals(ClassesKechengPeer.CLASSES_ID))
{
return new Integer(getClassesId());
}
if (name.equals(ClassesKechengPeer.KECHENG_ID))
{
return new Integer(getKechengId());
}
if (name.equals(ClassesKechengPeer.KECHENG_START))
{
return getKechengStart();
}
if (name.equals(ClassesKechengPeer.KECHENG_END))
{
return getKechengEnd();
}
if (name.equals(ClassesKechengPeer.WEEK))
{
return new Integer(getWeek());
}
return null;
}
/**
* Set field values by Peer Field Name
*
* @param name field name
* @param value field value
* @return True if value was set, false if not (invalid name / protected field).
* @throws IllegalArgumentException if object type of value does not match field object type.
* @throws TorqueException If a problem occurs with the set[Field] method.
*/
public boolean setByPeerName(String name, Object value)
throws TorqueException, IllegalArgumentException
{
if (ClassesKechengPeer.ID.equals(name))
{
return setByName("Id", value);
}
if (ClassesKechengPeer.CLASSES_ID.equals(name))
{
return setByName("ClassesId", value);
}
if (ClassesKechengPeer.KECHENG_ID.equals(name))
{
return setByName("KechengId", value);
}
if (ClassesKechengPeer.KECHENG_START.equals(name))
{
return setByName("KechengStart", value);
}
if (ClassesKechengPeer.KECHENG_END.equals(name))
{
return setByName("KechengEnd", value);
}
if (ClassesKechengPeer.WEEK.equals(name))
{
return setByName("Week", value);
}
return false;
}
/**
* Retrieves a field from the object by Position as specified
* in the xml schema. Zero-based.
*
* @param pos position in xml schema
* @return value
*/
public Object getByPosition(int pos)
{
if (pos == 0)
{
return new Integer(getId());
}
if (pos == 1)
{
return new Integer(getClassesId());
}
if (pos == 2)
{
return new Integer(getKechengId());
}
if (pos == 3)
{
return getKechengStart();
}
if (pos == 4)
{
return getKechengEnd();
}
if (pos == 5)
{
return new Integer(getWeek());
}
return null;
}
/**
* Set field values by its position (zero based) in the XML schema.
*
* @param position The field position
* @param value field value
* @return True if value was set, false if not (invalid position / protected field).
* @throws IllegalArgumentException if object type of value does not match field object type.
* @throws TorqueException If a problem occurs with the set[Field] method.
*/
public boolean setByPosition(int position, Object value)
throws TorqueException, IllegalArgumentException
{
if (position == 0)
{
return setByName("Id", value);
}
if (position == 1)
{
return setByName("ClassesId", value);
}
if (position == 2)
{
return setByName("KechengId", value);
}
if (position == 3)
{
return setByName("KechengStart", value);
}
if (position == 4)
{
return setByName("KechengEnd", value);
}
if (position == 5)
{
return setByName("Week", value);
}
return false;
}
/**
* Stores the object in the database. If the object is new,
* it inserts it; otherwise an update is performed.
*
* @throws Exception
*/
public void save() throws Exception
{
save(ClassesKechengPeer.DATABASE_NAME);
}
/**
* Stores the object in the database. If the object is new,
* it inserts it; otherwise an update is performed.
* Note: this code is here because the method body is
* auto-generated conditionally and therefore needs to be
* in this file instead of in the super class, BaseObject.
*
* @param dbName
* @throws TorqueException
*/
public void save(String dbName) throws TorqueException
{
Connection con = null;
try
{
con = Transaction.begin(dbName);
save(con);
Transaction.commit(con);
}
catch(TorqueException e)
{
Transaction.safeRollback(con);
throw e;
}
}
/** flag to prevent endless save loop, if this object is referenced
by another object which falls in this transaction. */
private boolean alreadyInSave = false;
/**
* Stores the object in the database. If the object is new,
* it inserts it; otherwise an update is performed. This method
* is meant to be used as part of a transaction, otherwise use
* the save() method and the connection details will be handled
* internally
*
* @param con
* @throws TorqueException
*/
public void save(Connection con) throws TorqueException
{
if (!alreadyInSave)
{
alreadyInSave = true;
// If this object has been modified, then save it to the database.
if (isModified())
{
if (isNew())
{
ClassesKechengPeer.doInsert((ClassesKecheng) this, con);
setNew(false);
}
else
{
ClassesKechengPeer.doUpdate((ClassesKecheng) this, con);
}
}
alreadyInSave = false;
}
}
/**
* Set the PrimaryKey using ObjectKey.
*
* @param key id ObjectKey
*/
public void setPrimaryKey(ObjectKey key)
{
setId(((NumberKey) key).intValue());
}
/**
* Set the PrimaryKey using a String.
*
* @param key
*/
public void setPrimaryKey(String key)
{
setId(Integer.parseInt(key));
}
/**
* returns an id that differentiates this object from others
* of its class.
*/
public ObjectKey getPrimaryKey()
{
return SimpleKey.keyFor(getId());
}
/**
* Makes a copy of this object.
* It creates a new object filling in the simple attributes.
* It then fills all the association collections and sets the
* related objects to isNew=true.
*/
public ClassesKecheng copy() throws TorqueException
{
return copy(true);
}
/**
* Makes a copy of this object using connection.
* It creates a new object filling in the simple attributes.
* It then fills all the association collections and sets the
* related objects to isNew=true.
*
* @param con the database connection to read associated objects.
*/
public ClassesKecheng copy(Connection con) throws TorqueException
{
return copy(true, con);
}
/**
* Makes a copy of this object.
* It creates a new object filling in the simple attributes.
* If the parameter deepcopy is true, it then fills all the
* association collections and sets the related objects to
* isNew=true.
*
* @param deepcopy whether to copy the associated objects.
*/
public ClassesKecheng copy(boolean deepcopy) throws TorqueException
{
return copyInto(new ClassesKecheng(), deepcopy);
}
/**
* Makes a copy of this object using connection.
* It creates a new object filling in the simple attributes.
* If the parameter deepcopy is true, it then fills all the
* association collections and sets the related objects to
* isNew=true.
*
* @param deepcopy whether to copy the associated objects.
* @param con the database connection to read associated objects.
*/
public ClassesKecheng copy(boolean deepcopy, Connection con) throws TorqueException
{
return copyInto(new ClassesKecheng(), deepcopy, con);
}
/**
* Fills the copyObj with the contents of this object.
* The associated objects are also copied and treated as new objects.
*
* @param copyObj the object to fill.
*/
protected ClassesKecheng copyInto(ClassesKecheng copyObj) throws TorqueException
{
return copyInto(copyObj, true);
}
/**
* Fills the copyObj with the contents of this object using connection.
* The associated objects are also copied and treated as new objects.
*
* @param copyObj the object to fill.
* @param con the database connection to read associated objects.
*/
protected ClassesKecheng copyInto(ClassesKecheng copyObj, Connection con) throws TorqueException
{
return copyInto(copyObj, true, con);
}
/**
* Fills the copyObj with the contents of this object.
* If deepcopy is true, The associated objects are also copied
* and treated as new objects.
*
* @param copyObj the object to fill.
* @param deepcopy whether the associated objects should be copied.
*/
protected ClassesKecheng copyInto(ClassesKecheng copyObj, boolean deepcopy) throws TorqueException
{
copyObj.setId(id);
copyObj.setClassesId(classesId);
copyObj.setKechengId(kechengId);
copyObj.setKechengStart(kechengStart);
copyObj.setKechengEnd(kechengEnd);
copyObj.setWeek(week);
copyObj.setId( 0);
if (deepcopy)
{
}
return copyObj;
}
/**
* Fills the copyObj with the contents of this object using connection.
* If deepcopy is true, The associated objects are also copied
* and treated as new objects.
*
* @param copyObj the object to fill.
* @param deepcopy whether the associated objects should be copied.
* @param con the database connection to read associated objects.
*/
protected ClassesKecheng copyInto(ClassesKecheng copyObj, boolean deepcopy, Connection con) throws TorqueException
{
copyObj.setId(id);
copyObj.setClassesId(classesId);
copyObj.setKechengId(kechengId);
copyObj.setKechengStart(kechengStart);
copyObj.setKechengEnd(kechengEnd);
copyObj.setWeek(week);
copyObj.setId( 0);
if (deepcopy)
{
}
return copyObj;
}
/**
* returns a peer instance associated with this om. Since Peer classes
* are not to have any instance attributes, this method returns the
* same instance for all member of this class. The method could therefore
* be static, but this would prevent one from overriding the behavior.
*/
public ClassesKechengPeer getPeer()
{
return peer;
}
/**
* Retrieves the TableMap object related to this Table data without
* compiler warnings of using getPeer().getTableMap().
*
* @return The associated TableMap object.
*/
public TableMap getTableMap() throws TorqueException
{
return ClassesKechengPeer.getTableMap();
}
public String toString()
{
StringBuffer str = new StringBuffer();
str.append("ClassesKecheng:\n");
str.append("Id = ")
.append(getId())
.append("\n");
str.append("ClassesId = ")
.append(getClassesId())
.append("\n");
str.append("KechengId = ")
.append(getKechengId())
.append("\n");
str.append("KechengStart = ")
.append(getKechengStart())
.append("\n");
str.append("KechengEnd = ")
.append(getKechengEnd())
.append("\n");
str.append("Week = ")
.append(getWeek())
.append("\n");
return(str.toString());
}
}
| 20,314 | 0.56114 | 0.560303 | 790 | 24.713924 | 23.646376 | 118 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.26962 | false | false |
3
|
deb0b093829b537caf87d770faf316c1c6f69446
| 4,020,089,414,203 |
c559309a0cba39862c1e046fc4ccf704c7725421
|
/src/main/java/br/ufrn/edu/imd/lpii/dorabot/model/Bem.java
|
f3d35e0e395ee4323a272a0c463839cdcea30a98
|
[] |
no_license
|
jemimad/telegram-bot
|
https://github.com/jemimad/telegram-bot
|
743758b89d0a6f6165a8e8c337041d2d2ced2c02
|
04f44dafa77fe487620d192745822001a1ec8e57
|
refs/heads/master
| 2020-08-26T17:32:55.550000 | 2019-11-19T20:19:55 | 2019-11-19T20:19:55 | 217,089,561 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package br.ufrn.edu.imd.lpii.dorabot.model;
/**
* Classe para objetos do tipo Bem, onde estão contidos os atributos e metodos para o mesmo.
*/
public class Bem {
private int id;
private String nome;
private String descricao;
Localizacao localizacao;
Categoria categoria;
public Bem() {
}
public Bem(int id, String nome, String descricao, Localizacao localizacao, Categoria categoria) {
this.id = id;
this.nome = nome;
this.descricao = descricao;
this.localizacao = localizacao;
this.categoria = categoria;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
public String getDescricao() {
return descricao;
}
public void setDescricao(String descricao) {
this.descricao = descricao;
}
public Localizacao getLocalizacao() {
return localizacao;
}
public void setLocalizacao(Localizacao localizacao) {
this.localizacao = localizacao;
}
public Categoria getCategoria() {
return categoria;
}
public void setCategoria(Categoria categoria) {
this.categoria = categoria;
}
@Override
public String toString() {
return "ID: " + id + "\nNome: " + nome + "\nDescrição: " + descricao + "\nLocalização: " + localizacao.getNome()
+ "\nCategoria: " + categoria.getNome() + "\n";
}
}
|
UTF-8
|
Java
| 1,458 |
java
|
Bem.java
|
Java
|
[] | null |
[] |
package br.ufrn.edu.imd.lpii.dorabot.model;
/**
* Classe para objetos do tipo Bem, onde estão contidos os atributos e metodos para o mesmo.
*/
public class Bem {
private int id;
private String nome;
private String descricao;
Localizacao localizacao;
Categoria categoria;
public Bem() {
}
public Bem(int id, String nome, String descricao, Localizacao localizacao, Categoria categoria) {
this.id = id;
this.nome = nome;
this.descricao = descricao;
this.localizacao = localizacao;
this.categoria = categoria;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
public String getDescricao() {
return descricao;
}
public void setDescricao(String descricao) {
this.descricao = descricao;
}
public Localizacao getLocalizacao() {
return localizacao;
}
public void setLocalizacao(Localizacao localizacao) {
this.localizacao = localizacao;
}
public Categoria getCategoria() {
return categoria;
}
public void setCategoria(Categoria categoria) {
this.categoria = categoria;
}
@Override
public String toString() {
return "ID: " + id + "\nNome: " + nome + "\nDescrição: " + descricao + "\nLocalização: " + localizacao.getNome()
+ "\nCategoria: " + categoria.getNome() + "\n";
}
}
| 1,458 | 0.655884 | 0.655884 | 68 | 19.367647 | 23.027416 | 114 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.573529 | false | false |
3
|
0f98975fc9db736866e9d09e131e7daec405ac49
| 9,629,316,734,429 |
4274d112a8b119a8217ba916bd649becb165e91c
|
/src/main/java/lv/javaguru/java2/ui/RemoveProductView.java
|
effb4836863d229556edf96c8e540ae419a20f98
|
[] |
no_license
|
javagurulv/javagurulv_java2_2017_autumn
|
https://github.com/javagurulv/javagurulv_java2_2017_autumn
|
1a451d1609eab6f7f5402945edeb4f85f2e4a02b
|
da5ba70f0435d0bc0fe1b9cadeece5721581b62f
|
refs/heads/master
| 2021-08-31T08:46:01.931000 | 2017-12-20T20:23:57 | 2017-12-20T20:23:57 | 104,988,634 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package lv.javaguru.java2.ui;
import lv.javaguru.java2.businesslogic.api.RemoveProductRequest;
import lv.javaguru.java2.businesslogic.api.RemoveProductResponse;
import lv.javaguru.java2.businesslogic.RemoveProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Scanner;
@Component
public class RemoveProductView implements View {
@Autowired
private RemoveProductService removeProductService;
@Override
public void execute() {
System.out.println();
System.out.println("Remove product from list execution start!");
Scanner sc = new Scanner(System.in);
System.out.print("Enter product title:");
final String title = sc.nextLine();
// BL
RemoveProductResponse response = removeProductService.removeByTitle(new RemoveProductRequest(title));
// End of BL
if (response.isRemoved()) {
System.out.println("Product with title " + title + " was found and will be removed from list!");
} else {
System.out.println("Product with title " + title + " not found and not be removed from list!");
}
System.out.println("Remove product from list execution end!");
System.out.println();
}
}
|
UTF-8
|
Java
| 1,315 |
java
|
RemoveProductView.java
|
Java
|
[] | null |
[] |
package lv.javaguru.java2.ui;
import lv.javaguru.java2.businesslogic.api.RemoveProductRequest;
import lv.javaguru.java2.businesslogic.api.RemoveProductResponse;
import lv.javaguru.java2.businesslogic.RemoveProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.Scanner;
@Component
public class RemoveProductView implements View {
@Autowired
private RemoveProductService removeProductService;
@Override
public void execute() {
System.out.println();
System.out.println("Remove product from list execution start!");
Scanner sc = new Scanner(System.in);
System.out.print("Enter product title:");
final String title = sc.nextLine();
// BL
RemoveProductResponse response = removeProductService.removeByTitle(new RemoveProductRequest(title));
// End of BL
if (response.isRemoved()) {
System.out.println("Product with title " + title + " was found and will be removed from list!");
} else {
System.out.println("Product with title " + title + " not found and not be removed from list!");
}
System.out.println("Remove product from list execution end!");
System.out.println();
}
}
| 1,315 | 0.698859 | 0.695817 | 37 | 34.540539 | 31.583946 | 109 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.486486 | false | false |
3
|
952b7d3a02309b5727ad7d097dc7b4fedc3e2851
| 738,734,434,053 |
750e169703bcec290abd6e4b3221e88a54bd9ee8
|
/example/src/main/java/com/fastcode/example/application/extended/personcase/PersonCaseAppServiceExtended.java
|
6eb2e9da9f3943d0900fb5488fd27657f86e84eb
|
[] |
no_license
|
fastcode-inc/case-mgmt
|
https://github.com/fastcode-inc/case-mgmt
|
150833791a666b4b5d4d58a81dec3ec488277a8e
|
859a46cacb94fe0f986d5a0d0f49d41b59187421
|
refs/heads/master
| 2023-08-14T15:57:03.594000 | 2021-10-12T18:19:50 | 2021-10-12T18:19:50 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.fastcode.example.application.extended.personcase;
import com.fastcode.example.application.core.personcase.PersonCaseAppService;
import com.fastcode.example.commons.logging.LoggingHelper;
import com.fastcode.example.domain.extended.cases.ICasesRepositoryExtended;
import com.fastcode.example.domain.extended.person.IPersonRepositoryExtended;
import com.fastcode.example.domain.extended.personcase.IPersonCaseRepositoryExtended;
import org.springframework.stereotype.Service;
@Service("personCaseAppServiceExtended")
public class PersonCaseAppServiceExtended extends PersonCaseAppService implements IPersonCaseAppServiceExtended {
public PersonCaseAppServiceExtended(
IPersonCaseRepositoryExtended personCaseRepositoryExtended,
ICasesRepositoryExtended casesRepositoryExtended,
IPersonRepositoryExtended personRepositoryExtended,
IPersonCaseMapperExtended mapper,
LoggingHelper logHelper
) {
super(personCaseRepositoryExtended, casesRepositoryExtended, personRepositoryExtended, mapper, logHelper);
}
//Add your custom code here
}
|
UTF-8
|
Java
| 1,109 |
java
|
PersonCaseAppServiceExtended.java
|
Java
|
[] | null |
[] |
package com.fastcode.example.application.extended.personcase;
import com.fastcode.example.application.core.personcase.PersonCaseAppService;
import com.fastcode.example.commons.logging.LoggingHelper;
import com.fastcode.example.domain.extended.cases.ICasesRepositoryExtended;
import com.fastcode.example.domain.extended.person.IPersonRepositoryExtended;
import com.fastcode.example.domain.extended.personcase.IPersonCaseRepositoryExtended;
import org.springframework.stereotype.Service;
@Service("personCaseAppServiceExtended")
public class PersonCaseAppServiceExtended extends PersonCaseAppService implements IPersonCaseAppServiceExtended {
public PersonCaseAppServiceExtended(
IPersonCaseRepositoryExtended personCaseRepositoryExtended,
ICasesRepositoryExtended casesRepositoryExtended,
IPersonRepositoryExtended personRepositoryExtended,
IPersonCaseMapperExtended mapper,
LoggingHelper logHelper
) {
super(personCaseRepositoryExtended, casesRepositoryExtended, personRepositoryExtended, mapper, logHelper);
}
//Add your custom code here
}
| 1,109 | 0.833183 | 0.833183 | 24 | 45.208332 | 34.592846 | 114 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.666667 | false | false |
3
|
ca720506c60f254c6bda0a53759ba61d03e90d4f
| 39,135,742,019,562 |
25a3aca819c83a81a28e003924fc065bd866cb79
|
/src/main/java/servletpackage/MainServlet.java
|
22ca2bb11f3b718e5dcbf08de7ba940c252c886f
|
[] |
no_license
|
Crusherk14/ReBox
|
https://github.com/Crusherk14/ReBox
|
1bd3d2b5b907f41fe17c60a3e823b6cd29b9bd9d
|
0ff6e9bb82d7a5873eaf6e6a7f6d37b65610a780
|
refs/heads/master
| 2022-01-16T15:34:59.719000 | 2019-04-29T12:55:47 | 2019-04-29T12:55:47 | 108,007,326 | 0 | 2 | null | false | 2017-10-23T17:31:31 | 2017-10-23T16:17:03 | 2017-10-23T16:17:03 | 2017-10-23T17:31:31 | 0 | 0 | 1 | 0 | null | false | null |
package servletpackage;
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 java.io.IOException;
import java.io.PrintWriter;
@WebServlet(name = "VkMessageServlet", urlPatterns = "/vk")
public class MainServlet extends HttpServlet {
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
VkMessageSender sender = new VkMessageSender(request, response);
String user = request.getParameter("name");
String message = request.getParameter("text");
sender.SendMessage(new Integer(226525873), "HelloWorld");
doGet(request, response);
}
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
try (PrintWriter out = response.getWriter()){
out.write("<!DOCTYPE html>\n" +
"<html lang=\"en\">\n" +
"<head>\n" +
"<meta charset=\"UTF-8\">\n" +
"<title>My first application server</title>\n" +
"</head>\n" +
"<body>\n" +
"Send message to user:<br>\n" +
"<form action=\"vk\" method = \"post\">\n" +
"<i>vk.com/</i>\n" +
"<input maxlength=\"25\" size=\"10\" placeholder=\"enter id here\" name = \"id\"><br>\n" +
"Your message:<br>\n" +
"<textarea rows=\"5\" cols=\"27\" name=\"text\">Hello, world!</textarea><br>\n" +
"<input type=\"submit\" value=\"Send\"><br><br><br>\n" +
"</form>\n" +
"</body>\n" +
"</html>");
}
}
}
|
UTF-8
|
Java
| 1,939 |
java
|
MainServlet.java
|
Java
|
[] | null |
[] |
package servletpackage;
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 java.io.IOException;
import java.io.PrintWriter;
@WebServlet(name = "VkMessageServlet", urlPatterns = "/vk")
public class MainServlet extends HttpServlet {
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
VkMessageSender sender = new VkMessageSender(request, response);
String user = request.getParameter("name");
String message = request.getParameter("text");
sender.SendMessage(new Integer(226525873), "HelloWorld");
doGet(request, response);
}
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
try (PrintWriter out = response.getWriter()){
out.write("<!DOCTYPE html>\n" +
"<html lang=\"en\">\n" +
"<head>\n" +
"<meta charset=\"UTF-8\">\n" +
"<title>My first application server</title>\n" +
"</head>\n" +
"<body>\n" +
"Send message to user:<br>\n" +
"<form action=\"vk\" method = \"post\">\n" +
"<i>vk.com/</i>\n" +
"<input maxlength=\"25\" size=\"10\" placeholder=\"enter id here\" name = \"id\"><br>\n" +
"Your message:<br>\n" +
"<textarea rows=\"5\" cols=\"27\" name=\"text\">Hello, world!</textarea><br>\n" +
"<input type=\"submit\" value=\"Send\"><br><br><br>\n" +
"</form>\n" +
"</body>\n" +
"</html>");
}
}
}
| 1,939 | 0.562145 | 0.553378 | 46 | 41.152172 | 30.49873 | 122 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.5 | false | false |
3
|
4b41a2747110f077b32d3f2512f8dac394b9d5bb
| 18,545,668,828,875 |
c91ef390d1de8aa0514ae7b8492357cf2c3d5ed3
|
/01. Java Advanced/02. IntroToJava - Exercises/src/p05_OddEvenPairs.java
|
500eebf4ad7d5a39acc65569417db8f4fbda6a06
|
[] |
no_license
|
did0sh/Java-Development
|
https://github.com/did0sh/Java-Development
|
ad8778fdc3691e7e68b38742dee463018a95284c
|
6e333f4daa5658f9124f6a145146b337888cfe58
|
refs/heads/master
| 2020-03-17T15:02:18.644000 | 2019-03-16T12:38:05 | 2019-03-16T12:38:05 | 133,696,032 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
import java.util.Scanner;
public class p05_OddEvenPairs {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String input = scan.nextLine();
String[] arguments = input.split("\\s");
if (arguments.length % 2 != 0){
System.out.println("invalid length");
return;
}
for (int i = 0; i < arguments.length; i+=2) {
int current = Integer.parseInt(arguments[i]);
int next = Integer.parseInt(arguments[i+1]);
if (current % 2 == 0 && next % 2 == 0){
System.out.printf("%d, %d -> both are even%n", current, next);
} else if (current % 2 != 0 && next % 2 != 0){
System.out.printf("%d, %d -> both are odd%n", current, next);
} else {
System.out.printf("%d, %d -> different%n", current, next);
}
}
}
}
|
UTF-8
|
Java
| 955 |
java
|
p05_OddEvenPairs.java
|
Java
|
[] | null |
[] |
import java.util.Scanner;
public class p05_OddEvenPairs {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String input = scan.nextLine();
String[] arguments = input.split("\\s");
if (arguments.length % 2 != 0){
System.out.println("invalid length");
return;
}
for (int i = 0; i < arguments.length; i+=2) {
int current = Integer.parseInt(arguments[i]);
int next = Integer.parseInt(arguments[i+1]);
if (current % 2 == 0 && next % 2 == 0){
System.out.printf("%d, %d -> both are even%n", current, next);
} else if (current % 2 != 0 && next % 2 != 0){
System.out.printf("%d, %d -> both are odd%n", current, next);
} else {
System.out.printf("%d, %d -> different%n", current, next);
}
}
}
}
| 955 | 0.48377 | 0.468063 | 27 | 33.370369 | 25.154556 | 78 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.814815 | false | false |
3
|
73b926e7ccbe64462dd8a225916aa06d6f3b49be
| 515,396,089,714 |
d49ed93979b3295e6aa3ebef40856185a9cf4353
|
/springboot-2019-ncov/src/main/java/com/example/springboot/model/News.java
|
e114507ae84ef7eec6b039d05e4cf2f27b3be5bf
|
[] |
no_license
|
wyn-365/springboot-2019-ncov
|
https://github.com/wyn-365/springboot-2019-ncov
|
7f7f1700a7e2a0884ad8fe62b16337d1c298aaf1
|
edd5d4c127f8f01bf8c3094011d6885500b0e51b
|
refs/heads/master
| 2022-11-25T03:30:24.406000 | 2020-03-19T10:55:30 | 2020-03-19T10:55:30 | 242,273,290 | 1 | 0 | null | false | 2022-11-15T23:34:13 | 2020-02-22T03:30:42 | 2020-03-19T10:55:33 | 2022-11-15T23:34:10 | 126,530 | 1 | 0 | 4 |
TSQL
| false | false |
package com.example.springboot.model;
/**
* @author 王一宁
* @date 2020/2/17 21:34
*/
public class News {
private int id;
private String pubDateStr;
private String title;
private String summary;
private String infoSource;
private String sourceUrl;
private String updatetime;
@Override
public String toString() {
return "News{" +
"id=" + id +
", pubDateStr='" + pubDateStr + '\'' +
", title='" + title + '\'' +
", summary='" + summary + '\'' +
", infoSource='" + infoSource + '\'' +
", sourceUrl='" + sourceUrl + '\'' +
", updatetime='" + updatetime + '\'' +
'}';
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getUpdatetime() {
return updatetime;
}
public void setUpdatetime(String updatetime) {
this.updatetime = updatetime;
}
public News(int id, String pubDateStr, String title, String summary, String infoSource, String sourceUrl, String updatetime) {
this.id = id;
this.pubDateStr = pubDateStr;
this.title = title;
this.summary = summary;
this.infoSource = infoSource;
this.sourceUrl = sourceUrl;
this.updatetime = updatetime;
}
public String getPubDateStr() {
return pubDateStr;
}
public void setPubDateStr(String pubDateStr) {
this.pubDateStr = pubDateStr;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getSummary() {
return summary;
}
public void setSummary(String summary) {
this.summary = summary;
}
public String getInfoSource() {
return infoSource;
}
public void setInfoSource(String infoSource) {
this.infoSource = infoSource;
}
public String getSourceUrl() {
return sourceUrl;
}
public void setSourceUrl(String sourceUrl) {
this.sourceUrl = sourceUrl;
}
public String getDatetime() {
return updatetime;
}
public void setDatetime(String updatetime) {
this.updatetime = updatetime;
}
public News(String pubDateStr, String title, String summary, String infoSource, String sourceUrl, String updatetime) {
this.pubDateStr = pubDateStr;
this.title = title;
this.summary = summary;
this.infoSource = infoSource;
this.sourceUrl = sourceUrl;
this.updatetime = updatetime;
}
public News() {
}
}
|
UTF-8
|
Java
| 2,705 |
java
|
News.java
|
Java
|
[
{
"context": "age com.example.springboot.model;\n\n/**\n * @author 王一宁\n * @date 2020/2/17 21:34\n */\npublic class News {\n",
"end": 57,
"score": 0.9945405125617981,
"start": 54,
"tag": "NAME",
"value": "王一宁"
}
] | null |
[] |
package com.example.springboot.model;
/**
* @author 王一宁
* @date 2020/2/17 21:34
*/
public class News {
private int id;
private String pubDateStr;
private String title;
private String summary;
private String infoSource;
private String sourceUrl;
private String updatetime;
@Override
public String toString() {
return "News{" +
"id=" + id +
", pubDateStr='" + pubDateStr + '\'' +
", title='" + title + '\'' +
", summary='" + summary + '\'' +
", infoSource='" + infoSource + '\'' +
", sourceUrl='" + sourceUrl + '\'' +
", updatetime='" + updatetime + '\'' +
'}';
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getUpdatetime() {
return updatetime;
}
public void setUpdatetime(String updatetime) {
this.updatetime = updatetime;
}
public News(int id, String pubDateStr, String title, String summary, String infoSource, String sourceUrl, String updatetime) {
this.id = id;
this.pubDateStr = pubDateStr;
this.title = title;
this.summary = summary;
this.infoSource = infoSource;
this.sourceUrl = sourceUrl;
this.updatetime = updatetime;
}
public String getPubDateStr() {
return pubDateStr;
}
public void setPubDateStr(String pubDateStr) {
this.pubDateStr = pubDateStr;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getSummary() {
return summary;
}
public void setSummary(String summary) {
this.summary = summary;
}
public String getInfoSource() {
return infoSource;
}
public void setInfoSource(String infoSource) {
this.infoSource = infoSource;
}
public String getSourceUrl() {
return sourceUrl;
}
public void setSourceUrl(String sourceUrl) {
this.sourceUrl = sourceUrl;
}
public String getDatetime() {
return updatetime;
}
public void setDatetime(String updatetime) {
this.updatetime = updatetime;
}
public News(String pubDateStr, String title, String summary, String infoSource, String sourceUrl, String updatetime) {
this.pubDateStr = pubDateStr;
this.title = title;
this.summary = summary;
this.infoSource = infoSource;
this.sourceUrl = sourceUrl;
this.updatetime = updatetime;
}
public News() {
}
}
| 2,705 | 0.572434 | 0.568359 | 115 | 22.469564 | 21.638662 | 130 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.478261 | false | false |
3
|
d9270f574965535331ed1d8576ba4c9203437673
| 10,969,346,512,055 |
7338d2741b82a07feb0b6e0108d3a9fa5c607799
|
/app/src/main/java/com/exadel/sampleapp/activities/LoaderSampleActivity.java
|
389be890716f084bb9b5070f27db3e0168217bfc
|
[] |
no_license
|
snaliuka/android-step-by-step
|
https://github.com/snaliuka/android-step-by-step
|
364412f23610f49820517dcd8be50e0d4650f788
|
8b50454b368e49973950c76435c5da6b2b98ae46
|
refs/heads/master
| 2021-05-08T09:20:19.012000 | 2017-10-23T09:10:44 | 2017-10-23T09:10:44 | 107,117,471 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.exadel.sampleapp.activities;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.LoaderManager;
import android.support.v4.content.Loader;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import com.exadel.sampleapp.R;
import com.exadel.sampleapp.loaders.EmulateLoadingLoader;
import com.exadel.sampleapp.views.ProgressView;
public class LoaderSampleActivity extends AppCompatActivity
implements LoaderManager.LoaderCallbacks<Boolean> {
private static final int LOADER_ID = 10001;
private static final String ARG_COUNT = "arg_count";
private static final String ARG_DELAY = "arg_delay";
private ProgressView progressView;
private TextView dataCaption;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activty_loader_sample);
progressView = findViewById(R.id.cv_progress);
dataCaption = findViewById(R.id.tv_data_loaded_caption);
Bundle args = new Bundle();
args.putInt(ARG_COUNT, 100);
args.putLong(ARG_DELAY, 50L);
getSupportLoaderManager().initLoader(LOADER_ID, args, LoaderSampleActivity.this);
progressView.show();
}
@Override
public Loader<Boolean> onCreateLoader(int id, Bundle args) {
if (id == LOADER_ID) {
int count = args.getInt(ARG_COUNT);
long delay = args.getLong(ARG_DELAY);
return new EmulateLoadingLoader(this, count, delay);
}
return null;
}
@Override
public void onLoadFinished(Loader<Boolean> loader, Boolean result) {
progressView.hide();
dataCaption.setVisibility(View.VISIBLE);
if (loader.getId() == LOADER_ID) {
Toast.makeText(this, getString(R.string.loading_result_pattern_rotate, String.valueOf(result)), Toast.LENGTH_SHORT).show();
}
}
@Override
public void onLoaderReset(Loader<Boolean> loader) { }
}
|
UTF-8
|
Java
| 2,149 |
java
|
LoaderSampleActivity.java
|
Java
|
[] | null |
[] |
package com.exadel.sampleapp.activities;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.LoaderManager;
import android.support.v4.content.Loader;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.Toast;
import com.exadel.sampleapp.R;
import com.exadel.sampleapp.loaders.EmulateLoadingLoader;
import com.exadel.sampleapp.views.ProgressView;
public class LoaderSampleActivity extends AppCompatActivity
implements LoaderManager.LoaderCallbacks<Boolean> {
private static final int LOADER_ID = 10001;
private static final String ARG_COUNT = "arg_count";
private static final String ARG_DELAY = "arg_delay";
private ProgressView progressView;
private TextView dataCaption;
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activty_loader_sample);
progressView = findViewById(R.id.cv_progress);
dataCaption = findViewById(R.id.tv_data_loaded_caption);
Bundle args = new Bundle();
args.putInt(ARG_COUNT, 100);
args.putLong(ARG_DELAY, 50L);
getSupportLoaderManager().initLoader(LOADER_ID, args, LoaderSampleActivity.this);
progressView.show();
}
@Override
public Loader<Boolean> onCreateLoader(int id, Bundle args) {
if (id == LOADER_ID) {
int count = args.getInt(ARG_COUNT);
long delay = args.getLong(ARG_DELAY);
return new EmulateLoadingLoader(this, count, delay);
}
return null;
}
@Override
public void onLoadFinished(Loader<Boolean> loader, Boolean result) {
progressView.hide();
dataCaption.setVisibility(View.VISIBLE);
if (loader.getId() == LOADER_ID) {
Toast.makeText(this, getString(R.string.loading_result_pattern_rotate, String.valueOf(result)), Toast.LENGTH_SHORT).show();
}
}
@Override
public void onLoaderReset(Loader<Boolean> loader) { }
}
| 2,149 | 0.704514 | 0.698464 | 64 | 32.578125 | 26.509907 | 135 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.703125 | false | false |
3
|
334d8ccc8b112a01a9e05c5940f069bac999dc7c
| 7,541,962,608,268 |
39a8e7c1618fbe02870aec4da36622213519d873
|
/src/main/java/masterSpringMvc/config/PictureUploadProperties.java
|
f6cab04e6d8f7f49554b2939bbbbd3bc30a12d12
|
[] |
no_license
|
AlanMeng/mastering-spring-mvc4
|
https://github.com/AlanMeng/mastering-spring-mvc4
|
3a67ef03928b41473363491e4974ac32a8886c0b
|
8d776ef82cae32537d8dccbd01215fc8d028d9c2
|
refs/heads/master
| 2020-05-09T20:45:46.786000 | 2019-09-04T08:03:23 | 2019-09-04T08:03:23 | 181,419,867 | 1 | 0 | null | true | 2019-04-15T05:45:26 | 2019-04-15T05:45:24 | 2019-03-24T13:14:30 | 2015-08-03T18:26:03 | 269 | 0 | 0 | 0 | null | false | false |
package masterSpringMvc.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.core.io.DefaultResourceLoader;
import org.springframework.core.io.Resource;
import java.io.IOException;
@ConfigurationProperties(prefix = "upload.pictures")
public class PictureUploadProperties {
private Resource uploadPath;
private Resource anonymousPicture;
public Resource getAnonymousPicture() {
return anonymousPicture;
}
public void setAnonymousPicture(String anonymousPicture) throws IOException {
this.anonymousPicture = new DefaultResourceLoader().getResource(anonymousPicture);
if (!this.anonymousPicture.getFile().isFile()) {
throw new IOException("File " + anonymousPicture + " does not exist");
}
}
public Resource getUploadPath() {
return uploadPath;
}
public void setUploadPath(String uploadPath) throws IOException {
this.uploadPath = new DefaultResourceLoader().getResource(uploadPath);
if (!this.uploadPath.getFile().isDirectory()) {
throw new IOException("Directory " + uploadPath + " does not exist");
}
}
}
|
UTF-8
|
Java
| 1,198 |
java
|
PictureUploadProperties.java
|
Java
|
[] | null |
[] |
package masterSpringMvc.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.core.io.DefaultResourceLoader;
import org.springframework.core.io.Resource;
import java.io.IOException;
@ConfigurationProperties(prefix = "upload.pictures")
public class PictureUploadProperties {
private Resource uploadPath;
private Resource anonymousPicture;
public Resource getAnonymousPicture() {
return anonymousPicture;
}
public void setAnonymousPicture(String anonymousPicture) throws IOException {
this.anonymousPicture = new DefaultResourceLoader().getResource(anonymousPicture);
if (!this.anonymousPicture.getFile().isFile()) {
throw new IOException("File " + anonymousPicture + " does not exist");
}
}
public Resource getUploadPath() {
return uploadPath;
}
public void setUploadPath(String uploadPath) throws IOException {
this.uploadPath = new DefaultResourceLoader().getResource(uploadPath);
if (!this.uploadPath.getFile().isDirectory()) {
throw new IOException("Directory " + uploadPath + " does not exist");
}
}
}
| 1,198 | 0.720367 | 0.720367 | 35 | 33.228573 | 29.570337 | 90 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.371429 | false | false |
3
|
feed2d5fa7ac6de9269c68898884764a08ab9e47
| 7,541,962,612,026 |
7b2df2e35325986b7d778814d388a78c4bedd3f1
|
/src/main/java/pl/elka/zapisyadmin/services/OptionServiceImpl.java
|
03204e1417812bd9343d3e6dee8f463a5c6fac69
|
[] |
no_license
|
mrzeszotarski/ZPR_zapisyadmin
|
https://github.com/mrzeszotarski/ZPR_zapisyadmin
|
6ba639c0d618495bb1d73e5cc389b21ec7133195
|
beeee106df2cbe5138f9803db690ceba38beca7f
|
refs/heads/master
| 2019-01-03T02:40:27.004000 | 2016-06-06T18:16:14 | 2016-06-06T18:16:14 | 54,506,901 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package pl.elka.zapisyadmin.services;
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.transaction.Transactional;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;
import pl.elka.zapisyadmin.model.Opcje;
@Repository
@Transactional
public class OptionServiceImpl implements OptionService {
private static final Logger logger = LoggerFactory.getLogger(OptionServiceImpl.class);
@PersistenceContext
private EntityManager entityManager;
public EntityManager getEntityManager() {
return entityManager;
}
@Override
public List<Opcje> getAllOptions() {
return entityManager.createNamedQuery("Opcje.findAll").getResultList();
}
}
|
UTF-8
|
Java
| 769 |
java
|
OptionServiceImpl.java
|
Java
|
[] | null |
[] |
package pl.elka.zapisyadmin.services;
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.transaction.Transactional;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;
import pl.elka.zapisyadmin.model.Opcje;
@Repository
@Transactional
public class OptionServiceImpl implements OptionService {
private static final Logger logger = LoggerFactory.getLogger(OptionServiceImpl.class);
@PersistenceContext
private EntityManager entityManager;
public EntityManager getEntityManager() {
return entityManager;
}
@Override
public List<Opcje> getAllOptions() {
return entityManager.createNamedQuery("Opcje.findAll").getResultList();
}
}
| 769 | 0.823147 | 0.820546 | 29 | 25.517241 | 23.052595 | 87 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.862069 | false | false |
3
|
db3559dc43c701d616328a5d6bda95abf0ccf081
| 13,451,837,619,377 |
69305605f7bb178b95ad0928d4d4b7732ba67692
|
/src/main/java/lv/autentica/domain/Client.java
|
2d7c35ee789615c63917103fbb606a1353275faa
|
[] |
no_license
|
nimmortal/thePhones
|
https://github.com/nimmortal/thePhones
|
d8517d3fb5e2184e2af4a82a6942a92b3f84ffd7
|
f5b8d53aafcee76a1d5357c4cfcd197fc7ab93d0
|
refs/heads/master
| 2018-01-10T09:39:49.350000 | 2016-02-21T19:40:18 | 2016-02-21T19:40:18 | 47,514,374 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package lv.autentica.domain;
import javax.persistence.*;
@Entity
@Table(name = "THE_CLIENTS")
public class Client {
@Id
@SequenceGenerator(name="id_seq", sequenceName="THE_CLI_SEQ")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator="id_seq")
@Column(name = "ID", columnDefinition = "NUMBER(12)")
private Long id;
@Column(name = "FIRSTNAME", columnDefinition = "VARCHAR2(50)")
private String firstName;
@Column(name = "LASTNAME", columnDefinition = "VARCHAR2(100)")
private String lastName;
@Column(name = "ORGANISATION", columnDefinition = "VARCHAR2(120)")
private String organization;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getOrganization() {
return organization;
}
public void setOrganization(String organization) {
this.organization = organization;
}
}
|
UTF-8
|
Java
| 1,256 |
java
|
Client.java
|
Java
|
[
{
"context": "R(12)\")\n private Long id;\n\n @Column(name = \"FIRSTNAME\", columnDefinition = \"VARCHAR2(50)\")\n private ",
"end": 378,
"score": 0.571880042552948,
"start": 369,
"tag": "NAME",
"value": "FIRSTNAME"
},
{
"context": "rivate String firstName;\n\n @Column(name = \"LASTNAME\", columnDefinition = \"VARCHAR2(100)\")\n private",
"end": 475,
"score": 0.665284276008606,
"start": 471,
"tag": "NAME",
"value": "NAME"
}
] | null |
[] |
package lv.autentica.domain;
import javax.persistence.*;
@Entity
@Table(name = "THE_CLIENTS")
public class Client {
@Id
@SequenceGenerator(name="id_seq", sequenceName="THE_CLI_SEQ")
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator="id_seq")
@Column(name = "ID", columnDefinition = "NUMBER(12)")
private Long id;
@Column(name = "FIRSTNAME", columnDefinition = "VARCHAR2(50)")
private String firstName;
@Column(name = "LASTNAME", columnDefinition = "VARCHAR2(100)")
private String lastName;
@Column(name = "ORGANISATION", columnDefinition = "VARCHAR2(120)")
private String organization;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getOrganization() {
return organization;
}
public void setOrganization(String organization) {
this.organization = organization;
}
}
| 1,256 | 0.644108 | 0.633758 | 55 | 21.836363 | 21.706944 | 75 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.363636 | false | false |
3
|
08e769f6e47124bdab10725df012e333fdfd39fe
| 6,691,559,099,927 |
0fa20e5d0c9541dc0341858d9ed978d15124c172
|
/src/main/java/HashTable.java
|
c5f1c254f4e93ee6b8183fec9a17766c22686531
|
[] |
no_license
|
T3Allam/HashTable-Collision-LinkedList
|
https://github.com/T3Allam/HashTable-Collision-LinkedList
|
62aba3ab4947efce710ca90adb84b2cc7fd3cdfd
|
5ba500a2022079f6f1061526843be208b0768ad6
|
refs/heads/master
| 2022-11-24T03:48:27.510000 | 2020-06-28T07:23:47 | 2020-06-28T07:23:47 | 275,530,573 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
public class HashTable<E> {
private LinkedList<E>[] arr;
public HashTable( ) {
this.arr = new LinkedList[5];
createLinkedLists();
}
public void createLinkedLists() {
for (int i=0; i<arr.length; i++)
arr[i] = new LinkedList<>();
}
public int hash(E title) {
String t = (String) title;
int asciFirstLetter = (int) t.charAt(0); //hash code
int index = getIndex(asciFirstLetter); //converting hash code to index
return index;
}
public Integer getIndex(int asciFirstLetter) {
if (97<=asciFirstLetter && asciFirstLetter<=102 || 65<=asciFirstLetter && asciFirstLetter<=70) {
return 0;
} else if (103<=asciFirstLetter && asciFirstLetter<=108 || 71<=asciFirstLetter && asciFirstLetter<=76) {
return 1;
} else if (109<=asciFirstLetter && asciFirstLetter<=114 || 77<=asciFirstLetter && asciFirstLetter<=82) {
return 2;
} else if (115<=asciFirstLetter && asciFirstLetter<=119 || 83<=asciFirstLetter && asciFirstLetter<=87) {
return 3;
} else if (120<=asciFirstLetter && asciFirstLetter<=122 || 88<=asciFirstLetter && asciFirstLetter<=90) {
return 4;
}
return null;
}
public boolean put(E title) {
int index = hash(title);
if (arr[index].get(title) == null){
System.out.println("index is " + index );
arr[index].append(title);
return true;
}
System.out.println(title + " already exists.");
return false;
}
}
|
UTF-8
|
Java
| 1,609 |
java
|
HashTable.java
|
Java
|
[] | null |
[] |
public class HashTable<E> {
private LinkedList<E>[] arr;
public HashTable( ) {
this.arr = new LinkedList[5];
createLinkedLists();
}
public void createLinkedLists() {
for (int i=0; i<arr.length; i++)
arr[i] = new LinkedList<>();
}
public int hash(E title) {
String t = (String) title;
int asciFirstLetter = (int) t.charAt(0); //hash code
int index = getIndex(asciFirstLetter); //converting hash code to index
return index;
}
public Integer getIndex(int asciFirstLetter) {
if (97<=asciFirstLetter && asciFirstLetter<=102 || 65<=asciFirstLetter && asciFirstLetter<=70) {
return 0;
} else if (103<=asciFirstLetter && asciFirstLetter<=108 || 71<=asciFirstLetter && asciFirstLetter<=76) {
return 1;
} else if (109<=asciFirstLetter && asciFirstLetter<=114 || 77<=asciFirstLetter && asciFirstLetter<=82) {
return 2;
} else if (115<=asciFirstLetter && asciFirstLetter<=119 || 83<=asciFirstLetter && asciFirstLetter<=87) {
return 3;
} else if (120<=asciFirstLetter && asciFirstLetter<=122 || 88<=asciFirstLetter && asciFirstLetter<=90) {
return 4;
}
return null;
}
public boolean put(E title) {
int index = hash(title);
if (arr[index].get(title) == null){
System.out.println("index is " + index );
arr[index].append(title);
return true;
}
System.out.println(title + " already exists.");
return false;
}
}
| 1,609 | 0.572405 | 0.536979 | 49 | 31.857143 | 32.126026 | 112 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.653061 | false | false |
3
|
a6341b46fb6f1fe4c6617ee2f3470f2fd6255c09
| 26,611,617,427,044 |
0f8730b12eae26c990e7d7baade6e1ea03688a81
|
/microservices/recommendation-service/src/main/java/com/kouz/microservices/core/recommendation/recommendation/persistence/RecommendationRepository.java
|
50e887b72f3c9d1f46f9013e969a6a7119b2c5a3
|
[] |
no_license
|
kouz95/msa-spring
|
https://github.com/kouz95/msa-spring
|
f7427b6cb970ee183c302f37f08bef5ed2ee6579
|
27f0502713786e21ec61118b885aa84bbb62d630
|
refs/heads/master
| 2023-02-14T19:33:06.860000 | 2021-01-06T15:46:05 | 2021-01-06T15:46:05 | 319,074,441 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.kouz.microservices.core.recommendation.recommendation.persistence;
import java.util.List;
import org.springframework.data.repository.CrudRepository;
public interface RecommendationRepository extends CrudRepository<RecommendationEntity, String> {
List<RecommendationEntity> findByProductId(int productId);
}
|
UTF-8
|
Java
| 326 |
java
|
RecommendationRepository.java
|
Java
|
[] | null |
[] |
package com.kouz.microservices.core.recommendation.recommendation.persistence;
import java.util.List;
import org.springframework.data.repository.CrudRepository;
public interface RecommendationRepository extends CrudRepository<RecommendationEntity, String> {
List<RecommendationEntity> findByProductId(int productId);
}
| 326 | 0.849693 | 0.849693 | 9 | 35.222221 | 36.251522 | 96 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.555556 | false | false |
3
|
d873dec5f1efa03ab9e02990640a138887efa8b6
| 23,854,248,370,734 |
c6089ecc556331bdeecdc7ff3be76acd1a15a81a
|
/shop_ibatis/src/main/java/com/domain/Buyers.java
|
2dc5625473e97b55190877ebfa31ffb9a56ac13b
|
[] |
no_license
|
misori/e-commerce-wizmall-java
|
https://github.com/misori/e-commerce-wizmall-java
|
385e83a223aa3b89e48a0190a9c6c84795825c88
|
f0ca6644e747ef3c6ed724d8848ae734f912f51c
|
refs/heads/master
| 2021-01-10T06:46:26.707000 | 2012-11-14T07:08:54 | 2012-11-14T07:08:54 | 52,947,212 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.domain;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
/**
*
* @author Pondol
*
*/
public class Buyers implements Serializable {
private static final long serialVersionUID = 1L;
public Buyers() {
}
/**
* TID
*/
@Column(name = "TID", nullable = false)
@Basic(fetch = FetchType.EAGER)
@GeneratedValue(strategy=GenerationType.AUTO)//자동 증가일경우
@Id
Integer tid;
public void setTid(Integer tid) {
this.tid = tid;
}
public Integer getTid() {
return this.tid;
}
/**
* SNAME : 주문자 명
*/
@Column(name = "SNAME", length = 30, nullable = true)
@Basic(fetch = FetchType.EAGER)
String sname;
public void setSname(String sname) {
this.sname = sname;
}
public String getSname() {
return this.sname;
}
/**
* SNAME : 주문자이메일
*/
@Column(name = "SEMAIL", length = 50, nullable = true)
@Basic(fetch = FetchType.EAGER)
String semail;
public void setSemail(String semail) {
this.semail = semail;
}
public String getSemail() {
return this.semail;
}
/**
* STEL1 : 주문자연락처 1
*/
@Column(name = "STEL1", length = 14, nullable = true)
@Basic(fetch = FetchType.EAGER)
String stel1;
public void setStel1(String stel1) {
this.stel1 = stel1;
}
public String getStel1() {
return this.stel1;
}
/**
* STEL2 : 주문자연락처 2
*/
@Column(name = "STEL2", length = 14, nullable = true)
@Basic(fetch = FetchType.EAGER)
String stel2;
public void setStel2(String stel2) {
this.stel2 = stel2;
}
public String getStel2() {
return this.stel2;
}
/**
* SZIP : 주문자우편번호
*/
@Column(name = "SZIP", length = 7, nullable = true)
@Basic(fetch = FetchType.EAGER)
String szip;
public void setSzip(String szip) {
this.szip = szip;
}
public String getSzip() {
return this.szip;
}
/**
* SADDRESS1 : 주문자 어드레스1
*/
@Column(name = "SADDRESS1", length = 80, nullable = true)
@Basic(fetch = FetchType.EAGER)
String saddress1;
public void setSaddress1(String saddress1) {
this.saddress1 = saddress1;
}
public String getSaddress1() {
return this.saddress1;
}
/**
* SADDRESS1 : 주문자 어드레스2
*/
@Column(name = "SADDRESS2", length = 50, nullable = true)
@Basic(fetch = FetchType.EAGER)
String saddress2;
public void setSaddress2(String saddress2) {
this.saddress2 = saddress2;
}
public String getSaddress2() {
return this.saddress2;
}
/**
* RNAME : 수취인 명
*/
@Column(name = "RNAME", length = 30, nullable = true)
@Basic(fetch = FetchType.EAGER)
String rname;
public void setRname(String rname) {
this.rname = rname;
}
public String getRname() {
return this.rname;
}
/**
* RTEL1 : 수취인연락처 1
*/
@Column(name = "RTEL1", length = 14, nullable = true)
@Basic(fetch = FetchType.EAGER)
String rtel1;
public void setRtel1(String rtel1) {
this.rtel1 = rtel1;
}
public String getRtel1() {
return this.rtel1;
}
/**
* RTEL2 : 수취인연락처 2
*/
@Column(name = "RTEL2", length = 14, nullable = true)
@Basic(fetch = FetchType.EAGER)
String rtel2;
public void setRtel2(String rtel2) {
this.rtel2 = rtel2;
}
public String getRtel2() {
return this.rtel2;
}
/**
* RZIP : 수취인우편번호
*/
@Column(name = "RZIP", length = 7, nullable = true)
@Basic(fetch = FetchType.EAGER)
String rzip;
public void setRzip(String rzip) {
this.rzip = rzip;
}
public String getRzip() {
return this.rzip;
}
/**
* RADDRESS1 : 수취인 어드레스1
*/
@Column(name = "RADDRESS1", length = 80, nullable = true)
@Basic(fetch = FetchType.EAGER)
String raddress1;
public void setRaddress1(String raddress1) {
this.raddress1 = raddress1;
}
public String getRaddress1() {
return this.raddress1;
}
/**
* RADDRESS2 : 수취인 어드레스2
*/
@Column(name = "RADDRESS2", length = 50, nullable = true)
@Basic(fetch = FetchType.EAGER)
String raddress2;
public void setRaddress2(String raddress2) {
this.raddress2 = raddress2;
}
public String getRaddress2() {
return this.raddress2;
}
/**
* MESSAGE : 간단 코멘트
*/
@Column(name = "MESSAGE", length = 255, nullable = true)
@Basic(fetch = FetchType.EAGER)
String message;
public void setMessage(String message) {
this.message = message;
}
public String getMessage() {
return this.message;
}
/**
* DELIVERER : 택배사코드 deliverer 테이블의 tid 참조
*/
@Column(name = "DELIVERER", length = 3, nullable = true)
@Basic(fetch = FetchType.EAGER)
int deliverer;
public void setDeliverer(int deliverer) {
this.deliverer = deliverer;
}
public int getDeliverer() {
return this.deliverer;
}
/**
* INVOICENO : 택배 송장 번호
*/
@Column(name = "INVOICENO", length = 20, nullable = true)
@Basic(fetch = FetchType.EAGER)
String invoiceno;
public void setInvoiceno(String invoiceno) {
this.invoiceno = invoiceno;
}
public String getInvoiceno() {
return this.invoiceno;
}
/**
* PAYMETHOD : 결제 방법
*/
@Column(name = "PAYMETHOD", length = 15, nullable = true)
@Basic(fetch = FetchType.EAGER)
String paymethod;
public void setPaymethod(String paymethod) {
this.paymethod = paymethod;
}
public String getPaymethod() {
return this.paymethod;
}
/**
* BANKINFO : 결제은행
*/
@Column(name = "BANKINFO", length = 50, nullable = true)
@Basic(fetch = FetchType.EAGER)
String bankinfo;
public void setBankinfo(String bankinfo) {
this.bankinfo = bankinfo;
}
public String getBankinfo() {
return this.bankinfo;
}
/**
* INPUTER : 송금인
*/
@Column(name = "INPUTER", length = 20, nullable = true)
@Basic(fetch = FetchType.EAGER)
String inputer;
public void setInputer(String inputer) {
this.inputer = inputer;
}
public String getInputer() {
return this.inputer;
}
/**
* AMOUNTPOINT : 포인트 결제 금액
*/
@Column(name = "AMOUNTPOINT", length = 10, nullable = true)
@Basic(fetch = FetchType.EAGER)
int amountpoint;
public void setAmountpoint(int amountpoint) {
this.amountpoint = amountpoint;
}
public int getAmountpoint() {
return this.amountpoint;
}
/**
* AMOUNTONLINE : 무통장입금 결제 금액
*/
@Column(name = "AMOUNTONLINE", length = 10, nullable = true)
@Basic(fetch = FetchType.EAGER)
int amountonline;
public void setAmountonline(int amountonline) {
this.amountonline = amountonline;
}
public int getAmountonline() {
return this.amountonline;
}
/**
* AMOUNTPG : PG 결제 금액
*/
@Column(name = "AMOUNTPG", length = 10, nullable = true)
@Basic(fetch = FetchType.EAGER)
int amountpg;
public void setAmountpg(int amountpg) {
this.amountpg = amountpg;
}
public int getAmountpg() {
return this.amountpg;
}
/**
* TOTALAMOUNT : 총 결제 금액
*/
@Column(name = "TOTALAMOUNT", length = 10, nullable = true)
@Basic(fetch = FetchType.EAGER)
int totalamount;
public void setTotalamount(int totalamount) {
this.totalamount = totalamount;
}
public int getTotalamount() {
return this.totalamount;
}
/**
* ORDERID : 주문 고유 코드
*/
@Column(name = "ORDERID", length = 11, nullable = true)
@Basic(fetch = FetchType.EAGER)
String orderid;
public void setOrderid(String orderid) {
this.orderid = orderid;
}
public String getOrderid() {
return this.orderid;
}
/**
* ORDERSTATUS : 주문진행상태
*/
@Column(name = "ORDERSTATUS", length = 10, nullable = true)
@Basic(fetch = FetchType.EAGER)
int orderstatus;
public void setOrderstatus(int orderstatus) {
this.orderstatus = orderstatus;
}
public int getOrderstatus() {
return this.orderstatus;
}
/**
* MEMBERID : 주문자 아이디
*/
@Column(name = "MEMBERID", length = 20, nullable = true)
@Basic(fetch = FetchType.EAGER)
String memberid;
public void setMemberid(String memberid) {
this.memberid = memberid;
}
public String getMemberid() {
return this.memberid;
}
/**
* EXPECTDATE : 입금예정일
*/
@Column(name = "EXPECTDATE", length = 30, nullable = true)
@Basic(fetch = FetchType.EAGER)
String expectdate;
public void setExpectdate(String expectdate) {
this.expectdate = expectdate;
}
public String getExpectdate() {
return this.expectdate;
}
/**
* PAYDATE : 결제일
*/
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "PAYDATE", nullable = true)
@Basic(fetch = FetchType.EAGER)
Date paydate;
public void setPaydate(java.util.Date date) {
this.paydate = date;
}
public Date getPaydate() {
return this.paydate;
}
/**
* BUYDATE : 구매일
*/
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "BUYDATE", nullable = true)
@Basic(fetch = FetchType.EAGER)
Date buydate;
public void setBuydate(java.util.Date date) {
this.buydate = date;
}
public Date getBuydate() {
return this.buydate;
}
}
|
UTF-8
|
Java
| 9,598 |
java
|
Buyers.java
|
Java
|
[
{
"context": "x.persistence.TemporalType;\r\n\r\n/**\r\n *\r\n * @author Pondol\r\n *\r\n */\r\npublic class Buyers implements Serializ",
"end": 401,
"score": 0.9828815460205078,
"start": 395,
"tag": "USERNAME",
"value": "Pondol"
}
] | null |
[] |
package com.domain;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
/**
*
* @author Pondol
*
*/
public class Buyers implements Serializable {
private static final long serialVersionUID = 1L;
public Buyers() {
}
/**
* TID
*/
@Column(name = "TID", nullable = false)
@Basic(fetch = FetchType.EAGER)
@GeneratedValue(strategy=GenerationType.AUTO)//자동 증가일경우
@Id
Integer tid;
public void setTid(Integer tid) {
this.tid = tid;
}
public Integer getTid() {
return this.tid;
}
/**
* SNAME : 주문자 명
*/
@Column(name = "SNAME", length = 30, nullable = true)
@Basic(fetch = FetchType.EAGER)
String sname;
public void setSname(String sname) {
this.sname = sname;
}
public String getSname() {
return this.sname;
}
/**
* SNAME : 주문자이메일
*/
@Column(name = "SEMAIL", length = 50, nullable = true)
@Basic(fetch = FetchType.EAGER)
String semail;
public void setSemail(String semail) {
this.semail = semail;
}
public String getSemail() {
return this.semail;
}
/**
* STEL1 : 주문자연락처 1
*/
@Column(name = "STEL1", length = 14, nullable = true)
@Basic(fetch = FetchType.EAGER)
String stel1;
public void setStel1(String stel1) {
this.stel1 = stel1;
}
public String getStel1() {
return this.stel1;
}
/**
* STEL2 : 주문자연락처 2
*/
@Column(name = "STEL2", length = 14, nullable = true)
@Basic(fetch = FetchType.EAGER)
String stel2;
public void setStel2(String stel2) {
this.stel2 = stel2;
}
public String getStel2() {
return this.stel2;
}
/**
* SZIP : 주문자우편번호
*/
@Column(name = "SZIP", length = 7, nullable = true)
@Basic(fetch = FetchType.EAGER)
String szip;
public void setSzip(String szip) {
this.szip = szip;
}
public String getSzip() {
return this.szip;
}
/**
* SADDRESS1 : 주문자 어드레스1
*/
@Column(name = "SADDRESS1", length = 80, nullable = true)
@Basic(fetch = FetchType.EAGER)
String saddress1;
public void setSaddress1(String saddress1) {
this.saddress1 = saddress1;
}
public String getSaddress1() {
return this.saddress1;
}
/**
* SADDRESS1 : 주문자 어드레스2
*/
@Column(name = "SADDRESS2", length = 50, nullable = true)
@Basic(fetch = FetchType.EAGER)
String saddress2;
public void setSaddress2(String saddress2) {
this.saddress2 = saddress2;
}
public String getSaddress2() {
return this.saddress2;
}
/**
* RNAME : 수취인 명
*/
@Column(name = "RNAME", length = 30, nullable = true)
@Basic(fetch = FetchType.EAGER)
String rname;
public void setRname(String rname) {
this.rname = rname;
}
public String getRname() {
return this.rname;
}
/**
* RTEL1 : 수취인연락처 1
*/
@Column(name = "RTEL1", length = 14, nullable = true)
@Basic(fetch = FetchType.EAGER)
String rtel1;
public void setRtel1(String rtel1) {
this.rtel1 = rtel1;
}
public String getRtel1() {
return this.rtel1;
}
/**
* RTEL2 : 수취인연락처 2
*/
@Column(name = "RTEL2", length = 14, nullable = true)
@Basic(fetch = FetchType.EAGER)
String rtel2;
public void setRtel2(String rtel2) {
this.rtel2 = rtel2;
}
public String getRtel2() {
return this.rtel2;
}
/**
* RZIP : 수취인우편번호
*/
@Column(name = "RZIP", length = 7, nullable = true)
@Basic(fetch = FetchType.EAGER)
String rzip;
public void setRzip(String rzip) {
this.rzip = rzip;
}
public String getRzip() {
return this.rzip;
}
/**
* RADDRESS1 : 수취인 어드레스1
*/
@Column(name = "RADDRESS1", length = 80, nullable = true)
@Basic(fetch = FetchType.EAGER)
String raddress1;
public void setRaddress1(String raddress1) {
this.raddress1 = raddress1;
}
public String getRaddress1() {
return this.raddress1;
}
/**
* RADDRESS2 : 수취인 어드레스2
*/
@Column(name = "RADDRESS2", length = 50, nullable = true)
@Basic(fetch = FetchType.EAGER)
String raddress2;
public void setRaddress2(String raddress2) {
this.raddress2 = raddress2;
}
public String getRaddress2() {
return this.raddress2;
}
/**
* MESSAGE : 간단 코멘트
*/
@Column(name = "MESSAGE", length = 255, nullable = true)
@Basic(fetch = FetchType.EAGER)
String message;
public void setMessage(String message) {
this.message = message;
}
public String getMessage() {
return this.message;
}
/**
* DELIVERER : 택배사코드 deliverer 테이블의 tid 참조
*/
@Column(name = "DELIVERER", length = 3, nullable = true)
@Basic(fetch = FetchType.EAGER)
int deliverer;
public void setDeliverer(int deliverer) {
this.deliverer = deliverer;
}
public int getDeliverer() {
return this.deliverer;
}
/**
* INVOICENO : 택배 송장 번호
*/
@Column(name = "INVOICENO", length = 20, nullable = true)
@Basic(fetch = FetchType.EAGER)
String invoiceno;
public void setInvoiceno(String invoiceno) {
this.invoiceno = invoiceno;
}
public String getInvoiceno() {
return this.invoiceno;
}
/**
* PAYMETHOD : 결제 방법
*/
@Column(name = "PAYMETHOD", length = 15, nullable = true)
@Basic(fetch = FetchType.EAGER)
String paymethod;
public void setPaymethod(String paymethod) {
this.paymethod = paymethod;
}
public String getPaymethod() {
return this.paymethod;
}
/**
* BANKINFO : 결제은행
*/
@Column(name = "BANKINFO", length = 50, nullable = true)
@Basic(fetch = FetchType.EAGER)
String bankinfo;
public void setBankinfo(String bankinfo) {
this.bankinfo = bankinfo;
}
public String getBankinfo() {
return this.bankinfo;
}
/**
* INPUTER : 송금인
*/
@Column(name = "INPUTER", length = 20, nullable = true)
@Basic(fetch = FetchType.EAGER)
String inputer;
public void setInputer(String inputer) {
this.inputer = inputer;
}
public String getInputer() {
return this.inputer;
}
/**
* AMOUNTPOINT : 포인트 결제 금액
*/
@Column(name = "AMOUNTPOINT", length = 10, nullable = true)
@Basic(fetch = FetchType.EAGER)
int amountpoint;
public void setAmountpoint(int amountpoint) {
this.amountpoint = amountpoint;
}
public int getAmountpoint() {
return this.amountpoint;
}
/**
* AMOUNTONLINE : 무통장입금 결제 금액
*/
@Column(name = "AMOUNTONLINE", length = 10, nullable = true)
@Basic(fetch = FetchType.EAGER)
int amountonline;
public void setAmountonline(int amountonline) {
this.amountonline = amountonline;
}
public int getAmountonline() {
return this.amountonline;
}
/**
* AMOUNTPG : PG 결제 금액
*/
@Column(name = "AMOUNTPG", length = 10, nullable = true)
@Basic(fetch = FetchType.EAGER)
int amountpg;
public void setAmountpg(int amountpg) {
this.amountpg = amountpg;
}
public int getAmountpg() {
return this.amountpg;
}
/**
* TOTALAMOUNT : 총 결제 금액
*/
@Column(name = "TOTALAMOUNT", length = 10, nullable = true)
@Basic(fetch = FetchType.EAGER)
int totalamount;
public void setTotalamount(int totalamount) {
this.totalamount = totalamount;
}
public int getTotalamount() {
return this.totalamount;
}
/**
* ORDERID : 주문 고유 코드
*/
@Column(name = "ORDERID", length = 11, nullable = true)
@Basic(fetch = FetchType.EAGER)
String orderid;
public void setOrderid(String orderid) {
this.orderid = orderid;
}
public String getOrderid() {
return this.orderid;
}
/**
* ORDERSTATUS : 주문진행상태
*/
@Column(name = "ORDERSTATUS", length = 10, nullable = true)
@Basic(fetch = FetchType.EAGER)
int orderstatus;
public void setOrderstatus(int orderstatus) {
this.orderstatus = orderstatus;
}
public int getOrderstatus() {
return this.orderstatus;
}
/**
* MEMBERID : 주문자 아이디
*/
@Column(name = "MEMBERID", length = 20, nullable = true)
@Basic(fetch = FetchType.EAGER)
String memberid;
public void setMemberid(String memberid) {
this.memberid = memberid;
}
public String getMemberid() {
return this.memberid;
}
/**
* EXPECTDATE : 입금예정일
*/
@Column(name = "EXPECTDATE", length = 30, nullable = true)
@Basic(fetch = FetchType.EAGER)
String expectdate;
public void setExpectdate(String expectdate) {
this.expectdate = expectdate;
}
public String getExpectdate() {
return this.expectdate;
}
/**
* PAYDATE : 결제일
*/
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "PAYDATE", nullable = true)
@Basic(fetch = FetchType.EAGER)
Date paydate;
public void setPaydate(java.util.Date date) {
this.paydate = date;
}
public Date getPaydate() {
return this.paydate;
}
/**
* BUYDATE : 구매일
*/
@Temporal(TemporalType.TIMESTAMP)
@Column(name = "BUYDATE", nullable = true)
@Basic(fetch = FetchType.EAGER)
Date buydate;
public void setBuydate(java.util.Date date) {
this.buydate = date;
}
public Date getBuydate() {
return this.buydate;
}
}
| 9,598 | 0.635027 | 0.620649 | 489 | 16.916155 | 17.036924 | 61 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.198364 | false | false |
3
|
2b5e57acb2197942be492363f3698b457b8065e4
| 22,050,362,108,733 |
fab1e80de0415f73bb9bc6a54438c7d9273d3585
|
/prueba/MasColecciones/ej3ArrayList/Colores.java
|
013b207a2214b8dc5aabb4160b47b65ac1f328f6
|
[] |
no_license
|
dmijtut969/LaboratorioFPDual
|
https://github.com/dmijtut969/LaboratorioFPDual
|
15e5b6b6ee2ef2862f41e62a2d8ecf836ac51de9
|
0d3e401cf2cb911b5222e0ce2493fdffeb157211
|
refs/heads/main
| 2023-05-10T06:01:21.638000 | 2021-05-26T10:00:50 | 2021-05-26T10:00:50 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package ej3ArrayList;
import java.util.ArrayList;
public class Colores {
public static void main(String[] args) {
ArrayList<String> colores = new ArrayList<>();
colores.add("Azul");
colores.add("Rojo");
colores.add("Verde");
System.out.println(colores);
colores.add(0, "Negro");
System.out.println(colores);
}
}
|
UTF-8
|
Java
| 336 |
java
|
Colores.java
|
Java
|
[] | null |
[] |
package ej3ArrayList;
import java.util.ArrayList;
public class Colores {
public static void main(String[] args) {
ArrayList<String> colores = new ArrayList<>();
colores.add("Azul");
colores.add("Rojo");
colores.add("Verde");
System.out.println(colores);
colores.add(0, "Negro");
System.out.println(colores);
}
}
| 336 | 0.681548 | 0.675595 | 21 | 15 | 15.262777 | 48 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.238095 | false | false |
3
|
5e2dd43b616c4127b93b0405ccc5b3c3cf18dddc
| 8,564,164,798,470 |
b33ae0c6ad0e2cd445c41f349273383f87e7c95a
|
/src_main/br/com/yamaha/sistemagarantia/model/FatorGarantia.java
|
16f1c42c576a2e2ffae38ee7edc2f49ec7f53f02
|
[] |
no_license
|
alisonocosta/Yamaha
|
https://github.com/alisonocosta/Yamaha
|
758154884a0371183798cb223dcfad88cd66b203
|
d8a484ef35972f4b672b1e76ac33895e1bf79a41
|
refs/heads/master
| 2020-04-04T20:59:39.204000 | 2018-10-29T16:15:50 | 2018-10-29T16:15:50 | 156,268,410 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
/* Resource Tecnologia
* Copyright (c) 2007 - Todos os direitos reservados
*
* .: Projeto.....Yamaha - Sistema de Garantia
* .: Objeto......FatorGarantia.java
* .: Criação.....02 de Outubro de 2007
* .: Autor.......Edson Luiz Sumensari
* .: Descrição...Entidade "FatorGarantia".
*/
package br.com.yamaha.sistemagarantia.model;
import br.com.resource.infra.model.EntityObject;
/** Entidade do sistema, representando
* um objeto "FatorGarantia" no sistema.
*
* @author Edson Luiz Sumensari
*/
public class FatorGarantia extends EntityObject {
//----[ Atributos de classe e instância ]-----------------------------------
/** Version ID padrão para serialização. */
private static final long serialVersionUID = 1L;
/** Estado no qual a Concessionária se localiza. */
private String estado;
/** Fator de Garantia. */
private double fatorGarantia;
// ----[ Métodos Getter ]---------------------------------------------------
/** Método getter para a propriedade estado.
*
* @return o valor atual de estado.
*/
public String getEstado() {
return estado;
}
/** Método getter para a propriedade fatorGarantia
*
* @return double
*
*/
public double getFatorGarantia() {
return fatorGarantia;
}
// ----[ Métodos Setter ]---------------------------------------------------
/** Obtém o valor atual de estado.
*
* @param estado
* O novo valor para estado.
*/
public void setEstado(String estado) {
this.estado = estado;
}
/** Método setter para a propriedade fatorGarantia
*
* @param fatorGarantia
* <code>double</code> a ser designado para fatorGarantia.
*
*/
public void setFatorGarantia(double fatorGarantia) {
this.fatorGarantia = fatorGarantia;
}
}
|
ISO-8859-1
|
Java
| 1,824 |
java
|
FatorGarantia.java
|
Java
|
[
{
"context": "ção.....02 de Outubro de 2007\n * .: Autor.......Edson Luiz Sumensari\n * .: Descrição...Entidade \"FatorGarantia\".\n */",
"end": 249,
"score": 0.9998888373374939,
"start": 229,
"tag": "NAME",
"value": "Edson Luiz Sumensari"
},
{
"context": "bjeto \"FatorGarantia\" no sistema.\n * \n * @author Edson Luiz Sumensari\n */\npublic class FatorGarantia extends EntityObje",
"end": 514,
"score": 0.9998906254768372,
"start": 494,
"tag": "NAME",
"value": "Edson Luiz Sumensari"
}
] | null |
[] |
/* Resource Tecnologia
* Copyright (c) 2007 - Todos os direitos reservados
*
* .: Projeto.....Yamaha - Sistema de Garantia
* .: Objeto......FatorGarantia.java
* .: Criação.....02 de Outubro de 2007
* .: Autor.......<NAME>
* .: Descrição...Entidade "FatorGarantia".
*/
package br.com.yamaha.sistemagarantia.model;
import br.com.resource.infra.model.EntityObject;
/** Entidade do sistema, representando
* um objeto "FatorGarantia" no sistema.
*
* @author <NAME>
*/
public class FatorGarantia extends EntityObject {
//----[ Atributos de classe e instância ]-----------------------------------
/** Version ID padrão para serialização. */
private static final long serialVersionUID = 1L;
/** Estado no qual a Concessionária se localiza. */
private String estado;
/** Fator de Garantia. */
private double fatorGarantia;
// ----[ Métodos Getter ]---------------------------------------------------
/** Método getter para a propriedade estado.
*
* @return o valor atual de estado.
*/
public String getEstado() {
return estado;
}
/** Método getter para a propriedade fatorGarantia
*
* @return double
*
*/
public double getFatorGarantia() {
return fatorGarantia;
}
// ----[ Métodos Setter ]---------------------------------------------------
/** Obtém o valor atual de estado.
*
* @param estado
* O novo valor para estado.
*/
public void setEstado(String estado) {
this.estado = estado;
}
/** Método setter para a propriedade fatorGarantia
*
* @param fatorGarantia
* <code>double</code> a ser designado para fatorGarantia.
*
*/
public void setFatorGarantia(double fatorGarantia) {
this.fatorGarantia = fatorGarantia;
}
}
| 1,796 | 0.600332 | 0.594251 | 72 | 24.125 | 22.594824 | 80 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.722222 | false | false |
3
|
5229faa1c6a4671e075d3ee1d41c35caf4bb823f
| 11,647,951,374,424 |
33e580d17346b2a1f1bb6844e0d923ff783d0f77
|
/src/main/java/ge/unknown/controller/HomeController.java
|
3d80a805535b02ffa4d28ac39f38dc5fa696e1ba
|
[] |
no_license
|
MyDevelopmentProjects/GDBA
|
https://github.com/MyDevelopmentProjects/GDBA
|
a469a983f797cd0f9f521927ded2e3d0c889536c
|
458c56cc058f255a684954cdcc2f63e03fda134d
|
refs/heads/master
| 2020-04-17T22:33:42.537000 | 2019-01-22T13:31:21 | 2019-01-22T13:31:21 | 166,999,175 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package ge.unknown.controller;
import ge.unknown.entities.Slider;
import ge.unknown.entities.Tour;
import ge.unknown.enums.ESliderSection;
import ge.unknown.security.UserUtils;
import ge.unknown.service.*;
import ge.unknown.utils.UtilCategory;
import ge.unknown.utils.UtilContact;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import java.util.List;
import java.util.stream.Collectors;
/**
* Created by MJaniko on 3/10/2017.
*/
@Controller
public class HomeController {
@Autowired
private ContactService contactService;
@Autowired
private NewsService newsService;
@Autowired
private SliderService sliderService;
@RequestMapping(value = {"/"}, method = RequestMethod.GET)
public String home(Model model) {
model.addAttribute("content", "main");
model.addAttribute("pageTitle", "title.home");
model.addAttribute("partnersList", getTopSection(ESliderSection.MAIN_PAGE_PARTNERS_SECTION));
model.addAttribute("sliderList", getTopSection(ESliderSection.MAIN_PAGE_TOP_SECTION));
model.addAttribute("last9news", newsService.getLastX(9));
model.addAttribute("serviceNews", newsService.getServiceNews());
UtilContact.contactToModel(model, contactService.getAll());
return "index";
}
private List<Slider> getTopSection(ESliderSection section) {
List<Slider> list = sliderService.getAll();
return list.stream().filter(obj-> obj.getSection().equals(section)).collect(Collectors.toList());
}
@RequestMapping(value = "/admin", method = RequestMethod.GET)
public String admin(Model model) {
return "security/index";
}
}
|
UTF-8
|
Java
| 1,889 |
java
|
HomeController.java
|
Java
|
[
{
"context": "rt java.util.stream.Collectors;\n\n/**\n * Created by MJaniko on 3/10/2017.\n */\n@Controller\npublic class HomeCo",
"end": 643,
"score": 0.9974279403686523,
"start": 636,
"tag": "USERNAME",
"value": "MJaniko"
}
] | null |
[] |
package ge.unknown.controller;
import ge.unknown.entities.Slider;
import ge.unknown.entities.Tour;
import ge.unknown.enums.ESliderSection;
import ge.unknown.security.UserUtils;
import ge.unknown.service.*;
import ge.unknown.utils.UtilCategory;
import ge.unknown.utils.UtilContact;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import java.util.List;
import java.util.stream.Collectors;
/**
* Created by MJaniko on 3/10/2017.
*/
@Controller
public class HomeController {
@Autowired
private ContactService contactService;
@Autowired
private NewsService newsService;
@Autowired
private SliderService sliderService;
@RequestMapping(value = {"/"}, method = RequestMethod.GET)
public String home(Model model) {
model.addAttribute("content", "main");
model.addAttribute("pageTitle", "title.home");
model.addAttribute("partnersList", getTopSection(ESliderSection.MAIN_PAGE_PARTNERS_SECTION));
model.addAttribute("sliderList", getTopSection(ESliderSection.MAIN_PAGE_TOP_SECTION));
model.addAttribute("last9news", newsService.getLastX(9));
model.addAttribute("serviceNews", newsService.getServiceNews());
UtilContact.contactToModel(model, contactService.getAll());
return "index";
}
private List<Slider> getTopSection(ESliderSection section) {
List<Slider> list = sliderService.getAll();
return list.stream().filter(obj-> obj.getSection().equals(section)).collect(Collectors.toList());
}
@RequestMapping(value = "/admin", method = RequestMethod.GET)
public String admin(Model model) {
return "security/index";
}
}
| 1,889 | 0.738486 | 0.733722 | 55 | 33.327274 | 27.235708 | 105 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.690909 | false | false |
3
|
6cc7fc47c346e6e139a4ec5b3eb4a9a4a84908ff
| 14,705,968,031,955 |
1f1fb7a3b252d9cb2fa6ebc1e4140d4ca2dcd2aa
|
/src/main/java/com/customer/PaymentServlet.java
|
a6cfb639da4935663d8e5d54228dc9a94f81c02d
|
[] |
no_license
|
JananiMalshika/Java-WebProject
|
https://github.com/JananiMalshika/Java-WebProject
|
88c4629e9613fa5875c0a0d7ad7ad05a06ac721e
|
5634a661fade096f2234e822273cfdc1af6b8a4e
|
refs/heads/main
| 2023-08-18T10:21:40.731000 | 2021-10-08T18:14:24 | 2021-10-08T18:14:24 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.customer;
import java.io.IOException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet("/PaymentServlet")
public class PaymentServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = request.getParameter("id");
String name = request.getParameter("name");
String email = request.getParameter("email");
String phone = request.getParameter("phone");
String amount = request.getParameter("amount");
String date = request.getParameter("date");
boolean isTrue;
isTrue = PaymentDBUtil.insertpayment(id, name, email, phone, amount, date);
if (isTrue==true) {
RequestDispatcher dis = request.getRequestDispatcher("paymentsuccess.jsp");
dis.forward(request, response);
}
else {
RequestDispatcher dis2 = request.getRequestDispatcher("paymentunsuccess.jsp");
dis2.forward(request, response);
}
}
}
|
UTF-8
|
Java
| 1,233 |
java
|
PaymentServlet.java
|
Java
|
[] | null |
[] |
package com.customer;
import java.io.IOException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet("/PaymentServlet")
public class PaymentServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String id = request.getParameter("id");
String name = request.getParameter("name");
String email = request.getParameter("email");
String phone = request.getParameter("phone");
String amount = request.getParameter("amount");
String date = request.getParameter("date");
boolean isTrue;
isTrue = PaymentDBUtil.insertpayment(id, name, email, phone, amount, date);
if (isTrue==true) {
RequestDispatcher dis = request.getRequestDispatcher("paymentsuccess.jsp");
dis.forward(request, response);
}
else {
RequestDispatcher dis2 = request.getRequestDispatcher("paymentunsuccess.jsp");
dis2.forward(request, response);
}
}
}
| 1,233 | 0.765612 | 0.763179 | 42 | 28.357143 | 27.605057 | 119 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.952381 | false | false |
3
|
63f283ede2ece4b28a4c42738f2c309101ce71bd
| 17,179,869,186,960 |
086454e1a342bf5f74169258dca4645993c65c53
|
/src/main/java/com/payments/infrastructure/InMemGroupService.java
|
2496cb9b8f8ca669156d37291054eadd00a47003
|
[] |
no_license
|
maciekciolek/test-tasks
|
https://github.com/maciekciolek/test-tasks
|
f8ed1f786f56293e7191f140841a91dbbe5ad047
|
8b7ceb537e1fb673313987d3e1253b07e50da027
|
refs/heads/master
| 2021-01-20T20:39:05.821000 | 2016-06-08T11:15:43 | 2016-06-08T11:15:43 | 60,692,297 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.payments.infrastructure;
import com.payments.domain.group.Group;
import com.payments.domain.group.GroupId;
import com.payments.domain.group.GroupService;
import com.payments.domain.user.UserId;
import java.util.*;
/**
* @author mciolek
*/
public class InMemGroupService implements GroupService {
private final Map<GroupId, Group> groups = new HashMap<GroupId, Group>();
public InMemGroupService() {
groups.put(new GroupId("0"), new Group(null, "Root Group", new GroupId("0")));
}
public GroupId create(String name, GroupId parentId) {
if (!groups.containsKey(parentId)) {
throw new IllegalStateException(String.format("Parent with %s not exists.", parentId));
}
GroupId groupId = new GroupId(UUID.randomUUID().toString());
Group group = new Group(parentId, name, groupId);
groups.put(groupId, group);
return groupId;
}
public Optional<Group> get(GroupId groupId) {
return Optional.ofNullable(groups.get(groupId));
}
public void addUserToGroup(UserId userId, GroupId groupId) {
}
public List<GroupId> getUserGroups(UserId userId) {
return null;
}
public List<UserId> getUsers(GroupId groupId) {
return null;
}
}
|
UTF-8
|
Java
| 1,282 |
java
|
InMemGroupService.java
|
Java
|
[
{
"context": ".user.UserId;\n\nimport java.util.*;\n\n/**\n * @author mciolek\n */\npublic class InMemGroupService implements Gro",
"end": 251,
"score": 0.9996289610862732,
"start": 244,
"tag": "USERNAME",
"value": "mciolek"
}
] | null |
[] |
package com.payments.infrastructure;
import com.payments.domain.group.Group;
import com.payments.domain.group.GroupId;
import com.payments.domain.group.GroupService;
import com.payments.domain.user.UserId;
import java.util.*;
/**
* @author mciolek
*/
public class InMemGroupService implements GroupService {
private final Map<GroupId, Group> groups = new HashMap<GroupId, Group>();
public InMemGroupService() {
groups.put(new GroupId("0"), new Group(null, "Root Group", new GroupId("0")));
}
public GroupId create(String name, GroupId parentId) {
if (!groups.containsKey(parentId)) {
throw new IllegalStateException(String.format("Parent with %s not exists.", parentId));
}
GroupId groupId = new GroupId(UUID.randomUUID().toString());
Group group = new Group(parentId, name, groupId);
groups.put(groupId, group);
return groupId;
}
public Optional<Group> get(GroupId groupId) {
return Optional.ofNullable(groups.get(groupId));
}
public void addUserToGroup(UserId userId, GroupId groupId) {
}
public List<GroupId> getUserGroups(UserId userId) {
return null;
}
public List<UserId> getUsers(GroupId groupId) {
return null;
}
}
| 1,282 | 0.673167 | 0.671607 | 48 | 25.708334 | 27.24041 | 99 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.5625 | false | false |
3
|
c8a5dbc1099714c43487c8b0bf8eed0db069f620
| 11,235,634,501,988 |
95aafd0752c09d9beba88175bdfb0ca8253de687
|
/src/main/java/com/labtrackensino/javaweb/validation/BasicSpecification.java
|
ce0aba74595514b032e461b58e98e4e26bd27472
|
[] |
no_license
|
labtrackensino/delivery-pizza
|
https://github.com/labtrackensino/delivery-pizza
|
3dbfc56cd52f702f75b71f0300d43ac3eee3da2e
|
7cc5d98e80eea3ab7e620acaab952c9fbafd8ff1
|
refs/heads/master
| 2021-01-02T05:14:53.721000 | 2020-02-21T00:16:38 | 2020-02-21T00:16:38 | 239,504,208 | 1 | 1 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.labtrackensino.javaweb.validation;
public abstract class BasicSpecification<T> implements ISpecification<T, BasicSpecification<T>> {
private String bean;
private String property;
private String message;
@Override
public String getBean() {
return bean;
}
@Override
public String getProperty() {
return property;
}
@Override
public String getMessage() {
return message;
}
@Override
public BasicSpecification<T> setBean(String bean) {
this.bean = bean;
return this;
}
@Override
public BasicSpecification<T> setMessage(String message) {
this.message = message;
return this;
}
@Override
public BasicSpecification<T> setProperty(String property) {
this.property = property;
return this;
}
}
|
UTF-8
|
Java
| 862 |
java
|
BasicSpecification.java
|
Java
|
[] | null |
[] |
package com.labtrackensino.javaweb.validation;
public abstract class BasicSpecification<T> implements ISpecification<T, BasicSpecification<T>> {
private String bean;
private String property;
private String message;
@Override
public String getBean() {
return bean;
}
@Override
public String getProperty() {
return property;
}
@Override
public String getMessage() {
return message;
}
@Override
public BasicSpecification<T> setBean(String bean) {
this.bean = bean;
return this;
}
@Override
public BasicSpecification<T> setMessage(String message) {
this.message = message;
return this;
}
@Override
public BasicSpecification<T> setProperty(String property) {
this.property = property;
return this;
}
}
| 862 | 0.638051 | 0.638051 | 42 | 19.523809 | 20.597317 | 97 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.333333 | false | false |
3
|
1a78fdda360baef855820b6fc477250142da665d
| 24,361,054,521,784 |
aa7fc9a5c155160d634df58a8b29b847e2305d5e
|
/emailtemplates/src/main/java/io/jmix/emailtemplates/role/EmailTemplatesSendRole.java
|
b4b9164f1cd39b977d9ce0416b1a2759f5a8708b
|
[
"Apache-2.0"
] |
permissive
|
stvliu/jmix-emailtemplates
|
https://github.com/stvliu/jmix-emailtemplates
|
b2993554cccc2fd091825d7b9add2e65f701a708
|
7fe96ae540b53f09c165392c7493e6ec10677591
|
refs/heads/master
| 2023-03-29T17:53:36.831000 | 2021-03-24T13:37:40 | 2021-03-24T13:37:40 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
/*
* Copyright 2020 Haulmont.
*
* 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.jmix.emailtemplates.role;
import io.jmix.emailtemplates.entity.*;
import io.jmix.security.model.EntityAttributePolicyAction;
import io.jmix.security.model.EntityPolicyAction;
import io.jmix.security.role.annotation.EntityAttributePolicy;
import io.jmix.security.role.annotation.EntityPolicy;
import io.jmix.security.role.annotation.ResourceRole;
@ResourceRole(code = EmailTemplatesSendRole.CODE, name = "Email Templates: sending")
public interface EmailTemplatesSendRole {
String CODE = "emailtemplates-send";
@EntityPolicy(entityClass = TemplateReport.class, actions = {EntityPolicyAction.READ})
@EntityPolicy(entityClass = ReportEmailTemplate.class, actions = {EntityPolicyAction.READ})
@EntityPolicy(entityClass = JsonEmailTemplate.class, actions = {EntityPolicyAction.READ})
@EntityPolicy(entityClass = EmailTemplate.class, actions = {EntityPolicyAction.READ, EntityPolicyAction.UPDATE})
@EntityPolicy(entityClass = ParameterValue.class, actions = {EntityPolicyAction.READ})
@EntityPolicy(entityClass = TemplateGroup.class, actions = {EntityPolicyAction.READ})
@EntityAttributePolicy(entityClass = TemplateReport.class, action = EntityAttributePolicyAction.VIEW, attributes = "*")
@EntityAttributePolicy(entityClass = ReportEmailTemplate.class, action = EntityAttributePolicyAction.VIEW, attributes = "*")
@EntityAttributePolicy(entityClass = JsonEmailTemplate.class, action = EntityAttributePolicyAction.VIEW, attributes = "*")
@EntityAttributePolicy(entityClass = EmailTemplate.class, action = EntityAttributePolicyAction.VIEW, attributes = "*")
@EntityAttributePolicy(entityClass = ParameterValue.class, action = EntityAttributePolicyAction.VIEW, attributes = "*")
@EntityAttributePolicy(entityClass = TemplateGroup.class, action = EntityAttributePolicyAction.VIEW, attributes = "*")
void emailTemplatesSend();
}
|
UTF-8
|
Java
| 2,487 |
java
|
EmailTemplatesSendRole.java
|
Java
|
[] | null |
[] |
/*
* Copyright 2020 Haulmont.
*
* 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.jmix.emailtemplates.role;
import io.jmix.emailtemplates.entity.*;
import io.jmix.security.model.EntityAttributePolicyAction;
import io.jmix.security.model.EntityPolicyAction;
import io.jmix.security.role.annotation.EntityAttributePolicy;
import io.jmix.security.role.annotation.EntityPolicy;
import io.jmix.security.role.annotation.ResourceRole;
@ResourceRole(code = EmailTemplatesSendRole.CODE, name = "Email Templates: sending")
public interface EmailTemplatesSendRole {
String CODE = "emailtemplates-send";
@EntityPolicy(entityClass = TemplateReport.class, actions = {EntityPolicyAction.READ})
@EntityPolicy(entityClass = ReportEmailTemplate.class, actions = {EntityPolicyAction.READ})
@EntityPolicy(entityClass = JsonEmailTemplate.class, actions = {EntityPolicyAction.READ})
@EntityPolicy(entityClass = EmailTemplate.class, actions = {EntityPolicyAction.READ, EntityPolicyAction.UPDATE})
@EntityPolicy(entityClass = ParameterValue.class, actions = {EntityPolicyAction.READ})
@EntityPolicy(entityClass = TemplateGroup.class, actions = {EntityPolicyAction.READ})
@EntityAttributePolicy(entityClass = TemplateReport.class, action = EntityAttributePolicyAction.VIEW, attributes = "*")
@EntityAttributePolicy(entityClass = ReportEmailTemplate.class, action = EntityAttributePolicyAction.VIEW, attributes = "*")
@EntityAttributePolicy(entityClass = JsonEmailTemplate.class, action = EntityAttributePolicyAction.VIEW, attributes = "*")
@EntityAttributePolicy(entityClass = EmailTemplate.class, action = EntityAttributePolicyAction.VIEW, attributes = "*")
@EntityAttributePolicy(entityClass = ParameterValue.class, action = EntityAttributePolicyAction.VIEW, attributes = "*")
@EntityAttributePolicy(entityClass = TemplateGroup.class, action = EntityAttributePolicyAction.VIEW, attributes = "*")
void emailTemplatesSend();
}
| 2,487 | 0.782469 | 0.779252 | 46 | 53.065216 | 42.269531 | 128 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.73913 | false | false |
3
|
68f80a28a49b9e0c0b2cb15d7f008ac74ecfaf61
| 20,203,526,194,466 |
4131dfdab8e88a653763bb446882098801884f95
|
/src/br/dcc/ufla/ppoo/learnGeometry/gui/TelaGabarito.java
|
edf2e8d5622db222137bd844db17ab465b8b54e3
|
[] |
no_license
|
mauriciovr13/LearnGeometry
|
https://github.com/mauriciovr13/LearnGeometry
|
84aba53266a002b419ef96db9cc50da9cccbe086
|
1013bb51b7c3c8245af7693da8c042bcae3379c3
|
refs/heads/master
| 2020-03-22T18:57:25.898000 | 2019-04-20T01:42:47 | 2019-04-20T01:42:47 | 140,435,155 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package br.dcc.ufla.ppoo.learnGeometry.gui;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.awt.HeadlessException;
import java.awt.Image;
import java.awt.Insets;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
/** Classe TelaGabarito, apresenta o gabarito dos exercícios.
* Learn Geometry
* GCC178 - Práticas de Programação Orientada a Objetos
* UFLA - Universidade Federal de Lavras
* @author Maurício Vieira, Pedro Pio e Vinicius Spinelli
*/
public class TelaGabarito extends JFrame {
private GridBagLayout gbl;
private GridBagConstraints gbc;
private JPanel painel1;
private JPanel painel2;
private JLabel gabarito;
private JLabel[] respostas;
private JButton btnRefazer;
private JButton btnFinalizar;
public TelaGabarito(String string) throws HeadlessException {
super(string);
// Define que fechar a janela, a execução aplicação será encerrada
//setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// Evita que a tela possa ser redimensionada pelo usuário
setResizable(false);
// Invoca o método que efetivamente constrói a tela
construirTela();
setSize(750, 650);
// Abrindo a tela no centro do screen
setLocationRelativeTo(null);
}
private void construirTela() {
URL url = this.getClass().getResource("../imagens/LearnGeometry.png");
Image imagemTitulo = Toolkit.getDefaultToolkit().getImage(url);
this.setIconImage(imagemTitulo);
gbc = new GridBagConstraints();
gbl = new GridBagLayout();
setLayout(gbl);
gabarito = new JLabel("Gabarito:");
gabarito.setFont(new Font("Courier", Font.PLAIN, 20));
btnRefazer = new JButton("Refazer teste");
btnRefazer.setBackground(Color.GREEN);
btnRefazer.setForeground(Color.WHITE);
btnRefazer.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
telaRefazerTeste();
}
});
btnFinalizar = new JButton("Finalizar Teste");
btnFinalizar.setBackground(Color.BLUE);
btnFinalizar.setForeground(Color.WHITE);
btnFinalizar.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent ae) {
TelaAssunto.getInstancia().setLocationRelativeTo(null);
dispose();
TelaAssunto.getInstancia().setVisible(true);
}
});
ArrayList<String> resp = lerLog();
respostas = new JLabel[resp.size()];
painel1 = new JPanel(new GridLayout(10, 10, 10, 10));
for (int i = 0; i < resp.size(); i++) {
String[] resp1 = resp.get(i).split(";");
resp1[0] = (i+1) + "- " + resp1[0].substring(2);
resp1[1] = (i+1) + "- " + resp1[1].substring(2);
respostas[i] = new JLabel(resp1[1]);
respostas[i].setPreferredSize(new Dimension(150, 40));
if (resp1[0].equals(resp1[1])) {
respostas[i].setBackground(Color.GREEN);
respostas[i].setOpaque(true);
}
else {
respostas[i].setText(resp1[0]);
respostas[i].setBackground(Color.RED);
respostas[i].setOpaque(true);
}
painel1.add(respostas[i]);
}
painel2 = new JPanel(new GridLayout(1, 2, 15, 15));
painel2.add(btnRefazer);
painel2.add(btnFinalizar);
adicionarComponente(gabarito, GridBagConstraints.CENTER, GridBagConstraints.BOTH, 0, 0, 2, 1);
adicionarComponente(painel1, GridBagConstraints.CENTER, GridBagConstraints.BOTH, 1, 0, 5, 5);
adicionarComponente(painel2, GridBagConstraints.CENTER, GridBagConstraints.BOTH, 6, 0, 1, 2);
}
private ArrayList<String> lerLog() {
ArrayList<String> resp = new ArrayList<String>();
BufferedReader br = null;
File f = new File("log.txt");
int qtd = 0;
try {
br = new BufferedReader(new FileReader(f));
while (br.ready()) {
resp.add(br.readLine());
}
} catch (IOException e) {
System.out.println("Erro ao contar o numero de linhas");
} finally {
if (br != null) {
try {
br.close();
f.delete();
} catch (IOException e) {
System.out.println("Erro ao fechar o arquivo");
}
}
}
return resp;
}
private void telaRefazerTeste() {
TelaAreaInicial.getInstancia().setLocationRelativeTo(this);
this.dispose();
TelaAreaInicial.getInstancia().setVisible(true);
}
private void adicionarComponente(Component comp, int anchor, int fill, int linha, int coluna, int larg, int alt) {
gbc.anchor = anchor; // posicionamento do componente na tela (esquerda, direita, centralizado, etc)
gbc.fill = fill; // define se o tamanho do componente será expandido ou não
gbc.gridy = linha; // linha do grid onde o componente será inserido
gbc.gridx = coluna; // coluna do grid onde o componente será inserido
gbc.gridwidth = larg; // quantidade de colunas do grid que o componente irá ocupar
gbc.gridheight = alt; // quantidade de linhas do grid que o componente irá ocupar
gbc.insets = new Insets(5, 5, 5, 5); // espaçamento (em pixels) entre os componentes da tela
gbl.setConstraints(comp, gbc); // adiciona o componente "comp" ao layout com as restrições previamente especificadas
add(comp); // efetivamente insere o componente na tela
}
}
|
UTF-8
|
Java
| 6,452 |
java
|
TelaGabarito.java
|
Java
|
[
{
"context": "* UFLA - Universidade Federal de Lavras\n * @author Maurício Vieira, Pedro Pio e Vinicius Spinelli\n */\n\npublic class ",
"end": 888,
"score": 0.9998577833175659,
"start": 873,
"tag": "NAME",
"value": "Maurício Vieira"
},
{
"context": "dade Federal de Lavras\n * @author Maurício Vieira, Pedro Pio e Vinicius Spinelli\n */\n\npublic class TelaGabarit",
"end": 899,
"score": 0.9998512268066406,
"start": 890,
"tag": "NAME",
"value": "Pedro Pio"
},
{
"context": " de Lavras\n * @author Maurício Vieira, Pedro Pio e Vinicius Spinelli\n */\n\npublic class TelaGabarito extends JFrame {\n ",
"end": 919,
"score": 0.9998273253440857,
"start": 902,
"tag": "NAME",
"value": "Vinicius Spinelli"
}
] | null |
[] |
package br.dcc.ufla.ppoo.learnGeometry.gui;
import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.awt.HeadlessException;
import java.awt.Image;
import java.awt.Insets;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
/** Classe TelaGabarito, apresenta o gabarito dos exercícios.
* Learn Geometry
* GCC178 - Práticas de Programação Orientada a Objetos
* UFLA - Universidade Federal de Lavras
* @author <NAME>, <NAME> e <NAME>
*/
public class TelaGabarito extends JFrame {
private GridBagLayout gbl;
private GridBagConstraints gbc;
private JPanel painel1;
private JPanel painel2;
private JLabel gabarito;
private JLabel[] respostas;
private JButton btnRefazer;
private JButton btnFinalizar;
public TelaGabarito(String string) throws HeadlessException {
super(string);
// Define que fechar a janela, a execução aplicação será encerrada
//setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// Evita que a tela possa ser redimensionada pelo usuário
setResizable(false);
// Invoca o método que efetivamente constrói a tela
construirTela();
setSize(750, 650);
// Abrindo a tela no centro do screen
setLocationRelativeTo(null);
}
private void construirTela() {
URL url = this.getClass().getResource("../imagens/LearnGeometry.png");
Image imagemTitulo = Toolkit.getDefaultToolkit().getImage(url);
this.setIconImage(imagemTitulo);
gbc = new GridBagConstraints();
gbl = new GridBagLayout();
setLayout(gbl);
gabarito = new JLabel("Gabarito:");
gabarito.setFont(new Font("Courier", Font.PLAIN, 20));
btnRefazer = new JButton("Refazer teste");
btnRefazer.setBackground(Color.GREEN);
btnRefazer.setForeground(Color.WHITE);
btnRefazer.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
telaRefazerTeste();
}
});
btnFinalizar = new JButton("Finalizar Teste");
btnFinalizar.setBackground(Color.BLUE);
btnFinalizar.setForeground(Color.WHITE);
btnFinalizar.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent ae) {
TelaAssunto.getInstancia().setLocationRelativeTo(null);
dispose();
TelaAssunto.getInstancia().setVisible(true);
}
});
ArrayList<String> resp = lerLog();
respostas = new JLabel[resp.size()];
painel1 = new JPanel(new GridLayout(10, 10, 10, 10));
for (int i = 0; i < resp.size(); i++) {
String[] resp1 = resp.get(i).split(";");
resp1[0] = (i+1) + "- " + resp1[0].substring(2);
resp1[1] = (i+1) + "- " + resp1[1].substring(2);
respostas[i] = new JLabel(resp1[1]);
respostas[i].setPreferredSize(new Dimension(150, 40));
if (resp1[0].equals(resp1[1])) {
respostas[i].setBackground(Color.GREEN);
respostas[i].setOpaque(true);
}
else {
respostas[i].setText(resp1[0]);
respostas[i].setBackground(Color.RED);
respostas[i].setOpaque(true);
}
painel1.add(respostas[i]);
}
painel2 = new JPanel(new GridLayout(1, 2, 15, 15));
painel2.add(btnRefazer);
painel2.add(btnFinalizar);
adicionarComponente(gabarito, GridBagConstraints.CENTER, GridBagConstraints.BOTH, 0, 0, 2, 1);
adicionarComponente(painel1, GridBagConstraints.CENTER, GridBagConstraints.BOTH, 1, 0, 5, 5);
adicionarComponente(painel2, GridBagConstraints.CENTER, GridBagConstraints.BOTH, 6, 0, 1, 2);
}
private ArrayList<String> lerLog() {
ArrayList<String> resp = new ArrayList<String>();
BufferedReader br = null;
File f = new File("log.txt");
int qtd = 0;
try {
br = new BufferedReader(new FileReader(f));
while (br.ready()) {
resp.add(br.readLine());
}
} catch (IOException e) {
System.out.println("Erro ao contar o numero de linhas");
} finally {
if (br != null) {
try {
br.close();
f.delete();
} catch (IOException e) {
System.out.println("Erro ao fechar o arquivo");
}
}
}
return resp;
}
private void telaRefazerTeste() {
TelaAreaInicial.getInstancia().setLocationRelativeTo(this);
this.dispose();
TelaAreaInicial.getInstancia().setVisible(true);
}
private void adicionarComponente(Component comp, int anchor, int fill, int linha, int coluna, int larg, int alt) {
gbc.anchor = anchor; // posicionamento do componente na tela (esquerda, direita, centralizado, etc)
gbc.fill = fill; // define se o tamanho do componente será expandido ou não
gbc.gridy = linha; // linha do grid onde o componente será inserido
gbc.gridx = coluna; // coluna do grid onde o componente será inserido
gbc.gridwidth = larg; // quantidade de colunas do grid que o componente irá ocupar
gbc.gridheight = alt; // quantidade de linhas do grid que o componente irá ocupar
gbc.insets = new Insets(5, 5, 5, 5); // espaçamento (em pixels) entre os componentes da tela
gbl.setConstraints(comp, gbc); // adiciona o componente "comp" ao layout com as restrições previamente especificadas
add(comp); // efetivamente insere o componente na tela
}
}
| 6,428 | 0.615863 | 0.603733 | 173 | 36.167629 | 26.004461 | 124 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.861272 | false | false |
3
|
733a533f0b887b9f5a404f79b7cdd749940cf248
| 10,866,267,294,866 |
dec6e459fabdf28942c33ced0ed8294c17080003
|
/src/utils/CheckLogin.java
|
218bb0c63b2d6d079a3d052d1dd11c578503ba1e
|
[] |
no_license
|
wslzjy/ihome-server
|
https://github.com/wslzjy/ihome-server
|
2093786d284dabc7c41e28ced3a8f1f752a3ce3b
|
1a758f6516df7adbad8d1756d594710cf44eaff7
|
refs/heads/master
| 2021-01-19T07:05:44.456000 | 2017-11-02T02:02:21 | 2017-11-02T02:02:21 | 87,519,344 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package utils;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
/**
* 登录验证
*
* @author W_SL
*/
public class CheckLogin {
/**
* 验证网关登录信息
*
* @param dbname
* @param passwd
* @return
*/
public static boolean checkGatewayLogin(String[] msgs) {
try {
if (msgs.length == 4) {
Connection con = ConnectDatabase.connection("ihome_global");
if (null != con) {
String sql = "select * from t_homeid where homeid = ? and password = md5(?)";
PreparedStatement ps = con.prepareStatement(sql);
ps.setString(1, msgs[2]);
ps.setString(2, msgs[3]);
ResultSet rs = ps.executeQuery();
if (rs.next()) {
con.close();
return true;
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
/**
* 验证客户端登录信息
*
* @param uname
* @param passwd
* @return
*/
public static boolean checkClientLogin(String[] msgs) {
return true;
/* try {
if (msgs.length == 5) {
Connection con = ConnectDatabase.connection("global");
if (null != con) {
String sql = "select * from t_user where email = ? and password = md5(?)";
PreparedStatement ps = con.prepareStatement(sql);
ps.setString(1, msgs[3]);
ps.setString(2, msgs[4]);
ResultSet rs = ps.executeQuery();
if (rs.next()) {
con.close();
return true;
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
return false;*/
}
}
|
GB18030
|
Java
| 1,518 |
java
|
CheckLogin.java
|
Java
|
[
{
"context": "rt java.sql.ResultSet;\n\n/**\n * 登录验证\n * \n * @author W_SL\n */\npublic class CheckLogin {\n\n\t/**\n\t * 验证网关登录信息\n",
"end": 138,
"score": 0.9997196197509766,
"start": 134,
"tag": "USERNAME",
"value": "W_SL"
},
{
"context": "ct * from t_homeid where homeid = ? and password = md5(?)\";\n\t\t\t\t\tPreparedStatement ps = con.prepareState",
"end": 504,
"score": 0.9971952438354492,
"start": 501,
"tag": "PASSWORD",
"value": "md5"
},
{
"context": "elect * from t_user where email = ? and password = md5(?)\";\n\t\t\t\t\tPreparedStatement ps = con.prepareStatemen",
"end": 1159,
"score": 0.8674569129943848,
"start": 1156,
"tag": "PASSWORD",
"value": "md5"
}
] | null |
[] |
package utils;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
/**
* 登录验证
*
* @author W_SL
*/
public class CheckLogin {
/**
* 验证网关登录信息
*
* @param dbname
* @param passwd
* @return
*/
public static boolean checkGatewayLogin(String[] msgs) {
try {
if (msgs.length == 4) {
Connection con = ConnectDatabase.connection("ihome_global");
if (null != con) {
String sql = "select * from t_homeid where homeid = ? and password = md5(?)";
PreparedStatement ps = con.prepareStatement(sql);
ps.setString(1, msgs[2]);
ps.setString(2, msgs[3]);
ResultSet rs = ps.executeQuery();
if (rs.next()) {
con.close();
return true;
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
return false;
}
/**
* 验证客户端登录信息
*
* @param uname
* @param passwd
* @return
*/
public static boolean checkClientLogin(String[] msgs) {
return true;
/* try {
if (msgs.length == 5) {
Connection con = ConnectDatabase.connection("global");
if (null != con) {
String sql = "select * from t_user where email = ? and password = md5(?)";
PreparedStatement ps = con.prepareStatement(sql);
ps.setString(1, msgs[3]);
ps.setString(2, msgs[4]);
ResultSet rs = ps.executeQuery();
if (rs.next()) {
con.close();
return true;
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
return false;*/
}
}
| 1,518 | 0.590786 | 0.582656 | 72 | 19.5 | 18.647312 | 82 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 2.791667 | false | false |
3
|
4bc1018c94e831d8658e95afb9e6c86b37488468
| 18,098,992,191,306 |
3f846670c360cf99686df0e81c6de7df34ef037a
|
/Microservices/Cafe-Review-MicroService/src/main/java/com/cg/dto/CafeMenu.java
|
9521e2d30ce0d8833c02fdc9f97e60f779282316
|
[] |
no_license
|
NamanPatwa/CapCafe
|
https://github.com/NamanPatwa/CapCafe
|
0eb5db139b503a44ac37247eab906b15d2682d6e
|
b9e3315076d67fbe3542e8b7393431771e1131d0
|
refs/heads/master
| 2023-01-06T07:36:26.416000 | 2019-11-24T18:03:06 | 2019-11-24T18:03:06 | 223,785,341 | 0 | 0 | null | false | 2022-12-31T04:35:16 | 2019-11-24T17:47:53 | 2019-11-24T18:18:05 | 2022-12-31T04:35:15 | 100,078 | 0 | 0 | 23 |
Java
| false | false |
package com.cg.dto;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.Table;
//@Data
//@EqualsAndHashCode(exclude = "details")
@Entity
@Table(name = "cafemenu")
//@SequenceGenerator(name = "menuseq", sequenceName = "cafemenu_seq", initialValue = 500, allocationSize = 1)
public class CafeMenu implements Serializable{
@Id
@Column(name = "item_id")
//@GeneratedValue(generator = "menuseq")
private int itemId;
@Column(name = "item_name")
private String itemName;
private String itemType;
private double itemPrice;
@ManyToMany(mappedBy = "menus"
, fetch = FetchType.LAZY,
cascade = {
CascadeType.PERSIST,
CascadeType.MERGE,
}
)
Set<CafeDetails> details = new HashSet<CafeDetails>();
public CafeMenu() {
}
public CafeMenu(int itemId, String itemName, String itemType, double itemPrice) {
super();
this.itemId = itemId;
this.itemName = itemName;
this.itemType = itemType;
this.itemPrice = itemPrice;
}
public int getItemId() {
return itemId;
}
public void setItemId(int itemId) {
this.itemId = itemId;
}
public String getItemName() {
return itemName;
}
public void setItemName(String itemName) {
this.itemName = itemName;
}
public String getItemType() {
return itemType;
}
public void setItemType(String itemType) {
this.itemType = itemType;
}
public double getItemPrice() {
return itemPrice;
}
public void setItemPrice(double itemPrice) {
this.itemPrice = itemPrice;
}
}
|
UTF-8
|
Java
| 1,780 |
java
|
CafeMenu.java
|
Java
|
[] | null |
[] |
package com.cg.dto;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.ManyToMany;
import javax.persistence.Table;
//@Data
//@EqualsAndHashCode(exclude = "details")
@Entity
@Table(name = "cafemenu")
//@SequenceGenerator(name = "menuseq", sequenceName = "cafemenu_seq", initialValue = 500, allocationSize = 1)
public class CafeMenu implements Serializable{
@Id
@Column(name = "item_id")
//@GeneratedValue(generator = "menuseq")
private int itemId;
@Column(name = "item_name")
private String itemName;
private String itemType;
private double itemPrice;
@ManyToMany(mappedBy = "menus"
, fetch = FetchType.LAZY,
cascade = {
CascadeType.PERSIST,
CascadeType.MERGE,
}
)
Set<CafeDetails> details = new HashSet<CafeDetails>();
public CafeMenu() {
}
public CafeMenu(int itemId, String itemName, String itemType, double itemPrice) {
super();
this.itemId = itemId;
this.itemName = itemName;
this.itemType = itemType;
this.itemPrice = itemPrice;
}
public int getItemId() {
return itemId;
}
public void setItemId(int itemId) {
this.itemId = itemId;
}
public String getItemName() {
return itemName;
}
public void setItemName(String itemName) {
this.itemName = itemName;
}
public String getItemType() {
return itemType;
}
public void setItemType(String itemType) {
this.itemType = itemType;
}
public double getItemPrice() {
return itemPrice;
}
public void setItemPrice(double itemPrice) {
this.itemPrice = itemPrice;
}
}
| 1,780 | 0.701685 | 0.699438 | 88 | 19.227272 | 19.211578 | 109 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.181818 | false | false |
3
|
cdca8a152124c39b2bb18df772a7a34361ee69b6
| 4,114,578,678,272 |
b4814bfedb86a4b6c636b2e801e396c1da0f81c7
|
/mil.dod.th.ose.gui.webapp/src/mil/dod/th/ose/gui/webapp/channel/ChannelGuiHelperImpl.java
|
8c54b6ca4c839c914c9e0d9523eb2f1aa8407d5e
|
[
"CC0-1.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
sofwerx/OSUS-R
|
https://github.com/sofwerx/OSUS-R
|
424dec40db77c58c84ed2f077310c097fae3430f
|
2be47821355573149842e1dd0d8bbd75326da8a7
|
refs/heads/master
| 2020-04-09T00:38:55.382000 | 2018-12-10T18:58:29 | 2018-12-10T18:58:29 | 159,875,746 | 0 | 0 |
NOASSERTION
| true | 2018-11-30T20:34:45 | 2018-11-30T20:34:45 | 2018-09-28T12:28:07 | 2018-09-28T12:27:58 | 214,113 | 0 | 0 | 0 | null | false | null |
//==============================================================================
// This software is part of the Open Standard for Unattended Sensors (OSUS)
// reference implementation (OSUS-R).
//
// To the extent possible under law, the author(s) have dedicated all copyright
// and related and neighboring rights to this software to the public domain
// worldwide. This software is distributed without any warranty.
//
// You should have received a copy of the CC0 Public Domain Dedication along
// with this software. If not, see
// <http://creativecommons.org/publicdomain/zero/1.0/>.
//==============================================================================
package mil.dod.th.ose.gui.webapp.channel;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
/**
* Implementation of {@link ChannelGuiHelper}.
*
* @author nickmarcucci
*
*/
@ManagedBean(name = "channelGuiHelper")
@SessionScoped
public class ChannelGuiHelperImpl implements ChannelGuiHelper
{
/**
* Variable which holds the status of the radio button choice
* to display channels either by channel type or controller.
*/
private ControllerOption m_RenderOption;
/**
* Constructor.
*/
public ChannelGuiHelperImpl()
{
m_RenderOption = ControllerOption.CHANNEL;
}
/* (non-Javadoc)
* @see mil.dod.th.ose.gui.webapp.channel.ChannelGuiHelper#getRenderOption()
*/
@Override
public ControllerOption getRenderOption()
{
return m_RenderOption;
}
/* (non-Javadoc)
* @see mil.dod.th.ose.gui.webapp.channel.ChannelGuiHelper#setRenderOption
* (mil.dod.th.ose.gui.webapp.channel.ChannelGuiHelper.ControllerOption)
*/
@Override
public void setRenderOption(final ControllerOption option)
{
m_RenderOption = option;
}
}
|
UTF-8
|
Java
| 1,857 |
java
|
ChannelGuiHelperImpl.java
|
Java
|
[
{
"context": "tation of {@link ChannelGuiHelper}.\n * \n * @author nickmarcucci\n *\n */\n@ManagedBean(name = \"channelGuiHelper\")\n@S",
"end": 870,
"score": 0.9900774955749512,
"start": 858,
"tag": "USERNAME",
"value": "nickmarcucci"
}
] | null |
[] |
//==============================================================================
// This software is part of the Open Standard for Unattended Sensors (OSUS)
// reference implementation (OSUS-R).
//
// To the extent possible under law, the author(s) have dedicated all copyright
// and related and neighboring rights to this software to the public domain
// worldwide. This software is distributed without any warranty.
//
// You should have received a copy of the CC0 Public Domain Dedication along
// with this software. If not, see
// <http://creativecommons.org/publicdomain/zero/1.0/>.
//==============================================================================
package mil.dod.th.ose.gui.webapp.channel;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
/**
* Implementation of {@link ChannelGuiHelper}.
*
* @author nickmarcucci
*
*/
@ManagedBean(name = "channelGuiHelper")
@SessionScoped
public class ChannelGuiHelperImpl implements ChannelGuiHelper
{
/**
* Variable which holds the status of the radio button choice
* to display channels either by channel type or controller.
*/
private ControllerOption m_RenderOption;
/**
* Constructor.
*/
public ChannelGuiHelperImpl()
{
m_RenderOption = ControllerOption.CHANNEL;
}
/* (non-Javadoc)
* @see mil.dod.th.ose.gui.webapp.channel.ChannelGuiHelper#getRenderOption()
*/
@Override
public ControllerOption getRenderOption()
{
return m_RenderOption;
}
/* (non-Javadoc)
* @see mil.dod.th.ose.gui.webapp.channel.ChannelGuiHelper#setRenderOption
* (mil.dod.th.ose.gui.webapp.channel.ChannelGuiHelper.ControllerOption)
*/
@Override
public void setRenderOption(final ControllerOption option)
{
m_RenderOption = option;
}
}
| 1,857 | 0.640819 | 0.639203 | 62 | 28.951612 | 27.89579 | 80 | false | false | 0 | 0 | 0 | 0 | 89 | 0.092623 | 0.145161 | false | false |
3
|
69449f998749f131c8cc6ed8f33e0218792cdeea
| 9,440,338,163,258 |
99bb802ae1b814b17b0e205798ffc62d8359e0ff
|
/src/main/java/ua/rd/ioc/NoSuchBeanException.java
|
19e5ab2f44678acaeb86b2daad545e946bb288bd
|
[] |
no_license
|
Solomka/customSpringFramework
|
https://github.com/Solomka/customSpringFramework
|
7bc17dcaa4db8b77ee0aee7c0958da9c1f9fcaa7
|
a1c97262a3d79f527195da3ad031ada57dffcecb
|
refs/heads/master
| 2021-07-22T23:42:02.818000 | 2017-11-01T09:02:03 | 2017-11-01T09:02:03 | 102,964,630 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package ua.rd.ioc;
public class NoSuchBeanException extends RuntimeException {
/**
*
*/
private static final long serialVersionUID = 1L;
public NoSuchBeanException() {
super("NoSuchBean");
}
}
|
UTF-8
|
Java
| 218 |
java
|
NoSuchBeanException.java
|
Java
|
[] | null |
[] |
package ua.rd.ioc;
public class NoSuchBeanException extends RuntimeException {
/**
*
*/
private static final long serialVersionUID = 1L;
public NoSuchBeanException() {
super("NoSuchBean");
}
}
| 218 | 0.674312 | 0.669725 | 12 | 16.166666 | 19.50997 | 59 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.916667 | false | false |
3
|
426d5a88309ab9c2d62214757ad8147b58abc2a7
| 18,184,891,590,771 |
c9fed2708a61d32cfd9801d835d6e1003144b4fc
|
/baseProject-controller-http-rest/src/main/java/com/eolivenza/modules/baseProject/controller/http/rest/resources/ConfigurationResource.java
|
c20008448a72b1cbe0c252482cebb65f591ac5f7
|
[] |
no_license
|
eduardolivenza/baseProject
|
https://github.com/eduardolivenza/baseProject
|
c4dea17a18e1a0282795e191693a30143c04ef13
|
9813f2b366693ed409dd7d1bd843759afa18b080
|
refs/heads/master
| 2022-12-08T01:05:00.519000 | 2019-07-09T20:33:28 | 2019-07-09T20:33:28 | 163,580,023 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.eolivenza.modules.baseProject.controller.http.rest.resources;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ApiModel(value = "Configuration", description = "Text for describing the configuration")
public class ConfigurationResource {
@ApiModelProperty(value = "UUID", example = "cce8a203-e594-4c18-96bb-cc21eb2ab773", readOnly = true)
public String uuid;
@ApiModelProperty(required = true, value = "Relates to the highest level customer identification. The CustomerID value can come from a global SAP, customer master record, local identifier", example = "Bayley")
public String clientIdentifier;
@ApiModelProperty(required = true, value = "The path on the filesystem where to generate the report file. It must exists.", example = "d:")
public String exportPath;
@ApiModelProperty(required = true, value = "Unique identifier related to the sales organization or the country affiliate", example = "34")
public String countryIdentifier;
@ApiModelProperty(required = true, value = "An integer that identifies the demographic", example = "8")
public int demographicIdentifier;
@ApiModelProperty(required = true, value = "It indicates if the export is automatic.", example = "true")
public boolean automaticExportEnabled;
@ApiModelProperty(required = true, value = "It indicates the time of day the report is executed.", example = "23:59")
public String localExecutionTime;
@ApiModelProperty(required = true, value = "It indicates the report frequency.", example = "WEEKLY")
public String reportFrequency;
@ApiModelProperty(required = true, value = "It indicates the day of the week.", example = "MONDAY")
public String dayOfWeek;
@ApiModelProperty(required = true, value = "It indicates the day of the month that a report is generated on.", example = "null")
public Integer monthDay;
public ConfigurationResource() {
}
public ConfigurationResource(String uuid, String clientIdentifier, String exportPath, String countryIdentifier, int demographicIdentifier, boolean automaticExportEnabled, String localExecutionTime, String reportFrequency, String dayOfWeek, Integer monthDay) {
this.uuid = uuid;
this.localExecutionTime = localExecutionTime;
this.automaticExportEnabled = automaticExportEnabled;
this.clientIdentifier = clientIdentifier;
this.exportPath = exportPath;
this.countryIdentifier = countryIdentifier;
this.demographicIdentifier = demographicIdentifier;
this.reportFrequency = reportFrequency;
this.dayOfWeek = dayOfWeek;
this.monthDay = monthDay;
}
}
|
UTF-8
|
Java
| 2,704 |
java
|
ConfigurationResource.java
|
Java
|
[] | null |
[] |
package com.eolivenza.modules.baseProject.controller.http.rest.resources;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
@ApiModel(value = "Configuration", description = "Text for describing the configuration")
public class ConfigurationResource {
@ApiModelProperty(value = "UUID", example = "cce8a203-e594-4c18-96bb-cc21eb2ab773", readOnly = true)
public String uuid;
@ApiModelProperty(required = true, value = "Relates to the highest level customer identification. The CustomerID value can come from a global SAP, customer master record, local identifier", example = "Bayley")
public String clientIdentifier;
@ApiModelProperty(required = true, value = "The path on the filesystem where to generate the report file. It must exists.", example = "d:")
public String exportPath;
@ApiModelProperty(required = true, value = "Unique identifier related to the sales organization or the country affiliate", example = "34")
public String countryIdentifier;
@ApiModelProperty(required = true, value = "An integer that identifies the demographic", example = "8")
public int demographicIdentifier;
@ApiModelProperty(required = true, value = "It indicates if the export is automatic.", example = "true")
public boolean automaticExportEnabled;
@ApiModelProperty(required = true, value = "It indicates the time of day the report is executed.", example = "23:59")
public String localExecutionTime;
@ApiModelProperty(required = true, value = "It indicates the report frequency.", example = "WEEKLY")
public String reportFrequency;
@ApiModelProperty(required = true, value = "It indicates the day of the week.", example = "MONDAY")
public String dayOfWeek;
@ApiModelProperty(required = true, value = "It indicates the day of the month that a report is generated on.", example = "null")
public Integer monthDay;
public ConfigurationResource() {
}
public ConfigurationResource(String uuid, String clientIdentifier, String exportPath, String countryIdentifier, int demographicIdentifier, boolean automaticExportEnabled, String localExecutionTime, String reportFrequency, String dayOfWeek, Integer monthDay) {
this.uuid = uuid;
this.localExecutionTime = localExecutionTime;
this.automaticExportEnabled = automaticExportEnabled;
this.clientIdentifier = clientIdentifier;
this.exportPath = exportPath;
this.countryIdentifier = countryIdentifier;
this.demographicIdentifier = demographicIdentifier;
this.reportFrequency = reportFrequency;
this.dayOfWeek = dayOfWeek;
this.monthDay = monthDay;
}
}
| 2,704 | 0.743343 | 0.734098 | 54 | 49.074074 | 55.242512 | 263 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.018519 | false | false |
3
|
09d4f0d75174eff0f3cd32cf29100b8bea3e65d2
| 34,325,378,670,000 |
6f053d37e13a2ef452ea59d67084c4fe6a58dd7f
|
/src/main/java/com/change/service/UmsRoleService.java
|
eef2d1f75c2010c599091ac89174a0b986ff4564
|
[] |
no_license
|
a736875071/spring-boot-mall
|
https://github.com/a736875071/spring-boot-mall
|
357244f77b73bfee9c79c4e6df46cb32ea0e19cc
|
49b75f3e1b9704fd1485ed022d1ff3cd55340b7f
|
refs/heads/master
| 2022-06-28T22:39:42.141000 | 2020-03-31T07:53:17 | 2020-03-31T07:53:17 | 248,471,142 | 0 | 0 | null | false | 2022-06-21T03:01:17 | 2020-03-19T10:15:07 | 2020-03-31T07:53:55 | 2022-06-21T03:01:17 | 4,485 | 0 | 0 | 2 |
Java
| false | false |
package com.change.service;
import com.change.model.ums.UmsRole;
import com.change.dto.UmsRoleCondition;
import java.util.List;
/**
* @author YangQ
* @date 2020/3/20 11:54
*/
public interface UmsRoleService {
/**
* 查询角色列表
*
* @param condition
* @return 结果
*/
List<UmsRole> getRoleList(UmsRoleCondition condition);
/**
* 创建角色
*
* @param umsRole
* @return
*/
Boolean createRole(UmsRole umsRole);
/**
* 修改角色
*
* @param umsRole
* @return
*/
Boolean updateRoleById(UmsRole umsRole);
/**
* 删除角色
*
* @param id
* @return
*/
Boolean deleteRoleById(Long id);
}
|
UTF-8
|
Java
| 733 |
java
|
UmsRoleService.java
|
Java
|
[
{
"context": "Condition;\n\nimport java.util.List;\n\n/**\n * @author YangQ\n * @date 2020/3/20 11:54\n */\npublic interface Ums",
"end": 151,
"score": 0.9993330836296082,
"start": 146,
"tag": "USERNAME",
"value": "YangQ"
}
] | null |
[] |
package com.change.service;
import com.change.model.ums.UmsRole;
import com.change.dto.UmsRoleCondition;
import java.util.List;
/**
* @author YangQ
* @date 2020/3/20 11:54
*/
public interface UmsRoleService {
/**
* 查询角色列表
*
* @param condition
* @return 结果
*/
List<UmsRole> getRoleList(UmsRoleCondition condition);
/**
* 创建角色
*
* @param umsRole
* @return
*/
Boolean createRole(UmsRole umsRole);
/**
* 修改角色
*
* @param umsRole
* @return
*/
Boolean updateRoleById(UmsRole umsRole);
/**
* 删除角色
*
* @param id
* @return
*/
Boolean deleteRoleById(Long id);
}
| 733 | 0.561328 | 0.545455 | 45 | 14.4 | 13.700608 | 58 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.177778 | false | false |
3
|
a636d50d33c670f0a44c36fedf9fce64d181c449
| 35,201,552,008,867 |
e4b9671d03cf81d97c1017a71bc8baee4f959806
|
/src/com/codebag/code/mycode/view/anim/pathanim/Chain.java
|
3ac910daa892bbc21a64031abcb8474d4e66ba31
|
[] |
no_license
|
jeffreylyg/CodeBag
|
https://github.com/jeffreylyg/CodeBag
|
7e87e8abb84feebb9c337a8e1ba1195222560149
|
1ee27b0176b5837489e0b5b76eb4c26a3952cf22
|
refs/heads/master
| 2021-01-18T00:00:24.015000 | 2015-05-29T09:29:02 | 2015-05-29T09:29:02 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.codebag.code.mycode.view.anim.pathanim;
import com.nineoldandroids.animation.ValueAnimator;
import com.nineoldandroids.animation.ValueAnimator.AnimatorUpdateListener;
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.Log;
import android.view.View;
public class Chain extends View implements AnimatorUpdateListener{
RectF ovalUp = new RectF();
RectF ovalDown = new RectF();
Paint paint = new Paint();
Path path = new Path();
RectF rect = new RectF();
// int width = 36;
// int height = 111;
// int strokeW = 10;
int width = 40;
int height = 111;
int strokeW = 10;
int bottom = 0;
public Chain(Context context) {
super(context);
ovalUp.set(strokeW /2, strokeW /2, width - strokeW /2, height / 2 - strokeW / 2);
ovalDown.set(strokeW /2, strokeW /2 + height / 2, width - strokeW / 2, height - strokeW / 2);
rect.set(width / 2, height / 4, width / 2, height / 4 + height/2);
paint.setStrokeCap(Paint.Cap.ROUND);
paint.setAntiAlias(true);
paint.setStrokeWidth(10);
paint.setStyle(Paint.Style.STROKE);
paint.setColor(Color.WHITE);
// path.addArc(ovalUp, 120, 300);
// path.addArc(ovalDown, -60, 300);
}
@Override
protected void onDraw(Canvas canvas) {
canvas.drawPath(path, paint);
canvas.drawLine(width / 2, height / 4, width / 2, height / 4 + bottom, paint);
}
@Override
public void onAnimationUpdate(ValueAnimator arg0) {
int angle = (Integer) arg0.getAnimatedValue();
if(angle <= 300) {
path.addArc(ovalUp, 120, angle);
}else if(angle <= 600) {
path.addArc(ovalDown, 240 - (angle - 300), angle - 300);
Log.i("peter", "circle angle =" + angle);
}else if(angle <= 900) {
bottom = height / 2 * (angle - 600) / 300;
}
invalidate();
}
}
|
UTF-8
|
Java
| 1,894 |
java
|
Chain.java
|
Java
|
[
{
"context": " 240 - (angle - 300), angle - 300);\n\t\t\t\n\t\t\tLog.i(\"peter\", \"circle angle =\" + angle);\n\t\t}else if(angle <= ",
"end": 1758,
"score": 0.6324008703231812,
"start": 1753,
"tag": "USERNAME",
"value": "peter"
}
] | null |
[] |
package com.codebag.code.mycode.view.anim.pathanim;
import com.nineoldandroids.animation.ValueAnimator;
import com.nineoldandroids.animation.ValueAnimator.AnimatorUpdateListener;
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.Log;
import android.view.View;
public class Chain extends View implements AnimatorUpdateListener{
RectF ovalUp = new RectF();
RectF ovalDown = new RectF();
Paint paint = new Paint();
Path path = new Path();
RectF rect = new RectF();
// int width = 36;
// int height = 111;
// int strokeW = 10;
int width = 40;
int height = 111;
int strokeW = 10;
int bottom = 0;
public Chain(Context context) {
super(context);
ovalUp.set(strokeW /2, strokeW /2, width - strokeW /2, height / 2 - strokeW / 2);
ovalDown.set(strokeW /2, strokeW /2 + height / 2, width - strokeW / 2, height - strokeW / 2);
rect.set(width / 2, height / 4, width / 2, height / 4 + height/2);
paint.setStrokeCap(Paint.Cap.ROUND);
paint.setAntiAlias(true);
paint.setStrokeWidth(10);
paint.setStyle(Paint.Style.STROKE);
paint.setColor(Color.WHITE);
// path.addArc(ovalUp, 120, 300);
// path.addArc(ovalDown, -60, 300);
}
@Override
protected void onDraw(Canvas canvas) {
canvas.drawPath(path, paint);
canvas.drawLine(width / 2, height / 4, width / 2, height / 4 + bottom, paint);
}
@Override
public void onAnimationUpdate(ValueAnimator arg0) {
int angle = (Integer) arg0.getAnimatedValue();
if(angle <= 300) {
path.addArc(ovalUp, 120, angle);
}else if(angle <= 600) {
path.addArc(ovalDown, 240 - (angle - 300), angle - 300);
Log.i("peter", "circle angle =" + angle);
}else if(angle <= 900) {
bottom = height / 2 * (angle - 600) / 300;
}
invalidate();
}
}
| 1,894 | 0.686378 | 0.645723 | 71 | 25.676056 | 22.32082 | 95 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 2.084507 | false | false |
3
|
e5cf8fe30658dc0445e8fd859431a8556a86a26b
| 39,032,662,802,020 |
81cd7100d5b0929c11b735b9426eb488ea5b0cc6
|
/src/main/java/vn/framgia/model/Tag.java
|
2cb782f5441f392516a6828a03fd4efdf76367d3
|
[] |
no_license
|
awesome-academy/fenglish
|
https://github.com/awesome-academy/fenglish
|
5f05c3b7d4c066aa070290ee12ddafd4622fba1b
|
0cd2f24087bb3e3934fde6d68f24d4d7e6f37499
|
refs/heads/develop
| 2020-04-09T06:41:50.070000 | 2019-01-16T06:40:12 | 2019-01-16T06:40:12 | 160,123,569 | 0 | 5 | null | false | 2019-01-16T06:40:13 | 2018-12-03T02:52:29 | 2019-01-16T06:11:48 | 2019-01-16T06:40:13 | 43,819 | 0 | 2 | 1 |
CSS
| false | null |
package vn.framgia.model;
// Generated Dec 7, 2018 9:59:06 AM by Hibernate Tools 5.3.6.Final
import java.util.ArrayList;
import java.util.List;
/**
* Tags generated by hbm2java
*/
public class Tag implements java.io.Serializable {
private Integer id;
private String tagName;
private String status;
private List<PostTag> postTags = new ArrayList<PostTag>();
public Tag() {
}
public Tag(String tagName, String status, List<PostTag> postTags) {
this.tagName = tagName;
this.status = status;
this.postTags = postTags;
}
public Integer getId() {
return this.id;
}
public void setId(Integer id) {
this.id = id;
}
public String getTagName() {
return this.tagName;
}
public void setTagName(String tagName) {
this.tagName = tagName;
}
public String getStatus() {
return this.status;
}
public void setStatus(String status) {
this.status = status;
}
public List<PostTag> getPostTags() {
return this.postTags;
}
public void setPostTags(List<PostTag> postTags) {
this.postTags = postTags;
}
}
|
UTF-8
|
Java
| 1,042 |
java
|
Tag.java
|
Java
|
[] | null |
[] |
package vn.framgia.model;
// Generated Dec 7, 2018 9:59:06 AM by Hibernate Tools 5.3.6.Final
import java.util.ArrayList;
import java.util.List;
/**
* Tags generated by hbm2java
*/
public class Tag implements java.io.Serializable {
private Integer id;
private String tagName;
private String status;
private List<PostTag> postTags = new ArrayList<PostTag>();
public Tag() {
}
public Tag(String tagName, String status, List<PostTag> postTags) {
this.tagName = tagName;
this.status = status;
this.postTags = postTags;
}
public Integer getId() {
return this.id;
}
public void setId(Integer id) {
this.id = id;
}
public String getTagName() {
return this.tagName;
}
public void setTagName(String tagName) {
this.tagName = tagName;
}
public String getStatus() {
return this.status;
}
public void setStatus(String status) {
this.status = status;
}
public List<PostTag> getPostTags() {
return this.postTags;
}
public void setPostTags(List<PostTag> postTags) {
this.postTags = postTags;
}
}
| 1,042 | 0.703455 | 0.690019 | 58 | 16.965517 | 18.0105 | 68 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.155172 | false | false |
3
|
905f66a20be75767b6eabe8891e50a3e34ed9f00
| 13,030,930,792,942 |
e6c4ae85756c8dc852ce71294ac754d5eeacecdc
|
/src/org/jba/ui/Applet.java
|
afda8c297bb91b1e7b42b0bd8491222de33cf526
|
[] |
no_license
|
mpetrov/JBA
|
https://github.com/mpetrov/JBA
|
9b81949a1fdc9f6a3dab9bb858557654a30dfcc9
|
50b0eeb5abe13da1c5bebe02088cc16994eaf874
|
refs/heads/master
| 2016-08-05T08:12:09.325000 | 2010-09-01T21:38:50 | 2010-09-01T21:38:50 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
/*-
* Copyright 2010 Martin Petrov. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY MARTIN PETROV ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MARTIN PETROV OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of Martin Petrov.
*/
package org.jba.ui;
import javax.swing.*;
import org.jba.JBA;
import org.jba.memory.SegmentationFault;
public class Applet extends JApplet {
private static final long serialVersionUID = -6718279959870260249L;
private JBA jba;
public void stop() {
jba.stop();
}
public void start() {
jba.run();
}
public void init() {
try {
jba = new JBA(getParameter("rom"));
final Display display = new Display(jba);
getContentPane().add(display);
setVisible(true);
} catch (SegmentationFault f) {
getContentPane().removeAll();
getContentPane().add(new JLabel(f.getMessage()));
f.printStackTrace();
}
}
}
|
UTF-8
|
Java
| 2,169 |
java
|
Applet.java
|
Java
|
[
{
"context": "/*-\n* Copyright 2010 Martin Petrov. All rights reserved.\n*\n* Redistribution and use ",
"end": 34,
"score": 0.999629020690918,
"start": 21,
"tag": "NAME",
"value": "Martin Petrov"
},
{
"context": "the distribution.\n*\n* THIS SOFTWARE IS PROVIDED BY MARTIN PETROV ``AS IS'' AND ANY EXPRESS OR IMPLIED\n* WARRANTIES",
"end": 615,
"score": 0.9882479310035706,
"start": 602,
"tag": "NAME",
"value": "MARTIN PETROV"
},
{
"context": "RTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL MARTIN PETROV OR\n* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIR",
"end": 826,
"score": 0.9875522255897522,
"start": 813,
"tag": "NAME",
"value": "MARTIN PETROV"
},
{
"context": "ficial policies, either expressed\n* or implied, of Martin Petrov.\n*/\n\npackage org.jba.ui;\n\nimport javax.swing.*;\n\n",
"end": 1528,
"score": 0.9906737804412842,
"start": 1515,
"tag": "NAME",
"value": "Martin Petrov"
}
] | null |
[] |
/*-
* Copyright 2010 <NAME>. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY <NAME> ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL <NAME> OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of <NAME>.
*/
package org.jba.ui;
import javax.swing.*;
import org.jba.JBA;
import org.jba.memory.SegmentationFault;
public class Applet extends JApplet {
private static final long serialVersionUID = -6718279959870260249L;
private JBA jba;
public void stop() {
jba.stop();
}
public void start() {
jba.run();
}
public void init() {
try {
jba = new JBA(getParameter("rom"));
final Display display = new Display(jba);
getContentPane().add(display);
setVisible(true);
} catch (SegmentationFault f) {
getContentPane().removeAll();
getContentPane().add(new JLabel(f.getMessage()));
f.printStackTrace();
}
}
}
| 2,141 | 0.753343 | 0.741817 | 59 | 35.762711 | 33.53083 | 93 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.322034 | false | false |
3
|
2fd07016c4a1228cc970f6835c3aecd64c79beaa
| 19,713,899,908,454 |
f4400640776a892f452f5d1cdc1c1b65ea706909
|
/src/main/java/de/yogularm/minecraft/itemfinder/region/World.java
|
508ccae24242aa042fdc4e9b8551f07cdaa58e15
|
[
"Apache-2.0"
] |
permissive
|
Prizmagnetic/itemfinder
|
https://github.com/Prizmagnetic/itemfinder
|
3f624287af0cd356997968e0ca31e9a5172b371f
|
939413f927a7c423f6272b31b595757617ffdfeb
|
refs/heads/master
| 2020-11-29T18:45:08.028000 | 2019-12-26T04:08:39 | 2019-12-26T04:08:39 | 230,192,695 | 1 | 0 |
Apache-2.0
| true | 2019-12-26T04:07:42 | 2019-12-26T04:07:41 | 2019-03-02T20:47:21 | 2015-07-26T20:15:24 | 476 | 0 | 0 | 0 | null | false | false |
package de.yogularm.minecraft.itemfinder.region;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
import com.google.common.collect.ImmutableList;
/**
* Represents the terrain of one minecraft world
*/
public class World {
private List<Dimension> dimensions = ImmutableList.of();
private LevelInfo forgeData;
private Path path;
private String gameDirName;
private boolean isLoaded;
public World(Path path, String gameDirName) {
this.path = path;
this.gameDirName = gameDirName;
}
public void load(ProgressListener progressListener) throws IOException,
InterruptedException {
forgeData = new LevelInfo(path.resolve("level.dat"));
ImmutableList.Builder<Dimension> builder = new ImmutableList.Builder<>();
tryAddDimension(builder, "Overworld", path);
tryAddDimension(builder, "Nether", path.resolve("DIM-1"));
tryAddDimension(builder, "End", path.resolve("DIM1"));
dimensions = builder.build();
// load actual data
ProgressReporter progressReporter = new ProgressReporter(progressListener);
for (Dimension dimension : dimensions) {
progressReporter.onAction("Loading " + dimension.getName() + "...");
ProgressListener subListener = progressReporter.startSubtask(1.0 / dimensions.size());
dimension.loadRegions(subListener);
progressReporter.incProgress(1.0 / dimensions.size());
}
isLoaded = true;
}
public boolean isLoaded() {
return isLoaded;
}
private void tryAddDimension(ImmutableList.Builder<Dimension> list, String name, Path path) {
Path regionPath = path.resolve("region");
if (Files.isDirectory(regionPath))
list.add(new Dimension(regionPath, forgeData, name));
}
public List<Dimension> getDimensions() {
return dimensions;
}
public String getWorldName() {
return path.getFileName().toString();
}
public String getGameDirName() {
return gameDirName;
}
public String getDisplayName() {
return getWorldName() + (gameDirName.length() > 0 ? " (" + getGameDirName() + ")" : "");
}
@Override
public String toString() {
return getDisplayName();
}
}
|
UTF-8
|
Java
| 2,112 |
java
|
World.java
|
Java
|
[] | null |
[] |
package de.yogularm.minecraft.itemfinder.region;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
import com.google.common.collect.ImmutableList;
/**
* Represents the terrain of one minecraft world
*/
public class World {
private List<Dimension> dimensions = ImmutableList.of();
private LevelInfo forgeData;
private Path path;
private String gameDirName;
private boolean isLoaded;
public World(Path path, String gameDirName) {
this.path = path;
this.gameDirName = gameDirName;
}
public void load(ProgressListener progressListener) throws IOException,
InterruptedException {
forgeData = new LevelInfo(path.resolve("level.dat"));
ImmutableList.Builder<Dimension> builder = new ImmutableList.Builder<>();
tryAddDimension(builder, "Overworld", path);
tryAddDimension(builder, "Nether", path.resolve("DIM-1"));
tryAddDimension(builder, "End", path.resolve("DIM1"));
dimensions = builder.build();
// load actual data
ProgressReporter progressReporter = new ProgressReporter(progressListener);
for (Dimension dimension : dimensions) {
progressReporter.onAction("Loading " + dimension.getName() + "...");
ProgressListener subListener = progressReporter.startSubtask(1.0 / dimensions.size());
dimension.loadRegions(subListener);
progressReporter.incProgress(1.0 / dimensions.size());
}
isLoaded = true;
}
public boolean isLoaded() {
return isLoaded;
}
private void tryAddDimension(ImmutableList.Builder<Dimension> list, String name, Path path) {
Path regionPath = path.resolve("region");
if (Files.isDirectory(regionPath))
list.add(new Dimension(regionPath, forgeData, name));
}
public List<Dimension> getDimensions() {
return dimensions;
}
public String getWorldName() {
return path.getFileName().toString();
}
public String getGameDirName() {
return gameDirName;
}
public String getDisplayName() {
return getWorldName() + (gameDirName.length() > 0 ? " (" + getGameDirName() + ")" : "");
}
@Override
public String toString() {
return getDisplayName();
}
}
| 2,112 | 0.732008 | 0.728693 | 77 | 26.428572 | 25.226469 | 94 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.753247 | false | false |
3
|
360950473744564a6b8917cb6f17e1980da99dd2
| 30,657,476,573,917 |
60f6232def2e73588d1479f7f69deb6b0fd7805a
|
/src/main/java/com/yess/yessdemo/controllers/DepartmentsController.java
|
86e317af93b19e75bf24fcd356d2663d13edba06
|
[] |
no_license
|
MARKIDEV/Spring-Boot-CRUD-App-JPA-Hibernate-bidirectional-Mapping
|
https://github.com/MARKIDEV/Spring-Boot-CRUD-App-JPA-Hibernate-bidirectional-Mapping
|
7816ccd7967c9cb209ddef9fbcb26baf89688f89
|
f87ad70ac52be651cbddda344a10ca84f4dcbf09
|
refs/heads/master
| 2022-07-01T07:59:32.648000 | 2022-06-18T10:00:19 | 2022-06-18T10:00:19 | 238,291,274 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.yess.yessdemo.controllers;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.yess.yessdemo.models.Department;
import com.yess.yessdemo.repositories.DepartmentRepository;
@RestController
@RequestMapping ("/api")
public class DepartmentsController {
@Autowired
private DepartmentRepository departmentRepository;
@GetMapping("/departments")
public List<Department> departments() {
return departmentRepository.findAll();
}
@GetMapping(path = { "/departments/{id}" })
public Department getOne(@PathVariable (name="id") long id)
{
return departmentRepository.findById(id).get();
}
@PostMapping(path = { "/departments/add" })
public Department save(@RequestBody Department department) {
return departmentRepository.save(department);
}
@PutMapping(path = "/departments/{id}")
public Department update(@PathVariable(name="id") long id, @RequestBody Department department) {
department.setId(id);
return departmentRepository.save(department);
}
@DeleteMapping(path = { "/departments/{id}" })
public void delete(@PathVariable(name="id") long id) {
departmentRepository.deleteById(id);
}}
|
UTF-8
|
Java
| 1,722 |
java
|
DepartmentsController.java
|
Java
|
[] | null |
[] |
package com.yess.yessdemo.controllers;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.yess.yessdemo.models.Department;
import com.yess.yessdemo.repositories.DepartmentRepository;
@RestController
@RequestMapping ("/api")
public class DepartmentsController {
@Autowired
private DepartmentRepository departmentRepository;
@GetMapping("/departments")
public List<Department> departments() {
return departmentRepository.findAll();
}
@GetMapping(path = { "/departments/{id}" })
public Department getOne(@PathVariable (name="id") long id)
{
return departmentRepository.findById(id).get();
}
@PostMapping(path = { "/departments/add" })
public Department save(@RequestBody Department department) {
return departmentRepository.save(department);
}
@PutMapping(path = "/departments/{id}")
public Department update(@PathVariable(name="id") long id, @RequestBody Department department) {
department.setId(id);
return departmentRepository.save(department);
}
@DeleteMapping(path = { "/departments/{id}" })
public void delete(@PathVariable(name="id") long id) {
departmentRepository.deleteById(id);
}}
| 1,722 | 0.765389 | 0.765389 | 53 | 30.490566 | 25.916136 | 97 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 1.018868 | false | false |
3
|
0078784d9506cd40c13f2a59afd8bf7094777eba
| 31,954,556,696,493 |
7d4192b553d7c5504169be1a94516f68a766b1d0
|
/bluebutton-data-pipeline-ccw/src/main/java/gov/hhs/cms/bluebutton/datapipeline/ccw/schema/package-info.java
|
ce5e7c0d0b5409c7ead8659280c02774bca18097
|
[
"CC0-1.0",
"LicenseRef-scancode-public-domain"
] |
permissive
|
doomdspacemarine/bluebutton-data-pipeline
|
https://github.com/doomdspacemarine/bluebutton-data-pipeline
|
1ac65bf28027150e2330db48e412958a8cd78295
|
bc3a52988554a9db109f214d3f7198d8e108e2a7
|
refs/heads/master
| 2021-01-17T22:48:11.800000 | 2016-06-28T02:11:18 | 2016-06-28T02:11:18 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
/**
* Contains utilities related to the CCW database schema.
*/
package gov.hhs.cms.bluebutton.datapipeline.ccw.schema;
|
UTF-8
|
Java
| 121 |
java
|
package-info.java
|
Java
|
[] | null |
[] |
/**
* Contains utilities related to the CCW database schema.
*/
package gov.hhs.cms.bluebutton.datapipeline.ccw.schema;
| 121 | 0.768595 | 0.768595 | 4 | 29.5 | 26.509432 | 57 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.25 | false | false |
3
|
58faa7defff694f461b5c645e329d0c7477ea77a
| 7,395,933,704,217 |
8c14ee00695a7b95cb3a9151b36fe9b778792d3b
|
/src-lib/no/npolar/common/forms/A_InputTypeSingleSelect.java
|
91cdab3b039924c30e77a930a020c4fda6be897d
|
[
"MIT"
] |
permissive
|
paulflakstad/opencms-module-forms
|
https://github.com/paulflakstad/opencms-module-forms
|
cb77f5d2e119c16d1d29716dc1eb54ef59499226
|
68f6fb019da45da97ce885ef0e5d4c62531a5bbb
|
refs/heads/master
| 2021-01-20T17:46:42.151000 | 2017-04-19T08:46:43 | 2017-04-19T08:46:43 | 68,283,746 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package no.npolar.common.forms;
import java.util.Iterator;
/**
* Base class for form input types that are enabled for only single selection
* from a range of pre-defined values.
*
* @author Paul-Inge Flakstad, Norwegian Polar Institute
*/
public abstract class A_InputTypeSingleSelect extends A_InputTypePreDefined {
/**
* @see I_FormInputElement#submit(java.lang.String[])
*/
@Override
public void submit(String[] values) {
this.submission = null;
if (values.length > 1) {
this.hasValidSubmit = false; // Ambiguous submit (too many values, should be only one).
//this.error = "Too many values submitted.";
this.error = Messages.get().container(Messages.ERR_TOO_MANY_VALUES_0).key(this.getContainingForm().getLocale());
}
else if (values.length != 1) {
this.hasValidSubmit = false; // No value
//this.error = "No value submitted.";
this.error = Messages.get().container(Messages.ERR_NO_VALUE_0).key(this.getContainingForm().getLocale());
}
else if (this.required && values[0].trim().length() == 0) {
this.hasValidSubmit = false; // Field is required, but value is missing (or only whitespace)
//this.error = "This is a required field. Please select one of the options.";
this.error = Messages.get().container(Messages.ERR_REQUIRED_FIELD_MISSING_0).key(this.getContainingForm().getLocale());
}
else if (values[0].trim().length() > getMaxLength()) {
this.hasValidSubmit = false;
this.error = Messages.get().container(Messages.ERR_VALUE_TOO_LONG_1, String.valueOf(getMaxLength())).key(this.getContainingForm().getLocale());
}
else {
this.submission = values;
// Iterate over all options and update "selected"
Iterator i = options.iterator();
Option option = null;
while (i.hasNext()) {
option = (Option)i.next();
if (option.getValue().equals(values[0])) {
option.setSelected(true);
} else {
option.setSelected(false);
}
}
this.hasValidSubmit = true;
this.error = null;
}
}
}
|
UTF-8
|
Java
| 2,372 |
java
|
A_InputTypeSingleSelect.java
|
Java
|
[
{
"context": "from a range of pre-defined values.\n * \n * @author Paul-Inge Flakstad, Norwegian Polar Institute\n */\npublic abstract cl",
"end": 216,
"score": 0.9998716115951538,
"start": 198,
"tag": "NAME",
"value": "Paul-Inge Flakstad"
}
] | null |
[] |
package no.npolar.common.forms;
import java.util.Iterator;
/**
* Base class for form input types that are enabled for only single selection
* from a range of pre-defined values.
*
* @author <NAME>, Norwegian Polar Institute
*/
public abstract class A_InputTypeSingleSelect extends A_InputTypePreDefined {
/**
* @see I_FormInputElement#submit(java.lang.String[])
*/
@Override
public void submit(String[] values) {
this.submission = null;
if (values.length > 1) {
this.hasValidSubmit = false; // Ambiguous submit (too many values, should be only one).
//this.error = "Too many values submitted.";
this.error = Messages.get().container(Messages.ERR_TOO_MANY_VALUES_0).key(this.getContainingForm().getLocale());
}
else if (values.length != 1) {
this.hasValidSubmit = false; // No value
//this.error = "No value submitted.";
this.error = Messages.get().container(Messages.ERR_NO_VALUE_0).key(this.getContainingForm().getLocale());
}
else if (this.required && values[0].trim().length() == 0) {
this.hasValidSubmit = false; // Field is required, but value is missing (or only whitespace)
//this.error = "This is a required field. Please select one of the options.";
this.error = Messages.get().container(Messages.ERR_REQUIRED_FIELD_MISSING_0).key(this.getContainingForm().getLocale());
}
else if (values[0].trim().length() > getMaxLength()) {
this.hasValidSubmit = false;
this.error = Messages.get().container(Messages.ERR_VALUE_TOO_LONG_1, String.valueOf(getMaxLength())).key(this.getContainingForm().getLocale());
}
else {
this.submission = values;
// Iterate over all options and update "selected"
Iterator i = options.iterator();
Option option = null;
while (i.hasNext()) {
option = (Option)i.next();
if (option.getValue().equals(values[0])) {
option.setSelected(true);
} else {
option.setSelected(false);
}
}
this.hasValidSubmit = true;
this.error = null;
}
}
}
| 2,360 | 0.576729 | 0.572513 | 59 | 39.203388 | 35.930149 | 155 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.440678 | false | false |
3
|
a65743f1a23ad83155c7d62b7eb5754027619c07
| 31,464,930,427,972 |
1bc44a7d9baeb1d14e9291646133c8015343bf51
|
/miniosample/src/main/java/me/aboullaite/minio/MinioSampleApplication.java
|
ddc3966af95ff3d4e09f68245df5c74aed18c83b
|
[] |
no_license
|
Steven1986/minio-starter
|
https://github.com/Steven1986/minio-starter
|
2951cb3b8d8054422b9f901534d7c88ef9758ca7
|
da8ffd7a8cddc4909eedb96f42b4b1c1a111055c
|
refs/heads/master
| 2020-06-18T05:41:42.659000 | 2018-02-19T12:35:15 | 2018-02-19T12:35:15 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package me.aboullaite.minio;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class MinioSampleApplication {
public static void main(String[] args) {
SpringApplication.run(MinioSampleApplication.class, args);
}
}
|
UTF-8
|
Java
| 333 |
java
|
MinioSampleApplication.java
|
Java
|
[] | null |
[] |
package me.aboullaite.minio;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class MinioSampleApplication {
public static void main(String[] args) {
SpringApplication.run(MinioSampleApplication.class, args);
}
}
| 333 | 0.798799 | 0.798799 | 12 | 26.75 | 24.98708 | 68 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.416667 | false | false |
3
|
bb56c3401273b0134283dc7a814ace01cb93e7a0
| 1,571,958,071,223 |
7add8fa524ea6c577645ed97ffd95c0a4851d2a4
|
/src/main/java/br/pro/optimized/dao/AcomodacaoDAO.java
|
3b0ac656bb594b7e97f7b05552a1f6da1785b513
|
[] |
no_license
|
matheusmatos26/optimized
|
https://github.com/matheusmatos26/optimized
|
9e215ca63a417d5cb8b5949a123e300f593a653c
|
219a36c9c9cbdcff49a32f247377dfb1b93ea2c7
|
refs/heads/master
| 2020-05-20T23:53:52.587000 | 2019-05-09T14:57:19 | 2019-05-09T14:57:19 | 185,812,996 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package br.pro.optimized.dao;
import br.pro.optimized.domain.Acomodacao;
public class AcomodacaoDAO extends GenericDAO<Acomodacao> {
}
|
UTF-8
|
Java
| 143 |
java
|
AcomodacaoDAO.java
|
Java
|
[] | null |
[] |
package br.pro.optimized.dao;
import br.pro.optimized.domain.Acomodacao;
public class AcomodacaoDAO extends GenericDAO<Acomodacao> {
}
| 143 | 0.776224 | 0.776224 | 12 | 10.916667 | 19.699654 | 59 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.166667 | false | false |
3
|
4cd6bcf34d9d2473e302243371b457627c605408
| 17,540,646,474,444 |
a656552d2ec509d7720e939a99ae41a55dedeefe
|
/src/main/java/com/sajusman/lms/Repositories/AuthorRepository.java
|
53f3131a222c8d083f2a7c02dd4595715bbd9c24
|
[] |
no_license
|
sajusman/LMS
|
https://github.com/sajusman/LMS
|
71377185114814a3ad7fde44d353bb64c6f971f5
|
913a158062129aacc15a854c6de2198bb66c6595
|
refs/heads/main
| 2023-06-19T08:37:00.006000 | 2021-07-23T09:12:03 | 2021-07-23T09:12:03 | 382,057,477 | 1 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.sajusman.lms.Repositories;
import com.sajusman.lms.Models.Author;
import org.springframework.data.repository.CrudRepository;
import java.util.List;
public interface AuthorRepository extends CrudRepository<Author, Long> {
}
|
UTF-8
|
Java
| 238 |
java
|
AuthorRepository.java
|
Java
|
[] | null |
[] |
package com.sajusman.lms.Repositories;
import com.sajusman.lms.Models.Author;
import org.springframework.data.repository.CrudRepository;
import java.util.List;
public interface AuthorRepository extends CrudRepository<Author, Long> {
}
| 238 | 0.827731 | 0.827731 | 10 | 22.9 | 25.839699 | 72 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.5 | false | false |
3
|
827494b0e0a7d4e2eef11ea6b22309e36ea18aa2
| 8,572,754,753,924 |
95c403dccba4e44d44b2dd29a8152edd8ee67634
|
/src/org/jrm/Person.java
|
c8c57aa4ba10f3bd200a0fecea76a449398204d4
|
[] |
no_license
|
jmallas1/Animals
|
https://github.com/jmallas1/Animals
|
43f64581c1bda6bce4fa8eef70fde57b826027d7
|
805d983ae7426097aceaf7b459209eaea27c91f6
|
refs/heads/master
| 2020-03-27T07:51:44.170000 | 2018-08-29T01:04:40 | 2018-08-29T01:04:40 | 146,198,069 | 1 | 0 | null | false | 2018-08-29T01:04:41 | 2018-08-26T16:39:57 | 2018-08-26T18:24:08 | 2018-08-29T01:04:41 | 53 | 0 | 0 | 0 |
Java
| false | null |
package org.jrm;
/**
* Class model for a abstract class Person
* Should probably think about having this be an exception and support
* dual inheritance from two, "parents." (bazinga)
* @author mgreen14
* @version 1.0
*/
public abstract class Person {
private String name;
/**
* Person constructor.
* @param name String representation of name for this person
*/
public Person(String name) {
this.name = name;
}
/**
* Method for returning this name
* @return String representation of the name of a person.
*/
public String getName() {
return name;
}
/**
* Set this persons name
* @param name String representation of the persons name
*/
public void setName(String name) {
this.name = name;
}
}
|
UTF-8
|
Java
| 812 |
java
|
Person.java
|
Java
|
[
{
"context": "eritance from two, \"parents.\" (bazinga)\n * @author mgreen14\n * @version 1.0\n */\npublic abstract class Person ",
"end": 206,
"score": 0.9996448755264282,
"start": 198,
"tag": "USERNAME",
"value": "mgreen14"
}
] | null |
[] |
package org.jrm;
/**
* Class model for a abstract class Person
* Should probably think about having this be an exception and support
* dual inheritance from two, "parents." (bazinga)
* @author mgreen14
* @version 1.0
*/
public abstract class Person {
private String name;
/**
* Person constructor.
* @param name String representation of name for this person
*/
public Person(String name) {
this.name = name;
}
/**
* Method for returning this name
* @return String representation of the name of a person.
*/
public String getName() {
return name;
}
/**
* Set this persons name
* @param name String representation of the persons name
*/
public void setName(String name) {
this.name = name;
}
}
| 812 | 0.62069 | 0.615764 | 38 | 20.394737 | 20.045395 | 70 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.157895 | false | false |
3
|
552daf885acc7e6df7a94305c6dcdcb070aaff0b
| 13,589,276,576,884 |
0f379dd1f2d53e19b7bfae4ab9ffb6844bb59a20
|
/Problem193.java
|
9bb6e51191c55db257e51131acd0cb09b336a33a
|
[] |
no_license
|
jdh104/Project-Euler-Solutions
|
https://github.com/jdh104/Project-Euler-Solutions
|
34f59e8c6aad8aecc311ed259d1e0cacc1ac6588
|
d5ff1090c12080866e053d1f92f4f24b1706c99c
|
refs/heads/master
| 2021-01-10T09:03:09.698000 | 2019-05-22T03:49:29 | 2019-05-22T03:49:29 | 50,816,892 | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
public class Problem193{
|
UTF-8
|
Java
| 25 |
java
|
Problem193.java
|
Java
|
[] | null |
[] |
public class Problem193{
| 25 | 0.84 | 0.72 | 1 | 24 | 0 | 24 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0 | false | false |
3
|
4058c022f67567f9b038bf4a52e6fdab3e74cc9a
| 2,130,303,833,294 |
bafad2a590af37150e34c25c21d4a586bbe1c386
|
/src/main/java/com/xinrui/component/AuthorMapping.java
|
747bfc8bd982a719f971c7f8c67fcdfcd948cf33
|
[] |
no_license
|
hunshikan/springboot201801
|
https://github.com/hunshikan/springboot201801
|
5f0932bfa73f88a8a70b0c2ee04344a4a823b7a3
|
dace51273f9c71629c24c2a506609260d621fceb
|
refs/heads/master
| 2020-03-28T14:26:50.630000 | 2018-01-28T15:26:50 | 2018-01-28T15:26:50 | null | 0 | 0 | null | null | null | null | null | null | null | null | null | null | null | null | null |
package com.xinrui.component;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
/**
* spring boot(版本1.5.1.RELEASE)中
* @ConfigurationProperties注解已将location属性移除
*
* 可以修饰方法
*/
@Component
@ConfigurationProperties(prefix = "author")
@PropertySource(value = "classpath:/author.properties",encoding = "UTF-8")
public class AuthorMapping {
private String name;
private String sex;
private String date;
private String desc;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
@Override
public String toString() {
return "AuthorMapping{" +
"name='" + name + '\'' +
", sex='" + sex + '\'' +
", date='" + date + '\'' +
", desc='" + desc + '\'' +
'}';
}
}
|
UTF-8
|
Java
| 1,405 |
java
|
AuthorMapping.java
|
Java
|
[] | null |
[] |
package com.xinrui.component;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
/**
* spring boot(版本1.5.1.RELEASE)中
* @ConfigurationProperties注解已将location属性移除
*
* 可以修饰方法
*/
@Component
@ConfigurationProperties(prefix = "author")
@PropertySource(value = "classpath:/author.properties",encoding = "UTF-8")
public class AuthorMapping {
private String name;
private String sex;
private String date;
private String desc;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getSex() {
return sex;
}
public void setSex(String sex) {
this.sex = sex;
}
public String getDate() {
return date;
}
public void setDate(String date) {
this.date = date;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
@Override
public String toString() {
return "AuthorMapping{" +
"name='" + name + '\'' +
", sex='" + sex + '\'' +
", date='" + date + '\'' +
", desc='" + desc + '\'' +
'}';
}
}
| 1,405 | 0.580102 | 0.577176 | 64 | 20.359375 | 18.463112 | 75 | false | false | 0 | 0 | 0 | 0 | 0 | 0 | 0.328125 | false | false |
3
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.