{"id":39,"date":"2007-03-08T13:18:12","date_gmt":"2007-03-08T13:18:12","guid":{"rendered":"http:\/\/www.hedwigus.com\/?p=39"},"modified":"2026-02-09T17:48:04","modified_gmt":"2026-02-09T10:48:04","slug":"numbers","status":"publish","type":"post","link":"https:\/\/www.hedwigus.com\/index.php\/2007\/03\/08\/numbers\/","title":{"rendered":"Numbers"},"content":{"rendered":"<p>8 Maret 2007<\/p>\n<p>Gak tahu, tiba-tiba gua kepengen aja bikin nomer-nomer ini, daripada gak ada kerjaan<\/p>\n\n\n<div id=\"simple-counter-container\" style=\"max-width: 600px; margin: 20px auto; padding: 20px; border: 1px solid #ddd; border-radius: 8px; background: #f9f9f9; text-align: center; font-family: Arial, sans-serif;\">\n    <h3 style=\"margin-top: 0; color: #333;\">Counter: 0 to 1000<\/h3>\n    \n    <div id=\"counter-display\" style=\"font-size: 48px; font-weight: bold; margin: 20px 0; color: #0073aa;\">0<\/div>\n    \n    <div style=\"background: #e0e0e0; border-radius: 4px; height: 20px; margin: 20px 0; overflow: hidden;\">\n        <div id=\"counter-progress\" style=\"height: 100%; width: 0%; background: #0073aa; transition: width 0.5s;\"><\/div>\n    <\/div>\n    \n    <div id=\"counter-percentage\" style=\"margin-bottom: 20px; color: #666;\">0% (0\/1000)<\/div>\n    \n    <div style=\"display: flex; justify-content: center; gap: 10px; flex-wrap: wrap;\">\n        <button id=\"start-btn\" style=\"padding: 8px 16px; background: #0073aa; color: white; border: none; border-radius: 4px; cursor: pointer;\">Start<\/button>\n        <button id=\"pause-btn\" style=\"padding: 8px 16px; background: #f0a238; color: white; border: none; border-radius: 4px; cursor: pointer;\">Pause<\/button>\n        <button id=\"reset-btn\" style=\"padding: 8px 16px; background: #dc3232; color: white; border: none; border-radius: 4px; cursor: pointer;\">Reset<\/button>\n    <\/div>\n    \n    <div id=\"counter-status\" style=\"margin-top: 15px; font-size: 14px; color: #666; min-height: 20px;\">Ready to start<\/div>\n<\/div>\n\n<script>\n\/\/ Self-contained counter script for WordPress\n(function() {\n    \/\/ Counter variables\n    let counter = 0;\n    let intervalId = null;\n    let isRunning = false;\n    \n    \/\/ Get DOM elements\n    const display = document.getElementById('counter-display');\n    const progress = document.getElementById('counter-progress');\n    const percentage = document.getElementById('counter-percentage');\n    const startBtn = document.getElementById('start-btn');\n    const pauseBtn = document.getElementById('pause-btn');\n    const resetBtn = document.getElementById('reset-btn');\n    const status = document.getElementById('counter-status');\n    \n    \/\/ Update counter display\n    function updateDisplay() {\n        display.textContent = counter;\n        \n        \/\/ Update progress bar\n        const progressPercent = (counter \/ 1000) * 100;\n        progress.style.width = progressPercent + '%';\n        percentage.textContent = Math.round(progressPercent) + '% (' + counter + '\/1000)';\n        \n        \/\/ Add subtle animation\n        display.style.transform = 'scale(1.05)';\n        setTimeout(() => {\n            display.style.transform = 'scale(1)';\n        }, 150);\n    }\n    \n    \/\/ Start the counter\n    function startCounter() {\n        if (isRunning) return;\n        \n        isRunning = true;\n        status.textContent = 'Counting...';\n        \n        intervalId = setInterval(function() {\n            if (counter < 1000) {\n                counter++;\n                updateDisplay();\n                \n                if (counter === 1000) {\n                    clearInterval(intervalId);\n                    isRunning = false;\n                    status.textContent = 'Completed! Reached 1000';\n                }\n            } else {\n                clearInterval(intervalId);\n                isRunning = false;\n            }\n        }, 1000);\n    }\n    \n    \/\/ Pause the counter\n    function pauseCounter() {\n        if (!isRunning) return;\n        \n        clearInterval(intervalId);\n        isRunning = false;\n        status.textContent = 'Paused at ' + counter;\n    }\n    \n    \/\/ Reset the counter\n    function resetCounter() {\n        clearInterval(intervalId);\n        counter = 0;\n        isRunning = false;\n        updateDisplay();\n        status.textContent = 'Reset to 0';\n    }\n    \n    \/\/ Event listeners\n    startBtn.addEventListener('click', startCounter);\n    pauseBtn.addEventListener('click', pauseCounter);\n    resetBtn.addEventListener('click', resetCounter);\n    \n    \/\/ Initialize display\n    updateDisplay();\n})();\n<\/script>\n","protected":false},"excerpt":{"rendered":"<p>8 Maret 2007 Gak tahu, tiba-tiba gua kepengen aja bikin nomer-nomer ini, daripada gak ada kerjaan Counter: 0 to 1000 0 0% (0\/1000) Start Pause Reset Ready to start<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[170,138,87],"tags":[399],"class_list":["post-39","post","type-post","status-publish","format-standard","hentry","category-cerita","category-hobby","category-personal","tag-coding","travel-monster-post","no-post-thumbnail","latest_post"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.hedwigus.com\/index.php\/wp-json\/wp\/v2\/posts\/39","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hedwigus.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hedwigus.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hedwigus.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hedwigus.com\/index.php\/wp-json\/wp\/v2\/comments?post=39"}],"version-history":[{"count":3,"href":"https:\/\/www.hedwigus.com\/index.php\/wp-json\/wp\/v2\/posts\/39\/revisions"}],"predecessor-version":[{"id":2325,"href":"https:\/\/www.hedwigus.com\/index.php\/wp-json\/wp\/v2\/posts\/39\/revisions\/2325"}],"wp:attachment":[{"href":"https:\/\/www.hedwigus.com\/index.php\/wp-json\/wp\/v2\/media?parent=39"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hedwigus.com\/index.php\/wp-json\/wp\/v2\/categories?post=39"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hedwigus.com\/index.php\/wp-json\/wp\/v2\/tags?post=39"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}