Social icons:
<div style="
display: flex;
flex-direction: row;
justify-content: center;
align-items: center"
>
<a href="https://twitter.com/jelledio">
| import React from "react"; | |
| import { <stub> } from "react-chartjs-2"; | |
| import "chart.js/auto"; | |
| const data = <stub>; | |
| const Dashboard = () => { | |
| // Prepare data for the chart | |
| const chartData = { | |
| labels: <stub>, |
| import React from "react"; | |
| import { Bar } from "react-chartjs-2"; | |
| import "chart.js/auto"; | |
| const data = [ | |
| { WEEK_START: "2024-12-30", TYPE: "AI_TO_HUMAN", TOTAL_MESSAGES: 5055261 }, | |
| { WEEK_START: "2024-12-30", TYPE: "HUMAN_TO_AI", TOTAL_MESSAGES: 5000859 }, | |
| { WEEK_START: "2025-01-06", TYPE: "AI_TO_HUMAN", TOTAL_MESSAGES: 6102716 }, | |
| { WEEK_START: "2025-01-06", TYPE: "HUMAN_TO_AI", TOTAL_MESSAGES: 6048182 }, | |
| { WEEK_START: "2025-01-13", TYPE: "AI_TO_HUMAN", TOTAL_MESSAGES: 1256256 }, |
| import React from "react"; | |
| import { Line } from "react-chartjs-2"; | |
| import "chart.js/auto"; | |
| const data = [ | |
| { WEEK_START: "2024-10-21", TOTAL_MESSAGES: 14369219 }, | |
| { WEEK_START: "2024-10-28", TOTAL_MESSAGES: 16087327 }, | |
| { WEEK_START: "2024-11-04", TOTAL_MESSAGES: 16607384 }, | |
| { WEEK_START: "2024-11-11", TOTAL_MESSAGES: 15846486 }, | |
| { WEEK_START: "2024-11-18", TOTAL_MESSAGES: 15901369 }, |
| import React from "react"; | |
| import { Line } from "react-chartjs-2"; | |
| import "chart.js/auto"; | |
| const data = [ | |
| { DATE: "2025-01-07", DAILY_ACTIVE_USERS: 13311 }, | |
| { DATE: "2025-01-08", DAILY_ACTIVE_USERS: 13423 }, | |
| { DATE: "2025-01-09", DAILY_ACTIVE_USERS: 12361 }, | |
| { DATE: "2025-01-10", DAILY_ACTIVE_USERS: 12165 }, | |
| { DATE: "2025-01-11", DAILY_ACTIVE_USERS: 13206 }, |
Social icons:
<div style="
display: flex;
flex-direction: row;
justify-content: center;
align-items: center"
>
<a href="https://twitter.com/jelledio">
| /*Algorithm spec: | |
| Given a long list of numbers: | |
| let numbers = 1...1000000 | |
| Write a function that transforms the list of numbers to strings with the following mapping and put it into a variable called results. | |
| 1->A, 2->B, 3->C ... 10->A0, 11->AA, 12->AB etc. | |
| With the results from the last part, write a function that adds the following elements. |
| func sumAll(objs: Any...) -> Int { | |
| var sum = 0 | |
| for obj in objs { | |
| if obj is Int { | |
| sum += obj as! Int | |
| } else if obj is String { | |
| if let variable = Int(obj as! String) { | |
| sum += variable | |
| } | |
| } |
| //When it says Any type, this means that we're dealing with generics | |
| func swap<G>(item_1: inout G, item_2: inout G) { | |
| let temp = item_1 | |
| item_1 = item_2 | |
| item_2 = temp | |
| } | |
| var one = "1" | |
| var two = "2" |
| let events: [String] = ["7:00 AM Hit the gym with Alex", "8:30 AM Coffee with Sarah", "11:00 AM Team Meeting", "3:30 PM Budget review"] | |
| // Do any additional setup after loading the view, typically from a nib. | |
| let offset = 20 | |
| var counter = 0 | |
| for value in events { | |
| let label = UILabel(frame: CGRect(x: 0, y: 0, width: 300, height: 21)) |
| func minimumMaximum<T: Comparable>(_ array: [T]) -> (minimum: T, maximum: T)? { | |
| var array = array | |
| guard !array.isEmpty else { | |
| return nil | |
| } | |
| var minimum = array.first! | |
| var maximum = array.first! | |
| let hasOddNumberOfItems = array.count % 2 != 0 |