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
| // | |
| // Hexagon.swift | |
| // Planzu | |
| // | |
| // Created by Manuel Hernandez on 6/2/25. | |
| // | |
| import SwiftUI | |
| struct HexGridView: View { | |
| let colors: [Color] |
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
| // 🧠 Overload Recovery Kit | |
| // 1. Label It, Don’t Fight It - write one honest sentence. | |
| // “Okay, my brain just hit overload. That’s fine. That’s a signal, not a failure.” | |
| // 2. Micro-Reset (30–60 seconds) | |
| // - Stretch | |
| // - 4–4–4–4 breathing (in, hold, out, hold) | |
| // - Name 3 things I’ve done right today | |
| // - Look at something real (tree, window, sky) |
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
| myObjectOfItems = myArray.reduce((obj, item) => { | |
| obj[item['propertyToIsolate']] = null | |
| return obj | |
| }, {}); |
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
| return new Promise((resolve, reject) => { | |
| fetch("/api/v1/principal", { | |
| method: 'GET', | |
| headers: { | |
| 'Content-Type': 'application/json', | |
| 'Authorization': 'Bearer ' + access_token, | |
| } | |
| }) | |
| .then(result => { |
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
| import AsyncStorage from '@react-native-community/async-storage'; | |
| export default class CompanyDal{ | |
| constructor(){ | |
| this.readCompany = this.readCompany.bind(this); | |
| this.reset = this.reset.bind(this); | |
| this.initialize = this.initialize.bind(this); |
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
| const filterThings = (filter_word, things) =>{ | |
| //console.log('filtering on ', filter_word); | |
| let filteredThings = things.filter(thing => { | |
| return thing.startsWith(filter_word); | |
| }); | |
| return filteredThings.sort(); | |
| } | |
| export default filterThings; |
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
| onAutocompleteFocus(){ | |
| this.setState({defaultValue:'@'}); | |
| this.setState({hideSuggestions:false}); | |
| } | |
| onAutocompleteTextChange(context_value){ | |
| let suggestions = this.state.suggestions; | |
| let newSuggestions = suggestions.filter(suggestion => { | |
| return suggestion.startsWith(context_value); | |
| }); | |
| this.setState({context_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
| brightnessByColor(color) { | |
| let luminance = 0; | |
| const isHEX = color.indexOf("#") == 0; | |
| const isRGB = color.indexOf("rgb") == 0 | |
| let m, r, g, b; | |
| if (isHEX) { | |
| m = color.substr(1).match(color.length == 7 ? /(\S{2})/g : /(\S{1})/g); | |
| if (m) { | |
| r = parseInt(m[0], 16); |
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 brightness value by RGB or HEX color. | |
| * @param color (String) The color value in RGB or HEX (for example: #000000 || #000 || rgb(0,0,0) || rgba(0,0,0,0)) | |
| * @returns (Number) The brightness value (dark) 0 ... 255 (light) | |
| */ | |
| function brightnessByColor (color) { | |
| var color = "" + color, isHEX = color.indexOf("#") == 0, isRGB = color.indexOf("rgb") == 0; | |
| if (isHEX) { | |
| var m = color.substr(1).match(color.length == 7 ? /(\S{2})/g : /(\S{1})/g); | |
| if (m) var r = parseInt(m[0], 16), g = parseInt(m[1], 16), b = parseInt(m[2], 16); |
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
| import React from 'react'; | |
| export default class Home extends React.Component{ | |
| render(){ | |
| return() | |
| } | |
| } |
NewerOlder