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 java.util.List; | |
import java.util.function.Predicate; | |
public interface FilterStreamExample { | |
static void main(String... args) { | |
var languages = List.of("Rust", "Java", "C", "Pascal"); | |
Predicate<String> filter1 = str -> str.length() >= 4; | |
Predicate<String> filter2 = str -> str.contains("a"); | |
var filtered = languages.stream() |
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 java.util.function.Consumer; | |
public interface BinaryTreeExample { | |
static void main(String... args) { | |
BinaryNode<Integer> root = new BinaryNode<>(10); | |
root.addItem(3); | |
root.addItem(13); | |
root.addItem(1); | |
root.addItem(8); |
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
# Importamos las librerías necesarias | |
import pandas as pd | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from sklearn.linear_model import LinearRegression | |
# Definimos las variables | |
fecha = pd.to_datetime(["2023-01-01", "2023-02-01", "2023-03-01", "2023-04-01", "2023-05-01", "2023-06-01", "2023-07-01", "2023-08-01", "2023-09-01", "2023-10-01", "2023-11-01", "2023-12-01"]) | |
monedas_contadas = [10050, 10000, 10150, 11200, 11200, 10010, 10020, 10210, 10100, 10050, 10010, 11000] | |
averias = [0.1, 0, 1, 0.8, 0.1, 0.4, 0.2, 0, 1, 0.1, 0.2, 0.1] |
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
version: '3.8' | |
services: | |
mysql-liferay: | |
image: mysql:latest | |
container_name: 'mysql-liferay-tutorial' | |
environment: | |
MYSQL_ROOT_PASSWORD: root | |
TZ: America/Lima | |
MYSQL_USER: lportal | |
MYSQL_PASSWORD: lportal |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<Context> | |
<!-- Default set of monitored resources. If one of these changes, the --> | |
<!-- web application will be reloaded. --> | |
<WatchedResource>WEB-INF/web.xml</WatchedResource> | |
<WatchedResource>WEB-INF/tomcat-web.xml</WatchedResource> | |
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource> | |
<!-- Uncomment this to disable session persistence across Tomcat restarts --> |
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 com.apuntesdejava.ejemplos; | |
import java.time.LocalDate; | |
import java.time.Month; | |
public class Ejemplos { | |
public static void main(String[] args) { | |
var p = Person | |
.createPersonBuilder() |
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
<!doctype html> | |
<html lang="es"> | |
<head> | |
<title> | |
Ejemplo de Cargue de archivo | |
</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css" rel="stylesheet" | |
integrity="sha384-gH2yIJqKdNHPEq0n4Mqa/HGKIhSkIHeL5AyhkYV8i59U5AR6csBvApHHNl/vI1Bx" crossorigin="anonymous"> |
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
/* | |
* File: clases_example.cpp | |
* Author: diego | |
* | |
* Created on 21 de junio de 2022, 14:16 | |
*/ | |
#include <cstdlib> | |
#include <string> | |
#include <iostream> |
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
/* | |
* File: binary_tree_example.c | |
* Author: diego | |
* | |
* Created on 20 de junio de 2022, 19:04 | |
* | |
* Este es un ejemplo de un árbol binario con elementos de tipo entero. | |
* Luego hace un recorrido preorder, inorder y luego postorder para mostrar | |
* el contenido de los elementos. | |
*/ |
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 <stdio.h> | |
#include <stdlib.h> | |
/* | |
* Ejemplos de variables de punteros | |
*/ | |
int main(int argc, char** argv) { | |
int a = 10; // este es una variable | |
int b = a; // b tiene el valor de a | |
b = 20; // b tiene un nuevo valor |
NewerOlder