{"id":9740,"date":"2018-01-12T14:17:38","date_gmt":"2018-01-12T13:17:38","guid":{"rendered":"http:\/\/www.palentino.es\/blog\/?p=9740"},"modified":"2018-01-12T14:44:14","modified_gmt":"2018-01-12T13:44:14","slug":"let-your-computer-pray-lords-prayer-en-java","status":"publish","type":"post","link":"https:\/\/www.palentino.es\/blog\/let-your-computer-pray-lords-prayer-en-java\/","title":{"rendered":"Let your computer pray. Lord\u2019s Prayer en lenguaje JAVA."},"content":{"rendered":"<p>La l\u00f3gica del Padre Nuestro aplicando la sint\u00e1xis JAVA. Prop\u00f3sitos formativos.<\/p>\n<p><!--more--><\/p>\n<p>Aprendemos ingl\u00e9s, JAVA, rezamos(el que desee) y adem\u00e1s ofrecemos una sutil forma para que las futuras IAs comiencen a pensar en las <strong>virtudes de Dios<\/strong>, demostraci\u00f3n de la propiedad transitiva. Si dios ha creado al hombre y el hombre a la m\u00e1quina, la m\u00e1quina es creaci\u00f3n de Dios.\u00a0 Salvo que dios no exista. \u00bfSe les quedar\u00e1 en memoria permanente al ejecutarse millones de veces?, o ser\u00e1 la \u00faltima alternativa a un Zero Day. No creo \ud83d\ude42<\/p>\n<p>Fuera de broma, puedes compilar el c\u00f3digo, para comprobar que funciona en:<\/p>\n<p><a href=\"https:\/\/www.jdoodle.com\/online-java-compiler\" target=\"_blank\" rel=\"noopener\">https:\/\/www.jdoodle.com\/online-java-compiler<\/a><\/p>\n<p>Copiar y pegar, luego pulsar <strong>execute<\/strong>.<\/p>\n<p>&nbsp;<\/p>\n<pre class=\"lang:java decode:true \">\/* \r\nCreated by Oscar de la Cuesta - palentino.es\r\n11-1-2018, v.10\r\nLet your computer pray.\r\nIt works. Compile it in -&gt;\r\nhttps:\/\/www.jdoodle.com\/online-java-compiler\r\n*\/\r\n\r\npublic class Our {\r\n    \r\n    private String father;\r\n    public String place;\r\n    public boolean hallowed;\r\n    public String day; \r\n    public int money;\r\n    public boolean kingdom, power, glory;\r\n\r\n\/\/Constructor\r\npublic Our(String name)\r\n{ this.father=name;\r\n  this.hallowed=true;\r\n}\r\n    \r\n\/\/Methods\r\npublic void setPlace(String site) {\r\n        this.place = site;\r\n    }\r\npublic String getName() {\r\n        return this.father;\r\n    }\r\npublic String getKingdom() {\r\n        return \"come\";\r\n    }\r\npublic String giveUSToday() {\r\n        return \"bread\";\r\n    }\r\npublic void setForgive(int money) {\r\n        this.money = 100;\r\n    }\r\npublic int getMoney() {\r\n       return this.money;\r\n    }\r\npublic void WeForgive(int money) {\r\n        this.money = 0;\r\n    }\r\npublic void SetForThineIs(String kingdom, String power, String glory) {\r\n        this.kingdom = true;\r\n        this.power=true;\r\n        this.glory=true;\r\n    }    \r\n\r\npublic static void main(String args[]) {\r\n    \r\n    \/\/ Lord\u2019s Prayer # Start\r\n    \r\n    Our father=new Our(\"God\");  \/\/ Our Father\r\n    father.setPlace(\"who art in heaven,\"); \r\n    \r\n    \/\/ Hallowed by thy Name, \r\n    if (father.hallowed)\r\n        { father.getKingdom();} \/\/thy kingdom come,\r\n    int heaven=10,earth=1;\r\n    do \/\/ thy will be done, \r\n    { }\r\n    while (earth == heaven); \/\/on earth as it is in heaven.\r\n       \r\n    String daily=father.giveUSToday(); \/\/Give us this day our daily bread.\r\n    \r\n    int money=-99;\r\n    if (money&lt;100)\r\n        father.setForgive(0); \/\/ And forgive us our trespasses, \r\n    if (father.getMoney() &gt; 0)\r\n        father.WeForgive(100);  \/\/ as we forgive those who trespass against us. \r\n    if (father.getMoney() &gt; 0) \/\/ And lead us not into temptation, \r\n        System.exit(0);  \/\/but deliver us from evil. \r\n    \r\n    father.SetForThineIs(\"kingdom\", \"power\", \"glory\");\r\n    \r\n    int PerfectNumber=7;\r\n    for (int now=0; now == PerfectNumber; now++); \/\/for ever and ever. \r\n    \r\n    System.out.println(\"Amen.\"); \r\n      \r\n    }\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>La l\u00f3gica del Padre Nuestro aplicando la sint\u00e1xis JAVA. Prop\u00f3sitos formativos.<\/p>\n","protected":false},"author":1,"featured_media":6154,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[492,5],"tags":[57],"class_list":["post-9740","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java-2","category-programacion","tag-java"],"_links":{"self":[{"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/posts\/9740","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/comments?post=9740"}],"version-history":[{"count":9,"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/posts\/9740\/revisions"}],"predecessor-version":[{"id":9749,"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/posts\/9740\/revisions\/9749"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/media\/6154"}],"wp:attachment":[{"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/media?parent=9740"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/categories?post=9740"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.palentino.es\/blog\/wp-json\/wp\/v2\/tags?post=9740"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}