instruction
stringlengths
71
95.1k
I have an RPG program which processes a file containing records of subscription details of users. Each subscription record has a "valid from date" and "valid to date" - indicating when the subscription started and ended. I need to check if a subscription is currently valid (curdate holds current date) or should have be...
I'm given a distance and a list of points in a plane, where I have to return a sorted list of the size of each connected component where each edge is shorter or equal to the distance threshold. I've implemented a union-find disjoint set as a solution: import array from collections import Counter class DisjointSet: ...
This implementation of thread pool that includes support for suspend functionality, which is necessary for refreshing reference data periodically. I would appreciate your review to ensure that there are no bugs and that the implementation is well-structured. Although everything seems to be working fine, I am still a no...
If you'd like to print this: ┌───────────────────┐ │One Two Three Four│ ╞═══════════════════╡ │1 2 3 4│ │5 6 7 8│ │9 [10] 11 12 │ └───────────────────┘ using this: System.out.println( new Table() .addLine("One", "Two", "Three", "Four") .addLine("1", "2", "3", "4") .addLin...
I recently created game about life in python. First version of code was console, but recently I rewrote this game in pygame. I decied upgrade game and was added age of cells. But now I can see that my game when I setting up size of array more than 25*25 cells starts to lag. I think that problem can be in method "add_li...
I'm still pretty new at Python and working on a small database program, where at the start of the program new files are imported from another folder (approx. 2000), and older files are backed up. Subfolders of the import folder sometimes contain multiple files with the same name (I always want just one of them, but the...
How can I improve this? I added the while read loop to handle preceding newlines. trim() { # skip leading whitespace while read -r string; do [[ -n "${string}" ]] && break; done string="${string#"${string%%[![:space:]]*}"}" string="${string%"${string##*[![:space:]]}"}" printf "${string}" } Usage: $...
I wrote a custom array class in C++ to suit my personal use case. The main important rule in this project is that no unassigned element is allowed between 2 assigned elements; please review for improvement: #ifndef ARRAY_H #define ARRAY_H #include <limits> template <typename T> class Array { public: size_t ofs_to...
This is a Python script I wrote to reboot the router every 600 seconds. Why did I do it? Well, in case you don't know, I live in China, and I use VPNs to browse the international internet. My ISP frequently interrupts my VPN connection, don't ask me why, they really have no better things to do. So I have to constantly ...
It's one of the tasks suggested in the Rust Programming Language book by Steve Klabnik and Carol Nichols, and to a complete Rust newbie like me, figuring out converting scale from String to Vec<char>, was a bit of a challenge and a new concept, coming from Python. I'd appreciate constructive criticism of what I've done...
I have written this class which displays a progress bar reading from the file. In what possible ways could I have gone wrong with this definition? And can somebody suggest what wrongs I am committing here? I construct the object of this class with an input file that I intend to read. The constructor calculates the file...
I started coding two months ago and as my first project I wrote a Telegram bot in Java. The purpose of the bot is to perform various tasks related to the Yugioh TCG (such as searching for cards in a database or keep track of points during a game). Since this is my first time using the Telegram API I have read its docum...
I came up with 2 solutions for this small problem exercise - the script should take a sentence from the user and return 4 things - the number of lower case letters, the number of uppercase letters, the number of punctuation characters and the total number of characters (i.e. anything except spaces). Spaces are ignored....
I would like to refactor the following code snippet adapted from a project I'm involved. It is part of a code to control power outlets via network. The code snippet was written by myself based on the original code for demonstration and review related purposes. E.g. the original code was part of a class containing the s...
This is my first time trying out C. Simplicity was the main objective. Signals are not handled and memory is not freed (program is very small, and the OS should take care of that when program exits). There is some simple error checking and optimization. The output is such that it could be piped into another program tha...
I've been asked to implement one iteration of the Symmetric Gauss Seidel on CUDA. I was given the CPU implementation for Sparse matrices in CSR and the goal to speed it up using the GPU. Below is my implementation. Do you have any suggestions that can speed the CUDA part of the code? (I'm not allowed to change the inpu...
I was hoping someone could give me any tips or advice on this program I wrote for my high school class. The point of the program is to create a workable crossword puzzle in the console. If it works well, I'm going to try and implement it with JavaFX. It reads the crossword clues and other stuff in regards to the clues ...
I am creating a tile-map in python using pygame. The code I have (see below) works OK, but I was wandering if there were any improvements. This code creates a tilemap and scrolls it horizontally: from enum import Enum import pygame pygame.init() SCREEN_WIDTH = 800 SCREEN_HEIGHT = 500 TILE_SIZE = 50 class TileTypes...
The n-queens puzzle is the problem of placing n queens on an n✕n chessboard such that no two queens attack each other. Given an integer n, this code returns the number of distinct solutions to the n-queens puzzle. How can I further optimize (in time and space) the solution below to leetcode's N-Queens 2 problem? This s...
Here is the code. It takes an argument with the -l flag for a link otherwise it goes to a hard coded search engine (I have selected brave to be different). I'm looking for suggestions for improvement and maybe ways I can improve web page rendering and video playback. #!/usr/bin/env python3 import sys from PyQt5.QtCore ...
If you'd like to pivot this: ┌────────────────────┐ │One Two Three Four│ ╞════════════════════╡ │One 2 3 4│ │Five 6 7 8│ │Nine [10] 11 12 │ └────────────────────┘ to this: ┌───────────────────┐ │One One Five Nine│ ╞═══════════════════╡ │Two 2 6 [10]│ │Three 3 7 11│ │Four 4...
This code creates a black-and-white image of variable size where the n-th pixel is white if n is a prime number and black if it isn't. It works, but I wonder if it is well written or if it could be made faster. Example: Code: import math from PIL import Image def is_prime(num: int) -> bool: if not isinstance(nu...
I made a small POC for a REPL using Tkinter: # importing modules import tkinter as tk import sys import io class REPL(tk.Frame): def __init__(self, master=None): # setting up widgets and needed variables super().__init__(master) self.master = master self.master.title("REPL") ...
The goal is to extract the the Features section from a Lego product page. In the Features section, usually there's a header (<h2> or <h3>) in the subsection and a paragraph made up of multiple <span> segments. The goal is to exact the Features section such that the output is an OrderedDict of h2/h3 as key and a list o...
I'm new to MVVM architecture. I want to have authentication with email + password, google and Facebook. I'm not sure if there should be separate view models for each authentication way: EmailPasswordAuthViewModel GoogleAuthViewModel FacebookAuthViewModel or one view model for authentication with credentials and one wit...
I need to compare two std::optional<std::size_t> variables, considering all possible cases(both std::nullopt or one of them exists of both exist). I try to achieve the most compact version of it, but it looks ugly to me. The code below is executed within a loop and I need to detect the higher priority of an element. st...
I'm new on this field of coding, and I start to create by myself a project for iOS and Android. I'm a bit lost of how I supposed to organize my code, I saw different persons on YouTube doing their code by different way. I want help to know what is the best to how to write a code, who it will be understanding by people ...
Context I am currently in the process of throwing myself into learning graphics programming, and my chosen platform is using JavaScript and WebGPU. After successfully making a basic glTF JSON renderer I found that there was much re-factoring needed of my code. In order to break down this task I have chosen to attack so...
I have developed an implementation of a logger in Python. I know that Python already has a built-in logger, my goal with this is to get feedback and suggestions for improvement, particularly about code structure. Code is here: from .helpers import write_txt from enum import Enum from datetime import datetime # Define...
Occasionally, we want to do a rudimentary parsing on English text; we separate the text into separate words. # INPUT STRING istring = "she sat down beside the child and sang a melody like a wind in summer blowing softly." # OUTPUT LIST olist = ["she", "sat", "down", "beside", "the", "child", "and", "sang", "a", "melo...
I would like to modify my shortest path finding code to use multithreading and improve its performance. The algorithm must be able to work with negative weights, and as a result, we cannot use Dijkstra's algorithm. Instead, our approach combines three algorithms: Bellman-Ford, SPFA_Queue (shortest path fast algorithm, ...
This is a followup to Python script that reboots the router every 600 seconds. Recently censorship in China has increased because of the meeting of heads of states, and my previous script has been rendered almost useless by the ISP. So I spent the last few hours updating the script to make it work better, so that if th...
My task is to change the architecture of a previously written application to Model-View-ViewModel and use the Command pattern. It is written in Python 3.10.6 and uses the tkinter library for the GUI. From previous research, I noticed that the core concept behind MVVM is binding: automated communication between the View...
This is my attempt to make the exercise suggested at the end of this chapter of rust's official tutorial pub fn to_pig_latin(phrase: &String) -> String { let mut result = String::new(); for word in phrase.split(" ") { let pig_latin_word = word; let first_char = match pig_latin_word.chars().nt...
I've been teaching myself C++, and I recently created a simple Image class that makes use of the XTensor library. With my Image class, users can easily read and write PNG or JPG images and convert an RGB image to a grayscale image. If you're interested, you can check out the code for yourself in this repository. Please...
I need to loop through all possible combinations of an array for a project I'm doing. I'm doing this by looping through all integers in binary from 0 to 2^length of array - 1. Then, a 0 represents to not include the item at that index, and 1 represents to include the item at that index. Here is my code: def binary_comb...
With Kubuntu 22.04 ... Questions : What is a better way than using 2 cases? The 1st case, script Line 48 "case $x in" lets user choose to clear screen or not clear. The 2nd case, script Line 86 "case $x in" performs the task, like bytes free. Any wrong field choices? that represent bytes free Any wrong field choice...
I am interested in any kind of possible improvement to this method of testing a Rust program with user interaction in an end-to-end manner (simulating user input and asserting a certain program output given a certain user input), I also added an example usage of this framework with a number guessing game for clarity. T...
I am creating a simple program with a GUI to encrypt/decrypt text using different ciphers. I tried to make it so that it would be easy to add new ciphers. This is my code: import tkinter as tk ALPHABET = "abcdefghijklmnopqrstuvwxyz" class Cipher: # encode_fun and decode_fun should take in args (key, message). ...
I think I've found a way to somewhat "compress" the length of a SHA-256 hash. I am doing some addition, so I wanted to know whether an approach like this is secure or not. const digits = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; function stringToInt(string) { const base = digits.length; ...
I am working on an arbitrary math lib. Below is a class I use to handle the binary mathematics needed for the library. The class is quite simple. All it does is wrap around a vector of any unsigned integral type designated. Which in turn support binary operations on individual bits, or whole register words. Basic b...
I call another microservice to check whether there is any holiday on any particular day. This will then add a comment in the db if the rest call doesn't fetch an empty list(a list of size 1). Here is the code in service: public void updateMeetingStatus() { List<DialogueEntity> dialogueEntities = dialogueDBR...
I've been reading Uncle Bob's Clean Code and have read many articles on the use of Optionals whenever you are faced with returning a null in a Java method. I'm currently refactoring my code and I just don't know how to optimize it with Optionals. Can someone give me some pointers? public UserLog selectById(String use...
This is a Python script I wrote to check internet download speed and upload speed. I wrote this because I live in China behind the GFW, and I use VPNs to browse international free internet, and my ISP really loves to throttle my network connection and disconnect my VPN. If the VPN is disconnected I have to reboot the r...
few months back I did a code test for a company and I quickly managed to solve it within 5-10 minutes. But, I got rejected because it wasnt "good enough". What is good enough? they said its mainly how I wrote the code and that I was missing exception handling.. Anyways I was supposed to retrieve data from an XML file a...
I'm trying to achieve a thread-safe reactive token service. The point is that all subscribers must wait until the token is received or updated (when expired). It works, but I want a second opinion about it's thread safety, as I'm not really sure how it should be done with reactive stack. The token lives 1 hour, but I u...
I want create a generic component for lazy loading other component Demo online (click on load button) https://stackblitz.com/edit/angular-v7xfwb this is the code import { Component, Injector, Input, ViewContainerRef, ViewChild, Type, createNgModule, ComponentRef, EventEmitter, OnInit, NgModule, } ...
I am trying to port a TreeBuilder Python class to C++, keeping the structure as close as possible to the original. Here is a simplified Python version: https://onlinegdb.com/I4dg0hCtg The purpose of tree is to represent a generic game tree (Chess, Go, Checkers, etc.) It is passed forward to a class (Whatever), which b...
Below is the updated binary mathematics class from the feedback provided here. It was decided that the project should simply be written with an expectation of using C++20 as the minimum version to use. The template was removed. Once removed I found there was a binary overflow happening in a bit shift that was masked b...
# Task 1: Generate 10000 random numbers from the exponential distribution with mean 2 # Set the parameters for the exponential distribution mean_exp <- 2 n <- 10000 # Generate 10000 random numbers from the exponential distribution with mean 2 random_exp <- rexp(n, rate = 1/mean_exp) # Plot a histogram of these data ...
I've been looking into ways of performing a prefix search in a large list of words (for example, return all words that start with "as"). I noticed that a Trie is recommended often for this purpose. I came up with a simple variation on the Trie-idea though. The premise of the idea is that in Python, key lookup in a dict...
Per feedback from here, below is the updated bitvector class. The class was renamed from binary_register to bitvector so as to be more meaningful in context to C++. Updated some of the class nomenclature to be more inline with standard library nomenclature. For example, the value_type was set to the bit width of the w...
I implemented the following code to retrieve medication names from a given text (prescription_text in the code). It works by matching words in the text with a list of existing medications (US_DRUGS in the code). The code is working but it's very slow since the medication list that I use is pretty big (150.000 items). I...
I wanted to try out the Nim language so I wrote a simple program to retrieve the top \$n\$ messages on a given subreddit in a given time frame and open them in the default browser. I would really appreciate your feedback on how to do things more idiomatically. import std/[strformat, rdstdin, parseutils] import std/[htt...
To fulfil the requirements of the instructions, this version of rock, paper, scissors game works by taking a number from the user and the computer to represent their hand. (0 = rock, 1 = paper, 2 = scissors) From the numbers we then get the string representations of their hands. Next, we determine the winner by compar...
Seems to work. I'm looking for tips on how to speed up the program. Tried: Running without GUI (a little faster but not as I wanted) Severity: terrible (one update per 400 ms, no wait time included) Plus very high CPU usage Purpose of the program: Measure noise exposure over time using the mic tkinter.ttk version: impo...
What I am doing here is iterating through all the files in the parentFolder and its subfolders collecting all the hashes of all the files and putting them into a dictionary where the key is the path of the file and the hash is the key: def createDicts(parentFolder): hashesDict = {} for folderName, subFolders, fileN...
The class below implements an arbitrarily sized whole number C++ class. It is wrapped around a bitvector class, which does most the binary heavy lifting. The basic mathematical operators are implemented using whole word manipulation, inspired from Modern Computer Arithmetic - Paul Zimmermann. I was unable to understand...
I have attempted to write c# bindings for a Rust library. I have never worked with unmanned code / languages before. Superficially this code does work with no apparent bugs or memory leaks. I want to know if I am correctly handling the pointers. Is it memory safe? I am running Marshal.FreeHGlobal(optionsPtr); on line 7...
This is my first question in Code Review. I apologize in advance for using Spanish (my native language). I thought there was a spanish version of Code Review. This class is meant for pagination. It produces the desired results and I forced errors to check and everything seems ok to me. Here is the code: (Edited to suit...
I know this is not necessarily a problem question but more of a style question. I understand that it doesn't have to be pretty for the most part. In general, context managers are used for mutexing, acquiring resources, and many other things. The context managers usually yield the acquired resource or just provide wrapp...
For learning purposes i wrote a Tic Tac Toe game in object oriented manner. I have question about storing players in game class - Players(cpu and human) are derived from virtual class players and stored in vector as unique pointers to common class. Is there more elegant way to achieve this? Also, feel free to point out...
A firm gave me a small take home assignment which asks you to implement text formatter. Given some text which only contains alphanumerics and spaces (only one space between words), we should align it either using one of LEFT, RIGHT or CENTER. Here's the main logic This is the header file #pragma once #include <string>...
This is a leetcode question which I wanted to solve using Rust as I'm learning Rust at the moment. I would appreciate some feedback on how to write it idiomatically. Link to the question: https://leetcode.com/problems/longest-palindromic-subsequence/ Things that I'm particularly unsure about: Should I be using String ...
I am brand new to coding, and am just working my way through the basics. This is the Day 11 project for the 100 days of code on Angela Yu's course on Udemy. I am not familiar with classes yet, so none were used. I definitely feel like I overused if elif statements, like a lot, and probably could have utilized functions...
I really like ArgumentNullException.ThrowIf(...) and ArgumentException.ThrowIfNullOrEmpty(...) and there are upcoming ones in .NET 8, so until then I created a ThrowHelper on my own. Could you please review it and tell me your opinion? Can something be improved? public static class Assertions { public static void ...
I'm making a fps game where I created a hierarchical state machine; the problem is the two types of movement (standing movement and crouching movement). They are very similar; the only difference is the velocity variable to apply the movement speed, so I decided to apply the strategy pattern and came up with this solut...
I put up my SNTP Server code for review here: SNTPv4 server based on rfc 4330 in C++ a fortnight ago and since then I have made changes as per code review comments and also added support for Windows, mostly just by adding the winsock startup and shutdown functions and I also made the Makefile work for Windows in additi...
I'm trying to chain react hooks together. I need to do the following Obtain the Balance of NFT's a user has Enumerate the balance of nft's and generate index arguments to call the RPC to get the tokenId Some form of validation or error handling This is my code: export default function useAccessPassOwnerNFTs(): { dat...
My first time writing anything significant in CUDA. This kernel takes two arrays representing square matrices and compares them pair-wise. It takes into consideration large input arrays, and calculates the appropriate number of threads on the GPU to spawn. Currently takes ~1 second to compare 10 million 2x2 matrices (s...
Could you please tell me if there's anything I could improve in my Hangman Game ? I made this Hangman Game in PyCharm and been improving and adding features for some time. It would be nice if someone from outside could look and find possible bugs or point what else could be improved. There's GitHub repo: https://github...
After reading the rust book for some time I decided to create my first program which implements a graph. There are a few things I was wondering about, such as if the file structure is appropriate (the graph.rs just containing a few mod statements feels weird). Also to store pointers to the edges I had to use Rc and I a...
the below code used to: Concatenate the values on a specific column "N" depend on the value of column "A" then delete the remaining rows. It works, but with range of 30k rows the macro takes a long time to finish (14 seconds) on powerful PC. Edit: the bottle neck is on this line .SpecialCells(xlCellTypeConstants).Ent...
I'm a noob. I wrote this code to convert bools to ints and ints to bools as a past-time but I would like to know whether to continue programming - this is the kind of thing I've been doing, no useful scripts at all. So, I wanted a program and not a module and that's why I wrote the decorator tab: for output. "|" means ...
I have this OCaml problem: Recall the polymorphic type lazy seen in class, the function delay which transforms a thunk into a lazy_t and the function force which evaluates a lazy_t. (Material seen in class) Implement: (Write a version by strict evaluation and then a version that uses lazy evaluation.) the creation o...
Trying out gRPC for the first time in a few years and looking for some feedback on the simplest of the APIs, since no one is currently using it extensively at my company and will end up pioneering its use. The API is for managing groups, i.e. you have users with UIDs and groups with GIDs. A user can belong to any numbe...
The code works fine, but I'm not sure about the way I've created different functions and called them in others. I usually separate bigquery related functions to a utility module, but since there were only a couple, I included them inside the class; I'm not sure I like them that way. Another thing I don't like is how no...
I have written the following class that acts as a simple lock for mutual exclusion: #include <atomic> #include <thread> #include <functional> #include <vector> #include <array> #include <fmt/core.h> namespace util { class [[ nodiscard ]] spinlock { public: using lockable_type = std::atomic_flag; [[ nodiscard...
I want to implement a 1D convolution in Julia using the direct calculation since the conv() function in DSP.jl uses DFT (fft) based methods. In order to make it fast, I'd like the code to be SIMD friendly (I am OK with using LoopVectorization.jl). The trivial code is: using BenchmarkTools; function _Conv1D!( vO :: Arr...
This is a follow-up question for A Summation Function For Various Type Arbitrary Nested Iterable Implementation in C++ and A recursive_transform_view Template Function Implementation. In the previous question, the implementation of recursive_sum template function performs summation operation on input container exhausti...
I recently completed the Pascal's Triangle challenge on leetcode. I would like to have my code reviewed. You don't need a leetcode account to see the description of the challenge linked above, but for completeness I'm pasting the description here. Given an integer numRows, return the first numRows of Pascal's triangle...
I was looking to learn about AI and found the traveling salesman problem very interesting. I also wanted to learn about genetic algorithms, so it was a fantastic combo. To clarify, this is my second project in Python, so the code might look ugly. I thought it would be better to have someone check the code and give me f...
When I write code, I tend to follow functional paradigms often. The main thing I try to do is use values returned from functions. What I notice though, is I end up having a sort of function argument funnel where all the functions in the chain have the same arguments. import fs from 'fs' import path from 'path' functi...
This here is the follow-up to this question. I was recommended to implement a Lockable type (similar to std::mutex) that can work with std::lock_guard, std::scoped_lock, etc. instead of unnecessarily writing a class similar to std::lock_guard (thus violating D.R.Y). The result is a class named spinlock_mutex. The below...
The Problem: I need to create a HttpService (Interface + Implementation) within an application that will be responsible for communicating with an external API service. There are three types of data that I need to download from a Data Web Store: Available Data (list of data packages that are available for purchasing) ...
I work for a non-profit that runs acoustic music camps for adults. This script queries the API for Regfox, the event registration software we use, and prints for each camp a table showing the number of spots available for each of the accommodation types we offer. All comments appreciated, especially how to make the cod...
First time I'm using Rust in one of my programs and I feel a lot can be improved. I don't have any colleagues / friends that already used Rust so this is the only way to get some validation that it's as clean as possible (which it isn't at the moment). I have quite a lot of experience in Go, Java and Node but somehow I...
I've got a series of tables with monthly data on USA regions over about 130 years, divided by either climate divisions (clim_div) or other federal standards (ncdc_fips). They all follow the same structure, with columns for region, year, and months clim_div, year, january, february, march, april, may, june, july, august...
I wrote a script that uses an uploaded excel file to import data to the database. It checks for the image first if it can be downloaded without any error then insert the rest of the data. With ten or hundred thousands of rows this takes hours. Is it possible to make it faster somehow? <?php namespace App\Services\Impo...
For a project I want to do the following: Use imagery from 17 different regions in Europe to train 17 RF classifiers Use those 17 classifiers to classify each of the regions It will be a multi-temporal classification, using greenest pixel values of 14-day time intervals from a total time range of 2018-04-01 to 2018-1...
I am using puppeteer to extract data and see when a car that meets my requirements shows up, this is what I did so far. I would like some basic syntax advice, or more advanced tips as well. I tried to follow this best practices: Give meaningful names to variables Only explain what seems not obvious Split code into fun...
In the code below, startFlow$ function that takes an input request object and subscribes to open a dialog/popup that performs a certain operation. Once the popup is closed, the openPopUp$ function will return a response. If the response is unsuccessful, a retry dialog is displayed, asking the user if they would like to...
Assume I have a type task_info that stores the task-specific data needed to execute the task. A std::vector of those is built before executing any of the individual tasks; this build-up is done in single-thread fashion. Then the parallel task execution is set up. To control access to the mutable resource (e.g. the outp...
I've created the following function that creates a cookie string for passing to cURL. It can take a nested array or object of key-value pairs. It can either create nested cookie values as JSON, or using square brackets in cookie names. Please could someone kindly: Assess whether it's functionally correct or not, does ...
There are plenty of these online already but none of them quite fit what I wanted. I've been meaning to learn some more front-end stuff so I decided to make one myself. I know some JavaScript but would consider myself an intermediate. I am definitely a beginner with HTML and CSS. The code is here on my GitHub and hoste...
I'm a bit new to SQL and I'm still learning how to efficiently use joins. I have two tables. contains Materials and Alternate Materials contains Real_ID and Materials. The code below works however I feel like this could be done more efficiently. I've been told I can do this in one join using CTE. I'm not sure how I w...
I created some classes for easier management of RabbitMQ and to practice OOP in Python. I would care about a few issues and any code advice would be appreciated :) is it a good practice to use the isinstance function in the constructor? does using the context manager in these cases close the channel? It seems to me th...
I have just started to learn to code as it always been a pipe dream of mine but I found it hard to understand, however, with the rise of LLMs I have found the experience not nearly as daunting as before. Using ChatGPT and Phind.com I finally began my programming journey and decided a good place to start would be with P...
I am working on a project that requires me to write VBA code which, upon a button press, loads the data from certain files in a given directory. In my testing, I was able to load the data from 1100 files in about 5 minutes which is not bad. I would, however, like it to be faster if possible. I am very new to VBA so I d...
This is my code, I like to put a console log so I know when stuff is rendering. const SignUpStepTwoPrivate = ({ route, navigation }) => { console.log( " %%%%%%%%%%%%%%%%%%%%%%% Sign Up Step Two rendered! %%%%%%%%%%%%%%%%%%%%%%" ); //TODO the watch(password) is re-rendering every input. const { width } = use...