Skip to content

Instantly share code, notes, and snippets.

View prashanth-g's full-sized avatar
🎯
Focusing

Prashanth prashanth-g

🎯
Focusing
View GitHub Profile
Java SE Major version
1.0.2 45
1.1 45
1.2 46
1.3 47
1.4 48
5.0 49
6 50
7 51
8 52
@prashanth-g
prashanth-g / StringMatching.java
Created January 13, 2023 06:28
Pattern matching in O(n * m)
package com.prashanth;
public class StringMatching {
public static void main(String[] args) {
String pattern = "eeccd";
String word = "cceeccd";
int k = 0;
import java.io.FileWriter;
import java.util.*;
import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.TimeUnit;
import java.util.stream.Stream;
class CSVWriter {
public static void main(String[] args) throws Exception {
String[] names = {"beam", "maa", "saket", "alli", "jakid"};

Docker Learning

delete all containers:

docker container rm <id>

docker image rm <id>

docker container rm $(docker ps -aq) -f

Intellij Shortcuts:

Shift + Command + A -> Show Shortcuts

Command + O -> Navigate Class

Shift + Command + O -> Navigate Files

Font ligatures for ->, !=
Topics
kafka-topics.sh --zookeeper localhost:2181 --list
Delete topics
kafka-topics.sh — zookeeper localhost:2181 — delete — topic
Topics
kafka-topics.sh --zookeeper localhost:2181 --list
@prashanth-g
prashanth-g / Git.java
Created June 10, 2019 06:36 — forked from Crydust/Git.java
run git commands from java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Objects;
@prashanth-g
prashanth-g / KafkaFrequentCommands.txt
Last active August 16, 2019 06:27
Frequent Kafka Commands in Windows
Kafka commands in windows
Go to Kafka directory
Start Kafka
.\bin\windows\kafka-server-start.bat .\config\server.properties
List Topics
def printstars(rows):
for i in range(rows):
print ' '*(rows-i-1)+'*'*(2*i+1)