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
# Codewars - Recover a secret string from random triplets | |
import operator | |
class Node(): | |
def __init__(self, letter): | |
self.letter = letter | |
self.followers = set() | |
self.all_following_nodes = None | |
def add_follower(self, node): |
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
<!-- replace "YOUR_API_KEY" with the API key you obtained from Google --> | |
<% String googleAPIKey = "YOUR_API_KEY"; %> | |
<pega:save name="componentID" ref="Param.pzComponentId" /> | |
<% String componentID = tools.getSaveValue("componentID"); %> | |
<% String containerID = "address-autocomplete_" + componentID; %> | |
<% ClipboardPage primaryPage = tools.getPrimaryPage(); %> | |
<script> |
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
<!-- replace "YOUR_API_KEY" with the API key you obtained from Google --> | |
<% String googleAPIKey = "YOUR_API_KEY"; %> | |
<pega:save name="componentID" ref="Param.pzComponentId" /> | |
<% String componentID = tools.getSaveValue("componentID"); %> | |
<% String containerID = "address-autocomplete_" + componentID; %> | |
<% ClipboardPage primaryPage = tools.getPrimaryPage(); %> | |
<script> |
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
<!-- replace "YOUR_API_KEY" with the API key you obtained from Google --> | |
<% String googleAPIKey = "YOUR_API_KEY"; %> | |
<pega:save name="componentID" ref="Param.pzComponentId" /> | |
<% String componentID = tools.getSaveValue("componentID"); %> | |
<% String containerID = "address-autocomplete_" + componentID; %> | |
<% ClipboardPage primaryPage = tools.getPrimaryPage(); %> | |
<script> |
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
<!-- replace "YOUR_API_KEY" with the API key you obtained from Google --> | |
<% String googleAPIKey = "YOUR_API_KEY"; %> | |
<pega:save name="componentID" ref="Param.pzComponentId" /> | |
<% String componentID = tools.getSaveValue("componentID"); %> | |
<% String containerID = "address-autocomplete_" + componentID; %> | |
<script> | |
var unneededElement = document.getElementById('speciality_<%= componentID %>') |
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
<!-- replace "YOUR_API_KEY" with the API key you obtained from Google --> | |
<% String googleAPIKey = "YOUR_API_KEY"; %> | |
<pega:save name="componentID" ref="Param.pzComponentId" /> | |
<% String componentID = tools.getSaveValue("componentID"); %> | |
<% String containerID = "address-autocomplete_" + componentID; %> | |
<div id="<%= containerID %>"> | |
<div id="locationField"> |
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
<!-- replace "YOUR_API_KEY" with the API key you obtained from Google --> | |
<% String googleAPIKey = "YOUR_API_KEY"; %> | |
<div> | |
<div id="locationField"> | |
<input id="autocomplete" placeholder="Enter your address" type="text"></input> | |
</div> | |
<table id="address"> |
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
Array(6).join("b") // create string with 5 b-s "bbbbb" |
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
// random string | |
// random number - convert it to base 36 (0-9a-z) - remove the '0.' from the beginning | |
Math.random().toString(36).substr(2) |
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
sudo service nginx stop | |
sudo letsencrypt renew | |
sudo service nginx start |