This file contains 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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains 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; | |
public class Streams { | |
public static void main(String[] args) { | |
List<Pizza> pizzaList = Arrays.asList( | |
new Pizza("Básica", Size.SMALL, 600), | |
new Pizza("Familiar", Size.LARGE, 1800), | |
new Pizza("Vegetariana", Size.LARGE, 860), | |
new Pizza("Solo queso", Size.MEDIUM, 1000), |
This file contains 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
object Zipper extends App { | |
val l1 = Seq(1, 2, 3, 4) | |
val l2 = Seq(1, 2) | |
val l3 = Seq(1, 2, 3, 4, 9) | |
val l4 = Seq(1, 2, 3) | |
val maxSize = Seq(l1.size, l2.size, l3.size, l4.size) |
This file contains 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.awt.*; | |
import java.awt.image.BufferedImage; | |
public class ArteAscii { | |
/* | |
* Problema: 6. Ascii art | |
* | |
* Escriba un método que muestre en pantalla un dibujo en arte ASCII de su elección. | |
* Cree también el método main que invoca al método anterior. | |
*/ |
This file contains 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
[ | |
{ | |
"category": "C", | |
"price": 539.0772150437717 | |
}, | |
{ | |
"category": "B", | |
"price": 743.6677612263602 | |
}, | |
{ |
This file contains 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
{"data":{"deleted":false,"_id":"5e547ecfc653490012dd1647","order":7,"title":"Vida Familiar y Personal","description":"A continuación, encontrará preguntas que se relacionan con aspectos de su vida familiar y personal:","questions":[{"valueSource":{"list":{"name":"5da68d65a3df0100104302d2","values":[{"deleted":false,"_id":"5da68d65a3df0100104302d4","key":"0","value":"Nunca","name":"5da68d65a3df0100104302d2","createdAt":"2019-10-16T03:24:21.513Z","__v":0},{"deleted":false,"_id":"5da68d65a3df0100104302d5","key":"1","value":"Rara vez","name":"5da68d65a3df0100104302d2","createdAt":"2019-10-16T03:24:21.513Z","__v":0},{"deleted":false,"_id":"5da68d65a3df0100104302d6","key":"2","value":"Algunas veces","name":"5da68d65a3df0100104302d2","createdAt":"2019-10-16T03:24:21.513Z","__v":0},{"deleted":false,"_id":"5da68d65a3df0100104302d7","key":"3","value":"Con frecuencia","name":"5da68d65a3df0100104302d2","createdAt":"2019-10-16T03:24:21.513Z","__v":0},{"deleted":false,"_id":"5da68d65a3df0100104302d8","key":"4","value":"Cas |
This file contains 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
{"data":{"deleted":false,"_id":"5e547ecfc653490012dd1647","order":7,"title":"Vida Familiar y Personal","description":"A continuación, encontrará preguntas que se relacionan con aspectos de su vida familiar y personal:","questions":[{"valueSource":{"list":{"name":"5da68d65a3df0100104302d2","values":[{"deleted":false,"_id":"5da68d65a3df0100104302d4","key":"0","value":"Nunca","name":"5da68d65a3df0100104302d2","createdAt":"2019-10-16T03:24:21.513Z","__v":0},{"deleted":false,"_id":"5da68d65a3df0100104302d5","key":"1","value":"Rara vez","name":"5da68d65a3df0100104302d2","createdAt":"2019-10-16T03:24:21.513Z","__v":0},{"deleted":false,"_id":"5da68d65a3df0100104302d6","key":"2","value":"Algunas veces","name":"5da68d65a3df0100104302d2","createdAt":"2019-10-16T03:24:21.513Z","__v":0},{"deleted":false,"_id":"5da68d65a3df0100104302d7","key":"3","value":"Con frecuencia","name":"5da68d65a3df0100104302d2","createdAt":"2019-10-16T03:24:21.513Z","__v":0},{"deleted":false,"_id":"5da68d65a3df0100104302d8","key":"4","value":"Cas |
This file contains 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 com.google.common.base.Preconditions; | |
import lombok.EqualsAndHashCode; | |
import lombok.ToString; | |
import java.math.BigDecimal; | |
@ToString | |
@EqualsAndHashCode | |
public class Price { | |
// factory |
This file contains 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"?> | |
<configuration> | |
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> | |
<file>myapp.log</file> | |
<immediateFlush>false</immediateFlush> | |
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> | |
<fileNamePattern>myapp_%d{yyyy-MM-dd}.log</fileNamePattern> | |
</rollingPolicy> | |
<encoder> |
This file contains 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
public static Date atStartOfDay(Date date) { | |
LocalDateTime localDateTime = dateToLocalDateTime(date); | |
LocalDateTime startOfDay = localDateTime.with(LocalTime.MIN); | |
return localDateTimeToDate(startOfDay); | |
} | |
public static Date atEndOfDay(Date date) { | |
LocalDateTime localDateTime = dateToLocalDateTime(date); | |
LocalDateTime endOfDay = localDateTime.with(LocalTime.MAX); | |
return localDateTimeToDate(endOfDay); |
NewerOlder