[Gukulkan]

Learn, develop, play.

About me

Georgiy Kharlampiev

Software Developer Developer
Hi! My name is Georgiy and I'm a software developer. I started to work with information technologies when I was a kid and have never stopped. I worked on a lot of projects, in different businesses. Aviation, insurance, e-commerce, etc. My hobbies are software development and knowledge sharing.

Blog

How to Build a Natural Language Processing App

Natural language processing—a technology that allows software applications to process human language—has become fairly ubiquitous over the last few years. Google search is increasingly capable of answering natural-sounding continue Related posts: Buggy JavaScript Code: The 10 Most Common Mistakes JavaScript Developers Make Как создать приложение для обработки естественного языка Gulp: A Web Developer’s Secret Weapon for […]

Create folder Java

We are having 2 variants: 1 – when we want to create single folder (C:\first) 2 – when we want to create all tree for folders (C:\1\2\3) Let’s try to create it: 1234567//First variant File folder= new File("C:\\first"); file.mkdir(); //Second variant File folders= new File("C:\\1\\2\\3"); files.mkdirs(); After that we will see all folder which we […]

Write to temp file Java

Previous we just create empty temp file Lets write there some text Example: 12345678try{ File tempFile = File.createTempFile("tempFile", ".tmp"); BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(tempFile)); bufferedWriter.write("This is Test for tempFile!"); bufferedWriter.close(); }catch(IOException ex){ ex.printStackTrace(); } Related posts: Записать данные в временый фаил Java Archive file in GZip Java Write in file Java Create temp file […]

Create temp file in Java

Sometimes you need to crate temp files and clean memory java.io.File library helps to do this Example: 123456try{ File tempFile = File.createTempFile("tempFileName", ".tmp"); System.out.println(tempFile.getAbsolutePath()); }catch(IOException ex){ ex.printStackTrace(); } This code create file like tempFileName31231.tmp Related posts: Create file in Java Full path to file Java Chanhe file permission in Java Создание временого файла Java

Unzip file from GZip Java

We have already zip file in GZip format, lets unzip it Example: 1234567891011121314151617String INPUT_FILE = "/home/user/fileArchive.gz"; String OUTPUT_FILE = "/home/user/fileText.txt"; byte[] buffer = new byte[1024]; try{ GZIPInputStream gZIPInputStream = new GZIPInputStream(new FileInputStream(INPUT_FILE)); FileOutputStream fileOutputStream = new FileOutputStream(OUTPUT_FILE); int len; while ((len = gZIPInputStream.read(buffer)) > 0) { fileOutputStream.write(buffer, 0, len); } gZIPInputStream.close(); fileOutputStream.close(); }catch(IOException ex){ ex.printStackTrace(); […]

Archive file in GZip Java

We have already create zip file in java, lets check it with GZip Example: 12345678910111213141516171819private String OUTPUT_FILE = "/home/user/fileArchive.gz"; private String INPUT_FILE = "/home/user/fileText.txt";   byte[] buffer = new byte[1024]; try{ GZIPOutputStream gZIPOutputStream = new GZIPOutputStream(new FileOutputStream(OUTPUT_FILE));   FileInputStream fileInputStream = new FileInputStream(INPUT_FILE); int len; while ((len = fileInputStream.read(buffer)) > 0) { gZIPOutputStream.write(buffer, 0, len); […]