Skip to content

Commit 2613655

Browse files
author
Vinh Nguyen
committed
add recipes
1 parent 9e95fec commit 2613655

File tree

5 files changed

+74
-1
lines changed

5 files changed

+74
-1
lines changed

docs/basics/time/OffsetDateTime.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
Back to [Main](../../../README.md) ⇒ [Base](../index.md)
2+
13
# OffsetDateTime
24

35
## Convert to Millis
+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
Back to [Main](../../../README.md) ⇒ [Base](../index.md)
2+
3+
# Sorted Collections
4+
5+
## Creating a Sorted Set
6+
7+
## Finding an Element in a Sorted Array
8+
9+
## Finding an Element in a Sorted Array
10+
11+
## Finding an Element in a Sorted List
12+
13+
## Inserting an Element into a Sorted Array
14+
15+
## Inserting an Element into a Sorted List
16+
17+
## Sorting an Array
18+
19+
```java
20+
int[] intArray = new int[] {4, 1, 3, -23};
21+
Arrays.sort(intArray);
22+
// [-23, 1, 3, 4]
23+
24+
String[] strArray = new String[] {"z", "a", "C"};
25+
Arrays.sort(strArray);
26+
// [C, a, z]
27+
28+
// Case-insensitive sort
29+
Arrays.sort(strArray, String.CASE_INSENSITIVE_ORDER);
30+
// [a, C, z]
31+
32+
// Reverse-order sort
33+
Arrays.sort(strArray, Collections.reverseOrder());
34+
// [z, a, C]
35+
36+
// Case-insensitive reverse-order sort
37+
Arrays.sort(strArray, String.CASE_INSENSITIVE_ORDER);
38+
Collections.reverse(Arrays.asList(strArray));
39+
// [z, C, a]
40+
```
41+

docs/libraries/index.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Back to [Main](../../README.md)
22

33
- [Mustache](mustache.md) - Template Engine
4-
- [Apache Commons Validator](../../common-validator/commons-validator.md)
4+
- [Apache Commons Validator](../../common-validator/commons-validator.md)
5+
-

kafka-streams/pom.xml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<parent>
6+
<artifactId>examples</artifactId>
7+
<groupId>net.cinhtau</groupId>
8+
<version>1.0.11-SNAPSHOT</version>
9+
</parent>
10+
<modelVersion>4.0.0</modelVersion>
11+
12+
<artifactId>kafka-streams</artifactId>
13+
14+
<properties>
15+
<maven.compiler.source>11</maven.compiler.source>
16+
<maven.compiler.target>11</maven.compiler.target>
17+
<kafka.version>2.7.0</kafka.version>
18+
</properties>
19+
20+
<dependencies>
21+
<dependency>
22+
<groupId>org.apache.kafka</groupId>
23+
<artifactId>kafka-streams</artifactId>
24+
<version>${kafka.version}</version>
25+
</dependency>
26+
</dependencies>
27+
28+
</project>

pom.xml

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<modules>
1414
<module>common-validator</module>
1515
<module>xml-jdom</module>
16+
<module>kafka-streams</module>
1617
</modules>
1718

1819
<properties>

0 commit comments

Comments
 (0)