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.javarush.task.task22.task2211; | |
import java.io.*; | |
import java.io.IOException; | |
/* | |
Смена кодировки | |
*/ | |
public class Solution { | |
static String win1251TestString = "Нарушение кодировки консоли?"; //only for your testing |
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.javarush.task.task22.task2212; | |
/* | |
Проверка номера телефона | |
Критерии валидности: | |
1) если номер начинается с ‘+‘, то он содержит 12 цифр | |
2) если номер начинается с цифры или открывающей скобки, то он содержит 10 цифр | |
3) может содержать 0-2 знаков ‘—‘, которые не могут идти подряд | |
4) может содержать 1 пару скобок ‘(‘ и ‘)‘ , причем если она есть, то она расположена левее знаков ‘-‘ | |
5) скобки внутри содержат четко 3 цифры |
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.javarush.task.task31.task3102; | |
import java.io.File; | |
import java.io.IOException; | |
import java.nio.file.*; | |
import java.nio.file.attribute.BasicFileAttributes; | |
import java.util.*; | |
/* | |
Находим все файлы |
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.javarush.task.task31.task3112; | |
import java.io.File; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.net.URL; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; |
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.FileNotFoundException; | |
import java.io.IOException; | |
import java.io.RandomAccessFile; | |
/* | |
Запись в существующий файл | |
*/ | |
public class Solution { | |
public static void main(String... args) throws IOException { |
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.javarush.task.task32.task3210; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.io.RandomAccessFile; | |
/* | |
Используем RandomAccessFile | |
*/ | |
//Считать текст с файла начиная с позиции number, длинной такой же как и длинна переданного текста в третьем параметре. |
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
SET search_path TO ifd_test, test; | |
SHOW search_path; | |
CREATE SCHEMA IF NOT EXISTS test; | |
DROP TABLE IF EXISTS esb_out_a_report; | |
CREATE TABLE IF NOT EXISTS esb_out_a_report ( | |
message_id SERIAL NOT NULL PRIMARY KEY, | |
operation_code INT DEFAULT NULL, | |
message_dt TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, |
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
CREATE DATABASE IF NOT EXISTS `ifd_test`; | |
START TRANSACTION; | |
USE `ifd_test`; | |
TRUNCATE TABLE esb_out_a_report; # из -> | |
TRUNCATE TABLE esb_out_h_report; # -> в | |
INSERT INTO esb_out_a_report (message_id, entity_id, maintenance_flg, message_dt, operation_code, receiver_id) | |
SELECT |
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
USE exchangedb; | |
IF NOT EXISTS (select * from sysobjects where name='esb_out_a_report') | |
CREATE TABLE dbo.esb_out_a_report | |
( | |
MESSAGE_ID int, | |
OPERATION_CODE int, | |
MESSAGE_DT datetime, | |
ENTITY_ID varchar(750), | |
RECEIVER_ID int, |
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 ru.gamble.servicebus.core.processor.ifd.manager; | |
import lombok.extern.slf4j.Slf4j; | |
import org.apache.camel.Exchange; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.stereotype.Service; | |
import ru.gamble.servicebus.core.domain.Task; | |
import ru.gamble.servicebus.core.domain.TaskType; | |
import ru.gamble.servicebus.core.exception.PackageIdUpdaterExeption; | |
import ru.gamble.servicebus.core.exception.RowException; |
OlderNewer