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 |
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
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
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 Cliente implements Cloneable { | |
int rut; | |
String nombre; | |
Cliente(int rut, String nombre) { | |
this.rut = rut; | |
this.nombre = nombre; |
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
#include <pthread.h> | |
#include <stdio.h> | |
int *dowork(void *arg) | |
{ | |
pthread_t mythreadid = pthread_self(); | |
for (int i = 0; i < 5; i++) { | |
printf("Thread id: %lu, counter: %d, code: %s\n", mythreadid, i, (char *)arg); | |
} | |
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
<dependency> | |
<groupId>com.doctusoft</groupId> | |
<artifactId>json-schema-java7</artifactId> | |
<version>1.4.1</version> | |
</dependency> |
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
{ | |
"$schema": "http://json-schema.org/draft-04/schema#", | |
"id_schema": "1", | |
"title": "Journal nuevo", | |
"description": "persistencia en el modelo de Journal", | |
"version": "1.0.0", | |
"type": "object", | |
"definitions": { | |
"dataAuditoria": { |
NewerOlder