Skip to content

Instantly share code, notes, and snippets.

View AhmadNader319's full-sized avatar

Ahmad_Nader AhmadNader319

View GitHub Profile
// Custom partitioner in Java
// Selected Topics || Spring 2023-2024 Project
public class LogProcessorMR {
public static class LogProcessorMapper extends Mapper<LongWritable, Text, Text, Text> {
This file has been truncated, but you can view the full file.
83.149.9.216 - - [17/Jan/2015:10:05:03 +0000] "GET /presentations/logstash-monitorama-2013/images/kibana-search.png HTTP/1.1" 200 203023 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
83.149.9.216 - - [17/Jan/2015:10:05:43 +0000] "GET /presentations/logstash-monitorama-2013/images/kibana-dashboard3.png HTTP/1.1" 200 171717 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
83.149.9.216 - - [17/Jan/2015:10:05:47 +0000] "GET /presentations/logstash-monitorama-2013/plugin/highlight/highlight.js HTTP/1.1" 200 26185 "http://semicomplete.com/presentations/logstash-monitorama-2013/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/32.0.1700.77 Safari/537.36"
83.149.9.216 - - [17/Jan/2015:10:05:12 +0
@AhmadNader319
AhmadNader319 / Main.java
Created October 26, 2022 15:49
strings
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
//initialize inputs
String string1 , ss ;//ss is substring from string1 , ex) the substring(from index i to j) and print from i to j
int i , j ; // indexs of string1
//read initialized