Your setup will include:
- Application Load Balancer (ALB) - Acts as the authentication gatekeeper
- S3 Static Website - Hosts your SPA
- External IdP - Handles user authentication (e.g., Auth0, Okta, Azure AD)
| def fibonacci(num: Int): BigInt = | |
| @scala.annotation.tailrec | |
| def fibFcn(n: Int, acc1: BigInt, acc2: BigInt): BigInt = n match | |
| case 0 => acc1 | |
| case 1 => acc2 | |
| case _ => fibFcn(n - 1, acc2, acc1 + acc2) | |
| fibFcn(num, 0, 1) | |
| fibonacci(90) |
| /** | |
| * D Holbrook | |
| * | |
| * Code Club: PO1 | |
| * | |
| * (*) Define a binary tree data structure and related fundamental operations. | |
| * | |
| * Use whichever language features are the best fit (this will depend on the language you have selected). The following operations should be supported: | |
| * | |
| * Constructors |
| 'use strict'; | |
| angular.module('app').config(['$routeProvider', function ($routeProvider) { | |
| var routes =[{ | |
| url: '/dashboard', | |
| config: { | |
| template: '<dashboard></dashboard>' | |
| } | |
| }, |
| package util; | |
| import java.io.*; | |
| import java.net.InetAddress; | |
| import java.net.Socket; | |
| import java.net.URL; | |
| import java.net.UnknownHostException; | |
| import java.util.Map; | |
| import java.util.logging.Level; | |
| import java.util.logging.Logger; |
| val jsonString = """{"count":100205,"_shards":{"total":5,"successful":5,"failed":0}}""" | |
| val tweets = scala.util.parsing.json.JSON.parseFull(jsonString) | |
| def getValue(parsedJson: Option[Any], key: String): Double = { | |
| parsedJson match { | |
| case Some(m: Map[String, Any]) => m(key) match { | |
| case d: Double => d | |
| } | |
| } |
| BEGIN | |
| FOR Rec IN (SELECT object_name, object_type FROM all_objects WHERE owner='SOURCEUSER' AND object_type IN ('TABLE','VIEW','PROCEDURE','FUNCTION','PACKAGE')) LOOP | |
| IF Rec.object_type IN ('TABLE','VIEW') THEN | |
| EXECUTE IMMEDIATE 'GRANT SELECT, UPDATE, INSERT, DELETE ON SOURCEUSER.'||Rec.object_name||' TO TARGETUSER'; | |
| ELSIF Rec.object_type IN ('PROCEDURE','FUNCTION','PACKAGE') THEN | |
| EXECUTE IMMEDIATE 'GRANT EXECUTE ON SOURCEUSER.'||Rec.object_name||' TO TARGETUSER'; | |
| END IF; | |
| END LOOP; | |
| END; |
| //val lines = scala.io.Source.fromFile("test.txt", "utf-8").getLines.toList | |
| val lines = List("HEAD 000001","HEAD 000002","HEAD 000002","HEAD 000002","HEAD 000003","HEAD 000003") | |
| val keywords = lines.map(x => x.substring(9, 15)).distinct | |
| def groupByKeyword(lines: List[String], keywords: List[String]): List[List[String]] = keywords match { | |
| case keyword :: Nil => lines.groupBy(x => x.substring(9, 15).contains(keyword)).get(true).toList | |
| case keyword :: _keywords => { | |
| val mapped = lines.groupBy(x => x.contains(keyword)) | |
| mapped.get(true).toList.head :: groupByKeyword(mapped.get(false).toList.head, _keywords) |