{"id":48,"date":"2024-02-06T22:00:42","date_gmt":"2024-02-06T14:00:42","guid":{"rendered":"https:\/\/669082.xyz\/?p=48"},"modified":"2024-02-06T22:29:45","modified_gmt":"2024-02-06T14:29:45","slug":"%e6%b5%8b%e8%af%95%e6%96%87%e7%ab%a0","status":"publish","type":"post","link":"https:\/\/669082.xyz\/index.php\/2024\/02\/06\/%e6%b5%8b%e8%af%95%e6%96%87%e7%ab%a0\/","title":{"rendered":"\u6d4b\u8bd5\u6587\u7ae0"},"content":{"rendered":"<h5>\u6d4b\u8bd5golang\u4ee3\u7801<\/h5>\n<pre><code class=\"language-go\">package main\nimport &quot;fmt&quot;\nfunc main() {\n    fmt.Println(&quot;hello world&quot;)\n}<\/code><\/pre>\n<h5>\u6d4b\u8bd5php\u4ee3\u7801<\/h5>\n<pre><code class=\"language-php\">&lt;?php\n$a = 1;\nphpinfo();<\/code><\/pre>\n<h5>\u6d4b\u8bd5vue\u4ee3\u7801<\/h5>\n<pre><code class=\"language-html\">&lt;!--\n\u8ddf Vue \u8bf4 Hello World\uff01\n--&gt;\n\n&lt;script setup&gt;\nimport { ref } from &#039;vue&#039;\n\n\/\/ \u201cref\u201d\u662f\u7528\u6765\u5b58\u50a8\u503c\u7684\u54cd\u5e94\u5f0f\u6570\u636e\u6e90\u3002\n\/\/ \u7406\u8bba\u4e0a\u6211\u4eec\u5728\u5c55\u793a\u8be5\u5b57\u7b26\u4e32\u7684\u65f6\u5019\u4e0d\u9700\u8981\u5c06\u5176\u5305\u88c5\u5728 ref() \u4e2d\uff0c\n\/\/ \u4f46\u662f\u5728\u4e0b\u4e00\u4e2a\u793a\u4f8b\u4e2d\u66f4\u6539\u8fd9\u4e2a\u503c\u7684\u65f6\u5019\uff0c\u6211\u4eec\u5c31\u9700\u8981\u5b83\u4e86\u3002\nconst message = ref(&#039;Hello World!&#039;)\n&lt;\/script&gt;\n\n&lt;template&gt;\n  &lt;h1&gt;{{ message }}&lt;\/h1&gt;\n&lt;\/template&gt;<\/code><\/pre>\n<h5>\u6d4b\u8bd5Python\u4ee3\u7801<\/h5>\n<pre><code class=\"language-python\"># \u5bfc\u5165time\u5e93\nimport time\n# \u4ee3\u7801\u5f00\u59cb\u8fd0\u884c\nstart = time.clock()\n\nsum = 0\nfor i in range(1000):\n    sum += i\nprint(&#039;sum = &#039;, sum)\n\n# \u4ee3\u7801\u7ed3\u675f\u8fd0\u884c\nend = time.clock()\n\n# \u8ba1\u7b97\u8fd0\u884c\u65f6\u95f4\uff0ctime.clock()\u8fd4\u56de\u5355\u4f4d\u4e3a\u79d2\nprint(&#039;\u8fd0\u884c\u65f6\u95f4\u4e3a\uff1a{}\u79d2&#039;.format(end-start))\nprint(&#039;\u8fd0\u884c\u65f6\u95f4\u4e3a\uff1a{}\u6beb\u79d2&#039;.format((end-start) * 1000))<\/code><\/pre>\n<h5>\u6d4b\u8bd5\u8d34\u4e00\u5f20\u56fe\u7247<\/h5>\n<p><img decoding=\"async\" src=\"https:\/\/669082.xyz\/wp-content\/uploads\/2024\/02\/image-1707228176777.png\" alt=\"file\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6d4b\u8bd5golang\u4ee3\u7801 package main import &quot;fmt&quot; fun [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-48","post","type-post","status-publish","format-standard","hentry","category-golang"],"_links":{"self":[{"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/posts\/48","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/comments?post=48"}],"version-history":[{"count":35,"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/posts\/48\/revisions"}],"predecessor-version":[{"id":87,"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/posts\/48\/revisions\/87"}],"wp:attachment":[{"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/media?parent=48"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/categories?post=48"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/669082.xyz\/index.php\/wp-json\/wp\/v2\/tags?post=48"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}