create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
| 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 | |
| β β |
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
| private void bind(FileItem item) { | |
| this.item = item; | |
| if (item.isVideo()) { | |
| Bitmap thumbnail = ThumbnailUtils.createVideoThumbnail( | |
| item.path, MediaStore.Video.Thumbnails.MINI_KIND); | |
| image.setImageBitmap(thumbnail); | |
| } else if (item.isImage()) { | |
| BitmapFactory.Options bmOptions = new BitmapFactory.Options(); | |
| Bitmap bitmap = BitmapFactory.decodeFile(item.path, bmOptions); | |
| bitmap = Bitmap.createScaledBitmap(bitmap, itemView.getWidth(), itemView.getHeight(), true); |
| override fun onCreateOptionsMenu(menu: Menu): Boolean { | |
| val searchItem: MenuItem? = menu.findItem(R.id.action_search) | |
| if (searchItem != null) { | |
| searchView = MenuItemCompat.getActionView(searchItem) as SearchView | |
| searchView.setOnCloseListener { | |
| searchView.onActionViewCollapsed() | |
| Log.v("MainActivity", "setOnCloseListener: onClose") | |
| true | |
| } |
| create table oauth_client_details ( | |
| client_id VARCHAR(256) PRIMARY KEY, | |
| resource_ids VARCHAR(256), | |
| client_secret VARCHAR(256), | |
| scope VARCHAR(256), | |
| authorized_grant_types VARCHAR(256), | |
| web_server_redirect_uri VARCHAR(256), | |
| authorities VARCHAR(256), | |
| access_token_validity INTEGER, | |
| refresh_token_validity INTEGER, |