This file contains 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 MainActivity extends AppCompatActivity { | |
public static final int CAMERA_PERMISSION_REQUEST = 666; | |
private boolean isZXing; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
isZXing = true; | |
Button buttonZxing = findViewById(R.id.btn_start_qr_zxing); |
This file contains 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 static void writeTransactionToXml(Context context, Transaction transaction, List<Document> documents) { | |
boolean fileCreatedNow = false; | |
String date = transaction.getDate(); | |
String customerName = transaction.getCustomerName(); | |
if (!FUtils.isFileExists(context, FileProvider.TRANSACTION_HISTORY)) { | |
fileCreatedNow = true; | |
} |
This file contains 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.Random; | |
public class Main { | |
public static void main(String[] args) { | |
int sum; | |
int[][] matrix = new int[3][3]; | |
Random random = new Random(); |
This file contains 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 sample; | |
import javafx.event.*; | |
import javafx.event.Event; | |
import javafx.fxml.FXML; | |
import javafx.scene.Node; | |
import javafx.scene.control.Label; | |
import javafx.scene.control.ProgressBar; | |
import javafx.scene.input.DragEvent; | |
import javafx.scene.input.Dragboard; |
This file contains 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.util.*; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
Calendar bornDate = Calendar.getInstance(); | |
Calendar present = new GregorianCalendar(); | |
int day = scanner.nextInt(); |
This file contains 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.javarush.test.level15.lesson02.task04; | |
/* ООП - книги | |
1. Создайте public static класс MarkTwainBook, который наследуется от Book. Имя автора [Mark Twain]. Параметр конструктора - имя книги. | |
2. В классе MarkTwainBook реализуйте все абстрактные методы. | |
3. Для метода getBook расширьте тип возвращаемого результата. | |
4. Создайте по аналогии AgathaChristieBook. Имя автора [Agatha Christie]. | |
5. В классе Book реализуйте тело метода getOutputByBookType так, чтобы он возвращал: | |
5.1. agathaChristieOutput для книг Агаты Кристи; | |
5.2. markTwainOutput для книг Марка Твена. |