This file contains hidden or 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
const tokenizationSpecification = { | |
type: 'PAYMENT_GATEWAY', | |
parameters: { | |
'gateway': 'fatzebra', | |
'gatewayMerchantId': "#{campaign.greenpay_googlepay_mid}" | |
} | |
}; | |
const allowedPaymentMethods = [{ | |
type: "CARD", |
This file contains hidden or 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
.dashboard-event-tile { | |
display: grid; | |
// small screen | |
grid-template-areas: "image content" | |
"image content" | |
". meta"; | |
// medium screen | |
@media screen and (min-width: 45rem) { |
This file contains hidden or 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
.dashboard-event-tile { | |
display: grid; | |
// small screen | |
grid-template-rows: 1fr auto auto; | |
grid-template-columns: 4.375rem 1fr; | |
// medium screen | |
@media screen and (min-width: 45rem) { | |
grid-template-rows: 1fr auto auto; |
This file contains hidden or 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
<div class="dashboard-event-tile"> | |
<div class="image"> | |
</div> | |
<div class="content"> | |
</div> | |
<div class="meta"> | |
</div> | |
</div> |
This file contains hidden or 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
class NodeP<T> { | |
value: T; | |
previous: NodeP<T> | undefined; | |
next: NodeP<T> | undefined; | |
constructor(value: T) { | |
this.value = value; | |
} | |
} |
This file contains hidden or 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
class NodePoint<T> { | |
value: T; | |
next: NodePoint<T> | null; | |
constructor(value: T) { | |
this.value = value; | |
this.next = null; | |
} | |
} |
This file contains hidden or 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
<script src="https://cdn.jsdelivr.net/npm/[email protected]/build/global/luxon.min.js"></script> | |
<script> | |
const defaultTimezone = 'Asia/Taipei'; // Change this to your site time zone https://university.webflow.com/lesson/time-zone | |
const local = luxon.DateTime.local(); | |
const localZoneName = local.zoneName; | |
$(function() { |
This file contains hidden or 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
class City | |
attr_accessor :name, :routes | |
def initialize(name) | |
@name = name | |
@routes = {} | |
end | |
def add_route(city, price) | |
@routes[city] = price | |
end |
This file contains hidden or 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
def bfs_traverse(starting_vertex) | |
queue = Queue.new | |
visited_vertices = {} | |
visited_vertices[starting_vertex.value] = true | |
queue.enqueue(starting_vertex) | |
# While the queue is not empty: | |
while queue.read | |
# Remove the first vertex off the queue and make it the current vertex: | |
current_vertex = queue.dequeue | |
# Print the current vertex's value: |
This file contains hidden or 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
class TrieNode: | |
def __init__(self): | |
self.children = {} | |
class Trie: | |
def __init__(self): | |
self.root = TrieNode() | |
def search(self, word): | |
currentNode = self.root |
NewerOlder