This file contains hidden or 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
| #!/bin/bash | |
| # Colors for output | |
| RED='\033[0;31m' | |
| GREEN='\033[0;32m' | |
| YELLOW='\033[1;33m' | |
| NC='\033[0m' # No Color | |
| echo "=== Android SDK Environment Check ===" | |
| echo "" |
This file contains hidden or 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 | |
| placeholder="https://my-project.com" | |
| // this example was from using shadcn/ui forms | |
| {...field} | |
| onFocus={e => { | |
| if (!e.target.value) form.setValue("website", "https://"); | |
| }} | |
| onBlurCapture={e => { | |
| if ( | |
| !e.target.value || |
This file contains hidden or 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
| /// Calculate and log the consumed compute units for a block of code | |
| /// | |
| /// Note: Syscalls cost [100 CU](https://github.com/anza-xyz/agave/blob/d88050cda335f87e872eddbdf8506bc063f039d3/program-runtime/src/compute_budget.rs#L150) | |
| /// It is also not accessible via a program: https://solana.stackexchange.com/questions/19024/how-can-a-rust-program-get-access-to-the-syscall-base-cost-value | |
| #[macro_export] | |
| macro_rules! compute_usage_cost { | |
| // Log with a custom message | |
| ( | |
| $msg:expr => $($tt:tt)* | |
| ) => { |