What's Eating my RAM?
© 2024 Bloomberg Finance L.P.© 2024 Bloomberg Finance L.P. What’s Eating My RAM? CppCon 2024 September 17, 2024 Jianfei Pan Software Engineer, Portfolio/Risk AnalyticsA story 🚨 90% Memory Used: What’s0 码力 | 88 页 | 3.49 MB | 5 月前3The PHP Handbook
method: class Animal { public $age; public function eat() { echo 'the animal is eating'; } } A dog is an animal and has an age and can eat too, so the Dog class instead of reimplementing public function eat() { echo 'the animal is eating'; } } class Dog extends Animal { public function eat() { echo 'the dog is eating'; } } Now any instance of Dog will use want to have a Status enum that has 3 states: EATING SLEEPING RUNNING , the 3 states of a dog’s day. So you have: enum Status { case EATING; case SLEEPING; case RUNNING; } Now0 码力 | 97 页 | 8.78 MB | 1 年前3The Python Handbook
Operator Overloading 44. Virtual Environments 1. Introduction to Python 5 Python is literally eating the programming world. It is growing in popularity and usage in ways that are pretty much unprecedented different classes: 88 class Dog: def eat(): print('Eating dog food') class Cat: def eat(): print('Eating cat food') Then we can generate objects and we can call the0 码力 | 93 页 | 7.31 MB | 1 年前3Comprehensive Rust(English) 202412
will only be available when their two nearest neighbors are thinking, not eating. After an individual philosopher finishes eating, they will put down both forks. You will need a local Cargo installation has a new idea!", &self.name)) .unwrap(); } fn eat(&self) { // Pick up forks... println!("{} is eating...", &self.name); thread::sleep(Duration::from_millis(10)); } } static PHILOSOPHERS: &[&str] = = self.left_fork.lock().unwrap(); let _right = self.right_fork.lock().unwrap(); println!("{} is eating...", &self.name); thread::sleep(Duration::from_millis(10)); } } static PHILOSOPHERS: &[&str] =0 码力 | 382 页 | 1.00 MB | 10 月前3Comprehensive Rust ?
will only be available when their two nearest neighbors are thinking, not eating. After an individual philosopher finishes eating, they will put down both forks. You will need a local Cargo installation has a new idea!", &self.name)) .unwrap(); } fn eat(&self) { // Pick up forks... println!("{} is eating...", &self.name); thread::sleep(Duration::from_millis(10)); } } static PHILOSOPHERS: &[&str] = = self.left_fork.lock().unwrap(); let _right = self.right_fork.lock().unwrap(); println!("{} is eating...", &self.name); thread::sleep(Duration::from_millis(10)); } } static PHILOSOPHERS: &[&str] =0 码力 | 378 页 | 1009.46 KB | 1 年前3Comprehensive Rust(Persian ) 202412
, & self.name ( ( . unwrap ) ( ; { fn eat(&self ( } / / Pick up forks . . . println!("{} is eating...", &self.name ( ; thread::sleep(Duration::from_millis(10 ( ( ; { { static PHILOSOPHERS: &[&str left_fork.lock().unwrap ) ( ; let _right = self.right_fork.lock().unwrap ) ( ; println!("{} is eating...", &self.name ( ; thread::sleep(Duration::from_millis(10 ( ( ; { { static PHILOSOPHERS: &[&str unwrap ) ( ; { async fn eat(&self ( } / / Keep trying until we have both forks println!("{} is eating...", &self.name ( ; time::sleep(time::Duration::from_millis(5)).await ; { { static PHILOSOPHERS:0 码力 | 393 页 | 987.97 KB | 10 月前3Comprehensive Rust(简体中文) 202412
has a new idea!", &self.name)) .unwrap(); } fn eat(&self) { // Pick up forks... println!("{} is eating...", &self.name); thread::sleep(Duration::from_millis(10)); } } static PHILOSOPHERS: &[&str] = = self.left_fork.lock().unwrap(); let _right = self.right_fork.lock().unwrap(); println!("{} is eating...", &self.name); thread::sleep(Duration::from_millis(10)); } } static PHILOSOPHERS: &[&str] = unwrap(); } 342 async fn eat(&self) { // Keep trying until we have both forks println!("{} is eating...", &self.name); time::sleep(time::Duration::from_millis(5)).await; } } static PHILOSOPHERS:0 码力 | 359 页 | 1.33 MB | 10 月前3Comprehensive Rust(繁体中文)
new idea!", &self.name)) 317 .unwrap(); } fn eat(&self) { // Pick up forks... println!("{} is eating...", &self.name); thread::sleep(Duration::from_millis(10)); } } static PHILOSOPHERS: &[&str] = = self.left_fork.lock().unwrap(); let _right = self.right_fork.lock().unwrap(); println!("{} is eating...", &self.name); thread::sleep(Duration::from_millis(10)); } } static PHILOSOPHERS: &[&str] = unwrap(); } 342 async fn eat(&self) { // Keep trying until we have both forks println!("{} is eating...", &self.name); time::sleep(time::Duration::from_millis(5)).await; } } static PHILOSOPHERS:0 码力 | 358 页 | 1.41 MB | 10 月前3Comprehensive Rust(繁体中文) 202406
new idea!", &self.name)) 315 .unwrap(); } fn eat(&self) { // Pick up forks... println!("{} is eating...", &self.name); thread::sleep(Duration::from_millis(10)); } } static PHILOSOPHERS: &[&str] = = self.left_fork.lock().unwrap(); let _right = self.right_fork.lock().unwrap(); println!("{} is eating...", &self.name); thread::sleep(Duration::from_millis(10)); } } static PHILOSOPHERS: &[&str] = unwrap(); } 340 async fn eat(&self) { // Keep trying until we have both forks println!("{} is eating...", &self.name); time::sleep(time::Duration::from_millis(5)).await; } } static PHILOSOPHERS:0 码力 | 356 页 | 1.41 MB | 1 年前3Pomodoro Technique
or DND • No non-task related browsing • No bathroom breaks* • No conversations • No meetings • No eating • No preening How does it work? 1. Choose a task you’d like to get done 2. Set the Pomodoro for0 码力 | 3 页 | 289.16 KB | 5 月前3
共 106 条
- 1
- 2
- 3
- 4
- 5
- 6
- 11