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
| C:\Users\Nadeem>gpg --full-gen-key | |
| gpg (GnuPG) 2.1.15; Copyright (C) 2016 Free Software Foundation, Inc. | |
| This is free software: you are free to change and redistribute it. | |
| There is NO WARRANTY, to the extent permitted by law. | |
| gpg: keybox 'C:/Users/Nadeem/AppData/Roaming/gnupg/pubring.kbx' created | |
| Please select what kind of key you want: | |
| (1) RSA and RSA (default) | |
| (2) DSA and Elgamal | |
| (3) DSA (sign only) |
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 streams; | |
| import java.util.stream.LongStream; | |
| import java.util.stream.Stream; | |
| public class FibonacciStream { | |
| public static LongStream fibonacciGG() { | |
| class FibonacciGenerator{ | |
| int prev=0; |
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.Collection; | |
| import java.util.Iterator; | |
| import java.util.concurrent.LinkedTransferQueue; | |
| import java.util.concurrent.RejectedExecutionException; | |
| import java.util.concurrent.RejectedExecutionHandler; | |
| import java.util.concurrent.ThreadPoolExecutor; | |
| import java.util.concurrent.TimeUnit; | |
| import java.util.concurrent.TransferQueue; | |
| public final class ScalingThreadPoolExecutor extends ThreadPoolExecutor { |
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.Collection; | |
| import java.util.Iterator; | |
| import java.util.concurrent.LinkedTransferQueue; | |
| import java.util.concurrent.ThreadPoolExecutor; | |
| import java.util.concurrent.TimeUnit; | |
| import java.util.concurrent.TransferQueue; | |
| import java.util.concurrent.locks.ReentrantLock; | |
| public final class ScalableThreadPoolExecutor extends ThreadPoolExecutor { |
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
| apiVersion: v1 | |
| kind: Template | |
| metadata: | |
| name: ${NAME} | |
| labels: | |
| name: ${NAME} | |
| annotations: | |
| description: Redis master/slave templates based on Statefulsets | |
| parameters: | |
| - name: NAME |
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 start = 1, end = 10; | |
| List<Integer> primeNumbers = IntStream.range(start, end) | |
| .filter(number -> number > 1 && IntStream.range(2, number).noneMatch(divider -> number % divider == 0)) | |
| .boxed().collect(Collectors.toList()); | |
| System.out.println(primeNumbers); | |
| Integer sumOfPrimes = IntStream.range(start, end).filter( | |
| number -> number > 1 && IntStream.range(2, number - 1).noneMatch(divider -> number % divider == 0)) | |
| .reduce(0, (a, b) -> a + b); |
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
| <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
| xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
| <modelVersion>4.0.0</modelVersion> | |
| <groupId>com.demo.app</groupId> | |
| <artifactId>demo-app</artifactId> | |
| <version>0.0.1-SNAPSHOT</version> | |
| <properties> | |
| <version.maven-install-plugin>2.5.2</version.maven-install-plugin> | |
| <version.non-maven1>1.0.0</version.non-maven1> |
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.nadeem.app; | |
| import java.lang.management.ManagementFactory; | |
| import javax.management.MBeanServer; | |
| import org.apache.wicket.util.time.Duration; | |
| import org.eclipse.jetty.jmx.MBeanContainer; | |
| import org.eclipse.jetty.server.Handler; | |
| import org.eclipse.jetty.server.Server; |
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
| /** | |
| * @author Nadeem Mohammad | |
| */ | |
| public class RestUrl { | |
| private String url; | |
| private RestUrl(String url) { | |
| this.url = url; | |
| } |
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.Serializable; | |
| import java.util.Date; | |
| import java.util.concurrent.TimeUnit; | |
| public final class FixdedDelayJobData implements Serializable { | |
| private static final long serialVersionUID = 1L; | |
| private long delay; | |
| private TimeUnit delayUnit; |
NewerOlder