07 May 2021

Solution to double partition Alphametics

Solution to double partition Alphametics, Knuth Donald, The Art of Computer Programming, Pre-Fascicle 2b, Generating All Permutations, Addison-Wesley, 12 June 2004, p. 42. http://www-cs-faculty.stanford.edu/~knuth/taocp.html#vol4

18 February 2021

Apócope

En gramática, una apócope (del griego apokopé < apokopto, "cortar") es un metaplasmo donde se produce la pérdida o desaparición de uno o varios fonemas o sílabas al final de algunas palabras. Cuando la pérdida se produce al principio de la palabra se denomina aféresis, y si la pérdida tiene lugar en medio de la palabra se llama síncopa. Es una figura de dicción según la preceptiva tradicional. 

 

https://es.wikipedia.org/wiki/Ap%C3%B3cope

09 February 2021

Swagger to PDF/HTML5

     Pasos swagger:


    We need to have installed the following tools: swagger2markup and asciidoctor

  • brew install asciidoctor
  • brew install swagger2markup-cli    
  1.     get swagger.json with springboot up&running:
        http://127.0.0.1:8080/v2/api-docs
  2.     copy swagger.json
  3.     mkdir adocs
  4.     swagger2markup convert -i swagger.json -d adocs
  5.     modify overview.adoc (title =)
  6.     asciidoctor index.adoc
  7.     asciidoctor-pdf index.adoc



    $  cat index.adoc
    :doctype: book
    :toc: left
    :toclevels: 3
    :numbered:
    :hardbreaks:
    :sectlinks:
    :sectanchors:

    include::./overview.adoc[]
    include::./paths.adoc[]
    include::./security.adoc[]
    include::./definitions.adoc[]


29 January 2021

ICMP - Internet Control Message Protocol

https://stackoverflow.com/questions/21981796/cannot-ping-aws-ec2-instance

Add a new EC2 security group inbound rule:

  • Type: Custom ICMP rule
  • Protocol: Echo Request
  • Port: N/A
  • Source: your choice (I would select Anywhere to be able to ping from any machine)
The related ping utility is implemented using the ICMP echo request and echo reply messages. 
 
https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol

Function: Send ICMP ECHO_REQUEST to network hosts
Syntax: ping [-aAbBdDfhLnOqrRUvV6] [-c count] [-F...

 


14 January 2021

Java Copy Constructor

Sometimes we need to clone an object in Java, but not a reference (a junior developer may use). There are several ways to achieve this task; however, I recommend to use a copy-constructor (that comes from C++) and, in particular, using @Builder from Lombok (to avoid boilerplate code))

 



Blog Archive

Disclaimer

Qux