This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.springframework.boot.SpringApplication; | |
| import org.springframework.boot.autoconfigure.EnableAutoConfiguration; | |
| import org.springframework.context.annotation.ComponentScan; | |
| import org.springframework.stereotype.Controller; | |
| import org.springframework.web.bind.annotation.RequestMapping; | |
| import org.springframework.web.bind.annotation.ResponseBody; | |
| import javax.servlet.http.HttpServletRequest; | |
| @EnableAutoConfiguration |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import java.io.FileInputStream; | |
| import java.io.FileNotFoundException; | |
| import java.io.FileOutputStream; | |
| import java.io.IOException; | |
| /** | |
| * Created by FreeFly on 13.04.2016. | |
| */ | |
| public class IOExample { | |
| public static void main(String[] args) throws FileNotFoundException { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var data = "username=" + encodeURIComponent($scope.username) + | |
| "&password=" + encodeURIComponent($scope.password); | |
| $http({ | |
| method: 'POST', | |
| url: 'login', | |
| data: data, | |
| headers: { | |
| 'Content-Type': 'application/x-www-form-urlencoded' | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var COLUMN_TYPES = ["col-sm-", "col-md-", "col-lg-"]; | |
| var mapToRevert = {}; | |
| var widthBefore = null; | |
| var collapsedElements = null; | |
| function beforePrint() { | |
| widthBefore = document.body.style.width; | |
| document.body.style.width = "600px"; | |
| collapsedElements = $('.collapse'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Це багатостроковий коментар, який ніяк не впливає на виконання програми | |
| Тут можна написати хто створив це файл, або інші відомості, які мають значення | |
| для читача коду, але не мають значення для компілятора(хто не знає що це таке, прочитайте) | |
| Приміть до уваги, ім'я файлу та ім'я класу, який описаний нижче повинні співпадати | |
| */ | |
| class ClassTask1{ | |
| public static void main(String[] args){ | |
| // Це одностроковий коментар | |
| // System.out.println - це функція(інструкція), яка виклакається для виводу тексту або значення якоїсь змінної в консоль |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class Main { | |
| public static void main(String[] args) { | |
| float a = 5, b = 3f, h = 3.5f;// a - довжина, b - ширина, h - висота | |
| float V = ...; | |
| System.out.println(V); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Ex1 { | |
| public static void main(String[] args){ | |
| // Умовний оператор(оператор гілкування, на рос. "ветвления") | |
| // Може виконувати одну із двох дій в залежності від виконання або не виконання певної умови | |
| if (true) {// true - спеціальне зарезервоване слово, одне із двох значень, яких може набувати змінна типу boolean, протележне слово false | |
| System.out.println("This is true"); | |
| } else { | |
| System.out.println("This is false"); | |
| } | |
| // Вище наведена повна форма оператора if(з else) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package homework2; | |
| import java.util.Scanner; | |
| /** | |
| * Created by Denis on 18.10.2016. | |
| */ | |
| public class ArithmeticProgression { | |
| public static void main(String[] args) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.company; | |
| import java.util.Scanner; | |
| public class Main { | |
| public static void main(String[] args) { | |
| Scanner sc = new Scanner(System.in); | |
| System.out.print("Введіть число:"); | |
| int a = sc.nextInt(); | |
| if (a > 0) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Created by Igor on 19.10.2016. | |
| */ | |
| public class EightSum { | |
| public static void main(String[] args) { | |
| for (int i = 1; i <= 10; i++) { | |
| for (int j = 1; j <= 10; j++) { | |
| if (i < j) { | |
| System.out.print("#"); | |
| } else { |