From b27e035f6912427a4ea0bdc1fa0ff2b356266088 Mon Sep 17 00:00:00 2001 From: Taryn Nicole Date: Tue, 27 Jul 2021 09:48:58 -0400 Subject: [PATCH 1/8] Pseudo code of Lightning Tracker - modeling of the project 0 - need to work on this more instead of debugging other issues To Do - Tues., July 27th: - add main class - find appropriate data to insert - import to function --- psuedo_LT.java | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 psuedo_LT.java diff --git a/psuedo_LT.java b/psuedo_LT.java new file mode 100644 index 0000000..03c6dbb --- /dev/null +++ b/psuedo_LT.java @@ -0,0 +1,54 @@ +// --------------------------------------------------------------------------------------------------------------------- +// NAME: Taryn Nicole Jones ---------------------------------------------------------------------------------------- +// COURSE: Revature - Java Reactive -------------------------------------------------------------------------------- +// DATE: 7/23/2021 --------------------------------------------------------------------------------------------------- +// TITLE: Project 0 ----------------------------------------------------------------------------------------------------- +// DESCRIPTION: Lightning Predictor App --------------------------------------------------------------------------- +// Goals: --------------------------------------------------------------------------------------------------------------- +// ----- 1. predict next lightning stirke given data ------------------------------------------------------------------- +// ----- 2. predict lightning in given area, given history trends (possibly try to get all in US based on zipcode) -- +// ----- 3. output lightning map through time ----------------------------------------------------------------------- +// ----- 4. output lightning heat map --------------------------------------------------------------------------------- +// ----- >>> BONUS: Can also try predicting the magnitude + landfall + potential warnings? -------------------- + +Lightning Predictor App: +1. predict next lightning stirke given data +2. predict lightning in given area, given history trends (possibly try to get all in US based on zipcode) +3. output lightning map through time +4. output lightning heat map +>>> Can also try predicting the magnitude + landfall + potential warnings? + +// headers + +//class??? +public static void main(Strings[] args){ + // Make a program that can output data to make sure loaded well from source + // Follow the logic from Rstudio data population - QMB 5565 + // Can even run there to ensure running as expected + + System.out.println(); +} + + +// Function that creates multi-lienear regression to predict next lightning strike +// Explain why important and useful +// ****** BONUS: see if can compare throughout the day **** +// Z-scores, p value etc. + + +// Function that creates an animated map/ gif of lightning outputs +// Explain why important and useful +// ****** BONUS: see if can compare times throughout the day (decide upon frequency) **** +// ****** BONUS: future map - use averages of last 3 years in a month/day/time **** + + +// Function that creates heat map of lightning outputs +// Explain why important and useful +// ****** BONUS: see if can compare on 3 year time frame photos **** +// ****** BONUS: future map - use averages of last 3 years in a month/day/time **** + + +// Impreovemnts: +// Make fast to load data +// Make fast to quickly find data to predict +// Make look nice, fancy for user interface (still on command line) \ No newline at end of file From ed7ca4885b33e66e77374a4b4baa886bd416eed8 Mon Sep 17 00:00:00 2001 From: Taryn Nicole Date: Sun, 1 Aug 2021 09:25:50 -0400 Subject: [PATCH 2/8] Create countBlocks.java --- javaPractice/countBlocks.java | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 javaPractice/countBlocks.java diff --git a/javaPractice/countBlocks.java b/javaPractice/countBlocks.java new file mode 100644 index 0000000..375310c --- /dev/null +++ b/javaPractice/countBlocks.java @@ -0,0 +1,10 @@ +// Udacity Practice - Counts the level of blocks in a pyramid +public int countBlocks(int levels){ + int total =0; + + for(int i=0; i <= levels; i++){ + total += (i*i); + } + + return total; +} From 300bde2f94e950c4ce9b1126da3741c72f250538 Mon Sep 17 00:00:00 2001 From: Taryn Nicole Date: Sun, 1 Aug 2021 10:22:41 -0400 Subject: [PATCH 3/8] Create martingale.java --- javaPractice/martingale.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 javaPractice/martingale.java diff --git a/javaPractice/martingale.java b/javaPractice/martingale.java new file mode 100644 index 0000000..f34e7d2 --- /dev/null +++ b/javaPractice/martingale.java @@ -0,0 +1,22 @@ +// Udacity martingale betting technique +public int martingale() { + int money = 1000; + int target = 1200; + int bet = 10; + while (money > bet) { + boolean win = play(); + if (win) { + money += bet; + bet = 10; + } + else { + money -= bet; + bet *= 2; + } + + if(money >= target){ + break; + } + } + return money; +} From bc8b575599adb2e944dacece631874224cabe182 Mon Sep 17 00:00:00 2001 From: Taryn Nicole Date: Sun, 1 Aug 2021 10:31:21 -0400 Subject: [PATCH 4/8] Create hrBudget.java --- javaPractice/hrBudget.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 javaPractice/hrBudget.java diff --git a/javaPractice/hrBudget.java b/javaPractice/hrBudget.java new file mode 100644 index 0000000..5cb7414 --- /dev/null +++ b/javaPractice/hrBudget.java @@ -0,0 +1,16 @@ +// SoloLearn HR Budget Program +import java.util.Scanner; + +public class Main { + + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + //get salaries + int salary1 = scanner.nextInt(); + int salary2 = scanner.nextInt(); + //your code goes here + int sum = salary1 + salary2; + System.out.println(sum); + + } +} From fe46e17658c32e00ba94151823c832332a87a18d Mon Sep 17 00:00:00 2001 From: Taryn Nicole Date: Sun, 1 Aug 2021 10:32:37 -0400 Subject: [PATCH 5/8] No change - (while & break loop example) From fb91b05a11943e8e042135562e5bc647c6698487 Mon Sep 17 00:00:00 2001 From: Taryn Nicole Date: Sun, 1 Aug 2021 10:38:46 -0400 Subject: [PATCH 6/8] Create averageHW.java (average and modulo example) --- javaPractice/averageHW.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 javaPractice/averageHW.java diff --git a/javaPractice/averageHW.java b/javaPractice/averageHW.java new file mode 100644 index 0000000..f89661a --- /dev/null +++ b/javaPractice/averageHW.java @@ -0,0 +1,21 @@ +// SoloLearn Time for HW Program + +import java.util.Scanner; + +public class Main { + + public static void main(String[] args) { + Scanner scanner = new Scanner(System.in); + int math = scanner.nextInt(); + int history = scanner.nextInt(); + int geometry = scanner.nextInt(); + + //your code goes here + int sum = math + history + geometry; + int hr = sum/60; + int min = sum % 60; + + System.out.println(hr); + System.out.println(min); + } +} From c3174dbc062439e041d50b646a7732a0403d3536 Mon Sep 17 00:00:00 2001 From: Taryn Nicole Date: Sun, 1 Aug 2021 10:42:01 -0400 Subject: [PATCH 7/8] Create scoring.java (increment/ decrement example) --- javaPractice/scoring.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 javaPractice/scoring.java diff --git a/javaPractice/scoring.java b/javaPractice/scoring.java new file mode 100644 index 0000000..1cbed98 --- /dev/null +++ b/javaPractice/scoring.java @@ -0,0 +1,20 @@ +// SoloLearn Who Scored More? Program + +import java.util.Scanner; + +public class Main { + + public static void main(String[] args) { + + Scanner scanner = new Scanner(System.in); + //taking initial score + int initScore = scanner.nextInt(); + int scoreTom = initScore; + int scoreBob = initScore; + + System.out.println("Round 1 results:"); + //fix + System.out.println(++scoreTom); + System.out.println(--scoreBob); + } +} From 0616e4c3ada842ecd732ce9096cd7721b6f54606 Mon Sep 17 00:00:00 2001 From: Taryn Nicole Date: Sun, 1 Aug 2021 11:30:43 -0400 Subject: [PATCH 8/8] Create findLongestName.java (max string length example) --- javaPractice/findLongestName.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 javaPractice/findLongestName.java diff --git a/javaPractice/findLongestName.java b/javaPractice/findLongestName.java new file mode 100644 index 0000000..bd5f449 --- /dev/null +++ b/javaPractice/findLongestName.java @@ -0,0 +1,14 @@ +// Udacity - find the longest name in a string array +// Create findLongestName.java (max string length example) + +public String findLongestName(String [] names){ + int size = names.length; + String longestName = names[0]; + + for(int i=1; i < size; i++){ + if(names[i].length() > longestName.length()){ + longestName = names[i]; + } + } + return longestName; +}