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
| UPDATE `inlib-migration`.`books_ebooks_links` SET `name`='Extreme Programming Explained - Kent Beck.pdf' WHERE `id`='1'; | |
| UPDATE `inlib-migration`.`books_ebooks_links` SET `name`='The Art of Application Performance Testing – Help for Programmers and Quality Assurance.pdf' WHERE `id`='11'; | |
| UPDATE `inlib-migration`.`books_ebooks_links` SET `name`='effective-javascript.epub' WHERE `id`='76'; | |
| UPDATE `inlib-migration`.`books_ebooks_links` SET `name`='Practices of an Agile Developer. Working in the Real World.pdf' WHERE `id`='75'; | |
| UPDATE `inlib-migration`.`books_ebooks_links` SET `name`='effective-javascript.pdf' WHERE `id`='77'; | |
| UPDATE `inlib-migration`.`books_ebooks_links` SET `name`='Джони Айв. Легендарный дизайнер Apple.fb2' WHERE `id`='78'; | |
| UPDATE `inlib-migration`.`books_ebooks_links` SET `name`='Web UI Design for the Human Eye – Colors, Space, Contrast.pdf' WHERE `id`='50'; | |
| UPDATE `inlib-migration`.`books_ebooks_links` SET `name`='Interaction Design - Best Practices – Mastering Time, Responsiveness, and Behav |
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
| function processData(input) { | |
| const r = /<a.*href\s*=\s*["']([^"']*)["'][^>](.*)<\/a>/; | |
| console.log(r); | |
| const text = input | |
| .split(/\n/) | |
| .slice(1) | |
| .join('') | |
| .split(/<\s*a[\s]/) | |
| .map(s => '<a ' + s) | |
| .forEach(l => proc(r, l)); |
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
| expect(userService.save(EasyMock.capture(userEntity))).andAnswer(() -> { | |
| userEntity.getValue().setUserId(newTaskId); | |
| return createdTask.getValue(); | |
| }); |
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 com.mysql.jdbc.jdbc2.optional.MysqlDataSource; | |
| import java.sql.CallableStatement; | |
| import java.sql.Connection; | |
| import java.sql.ResultSet; | |
| import java.sql.SQLException; | |
| import java.util.LinkedList; | |
| import java.util.Queue; | |
| import java.util.concurrent.*; |
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
| [ | |
| { | |
| "content": "What is your name?", | |
| "answers":[{ | |
| "id": "1", | |
| "content": "sadsf" | |
| },{ | |
| "id": "2", | |
| "content": "asdas" | |
| },{ |
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
| @GetMapping(value = "/{documentId}/content") | |
| public ResponseEntity<FileSystemResource> downloadContent(@PathVariable("documentId") Long documentId) { | |
| FileSystemResource fileSystemResource = documentService.getContent(documentId); | |
| return ResponseEntity | |
| .ok() | |
| .contentType(MediaType.valueOf(documentService.getContentType(documentId))) | |
| .body(fileSystemResource); | |
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 fibonacci = (function () { | |
| var cache = []; | |
| return function fibo(n) { | |
| if (cache[n]) return cache[n]; | |
| return cache[n] = n == 0 ? 0 : | |
| n == 1 ? 1 : | |
| fibo(n-1) + fibo(n-2); | |
| }; |
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.InputStream; | |
| import java.net.URL; | |
| import java.net.URLConnection; | |
| import java.util.Scanner; | |
| public class Main { | |
| public static void main(String[] args) throws Exception { | |
| URL url = new URL("http://example.com"); | |
| URLConnection urlConnection = url.openConnection(); | |
| InputStream inputStream = urlConnection.getInputStream(); |
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 com.google.gson.Gson; | |
| public class Main { | |
| public static void main(String[] args) { | |
| Gson gson = new Gson(); | |
| Human human = new Human(); | |
| human.setAge(21); | |
| human.setName("Sasha"); | |
| String humanJson = gson.toJson(human); | |
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; | |
| public class Main { | |
| 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 { | |
| System.out.print(i*j + " "); |