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
| pub fn col_to_num(column_title: &str) -> i32 { | |
| column_title | |
| .chars() | |
| .rev() | |
| .map(|char| char as u8 - b'A' + 1) | |
| .enumerate() | |
| .map(|(idx, value)| 26i32.pow(idx as u32) * value as i32) | |
| .sum::<i32>() | |
| } |
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
| use std::ops::Range; | |
| #[derive(Debug, Clone)] | |
| pub struct Event { | |
| initial_index: usize, | |
| placement_index: u32, | |
| size_at_calculation: u32, | |
| range: Range<u32>, | |
| } |
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
| use std::io::stdin; | |
| fn main() { | |
| let mut lines = stdin().lines().filter_map(|val| val.ok()); | |
| let count: usize = lines.next().unwrap().parse().unwrap(); | |
| for _ in 0..count { | |
| let first = lines.next().unwrap(); | |
| let mut parts = first.split(' '); |
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
| use std::io::stdin; | |
| fn main() { | |
| // Do a little parsing | |
| let mut lines = stdin().lines(); | |
| let first_line = lines.next().unwrap().unwrap(); | |
| let mut first_line_parts = first_line.split(" "); | |
| // Get the number of steps and trails from the input | |
| let num_steps: usize = first_line_parts.next().unwrap().parse().unwrap(); |
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
| use std::{marker::PhantomPinned, pin::Pin}; | |
| pub struct Node<T> { | |
| value: T, | |
| next: Option<Box<Node<T>>>, | |
| prev: Option<*mut Node<T>>, | |
| _pantom: PhantomPinned, | |
| } | |
| pub struct List<T> { |
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
| fn main() { | |
| println!("{}", how_many_in_common("january february march")); | |
| } | |
| fn how_many_in_common(input: &str) -> u32 { | |
| let words = input.split(" "); | |
| let mut combined = 0x3ffffff; | |
| for word in words { |
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
| use std::{ io::{ stdin, stdout, Write } }; | |
| fn main() { | |
| let mut input = String::new(); | |
| print!("Please enter the sentence: "); | |
| stdout().lock().flush().expect("Could not write the prompt"); | |
| stdin().read_line(&mut input).expect("Could not get input"); |
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
| [{"id":88024,"date":"2023-02-02T18:38:01","date_gmt":"2023-02-02T23:38:01","guid":{"rendered":"https:\/\/www.apsva.us\/?post_type=mat_alert&p=88024"},"modified":"2023-02-02T18:38:01","modified_gmt":"2023-02-02T23:38:01","slug":"wakefield-high-school-will-be-closed-for-instruction-tomorrow-fri-feb-3-2023-we-will-keep-the-building-open-during-normal-hours-to-provide-counseling-services-and-mental-health-support-for-stu","status":"publish","type":"mat_alert","link":"https:\/\/www.apsva.us\/?mat_alert=wakefield-high-school-will-be-closed-for-instruction-tomorrow-fri-feb-3-2023-we-will-keep-the-building-open-during-normal-hours-to-provide-counseling-services-and-mental-health-support-for-stu","title":{"rendered":"Wakefield High School will be closed for instruction tomorrow, Fri, Feb. 3, 2023. We will keep the building open during normal hours to provide counseling services and mental health support for students and staff who may need help processing this week\u2019s incidents. CIGNA Employee Assistance Pr |
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
| [ | |
| { | |
| "day": "Dark Chocolate Day", | |
| "position": [245, 280], | |
| "info": "This state eats the most chocolate", | |
| "date": 1 | |
| }, | |
| { | |
| "day": "Ground Hogs Day", | |
| "position": [800, 222], |
NewerOlder