Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
public String errMessage;
private AccountBalance balance;
private boolean isError(byte status) {}
public class Account {}public class Account {
private double balance;
public double getBalance() {
return balance;
}
public void setBalance(double balance) {
this.balance = balance;
}
}Cart cart = new Cart();
cart.addItem(new Item("Клавиатура", 2000));public class Cart {
private Item[] stack; // массив для реализации стека
private int topIndex; // указатель на вершину стека
// При создании корзины мы должны
// указать максимальное количество элементов
// в корзине
public Cart(int capacity) {
stack = new Item[capacity];
topIndex = -1;
}
// Добавление нового товара в корзину
public boolean addItem(Item item) {
return push(item);
}
// Приватный метод, который реализует добавление в стек
private boolean push (Item item) {
// Добавляем товар в стек
return true; // или false если не стек переполнен
}
// Удаление последнего добавленного товара в корзину
public Item deleteLastAddedItem() {
return pop();
}
// Приватный метод, который реализует извлечение из стека
private Item pop() {
return new Item(); // Извлеченный из стека товар
}
}Cart cart = new Cart();
cart.addItem(new Item("Клавиатура", 2000));
// Данная инструкция вызовет ошибку компиляции
cart.topIndex = 4;public class NameSorter implements Comparator {
@Override
public int compare(Object o1, Object o2) {
if (o1 instanceof Student && o2 instanceof Student) {
Student s1 = (Student) o1;
Student s2 = (Student) o2;
return s1.getName().compareTo(s2.getName());
}
return 0;
}
}class MyClass {
public void foo() {
// ... код
}
public void foo(String s) {
// ... код
}
}// ДАННЫЙ КОД ВЫЗОВЕТ ОШИБКУ КОМПИЛЯЦИИ!
class MyClass {
public int foo() {
return 0;
}
public double foo() {
return 0;
}
}class MyClass {
public MyClass() {
// какой-то код
}
public MyClass(int arg0) {
// какой-то код
}
public MyClass (int arg0, String arg1) {
// какой-то код
}
}class MyClass {
public MyClass() {
// Вызываем конструктор MyClass(int arg0)
this(0);
}
public MyClass(int arg0) {
// Вызываем конструктор MyClass (int arg0, String arg1)
this(arg0, " ");
}
public MyClass(int arg0, String arg1) {
// какой-то код
}
}distanceFromOrigin() должны учитывать координату z и возвращать расстояние по формуле .
spring:
jpa:
database: POSTGRESQL
show-sql: true
hibernate:
ddl-auto: create-drop
properties:
hibernate:
dialect: org.hibernate.dialect.PostgreSQLDialect
datasource:
platform: postgres
url: jdbc:postgresql://ec2-176-34-183-20.eu-west-1.compute.amazonaws.com:5432/d60ukqmkatvcpg
username: xvlmxbawwxafdu
password: a1439fbcffbfdd6ad208df91670a37c73d8ed12d18cd6de91c1485c5841774b9
driverClassName: org.postgresql.DriverMicrosoft Windows [Version 10.0.18362.476]
(c) Корпорация Майкрософт (Microsoft Corporation), 2019. Все права защищены.
C:\Users\nickg>git config --global user.name "Mykola Hodovychenko"
C:\Users\nickg>git config --global user.email hodovychenko@opu.ua
C:\Users\nickg>git config --list
http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
http.sslbackend=openssl
diff.astextplain.textconv=astextplain
core.autocrlf=true
core.fscache=true
core.symlinks=false
core.editor="C:\\Program Files\\Notepad++\\notepad++.exe" -multiInst -notabbar -nosession -noPlugin
credential.helper=manager
user.name=Mykola Hodovychenko
user.email=hodovychenko@opu.ua
gui.recentrepo=E:/spring/testproject3
C:\Users\nickg>C:\Users\nickg>heroku login
heroku: Press any key to open up the browser to login or q to exit:
Opening browser to https://cli-auth.heroku.com/auth/browser/630e1a02-f90e-4217-8170-cd71d7fc700e
Logging in... done
Logged in as hodovychenko@opu.uaC:\Users\nickg>cd d:\springdemo\ejo
d:\springdemo\ejo>git init
Initialized empty Git repository in d:/springdemo/ejo/.git/d:\springdemo\ejo>heroku git:remote -a opnu-ej
set git remote heroku to https://git.heroku.com/opnu-ej.gitd:\springdemo\ejo>git add .
warning: LF will be replaced by CRLF in .gitignore.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in .mvn/wrapper/MavenWrapperDownloader.java.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in .mvn/wrapper/maven-wrapper.properties.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in mvnw.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in mvnw.cmd.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in pom.xml.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/main/java/com/example/ejo/EjoApplication.java.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in src/test/java/com/example/ejo/EjoApplicationTests.java.
The file will have its original line endings in your working directory
d:\springdemo\ejo>git commit -am "initial commit"
[master (root-commit) 162bc53] initial commit
16 files changed, 886 insertions(+)
create mode 100644 .gitignore
create mode 100644 .mvn/wrapper/MavenWrapperDownloader.java
create mode 100644 .mvn/wrapper/maven-wrapper.jar
create mode 100644 .mvn/wrapper/maven-wrapper.properties
create mode 100644 mvnw
create mode 100644 mvnw.cmd
create mode 100644 pom.xml
create mode 100644 src/main/java/com/example/ejo/Controller.java
create mode 100644 src/main/java/com/example/ejo/EjoApplication.java
create mode 100644 src/main/java/com/example/ejo/Group.java
create mode 100644 src/main/java/com/example/ejo/GroupRepository.java
create mode 100644 src/main/java/com/example/ejo/Service.java
create mode 100644 src/main/java/com/example/ejo/Student.java
create mode 100644 src/main/java/com/example/ejo/StudentRepository.java
create mode 100644 src/main/resources/application.yml
create mode 100644 src/test/java/com/example/ejo/EjoApplicationTests.javad:\springdemo\ejo>git push heroku master
Enumerating objects: 32, done.
Counting objects: 100% (32/32), done.
Delta compression using up to 6 threads
Compressing objects: 100% (23/23), done.
Writing objects: 100% (32/32), 54.39 KiB | 9.06 MiB/s, done.
Total 32 (delta 1), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Java app detected
remote: -----> Installing JDK 1.8... done
remote: -----> Executing: ./mvnw -DskipTests clean dependency:list install
remote: [INFO] Scanning for projects...
...
remote: [INFO] Replacing main artifact with repackaged archive
remote: [INFO]
remote: [INFO] --- maven-install-plugin:2.5.2:install (default-install) @ ejo ---
remote: [INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-shared-utils/0.4/maven-shared-utils-0.4.pom
remote: [INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-shared-utils/0.4/maven-shared-utils-0.4.pom (4.0 kB at 450 kB/s)
remote: [INFO] Downloading from central: https://repo.maven.apache.org/maven2/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar
remote: [INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-shared-utils/0.4/maven-shared-utils-0.4.jar
remote: [INFO] Downloaded from central: https://repo.maven.apache.org/maven2/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar (38 kB at 1.1 MB/s)
remote: [INFO] Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0.15/plexus-utils-3.0.15.jar
remote: [INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/shared/maven-shared-utils/0.4/maven-shared-utils-0.4.jar (155 kB at 2.0 MB/s)
remote: [INFO] Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0.15/plexus-utils-3.0.15.jar (239 kB at 3.0 MB/s)
remote: [INFO] Installing /tmp/build_bee447e74484e663663b1d166f8e9456/target/ejo-0.0.1-SNAPSHOT.jar to /app/tmp/cache/.m2/repository/com/example/ejo/0.0.1-SNAPSHOT/ejo-0.0.1-SNAPSHOT.jar
remote: [INFO] Installing /tmp/build_bee447e74484e663663b1d166f8e9456/pom.xml to /app/tmp/cache/.m2/repository/com/example/ejo/0.0.1-SNAPSHOT/ejo-0.0.1-SNAPSHOT.pom
remote: [INFO] ------------------------------------------------------------------------
remote: [INFO] BUILD SUCCESS
remote: [INFO] ------------------------------------------------------------------------
remote: [INFO] Total time: 20.474 s
remote: [INFO] Finished at: 2019-11-26T21:46:52Z
remote: [INFO] ------------------------------------------------------------------------
remote: -----> Discovering process types
remote: Procfile declares types -> (none)
remote: Default types for buildpack -> web
remote:
remote: -----> Compressing...
remote: Done: 84.1M
remote: -----> Launching...
remote: Released v5
remote: https://opnu-ej.herokuapp.com/ deployed to Heroku
remote:
remote: Verifying deploy... done.
To https://git.heroku.com/opnu-ej.git
* [new branch] master -> master
d:\springdemo\ejo>















