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
가다,to go, 1A | |
비싸다,to be expensive, 1A | |
켜요,to turn on, 1A | |
꺼요,to turn off, 1A | |
바빠요,to be busy, 1A | |
느려요, slow, 1A | |
짜요, salty , 1A | |
공원, park, 1A | |
공항, airport, 1A | |
만나요,to meet , 1A |
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
name: Build and Deploy Storybook | |
on: | |
push: | |
paths: ["frontend-components/**", ".storybook/**"] # Trigger the action only when files change in the folders defined here | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] |
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
<!DOCTYPE html> | |
<html> | |
<script> | |
const showTiles = function(tag) { | |
// reset any previously hidden tiles | |
if (tag !== "all") { | |
showTiles("all"); | |
} | |
// get all HTML elements with css class tile |
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
/* | |
Input: | |
an n by m grid of "alive" or "dead" cells | |
Output: | |
a transformation on the input grid using the following rules: | |
- An "alive" cell remains alive if 2 or 3 neighbors are "alive." Otherwise, it becomes "dead." | |
- A "dead" cell becomes alive if exactly 3 neighbors are "alive." Otherwise, it remains "dead." | |
(The term "neighbor" refers to the at-most-8 adjacent cells horizontally, vertically, and diagonally.) |
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
const firebase = require("firebase-admin"); | |
const serviceAccount = require("./firebase-config.json"); // from the Firebase project overview page | |
firebase.initializeApp({ | |
credential: firebase.credential.cert(serviceAccount), | |
databaseURL: "https://<PROJECT_NAME>.firebaseio.com" | |
}); | |
// this code could theoretically run in a Cloud Function as the back-end to a volunteer filling out a form, | |
// or scraping a 3rd party animal database, which will spin through the records and create entries in Firestore |
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
void radixSort(int arr[], int maxDigits) { | |
int exp = 1; | |
for (int i = 0; i < maxDigits; i++) { | |
ArrayList bucketList[] = new ArrayList[10]; | |
for (int k = 0; k < 10; k++) { | |
bucketList[k] = new ArrayList(); | |
} | |
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
void quickSort(int arr[], int left, int right) { //Confirmed | |
int index = partition(arr, left, right); | |
if (left < index - 1) { //when sorting 2 3 1, will return 2 1 3, left point at 3 and 2 1 unsorted | |
quickSort(arr, left, index - 1); | |
} | |
if (index < right) { //when sorting 3 1 2, will return 1 3 2, index at 3 and right is 2. | |
quickSort(arr, index, right); | |
} | |
} | |
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
void mergesort(int[] array) { | |
int[] helper = new int[array.length]; | |
mergesort(array, helper, 0, array.length - 1); | |
} | |
void mergesort(int[] array, int[] helper, int low, int high) { | |
if (low < high) { | |
int middle = (low + high) / 2; | |
mergesort(array, helper, low, middle); // left | |
mergesort(array, helper, middle + 1, high); // right |
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
int binarySearch(int[] a, int x) { | |
int low = 0; | |
int high = a.length - 1; | |
int mid; | |
while (low <= high) { | |
mid = (low + high) | |
if (a[mid] < x) { | |
low = mid + 1; | |
} else if(a[mid]>x){ |
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
boolean isPrime(int n) { | |
if(n < 2) return false; | |
for(int i = 2; i <= Math.sqrt(n); ++i) { | |
if(n % i == 0) return false; | |
} | |
return true; | |
} |
NewerOlder