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
| package cl.devweb.constructor; | |
| public class ClienteClonePoc { | |
| public static void main(String[] args) { | |
| try { | |
| Cliente cliente1 = new Cliente(1, "joe"); | |
| Cliente cliente2 = (Cliente) cliente1.clone(); |
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
| package cl.devweb.constructor; | |
| public class CopyConstructorPocLombok { | |
| public static void main(String[] args) { | |
| Premium premium1 = new Premium("pi", 3.14); | |
| Premium premium2 = premium1.toBuilder().build(); //copy constructor | |
| Premium premium3 = premium1; |
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 time | |
| import gym | |
| #env = gym.make('MsPacman-v4') | |
| env = gym.make('MsPacman-v4', render_mode='human') | |
| num_episodes = 10 | |
| for i in range(1, num_episodes): | |
| state = env.reset() | |
| totalReward = 0 |
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
| // Program x.y An austere program using C pointers. | |
| /* | |
| 1. num's address: 0x7ffe83ecb46c | |
| 2. num's value: 13 | |
| 3. pt's address: 0x7ffe83ecb470 | |
| 4. pt' size: 8 bytes | |
| 5. pt's value: 0x7ffe83ecb46c | |
| 6. value pointed to: 13 | |
| 7. new num value to: 18 |
OlderNewer