- За основу берём модель ветвления описанную в этой статье
- Про Гит - читать всем
- Из SVN в Git - сравнение с SVN, которое не стоит использовать как руководство к действию.
- Шпаргалка новичка
- 19 советов по повседневной работе с Git
- git CheatSheet
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 memoryMap; | |
| import java.io.*; | |
| import java.nio.*; | |
| import java.nio.channels.*; | |
| import java.nio.file.*; | |
| import java.util.zip.*; | |
| /** | |
| * This program computes the CRC checksum of a file in four ways. <br> |
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
| ByteArrayOutputStream result = new ByteArrayOutputStream(); | |
| byte[] buffer = new byte[1024]; | |
| int length; | |
| while ((length = inputStream.read(buffer)) != -1) { | |
| result.write(buffer, 0, length); | |
| } | |
| return result.toString("UTF-8"); |
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
| @Slf4j | |
| @RestController | |
| public class AuthController { | |
| @Autowired | |
| private ReCaptchaApiClient reCaptchaApiClient; | |
| @ResponseStatus(HttpStatus.CREATED) | |
| @RequestMapping(value = "/register", method = RequestMethod.POST) | |
| public void register(RegisterDto registerDto) { | |
| log.info("{}", registerDto); |
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
| @Component | |
| public class CsvSuggestionWriter { | |
| private CsvMapper csvMapper = new CsvMapper(); | |
| private CsvSchema schema = csvMapper | |
| .schemaFor(CsvSuggestionDto.class) | |
| .withHeader() | |
| .sortedBy("_id", "name", "type", "latitude", "longitude"); | |
| public void write(@NonNull String filename, @NonNull List<CsvSuggestionDto> data) { | |
| try { |
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.fasterxml.jackson.databind.ObjectMapper | |
| import com.fasterxml.jackson.databind.introspect.JacksonAnnotationIntrospector | |
| import groovy.transform.CompileStatic | |
| import javax.ws.rs.Produces | |
| import javax.ws.rs.core.MediaType | |
| import javax.ws.rs.ext.ContextResolver | |
| import javax.ws.rs.ext.Provider | |
| @CompileStatic |
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
| int i=0, j=0, k=0; | |
| while(i < a1.length && j < a2.length) { | |
| a3[k++] = a1[i] < a2[j] ? a1[i++] : a2[j++]; | |
| } | |
| if(i< a1.length) { | |
| arraycopy(a1, i, a3, k, a1.length - i); | |
| } else if(j< a2.length) { |
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.util.Arrays; | |
| /** | |
| * Реализация сортировки слиянием на Java | |
| * @see https://urvanov.ru | |
| * | |
| */ | |
| public class Main { | |
| public static void main(String[] args) { | |
| int[] array1 = { 8, 0, -3, 5, 6, 9, 8, -4, 2, -99, 43 }; |
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.util.Arrays; | |
| /** | |
| * Пример обучающей программы с реализацией быстрой сортировки Quicksort | |
| * @see https://urvanov.ru | |
| */ | |
| public class Main { | |
| public static void main(String [] args) { | |
| int [] array1 = {9, 0, -2, 89, 1, 2, 3, -3, -99, 6}; | |
| quicksort(array1, 0, array1.length); |
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.intellij.database.model.DasTable | |
| import com.intellij.database.model.ObjectKind | |
| import com.intellij.database.util.Case | |
| import com.intellij.database.util.DasUtil | |
| /* | |
| * Available context bindings: | |
| * SELECTION Iterable<DasObject> | |
| * PROJECT project | |
| * FILES files helper |
OlderNewer