Skip to content

Instantly share code, notes, and snippets.

View sandeepjindal's full-sized avatar
🎯
Focusing

Sandeep jindal sandeepjindal

🎯
Focusing
View GitHub Profile
// C++ program to show segment tree operations like construction, query
// and update
#include <bits/stdc++.h>
using namespace std;
// A utility function to get the middle index from corner indexes.
int getMid(int s, int e) { return s + (e -s)/2; }
/* A recursive function to get the sum of values in the given range
of the array. The following are parameters for this function.
<a href="https://studio.ethereum.org/5f37f40d26b47300123632bd"><img alt="Edit Project" src="https://studio.ethereum.org/static/img/open-studio.svg"></a>
object test extends App {
implicit val actorSystem = ActorSystem("akka-streams-example")
implicit val materializer = ActorMaterializer()
val runGraph = Source
.single("lampang")
.via(Flow[String].map { s =>
s.toUpperCase()
}).to(Sink.foreach(println))
# Credit Card Regex
- Amex Card: `^3[47][0-9]{13}$`
- BCGlobal: `^(6541|6556)[0-9]{12}$`
- Carte Blanche Card: `^389[0-9]{11}$`
- Diners Club Card: `^3(?:0[0-5]|[68][0-9])[0-9]{11}$`
- Discover Card: `^6(?:011\d{12}|5\d{14}|4[4-9]\d{13}|22(?:1(?:2[6-9]|[3-9]\d)|[2-8]\d{2}|9(?:[01]\d|2[0-5]))\d{10})$`
- Insta Payment Card: `^63[7-9][0-9]{13}$`
- JCB Card: `^(?:2131|1800|35\d{3})\d{11}$`
- KoreanLocalCard: `^9[0-9]{15}$`
P4Extractor