blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 7 332 | content_id stringlengths 40 40 | detected_licenses listlengths 0 50 | license_type stringclasses 2 values | repo_name stringlengths 7 115 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringclasses 557 values | visit_date timestamp[us] | revision_date timestamp[us] | committer_date timestamp[us] | github_id int64 5.85k 684M ⌀ | star_events_count int64 0 77.7k | fork_events_count int64 0 48k | gha_license_id stringclasses 17 values | gha_event_created_at timestamp[us] | gha_created_at timestamp[us] | gha_language stringclasses 82 values | src_encoding stringclasses 28 values | language stringclasses 1 value | is_vendor bool 1 class | is_generated bool 2 classes | length_bytes int64 7 5.41M | extension stringclasses 11 values | content stringlengths 7 5.41M | authors listlengths 1 1 | author stringlengths 0 161 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
55fda9a15b1b7f97e806f7970b13ac8a410b5811 | 8875ac25f6c724cf80921ad747bc684e7620603e | /app/src/main/java/org/byters/api/memorycache/listener/ICacheExploreListener.java | df14fa7dd919332c80335a42b110812b5f3eaa5c | [] | no_license | BlackDizel/BooksApp | 4b019860b6c907eb4f0de620d61201875592d60b | 1883746ede07c6664c0d2c439a753832ce667353 | refs/heads/master | 2021-07-10T11:07:16.464408 | 2021-01-05T08:46:11 | 2021-01-05T08:46:11 | 225,453,977 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 110 | java | package org.byters.api.memorycache.listener;
public interface ICacheExploreListener {
void onUpdate();
}
| [
"blakdizel@gmail.com"
] | blakdizel@gmail.com |
2d8d28aae770c885cc6958436b699f2040d4b214 | 022ac85c9a972e25a781be06bb9211a9753417cb | /showroom/showroom-ejb/src/main/java/showroom/jsf/Notifications.java | 54a0f6a9800c8524340130d83e0351b8386adabf | [] | no_license | HendAjej/showroom-repo | f9c4ed6c9b451046b6b3a4219aa16326b651b11d | 0450ce9e157a34a2847b18fcf96fb6466efa9fe8 | refs/heads/master | 2020-05-21T21:43:07.077524 | 2017-05-03T05:53:43 | 2017-05-03T05:53:43 | 84,651,389 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,083 | java | package showroom.jsf;
import java.util.List;
import javax.ejb.LocalBean;
import javax.ejb.Stateful;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import artRoom.entities.Notification;
import artRoom.entities.User;
/**
* Session Bean implementation class Notifications
*/
@Stateful
@LocalBean
public class Notifications implements NotificationsRemote, NotificationsLocal {
/**
* Default constructor.
*/
@PersistenceContext
EntityManager entityManager;
public Notifications() {
// TODO Auto-generated constructor stub
}
@Override
public List<Notification> getNotifications(User u) {
List<Notification> list = entityManager.createQuery("select d from Notification d where d.user.idUser = ?1 ORDER BY d.date desc GROUP BY d.seen",Notification.class).setParameter(1, u.getIdUser()).getResultList();
System.out.println("idUser"+list+u.getIdUser());
return list;
}
@Override
public void addNote(Notification note) {
entityManager.persist(note);
}
}
| [
"naoures.benmahfoudh@esprit.tn"
] | naoures.benmahfoudh@esprit.tn |
3bc69a6d62a8f5dfcf565d63016983dd19882adc | b501d88b205edebc15857a30d97722978819b651 | /Java/DiscreteQuiz.java | 7ddaebd0d7d0516eaed637b54decc5a314cfd6aa | [] | no_license | StevenSavant/CodeSamples | 3f3dd947bc304965ad2d69b21d691fab40b0fe25 | 9fba3d134cee7fae742ef3e8f1ebdedf21643c91 | refs/heads/master | 2023-08-08T19:51:41.577298 | 2023-07-24T13:29:57 | 2023-07-24T13:29:57 | 133,497,996 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 323 | java | public class DiscreteQuiz
{
public static void main(String[] args)
{
int k = 1;
int sum = 0;
while (k <= 11)
{
sum = sum + (10 * k);
k = k + 1;
}
int j = 1;
while (j <= 11)
{
sum = sum + (10 * j);
j = j + 1;
}
System.out.println(sum);
}
} | [
"stevensavant@gmail.com"
] | stevensavant@gmail.com |
357f6fdf0dc959a72ee536f75cc391fbde1908ce | 25baed098f88fc0fa22d051ccc8027aa1834a52b | /src/main/java/com/ljh/daoMz/ViewJhDzblUserMapper.java | 11e4652775d68c40460c5b967dcb48a3d660d4df | [] | no_license | woai555/ljh | a5015444082f2f39d58fb3e38260a6d61a89af9f | 17cf8f4415c9ae7d9fedae46cd9e9d0d3ce536f9 | refs/heads/master | 2022-07-11T06:52:07.620091 | 2022-01-05T06:51:27 | 2022-01-05T06:51:27 | 132,585,637 | 0 | 0 | null | 2022-06-17T03:29:19 | 2018-05-08T09:25:32 | Java | UTF-8 | Java | false | false | 275 | java | package com.ljh.daoMz;
import com.ljh.bean.ViewJhDzblUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author ljh
* @since 2020-10-26
*/
public interface ViewJhDzblUserMapper extends BaseMapper<ViewJhDzblUser> {
}
| [
"37681193+woai555@users.noreply.github.com"
] | 37681193+woai555@users.noreply.github.com |
3747374c401104c2dfa2b624cb5783134fd9016d | 66d54877be6b3f568845a19c45c00830f5eca5eb | /j2eeDesignPatterns/src/main/java/com/sai/sri/siddhi/j2ee/design/behavioral/mediator/ChatRoom.java | 501412eb564f407950fb0f8c8bae947fef9b0c85 | [] | no_license | yshprasanth/J2EE-HandsOn | 60b45a8e842dadc0a612857e0138599e3fa098da | 577d0a875b22fe1321183c03c7738dc1167da0ce | refs/heads/master | 2021-07-14T16:23:51.388984 | 2021-03-04T15:32:07 | 2021-03-04T15:32:07 | 99,496,302 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 275 | java | package com.sai.sri.siddhi.j2ee.design.behavioral.mediator;
import java.util.Date;
public class ChatRoom {
public static void showMessage(User user, String message) {
System.out.println(new Date().toString() + " [" + user.getName() + "] : " + message);
}
}
| [
"yshprasanth@gmail.com"
] | yshprasanth@gmail.com |
d9eca7d223a343cc5b62cd006ee13b3b34c3d865 | fe73fc2db1819ae14c7c53e5fc4b97690116af04 | /src/main/java/com/zl/design/buider/pojo/Computer.java | ce706ee2a580dbd531ccff06c8131a3e031b20bc | [] | no_license | wonder-code/design | f0b2372962be4026a58c564b7cd7ab84793811a8 | 58f45700517a8e7d3b4e92980a8b63281831c69f | refs/heads/master | 2021-07-10T14:01:41.295997 | 2019-09-06T06:53:21 | 2019-09-06T06:53:21 | 206,692,286 | 1 | 0 | null | 2020-10-13T15:50:37 | 2019-09-06T01:59:42 | Java | UTF-8 | Java | false | false | 783 | java | package com.zl.design.buider.pojo;
public class Computer {
private String cpu;
private String neicun;
private String xianka;
@Override
public String toString() {
return "Computer{" +
"cpu='" + cpu + '\'' +
", neicun='" + neicun + '\'' +
", xianka='" + xianka + '\'' +
'}';
}
public String getCpu() {
return cpu;
}
public void setCpu(String cpu) {
this.cpu = cpu;
}
public String getNeicun() {
return neicun;
}
public void setNeicun(String neicun) {
this.neicun = neicun;
}
public String getXianka() {
return xianka;
}
public void setXianka(String xianka) {
this.xianka = xianka;
}
}
| [
"873429393@qq.com"
] | 873429393@qq.com |
49172da4937d505cabe33f7db28b4e313a54d569 | 499e1ec3562cf30b7da6262067a174839cb96421 | /src/com/mapledev/SmartUndoMain.java | feb32d5bed0078ef03a49bacf88e2f5acbfc56c3 | [] | no_license | Zikstar/Smart_Undo_TextEditor | 72401c10a48946fe2d4733ca9571ab1e3289d70b | 7d83aa5395039b4e37ba575615731db7f459850e | refs/heads/master | 2023-04-19T18:13:47.889799 | 2021-05-02T17:15:36 | 2021-05-02T17:15:36 | 348,095,902 | 8 | 4 | null | 2021-04-20T21:16:47 | 2021-03-15T19:21:48 | Java | UTF-8 | Java | false | false | 321 | java | package com.mapledev;
import com.mapledev.GUI.HomePageGUI;
import com.mapledev.GUI.SmartUndoEditorGUI;
public class SmartUndoMain {
public static void main(String[] args) {
// write your code here
HomePageGUI gui = new HomePageGUI();
//SmartUndoEditorGUI mainGUI = new SmartUndoEditorGUI();
}
}
| [
"bolanle93@yahoo.com"
] | bolanle93@yahoo.com |
73c2878a713f0c105f0365022b6fedfdb59a63ec | 1087bf9f2fc96a9f6563dca76a2045da1283a810 | /app/src/main/java/com/example/alangregos/lordoftheringsnerdquiz/MainActivity.java | f0cfe0b954b9314e2b8efecba92b293edb5ff9aa | [] | no_license | ADDPALADIN1983/LordoftheRingsnerdquiz | 63218bc6943d3ca8c7951e6dbafd0c419b2d28d8 | 2fb82d85813a542d752d56ce20d8bc28409676fb | refs/heads/master | 2020-03-23T20:48:02.951359 | 2018-08-19T19:43:34 | 2018-08-19T19:43:34 | 142,063,411 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 17,634 | java | package com.example.alangregos.lordoftheringsnerdquiz;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.CheckBox;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;
import android.widget.Toast;
import java.text.DecimalFormat;
public class MainActivity extends AppCompatActivity {
private Question question1;
private Question question2;
private Question question3;
private Question question4;
private Question question5;
private Question question6;
private Question question7;
private Question question8;
private Question question9;
private Question question10;
private Question currentQuestion;
// TODO: 7/26/2018 at some point convert the questions into an array of question objects
// question answers need to be 40 chars or less
private int currentQuestionIndex = 0;
private int numberOfCorrectAnswer = 0;
private final int totalNumberOfQuestions = 25;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//setQuestionAndAnswerTexts(currentQuestion.getQuestionStyle());
}
@Override
protected void onStart() {
super.onStart();
question1 = new Question(0, "radio", getString(R.string.name_of_this_weapon_question), getString(R.string.anduril_text),
getString(R.string.glamdring_text), getString(R.string.orcrist_text), getString(R.string.sting_text), getString(R.string.anduril_text),
getString(R.string.morgul_blade_text), getString(R.string.herugrim_text), R.drawable.anduril);
question2 = new Question(1, "radio", getString(R.string.name_of_this_weapon_question), getString(R.string.glamdring_text),
getString(R.string.glamdring_text), getString(R.string.orcrist_text), getString(R.string.sting_text), getString(R.string.anduril_text), getString(R.string.morgul_blade_text),
getString(R.string.herugrim_text), R.drawable.glamdring);
question3 = new Question(2, "radio", getString(R.string.name_of_this_weapon_question), getString(R.string.sting_text),
getString(R.string.glamdring_text), getString(R.string.orcrist_text), getString(R.string.sting_text), getString(R.string.anduril_text), getString(R.string.morgul_blade_text),
getString(R.string.herugrim_text), R.drawable.lotr_sting);
question4 = new Question(3, "radio", getString(R.string.name_of_this_weapon_question), getString(R.string.morgul_blade_text),
getString(R.string.glamdring_text), getString(R.string.orcrist_text), getString(R.string.sting_text), getString(R.string.anduril_text), getString(R.string.morgul_blade_text),
getString(R.string.herugrim_text), R.drawable.morgul_blade);
question5 = new Question(4, "radio", getString(R.string.name_of_this_weapon_question), getString(R.string.orcrist_text),
getString(R.string.glamdring_text), getString(R.string.orcrist_text), getString(R.string.sting_text), getString(R.string.anduril_text), getString(R.string.morgul_blade_text),
getString(R.string.herugrim_text), R.drawable.orcrist);
question6 = new Question(5, "multiple", getString(R.string.who_fought_wielding_question), getString(R.string.bilbo_text), true,
getString(R.string.aragorn_text), false, getString(R.string.gandalf_text), false, getString(R.string.legolas_text), false,
getString(R.string.thranduil_text), false, getString(R.string.frodo_text), false, R.drawable.the_hobbit_sting);
question7 = new Question(6, "multiple", getString(R.string.who_fought_wielding_question), getString(R.string.bilbo_text), false,
getString(R.string.aragorn_text), false, getString(R.string.gandalf_text), false, getString(R.string.legolas_text), true,
getString(R.string.thranduil_text), false, getString(R.string.thorin_text), true, R.drawable.orcrist);
question8 = new Question(7, "multiple", getString(R.string.decended_from_kings_question), getString(R.string.bilbo_text), false,
getString(R.string.aragorn_text), true, getString(R.string.gandalf_text), false, getString(R.string.legolas_text), true,
getString(R.string.thranduil_text), true, getString(R.string.faramir_text), false, R.drawable.throne);
question9 = new Question(8, "text", getString(R.string.name_of_battering_ram_lotr_question), getString(R.string.grond_text), R.drawable.grond);
question10 = new Question(9, "text", getString(R.string.gandalfs_horse_question), getString(R.string.shadowfax_text), R.drawable.shadowfax);
currentQuestion = question1;
setQuestionAndAnswerTexts(currentQuestion.getQuestionStyle());
}
//method called when reset button is called to reset the quiz questiong to the first one in the index.
public void resetQuiz(View view) {
currentQuestionIndex = 0;
numberOfCorrectAnswer = 0;
updateCurrentQuestion();
updateViews();
}
//method called when next button is clicked to increment the current index and then populate the next question on the screen
public void nextQuestion(View view) {
if (currentQuestion.getQuestionStyle() == "radio") {
radioButtonQuestionValidation();
}
if (currentQuestion.getQuestionStyle() == "multiple") {
checkBoxQuestionValidation();
}
if (currentQuestion.getQuestionStyle() == "text") {
textQuestionValidation();
}
if (currentQuestionIndex == 9) {
double percent = ((double) numberOfCorrectAnswer / (double) totalNumberOfQuestions) * 100;
DecimalFormat decimalFormat = new DecimalFormat("###.##");
String toastText = getString(R.string.scored) + " " + numberOfCorrectAnswer + "/" + totalNumberOfQuestions + getString(R.string.scored_part_two)
+ " " + decimalFormat.format(percent) + getString(R.string.percent_symbol_period);
Toast.makeText(this, toastText, Toast.LENGTH_SHORT).show();
} else {
currentQuestionIndex++;
}
updateCurrentQuestion();
updateViews();
}
// method to pull the right question object from the list of questions
public void updateCurrentQuestion() {
Question question = null;
if (currentQuestionIndex == 0) {
question = question1;
}
if (currentQuestionIndex == 1) {
question = question2;
}
if (currentQuestionIndex == 2) {
question = question3;
}
if (currentQuestionIndex == 3) {
question = question4;
}
if (currentQuestionIndex == 4) {
question = question5;
}
if (currentQuestionIndex == 5) {
question = question6;
}
if (currentQuestionIndex == 6) {
question = question7;
}
if (currentQuestionIndex == 7) {
question = question8;
}
if (currentQuestionIndex == 8) {
question = question9;
}
if (currentQuestionIndex == 9) {
question = question10;
}
currentQuestion = question;
}
// method to update all of the UI elements and text for the current question
public void updateViews() {
String type = currentQuestion.getQuestionStyle();
// switch to add the view needed for the current question type and remove the UI elements that are not needed for that type of question
switch (type) {
case "radio": {
View smallImage = findViewById(R.id.small_image_for_question);
smallImage.setVisibility(View.VISIBLE);
View largeImage = findViewById(R.id.large_image_for_question);
largeImage.setVisibility(View.GONE);
View clickableAnswers = findViewById(R.id.clickable_answers_container);
clickableAnswers.setVisibility(View.VISIBLE);
View radioButtons = findViewById(R.id.radio_buttons);
radioButtons.setVisibility(View.VISIBLE);
View checkBoxes = findViewById(R.id.check_boxes);
checkBoxes.setVisibility(View.GONE);
View textAnswer = findViewById(R.id.typed_in_answer);
textAnswer.setVisibility(View.GONE);
setQuestionAndAnswerTexts(type);
break;
}
case "multiple": {
View smallImage = findViewById(R.id.small_image_for_question);
smallImage.setVisibility(View.VISIBLE);
View largeImage = findViewById(R.id.large_image_for_question);
largeImage.setVisibility(View.GONE);
View clickableAnswers = findViewById(R.id.clickable_answers_container);
clickableAnswers.setVisibility(View.VISIBLE);
View radioButtons = findViewById(R.id.radio_buttons);
radioButtons.setVisibility(View.GONE);
View checkBoxes = findViewById(R.id.check_boxes);
checkBoxes.setVisibility(View.VISIBLE);
View textAnswer = findViewById(R.id.typed_in_answer);
textAnswer.setVisibility(View.GONE);
setQuestionAndAnswerTexts(type);
break;
}
case "text": {
View smallImage = findViewById(R.id.small_image_for_question);
smallImage.setVisibility(View.GONE);
View largeImage = findViewById(R.id.large_image_for_question);
largeImage.setVisibility(View.VISIBLE);
View clickableAnswers = findViewById(R.id.clickable_answers_container);
clickableAnswers.setVisibility(View.GONE);
View radioButtons = findViewById(R.id.radio_buttons);
radioButtons.setVisibility(View.GONE);
View checkBoxes = findViewById(R.id.check_boxes);
checkBoxes.setVisibility(View.GONE);
View textAnswer = findViewById(R.id.typed_in_answer);
textAnswer.setVisibility(View.VISIBLE);
setQuestionAndAnswerTexts(type);
EditText text = findViewById(R.id.typed_in_answer);
text.setText(null);
break;
}
}
resetClickableListners();
}
// set's the answer options for the current question in the UI textViews
public void setQuestionAndAnswerTexts(String type) {
changeQuestionText(currentQuestion.getQuestionText());
if (type != "text") {
changeAnswerOne(currentQuestion.getAnswer1());
changeAnswerTwo(currentQuestion.getAnswer2());
changeAnswerThree(currentQuestion.getAnswer3());
changeAnswerFour(currentQuestion.getAnswer4());
changeAnswerFive(currentQuestion.getAnswer5());
changeAnswerSix(currentQuestion.getAnswer6());
setSmallImage(currentQuestion.getImage());
} else {
changeAnswerOne(null);
changeAnswerTwo(null);
changeAnswerThree(null);
changeAnswerFour(null);
changeAnswerFive(null);
changeAnswerSix(null);
setLargeImage(currentQuestion.getImage());
}
}
public void changeQuestionText(String message) {
TextView questionTextView = findViewById(R.id.question);
questionTextView.setText(message);
}
public void changeAnswerOne(String message) {
TextView answerTextView = findViewById(R.id.answer_one);
answerTextView.setText(message);
}
public void changeAnswerTwo(String message) {
TextView answerTextView = findViewById(R.id.answer_two);
answerTextView.setText(message);
}
public void changeAnswerThree(String message) {
TextView answerTextView = findViewById(R.id.answer_three);
answerTextView.setText(message);
}
public void changeAnswerFour(String message) {
TextView answerTextView = findViewById(R.id.answer_four);
answerTextView.setText(message);
}
public void changeAnswerFive(String message) {
TextView answerTextView = findViewById(R.id.answer_five);
answerTextView.setText(message);
}
public void changeAnswerSix(String message) {
TextView answerTextView = findViewById(R.id.answer_six);
answerTextView.setText(message);
}
public void checkBoxQuestionValidation() {
numberOfCorrectAnswer += currentQuestion.checkAnswer(isCheckBoxOneSelected(), isCheckBoxTwoSelected(), isCheckBoxThreeSelected(), isCheckBoxFourSelected(),
isCheckBoxFiveSelected(), isCheckBoxSixSelected());
}
public void radioButtonQuestionValidation() {
if (isRadioOneSelected()) {
numberOfCorrectAnswer += currentQuestion.checkAnswer(currentQuestion.getAnswer1());
}
if (isRadioTwoSelected()) {
numberOfCorrectAnswer += currentQuestion.checkAnswer(currentQuestion.getAnswer2());
}
if (isRadioThreeSelected()) {
numberOfCorrectAnswer += currentQuestion.checkAnswer(currentQuestion.getAnswer3());
}
if (isRadioFourSelected()) {
numberOfCorrectAnswer += currentQuestion.checkAnswer(currentQuestion.getAnswer4());
}
if (isRadioFiveSelected()) {
numberOfCorrectAnswer += currentQuestion.checkAnswer(currentQuestion.getAnswer5());
}
if (isRadioSixSelected()) {
numberOfCorrectAnswer += currentQuestion.checkAnswer(currentQuestion.getAnswer6());
}
}
public void textQuestionValidation() {
EditText text = findViewById(R.id.typed_in_answer);
String answer = String.valueOf(text.getText());
numberOfCorrectAnswer += currentQuestion.checkAnswer(answer);
}
private boolean isRadioOneSelected() {
boolean clicked;
RadioButton button = findViewById(R.id.radio_1);
clicked = button.isChecked();
return clicked;
}
private boolean isRadioTwoSelected() {
boolean clicked;
RadioButton button = findViewById(R.id.radio_2);
clicked = button.isChecked();
return clicked;
}
private boolean isRadioThreeSelected() {
boolean clicked;
RadioButton button = findViewById(R.id.radio_3);
clicked = button.isChecked();
return clicked;
}
private boolean isRadioFourSelected() {
boolean clicked;
RadioButton button = findViewById(R.id.radio_4);
clicked = button.isChecked();
return clicked;
}
private boolean isRadioFiveSelected() {
boolean clicked;
RadioButton button = findViewById(R.id.radio_5);
clicked = button.isChecked();
return clicked;
}
private boolean isRadioSixSelected() {
boolean clicked;
RadioButton button = findViewById(R.id.radio_6);
clicked = button.isChecked();
return clicked;
}
private boolean isCheckBoxOneSelected() {
boolean clicked;
CheckBox box = findViewById(R.id.check_box_1);
clicked = box.isChecked();
return clicked;
}
private boolean isCheckBoxTwoSelected() {
boolean clicked;
CheckBox box = findViewById(R.id.check_box_2);
clicked = box.isChecked();
return clicked;
}
private boolean isCheckBoxThreeSelected() {
boolean clicked;
CheckBox box = findViewById(R.id.check_box_3);
clicked = box.isChecked();
return clicked;
}
private boolean isCheckBoxFourSelected() {
boolean clicked;
CheckBox box = findViewById(R.id.check_box_4);
clicked = box.isChecked();
return clicked;
}
private boolean isCheckBoxFiveSelected() {
boolean clicked;
CheckBox box = findViewById(R.id.check_box_5);
clicked = box.isChecked();
return clicked;
}
private boolean isCheckBoxSixSelected() {
boolean clicked;
CheckBox box = findViewById(R.id.check_box_6);
clicked = box.isChecked();
return clicked;
}
public void setSmallImage(int image) {
ImageView imageView = findViewById(R.id.small_image_for_question);
imageView.setImageResource(image);
}
public void setLargeImage(int image) {
ImageView imageView = findViewById(R.id.large_image_for_question);
imageView.setImageResource(image);
}
public void resetClickableListners() {
RadioGroup group = findViewById(R.id.radio_buttons);
group.clearCheck();
CheckBox boxOne = findViewById(R.id.check_box_1);
boxOne.setChecked(false);
CheckBox boxTwo = findViewById(R.id.check_box_2);
boxTwo.setChecked(false);
CheckBox boxThree = findViewById(R.id.check_box_3);
boxThree.setChecked(false);
CheckBox boxFour = findViewById(R.id.check_box_4);
boxFour.setChecked(false);
CheckBox boxFive = findViewById(R.id.check_box_5);
boxFive.setChecked(false);
CheckBox boxSix = findViewById(R.id.check_box_6);
boxSix.setChecked(false);
}
}
| [
"alangregos1983@gmail.com"
] | alangregos1983@gmail.com |
a607d7231499e20422fac2d54c6c153f5e179e9b | 4b68dd4d5d005af3b595d12e1364a96205fd5b94 | /app/src/main/java/com/AiNotes/app/Activity/Note/RestoreNoteActivity.java | 40e74d82d90a5547fce7a298a51aa6ec9b3b3400 | [] | no_license | Amit2569/notesapp | a75ad1fb235b5b6a4452b42a54378a418a1f6b96 | 9ee065bfdaf7ffe1572873f3a5c4823717920db9 | refs/heads/master | 2023-08-25T18:41:22.830178 | 2021-10-23T04:26:19 | 2021-10-23T04:26:19 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 12,481 | java | package com.AiNotes.app.Activity.Note;
import android.annotation.SuppressLint;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.database.Cursor;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.GradientDrawable;
import android.net.Uri;
import android.os.AsyncTask;
import android.os.Build;
import android.os.Bundle;
import android.provider.MediaStore;
import android.text.Html;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import com.makeramen.roundedimageview.RoundedImageView;
import java.io.InputStream;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;
import com.AiNotes.app.Methods.Methods;
import com.AiNotes.app.R;
import com.AiNotes.app.SharedPref.Setting;
import com.AiNotes.app.database.DeleteDatabase;
import com.AiNotes.app.database.NotesDatabase;
import com.AiNotes.app.entities.Note;
public class RestoreNoteActivity extends AppCompatActivity {
private Methods methods;
private TextView inpuNoteTitle, inpuNoteSubtitle, inpuNoteText, textDeteTime, textWebURL;
private RoundedImageView imageNote;
private String setectedNoteColor;
private View viewSubtitleIndicator;
private LinearLayout layoutWebURL;
private String setectedImagePath;
private static final int REQUST_CODE_STORAGE_PERMISSION = 1;
private static final int REQUST_CODE_SELECT_IMAGE = 2;
private AlertDialog dialogDeletNote;
private Note alreadyAvailableNote;
@Override
protected void onCreate(Bundle savedInstanceState) {
if (Setting.Dark_Mode ) {
setTheme(R.style.AppTheme2);
} else {
setTheme(R.style.AppTheme);
}
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_reatore_note);
methods = new Methods(this);
Toolbar toolbar = (Toolbar) findViewById(R.id.reatore_toolbar_note);
setSupportActionBar(toolbar);
setTitle(R.string.app_name);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
if (Setting.Dark_Mode) {
getSupportActionBar().setHomeAsUpIndicator(R.drawable.ic_keyboard_backspace_black_24dp);
} else {
getSupportActionBar().setHomeAsUpIndicator(R.drawable.ic_keyboard_backspace_black_24dp2);
}
toolbar.setNavigationOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
onBackPressed();
}
});
inpuNoteTitle = findViewById(R.id.reatore_inputNoteTitle);
inpuNoteSubtitle = findViewById(R.id.reatore_inputNoteSubtitle);
inpuNoteText = findViewById(R.id.reatore_inputNote);
textDeteTime = findViewById(R.id.reatore_textDeteTime);
viewSubtitleIndicator = findViewById(R.id.reatore_viewSubtitleIndicator);
imageNote = findViewById(R.id.reatore_imageNote);
textWebURL = findViewById(R.id.reatore_textWebURL);
layoutWebURL = findViewById(R.id.reatore_layoutWebURL);
textDeteTime.setText(
new SimpleDateFormat("EEEE , dd MMMM yyyy HH:mm a", Locale.getDefault())
.format(new Date())
);
setectedNoteColor = "#333333";
setectedImagePath = "";
if (getIntent().getBooleanExtra("isViemOrUpdate",false)){
alreadyAvailableNote = (Note) getIntent().getSerializableExtra("note");
setViewOrUpdateNote();
}
setSubtitleIndicatorColor();
LinearLayout adView = findViewById(R.id.adView_reatore);
methods.showBannerAd(adView);
}
private void setViewOrUpdateNote() {
inpuNoteTitle.setText(alreadyAvailableNote.getTitle());
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
inpuNoteText.setText(Html.fromHtml(alreadyAvailableNote.getNoteText(), Html.FROM_HTML_MODE_COMPACT));
} else {
inpuNoteText.setText(Html.fromHtml(alreadyAvailableNote.getNoteText()));
}
inpuNoteSubtitle.setText(alreadyAvailableNote.getSubtitle());
textDeteTime.setText(alreadyAvailableNote.getDateTime());
setectedNoteColor = alreadyAvailableNote.getColor();
if (alreadyAvailableNote.getImagePath() != null && !alreadyAvailableNote.getImagePath().trim().isEmpty()){
imageNote.setImageBitmap(BitmapFactory.decodeFile(alreadyAvailableNote.getImagePath()));
imageNote.setVisibility(View.VISIBLE);
findViewById(R.id.reatore_imageRemoveImage).setVisibility(View.VISIBLE);
setectedImagePath = alreadyAvailableNote.getImagePath();
}
if (alreadyAvailableNote.getWebLink() != null && !alreadyAvailableNote.getWebLink().trim().isEmpty()){
textWebURL.setText(alreadyAvailableNote.getWebLink());
layoutWebURL.setVisibility(View.VISIBLE);
}
}
private void saveNote() {
final Note note = new Note();
note.setTitle(alreadyAvailableNote.getTitle());
note.setSubtitle(alreadyAvailableNote.getSubtitle());
note.setNoteText(alreadyAvailableNote.getNoteText());
note.setDateTime(alreadyAvailableNote.getDateTime());
note.setColor(setectedNoteColor);
note.setImagePath(setectedImagePath);
if (layoutWebURL.getVisibility() == View.VISIBLE){
note.setWebLink(textWebURL.getText().toString());
}
@SuppressLint("StaticFieldLeak")
class SaveNoteTask extends AsyncTask<Void, Void, Void> {
@Override
protected Void doInBackground(Void... voids) {
NotesDatabase.getNotesDatabase(getApplicationContext()).noteDao().insertNote(note);
DeleteDatabase.getNotesDatabase(getApplicationContext()).noteDao().deletNote(alreadyAvailableNote);
return null;
}
@Override
protected void onPostExecute(Void aVoid) {
super.onPostExecute(aVoid);
Intent intent = new Intent();
intent.putExtra("isNoteDeleted",true);
setResult(RESULT_OK, intent);
finish();
}
}
new SaveNoteTask().execute();
}
private void setSubtitleIndicatorColor(){
GradientDrawable gradientDrawable = (GradientDrawable) viewSubtitleIndicator.getBackground();
gradientDrawable.setColor(Color.parseColor(setectedNoteColor));
}
private void selectImage() {
Intent intent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
if (intent.resolveActivity(getPackageManager()) != null){
startActivityForResult(intent, REQUST_CODE_SELECT_IMAGE);
}
}
@Override
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
if (requestCode == REQUST_CODE_STORAGE_PERMISSION && grantResults.length > 0){
if (grantResults[0] == PackageManager.PERMISSION_GRANTED){
selectImage();
}else {
Toast.makeText(this,"Permissions Denied!",Toast.LENGTH_SHORT).show();
}
}
}
@Override
protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == REQUST_CODE_SELECT_IMAGE && resultCode == RESULT_OK) {
if (data != null){
Uri selectedImageUri = data.getData();
if (selectedImageUri != null){
try {
InputStream inputStream = getContentResolver().openInputStream(selectedImageUri);
Bitmap bitmap = BitmapFactory.decodeStream(inputStream);
imageNote.setImageBitmap(bitmap);
imageNote.setVisibility(View.VISIBLE);
findViewById(R.id.reatore_imageRemoveImage).setVisibility(View.VISIBLE);
setectedImagePath = getPathFromUri(selectedImageUri);
} catch (Exception e) {
e.printStackTrace();
Toast.makeText(this, e.getMessage(), Toast.LENGTH_SHORT).show();
}
}
}
}
}
private String getPathFromUri(Uri contenUri) {
String filePath;
Cursor cursor = getContentResolver()
.query(contenUri, null, null, null, null);
if (cursor == null){
filePath = contenUri.getPath();
}else {
cursor.moveToFirst();
int index = cursor.getColumnIndex("_data");
filePath =cursor.getString(index);
cursor.close();
}
return filePath;
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_restore, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(final MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
switch (id){
case R.id.nav_restore :
saveNote();
break;
case R.id.nav_delete :
showDeletNoteDialog();
break;
}
return super.onOptionsItemSelected(item);
}
private void showDeletNoteDialog() {
if (dialogDeletNote == null) {
AlertDialog.Builder builder = new AlertDialog.Builder(RestoreNoteActivity.this);
View view = LayoutInflater.from(this).inflate(
R.layout.layout_delete_note, (ViewGroup) findViewById(R.id.layoutDeleteNoteContainer)
);
builder.setView(view);
dialogDeletNote = builder.create();
if (dialogDeletNote.getWindow() != null){
dialogDeletNote.getWindow().setBackgroundDrawable(new ColorDrawable(0));
}
view.findViewById(R.id.textDeleteNote).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
@SuppressLint("StaticFieldLeak")
class DeleteNoteTask extends AsyncTask<Void, Void, Void>{
@Override
protected void onPreExecute() {
super.onPreExecute();
}
@Override
protected Void doInBackground(Void... voids) {
DeleteDatabase.getNotesDatabase(getApplicationContext()).noteDao()
.deletNote(alreadyAvailableNote);
return null;
}
@Override
protected void onPostExecute(Void aVoid) {
super.onPostExecute(aVoid);
Intent intent = new Intent();
intent.putExtra("isNoteDeleted",true);
setResult(RESULT_OK, intent);
dialogDeletNote.dismiss();
finish();
}
}
new DeleteNoteTask().execute();
}
});
view.findViewById(R.id.textCancel).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
dialogDeletNote.dismiss();
}
});
}
dialogDeletNote.show();
}
} | [
"sumit2607"
] | sumit2607 |
18000ae7fc698db742e385ff8d1d0aaf0a7a4483 | 047b413521874dd6e887c9ea057b504df9c9e029 | /app/src/main/java/com/android/materialdesign/ui/fragments/HomeFragment.java | ffa3600fcf4deda2825b95dcdfed6b747aa836f8 | [] | no_license | nataraj06/MaterialDesign | b31880c8bd21f4b40c769dec8619ae32707f6d1b | bd6ed47c2f792431d1cec16494a7aea3416faf2c | refs/heads/master | 2021-01-13T05:14:05.087179 | 2017-03-28T15:16:28 | 2017-03-28T15:16:28 | 81,275,960 | 0 | 0 | null | 2017-03-28T15:16:28 | 2017-02-08T01:59:14 | Java | UTF-8 | Java | false | false | 687 | java | package com.android.materialdesign.ui.fragments;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.android.materialdesign.R;
public class HomeFragment extends Fragment {
public HomeFragment() {
//Mandatory empty constructor for the fragment manager to instantiate the fragment (e.g. upon screen orientation changes).
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_home, container, false);
return view;
}
}
| [
"nataraj.sharan@gmail.com"
] | nataraj.sharan@gmail.com |
219b1dc34d165cfcae9c0f22000f610a3229ef51 | 8e59d90559e05695c5bfa718a948a6a2ed8680ef | /app/src/main/java/com/biegajmy/comments/CommentsListPlaceholderFragment.java | 7834d4913f50addce6e40d359dcd5681aaeb641f | [] | no_license | mkorszun/biegajmy | 8864391a31acafaf1f350b1a7724f03a23cf56fe | 369e0c6c361b886a0a7d49d2f06257e38e15070a | refs/heads/master | 2016-09-05T18:34:00.602215 | 2016-01-24T18:43:39 | 2016-01-24T18:43:39 | 32,687,943 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,663 | java | package com.biegajmy.comments;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.View;
import android.widget.AdapterView;
import android.widget.Button;
import com.biegajmy.R;
import com.biegajmy.events.EventListBus;
import com.biegajmy.general.ExpandableHeightListView;
import com.biegajmy.model.Comment;
import com.squareup.otto.Subscribe;
import java.util.ArrayList;
import org.androidannotations.annotations.AfterViews;
import org.androidannotations.annotations.Click;
import org.androidannotations.annotations.EFragment;
import org.androidannotations.annotations.ViewById;
@EFragment(R.layout.fragment_comments_placeholder) public class CommentsListPlaceholderFragment extends Fragment
implements AdapterView.OnItemClickListener {
public static final String EVENT_ID_ARG = "EVENT_ID_ARG";
public static final String COMMENTS_ARG = "COMMENTS_ARG";
public static final String COMMENTS_READ_ONLY_ARG = "COMMENTS_READ_ONLY_ARG";
private String eventID;
private boolean readOnly;
private CommentsListAdapter adapter;
private ArrayList<Comment> comments;
@ViewById(R.id.comment_add) protected Button addComment;
@ViewById(R.id.comment_view) protected Button viewComment;
@ViewById(R.id.comment_list) protected ExpandableHeightListView commentList;
//********************************************************************************************//
// Callbacks
//********************************************************************************************//
@Override public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
EventListBus.getInstance().register(this);
comments = (ArrayList<Comment>) getArguments().getSerializable(COMMENTS_ARG);
readOnly = getArguments().getBoolean(COMMENTS_READ_ONLY_ARG);
eventID = getArguments().getString(EVENT_ID_ARG);
adapter = new CommentsListAdapter(getActivity(), CommentsUtils.getLast(comments), R.layout.comment_list_item2);
}
@AfterViews public void setup() {
commentList.setAdapter(adapter);
commentList.setExpanded(true);
commentList.setOnItemClickListener(this);
addComment.setVisibility(readOnly ? View.GONE : View.VISIBLE);
boolean moreComments = !readOnly && comments.size() > CommentsUtils.COMMENTS_LIMIT;
viewComment.setVisibility(moreComments ? View.VISIBLE : View.GONE);
}
@Click(R.id.comment_add) public void onClick() {
if (!readOnly) {
CommentsListActivity_.intent(getActivity())
.extra(CommentsListActivity.EVENT_ID_ARG, eventID)
.extra(CommentsListActivity.COMMENTS_ARG, comments)
.start();
}
}
@Click(R.id.comment_view) public void viewAll() {
if (!readOnly) viewAllComments();
}
@Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
if (!readOnly) viewAllComments();
}
@Override public void onDestroy() {
super.onDestroy();
EventListBus.getInstance().unregister(this);
adapter.clear();
if (commentList != null) {
commentList.setAdapter(null);
commentList.setOnItemClickListener(null);
}
}
//********************************************************************************************//
// Events
//********************************************************************************************//
@Subscribe public void update(ArrayList<Comment> comments) {
adapter.clear();
adapter.addAll(CommentsUtils.getLast(comments));
this.comments.clear();
this.comments.addAll(comments);
boolean moreComments = !readOnly && comments.size() > CommentsUtils.COMMENTS_LIMIT;
viewComment.setVisibility(moreComments ? View.VISIBLE : View.GONE);
}
//********************************************************************************************//
// Helpers
//********************************************************************************************//
private void viewAllComments() {
CommentsListActivity_.intent(getActivity())
.extra(CommentsListActivity.EVENT_ID_ARG, eventID)
.extra(CommentsListActivity.COMMENTS_ARG, comments)
.extra(CommentsListActivity.EDIT_MODE_ARG, false)
.start();
}
//********************************************************************************************//
//********************************************************************************************//
}
| [
"mkorszun@gmail.com"
] | mkorszun@gmail.com |
1364239c637b395ef62d5e0943d1813e4efc9964 | 8c47fb4d6a6521ac916fb693c2c06f24e850de90 | /09 Comparing Numbers/Compare.java | a45e7ffa84decd55fd99b6ef3c9c388ec3e119f7 | [
"MIT"
] | permissive | comunidad-devf/JavaAlgorithms | 3d4572871654aac22e423409680ee00d65e8f7a4 | 23b242464ebe37391058b50bf2f10308efa3c494 | refs/heads/master | 2020-12-24T18:03:58.123638 | 2015-09-01T21:46:01 | 2015-09-01T21:46:01 | 41,503,003 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 614 | java | import java.util.Scanner;
public class Compare
{
public static void main(String[] args)
{
Scanner sc = new Scanner(System.in);
System.out.println("Give a number");
int a = sc.nextInt();
System.out.println("Give me one more number");
int b = sc.nextInt();
if (a > b)
{
System.out.println(a + " is grather than " + b);
}
else if (b > a)
{
System.out.println(b + " is grather than " + a);
}
else
{
System.out.println(a + " and " + b + " are equal.");
}
}
} | [
"pabloatp0204@gmail.com"
] | pabloatp0204@gmail.com |
42f99ecef5d369848e1bb2d05fc0fc301c83300f | 0c9de0c8b8f3bf6a5720740237d19b2441d293e1 | /RealTime_Study_PS/210225_realtime_study/BOJ2116.java | 10d2971c620bee8ffc5fa93125b3eacb95f9d362 | [] | no_license | SSAFY-7-4/algo_study_jy | 4412003651e779566b5af710369f2bb43ea40a46 | f297567c4b726aa1f6c2b77209fe61db39dbf639 | refs/heads/master | 2023-03-18T01:21:15.144522 | 2021-03-07T06:27:52 | 2021-03-07T06:27:52 | 336,279,809 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,377 | java |
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.StringTokenizer;
public class BOJ2116 {
public static int N;
public static int dice[][];
public static int max=0;
public static void main(String[] args) throws NumberFormatException, IOException {
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
N= Integer.parseInt(br.readLine());
dice= new int[N][6];
StringTokenizer st;
for(int i=0; i<N; i++) {
st = new StringTokenizer(br.readLine());
for(int j=0; j<6; j++) {
dice[i][j]= Integer.parseInt(st.nextToken());
}
}
for(int i=0; i<6; i++) {
dice(0,dice[0][i],0);
}
System.out.println(max);
}
private static void dice(int cnt,int down, int sum) {
if(cnt==N) {
if(sum>max) max = sum;
return;
}
int top=0,temp=0;
if(down==dice[cnt][0]) {
top = dice[cnt][5];
}else if(down==dice[cnt][1]) {
top = dice[cnt][3];
}else if(down==dice[cnt][2]) {
top = dice[cnt][4];
}else if(down==dice[cnt][3]) {
top = dice[cnt][1];
}else if(down==dice[cnt][4]) {
top = dice[cnt][2];
}else if(down==dice[cnt][5]) {
top = dice[cnt][0];
}
for(int i=1; i<=6; i++) {
if(i!=top&&i!=down) {
if(i>temp) temp=i;
}
}
dice(cnt+1,top,sum+temp);
}
}
| [
"RJY@DESKTOP-A1SFR8U"
] | RJY@DESKTOP-A1SFR8U |
0bc121d430cdc61196074872eb2af101d894e9c5 | 907e384b4c931345a2f9ad4219142b98a69990cc | /src/zx/leetcode/chicken/Sep/Longest_Continuous_Increasing_Subsequence.java | 23ada77aec5077945be5d106544e81284a06c7a2 | [] | no_license | zxiang179/LeetCode | 602dc7569608a6a3b3b03a8888bbf176d5cdfa8f | c399f44cfae963bab5e0ae4c3b0523e7888c3784 | refs/heads/master | 2021-01-19T04:24:58.384604 | 2018-07-27T02:49:16 | 2018-07-27T02:49:16 | 87,368,683 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 801 | java | package zx.leetcode.chicken.Sep;
/**
* 674. Longest Continuous Increasing Subsequence
* @author Carl_Hugo
* 2017年9月15日 下午9:54:12
*/
public class Longest_Continuous_Increasing_Subsequence {
public int findLengthOfLCIS(int[] nums) {
if(nums==null||nums.length==0)return 0;
if(nums.length==1)return 1;
int count = 1;
int max = 0;
for(int i=1;i<nums.length;){
if(nums[i]>nums[i-1]){
count++;
if(count>max){
max = count;
}
}else{
if(count>max){
max = count;
}
count = 1;
}
i++;
}
return max;
}
public static void main(String[] args) {
System.out.println(
new Longest_Continuous_Increasing_Subsequence().
findLengthOfLCIS(new int[]{1,3,5,7}));
}
}
| [
"zxiang248@gmail.com"
] | zxiang248@gmail.com |
c7cbdd75988b705d330b8bc25dae7a5d4e45b553 | 92c59d5451f44f9442310771c3f0b72e4725a14e | /MM_Mentorship_alpha/app/src/main/java/com/example/root/mm_mentorship_alpha/MyFirebaseInstanceIdService.java | d28b4cf403a9281525f05788c60e380a0d50d49c | [] | no_license | doverh/Mentoring-App-Android | 4e973fbd4f262ab7c3c2cb99fd4a1a824a03ba60 | 33957a30363911231ac40004116c67603be40f8e | refs/heads/master | 2021-01-20T03:21:26.887547 | 2017-07-07T12:39:53 | 2017-07-07T12:39:53 | 89,525,391 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 988 | java | package com.example.root.mm_mentorship_alpha;
import android.util.Log;
import com.google.firebase.iid.FirebaseInstanceId;
import com.google.firebase.iid.FirebaseInstanceIdService;
import static android.content.ContentValues.TAG;
/**
* Created by edwin on 4/27/2017.
*/
public class MyFirebaseInstanceIdService extends FirebaseInstanceIdService {
@Override
public void onTokenRefresh() {
// Get updated InstanceID token.
String refreshedToken = FirebaseInstanceId.getInstance().getToken();
Log.d(TAG, "Refreshed token: " + refreshedToken);
// If you want to send messages to this application instance or
// manage this apps subscriptions on the server side, send the
// Instance ID token to your app server.
sendRegistrationToServer(refreshedToken);
}
public void sendRegistrationToServer(String refreshedToken) {
// Log and toast
Log.d(TAG, "Refreshed token: " + refreshedToken);
}
}
| [
"doverheld@gmail.com"
] | doverheld@gmail.com |
57875fbdbea76d6c77d7e4e7dc498e6c014224e0 | 4ddd1e6b22de57606d30577d7ec4f1c43d9dab28 | /src/guiPackage/administrator/ChangeCustomerInfo.java | 0f39132536fcb4075b3a40435c11f0008b208847 | [] | no_license | LiErGou/RestaunrantSystem-master | 6083479fbdafcacae61da3d94db135129f941cf5 | 84a2079729db66a19a22d8cd043684d9a47576e7 | refs/heads/master | 2021-01-21T19:39:56.511852 | 2017-06-08T04:52:00 | 2017-06-08T04:52:00 | 92,148,723 | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 9,274 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package guiPackage.administrator;
import guiPackage.DBUtil;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import classPackage.User;
import classPackage.RestaurantSystem;
import javax.swing.JOptionPane;
/**
*
* @author Meng
*/
public class ChangeCustomerInfo extends javax.swing.JFrame {
User c;
private int id;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
/**
* Creates new form ChangeCustomerInfo
*/
public ChangeCustomerInfo() {
initComponents();
c = null;
}
public void setCustomer(User c) {
this.c = c;
}
/**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed"
// desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
jLabel1 = new javax.swing.JLabel();
jLabel2 = new javax.swing.JLabel();
jLabel3 = new javax.swing.JLabel();
jTextField2 = new javax.swing.JTextField();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
// jLabel1.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
jLabel1.setText("用户姓名");
// jLabel2.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
jLabel2.setText("密 码");
jLabel3.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N
// jButton1.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
jButton1.setText("设 置");
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
// jButton2.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N
jButton2.setText("设 置");
jButton2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton2ActionPerformed(evt);
}
});
jButton1.setVisible(false);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(
getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(layout
.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(
layout.createSequentialGroup()
.addGap(27, 27, 27)
.addGroup(
layout.createParallelGroup(
javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jLabel2)
.addComponent(
jLabel1,
javax.swing.GroupLayout.PREFERRED_SIZE,
130,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(
layout.createParallelGroup(
javax.swing.GroupLayout.Alignment.LEADING,
false)
.addComponent(jLabel3)
.addComponent(
jTextField2,
javax.swing.GroupLayout.DEFAULT_SIZE,
134, Short.MAX_VALUE))
.addGap(38, 38, 38)
.addGroup(
layout.createParallelGroup(
javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jButton1)
.addComponent(jButton2))
.addContainerGap(80, Short.MAX_VALUE)));
layout.setVerticalGroup(layout
.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(
layout.createSequentialGroup()
.addGap(93, 93, 93)
.addGroup(
layout.createParallelGroup(
javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(
jLabel1,
javax.swing.GroupLayout.PREFERRED_SIZE,
36,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(
jLabel3,
javax.swing.GroupLayout.PREFERRED_SIZE,
41,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButton1))
.addGap(29, 29, 29)
.addGroup(
layout.createParallelGroup(
javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(jLabel2)
.addComponent(
jTextField2,
javax.swing.GroupLayout.PREFERRED_SIZE,
40,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButton2))
.addContainerGap(133, Short.MAX_VALUE)));
pack();
}// </editor-fold>//GEN-END:initComponents
private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jButton1ActionPerformed
// TODO add your handling code here:
// if (jTextField1.getText().getBytes().length > 0) {
// c.setName(jTextField1.getText());
// RestaurantSystem.writeCustomerListToFile();
// JOptionPane.showMessageDialog(null, "Set successfully");
// } else {
// JOptionPane.showMessageDialog(null, "Input wrong");
// }
}// GEN-LAST:event_jButton1ActionPerformed
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_jButton2ActionPerformed
// TODO add your handling code here:
if (jTextField2.getText().getBytes().length > 0) {
boolean isSuccess=setPassword(jTextField2.getText(), id);
if(isSuccess){
JOptionPane.showMessageDialog(null, "修改成功");
}else{
JOptionPane.showMessageDialog(null, "修改失败");
}
} else {
JOptionPane.showMessageDialog(null, "修改失败");
}
}// GEN-LAST:event_jButton2ActionPerformed
private boolean setPassword(String password, int id) {
// 更新SQL语句
String sql2 = " update guesttbl set password = ? where id = ? ";
// 数据库连接工具类
DBUtil util = new DBUtil();
// 获得连接
Connection conn = util.openConnection();
System.out.println("id="+id);
try {
// 获得预定义语句
PreparedStatement pstmt = conn.prepareStatement(sql2);
// 设置参数
pstmt.setString(1, password);
pstmt.setInt(2, id);
// 更新订单表
pstmt.executeUpdate();
return true;
} catch (SQLException e) {// 当try语句中出现异常是时,会执行catch中的语句,java运行时系统会自动将catch括号中的Exception
// e
// 初始化,也就是实例化Exception类型的对象。e是此对象引用名称。然后e(引用)会自动调用Exception类中指定的方法,也就出现了e.printStackTrace()
// ;。
// ,printStackTrace()方法的意思是:在命令行打印异常信息在程序中出错的位置及原因
e.printStackTrace();
try {
conn.rollback();// 回滚,当conn.commit()失败时回滚从而保证数据库的完整性,避免表在没有提交也没有回滚的情况下锁死
} catch (SQLException e1) {
e1.printStackTrace();
}
} finally {
util.closeConn(conn);
}
return false;
}
/**
* @param args
* the command line arguments
*/
public static void main(String args[]) {
/* Set the Nimbus look and feel */
// <editor-fold defaultstate="collapsed"
// desc=" Look and feel setting code (optional) ">
/*
* If Nimbus (introduced in Java SE 6) is not available, stay with the
* default look and feel. For details see
* http://download.oracle.com/javase
* /tutorial/uiswing/lookandfeel/plaf.html
*/
try {
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager
.getInstalledLookAndFeels()) {
if ("Nimbus".equals(info.getName())) {
javax.swing.UIManager.setLookAndFeel(info.getClassName());
break;
}
}
} catch (ClassNotFoundException ex) {
java.util.logging.Logger.getLogger(
ChangeCustomerInfo.class.getName()).log(
java.util.logging.Level.SEVERE, null, ex);
} catch (InstantiationException ex) {
java.util.logging.Logger.getLogger(
ChangeCustomerInfo.class.getName()).log(
java.util.logging.Level.SEVERE, null, ex);
} catch (IllegalAccessException ex) {
java.util.logging.Logger.getLogger(
ChangeCustomerInfo.class.getName()).log(
java.util.logging.Level.SEVERE, null, ex);
} catch (javax.swing.UnsupportedLookAndFeelException ex) {
java.util.logging.Logger.getLogger(
ChangeCustomerInfo.class.getName()).log(
java.util.logging.Level.SEVERE, null, ex);
}
// </editor-fold>
/* Create and display the form */
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new ChangeCustomerInfo().setVisible(true);
}
});
}
public void setJTextField1(String text) {
jLabel3.setText(c.getAccount());
}
public void setJTextField2(String text) {
jTextField2.setText(text);
}
// Variables declaration - do not modify//GEN-BEGIN:variables
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JTextField jTextField2;
// End of variables declaration//GEN-END:variables
}
| [
"lichangliangsky@126.com"
] | lichangliangsky@126.com |
a4b21fb02c5cb042b26046cf62552a0c811930d8 | eb9424a2db813fa76e55c3f9d449e625f4db3988 | /src/main/java/org/projog/core/KnowledgeBaseServiceLocator.java | 6738ee9265813e41b9c7f16fa1eb0d94e24a4d92 | [
"Apache-2.0"
] | permissive | gameneverend/projog | 725c93c4f7d055ef20ef8b834be9348fb3c20b6c | 152abc9d23fee44729e32e90d293e432476077cc | refs/heads/master | 2022-03-09T18:14:43.207116 | 2019-10-20T12:35:00 | 2019-10-20T12:35:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,178 | java | /*
* Copyright 2013-2014 S. Webber
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.projog.core;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;
import java.util.Map;
import java.util.WeakHashMap;
/**
* Associates arbitrary objects with a {@code KnowledgeBase}.
* <p>
* Provides a way to implement a one-to-one relationship between a {@code KnowledgeBase} and its services. i.e. A
* {@code KnowledgeBase} can be associated with one, and only one, {@code SpyPoints} - and a {@code SpyPoints} can be
* associated with one, and only one, {@code KnowledgeBase}.
* </p>
* <p>
* <img src="doc-files/KnowledgeBaseServiceLocator.png">
* </p>
*/
public class KnowledgeBaseServiceLocator {
private static final Map<KnowledgeBase, KnowledgeBaseServiceLocator> CACHE = new WeakHashMap<>();
/**
* Returns the {@code KnowledgeBaseServiceLocator} associated with the specified {@code KnowledgeBase}.
* <p>
* If no {@code KnowledgeBaseServiceLocator} is already associated with the specified {@code KnowledgeBase} then a
* new {@code KnowledgeBaseServiceLocator} will be created.
* </p>
*/
public static KnowledgeBaseServiceLocator getServiceLocator(KnowledgeBase kb) {
KnowledgeBaseServiceLocator l = CACHE.get(kb);
if (l == null) {
l = createServiceLocator(kb);
}
return l;
}
private static KnowledgeBaseServiceLocator createServiceLocator(KnowledgeBase kb) {
synchronized (CACHE) {
KnowledgeBaseServiceLocator l = CACHE.get(kb);
if (l == null) {
l = new KnowledgeBaseServiceLocator(kb);
CACHE.put(kb, l);
}
return l;
}
}
private final KnowledgeBase kb;
private final Map<Class<?>, Object> services = new HashMap<>();
/** @see #getServiceLocator */
private KnowledgeBaseServiceLocator(KnowledgeBase kb) {
this.kb = kb;
}
/**
* Adds the specified {@code instance} with the specified {@code referenceType} as its key.
*
* @throws IllegalArgumentException If {@code instance} is not an instance of {@code ReferenceType}.
* @throws IllegalStateException If there is already a service associated with {@code referenceType}.
*/
public void addInstance(Class<?> referenceType, Object instance) {
assertInstanceOf(referenceType, instance);
synchronized (services) {
Object r = services.get(referenceType);
if (r == null) {
services.put(referenceType, instance);
} else {
throw new IllegalStateException("Already have a service with key: " + referenceType);
}
}
}
/**
* Returns the {@code Object} associated the specified {@code instanceType}.
* <p>
* If no {@code Object} is already associated with {@code instanceType} then a new instance of {@code instanceType}
* will be created and associated with {@code instanceType} for future use.
* </p>
*
* @throws RuntimeException if an attempt to instantiate a new instance of the {@code instanceType} fails. e.g. If it
* does not have a public constructor that accepts either no arguments or a single {@code KnowledgeBase} argument.
*/
public <T> T getInstance(Class<?> instanceType) {
return getInstance(instanceType, instanceType);
}
/**
* Returns the {@code Object} associated the specified {@code referenceType}.
* <p>
* If no {@code Object} is already associated with {@code referenceType} then a new instance of {@code instanceType}
* will be created and associated with {@code referenceType} for future use.
* </p>
*
* @param referenceType The class to use as the key to retrieve an existing service.
* @param instanceType The class to create a new instance of if there is no existing service associated with
* {@code referenceType}.
* @throws RuntimeException If an attempt to instantiate a new instance of the {@code instanceType} fails. e.g. If
* {@code instanceType} does not have a public constructor that accepts either no arguments or a single
* {@code KnowledgeBase} argument - or if {@code referenceType} is not the same as, nor is a superclass or
* superinterface of, {@code instanceType}.
*/
@SuppressWarnings("unchecked")
public <T> T getInstance(Class<?> referenceType, Class<?> instanceType) {
Object r = services.get(referenceType);
if (r == null) {
r = createInstance(referenceType, instanceType);
}
return (T) r;
}
private Object createInstance(Class<?> referenceType, Class<?> instanceType) {
synchronized (services) {
Object r = services.get(referenceType);
if (r == null) {
assertAssignableFrom(referenceType, instanceType);
r = newInstance(instanceType);
services.put(referenceType, r);
}
return r;
}
}
private void assertAssignableFrom(Class<?> referenceType, Class<?> instanceType) {
if (!referenceType.isAssignableFrom(instanceType)) {
throw new IllegalArgumentException(instanceType + " is not of type: " + referenceType);
}
}
private void assertInstanceOf(Class<?> referenceType, Object instance) {
if (!referenceType.isInstance(instance)) {
throw new IllegalArgumentException(instance + " is not of type: " + referenceType);
}
}
/**
* Returns a new instance of the specified class.
* <p>
* If the class has a constructor that takes a KnowledgeBase as its single argument then an attempt is made to use
* that to construct the new instance - else an attempt is made to construct a new instance using the no-arg
* constructor.
*/
private Object newInstance(Class<?> c) {
try {
Constructor<?> constructor = getKnowledgeBaseArgumentConstructor(c);
if (constructor != null) {
return constructor.newInstance(kb);
} else {
return c.newInstance();
}
} catch (Exception e) {
throw new RuntimeException("Could not create new instance of service: " + c, e);
}
}
private Constructor<?> getKnowledgeBaseArgumentConstructor(Class<?> c) throws InstantiationException, IllegalAccessException, InvocationTargetException {
for (Constructor<?> constructor : c.getConstructors()) {
Class<?>[] parameterTypes = constructor.getParameterTypes();
if (parameterTypes.length == 1 && parameterTypes[0] == KnowledgeBase.class) {
return constructor;
}
}
return null;
}
}
| [
"webbers.github@gmail.com"
] | webbers.github@gmail.com |
9f7953b4fcc9d87fcf7482da4d2212db359893e8 | f941ac16d056595ac58da4f52f4df9ec1fa60533 | /src/C10/Test3.java | 335de01630a55379413bf5090ea6da1635bc3c4a | [] | no_license | seamisssun/zly | 6bde9307e53b532d3247cc92fdfb0d9290ffba6d | a7fd4bc182bb7ad628e757929d3007a5a5758c72 | refs/heads/master | 2020-12-02T22:47:42.122723 | 2017-07-01T05:18:34 | 2017-07-01T05:18:34 | null | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 1,209 | java | package C10;
import java.util.*;
public class Test3 {
/**题四: 定义一个整型数组a[10],并从键盘输入一个正整数n(n<=10),
再连续从键盘输入n个整数存入a[10](如n是5,就连续从键盘取5个整数存入数组),再求你录入的n个数中的最大值和最小值,并输出。
(要求静态方法实现findMax() findMin())
考察知识点:数组的定义和初始化,数组的应用,方法的调
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
int []arr=new int[10];
Scanner sc=new Scanner(System.in);
System.out.println("请输入一个不大于10的值");
int n=sc.nextInt();
for(int i=0;i<n;i++){
System.out.println("请输入第"+(i+1)+"个元素");
arr[i]=sc.nextInt();
}
System.out.println("最大值"+findMax(arr));
System.out.println("最小值"+findMin(arr));
}
public static int findMax(int []arr){
int max=arr[0];
for(int i=0;i<arr.length;i++){
if(arr[i]>max){
max=arr[i];
}
}return max;
}
public static int findMin(int []arr){
int min=arr[0];
for(int i=0;i<arr.length;i++){
if(arr[i]<min){
arr[i]=min;
}
}return min;
}
}
| [
"zhuangliangyun@163.com"
] | zhuangliangyun@163.com |
d67361d25308d214c1d4f9106cfacd84610672be | 8a6453cd49949798c11f57462d3f64a1fa2fc441 | /aws-java-sdk-datasync/src/main/java/com/amazonaws/services/datasync/model/CreateLocationEfsRequest.java | df44a3024f58cf66771a9033e33c0ea28963cbba | [
"Apache-2.0"
] | permissive | tedyu/aws-sdk-java | 138837a2be45ecb73c14c0d1b5b021e7470520e1 | c97c472fd66d7fc8982cb4cf3c4ae78de590cfe8 | refs/heads/master | 2020-04-14T14:17:28.985045 | 2019-01-02T21:46:53 | 2019-01-02T21:46:53 | 163,892,339 | 0 | 0 | Apache-2.0 | 2019-01-02T21:38:39 | 2019-01-02T21:38:39 | null | UTF-8 | Java | false | false | 12,817 | java | /*
* Copyright 2013-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.datasync.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
* <p>
* CreateLocationEfsRequest
* </p>
*
* @see <a href="http://docs.aws.amazon.com/goto/WebAPI/datasync-2018-11-09/CreateLocationEfs" target="_top">AWS API
* Documentation</a>
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateLocationEfsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
* <p>
* A subdirectory in the location’s path. This subdirectory in the EFS file system is used to read data from the EFS
* source location or write data to the EFS destination. By default, AWS DataSync uses the root directory.
* </p>
*/
private String subdirectory;
/**
* <p>
* The Amazon Resource Name (ARN) for the Amazon EFS file system.
* </p>
*/
private String efsFilesystemArn;
/**
* <p>
* The subnet and security group that the Amazon EFS file system uses.
* </p>
*/
private Ec2Config ec2Config;
/**
* <p>
* The key-value pair that represents a tag that you want to add to the resource. The value can be an empty string.
* This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for
* your location.
* </p>
*/
private java.util.List<TagListEntry> tags;
/**
* <p>
* A subdirectory in the location’s path. This subdirectory in the EFS file system is used to read data from the EFS
* source location or write data to the EFS destination. By default, AWS DataSync uses the root directory.
* </p>
*
* @param subdirectory
* A subdirectory in the location’s path. This subdirectory in the EFS file system is used to read data from
* the EFS source location or write data to the EFS destination. By default, AWS DataSync uses the root
* directory.
*/
public void setSubdirectory(String subdirectory) {
this.subdirectory = subdirectory;
}
/**
* <p>
* A subdirectory in the location’s path. This subdirectory in the EFS file system is used to read data from the EFS
* source location or write data to the EFS destination. By default, AWS DataSync uses the root directory.
* </p>
*
* @return A subdirectory in the location’s path. This subdirectory in the EFS file system is used to read data from
* the EFS source location or write data to the EFS destination. By default, AWS DataSync uses the root
* directory.
*/
public String getSubdirectory() {
return this.subdirectory;
}
/**
* <p>
* A subdirectory in the location’s path. This subdirectory in the EFS file system is used to read data from the EFS
* source location or write data to the EFS destination. By default, AWS DataSync uses the root directory.
* </p>
*
* @param subdirectory
* A subdirectory in the location’s path. This subdirectory in the EFS file system is used to read data from
* the EFS source location or write data to the EFS destination. By default, AWS DataSync uses the root
* directory.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLocationEfsRequest withSubdirectory(String subdirectory) {
setSubdirectory(subdirectory);
return this;
}
/**
* <p>
* The Amazon Resource Name (ARN) for the Amazon EFS file system.
* </p>
*
* @param efsFilesystemArn
* The Amazon Resource Name (ARN) for the Amazon EFS file system.
*/
public void setEfsFilesystemArn(String efsFilesystemArn) {
this.efsFilesystemArn = efsFilesystemArn;
}
/**
* <p>
* The Amazon Resource Name (ARN) for the Amazon EFS file system.
* </p>
*
* @return The Amazon Resource Name (ARN) for the Amazon EFS file system.
*/
public String getEfsFilesystemArn() {
return this.efsFilesystemArn;
}
/**
* <p>
* The Amazon Resource Name (ARN) for the Amazon EFS file system.
* </p>
*
* @param efsFilesystemArn
* The Amazon Resource Name (ARN) for the Amazon EFS file system.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLocationEfsRequest withEfsFilesystemArn(String efsFilesystemArn) {
setEfsFilesystemArn(efsFilesystemArn);
return this;
}
/**
* <p>
* The subnet and security group that the Amazon EFS file system uses.
* </p>
*
* @param ec2Config
* The subnet and security group that the Amazon EFS file system uses.
*/
public void setEc2Config(Ec2Config ec2Config) {
this.ec2Config = ec2Config;
}
/**
* <p>
* The subnet and security group that the Amazon EFS file system uses.
* </p>
*
* @return The subnet and security group that the Amazon EFS file system uses.
*/
public Ec2Config getEc2Config() {
return this.ec2Config;
}
/**
* <p>
* The subnet and security group that the Amazon EFS file system uses.
* </p>
*
* @param ec2Config
* The subnet and security group that the Amazon EFS file system uses.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLocationEfsRequest withEc2Config(Ec2Config ec2Config) {
setEc2Config(ec2Config);
return this;
}
/**
* <p>
* The key-value pair that represents a tag that you want to add to the resource. The value can be an empty string.
* This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for
* your location.
* </p>
*
* @return The key-value pair that represents a tag that you want to add to the resource. The value can be an empty
* string. This value helps you manage, filter, and search for your resources. We recommend that you create
* a name tag for your location.
*/
public java.util.List<TagListEntry> getTags() {
return tags;
}
/**
* <p>
* The key-value pair that represents a tag that you want to add to the resource. The value can be an empty string.
* This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for
* your location.
* </p>
*
* @param tags
* The key-value pair that represents a tag that you want to add to the resource. The value can be an empty
* string. This value helps you manage, filter, and search for your resources. We recommend that you create a
* name tag for your location.
*/
public void setTags(java.util.Collection<TagListEntry> tags) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new java.util.ArrayList<TagListEntry>(tags);
}
/**
* <p>
* The key-value pair that represents a tag that you want to add to the resource. The value can be an empty string.
* This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for
* your location.
* </p>
* <p>
* <b>NOTE:</b> This method appends the values to the existing list (if any). Use
* {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the
* existing values.
* </p>
*
* @param tags
* The key-value pair that represents a tag that you want to add to the resource. The value can be an empty
* string. This value helps you manage, filter, and search for your resources. We recommend that you create a
* name tag for your location.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLocationEfsRequest withTags(TagListEntry... tags) {
if (this.tags == null) {
setTags(new java.util.ArrayList<TagListEntry>(tags.length));
}
for (TagListEntry ele : tags) {
this.tags.add(ele);
}
return this;
}
/**
* <p>
* The key-value pair that represents a tag that you want to add to the resource. The value can be an empty string.
* This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for
* your location.
* </p>
*
* @param tags
* The key-value pair that represents a tag that you want to add to the resource. The value can be an empty
* string. This value helps you manage, filter, and search for your resources. We recommend that you create a
* name tag for your location.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateLocationEfsRequest withTags(java.util.Collection<TagListEntry> tags) {
setTags(tags);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getSubdirectory() != null)
sb.append("Subdirectory: ").append(getSubdirectory()).append(",");
if (getEfsFilesystemArn() != null)
sb.append("EfsFilesystemArn: ").append(getEfsFilesystemArn()).append(",");
if (getEc2Config() != null)
sb.append("Ec2Config: ").append(getEc2Config()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateLocationEfsRequest == false)
return false;
CreateLocationEfsRequest other = (CreateLocationEfsRequest) obj;
if (other.getSubdirectory() == null ^ this.getSubdirectory() == null)
return false;
if (other.getSubdirectory() != null && other.getSubdirectory().equals(this.getSubdirectory()) == false)
return false;
if (other.getEfsFilesystemArn() == null ^ this.getEfsFilesystemArn() == null)
return false;
if (other.getEfsFilesystemArn() != null && other.getEfsFilesystemArn().equals(this.getEfsFilesystemArn()) == false)
return false;
if (other.getEc2Config() == null ^ this.getEc2Config() == null)
return false;
if (other.getEc2Config() != null && other.getEc2Config().equals(this.getEc2Config()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getSubdirectory() == null) ? 0 : getSubdirectory().hashCode());
hashCode = prime * hashCode + ((getEfsFilesystemArn() == null) ? 0 : getEfsFilesystemArn().hashCode());
hashCode = prime * hashCode + ((getEc2Config() == null) ? 0 : getEc2Config().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
return hashCode;
}
@Override
public CreateLocationEfsRequest clone() {
return (CreateLocationEfsRequest) super.clone();
}
}
| [
""
] | |
e16c606657b9a6a06f9c4671c4bf8910bb70b58e | 086e8f18b0ba30f53493983af4054367d0e08d49 | /Kafka-Services/Kafka-Consumer-Service/src/main/java/com/tpspringcloud/kafkaconsumerservice/KafkaConsumerServiceApplication.java | c92b8818b25d9aeb4bf108096f6ffe5a28ab7db0 | [] | no_license | Meihern/Spring-Cloud-Keycloak-Kafka-Setup | 40916f0ed21cd5fbade547dbb8e9a27e97ffab81 | 1693e82b8ac66b805c9bfa9c38a240a81cfac77f | refs/heads/master | 2023-03-05T18:56:18.119281 | 2021-02-11T17:14:39 | 2021-02-11T17:14:39 | 329,897,719 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,642 | java | package com.tpspringcloud.kafkaconsumerservice;
import com.opencsv.CSVWriter;
import com.tpspringcloud.kafkaconsumerservice.deserializers.KafkaFactureDeserializer;
import com.tpspringcloud.kafkaconsumerservice.entities.Facture;
import com.tpspringcloud.kafkaconsumerservice.repositories.FactureRepository;
import org.apache.kafka.clients.consumer.ConsumerConfig;
import org.apache.kafka.clients.consumer.ConsumerRecords;
import org.apache.kafka.clients.consumer.KafkaConsumer;
import org.apache.kafka.common.serialization.IntegerDeserializer;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.kafka.annotation.EnableKafka;
import java.io.FileWriter;
import java.io.IOException;
import java.time.Duration;
import java.util.Collections;
import java.util.Properties;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
@SpringBootApplication
@EnableKafka
public class KafkaConsumerServiceApplication {
private final String KAFKA_BROKER_URL = "localhost:9092";
private final String TOPIC_NAME = "FACTURATION";
private final String CLIENT_ID = "client_consum_1";
private final String GROUP_ID = "sample-facturation-group";
public static void main(String[] args) {
SpringApplication.run(KafkaConsumerServiceApplication.class, args);
}
@Bean
CommandLineRunner startConsumer(FactureRepository factureRepository){
return args -> {
Properties properties = new Properties();
properties.put(ConsumerConfig.BOOTSTRAP_SERVERS_CONFIG, KAFKA_BROKER_URL);
properties.put(ConsumerConfig.CLIENT_ID_CONFIG, CLIENT_ID);
properties.put(ConsumerConfig.GROUP_ID_CONFIG, GROUP_ID);
properties.put(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, "true");
properties.put(ConsumerConfig.AUTO_COMMIT_INTERVAL_MS_CONFIG, "1000");
properties.put(ConsumerConfig.SESSION_TIMEOUT_MS_CONFIG, "30000");
properties.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, IntegerDeserializer.class.getName());
properties.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, KafkaFactureDeserializer.class.getName());
KafkaConsumer<Integer, Facture> kafkaConsumer = new KafkaConsumer<>(properties);
kafkaConsumer.subscribe(Collections.singletonList(TOPIC_NAME));
Executors.newScheduledThreadPool(1).scheduleAtFixedRate(()->{
System.out.println("------------------------------------");
ConsumerRecords<Integer, Facture> consumerRecords=kafkaConsumer.poll(Duration.ofMillis(10));
try {
CSVWriter csvWriter = new CSVWriter(new FileWriter("src/factures.csv", true));
consumerRecords.forEach(consumerRecord->{
System.out.println("Key=>"+consumerRecord.key()+", Facture=>"+consumerRecord.value()+", offsets=>"+consumerRecord.offset());
Facture facture = factureRepository.save(consumerRecord.value());
csvWriter.writeNext(new String[]{String.valueOf(facture.getId()), facture.getNomClient(), String.valueOf(facture.getTotal())}, false);
});
csvWriter.flush();
csvWriter.close();
}
catch (IOException e) {
e.printStackTrace();
}
},1,1, TimeUnit.SECONDS);
};
}
}
| [
"43423207+Meihern@users.noreply.github.com"
] | 43423207+Meihern@users.noreply.github.com |
5c1190029dc71aa0bec9b7865320ec68de31552c | 37b97af2347fe93c92d02c4e671f0c8ae66e4ef1 | /sending-email/src/main/java/com/pmagnaghi/domain/User.java | 8610c03e4a675434383c141088cff0491c83af82 | [] | no_license | pablomagnaghi/spring-boot | 9fc0075ee1a91309932a932018176ed94157c8b7 | f5faa405af28b17571e817c043803867083412a0 | refs/heads/master | 2021-01-20T05:00:47.808700 | 2017-09-08T17:39:03 | 2017-09-08T17:39:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 587 | java | package com.pmagnaghi.domain;
public class User {
private String firstName;
private String lastName;
private String emailAddress;
public User(){
}
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 getEmailAddress() {
return emailAddress;
}
public void setEmailAddress(String emailAddress) {
this.emailAddress = emailAddress;
}
}
| [
"pmagnaghi@solstice.com"
] | pmagnaghi@solstice.com |
6eba6c41fa6bceaa18152068e2f5bc44d179b177 | 9729beae49e8c4640faa7aa3a44bc054126da589 | /All prog/PolyTest/src/food.java | e072b50a80ed24f72613d9d2d64ed8fc702d91b5 | [] | no_license | danielhamalainen/firstDemo | b161338ba310ff354abf05df635ea108ee5491b5 | a61c9b92229871cab3e7177730d5d84a070f7fa8 | refs/heads/master | 2020-08-08T06:26:10.983950 | 2019-10-08T21:09:48 | 2019-10-08T21:09:48 | 213,755,077 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 96 | java | public class food {
void eat() {
System.out.println("This food is great");
}
}
| [
"danielhamalainen@daniels-MacBook-Pro.local"
] | danielhamalainen@daniels-MacBook-Pro.local |
73ba9c7d584c50e52fcb23c894b43fe2eccdb741 | c68087cdf17cc724ef1968d703e3e2a1057a9d38 | /java/server/tags/1_0_2_RC1/src/main/java/org/red5/server/net/remoting/message/RemotingPacket.java | 17c6134e0efc67eb383a9ee7b713af1f8fc0cd2b | [
"Apache-2.0"
] | permissive | wallbase/red5-google-code | 3b7a0624d7be65c3fd861ee322ff3d30102a9388 | 1708fd9e524abd4a3714cb1b37261063a352f596 | refs/heads/master | 2021-04-09T10:37:53.489677 | 2018-03-16T09:25:38 | 2018-03-16T09:25:38 | 125,493,550 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,535 | java | /*
* RED5 Open Source Flash Server - http://code.google.com/p/red5/
*
* Copyright 2006-2013 by respective authors (see below). All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.red5.server.net.remoting.message;
import java.nio.ByteBuffer;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.red5.server.api.IConnection.Encoding;
/**
* Packet of remote calls. Used by RemoteProtocolDecoder.
*/
public class RemotingPacket {
/**
* HTTP request object
*/
protected HttpServletRequest request;
/**
* Byte buffer data
*/
protected ByteBuffer data;
/**
* Headers sent with request.
*/
protected Map<String, Object> headers;
/**
* List of calls
*/
protected List<RemotingCall> calls;
/**
* Scope path
*/
protected String scopePath;
/**
* Create remoting packet from list of pending calls
* @param headers headers
* @param calls List of call objects
*/
public RemotingPacket(Map<String, Object> headers, List<RemotingCall> calls) {
this.headers = headers;
this.calls = calls;
}
/**
* Get the headers sent with the request.
*
* @return headers
*/
public Map<String, Object> getHeaders() {
return headers;
}
/**
* Getter for calls.
*
* @return List of remote calls
*/
public List<RemotingCall> getCalls() {
return calls;
}
/**
* Setter for scope path.
*
* @param path Value to set for property 'scopePath'.
*/
public void setScopePath(String path) {
scopePath = path;
}
/**
* Getter for property scope path.
*
* @return Scope path to set
*/
public String getScopePath() {
return scopePath;
}
/**
* Return the encoding of the included calls.
*
* @return encoding
*/
public Encoding getEncoding() {
List<RemotingCall> calls = getCalls();
if (calls == null || calls.isEmpty()) {
return Encoding.AMF0;
}
RemotingCall call = calls.get(0);
return call.isAMF3 ? Encoding.AMF3 : Encoding.AMF0;
}
}
| [
"wang.kun@jinyinwu.com"
] | wang.kun@jinyinwu.com |
01181c2d47b6dc004663f926fc1395b31fd87249 | 2f31dbebf66c277d9e4549bc79899f6e2b5fe2e7 | /src/main/java/org/kamogelofoundations/controller/UserController.java | 43020e3492cbb14792042757e175f6f2dbfa2918 | [] | no_license | tshep159/cartAndPost | 9a6a6c48f999f8c258fe17ff8fd09aa504b617eb | 5b197cc3c45cfaf71eacec4b53852c657cbde60d | refs/heads/master | 2022-12-25T12:08:25.432126 | 2020-10-05T17:17:12 | 2020-10-05T17:17:12 | 301,477,823 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 11,372 | java | package org.kamogelofoundations.controller;
import javax.servlet.http.HttpServletRequest;
import org.kamogelofoundations.dto.User;
import org.kamogelofoundations.exception.UserNotFound;
import org.kamogelofoundations.repository.UserRepository;
import org.kamogelofoundations.service.MailService;
import org.kamogelofoundations.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;
//import org.imgscalr.Scalr;
/**
*
* @author Tshepo
*/
@Controller
public class UserController {
@Value("${app.user.root}")
private String userRoot;
private final UserService userService;
private final UserRepository userRepository;
@Autowired
MailService mailService;
@Autowired
public UserController(UserService userService, UserRepository userRepository) {
this.userService = userService;
this.userRepository = userRepository;
}
@RequestMapping(value = "/user/reset-password")
public String resetPasswordEmail(User user, Model model) {
model.addAttribute("title", "Reset Password");
return "/reset-password";
}
@RequestMapping(value = "/user/reset-password", method = RequestMethod.POST)
public String resetPasswordEmailPost(User user, BindingResult result,
Model model) throws Exception {
User u = userRepository.findOneByEmail(user.getEmail());
model.addAttribute("title", "Reset Password");
if (u == null) {
result.rejectValue("email", "error.doesntExist",
"We could not find this email in our database");
return "/reset-password";
} else {
String resetToken = userService.createResetPasswordToken(u, true);
mailService.sendResetPassword(user.getEmail(), resetToken);
}
return "/reset-password-sent";
}
@RequestMapping(value = "/user/reset-password-change")
public String resetPasswordChange(User user, BindingResult result,
Model model) {
User u = userRepository.findOneByToken(user.getToken());
if (user.getToken().equals("1") || u == null) {
result.rejectValue("activation", "error.doesntExist",
"We could not find this reset password request.");
} else {
model.addAttribute("userName", u.getEmail());
}
return "/reset-password-change";
}
@RequestMapping(value = "/user/reset-password-change", method = RequestMethod.POST)
public ModelAndView resetPasswordChangePost(User user, BindingResult result) {
Boolean isChanged = userService.resetPassword(user);
if (isChanged) {
//userService.autoLogin(user.getEmail());
return new ModelAndView("redirect:/");
} else {
return new ModelAndView("/reset-password-change", "error",
"Password could not be changed");
}
}
@RequestMapping("/user/activation-send")
public ModelAndView activationSend(User user) {
return new ModelAndView("/activation-send");
}
@RequestMapping(value = "/user/activation-send", method = RequestMethod.POST)
public ModelAndView activationSendPost(User user, BindingResult result) {
User u = userService.resetActivation(user.getEmail());
if (u != null) {
// mailService.sendNewActivationRequest(u.getEmail(), u.getToken());
return new ModelAndView("/user/activation-sent");
} else {
result.rejectValue("email", "error.doesntExist",
"We could not find this email in our databse");
return new ModelAndView("/activation-send");
}
}
/*
@RequestMapping("/user/edit/{id}")
public String edit(@PathVariable("id") Long id, User user) {
User u;
User loggedInUser = userService.getLoggedInUser();
if (id == 0) {
id = loggedInUser.getId();
}
if (loggedInUser.getId() != id) {
return "user/premission-denied";
} else {
u = userRepository.findOne(id);
u = loggedInUser;
}
user.setId(u.getId());
user.setUsername(u.getUsername());
user.setContactNumber(u.getContactNumber());
user.setProfilePicture(u.getProfilePicture());
user.setEmail(u.getEmail());
userService.updateUser(userService.getLoggedInUser().getUsername(),
user);
return "/edit";
}
@RequestMapping(value = "/user/edit", method = RequestMethod.POST)
public String editPost(@Valid User user, BindingResult result) {
if (result.hasFieldErrors("email")) {
return "/edit";
}
if (userService.getLoggedInUser().getId().equals(user.getId())) {
// put updated user to session
userService.getLoggedInUser();
}
return "redirect:/user/edit/" + user.getId() + "?updated";
}
@RequestMapping(value = "/user/reset-password")
public String resetPasswordEmail(User user, Model model) {
model.addAttribute("title", "Reset Password");
return "/reset-password";
}
@RequestMapping(value = "/user/reset-password", method = RequestMethod.POST)
public String resetPasswordEmailPost(User user, BindingResult result,
Model model) {
User u = userRepository.findOneByEmail(user.getEmail());
model.addAttribute("title", "Reset Password");
if (u == null) {
result.rejectValue("email", "error.doesntExist",
"We could not find this email in our database");
return "/reset-password";
} else {
String resetToken = userService.createResetPasswordToken(u, true);
// mailService.sendResetPassword(user.getEmail(), resetToken);
}
return "/reset-password-sent";
}
@RequestMapping(value = "/user/reset-password-change")
public String resetPasswordChange(User user, BindingResult result,
Model model) {
User u = userRepository.findOneByToken(user.getToken());
if (user.getToken().equals("1") || u == null) {
result.rejectValue("activation", "error.doesntExist",
"We could not find this reset password request.");
} else {
model.addAttribute("userName", u.getUsername());
}
return "/reset-password-change";
}
@RequestMapping(value = "/user/reset-password-change", method = RequestMethod.POST)
public ModelAndView resetPasswordChangePost(User user, BindingResult result) {
Boolean isChanged = userService.resetPassword(user);
if (isChanged) {
userService.autoLogin(user.getUsername());
return new ModelAndView("redirect:/");
} else {
return new ModelAndView("/reset-password-change", "error",
"Password could not be changed");
}
}
@RequestMapping("/user/activation-send")
public ModelAndView activationSend(User user) {
return new ModelAndView("/activation-send");
}
@RequestMapping(value = "/user/activation-send", method = RequestMethod.POST)
public ModelAndView activationSendPost(User user, BindingResult result) {
User u = userService.resetActivation(user.getEmail());
if (u != null) {
// mailService.sendNewActivationRequest(u.getEmail(), u.getToken());
return new ModelAndView("/user/activation-sent");
} else {
result.rejectValue("email", "error.doesntExist",
"We could not find this email in our databse");
return new ModelAndView("/activation-send");
}
}
@RequestMapping(value = "/user/upload", method = RequestMethod.POST)
public String handleFileUpload(@RequestParam("file") MultipartFile file,
Principal p) {
Format formatter = new SimpleDateFormat("yyyy-MM-dd_HH_mm_ss");
String fileName = formatter.format(Calendar.getInstance().getTime())
+ "_thumbnail.jpg";
// User user = userService.getLoggedInUser();
Optional<User> user = userService.findByUsername(p.getName());
if (!file.isEmpty()) {
try {
String saveDirectory = userRoot + File.separator + user.get()
+ File.separator;
File test = new File(saveDirectory);
if (!test.exists()) {
test.mkdirs();
}
byte[] bytes = file.getBytes();
ByteArrayInputStream imageInputStream = new ByteArrayInputStream(
bytes);
BufferedImage image = ImageIO.read(imageInputStream);
// BufferedImage thumbnail = Scalr.resize(image, 200);
File thumbnailOut = new File(saveDirectory + fileName);
// /ImageIO.write(thumbnail, "png", thumbnailOut);
userService.updateProfilePicture(user.get(), fileName);
// userService.getLoggedInUser(true); //Force refresh of cached
// User
System.out.println("Image Saved::: " + fileName);
} catch (Exception e) {
e.printStackTrace();
}
}
return "redirect:/user/edit/" + user.get();
}
@RequestMapping(value = "/user/profile-picture", method = RequestMethod.GET, produces = MediaType.IMAGE_JPEG_VALUE)
public @ResponseBody
byte[] profilePicture() throws IOException {
User u = userService.getLoggedInUser();
String profilePicture = userRoot + File.separator + u.getId()
+ File.separator + u.getProfilePicture();
if (new File(profilePicture).exists()) {
return IOUtils.toByteArray(new FileInputStream(profilePicture));
} else {
return null;
}
}*/
@ExceptionHandler(UserNotFound.class)
public ModelAndView handleError(HttpServletRequest req,
UserNotFound exception) {
ModelAndView mav = new ModelAndView();
mav.addObject("message", exception.getMessage());
mav.addObject("exception", exception);
mav.addObject("title", "No user available!");
mav.addObject("url", req.getRequestURL() + "?" + req.getQueryString());
mav.addObject("errorTitle", "Sorry please try again");
mav.addObject("errorDescription",
"The user you are looking for is not yet registered with us!");
mav.setViewName("/userNotFound");
return mav;
}
}
| [
"Tshepo@DESKTOP-0OFIVN6"
] | Tshepo@DESKTOP-0OFIVN6 |
420135b219a3baca74ee77f2f6b5bf6fa472d8e9 | 1075ea122d9eed9432afb5a9bef99148495e4ccb | /app/src/main/java/com/ej/zerdabiyolu2/Helper/StorageFunctions.java | 2d18dc4dded4b4c53da6fa8262c8ee73b4c6fce2 | [] | no_license | FeridAdashov/Electron-Journal-Zerdab | 5ddf06b680211d3277171c6178032aa537439356 | 5738862a6659338e2d4e0c8461320e56d226efe2 | refs/heads/main | 2023-04-21T02:14:26.497450 | 2023-04-11T19:28:55 | 2023-04-11T19:28:55 | 357,896,061 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 17,824 | java | package com.ej.zerdabiyolu2.Helper;
import android.app.Activity;
import android.os.Environment;
import android.util.Log;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.Toast;
import androidx.appcompat.app.AlertDialog;
import com.ej.zerdabiyolu2.R;
import com.google.firebase.database.DataSnapshot;
import com.google.firebase.database.DatabaseError;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.ValueEventListener;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class StorageFunctions {
private static String text = "";
private static String fileName = "";
public static void store(Activity activity, String parentName, String childName, String text) {
String app_name = "Electron Journal Data";
// String app_name = "Pictures"; //For LD app opener in PC
if (Environment.getExternalStorageState().equalsIgnoreCase("mounted"))//Check if Device Storage is present
{
try {
File root = new File(Environment.getExternalStorageDirectory(), app_name);
if (!root.exists()) root.mkdirs();
File parent = root;
if (!parentName.equals("")) {
parent = new File(root, parentName);
if (!parent.exists()) parent.mkdirs();
}
if (childName.contains(":")) childName = childName.replaceAll(":", "ː");
File myTxt = new File(parent, childName + ".txt");
FileWriter writer = new FileWriter(myTxt);
writer.append(text);//Writing the text
writer.flush();
writer.close();
} catch (IOException e) {
Log.d("AAAAA", e.toString());
}
} else SharedClass.showSnackBar(activity, "Yaddaş problemi");
}
public static void storeUserInformation(final Activity activity, DatabaseReference databaseReference) {
try {
databaseReference.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(@androidx.annotation.NonNull DataSnapshot dataSnapshot) {
String name = dataSnapshot.child("name").getValue(String.class);
text = "Ad : " + name + "\n";
text += "Bioqrafiya. : " + dataSnapshot.child("biography").getValue(String.class);
store(activity, name, "ABOUT", text);
}
@Override
public void onCancelled(@androidx.annotation.NonNull DatabaseError databaseError) {
}
});
} catch (Exception e) {
Toast.makeText(activity, R.string.error_check_internet, Toast.LENGTH_SHORT).show();
}
}
public static void storeStudentAllLessonTimeData(final Activity activity, final DatabaseReference databaseReference) {
String username_name = databaseReference.getKey();
fileName = username_name.substring(username_name.indexOf(" ")).trim();
ArrayList<String> headersList = new ArrayList<>();
headersList.add("Dərs Saatı");
headersList.add("Fənn Adı");
headersList.add("Dərs Mövzusu");
headersList.add("Dərs Qiyməti");
headersList.add("Davranış Qimyəti");
headersList.add("Əlavə Məlumat");
databaseReference
.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(@androidx.annotation.NonNull DataSnapshot dataSnapshotParent) {
StringBuilder text = new StringBuilder();
for (DataSnapshot dataSnapshotDate : dataSnapshotParent.getChildren()) {
text.append("Gün: ").append(dataSnapshotDate.getKey()).append("\n\n");
ArrayList<ArrayList<String>> rowsList = new ArrayList<>();
for (DataSnapshot snapshotTime : dataSnapshotDate.getChildren()) {
ArrayList<String> row = new ArrayList<>();
row.add(snapshotTime.getKey());
row.add(snapshotTime.child("lesson").getValue(String.class));
row.add(snapshotTime.child("lessonSubject").getValue(String.class));
row.add(snapshotTime.child("lessonRate").getValue(String.class));
row.add(snapshotTime.child("behaviourRate").getValue(String.class));
row.add(snapshotTime.child("extraInformation").getValue(String.class));
rowsList.add(row);
}
TableGenerator tableGenerator = new TableGenerator();
text.append(tableGenerator.generateTable(headersList, rowsList)).append("\n\n");
}
store(activity, "Dərs Məlumatları", fileName, text.toString());
}
@Override
public void onCancelled(@androidx.annotation.NonNull DatabaseError databaseError) {
}
});
}
public static void storeStudentAllExamData(final Activity activity, final DatabaseReference databaseReference) {
fileName = databaseReference.getKey();
ArrayList<String> headersList = new ArrayList<>();
headersList.add("Imtahan Saatı");
headersList.add("Fənn Adı");
headersList.add("Imtahan Mövzusu");
headersList.add("Doğru sual sayı");
headersList.add("Yanlış sual sayı");
headersList.add("Ümumi sual sayı");
headersList.add("Müəllim");
headersList.add("Əlavə Məlumat");
databaseReference
.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(@androidx.annotation.NonNull DataSnapshot dataSnapshotParent) {
StringBuilder text = new StringBuilder();
for (DataSnapshot dataSnapshotDate : dataSnapshotParent.getChildren()) {
text.append("Gün: ").append(dataSnapshotDate.getKey()).append("\n\n");
ArrayList<ArrayList<String>> rowsList = new ArrayList<>();
for (DataSnapshot snapshotTime : dataSnapshotDate.getChildren()) {
ArrayList<String> row = new ArrayList<>();
row.add(snapshotTime.getKey());
row.add(snapshotTime.child("lesson").getValue(String.class));
row.add(snapshotTime.child("examSubject").getValue(String.class));
row.add(snapshotTime.child("numberOfCorrects").getValue(String.class));
row.add(snapshotTime.child("numberOfWrongs").getValue(String.class));
row.add(snapshotTime.child("commonNumber").getValue(String.class));
row.add(snapshotTime.child("teacher").getValue(String.class));
row.add(snapshotTime.child("extraInformation").getValue(String.class));
rowsList.add(row);
}
TableGenerator tableGenerator = new TableGenerator();
text.append(tableGenerator.generateTable(headersList, rowsList)).append("\n\n");
}
store(activity, "Imtahan Məlumatları", fileName, text.toString());
}
@Override
public void onCancelled(@androidx.annotation.NonNull DatabaseError databaseError) {
}
});
}
public static void deleteUser(final Activity activity, final DatabaseReference databaseReference, boolean isStudent) {
new AlertDialog.Builder(activity)
.setTitle(R.string.deleting_profile)
.setMessage(R.string.sure_to_delete)
.setPositiveButton(R.string.yes, (dialog, which) -> {
LinearLayout parent = new LinearLayout(activity);
parent.setLayoutParams(new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT));
parent.setOrientation(LinearLayout.VERTICAL);
final EditText editText1 = new EditText(activity);
final EditText editText2 = new EditText(activity);
editText1.setHint(R.string.name);
editText2.setHint(R.string.reason);
parent.addView(editText1);
parent.addView(editText2);
final AlertDialog alert = new AlertDialog.Builder(activity)
.setMessage(R.string.name_reason)
.setPositiveButton(android.R.string.ok, null)
.setNegativeButton(android.R.string.cancel, null)
.setView(parent)
.create();
alert.setOnShowListener(dialog1 -> {
Button button = ((AlertDialog) dialog1).getButton(AlertDialog.BUTTON_POSITIVE);
button.setOnClickListener(view -> {
try {
if (editText1.getText().toString().trim().length() < 3) {
Toast.makeText(activity, activity.getString(R.string.enter_your_name), Toast.LENGTH_SHORT).show();
} else if (editText2.getText().toString().trim().length() < 3) {
Toast.makeText(activity, activity.getString(R.string.enter_reason), Toast.LENGTH_SHORT).show();
} else {
dialog1.dismiss();
databaseReference.addListenerForSingleValueEvent(new ValueEventListener() {
@Override
public void onDataChange(@androidx.annotation.NonNull DataSnapshot dataSnapshot) {
final String name = dataSnapshot.child("name").getValue(String.class);
if (name == null)
Toast.makeText(activity, "Hesab silinmədi", Toast.LENGTH_LONG).show();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd HH_mm_ss");
text = "Ad : " + name + "\n";
text += "Bioqrafiya : " + dataSnapshot.child("biography").getValue(String.class) + "\n\n";
if (isStudent)
text += "Qeydiyyat günü : " + dataSnapshot.child("registrationDate").getValue(String.class) + "\n\n";
text += "Silən Şəxsin Adı : " + editText1.getText().toString() + "\n\n";
text += "Silinmə Səbəbi : " + editText2.getText().toString() + "\n\n";
text += "Əməliyyat Tarixi : " + sdf.format(new Date());
DatabaseFunctions.getDatabases(activity).get(0).child("DELETED_USERS/" + name + "/info").setValue(text);
if (isStudent) {
Double moneyPerMonth = dataSnapshot.child("PaymentInfo/moneyPerMonth").getValue(Double.class);
String lastPaymentTime = dataSnapshot.child("PaymentInfo/paymentTime").getValue(String.class);
double debt = 0.;
if (moneyPerMonth != null && lastPaymentTime != null) {
DateFormat df = new SimpleDateFormat("yyyy_MM_dd");
Double payed = dataSnapshot.child("PaymentInfo/payed").getValue(Double.class);
if (payed == null) payed = 0d;
try {
Date last_payment_time = df.parse(lastPaymentTime);
Date cd = df.parse(df.format(new Date()));
int unpayed_months = -1;
while (last_payment_time.before(cd)) {
unpayed_months++;
cd.setMonth(cd.getMonth() - 1);
}
debt = unpayed_months * moneyPerMonth - payed;
} catch (Exception e) {
Log.d("AAAAA", e.toString());
}
}
DatabaseFunctions.getDatabases(activity).get(0)
.child("DELETED_USERS/" + name + "/debt").setValue(debt);
DatabaseFunctions.getDatabases(activity).get(0)
.child("LESSON_HISTORY/" + databaseReference.getKey() + " " + name).removeValue();
DatabaseFunctions.getDatabases(activity).get(0)
.child("MESSAGES/" + databaseReference.getKey()).removeValue();
DatabaseFunctions.getDatabases(activity).get(0)
.child("MESSAGES/" + databaseReference.getKey()).removeValue();
DatabaseFunctions.getDatabases(activity).get(0)
.child("STUDENT_CLASS/" + databaseReference.getKey()).removeValue();
} else {
DatabaseFunctions.getDatabases(activity).get(0)
.child("TEACHER_GIVE_RESULT/" + databaseReference.getKey()).removeValue();
DatabaseFunctions.getDatabases(activity).get(0)
.child("TEACHER_VALUATION/" + databaseReference.getKey()).removeValue();
}
databaseReference.removeValue();
Toast.makeText(activity, "Hesab silindi, Səhifəni yeniləyin!!!", Toast.LENGTH_LONG).show();
}
@Override
public void onCancelled(@androidx.annotation.NonNull DatabaseError databaseError) {
}
});
}
} catch (Exception e) {
e.printStackTrace();
}
});
});
alert.show();
})
.setNegativeButton(R.string.no, null)
.setIcon(android.R.drawable.ic_dialog_alert)
.show();
}
public static void sortArray(ArrayList<String> array) {
String[] a = array.toArray(new String[0]);
Arrays.sort(a, (s, t1) -> {
final Pattern PATTERN = Pattern.compile("(\\D*)(\\d*)");
Matcher m1 = PATTERN.matcher(s);
Matcher m2 = PATTERN.matcher(t1);
// The only way find() could fail is at the end of a string
while (m1.find() && m2.find()) {
int nonDigitCompare = m1.group(1).compareTo(m2.group(1));
if (0 != nonDigitCompare) {
return nonDigitCompare;
}
if (m1.group(2).isEmpty()) {
return m2.group(2).isEmpty() ? 0 : -1;
} else if (m2.group(2).isEmpty()) {
return +1;
}
Integer n1 = new Integer(m1.group(2));
Integer n2 = new Integer(m2.group(2));
int numberCompare = n1.compareTo(n2);
if (0 != numberCompare) {
return numberCompare;
}
}
return m1.hitEnd() && m2.hitEnd() ? 0 : m1.hitEnd() ? -1 : +1;
});
array.clear();
array.addAll(Arrays.asList(a));
}
}
| [
"fadasov@mai.ru"
] | fadasov@mai.ru |
a842c2760ab59c61d69ad9dc38fc038ea421ceff | b73d08744477050872f5de0f7d0e5ee867b77476 | /src/main/java/com/ecommerce/login/config/ErxProperties.java | f8b19c5b87fc6f02f4788684dfee758dc9e9b44d | [] | no_license | murthykolla/E-Commerce-Base | 718eda99b6200abf80c2c7806f9ab19c9cddc42e | b3a08aff112f6ae9cd4ab6b2347e05ff4dcbd642 | refs/heads/master | 2022-12-27T18:50:11.154840 | 2020-05-02T07:14:46 | 2020-05-02T07:14:46 | 256,965,194 | 0 | 0 | null | 2020-10-13T21:19:02 | 2020-04-19T09:53:42 | Java | UTF-8 | Java | false | false | 13,762 | java | package com.ecommerce.login.config;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.web.cors.CorsConfiguration;
/**
* Properties specific to Erx.
* <p>
* <p>
* Properties are configured in the application.yml file.
* </p>
*/
@ConfigurationProperties(prefix = "erx", ignoreUnknownFields = false)
public class ErxProperties {
private final Async async = new Async();
private final Http http = new Http();
private final Cache cache = new Cache();
private final Mail mail = new Mail();
private final Swagger swagger = new Swagger();
private final Metrics metrics = new Metrics();
private final CorsConfiguration cors = new CorsConfiguration();
private final MicroservicesReferences microservicesReferences = new MicroservicesReferences();
private final ApplicationConfiguration applicationConfiguration = new ApplicationConfiguration();
private final Roles roles = new Roles();
private final Logging logging = new Logging();
public Async getAsync() {
return async;
}
public Roles getRoles() {
return roles;
}
public Http getHttp() {
return http;
}
public Cache getCache() {
return cache;
}
public Mail getMail() {
return mail;
}
public Swagger getSwagger() {
return swagger;
}
public Metrics getMetrics() {
return metrics;
}
public CorsConfiguration getCors() {
return cors;
}
public MicroservicesReferences getMicroservicesReferences() {
return microservicesReferences;
}
public ApplicationConfiguration getApplicationConfiguration() {
return applicationConfiguration;
}
public Logging getLogging() {
return logging;
}
public static class Async {
private int corePoolSize = 2;
private int maxPoolSize = 50;
private int queueCapacity = 10000;
public int getCorePoolSize() {
return corePoolSize;
}
public void setCorePoolSize(int corePoolSize) {
this.corePoolSize = corePoolSize;
}
public int getMaxPoolSize() {
return maxPoolSize;
}
public void setMaxPoolSize(int maxPoolSize) {
this.maxPoolSize = maxPoolSize;
}
public int getQueueCapacity() {
return queueCapacity;
}
public void setQueueCapacity(int queueCapacity) {
this.queueCapacity = queueCapacity;
}
}
public static class Http {
private final Cache cache = new Cache();
/**
* HTTP version, must be "V_1_1" (for HTTP/1.1) or V_2_0 (for (HTTP/2)
*/
public Version version = Version.V_1_1;
public Cache getCache() {
return cache;
}
public Version getVersion() {
return version;
}
public void setVersion(Version version) {
this.version = version;
}
public enum Version {V_1_1, V_2_0}
public static class Cache {
private int timeToLiveInDays = 1461;
public int getTimeToLiveInDays() {
return timeToLiveInDays;
}
public void setTimeToLiveInDays(int timeToLiveInDays) {
this.timeToLiveInDays = timeToLiveInDays;
}
}
}
public static class Cache {
private final Hazelcast hazelcast = new Hazelcast();
private final Ehcache ehcache = new Ehcache();
public Hazelcast getHazelcast() {
return hazelcast;
}
public Ehcache getEhcache() {
return ehcache;
}
public static class Hazelcast {
private int timeToLiveSeconds = 3600;
private int backupCount = 1;
public int getTimeToLiveSeconds() {
return timeToLiveSeconds;
}
public void setTimeToLiveSeconds(int timeToLiveSeconds) {
this.timeToLiveSeconds = timeToLiveSeconds;
}
public int getBackupCount() {
return backupCount;
}
public void setBackupCount(int backupCount) {
this.backupCount = backupCount;
}
}
public static class Ehcache {
private int timeToLiveSeconds = 3600;
private long maxEntries = 100;
public int getTimeToLiveSeconds() {
return timeToLiveSeconds;
}
public void setTimeToLiveSeconds(int timeToLiveSeconds) {
this.timeToLiveSeconds = timeToLiveSeconds;
}
public long getMaxEntries() {
return maxEntries;
}
public void setMaxEntries(long maxEntries) {
this.maxEntries = maxEntries;
}
}
}
public static class Mail {
private String from = "";
private String baseUrl = "";
private String productAdminEmail = "";
public String getFrom() {
return from;
}
public void setFrom(String from) {
this.from = from;
}
public String getBaseUrl() {
return baseUrl;
}
public void setBaseUrl(String baseUrl) {
this.baseUrl = baseUrl;
}
public String getProductAdminEmail() {
return productAdminEmail;
}
public void setProductAdminEmail(String productAdminEmail) {
this.productAdminEmail = productAdminEmail;
}
}
public static class Swagger {
private String basePackage;
private String title;
private String description;
private String version;
private String termsOfServiceUrl;
private String contactName;
private String contactUrl;
private String contactEmail;
private String license;
private String licenseUrl;
private String defaultIncludePattern;
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getTermsOfServiceUrl() {
return termsOfServiceUrl;
}
public void setTermsOfServiceUrl(String termsOfServiceUrl) {
this.termsOfServiceUrl = termsOfServiceUrl;
}
public String getContactName() {
return contactName;
}
public void setContactName(String contactName) {
this.contactName = contactName;
}
public String getContactUrl() {
return contactUrl;
}
public void setContactUrl(String contactUrl) {
this.contactUrl = contactUrl;
}
public String getContactEmail() {
return contactEmail;
}
public void setContactEmail(String contactEmail) {
this.contactEmail = contactEmail;
}
public String getLicense() {
return license;
}
public void setLicense(String license) {
this.license = license;
}
public String getLicenseUrl() {
return licenseUrl;
}
public void setLicenseUrl(String licenseUrl) {
this.licenseUrl = licenseUrl;
}
public String getDefaultIncludePattern() {
return defaultIncludePattern;
}
public void setDefaultIncludePattern(String defaultIncludePattern) {
this.defaultIncludePattern = defaultIncludePattern;
}
public String getBasePackage() {
return basePackage;
}
public void setBasePackage(String basePackage) {
this.basePackage = basePackage;
}
}
public static class Metrics {
private final Jmx jmx = new Jmx();
private final Graphite graphite = new Graphite();
private final Prometheus prometheus = new Prometheus();
private final Logs logs = new Logs();
public Jmx getJmx() {
return jmx;
}
public Graphite getGraphite() {
return graphite;
}
public Prometheus getPrometheus() {
return prometheus;
}
public Logs getLogs() {
return logs;
}
public static class Jmx {
private boolean enabled = true;
public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
}
public static class Graphite {
private boolean enabled = false;
private String host = "localhost";
private int port = 2003;
private String prefix = "jhipsterApplication";
public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
public String getHost() {
return host;
}
public void setHost(String host) {
this.host = host;
}
public int getPort() {
return port;
}
public void setPort(int port) {
this.port = port;
}
public String getPrefix() {
return prefix;
}
public void setPrefix(String prefix) {
this.prefix = prefix;
}
}
public static class Prometheus {
private boolean enabled = false;
private String endpoint = "/prometheusMetrics";
public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
public String getEndpoint() {
return endpoint;
}
public void setEndpoint(String endpoint) {
this.endpoint = endpoint;
}
}
public static class Logs {
private boolean enabled = false;
private long reportFrequency = 60;
public long getReportFrequency() {
return reportFrequency;
}
public void setReportFrequency(int reportFrequency) {
this.reportFrequency = reportFrequency;
}
public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
}
}
public static class Logging {
private final Logstash logstash = new Logstash();
private final SpectatorMetrics spectatorMetrics = new SpectatorMetrics();
public Logstash getLogstash() {
return logstash;
}
public SpectatorMetrics getSpectatorMetrics() {
return spectatorMetrics;
}
public static class Logstash {
private boolean enabled = false;
private String host = "localhost";
private int port = 5000;
private int queueSize = 512;
public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
public String getHost() {
return host;
}
public void setHost(String host) {
this.host = host;
}
public int getPort() {
return port;
}
public void setPort(int port) {
this.port = port;
}
public int getQueueSize() {
return queueSize;
}
public void setQueueSize(int queueSize) {
this.queueSize = queueSize;
}
}
public static class SpectatorMetrics {
private boolean enabled = false;
public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
}
}
public static class MicroservicesReferences {
private String utilityService = "";
public String getUtilityService() {
return utilityService;
}
public void setUtilityService(String utilityService) {
this.utilityService = utilityService;
}
}
public static class ApplicationConfiguration {
private String applicationDnsUrl = "";
public String getApplicationDnsUrl() {
return applicationDnsUrl;
}
public void setApplicationDnsUrl(String applicationDnsUrl) {
this.applicationDnsUrl = applicationDnsUrl;
}
}
public static class Roles {
private static String THERAPIST_ROLE_CODE = "THERAPIST_ROLE";
public static String getTherapistRoleCode() {
return THERAPIST_ROLE_CODE;
}
}
}
| [
"murthykolla132@gmail.com"
] | murthykolla132@gmail.com |
4dfbc9dbe48a496cbff0e70e3b6d6b0b6a1a1ebd | c5c580f5bdc9815b27b30ab56c0a03d7beb39e89 | /phoneProfilesPlus/src/main/java/sk/henrichg/phoneprofilesplus/GrantPermissionActivity.java | d6b9b975d6dfc5b747d8411cdadb01f83cead2ed | [
"Apache-2.0"
] | permissive | TheNothingMan/PhoneProfilesPlus | d24c36e4c5e30c6de7047b210e52854fb7d50c1c | 8199e6ccc66754d9f6f839f803e848344bf7740d | refs/heads/master | 2021-01-19T07:20:28.480822 | 2015-12-16T17:37:54 | 2015-12-16T17:37:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 36,672 | java | package sk.henrichg.phoneprofilesplus;
import android.Manifest;
import android.annotation.TargetApi;
import android.app.Activity;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.NotificationCompat;
import android.support.v7.app.AlertDialog;
import android.text.Html;
import android.widget.Toast;
import java.util.ArrayList;
import java.util.List;
public class GrantPermissionActivity extends Activity {
private int grantType;
private List<Permissions.PermissionType> permissions;
private long profile_id;
private boolean mergedProfile;
private boolean onlyNotification;
private boolean mergedNotification;
private boolean forGUI;
private boolean monochrome;
private int monochromeValue;
private int startupSource;
private boolean interactive;
private String eventNotificationSound;
private boolean log;
private String applicationDataPath;
private long event_id;
private Profile profile;
private Event event;
private DataWrapper dataWrapper;
private boolean started = false;
private static final int WRITE_SETTINGS_REQUEST_CODE = 909090;
private static final int PERMISSIONS_REQUEST_CODE = 909091;
private static final String NOTIFICATION_DELETED_ACTION = "sk.henrichg.phoneprofilesplus.PERMISSIONS_NOTIFICATION_DELETED";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
GlobalData.loadPreferences(getApplicationContext());
Intent intent = getIntent();
grantType = intent.getIntExtra(Permissions.EXTRA_GRANT_TYPE, 0);
onlyNotification = intent.getBooleanExtra(Permissions.EXTRA_ONLY_NOTIFICATION, false);
permissions = intent.getParcelableArrayListExtra(Permissions.EXTRA_PERMISSION_TYPES);
mergedNotification = false;
if (permissions == null) {
permissions = GlobalData.getMergedPermissions(getApplicationContext());
mergedNotification = true;
}
profile_id = intent.getLongExtra(GlobalData.EXTRA_PROFILE_ID, 0);
mergedProfile = intent.getBooleanExtra(Permissions.EXTRA_MERGED_PROFILE, false);
forGUI = intent.getBooleanExtra(Permissions.EXTRA_FOR_GUI, false);
monochrome = intent.getBooleanExtra(Permissions.EXTRA_MONOCHROME, false);
monochromeValue = intent.getIntExtra(Permissions.EXTRA_MONOCHROME_VALUE, 0xFF);
startupSource = intent.getIntExtra(GlobalData.EXTRA_STARTUP_SOURCE, GlobalData.STARTUP_SOURCE_ACTIVATOR);
interactive = intent.getBooleanExtra(Permissions.EXTRA_INTERACTIVE, true);
eventNotificationSound = intent.getStringExtra(Permissions.EXTRA_EVENT_NOTIFICATION_SOUND);
log = intent.getBooleanExtra(Permissions.EXTRA_LOG, false);
applicationDataPath = intent.getStringExtra(Permissions.EXTRA_APPLICATION_DATA_PATH);
event_id = intent.getLongExtra(GlobalData.EXTRA_EVENT_ID, 0);
dataWrapper = new DataWrapper(getApplicationContext(), forGUI, monochrome, monochromeValue);
profile = dataWrapper.getProfileById(profile_id, mergedProfile);
event = dataWrapper.getEventById(event_id);
//Log.e("GrantPermissionActivity", "onShow grantType="+grantType);
//Log.e("GrantPermissionActivity", "onShow permissions.size()="+permissions.size());
//Log.e("GrantPermissionActivity", "onShow onlyNotification="+onlyNotification);
//if (profile != null)
// Log.e("GrantPermissionActivity", "onShow profile._name="+profile._name);
//if (event != null)
// Log.e("GrantPermissionActivity", "onShow event._name="+event._name);
}
@Override
protected void onStart()
{
super.onStart();
if (started) return;
started = true;
final Context context = getApplicationContext();
if (permissions.size() == 0) {
// called from notification - recheck permissions
if (grantType == Permissions.GRANT_TYPE_INSTALL_TONE) {
boolean granted = Permissions.checkInstallTone(context);
if (!granted) {
permissions.add(new Permissions.PermissionType(Permissions.PERMISSION_INSTALL_TONE, Manifest.permission.WRITE_EXTERNAL_STORAGE));
}
else {
Toast msg = Toast.makeText(context,
context.getResources().getString(R.string.toast_permissions_granted),
Toast.LENGTH_SHORT);
msg.show();
finish();
return;
}
}
else
if (grantType == Permissions.GRANT_TYPE_EVENT) {
// get permissions from shared preferences and recheck it
permissions = Permissions.recheckPermissions(context, GlobalData.getMergedPermissions(context));
mergedNotification = true;
if (permissions.size() == 0) {
Toast msg = Toast.makeText(context,
context.getResources().getString(R.string.toast_permissions_granted),
Toast.LENGTH_SHORT);
msg.show();
finish();
return;
}
}
else {
// get permissions from shared preferences and recheck it
permissions = Permissions.recheckPermissions(context, GlobalData.getMergedPermissions(context));
mergedNotification = true;
if (permissions.size() == 0) {
Toast msg = Toast.makeText(context,
context.getResources().getString(R.string.toast_permissions_granted),
Toast.LENGTH_SHORT);
msg.show();
finish();
return;
}
}
}
boolean showRequestWriteSettings = false;
boolean showRequestReadExternalStorage = false;
boolean showRequestReadPhoneState = false;
boolean showRequestProcessOutgoingCalls = false;
boolean showRequestWriteExternalStorage = false;
boolean showRequestReadCalendar = false;
boolean showRequestReadContacts = false;
boolean showRequestReceiveSMS = false;
boolean showRequestReadSMS = false;
boolean showRequestAccessCoarseLocation = false;
boolean showRequestAccessFineLocation = false;
//Log.e("GrantPermissionActivity", "onStart - permissions.size="+permissions.size());
for (Permissions.PermissionType permissionType : permissions) {
if (permissionType.permission.equals(Manifest.permission.WRITE_SETTINGS))
showRequestWriteSettings = GlobalData.getShowRequestWriteSettingsPermission(context);
if (permissionType.permission.equals(Manifest.permission.READ_EXTERNAL_STORAGE))
showRequestReadExternalStorage = ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.READ_EXTERNAL_STORAGE);
if (permissionType.permission.equals(Manifest.permission.READ_PHONE_STATE))
showRequestReadPhoneState = ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.READ_PHONE_STATE);
if (permissionType.permission.equals(Manifest.permission.PROCESS_OUTGOING_CALLS))
showRequestProcessOutgoingCalls = ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.PROCESS_OUTGOING_CALLS);
if (permissionType.permission.equals(Manifest.permission.WRITE_EXTERNAL_STORAGE))
showRequestWriteExternalStorage = ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.WRITE_EXTERNAL_STORAGE);
if (permissionType.permission.equals(Manifest.permission.READ_CALENDAR))
showRequestReadCalendar = ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.READ_CALENDAR);
if (permissionType.permission.equals(Manifest.permission.READ_CONTACTS))
showRequestReadContacts = ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.READ_CONTACTS);
if (permissionType.permission.equals(Manifest.permission.RECEIVE_SMS))
showRequestReceiveSMS = ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.RECEIVE_SMS);
if (permissionType.permission.equals(Manifest.permission.READ_SMS))
showRequestReadSMS = ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.READ_SMS);
if (permissionType.permission.equals(Manifest.permission.ACCESS_COARSE_LOCATION))
showRequestAccessCoarseLocation = ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_COARSE_LOCATION);
if (permissionType.permission.equals(Manifest.permission.ACCESS_FINE_LOCATION))
showRequestAccessFineLocation = ActivityCompat.shouldShowRequestPermissionRationale(this, Manifest.permission.ACCESS_FINE_LOCATION);
}
if (showRequestWriteSettings ||
showRequestReadExternalStorage ||
showRequestReadPhoneState ||
showRequestProcessOutgoingCalls ||
showRequestWriteExternalStorage ||
showRequestReadCalendar ||
showRequestReadContacts ||
showRequestReceiveSMS ||
showRequestReadSMS ||
showRequestAccessCoarseLocation ||
showRequestAccessFineLocation) {
if (onlyNotification) {
int notificationID;
NotificationCompat.Builder mBuilder;
Intent intent = new Intent(context, GrantPermissionActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
//intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK); // this close all activities with same taskAffinity
if (grantType == Permissions.GRANT_TYPE_INSTALL_TONE) {
mBuilder = new NotificationCompat.Builder(context)
.setSmallIcon(R.drawable.ic_pphelper_upgrade_notify) // notification icon
.setContentTitle(context.getString(R.string.app_name)) // title for notification
.setContentText(context.getString(R.string.permissions_for_install_tone_text_notification))
.setStyle(new NotificationCompat.BigTextStyle().bigText(context.getString(R.string.permissions_for_install_tone_big_text_notification)))
.setAutoCancel(true); // clear notification after click
notificationID = GlobalData.GRANT_INSTALL_TONE_PERMISSIONS_NOTIFICATION_ID;
}
else
if (grantType == Permissions.GRANT_TYPE_EVENT) {
mBuilder = new NotificationCompat.Builder(context)
.setSmallIcon(R.drawable.ic_pphelper_upgrade_notify) // notification icon
.setContentTitle(context.getString(R.string.app_name)) // title for notification
.setContentText(context.getString(R.string.permissions_for_event_text_notification)) // message for notification
.setAutoCancel(true); // clear notification after click
if (mergedNotification) {
mBuilder.setStyle(new NotificationCompat.BigTextStyle().bigText(context.getString(R.string.permissions_for_event_text1m) + " " +
context.getString(R.string.permissions_for_event_big_text_notification)));
}
else {
String text = context.getString(R.string.permissions_for_event_text1) + " ";
if (event != null)
text = text + "\"" + event._name + "\" ";
text = text + context.getString(R.string.permissions_for_event_big_text_notification);
mBuilder.setStyle(new NotificationCompat.BigTextStyle().bigText(text));
}
Intent deleteIntent = new Intent(NOTIFICATION_DELETED_ACTION);
PendingIntent deletePendingIntent = PendingIntent.getBroadcast(context, grantType, deleteIntent, 0);
mBuilder.setDeleteIntent(deletePendingIntent);
intent.putExtra(GlobalData.EXTRA_EVENT_ID, event._id);
notificationID = GlobalData.GRANT_EVENT_PERMISSIONS_NOTIFICATION_ID;
}
else {
mBuilder = new NotificationCompat.Builder(context)
.setSmallIcon(R.drawable.ic_pphelper_upgrade_notify) // notification icon
.setContentTitle(context.getString(R.string.app_name)) // title for notification
.setContentText(context.getString(R.string.permissions_for_profile_text_notification)) // message for notification
.setAutoCancel(true); // clear notification after click
if (mergedProfile || mergedNotification) {
mBuilder.setStyle(new NotificationCompat.BigTextStyle().bigText(context.getString(R.string.permissions_for_profile_text1m) + " " +
context.getString(R.string.permissions_for_profile_big_text_notification)));
}
else {
String text = context.getString(R.string.permissions_for_profile_text1) + " ";
if (profile != null)
text = text + "\"" + profile._name + "\" ";
text = text + context.getString(R.string.permissions_for_profile_big_text_notification);
mBuilder.setStyle(new NotificationCompat.BigTextStyle().bigText(text));
}
Intent deleteIntent = new Intent(NOTIFICATION_DELETED_ACTION);
PendingIntent deletePendingIntent = PendingIntent.getBroadcast(context, grantType, deleteIntent, 0);
mBuilder.setDeleteIntent(deletePendingIntent);
intent.putExtra(GlobalData.EXTRA_PROFILE_ID, profile._id);
intent.putExtra(Permissions.EXTRA_FOR_GUI, forGUI);
intent.putExtra(Permissions.EXTRA_MONOCHROME, monochrome);
intent.putExtra(Permissions.EXTRA_MONOCHROME_VALUE, monochromeValue);
notificationID = GlobalData.GRANT_PROFILE_PERMISSIONS_NOTIFICATION_ID;
}
permissions.clear();
intent.putExtra(Permissions.EXTRA_GRANT_TYPE, grantType);
intent.putParcelableArrayListExtra(Permissions.EXTRA_PERMISSION_TYPES, (ArrayList<Permissions.PermissionType>) permissions);
intent.putExtra(Permissions.EXTRA_ONLY_NOTIFICATION, false);
PendingIntent pi = PendingIntent.getActivity(context, grantType, intent, PendingIntent.FLAG_UPDATE_CURRENT);
mBuilder.setContentIntent(pi);
if (android.os.Build.VERSION.SDK_INT >= 16)
mBuilder.setPriority(Notification.PRIORITY_MAX);
if (android.os.Build.VERSION.SDK_INT >= 21)
{
mBuilder.setCategory(Notification.CATEGORY_RECOMMENDATION);
mBuilder.setVisibility(Notification.VISIBILITY_PUBLIC);
}
NotificationManager mNotificationManager = (NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);
mNotificationManager.notify(notificationID, mBuilder.build());
finish();
return;
}
else {
String showRequestString = "";
if (grantType == Permissions.GRANT_TYPE_INSTALL_TONE)
showRequestString = context.getString(R.string.permissions_for_install_tone_text1) + "<br><br>";
else if (grantType == Permissions.GRANT_TYPE_WALLPAPER)
showRequestString = context.getString(R.string.permissions_for_wallpaper_text1) + "<br><br>";
else if (grantType == Permissions.GRANT_TYPE_CUSTOM_PROFILE_ICON)
showRequestString = context.getString(R.string.permissions_for_custom_profile_icon_text1) + "<br><br>";
else if (grantType == Permissions.GRANT_TYPE_EXPORT)
showRequestString = context.getString(R.string.permissions_for_export_app_data_text1) + "<br><br>";
else if (grantType == Permissions.GRANT_TYPE_IMPORT)
showRequestString = context.getString(R.string.permissions_for_import_app_data_text1) + "<br><br>";
else if (grantType == Permissions.GRANT_TYPE_INSTALL_PPHELPER)
showRequestString = context.getString(R.string.permissions_for_install_pphelper_text1) + "<br><br>";
else if (grantType == Permissions.GRANT_TYPE_WIFI_BT_SCAN_DIALOG)
showRequestString = context.getString(R.string.permissions_for_wifi_bt_scan_dialog_text1) + "<br><br>";
else if (grantType == Permissions.GRANT_TYPE_CALENDAR_DIALOG)
showRequestString = context.getString(R.string.permissions_for_calendar_dialog_text1) + "<br><br>";
else if (grantType == Permissions.GRANT_TYPE_CONTACT_DIALOG)
showRequestString = context.getString(R.string.permissions_for_contacts_dialog_text1) + "<br><br>";
else
if (grantType == Permissions.GRANT_TYPE_EVENT){
if (mergedNotification) {
showRequestString = context.getString(R.string.permissions_for_event_text1m) + " ";
showRequestString = showRequestString + context.getString(R.string.permissions_for_event_text2) + "<br><br>";
}
else {
showRequestString = context.getString(R.string.permissions_for_event_text1) + " ";
if (event != null)
showRequestString = showRequestString + "\"" + event._name + "\" ";
showRequestString = showRequestString + context.getString(R.string.permissions_for_event_text2) + "<br><br>";
}
}
else {
if (mergedProfile || mergedNotification) {
showRequestString = context.getString(R.string.permissions_for_profile_text1m) + " ";
showRequestString = showRequestString + context.getString(R.string.permissions_for_profile_text2) + "<br><br>";
}
else {
showRequestString = context.getString(R.string.permissions_for_profile_text1) + " ";
if (profile != null)
showRequestString = showRequestString + "\"" + profile._name + "\" ";
showRequestString = showRequestString + context.getString(R.string.permissions_for_profile_text2) + "<br><br>";
}
}
if (showRequestWriteSettings) {
//Log.e("GrantPermissionActivity", "onStart - showRequestWriteSettings");
showRequestString = showRequestString + "<b>" + "\u2022 " + context.getString(R.string.permission_group_name_write_settings) + "</b>";
showRequestString = showRequestString + "<br>";
}
if (showRequestReadExternalStorage || showRequestWriteExternalStorage) {
//Log.e("GrantPermissionActivity", "onStart - showRequestReadExternalStorage");
showRequestString = showRequestString + "<b>" + "\u2022 " + context.getString(R.string.permission_group_name_storage) + "</b>";
showRequestString = showRequestString + "<br>";
}
if (showRequestReadPhoneState || showRequestProcessOutgoingCalls) {
//Log.e("GrantPermissionActivity", "onStart - showRequestReadPhoneState");
showRequestString = showRequestString + "<b>" + "\u2022 " + context.getString(R.string.permission_group_name_phone) + "</b>";
showRequestString = showRequestString + "<br>";
}
if (showRequestReadCalendar) {
//Log.e("GrantPermissionActivity", "onStart - showRequestReadCalendar");
showRequestString = showRequestString + "<b>" + "\u2022 " + context.getString(R.string.permission_group_name_calendar) + "</b>";
showRequestString = showRequestString + "<br>";
}
if (showRequestReadContacts) {
//Log.e("GrantPermissionActivity", "onStart - showRequestReadContacts");
showRequestString = showRequestString + "<b>" + "\u2022 " + context.getString(R.string.permission_group_name_contacts) + "</b>";
showRequestString = showRequestString + "<br>";
}
if (showRequestReceiveSMS || showRequestReadSMS) {
//Log.e("GrantPermissionActivity", "onStart - showRequestReceiveSMS");
showRequestString = showRequestString + "<b>" + "\u2022 " + context.getString(R.string.permission_group_name_sms) + "</b>";
showRequestString = showRequestString + "<br>";
}
if (showRequestAccessCoarseLocation || showRequestAccessFineLocation) {
//Log.e("GrantPermissionActivity", "onStart - showRequestReadCalendar");
showRequestString = showRequestString + "<b>" + "\u2022 " + context.getString(R.string.permission_group_name_location) + "</b>";
showRequestString = showRequestString + "<br>";
}
showRequestString = showRequestString + "<br>";
if (grantType == Permissions.GRANT_TYPE_INSTALL_TONE)
showRequestString = showRequestString + context.getString(R.string.permissions_for_install_tone_text2);
else if (grantType == Permissions.GRANT_TYPE_WALLPAPER)
showRequestString = showRequestString + context.getString(R.string.permissions_for_wallpaper_text2);
else if (grantType == Permissions.GRANT_TYPE_CUSTOM_PROFILE_ICON)
showRequestString = showRequestString + context.getString(R.string.permissions_for_custom_profile_icon_text2);
else if (grantType == Permissions.GRANT_TYPE_EXPORT)
showRequestString = showRequestString + context.getString(R.string.permissions_for_export_app_data_text2);
else if (grantType == Permissions.GRANT_TYPE_IMPORT)
showRequestString = showRequestString + context.getString(R.string.permissions_for_import_app_data_text2);
else if (grantType == Permissions.GRANT_TYPE_INSTALL_PPHELPER)
showRequestString = showRequestString + context.getString(R.string.permissions_for_install_pphelper_text2);
else if (grantType == Permissions.GRANT_TYPE_WIFI_BT_SCAN_DIALOG)
showRequestString = showRequestString + context.getString(R.string.permissions_for_wifi_bt_scan_dialog_text2);
else if (grantType == Permissions.GRANT_TYPE_CALENDAR_DIALOG)
showRequestString = showRequestString + context.getString(R.string.permissions_for_calendar_dialog_text2);
else if (grantType == Permissions.GRANT_TYPE_CONTACT_DIALOG)
showRequestString = showRequestString + context.getString(R.string.permissions_for_contacts_dialog_text2);
else if (grantType == Permissions.GRANT_TYPE_EVENT)
showRequestString = showRequestString + context.getString(R.string.permissions_for_event_text3);
else
showRequestString = showRequestString + context.getString(R.string.permissions_for_profile_text3);
// set theme and language for dialog alert ;-)
// not working on Android 2.3.x
GUIData.setTheme(this, true, false);
GUIData.setLanguage(this.getBaseContext());
final boolean _showRequestWriteSettings = showRequestWriteSettings;
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this);
dialogBuilder.setTitle(R.string.permissions_alert_title);
dialogBuilder.setMessage(Html.fromHtml(showRequestString));
dialogBuilder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
requestPermissions(_showRequestWriteSettings);
}
});
dialogBuilder.setOnCancelListener(new DialogInterface.OnCancelListener() {
@Override
public void onCancel(DialogInterface dialog) {
finish();
Permissions.releaseReferences();
if (mergedNotification)
GlobalData.clearMergedPermissions(context);
}
});
dialogBuilder.show();
}
}
else {
requestPermissions(showRequestWriteSettings);
}
}
@Override
protected void onDestroy()
{
super.onDestroy();
}
@Override
public void onRequestPermissionsResult(int requestCode,
String permissions[], int[] grantResults) {
switch (requestCode) {
case PERMISSIONS_REQUEST_CODE: {
// If request is cancelled, the result arrays are empty.
boolean allGranted = true;
for (int i=0; i < grantResults.length; i++) {
if (grantResults[i] == PackageManager.PERMISSION_DENIED) {
allGranted = false;
break;
}
}
if (allGranted) {
finishGrant();
} else {
if (!onlyNotification) {
Context context = getApplicationContext();
Toast msg = Toast.makeText(context,
context.getResources().getString(R.string.app_name) + ": " +
context.getResources().getString(R.string.toast_permissions_not_granted),
Toast.LENGTH_SHORT);
msg.show();
}
finish();
Permissions.releaseReferences();
if (mergedNotification)
GlobalData.clearMergedPermissions(getApplicationContext());
}
return;
}
// other 'case' lines to check for other
// permissions this app might request
}
}
@TargetApi(Build.VERSION_CODES.M)
public void onActivityResult(int requestCode, int resultCode, Intent data) {
final Context context = getApplicationContext();
if (requestCode == WRITE_SETTINGS_REQUEST_CODE) {
if (!Settings.System.canWrite(context)) {
AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(this);
dialogBuilder.setTitle(R.string.permissions_alert_title);
dialogBuilder.setMessage(R.string.permissions_write_settings_not_allowed_confirm);
dialogBuilder.setPositiveButton(R.string.alert_button_yes, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
GlobalData.setShowRequestWriteSettingsPermission(context, false);
requestPermissions(false);
}
});
dialogBuilder.setNegativeButton(R.string.alert_button_no, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
GlobalData.setShowRequestWriteSettingsPermission(context, true);
requestPermissions(false);
}
});
dialogBuilder.setOnCancelListener(new DialogInterface.OnCancelListener() {
@Override
public void onCancel(DialogInterface dialog) {
requestPermissions(false);
}
});
dialogBuilder.show();
}
else {
GlobalData.setShowRequestWriteSettingsPermission(context, true);
requestPermissions(false);
}
}
}
private void requestPermissions(boolean writeSettings) {
if (writeSettings) {
boolean writeSettingsFound = false;
for (Permissions.PermissionType permissionType : permissions) {
if (permissionType.permission.equals(Manifest.permission.WRITE_SETTINGS)) {
writeSettingsFound = true;
final Intent intent = new Intent(android.provider.Settings.ACTION_MANAGE_WRITE_SETTINGS);
startActivityForResult(intent, WRITE_SETTINGS_REQUEST_CODE);
break;
}
}
if (!writeSettingsFound)
requestPermissions(false);
}
else {
List<String> permList = new ArrayList<String>();
for (Permissions.PermissionType permissionType : permissions) {
if ((!permissionType.permission.equals(Manifest.permission.WRITE_SETTINGS)) &&
(!permList.contains(permissionType.permission))) {
//Log.e("GrantPermissionActivity", "requestPermissions - permission=" + permissionType.permission);
permList.add(permissionType.permission);
}
}
//Log.e("GrantPermissionActivity", "requestPermissions - permList.size=" + permList.size());
if (permList.size() > 0) {
String[] permArray = new String[permList.size()];
for (int i = 0; i < permList.size(); i++) permArray[i] = permList.get(i);
ActivityCompat.requestPermissions(this, permArray, PERMISSIONS_REQUEST_CODE);
}
else
finishGrant();
}
}
private void finishGrant() {
Context context = getApplicationContext();
ActivateProfileHelper activateProfileHelper = dataWrapper.getActivateProfileHelper();
activateProfileHelper.initialize(dataWrapper, Permissions.profileActivationActivity, context);
if (forGUI && (profile != null))
{
// regenerate profile icon
dataWrapper.refreshProfileIcon(profile, monochrome, monochromeValue);
}
if (grantType == Permissions.GRANT_TYPE_INSTALL_TONE) {
//finishAffinity();
finish();
Permissions.removeInstallToneNotification(context);
FirstStartService.installTone(FirstStartService.TONE_ID, FirstStartService.TONE_NAME, context, true);
}
else
if (grantType == Permissions.GRANT_TYPE_WALLPAPER) {
finish();
if (Permissions.imageViewPreference != null)
Permissions.imageViewPreference.startGallery();
}
else
if (grantType == Permissions.GRANT_TYPE_CUSTOM_PROFILE_ICON) {
finish();
if (Permissions.profileIconPreference != null)
Permissions.profileIconPreference.startGallery();
}
else
if (grantType == Permissions.GRANT_TYPE_EXPORT) {
finish();
if (Permissions.editorActivity != null)
Permissions.editorActivity.doExportData();
}
else
if (grantType == Permissions.GRANT_TYPE_IMPORT) {
finish();
if (Permissions.editorActivity != null)
Permissions.editorActivity.doImportData(applicationDataPath);
}
else
if (grantType == Permissions.GRANT_TYPE_INSTALL_PPHELPER) {
finish();
if (Permissions.editorActivity != null)
PhoneProfilesHelper.doInstallPPHelper(Permissions.editorActivity);
}
else
if (grantType == Permissions.GRANT_TYPE_WIFI_BT_SCAN_DIALOG) {
if (Permissions.wifiSSIDPreference != null)
Permissions.wifiSSIDPreference.refreshListView(true);
if (Permissions.bluetoothNamePreference != null)
Permissions.bluetoothNamePreference.refreshListView(true);
dataWrapper.restartEvents(false, true);
WifiScanAlarmBroadcastReceiver.setAlarm(context, true, false);
BluetoothScanAlarmBroadcastReceiver.setAlarm(context, true, false);
finish();
}
else
if (grantType == Permissions.GRANT_TYPE_CALENDAR_DIALOG) {
if (Permissions.calendarsMultiSelectDialogPreference != null)
Permissions.calendarsMultiSelectDialogPreference.refreshListView();
dataWrapper.restartEvents(false, true);
finish();
}
else
if (grantType == Permissions.GRANT_TYPE_CONTACT_DIALOG) {
if (Permissions.contactsMultiSelectDialogPreference != null)
Permissions.contactsMultiSelectDialogPreference.refreshListView();
if (Permissions.contactGroupsMultiSelectDialogPreference != null)
Permissions.contactGroupsMultiSelectDialogPreference.refreshListView();
dataWrapper.restartEvents(false, true);
finish();
}
else
if (grantType == Permissions.GRANT_TYPE_EVENT) {
//finishAffinity();
finish();
Permissions.removeEventNotification(context);
dataWrapper.restartEvents(false, true);
for (Permissions.PermissionType permissionType : permissions) {
if (permissionType.permission.equals(Manifest.permission.ACCESS_COARSE_LOCATION) ||
permissionType.permission.equals(Manifest.permission.ACCESS_FINE_LOCATION)) {
WifiScanAlarmBroadcastReceiver.setAlarm(context, true, false);
BluetoothScanAlarmBroadcastReceiver.setAlarm(context, true, false);
break;
}
}
}
else {
//finishAffinity();
finish();
Permissions.removeProfileNotification(context);
dataWrapper._activateProfile(profile, mergedProfile, startupSource, interactive,
Permissions.profileActivationActivity, eventNotificationSound, log);
}
Permissions.releaseReferences();
if (mergedNotification)
GlobalData.clearMergedPermissions(context);
//if (grantType != Permissions.GRANT_TYPE_PROFILE) {
Profile activatedProfile = dataWrapper.getActivatedProfile();
if ((activatedProfile == null) || (activatedProfile._id == profile_id))
activateProfileHelper.showNotification(profile, "");
activateProfileHelper.updateWidget();
Intent intent5 = new Intent();
intent5.setAction(RefreshGUIBroadcastReceiver.INTENT_REFRESH_GUI);
intent5.putExtra(RefreshGUIBroadcastReceiver.EXTRA_REFRESH_ICONS, true);
context.sendBroadcast(intent5);
//}
}
}
| [
"henrich.gron@chello.sk"
] | henrich.gron@chello.sk |
047e8e0c9a43b4f26e52a0596de8d8f390359e60 | 14f2d9d20904f0a3db48825288c93666b3385cca | /src/main/java/com/deltaa/app/todo/HomeController.java | bb763714bdf5bf8e573e49564f071a82feca730c | [] | no_license | Malaka/superduper | 275a236e472b7854feb13cf5a8459206b8a0c82b | 05c18d7ec1fd4d1b95623ad28181127ec7cc675f | refs/heads/master | 2021-01-20T02:37:53.050069 | 2017-04-26T03:42:41 | 2017-04-26T03:42:41 | 89,432,303 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 294 | java | package com.deltaa.app.todo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
/**
*
* @author malaka
*/
@Controller
public class HomeController {
@RequestMapping(value = "/")
public String index() {
return "index";
}
} | [
"malaka@proavos.com"
] | malaka@proavos.com |
4b79fbc2014bdcfe52ea5a0f17c34967d1290b92 | 8858e08c02f62fa86bd5d10c69cdb414ed68105d | /CatalogItem.java | 5d42b178f974ff34ddc575b2bfa35c13fbd0341e | [] | no_license | akhilgangidi/OnlineStore | 891880c128a423f3ba15e8d4ca2479df7628de92 | ce48673c4c478ac64e7b34a403e9ad42fd270c14 | refs/heads/master | 2020-05-26T01:58:53.869689 | 2019-05-22T15:46:27 | 2019-05-22T15:46:27 | 188,068,760 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 522 | java | public class CatalogItem //declares the CatalogItem superclass
{
//defines private variables for CatalogItem class
private String title;
private double price;
public CatalogItem(String title, double price) //CatalogItem constructor
{
this.title = title; //sets title to title
this.price = price; //sets price to price
}
public String getTitle() //defines getTitle method and returns title
{
return title;
}
public double getPrice() //defines getPrice method and returns price
{
return price;
}
}
| [
"noreply@github.com"
] | noreply@github.com |
49697a4c837dd2838c4bdacbb2af01a3b6c58471 | 6e5284b89323cc811b73f7bbebb8c858a56905dd | /HealthCare/src/main/java/com/capg/Service/HealthServiceImpl.java | 9ebbe86b49beb51e73b52442e678ab40c86199a4 | [] | no_license | bhavya123423/Healthcare | 0a06a50817c72055b3c32490b8859523ddf66e0c | e76d2f2c9f58720072d7614e45d6d562d3b2c0ab | refs/heads/master | 2021-01-13T19:41:27.620129 | 2020-02-24T05:30:26 | 2020-02-24T05:30:26 | 242,473,187 | 0 | 0 | null | 2020-10-13T19:45:56 | 2020-02-23T07:12:47 | Java | UTF-8 | Java | false | false | 1,303 | java | package com.capg.Service;
import java.util.Date;
import java.util.List;
import java.util.Random;
import com.capg.DAO.HealthDao;
import com.capg.DAO.HealthDaoImpl;
import com.capg.DTO.DiagnosticCenter;
import com.capg.DTO.Test;
import com.capg.HealthException.HealthException;
public class HealthServiceImpl implements HealthService{
private HealthDao healthDao;
public HealthServiceImpl()
{
healthDao = new HealthDaoImpl();
}
public boolean validateName(String testName) throws HealthException {
boolean flag =false;
flag=testName.matches("[a-zA-Z]+");
return flag;
}
public boolean addCenter(DiagnosticCenter center) throws HealthException {
String name = center.getCenterName();
boolean flag =name.matches("[a-zA-Z]+");
if(!flag)
{
throw new HealthException("Center name should contain only alphabets");
}
Random random = new Random();
int centerid = random.nextInt(100)+1000;
String s=Integer.toString(centerid);
center.setCenterId(s);
healthDao.addCenter(center);
return false;
}
public boolean removeTest(Test test) throws HealthException {
return healthDao.removeTest(test);
}
public List<DiagnosticCenter> displaycenter() throws HealthException {
return healthDao.displaycenter();
}
}
| [
"BVRIT@PLACEMENT-LAB-19"
] | BVRIT@PLACEMENT-LAB-19 |
cf2a93b642f8027a235f6670f5537eadcbe2a7bb | 9b30f5ef60f11dd7b9236da8f14a36b019568db3 | /src/main/java/com/example/RestaurantTest1/dao/FoodItemDAO.java | 90e193ff7e529906af4347ed8b2a0de69c75ef5b | [] | no_license | shalinikaMalshani/Hotel-Management | 5d808ea7f03d6e74c8f6f91b724b303d5673e36b | 36db75a7c27cacd017af29bde81a89f99e7a8e91 | refs/heads/master | 2023-07-19T04:56:22.514684 | 2021-08-28T01:38:45 | 2021-08-28T01:38:45 | 398,779,960 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 456 | java | package com.example.RestaurantTest1.dao;
import com.example.RestaurantTest1.dto.FoodItemDTO;
import com.example.RestaurantTest1.entity.FoodItem;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface FoodItemDAO extends CrudRepository<FoodItem,Integer> {
FoodItem findTopByOrderByFoodIdDesc();
}
| [
"it20233976@my.sliit.lk"
] | it20233976@my.sliit.lk |
820eeea79e47db7a5ed0e5cfcd96eb389688ee44 | eebaf695049237086cd0102a4b5988afd3b4b40a | /src/dao/DBManager.java | cdc7079bd3866eaa764d9056061192bc4689ecb3 | [] | no_license | YamashitaTatsuya/PrivateWork | ca162db97dbb3f5689d4ea78bbc6075c6466aecd | fde92778e4709cfd72f015e561972fd6624e43c0 | refs/heads/master | 2020-04-13T07:24:02.112387 | 2018-12-28T09:54:49 | 2018-12-28T09:54:49 | 163,050,720 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 831 | java | package dao;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
/**
* DB接続処理全般
* @author takano
*/
public class DBManager {
final private static String URL = "jdbc:mysql://localhost/";
final private static String DB_NAME = "abcd?characterEncoding=utf8";
final private static String USER = "root";
final private static String PASS = "password";
/**
* DBへ接続するコネクションを返す
*/
public static Connection getConnection() {
Connection con = null;
try {
Class.forName("com.mysql.jdbc.Driver");
con = DriverManager.getConnection(URL+DB_NAME,USER,PASS);
} catch (SQLException | ClassNotFoundException e) {
e.printStackTrace();
}
return con;
}
}
| [
"tatsuya.yamashita.likeit@gmail.com"
] | tatsuya.yamashita.likeit@gmail.com |
46bdb6d357adbcbc5c874a72033ab978a912e853 | 64c80fcda57d935fc038245f3873dddc2811e1e0 | /src/main/java/innerAnonimousClasses/MyListener.java | 81858362a2e5085574b2b7f5a38e6df55ca2c4f6 | [] | no_license | Jeka1978/db-demo | 0eb996e4ca2a0b2217b8d1e72f500992e8399a57 | 9c7fc72a6f3a196d3b9856c9389e6bca75dc5c7e | refs/heads/master | 2020-12-05T14:57:44.385719 | 2016-08-30T13:38:11 | 2016-08-30T13:38:11 | 66,273,465 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 354 | java | package innerAnonimousClasses;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.lang.ref.WeakReference;
/**
* Created by Jeka on 23/08/2016.
*/
public class MyListener implements ActionListener {
@Override
public void actionPerformed(ActionEvent e) {
System.out.println("I'm clicked");
}
}
| [
"bsevgeny@gmail.com"
] | bsevgeny@gmail.com |
2c68eb7bed91a60a82706571be2764dcbc484bae | bf99900c496fea063bf1f35dbcca826c5a639612 | /src/test/java/umm3601/todos/FullTodosListSpec.java | f490730ea1d7c7abfb05c5eaa52b39b3629a5004 | [] | no_license | UMM-CSci-3601-S17/lab-2-client-server-design-brittneyandy | be57b1285ee4454aed325ed6836b176bcef8e206 | 7c36cffb8275076869534c1ebaeedac09ec1598a | refs/heads/master | 2021-06-11T07:57:40.119214 | 2017-02-09T06:52:50 | 2017-02-09T06:52:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,224 | java | package umm3601.todos;
import org.junit.Test;
import umm3601.todos.Todos;
import umm3601.todos.TodosController;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import static org.junit.Assert.assertEquals;
public class FullTodosListSpec {
@Test
public void totalTodosCount() throws IOException {
TodosController todosController = new TodosController();
Todos[] allTodos = todosController.listTodos(new HashMap<>());
assertEquals("Incorrect total number of todos", 300, allTodos.length);
}
@Test
public void firstTodosInFullTodosList() throws IOException {
TodosController todosController = new TodosController();
Todos[] allTodos = todosController.listTodos(new HashMap<>());
Todos firstTodos = allTodos[0];
assertEquals("Incorrect owner", "Blanche", firstTodos.owner);
assertEquals("Incorrect status", false, firstTodos.status);
assertEquals("Incorrect body", "In sunt ex non tempor cillum commodo amet incididunt anim qui commodo quis. Cillum non labore ex sint esse.", firstTodos.body);
assertEquals("Incorrect category", "software design", firstTodos.category);
}
}
| [
"lauxx265@morris.umn.edu"
] | lauxx265@morris.umn.edu |
150c445d80aa480a415a776228059cad9308f49e | 01b7d483637636c661b903e58c6454359490221b | /S9. Inner and Abstract Classes and Interfaces/3. Abstract_classes_basics/src/com/victor/Dog.java | 9f650e6debac97421eda64f69d51d5e2e68b8e94 | [] | no_license | Vyankovich/Complete-Java-Masterclass---updated-for-Java-10 | 031a3796f01030c1712c8431bce33e27e3b407f7 | 25d62ade128625c73608469ed8c7f4bf9a3f6bfa | refs/heads/master | 2021-07-11T06:45:40.895559 | 2019-03-04T21:09:55 | 2019-03-04T21:09:55 | 147,878,705 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 364 | java | package com.victor;
/**
* Created by dev on 27.10.2018.
*/
public class Dog extends Animal{
public Dog(String name) {
super(name);
}
@Override
public void eat() {
System.out.println(getName() + " is eating");
}
@Override
public void breath() {
System.out.println("Breath in, breath out, repeat");
}
}
| [
"victor.yankovich@gmail.com"
] | victor.yankovich@gmail.com |
612f678b01200a200d55457d6e7d79c2bc17ef04 | b5b3679e9232b7c50dfbcdada12575c80ae0506e | /SOAP-WS/Lab0201 -Client CMD Junit/src/test/java/org/testplayground/consumer/GetEmployeeById.java | c9c9737a01a72da5f39cbd1a173e1163b27926ac | [] | no_license | AhmedWael25/web_projects | bd6d442b6207073dc8c196583abd1b9ed22680c8 | f50629c2167f03667e8c27e17a634ffb4ab3ac85 | refs/heads/master | 2023-04-29T06:03:58.454446 | 2021-05-22T18:54:45 | 2021-05-22T18:54:45 | 348,258,506 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,368 | java |
package org.testplayground.consumer;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlType;
/**
* <p>Java class for getEmployeeById complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="getEmployeeById">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="arg0" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "getEmployeeById", propOrder = {
"arg0"
})
public class GetEmployeeById {
protected Integer arg0;
/**
* Gets the value of the arg0 property.
*
* @return
* possible object is
* {@link Integer }
*
*/
public Integer getArg0() {
return arg0;
}
/**
* Sets the value of the arg0 property.
*
* @param value
* allowed object is
* {@link Integer }
*
*/
public void setArg0(Integer value) {
this.arg0 = value;
}
}
| [
"ahmedwaela25@gmail.com"
] | ahmedwaela25@gmail.com |
59bea51876802e0a6a7e8b0f1bd52de949e1daf7 | 349e9dcdff99fbfb0be2786a8c627fc845512c7c | /aliyunplayerlib/src/main/java/com/readboy/aliyunplayerlib/view/PlayerIdleViewBase.java | a306c874510bcc5445349ef36b83e5f5f32afe14 | [] | no_license | MyJesus/MathProblem | eafd0f89620ee97e664809ce74d149ff8fdf1edc | 504fbb867079aec8987bca5aa49b3b1ddca198b2 | refs/heads/master | 2020-04-11T10:33:38.582483 | 2018-12-14T02:04:27 | 2018-12-14T02:04:27 | 161,719,054 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,018 | java | package com.readboy.aliyunplayerlib.view;
import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.RelativeLayout;
/**
* 播放器闲置布局抽象类。
* 自定义闲置布局必须继承该抽象类。
* Created by ldw on 2018/4/19.
*/
public abstract class PlayerIdleViewBase extends RelativeLayout {
protected abstract int getLayoutXml();
protected abstract void initViews();
public PlayerIdleViewBase(Context context) {
super(context);
init();
}
public PlayerIdleViewBase(Context context, AttributeSet attrs) {
super(context, attrs);
init();
}
public PlayerIdleViewBase(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
init();
}
private void init(){
LayoutInflater.from(this.getContext()).inflate(getLayoutXml(), this, true);
initViews();
}
}
| [
"1119723650@qq.com"
] | 1119723650@qq.com |
174c5dee5bb42f4b0049a33cc4f08ea6337256c7 | 463ce99463420844c71d4962dd92229a6cfd7cb6 | /src/main/java/com/bluewhite/portal/common/annotation/ClearCascade.java | d498e972292d0c07e1a1f16d222ec0be4417623d | [] | no_license | jieziz/portal | 241fd758a124aa0ec6997dfdf60cc6ce9a7931ea | b4469f5d0bde34e8f1bc3065039fe175a7acf87e | refs/heads/master | 2021-09-22T15:00:18.545750 | 2018-09-11T07:45:28 | 2018-09-11T07:45:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,093 | java | package com.bluewhite.portal.common.annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import java.lang.annotation.ElementType;
import java.lang.annotation.RetentionPolicy;
/**
* 提供清除级联关系注解,<b>该注解仅对Action中返回值为CommonResponse的方法自动格式化,其余还需手动调用format()</b>
* @author xlsiek
*
*/
@Target({ ElementType.METHOD })
@Retention(value = RetentionPolicy.RUNTIME)
@Inherited
@Documented
public @interface ClearCascade {
/**
* 标注输出格式为timestamp,日期类自动转换,true timestamp,false string。默认string
* @return boolean
*/
boolean dateToTimestamp() default false;
/**
* 过滤条款
* @return filter[]
*/
FilterRetainTerm[] filter() default {};
/**
* 保留条款
* @return retain[]
*/
FilterRetainTerm[] retain() default {};
/**
*
* @return extract()
*/
Extract extract() default @Extract(items = {});
ExtractRenameTerm[] rename() default {};
}
| [
"597929460@qq.com"
] | 597929460@qq.com |
5b18039f83f5ac5fa8006b01cf96f13dd8479443 | 0765abad4f670fea61364b6bfd0a89194a8ba0e0 | /app/src/androidTest/java/com/example/bendenisshaffer/multiactivityapp/ExampleInstrumentedTest.java | 88d97625965fefa86ea94af05ae2bdf21f196ea1 | [] | no_license | bendenis/MultiActivityApp | 5dbf536f5259651131da3ecfbd37570b968fe1bb | 07fb0ba38d00edc7296cce66a83e94e18805789a | refs/heads/master | 2021-08-14T08:49:24.301285 | 2017-11-15T06:13:19 | 2017-11-15T06:13:19 | 110,791,578 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 789 | java | package com.example.bendenisshaffer.multiactivityapp;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() throws Exception {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.example.bendenisshaffer.multiactivityapp", appContext.getPackageName());
}
}
| [
"bdshaff@umich.edu"
] | bdshaff@umich.edu |
83abed4350a482a4dd5bcdc1500cb7fcc4d59055 | 8ff74fd0f2cfa97be552e4165a17d7aecaac45e2 | /BaseProject/src/main/java/BaseProject/Implementation17.java | cde4653084f21b1a249b6a7978cbee5d6e43ac24 | [] | no_license | patrickbaumann/daggervsroboguice | 6a663509485a5f1b0e34fa55b7d02b52296ff9f7 | 01b7567186feb27867a1eb21ba260fb623c315f8 | refs/heads/master | 2020-12-24T13:28:50.311709 | 2013-06-18T20:05:40 | 2013-06-18T20:05:40 | 6,273,479 | 1 | 1 | null | 2013-06-18T20:05:42 | 2012-10-18T05:27:02 | Java | UTF-8 | Java | false | false | 362 | java | package BaseProject;
import javax.inject.Inject;
public class Implementation17 implements Interface17 {
private final Interface18 dependency;
@Inject
public Implementation17(Interface18 dependency){
this.dependency = dependency;
}
@Override
public String getString(){
return "17..." + dependency.getString();
}
}
| [
"patrick@patrick-Aspire-5745G.(none)"
] | patrick@patrick-Aspire-5745G.(none) |
7f1a01378c74ae76810af6bf7b0e2d8010b1adc5 | ab32f312c34ac368ac6da540b76469bf8fac1b78 | /src/test/java/pageObjects/HeaderPage.java | 1f98797d6f3e644f2247c175f963bda1cb58730f | [] | no_license | rulincab/renfeProject | 42a7eca2c32f5fb8f285b452c8acc8435f65c448 | 83b4fd5f11f225a1434051d6c9b614fa8021c8d0 | refs/heads/master | 2023-04-12T18:39:12.198845 | 2021-05-03T13:27:23 | 2021-05-03T13:27:23 | 363,709,516 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,033 | java | package pageObjects;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
public class HeaderPage {
public HeaderPage(WebDriver browser){
}
//locators
@FindBy(css = ".rf-header__principal > li:nth-of-type(1)")
private WebElement travelMenu;
@FindBy(css = ".rf-header__principal > li:nth-of-type(2)")
private WebElement ExperienceMenu;
@FindBy(css = ".rf-header__principal > li:nth-of-type(3)")
private WebElement surroundingsMenu;
@FindBy(css = ".rf-header__tools > li:nth-of-type(1)")
private WebElement helpOption;
@FindBy(css = ".rf-header__tools > li:nth-of-type(2)")
private WebElement renfeGroupMenu;
@FindBy(css = ".rf-header__tools > li:nth-of-type(3)")
private WebElement searchOption;
@FindBy(css = ".rf-header__tools > li:nth-of-type(4)")
private WebElement lenguangeMenu;
@FindBy(css = ".rf-header__tools > li:nth-of-type(5)")
private WebElement profileOption;
}
| [
"esalgue@US-C02F235LMD6M"
] | esalgue@US-C02F235LMD6M |
4880cac1f89d64dbf9bdf707ec96ad173223115f | 1155e95c48e8da1db61b4e5742b2975657debc7d | /src/com/voip/steganography/packts/IpAddress.java | 32f756c42606dbf5366026ba24f71805048b518f | [] | no_license | subash81/STEGONOGRAPHY-Skype | 1c54fd8ab2e89c0d81aef729afd41e31f1f021ec | 90cca32e559da3ab3209a7e0f7aba76473cfb175 | refs/heads/master | 2021-08-23T07:15:53.556174 | 2017-12-04T03:08:15 | 2017-12-04T03:08:15 | 112,988,215 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,043 | java | /*
* Copyright (C) 2005 Luca Veltri - University of Parma - Italy
*
* This source code is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This source code is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this source code; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Author(s):
* Luca Veltri (luca.veltri@unipr.it)
*/
package com.voip.steganography.packts;
import java.net.InetAddress;
/**
* IpAddress is an IP address.
*/
public class IpAddress {
/** The host address/name */
String address;
/** The InetAddress */
InetAddress inet_address;
// ********************* Protected *********************
/** Creates an IpAddress */
IpAddress(InetAddress iaddress) {
init(null, iaddress);
}
/** Inits the IpAddress */
private void init(String address, InetAddress iaddress) {
this.address = address;
this.inet_address = iaddress;
}
/** Gets the InetAddress */
InetAddress getInetAddress() {
if (inet_address == null)
try {
inet_address = InetAddress.getByName(address);
} catch (java.net.UnknownHostException e) {
inet_address = null;
}
return inet_address;
}
// ********************** Public ***********************
/** Creates an IpAddress */
public IpAddress(String address) {
init(address, null);
}
/** Creates an IpAddress */
public IpAddress(IpAddress ipaddr) {
init(ipaddr.address, ipaddr.inet_address);
}
/** Gets the host address */
/*
* public String getAddress() { if (address==null)
* address=inet_address.getHostAddress(); return address; }
*/
/** Makes a copy */
public Object clone() {
return new IpAddress(this);
}
/** Wthether it is equal to Object <i>obj</i> */
public boolean equals(Object obj) {
try {
IpAddress ipaddr = (IpAddress) obj;
if (!toString().equals(ipaddr.toString()))
return false;
return true;
} catch (Exception e) {
return false;
}
}
/** Gets a String representation of the Object */
public String toString() {
if (address == null && inet_address != null)
address = inet_address.getHostAddress();
return address;
}
// *********************** Static ***********************
/** Gets the IpAddress for a given fully-qualified host name. */
public static IpAddress getByName(String host_addr)
throws java.net.UnknownHostException {
InetAddress iaddr = InetAddress.getByName(host_addr);
return new IpAddress(iaddr);
}
/** Detects the default IP address of this host. */
public static IpAddress getLocalHostAddress() {
try {
return new IpAddress(java.net.InetAddress.getLocalHost());
} catch (java.net.UnknownHostException e) {
return new IpAddress("127.0.0.1");
}
}
}
| [
"subashskumar@gmail.com"
] | subashskumar@gmail.com |
a8db3b436cbeb0ecbc338492bc8dd7f5fd27f574 | 6ecdad0f4f7ff12c6c9a97bb90f85b9f1dd951ec | /FlowSpot/java/com/cloudrail/userInterface/FlowSpot.java | c3fb695646e704850e36997f4c4c44b487387940 | [
"Apache-2.0"
] | permissive | ortenburger/hackathon | 4400aa6767f83572e1d3affeabd26ea27e160961 | 4a2735d7f6f5b1e41541e8ce594e89b49c74dcec | refs/heads/master | 2020-12-29T04:21:01.124355 | 2016-05-22T11:17:17 | 2016-05-22T11:17:17 | 56,376,210 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 40,999 | java | package com.cloudrail.userInterface;
import java.util.HashMap;
import com.cloudrail.userInterface.Endpoint;
import com.cloudrail.userInterface.EndpointCallResponseListener;
import com.cloudrail.userInterface.Endpoint.WebAuthorization;
import java.util.List;
import java.util.Map;
import com.cloudrail.exception.CloudRailException;
import java.io.InputStream;
import com.cloudrail.auth.UriRedirectListener;
import com.cloudrail.auth.UriView;
import com.cloudrail.userInterface.AccessTokenCallback;
public class FlowSpot {
private Endpoint endpoint;
/**
*
* @param philipshueapi_ipaddress
* @param googletasks_clientidentifier The client ID you obtain from the Developers Console.
* @param googletasks_redirecturi Determines where the response is sent.
* @param googletasks_clientsecret Clients secret.
* @param facebookgraphapi_clientidentifier Register an app @ developer.facebook.com to get the credentials
* @param facebookgraphapi_uri OAuth 2.0 redirect address of your server
* @param facebookgraphapi_scope The permissions to be requested, see
https://developers.facebook.com/docs/facebook-login/permissions
for an overview
* @param facebookgraphapi_clientsecret See app-id
* @param facebookgraphapi_csrftoken The OAuth 2.0 state
* @param netatmoweatherstationapi_clientidentifier The client id retrieved from the Netatmo app creation page.
* @param netatmoweatherstationapi_uri After granting access the user is redirected to the callback URL defined in your application settings or to the redirect_uri provided in the request in order to finish the authorization flow.
* @param netatmoweatherstationapi_csrftoken To ensure the security of the process, you should generate and store a state parameter which is unique to this request. The state parameter is an arbitrary string you choose. Its value will be passed back to your application as a parameter of the redirect_uri when the user completes the authentication flow.
* @param netatmoweatherstationapi_clientsecret The client secret retrieved from the Netatmo app creation page.
*/
public FlowSpot(String philipshueapi_ipaddress, String googletasks_clientidentifier, String googletasks_redirecturi, String googletasks_clientsecret, String facebookgraphapi_clientidentifier, String facebookgraphapi_uri, String facebookgraphapi_scope, String facebookgraphapi_clientsecret, String facebookgraphapi_csrftoken, String netatmoweatherstationapi_clientidentifier, String netatmoweatherstationapi_uri, String netatmoweatherstationapi_csrftoken, String netatmoweatherstationapi_clientsecret) {
HashMap<String, Object> globals = new HashMap<String, Object>();
globals.put("philipshueapi_ipaddress", philipshueapi_ipaddress);
globals.put("googletasks_clientidentifier", googletasks_clientidentifier);
globals.put("googletasks_redirecturi", googletasks_redirecturi);
globals.put("googletasks_clientsecret", googletasks_clientsecret);
globals.put("facebookgraphapi_clientidentifier", facebookgraphapi_clientidentifier);
globals.put("facebookgraphapi_uri", facebookgraphapi_uri);
globals.put("facebookgraphapi_scope", facebookgraphapi_scope);
globals.put("facebookgraphapi_clientsecret", facebookgraphapi_clientsecret);
globals.put("facebookgraphapi_csrftoken", facebookgraphapi_csrftoken);
globals.put("netatmoweatherstationapi_clientidentifier", netatmoweatherstationapi_clientidentifier);
globals.put("netatmoweatherstationapi_uri", netatmoweatherstationapi_uri);
globals.put("netatmoweatherstationapi_csrftoken", netatmoweatherstationapi_csrftoken);
globals.put("netatmoweatherstationapi_clientsecret", netatmoweatherstationapi_clientsecret);
try{
endpoint = new Endpoint(getClass().getResourceAsStream("FlowSpot.cloudrail"), globals);
}catch(Exception e) {
throw new CloudRailException(e);
}
}
/**
*
* @param accesstoken Access token obtained by the authorization request. Used to authenticate this request.
* @param answer The ResponseListener for this asynchronous call
*/
public void getDevicelist(String accesstoken, final GetDevicelistResponseListener answer) {
HashMap<String, Object> inputs = new HashMap<String, Object>();
inputs.put("accesstoken", accesstoken);
endpoint.call("Get Devicelist", inputs, new EndpointCallResponseListener() {
public void onSuccess(Map<String,Object> result) {
answer.onSuccess((String) result.get("status"), (List<Object>) result.get("device_list"));
}
public void onError(CloudRailException error) {
answer.onError(error);
}
public void onProgress(double percentFinished) {
answer.onProgress(percentFinished);
}});
}
/**
*
* @param accesstoken Access token obtained by the authorization request. Used to authenticate this request.
* @param identifier The device / weather station you want to obtain data from.
* @param answer The ResponseListener for this asynchronous call
*/
public void getMeasure(String accesstoken, String identifier, final GetMeasureResponseListener answer) {
HashMap<String, Object> inputs = new HashMap<String, Object>();
inputs.put("accesstoken", accesstoken);
inputs.put("identifier", identifier);
endpoint.call("Get Measure", inputs, new EndpointCallResponseListener() {
public void onSuccess(Map<String,Object> result) {
answer.onSuccess((List<Object>) result.get("list_measure"), (String) result.get("status"));
}
public void onError(CloudRailException error) {
answer.onError(error);
}
public void onProgress(double percentFinished) {
answer.onProgress(percentFinished);
}});
}
/**
*
* @param devicetype An identifier of the form [application_name]#[devicename], e.g. my_hue_app#iphone peter
Restrictions:
- Pattern: .{0,20}#.{0,19}
* @param answer The ResponseListener for this asynchronous call
*/
public void createUser(String devicetype, final CreateUserResponseListener answer) {
HashMap<String, Object> inputs = new HashMap<String, Object>();
inputs.put("devicetype", devicetype);
endpoint.call("Create User", inputs, new EndpointCallResponseListener() {
public void onSuccess(Map<String,Object> result) {
answer.onSuccess();
}
public void onError(CloudRailException error) {
answer.onError(error);
}
public void onProgress(double percentFinished) {
answer.onProgress(percentFinished);
}});
}
/**
*
* @param username The username that was created before
* @param answer The ResponseListener for this asynchronous call
*/
public void getAllLights(String username, final GetAllLightsResponseListener answer) {
HashMap<String, Object> inputs = new HashMap<String, Object>();
inputs.put("username", username);
endpoint.call("Get All Lights", inputs, new EndpointCallResponseListener() {
public void onSuccess(Map<String,Object> result) {
answer.onSuccess((List<Object>) result.get("list_identifier"));
}
public void onError(CloudRailException error) {
answer.onError(error);
}
public void onProgress(double percentFinished) {
answer.onProgress(percentFinished);
}});
}
/**
*
* @param username The username that has been created before
* @param lightidentifier The light's identifier, usually counts up from "1"
* @param answer The ResponseListener for this asynchronous call
*/
public void getLightAttributesAndState(String username, String lightidentifier, final GetLightAttributesAndStateResponseListener answer) {
HashMap<String, Object> inputs = new HashMap<String, Object>();
inputs.put("username", username);
inputs.put("lightidentifier", lightidentifier);
endpoint.call("Get Light Attributes And State", inputs, new EndpointCallResponseListener() {
public void onSuccess(Map<String,Object> result) {
answer.onSuccess((Boolean) result.get("state_onoffstate"), (Long) result.get("brightness"), (Long) result.get("hue"), (Long) result.get("saturation"), (List<Object>) result.get("ciecolor"), (Long) result.get("colortemperature"), (String) result.get("alerteffect"), (String) result.get("effect"), (String) result.get("colormode"), (Boolean) result.get("accessibility"), (String) result.get("lighttypeidentifier_typeidentifier"), (String) result.get("name_lightname"), (String) result.get("hardwaremodelidentifier"), (String) result.get("softwareversion"));
}
public void onError(CloudRailException error) {
answer.onError(error);
}
public void onProgress(double percentFinished) {
answer.onProgress(percentFinished);
}});
}
/**
*
* @param state_onoffstate On/Off state of the light. On=true, Off=false
* @param username The username that has been created before
* @param lightidentifier The light's identifier, usually counts up from "1"
* @param answer The ResponseListener for this asynchronous call
*/
public void switchLight(Boolean state_onoffstate, String username, String lightidentifier, final SwitchLightResponseListener answer) {
HashMap<String, Object> inputs = new HashMap<String, Object>();
inputs.put("state_onoffstate", state_onoffstate);
inputs.put("username", username);
inputs.put("lightidentifier", lightidentifier);
endpoint.call("Switch Light", inputs, new EndpointCallResponseListener() {
public void onSuccess(Map<String,Object> result) {
answer.onSuccess();
}
public void onError(CloudRailException error) {
answer.onError(error);
}
public void onProgress(double percentFinished) {
answer.onProgress(percentFinished);
}});
}
/**
*
* @param brightness Brightness of the light. This is a scale from the minimum brightness the light is capable of, 1, to the maximum capable brightness, 254.
* @param username The username that has been created before
* @param lightidentifier The light's identifier, usually counts up from "1"
* @param answer The ResponseListener for this asynchronous call
*/
public void setBrightness(Long brightness, String username, String lightidentifier, final SetBrightnessResponseListener answer) {
HashMap<String, Object> inputs = new HashMap<String, Object>();
inputs.put("brightness", brightness);
inputs.put("username", username);
inputs.put("lightidentifier", lightidentifier);
endpoint.call("Set Brightness", inputs, new EndpointCallResponseListener() {
public void onSuccess(Map<String,Object> result) {
answer.onSuccess();
}
public void onError(CloudRailException error) {
answer.onError(error);
}
public void onProgress(double percentFinished) {
answer.onProgress(percentFinished);
}});
}
/**
*
* @param ciecolor The x and y coordinates of a color in CIE color space.
* @param username The username that has been created before
* @param lightidentifier The light's identifier, usually counts up from "1"
* @param answer The ResponseListener for this asynchronous call
*/
public void setColor(List<Object> ciecolor, String username, String lightidentifier, final SetColorResponseListener answer) {
HashMap<String, Object> inputs = new HashMap<String, Object>();
inputs.put("ciecolor", ciecolor);
inputs.put("username", username);
inputs.put("lightidentifier", lightidentifier);
endpoint.call("Set Color", inputs, new EndpointCallResponseListener() {
public void onSuccess(Map<String,Object> result) {
answer.onSuccess();
}
public void onError(CloudRailException error) {
answer.onError(error);
}
public void onProgress(double percentFinished) {
answer.onProgress(percentFinished);
}});
}
/**
*
* @param title New task list title
* @param accesstoken Access Token
* @param answer The ResponseListener for this asynchronous call
*/
public void createANewTaskList(String title, String accesstoken, final CreateANewTaskListResponseListener answer) {
HashMap<String, Object> inputs = new HashMap<String, Object>();
inputs.put("title", title);
inputs.put("accesstoken", accesstoken);
endpoint.call("Create A New Task List", inputs, new EndpointCallResponseListener() {
public void onSuccess(Map<String,Object> result) {
answer.onSuccess((String) result.get("id"), (String) result.get("title"), (String) result.get("updated"));
}
public void onError(CloudRailException error) {
answer.onError(error);
}
public void onProgress(double percentFinished) {
answer.onProgress(percentFinished);
}});
}
/**
*
* @param title New task title
* @param tasklistidentifier Task list identifier.
* @param accesstoken Access Token
* @param answer The ResponseListener for this asynchronous call
*/
public void createNewTaskOnTaskList(String title, String tasklistidentifier, String accesstoken, final CreateNewTaskOnTaskListResponseListener answer) {
HashMap<String, Object> inputs = new HashMap<String, Object>();
inputs.put("title", title);
inputs.put("tasklistidentifier", tasklistidentifier);
inputs.put("accesstoken", accesstoken);
endpoint.call("Create New Task On Task List", inputs, new EndpointCallResponseListener() {
public void onSuccess(Map<String,Object> result) {
answer.onSuccess((String) result.get("updated"), (String) result.get("title"), (String) result.get("id"));
}
public void onError(CloudRailException error) {
answer.onError(error);
}
public void onProgress(double percentFinished) {
answer.onProgress(percentFinished);
}});
}
/**
*
* @param tasklistidentifier Task list identifier.
* @param accesstoken Access Token
* @param answer The ResponseListener for this asynchronous call
*/
public void deleteATaskList(String tasklistidentifier, String accesstoken, final DeleteATaskListResponseListener answer) {
HashMap<String, Object> inputs = new HashMap<String, Object>();
inputs.put("tasklistidentifier", tasklistidentifier);
inputs.put("accesstoken", accesstoken);
endpoint.call("Delete A Task List", inputs, new EndpointCallResponseListener() {
public void onSuccess(Map<String,Object> result) {
answer.onSuccess();
}
public void onError(CloudRailException error) {
answer.onError(error);
}
public void onProgress(double percentFinished) {
answer.onProgress(percentFinished);
}});
}
/**
*
* @param tasklistidentifier Task list identifier.
* @param taskidentifier Task identifier.
* @param accesstoken Access Token
* @param answer The ResponseListener for this asynchronous call
*/
public void deleteTaskFromTaskList(String tasklistidentifier, String taskidentifier, String accesstoken, final DeleteTaskFromTaskListResponseListener answer) {
HashMap<String, Object> inputs = new HashMap<String, Object>();
inputs.put("tasklistidentifier", tasklistidentifier);
inputs.put("taskidentifier", taskidentifier);
inputs.put("accesstoken", accesstoken);
endpoint.call("Delete Task From Task List", inputs, new EndpointCallResponseListener() {
public void onSuccess(Map<String,Object> result) {
answer.onSuccess();
}
public void onError(CloudRailException error) {
answer.onError(error);
}
public void onProgress(double percentFinished) {
answer.onProgress(percentFinished);
}});
}
/**
*
* @param accesstoken Access Token
* @param answer The ResponseListener for this asynchronous call
*/
public void getAllTaskLists(String accesstoken, final GetAllTaskListsResponseListener answer) {
HashMap<String, Object> inputs = new HashMap<String, Object>();
inputs.put("accesstoken", accesstoken);
endpoint.call("Get All Task Lists", inputs, new EndpointCallResponseListener() {
public void onSuccess(Map<String,Object> result) {
answer.onSuccess((List<Object>) result.get("list_tasklist"));
}
public void onError(CloudRailException error) {
answer.onError(error);
}
public void onProgress(double percentFinished) {
answer.onProgress(percentFinished);
}});
}
/**
*
* @param accesstoken Access Token
* @param answer The ResponseListener for this asynchronous call
*/
public void getinformationabouttheuser(String accesstoken, final GetinformationabouttheuserResponseListener answer) {
HashMap<String, Object> inputs = new HashMap<String, Object>();
inputs.put("accesstoken", accesstoken);
endpoint.call("Get information about the user", inputs, new EndpointCallResponseListener() {
public void onSuccess(Map<String,Object> result) {
answer.onSuccess((List<Object>) result.get("list_work"), (String) result.get("birthday"), (String) result.get("name_hometown"), (String) result.get("name_location"), (List<Object>) result.get("list_education"), (Map<String, Object>) result.get("agerange"), (String) result.get("id_user"), (String) result.get("firstname"), (String) result.get("bio"), (String) result.get("lastname"), (List<Object>) result.get("list_data_pages"), (List<Object>) result.get("list_friends"), (String) result.get("gender"));
}
public void onError(CloudRailException error) {
answer.onError(error);
}
public void onProgress(double percentFinished) {
answer.onProgress(percentFinished);
}});
}
/**
*
* @param accesstoken The access token retrieved after authentication
* @param answer The ResponseListener for this asynchronous call
*/
public void getUserFeed(String accesstoken, final GetUserFeedResponseListener answer) {
HashMap<String, Object> inputs = new HashMap<String, Object>();
inputs.put("accesstoken", accesstoken);
endpoint.call("Get User Feed", inputs, new EndpointCallResponseListener() {
public void onSuccess(Map<String,Object> result) {
answer.onSuccess((List<Object>) result.get("feed"));
}
public void onError(CloudRailException error) {
answer.onError(error);
}
public void onProgress(double percentFinished) {
answer.onProgress(percentFinished);
}});
}
/**
*
* @param user identifier The id of this person's user account. This ID is unique to each app and cannot be used across different apps.
* @param accesstoken A user access token with user_friends permission is required to view the current person's friends.
* @param answer The ResponseListener for this asynchronous call
*/
public void getusersfriends(String useridentifier, String accesstoken, final GetusersfriendsResponseListener answer) {
HashMap<String, Object> inputs = new HashMap<String, Object>();
inputs.put("user identifier", useridentifier);
inputs.put("accesstoken", accesstoken);
endpoint.call("Get users friends", inputs, new EndpointCallResponseListener() {
public void onSuccess(Map<String,Object> result) {
answer.onSuccess((List<Object>) result.get("list_friends"), (Long) result.get("totalcount"));
}
public void onError(CloudRailException error) {
answer.onError(error);
}
public void onProgress(double percentFinished) {
answer.onProgress(percentFinished);
}});
}
/**
*
* @param countryidentifier See http://apidev.accuweather.com/developers/countries for a list. Example: "fr" for France
* @param searchquery The query text, e.g. a city name like "Paris"
* @param apikey The API key, contact sales@accuweather.com to receive one
* @param answer The ResponseListener for this asynchronous call
*/
public void getLocationsKeyByText(String countryidentifier, String searchquery, String apikey, final GetLocationsKeyByTextResponseListener answer) {
HashMap<String, Object> inputs = new HashMap<String, Object>();
inputs.put("countryidentifier", countryidentifier);
inputs.put("searchquery", searchquery);
inputs.put("apikey", apikey);
endpoint.call("GetLocationsKeyByText", inputs, new EndpointCallResponseListener() {
public void onSuccess(Map<String,Object> result) {
answer.onSuccess((List<Object>) result.get("results"));
}
public void onError(CloudRailException error) {
answer.onError(error);
}
public void onProgress(double percentFinished) {
answer.onProgress(percentFinished);
}});
}
/**
*
* @param apikey Contact sales@accuweather.com to receive an API key
* @param forecasttime The interval. One of '1day', '5day', '10day','15day', '25day', '45day'
* @param locationidentifier Location key retrieved by GetLocationsKeyByText
* @param answer The ResponseListener for this asynchronous call
*/
public void getDailyForecast(String apikey, String forecasttime, Long locationidentifier, final GetDailyForecastResponseListener answer) {
HashMap<String, Object> inputs = new HashMap<String, Object>();
inputs.put("apikey", apikey);
inputs.put("forecasttime", forecasttime);
inputs.put("locationidentifier", locationidentifier);
endpoint.call("GetDailyForecast", inputs, new EndpointCallResponseListener() {
public void onSuccess(Map<String,Object> result) {
answer.onSuccess((List<Object>) result.get("default0"));
}
public void onError(CloudRailException error) {
answer.onError(error);
}
public void onProgress(double percentFinished) {
answer.onProgress(percentFinished);
}});
}
/**
*
* @param locationidentifier The location key retrieved from GetLocationsKeyByText
* @param apikey Contact sales@accuweather.com to receive an API key
* @param answer The ResponseListener for this asynchronous call
*/
public void getCurrentConditions(Long locationidentifier, String apikey, final GetCurrentConditionsResponseListener answer) {
HashMap<String, Object> inputs = new HashMap<String, Object>();
inputs.put("locationidentifier", locationidentifier);
inputs.put("apikey", apikey);
endpoint.call("GetCurrentConditions", inputs, new EndpointCallResponseListener() {
public void onSuccess(Map<String,Object> result) {
answer.onSuccess((List<Object>) result.get("results"));
}
public void onError(CloudRailException error) {
answer.onError(error);
}
public void onProgress(double percentFinished) {
answer.onProgress(percentFinished);
}});
}
/**
*
* @param countrycode The location's country code, e.g. "us"
* @param apikey The API key, available at http://openweathermap.org/appid
* @param zipcode The location's zip code, e.g. "94040"
* @param answer The ResponseListener for this asynchronous call
*/
public void getDataByZipCode(String countrycode, String apikey, String zipcode, final GetDataByZipCodeResponseListener answer) {
HashMap<String, Object> inputs = new HashMap<String, Object>();
inputs.put("countrycode", countrycode);
inputs.put("apikey", apikey);
inputs.put("zipcode", zipcode);
endpoint.call("Get Data By ZipCode", inputs, new EndpointCallResponseListener() {
public void onSuccess(Map<String,Object> result) {
answer.onSuccess((Double) result.get("longitude"), (Double) result.get("latitude"), (Double) result.get("temperature"), (Double) result.get("pressure"), (Long) result.get("humidity"), (Double) result.get("temperature_minimum"), (Double) result.get("temperature_maximum"), (Double) result.get("wind_speed"), (Double) result.get("wind_direction"), (Long) result.get("cloudiness"), (String) result.get("cityname"), (Long) result.get("cityidentifier"));
}
public void onError(CloudRailException error) {
answer.onError(error);
}
public void onProgress(double percentFinished) {
answer.onProgress(percentFinished);
}});
}
/**
*
* @param cityname The name of the city, e.g. "Mannheim"
* @param apikey The API key, available at http://openweathermap.org/appid
* @param answer The ResponseListener for this asynchronous call
*/
public void getDataByCityName(String cityname, String apikey, final GetDataByCityNameResponseListener answer) {
HashMap<String, Object> inputs = new HashMap<String, Object>();
inputs.put("cityname", cityname);
inputs.put("apikey", apikey);
endpoint.call("Get DataBy City Name", inputs, new EndpointCallResponseListener() {
public void onSuccess(Map<String,Object> result) {
answer.onSuccess((Double) result.get("longitude"), (Double) result.get("latitude"), (Double) result.get("temperature"), (Double) result.get("pressure"), (Long) result.get("humidity"), (Double) result.get("temperature_minimum"), (Double) result.get("temperature_maximum"), (Double) result.get("wind_speed"), (Double) result.get("wind_direction"), (Long) result.get("cloudiness"), (Long) result.get("cityidentifier"), (String) result.get("cityname"));
}
public void onError(CloudRailException error) {
answer.onError(error);
}
public void onProgress(double percentFinished) {
answer.onProgress(percentFinished);
}});
}
private WebAuthorization GoogleTasks_Auth;
/**
* Set up authorization for Google Tasks
* @param uriOpener An implementation of UriView that opens URIs at the appropriate place
* @param uriRedirectListener An implementation of UriRedirectListener which receives authorization redirects
* @param tokenCallback An implementation of AccessTokenCallback which receives the access token after successful authorization
*/
public void init_GoogleTasks_Auth(UriView uriOpener, UriRedirectListener uriRedirectListener, AccessTokenCallback tokenCallback) {
GoogleTasks_Auth = endpoint.createWebAuthorization("Google Tasks", uriOpener, uriRedirectListener, tokenCallback);
}
/**
* Start the authorization process for Google Tasks
*/
public void start_GoogleTasks_Auth() {
GoogleTasks_Auth.openLogin();
}
private WebAuthorization FacebookGraphAPI_Auth;
/**
* Set up authorization for Facebook Graph API
* @param uriOpener An implementation of UriView that opens URIs at the appropriate place
* @param uriRedirectListener An implementation of UriRedirectListener which receives authorization redirects
* @param tokenCallback An implementation of AccessTokenCallback which receives the access token after successful authorization
*/
public void init_FacebookGraphAPI_Auth(UriView uriOpener, UriRedirectListener uriRedirectListener, AccessTokenCallback tokenCallback) {
FacebookGraphAPI_Auth = endpoint.createWebAuthorization("Facebook Graph API", uriOpener, uriRedirectListener, tokenCallback);
}
/**
* Start the authorization process for Facebook Graph API
*/
public void start_FacebookGraphAPI_Auth() {
FacebookGraphAPI_Auth.openLogin();
}
private WebAuthorization NetatmoWeatherstationAPI_Auth;
/**
* Set up authorization for Netatmo Weatherstation API
* @param uriOpener An implementation of UriView that opens URIs at the appropriate place
* @param uriRedirectListener An implementation of UriRedirectListener which receives authorization redirects
* @param tokenCallback An implementation of AccessTokenCallback which receives the access token after successful authorization
*/
public void init_NetatmoWeatherstationAPI_Auth(UriView uriOpener, UriRedirectListener uriRedirectListener, AccessTokenCallback tokenCallback) {
NetatmoWeatherstationAPI_Auth = endpoint.createWebAuthorization("Netatmo Weatherstation API", uriOpener, uriRedirectListener, tokenCallback);
}
/**
* Start the authorization process for Netatmo Weatherstation API
*/
public void start_NetatmoWeatherstationAPI_Auth() {
NetatmoWeatherstationAPI_Auth.openLogin();
}
public interface GetDevicelistResponseListener {
/**
*
* @param status The request status. Should be 'ok' in a successful request.
* @param device_list
*/
public void onSuccess(String status, List<Object> device_list);
/**
*
* @param error This parameter contains the Exception in case one is thrown
*/
public void onError(CloudRailException error);
/**
*
* @param percentFinished This parameter contains the progress of the current operation in percent
*/
public void onProgress(double percentFinished);
}
public interface GetMeasureResponseListener {
/**
*
* @param list_measure
* @param status Request status. Should be 'ok' for a successfull request.
*/
public void onSuccess(List<Object> list_measure, String status);
/**
*
* @param error This parameter contains the Exception in case one is thrown
*/
public void onError(CloudRailException error);
/**
*
* @param percentFinished This parameter contains the progress of the current operation in percent
*/
public void onProgress(double percentFinished);
}
public interface CreateUserResponseListener {
/**
*
*/
public void onSuccess();
/**
*
* @param error This parameter contains the Exception in case one is thrown
*/
public void onError(CloudRailException error);
/**
*
* @param percentFinished This parameter contains the progress of the current operation in percent
*/
public void onProgress(double percentFinished);
}
public interface GetAllLightsResponseListener {
/**
*
* @param list_identifier
*/
public void onSuccess(List<Object> list_identifier);
/**
*
* @param error This parameter contains the Exception in case one is thrown
*/
public void onError(CloudRailException error);
/**
*
* @param percentFinished This parameter contains the progress of the current operation in percent
*/
public void onProgress(double percentFinished);
}
public interface GetLightAttributesAndStateResponseListener {
/**
*
* @param state_onoffstate On/Off state of the light. On=true, Off=false
* @param brightness Brightness of the light. This is a scale from the minimum brightness the light is capable of, 1, to the maximum capable brightness, 254.
* @param hue Hue of the light. This is a wrapping value between 0 and 65535. Both 0 and 65535 are red, 25500 is green and 46920 is blue.
* @param saturation Saturation of the light. 254 is the most saturated (colored) and 0 is the least saturated (white).
* @param ciecolor The x and y coordinates of a color in CIE color space.
* @param colortemperature The Mired Color temperature of the light. 2012 connected lights are capable of 153 (6500K) to 500 (2000K).
* @param alerteffect The alert effect, which is a temporary change to the bulb’s state. This can take one of the following values:'none' – The light is not performing an alert effect.'select' – The light is performing one breathe cycle.'lselect' – The light is performing breathe cycles for 15 seconds or until an 'alert': 'none' command is received.Note that this contains the last alert sent to the light and not its current state. i.e. After the breathe cycle has finished the bridge does not reset the alert to 'none'.
Restrictions:
- Pattern: (^none$)|(^select$)|(^lselect$)
* @param effect The dynamic effect of the light, can either be 'none' or 'colorloop'.If set to colorloop, the light will cycle through all hues using the current brightness and saturation settings.
Restrictions:
- Pattern: (^none$)|(^colorloop$)
* @param colormode Indicates the color mode in which the light is working, this is the last command type it received. Values are 'hs' for Hue and Saturation, 'xy' for XY and 'ct' for Color Temperature. This parameter is only present when the light supports at least one of the values.
Restrictions:
- Pattern: (^xy$)|(^ct$)|(^hs$)
* @param accessibility Indicates if a light can be reached by the bridge.
* @param lighttypeidentifier_typeidentifier A fixed name describing the type of light e.g. 'Extended color light'.
* @param name_lightname A unique, editable name given to the light.
* @param hardwaremodelidentifier The hardware model of the light.
* @param softwareversion An identifier for the software version running on the light.
*/
public void onSuccess(Boolean state_onoffstate, Long brightness, Long hue, Long saturation, List<Object> ciecolor, Long colortemperature, String alerteffect, String effect, String colormode, Boolean accessibility, String lighttypeidentifier_typeidentifier, String name_lightname, String hardwaremodelidentifier, String softwareversion);
/**
*
* @param error This parameter contains the Exception in case one is thrown
*/
public void onError(CloudRailException error);
/**
*
* @param percentFinished This parameter contains the progress of the current operation in percent
*/
public void onProgress(double percentFinished);
}
public interface SwitchLightResponseListener {
/**
*
*/
public void onSuccess();
/**
*
* @param error This parameter contains the Exception in case one is thrown
*/
public void onError(CloudRailException error);
/**
*
* @param percentFinished This parameter contains the progress of the current operation in percent
*/
public void onProgress(double percentFinished);
}
public interface SetBrightnessResponseListener {
/**
*
*/
public void onSuccess();
/**
*
* @param error This parameter contains the Exception in case one is thrown
*/
public void onError(CloudRailException error);
/**
*
* @param percentFinished This parameter contains the progress of the current operation in percent
*/
public void onProgress(double percentFinished);
}
public interface SetColorResponseListener {
/**
*
*/
public void onSuccess();
/**
*
* @param error This parameter contains the Exception in case one is thrown
*/
public void onError(CloudRailException error);
/**
*
* @param percentFinished This parameter contains the progress of the current operation in percent
*/
public void onProgress(double percentFinished);
}
public interface CreateANewTaskListResponseListener {
/**
*
* @param id Task list identifier
* @param title Task list title
* @param updated Last update
*/
public void onSuccess(String id, String title, String updated);
/**
*
* @param error This parameter contains the Exception in case one is thrown
*/
public void onError(CloudRailException error);
/**
*
* @param percentFinished This parameter contains the progress of the current operation in percent
*/
public void onProgress(double percentFinished);
}
public interface CreateNewTaskOnTaskListResponseListener {
/**
*
* @param updated Last update
* @param title Task title
* @param id Task identifier
*/
public void onSuccess(String updated, String title, String id);
/**
*
* @param error This parameter contains the Exception in case one is thrown
*/
public void onError(CloudRailException error);
/**
*
* @param percentFinished This parameter contains the progress of the current operation in percent
*/
public void onProgress(double percentFinished);
}
public interface DeleteATaskListResponseListener {
/**
*
*/
public void onSuccess();
/**
*
* @param error This parameter contains the Exception in case one is thrown
*/
public void onError(CloudRailException error);
/**
*
* @param percentFinished This parameter contains the progress of the current operation in percent
*/
public void onProgress(double percentFinished);
}
public interface DeleteTaskFromTaskListResponseListener {
/**
*
*/
public void onSuccess();
/**
*
* @param error This parameter contains the Exception in case one is thrown
*/
public void onError(CloudRailException error);
/**
*
* @param percentFinished This parameter contains the progress of the current operation in percent
*/
public void onProgress(double percentFinished);
}
public interface GetAllTaskListsResponseListener {
/**
*
* @param list_tasklist The list of all task lists of the current user.
*/
public void onSuccess(List<Object> list_tasklist);
/**
*
* @param error This parameter contains the Exception in case one is thrown
*/
public void onError(CloudRailException error);
/**
*
* @param percentFinished This parameter contains the progress of the current operation in percent
*/
public void onProgress(double percentFinished);
}
public interface GetinformationabouttheuserResponseListener {
/**
*
* @param list_work Details of a person`s work experience
* @param birthday The birthday date in the format DD/MM/YYYY
* @param name_hometown The name of the hometown
* @param name_location The name of the location
* @param list_education A list of the educational biography of the user
* @param agerange The age segment for this person expressed as a minimum and maximum age. For example, more than 18, less than 21.
* @param id_user The id of this person's user account. This ID is unique to each app and cannot be used across different apps. Our upgrade guide provides more information about app-specific IDs
* @param firstname The person's first name
* @param bio The person's bio
* @param lastname The person's last name
* @param list_data_pages A list of the pages the user likes
* @param list_friends A list of the friends as User nodes.
* @param gender The gender of the user
*/
public void onSuccess(List<Object> list_work, String birthday, String name_hometown, String name_location, List<Object> list_education, Map<String, Object> agerange, String id_user, String firstname, String bio, String lastname, List<Object> list_data_pages, List<Object> list_friends, String gender);
/**
*
* @param error This parameter contains the Exception in case one is thrown
*/
public void onError(CloudRailException error);
/**
*
* @param percentFinished This parameter contains the progress of the current operation in percent
*/
public void onProgress(double percentFinished);
}
public interface GetUserFeedResponseListener {
/**
*
* @param feed An array of posts
*/
public void onSuccess(List<Object> feed);
/**
*
* @param error This parameter contains the Exception in case one is thrown
*/
public void onError(CloudRailException error);
/**
*
* @param percentFinished This parameter contains the progress of the current operation in percent
*/
public void onProgress(double percentFinished);
}
public interface GetusersfriendsResponseListener {
/**
*
* @param list_friends A list of the friends of the user.
* @param totalcount The total count of friends
*/
public void onSuccess(List<Object> list_friends, Long totalcount);
/**
*
* @param error This parameter contains the Exception in case one is thrown
*/
public void onError(CloudRailException error);
/**
*
* @param percentFinished This parameter contains the progress of the current operation in percent
*/
public void onProgress(double percentFinished);
}
public interface GetLocationsKeyByTextResponseListener {
/**
*
* @param results An array of search results
*/
public void onSuccess(List<Object> results);
/**
*
* @param error This parameter contains the Exception in case one is thrown
*/
public void onError(CloudRailException error);
/**
*
* @param percentFinished This parameter contains the progress of the current operation in percent
*/
public void onProgress(double percentFinished);
}
public interface GetDailyForecastResponseListener {
/**
*
* @param default0 An array of daily forecast entries
*/
public void onSuccess(List<Object> default0);
/**
*
* @param error This parameter contains the Exception in case one is thrown
*/
public void onError(CloudRailException error);
/**
*
* @param percentFinished This parameter contains the progress of the current operation in percent
*/
public void onProgress(double percentFinished);
}
public interface GetCurrentConditionsResponseListener {
/**
*
* @param results An array of condition entries
*/
public void onSuccess(List<Object> results);
/**
*
* @param error This parameter contains the Exception in case one is thrown
*/
public void onError(CloudRailException error);
/**
*
* @param percentFinished This parameter contains the progress of the current operation in percent
*/
public void onProgress(double percentFinished);
}
public interface GetDataByZipCodeResponseListener {
/**
*
* @param longitude City geo location, longitude
* @param latitude City geo location, latitude
* @param temperature Current temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit
* @param pressure Atmospheric pressure, hPa
* @param humidity Humidity, %
* @param temperature_minimum Minimum temperature at the moment, might deviate from current for large areas
* @param temperature_maximum Maximum temperature at the moment, might deviate from current for large areas
* @param wind_speed Wind speed. Unit Default: meter/sec, Metric: meter/sec, Imperial: miles/hour
* @param wind_direction Wind direction, degrees (meteorological)
* @param cloudiness Cloudiness, %
* @param cityname City name
* @param cityidentifier City ID
*/
public void onSuccess(Double longitude, Double latitude, Double temperature, Double pressure, Long humidity, Double temperature_minimum, Double temperature_maximum, Double wind_speed, Double wind_direction, Long cloudiness, String cityname, Long cityidentifier);
/**
*
* @param error This parameter contains the Exception in case one is thrown
*/
public void onError(CloudRailException error);
/**
*
* @param percentFinished This parameter contains the progress of the current operation in percent
*/
public void onProgress(double percentFinished);
}
public interface GetDataByCityNameResponseListener {
/**
*
* @param longitude City geo location, longitude
* @param latitude City geo location, latitude
* @param temperature Current temperature. Unit Default: Kelvin, Metric: Celsius, Imperial: Fahrenheit
* @param pressure Atmospheric pressure, hPa
* @param humidity Humidity, %
* @param temperature_minimum Minimum temperature at the moment, might deviate from current for large areas
* @param temperature_maximum Maximum temperature at the moment, might deviate from current for large areas
* @param wind_speed Wind speed. Unit Default: meter/sec, Metric: meter/sec, Imperial: miles/hour
* @param wind_direction Wind direction, degrees (meteorological)
* @param cloudiness Cloudiness, %
* @param cityidentifier City ID
* @param cityname City name
*/
public void onSuccess(Double longitude, Double latitude, Double temperature, Double pressure, Long humidity, Double temperature_minimum, Double temperature_maximum, Double wind_speed, Double wind_direction, Long cloudiness, Long cityidentifier, String cityname);
/**
*
* @param error This parameter contains the Exception in case one is thrown
*/
public void onError(CloudRailException error);
/**
*
* @param percentFinished This parameter contains the progress of the current operation in percent
*/
public void onProgress(double percentFinished);
}
} | [
"ortenburger@gmail.com"
] | ortenburger@gmail.com |
8a63345315878794ce1a0cbcf666a0711f98be7c | ca314e1b7e6f16e345add5f21023b3fff2c3e462 | /src/main/java/lists/chap13/list13_02/Character.java | adb03f9bc3318aaf4388e9caa40cc91a3eb1c091 | [
"Apache-2.0"
] | permissive | shigeharu-1978/javaNyumon | fb2ad680d88505a886ca6bc3d88293c9cc70bdbc | d65fd8c61731f724ab18d9f6dc81dc644f092f00 | refs/heads/master | 2020-04-17T22:49:05.996174 | 2019-06-09T03:28:37 | 2019-06-09T03:28:37 | 167,009,871 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 280 | java | package lists.chap13.list13_02;
public abstract class Character implements Life{
String name;
int hp;
public String getName(){
return this.name;
}
public void run(){
System.out.println(this.name + "は逃げ出した");
}
public abstract void attack(Matango m);
}
| [
"shigeharu_1978@yahoo.co.jp"
] | shigeharu_1978@yahoo.co.jp |
1a22f0af8eafd0acdddeb47a92351c03519f98eb | c4302fd5fcbd86f6fb1e8632f68203c9b7c30428 | /src/main/java/problems/Sort/day615/Solution1.java | f10d66c11c94433c8ec734eded5e4982c5126962 | [] | no_license | LinZiYU1996/myActionInLeetCode | c843ae3ee28bb8f061a07d7885a7ab4b0ce66004 | 9c2736c168ef0be1a25a42f133f3f62954c00fea | refs/heads/master | 2022-11-15T04:08:52.513617 | 2020-06-30T01:01:34 | 2020-06-30T01:01:34 | 271,263,589 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,462 | java | package problems.Sort.day615;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* \* Created with IntelliJ IDEA.
* \* User: LinZiYu
* \* Date: 2020/6/15
* \* Time: 21:16
* \* Description:
* \
*/
public class Solution1 {
//给定一个字符串,请将字符串里的字符按照出现的频率降序排列。
//
//示例 1:
//
//输入:
//"tree"
//
//输出:
//"eert"
//
//解释:
//'e'出现两次,'r'和't'都只出现一次。
//因此'e'必须出现在'r'和't'之前。此外,"eetr"也是一个有效的答案。
//示例 2:
//
//输入:
//"cccaaa"
//
//输出:
//"cccaaa"
//
//解释:
//'c'和'a'都出现三次。此外,"aaaccc"也是有效的答案。
//注意"cacaca"是不正确的,因为相同的字母必须放在一起。
//示例 3:
//
//输入:
//"Aabb"
//
//输出:
//"bbAa"
//
//解释:
//此外,"bbaA"也是一个有效的答案,但"Aabb"是不正确的。
//注意'A'和'a'被认为是两种不同的字符。
//
//来源:力扣(LeetCode)
//链接:https://leetcode-cn.com/problems/sort-characters-by-frequency
//著作权归领扣网络所有。商业转载请联系官方授权,非商业转载请注明出处。
//执行结果:
//通过
//显示详情
//执行用时 :
//18 ms
//, 在所有 Java 提交中击败了
//58.13%
//的用户
//内存消耗 :
//40.8 MB
//, 在所有 Java 提交中击败了
//11.11%
//的用户
public String frequencySort(String s) {
Map<Character, Integer> frequencyForNum = new HashMap<>();
for (char c : s.toCharArray())
frequencyForNum.put(c, frequencyForNum.getOrDefault(c, 0) + 1);
List<Character>[] frequencyBucket = new ArrayList[s.length() + 1];
for (char c : frequencyForNum.keySet()) {
int f = frequencyForNum.get(c);
if (frequencyBucket[f] == null) {
frequencyBucket[f] = new ArrayList<>();
}
frequencyBucket[f].add(c);
}
StringBuilder str = new StringBuilder();
for (int i = frequencyBucket.length - 1; i >= 0; i--) {
if (frequencyBucket[i] == null) {
continue;
}
for (char c : frequencyBucket[i]) {
for (int j = 0; j < i; j++) {
str.append(c);
}
}
}
return str.toString();
}
}
| [
"2669093302@qq.com"
] | 2669093302@qq.com |
a41d8568b0ec883450ce03cde129fbcbd720d8a6 | 4e536428b68fdb40bb6b5fd9653071c1cb54fc59 | /app/src/test/java/com/ncm/nguyenchiminh/danhba/ExampleUnitTest.java | 1e514718ddc37e759d4f369d5001998bf94c0700 | [] | no_license | nguyenchiminh99/Danhba | 6bccf6593115926c6f283cdd4268c8534a5b2af7 | 7a202bb9ce4a12d54368e3481a3377e84dba3187 | refs/heads/master | 2021-03-24T05:54:06.257737 | 2020-03-15T18:11:04 | 2020-03-15T18:11:04 | 247,523,525 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 389 | java | package com.ncm.nguyenchiminh.danhba;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
} | [
"="
] | = |
4a4f6e3b607563f36b0dde5554c9c2e7574c5085 | 29927882bee279159cd7427d501dd2087f3ed4b3 | /clase08_01/app/src/main/java/pe/area51/clase06_01/activities/GaleriaActivity.java | bfe14546a820c79bcdb3364f358902b6bc82643e | [] | no_license | rzcodx/Area51-Android | 2c1ed419a17ac34a738f650f2056d6da9a948936 | ef554389ada8c7c1b7bbf822b9562c5b64864a0b | refs/heads/master | 2020-09-11T18:32:27.128020 | 2020-01-18T20:25:05 | 2020-01-18T20:25:05 | 222,153,941 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,557 | java | package pe.area51.clase06_01.activities;
import androidx.annotation.NonNull;
import androidx.appcompat.app.AppCompatActivity;
import androidx.viewpager.widget.ViewPager;
import android.os.Bundle;
import android.view.MenuItem;
import java.util.ArrayList;
import pe.area51.clase06_01.R;
import pe.area51.clase06_01.adapters.GaleriaAdapter;
import pe.area51.clase06_01.adapters.ImagenAdapter;
import pe.area51.clase06_01.net.response.foto.Foto;
public class GaleriaActivity extends AppCompatActivity {
private GaleriaAdapter adapter;
private ViewPager viewPager;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_galeria);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
setTitle("Galería");
viewPager = findViewById(R.id.viewPager);
adapter = new GaleriaAdapter(getSupportFragmentManager());
viewPager.setAdapter(adapter);
//ArrayList<Foto> lista = getIntent().getParcelableArrayListExtra("lista");
ArrayList<Foto> lista = ImagenAdapter.lista;
adapter.agregarLista(lista);
int position = getIntent().getIntExtra("position", 0);
viewPager.setCurrentItem(position);
}
@Override
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
onBackPressed();
break;
}
return super.onOptionsItemSelected(item);
}
}
| [
"rzcodx@gmail.com"
] | rzcodx@gmail.com |
371e43d7c39ae046c16fbd40129f22080aef3ae9 | 780ea3e340b57f11fb86ecee5b6c52d680c1842d | /netty/src/main/java/net/protocol/devicecmd/handler30/AgriThreadFactory.java | 1c9dddd8bb66fbcae6629734359ab243aef221c1 | [] | no_license | WKINGT/agricultrue | cbbce8d16d906b7ff0bdc4ee92fc5d113b8ab38f | 81adfa2f4f1fa6ca4b6a31802b13e80f8e26b48e | refs/heads/master | 2020-03-26T03:27:32.873633 | 2017-09-28T10:34:17 | 2017-09-28T10:34:17 | 144,456,880 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,367 | java | package net.protocol.devicecmd.handler30;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicInteger;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class AgriThreadFactory implements ThreadFactory {
private static final AtomicInteger poolNumber = new AtomicInteger(1);
private final AtomicInteger threadNumber = new AtomicInteger(1);
private final ThreadGroup group;
private final String namePrefix;
public AgriThreadFactory(){
SecurityManager s = System.getSecurityManager();
group = (s != null)? s.getThreadGroup():Thread.currentThread().getThreadGroup();
namePrefix = "im-pool-"+poolNumber.getAndIncrement()+"-thread-";
}
public Thread newThread(Runnable r) {
Thread thread = new Thread(group,r,namePrefix+threadNumber.getAndIncrement(),0);
if(thread.isDaemon()){
thread.setDaemon(false);
}
if(thread.getPriority() != Thread.NORM_PRIORITY){
thread.setPriority(Thread.NORM_PRIORITY);
}
thread.setUncaughtExceptionHandler(new ThreadUncaughtExceptionHandler());
return thread;
}
static class ThreadUncaughtExceptionHandler implements Thread.UncaughtExceptionHandler{
private static Logger logger = LoggerFactory.getLogger(ThreadUncaughtExceptionHandler.class);
public void uncaughtException(Thread t, Throwable e) {
logger.error(e.getMessage(),e);
}
}
} | [
"1582293004@qq.com"
] | 1582293004@qq.com |
3e488da400569464704cbe15d3a762f3c0db93d5 | 196e31065dc556c1660e9b3629c990df6fb513c4 | /oidc/src/main/java/com/okta/developer/MainController.java | adf39e8772af23a35ae9228d4693aa8cdcc53224 | [] | no_license | n3io/JavaProjects | d3348d453d0707ae5b5e52b09d5910a9958c2496 | 002ca94ef535103a2ef0e32d5ef076aa9b233d4b | refs/heads/master | 2021-05-10T09:59:45.274537 | 2018-09-25T22:28:51 | 2018-09-25T22:28:51 | 118,943,183 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,324 | java | package com.okta.developer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.security.oauth2.client.OAuth2AuthorizedClient;
import org.springframework.security.oauth2.client.OAuth2AuthorizedClientService;
import org.springframework.security.oauth2.client.authentication.OAuth2AuthenticationToken;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.reactive.function.client.ClientRequest;
import org.springframework.web.reactive.function.client.ExchangeFilterFunction;
import org.springframework.web.reactive.function.client.WebClient;
import reactor.core.publisher.Mono;
import java.util.Collections;
import java.util.Map;
/**
* @author Joe Grandja
*/
@Controller
public class MainController {
private final OAuth2AuthorizedClientService authorizedClientService;
public MainController(OAuth2AuthorizedClientService authorizedClientService) {
this.authorizedClientService = authorizedClientService;
}
@RequestMapping("/")
public String index(Model model, OAuth2AuthenticationToken authentication) {
OAuth2AuthorizedClient authorizedClient = this.getAuthorizedClient(authentication);
model.addAttribute("userName", authentication.getName());
model.addAttribute("clientName", authorizedClient.getClientRegistration().getClientName());
return "index";
}
@RequestMapping("/userinfo")
public String userinfo(Model model, OAuth2AuthenticationToken authentication) {
OAuth2AuthorizedClient authorizedClient = this.getAuthorizedClient(authentication);
Map userAttributes = Collections.emptyMap();
String userInfoEndpointUri = authorizedClient.getClientRegistration()
.getProviderDetails().getUserInfoEndpoint().getUri();
if (!StringUtils.isEmpty(userInfoEndpointUri)) { // userInfoEndpointUri is optional for OIDC Clients
userAttributes = WebClient.builder()
.filter(oauth2Credentials(authorizedClient)).build()
.get().uri(userInfoEndpointUri)
.retrieve()
.bodyToMono(Map.class).block();
}
model.addAttribute("userAttributes", userAttributes);
return "userinfo";
}
private OAuth2AuthorizedClient getAuthorizedClient(OAuth2AuthenticationToken authentication) {
return this.authorizedClientService.loadAuthorizedClient(
authentication.getAuthorizedClientRegistrationId(), authentication.getName());
}
private ExchangeFilterFunction oauth2Credentials(OAuth2AuthorizedClient authorizedClient) {
return ExchangeFilterFunction.ofRequestProcessor(
clientRequest -> {
ClientRequest authorizedRequest = ClientRequest.from(clientRequest)
.header(HttpHeaders.AUTHORIZATION,
"Bearer " + authorizedClient.getAccessToken().getTokenValue())
.build();
return Mono.just(authorizedRequest);
});
}
} | [
"kali@ymail.com"
] | kali@ymail.com |
86a7f5f5489a29cc8ba2622be407e507244e6fec | f09a23ce6bd791872a1dc16392a032d75f0a957b | /src/arrays/TestArray.java | 84ab41da6fa05c921a8b1eb40434459f56650782 | [] | no_license | anilchitturi/DemoSession | 1f626fcaf185d85cd46ebec1870e69247faffd9b | 26d8110c3b3f20a2998bcc0743f8cd8fdc9715c8 | refs/heads/master | 2021-01-15T19:28:15.811268 | 2014-11-04T04:26:09 | 2014-11-04T04:26:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 700 | java | package arrays;
public class TestArray {
public static void main(String[] args) {
double[] myList = {1.9, 2.9, 3.4, 3.5};
// Print all the array elements
for (int i = 0; i < myList.length; i++) {
System.out.println(myList[i] + " ");
}
// Summing all elements
double total = 0;
for (int i = 0; i < myList.length; i++) {
total += myList[i];
}
System.out.println("Total is " + total);
// Finding the largest element
double max = myList[0];
for (int i = 1; i < myList.length; i++) {
if (myList[i] > max) max = myList[i];
}
System.out.println("Max is " + max);
}
}
| [
"anilkumarchitturi@gmail.com"
] | anilkumarchitturi@gmail.com |
394b1884288a4d9cf0b5f16ab419a032f0886e5d | 832e30062690a2c055c08899a2e03591a5173375 | /src/krasa/grepconsole/filter/support/ThreadUnsafeGrepProcessor.java | d6528c919ac8d5811cb43d8d5c9b3904494a6a8b | [
"Apache-2.0"
] | permissive | KillGit/GrepConsole | 14fedf90c6332238751eb3ec6f22dbd6056ec968 | dfe8ca853fc2930a1ee39f9c69f996f1322b471e | refs/heads/master | 2020-06-11T09:52:16.388498 | 2016-09-01T18:57:39 | 2016-09-01T18:57:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,195 | java | package krasa.grepconsole.filter.support;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.commons.lang.StringUtils;
import com.intellij.execution.filters.Filter;
import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.util.text.StringUtil;
import krasa.grepconsole.model.GrepExpressionItem;
public class ThreadUnsafeGrepProcessor implements GrepProcessor {
private static final Logger log = Logger.getInstance(ThreadUnsafeGrepProcessor.class.getName());
protected Matcher patternMatcher;
protected Matcher unlessMatcher;
private GrepExpressionItem grepExpressionItem;
private int matches;
public ThreadUnsafeGrepProcessor(GrepExpressionItem grepExpressionItem) {
this.grepExpressionItem = grepExpressionItem;
Pattern pattern = grepExpressionItem.getPattern();
if (pattern != null) {
patternMatcher = pattern.matcher("");
}
Pattern unlessPattern = grepExpressionItem.getUnlessPattern();
if (unlessPattern != null) {
unlessMatcher = unlessPattern.matcher("");
}
}
@Override
public GrepExpressionItem getGrepExpressionItem() {
return grepExpressionItem;
}
@Override
public int getMatches() {
return matches;
}
@Override
public void resetMatches() {
this.matches = 0;
}
@Override
public FilterState process(FilterState state) {
if (grepExpressionItem.isEnabled() && !StringUtils.isEmpty(grepExpressionItem.getGrepExpression())) {
String matchedLine = state.getText();
CharSequence input = StringUtil.newBombedCharSequence(matchedLine, 10000);
if (grepExpressionItem.isHighlightOnlyMatchingText()) {
if (patternMatcher != null) {
patternMatcher.reset(input);
while (patternMatcher.find()) {
matches++;
final int start = patternMatcher.start();
final int end = patternMatcher.end();
state.setNextOperation(grepExpressionItem.getOperationOnMatch());
state.setExclude(grepExpressionItem.isInputFilter());
state.setMatchesSomething(true);
state.add(new Filter.ResultItem(state.getOffset() + start, state.getOffset() + end, null,
grepExpressionItem.getConsoleViewContentType(null).getAttributes()));
if (grepExpressionItem.getSound().isEnabled()) {
grepExpressionItem.getSound().play();
}
}
}
} else if (matches(input) && !matchesUnless(input)) {
matches++;
state.setNextOperation(grepExpressionItem.getOperationOnMatch());
state.setConsoleViewContentType(
grepExpressionItem.getConsoleViewContentType(state.getConsoleViewContentType()));
state.setExclude(grepExpressionItem.isInputFilter());
state.setMatchesSomething(true);
if (grepExpressionItem.getSound().isEnabled()) {
grepExpressionItem.getSound().play();
}
}
}
return state;
}
private boolean matches(CharSequence matchedLine) {
boolean matches = false;
if (patternMatcher != null) {
matches = patternMatcher.reset(matchedLine).matches();
}
return matches;
}
private boolean matchesUnless(CharSequence matchedLine) {
boolean matchUnless = false;
if (unlessMatcher != null) {
matchUnless = unlessMatcher.reset(matchedLine).matches();
}
return matchUnless;
}
}
| [
"vojta.krasa@gmail.com"
] | vojta.krasa@gmail.com |
762b88836a5e4456e69a2d371c6c66fc91afb43a | fae71599c8a1cae11da9f6ef21d86f7f756473c1 | /18_NoSQL/18_NoSQL/homework_18.2/task_2/src/main/java/users/redis/RedisStorage.java | 96bc4c25c1fe9d33b9c711d5c09792b35581a62b | [] | no_license | VladChain/java_basics | d6b20a5e9fb2b57d7bfd715f5927f1785e471dfa | 6ef752974617f8bd7c553d0adefb2435cd75d4ac | refs/heads/master | 2023-08-21T11:01:39.791635 | 2021-10-29T04:19:47 | 2021-10-29T04:19:47 | 302,089,315 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,810 | java | package users.redis;
import org.redisson.Redisson;
import org.redisson.api.RScoredSortedSet;
import org.redisson.api.RedissonClient;
import org.redisson.client.RedisConnectionException;
import org.redisson.client.codec.StringCodec;
import org.redisson.config.Config;
import java.util.Date;
import static java.lang.System.out;
public class RedisStorage {
// Объект для работы с Redis
private RedissonClient redissonClient;
// Объект для работы с Sorted Set
private RScoredSortedSet<String> users;
private final static String KEY = "Users";
public void init() {
Config config = new Config();
config.useSingleServer().setAddress("redis://127.0.0.1:6379");
try {
redissonClient = Redisson.create(config);
} catch (RedisConnectionException ex) {
System.out.println("Не удалось подключиться к Redis");
System.out.println(ex.getMessage());
}
// Объект для работы с ключами
users = redissonClient.getScoredSortedSet(KEY, StringCodec.INSTANCE);
}
void shutdown() {
redissonClient.shutdown();
}
private double getTs() {
return new Date().getTime() / 1000;
}
// Оплата пользователем услуги
public void paidUser(int user_id) {
users.add(getTs(), String.valueOf(user_id));
System.out.println("\nПользователь: " + user_id + " оплатил услугу");
}
// Добавление пользователей
public void addUser(int user_id) {
users.add(getTs(), String.valueOf(user_id));
String log = String.format("Пользователь: %d", user_id);
out.println(log);
}
}
| [
"vlad.chain@mail.ru"
] | vlad.chain@mail.ru |
10042ab5051a3833c4f65dc6878b7fe392cc3322 | 3c469b0f8944e70cb2ed573fd555651aae0c9ba9 | /bitms-generator/src/main/java/com/blocain/bitms/generator/model/IModel.java | fccbdc9b79640a77d63cdb3ff2fd912e7e6acd5b | [] | no_license | edby/backend | 05fe622889fa38dedc26b21c6cb39bf10cec9377 | 0b9e1799f68741f36a7797b85afd267d383b9327 | refs/heads/master | 2020-03-14T22:36:43.495367 | 2018-05-02T07:26:08 | 2018-05-02T07:26:08 | 131,824,956 | 3 | 5 | null | 2018-05-02T08:58:57 | 2018-05-02T08:58:57 | null | UTF-8 | Java | false | false | 804 | java | package com.blocain.bitms.generator.model;
import java.util.Map;
/**
* 模板数据模型
* <p>File:IModel.java</p>
* <p>Title: IModel</p>
* <p>Description:IModel</p>
* <p>Copyright: Copyright (c) May 26, 2015</p>
* <p>Company: BloCain</p>
*
* @author Playguy
* @version 1.0
*/
public interface IModel
{
/**
* 获取描述信息
*
* @author Playguy
* @return
*/
String getDisplayDescription();
/**
* 为模板路径提供数据
*
* @author Playguy
* @param fileModel
* @throws Exception
*/
@SuppressWarnings("rawtypes")
void mergeFilePathModel(Map fileModel) throws Exception;
/**
* 获取模型名称
*
* @author Playguy
* @return
*/
String getTemplateModelName();
}
| [
"3042645110@qq.com"
] | 3042645110@qq.com |
ccd440d20f0cf9c3d59bb7a5b555a0b34119a229 | 7572f4eb4b1ae8086a9d767d83bd7d8e3ca1e3b9 | /src/main/java/com/jason/bytecode/IfAndWhileAndWhen.java | 159b61feddc8198044d017f869653b7097ae69a8 | [] | no_license | chenchencc/code | 624c45e60e136a6de395ebffdc26243c50314e34 | 4ba8fbd8f41d3c5401e7b5218952ef397f62d82b | refs/heads/master | 2021-10-11T20:21:13.288222 | 2019-01-29T11:35:16 | 2019-01-29T11:35:16 | 111,351,679 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 406 | java | package com.jason.bytecode;
public class IfAndWhileAndWhen {
public void test(){
int i = 0;
for (int m = 0;m < 100;m++){
if (m < 5){
i = m;
}
}
}
public void test2(){
int i = 0;
while (i<10){
System.out.println(i);
i++;
}
}
IfAndWhileAndWhen(){
super();
}
}
| [
"chenchen65@meituan.com"
] | chenchen65@meituan.com |
d98044d2162cad98a6fb29027ed18d8d42aef051 | 4a597da8eff9eb6a48aa86bac9d0f1399c97d95a | /onto_lib_custom/ontolib/ontolib-io/src/main/java/com/github/phenomics/ontolib/io/obo/upheno/UphenoGeneAnnotationParser.java | f817f1bc89d3324b14a49deb3d4a51806cf258d3 | [
"BSD-3-Clause-Clear",
"BSD-2-Clause"
] | permissive | johntiger1/boqa | 710e84de7c6e772afd75cb8800f633f2248b7d4d | 18270f3b1d7126f78f0938802146624b8cb65b60 | refs/heads/master | 2020-12-30T12:56:34.543263 | 2018-09-19T17:17:58 | 2018-09-19T17:17:58 | 91,379,125 | 1 | 0 | null | 2017-08-25T21:32:29 | 2017-05-15T19:58:06 | Java | UTF-8 | Java | false | false | 2,208 | java | package com.github.phenomics.ontolib.io.obo.upheno;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import com.github.phenomics.ontolib.io.base.TermAnnotationParser;
import com.github.phenomics.ontolib.io.base.TermAnnotationParserException;
import com.github.phenomics.ontolib.ontology.data.TermAnnotation;
/**
* Parser for Upheno gene annotation files.
*
* <p>
* <b>Usage Example</b>
* </p>
*
* <pre>
* File inputFile = "XXX.txt";
* try {
* UphenoGeneAnnotationFileParser parser = new UphenoGeneAnnotationFileParser(inputFile);
* while (parser.hasNext()) {
* UphenoAnnotation anno = parser.next();
* // ...
* }
* } except (IOException e) {
* System.err.println("Problem reading from file.");
* } except (TermAnnotationException e) {
* System.err.println("Problem parsing file.");
* }
* </pre>
*
* @author <a href="mailto:manuel.holtgrewe@bihealth.de">Manuel Holtgrewe</a>
*/
public final class UphenoGeneAnnotationParser implements TermAnnotationParser<TermAnnotation> {
/**
* The {@link File} to read from.
*/
private final File file;
/**
* The {@link BufferedReader} to use for reading line-wise.
*/
private final BufferedReader reader;
/** The next line. */
private String nextLine;
/**
* Create new parser for Upheno gene annotation file.
*
* @param file The file to read from.
*
* @throws IOException In case of problems with opening and reading from <code>file</code>.
* @throws TermAnnotationParserException If there are problems with the file's header.
*/
public UphenoGeneAnnotationParser(File file) throws IOException, TermAnnotationParserException {
this.file = file;
this.reader = new BufferedReader(new FileReader(file));
this.nextLine = reader.readLine();
}
@Override
public boolean hasNext() {
return nextLine != null;
}
@Override
public TermAnnotation next() throws IOException, TermAnnotationParserException {
throw new UnsupportedOperationException();
}
@Override
public void close() throws IOException {
reader.close();
}
@Override
public File getFile() {
return file;
}
}
| [
"john.person1@gmail.com"
] | john.person1@gmail.com |
a8e6eb559261e533b8bfd9b3b9b4eb2419cb7599 | 28597b580d3d3d812904a16109cf99b3d0e6fc06 | /src/main/java/de/interactive_instruments/xtraserver/config/schema/TableWithComment.java | beea1c6a9ce465c62e0540d5ebb4219cab6f9351 | [
"Apache-2.0"
] | permissive | stempler/xtraserver-config-util | b166f1e325bc7fe699c5faf16ba941fdb3524cb3 | 95f8913f5ac4bf9b424eaabc871e24836d981ee6 | refs/heads/master | 2020-03-09T22:52:54.727363 | 2018-04-10T14:28:50 | 2018-04-10T14:28:50 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,336 | java | /**
* Copyright 2018 interactive instruments GmbH
*
* 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 de.interactive_instruments.xtraserver.config.schema;
import javax.xml.bind.annotation.XmlTransient;
/**
* @author zahnen
*/
public class TableWithComment extends MappingsSequenceType.Table implements WithComment {
//private MappingsSequenceType.Table table;
@XmlTransient
String comment;
/*public TableCommentDecorator(MappingsSequenceType.Table table) {
this.table = table;
}*/
@Override
public boolean hasComment() {
return this.comment != null && !this.comment.isEmpty();
}
@Override
public String getComment() {
return this.comment;
}
@Override
public void setComment(String comment) {
this.comment = comment;
}
}
| [
"zahnen@interactive-instruments.de"
] | zahnen@interactive-instruments.de |
6e310e3b4b7b1ed4fe9735bfc1ba5a14ace56dc6 | e02f14b8e1ad8471c63fd47891b0378eb75b7f53 | /dev/treetonCore/src/treeton/core/config/context/resources/xmlimpl/ResourceChainModelXMLImpl.java | de7b953c3eada3fae9f12bf5e0d4aa392176376f | [
"Apache-2.0"
] | permissive | TreetonOrg/Treeton | c6c599d3c7d69be3685c8c08897fbcedf7d5a31b | fb1b85c138fd7aa31f4a78703b31cde364952b69 | refs/heads/dev | 2020-04-06T03:51:59.522677 | 2019-10-03T12:48:27 | 2019-10-03T12:48:27 | 83,141,024 | 0 | 2 | Apache-2.0 | 2019-10-03T12:48:28 | 2017-02-25T15:29:14 | Java | UTF-8 | Java | false | false | 2,149 | java | /*
* Copyright Anatoly Starostin (c) 2017.
*/
package treeton.core.config.context.resources.xmlimpl;
import org.w3c.dom.Element;
import treeton.core.config.context.ContextException;
import treeton.core.config.context.ContextUtil;
import treeton.core.config.context.resources.api.ResourceChainModel;
import treeton.core.config.context.resources.api.ResourceChainNode;
import treeton.core.config.context.resources.api.ResourceType;
import treeton.core.config.context.resources.api.ResourcesContext;
import treeton.core.util.xml.XMLParser;
import java.util.List;
import java.util.Map;
public class ResourceChainModelXMLImpl implements ResourceChainModel {
ResourcesContextXMLImpl initialContext;
Element element;
public ResourceChainModelXMLImpl(ResourcesContextXMLImpl initialContext, Element element) {
this.initialContext = initialContext;
this.element = element;
}
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
ResourceChainModelXMLImpl that = (ResourceChainModelXMLImpl) o;
return element.equals(that.element);
}
public int hashCode() {
return element.hashCode();
}
public int size() {
List<Element> list = XMLParser.getChildElementsByTagName(element, "REF");
return list.size();
}
public ResourceChainNode get(int i) {
List<Element> list = XMLParser.getChildElementsByTagName(element, "REF");
return new ResourceChainNodeXMLImpl(this, list.get(i));
}
public Map<String, Object> getInitialParameters() {
throw new UnsupportedOperationException("ResourceChain xml implementation doesn't support initial parameters");
}
public ResourceType getType() throws ContextException {
throw new UnsupportedOperationException("ResourceChain xml implementation doesn't support model with ResourceType");
}
public String getName() {
return ContextUtil.shortName(element.getAttribute("NAME"));
}
public ResourcesContext getInitialContext() {
return initialContext;
}
}
| [
"phoenixilya@gmail.com"
] | phoenixilya@gmail.com |
56dcc1b21ebd7339a75bff9749f84cdada1571ad | 839d619559119c22e8f213258316451ead614106 | /src/main/java/com/enhinck/db/entity/OneVersionModifySummary.java | c877953bf5098b13e644b6020895d105a9ebd2c1 | [
"Apache-2.0"
] | permissive | Enhinck/db-utils | 6625d527a7a25c3c93257c6d8f4f4bd4a292496c | 9b2fab4de70b9232778934c6a5eb920b3682563d | refs/heads/master | 2022-07-09T07:49:25.701749 | 2019-09-10T09:24:14 | 2019-09-10T09:24:14 | 194,997,420 | 4 | 3 | Apache-2.0 | 2022-06-29T17:29:06 | 2019-07-03T06:58:04 | Java | UTF-8 | Java | false | false | 625 | java | package com.enhinck.db.entity;
import com.google.common.collect.MapDifference;
import lombok.Data;
import org.apache.commons.collections.map.HashedMap;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
@Data
public class OneVersionModifySummary {
List<InformationSchemaTables> addTable = new ArrayList<>();
Map<String, InformationSchemaTables> map = new HashedMap();
Map<String, List<InformationSchemaColumns>> adds = new LinkedHashMap<>();
Map<String, List<MapDifference.ValueDifference<InformationSchemaColumns>>> modifys = new LinkedHashMap<>();
}
| [
"huenbin@foxmail.com"
] | huenbin@foxmail.com |
fbb904307cf70bde6bb71815aad8160f7a953893 | f766baf255197dd4c1561ae6858a67ad23dcda68 | /app/src/main/java/com/tencent/mm/plugin/location/Plugin.java | 7145a8ae5da9035c28e2511af3f57c19331a06d2 | [] | no_license | jianghan200/wxsrc6.6.7 | d83f3fbbb77235c7f2c8bc945fa3f09d9bac3849 | eb6c56587cfca596f8c7095b0854cbbc78254178 | refs/heads/master | 2020-03-19T23:40:49.532494 | 2018-06-12T06:00:50 | 2018-06-12T06:00:50 | 137,015,278 | 4 | 2 | null | null | null | null | UTF-8 | Java | false | false | 685 | java | package com.tencent.mm.plugin.location;
import com.tencent.mm.model.ar;
import com.tencent.mm.plugin.location.model.l;
import com.tencent.mm.pluginsdk.b.b;
import com.tencent.mm.pluginsdk.b.c;
import com.tencent.mm.pluginsdk.n;
public class Plugin
implements c
{
public n createApplication()
{
return new a();
}
public ar createSubCore()
{
return new l();
}
public b getContactWidgetFactory()
{
return null;
}
}
/* Location: /Users/Han/Desktop/wxall/微信反编译/反编译 6.6.7/dex2jar-2.0/classes7-dex2jar.jar!/com/tencent/mm/plugin/location/Plugin.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"526687570@qq.com"
] | 526687570@qq.com |
1f6b3793b9e4c86ba3d50c8c8127dc764c802aeb | f4b26c993c3131df83950a565c2e48471fa6aa15 | /src/main/java/com/yydb/common/web/validate/AjaxResponse.java | e385f9ab4177238745c097723ce7029eb5a88301 | [] | no_license | yorkchow/yydb | 0c1b325df8e2cf85da7d6ed47e4542068e5e5419 | e8e95dca2c4efb7ac7e301c4c1d46c0c4850f244 | refs/heads/master | 2021-01-16T18:19:33.673957 | 2014-11-03T14:58:14 | 2014-11-03T14:58:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,552 | java | package com.yydb.common.web.validate;
/**
* @author YorkChow<york.chow@actionsky.com>
* @since 2014/11/3
* Time: 1:37
*/
public class AjaxResponse {
private Boolean success;
private String message;
public AjaxResponse() {
this(Boolean.TRUE, "操作成功");
}
public AjaxResponse(Boolean success) {
this(success, null);
}
public AjaxResponse(String message) {
this(Boolean.TRUE, "操作成功");
}
public AjaxResponse(Boolean success, String message) {
this.success = success;
this.message = message;
if (this.message == null) {
if (Boolean.FALSE.equals(success)) {
this.message = "操作失败";
}
if (Boolean.TRUE.equals(success)) {
this.message = "操作成功";
}
}
}
public static AjaxResponse fail() {
return fail(null);
}
public static AjaxResponse fail(String message) {
return new AjaxResponse(Boolean.FALSE, message);
}
public static AjaxResponse success() {
return success(null);
}
public static AjaxResponse success(String message) {
return new AjaxResponse(Boolean.TRUE, message);
}
public Boolean getSuccess() {
return success;
}
public void setSuccess(Boolean success) {
this.success = success;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
| [
"marqro.york.chow@gmail.com"
] | marqro.york.chow@gmail.com |
680744e1394e90c5b971e67308443ad220a01f62 | 2114e3a9daca4017b2f4e732484ceb58f1e65200 | /app/src/main/java/com/example/rodrigo/singin/MainActivity.java | e91bf906df1cd8847efca046037fb9d7bb58c5b2 | [] | no_license | shop-aplicativo/appShop | 38b678ef0f57b8b2e1341002038e3f34092f9ded | 0fa05f6d52c60e9f08059907f3e1c5872babfd01 | refs/heads/master | 2021-08-16T03:34:02.971652 | 2017-11-18T23:08:23 | 2017-11-18T23:08:23 | 104,025,196 | 0 | 2 | null | 2017-11-04T00:28:48 | 2017-09-19T04:09:25 | Java | UTF-8 | Java | false | false | 1,176 | java | package com.example.rodrigo.singin;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class MainActivity extends AppCompatActivity {
private Button abrirCad;
private Button abrirLog;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
abrirCad=(Button) findViewById(R.id.cad);
abrirCad.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent IntentAbrirTelaCad= new Intent(MainActivity.this,Cadastro.class);
startActivity(IntentAbrirTelaCad);
}
});
abrirLog=(Button) findViewById(R.id.log);
abrirLog.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent IntentAbrirTelaLog=new Intent(MainActivity.this,Login.class);
startActivity(IntentAbrirTelaLog);
}
});
}
}
| [
"rodrigo.17@hotmail.com.br"
] | rodrigo.17@hotmail.com.br |
849a467ce84b586def230d8615bfbb703136f3fb | b6e59f72027d908602b29dd93f66642eb0eaf532 | /app/src/main/java/com/example/wedeliver/orderSuccess.java | 282e8de228ed1589cef9b133b1f2523bbf590aa0 | [] | no_license | yililavender/WeDeliver | 43451580d8ebe375195cd1f2d8a2d045ee478da7 | 1afa5fc3810f5fd1b6d4c09692b8820a2d962ec4 | refs/heads/master | 2023-06-14T13:10:56.565797 | 2021-07-06T14:14:17 | 2021-07-06T14:14:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,200 | java | package com.example.wedeliver;
import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.LinearLayout;
import com.google.android.material.snackbar.BaseTransientBottomBar;
import com.google.android.material.snackbar.Snackbar;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
public class orderSuccess extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_order_success);
LinearLayout linearLayout=findViewById(R.id.linearLayout1);
//Snackbar.make(linearLayout,"Order Placed", Snackbar.LENGTH_SHORT).show();//snackbar added
DatabaseReference databaseReference= FirebaseDatabase.getInstance().getReference().child("cart");
if(databaseReference!=null) {
databaseReference.removeValue();
}
}
@Override
public void onBackPressed() {
super.onBackPressed();
Intent intent=new Intent(getApplicationContext(),MainActivity.class);
startActivity(intent);
}
} | [
"eramalaaravind@gmail.com"
] | eramalaaravind@gmail.com |
5071c4e38be5e34b7abf7fdf85d91b6830141994 | ac24c4ad4331a981fa0e8d88a1f958c0159cba16 | /app/src/main/java/ru/geekbrains/Observer.java | 44b09c9f23112225d70087cfd4bbd5564cb0d7ec | [] | no_license | 23err/weatherApp | 52318f4316e041877039c8155360cb86c1babd8f | 3f4b30690f9b322cb979fe58cc3922d53759765e | refs/heads/master | 2023-02-25T23:57:08.513251 | 2021-01-31T18:23:52 | 2021-01-31T18:23:52 | 322,901,085 | 0 | 0 | null | 2021-01-31T20:03:41 | 2020-12-19T17:27:05 | Java | UTF-8 | Java | false | false | 95 | java | package ru.geekbrains;
public interface Observer {
public void updateCity(String city);
}
| [
"flip.04@mail.ru"
] | flip.04@mail.ru |
691b05effa405e7e2f38604a0b10beb3b3727896 | 7e4695865f1a1fe73434d3c96f7a545ba79a8163 | /book-api/src/main/java/br/com/pilgriman/bookapi/controller/BookController.java | 382f086cbc12bf1cb4042978655814420bda11b9 | [
"MIT"
] | permissive | Pilgriman/api-springboot-books | b99c21dc58900b9f03eaf47cc3b7af98969758a7 | 6327d2c921ba403bf5ff7af095e6ac6836c15e49 | refs/heads/main | 2023-07-18T11:10:43.077004 | 2021-08-24T01:45:44 | 2021-08-24T01:45:44 | 399,298,553 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,988 | java | package br.com.pilgriman.bookapi.controller;
import br.com.pilgriman.bookapi.bookservice.BookService;
import br.com.pilgriman.bookapi.dto.BookRequestDto;
import br.com.pilgriman.bookapi.entity.Book;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.util.UriComponents;
import org.springframework.web.util.UriComponentsBuilder;
import javax.validation.Valid;
import java.util.List;
@RestController
@RequestMapping("/api/books")
public class BookController {
@Autowired
private BookService bookService;
@PostMapping
public ResponseEntity<Void>createNewBook(@Valid @RequestBody BookRequestDto bookRequestDto, UriComponentsBuilder uriComponentsBuilder){
Long id = bookService.createNewBook(bookRequestDto);
UriComponents uriComponents = uriComponentsBuilder.path("/api/books/{id}").buildAndExpand(id);
HttpHeaders headers = new HttpHeaders();
headers.setLocation(uriComponents.toUri());
return new ResponseEntity<Void>(headers, HttpStatus.CREATED);
}
@GetMapping
public ResponseEntity<List<Book>> getAllBooks(){
return ResponseEntity.ok(bookService.getAllBooks());
}
@GetMapping("/{id}")
public ResponseEntity<Book> getBookById(@PathVariable("id") Long id){
return ResponseEntity.ok(bookService.getBookById(id));
}
@PutMapping("/{id}")
public ResponseEntity<Book> updateBook(@PathVariable("id") Long id, @Valid @RequestBody BookRequestDto bookRequestDto){
return ResponseEntity.ok(bookService.updateBook(id, bookRequestDto));
}
@DeleteMapping("/{id}")
public ResponseEntity<Void> deleleBoook(@PathVariable("id") Long id){
bookService.deleteBookById(id);
return ResponseEntity.ok().build();
}
}
| [
"limaufrpe289@gmail.com"
] | limaufrpe289@gmail.com |
cd446ef02f14fefa9d1046eae7618671146168c6 | fea66906353e7dfde1fc142f019461c2d3c5432a | /app/src/main/java/com/portfoliorobbinschlepers/portfoliorobbinschlepers/Downloadreacties.java | 380fa6b1b47fba5f1f11c14a56595c0b5b750b06 | [] | no_license | rschlepers/PortfolioRobbinSchlepers | 3539baec0f32d73a8266bf301cb9d159d27fcbb0 | bac7af185d55e8024ba850804f760246386a4f0d | refs/heads/master | 2021-01-20T13:18:12.996182 | 2017-05-06T15:00:59 | 2017-05-06T15:00:59 | 90,470,657 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,661 | java | package com.portfoliorobbinschlepers.portfoliorobbinschlepers;
import android.app.ProgressDialog;
import android.content.Context;
import android.os.AsyncTask;
import android.widget.ListView;
import android.widget.Toast;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
/**
* Created by rschlepers on 20-2-2017.
*/
public class Downloadreacties extends AsyncTask<Void,Integer,String> {
Context context;
String adres;
ListView lv;
ProgressDialog pd;
public Downloadreacties(Context context, String adres, ListView lv){
this.context = context;
this.adres = adres;
this.lv = lv;
}
@Override
protected void onPreExecute() {
super.onPreExecute();
pd = new ProgressDialog(context);
pd.setTitle("haal data");
pd.setMessage("Data ophalen...");
pd.show();
}
@Override
protected String doInBackground(Void... params) {
String data=downloadData();
return data;
}
@Override
protected void onPostExecute(String s) {
super.onPostExecute(s);
pd.dismiss();
if(s != null){
Parserreacties p=new Parserreacties(context,s,lv);
p.execute();
}
else{
Toast.makeText(context, "Reacties ophalen niet gelukt",Toast.LENGTH_SHORT).show();
}
}
private String downloadData() {
InputStream is = null;
String line = null;
try {
URL url = new URL(adres);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
is = new BufferedInputStream(connection.getInputStream());
BufferedReader br = new BufferedReader(new InputStreamReader(is));
StringBuffer sb=new StringBuffer();
if(br != null)
{
while((line=br.readLine()) != null){
sb.append(line+"\n");
}
}
else {
return null;
}
return sb.toString();
} catch (MalformedURLException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
finally {
if (is != null){
try {
is.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return null;
}
}
| [
"rschlepers@deltion.nl"
] | rschlepers@deltion.nl |
fe3cc48fc16cbdd9c0e1e6800d3bfceddc66ef96 | 2264dd5b16e4f13ee3b52facc8baca50eed51be7 | /src/main/java/com/springapp/user/NotFoundUserByUserIdNPasswordException.java | 06bdd4b6d12d7439fb4118b20ea3e64196081be9 | [] | no_license | kimmunsu/passion | 39c652b3dfecac8f5d7792f2bf106d28272605df | 2c7f45dff4b6497fa0f386bc2ff6b2e53162abab | refs/heads/master | 2021-01-24T23:45:11.037422 | 2014-02-14T10:31:04 | 2014-02-14T10:31:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 311 | java | package com.springapp.user;
public class NotFoundUserByUserIdNPasswordException extends Exception {
private static final long serialVersionUID = -511800988622582769L;
@Override
public String getMessage() {
return "id 혹은 password를 잘못 입력하셨습니다. 다시 입력해주세요.";
}
}
| [
"darkship1022@gmail.com"
] | darkship1022@gmail.com |
5e4c53244367e7238c813e11f852afc5e9e67c54 | ab52bb58aab8104c26db2a6690ec1986ac37dd62 | /main6/envoy/src/java/com/globalsight/machineTranslation/promt/pts9/TranslateFormattedText2Response.java | ba4c788338b6b6b1821412c9b4dbaf0a273a16db | [] | no_license | tingley/globalsight | 32ae49ac08c671d9166bd0d6cdaa349d9e6b4438 | 47d95929f4e9939ba8bbbcb5544de357fef9aa8c | refs/heads/master | 2021-01-19T07:23:33.073276 | 2020-10-19T19:42:22 | 2020-10-19T19:42:22 | 14,053,692 | 7 | 6 | null | null | null | null | UTF-8 | Java | false | false | 6,294 | java | /**
* Copyright 2009 Welocalize, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package com.globalsight.machineTranslation.promt.pts9;
public class TranslateFormattedText2Response implements java.io.Serializable
{
private static final long serialVersionUID = 4213867215464422469L;
private java.lang.String translateFormattedText2Result;
private java.lang.String strError;
public TranslateFormattedText2Response()
{
}
public TranslateFormattedText2Response(
java.lang.String translateFormattedText2Result,
java.lang.String strError)
{
this.translateFormattedText2Result = translateFormattedText2Result;
this.strError = strError;
}
/**
* Gets the translateFormattedText2Result value for this
* TranslateFormattedText2Response.
*
* @return translateFormattedText2Result
*/
public java.lang.String getTranslateFormattedText2Result()
{
return translateFormattedText2Result;
}
/**
* Sets the translateFormattedText2Result value for this
* TranslateFormattedText2Response.
*
* @param translateFormattedText2Result
*/
public void setTranslateFormattedText2Result(
java.lang.String translateFormattedText2Result)
{
this.translateFormattedText2Result = translateFormattedText2Result;
}
/**
* Gets the strError value for this TranslateFormattedText2Response.
*
* @return strError
*/
public java.lang.String getStrError()
{
return strError;
}
/**
* Sets the strError value for this TranslateFormattedText2Response.
*
* @param strError
*/
public void setStrError(java.lang.String strError)
{
this.strError = strError;
}
private java.lang.Object __equalsCalc = null;
public synchronized boolean equals(java.lang.Object obj)
{
if (!(obj instanceof TranslateFormattedText2Response))
return false;
TranslateFormattedText2Response other = (TranslateFormattedText2Response) obj;
if (obj == null)
return false;
if (this == obj)
return true;
if (__equalsCalc != null)
{
return (__equalsCalc == obj);
}
__equalsCalc = obj;
boolean _equals;
_equals = true
&& ((this.translateFormattedText2Result == null && other
.getTranslateFormattedText2Result() == null) || (this.translateFormattedText2Result != null && this.translateFormattedText2Result
.equals(other.getTranslateFormattedText2Result())))
&& ((this.strError == null && other.getStrError() == null) || (this.strError != null && this.strError
.equals(other.getStrError())));
__equalsCalc = null;
return _equals;
}
private boolean __hashCodeCalc = false;
public synchronized int hashCode()
{
if (__hashCodeCalc)
{
return 0;
}
__hashCodeCalc = true;
int _hashCode = 1;
if (getTranslateFormattedText2Result() != null)
{
_hashCode += getTranslateFormattedText2Result().hashCode();
}
if (getStrError() != null)
{
_hashCode += getStrError().hashCode();
}
__hashCodeCalc = false;
return _hashCode;
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(
TranslateFormattedText2Response.class, true);
static
{
typeDesc.setXmlType(new javax.xml.namespace.QName(
"http://Promt.Pits.Translator/Services/",
">TranslateFormattedText2Response"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("translateFormattedText2Result");
elemField.setXmlName(new javax.xml.namespace.QName(
"http://Promt.Pits.Translator/Services/",
"TranslateFormattedText2Result"));
elemField.setXmlType(new javax.xml.namespace.QName(
"http://www.w3.org/2001/XMLSchema", "string"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("strError");
elemField.setXmlName(new javax.xml.namespace.QName(
"http://Promt.Pits.Translator/Services/", "strError"));
elemField.setXmlType(new javax.xml.namespace.QName(
"http://www.w3.org/2001/XMLSchema", "string"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc()
{
return typeDesc;
}
/**
* Get Custom Serializer
*/
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType, java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType)
{
return new org.apache.axis.encoding.ser.BeanSerializer(_javaType,
_xmlType, typeDesc);
}
/**
* Get Custom Deserializer
*/
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType, java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType)
{
return new org.apache.axis.encoding.ser.BeanDeserializer(_javaType,
_xmlType, typeDesc);
}
}
| [
"kenny.jiang@welocalize.com"
] | kenny.jiang@welocalize.com |
21b2a6fb1f6940ab1cc7086201abc54485268386 | e8527c8730fa0fed5cbd27b6b76ecf80d4fd2926 | /app/src/main/java/com/example/think/coolweather/service/AutoUpdateService.java | 871b6e21be6732e9a618a15c5b9f678e6554ac9c | [
"Apache-2.0"
] | permissive | lupengchen/coolweather | 351afe9b9598dc3e8a08d1f9690650f93b2be899 | 0afad88b04a97d063027ea16e967895e1a01866c | refs/heads/master | 2021-09-05T10:16:50.233221 | 2018-01-26T10:14:33 | 2018-01-26T10:14:33 | 112,967,468 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,651 | java | package com.example.think.coolweather.service;
import android.app.AlarmManager;
import android.app.PendingIntent;
import android.app.Service;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.IBinder;
import android.os.SystemClock;
import android.preference.PreferenceManager;
import android.util.Log;
import android.widget.Toast;
import com.example.think.coolweather.gson.Weather;
import com.example.think.coolweather.util.HttpUtil;
import com.example.think.coolweather.util.Utility;
import java.io.IOException;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.Response;
public class AutoUpdateService extends Service {
@Override
public IBinder onBind(Intent intent) {
// TODO: Return the communication channel to the service.
return null;
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
updateWeather();
updateBingPic();
AlarmManager manager = (AlarmManager) getSystemService(ALARM_SERVICE);
int anHour = 8*60*60*1000;
long triggerAtTime = SystemClock.elapsedRealtime()+anHour;
Intent i = new Intent(this,AutoUpdateService.class);
PendingIntent pi = PendingIntent.getService(this,0,i,0);
manager.cancel(pi);
manager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP,triggerAtTime,pi);
Log.e("AutoUpdateService",triggerAtTime+"");
// Toast.makeText(this,triggerAtTime+"",Toast.LENGTH_SHORT).show();
return super.onStartCommand(intent, flags, startId);
}
private void updateWeather() {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
String weatherString = prefs.getString("weather",null);
if (weatherString != null){
Weather weather = Utility.handleWeatherResponse(weatherString);
String weatherId = weather.basic.weatherId;
String weatherUrl = "http://guolin.tech/api/weather?cityid=" + weatherId + "&key=4665f41a794845068caa1abf5d09f8a4";
HttpUtil.sendOkHttpRequest(weatherUrl, new Callback() {
@Override
public void onFailure(Call call, IOException e) {
e.printStackTrace();
}
@Override
public void onResponse(Call call, Response response) throws IOException {
String reponseText = response.body().string();
Weather weather = Utility.handleWeatherResponse(reponseText);
if (weather != null & "ok".equals(weather.status)){
SharedPreferences.Editor editor = PreferenceManager.getDefaultSharedPreferences(AutoUpdateService.this).edit();
editor.putString("weather",reponseText);
editor.apply();
}
}
});
}
}
private void updateBingPic() {
String requestBingPic = "http://guolin.tech/api/bing_pic";
HttpUtil.sendOkHttpRequest(requestBingPic, new Callback() {
@Override
public void onFailure(Call call, IOException e) {
e.printStackTrace();
}
@Override
public void onResponse(Call call, Response response) throws IOException {
String bingPic = response.body().string();
SharedPreferences.Editor editor = PreferenceManager.getDefaultSharedPreferences(AutoUpdateService.this).edit();
editor.putString("bing_pic",bingPic);
editor.apply();
}
});
}
}
| [
"you@example.com"
] | you@example.com |
7e4ad7fa53508068878a87770283d2e3f672eeba | 91e4dc2de5a788cdf16cbdfe22ce0658b7760598 | /src/test/java/jp/com/study/StudyApplicationTests.java | eabaff70d7fc017da8c9c1c473a2099bd6318779 | [] | no_license | integerzeroGit/study | 504ff9edb4d8e128c87c0536ac9bce626053bff9 | e029156df75fc416672ca2e9f2ec3317a037e388 | refs/heads/master | 2023-03-05T22:19:32.753736 | 2021-02-18T00:43:04 | 2021-02-18T00:43:04 | 339,307,868 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 203 | java | package jp.com.study;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class StudyApplicationTests {
@Test
void contextLoads() {
}
}
| [
"favoritemail.integerzero@gmail.com"
] | favoritemail.integerzero@gmail.com |
20eac56d1189b7efb99154c3bb2c9df0610844d0 | 8b4dad04d6df47503082ccf0c6977e8f4dd36e96 | /src/main/java/com/chinalbs/controller/UserManageController.java | 9ffa61f302125e53ff11b592e743ef8cb44e034c | [] | no_license | wangyiran125/portal_ec | debe084e3cb4ec093ef7f2ed75a40e1ae70b9401 | 5dd1acdb583c52d7a18eb69d320fdf02d4567532 | refs/heads/master | 2021-03-12T19:24:53.431109 | 2015-05-20T07:15:00 | 2015-05-20T07:15:00 | 35,932,151 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,648 | java | package com.chinalbs.controller;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import com.chinalbs.beans.CommonAttributes;
import com.chinalbs.entity.Device;
import com.chinalbs.entity.UsBindDevice;
import com.chinalbs.framework.controller.BaseController;
import com.chinalbs.framework.datasource.DataSourceContextHolder;
import com.chinalbs.framework.datasource.datatype.DataSourceType;
import com.chinalbs.framework.filter.Filter;
import com.chinalbs.framework.filter.Filter.Operator;
import com.chinalbs.framework.ordering.Ordering;
import com.chinalbs.framework.ordering.Ordering.Direction;
import com.chinalbs.framework.paging.Page;
import com.chinalbs.framework.paging.Pageable;
import com.chinalbs.service.DeviceService;
import com.chinalbs.service.UsBindDeviceService;
import com.chinalbs.service.UsUserService;
/**
* Controller - user manage
*
*/
@Controller("userManageController")
@RequestMapping("/console/usermanage")
public class UserManageController extends BaseController {
@Resource(name = "usUserServiceImpl")
private UsUserService usUserService;
@Resource(name = "usBindDeviceServiceImpl")
private UsBindDeviceService usBindDeviceService;
@Resource(name = "deviceServiceImpl")
private DeviceService deviceService;
/**
* 下属用户列表
*/
@RequestMapping(value = "/list", method = RequestMethod.GET)
public String list(Pageable pageable, ModelMap model,HttpSession session) {
// 判断在API数据库中是否登录成功,如果失败,userId为空,设为-1.查询无数据
String userId = (String) session.getAttribute(CommonAttributes.API_USERID_SESSION);
userId = userId != null ? userId : "-1";
if(pageable.getOrderProperty() == null && pageable.getOrderDirection() == null){
pageable.setOrderProperty("fTime");
pageable.setOrderDirection(Direction.desc);
}
DataSourceContextHolder.setDataSourceType(DataSourceType.CUST);
List<Filter> filters = new ArrayList<Filter>();
Filter serviceIdFilter = new Filter("fServiceId", Operator.eq, userId);
filters.add(serviceIdFilter);
pageable.setFilters(filters);
model.addAttribute("page", usUserService.findPage(pageable));
DataSourceContextHolder.setDataSourceType(DataSourceType.OWN);
return "/console/usermanage/list";
}
/**
* 用户绑定列表
*/
@RequestMapping(value = "/bindDevice", method = RequestMethod.GET)
public String devicelist(Pageable pageable, ModelMap model,HttpSession session,Long id,String userName) {
pageable.setOrderProperty("fTime");
pageable.setOrderDirection(Direction.desc);
DataSourceContextHolder.setDataSourceType(DataSourceType.CUST);
List<Filter> filters = new ArrayList<Filter>();
Filter userIdFilter = new Filter("fUserId", Operator.eq, id);
filters.add(userIdFilter);
pageable.setFilters(filters);
Page<UsBindDevice> page = usBindDeviceService.findPage(pageable);
// List<UsBindDevice> usBindDevices = new ArrayList<UsBindDevice>();
List<Ordering> orders = new ArrayList<Ordering>();
Ordering order = new Ordering("fSn", Direction.asc);
orders.add(order);
for(UsBindDevice usBindDevice:page.getContent()){
List<Filter> snfilters = new ArrayList<Filter>();
Filter snFilter = new Filter("fSn", Operator.eq, usBindDevice.getfDeviceSn());
snfilters.add(snFilter);
List<Device> deviceList = deviceService.findList(null, snfilters, orders);
if(deviceList!=null){
Device device =deviceList.get(0);
usBindDevice.setfIsvirtual(device.getfIsvirtual());
usBindDevice.setfPhone(device.getfPhone());
usBindDevice.setfProtocol(device.getfProtocol());
usBindDevice.setfType(device.getfType());
// usBindDevices.add(usBindDevice);
}
}
//Page<UsBindDevice> usBindDevicePage = new Page<UsBindDevice>(usBindDevices, page.getTotal(), page.getPageable());
model.addAttribute("page", page);
model.addAttribute("userName", userName);
model.addAttribute("selectUserId", id);
DataSourceContextHolder.setDataSourceType(DataSourceType.OWN);
return "/console/usermanage/devicelist";
}
} | [
"wangyiran125@icloud.com"
] | wangyiran125@icloud.com |
5868866d7895cc961b00dec9ffcb477d998b451e | 83d12c77b6afd8d53871770248736513440d7e9c | /src/test/java/io/github/oxnz/Ingrid/tx/TxHttpExecutorTest.java | efe4e63ea56462f22e8707f86258f49f4241c0ee | [
"MIT"
] | permissive | oxnz/Ingrid | e6392d83b1c5fccf01ab955f2e16fe3e20732214 | df7bc81a95234ed3dbe4ab1930f7facec06bdf9f | refs/heads/master | 2020-07-06T08:24:46.848719 | 2020-01-20T08:29:54 | 2020-01-20T08:29:54 | 202,953,957 | 0 | 0 | MIT | 2020-01-20T08:29:56 | 2019-08-18T03:08:58 | Scala | UTF-8 | Java | false | false | 7,530 | java | package io.github.oxnz.Ingrid.tx;
import org.apache.http.conn.ssl.NoopHostnameVerifier;
import org.junit.Before;
import org.junit.Test;
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLContext;
import javax.net.ssl.TrustManagerFactory;
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.net.URI;
import java.net.http.HttpRequest;
import java.security.KeyStore;
import java.security.SecureRandom;
import java.security.cert.Certificate;
import java.security.cert.CertificateException;
import java.security.cert.CertificateFactory;
import java.time.Duration;
import java.util.Base64;
import java.util.Map;
import java.util.concurrent.Executors;
public class TxHttpExecutorTest {
HttpExecutor httpExecutor;
private Certificate certificate(String encodedCert) throws CertificateException {
return
CertificateFactory.getInstance("X509")
.generateCertificate(new ByteArrayInputStream(Base64.getDecoder().decode(encodedCert)));
}
@Before
public void setup() throws CertificateException {
String cert1 = "MIIJRTCCCC2gAwIBAgIQId276PtDYAkIAAAAAB2KRjANBgkqhkiG9w0BAQsFADBCMQswCQYDVQQGEwJVUzEeMBwGA1UEChMVR29vZ2xlIFRydXN0IFNlcnZpY2VzMRMwEQYDVQQDEwpHVFMgQ0EgMU8xMB4XDTE5MTEwNTA3NDYxNloXDTIwMDEyODA3NDYxNlowZjELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxEzARBgNVBAoTCkdvb2dsZSBMTEMxFTATBgNVBAMMDCouZ29vZ2xlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABETwWPdIiJP2EXiE+YH4oKgNNT/vgfFFf6Ssm7+UgJf0qZ+oY63xqfhEbOLu0J0agXa5oLGYkMedgHhwAgs/F26jggbcMIIG2DAOBgNVHQ8BAf8EBAMCB4AwEwYDVR0lBAwwCgYIKwYBBQUHAwEwDAYDVR0TAQH/BAIwADAdBgNVHQ4EFgQU2VYFohFero6gqXjGUx+pPh8vq3AwHwYDVR0jBBgwFoAUmNH4bhDrz5vsYJ8YkBug630J/SswZAYIKwYBBQUHAQEEWDBWMCcGCCsGAQUFBzABhhtodHRwOi8vb2NzcC5wa2kuZ29vZy9ndHMxbzEwKwYIKwYBBQUHMAKGH2h0dHA6Ly9wa2kuZ29vZy9nc3IyL0dUUzFPMS5jcnQwggSdBgNVHREEggSUMIIEkIIMKi5nb29nbGUuY29tgg0qLmFuZHJvaWQuY29tghYqLmFwcGVuZ2luZS5nb29nbGUuY29tghIqLmNsb3VkLmdvb2dsZS5jb22CGCouY3Jvd2Rzb3VyY2UuZ29vZ2xlLmNvbYIGKi5nLmNvgg4qLmdjcC5ndnQyLmNvbYIRKi5nY3BjZG4uZ3Z0MS5jb22CCiouZ2dwaHQuY26CDiouZ2tlY25hcHBzLmNughYqLmdvb2dsZS1hbmFseXRpY3MuY29tggsqLmdvb2dsZS5jYYILKi5nb29nbGUuY2yCDiouZ29vZ2xlLmNvLmlugg4qLmdvb2dsZS5jby5qcIIOKi5nb29nbGUuY28udWuCDyouZ29vZ2xlLmNvbS5hcoIPKi5nb29nbGUuY29tLmF1gg8qLmdvb2dsZS5jb20uYnKCDyouZ29vZ2xlLmNvbS5jb4IPKi5nb29nbGUuY29tLm14gg8qLmdvb2dsZS5jb20udHKCDyouZ29vZ2xlLmNvbS52boILKi5nb29nbGUuZGWCCyouZ29vZ2xlLmVzggsqLmdvb2dsZS5mcoILKi5nb29nbGUuaHWCCyouZ29vZ2xlLml0ggsqLmdvb2dsZS5ubIILKi5nb29nbGUucGyCCyouZ29vZ2xlLnB0ghIqLmdvb2dsZWFkYXBpcy5jb22CDyouZ29vZ2xlYXBpcy5jboIRKi5nb29nbGVjbmFwcHMuY26CFCouZ29vZ2xlY29tbWVyY2UuY29tghEqLmdvb2dsZXZpZGVvLmNvbYIMKi5nc3RhdGljLmNugg0qLmdzdGF0aWMuY29tghIqLmdzdGF0aWNjbmFwcHMuY26CCiouZ3Z0MS5jb22CCiouZ3Z0Mi5jb22CFCoubWV0cmljLmdzdGF0aWMuY29tggwqLnVyY2hpbi5jb22CECoudXJsLmdvb2dsZS5jb22CEyoud2Vhci5na2VjbmFwcHMuY26CFioueW91dHViZS1ub2Nvb2tpZS5jb22CDSoueW91dHViZS5jb22CFioueW91dHViZWVkdWNhdGlvbi5jb22CESoueW91dHViZWtpZHMuY29tggcqLnl0LmJlggsqLnl0aW1nLmNvbYIaYW5kcm9pZC5jbGllbnRzLmdvb2dsZS5jb22CC2FuZHJvaWQuY29tghtkZXZlbG9wZXIuYW5kcm9pZC5nb29nbGUuY26CHGRldmVsb3BlcnMuYW5kcm9pZC5nb29nbGUuY26CBGcuY2+CCGdncGh0LmNuggxna2VjbmFwcHMuY26CBmdvby5nbIIUZ29vZ2xlLWFuYWx5dGljcy5jb22CCmdvb2dsZS5jb22CD2dvb2dsZWNuYXBwcy5jboISZ29vZ2xlY29tbWVyY2UuY29tghhzb3VyY2UuYW5kcm9pZC5nb29nbGUuY26CCnVyY2hpbi5jb22CCnd3dy5nb28uZ2yCCHlvdXR1LmJlggt5b3V0dWJlLmNvbYIUeW91dHViZWVkdWNhdGlvbi5jb22CD3lvdXR1YmVraWRzLmNvbYIFeXQuYmUwIQYDVR0gBBowGDAIBgZngQwBAgIwDAYKKwYBBAHWeQIFAzAvBgNVHR8EKDAmMCSgIqAghh5odHRwOi8vY3JsLnBraS5nb29nL0dUUzFPMS5jcmwwggEGBgorBgEEAdZ5AgQCBIH3BIH0APIAdwCyHgXMi6LNiiBOh2b5K7mKJSBna9r6cOeySVMt74uQXgAAAW46vlHbAAAEAwBIMEYCIQDpOV89u5EqOAN3utS9vvXK6b9qwnYgsiRvTDPzKj/RMgIhAJtf5vPM60HYJDIMIDreUJ9FJXN1gZ80iPCWa3XJfMv9AHcAXqdz+d9WwOe1Nkh90EngMnqRmgyEoRIShBh1loFxRVgAAAFuOr5SDgAABAMASDBGAiEAluuJTunQX+sOvRtgoGi5FWjLmSyfkR9FoxlTIwI9MPACIQDrvOpik5EGkKCHQYQzjHjEJs/6oMN8snfsFkaspC1pZzANBgkqhkiG9w0BAQsFAAOCAQEAS2pcPhrdskAIb3lACvzVmnxGb/dGBHZ9tIYe3a7UEmcVnl1mlNzWWLakbhXymqJO9XZdD++LVbrS/TTFXkTC8s+D+3xLsA31KcKaCRcs/k3iibnxo6DQMXvo52aadZh4NiocEabMUgzjZy5XPN6+YuC/5UtvRmC2hEOfxNkZK7WhhfJq+MoTuIV5g221GpWCprnFmMb9JCjZg3jR88kAoITUR7rJnKXQLOu7HInluBrcgg9m5/Aum9yfBV3TyeD/LWwi36qL9jh2h8L9+p0jLpQcYOD15YC+jtxzvBizqOnlri6cZB34sHSsW8ZSGFpLvazW8Amlsgtt121wNo1ehQ==";
String cert2 = "MIIESjCCAzKgAwIBAgINAeO0mqGNiqmBJWlQuDANBgkqhkiG9w0BAQsFADBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMjETMBEGA1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjAeFw0xNzA2MTUwMDAwNDJaFw0yMTEyMTUwMDAwNDJaMEIxCzAJBgNVBAYTAlVTMR4wHAYDVQQKExVHb29nbGUgVHJ1c3QgU2VydmljZXMxEzARBgNVBAMTCkdUUyBDQSAxTzEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDQGM9F1IvN05zkQO9+tN1pIRvJzzyOTHW5DzEZhD2ePCnvUA0Qk28FgICfKqC9EksC4T2fWBYk/jCfC3R3VZMdS/dN4ZKCEPZRrAzDsiKUDzRrmBBJ5wudgzndIMYcLe/RGGFl5yODIKgjEv/SJH/UL+dEaltN11BmsK+eQmMF++AcxGNhr59qM/9il71I2dN8FGfcddwuaej4bXhp0LcQBbjxMcI7JP0aM3T4I+DsaxmKFsbjzaTNC9uzpFlgOIg7rR25xoynUxv8vNmkq7zdPGHXkxWY7oG9j+JkRyBABk7XrJfoucBZEqFJJSPk7XA0LKW0Y3z5oz2D0c1tJKwHAgMBAAGjggEzMIIBLzAOBgNVHQ8BAf8EBAMCAYYwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMBIGA1UdEwEB/wQIMAYBAf8CAQAwHQYDVR0OBBYEFJjR+G4Q68+b7GCfGJAboOt9Cf0rMB8GA1UdIwQYMBaAFJviB1dnHB7AagbeWbSaLd/cGYYuMDUGCCsGAQUFBwEBBCkwJzAlBggrBgEFBQcwAYYZaHR0cDovL29jc3AucGtpLmdvb2cvZ3NyMjAyBgNVHR8EKzApMCegJaAjhiFodHRwOi8vY3JsLnBraS5nb29nL2dzcjIvZ3NyMi5jcmwwPwYDVR0gBDgwNjA0BgZngQwBAgIwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly9wa2kuZ29vZy9yZXBvc2l0b3J5LzANBgkqhkiG9w0BAQsFAAOCAQEAGoA+Nnn78y6pRjd9XlQWNa7HTgiZ/r3RNGkmUmYHPQq6Scti9PEajvwRT2iWTHQr02fesqOqBY2ETUwgZQ+lltoNFvhsO9tvBCOIazpswWC9aJ9xju4tWDQH8NVU6YZZ/XteDSGU9YzJqPjY8q3MDxrzmqepBCf5o8mw/wJ4a2G6xzUr6Fb6T8McDO22PLRL6u3M4Tzs3A2M1j6bykJYi8wWIRdAvKLWZu/axBVbzYmqmwkm5zLSDW5nIAJbELCQCZwMH56t2Dvqofxs6BBcCFIZUSpxu6x6td0V7SvJCCosirSmIatj/9dSSVDQibet8q/7UK4v4ZUN80atnZz1yg==";
SSLContext ctx = sslContext(Map.of("www.google.com", certificate(cert1),
"intermediate", certificate(cert2)));
httpExecutor = new HttpExecutor(
NoopHostnameVerifier.INSTANCE,
ctx,
Duration.ofSeconds(1), Executors.newSingleThreadExecutor());
}
private static SSLContext sslContext(final Map<String, Certificate> certificates) {
try {
KeyStore ks = KeyStore.getInstance("PKCS12");
char[] password = "password".toCharArray();
ks.load(null, password);
for (Map.Entry<String, Certificate> entry : certificates.entrySet()) {
String key = entry.getKey();
Certificate value = entry.getValue();
ks.setCertificateEntry(key, value);
}
KeyManagerFactory kmf = KeyManagerFactory.getInstance("PKIX");
kmf.init(ks, password);
TrustManagerFactory tmf = TrustManagerFactory.getInstance("PKIX");
tmf.init(ks);
SSLContext ctx = SSLContext.getInstance("TLS");
ctx.init(kmf.getKeyManagers(), tmf.getTrustManagers(), new SecureRandom());
return ctx;
} catch (Exception e) {
throw new RuntimeException(e);
}
}
@Test
public void submit() {
}
@Test
public void execute() throws IOException, InterruptedException {
URI uri = URI.create("https://www.google.com");
HttpRequest request = HttpRequest.newBuilder(uri).build();
String response = httpExecutor.execute(request, r -> {
System.out.println(r);
return "HELLO";
});
System.out.println(response);
}
} | [
"max.zhang@airbnb.com"
] | max.zhang@airbnb.com |
ccddbef1b6e737eadd7e703a44cfeac5dc1e8ce3 | f439b74ebcf230e737aedf19243a8d6e612dd02a | /src/JPL/ch02_12/Ex02_12.java | be619ecad566d91362e4aeb022cf292a112fa7b7 | [] | no_license | Nkitoh/JavaTraining | 98d442d9c4d7c06f1a727015e41cab0a155b5e96 | f60e910874c986700e5be132fc1c3820a21784c5 | refs/heads/master | 2016-09-06T11:08:18.853233 | 2014-04-09T03:58:48 | 2014-04-09T03:58:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,955 | java | package ch02_12;
/*
* Vehicleクラスには、
* Ownerのみ可変長引数を追加
*
* LinkedListには、
* Add_multi_listで、
* 複数のVehicleオブジェクトをリストに追加できるようにした。
*
*/
public class Ex02_12 {
public static void main(String[] args) {
LinkedList Vehicle_list = new LinkedList();
Vehicle Benz = new Vehicle("Benz", 120, 45, "A");
Vehicle Corolla = new Vehicle("Corolla", 240, 70, "B", "B2",
"B3");
Vehicle Crown = new Vehicle("Crown", 20, 150, "C");
Vehicle Taxi = new Vehicle("Taxi", 230, -50, "D", "D1");
Vehicle Bus = new Vehicle("Bus", 2230, -230, "E", "E1", "E2",
"E3", "E4");
Vehicle_list.value = Benz;
Vehicle_list = Vehicle_list.Add_multi_list(Corolla, Crown, Taxi, Bus);
System.out.println(Vehicle_list);
}
}
class Vehicle {
public int speed;
public int angle;
public String[] owner;
public static long nextId = 0;
public long idNum;
String CarName;
// デフォルトコンストラクタ
Vehicle() {
idNum = nextId++;
}
// Vehicleクラスの全ての変数をコンストラクタで初期化
Vehicle(String CarName, int speed, int angle, String... owner) {
this();
this.CarName = CarName;
this.speed = speed;
this.angle = angle;
this.owner = owner;
}
// 識別番号の最大値を取得
static long Return_max_id() {
return nextId;
}
// CarName,speed,angle,owner,idを表示
public String toString() {
String desc = this.CarName + ":" + "speed:" + this.speed + ",angle:"
+ this.angle;
desc += ",owner:";
for (int i = 0; i < this.owner.length; i++) {
desc += this.owner[i] + ",";
}
desc += "ID:" + this.idNum;
return desc;
}
// CarName,speed,angle,owner,idを表示
void Print() {
System.out.print(this.CarName + ":" + "speed:" + this.speed + ",angle:"
+ this.angle);
System.out.print(",owner:");
for (int i = 0; i < this.owner.length; i++) {
System.out.print(this.owner[i] + ",");
}
System.out.println("ID:" + this.idNum);
}
}
class LinkedList {
Vehicle value;
LinkedList next;
LinkedList() {
this.value = null;
this.next = null;
}
LinkedList(Vehicle value) {
this.value = value;
this.next = null;
}
// リストにvalueを追加
LinkedList Add_list(Vehicle value) {
LinkedList listp = new LinkedList();
listp.value = value;
listp.next = this;
return listp;
}
// リストにvalueを複数個追加
LinkedList Add_multi_list(Vehicle... value) {
LinkedList[] listp = new LinkedList[value.length];
listp[0] = this.Add_list(value[0]);
for (int i = 1; i < value.length; i++) {
listp[i] = listp[i - 1].Add_list(value[i]);
}
return listp[value.length - 1];
}
// リストに登録してあるVehicleを全て表示
public String toString() {
LinkedList ref;
String desc = "Venicle_List:\n";
for (ref = this; ref != null; ref = ref.next) {
desc += ref.value.toString() + "\n";
}
return desc;
}
}
| [
"naoya0901_j@yahoo.co.jp"
] | naoya0901_j@yahoo.co.jp |
932768b08c7c8144a406bbcdcb3fdea51aa4684d | 2b91cd325c397a15b80f192de4705b496f617d74 | /src/main/java/org/ocsoft/rosetto/parsers/ScenarioParser.java | 2bf1f70df1f5b27a5174b2504301486909820c47 | [] | no_license | Rosetto/Rosetto-base | 1d8d2b5c137cd3c994200ea26cec787dfe22494d | f7b4f39c21d4c934216cabb4840063708f86859e | refs/heads/master | 2021-01-22T18:28:16.792270 | 2015-10-07T00:56:18 | 2015-10-07T00:56:18 | 17,415,573 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,262 | java | /* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package org.ocsoft.rosetto.parsers;
import java.util.List;
import java.util.Map;
import org.frows.lilex.parser.Tokenizer;
import org.frows.lilex.token.Token;
import org.ocsoft.rosetto.functions.base.BaseFunctions;
import org.ocsoft.rosetto.models.base.elements.RosettoValue;
import org.ocsoft.rosetto.models.base.elements.values.ActionCall;
import org.ocsoft.rosetto.models.base.elements.values.ScriptValue;
import org.ocsoft.rosetto.models.base.scenario.Label;
import org.ocsoft.rosetto.models.base.scenario.Scenario;
import org.ocsoft.rosetto.models.base.scenario.ScenarioToken;
import org.ocsoft.rosetto.models.base.scenario.Unit;
import org.ocsoft.rosetto.models.system.Parser;
import org.ocsoft.rosetto.models.system.Scope;
import org.ocsoft.rosetto.parsers.rosetto.RosettoElementParser;
import org.ocsoft.rosetto.utils.base.TextUtils;
/**
* パーサーの抽象クラス.複数の文法構造に対応可能にする.
* ScenarioParser.parse()から設定ファイルに合わせたサブクラスで初期化される.
* @author tohhy
*/
public class ScenarioParser extends Tokenizer implements Parser {
/**
* 正規記法のタグ全体にマッチする正規表現
*/
protected static final String ALL_TAG = TextUtils.createTagRegex("[", "]");
/**
* 正規記法のタグを含むかどうかを判定する正規表現
*/
protected static final String TAG_CONTAINS_REGEX = ".*?(\\[(.*?)\\]).*";
/**
* スクリプトの正規化を行うノーマライザ.
*/
private final AbstractNormalizer normalizer;
/**
* 文法ごとのタグを解釈しRosettoのアクションに変更するタグパーサー.
*/
private final AbstractElementParser elementParser;
/**
* パーサーを初期化する.
* スクリプトのパースの際には、引数に与えられたノーマライザとタグパーサーを用いる.
* @param normalizer スクリプトの正規化を行うノーマライザ
* @param tagParser 文法ごとのタグを解釈しRosettoのアクションに変更するタグパーサー
*/
public ScenarioParser(AbstractNormalizer normalizer, AbstractElementParser tagParser) {
if(normalizer == null) throw new IllegalArgumentException("normalizerがnullです");
if(tagParser == null) throw new IllegalArgumentException("tagparserがnullです");
this.normalizer = normalizer;
this.elementParser = tagParser;
}
/**
* パーサーを初期化する.
* スクリプトのパースの際には、引数に与えられたノーマライザとデフォルトのタグパーサーを用いる.
* @param normalizer スクリプトの正規化を行うノーマライザ
*/
public ScenarioParser(AbstractNormalizer normalizer) {
this(normalizer, new RosettoElementParser());
}
/**
* 指定した文字列をRosettoValueに変換する.<br>
* @param element
* @return
*/
public RosettoValue parseElement(String element) {
return elementParser.parseElement(element);
}
@Override
public List<String> splitElements(String elements) {
return elementParser.splitElements(elements);
}
/**
* 文字列表現のシナリオを解釈してシナリオオブジェクトを作成する.
* @param scenarioText 文字列表現のシナリオ
* @return パース後のシナリオ
*/
public Scenario parseScript(String scenarioText) {
List<String> scenario = ParseUtils.asLines(scenarioText);
return parseScript(scenario);
}
/**
* 行ごとに分割されたシナリオスクリプトをパースして通常シナリオを返す.
* パースのメイン処理.<br>
* normalizer.normalizeでテキストと角括弧形式のタグのみに正規化、
* tokenizeでトークンに分割の順で操作が行われる.
* @param scenarioLines 行ごとに分割されたシナリオスクリプト
* @return パース後のシナリオ
*/
public Scenario parseScript(List<String> scenarioLines) {
//テキストと角括弧形式のタグのみに正規化
List<String> normalized = normalizer.normalize(scenarioLines);
//トークンのリストを作成
List<? extends Token> tokens = tokenize(normalized);
//シナリオ作成
return new Scenario(tokens);
}
@Override
public Scenario parseScript(ScriptValue script) {
List<String> scenarioLines = ParseUtils.asLines(script.getScript());
//テキストと角括弧形式のタグのみに正規化
List<String> normalized = normalizer.normalize(scenarioLines);
//トークンのリストを作成
List<? extends Token> tokens = tokenize(normalized);
//シナリオ作成
//TODO スコープ継承
return new Scenario(tokens);
}
/**
* プレーンテキストとタグが1つずつ組になったテキストを受け取り、ユニットを生成して返す.
* unitStrは<br>
* <code>
* 吾輩は猫である。[foo bar=baz]<br>
* </code>
* のような形で渡される.これから単一のユニットを生成して返す.
*/
protected Unit createUnit(String unitStr) {
//タグとテキストに分割
int obIndex = unitStr.indexOf('[');
String tag = (obIndex == -1) ? "[pass]" : unitStr.substring(obIndex);
String text = (obIndex == -1) ? unitStr : unitStr.substring(0, obIndex);
ActionCall action = (ActionCall)elementParser.parseElement(tag);
return new Unit(text, action);
}
/**
* テキスト+タグの形式のみに正規化された文字列を受け取り、UnitのListに変換して返す.
* @param normalized 正規化された文字列をすべて結合したもの
* @return
*/
@Override
public List<ScenarioToken> tokenize(String normalized) {
ParserState ps = new ParserState();
for(String unitStr : ParseUtils.splitScript(normalized)) {
//テキストをコンパイルしてユニットにする
Unit u = createUnit(unitStr);
//ユニットを追加
ps.addUnit(u);
//ユニットがラベルならラベルも追加(パース時唯一の例外的処理)
if(u.getAction().getActionName().equals("label")) {
ps.addLabel(createLabel(ps, u.getAction()));
}
}
return ps.getTokens();
}
private static Label createLabel(ParserState ps, ActionCall labelAction) {
Map<String, RosettoValue> args =
labelAction.getArgs().bind(BaseFunctions.label, new Scope());
String labelName = args.get("name").asString();
String labelTitle = args.get("title").asString();
return new Label(labelName, ps.getUnitIndex(), labelTitle);
}
}
| [
"olivinecafe@gmail.com"
] | olivinecafe@gmail.com |
56de761a8c25c342bb90dfc214fef70fda99d988 | 2c4530cc44adb302df608ff12669f8929d9d9d88 | /src/java/org/com/exam/messages/service/StudentService.java | ada0b0205eae3df8f8f28678cd83a82b47caefce | [] | no_license | shahidur24/AngularjsRestfulCRUD | 18de050b625a864ed44ed29cfdd43812360f4049 | fd444d42ea43bd5de24b6f0583e847c9cd51f407 | refs/heads/master | 2020-11-24T02:27:13.697658 | 2019-12-13T21:36:29 | 2019-12-13T21:36:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,095 | java | package org.com.exam.messages.service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.com.exam.messages.database.DatabaseClass;
import org.com.exam.messages.model.Student;
public class StudentService {
private Map<Integer, Student> studentMap = new HashMap();
public StudentService() {
for (Student s : DatabaseClass.doQuery()) {
studentMap.put(s.getId(), s);
}
}
public Student findStudentById(int id) {
return studentMap.get(id);
}
public List<Student> getAllStudent() {
return new ArrayList<Student>(studentMap.values());
}
public Student addStudent(Student stu) {
DatabaseClass.doSave(stu);
return stu;
}
public Student updateStudent(Student stu) {
if (stu.getId() <= 0) {
return null;
}
DatabaseClass.doUpdate(stu);
return stu;
}
public void removeStudent(int id) {
Student s = new Student();
s.setId(id);
DatabaseClass.doDelete(s);
}
}
| [
"TEACHER@TEACHER-PC"
] | TEACHER@TEACHER-PC |
a6cc29f914eee3438ebd509348be750b1a83972b | 81a6578193bf337d8772484769de3a03ff06643b | /AbstractClass/src/com/kubilaycicek/Square.java | 0ddbc74e45a5f10fe54c07bef89389ebf51315ea | [] | no_license | kubilaycicek/OOP-Examples | 99cd486146b1d0b27fca4234667ac8b9f1290387 | 0d12a1b020660695ec30f3b24985b8ce9dc57f46 | refs/heads/master | 2021-04-23T18:30:00.113125 | 2020-03-25T12:05:56 | 2020-03-25T12:05:56 | 249,967,141 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 283 | java | package com.kubilaycicek;
public class Square extends Shape {
private int a;
public Square(String name, int a) {
super(name);
this.a = a;
}
@Override
void calculateArea() {
System.out.println(getName() + " area : " + (a * a));
}
}
| [
"kubilaycicek0693@gmail.com"
] | kubilaycicek0693@gmail.com |
9bdb4060891fe6c67ecf07043f875829bbaf43a8 | c1544d9bf81c3ae7a8d59a5de756a2a738902379 | /src/main/java/com/cj/core/facade/SearchMapperFacadeImpl.java | 1cc9ea3e40bf3f1a8e70ca937fe462f5fad2ecee | [] | no_license | jsflzhong/cjShop-service-search-dubbo | bca175060e268af817b864adf64ce1061114d79a | da5e125361c67be335d47131036e0cdd84602f1a | refs/heads/master | 2020-03-18T13:40:22.913864 | 2018-05-27T14:08:31 | 2018-05-27T14:08:31 | 134,799,924 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 719 | java | package com.cj.core.facade;
import com.alibaba.dubbo.config.annotation.Service;
import com.cj.core.facade.search.SearchMapperFacade;
import com.cj.core.pojo.SearchResult;
import com.cj.core.service.SearchMapper;
import org.apache.solr.client.solrj.SolrQuery;
import org.springframework.beans.factory.annotation.Autowired;
/**
* Search服务的dao层
* 从Solr服务器中,查询搜索结果的mapper.
* @author 崔健
* @date 2016年12月16日上午12:20:40
*/
@Service(version = "1.0.0")
public class SearchMapperFacadeImpl implements SearchMapperFacade{
@Autowired
private SearchMapper searchMapper;
public SearchResult search(SolrQuery query) throws Exception {
return searchMapper.search(query);
}
}
| [
"jsflzhong@163.com"
] | jsflzhong@163.com |
29099f8a71f977ca2ee27258abb5647f098ef65d | 9a8f977742375f79f6180ccb0f311a040187e34d | /agentBackend/src/main/java/com/megatravel/dto/soap/RefuseCommentRequest.java | 8f8f7c5bee16a79b09e5cf57e114b1d3a8a0a502 | [] | no_license | srdjan-19/megatravel | 0f628e81c6effe9fe0b2fa868f4c46b3a356769a | 855eae778e5ff4865b251634e97988d852180df1 | refs/heads/master | 2023-06-23T12:10:22.587748 | 2020-01-27T09:21:11 | 2020-01-27T09:21:11 | 229,602,013 | 0 | 0 | null | 2023-09-13T17:29:10 | 2019-12-22T17:06:53 | Java | UTF-8 | Java | false | false | 1,579 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vhudson-jaxb-ri-2.2-147
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2019.08.20 at 11:48:53 AM CEST
//
package com.megatravel.dto.soap;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="id" type="{http://www.w3.org/2001/XMLSchema}long"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"id"
})
@XmlRootElement(name = "refuseCommentRequest", namespace="http://www.megatravel.com/accommodation")
public class RefuseCommentRequest {
protected long id;
/**
* Gets the value of the id property.
*
*/
public long getId() {
return id;
}
/**
* Sets the value of the id property.
*
*/
public void setId(long value) {
this.id = value;
}
}
| [
"ilic.srdjan1996@gmail.com"
] | ilic.srdjan1996@gmail.com |
a9344ea0bc109b3cd3c8d010a33378cd9867e601 | 19c7f99cde20c5153b38a4827a18af31998c4220 | /WebApplication1/src/java/persistence/exceptions/rightsnotfound.java | bb7448e74ac95ce13b530db3c1d8d79bce6c96ce | [] | no_license | j0ker1337/pflicht2.0 | 3ab10849c0e48748ae8c4d00252c0ee5e7cfdedb | b53242bb2f56a6732712ceaa682856da70c25a8b | refs/heads/master | 2021-01-23T07:38:04.715131 | 2017-06-08T09:16:29 | 2017-06-08T09:16:29 | 93,036,799 | 0 | 0 | null | 2017-06-08T09:18:09 | 2017-06-01T08:50:36 | Java | UTF-8 | Java | false | false | 357 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package persistence.exceptions;
import java.sql.SQLException;
/**
*
* @author Nikolay und Don
*/
public class rightsnotfound extends SQLException {
}
| [
"joker@jokerpc.fritz.box"
] | joker@jokerpc.fritz.box |
e18f45b0d57e861e65448d5452438d5ed6e6a920 | 9cb83f3b3c05ab29454812fabdda2c26a0e39754 | /Java/DesignPattern/Prototype/Resume.java | 4c773959893c310a93f59b56a39d0e6942191496 | [] | no_license | heathjay/niuke | 0da093bd6b1bd3099955d5ffac3f749e85ccf29a | ad3e82ddf9aac2e718d77571f2191815ce1bd44d | refs/heads/master | 2023-08-21T00:18:29.116733 | 2021-10-20T08:48:36 | 2021-10-20T08:48:36 | 306,721,910 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,505 | java | public class Resume implements Cloneable {
private String name;
private String birthday;
private String sex;
private String school;
private String timeArea;
private String company;
/**
* 构造函数:初始化简历赋值姓名
*/
public Resume(String name){
this.name = name;
}
/**
* @desc 设定个人基本信息
* @param birthday 生日
* @param sex 性别
* @param school 毕业学校
* @return void
*/
public void setPersonInfo(String birthday,String sex,String school){
this.birthday = birthday;
this.sex = sex;
this.school = school;
}
/**
* @desc 设定工作经历
* @param timeArea 工作年限
* @param company 所在公司
* @return void
*/
public void setWorkExperience(String timeArea,String company){
this.timeArea = timeArea;
this.company = company;
}
/**
* 克隆该实例
*/
public Object clone(){
Resume resume = null;
try {
resume = (Resume) super.clone();
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
return resume;
}
public void display(){
System.out.println("姓名:" + name);
System.out.println("生日:" + birthday + ",性别:" + sex + ",毕业学校:" + school);
System.out.println("工作年限:" + timeArea + ",公司:" + company);
}
} | [
"jcpmzy@163.com"
] | jcpmzy@163.com |
2ec1b6f8331e76f4949d6ba0b58c8b39de511124 | 5db33f476e754b94fee4c4d5bbfd8d2ac52635c1 | /src/cci/arraystring/PairSum.java | f83fcb37864c49aeb44039cc0d2ce05fb26562fe | [] | no_license | dexter-aks/datastructures-algorithms | e829aed41ee1ec31e1483f8d8d9ada6f8d2bc6e7 | 64294f76f0fca469306767f93755f8c5dd0d4a66 | refs/heads/master | 2021-06-12T01:07:07.213933 | 2021-03-09T07:05:37 | 2021-03-09T07:05:37 | 134,890,171 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,469 | java | package cci.arraystring;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
public class PairSum {
private static final int MAX = 100000;
public static void main(String[] args) {
int nums[] = { 3, 3 };
int target = 6;
int arr[] = twoSum(nums, target);
System.out.println(Arrays.toString(arr));
int x = 41;
String x1 = Integer.toString(x);
char[] arr1 = x1.toCharArray();
for (int i = 0; i < arr1.length; i++) {
}
/*
* final int array[]={2,-5,1,8,3,9,15}; int sum=10; boolean[] binmap=new
* boolean[MAX]; boolean[] binmapNegative=new boolean[MAX]; for(int
* i=0;i<array.length;i++){ int temp=sum-array[i]; if(temp<0){
* if(binmapNegative[Math.abs(temp)]){ System.out.println(temp +":"+array[i] );
* } }else{ if(binmap[temp]){ System.out.println(temp +":"+array[i] ); } }
*
* if(array[i]<0){ binmapNegative[Math.abs(array[i])]=true; }else{
* binmap[array[i]]=true; }
*
* }
*/
}
public static int[] twoSum(int[] nums, int target) {
Set<Integer> hs = new HashSet<Integer>();
int l = Integer.MIN_VALUE;
int lVal = Integer.MIN_VALUE;
int r = Integer.MIN_VALUE;
for (int i = 0; i < nums.length; i++) {
int temp = target - nums[i];
if (temp > 0 && hs.contains(temp)) {
r = i;
lVal = temp;
} else {
hs.add(nums[i]);
}
}
for (int j = 0; j < nums.length; j++) {
if (nums[j] == lVal) {
l = j;
break;
}
}
return new int[] { l, r };
}
}
| [
"340amit@gmail.com"
] | 340amit@gmail.com |
2c0690337ec6aa680671c470e2a8795290e934d1 | 26ed1680d634a508ef3945d279cc8cd5a57d4a2f | /common/src/main/java/lk/elevenzcode/bms/common/dto/ComboboxData.java | 37eb2e6fce218f64f580b5a6457ec569dba983f8 | [] | no_license | fazilmohamed1998/Banquet_Managment_System | cb06073a05bc185081716659441184df4091de94 | b3092fb1d7ae09d8e5f19a3631e3c53c9ba66964 | refs/heads/main | 2023-08-13T04:02:49.100528 | 2021-10-10T06:02:04 | 2021-10-10T06:02:04 | 415,499,473 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 726 | java | package lk.elevenzcode.bms.common.dto;
public class ComboboxData {
private String value;
private String text;
public ComboboxData(int value, String text) {
this.value = String.valueOf(value);
this.text = text;
}
public ComboboxData(String value, String text) {
this.value = value;
this.text = text;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
public String getText() {
return text;
}
public void setText(String text) {
this.text = text;
}
@Override
public String toString() {
return "ComboboxData{" +
"value='" + value + '\'' +
", text='" + text + '\'' +
'}';
}
}
| [
"mfazilm98@gmail.com"
] | mfazilm98@gmail.com |
58d2967b066e454e748df11bc9c33f07d79b54fb | 2cdb777d42575a25a7c0398825807f15129abf49 | /src/java/com/supinfo/supinbank2/dao/jpa/JpaUserDao.java | d17687eec1e70d9a4d30036c444be2f8ec230f73 | [] | no_license | ruixie/SupinBank | 8bd2691ee62c25962eeb615f8c5e920704ad19f7 | 3992e28da0e6f2694129d9fc0224aa66469e1db4 | refs/heads/master | 2020-12-28T20:31:32.872572 | 2013-03-26T17:26:59 | 2013-03-26T17:26:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,716 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.supinfo.supinbank2.dao.jpa;
import com.supinfo.supinbank2.dao.UserDao;
import com.supinfo.supinbank2.entity.BankAdvisor;
import com.supinfo.supinbank2.entity.Customer;
import java.util.List;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import com.supinfo.supinbank2.tools.BCrypt;
/**
*
* @author Thibault
*/
//Cette classe devrait etre refactorisé !
@Stateless
public class JpaUserDao implements UserDao {
@PersistenceContext()
private EntityManager em;
@Override
public boolean IsCustomer(String email, String password) {
List<Object> customerList = em.createQuery("SELECT user FROM Customer user where email = :email").setParameter("email", email).getResultList();
if (customerList.isEmpty()) {
return false;
} else {
//Customer customer = new Customer();
Customer customer = (Customer) customerList.get(0);
String customerPassword = customer.getPassword();
boolean isValide = BCrypt.checkpw(password, customerPassword);
if (isValide) {
return true;
} else {
return false;
}
}
}
@Override
public boolean IsBankAdvisor(String email, String password) {
List<Object> bankAdvisorList = em.createQuery("SELECT user FROM BankAdvisor user where email = :email").setParameter("email", email).getResultList();
if (bankAdvisorList.isEmpty()) {
return false;
} else {
return true;
}
}
}
| [
"laurens.thibault@gmail.com"
] | laurens.thibault@gmail.com |
3054901addb83f8cbb6f75bdc9e12552d19801fa | 4627d514d6664526f58fbe3cac830a54679749cd | /results/randoop5/time-org.joda.time.chrono.GJChronology-19/RegressionTest4.java | 4c95750f20e0745f9b02aba271935575c14b6e38 | [] | no_license | STAMP-project/Cling-application | c624175a4aa24bb9b29b53f9b84c42a0f18631bd | 0ff4d7652b434cbfd9be8d8bb38cfc8d8eaa51b5 | refs/heads/master | 2022-07-27T09:30:16.423362 | 2022-07-19T12:01:46 | 2022-07-19T12:01:46 | 254,310,667 | 2 | 2 | null | 2021-07-12T12:29:50 | 2020-04-09T08:11:35 | null | UTF-8 | Java | false | false | 195,900 | java | import org.junit.FixMethodOrder;
import org.junit.Test;
import org.junit.Ignore;
import org.junit.runners.MethodSorters;
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
public class RegressionTest4 {
public static boolean debug = false;
@Test
@Ignore
public void test2001() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2001");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod5 = null;
long long8 = gJChronology3.add(readablePeriod5, (long) (short) 1, (int) (byte) -1);
long long13 = gJChronology3.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField14 = gJChronology3.weeks();
org.joda.time.DurationField durationField15 = gJChronology3.years();
org.joda.time.DateTimeField dateTimeField16 = gJChronology3.era();
org.joda.time.DateTimeField dateTimeField17 = gJChronology3.yearOfEra();
org.joda.time.DurationField durationField18 = gJChronology3.seconds();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + long8 + "' != '" + 1L + "'", long8 == 1L);
org.junit.Assert.assertTrue("'" + long13 + "' != '" + (-61062076799990L) + "'", long13 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField14);
org.junit.Assert.assertNotNull(durationField15);
org.junit.Assert.assertNotNull(dateTimeField16);
org.junit.Assert.assertNotNull(dateTimeField17);
org.junit.Assert.assertNotNull(durationField18);
}
@Test
public void test2002() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2002");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, 0L, (int) (byte) 1);
org.junit.Assert.assertNotNull(gJChronology3);
}
@Test
@Ignore
public void test2003() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2003");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod5 = null;
long long8 = gJChronology3.add(readablePeriod5, (long) (short) 1, (int) (byte) -1);
long long13 = gJChronology3.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField14 = gJChronology3.millis();
org.joda.time.DateTimeField dateTimeField15 = gJChronology3.halfdayOfDay();
org.joda.time.DateTimeField dateTimeField16 = gJChronology3.hourOfHalfday();
org.joda.time.DateTimeField dateTimeField17 = gJChronology3.halfdayOfDay();
org.joda.time.DateTimeField dateTimeField18 = gJChronology3.yearOfEra();
org.joda.time.DateTimeZone dateTimeZone19 = null;
org.joda.time.ReadableInstant readableInstant20 = null;
org.joda.time.chrono.GJChronology gJChronology22 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone19, readableInstant20, (int) (short) 1);
boolean boolean24 = gJChronology22.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField25 = gJChronology22.year();
org.joda.time.DateTimeZone dateTimeZone26 = gJChronology22.getZone();
org.joda.time.DateTimeZone dateTimeZone27 = null;
org.joda.time.ReadableInstant readableInstant28 = null;
org.joda.time.chrono.GJChronology gJChronology30 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone27, readableInstant28, (int) (short) 1);
boolean boolean32 = gJChronology30.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField33 = gJChronology30.year();
org.joda.time.Instant instant34 = gJChronology30.getGregorianCutover();
org.joda.time.chrono.GJChronology gJChronology36 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone26, (org.joda.time.ReadableInstant) instant34, (int) (byte) 1);
org.joda.time.DateTimeZone dateTimeZone37 = null;
org.joda.time.ReadableInstant readableInstant38 = null;
org.joda.time.chrono.GJChronology gJChronology40 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone37, readableInstant38, (int) (short) 1);
boolean boolean42 = gJChronology40.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField43 = gJChronology40.year();
org.joda.time.DateTimeZone dateTimeZone44 = gJChronology40.getZone();
org.joda.time.Chronology chronology45 = gJChronology36.withZone(dateTimeZone44);
org.joda.time.ReadableInstant readableInstant46 = null;
org.joda.time.chrono.GJChronology gJChronology47 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone44, readableInstant46);
org.joda.time.DateTimeZone dateTimeZone48 = null;
org.joda.time.ReadableInstant readableInstant49 = null;
org.joda.time.chrono.GJChronology gJChronology51 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone48, readableInstant49, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField52 = gJChronology51.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod53 = null;
long long56 = gJChronology51.add(readablePeriod53, (long) (short) 1, (int) (byte) -1);
long long61 = gJChronology51.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField62 = gJChronology51.millis();
org.joda.time.DurationField durationField63 = gJChronology51.centuries();
org.joda.time.Instant instant64 = gJChronology51.getGregorianCutover();
org.joda.time.chrono.GJChronology gJChronology65 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone44, (org.joda.time.ReadableInstant) instant64);
org.joda.time.Chronology chronology66 = gJChronology3.withZone(dateTimeZone44);
org.joda.time.DateTimeZone dateTimeZone67 = null;
org.joda.time.ReadableInstant readableInstant68 = null;
org.joda.time.chrono.GJChronology gJChronology70 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone67, readableInstant68, (int) (short) 1);
boolean boolean72 = gJChronology70.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField73 = gJChronology70.centuryOfEra();
org.joda.time.DurationField durationField74 = gJChronology70.centuries();
org.joda.time.DateTimeZone dateTimeZone75 = gJChronology70.getZone();
org.joda.time.DurationField durationField76 = gJChronology70.millis();
org.joda.time.DateTimeField dateTimeField77 = gJChronology70.minuteOfDay();
org.joda.time.Instant instant78 = gJChronology70.getGregorianCutover();
org.joda.time.chrono.GJChronology gJChronology79 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone44, (org.joda.time.ReadableInstant) instant78);
org.joda.time.chrono.GJChronology gJChronology80 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone44);
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + long8 + "' != '" + 1L + "'", long8 == 1L);
org.junit.Assert.assertTrue("'" + long13 + "' != '" + (-61062076799990L) + "'", long13 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField14);
org.junit.Assert.assertNotNull(dateTimeField15);
org.junit.Assert.assertNotNull(dateTimeField16);
org.junit.Assert.assertNotNull(dateTimeField17);
org.junit.Assert.assertNotNull(dateTimeField18);
org.junit.Assert.assertNotNull(gJChronology22);
org.junit.Assert.assertTrue("'" + boolean24 + "' != '" + false + "'", boolean24 == false);
org.junit.Assert.assertNotNull(dateTimeField25);
org.junit.Assert.assertNotNull(dateTimeZone26);
org.junit.Assert.assertNotNull(gJChronology30);
org.junit.Assert.assertTrue("'" + boolean32 + "' != '" + false + "'", boolean32 == false);
org.junit.Assert.assertNotNull(dateTimeField33);
org.junit.Assert.assertNotNull(instant34);
org.junit.Assert.assertNotNull(gJChronology36);
org.junit.Assert.assertNotNull(gJChronology40);
org.junit.Assert.assertTrue("'" + boolean42 + "' != '" + false + "'", boolean42 == false);
org.junit.Assert.assertNotNull(dateTimeField43);
org.junit.Assert.assertNotNull(dateTimeZone44);
org.junit.Assert.assertNotNull(chronology45);
org.junit.Assert.assertNotNull(gJChronology47);
org.junit.Assert.assertNotNull(gJChronology51);
org.junit.Assert.assertNotNull(dateTimeField52);
org.junit.Assert.assertTrue("'" + long56 + "' != '" + 1L + "'", long56 == 1L);
org.junit.Assert.assertTrue("'" + long61 + "' != '" + (-61062076799990L) + "'", long61 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField62);
org.junit.Assert.assertNotNull(durationField63);
org.junit.Assert.assertNotNull(instant64);
org.junit.Assert.assertNotNull(gJChronology65);
org.junit.Assert.assertNotNull(chronology66);
org.junit.Assert.assertNotNull(gJChronology70);
org.junit.Assert.assertTrue("'" + boolean72 + "' != '" + false + "'", boolean72 == false);
org.junit.Assert.assertNotNull(dateTimeField73);
org.junit.Assert.assertNotNull(durationField74);
org.junit.Assert.assertNotNull(dateTimeZone75);
org.junit.Assert.assertNotNull(durationField76);
org.junit.Assert.assertNotNull(dateTimeField77);
org.junit.Assert.assertNotNull(instant78);
org.junit.Assert.assertNotNull(gJChronology79);
org.junit.Assert.assertNotNull(gJChronology80);
}
@Test
@Ignore
public void test2004() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2004");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.chrono.GJChronology gJChronology1 = org.joda.time.chrono.GJChronology.getInstance();
org.joda.time.DateTimeField dateTimeField2 = gJChronology1.minuteOfHour();
org.joda.time.DateTimeZone dateTimeZone3 = null;
org.joda.time.ReadableInstant readableInstant4 = null;
org.joda.time.chrono.GJChronology gJChronology6 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone3, readableInstant4, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField7 = gJChronology6.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod8 = null;
long long11 = gJChronology6.add(readablePeriod8, (long) (short) 1, (int) (byte) -1);
long long16 = gJChronology6.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField17 = gJChronology6.seconds();
org.joda.time.DateTimeZone dateTimeZone18 = gJChronology6.getZone();
org.joda.time.Chronology chronology19 = gJChronology1.withZone(dateTimeZone18);
org.joda.time.chrono.GJChronology gJChronology20 = org.joda.time.chrono.GJChronology.getInstance();
org.joda.time.DateTimeField dateTimeField21 = gJChronology20.minuteOfHour();
long long27 = gJChronology20.getDateTimeMillis(9L, 10, 0, (int) (byte) 0, (int) (short) 10);
org.joda.time.Instant instant28 = gJChronology20.getGregorianCutover();
org.joda.time.chrono.GJChronology gJChronology29 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone18, (org.joda.time.ReadableInstant) instant28);
org.joda.time.DateTimeZone dateTimeZone30 = null;
org.joda.time.ReadableInstant readableInstant31 = null;
org.joda.time.chrono.GJChronology gJChronology33 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone30, readableInstant31, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField34 = gJChronology33.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod35 = null;
long long38 = gJChronology33.add(readablePeriod35, (long) (short) 1, (int) (byte) -1);
long long43 = gJChronology33.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField44 = gJChronology33.millis();
org.joda.time.DateTimeField dateTimeField45 = gJChronology33.halfdayOfDay();
org.joda.time.DateTimeField dateTimeField46 = gJChronology33.hourOfHalfday();
org.joda.time.DurationField durationField47 = gJChronology33.weeks();
org.joda.time.DurationField durationField48 = gJChronology33.seconds();
org.joda.time.DurationField durationField49 = gJChronology33.months();
org.joda.time.DurationField durationField50 = gJChronology33.minutes();
org.joda.time.DateTimeField dateTimeField51 = gJChronology33.clockhourOfHalfday();
org.joda.time.DateTimeField dateTimeField52 = gJChronology33.yearOfEra();
org.joda.time.Instant instant53 = gJChronology33.getGregorianCutover();
org.joda.time.chrono.GJChronology gJChronology54 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone18, (org.joda.time.ReadableInstant) instant53);
org.joda.time.chrono.GJChronology gJChronology55 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, (org.joda.time.ReadableInstant) instant53);
org.junit.Assert.assertNotNull(gJChronology1);
org.junit.Assert.assertNotNull(dateTimeField2);
org.junit.Assert.assertNotNull(gJChronology6);
org.junit.Assert.assertNotNull(dateTimeField7);
org.junit.Assert.assertTrue("'" + long11 + "' != '" + 1L + "'", long11 == 1L);
org.junit.Assert.assertTrue("'" + long16 + "' != '" + (-61062076799990L) + "'", long16 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField17);
org.junit.Assert.assertNotNull(dateTimeZone18);
org.junit.Assert.assertNotNull(chronology19);
org.junit.Assert.assertNotNull(gJChronology20);
org.junit.Assert.assertNotNull(dateTimeField21);
org.junit.Assert.assertTrue("'" + long27 + "' != '" + 36000010L + "'", long27 == 36000010L);
org.junit.Assert.assertNotNull(instant28);
org.junit.Assert.assertNotNull(gJChronology29);
org.junit.Assert.assertNotNull(gJChronology33);
org.junit.Assert.assertNotNull(dateTimeField34);
org.junit.Assert.assertTrue("'" + long38 + "' != '" + 1L + "'", long38 == 1L);
org.junit.Assert.assertTrue("'" + long43 + "' != '" + (-61062076799990L) + "'", long43 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField44);
org.junit.Assert.assertNotNull(dateTimeField45);
org.junit.Assert.assertNotNull(dateTimeField46);
org.junit.Assert.assertNotNull(durationField47);
org.junit.Assert.assertNotNull(durationField48);
org.junit.Assert.assertNotNull(durationField49);
org.junit.Assert.assertNotNull(durationField50);
org.junit.Assert.assertNotNull(dateTimeField51);
org.junit.Assert.assertNotNull(dateTimeField52);
org.junit.Assert.assertNotNull(instant53);
org.junit.Assert.assertNotNull(gJChronology54);
org.junit.Assert.assertNotNull(gJChronology55);
}
@Test
public void test2005() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2005");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
boolean boolean5 = gJChronology3.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField6 = gJChronology3.year();
org.joda.time.DateTimeField dateTimeField7 = gJChronology3.dayOfWeek();
org.joda.time.DateTimeField dateTimeField8 = gJChronology3.secondOfDay();
org.joda.time.DateTimeField dateTimeField9 = gJChronology3.era();
org.joda.time.DateTimeField dateTimeField10 = gJChronology3.monthOfYear();
org.joda.time.DurationField durationField11 = gJChronology3.hours();
org.joda.time.DurationField durationField12 = gJChronology3.months();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertTrue("'" + boolean5 + "' != '" + false + "'", boolean5 == false);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(dateTimeField7);
org.junit.Assert.assertNotNull(dateTimeField8);
org.junit.Assert.assertNotNull(dateTimeField9);
org.junit.Assert.assertNotNull(dateTimeField10);
org.junit.Assert.assertNotNull(durationField11);
org.junit.Assert.assertNotNull(durationField12);
}
@Test
public void test2006() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2006");
org.joda.time.chrono.GJChronology gJChronology0 = org.joda.time.chrono.GJChronology.getInstance();
org.joda.time.DateTimeField dateTimeField1 = gJChronology0.minuteOfHour();
org.joda.time.DateTimeField dateTimeField2 = gJChronology0.weekyearOfCentury();
org.joda.time.DateTimeField dateTimeField3 = gJChronology0.minuteOfHour();
org.joda.time.DateTimeField dateTimeField4 = gJChronology0.era();
org.junit.Assert.assertNotNull(gJChronology0);
org.junit.Assert.assertNotNull(dateTimeField1);
org.junit.Assert.assertNotNull(dateTimeField2);
org.junit.Assert.assertNotNull(dateTimeField3);
org.junit.Assert.assertNotNull(dateTimeField4);
}
@Test
public void test2007() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2007");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod5 = null;
long long8 = gJChronology3.add(readablePeriod5, (long) (short) 1, (int) (byte) -1);
org.joda.time.DateTimeZone dateTimeZone9 = gJChronology3.getZone();
org.joda.time.DateTimeField dateTimeField10 = gJChronology3.secondOfDay();
org.joda.time.DateTimeField dateTimeField11 = gJChronology3.dayOfYear();
org.joda.time.DateTimeZone dateTimeZone12 = null;
org.joda.time.ReadableInstant readableInstant13 = null;
org.joda.time.chrono.GJChronology gJChronology15 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone12, readableInstant13, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField16 = gJChronology15.clockhourOfDay();
org.joda.time.DateTimeField dateTimeField17 = gJChronology15.year();
org.joda.time.DurationField durationField18 = gJChronology15.centuries();
org.joda.time.DateTimeField dateTimeField19 = gJChronology15.dayOfMonth();
long long23 = gJChronology15.add((-1L), (long) (short) 0, (int) (byte) 10);
org.joda.time.DateTimeField dateTimeField24 = gJChronology15.halfdayOfDay();
org.joda.time.DateTimeZone dateTimeZone25 = gJChronology15.getZone();
org.joda.time.chrono.GJChronology gJChronology26 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone25);
org.joda.time.Chronology chronology27 = gJChronology3.withZone(dateTimeZone25);
org.joda.time.DateTimeField dateTimeField28 = gJChronology3.hourOfDay();
org.joda.time.DateTimeField dateTimeField29 = gJChronology3.weekyear();
org.joda.time.DateTimeField dateTimeField30 = gJChronology3.yearOfCentury();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + long8 + "' != '" + 1L + "'", long8 == 1L);
org.junit.Assert.assertNotNull(dateTimeZone9);
org.junit.Assert.assertNotNull(dateTimeField10);
org.junit.Assert.assertNotNull(dateTimeField11);
org.junit.Assert.assertNotNull(gJChronology15);
org.junit.Assert.assertNotNull(dateTimeField16);
org.junit.Assert.assertNotNull(dateTimeField17);
org.junit.Assert.assertNotNull(durationField18);
org.junit.Assert.assertNotNull(dateTimeField19);
org.junit.Assert.assertTrue("'" + long23 + "' != '" + (-1L) + "'", long23 == (-1L));
org.junit.Assert.assertNotNull(dateTimeField24);
org.junit.Assert.assertNotNull(dateTimeZone25);
org.junit.Assert.assertNotNull(gJChronology26);
org.junit.Assert.assertNotNull(chronology27);
org.junit.Assert.assertNotNull(dateTimeField28);
org.junit.Assert.assertNotNull(dateTimeField29);
org.junit.Assert.assertNotNull(dateTimeField30);
}
@Test
@Ignore
public void test2008() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2008");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod5 = null;
long long8 = gJChronology3.add(readablePeriod5, (long) (short) 1, (int) (byte) -1);
long long13 = gJChronology3.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField14 = gJChronology3.millis();
org.joda.time.DurationField durationField15 = gJChronology3.centuries();
org.joda.time.DateTimeField dateTimeField16 = gJChronology3.weekyear();
org.joda.time.DateTimeField dateTimeField17 = gJChronology3.dayOfYear();
org.joda.time.DateTimeField dateTimeField18 = gJChronology3.minuteOfDay();
org.joda.time.DateTimeField dateTimeField19 = gJChronology3.halfdayOfDay();
org.joda.time.DateTimeField dateTimeField20 = gJChronology3.era();
org.joda.time.DateTimeField dateTimeField21 = gJChronology3.hourOfHalfday();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + long8 + "' != '" + 1L + "'", long8 == 1L);
org.junit.Assert.assertTrue("'" + long13 + "' != '" + (-61062076799990L) + "'", long13 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField14);
org.junit.Assert.assertNotNull(durationField15);
org.junit.Assert.assertNotNull(dateTimeField16);
org.junit.Assert.assertNotNull(dateTimeField17);
org.junit.Assert.assertNotNull(dateTimeField18);
org.junit.Assert.assertNotNull(dateTimeField19);
org.junit.Assert.assertNotNull(dateTimeField20);
org.junit.Assert.assertNotNull(dateTimeField21);
}
@Test
public void test2009() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2009");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod5 = null;
long long8 = gJChronology3.add(readablePeriod5, (long) (short) 1, (int) (byte) -1);
org.joda.time.DateTimeField dateTimeField9 = gJChronology3.yearOfEra();
org.joda.time.DateTimeField dateTimeField10 = gJChronology3.weekOfWeekyear();
org.joda.time.DateTimeField dateTimeField11 = gJChronology3.yearOfCentury();
org.joda.time.DateTimeField dateTimeField12 = gJChronology3.hourOfDay();
org.joda.time.DateTimeField dateTimeField13 = gJChronology3.monthOfYear();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + long8 + "' != '" + 1L + "'", long8 == 1L);
org.junit.Assert.assertNotNull(dateTimeField9);
org.junit.Assert.assertNotNull(dateTimeField10);
org.junit.Assert.assertNotNull(dateTimeField11);
org.junit.Assert.assertNotNull(dateTimeField12);
org.junit.Assert.assertNotNull(dateTimeField13);
}
@Test
public void test2010() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2010");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
boolean boolean5 = gJChronology3.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField6 = gJChronology3.year();
org.joda.time.DateTimeZone dateTimeZone7 = gJChronology3.getZone();
org.joda.time.DateTimeZone dateTimeZone8 = null;
org.joda.time.ReadableInstant readableInstant9 = null;
org.joda.time.chrono.GJChronology gJChronology11 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone8, readableInstant9, (int) (short) 1);
boolean boolean13 = gJChronology11.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField14 = gJChronology11.year();
org.joda.time.Instant instant15 = gJChronology11.getGregorianCutover();
org.joda.time.chrono.GJChronology gJChronology16 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone7, (org.joda.time.ReadableInstant) instant15);
long long20 = gJChronology16.add((long) (short) 10, (long) 10, (int) (short) 10);
org.joda.time.DurationField durationField21 = gJChronology16.minutes();
org.joda.time.ReadablePartial readablePartial22 = null;
// The following exception was thrown during execution in test generation
try {
int[] intArray24 = gJChronology16.get(readablePartial22, (long) (short) 0);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertTrue("'" + boolean5 + "' != '" + false + "'", boolean5 == false);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(dateTimeZone7);
org.junit.Assert.assertNotNull(gJChronology11);
org.junit.Assert.assertTrue("'" + boolean13 + "' != '" + false + "'", boolean13 == false);
org.junit.Assert.assertNotNull(dateTimeField14);
org.junit.Assert.assertNotNull(instant15);
org.junit.Assert.assertNotNull(gJChronology16);
org.junit.Assert.assertTrue("'" + long20 + "' != '" + 110L + "'", long20 == 110L);
org.junit.Assert.assertNotNull(durationField21);
}
@Test
public void test2011() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2011");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.DateTimeField dateTimeField5 = gJChronology3.year();
org.joda.time.DurationField durationField6 = gJChronology3.centuries();
java.lang.Object obj7 = null;
boolean boolean8 = gJChronology3.equals(obj7);
org.joda.time.DateTimeField dateTimeField9 = gJChronology3.centuryOfEra();
org.joda.time.DateTimeField dateTimeField10 = gJChronology3.millisOfSecond();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertNotNull(dateTimeField5);
org.junit.Assert.assertNotNull(durationField6);
org.junit.Assert.assertTrue("'" + boolean8 + "' != '" + false + "'", boolean8 == false);
org.junit.Assert.assertNotNull(dateTimeField9);
org.junit.Assert.assertNotNull(dateTimeField10);
}
@Test
@Ignore
public void test2012() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2012");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod5 = null;
long long8 = gJChronology3.add(readablePeriod5, (long) (short) 1, (int) (byte) -1);
long long13 = gJChronology3.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField14 = gJChronology3.seconds();
org.joda.time.DateTimeZone dateTimeZone15 = null;
org.joda.time.ReadableInstant readableInstant16 = null;
org.joda.time.chrono.GJChronology gJChronology18 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone15, readableInstant16, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField19 = gJChronology18.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod20 = null;
long long23 = gJChronology18.add(readablePeriod20, (long) (short) 1, (int) (byte) -1);
long long28 = gJChronology18.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField29 = gJChronology18.seconds();
org.joda.time.DateTimeZone dateTimeZone30 = null;
org.joda.time.ReadableInstant readableInstant31 = null;
org.joda.time.chrono.GJChronology gJChronology33 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone30, readableInstant31, (int) (short) 1);
boolean boolean35 = gJChronology33.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField36 = gJChronology33.year();
org.joda.time.DateTimeZone dateTimeZone37 = gJChronology33.getZone();
org.joda.time.DateTimeField dateTimeField38 = gJChronology33.minuteOfDay();
org.joda.time.DateTimeZone dateTimeZone39 = gJChronology33.getZone();
org.joda.time.Chronology chronology40 = gJChronology18.withZone(dateTimeZone39);
org.joda.time.chrono.GJChronology gJChronology41 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone39);
org.joda.time.DateTimeZone dateTimeZone42 = null;
org.joda.time.ReadableInstant readableInstant43 = null;
org.joda.time.chrono.GJChronology gJChronology45 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone42, readableInstant43, (int) (short) 1);
boolean boolean47 = gJChronology45.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField48 = gJChronology45.year();
org.joda.time.DateTimeField dateTimeField49 = gJChronology45.dayOfWeek();
org.joda.time.DateTimeZone dateTimeZone50 = null;
org.joda.time.ReadableInstant readableInstant51 = null;
org.joda.time.chrono.GJChronology gJChronology53 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone50, readableInstant51, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField54 = gJChronology53.clockhourOfDay();
org.joda.time.DateTimeField dateTimeField55 = gJChronology53.year();
org.joda.time.DurationField durationField56 = gJChronology53.centuries();
org.joda.time.DateTimeField dateTimeField57 = gJChronology53.dayOfMonth();
boolean boolean58 = gJChronology45.equals((java.lang.Object) dateTimeField57);
int int59 = gJChronology45.getMinimumDaysInFirstWeek();
org.joda.time.DurationField durationField60 = gJChronology45.months();
org.joda.time.DateTimeField dateTimeField61 = gJChronology45.year();
org.joda.time.DurationField durationField62 = gJChronology45.hours();
org.joda.time.DateTimeField dateTimeField63 = gJChronology45.halfdayOfDay();
org.joda.time.Instant instant64 = gJChronology45.getGregorianCutover();
org.joda.time.chrono.GJChronology gJChronology65 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone39, (org.joda.time.ReadableInstant) instant64);
org.joda.time.Chronology chronology66 = gJChronology3.withZone(dateTimeZone39);
org.joda.time.ReadablePartial readablePartial67 = null;
// The following exception was thrown during execution in test generation
try {
int[] intArray69 = gJChronology3.get(readablePartial67, (long) (byte) 0);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + long8 + "' != '" + 1L + "'", long8 == 1L);
org.junit.Assert.assertTrue("'" + long13 + "' != '" + (-61062076799990L) + "'", long13 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField14);
org.junit.Assert.assertNotNull(gJChronology18);
org.junit.Assert.assertNotNull(dateTimeField19);
org.junit.Assert.assertTrue("'" + long23 + "' != '" + 1L + "'", long23 == 1L);
org.junit.Assert.assertTrue("'" + long28 + "' != '" + (-61062076799990L) + "'", long28 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField29);
org.junit.Assert.assertNotNull(gJChronology33);
org.junit.Assert.assertTrue("'" + boolean35 + "' != '" + false + "'", boolean35 == false);
org.junit.Assert.assertNotNull(dateTimeField36);
org.junit.Assert.assertNotNull(dateTimeZone37);
org.junit.Assert.assertNotNull(dateTimeField38);
org.junit.Assert.assertNotNull(dateTimeZone39);
org.junit.Assert.assertNotNull(chronology40);
org.junit.Assert.assertNotNull(gJChronology41);
org.junit.Assert.assertNotNull(gJChronology45);
org.junit.Assert.assertTrue("'" + boolean47 + "' != '" + false + "'", boolean47 == false);
org.junit.Assert.assertNotNull(dateTimeField48);
org.junit.Assert.assertNotNull(dateTimeField49);
org.junit.Assert.assertNotNull(gJChronology53);
org.junit.Assert.assertNotNull(dateTimeField54);
org.junit.Assert.assertNotNull(dateTimeField55);
org.junit.Assert.assertNotNull(durationField56);
org.junit.Assert.assertNotNull(dateTimeField57);
org.junit.Assert.assertTrue("'" + boolean58 + "' != '" + false + "'", boolean58 == false);
org.junit.Assert.assertTrue("'" + int59 + "' != '" + 1 + "'", int59 == 1);
org.junit.Assert.assertNotNull(durationField60);
org.junit.Assert.assertNotNull(dateTimeField61);
org.junit.Assert.assertNotNull(durationField62);
org.junit.Assert.assertNotNull(dateTimeField63);
org.junit.Assert.assertNotNull(instant64);
org.junit.Assert.assertNotNull(gJChronology65);
org.junit.Assert.assertNotNull(chronology66);
}
@Test
public void test2013() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2013");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
boolean boolean5 = gJChronology3.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField6 = gJChronology3.year();
org.joda.time.Instant instant7 = gJChronology3.getGregorianCutover();
org.joda.time.DurationField durationField8 = gJChronology3.millis();
org.joda.time.DateTimeField dateTimeField9 = gJChronology3.year();
org.joda.time.DurationField durationField10 = gJChronology3.weekyears();
org.joda.time.DateTimeField dateTimeField11 = gJChronology3.weekyear();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertTrue("'" + boolean5 + "' != '" + false + "'", boolean5 == false);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(instant7);
org.junit.Assert.assertNotNull(durationField8);
org.junit.Assert.assertNotNull(dateTimeField9);
org.junit.Assert.assertNotNull(durationField10);
org.junit.Assert.assertNotNull(dateTimeField11);
}
@Test
public void test2014() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2014");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.dayOfYear();
org.joda.time.DurationField durationField5 = gJChronology3.weeks();
org.joda.time.DateTimeField dateTimeField6 = gJChronology3.weekOfWeekyear();
org.joda.time.DateTimeField dateTimeField7 = gJChronology3.minuteOfHour();
org.joda.time.DurationField durationField8 = gJChronology3.halfdays();
org.joda.time.DateTimeZone dateTimeZone9 = null;
org.joda.time.ReadableInstant readableInstant10 = null;
org.joda.time.chrono.GJChronology gJChronology12 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone9, readableInstant10, (int) (short) 1);
boolean boolean14 = gJChronology12.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField15 = gJChronology12.centuryOfEra();
org.joda.time.DurationField durationField16 = gJChronology12.centuries();
org.joda.time.DurationField durationField17 = gJChronology12.days();
org.joda.time.DurationField durationField18 = gJChronology12.minutes();
org.joda.time.DateTimeField dateTimeField19 = gJChronology12.year();
boolean boolean20 = gJChronology3.equals((java.lang.Object) dateTimeField19);
org.joda.time.DateTimeField dateTimeField21 = gJChronology3.dayOfMonth();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertNotNull(durationField5);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(dateTimeField7);
org.junit.Assert.assertNotNull(durationField8);
org.junit.Assert.assertNotNull(gJChronology12);
org.junit.Assert.assertTrue("'" + boolean14 + "' != '" + false + "'", boolean14 == false);
org.junit.Assert.assertNotNull(dateTimeField15);
org.junit.Assert.assertNotNull(durationField16);
org.junit.Assert.assertNotNull(durationField17);
org.junit.Assert.assertNotNull(durationField18);
org.junit.Assert.assertNotNull(dateTimeField19);
org.junit.Assert.assertTrue("'" + boolean20 + "' != '" + false + "'", boolean20 == false);
org.junit.Assert.assertNotNull(dateTimeField21);
}
@Test
@Ignore
public void test2015() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2015");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod5 = null;
long long8 = gJChronology3.add(readablePeriod5, (long) (short) 1, (int) (byte) -1);
long long13 = gJChronology3.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField14 = gJChronology3.weeks();
org.joda.time.DurationField durationField15 = gJChronology3.years();
org.joda.time.DateTimeField dateTimeField16 = gJChronology3.era();
org.joda.time.DateTimeField dateTimeField17 = gJChronology3.secondOfDay();
long long21 = gJChronology3.add(1665L, (long) (short) 10, (int) '4');
java.lang.String str22 = gJChronology3.toString();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + long8 + "' != '" + 1L + "'", long8 == 1L);
org.junit.Assert.assertTrue("'" + long13 + "' != '" + (-61062076799990L) + "'", long13 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField14);
org.junit.Assert.assertNotNull(durationField15);
org.junit.Assert.assertNotNull(dateTimeField16);
org.junit.Assert.assertNotNull(dateTimeField17);
org.junit.Assert.assertTrue("'" + long21 + "' != '" + 2185L + "'", long21 == 2185L);
org.junit.Assert.assertEquals("'" + str22 + "' != '" + "GJChronology[Etc/UTC,mdfw=1]" + "'", str22, "GJChronology[Etc/UTC,mdfw=1]");
}
@Test
@Ignore
public void test2016() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2016");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.dayOfYear();
org.joda.time.DurationField durationField5 = gJChronology3.weeks();
org.joda.time.DateTimeField dateTimeField6 = gJChronology3.weekOfWeekyear();
org.joda.time.DateTimeField dateTimeField7 = gJChronology3.minuteOfHour();
org.joda.time.Instant instant8 = gJChronology3.getGregorianCutover();
org.joda.time.DateTimeField dateTimeField9 = gJChronology3.minuteOfHour();
long long13 = gJChronology3.add((-510L), (-42L), (int) (short) -1);
java.lang.String str14 = gJChronology3.toString();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertNotNull(durationField5);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(dateTimeField7);
org.junit.Assert.assertNotNull(instant8);
org.junit.Assert.assertNotNull(dateTimeField9);
org.junit.Assert.assertTrue("'" + long13 + "' != '" + (-468L) + "'", long13 == (-468L));
org.junit.Assert.assertEquals("'" + str14 + "' != '" + "GJChronology[Etc/UTC,mdfw=1]" + "'", str14, "GJChronology[Etc/UTC,mdfw=1]");
}
@Test
@Ignore
public void test2017() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2017");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod5 = null;
long long8 = gJChronology3.add(readablePeriod5, (long) (short) 1, (int) (byte) -1);
long long13 = gJChronology3.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField14 = gJChronology3.millis();
org.joda.time.DateTimeField dateTimeField15 = gJChronology3.halfdayOfDay();
org.joda.time.DateTimeField dateTimeField16 = gJChronology3.hourOfHalfday();
org.joda.time.DurationField durationField17 = gJChronology3.weeks();
org.joda.time.DurationField durationField18 = gJChronology3.seconds();
org.joda.time.DateTimeField dateTimeField19 = gJChronology3.weekyear();
org.joda.time.DateTimeZone dateTimeZone20 = null;
org.joda.time.ReadableInstant readableInstant21 = null;
org.joda.time.chrono.GJChronology gJChronology23 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone20, readableInstant21, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField24 = gJChronology23.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod25 = null;
long long28 = gJChronology23.add(readablePeriod25, (long) (short) 1, (int) (byte) -1);
org.joda.time.DateTimeZone dateTimeZone29 = gJChronology23.getZone();
org.joda.time.ReadableInstant readableInstant30 = null;
org.joda.time.chrono.GJChronology gJChronology31 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone29, readableInstant30);
org.joda.time.chrono.GJChronology gJChronology34 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone29, 1110L, (int) (short) 1);
org.joda.time.Chronology chronology35 = gJChronology3.withZone(dateTimeZone29);
org.joda.time.DurationField durationField36 = gJChronology3.hours();
org.joda.time.DateTimeField dateTimeField37 = gJChronology3.dayOfYear();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + long8 + "' != '" + 1L + "'", long8 == 1L);
org.junit.Assert.assertTrue("'" + long13 + "' != '" + (-61062076799990L) + "'", long13 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField14);
org.junit.Assert.assertNotNull(dateTimeField15);
org.junit.Assert.assertNotNull(dateTimeField16);
org.junit.Assert.assertNotNull(durationField17);
org.junit.Assert.assertNotNull(durationField18);
org.junit.Assert.assertNotNull(dateTimeField19);
org.junit.Assert.assertNotNull(gJChronology23);
org.junit.Assert.assertNotNull(dateTimeField24);
org.junit.Assert.assertTrue("'" + long28 + "' != '" + 1L + "'", long28 == 1L);
org.junit.Assert.assertNotNull(dateTimeZone29);
org.junit.Assert.assertNotNull(gJChronology31);
org.junit.Assert.assertNotNull(gJChronology34);
org.junit.Assert.assertNotNull(chronology35);
org.junit.Assert.assertNotNull(durationField36);
org.junit.Assert.assertNotNull(dateTimeField37);
}
@Test
@Ignore
public void test2018() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2018");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod5 = null;
long long8 = gJChronology3.add(readablePeriod5, (long) (short) 1, (int) (byte) -1);
org.joda.time.DateTimeField dateTimeField9 = gJChronology3.yearOfEra();
org.joda.time.DateTimeField dateTimeField10 = gJChronology3.halfdayOfDay();
org.joda.time.DateTimeField dateTimeField11 = gJChronology3.yearOfCentury();
org.joda.time.DateTimeField dateTimeField12 = gJChronology3.era();
java.lang.String str13 = gJChronology3.toString();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + long8 + "' != '" + 1L + "'", long8 == 1L);
org.junit.Assert.assertNotNull(dateTimeField9);
org.junit.Assert.assertNotNull(dateTimeField10);
org.junit.Assert.assertNotNull(dateTimeField11);
org.junit.Assert.assertNotNull(dateTimeField12);
org.junit.Assert.assertEquals("'" + str13 + "' != '" + "GJChronology[Etc/UTC,mdfw=1]" + "'", str13, "GJChronology[Etc/UTC,mdfw=1]");
}
@Test
public void test2019() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2019");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.DateTimeField dateTimeField5 = gJChronology3.clockhourOfDay();
org.joda.time.Chronology chronology6 = gJChronology3.withUTC();
org.joda.time.DateTimeField dateTimeField7 = gJChronology3.secondOfMinute();
org.joda.time.DateTimeField dateTimeField8 = gJChronology3.millisOfSecond();
org.joda.time.DateTimeField dateTimeField9 = gJChronology3.halfdayOfDay();
org.joda.time.DateTimeField dateTimeField10 = gJChronology3.era();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertNotNull(dateTimeField5);
org.junit.Assert.assertNotNull(chronology6);
org.junit.Assert.assertNotNull(dateTimeField7);
org.junit.Assert.assertNotNull(dateTimeField8);
org.junit.Assert.assertNotNull(dateTimeField9);
org.junit.Assert.assertNotNull(dateTimeField10);
}
@Test
public void test2020() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2020");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
boolean boolean5 = gJChronology3.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField6 = gJChronology3.year();
org.joda.time.DateTimeField dateTimeField7 = gJChronology3.dayOfWeek();
org.joda.time.DateTimeZone dateTimeZone8 = null;
org.joda.time.ReadableInstant readableInstant9 = null;
org.joda.time.chrono.GJChronology gJChronology11 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone8, readableInstant9, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField12 = gJChronology11.clockhourOfDay();
org.joda.time.DateTimeField dateTimeField13 = gJChronology11.year();
org.joda.time.DurationField durationField14 = gJChronology11.centuries();
org.joda.time.DateTimeField dateTimeField15 = gJChronology11.dayOfMonth();
boolean boolean16 = gJChronology3.equals((java.lang.Object) dateTimeField15);
int int17 = gJChronology3.getMinimumDaysInFirstWeek();
org.joda.time.DurationField durationField18 = gJChronology3.months();
org.joda.time.DateTimeField dateTimeField19 = gJChronology3.year();
org.joda.time.DurationField durationField20 = gJChronology3.hours();
org.joda.time.DurationField durationField21 = gJChronology3.weekyears();
org.joda.time.DateTimeField dateTimeField22 = gJChronology3.dayOfMonth();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertTrue("'" + boolean5 + "' != '" + false + "'", boolean5 == false);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(dateTimeField7);
org.junit.Assert.assertNotNull(gJChronology11);
org.junit.Assert.assertNotNull(dateTimeField12);
org.junit.Assert.assertNotNull(dateTimeField13);
org.junit.Assert.assertNotNull(durationField14);
org.junit.Assert.assertNotNull(dateTimeField15);
org.junit.Assert.assertTrue("'" + boolean16 + "' != '" + false + "'", boolean16 == false);
org.junit.Assert.assertTrue("'" + int17 + "' != '" + 1 + "'", int17 == 1);
org.junit.Assert.assertNotNull(durationField18);
org.junit.Assert.assertNotNull(dateTimeField19);
org.junit.Assert.assertNotNull(durationField20);
org.junit.Assert.assertNotNull(durationField21);
org.junit.Assert.assertNotNull(dateTimeField22);
}
@Test
public void test2021() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2021");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.DurationField durationField5 = gJChronology3.years();
org.joda.time.DurationField durationField6 = gJChronology3.years();
org.joda.time.DurationField durationField7 = gJChronology3.weeks();
org.joda.time.ReadablePeriod readablePeriod8 = null;
// The following exception was thrown during execution in test generation
try {
int[] intArray10 = gJChronology3.get(readablePeriod8, (-42L));
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertNotNull(durationField5);
org.junit.Assert.assertNotNull(durationField6);
org.junit.Assert.assertNotNull(durationField7);
}
@Test
@Ignore
public void test2022() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2022");
org.joda.time.chrono.GJChronology gJChronology0 = org.joda.time.chrono.GJChronology.getInstance();
org.joda.time.DateTimeField dateTimeField1 = gJChronology0.minuteOfHour();
org.joda.time.DateTimeZone dateTimeZone2 = null;
org.joda.time.ReadableInstant readableInstant3 = null;
org.joda.time.chrono.GJChronology gJChronology5 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone2, readableInstant3, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField6 = gJChronology5.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod7 = null;
long long10 = gJChronology5.add(readablePeriod7, (long) (short) 1, (int) (byte) -1);
long long15 = gJChronology5.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField16 = gJChronology5.seconds();
org.joda.time.DateTimeZone dateTimeZone17 = gJChronology5.getZone();
org.joda.time.Chronology chronology18 = gJChronology0.withZone(dateTimeZone17);
org.joda.time.DateTimeZone dateTimeZone19 = null;
org.joda.time.ReadableInstant readableInstant20 = null;
org.joda.time.chrono.GJChronology gJChronology22 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone19, readableInstant20, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField23 = gJChronology22.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod24 = null;
long long27 = gJChronology22.add(readablePeriod24, (long) (short) 1, (int) (byte) -1);
long long32 = gJChronology22.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField33 = gJChronology22.seconds();
org.joda.time.DateTimeZone dateTimeZone34 = null;
org.joda.time.ReadableInstant readableInstant35 = null;
org.joda.time.chrono.GJChronology gJChronology37 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone34, readableInstant35, (int) (short) 1);
boolean boolean39 = gJChronology37.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField40 = gJChronology37.year();
org.joda.time.DateTimeZone dateTimeZone41 = gJChronology37.getZone();
org.joda.time.DateTimeField dateTimeField42 = gJChronology37.minuteOfDay();
org.joda.time.DateTimeZone dateTimeZone43 = gJChronology37.getZone();
org.joda.time.Chronology chronology44 = gJChronology22.withZone(dateTimeZone43);
org.joda.time.Chronology chronology45 = gJChronology0.withZone(dateTimeZone43);
org.joda.time.DateTimeField dateTimeField46 = gJChronology0.yearOfCentury();
org.junit.Assert.assertNotNull(gJChronology0);
org.junit.Assert.assertNotNull(dateTimeField1);
org.junit.Assert.assertNotNull(gJChronology5);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertTrue("'" + long10 + "' != '" + 1L + "'", long10 == 1L);
org.junit.Assert.assertTrue("'" + long15 + "' != '" + (-61062076799990L) + "'", long15 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField16);
org.junit.Assert.assertNotNull(dateTimeZone17);
org.junit.Assert.assertNotNull(chronology18);
org.junit.Assert.assertNotNull(gJChronology22);
org.junit.Assert.assertNotNull(dateTimeField23);
org.junit.Assert.assertTrue("'" + long27 + "' != '" + 1L + "'", long27 == 1L);
org.junit.Assert.assertTrue("'" + long32 + "' != '" + (-61062076799990L) + "'", long32 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField33);
org.junit.Assert.assertNotNull(gJChronology37);
org.junit.Assert.assertTrue("'" + boolean39 + "' != '" + false + "'", boolean39 == false);
org.junit.Assert.assertNotNull(dateTimeField40);
org.junit.Assert.assertNotNull(dateTimeZone41);
org.junit.Assert.assertNotNull(dateTimeField42);
org.junit.Assert.assertNotNull(dateTimeZone43);
org.junit.Assert.assertNotNull(chronology44);
org.junit.Assert.assertNotNull(chronology45);
org.junit.Assert.assertNotNull(dateTimeField46);
}
@Test
@Ignore
public void test2023() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2023");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod5 = null;
long long8 = gJChronology3.add(readablePeriod5, (long) (short) 1, (int) (byte) -1);
long long13 = gJChronology3.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField14 = gJChronology3.millis();
org.joda.time.DurationField durationField15 = gJChronology3.centuries();
org.joda.time.DateTimeField dateTimeField16 = gJChronology3.weekyear();
org.joda.time.DurationField durationField17 = gJChronology3.weekyears();
org.joda.time.DateTimeField dateTimeField18 = gJChronology3.weekOfWeekyear();
int int19 = gJChronology3.getMinimumDaysInFirstWeek();
org.joda.time.DurationField durationField20 = gJChronology3.halfdays();
org.joda.time.chrono.GJChronology gJChronology21 = org.joda.time.chrono.GJChronology.getInstance();
org.joda.time.DateTimeField dateTimeField22 = gJChronology21.minuteOfHour();
org.joda.time.DateTimeZone dateTimeZone23 = null;
org.joda.time.ReadableInstant readableInstant24 = null;
org.joda.time.chrono.GJChronology gJChronology26 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone23, readableInstant24, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField27 = gJChronology26.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod28 = null;
long long31 = gJChronology26.add(readablePeriod28, (long) (short) 1, (int) (byte) -1);
long long36 = gJChronology26.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField37 = gJChronology26.seconds();
org.joda.time.DateTimeZone dateTimeZone38 = gJChronology26.getZone();
org.joda.time.Chronology chronology39 = gJChronology21.withZone(dateTimeZone38);
org.joda.time.chrono.GJChronology gJChronology40 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone38);
org.joda.time.DateTimeZone dateTimeZone41 = null;
org.joda.time.ReadableInstant readableInstant42 = null;
org.joda.time.chrono.GJChronology gJChronology44 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone41, readableInstant42, (int) (short) 1);
boolean boolean46 = gJChronology44.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField47 = gJChronology44.year();
org.joda.time.DateTimeZone dateTimeZone48 = gJChronology44.getZone();
org.joda.time.DateTimeField dateTimeField49 = gJChronology44.millisOfSecond();
org.joda.time.DurationField durationField50 = gJChronology44.seconds();
org.joda.time.DateTimeField dateTimeField51 = gJChronology44.centuryOfEra();
org.joda.time.DurationField durationField52 = gJChronology44.seconds();
org.joda.time.DateTimeField dateTimeField53 = gJChronology44.millisOfSecond();
org.joda.time.Instant instant54 = gJChronology44.getGregorianCutover();
org.joda.time.chrono.GJChronology gJChronology55 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone38, (org.joda.time.ReadableInstant) instant54);
org.joda.time.Chronology chronology56 = gJChronology3.withZone(dateTimeZone38);
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + long8 + "' != '" + 1L + "'", long8 == 1L);
org.junit.Assert.assertTrue("'" + long13 + "' != '" + (-61062076799990L) + "'", long13 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField14);
org.junit.Assert.assertNotNull(durationField15);
org.junit.Assert.assertNotNull(dateTimeField16);
org.junit.Assert.assertNotNull(durationField17);
org.junit.Assert.assertNotNull(dateTimeField18);
org.junit.Assert.assertTrue("'" + int19 + "' != '" + 1 + "'", int19 == 1);
org.junit.Assert.assertNotNull(durationField20);
org.junit.Assert.assertNotNull(gJChronology21);
org.junit.Assert.assertNotNull(dateTimeField22);
org.junit.Assert.assertNotNull(gJChronology26);
org.junit.Assert.assertNotNull(dateTimeField27);
org.junit.Assert.assertTrue("'" + long31 + "' != '" + 1L + "'", long31 == 1L);
org.junit.Assert.assertTrue("'" + long36 + "' != '" + (-61062076799990L) + "'", long36 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField37);
org.junit.Assert.assertNotNull(dateTimeZone38);
org.junit.Assert.assertNotNull(chronology39);
org.junit.Assert.assertNotNull(gJChronology40);
org.junit.Assert.assertNotNull(gJChronology44);
org.junit.Assert.assertTrue("'" + boolean46 + "' != '" + false + "'", boolean46 == false);
org.junit.Assert.assertNotNull(dateTimeField47);
org.junit.Assert.assertNotNull(dateTimeZone48);
org.junit.Assert.assertNotNull(dateTimeField49);
org.junit.Assert.assertNotNull(durationField50);
org.junit.Assert.assertNotNull(dateTimeField51);
org.junit.Assert.assertNotNull(durationField52);
org.junit.Assert.assertNotNull(dateTimeField53);
org.junit.Assert.assertNotNull(instant54);
org.junit.Assert.assertNotNull(gJChronology55);
org.junit.Assert.assertNotNull(chronology56);
}
@Test
@Ignore
public void test2024() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2024");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod5 = null;
long long8 = gJChronology3.add(readablePeriod5, (long) (short) 1, (int) (byte) -1);
long long13 = gJChronology3.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField14 = gJChronology3.weeks();
org.joda.time.DateTimeField dateTimeField15 = gJChronology3.clockhourOfDay();
org.joda.time.DateTimeField dateTimeField16 = gJChronology3.millisOfDay();
org.joda.time.DateTimeField dateTimeField17 = gJChronology3.secondOfMinute();
org.joda.time.DateTimeField dateTimeField18 = gJChronology3.centuryOfEra();
org.joda.time.DateTimeField dateTimeField19 = gJChronology3.centuryOfEra();
org.joda.time.ReadablePartial readablePartial20 = null;
// The following exception was thrown during execution in test generation
try {
long long22 = gJChronology3.set(readablePartial20, 0L);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + long8 + "' != '" + 1L + "'", long8 == 1L);
org.junit.Assert.assertTrue("'" + long13 + "' != '" + (-61062076799990L) + "'", long13 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField14);
org.junit.Assert.assertNotNull(dateTimeField15);
org.junit.Assert.assertNotNull(dateTimeField16);
org.junit.Assert.assertNotNull(dateTimeField17);
org.junit.Assert.assertNotNull(dateTimeField18);
org.junit.Assert.assertNotNull(dateTimeField19);
}
@Test
@Ignore
public void test2025() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2025");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
boolean boolean5 = gJChronology3.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField6 = gJChronology3.year();
org.joda.time.DateTimeZone dateTimeZone7 = gJChronology3.getZone();
org.joda.time.DateTimeZone dateTimeZone8 = null;
org.joda.time.ReadableInstant readableInstant9 = null;
org.joda.time.chrono.GJChronology gJChronology11 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone8, readableInstant9, (int) (short) 1);
boolean boolean13 = gJChronology11.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField14 = gJChronology11.year();
org.joda.time.Instant instant15 = gJChronology11.getGregorianCutover();
org.joda.time.chrono.GJChronology gJChronology17 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone7, (org.joda.time.ReadableInstant) instant15, (int) (byte) 1);
org.joda.time.DurationField durationField18 = gJChronology17.weeks();
org.joda.time.DurationField durationField19 = gJChronology17.weeks();
java.lang.String str20 = gJChronology17.toString();
org.joda.time.DateTimeField dateTimeField21 = gJChronology17.secondOfDay();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertTrue("'" + boolean5 + "' != '" + false + "'", boolean5 == false);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(dateTimeZone7);
org.junit.Assert.assertNotNull(gJChronology11);
org.junit.Assert.assertTrue("'" + boolean13 + "' != '" + false + "'", boolean13 == false);
org.junit.Assert.assertNotNull(dateTimeField14);
org.junit.Assert.assertNotNull(instant15);
org.junit.Assert.assertNotNull(gJChronology17);
org.junit.Assert.assertNotNull(durationField18);
org.junit.Assert.assertNotNull(durationField19);
org.junit.Assert.assertEquals("'" + str20 + "' != '" + "GJChronology[Etc/UTC,mdfw=1]" + "'", str20, "GJChronology[Etc/UTC,mdfw=1]");
org.junit.Assert.assertNotNull(dateTimeField21);
}
@Test
public void test2026() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2026");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
boolean boolean5 = gJChronology3.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField6 = gJChronology3.year();
org.joda.time.DateTimeField dateTimeField7 = gJChronology3.clockhourOfDay();
org.joda.time.DateTimeField dateTimeField8 = gJChronology3.dayOfYear();
org.joda.time.DateTimeField dateTimeField9 = gJChronology3.year();
org.joda.time.DateTimeField dateTimeField10 = gJChronology3.monthOfYear();
org.joda.time.DateTimeField dateTimeField11 = gJChronology3.minuteOfDay();
org.joda.time.DateTimeZone dateTimeZone12 = null;
org.joda.time.ReadableInstant readableInstant13 = null;
org.joda.time.chrono.GJChronology gJChronology15 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone12, readableInstant13, (int) (short) 1);
boolean boolean17 = gJChronology15.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField18 = gJChronology15.centuryOfEra();
org.joda.time.DurationField durationField19 = gJChronology15.centuries();
org.joda.time.DurationField durationField20 = gJChronology15.days();
org.joda.time.DurationField durationField21 = gJChronology15.minutes();
org.joda.time.DateTimeField dateTimeField22 = gJChronology15.year();
boolean boolean23 = gJChronology3.equals((java.lang.Object) gJChronology15);
org.joda.time.DateTimeField dateTimeField24 = gJChronology15.monthOfYear();
int int25 = gJChronology15.getMinimumDaysInFirstWeek();
org.joda.time.DateTimeField dateTimeField26 = gJChronology15.clockhourOfDay();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertTrue("'" + boolean5 + "' != '" + false + "'", boolean5 == false);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(dateTimeField7);
org.junit.Assert.assertNotNull(dateTimeField8);
org.junit.Assert.assertNotNull(dateTimeField9);
org.junit.Assert.assertNotNull(dateTimeField10);
org.junit.Assert.assertNotNull(dateTimeField11);
org.junit.Assert.assertNotNull(gJChronology15);
org.junit.Assert.assertTrue("'" + boolean17 + "' != '" + false + "'", boolean17 == false);
org.junit.Assert.assertNotNull(dateTimeField18);
org.junit.Assert.assertNotNull(durationField19);
org.junit.Assert.assertNotNull(durationField20);
org.junit.Assert.assertNotNull(durationField21);
org.junit.Assert.assertNotNull(dateTimeField22);
org.junit.Assert.assertTrue("'" + boolean23 + "' != '" + true + "'", boolean23 == true);
org.junit.Assert.assertNotNull(dateTimeField24);
org.junit.Assert.assertTrue("'" + int25 + "' != '" + 1 + "'", int25 == 1);
org.junit.Assert.assertNotNull(dateTimeField26);
}
@Test
public void test2027() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2027");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
boolean boolean5 = gJChronology3.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField6 = gJChronology3.year();
org.joda.time.DateTimeZone dateTimeZone7 = gJChronology3.getZone();
org.joda.time.DateTimeField dateTimeField8 = gJChronology3.millisOfSecond();
org.joda.time.DateTimeField dateTimeField9 = gJChronology3.clockhourOfHalfday();
org.joda.time.DurationField durationField10 = gJChronology3.weeks();
org.joda.time.DateTimeField dateTimeField11 = gJChronology3.hourOfHalfday();
org.joda.time.DateTimeField dateTimeField12 = gJChronology3.weekyear();
org.joda.time.DurationField durationField13 = gJChronology3.halfdays();
org.joda.time.DateTimeField dateTimeField14 = gJChronology3.hourOfDay();
org.joda.time.DateTimeZone dateTimeZone15 = gJChronology3.getZone();
org.joda.time.DurationField durationField16 = gJChronology3.days();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertTrue("'" + boolean5 + "' != '" + false + "'", boolean5 == false);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(dateTimeZone7);
org.junit.Assert.assertNotNull(dateTimeField8);
org.junit.Assert.assertNotNull(dateTimeField9);
org.junit.Assert.assertNotNull(durationField10);
org.junit.Assert.assertNotNull(dateTimeField11);
org.junit.Assert.assertNotNull(dateTimeField12);
org.junit.Assert.assertNotNull(durationField13);
org.junit.Assert.assertNotNull(dateTimeField14);
org.junit.Assert.assertNotNull(dateTimeZone15);
org.junit.Assert.assertNotNull(durationField16);
}
@Test
public void test2028() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2028");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.DateTimeField dateTimeField5 = gJChronology3.year();
org.joda.time.DurationField durationField6 = gJChronology3.centuries();
org.joda.time.DateTimeField dateTimeField7 = gJChronology3.dayOfMonth();
long long11 = gJChronology3.add((-1L), (long) (short) 0, (int) (byte) 10);
org.joda.time.DateTimeField dateTimeField12 = gJChronology3.halfdayOfDay();
org.joda.time.DateTimeZone dateTimeZone13 = gJChronology3.getZone();
org.joda.time.chrono.GJChronology gJChronology14 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone13);
org.joda.time.DurationField durationField15 = gJChronology14.hours();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertNotNull(dateTimeField5);
org.junit.Assert.assertNotNull(durationField6);
org.junit.Assert.assertNotNull(dateTimeField7);
org.junit.Assert.assertTrue("'" + long11 + "' != '" + (-1L) + "'", long11 == (-1L));
org.junit.Assert.assertNotNull(dateTimeField12);
org.junit.Assert.assertNotNull(dateTimeZone13);
org.junit.Assert.assertNotNull(gJChronology14);
org.junit.Assert.assertNotNull(durationField15);
}
@Test
public void test2029() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2029");
org.joda.time.chrono.GJChronology gJChronology0 = org.joda.time.chrono.GJChronology.getInstance();
org.joda.time.DurationField durationField1 = gJChronology0.weeks();
org.joda.time.DateTimeField dateTimeField2 = gJChronology0.clockhourOfHalfday();
org.joda.time.DurationField durationField3 = gJChronology0.days();
org.joda.time.DateTimeField dateTimeField4 = gJChronology0.hourOfDay();
int int5 = gJChronology0.getMinimumDaysInFirstWeek();
org.joda.time.ReadablePeriod readablePeriod6 = null;
long long9 = gJChronology0.add(readablePeriod6, 53238L, (int) (byte) -1);
org.joda.time.DateTimeField dateTimeField10 = gJChronology0.hourOfHalfday();
org.joda.time.DateTimeField dateTimeField11 = gJChronology0.weekyear();
org.junit.Assert.assertNotNull(gJChronology0);
org.junit.Assert.assertNotNull(durationField1);
org.junit.Assert.assertNotNull(dateTimeField2);
org.junit.Assert.assertNotNull(durationField3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + int5 + "' != '" + 4 + "'", int5 == 4);
org.junit.Assert.assertTrue("'" + long9 + "' != '" + 53238L + "'", long9 == 53238L);
org.junit.Assert.assertNotNull(dateTimeField10);
org.junit.Assert.assertNotNull(dateTimeField11);
}
@Test
public void test2030() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2030");
org.joda.time.chrono.GJChronology gJChronology0 = org.joda.time.chrono.GJChronology.getInstance();
org.joda.time.DurationField durationField1 = gJChronology0.weeks();
org.joda.time.DateTimeField dateTimeField2 = gJChronology0.clockhourOfHalfday();
org.joda.time.DateTimeField dateTimeField3 = gJChronology0.hourOfDay();
org.joda.time.DateTimeField dateTimeField4 = gJChronology0.dayOfMonth();
org.joda.time.DateTimeField dateTimeField5 = gJChronology0.minuteOfHour();
org.joda.time.DurationField durationField6 = gJChronology0.hours();
org.junit.Assert.assertNotNull(gJChronology0);
org.junit.Assert.assertNotNull(durationField1);
org.junit.Assert.assertNotNull(dateTimeField2);
org.junit.Assert.assertNotNull(dateTimeField3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertNotNull(dateTimeField5);
org.junit.Assert.assertNotNull(durationField6);
}
@Test
public void test2031() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2031");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod5 = null;
long long8 = gJChronology3.add(readablePeriod5, (long) (short) 1, (int) (byte) -1);
org.joda.time.DateTimeZone dateTimeZone9 = gJChronology3.getZone();
org.joda.time.ReadableInstant readableInstant10 = null;
org.joda.time.chrono.GJChronology gJChronology11 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone9, readableInstant10);
org.joda.time.DateTimeField dateTimeField12 = gJChronology11.secondOfMinute();
org.joda.time.DateTimeField dateTimeField13 = gJChronology11.minuteOfDay();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + long8 + "' != '" + 1L + "'", long8 == 1L);
org.junit.Assert.assertNotNull(dateTimeZone9);
org.junit.Assert.assertNotNull(gJChronology11);
org.junit.Assert.assertNotNull(dateTimeField12);
org.junit.Assert.assertNotNull(dateTimeField13);
}
@Test
public void test2032() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2032");
org.joda.time.chrono.GJChronology gJChronology0 = org.joda.time.chrono.GJChronology.getInstance();
org.joda.time.DurationField durationField1 = gJChronology0.weeks();
org.joda.time.DateTimeField dateTimeField2 = gJChronology0.clockhourOfHalfday();
org.joda.time.DateTimeField dateTimeField3 = gJChronology0.halfdayOfDay();
org.joda.time.DurationField durationField4 = gJChronology0.weeks();
org.junit.Assert.assertNotNull(gJChronology0);
org.junit.Assert.assertNotNull(durationField1);
org.junit.Assert.assertNotNull(dateTimeField2);
org.junit.Assert.assertNotNull(dateTimeField3);
org.junit.Assert.assertNotNull(durationField4);
}
@Test
@Ignore
public void test2033() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2033");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod5 = null;
long long8 = gJChronology3.add(readablePeriod5, (long) (short) 1, (int) (byte) -1);
long long13 = gJChronology3.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField14 = gJChronology3.weeks();
org.joda.time.DateTimeField dateTimeField15 = gJChronology3.clockhourOfDay();
org.joda.time.DateTimeField dateTimeField16 = gJChronology3.weekyear();
java.lang.String str17 = gJChronology3.toString();
org.joda.time.DateTimeField dateTimeField18 = gJChronology3.secondOfDay();
org.joda.time.ReadablePeriod readablePeriod19 = null;
long long22 = gJChronology3.add(readablePeriod19, (-71399996L), (int) '4');
org.joda.time.DurationField durationField23 = gJChronology3.weeks();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + long8 + "' != '" + 1L + "'", long8 == 1L);
org.junit.Assert.assertTrue("'" + long13 + "' != '" + (-61062076799990L) + "'", long13 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField14);
org.junit.Assert.assertNotNull(dateTimeField15);
org.junit.Assert.assertNotNull(dateTimeField16);
org.junit.Assert.assertEquals("'" + str17 + "' != '" + "GJChronology[Etc/UTC,mdfw=1]" + "'", str17, "GJChronology[Etc/UTC,mdfw=1]");
org.junit.Assert.assertNotNull(dateTimeField18);
org.junit.Assert.assertTrue("'" + long22 + "' != '" + (-71399996L) + "'", long22 == (-71399996L));
org.junit.Assert.assertNotNull(durationField23);
}
@Test
public void test2034() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2034");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
boolean boolean5 = gJChronology3.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField6 = gJChronology3.dayOfYear();
org.joda.time.DurationField durationField7 = gJChronology3.days();
org.joda.time.DurationField durationField8 = gJChronology3.seconds();
org.joda.time.DateTimeField dateTimeField9 = gJChronology3.minuteOfHour();
org.joda.time.DateTimeField dateTimeField10 = gJChronology3.clockhourOfDay();
org.joda.time.DateTimeField dateTimeField11 = gJChronology3.dayOfMonth();
org.joda.time.DurationField durationField12 = gJChronology3.hours();
long long16 = gJChronology3.add(52L, 32L, (int) 'a');
org.joda.time.DateTimeField dateTimeField17 = gJChronology3.minuteOfHour();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertTrue("'" + boolean5 + "' != '" + false + "'", boolean5 == false);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(durationField7);
org.junit.Assert.assertNotNull(durationField8);
org.junit.Assert.assertNotNull(dateTimeField9);
org.junit.Assert.assertNotNull(dateTimeField10);
org.junit.Assert.assertNotNull(dateTimeField11);
org.junit.Assert.assertNotNull(durationField12);
org.junit.Assert.assertTrue("'" + long16 + "' != '" + 3156L + "'", long16 == 3156L);
org.junit.Assert.assertNotNull(dateTimeField17);
}
@Test
@Ignore
public void test2035() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2035");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod5 = null;
long long8 = gJChronology3.add(readablePeriod5, (long) (short) 1, (int) (byte) -1);
long long13 = gJChronology3.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField14 = gJChronology3.weekyears();
java.lang.String str15 = gJChronology3.toString();
org.joda.time.DateTimeField dateTimeField16 = gJChronology3.hourOfDay();
org.joda.time.DurationField durationField17 = gJChronology3.seconds();
org.joda.time.DateTimeField dateTimeField18 = gJChronology3.millisOfSecond();
org.joda.time.DateTimeField dateTimeField19 = gJChronology3.yearOfEra();
org.joda.time.DurationField durationField20 = gJChronology3.years();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + long8 + "' != '" + 1L + "'", long8 == 1L);
org.junit.Assert.assertTrue("'" + long13 + "' != '" + (-61062076799990L) + "'", long13 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField14);
org.junit.Assert.assertEquals("'" + str15 + "' != '" + "GJChronology[Etc/UTC,mdfw=1]" + "'", str15, "GJChronology[Etc/UTC,mdfw=1]");
org.junit.Assert.assertNotNull(dateTimeField16);
org.junit.Assert.assertNotNull(durationField17);
org.junit.Assert.assertNotNull(dateTimeField18);
org.junit.Assert.assertNotNull(dateTimeField19);
org.junit.Assert.assertNotNull(durationField20);
}
@Test
public void test2036() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2036");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
boolean boolean5 = gJChronology3.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField6 = gJChronology3.dayOfYear();
org.joda.time.DurationField durationField7 = gJChronology3.days();
org.joda.time.DateTimeField dateTimeField8 = gJChronology3.centuryOfEra();
org.joda.time.DurationField durationField9 = gJChronology3.years();
org.joda.time.DateTimeField dateTimeField10 = gJChronology3.millisOfDay();
int int11 = gJChronology3.getMinimumDaysInFirstWeek();
org.joda.time.DateTimeField dateTimeField12 = gJChronology3.halfdayOfDay();
org.joda.time.DurationField durationField13 = gJChronology3.centuries();
org.joda.time.DurationField durationField14 = gJChronology3.halfdays();
java.lang.Class<?> wildcardClass15 = durationField14.getClass();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertTrue("'" + boolean5 + "' != '" + false + "'", boolean5 == false);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(durationField7);
org.junit.Assert.assertNotNull(dateTimeField8);
org.junit.Assert.assertNotNull(durationField9);
org.junit.Assert.assertNotNull(dateTimeField10);
org.junit.Assert.assertTrue("'" + int11 + "' != '" + 1 + "'", int11 == 1);
org.junit.Assert.assertNotNull(dateTimeField12);
org.junit.Assert.assertNotNull(durationField13);
org.junit.Assert.assertNotNull(durationField14);
org.junit.Assert.assertNotNull(wildcardClass15);
}
@Test
public void test2037() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2037");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.DurationField durationField5 = gJChronology3.years();
org.joda.time.DurationField durationField6 = gJChronology3.years();
org.joda.time.DateTimeField dateTimeField7 = gJChronology3.monthOfYear();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertNotNull(durationField5);
org.junit.Assert.assertNotNull(durationField6);
org.junit.Assert.assertNotNull(dateTimeField7);
}
@Test
@Ignore
public void test2038() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2038");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod5 = null;
long long8 = gJChronology3.add(readablePeriod5, (long) (short) 1, (int) (byte) -1);
long long13 = gJChronology3.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField14 = gJChronology3.weeks();
org.joda.time.DurationField durationField15 = gJChronology3.years();
org.joda.time.DateTimeField dateTimeField16 = gJChronology3.era();
org.joda.time.ReadablePeriod readablePeriod17 = null;
long long20 = gJChronology3.add(readablePeriod17, (long) (short) -1, (int) (byte) 0);
int int21 = gJChronology3.getMinimumDaysInFirstWeek();
int int22 = gJChronology3.getMinimumDaysInFirstWeek();
org.joda.time.DateTimeField dateTimeField23 = gJChronology3.weekyearOfCentury();
org.joda.time.DurationField durationField24 = gJChronology3.years();
org.joda.time.Chronology chronology25 = gJChronology3.withUTC();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + long8 + "' != '" + 1L + "'", long8 == 1L);
org.junit.Assert.assertTrue("'" + long13 + "' != '" + (-61062076799990L) + "'", long13 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField14);
org.junit.Assert.assertNotNull(durationField15);
org.junit.Assert.assertNotNull(dateTimeField16);
org.junit.Assert.assertTrue("'" + long20 + "' != '" + (-1L) + "'", long20 == (-1L));
org.junit.Assert.assertTrue("'" + int21 + "' != '" + 1 + "'", int21 == 1);
org.junit.Assert.assertTrue("'" + int22 + "' != '" + 1 + "'", int22 == 1);
org.junit.Assert.assertNotNull(dateTimeField23);
org.junit.Assert.assertNotNull(durationField24);
org.junit.Assert.assertNotNull(chronology25);
}
@Test
@Ignore
public void test2039() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2039");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
boolean boolean5 = gJChronology3.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField6 = gJChronology3.year();
org.joda.time.DateTimeField dateTimeField7 = gJChronology3.clockhourOfDay();
org.joda.time.DateTimeField dateTimeField8 = gJChronology3.dayOfYear();
org.joda.time.DateTimeField dateTimeField9 = gJChronology3.dayOfMonth();
org.joda.time.DurationField durationField10 = gJChronology3.hours();
org.joda.time.DateTimeZone dateTimeZone11 = null;
org.joda.time.ReadableInstant readableInstant12 = null;
org.joda.time.chrono.GJChronology gJChronology14 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone11, readableInstant12, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField15 = gJChronology14.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod16 = null;
long long19 = gJChronology14.add(readablePeriod16, (long) (short) 1, (int) (byte) -1);
long long24 = gJChronology14.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField25 = gJChronology14.millis();
org.joda.time.DurationField durationField26 = gJChronology14.centuries();
org.joda.time.DateTimeField dateTimeField27 = gJChronology14.dayOfMonth();
org.joda.time.DateTimeField dateTimeField28 = gJChronology14.dayOfWeek();
org.joda.time.DateTimeField dateTimeField29 = gJChronology14.clockhourOfDay();
org.joda.time.DateTimeField dateTimeField30 = gJChronology14.secondOfDay();
boolean boolean31 = gJChronology3.equals((java.lang.Object) gJChronology14);
org.joda.time.DurationField durationField32 = gJChronology3.hours();
org.joda.time.ReadablePeriod readablePeriod33 = null;
// The following exception was thrown during execution in test generation
try {
int[] intArray35 = gJChronology3.get(readablePeriod33, 5045L);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertTrue("'" + boolean5 + "' != '" + false + "'", boolean5 == false);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(dateTimeField7);
org.junit.Assert.assertNotNull(dateTimeField8);
org.junit.Assert.assertNotNull(dateTimeField9);
org.junit.Assert.assertNotNull(durationField10);
org.junit.Assert.assertNotNull(gJChronology14);
org.junit.Assert.assertNotNull(dateTimeField15);
org.junit.Assert.assertTrue("'" + long19 + "' != '" + 1L + "'", long19 == 1L);
org.junit.Assert.assertTrue("'" + long24 + "' != '" + (-61062076799990L) + "'", long24 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField25);
org.junit.Assert.assertNotNull(durationField26);
org.junit.Assert.assertNotNull(dateTimeField27);
org.junit.Assert.assertNotNull(dateTimeField28);
org.junit.Assert.assertNotNull(dateTimeField29);
org.junit.Assert.assertNotNull(dateTimeField30);
org.junit.Assert.assertTrue("'" + boolean31 + "' != '" + true + "'", boolean31 == true);
org.junit.Assert.assertNotNull(durationField32);
}
@Test
@Ignore
public void test2040() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2040");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
boolean boolean5 = gJChronology3.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField6 = gJChronology3.year();
org.joda.time.DateTimeField dateTimeField7 = gJChronology3.dayOfWeek();
java.lang.String str8 = gJChronology3.toString();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertTrue("'" + boolean5 + "' != '" + false + "'", boolean5 == false);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(dateTimeField7);
org.junit.Assert.assertEquals("'" + str8 + "' != '" + "GJChronology[Etc/UTC,mdfw=1]" + "'", str8, "GJChronology[Etc/UTC,mdfw=1]");
}
@Test
@Ignore
public void test2041() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2041");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod5 = null;
long long8 = gJChronology3.add(readablePeriod5, (long) (short) 1, (int) (byte) -1);
long long13 = gJChronology3.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField14 = gJChronology3.millis();
org.joda.time.DurationField durationField15 = gJChronology3.centuries();
org.joda.time.DateTimeField dateTimeField16 = gJChronology3.dayOfMonth();
org.joda.time.DateTimeField dateTimeField17 = gJChronology3.yearOfEra();
org.joda.time.DurationField durationField18 = gJChronology3.days();
org.joda.time.ReadablePeriod readablePeriod19 = null;
// The following exception was thrown during execution in test generation
try {
int[] intArray22 = gJChronology3.get(readablePeriod19, 61032L, (long) (byte) -1);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + long8 + "' != '" + 1L + "'", long8 == 1L);
org.junit.Assert.assertTrue("'" + long13 + "' != '" + (-61062076799990L) + "'", long13 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField14);
org.junit.Assert.assertNotNull(durationField15);
org.junit.Assert.assertNotNull(dateTimeField16);
org.junit.Assert.assertNotNull(dateTimeField17);
org.junit.Assert.assertNotNull(durationField18);
}
@Test
public void test2042() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2042");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
boolean boolean5 = gJChronology3.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField6 = gJChronology3.dayOfYear();
org.joda.time.DurationField durationField7 = gJChronology3.days();
org.joda.time.DurationField durationField8 = gJChronology3.seconds();
int int9 = gJChronology3.getMinimumDaysInFirstWeek();
org.joda.time.DurationField durationField10 = gJChronology3.seconds();
org.joda.time.DateTimeField dateTimeField11 = gJChronology3.secondOfDay();
org.joda.time.DateTimeZone dateTimeZone12 = null;
org.joda.time.ReadableInstant readableInstant13 = null;
org.joda.time.chrono.GJChronology gJChronology15 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone12, readableInstant13, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField16 = gJChronology15.clockhourOfDay();
org.joda.time.DateTimeField dateTimeField17 = gJChronology15.year();
org.joda.time.DurationField durationField18 = gJChronology15.centuries();
org.joda.time.DateTimeField dateTimeField19 = gJChronology15.dayOfMonth();
org.joda.time.DateTimeField dateTimeField20 = gJChronology15.dayOfYear();
org.joda.time.DateTimeField dateTimeField21 = gJChronology15.clockhourOfDay();
org.joda.time.DateTimeZone dateTimeZone22 = gJChronology15.getZone();
org.joda.time.chrono.GJChronology gJChronology25 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone22, (long) (short) 100, (int) (byte) 1);
org.joda.time.chrono.GJChronology gJChronology26 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone22);
org.joda.time.Chronology chronology27 = gJChronology3.withZone(dateTimeZone22);
org.joda.time.DateTimeField dateTimeField28 = gJChronology3.centuryOfEra();
org.joda.time.DurationField durationField29 = gJChronology3.weeks();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertTrue("'" + boolean5 + "' != '" + false + "'", boolean5 == false);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(durationField7);
org.junit.Assert.assertNotNull(durationField8);
org.junit.Assert.assertTrue("'" + int9 + "' != '" + 1 + "'", int9 == 1);
org.junit.Assert.assertNotNull(durationField10);
org.junit.Assert.assertNotNull(dateTimeField11);
org.junit.Assert.assertNotNull(gJChronology15);
org.junit.Assert.assertNotNull(dateTimeField16);
org.junit.Assert.assertNotNull(dateTimeField17);
org.junit.Assert.assertNotNull(durationField18);
org.junit.Assert.assertNotNull(dateTimeField19);
org.junit.Assert.assertNotNull(dateTimeField20);
org.junit.Assert.assertNotNull(dateTimeField21);
org.junit.Assert.assertNotNull(dateTimeZone22);
org.junit.Assert.assertNotNull(gJChronology25);
org.junit.Assert.assertNotNull(gJChronology26);
org.junit.Assert.assertNotNull(chronology27);
org.junit.Assert.assertNotNull(dateTimeField28);
org.junit.Assert.assertNotNull(durationField29);
}
@Test
public void test2043() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2043");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
boolean boolean5 = gJChronology3.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField6 = gJChronology3.centuryOfEra();
org.joda.time.DurationField durationField7 = gJChronology3.centuries();
org.joda.time.DurationField durationField8 = gJChronology3.months();
org.joda.time.DateTimeField dateTimeField9 = gJChronology3.millisOfDay();
org.joda.time.DurationField durationField10 = gJChronology3.years();
org.joda.time.DurationField durationField11 = gJChronology3.millis();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertTrue("'" + boolean5 + "' != '" + false + "'", boolean5 == false);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(durationField7);
org.junit.Assert.assertNotNull(durationField8);
org.junit.Assert.assertNotNull(dateTimeField9);
org.junit.Assert.assertNotNull(durationField10);
org.junit.Assert.assertNotNull(durationField11);
}
@Test
@Ignore
public void test2044() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2044");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
boolean boolean5 = gJChronology3.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField6 = gJChronology3.year();
org.joda.time.DateTimeZone dateTimeZone7 = gJChronology3.getZone();
org.joda.time.chrono.GJChronology gJChronology10 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone7, 1665L, (int) (short) 1);
org.joda.time.Instant instant11 = gJChronology10.getGregorianCutover();
long long17 = gJChronology10.getDateTimeMillis((long) '#', 0, 1, 1, (int) ' ');
org.joda.time.DurationField durationField18 = gJChronology10.days();
org.joda.time.DurationField durationField19 = gJChronology10.hours();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertTrue("'" + boolean5 + "' != '" + false + "'", boolean5 == false);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(dateTimeZone7);
org.junit.Assert.assertNotNull(gJChronology10);
org.junit.Assert.assertNotNull(instant11);
org.junit.Assert.assertTrue("'" + long17 + "' != '" + 61032L + "'", long17 == 61032L);
org.junit.Assert.assertNotNull(durationField18);
org.junit.Assert.assertNotNull(durationField19);
}
@Test
public void test2045() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2045");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
boolean boolean5 = gJChronology3.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField6 = gJChronology3.centuryOfEra();
org.joda.time.DurationField durationField7 = gJChronology3.centuries();
org.joda.time.DurationField durationField8 = gJChronology3.days();
long long12 = gJChronology3.add((long) (-1), 10L, 1);
org.joda.time.DateTimeField dateTimeField13 = gJChronology3.secondOfMinute();
org.joda.time.DateTimeField dateTimeField14 = gJChronology3.era();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertTrue("'" + boolean5 + "' != '" + false + "'", boolean5 == false);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(durationField7);
org.junit.Assert.assertNotNull(durationField8);
org.junit.Assert.assertTrue("'" + long12 + "' != '" + 9L + "'", long12 == 9L);
org.junit.Assert.assertNotNull(dateTimeField13);
org.junit.Assert.assertNotNull(dateTimeField14);
}
@Test
@Ignore
public void test2046() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2046");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod5 = null;
long long8 = gJChronology3.add(readablePeriod5, (long) (short) 1, (int) (byte) -1);
long long13 = gJChronology3.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField14 = gJChronology3.millis();
org.joda.time.DurationField durationField15 = gJChronology3.centuries();
org.joda.time.DateTimeField dateTimeField16 = gJChronology3.weekyear();
org.joda.time.DateTimeField dateTimeField17 = gJChronology3.dayOfYear();
org.joda.time.DateTimeField dateTimeField18 = gJChronology3.minuteOfDay();
org.joda.time.DateTimeField dateTimeField19 = gJChronology3.minuteOfDay();
org.joda.time.DateTimeField dateTimeField20 = gJChronology3.yearOfCentury();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + long8 + "' != '" + 1L + "'", long8 == 1L);
org.junit.Assert.assertTrue("'" + long13 + "' != '" + (-61062076799990L) + "'", long13 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField14);
org.junit.Assert.assertNotNull(durationField15);
org.junit.Assert.assertNotNull(dateTimeField16);
org.junit.Assert.assertNotNull(dateTimeField17);
org.junit.Assert.assertNotNull(dateTimeField18);
org.junit.Assert.assertNotNull(dateTimeField19);
org.junit.Assert.assertNotNull(dateTimeField20);
}
@Test
public void test2047() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2047");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
boolean boolean5 = gJChronology3.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField6 = gJChronology3.year();
org.joda.time.DateTimeZone dateTimeZone7 = gJChronology3.getZone();
org.joda.time.DateTimeField dateTimeField8 = gJChronology3.millisOfSecond();
org.joda.time.DateTimeField dateTimeField9 = gJChronology3.clockhourOfHalfday();
org.joda.time.DurationField durationField10 = gJChronology3.weeks();
org.joda.time.DateTimeField dateTimeField11 = gJChronology3.hourOfHalfday();
org.joda.time.DateTimeField dateTimeField12 = gJChronology3.weekyear();
org.joda.time.DateTimeField dateTimeField13 = gJChronology3.centuryOfEra();
org.joda.time.DateTimeField dateTimeField14 = gJChronology3.weekyearOfCentury();
org.joda.time.DurationField durationField15 = gJChronology3.hours();
// The following exception was thrown during execution in test generation
try {
long long23 = gJChronology3.getDateTimeMillis((int) (short) -1, (int) ' ', 1, (-1), (int) '4', 100, (int) (short) 0);
org.junit.Assert.fail("Expected exception of type org.joda.time.IllegalFieldValueException; message: Value -1 for hourOfDay must be in the range [0,23]");
} catch (org.joda.time.IllegalFieldValueException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertTrue("'" + boolean5 + "' != '" + false + "'", boolean5 == false);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(dateTimeZone7);
org.junit.Assert.assertNotNull(dateTimeField8);
org.junit.Assert.assertNotNull(dateTimeField9);
org.junit.Assert.assertNotNull(durationField10);
org.junit.Assert.assertNotNull(dateTimeField11);
org.junit.Assert.assertNotNull(dateTimeField12);
org.junit.Assert.assertNotNull(dateTimeField13);
org.junit.Assert.assertNotNull(dateTimeField14);
org.junit.Assert.assertNotNull(durationField15);
}
@Test
@Ignore
public void test2048() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2048");
org.joda.time.chrono.GJChronology gJChronology0 = org.joda.time.chrono.GJChronology.getInstance();
org.joda.time.DateTimeField dateTimeField1 = gJChronology0.minuteOfHour();
org.joda.time.DateTimeZone dateTimeZone2 = null;
org.joda.time.ReadableInstant readableInstant3 = null;
org.joda.time.chrono.GJChronology gJChronology5 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone2, readableInstant3, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField6 = gJChronology5.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod7 = null;
long long10 = gJChronology5.add(readablePeriod7, (long) (short) 1, (int) (byte) -1);
long long15 = gJChronology5.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField16 = gJChronology5.seconds();
org.joda.time.DateTimeZone dateTimeZone17 = gJChronology5.getZone();
org.joda.time.Chronology chronology18 = gJChronology0.withZone(dateTimeZone17);
org.joda.time.DateTimeField dateTimeField19 = gJChronology0.dayOfWeek();
org.joda.time.DateTimeField dateTimeField20 = gJChronology0.hourOfHalfday();
org.joda.time.Chronology chronology21 = gJChronology0.withUTC();
org.junit.Assert.assertNotNull(gJChronology0);
org.junit.Assert.assertNotNull(dateTimeField1);
org.junit.Assert.assertNotNull(gJChronology5);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertTrue("'" + long10 + "' != '" + 1L + "'", long10 == 1L);
org.junit.Assert.assertTrue("'" + long15 + "' != '" + (-61062076799990L) + "'", long15 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField16);
org.junit.Assert.assertNotNull(dateTimeZone17);
org.junit.Assert.assertNotNull(chronology18);
org.junit.Assert.assertNotNull(dateTimeField19);
org.junit.Assert.assertNotNull(dateTimeField20);
org.junit.Assert.assertNotNull(chronology21);
}
@Test
@Ignore
public void test2049() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2049");
org.joda.time.chrono.GJChronology gJChronology0 = org.joda.time.chrono.GJChronology.getInstance();
org.joda.time.DateTimeField dateTimeField1 = gJChronology0.minuteOfHour();
org.joda.time.DateTimeZone dateTimeZone2 = null;
org.joda.time.ReadableInstant readableInstant3 = null;
org.joda.time.chrono.GJChronology gJChronology5 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone2, readableInstant3, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField6 = gJChronology5.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod7 = null;
long long10 = gJChronology5.add(readablePeriod7, (long) (short) 1, (int) (byte) -1);
long long15 = gJChronology5.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField16 = gJChronology5.seconds();
org.joda.time.DateTimeZone dateTimeZone17 = gJChronology5.getZone();
org.joda.time.Chronology chronology18 = gJChronology0.withZone(dateTimeZone17);
org.joda.time.DateTimeZone dateTimeZone19 = null;
org.joda.time.ReadableInstant readableInstant20 = null;
org.joda.time.chrono.GJChronology gJChronology22 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone19, readableInstant20, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField23 = gJChronology22.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod24 = null;
long long27 = gJChronology22.add(readablePeriod24, (long) (short) 1, (int) (byte) -1);
long long32 = gJChronology22.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField33 = gJChronology22.seconds();
org.joda.time.DateTimeZone dateTimeZone34 = null;
org.joda.time.ReadableInstant readableInstant35 = null;
org.joda.time.chrono.GJChronology gJChronology37 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone34, readableInstant35, (int) (short) 1);
boolean boolean39 = gJChronology37.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField40 = gJChronology37.year();
org.joda.time.DateTimeZone dateTimeZone41 = gJChronology37.getZone();
org.joda.time.DateTimeField dateTimeField42 = gJChronology37.minuteOfDay();
org.joda.time.DateTimeZone dateTimeZone43 = gJChronology37.getZone();
org.joda.time.Chronology chronology44 = gJChronology22.withZone(dateTimeZone43);
org.joda.time.Chronology chronology45 = gJChronology0.withZone(dateTimeZone43);
org.joda.time.DateTimeZone dateTimeZone46 = null;
org.joda.time.ReadableInstant readableInstant47 = null;
org.joda.time.chrono.GJChronology gJChronology49 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone46, readableInstant47, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField50 = gJChronology49.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod51 = null;
long long54 = gJChronology49.add(readablePeriod51, (long) (short) 1, (int) (byte) -1);
org.joda.time.Instant instant55 = gJChronology49.getGregorianCutover();
org.joda.time.chrono.GJChronology gJChronology57 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone43, (org.joda.time.ReadableInstant) instant55, (int) (byte) 1);
org.joda.time.DateTimeZone dateTimeZone58 = null;
org.joda.time.ReadableInstant readableInstant59 = null;
org.joda.time.chrono.GJChronology gJChronology61 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone58, readableInstant59, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField62 = gJChronology61.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod63 = null;
long long66 = gJChronology61.add(readablePeriod63, (long) (short) 1, (int) (byte) -1);
long long70 = gJChronology61.add(1L, (long) '4', (int) (short) 0);
org.joda.time.Instant instant71 = gJChronology61.getGregorianCutover();
org.joda.time.chrono.GJChronology gJChronology72 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone43, (org.joda.time.ReadableInstant) instant71);
org.joda.time.DurationField durationField73 = gJChronology72.halfdays();
org.joda.time.DateTimeField dateTimeField74 = gJChronology72.dayOfMonth();
org.joda.time.DateTimeField dateTimeField75 = gJChronology72.minuteOfHour();
org.junit.Assert.assertNotNull(gJChronology0);
org.junit.Assert.assertNotNull(dateTimeField1);
org.junit.Assert.assertNotNull(gJChronology5);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertTrue("'" + long10 + "' != '" + 1L + "'", long10 == 1L);
org.junit.Assert.assertTrue("'" + long15 + "' != '" + (-61062076799990L) + "'", long15 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField16);
org.junit.Assert.assertNotNull(dateTimeZone17);
org.junit.Assert.assertNotNull(chronology18);
org.junit.Assert.assertNotNull(gJChronology22);
org.junit.Assert.assertNotNull(dateTimeField23);
org.junit.Assert.assertTrue("'" + long27 + "' != '" + 1L + "'", long27 == 1L);
org.junit.Assert.assertTrue("'" + long32 + "' != '" + (-61062076799990L) + "'", long32 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField33);
org.junit.Assert.assertNotNull(gJChronology37);
org.junit.Assert.assertTrue("'" + boolean39 + "' != '" + false + "'", boolean39 == false);
org.junit.Assert.assertNotNull(dateTimeField40);
org.junit.Assert.assertNotNull(dateTimeZone41);
org.junit.Assert.assertNotNull(dateTimeField42);
org.junit.Assert.assertNotNull(dateTimeZone43);
org.junit.Assert.assertNotNull(chronology44);
org.junit.Assert.assertNotNull(chronology45);
org.junit.Assert.assertNotNull(gJChronology49);
org.junit.Assert.assertNotNull(dateTimeField50);
org.junit.Assert.assertTrue("'" + long54 + "' != '" + 1L + "'", long54 == 1L);
org.junit.Assert.assertNotNull(instant55);
org.junit.Assert.assertNotNull(gJChronology57);
org.junit.Assert.assertNotNull(gJChronology61);
org.junit.Assert.assertNotNull(dateTimeField62);
org.junit.Assert.assertTrue("'" + long66 + "' != '" + 1L + "'", long66 == 1L);
org.junit.Assert.assertTrue("'" + long70 + "' != '" + 1L + "'", long70 == 1L);
org.junit.Assert.assertNotNull(instant71);
org.junit.Assert.assertNotNull(gJChronology72);
org.junit.Assert.assertNotNull(durationField73);
org.junit.Assert.assertNotNull(dateTimeField74);
org.junit.Assert.assertNotNull(dateTimeField75);
}
@Test
public void test2050() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2050");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
boolean boolean5 = gJChronology3.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField6 = gJChronology3.centuryOfEra();
org.joda.time.DurationField durationField7 = gJChronology3.centuries();
org.joda.time.DateTimeZone dateTimeZone8 = gJChronology3.getZone();
org.joda.time.DurationField durationField9 = gJChronology3.days();
long long13 = gJChronology3.add(100L, (long) (byte) 0, 100);
org.joda.time.DurationField durationField14 = gJChronology3.seconds();
org.joda.time.DateTimeField dateTimeField15 = gJChronology3.yearOfEra();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertTrue("'" + boolean5 + "' != '" + false + "'", boolean5 == false);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(durationField7);
org.junit.Assert.assertNotNull(dateTimeZone8);
org.junit.Assert.assertNotNull(durationField9);
org.junit.Assert.assertTrue("'" + long13 + "' != '" + 100L + "'", long13 == 100L);
org.junit.Assert.assertNotNull(durationField14);
org.junit.Assert.assertNotNull(dateTimeField15);
}
@Test
public void test2051() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2051");
org.joda.time.chrono.GJChronology gJChronology0 = org.joda.time.chrono.GJChronology.getInstance();
org.joda.time.DateTimeField dateTimeField1 = gJChronology0.minuteOfHour();
org.joda.time.DateTimeField dateTimeField2 = gJChronology0.weekOfWeekyear();
org.joda.time.DurationField durationField3 = gJChronology0.centuries();
org.joda.time.DateTimeField dateTimeField4 = gJChronology0.millisOfDay();
java.lang.Class<?> wildcardClass5 = dateTimeField4.getClass();
org.junit.Assert.assertNotNull(gJChronology0);
org.junit.Assert.assertNotNull(dateTimeField1);
org.junit.Assert.assertNotNull(dateTimeField2);
org.junit.Assert.assertNotNull(durationField3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertNotNull(wildcardClass5);
}
@Test
@Ignore
public void test2052() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2052");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod5 = null;
long long8 = gJChronology3.add(readablePeriod5, (long) (short) 1, (int) (byte) -1);
long long13 = gJChronology3.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField14 = gJChronology3.millis();
org.joda.time.DateTimeField dateTimeField15 = gJChronology3.halfdayOfDay();
org.joda.time.DateTimeField dateTimeField16 = gJChronology3.hourOfHalfday();
org.joda.time.DurationField durationField17 = gJChronology3.weeks();
org.joda.time.DurationField durationField18 = gJChronology3.seconds();
org.joda.time.DurationField durationField19 = gJChronology3.months();
org.joda.time.DurationField durationField20 = gJChronology3.minutes();
org.joda.time.DurationField durationField21 = gJChronology3.years();
org.joda.time.ReadablePeriod readablePeriod22 = null;
// The following exception was thrown during execution in test generation
try {
int[] intArray24 = gJChronology3.get(readablePeriod22, 161463L);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + long8 + "' != '" + 1L + "'", long8 == 1L);
org.junit.Assert.assertTrue("'" + long13 + "' != '" + (-61062076799990L) + "'", long13 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField14);
org.junit.Assert.assertNotNull(dateTimeField15);
org.junit.Assert.assertNotNull(dateTimeField16);
org.junit.Assert.assertNotNull(durationField17);
org.junit.Assert.assertNotNull(durationField18);
org.junit.Assert.assertNotNull(durationField19);
org.junit.Assert.assertNotNull(durationField20);
org.junit.Assert.assertNotNull(durationField21);
}
@Test
public void test2053() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2053");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
boolean boolean5 = gJChronology3.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField6 = gJChronology3.dayOfYear();
org.joda.time.DurationField durationField7 = gJChronology3.days();
org.joda.time.DurationField durationField8 = gJChronology3.seconds();
int int9 = gJChronology3.getMinimumDaysInFirstWeek();
org.joda.time.ReadablePeriod readablePeriod10 = null;
long long13 = gJChronology3.add(readablePeriod10, 100L, 0);
org.joda.time.DateTimeField dateTimeField14 = gJChronology3.weekOfWeekyear();
org.joda.time.DurationField durationField15 = gJChronology3.millis();
org.joda.time.DurationField durationField16 = gJChronology3.millis();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertTrue("'" + boolean5 + "' != '" + false + "'", boolean5 == false);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(durationField7);
org.junit.Assert.assertNotNull(durationField8);
org.junit.Assert.assertTrue("'" + int9 + "' != '" + 1 + "'", int9 == 1);
org.junit.Assert.assertTrue("'" + long13 + "' != '" + 100L + "'", long13 == 100L);
org.junit.Assert.assertNotNull(dateTimeField14);
org.junit.Assert.assertNotNull(durationField15);
org.junit.Assert.assertNotNull(durationField16);
}
@Test
@Ignore
public void test2054() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2054");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod5 = null;
long long8 = gJChronology3.add(readablePeriod5, (long) (short) 1, (int) (byte) -1);
long long13 = gJChronology3.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField14 = gJChronology3.seconds();
org.joda.time.DateTimeZone dateTimeZone15 = null;
org.joda.time.ReadableInstant readableInstant16 = null;
org.joda.time.chrono.GJChronology gJChronology18 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone15, readableInstant16, (int) (short) 1);
boolean boolean20 = gJChronology18.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField21 = gJChronology18.year();
org.joda.time.DateTimeZone dateTimeZone22 = gJChronology18.getZone();
org.joda.time.DateTimeField dateTimeField23 = gJChronology18.minuteOfDay();
org.joda.time.DateTimeZone dateTimeZone24 = gJChronology18.getZone();
org.joda.time.Chronology chronology25 = gJChronology3.withZone(dateTimeZone24);
org.joda.time.chrono.GJChronology gJChronology26 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone24);
java.lang.String str27 = gJChronology26.toString();
java.lang.String str28 = gJChronology26.toString();
org.joda.time.DateTimeZone dateTimeZone29 = null;
org.joda.time.ReadableInstant readableInstant30 = null;
org.joda.time.chrono.GJChronology gJChronology32 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone29, readableInstant30, (int) (short) 1);
boolean boolean34 = gJChronology32.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField35 = gJChronology32.year();
org.joda.time.DateTimeZone dateTimeZone36 = gJChronology32.getZone();
org.joda.time.DateTimeZone dateTimeZone37 = null;
org.joda.time.ReadableInstant readableInstant38 = null;
org.joda.time.chrono.GJChronology gJChronology40 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone37, readableInstant38, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField41 = gJChronology40.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod42 = null;
long long45 = gJChronology40.add(readablePeriod42, (long) (short) 1, (int) (byte) -1);
long long50 = gJChronology40.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField51 = gJChronology40.millis();
boolean boolean52 = gJChronology32.equals((java.lang.Object) gJChronology40);
org.joda.time.DurationField durationField53 = gJChronology40.seconds();
org.joda.time.chrono.GJChronology gJChronology54 = org.joda.time.chrono.GJChronology.getInstance();
org.joda.time.DurationField durationField55 = gJChronology54.weeks();
org.joda.time.DateTimeField dateTimeField56 = gJChronology54.clockhourOfHalfday();
org.joda.time.DateTimeField dateTimeField57 = gJChronology54.hourOfDay();
org.joda.time.DateTimeZone dateTimeZone58 = gJChronology54.getZone();
org.joda.time.chrono.GJChronology gJChronology59 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone58);
org.joda.time.chrono.GJChronology gJChronology60 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone58);
org.joda.time.Chronology chronology61 = gJChronology40.withZone(dateTimeZone58);
org.joda.time.Chronology chronology62 = gJChronology26.withZone(dateTimeZone58);
org.joda.time.chrono.GJChronology gJChronology65 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone58, (-85747999L), 4);
org.joda.time.DateTimeField dateTimeField66 = gJChronology65.halfdayOfDay();
org.joda.time.DateTimeField dateTimeField67 = gJChronology65.minuteOfDay();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + long8 + "' != '" + 1L + "'", long8 == 1L);
org.junit.Assert.assertTrue("'" + long13 + "' != '" + (-61062076799990L) + "'", long13 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField14);
org.junit.Assert.assertNotNull(gJChronology18);
org.junit.Assert.assertTrue("'" + boolean20 + "' != '" + false + "'", boolean20 == false);
org.junit.Assert.assertNotNull(dateTimeField21);
org.junit.Assert.assertNotNull(dateTimeZone22);
org.junit.Assert.assertNotNull(dateTimeField23);
org.junit.Assert.assertNotNull(dateTimeZone24);
org.junit.Assert.assertNotNull(chronology25);
org.junit.Assert.assertNotNull(gJChronology26);
org.junit.Assert.assertEquals("'" + str27 + "' != '" + "GJChronology[Etc/UTC]" + "'", str27, "GJChronology[Etc/UTC]");
org.junit.Assert.assertEquals("'" + str28 + "' != '" + "GJChronology[Etc/UTC]" + "'", str28, "GJChronology[Etc/UTC]");
org.junit.Assert.assertNotNull(gJChronology32);
org.junit.Assert.assertTrue("'" + boolean34 + "' != '" + false + "'", boolean34 == false);
org.junit.Assert.assertNotNull(dateTimeField35);
org.junit.Assert.assertNotNull(dateTimeZone36);
org.junit.Assert.assertNotNull(gJChronology40);
org.junit.Assert.assertNotNull(dateTimeField41);
org.junit.Assert.assertTrue("'" + long45 + "' != '" + 1L + "'", long45 == 1L);
org.junit.Assert.assertTrue("'" + long50 + "' != '" + (-61062076799990L) + "'", long50 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField51);
org.junit.Assert.assertTrue("'" + boolean52 + "' != '" + true + "'", boolean52 == true);
org.junit.Assert.assertNotNull(durationField53);
org.junit.Assert.assertNotNull(gJChronology54);
org.junit.Assert.assertNotNull(durationField55);
org.junit.Assert.assertNotNull(dateTimeField56);
org.junit.Assert.assertNotNull(dateTimeField57);
org.junit.Assert.assertNotNull(dateTimeZone58);
org.junit.Assert.assertNotNull(gJChronology59);
org.junit.Assert.assertNotNull(gJChronology60);
org.junit.Assert.assertNotNull(chronology61);
org.junit.Assert.assertNotNull(chronology62);
org.junit.Assert.assertNotNull(gJChronology65);
org.junit.Assert.assertNotNull(dateTimeField66);
org.junit.Assert.assertNotNull(dateTimeField67);
}
@Test
public void test2055() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2055");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
boolean boolean5 = gJChronology3.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField6 = gJChronology3.dayOfYear();
org.joda.time.DurationField durationField7 = gJChronology3.days();
org.joda.time.DateTimeField dateTimeField8 = gJChronology3.centuryOfEra();
org.joda.time.DurationField durationField9 = gJChronology3.years();
org.joda.time.DateTimeField dateTimeField10 = gJChronology3.millisOfDay();
int int11 = gJChronology3.getMinimumDaysInFirstWeek();
boolean boolean13 = gJChronology3.equals((java.lang.Object) (-49798948L));
org.joda.time.ReadablePeriod readablePeriod14 = null;
long long17 = gJChronology3.add(readablePeriod14, (long) (byte) 0, (int) '#');
org.joda.time.DateTimeField dateTimeField18 = gJChronology3.minuteOfDay();
org.joda.time.DurationField durationField19 = gJChronology3.millis();
org.joda.time.DateTimeField dateTimeField20 = gJChronology3.secondOfDay();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertTrue("'" + boolean5 + "' != '" + false + "'", boolean5 == false);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(durationField7);
org.junit.Assert.assertNotNull(dateTimeField8);
org.junit.Assert.assertNotNull(durationField9);
org.junit.Assert.assertNotNull(dateTimeField10);
org.junit.Assert.assertTrue("'" + int11 + "' != '" + 1 + "'", int11 == 1);
org.junit.Assert.assertTrue("'" + boolean13 + "' != '" + false + "'", boolean13 == false);
org.junit.Assert.assertTrue("'" + long17 + "' != '" + 0L + "'", long17 == 0L);
org.junit.Assert.assertNotNull(dateTimeField18);
org.junit.Assert.assertNotNull(durationField19);
org.junit.Assert.assertNotNull(dateTimeField20);
}
@Test
public void test2056() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2056");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
boolean boolean5 = gJChronology3.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField6 = gJChronology3.dayOfYear();
org.joda.time.DurationField durationField7 = gJChronology3.days();
org.joda.time.DateTimeField dateTimeField8 = gJChronology3.centuryOfEra();
org.joda.time.DurationField durationField9 = gJChronology3.years();
org.joda.time.DateTimeField dateTimeField10 = gJChronology3.yearOfCentury();
org.joda.time.ReadablePartial readablePartial11 = null;
int[] intArray14 = new int[] { (short) 100, 4 };
// The following exception was thrown during execution in test generation
try {
gJChronology3.validate(readablePartial11, intArray14);
org.junit.Assert.fail("Expected exception of type java.lang.NullPointerException; message: null");
} catch (java.lang.NullPointerException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertTrue("'" + boolean5 + "' != '" + false + "'", boolean5 == false);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(durationField7);
org.junit.Assert.assertNotNull(dateTimeField8);
org.junit.Assert.assertNotNull(durationField9);
org.junit.Assert.assertNotNull(dateTimeField10);
org.junit.Assert.assertNotNull(intArray14);
org.junit.Assert.assertEquals(java.util.Arrays.toString(intArray14), "[100, 4]");
}
@Test
@Ignore
public void test2057() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2057");
org.joda.time.chrono.GJChronology gJChronology0 = org.joda.time.chrono.GJChronology.getInstance();
org.joda.time.DateTimeField dateTimeField1 = gJChronology0.minuteOfHour();
org.joda.time.DateTimeZone dateTimeZone2 = null;
org.joda.time.ReadableInstant readableInstant3 = null;
org.joda.time.chrono.GJChronology gJChronology5 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone2, readableInstant3, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField6 = gJChronology5.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod7 = null;
long long10 = gJChronology5.add(readablePeriod7, (long) (short) 1, (int) (byte) -1);
long long15 = gJChronology5.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField16 = gJChronology5.seconds();
org.joda.time.DateTimeZone dateTimeZone17 = gJChronology5.getZone();
org.joda.time.Chronology chronology18 = gJChronology0.withZone(dateTimeZone17);
org.joda.time.chrono.GJChronology gJChronology19 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone17);
org.joda.time.DateTimeField dateTimeField20 = gJChronology19.clockhourOfDay();
org.joda.time.DurationField durationField21 = gJChronology19.centuries();
org.joda.time.DateTimeField dateTimeField22 = gJChronology19.dayOfYear();
org.junit.Assert.assertNotNull(gJChronology0);
org.junit.Assert.assertNotNull(dateTimeField1);
org.junit.Assert.assertNotNull(gJChronology5);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertTrue("'" + long10 + "' != '" + 1L + "'", long10 == 1L);
org.junit.Assert.assertTrue("'" + long15 + "' != '" + (-61062076799990L) + "'", long15 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField16);
org.junit.Assert.assertNotNull(dateTimeZone17);
org.junit.Assert.assertNotNull(chronology18);
org.junit.Assert.assertNotNull(gJChronology19);
org.junit.Assert.assertNotNull(dateTimeField20);
org.junit.Assert.assertNotNull(durationField21);
org.junit.Assert.assertNotNull(dateTimeField22);
}
@Test
@Ignore
public void test2058() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2058");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod5 = null;
long long8 = gJChronology3.add(readablePeriod5, (long) (short) 1, (int) (byte) -1);
long long13 = gJChronology3.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField14 = gJChronology3.millis();
org.joda.time.DateTimeField dateTimeField15 = gJChronology3.halfdayOfDay();
org.joda.time.DateTimeField dateTimeField16 = gJChronology3.hourOfHalfday();
org.joda.time.DateTimeField dateTimeField17 = gJChronology3.halfdayOfDay();
org.joda.time.DateTimeField dateTimeField18 = gJChronology3.yearOfEra();
java.lang.String str19 = gJChronology3.toString();
org.joda.time.DateTimeZone dateTimeZone20 = null;
org.joda.time.ReadableInstant readableInstant21 = null;
org.joda.time.chrono.GJChronology gJChronology23 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone20, readableInstant21, (int) (short) 1);
boolean boolean25 = gJChronology23.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField26 = gJChronology23.dayOfYear();
org.joda.time.DurationField durationField27 = gJChronology23.days();
org.joda.time.DateTimeField dateTimeField28 = gJChronology23.weekyear();
boolean boolean29 = gJChronology3.equals((java.lang.Object) gJChronology23);
org.joda.time.DateTimeField dateTimeField30 = gJChronology3.millisOfDay();
org.joda.time.DateTimeField dateTimeField31 = gJChronology3.dayOfWeek();
org.joda.time.DateTimeField dateTimeField32 = gJChronology3.centuryOfEra();
org.joda.time.DurationField durationField33 = gJChronology3.months();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + long8 + "' != '" + 1L + "'", long8 == 1L);
org.junit.Assert.assertTrue("'" + long13 + "' != '" + (-61062076799990L) + "'", long13 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField14);
org.junit.Assert.assertNotNull(dateTimeField15);
org.junit.Assert.assertNotNull(dateTimeField16);
org.junit.Assert.assertNotNull(dateTimeField17);
org.junit.Assert.assertNotNull(dateTimeField18);
org.junit.Assert.assertEquals("'" + str19 + "' != '" + "GJChronology[Etc/UTC,mdfw=1]" + "'", str19, "GJChronology[Etc/UTC,mdfw=1]");
org.junit.Assert.assertNotNull(gJChronology23);
org.junit.Assert.assertTrue("'" + boolean25 + "' != '" + false + "'", boolean25 == false);
org.junit.Assert.assertNotNull(dateTimeField26);
org.junit.Assert.assertNotNull(durationField27);
org.junit.Assert.assertNotNull(dateTimeField28);
org.junit.Assert.assertTrue("'" + boolean29 + "' != '" + true + "'", boolean29 == true);
org.junit.Assert.assertNotNull(dateTimeField30);
org.junit.Assert.assertNotNull(dateTimeField31);
org.junit.Assert.assertNotNull(dateTimeField32);
org.junit.Assert.assertNotNull(durationField33);
}
@Test
public void test2059() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2059");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.DateTimeField dateTimeField5 = gJChronology3.clockhourOfDay();
org.joda.time.DateTimeField dateTimeField6 = gJChronology3.centuryOfEra();
org.joda.time.DateTimeField dateTimeField7 = gJChronology3.halfdayOfDay();
org.joda.time.DurationField durationField8 = gJChronology3.days();
org.joda.time.DurationField durationField9 = gJChronology3.seconds();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertNotNull(dateTimeField5);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(dateTimeField7);
org.junit.Assert.assertNotNull(durationField8);
org.junit.Assert.assertNotNull(durationField9);
}
@Test
public void test2060() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2060");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
boolean boolean5 = gJChronology3.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField6 = gJChronology3.year();
org.joda.time.Instant instant7 = gJChronology3.getGregorianCutover();
org.joda.time.DurationField durationField8 = gJChronology3.millis();
org.joda.time.DateTimeField dateTimeField9 = gJChronology3.year();
org.joda.time.DurationField durationField10 = gJChronology3.minutes();
org.joda.time.DateTimeField dateTimeField11 = gJChronology3.hourOfHalfday();
org.joda.time.DateTimeField dateTimeField12 = gJChronology3.yearOfCentury();
org.joda.time.DurationField durationField13 = gJChronology3.days();
org.joda.time.Instant instant14 = gJChronology3.getGregorianCutover();
org.joda.time.DateTimeField dateTimeField15 = gJChronology3.dayOfYear();
org.joda.time.DateTimeField dateTimeField16 = gJChronology3.clockhourOfHalfday();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertTrue("'" + boolean5 + "' != '" + false + "'", boolean5 == false);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(instant7);
org.junit.Assert.assertNotNull(durationField8);
org.junit.Assert.assertNotNull(dateTimeField9);
org.junit.Assert.assertNotNull(durationField10);
org.junit.Assert.assertNotNull(dateTimeField11);
org.junit.Assert.assertNotNull(dateTimeField12);
org.junit.Assert.assertNotNull(durationField13);
org.junit.Assert.assertNotNull(instant14);
org.junit.Assert.assertNotNull(dateTimeField15);
org.junit.Assert.assertNotNull(dateTimeField16);
}
@Test
public void test2061() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2061");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
boolean boolean5 = gJChronology3.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField6 = gJChronology3.year();
org.joda.time.DateTimeZone dateTimeZone7 = gJChronology3.getZone();
org.joda.time.DateTimeField dateTimeField8 = gJChronology3.millisOfSecond();
org.joda.time.DurationField durationField9 = gJChronology3.seconds();
org.joda.time.Instant instant10 = gJChronology3.getGregorianCutover();
org.joda.time.DateTimeField dateTimeField11 = gJChronology3.weekyear();
org.joda.time.DateTimeField dateTimeField12 = gJChronology3.millisOfSecond();
org.joda.time.DurationField durationField13 = gJChronology3.months();
org.joda.time.DateTimeField dateTimeField14 = gJChronology3.clockhourOfHalfday();
org.joda.time.ReadablePeriod readablePeriod15 = null;
long long18 = gJChronology3.add(readablePeriod15, (-510L), (int) (byte) 1);
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertTrue("'" + boolean5 + "' != '" + false + "'", boolean5 == false);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(dateTimeZone7);
org.junit.Assert.assertNotNull(dateTimeField8);
org.junit.Assert.assertNotNull(durationField9);
org.junit.Assert.assertNotNull(instant10);
org.junit.Assert.assertNotNull(dateTimeField11);
org.junit.Assert.assertNotNull(dateTimeField12);
org.junit.Assert.assertNotNull(durationField13);
org.junit.Assert.assertNotNull(dateTimeField14);
org.junit.Assert.assertTrue("'" + long18 + "' != '" + (-510L) + "'", long18 == (-510L));
}
@Test
@Ignore
public void test2062() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2062");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod5 = null;
long long8 = gJChronology3.add(readablePeriod5, (long) (short) 1, (int) (byte) -1);
long long13 = gJChronology3.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField14 = gJChronology3.millis();
org.joda.time.DateTimeField dateTimeField15 = gJChronology3.halfdayOfDay();
org.joda.time.DateTimeField dateTimeField16 = gJChronology3.hourOfHalfday();
org.joda.time.DurationField durationField17 = gJChronology3.weeks();
org.joda.time.DurationField durationField18 = gJChronology3.seconds();
org.joda.time.DurationField durationField19 = gJChronology3.months();
org.joda.time.DurationField durationField20 = gJChronology3.minutes();
org.joda.time.DurationField durationField21 = gJChronology3.years();
org.joda.time.DateTimeField dateTimeField22 = gJChronology3.millisOfSecond();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + long8 + "' != '" + 1L + "'", long8 == 1L);
org.junit.Assert.assertTrue("'" + long13 + "' != '" + (-61062076799990L) + "'", long13 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField14);
org.junit.Assert.assertNotNull(dateTimeField15);
org.junit.Assert.assertNotNull(dateTimeField16);
org.junit.Assert.assertNotNull(durationField17);
org.junit.Assert.assertNotNull(durationField18);
org.junit.Assert.assertNotNull(durationField19);
org.junit.Assert.assertNotNull(durationField20);
org.junit.Assert.assertNotNull(durationField21);
org.junit.Assert.assertNotNull(dateTimeField22);
}
@Test
@Ignore
public void test2063() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2063");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod5 = null;
long long8 = gJChronology3.add(readablePeriod5, (long) (short) 1, (int) (byte) -1);
long long13 = gJChronology3.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField14 = gJChronology3.millis();
org.joda.time.DateTimeField dateTimeField15 = gJChronology3.halfdayOfDay();
org.joda.time.DateTimeField dateTimeField16 = gJChronology3.hourOfHalfday();
org.joda.time.DateTimeField dateTimeField17 = gJChronology3.halfdayOfDay();
org.joda.time.DateTimeField dateTimeField18 = gJChronology3.yearOfEra();
org.joda.time.DateTimeField dateTimeField19 = gJChronology3.halfdayOfDay();
long long23 = gJChronology3.add(10L, (-51L), 4);
org.joda.time.DateTimeField dateTimeField24 = gJChronology3.minuteOfDay();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + long8 + "' != '" + 1L + "'", long8 == 1L);
org.junit.Assert.assertTrue("'" + long13 + "' != '" + (-61062076799990L) + "'", long13 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField14);
org.junit.Assert.assertNotNull(dateTimeField15);
org.junit.Assert.assertNotNull(dateTimeField16);
org.junit.Assert.assertNotNull(dateTimeField17);
org.junit.Assert.assertNotNull(dateTimeField18);
org.junit.Assert.assertNotNull(dateTimeField19);
org.junit.Assert.assertTrue("'" + long23 + "' != '" + (-194L) + "'", long23 == (-194L));
org.junit.Assert.assertNotNull(dateTimeField24);
}
@Test
@Ignore
public void test2064() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2064");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod5 = null;
long long8 = gJChronology3.add(readablePeriod5, (long) (short) 1, (int) (byte) -1);
long long13 = gJChronology3.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField14 = gJChronology3.weekyears();
java.lang.String str15 = gJChronology3.toString();
org.joda.time.DateTimeField dateTimeField16 = gJChronology3.hourOfDay();
org.joda.time.DateTimeField dateTimeField17 = gJChronology3.hourOfHalfday();
org.joda.time.Chronology chronology18 = gJChronology3.withUTC();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + long8 + "' != '" + 1L + "'", long8 == 1L);
org.junit.Assert.assertTrue("'" + long13 + "' != '" + (-61062076799990L) + "'", long13 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField14);
org.junit.Assert.assertEquals("'" + str15 + "' != '" + "GJChronology[Etc/UTC,mdfw=1]" + "'", str15, "GJChronology[Etc/UTC,mdfw=1]");
org.junit.Assert.assertNotNull(dateTimeField16);
org.junit.Assert.assertNotNull(dateTimeField17);
org.junit.Assert.assertNotNull(chronology18);
}
@Test
@Ignore
public void test2065() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2065");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
boolean boolean5 = gJChronology3.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField6 = gJChronology3.dayOfYear();
org.joda.time.DurationField durationField7 = gJChronology3.days();
java.lang.String str8 = gJChronology3.toString();
org.joda.time.DateTimeField dateTimeField9 = gJChronology3.weekOfWeekyear();
org.joda.time.DateTimeZone dateTimeZone10 = null;
org.joda.time.ReadableInstant readableInstant11 = null;
org.joda.time.chrono.GJChronology gJChronology13 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone10, readableInstant11, (int) (short) 1);
org.joda.time.Chronology chronology14 = gJChronology13.withUTC();
org.joda.time.DateTimeField dateTimeField15 = gJChronology13.yearOfEra();
org.joda.time.Instant instant16 = gJChronology13.getGregorianCutover();
boolean boolean17 = gJChronology3.equals((java.lang.Object) gJChronology13);
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertTrue("'" + boolean5 + "' != '" + false + "'", boolean5 == false);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(durationField7);
org.junit.Assert.assertEquals("'" + str8 + "' != '" + "GJChronology[Etc/UTC,mdfw=1]" + "'", str8, "GJChronology[Etc/UTC,mdfw=1]");
org.junit.Assert.assertNotNull(dateTimeField9);
org.junit.Assert.assertNotNull(gJChronology13);
org.junit.Assert.assertNotNull(chronology14);
org.junit.Assert.assertNotNull(dateTimeField15);
org.junit.Assert.assertNotNull(instant16);
org.junit.Assert.assertTrue("'" + boolean17 + "' != '" + true + "'", boolean17 == true);
}
@Test
public void test2066() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2066");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
boolean boolean5 = gJChronology3.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField6 = gJChronology3.year();
org.joda.time.DateTimeZone dateTimeZone7 = gJChronology3.getZone();
org.joda.time.DateTimeField dateTimeField8 = gJChronology3.millisOfSecond();
org.joda.time.DurationField durationField9 = gJChronology3.seconds();
org.joda.time.DateTimeField dateTimeField10 = gJChronology3.centuryOfEra();
org.joda.time.DateTimeField dateTimeField11 = gJChronology3.yearOfEra();
org.joda.time.DateTimeField dateTimeField12 = gJChronology3.clockhourOfDay();
org.joda.time.Chronology chronology13 = gJChronology3.withUTC();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertTrue("'" + boolean5 + "' != '" + false + "'", boolean5 == false);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(dateTimeZone7);
org.junit.Assert.assertNotNull(dateTimeField8);
org.junit.Assert.assertNotNull(durationField9);
org.junit.Assert.assertNotNull(dateTimeField10);
org.junit.Assert.assertNotNull(dateTimeField11);
org.junit.Assert.assertNotNull(dateTimeField12);
org.junit.Assert.assertNotNull(chronology13);
}
@Test
@Ignore
public void test2067() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2067");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod5 = null;
long long8 = gJChronology3.add(readablePeriod5, (long) (short) 1, (int) (byte) -1);
long long13 = gJChronology3.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField14 = gJChronology3.seconds();
org.joda.time.DateTimeZone dateTimeZone15 = gJChronology3.getZone();
org.joda.time.DateTimeField dateTimeField16 = gJChronology3.weekyearOfCentury();
org.joda.time.DateTimeField dateTimeField17 = gJChronology3.dayOfMonth();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + long8 + "' != '" + 1L + "'", long8 == 1L);
org.junit.Assert.assertTrue("'" + long13 + "' != '" + (-61062076799990L) + "'", long13 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField14);
org.junit.Assert.assertNotNull(dateTimeZone15);
org.junit.Assert.assertNotNull(dateTimeField16);
org.junit.Assert.assertNotNull(dateTimeField17);
}
@Test
@Ignore
public void test2068() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2068");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod5 = null;
long long8 = gJChronology3.add(readablePeriod5, (long) (short) 1, (int) (byte) -1);
long long13 = gJChronology3.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField14 = gJChronology3.millis();
org.joda.time.DurationField durationField15 = gJChronology3.centuries();
org.joda.time.Instant instant16 = gJChronology3.getGregorianCutover();
org.joda.time.DateTimeField dateTimeField17 = gJChronology3.halfdayOfDay();
org.joda.time.DurationField durationField18 = gJChronology3.weeks();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + long8 + "' != '" + 1L + "'", long8 == 1L);
org.junit.Assert.assertTrue("'" + long13 + "' != '" + (-61062076799990L) + "'", long13 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField14);
org.junit.Assert.assertNotNull(durationField15);
org.junit.Assert.assertNotNull(instant16);
org.junit.Assert.assertNotNull(dateTimeField17);
org.junit.Assert.assertNotNull(durationField18);
}
@Test
@Ignore
public void test2069() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2069");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod5 = null;
long long8 = gJChronology3.add(readablePeriod5, (long) (short) 1, (int) (byte) -1);
long long13 = gJChronology3.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField14 = gJChronology3.weeks();
org.joda.time.DurationField durationField15 = gJChronology3.years();
org.joda.time.DateTimeField dateTimeField16 = gJChronology3.era();
org.joda.time.DurationField durationField17 = gJChronology3.halfdays();
org.joda.time.DateTimeField dateTimeField18 = gJChronology3.weekyear();
org.joda.time.DurationField durationField19 = gJChronology3.months();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + long8 + "' != '" + 1L + "'", long8 == 1L);
org.junit.Assert.assertTrue("'" + long13 + "' != '" + (-61062076799990L) + "'", long13 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField14);
org.junit.Assert.assertNotNull(durationField15);
org.junit.Assert.assertNotNull(dateTimeField16);
org.junit.Assert.assertNotNull(durationField17);
org.junit.Assert.assertNotNull(dateTimeField18);
org.junit.Assert.assertNotNull(durationField19);
}
@Test
@Ignore
public void test2070() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2070");
org.joda.time.chrono.GJChronology gJChronology0 = org.joda.time.chrono.GJChronology.getInstance();
org.joda.time.DateTimeField dateTimeField1 = gJChronology0.minuteOfHour();
org.joda.time.DateTimeField dateTimeField2 = gJChronology0.weekOfWeekyear();
org.joda.time.Chronology chronology3 = gJChronology0.withUTC();
org.joda.time.DateTimeField dateTimeField4 = gJChronology0.weekyear();
org.joda.time.DurationField durationField5 = gJChronology0.minutes();
java.lang.String str6 = gJChronology0.toString();
org.junit.Assert.assertNotNull(gJChronology0);
org.junit.Assert.assertNotNull(dateTimeField1);
org.junit.Assert.assertNotNull(dateTimeField2);
org.junit.Assert.assertNotNull(chronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertNotNull(durationField5);
org.junit.Assert.assertEquals("'" + str6 + "' != '" + "GJChronology[Etc/UTC]" + "'", str6, "GJChronology[Etc/UTC]");
}
@Test
public void test2071() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2071");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.DateTimeField dateTimeField5 = gJChronology3.clockhourOfDay();
org.joda.time.DateTimeField dateTimeField6 = gJChronology3.secondOfMinute();
org.joda.time.DurationField durationField7 = gJChronology3.seconds();
org.joda.time.DateTimeField dateTimeField8 = gJChronology3.clockhourOfDay();
org.joda.time.DateTimeField dateTimeField9 = gJChronology3.dayOfMonth();
org.joda.time.DurationField durationField10 = gJChronology3.millis();
org.joda.time.DateTimeZone dateTimeZone11 = gJChronology3.getZone();
org.joda.time.chrono.GJChronology gJChronology12 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone11);
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertNotNull(dateTimeField5);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(durationField7);
org.junit.Assert.assertNotNull(dateTimeField8);
org.junit.Assert.assertNotNull(dateTimeField9);
org.junit.Assert.assertNotNull(durationField10);
org.junit.Assert.assertNotNull(dateTimeZone11);
org.junit.Assert.assertNotNull(gJChronology12);
}
@Test
public void test2072() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2072");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.DateTimeField dateTimeField5 = gJChronology3.clockhourOfDay();
org.joda.time.DateTimeField dateTimeField6 = gJChronology3.centuryOfEra();
org.joda.time.DateTimeField dateTimeField7 = gJChronology3.halfdayOfDay();
org.joda.time.DateTimeField dateTimeField8 = gJChronology3.halfdayOfDay();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertNotNull(dateTimeField5);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(dateTimeField7);
org.junit.Assert.assertNotNull(dateTimeField8);
}
@Test
public void test2073() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2073");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod5 = null;
long long8 = gJChronology3.add(readablePeriod5, (long) (short) 1, (int) (byte) -1);
org.joda.time.DateTimeField dateTimeField9 = gJChronology3.dayOfMonth();
long long13 = gJChronology3.add((long) (short) 1, 52L, (-1));
org.joda.time.DurationField durationField14 = gJChronology3.centuries();
org.joda.time.DateTimeZone dateTimeZone15 = gJChronology3.getZone();
// The following exception was thrown during execution in test generation
try {
org.joda.time.chrono.GJChronology gJChronology18 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone15, 0L, (int) (short) 10);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalArgumentException; message: Invalid min days in first week: 10");
} catch (java.lang.IllegalArgumentException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + long8 + "' != '" + 1L + "'", long8 == 1L);
org.junit.Assert.assertNotNull(dateTimeField9);
org.junit.Assert.assertTrue("'" + long13 + "' != '" + (-51L) + "'", long13 == (-51L));
org.junit.Assert.assertNotNull(durationField14);
org.junit.Assert.assertNotNull(dateTimeZone15);
}
@Test
@Ignore
public void test2074() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2074");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod5 = null;
long long8 = gJChronology3.add(readablePeriod5, (long) (short) 1, (int) (byte) -1);
long long13 = gJChronology3.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField14 = gJChronology3.seconds();
org.joda.time.DateTimeZone dateTimeZone15 = null;
org.joda.time.ReadableInstant readableInstant16 = null;
org.joda.time.chrono.GJChronology gJChronology18 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone15, readableInstant16, (int) (short) 1);
boolean boolean20 = gJChronology18.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField21 = gJChronology18.year();
org.joda.time.DateTimeZone dateTimeZone22 = gJChronology18.getZone();
org.joda.time.DateTimeField dateTimeField23 = gJChronology18.minuteOfDay();
org.joda.time.DateTimeZone dateTimeZone24 = gJChronology18.getZone();
org.joda.time.Chronology chronology25 = gJChronology3.withZone(dateTimeZone24);
org.joda.time.DateTimeField dateTimeField26 = gJChronology3.year();
org.joda.time.DateTimeField dateTimeField27 = gJChronology3.halfdayOfDay();
org.joda.time.DateTimeZone dateTimeZone28 = gJChronology3.getZone();
org.joda.time.DateTimeZone dateTimeZone29 = null;
org.joda.time.ReadableInstant readableInstant30 = null;
org.joda.time.chrono.GJChronology gJChronology32 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone29, readableInstant30, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField33 = gJChronology32.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod34 = null;
long long37 = gJChronology32.add(readablePeriod34, (long) (short) 1, (int) (byte) -1);
long long42 = gJChronology32.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField43 = gJChronology32.millis();
org.joda.time.DurationField durationField44 = gJChronology32.centuries();
org.joda.time.DateTimeField dateTimeField45 = gJChronology32.dayOfMonth();
org.joda.time.DateTimeField dateTimeField46 = gJChronology32.dayOfWeek();
org.joda.time.DurationField durationField47 = gJChronology32.weekyears();
org.joda.time.DurationField durationField48 = gJChronology32.halfdays();
org.joda.time.Instant instant49 = gJChronology32.getGregorianCutover();
// The following exception was thrown during execution in test generation
try {
org.joda.time.chrono.GJChronology gJChronology51 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone28, (org.joda.time.ReadableInstant) instant49, (int) (short) 100);
org.junit.Assert.fail("Expected exception of type java.lang.IllegalArgumentException; message: Invalid min days in first week: 100");
} catch (java.lang.IllegalArgumentException e) {
// Expected exception.
}
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + long8 + "' != '" + 1L + "'", long8 == 1L);
org.junit.Assert.assertTrue("'" + long13 + "' != '" + (-61062076799990L) + "'", long13 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField14);
org.junit.Assert.assertNotNull(gJChronology18);
org.junit.Assert.assertTrue("'" + boolean20 + "' != '" + false + "'", boolean20 == false);
org.junit.Assert.assertNotNull(dateTimeField21);
org.junit.Assert.assertNotNull(dateTimeZone22);
org.junit.Assert.assertNotNull(dateTimeField23);
org.junit.Assert.assertNotNull(dateTimeZone24);
org.junit.Assert.assertNotNull(chronology25);
org.junit.Assert.assertNotNull(dateTimeField26);
org.junit.Assert.assertNotNull(dateTimeField27);
org.junit.Assert.assertNotNull(dateTimeZone28);
org.junit.Assert.assertNotNull(gJChronology32);
org.junit.Assert.assertNotNull(dateTimeField33);
org.junit.Assert.assertTrue("'" + long37 + "' != '" + 1L + "'", long37 == 1L);
org.junit.Assert.assertTrue("'" + long42 + "' != '" + (-61062076799990L) + "'", long42 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField43);
org.junit.Assert.assertNotNull(durationField44);
org.junit.Assert.assertNotNull(dateTimeField45);
org.junit.Assert.assertNotNull(dateTimeField46);
org.junit.Assert.assertNotNull(durationField47);
org.junit.Assert.assertNotNull(durationField48);
org.junit.Assert.assertNotNull(instant49);
}
@Test
@Ignore
public void test2075() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2075");
org.joda.time.chrono.GJChronology gJChronology0 = org.joda.time.chrono.GJChronology.getInstance();
org.joda.time.DateTimeField dateTimeField1 = gJChronology0.minuteOfHour();
org.joda.time.DateTimeZone dateTimeZone2 = null;
org.joda.time.ReadableInstant readableInstant3 = null;
org.joda.time.chrono.GJChronology gJChronology5 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone2, readableInstant3, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField6 = gJChronology5.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod7 = null;
long long10 = gJChronology5.add(readablePeriod7, (long) (short) 1, (int) (byte) -1);
long long15 = gJChronology5.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField16 = gJChronology5.seconds();
org.joda.time.DateTimeZone dateTimeZone17 = gJChronology5.getZone();
org.joda.time.Chronology chronology18 = gJChronology0.withZone(dateTimeZone17);
org.joda.time.DateTimeZone dateTimeZone19 = null;
org.joda.time.ReadableInstant readableInstant20 = null;
org.joda.time.chrono.GJChronology gJChronology22 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone19, readableInstant20, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField23 = gJChronology22.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod24 = null;
long long27 = gJChronology22.add(readablePeriod24, (long) (short) 1, (int) (byte) -1);
long long32 = gJChronology22.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField33 = gJChronology22.seconds();
org.joda.time.DateTimeZone dateTimeZone34 = null;
org.joda.time.ReadableInstant readableInstant35 = null;
org.joda.time.chrono.GJChronology gJChronology37 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone34, readableInstant35, (int) (short) 1);
boolean boolean39 = gJChronology37.equals((java.lang.Object) (byte) 0);
org.joda.time.DateTimeField dateTimeField40 = gJChronology37.year();
org.joda.time.DateTimeZone dateTimeZone41 = gJChronology37.getZone();
org.joda.time.DateTimeField dateTimeField42 = gJChronology37.minuteOfDay();
org.joda.time.DateTimeZone dateTimeZone43 = gJChronology37.getZone();
org.joda.time.Chronology chronology44 = gJChronology22.withZone(dateTimeZone43);
org.joda.time.Chronology chronology45 = gJChronology0.withZone(dateTimeZone43);
org.joda.time.DateTimeZone dateTimeZone46 = null;
org.joda.time.ReadableInstant readableInstant47 = null;
org.joda.time.chrono.GJChronology gJChronology49 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone46, readableInstant47, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField50 = gJChronology49.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod51 = null;
long long54 = gJChronology49.add(readablePeriod51, (long) (short) 1, (int) (byte) -1);
org.joda.time.Instant instant55 = gJChronology49.getGregorianCutover();
org.joda.time.chrono.GJChronology gJChronology57 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone43, (org.joda.time.ReadableInstant) instant55, (int) (byte) 1);
org.joda.time.DateTimeZone dateTimeZone58 = null;
org.joda.time.ReadableInstant readableInstant59 = null;
org.joda.time.chrono.GJChronology gJChronology61 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone58, readableInstant59, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField62 = gJChronology61.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod63 = null;
long long66 = gJChronology61.add(readablePeriod63, (long) (short) 1, (int) (byte) -1);
long long70 = gJChronology61.add(1L, (long) '4', (int) (short) 0);
org.joda.time.Instant instant71 = gJChronology61.getGregorianCutover();
org.joda.time.chrono.GJChronology gJChronology72 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone43, (org.joda.time.ReadableInstant) instant71);
org.joda.time.DateTimeField dateTimeField73 = gJChronology72.secondOfMinute();
org.junit.Assert.assertNotNull(gJChronology0);
org.junit.Assert.assertNotNull(dateTimeField1);
org.junit.Assert.assertNotNull(gJChronology5);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertTrue("'" + long10 + "' != '" + 1L + "'", long10 == 1L);
org.junit.Assert.assertTrue("'" + long15 + "' != '" + (-61062076799990L) + "'", long15 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField16);
org.junit.Assert.assertNotNull(dateTimeZone17);
org.junit.Assert.assertNotNull(chronology18);
org.junit.Assert.assertNotNull(gJChronology22);
org.junit.Assert.assertNotNull(dateTimeField23);
org.junit.Assert.assertTrue("'" + long27 + "' != '" + 1L + "'", long27 == 1L);
org.junit.Assert.assertTrue("'" + long32 + "' != '" + (-61062076799990L) + "'", long32 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField33);
org.junit.Assert.assertNotNull(gJChronology37);
org.junit.Assert.assertTrue("'" + boolean39 + "' != '" + false + "'", boolean39 == false);
org.junit.Assert.assertNotNull(dateTimeField40);
org.junit.Assert.assertNotNull(dateTimeZone41);
org.junit.Assert.assertNotNull(dateTimeField42);
org.junit.Assert.assertNotNull(dateTimeZone43);
org.junit.Assert.assertNotNull(chronology44);
org.junit.Assert.assertNotNull(chronology45);
org.junit.Assert.assertNotNull(gJChronology49);
org.junit.Assert.assertNotNull(dateTimeField50);
org.junit.Assert.assertTrue("'" + long54 + "' != '" + 1L + "'", long54 == 1L);
org.junit.Assert.assertNotNull(instant55);
org.junit.Assert.assertNotNull(gJChronology57);
org.junit.Assert.assertNotNull(gJChronology61);
org.junit.Assert.assertNotNull(dateTimeField62);
org.junit.Assert.assertTrue("'" + long66 + "' != '" + 1L + "'", long66 == 1L);
org.junit.Assert.assertTrue("'" + long70 + "' != '" + 1L + "'", long70 == 1L);
org.junit.Assert.assertNotNull(instant71);
org.junit.Assert.assertNotNull(gJChronology72);
org.junit.Assert.assertNotNull(dateTimeField73);
}
@Test
public void test2076() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2076");
org.joda.time.chrono.GJChronology gJChronology0 = org.joda.time.chrono.GJChronology.getInstance();
org.joda.time.DurationField durationField1 = gJChronology0.weeks();
org.joda.time.DateTimeField dateTimeField2 = gJChronology0.clockhourOfHalfday();
org.joda.time.DateTimeField dateTimeField3 = gJChronology0.dayOfYear();
org.joda.time.DateTimeField dateTimeField4 = gJChronology0.halfdayOfDay();
org.joda.time.DurationField durationField5 = gJChronology0.days();
org.joda.time.DateTimeField dateTimeField6 = gJChronology0.weekyear();
org.joda.time.DateTimeField dateTimeField7 = gJChronology0.millisOfDay();
org.junit.Assert.assertNotNull(gJChronology0);
org.junit.Assert.assertNotNull(durationField1);
org.junit.Assert.assertNotNull(dateTimeField2);
org.junit.Assert.assertNotNull(dateTimeField3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertNotNull(durationField5);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(dateTimeField7);
}
@Test
@Ignore
public void test2077() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2077");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod5 = null;
long long8 = gJChronology3.add(readablePeriod5, (long) (short) 1, (int) (byte) -1);
long long13 = gJChronology3.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField14 = gJChronology3.millis();
org.joda.time.DateTimeField dateTimeField15 = gJChronology3.halfdayOfDay();
org.joda.time.DateTimeField dateTimeField16 = gJChronology3.hourOfHalfday();
org.joda.time.DateTimeField dateTimeField17 = gJChronology3.halfdayOfDay();
org.joda.time.DateTimeField dateTimeField18 = gJChronology3.yearOfEra();
org.joda.time.DateTimeField dateTimeField19 = gJChronology3.halfdayOfDay();
long long23 = gJChronology3.add(10L, (-51L), 4);
org.joda.time.DateTimeField dateTimeField24 = gJChronology3.halfdayOfDay();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + long8 + "' != '" + 1L + "'", long8 == 1L);
org.junit.Assert.assertTrue("'" + long13 + "' != '" + (-61062076799990L) + "'", long13 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField14);
org.junit.Assert.assertNotNull(dateTimeField15);
org.junit.Assert.assertNotNull(dateTimeField16);
org.junit.Assert.assertNotNull(dateTimeField17);
org.junit.Assert.assertNotNull(dateTimeField18);
org.junit.Assert.assertNotNull(dateTimeField19);
org.junit.Assert.assertTrue("'" + long23 + "' != '" + (-194L) + "'", long23 == (-194L));
org.junit.Assert.assertNotNull(dateTimeField24);
}
@Test
public void test2078() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2078");
org.joda.time.chrono.GJChronology gJChronology0 = org.joda.time.chrono.GJChronology.getInstanceUTC();
org.joda.time.DateTimeField dateTimeField1 = gJChronology0.monthOfYear();
org.joda.time.DateTimeField dateTimeField2 = gJChronology0.clockhourOfDay();
org.joda.time.DurationField durationField3 = gJChronology0.eras();
org.joda.time.DateTimeField dateTimeField4 = gJChronology0.era();
org.junit.Assert.assertNotNull(gJChronology0);
org.junit.Assert.assertNotNull(dateTimeField1);
org.junit.Assert.assertNotNull(dateTimeField2);
org.junit.Assert.assertNotNull(durationField3);
org.junit.Assert.assertNotNull(dateTimeField4);
}
@Test
@Ignore
public void test2079() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2079");
org.joda.time.DateTimeZone dateTimeZone0 = null;
org.joda.time.ReadableInstant readableInstant1 = null;
org.joda.time.chrono.GJChronology gJChronology3 = org.joda.time.chrono.GJChronology.getInstance(dateTimeZone0, readableInstant1, (int) (short) 1);
org.joda.time.DateTimeField dateTimeField4 = gJChronology3.clockhourOfDay();
org.joda.time.ReadablePeriod readablePeriod5 = null;
long long8 = gJChronology3.add(readablePeriod5, (long) (short) 1, (int) (byte) -1);
long long13 = gJChronology3.getDateTimeMillis((int) '#', (int) (short) 1, (int) (short) 10, 10);
org.joda.time.DurationField durationField14 = gJChronology3.weeks();
org.joda.time.DateTimeField dateTimeField15 = gJChronology3.clockhourOfDay();
org.joda.time.DateTimeField dateTimeField16 = gJChronology3.weekyear();
java.lang.String str17 = gJChronology3.toString();
org.joda.time.DateTimeField dateTimeField18 = gJChronology3.secondOfDay();
org.joda.time.ReadablePeriod readablePeriod19 = null;
long long22 = gJChronology3.add(readablePeriod19, (-71399996L), (int) '4');
org.joda.time.DateTimeField dateTimeField23 = gJChronology3.weekyear();
org.junit.Assert.assertNotNull(gJChronology3);
org.junit.Assert.assertNotNull(dateTimeField4);
org.junit.Assert.assertTrue("'" + long8 + "' != '" + 1L + "'", long8 == 1L);
org.junit.Assert.assertTrue("'" + long13 + "' != '" + (-61062076799990L) + "'", long13 == (-61062076799990L));
org.junit.Assert.assertNotNull(durationField14);
org.junit.Assert.assertNotNull(dateTimeField15);
org.junit.Assert.assertNotNull(dateTimeField16);
org.junit.Assert.assertEquals("'" + str17 + "' != '" + "GJChronology[Etc/UTC,mdfw=1]" + "'", str17, "GJChronology[Etc/UTC,mdfw=1]");
org.junit.Assert.assertNotNull(dateTimeField18);
org.junit.Assert.assertTrue("'" + long22 + "' != '" + (-71399996L) + "'", long22 == (-71399996L));
org.junit.Assert.assertNotNull(dateTimeField23);
}
@Test
public void test2080() throws Throwable {
if (debug)
System.out.format("%n%s%n", "RegressionTest4.test2080");
org.joda.time.chrono.GJChronology gJChronology0 = org.joda.time.chrono.GJChronology.getInstance();
org.joda.time.DateTimeField dateTimeField1 = gJChronology0.minuteOfHour();
org.joda.time.DateTimeField dateTimeField2 = gJChronology0.weekOfWeekyear();
org.joda.time.DurationField durationField3 = gJChronology0.centuries();
org.joda.time.DurationField durationField4 = gJChronology0.days();
org.joda.time.DurationField durationField5 = gJChronology0.halfdays();
org.joda.time.DateTimeField dateTimeField6 = gJChronology0.clockhourOfHalfday();
org.joda.time.DateTimeField dateTimeField7 = gJChronology0.millisOfDay();
org.junit.Assert.assertNotNull(gJChronology0);
org.junit.Assert.assertNotNull(dateTimeField1);
org.junit.Assert.assertNotNull(dateTimeField2);
org.junit.Assert.assertNotNull(durationField3);
org.junit.Assert.assertNotNull(durationField4);
org.junit.Assert.assertNotNull(durationField5);
org.junit.Assert.assertNotNull(dateTimeField6);
org.junit.Assert.assertNotNull(dateTimeField7);
}
}
| [
"P.Derakhshanfar@tudelft.nl"
] | P.Derakhshanfar@tudelft.nl |
6d8b71c9c3f96f4053a39a245c4bc9e886ec8796 | cbffed26bd8e6eaead9543073494f2b1248fff60 | /src/balls/model/EndChecker.java | 517e7af89542df543c219b7fdb02ab20408e7cc1 | [] | no_license | piorkowskiprzemyslaw/game | e3c75090cd2fc9c99874d14a0d9502641ef99103 | e41e6ffa71e4d0f85d124e9b5cbc3491b2fd726b | refs/heads/master | 2020-05-20T08:43:17.969817 | 2013-11-19T23:01:27 | 2013-11-19T23:01:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 579 | java | /**
*
*/
package balls.model;
/**
* Klasa sprawdzajaca czy w danym momencie zgodnie z zasadami został osiągnięty
* koniec gry.
*
* @author Przemysław Piórkowski
*
*/
final class EndChecker
{
private final BallSetGroup ballSetGroup;
EndChecker(final BallSetGroup ballSetGroup)
{
this.ballSetGroup = ballSetGroup;
}
/**
* Sprawdź czy na planszy nastąpił koniec gry.
*
* @return true - koniec gry.
*/
boolean check()
{
for (BallSet ballSet : ballSetGroup)
{
if (ballSet.size() >= 2)
{
return false;
}
}
return true;
}
}
| [
"piorkowskiprzemyslaw@gmail.com"
] | piorkowskiprzemyslaw@gmail.com |
172a0d03c46eaa655bd7abc790966f217069cbf8 | 9a9f93532adb7a26307270a0f6876e24658117cd | /app/src/main/java/com/video/newqu/bean/FilterBean.java | dde106e24a3ba144344fc293e5dd30af9be2e1d1 | [] | no_license | jinkailong888/Video | fda7c0606eff676ca6672000c620fd8832af43d6 | 4513c2de0380b09896d9f2d5a5ff1c16f80854ec | refs/heads/master | 2020-04-24T08:55:37.866468 | 2018-04-28T09:20:59 | 2018-04-28T09:20:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 683 | java | package com.video.newqu.bean;
/**
* TinyHung@Outlook.com
* 2017/8/25
*/
public class FilterBean {
private int filterType;
private String filterName;
public FilterBean(int filterType, String filterName) {
this.filterType = filterType;
this.filterName = filterName;
}
public FilterBean(){
super();
}
public int getFilterType() {
return filterType;
}
public void setFilterType(int filterType) {
this.filterType = filterType;
}
public String getFilterName() {
return filterName;
}
public void setFilterName(String filterName) {
this.filterName = filterName;
}
}
| [
"584312311@qq.com"
] | 584312311@qq.com |
5176ba41e036956becca031b36c33a3e4e393fbf | 8575a24523686d8c7f2c936da2881af7c7651b25 | /app/src/main/java/com/bananarepublick/banan/sqlite/Fragment/OwnerFragment.java | c32189b3d565f9a5b0573cb2795fc3177b1a7cf3 | [] | no_license | Banan18/SQLite | f452867e66cca666b20204b0660ab0c0ca339472 | af4ad656accc3fa73164c238e27aa5f7dcf09145 | refs/heads/master | 2020-04-07T08:00:00.146558 | 2018-03-11T07:39:15 | 2018-03-11T07:39:15 | 124,194,937 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,870 | java | package com.bananarepublick.banan.sqlite.Fragment;
import android.app.Fragment;
import android.content.Context;
import android.net.Uri;
import android.os.Bundle;
import android.text.InputType;
import android.text.method.ScrollingMovementMethod;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.Toast;
import com.bananarepublick.banan.sqlite.R;
import com.bananarepublick.banan.sqlite.data.Card;
import com.bananarepublick.banan.sqlite.data.Owner;
import java.util.List;
/**
* A simple {@link Fragment} subclass.
* Activities that contain this fragment must implement the
* {@link OwnerFragment.OnFragmentInteractionListener} interface
* to handle interaction events.
* Use the {@link OwnerFragment#newInstance} factory method to
* create an instance of this fragment.
*/
public class OwnerFragment extends Fragment implements View.OnClickListener {
// TODO: Rename parameter arguments, choose names that match
// the fragment initialization parameters, e.g. ARG_ITEM_NUMBER
private static final String ARG_PARAM1 = "param1";
private static final String ARG_PARAM2 = "param2";
// TODO: Rename and change types of parameters
private String mParam1;
private String mParam2;
private EditText editTextFIO, editTextNumber, editTextID;
private TextView textView;
private Owner owner;
private OnFragmentInteractionListener mListener;
public OwnerFragment() {
// Required empty public constructor
}
/**
* Use this factory method to create a new instance of
* this fragment using the provided parameters.
*
* @param param1 Parameter 1.
* @param param2 Parameter 2.
* @return A new instance of fragment OwnerFragment.
*/
// TODO: Rename and change types and number of parameters
public static OwnerFragment newInstance(String param1, String param2) {
OwnerFragment fragment = new OwnerFragment();
Bundle args = new Bundle();
args.putString(ARG_PARAM1, param1);
args.putString(ARG_PARAM2, param2);
fragment.setArguments(args);
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getArguments() != null) {
mParam1 = getArguments().getString(ARG_PARAM1);
mParam2 = getArguments().getString(ARG_PARAM2);
}
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragment_owner, container, false);
textView = (TextView) view.findViewById(R.id.textViewTable);
textView.setMovementMethod(new ScrollingMovementMethod());
editTextFIO = (EditText) view.findViewById(R.id.editText1);
editTextFIO.setHint("ФИО");
editTextNumber = (EditText) view.findViewById(R.id.editText2);
editTextNumber.setHint("Номер телефона");
editTextNumber.setInputType(InputType.TYPE_CLASS_PHONE);
editTextID = (EditText) view.findViewById(R.id.editTextID);
Button buttonAdd = (Button) view.findViewById(R.id.buttonAdd);
buttonAdd.setOnClickListener(this);
Button buttonRead = (Button) view.findViewById(R.id.buttonRead);
buttonRead.setOnClickListener(this);
Button buttonDeleteAll = (Button) view.findViewById(R.id.buttonDeleteAll);
buttonDeleteAll.setOnClickListener(this);
Button buttonUpdate = (Button) view.findViewById(R.id.buttonUpdate);
buttonUpdate.setOnClickListener(this);
Button buttonDelete = (Button) view.findViewById(R.id.buttonDelete);
buttonDelete.setOnClickListener(this);
// Inflate the layout for this fragment
return view;
}
@Override
public void onClick(View v) {
List<Owner> allOwner;
List<Card> allCard;
switch (v.getId()) {
case R.id.buttonAdd:
if (checkEditAdd()) {
owner = new Owner(editTextFIO.getText().toString(),
editTextNumber.getText().toString());
owner.save();
allOwner = Owner.listAll(Owner.class);
textView.setText(allOwner.toString());
}
break;
case R.id.buttonRead:
allOwner = Owner.listAll(Owner.class);
if (allOwner.toString() != "[]")
textView.setText(allOwner.toString());
else
textView.setText("Таблица пустая");
break;
case R.id.buttonDeleteAll:
allCard = Card.find(Card.class, "view_card");
if (allCard.toString() == "[]") {
Owner.deleteAll(Owner.class);
textView.setText("Таблица пустая");
}
break;
case R.id.buttonUpdate:
if (checkEditAdd() && checkEditID() && checkID()) {
owner.fio = editTextFIO.getText().toString();
owner.number = editTextNumber.getText().toString();
owner.save();
allOwner = Owner.listAll(Owner.class);
textView.setText(allOwner.toString());
}
break;
case R.id.buttonDelete:
if (checkEditID() && checkID() && checkIdCard()) {
owner.delete();
allOwner = Owner.listAll(Owner.class);
textView.setText(allOwner.toString());
}
break;
}
}
// проверка пустые ли едиты добавления
private boolean checkEditAdd() {
if (editTextFIO.length() != 0 && editTextNumber.length() != 0) {
return true;
} else
Toast.makeText(getActivity(), "Вы не заполнили нужные поля",
Toast.LENGTH_SHORT).show();
return false;
}
// проверка пустой ли id
private boolean checkEditID() {
if (editTextID.length() != 0) {
return true;
} else
Toast.makeText(getActivity(), "Вы не заполнили ID",
Toast.LENGTH_SHORT).show();
return false;
}
// проверка существует ли id
public boolean checkID() {
int id = Integer.parseInt(editTextID.getText().toString());
owner = Owner.findById(Owner.class, id);
if (owner != null)
return true;
else
Toast.makeText(getActivity(), "Вы ввели неправильный ID",
Toast.LENGTH_SHORT).show();
return false;
}
// проверка используется ли владелец
public boolean checkIdCard() {
List<Card> allCard = Card.find(Card.class, "owner = ?",
editTextID.getText().toString());
if (allCard.toString() == "[]")
return true;
else
Toast.makeText(getActivity(), "Вы ввели используемого владельца",
Toast.LENGTH_SHORT).show();
return false;
}
// TODO: Rename method, update argument and hook method into UI event
public void onButtonPressed(Uri uri) {
if (mListener != null) {
mListener.onFragmentInteraction(uri);
}
}
@Override
public void onAttach(Context context) {
super.onAttach(context);
if (context instanceof OnFragmentInteractionListener) {
mListener = (OnFragmentInteractionListener) context;
} else {
throw new RuntimeException(context.toString()
+ " must implement OnFragmentInteractionListener");
}
}
@Override
public void onDetach() {
super.onDetach();
mListener = null;
}
/**
* This interface must be implemented by activities that contain this
* fragment to allow an interaction in this fragment to be communicated
* to the activity and potentially other fragments contained in that
* activity.
* <p>
* See the Android Training lesson <a href=
* "http://developer.android.com/training/basics/fragments/communicating.html"
* >Communicating with Other Fragments</a> for more information.
*/
public interface OnFragmentInteractionListener {
// TODO: Update argument type and name
void onFragmentInteraction(Uri uri);
}
}
| [
"trytryty.tytytytyty@mail.ru"
] | trytryty.tytytytyty@mail.ru |
1c78e775be9f57ebb17ea8d0a5200d738be39e57 | 52c514dda2cdd5c221c2aa1b306f015baeace575 | /app/src/main/java/com/mazeworks/boringapp/layout/ProfileHeaderFragment.java | 8c7ed2ea63db87baca1d325c425e670186c1e682 | [] | no_license | mambisi/BoringApp | 4f8e26bd6bbeb76d6fbb953e67f0f9339e1102ce | 7bf35c1c2cafd002ddede4e5c7e65ca335fc3bb3 | refs/heads/master | 2021-01-01T20:43:22.477995 | 2017-08-02T14:34:11 | 2017-08-02T14:34:11 | 98,918,649 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 11,872 | java | package com.mazeworks.boringapp.layout;
import android.Manifest;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.support.annotation.NonNull;
import android.support.design.widget.Snackbar;
import android.support.v4.app.Fragment;
import android.support.v7.widget.AppCompatButton;
import android.support.v7.widget.AppCompatImageView;
import android.support.v7.widget.AppCompatTextView;
import android.text.InputType;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ProgressBar;
import android.widget.Toast;
import com.afollestad.materialdialogs.MaterialDialog;
import com.bumptech.glide.Glide;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.OnFailureListener;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.android.gms.tasks.Task;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
import com.google.firebase.auth.UserProfileChangeRequest;
import com.google.firebase.storage.FirebaseStorage;
import com.google.firebase.storage.StorageReference;
import com.google.firebase.storage.UploadTask;
import com.gun0912.tedpermission.PermissionListener;
import com.gun0912.tedpermission.TedPermission;
import com.mazeworks.boringapp.R;
import com.mazeworks.boringapp.R2;
import com.mazeworks.boringapp.activity.ProfileSettingsActivity;
import com.mazeworks.boringapp.util.Events;
import com.mazeworks.boringapp.util.FirebaseDataReferences;
import com.mazeworks.boringapp.util.ImageCompression;
import com.mazeworks.boringapp.util.MessageEvent;
import com.mazeworks.boringapp.util.UserPreferences;
import com.yalantis.ucrop.UCrop;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import java.io.File;
import java.util.ArrayList;
import java.util.Date;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import de.hdodenhof.circleimageview.CircleImageView;
import gun0912.tedbottompicker.TedBottomPicker;
import jp.wasabeef.glide.transformations.BlurTransformation;
public class ProfileHeaderFragment extends Fragment implements TedBottomPicker.OnImageSelectedListener, ImageCompression.ICompressorListener {
private static final String LOG_TAG = "STORAGE_ERROR";
private FirebaseUser user;
private TedBottomPicker tedBottomPicker;
@BindView(R2.id.user_profile)
CircleImageView mProfileImageView;
@BindView(R2.id.profile_background)
AppCompatImageView mProfileBackground;
@BindView(R2.id.change_name)
AppCompatButton mNameBtn;
ProgressBar mBusyIndicator;
@BindView(R2.id.phone_number)
AppCompatTextView mPhoneNumber;
String mPrevName = "";
private StorageReference storageRef;
private UserPreferences userUtil;
public ProfileHeaderFragment() {
}
public static ProfileHeaderFragment newInstance() {
ProfileHeaderFragment fragment = new ProfileHeaderFragment();
return fragment;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
user = FirebaseAuth.getInstance().getCurrentUser();
storageRef = FirebaseStorage.getInstance().getReference();
userUtil = UserPreferences.getInstance();
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
View view = inflater.inflate(R.layout.fragment_profile_header, container, false);
ButterKnife.bind(this, view);
mBusyIndicator = (ProgressBar) view.findViewById(R.id.progress_indicator);
mNameBtn.setText("Enter your name");
PermissionListener permissionlistener = new PermissionListener() {
@Override
public void onPermissionGranted() {
tedBottomPicker = new TedBottomPicker.Builder(getContext()).setOnImageSelectedListener(ProfileHeaderFragment.this).create();
}
@Override
public void onPermissionDenied(ArrayList<String> deniedPermissions) {
if (getView() != null)
Snackbar.make(getView(),"Permission Denied\n" + deniedPermissions.toString(), Snackbar.LENGTH_SHORT).show();
}
};
new TedPermission(getContext())
.setPermissionListener(permissionlistener)
.setDeniedMessage("If you reject permission,you can not use this service\n\nPlease turn on permissions at [Setting] > [Permission]")
.setPermissions(Manifest.permission.WRITE_EXTERNAL_STORAGE)
.check();
if (userUtil.getUsername() != null) {
mPrevName = userUtil.getUsername();
mNameBtn.setText(mPrevName);
}
//TODO :Must Clean Up
else {
if (user.getDisplayName() != null) {
userUtil.setUsername(user.getDisplayName());
mPrevName = userUtil.getUsername();
mNameBtn.setText(mPrevName);
}
}
if (userUtil.getProfileUrl() != null) {
Glide.with(ProfileHeaderFragment.this).load(userUtil.getProfileUrl()).asBitmap().into(mProfileImageView);
Glide.with(ProfileHeaderFragment.this)
.load(userUtil.getProfileUrl())
.bitmapTransform(new BlurTransformation(getContext(), 25))
.into(mProfileBackground);
}
//TODO :Must Clean Up
else {
if (user.getPhotoUrl() != null) {
userUtil.setProfileUrl(user.getPhotoUrl().toString());
Glide.with(ProfileHeaderFragment.this).load(userUtil.getProfileUrl()).asBitmap().into(mProfileImageView);
Glide.with(ProfileHeaderFragment.this)
.load(userUtil.getProfileUrl())
.bitmapTransform(new BlurTransformation(getContext(), 25))
.into(mProfileBackground);
}
}
return view;
}
@OnClick(R.id.change_name)
void changeDisplayName() {
if (!mNameBtn.getText().toString().toLowerCase().equals("Enter your name".toLowerCase())) {
mPrevName = mNameBtn.getText().toString();
}
new MaterialDialog.Builder(getContext())
.title("Enter your name")
.inputType(InputType.TYPE_TEXT_VARIATION_PERSON_NAME)
.input("Example :John Doe", mPrevName, new MaterialDialog.InputCallback() {
@Override
public void onInput(MaterialDialog dialog, CharSequence input) {
if (input.length() > 4) {
mBusyIndicator.setVisibility(View.VISIBLE);
updateUsername(input.toString());
} else {
Snackbar.make(getView(), "Username is too short", Snackbar.LENGTH_LONG).show();
}
}
}).show();
}
@OnClick(R.id.profile_image_picker)
void changeProfileImage() {
if (tedBottomPicker != null) {
if (!tedBottomPicker.isAdded())
tedBottomPicker.show(getFragmentManager());
}
}
private void updateUsername(final String name) {
mNameBtn.setEnabled(false);
UserProfileChangeRequest profileChangeRequest = new UserProfileChangeRequest.Builder().setDisplayName(name).build();
user.updateProfile(profileChangeRequest).addOnCompleteListener(new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
mBusyIndicator.setVisibility(View.GONE);
mNameBtn.setEnabled(true);
}
}).addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
Snackbar.make(getView(), e.getMessage(), Snackbar.LENGTH_LONG).show();
}
}).addOnSuccessListener(new OnSuccessListener<Void>() {
@Override
public void onSuccess(Void aVoid) {
Snackbar.make(getView(), "Display name Changed", Snackbar.LENGTH_LONG).show();
userUtil.setUsername(name);
}
});
}
private void updateUserProfileUrl(final Uri uri) {
UserProfileChangeRequest profileChangeRequest = new UserProfileChangeRequest.Builder().setPhotoUri(uri).build();
user.updateProfile(profileChangeRequest).addOnCompleteListener(getActivity(), new OnCompleteListener<Void>() {
@Override
public void onComplete(@NonNull Task<Void> task) {
if (task.isSuccessful()) {
FirebaseDataReferences.getUserDatabaseReference().child(user.getUid()).child("profileUrl").setValue(uri.toString());
userUtil.setProfileUrl(uri.toString());
mBusyIndicator.setVisibility(View.GONE);
}
}
});
}
@Override
public void onImageSelected(Uri uri) {
UCrop.of(uri, Uri.fromFile(new File(Environment.getExternalStoragePublicDirectory(
Environment.DIRECTORY_PICTURES), "IMG_CROP" + System.currentTimeMillis() + ".jpg")))
.withAspectRatio(1, 1)
.withMaxResultSize(512, 512)
.start(getActivity());
}
private void uploadToStorage(Uri uri) {
StorageReference riversRef = storageRef.child("images/profiles/" + user.getUid() + "/" + new Date().toString() + ".jpg");
riversRef.putFile(uri)
.addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {
@Override
public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {
Uri downloadUrl = taskSnapshot.getDownloadUrl();
updateUserProfileUrl(downloadUrl);
}
})
.addOnFailureListener(new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception exception) {
}
});
}
@Override
public void onStart() {
super.onStart();
EventBus.getDefault().register(this);
}
@Override
public void onStop() {
super.onStop();
EventBus.getDefault().unregister(this);
}
@Override
public void onCompressionCompleted(String filePath) {
uploadToStorage(Uri.fromFile(new File(filePath)));
}
@Override
public void compresionStarted() {
this.mBusyIndicator.setVisibility(View.VISIBLE);
}
@Subscribe(threadMode = ThreadMode.MAIN)
public void onMessageEvent(MessageEvent event) {
if (event.EVENT == Events.PROFILE_URL_UPDATE) {
Glide.with(this).load(userUtil.getProfileUrl()).into(mProfileImageView);
Glide.with(ProfileHeaderFragment.this)
.load(userUtil.getProfileUrl())
.bitmapTransform(new BlurTransformation(getContext(), 25))
.into(mProfileBackground);
}
if (event.EVENT == Events.DISPLAY_NAME_UPDATE) {
mNameBtn.setText(userUtil.getUsername());
}
if (event.EVENT == Events.PHONE_CHANGED) {
mPhoneNumber.setText(userUtil.getPhone());
}
}
public void setCroppedImageUri(Uri uri) {
ImageCompression imageCompression = new ImageCompression(this);
imageCompression.execute(Uri.parse(uri.getSchemeSpecificPart()).toString());
}
}
| [
"lilbizi96@gmail.com"
] | lilbizi96@gmail.com |
b37a277c142beb6ac9eeac45e30eab4e819c137d | a54da9ce7178714e6fced06c521cde0fb007f6ff | /Movie/src/main/java/movie/feign/UserFeignClient.java | cde3800c6394f8ffb736a740b2391a451bec107e | [] | no_license | marcusMintchip/MovieApplication | 8729a19cc0641e1b91accf7d9502d5f4ac20f7d4 | 9aacc5db9c6bccc5608e1fe47db227bf4d810b06 | refs/heads/master | 2020-04-20T14:43:26.968184 | 2019-02-03T04:11:12 | 2019-02-03T04:11:12 | 168,907,986 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 716 | java | package movie.feign;
import feign.Logger;
import movie.entity.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Bean;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
@FeignClient(name = "user",configuration = UserFeignConfig.class)
public interface UserFeignClient {
@GetMapping("/users/{id}")
public User findById(@PathVariable("id") Long id);
}
class UserFeignConfig{
@Bean
public Logger.Level logger(){
return Logger.Level.FULL;
}
}
class UserFeinConfiguration{
@Bean
public Logger.Level logger(){
return Logger.Level.HEADERS;
}
} | [
"cxwang@ittx.com.cn"
] | cxwang@ittx.com.cn |
64c72b2953900026b6ed1d14931ad58fa61a9afa | f04f0c3a45b89c14c1ccc9bc9048977f19cd4463 | /src/main/java/com/bootdo/system/controller/WuliaoxinxiController.java | 70c518f9ed727c62241b9f97dcdc083f844c029f | [] | no_license | wxmhpb/boot | 5d7e4b879f3c355697408901bc91776e898e0c81 | 042cb65c3ee5f6a7806beeead11d099e2a099a08 | refs/heads/main | 2023-07-07T00:22:11.519769 | 2021-08-04T13:04:37 | 2021-08-04T13:04:37 | 372,144,160 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,456 | java | package com.bootdo.system.controller;
import java.util.List;
import java.util.Map;
import com.bootdo.system.domain.JihaoDO;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.Model;
import org.springframework.stereotype.Controller;
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.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import com.bootdo.system.domain.WuliaoxinxiDO;
import com.bootdo.system.service.WuliaoxinxiService;
import com.bootdo.common.utils.PageUtils;
import com.bootdo.common.utils.Query;
import com.bootdo.common.utils.R;
/**
*
*
* @author ktt
* @email 1035964900@qq.com
* @date 2020-12-29 17:50:50
*/
@Controller
@RequestMapping("/system/wuliaoxinxi")
public class WuliaoxinxiController {
@Autowired
private WuliaoxinxiService wuliaoxinxiService;
@GetMapping()
@RequiresPermissions("system:wuliaoxinxi:wuliaoxinxi")
String Wuliaoxinxi(){
return "system/wuliaoxinxi/wuliaoxinxi";
}
@GetMapping("/add")
@RequiresPermissions("system:wuliaoxinxi:add")
public String add(){
return "system/wuliaoxinxi/add";
}
@ResponseBody
@GetMapping("/list")
@RequiresPermissions("system:wuliaoxinxi:wuliaoxinxi")
public PageUtils list(@RequestParam Map<String, Object> params){
//查询列表数据
Query query = new Query(params);
List<WuliaoxinxiDO> wuliaoxinxiList = wuliaoxinxiService.list(query);
int total = wuliaoxinxiService.count(query);
PageUtils pageUtils = new PageUtils(wuliaoxinxiList, total);
return pageUtils;
}
@GetMapping("/edit/{id}")
@RequiresPermissions("system:wuliaoxinxi:edit")
String edit(@PathVariable("id") Integer id,Model model){
WuliaoxinxiDO wuliaoxinxi = wuliaoxinxiService.get(id);
model.addAttribute("wuliaoxinxi", wuliaoxinxi);
return "system/wuliaoxinxi/edit";
}
/**
* 保存
*/
@ResponseBody
@PostMapping("/save")
@RequiresPermissions("system:wuliaoxinxi:add")
public R save( WuliaoxinxiDO wuliaoxinxi){
if(wuliaoxinxiService.save(wuliaoxinxi)>0){
return R.ok();
}
return R.error();
}
/**
* 修改
*/
@ResponseBody
@RequestMapping("/update")
@RequiresPermissions("system:wuliaoxinxi:edit")
public R update( WuliaoxinxiDO wuliaoxinxi){
wuliaoxinxiService.update(wuliaoxinxi);
return R.ok();
}
/**
* 删除
*/
@PostMapping( "/remove")
@ResponseBody
@RequiresPermissions("system:wuliaoxinxi:remove")
public R remove( Integer id){
if(wuliaoxinxiService.remove(id)>0){
return R.ok();
}
return R.error();
}
/**
* 删除
*/
@PostMapping( "/batchRemove")
@ResponseBody
@RequiresPermissions("system:wuliaoxinxi:batchRemove")
public R remove(@RequestParam("ids[]") Integer[] ids){
wuliaoxinxiService.batchRemove(ids);
return R.ok();
}
// @GetMapping("/queryList")
// @ResponseBody
// public List queryList (@RequestParam(value = "id") Integer id) {
// //根据数据库Id查询对应的数据类型
// List<WuliaoxinxiDO> wuliaoxinxiDOS = wuliaoxinxiService.queryList(id);
// if (wuliaoxinxiDOS == null) {
// throw new RuntimeException("数据为空!");
// }
// return wuliaoxinxiDOS;
// }
}
| [
"hwxm9527@163.com"
] | hwxm9527@163.com |
e21a2f1c3237c08412022cd037332ee6c909afa1 | b6a2faae08bbf473a5871360b126dfe1b2cb05c7 | /app/src/main/java/com/example/asimirshad/dynamic_row_entry/Model/Product_Qtn.java | 0e0e205b367e94ee5a622663e4f063354da4ce89 | [] | no_license | AsimIrshad/order_booker_app_Android | 071459deef2945504c23fe537daea683b8a49a96 | 7739e999d557baeb22d96fe5ad2d5b7aa7d93503 | refs/heads/main | 2023-07-05T16:04:56.209400 | 2021-08-29T06:47:52 | 2021-08-29T06:47:52 | 400,970,516 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 816 | java | package com.example.asimirshad.dynamic_row_entry.Model;
public class Product_Qtn {
private String Product_name;
private String qtn;
private String scheme;
public String getQtn() {
return qtn;
}
public void setQtn(String qtn) {
this.qtn = qtn;
}
public String getProduct_name() {
return Product_name;
}
public void setProduct_name(String product_name) {
Product_name = product_name;
}
public Product_Qtn() {
}
public String getScheme() {
return scheme;
}
public void setScheme(String scheme) {
this.scheme = scheme;
}
public Product_Qtn(String product_name, String qtn, String scheme) {
Product_name = product_name;
this.qtn = qtn;
this.scheme = scheme;
}
}
| [
"Asim72028@gmail.com"
] | Asim72028@gmail.com |
f14473801c575c457245564be91a3f81b7f509dc | 7e6cc1af51e33da4ccad495755a356766ddad157 | /src/main/java/sp/co/soe/emp/domain/entity/CloseStatusExample.java | d2716964cf64799304a46393db8ba1de4e76f79d | [] | no_license | ApurboRahman/spring-office-employee | eb22635575f297dcd17e690a06ea7b9a30253c3e | fe5355102b11295af5d4fb2ad82bcf1351bffec3 | refs/heads/master | 2023-05-27T10:34:07.919698 | 2021-06-11T01:49:46 | 2021-06-11T01:49:46 | 248,779,718 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 28,263 | java | package sp.co.soe.emp.domain.entity;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
public class CloseStatusExample {
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table close_status
*
* @mbg.generated Fri Apr 10 22:17:57 JST 2020
*/
protected String orderByClause;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table close_status
*
* @mbg.generated Fri Apr 10 22:17:57 JST 2020
*/
protected boolean distinct;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table close_status
*
* @mbg.generated Fri Apr 10 22:17:57 JST 2020
*/
protected List<Criteria> oredCriteria;
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table close_status
*
* @mbg.generated Fri Apr 10 22:17:57 JST 2020
*/
public CloseStatusExample() {
oredCriteria = new ArrayList<Criteria>();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table close_status
*
* @mbg.generated Fri Apr 10 22:17:57 JST 2020
*/
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table close_status
*
* @mbg.generated Fri Apr 10 22:17:57 JST 2020
*/
public String getOrderByClause() {
return orderByClause;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table close_status
*
* @mbg.generated Fri Apr 10 22:17:57 JST 2020
*/
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table close_status
*
* @mbg.generated Fri Apr 10 22:17:57 JST 2020
*/
public boolean isDistinct() {
return distinct;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table close_status
*
* @mbg.generated Fri Apr 10 22:17:57 JST 2020
*/
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table close_status
*
* @mbg.generated Fri Apr 10 22:17:57 JST 2020
*/
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table close_status
*
* @mbg.generated Fri Apr 10 22:17:57 JST 2020
*/
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table close_status
*
* @mbg.generated Fri Apr 10 22:17:57 JST 2020
*/
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table close_status
*
* @mbg.generated Fri Apr 10 22:17:57 JST 2020
*/
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table close_status
*
* @mbg.generated Fri Apr 10 22:17:57 JST 2020
*/
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table close_status
*
* @mbg.generated Fri Apr 10 22:17:57 JST 2020
*/
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
protected void addCriterionForJDBCDate(String condition, Date value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
addCriterion(condition, new java.sql.Date(value.getTime()), property);
}
protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
if (values == null || values.size() == 0) {
throw new RuntimeException("Value list for " + property + " cannot be null or empty");
}
List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
Iterator<Date> iter = values.iterator();
while (iter.hasNext()) {
dateList.add(new java.sql.Date(iter.next().getTime()));
}
addCriterion(condition, dateList, property);
}
protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
}
public Criteria andCloseDateIsNull() {
addCriterion("close_date is null");
return (Criteria) this;
}
public Criteria andCloseDateIsNotNull() {
addCriterion("close_date is not null");
return (Criteria) this;
}
public Criteria andCloseDateEqualTo(Date value) {
addCriterionForJDBCDate("close_date =", value, "closeDate");
return (Criteria) this;
}
public Criteria andCloseDateNotEqualTo(Date value) {
addCriterionForJDBCDate("close_date <>", value, "closeDate");
return (Criteria) this;
}
public Criteria andCloseDateGreaterThan(Date value) {
addCriterionForJDBCDate("close_date >", value, "closeDate");
return (Criteria) this;
}
public Criteria andCloseDateGreaterThanOrEqualTo(Date value) {
addCriterionForJDBCDate("close_date >=", value, "closeDate");
return (Criteria) this;
}
public Criteria andCloseDateLessThan(Date value) {
addCriterionForJDBCDate("close_date <", value, "closeDate");
return (Criteria) this;
}
public Criteria andCloseDateLessThanOrEqualTo(Date value) {
addCriterionForJDBCDate("close_date <=", value, "closeDate");
return (Criteria) this;
}
public Criteria andCloseDateIn(List<Date> values) {
addCriterionForJDBCDate("close_date in", values, "closeDate");
return (Criteria) this;
}
public Criteria andCloseDateNotIn(List<Date> values) {
addCriterionForJDBCDate("close_date not in", values, "closeDate");
return (Criteria) this;
}
public Criteria andCloseDateBetween(Date value1, Date value2) {
addCriterionForJDBCDate("close_date between", value1, value2, "closeDate");
return (Criteria) this;
}
public Criteria andCloseDateNotBetween(Date value1, Date value2) {
addCriterionForJDBCDate("close_date not between", value1, value2, "closeDate");
return (Criteria) this;
}
public Criteria andCloseFlagIsNull() {
addCriterion("close_flag is null");
return (Criteria) this;
}
public Criteria andCloseFlagIsNotNull() {
addCriterion("close_flag is not null");
return (Criteria) this;
}
public Criteria andCloseFlagEqualTo(Integer value) {
addCriterion("close_flag =", value, "closeFlag");
return (Criteria) this;
}
public Criteria andCloseFlagNotEqualTo(Integer value) {
addCriterion("close_flag <>", value, "closeFlag");
return (Criteria) this;
}
public Criteria andCloseFlagGreaterThan(Integer value) {
addCriterion("close_flag >", value, "closeFlag");
return (Criteria) this;
}
public Criteria andCloseFlagGreaterThanOrEqualTo(Integer value) {
addCriterion("close_flag >=", value, "closeFlag");
return (Criteria) this;
}
public Criteria andCloseFlagLessThan(Integer value) {
addCriterion("close_flag <", value, "closeFlag");
return (Criteria) this;
}
public Criteria andCloseFlagLessThanOrEqualTo(Integer value) {
addCriterion("close_flag <=", value, "closeFlag");
return (Criteria) this;
}
public Criteria andCloseFlagIn(List<Integer> values) {
addCriterion("close_flag in", values, "closeFlag");
return (Criteria) this;
}
public Criteria andCloseFlagNotIn(List<Integer> values) {
addCriterion("close_flag not in", values, "closeFlag");
return (Criteria) this;
}
public Criteria andCloseFlagBetween(Integer value1, Integer value2) {
addCriterion("close_flag between", value1, value2, "closeFlag");
return (Criteria) this;
}
public Criteria andCloseFlagNotBetween(Integer value1, Integer value2) {
addCriterion("close_flag not between", value1, value2, "closeFlag");
return (Criteria) this;
}
public Criteria andCreateUserIsNull() {
addCriterion("create_user is null");
return (Criteria) this;
}
public Criteria andCreateUserIsNotNull() {
addCriterion("create_user is not null");
return (Criteria) this;
}
public Criteria andCreateUserEqualTo(String value) {
addCriterion("create_user =", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserNotEqualTo(String value) {
addCriterion("create_user <>", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserGreaterThan(String value) {
addCriterion("create_user >", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserGreaterThanOrEqualTo(String value) {
addCriterion("create_user >=", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserLessThan(String value) {
addCriterion("create_user <", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserLessThanOrEqualTo(String value) {
addCriterion("create_user <=", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserLike(String value) {
addCriterion("create_user like", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserNotLike(String value) {
addCriterion("create_user not like", value, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserIn(List<String> values) {
addCriterion("create_user in", values, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserNotIn(List<String> values) {
addCriterion("create_user not in", values, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserBetween(String value1, String value2) {
addCriterion("create_user between", value1, value2, "createUser");
return (Criteria) this;
}
public Criteria andCreateUserNotBetween(String value1, String value2) {
addCriterion("create_user not between", value1, value2, "createUser");
return (Criteria) this;
}
public Criteria andCreateDateIsNull() {
addCriterion("create_date is null");
return (Criteria) this;
}
public Criteria andCreateDateIsNotNull() {
addCriterion("create_date is not null");
return (Criteria) this;
}
public Criteria andCreateDateEqualTo(Date value) {
addCriterion("create_date =", value, "createDate");
return (Criteria) this;
}
public Criteria andCreateDateNotEqualTo(Date value) {
addCriterion("create_date <>", value, "createDate");
return (Criteria) this;
}
public Criteria andCreateDateGreaterThan(Date value) {
addCriterion("create_date >", value, "createDate");
return (Criteria) this;
}
public Criteria andCreateDateGreaterThanOrEqualTo(Date value) {
addCriterion("create_date >=", value, "createDate");
return (Criteria) this;
}
public Criteria andCreateDateLessThan(Date value) {
addCriterion("create_date <", value, "createDate");
return (Criteria) this;
}
public Criteria andCreateDateLessThanOrEqualTo(Date value) {
addCriterion("create_date <=", value, "createDate");
return (Criteria) this;
}
public Criteria andCreateDateIn(List<Date> values) {
addCriterion("create_date in", values, "createDate");
return (Criteria) this;
}
public Criteria andCreateDateNotIn(List<Date> values) {
addCriterion("create_date not in", values, "createDate");
return (Criteria) this;
}
public Criteria andCreateDateBetween(Date value1, Date value2) {
addCriterion("create_date between", value1, value2, "createDate");
return (Criteria) this;
}
public Criteria andCreateDateNotBetween(Date value1, Date value2) {
addCriterion("create_date not between", value1, value2, "createDate");
return (Criteria) this;
}
public Criteria andCreatePgidIsNull() {
addCriterion("create_pgid is null");
return (Criteria) this;
}
public Criteria andCreatePgidIsNotNull() {
addCriterion("create_pgid is not null");
return (Criteria) this;
}
public Criteria andCreatePgidEqualTo(String value) {
addCriterion("create_pgid =", value, "createPgid");
return (Criteria) this;
}
public Criteria andCreatePgidNotEqualTo(String value) {
addCriterion("create_pgid <>", value, "createPgid");
return (Criteria) this;
}
public Criteria andCreatePgidGreaterThan(String value) {
addCriterion("create_pgid >", value, "createPgid");
return (Criteria) this;
}
public Criteria andCreatePgidGreaterThanOrEqualTo(String value) {
addCriterion("create_pgid >=", value, "createPgid");
return (Criteria) this;
}
public Criteria andCreatePgidLessThan(String value) {
addCriterion("create_pgid <", value, "createPgid");
return (Criteria) this;
}
public Criteria andCreatePgidLessThanOrEqualTo(String value) {
addCriterion("create_pgid <=", value, "createPgid");
return (Criteria) this;
}
public Criteria andCreatePgidLike(String value) {
addCriterion("create_pgid like", value, "createPgid");
return (Criteria) this;
}
public Criteria andCreatePgidNotLike(String value) {
addCriterion("create_pgid not like", value, "createPgid");
return (Criteria) this;
}
public Criteria andCreatePgidIn(List<String> values) {
addCriterion("create_pgid in", values, "createPgid");
return (Criteria) this;
}
public Criteria andCreatePgidNotIn(List<String> values) {
addCriterion("create_pgid not in", values, "createPgid");
return (Criteria) this;
}
public Criteria andCreatePgidBetween(String value1, String value2) {
addCriterion("create_pgid between", value1, value2, "createPgid");
return (Criteria) this;
}
public Criteria andCreatePgidNotBetween(String value1, String value2) {
addCriterion("create_pgid not between", value1, value2, "createPgid");
return (Criteria) this;
}
public Criteria andUpdateUserIsNull() {
addCriterion("update_user is null");
return (Criteria) this;
}
public Criteria andUpdateUserIsNotNull() {
addCriterion("update_user is not null");
return (Criteria) this;
}
public Criteria andUpdateUserEqualTo(String value) {
addCriterion("update_user =", value, "updateUser");
return (Criteria) this;
}
public Criteria andUpdateUserNotEqualTo(String value) {
addCriterion("update_user <>", value, "updateUser");
return (Criteria) this;
}
public Criteria andUpdateUserGreaterThan(String value) {
addCriterion("update_user >", value, "updateUser");
return (Criteria) this;
}
public Criteria andUpdateUserGreaterThanOrEqualTo(String value) {
addCriterion("update_user >=", value, "updateUser");
return (Criteria) this;
}
public Criteria andUpdateUserLessThan(String value) {
addCriterion("update_user <", value, "updateUser");
return (Criteria) this;
}
public Criteria andUpdateUserLessThanOrEqualTo(String value) {
addCriterion("update_user <=", value, "updateUser");
return (Criteria) this;
}
public Criteria andUpdateUserLike(String value) {
addCriterion("update_user like", value, "updateUser");
return (Criteria) this;
}
public Criteria andUpdateUserNotLike(String value) {
addCriterion("update_user not like", value, "updateUser");
return (Criteria) this;
}
public Criteria andUpdateUserIn(List<String> values) {
addCriterion("update_user in", values, "updateUser");
return (Criteria) this;
}
public Criteria andUpdateUserNotIn(List<String> values) {
addCriterion("update_user not in", values, "updateUser");
return (Criteria) this;
}
public Criteria andUpdateUserBetween(String value1, String value2) {
addCriterion("update_user between", value1, value2, "updateUser");
return (Criteria) this;
}
public Criteria andUpdateUserNotBetween(String value1, String value2) {
addCriterion("update_user not between", value1, value2, "updateUser");
return (Criteria) this;
}
public Criteria andUpdateDateIsNull() {
addCriterion("update_date is null");
return (Criteria) this;
}
public Criteria andUpdateDateIsNotNull() {
addCriterion("update_date is not null");
return (Criteria) this;
}
public Criteria andUpdateDateEqualTo(Date value) {
addCriterion("update_date =", value, "updateDate");
return (Criteria) this;
}
public Criteria andUpdateDateNotEqualTo(Date value) {
addCriterion("update_date <>", value, "updateDate");
return (Criteria) this;
}
public Criteria andUpdateDateGreaterThan(Date value) {
addCriterion("update_date >", value, "updateDate");
return (Criteria) this;
}
public Criteria andUpdateDateGreaterThanOrEqualTo(Date value) {
addCriterion("update_date >=", value, "updateDate");
return (Criteria) this;
}
public Criteria andUpdateDateLessThan(Date value) {
addCriterion("update_date <", value, "updateDate");
return (Criteria) this;
}
public Criteria andUpdateDateLessThanOrEqualTo(Date value) {
addCriterion("update_date <=", value, "updateDate");
return (Criteria) this;
}
public Criteria andUpdateDateIn(List<Date> values) {
addCriterion("update_date in", values, "updateDate");
return (Criteria) this;
}
public Criteria andUpdateDateNotIn(List<Date> values) {
addCriterion("update_date not in", values, "updateDate");
return (Criteria) this;
}
public Criteria andUpdateDateBetween(Date value1, Date value2) {
addCriterion("update_date between", value1, value2, "updateDate");
return (Criteria) this;
}
public Criteria andUpdateDateNotBetween(Date value1, Date value2) {
addCriterion("update_date not between", value1, value2, "updateDate");
return (Criteria) this;
}
public Criteria andUpdatePgidIsNull() {
addCriterion("update_pgid is null");
return (Criteria) this;
}
public Criteria andUpdatePgidIsNotNull() {
addCriterion("update_pgid is not null");
return (Criteria) this;
}
public Criteria andUpdatePgidEqualTo(String value) {
addCriterion("update_pgid =", value, "updatePgid");
return (Criteria) this;
}
public Criteria andUpdatePgidNotEqualTo(String value) {
addCriterion("update_pgid <>", value, "updatePgid");
return (Criteria) this;
}
public Criteria andUpdatePgidGreaterThan(String value) {
addCriterion("update_pgid >", value, "updatePgid");
return (Criteria) this;
}
public Criteria andUpdatePgidGreaterThanOrEqualTo(String value) {
addCriterion("update_pgid >=", value, "updatePgid");
return (Criteria) this;
}
public Criteria andUpdatePgidLessThan(String value) {
addCriterion("update_pgid <", value, "updatePgid");
return (Criteria) this;
}
public Criteria andUpdatePgidLessThanOrEqualTo(String value) {
addCriterion("update_pgid <=", value, "updatePgid");
return (Criteria) this;
}
public Criteria andUpdatePgidLike(String value) {
addCriterion("update_pgid like", value, "updatePgid");
return (Criteria) this;
}
public Criteria andUpdatePgidNotLike(String value) {
addCriterion("update_pgid not like", value, "updatePgid");
return (Criteria) this;
}
public Criteria andUpdatePgidIn(List<String> values) {
addCriterion("update_pgid in", values, "updatePgid");
return (Criteria) this;
}
public Criteria andUpdatePgidNotIn(List<String> values) {
addCriterion("update_pgid not in", values, "updatePgid");
return (Criteria) this;
}
public Criteria andUpdatePgidBetween(String value1, String value2) {
addCriterion("update_pgid between", value1, value2, "updatePgid");
return (Criteria) this;
}
public Criteria andUpdatePgidNotBetween(String value1, String value2) {
addCriterion("update_pgid not between", value1, value2, "updatePgid");
return (Criteria) this;
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table close_status
*
* @mbg.generated do_not_delete_during_merge Fri Apr 10 22:17:57 JST 2020
*/
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
/**
* This class was generated by MyBatis Generator.
* This class corresponds to the database table close_status
*
* @mbg.generated Fri Apr 10 22:17:57 JST 2020
*/
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
} | [
"abdur.rahman@bjitgroup.com"
] | abdur.rahman@bjitgroup.com |
2d7a702ebb7dd3bf27f6e23df9c1007a77a6d335 | 065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be | /eclipsejdt_cluster/21192/src_0.java | b62b0f2917b98f077735f13edc903f78c2143432 | [] | no_license | martinezmatias/GenPat-data-C3 | 63cfe27efee2946831139747e6c20cf952f1d6f6 | b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4 | refs/heads/master | 2022-04-25T17:59:03.905613 | 2020-04-15T14:41:34 | 2020-04-15T14:41:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 19,460 | java | /*******************************************************************************
* Copyright (c) 2000, 2001, 2002 International Business Machines Corp. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v0.5
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v05.html
*
* Contributors:
* IBM Corporation - initial API and implementation
******************************************************************************/
package org.eclipse.jdt.internal.core;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IMarker;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jdt.core.*;
import org.eclipse.jdt.core.compiler.IProblem;
import org.eclipse.jdt.internal.codeassist.CompletionEngine;
import org.eclipse.jdt.internal.codeassist.ISearchableNameEnvironment;
import org.eclipse.jdt.internal.codeassist.ISelectionRequestor;
import org.eclipse.jdt.internal.codeassist.SelectionEngine;
/**
* Abstract class for implementations of java elements which are IOpenable.
*
* @see IJavaElement
* @see IOpenable
*/
public abstract class Openable extends JavaElement implements IOpenable, IBufferChangedListener {
protected Openable(int type, IJavaElement parent, String name) {
super(type, parent, name);
}
/**
* The buffer associated with this element has changed. Registers
* this element as being out of synch with its buffer's contents.
* If the buffer has been closed, this element is set as NOT out of
* synch with the contents.
*
* @see IBufferChangedListener
*/
public void bufferChanged(BufferChangedEvent event) {
if (event.getBuffer().isClosed()) {
JavaModelManager.getJavaModelManager().getElementsOutOfSynchWithBuffers().remove(this);
getBufferManager().removeBuffer(event.getBuffer());
} else {
JavaModelManager.getJavaModelManager().getElementsOutOfSynchWithBuffers().put(this, this);
}
}
/**
* Updates the info objects for this element and all of its children by
* removing the current infos, generating new infos, and then placing
* the new infos into the Java Model cache tables.
*/
protected void buildStructure(OpenableElementInfo info, IProgressMonitor monitor) throws JavaModelException {
if (monitor != null && monitor.isCanceled()) return;
// remove existing (old) infos
removeInfo();
HashMap newElements = new HashMap(11);
info.setIsStructureKnown(generateInfos(info, monitor, newElements, getResource()));
JavaModelManager.getJavaModelManager().getElementsOutOfSynchWithBuffers().remove(this);
for (Iterator iter = newElements.keySet().iterator(); iter.hasNext();) {
IJavaElement key = (IJavaElement) iter.next();
Object value = newElements.get(key);
JavaModelManager.getJavaModelManager().putInfo(key, value);
}
// add the info for this at the end, to ensure that a getInfo cannot reply null in case the LRU cache needs
// to be flushed. Might lead to performance issues.
// see PR 1G2K5S7: ITPJCORE:ALL - NPE when accessing source for a binary type
JavaModelManager.getJavaModelManager().putInfo(this, info);
}
/**
* Close the buffer associated with this element, if any.
*/
protected void closeBuffer(OpenableElementInfo info) {
if (!hasBuffer()) return; // nothing to do
IBuffer buffer = null;
buffer = getBufferManager().getBuffer(this);
if (buffer != null) {
buffer.close();
buffer.removeBufferChangedListener(this);
}
}
/**
* This element is being closed. Do any necessary cleanup.
*/
protected void closing(Object info) throws JavaModelException {
OpenableElementInfo openableInfo = (OpenableElementInfo) info;
closeBuffer(openableInfo);
super.closing(info);
}
/**
* @see ICodeAssist
*/
protected void codeComplete(org.eclipse.jdt.internal.compiler.env.ICompilationUnit cu, org.eclipse.jdt.internal.compiler.env.ICompilationUnit unitToSkip, int position, ICompletionRequestor requestor) throws JavaModelException {
if (requestor == null) {
throw new IllegalArgumentException(Util.bind("codeAssist.nullRequestor")); //$NON-NLS-1$
}
IBuffer buffer = getBuffer();
if (buffer == null) {
return;
}
if (position < -1 || position > buffer.getLength()) {
throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.INDEX_OUT_OF_BOUNDS));
}
JavaProject project = (JavaProject) getJavaProject();
SearchableEnvironment environment = (SearchableEnvironment) project.getSearchableNameEnvironment();
NameLookup nameLookup = project.getNameLookup();
environment.unitToSkip = unitToSkip;
CompletionEngine engine = new CompletionEngine(environment, new CompletionRequestorWrapper(requestor,nameLookup), project.getOptions(true), project);
engine.complete(cu, position, 0);
environment.unitToSkip = null;
}
/**
* @see ICodeAssist
*/
protected IJavaElement[] codeSelect(org.eclipse.jdt.internal.compiler.env.ICompilationUnit cu, int offset, int length) throws JavaModelException {
SelectionRequestor requestor= new SelectionRequestor(((JavaProject)getJavaProject()).getNameLookup(), this);
this.codeSelect(cu, offset, length, requestor);
return requestor.getElements();
}
/**
* @see ICodeAssist
*/
protected void codeSelect(org.eclipse.jdt.internal.compiler.env.ICompilationUnit cu, int offset, int length, ISelectionRequestor requestor) throws JavaModelException {
IBuffer buffer = getBuffer();
if (buffer == null) {
return;
}
int end= buffer.getLength();
if (offset < 0 || length < 0 || offset + length > end ) {
throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.INDEX_OUT_OF_BOUNDS));
}
// fix for 1FVGGKF
JavaProject project = (JavaProject)getJavaProject();
ISearchableNameEnvironment environment = project.getSearchableNameEnvironment();
// fix for 1FVXGDK
SelectionEngine engine = new SelectionEngine(environment, requestor, project.getOptions(true));
engine.select(cu, offset, offset + length - 1);
}
/**
* Returns a new element info for this element.
*/
protected OpenableElementInfo createElementInfo() {
return new OpenableElementInfo();
}
/**
* Builds this element's structure and properties in the given
* info object, based on this element's current contents (i.e. buffer
* contents if this element has an open buffer, or resource contents
* if this element does not have an open buffer). Children
* are placed in the given newElements table (note, this element
* has already been placed in the newElements table). Returns true
* if successful, or false if an error is encountered while determining
* the structure of this element.
*/
protected abstract boolean generateInfos(OpenableElementInfo info, IProgressMonitor pm, Map newElements, IResource underlyingResource) throws JavaModelException;
/**
* Note: a buffer with no unsaved changes can be closed by the Java Model
* since it has a finite number of buffers allowed open at one time. If this
* is the first time a request is being made for the buffer, an attempt is
* made to create and fill this element's buffer. If the buffer has been
* closed since it was first opened, the buffer is re-created.
*
* @see IOpenable
*/
public IBuffer getBuffer() throws JavaModelException {
if (hasBuffer()) {
// ensure element is open
if (!isOpen()) {
getElementInfo();
}
IBuffer buffer = getBufferManager().getBuffer(this);
if (buffer == null) {
// try to (re)open a buffer
buffer = openBuffer(null);
}
return buffer;
} else {
return null;
}
}
/**
* Answers the buffer factory to use for creating new buffers
*/
public IBufferFactory getBufferFactory(){
return getBufferManager().getDefaultBufferFactory();
}
/**
* Returns the buffer manager for this element.
*/
protected BufferManager getBufferManager() {
return BufferManager.getDefaultBufferManager();
}
/**
* Return my underlying resource. Elements that may not have a
* corresponding resource must override this method.
*
* @see IJavaElement
*/
public IResource getCorrespondingResource() throws JavaModelException {
return getUnderlyingResource();
}
/*
* @see IJavaElement
*/
public IOpenable getOpenable() {
return this;
}
/**
* @see IJavaElement
*/
public IResource getUnderlyingResource() throws JavaModelException {
IResource parentResource = fParent.getUnderlyingResource();
if (parentResource == null) {
return null;
}
int type = parentResource.getType();
if (type == IResource.FOLDER || type == IResource.PROJECT) {
IContainer folder = (IContainer) parentResource;
IResource resource = folder.findMember(fName);
if (resource == null) {
throw newNotPresentException();
} else {
return resource;
}
} else {
return parentResource;
}
}
public boolean exists() {
IPackageFragmentRoot root = this.getPackageFragmentRoot();
if (root == null || root == this || !root.isArchive()) {
return parentExists() && resourceExists();
} else {
return super.exists();
}
}
/**
* Returns true if this element may have an associated source buffer,
* otherwise false. Subclasses must override as required.
*/
protected boolean hasBuffer() {
return false;
}
/**
* @see IParent
*/
public boolean hasChildren() throws JavaModelException {
return getChildren().length > 0;
}
/**
* @see IOpenable
*/
public boolean hasUnsavedChanges() throws JavaModelException{
if (isReadOnly() || !isOpen()) {
return false;
}
IBuffer buf = this.getBuffer();
if (buf != null && buf.hasUnsavedChanges()) {
return true;
}
// for package fragments, package fragment roots, and projects must check open buffers
// to see if they have an child with unsaved changes
if (fLEType == PACKAGE_FRAGMENT ||
fLEType == PACKAGE_FRAGMENT_ROOT ||
fLEType == JAVA_PROJECT ||
fLEType == JAVA_MODEL) { // fix for 1FWNMHH
Enumeration openBuffers= getBufferManager().getOpenBuffers();
while (openBuffers.hasMoreElements()) {
IBuffer buffer= (IBuffer)openBuffers.nextElement();
if (buffer.hasUnsavedChanges()) {
IJavaElement owner= (IJavaElement)buffer.getOwner();
if (isAncestorOf(owner)) {
return true;
}
}
}
}
return false;
}
/**
* Subclasses must override as required.
*
* @see IOpenable
*/
public boolean isConsistent() throws JavaModelException {
return true;
}
/**
*
* @see IOpenable
*/
public boolean isOpen() {
synchronized(JavaModelManager.getJavaModelManager()){
return JavaModelManager.getJavaModelManager().getInfo(this) != null;
}
}
/**
* Returns true if this represents a source element.
* Openable source elements have an associated buffer created
* when they are opened.
*/
protected boolean isSourceElement() {
return false;
}
/**
* @see IOpenable
*/
public void makeConsistent(IProgressMonitor pm) throws JavaModelException {
if (!isConsistent()) {
buildStructure((OpenableElementInfo)getElementInfo(), pm);
}
}
/**
* @see IOpenable
*/
public void open(IProgressMonitor pm) throws JavaModelException {
if (!isOpen()) {
// TODO: need to synchronize (IOpenable.open(IProgressMonitor) is API
// TODO: could use getElementInfo instead
this.openWhenClosed(pm);
}
}
/**
* Opens a buffer on the contents of this element, and returns
* the buffer, or returns <code>null</code> if opening fails.
* By default, do nothing - subclasses that have buffers
* must override as required.
*/
protected IBuffer openBuffer(IProgressMonitor pm) throws JavaModelException {
return null;
}
/**
* Open the parent element if necessary
*
*/
protected void openParent(IProgressMonitor pm) throws JavaModelException {
Openable openableParent = (Openable)getOpenableParent();
if (openableParent != null) {
if (!openableParent.isOpen()){
openableParent.openWhenClosed(pm);
}
}
}
/**
* Open an <code>Openable</code> that is known to be closed (no check for <code>isOpen()</code>).
*/
protected void openWhenClosed(IProgressMonitor pm) throws JavaModelException {
try {
if (JavaModelManager.VERBOSE){
System.out.println("OPENING Element ("+ Thread.currentThread()+"): " + this.toStringWithAncestors()); //$NON-NLS-1$//$NON-NLS-2$
}
// 1) Parent must be open - open the parent if necessary
openParent(pm);
// 2) create the new element info and open a buffer if needed
OpenableElementInfo info = createElementInfo();
if (isSourceElement()) {
this.openBuffer(pm);
}
// 3) build the structure of the openable
buildStructure(info, pm);
// 4) anything special
opening(info);
if (JavaModelManager.VERBOSE) {
System.out.println("-> Package cache size = " + JavaModelManager.getJavaModelManager().cache.pkgSize()); //$NON-NLS-1$
System.out.println("-> Openable cache filling ratio = " + JavaModelManager.getJavaModelManager().cache.openableFillingRatio() + "%"); //$NON-NLS-1$//$NON-NLS-2$
}
// if any problems occuring openning the element, ensure that it's info
// does not remain in the cache (some elements, pre-cache their info
// as they are being opened).
} catch (JavaModelException e) {
JavaModelManager.getJavaModelManager().removeInfo(this);
throw e;
}
}
/**
* Answers true if the parent exists (null parent is answering true)
*
*/
protected boolean parentExists(){
IJavaElement parent = this.getParent();
if (parent == null) return true;
return parent.exists();
}
/**
* Returns whether the corresponding resource or associated file exists
*/
protected boolean resourceExists() {
return
JavaModel.getTarget(
ResourcesPlugin.getWorkspace().getRoot(),
this.getPath().makeRelative(), // ensure path is relative (see http://dev.eclipse.org/bugs/show_bug.cgi?id=22517)
true) != null;
}
/**
* @see IOpenable
*/
public void save(IProgressMonitor pm, boolean force) throws JavaModelException {
if (isReadOnly() || this.getResource().isReadOnly()) {
throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.READ_ONLY, this));
}
IBuffer buf = getBuffer();
if (buf != null) { // some Openables (like a JavaProject) don't have a buffer
buf.save(pm, force);
this.makeConsistent(pm); // update the element info of this element
}
}
/**
* Find enclosing package fragment root if any
*/
public PackageFragmentRoot getPackageFragmentRoot() {
IJavaElement current = this;
do {
if (current instanceof PackageFragmentRoot) return (PackageFragmentRoot)current;
current = current.getParent();
} while(current != null);
return null;
}
/**
* @see ICodeAssist
* @deprecated - use codeComplete(ICompilationUnit, ICompilationUnit, int, ICompletionRequestor) instead
*/
protected void codeComplete(org.eclipse.jdt.internal.compiler.env.ICompilationUnit cu, org.eclipse.jdt.internal.compiler.env.ICompilationUnit unitToSkip, int position, final ICodeCompletionRequestor requestor) throws JavaModelException {
if (requestor == null){
codeComplete(cu, unitToSkip, position, (ICompletionRequestor)null);
return;
}
codeComplete(
cu,
unitToSkip,
position,
new ICompletionRequestor(){
public void acceptAnonymousType(char[] superTypePackageName,char[] superTypeName,char[][] parameterPackageNames,char[][] parameterTypeNames,char[][] parameterNames,char[] completionName,int modifiers,int completionStart,int completionEnd, int relevance) {
}
public void acceptClass(char[] packageName, char[] className, char[] completionName, int modifiers, int completionStart, int completionEnd, int relevance) {
requestor.acceptClass(packageName, className, completionName, modifiers, completionStart, completionEnd);
}
public void acceptError(IProblem error) {
if (true) return; // was disabled in 1.0
try {
IMarker marker = ResourcesPlugin.getWorkspace().getRoot().createMarker(IJavaModelMarker.TRANSIENT_PROBLEM);
marker.setAttribute(IJavaModelMarker.ID, error.getID());
marker.setAttribute(IMarker.CHAR_START, error.getSourceStart());
marker.setAttribute(IMarker.CHAR_END, error.getSourceEnd() + 1);
marker.setAttribute(IMarker.LINE_NUMBER, error.getSourceLineNumber());
marker.setAttribute(IMarker.MESSAGE, error.getMessage());
marker.setAttribute(IMarker.SEVERITY, IMarker.SEVERITY_ERROR);
requestor.acceptError(marker);
} catch(CoreException e){
}
}
public void acceptField(char[] declaringTypePackageName, char[] declaringTypeName, char[] name, char[] typePackageName, char[] typeName, char[] completionName, int modifiers, int completionStart, int completionEnd, int relevance) {
requestor.acceptField(declaringTypePackageName, declaringTypeName, name, typePackageName, typeName, completionName, modifiers, completionStart, completionEnd);
}
public void acceptInterface(char[] packageName,char[] interfaceName,char[] completionName,int modifiers,int completionStart,int completionEnd, int relevance) {
requestor.acceptInterface(packageName, interfaceName, completionName, modifiers, completionStart, completionEnd);
}
public void acceptKeyword(char[] keywordName,int completionStart,int completionEnd, int relevance){
requestor.acceptKeyword(keywordName, completionStart, completionEnd);
}
public void acceptLabel(char[] labelName,int completionStart,int completionEnd, int relevance){
requestor.acceptLabel(labelName, completionStart, completionEnd);
}
public void acceptLocalVariable(char[] name,char[] typePackageName,char[] typeName,int modifiers,int completionStart,int completionEnd, int relevance){
// ignore
}
public void acceptMethod(char[] declaringTypePackageName,char[] declaringTypeName,char[] selector,char[][] parameterPackageNames,char[][] parameterTypeNames,char[][] parameterNames,char[] returnTypePackageName,char[] returnTypeName,char[] completionName,int modifiers,int completionStart,int completionEnd, int relevance){
// skip parameter names
requestor.acceptMethod(declaringTypePackageName, declaringTypeName, selector, parameterPackageNames, parameterTypeNames, returnTypePackageName, returnTypeName, completionName, modifiers, completionStart, completionEnd);
}
public void acceptMethodDeclaration(char[] declaringTypePackageName,char[] declaringTypeName,char[] selector,char[][] parameterPackageNames,char[][] parameterTypeNames,char[][] parameterNames,char[] returnTypePackageName,char[] returnTypeName,char[] completionName,int modifiers,int completionStart,int completionEnd, int relevance){
// ignore
}
public void acceptModifier(char[] modifierName,int completionStart,int completionEnd, int relevance){
requestor.acceptModifier(modifierName, completionStart, completionEnd);
}
public void acceptPackage(char[] packageName,char[] completionName,int completionStart,int completionEnd, int relevance){
requestor.acceptPackage(packageName, completionName, completionStart, completionEnd);
}
public void acceptType(char[] packageName,char[] typeName,char[] completionName,int completionStart,int completionEnd, int relevance){
requestor.acceptType(packageName, typeName, completionName, completionStart, completionEnd);
}
public void acceptVariableName(char[] typePackageName,char[] typeName,char[] name,char[] completionName,int completionStart,int completionEnd, int relevance){
// ignore
}
});
}
}
| [
"375833274@qq.com"
] | 375833274@qq.com |
1e8db803a914b529d420403534cf4dcba65765d9 | d2314f23868a3429177e3a94787604deb08c57fa | /mvplibrary/src/main/java/com/wxq/mvplibrary/repository/IRepositoryManager.java | 8c6ead0aa8089b0216866dfc51827b44c46b4c0b | [] | no_license | Zhhang2016/DevopTools | 7c227150aaed376bd024d006b49837b1647f368a | 81fa9faa7fc0cf6d85d8972cc42a52b746b9d187 | refs/heads/master | 2020-04-01T00:44:19.892595 | 2018-10-12T07:08:12 | 2018-10-12T07:08:12 | 152,711,025 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 393 | java | package com.wxq.mvplibrary.repository;
import org.greenrobot.greendao.AbstractDaoSession;
/**
* Created by COOTEK on 2017/7/31.
*/
public interface IRepositoryManager<D extends AbstractDaoSession> {
<T> T getApi(Class<T> retrofitClass);
<T> void clearApi(Class<T> retrofitClass);
D getDaoSession();
void clearAllCache();
// DaoSession getDaoSession();
}
| [
"805380422@qq.com"
] | 805380422@qq.com |
8bc0875bd61f2b9ffc786add76da8b889fb58e5a | e0fb6267f93100ddab09c3cfbd2365858f2f4e7c | /src/main/java/com/cn/dao/ICustomerMessageDao.java | 20584c005a04a528d18a5d5e9b37bc062e3745e0 | [] | no_license | erbaocui/ecapi | 22fb56f8d294b51303ccb6f651a727629f61ca9d | 0b5a1c0a08ef9f60d696de75bc0e5ee5c40de631 | refs/heads/master | 2021-09-01T05:20:25.860811 | 2017-12-25T02:44:36 | 2017-12-25T02:44:36 | 108,109,764 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 539 | java | package com.cn.dao;
import com.cn.model.CustomerMessage;
import java.util.List;
/**
* Created by home on 2017/7/2.
*/
public interface ICustomerMessageDao {
public List<CustomerMessage> pageList(CustomerMessage customerMessage);
public int count(CustomerMessage customerMessage);
public void insert(CustomerMessage customerMessage);
public void update(CustomerMessage customerMessage);
public CustomerMessage find(CustomerMessage customerMessage);
public void delete(CustomerMessage customerMessage);
} | [
"cuijiapeng@gmail.com"
] | cuijiapeng@gmail.com |
0ee77a85f61d17a92021185cb93499ad0e4e6168 | cd733503931083b01b4cea4a3a088b86b80bacd7 | /gn-core-utils/src/main/java/com/direct/gn/result/SingleResult.java | 91a49462a54f236d6562ce51c927480386a74a26 | [] | no_license | xukejia/mlhk | 9c510da675457b5f7c4e12e534f46a58e3c96d2e | b5f152da6ad11fc10efb0f572f648fcabfcf2e0c | refs/heads/master | 2020-05-20T04:14:43.168929 | 2019-05-07T10:21:36 | 2019-05-07T10:21:36 | 185,377,418 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 954 | java | package com.direct.gn.result;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
public class SingleResult<T> extends Result {
/**
*
*/
private static final long serialVersionUID = -3284587087945229723L;
private T result;
public SingleResult(boolean isSuccess, String errorCode, String errorHint, T result) {
super(isSuccess, errorCode, errorHint);
this.result = result;
}
public SingleResult(boolean isSuccess, T result) {
super(isSuccess);
this.result = result;
}
public SingleResult() {
super(false);
}
public T getResult() {
return result;
}
public void setResult(T result) {
this.result = result;
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
}
}
| [
"1048655386@qq.com"
] | 1048655386@qq.com |
3bc7ddc5527f0a91b0f25241278603e3bd2dd842 | 2b9d4bc63f932d07fd74f1c05335749f24c1ae55 | /nics/src/main/java/edu/mit/ll/nics/android/di/WorkModule.java | 726fb84e7ac19611e5d0b73f7691c75963683aa8 | [] | no_license | generation-nyx/nics-android | 3c9dea77504050f8d335c6e6a94e652bea7e29cf | d9838fecddd9741bdb88cc6f1eb6bddaa8c1650e | refs/heads/main | 2023-08-11T06:10:27.733604 | 2021-09-30T19:35:18 | 2021-09-30T19:35:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,170 | java | /*
* Copyright (c) 2008-2021, Massachusetts Institute of Technology (MIT)
* 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.
*
* 3. Neither the name of the copyright holder nor the names of its contributors
* may be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "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 THE COPYRIGHT HOLDER 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.
*/
package edu.mit.ll.nics.android.di;
import android.content.Context;
import androidx.work.WorkManager;
import javax.inject.Singleton;
import dagger.Module;
import dagger.Provides;
import dagger.hilt.InstallIn;
import dagger.hilt.android.qualifiers.ApplicationContext;
import dagger.hilt.components.SingletonComponent;
@Module
@InstallIn(SingletonComponent.class)
public class WorkModule {
@Provides
@Singleton
public static WorkManager provideWorkManager(@ApplicationContext Context context) {
return WorkManager.getInstance(context);
}
}
| [
"hadr.ll@gmail.com"
] | hadr.ll@gmail.com |
70784d158ba0874fab6ca3ee8ed2533e4bb8770b | 37d9cd0fdc911754c6e1dad9caa9a9151cfd5af5 | /src/main/java/es/jclm/cs/rarasclm/controller/RegeneraPasswordController.java | 8dfa4b0300873fd9b0ef49641fbbd66e6ea826a0 | [] | no_license | ricortegal/rarasclm | 8bbeb943c495f033605630229b32be673f90df00 | 33422042bc39593b347b371a17db9e31fbfc0c16 | refs/heads/master | 2021-01-12T07:48:56.866826 | 2017-03-22T08:54:04 | 2017-03-22T08:54:04 | 77,025,830 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,814 | java | package es.jclm.cs.rarasclm.controller;
import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.crypto.bcrypt.BCrypt;
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 es.jclm.cs.rarasclm.entities.IBaseModel;
import es.jclm.cs.rarasclm.entities.MensajeResultado;
import es.jclm.cs.rarasclm.entities.MensajeTipo;
import es.jclm.cs.rarasclm.entities.UserRarasClm;
import es.jclm.cs.rarasclm.service.ServiceRarasCLMException;
import es.jclm.cs.rarasclm.service.UsuarioService;
@Controller
@RequestMapping("/regenerapass")
public class RegeneraPasswordController extends BaseController{
@Autowired
HttpServletRequest request;
// @Autowired
// HttpServletResponse response;
@Autowired
UsuarioService usuarioService;
private static final Logger log = LoggerFactory.getLogger(RegeneraPasswordController.class);
@RequestMapping(method = RequestMethod.GET)
public String busquedaGet(Model model) {
MensajeResultado mensaje = new MensajeResultado();
UserRarasClm userClm = (UserRarasClm)request.getSession().getAttribute("userCLM");
if(userClm.getGenerar()) {
mensaje.setMensaje("Tiene que cambiar su contraseña personal para habilitar la cuenta.");
mensaje.setTipo(MensajeTipo.WARNING);
IBaseModel baseModel = (IBaseModel)model.asMap().get("baseModel");
baseModel.setMensaje(mensaje);
}
//request.getSession().setAttribute("mensaje",mensaje);
return "regenera-password";
}
@RequestMapping(method = RequestMethod.POST)
public String busquedaPost(Model model) {
String password1 = request.getParameter("password1");
String password2 = request.getParameter("password2");
UserRarasClm userClm = (UserRarasClm) request.getSession().getAttribute("userCLM");
try {
if (password1.equals(password2)) {
UserRarasClm userClmPersistencia = usuarioService.Buscar(userClm.getUsername());
userClmPersistencia.setPassword(BCrypt.hashpw(password1, BCrypt.gensalt()));
userClmPersistencia.setGenerar(false);
usuarioService.Actualizar(userClmPersistencia);
request.getSession().setAttribute("userCLM", userClmPersistencia);
return "redirect:/";
}
} catch (ServiceRarasCLMException ex) {
MensajeResultado mensaje = new MensajeResultado();
mensaje.setMensaje(ex.getMessage());
mensaje.setTipo(MensajeTipo.ERROR);
request.getSession().setAttribute("mensaje", mensaje);
log.error(ex.getMessage());
}
return "redirect:/regenera-password";
}
}
| [
"Ricardo Ortega Galiana"
] | Ricardo Ortega Galiana |
941b5363e667bba35d7f0f23829a4445a2c3caad | 26bf12d303a853a869de0722153ebbf6dbd33bc8 | /app/src/androidTest/java/com/example/getfitv30/ExampleInstrumentedTest.java | b22f4b0fa362d585db5a1f71381045cdd042198c | [] | no_license | mateusArnaudGoldbarg/getfitv3.0 | 435abcaf16d487e5101bb30576288d404a5b964d | 94030c2d3947b0537eb40953947cf8faadfd3752 | refs/heads/master | 2023-04-02T01:38:32.494405 | 2021-04-05T12:35:18 | 2021-04-05T12:35:18 | 354,794,747 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 781 | java | package com.example.getfitv30;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.example.getfitv30", appContext.getPackageName());
}
} | [
"mateusarnaud@hotmail.com"
] | mateusarnaud@hotmail.com |
4a1d58c0d3c512e9e830d871ca6b97a1e2700543 | ba0b7255586c6cfe0f5bdefc5a29589c5c28fe51 | /gestion-donnees-complexes/Projet/src/neo4J/csv/ReadCSV_Regions.java | 1dc608972822b6e0548db3d43f006ecbcc216463 | [] | no_license | zayres/Master2-AIGLE | 5a2196d0450c33819c09ba8ca3e1d73a24eb95cf | b9ec915efcf204fa8fadfebd8fe5de1c0c5736bf | refs/heads/master | 2021-01-22T06:53:49.571849 | 2014-03-11T08:47:29 | 2014-03-11T08:47:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,525 | java | package neo4J.csv;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
public class ReadCSV_Regions {
public static void main(String[] args) {
ReadCSV_Regions obj = new ReadCSV_Regions();
//obj.run();
}
public static ArrayList<String[]> run() {
String csvFile = "region.csv";
BufferedReader br = null;
String line = "";
String cvsSplitBy = "\t";
ArrayList <String[]> listdep = new ArrayList<String[]>();
try {
System.out.println("start reading");
br = new BufferedReader(new FileReader(csvFile));
while ((line = br.readLine()) != null) {
// use comma as separator
String[] depsplitter = line.split(cvsSplitBy);
listdep.add(depsplitter);
/*System.out.println("Commune [CDC= " + country[0]
+ " , CHEFLIEU=" + country[1] +
" , REG=" + country[2]+
" , DEP=" + country[3]+
" , COM=" + country[4]+
" , AR= " + country[5]+
" , CT= " + country[6]+
" , TNCC= " + country[7]+
" , ARTMAJ= " + country[8]+
" , NCC= " + country[9]+
" , ARTMIN= " + country[10]+
" , NCCENR= " + country[11]+
"]");*/
}
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
if (br != null) {
try {
br.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
System.out.println("Done");
return listdep;
}
} | [
"gilles.entringer@gmail.com"
] | gilles.entringer@gmail.com |
8af3f271b499751bb501a915cb910808a492b7f3 | 367ffca517dca9d3821143928ea93311500ce5f3 | /src/main/java/jhipster/mongo/web/rest/ProfileInfoResource.java | e8ab1f231dc534355f0c41e08ad847029fe1d379 | [] | no_license | BulkSecurityGeneratorProject/JhipsterTasks-MongoDB | 3f246dffd841eada122b465b71fa2c2cecb5d704 | f4e76b12b948b9ce04edd0d1d6b2972b1dbb15a5 | refs/heads/master | 2022-12-15T21:33:48.040889 | 2018-06-10T15:44:12 | 2018-06-10T15:44:12 | 296,590,107 | 0 | 0 | null | 2020-09-18T10:32:59 | 2020-09-18T10:32:58 | null | UTF-8 | Java | false | false | 2,029 | java | package jhipster.mongo.web.rest;
import jhipster.mongo.config.DefaultProfileUtil;
import io.github.jhipster.config.JHipsterProperties;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* Resource to return information about the currently running Spring profiles.
*/
@RestController
@RequestMapping("/api")
public class ProfileInfoResource {
private final Environment env;
private final JHipsterProperties jHipsterProperties;
public ProfileInfoResource(Environment env, JHipsterProperties jHipsterProperties) {
this.env = env;
this.jHipsterProperties = jHipsterProperties;
}
@GetMapping("/profile-info")
public ProfileInfoVM getActiveProfiles() {
String[] activeProfiles = DefaultProfileUtil.getActiveProfiles(env);
return new ProfileInfoVM(activeProfiles, getRibbonEnv(activeProfiles));
}
private String getRibbonEnv(String[] activeProfiles) {
String[] displayOnActiveProfiles = jHipsterProperties.getRibbon().getDisplayOnActiveProfiles();
if (displayOnActiveProfiles == null) {
return null;
}
List<String> ribbonProfiles = new ArrayList<>(Arrays.asList(displayOnActiveProfiles));
List<String> springBootProfiles = Arrays.asList(activeProfiles);
ribbonProfiles.retainAll(springBootProfiles);
if (!ribbonProfiles.isEmpty()) {
return ribbonProfiles.get(0);
}
return null;
}
class ProfileInfoVM {
private String[] activeProfiles;
private String ribbonEnv;
ProfileInfoVM(String[] activeProfiles, String ribbonEnv) {
this.activeProfiles = activeProfiles;
this.ribbonEnv = ribbonEnv;
}
public String[] getActiveProfiles() {
return activeProfiles;
}
public String getRibbonEnv() {
return ribbonEnv;
}
}
}
| [
"kevinneag@Kevins-MacBook-Pro.local"
] | kevinneag@Kevins-MacBook-Pro.local |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.