create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"
| package com.example.demo.controller; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| public class Record { | |
| private String desId; | |
| private String sourceId; | |
| #!/bin/bash | |
| openssl genrsa -out private.pem 2048 | |
| openssl pkcs8 -topk8 -inform PEM -in private.pem -out private_key.pem -nocrypt | |
| openssl rsa -in private.pem -outform PEM -pubout -out public_key.pem |
| // Using loop to delete duplicate items but one | |
| db.amazon_sales.find({}, {asin:1}).sort({_id:1}).forEach(function(doc){ | |
| db.amazon_sales.remove({_id:{$gt:doc._id}, asin:doc.asin}); | |
| }) | |
| // indexing the field | |
| db.amazon_sales.createIndex( { "asin": 1 }, { unique: true } ) |
| db.myCollection.find().forEach( | |
| function(e) { | |
| e.username = e.username.toLowerCase(); | |
| db.myCollection.save(e); | |
| } | |
| ) |
| private Stream<Map.Entry<String, Object>> recursiveFlattening(String key, Map.Entry<String, Object> entry) { | |
| String jsonKey = entry.getKey(); | |
| Object jsonElement = entry.getValue(); | |
| if(key != null) | |
| jsonKey = key + "/" + jsonKey; | |
| final String res = jsonKey; | |
| if (jsonElement instanceof JsonObject) { |
| ^(?=.{8,20}$)(?![_.])(?!.*[_.]{2})[a-zA-Z0-9._]+(?<![_.])$ | |
| ^(?=.{8,20}$)(?![_.])(?!.*[_.]{2})[a-zA-Z0-9._]+(?<![_.])$ | |
| βββββββ¬ββββββββββ¬ββββββββββ¬βββββββββββββ¬ββββββ βββββ¬ββββ | |
| β β β β no _ or . at the end | |
| β β β β | |
| β β β allowed characters | |
| β β β | |
| β β no __ or _. or ._ or .. inside | |
| β β |
| private final FIVE_SECONDS = 5000; | |
| public void scheduleSendLocation() { | |
| handler.postDelayed(new Runnable() { | |
| public void run() { | |
| sendLocation(); // this method will contain your almost-finished HTTP calls | |
| handler.postDelayed(this, FIVE_SECONDS); | |
| } | |
| }, FIVE_SECONDS); | |
| } |
| Criteria criteria = new Criteria().andOperator( | |
| where("warehouse").is(warehouse), | |
| where("date").gte(currentYear.getStart()), | |
| where("date").lte(currentYear.getEnd()) | |
| ); | |
| ProjectionOperation dateProjection = project() | |
| .and("amount").as("amount") | |
| .and("date").extractYear().as("year") | |
| .and("date").extractMonth().as("month"); |
| <!-- Verifed Icons --> | |
| <span class="fa fa-stack fa-lg"> | |
| <i class="fa fa-certificate fa-stack-2x" style="color: green"></i> | |
| <i class="fa fa-check fa-stack-1x fa-inverse"></i> | |
| </span> | |
| <span class="fa fa-stack fa-lg"> | |
| <i class="fa fa-certificate fa-stack-2x" style="color: red"></i> | |
| <i class="fa fa-close fa-stack-1x fa-inverse"></i> | |
| </span> |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "your_email@youremail.com"