[{"data":1,"prerenderedAt":515},["ShallowReactive",2],{"i-lucide:menu":3,"i-lucide:arrow-up-right":8,"i-lucide:moon":10,"i-lucide:sun":12,"i-lucide:rss":14,"i-simple-icons:github":16,"i-simple-icons:linkedin":18,"post-\u002F2010\u002Fcoffee-or-tea-thats-the-question":21,"surround-\u002F2010\u002Fcoffee-or-tea-thats-the-question":75,"i-lucide:arrow-left":84,"i-lucide:arrow-right":86,"gist-2656972":88},{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":7},0,24,false,"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M4 5h16M4 12h16M4 19h16\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":9},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M7 7h10v10M7 17L17 7\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":11},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":13},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Ccircle cx=\"12\" cy=\"12\" r=\"4\"\u002F>\u003Cpath d=\"M12 2v2m0 16v2M4.93 4.93l1.41 1.41m11.32 11.32l1.41 1.41M2 12h2m16 0h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41\"\u002F>\u003C\u002Fg>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":15},"\u003Cg fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\">\u003Cpath d=\"M4 11a9 9 0 0 1 9 9M4 4a16 16 0 0 1 16 16\"\u002F>\u003Ccircle cx=\"5\" cy=\"19\" r=\"1\"\u002F>\u003C\u002Fg>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":17},"\u003Cpath fill=\"currentColor\" d=\"M12 .297c-6.63 0-12 5.373-12 12c0 5.303 3.438 9.8 8.205 11.385c.6.113.82-.258.82-.577c0-.285-.01-1.04-.015-2.04c-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729c1.205.084 1.838 1.236 1.838 1.236c1.07 1.835 2.809 1.305 3.495.998c.108-.776.417-1.305.76-1.605c-2.665-.3-5.466-1.332-5.466-5.93c0-1.31.465-2.38 1.235-3.22c-.135-.303-.54-1.523.105-3.176c0 0 1.005-.322 3.3 1.23c.96-.267 1.98-.399 3-.405c1.02.006 2.04.138 3 .405c2.28-1.552 3.285-1.23 3.285-1.23c.645 1.653.24 2.873.12 3.176c.765.84 1.23 1.91 1.23 3.22c0 4.61-2.805 5.625-5.475 5.92c.42.36.81 1.096.81 2.22c0 1.606-.015 2.896-.015 3.286c0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":19,"hidden":20},"\u003Cpath fill=\"currentColor\" d=\"M20.447 20.452h-3.554v-5.569c0-1.328-.027-3.037-1.852-3.037c-1.853 0-2.136 1.445-2.136 2.939v5.667H9.351V9h3.414v1.561h.046c.477-.9 1.637-1.85 3.37-1.85c3.601 0 4.267 2.37 4.267 5.455v6.286zM5.337 7.433a2.06 2.06 0 0 1-2.063-2.065a2.064 2.064 0 1 1 2.063 2.065m1.782 13.019H3.555V9h3.564zM22.225 0H1.771C.792 0 0 .774 0 1.729v20.542C0 23.227.792 24 1.771 24h20.451C23.2 24 24 23.227 24 22.271V1.729C24 .774 23.2 0 22.222 0z\"\u002F>",true,{"id":22,"title":23,"body":24,"category":59,"comments":60,"date":61,"description":30,"excerpt":60,"extension":62,"image":60,"meta":63,"navigation":20,"path":64,"readingTime":65,"seo":66,"stem":67,"subtitle":60,"tags":68,"wordCount":73,"__hash__":74},"posts\u002F2010\u002Fcoffee-or-tea-thats-the-question.md","Coffee or Tea, that's the question...",{"type":25,"value":26,"toc":55},"minimark",[27,31,34,40,43,48,51],[28,29,30],"p",{},"Have you ever caught yourself pondering over the following question: \"Do I want to drink coffee or tea at the moment?\"",[28,32,33],{},"If the answer is YES, fear no more! The following Java applet has the answer. Just click on the link below to get a 99.9% accurate recommendation on which beverage you secretly crave at the moment.",[28,35,36],{},[37,38,39],"em",{},"[Disclaimer: The authors of the applet can't be sued. Blame pseudo-random number generators.]",[28,41,42],{},"Whatever will it be? Whatever will it be? Will it be coffee? Will it be tea?",[28,44,45],{},[37,46,47],{},"(The Java applet that lived here no longer runs: browsers dropped Java applet support years ago.)",[28,49,50],{},"The Java source code for the applet is as follows:",[52,53],"gist",{"id":54},"2656972",{"title":56,"searchDepth":57,"depth":57,"links":58},"",2,[],"Learning",null,"2010-11-07","md",{},"\u002F2010\u002Fcoffee-or-tea-thats-the-question","less than 1 minute",{"title":23,"description":30},"2010\u002Fcoffee-or-tea-thats-the-question",[69,70,71,72],"java","coffee","exaple","tea",114,"dto8mCCJbgHvVWgGhCxc-BMr3VgIR7qX5PhamfpvJQU",[76,80],{"title":77,"path":78,"stem":79,"children":-1},"Sotsiaalvõrgustikest ja privaatsusest","\u002F2010\u002Fsotsiaalvorgustikest-ja-privaatsusest","2010\u002Fsotsiaalvorgustikest-ja-privaatsusest",{"title":81,"path":82,"stem":83,"children":-1},"Untitled, Unfinished Short Story","\u002F2010\u002Funtitled-unfinished-short-story","2010\u002Funtitled-unfinished-short-story",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":85},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"m12 19l-7-7l7-7m7 7H5\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":87},"\u003Cpath fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"2\" d=\"M5 12h14m-7-7l7 7l-7 7\"\u002F>",{"id":89,"title":90,"body":91,"createdAt":506,"description":56,"extension":62,"files":507,"gistId":54,"meta":508,"navigation":20,"owner":509,"path":510,"seo":511,"stem":512,"url":513,"__hash__":514},"gists\u002Fgists\u002F2656972.md","An Applet that gives advice on which beverage to drink.",{"type":25,"value":92,"toc":504},[93,500],[94,95,99],"pre",{"className":96,"code":97,"filename":98,"language":69,"meta":56,"style":56},"language-java shiki shiki-themes github-light github-dark","import java.applet.Applet;\nimport java.awt.*;\n\n\u002F**\n * An Applet that gives advice on which beverage to drink.\n * @author Ando Roots & Carolys K.\n *\u002F\npublic class Beverage extends Applet {\n\n    \u002F**\n     * The main method, sets the conditions for printing output.\n     *\u002F\n    public void paint(Graphics g) {\n\n        \u002F\u002F Get applet's dimensions\n        int w = getWidth();\n        int h = getHeight();\n\n        \u002F\u002F Make the background black\n        g.setColor(Color.black);\n        g.fillRect(0, 0, w, h);\n\n        \u002F\u002F Set font\n        g.setFont(new Font(\"Helvetica\", Font.BOLD,  18));\n\n        \u002F\u002F Whatever will it be? Whatever will it be? Will it be coffee? Will it be tea?\n        if (Math.random() \u003C 0.5) {\n            g.setColor(Color.green);\n            g.drawString(\"Have a nice cup of coffee :).\", 50,50);\n        } else {\n            g.setColor(Color.orange);\n            g.drawString(\"Drink tea, it's good for you :).\", 50,50);\n        }\n    }\n\n}\n","Beverage.java",[100,101,102,115,129,135,142,148,160,166,188,193,199,205,211,233,238,244,262,277,282,288,300,322,327,333,363,368,374,397,408,434,445,455,477,483,489,494],"code",{"__ignoreMap":56},[103,104,107,111],"span",{"class":105,"line":106},"line",1,[103,108,110],{"class":109},"szBVR","import",[103,112,114],{"class":113},"sVt8B"," java.applet.Applet;\n",[103,116,117,119,122,126],{"class":105,"line":57},[103,118,110],{"class":109},[103,120,121],{"class":113}," java.awt.",[103,123,125],{"class":124},"sj4cs","*",[103,127,128],{"class":113},";\n",[103,130,132],{"class":105,"line":131},3,[103,133,134],{"emptyLinePlaceholder":20},"\n",[103,136,138],{"class":105,"line":137},4,[103,139,141],{"class":140},"sJ8bj","\u002F**\n",[103,143,145],{"class":105,"line":144},5,[103,146,147],{"class":140}," * An Applet that gives advice on which beverage to drink.\n",[103,149,151,154,157],{"class":105,"line":150},6,[103,152,153],{"class":140}," * ",[103,155,156],{"class":109},"@author",[103,158,159],{"class":140}," Ando Roots & Carolys K.\n",[103,161,163],{"class":105,"line":162},7,[103,164,165],{"class":140}," *\u002F\n",[103,167,169,172,175,179,182,185],{"class":105,"line":168},8,[103,170,171],{"class":109},"public",[103,173,174],{"class":109}," class",[103,176,178],{"class":177},"sScJk"," Beverage",[103,180,181],{"class":109}," extends",[103,183,184],{"class":177}," Applet",[103,186,187],{"class":113}," {\n",[103,189,191],{"class":105,"line":190},9,[103,192,134],{"emptyLinePlaceholder":20},[103,194,196],{"class":105,"line":195},10,[103,197,198],{"class":140},"    \u002F**\n",[103,200,202],{"class":105,"line":201},11,[103,203,204],{"class":140},"     * The main method, sets the conditions for printing output.\n",[103,206,208],{"class":105,"line":207},12,[103,209,210],{"class":140},"     *\u002F\n",[103,212,214,217,220,223,226,230],{"class":105,"line":213},13,[103,215,216],{"class":109},"    public",[103,218,219],{"class":109}," void",[103,221,222],{"class":177}," paint",[103,224,225],{"class":113},"(Graphics ",[103,227,229],{"class":228},"s4XuR","g",[103,231,232],{"class":113},") {\n",[103,234,236],{"class":105,"line":235},14,[103,237,134],{"emptyLinePlaceholder":20},[103,239,241],{"class":105,"line":240},15,[103,242,243],{"class":140},"        \u002F\u002F Get applet's dimensions\n",[103,245,247,250,253,256,259],{"class":105,"line":246},16,[103,248,249],{"class":109},"        int",[103,251,252],{"class":113}," w ",[103,254,255],{"class":109},"=",[103,257,258],{"class":177}," getWidth",[103,260,261],{"class":113},"();\n",[103,263,265,267,270,272,275],{"class":105,"line":264},17,[103,266,249],{"class":109},[103,268,269],{"class":113}," h ",[103,271,255],{"class":109},[103,273,274],{"class":177}," getHeight",[103,276,261],{"class":113},[103,278,280],{"class":105,"line":279},18,[103,281,134],{"emptyLinePlaceholder":20},[103,283,285],{"class":105,"line":284},19,[103,286,287],{"class":140},"        \u002F\u002F Make the background black\n",[103,289,291,294,297],{"class":105,"line":290},20,[103,292,293],{"class":113},"        g.",[103,295,296],{"class":177},"setColor",[103,298,299],{"class":113},"(Color.black);\n",[103,301,303,305,308,311,314,317,319],{"class":105,"line":302},21,[103,304,293],{"class":113},[103,306,307],{"class":177},"fillRect",[103,309,310],{"class":113},"(",[103,312,313],{"class":124},"0",[103,315,316],{"class":113},", ",[103,318,313],{"class":124},[103,320,321],{"class":113},", w, h);\n",[103,323,325],{"class":105,"line":324},22,[103,326,134],{"emptyLinePlaceholder":20},[103,328,330],{"class":105,"line":329},23,[103,331,332],{"class":140},"        \u002F\u002F Set font\n",[103,334,335,337,340,342,345,348,350,354,357,360],{"class":105,"line":5},[103,336,293],{"class":113},[103,338,339],{"class":177},"setFont",[103,341,310],{"class":113},[103,343,344],{"class":109},"new",[103,346,347],{"class":177}," Font",[103,349,310],{"class":113},[103,351,353],{"class":352},"sZZnC","\"Helvetica\"",[103,355,356],{"class":113},", Font.BOLD,  ",[103,358,359],{"class":124},"18",[103,361,362],{"class":113},"));\n",[103,364,366],{"class":105,"line":365},25,[103,367,134],{"emptyLinePlaceholder":20},[103,369,371],{"class":105,"line":370},26,[103,372,373],{"class":140},"        \u002F\u002F Whatever will it be? Whatever will it be? Will it be coffee? Will it be tea?\n",[103,375,377,380,383,386,389,392,395],{"class":105,"line":376},27,[103,378,379],{"class":109},"        if",[103,381,382],{"class":113}," (Math.",[103,384,385],{"class":177},"random",[103,387,388],{"class":113},"() ",[103,390,391],{"class":109},"\u003C",[103,393,394],{"class":124}," 0.5",[103,396,232],{"class":113},[103,398,400,403,405],{"class":105,"line":399},28,[103,401,402],{"class":113},"            g.",[103,404,296],{"class":177},[103,406,407],{"class":113},"(Color.green);\n",[103,409,411,413,416,418,421,423,426,429,431],{"class":105,"line":410},29,[103,412,402],{"class":113},[103,414,415],{"class":177},"drawString",[103,417,310],{"class":113},[103,419,420],{"class":352},"\"Have a nice cup of coffee :).\"",[103,422,316],{"class":113},[103,424,425],{"class":124},"50",[103,427,428],{"class":113},",",[103,430,425],{"class":124},[103,432,433],{"class":113},");\n",[103,435,437,440,443],{"class":105,"line":436},30,[103,438,439],{"class":113},"        } ",[103,441,442],{"class":109},"else",[103,444,187],{"class":113},[103,446,448,450,452],{"class":105,"line":447},31,[103,449,402],{"class":113},[103,451,296],{"class":177},[103,453,454],{"class":113},"(Color.orange);\n",[103,456,458,460,462,464,467,469,471,473,475],{"class":105,"line":457},32,[103,459,402],{"class":113},[103,461,415],{"class":177},[103,463,310],{"class":113},[103,465,466],{"class":352},"\"Drink tea, it's good for you :).\"",[103,468,316],{"class":113},[103,470,425],{"class":124},[103,472,428],{"class":113},[103,474,425],{"class":124},[103,476,433],{"class":113},[103,478,480],{"class":105,"line":479},33,[103,481,482],{"class":113},"        }\n",[103,484,486],{"class":105,"line":485},34,[103,487,488],{"class":113},"    }\n",[103,490,492],{"class":105,"line":491},35,[103,493,134],{"emptyLinePlaceholder":20},[103,495,497],{"class":105,"line":496},36,[103,498,499],{"class":113},"}\n",[501,502,503],"style",{},"html pre.shiki code .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .s4XuR, html code.shiki .s4XuR{--shiki-default:#E36209;--shiki-dark:#FFAB70}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":56,"searchDepth":57,"depth":57,"links":505},[],"2012-05-11T01:40:57Z",[98],{},"anroots","\u002Fgists\u002F2656972",{"title":90,"description":56},"gists\u002F2656972","https:\u002F\u002Fgist.github.com\u002Fanroots\u002F2656972","V6VPMJv23uKixQAwD5-bRaxR4ugEZ1JbfZSZ1sXasWc",1790886932980]