This file contains 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++ 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. |
This file contains 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
<a href="https://studio.ethereum.org/5f37f40d26b47300123632bd"><img alt="Edit Project" src="https://studio.ethereum.org/static/img/open-studio.svg"></a> |
This file contains 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
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)) |
This file contains 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
# 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}$` |
This file contains 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
P4Extractor |