{"id":45252,"date":"2023-12-11T15:05:18","date_gmt":"2023-12-11T07:05:18","guid":{"rendered":"https:\/\/wx.kaifamiao.info\/?p=45252"},"modified":"2023-12-11T15:05:18","modified_gmt":"2023-12-11T07:05:18","slug":"%e6%89%8b%e5%86%99%e4%bb%a3%e7%a0%81%ef%bc%9a%e7%bb%99%e4%b8%80%e4%b8%aa%e8%8b%b1%e6%96%87%e6%96%87%e6%9c%aci-have-a-dream-i-am-a-human-you-can-have-dream-too-%e5%86%8d%e7%bb%99-2","status":"publish","type":"post","link":"http:\/\/wx.kaifamiao.info\/index.php\/2023\/12\/11\/%e6%89%8b%e5%86%99%e4%bb%a3%e7%a0%81%ef%bc%9a%e7%bb%99%e4%b8%80%e4%b8%aa%e8%8b%b1%e6%96%87%e6%96%87%e6%9c%aci-have-a-dream-i-am-a-human-you-can-have-dream-too-%e5%86%8d%e7%bb%99-2\/","title":{"rendered":"\u624b\u5199\u4ee3\u7801\uff1a\u7ed9\u4e00\u4e2a\u82f1\u6587\u6587\u672c\u201ci have a dream i am a human you can have dream too.\u201d\u518d\u7ed9\u4e00\u4e2a\u6587\u672c\u201ci you am \u201d\uff0c\u8981\u6c42\u8ba1\u7b97\u51fa\u7b2c\u4e00\u4e2a\u6587\u672c\u4e2d\u5305\u542b\u7b2c\u4e8c\u4e2a\u6587\u672c\u6bcf\u4e2a\u5355\u8bcd\u7684\u6700\u77ed\u6587\u672c\uff0c\u6bd4\u5982\u4f8b\u5b50\u4e2d\u6700\u77ed\u6587\u672c\u5c31\u662f\u201ci am a human you\u201d\u3002"},"content":{"rendered":"<p>&#8220;`&#8221;<\/p>\n<p>\u53c2\u8003\u56de\u7b54\uff1a<\/p>\n<pre><code>#!\/usr\/bin\/python\n#encoding:utf-8\ndef lengthCa(arr):\nstart = arr[0]\nend= arr[0]\nfor i in arr:\nif i &gt;start:\nstart=i\nif i &lt; end :\nend = i\nreturn start-end\n<\/code><\/pre>\n<p>#\u8f93\u5165\u7684\u7b2c\u4e00\u4e2a\u6587\u672c<\/p>\n<pre><code>text = 'ILM runs a batch processing environment capable of modeling, rendering and compositing tens of thousands of motion picture frames per day. Thousands of machines running Linux, IRIX, Compaq Tru64, OS X, Solaris, and Windows join together to provide a production pipeline used by ~800 users daily. Speed of development is key, and Python was a faster way to code (and re-code) the programs that control this production pipeline.'\n\n<\/code><\/pre>\n<p>#\u8f93\u5165\u7684\u7b2c\u4e8c\u4e2a\u6587\u672c<\/p>\n<pre><code>keywords='a of'\nnewtext=text.split(' ')\nnewkeys = keywords.split(' ')\ntextLen = len(newtext)\narray=[]\n<\/code><\/pre>\n<p>#\u628aindex\u8ba1\u7b97\u51fa\u6765\uff0c\u7528\u505a\u6700\u4f18\u8def\u5f84\u89c4\u5212\u4f7f\u7528<\/p>\n<pre><code>for i in newkeys:\ndan=[]\nfor j in range(textLen):\nif i == newtext[j]:\ndan.append(j)\narray.append(dan)\nprint(array)\n<\/code><\/pre>\n<p>#\u6700\u4f18\u89c4\u5212\u5f00\u59cb<\/p>\n<pre><code>caculateArray=[]\nfor n in array[0]:\ntemp=[]\ntemp.append(n)\ncaculateArray.append(n)\nflag = 0\nfor n in array:\nif array.index(n) == 0:\ncontinue\ntemparr=[]\nfor m in caculateArray:#\u904d\u5386\u5f53\u524d\u6700\u77ed\u8def\u5f84\nindex = caculateArray.index(m)#\u8ba1\u7b97\u5f53\u524d\u8def\u5f84\u7684index\u503c\ntempminlen=1000000\ntempminarr=[]\nfor j in n:#\u8ba1\u7b97\u5f53\u524d\u6700\u77ed\u8def\u5f84\uff0c\u6dfb\u52a0\u4e0b\u4e00\u4e2a\u8282\u70b9\n    if flag ==0:\n    temparr.append(m)\n    else:\n    for x in m:\n    temparr.append(x)\n    temparr.append(j)\n    if lengthCa(temparr)&lt;tempminlen :\n    tempminlen=lengthCa(temparr)\n    tempminarr=temparr\n    temparr=[]\n    caculateArray[index]=tempminarr\n    print(caculateArray)\n    flag+=1\n    tempminlen=1000000\n    tempminarr=[]\n    #\u627e\u51fa\u6700\u7ec8\u6240\u6709\u89e3\u91cc\u7684\u6700\u4f18\u89e3\uff0c\u4e3atempminarr\n\n    for n in caculateArray:\n    if lengthCa(n)&lt;tempminlen :\n    tempminlen=lengthCa(n)\n    tempminarr=n\n    #\u8ba1\u7b97tempminarr\u7684\u8d77\u70b9\u548c\u91cd\u70b9\uff0c\u73b0\u5728\u53d1\u73b0\u7528min()\u548cmax()\u51fd\u6570\u5c31\u53ef\u4ee5\u4e86\n\n    start = tempminarr[0]\n    end = tempminarr[0]\n    for i in tempminarr:\n    if start&lt;i:\n    start=i\n    if end&gt;i:\n    end=i\n    #\u8f93\u51fa\u8d77\u59cb\u4f4d\u7f6e\u548c\u7ec8\u6b62\u4f4d\u7f6e\n    print(start,end)\n    for m in range(end,start+1):\n    print newtext[m]\n\n<\/code><\/pre>\n<p>&nbsp;<\/p>\n<pre><code>            \"```\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;`&#8221; \u53c2\u8003\u56de\u7b54\uff1a #!\/usr\/bin\/python #encoding:utf-8 [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-45252","post","type-post","status-publish","format-standard","hentry","category-c"],"_links":{"self":[{"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts\/45252","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/comments?post=45252"}],"version-history":[{"count":1,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts\/45252\/revisions"}],"predecessor-version":[{"id":45253,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/posts\/45252\/revisions\/45253"}],"wp:attachment":[{"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/media?parent=45252"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/categories?post=45252"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/wx.kaifamiao.info\/index.php\/wp-json\/wp\/v2\/tags?post=45252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}