Skip to content
Permalink
Browse files

fix: the random_string/index.html function updated.

  • Loading branch information...
alterhu2020 committed Aug 29, 2018
1 parent c3328ad commit b1825f00be680e78851d95d8ecacd17414d3216a
@@ -103,7 +103,7 @@ <h1><a href="..">PingBook Blog <strong></strong></a></h1>
<h1>Archives for 2018</h1>

<dl>
<dt>2018-08-29 12:37:46</dt>
<dt>2018-08-29 17:34:14</dt>
<dd><a href="../articles/random_string/">JavaScript得到随机字符串</a></dd>
<dt>2018-08-27 17:19:43</dt>
<dd><a href="../articles/vue-to-mobileapp-electron/">vuejs項目转为android/<span class="caps">IOS</span>&nbsp;App(Cordova)</a></dd>
BIN -2 Bytes (100%) archives/2018.html.gz
Binary file not shown.
@@ -102,7 +102,7 @@ <h1><a href="..">PingBook Blog <strong></strong></a></h1>
</script>
<br>
<dl>
<dt>2018-08-29 12:37:46</dt>
<dt>2018-08-29 17:34:14</dt>
<dd><a href="../articles/random_string/">JavaScript得到随机字符串</a></dd>
<dt>2018-08-27 17:19:43</dt>
<dd><a href="../articles/vue-to-mobileapp-electron/">vuejs項目转为android/<span class="caps">IOS</span>&nbsp;App(Cordova)</a></dd>
BIN -2 Bytes (100%) archives/index.html.gz
Binary file not shown.
@@ -103,7 +103,7 @@ <h1><a href="../../..">PingBook Blog <strong></strong></a></h1>
<h1>Archives for 八月 2018</h1>

<dl>
<dt>2018-08-29 12:37:46</dt>
<dt>2018-08-29 17:34:14</dt>
<dd><a href="../../../articles/random_string/">JavaScript得到随机字符串</a></dd>
<dt>2018-08-27 17:19:43</dt>
<dd><a href="../../../articles/vue-to-mobileapp-electron/">vuejs項目转为android/<span class="caps">IOS</span>&nbsp;App(Cordova)</a></dd>
BIN -3 Bytes (100%) articles/2018/8月/index.html.gz
Binary file not shown.
@@ -112,8 +112,8 @@ <h2 class="entry-title">

</header>
<footer class="post-info">
<!--<abbr class="published" title="2018-08-29T12:37:46.449840+08:00">-->
<!--2018-08-29 12:37:46-->
<!--<abbr class="published" title="2018-08-29T17:34:14.859890+08:00">-->
<!--2018-08-29 17:34:14-->
<!--</abbr>-->
<!---->
<!--<address class="vcard author">By -->
@@ -123,7 +123,7 @@ <h2 class="entry-title">
<!--</address>-->
<!---->
<address class="vcard author" style="font-style:italic;margin-bottom:-10px;">
2018-08-29 12:37:46
2018-08-29 17:34:14
&nbsp;&nbsp;By
<a class="url fn" href="../../author/walter-hu">Walter Hu</a>

@@ -155,7 +155,7 @@ <h4 id="_1">代码<a class="headerlink" href="#_1" title="Permanent link">&para;
<span class="code-line">const<span class="w"> </span>randomStrPickUp<span class="w"> </span><span class="o">=</span><span class="w"> </span>function<span class="w"> </span><span class="o">(</span>arrayStr<span class="o">)</span><span class="w"> </span><span class="err">{</span><span class="w"></span></span>
<span class="code-line"><span class="w"> </span>const<span class="w"> </span>len<span class="w"> </span><span class="o">=</span><span class="w"> </span>arrayStr<span class="o">.</span>length<span class="w"></span></span>
<span class="code-line"><span class="w"> </span>const<span class="w"> </span>min<span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="m">0</span><span class="w"></span></span>
<span class="code-line"><span class="w"> </span>const<span class="w"> </span>max<span class="w"> </span><span class="o">=</span><span class="w"> </span>len<span class="w"></span></span>
<span class="code-line"><span class="w"> </span>const<span class="w"> </span>max<span class="w"> </span><span class="o">=</span><span class="w"> </span>len<span class="o">-</span><span class="m">1</span><span class="w"></span></span>
<span class="code-line"><span class="w"> </span>const<span class="w"> </span>range<span class="w"> </span><span class="o">=</span><span class="w"> </span>Math<span class="o">.</span>round<span class="o">(</span>Math<span class="o">.</span><span class="nb">random</span><span class="o">()</span><span class="w"> </span><span class="o">*</span><span class="w"> </span><span class="o">(</span>max<span class="w"> </span><span class="o">-</span><span class="w"> </span>min<span class="o">))</span><span class="w"> </span><span class="o">+</span><span class="w"> </span>min<span class="w"> </span><span class="o">//</span><span class="w"> </span><span class="err">得到随机的范围</span><span class="w"></span></span>
<span class="code-line"><span class="w"> </span><span class="kr">return</span><span class="w"> </span>arrayStr<span class="err">[</span>range<span class="err">]</span><span class="w"></span></span>
<span class="code-line"><span class="err">}</span><span class="w"></span></span>
Binary file not shown.
@@ -112,8 +112,8 @@ PingBook是一个专注于开源软件、Linux、大数据、Python、Java、Vue
<li><article class="hentry">
<header> <h2 class="entry-title"><a href="../articles/random_string/" rel="bookmark" title="Permalink to JavaScript得到随机字符串">JavaScript得到随机字符串</a></h2> </header>
<footer class="post-info">
<abbr class="published" title="2018-08-29T12:37:46.449840+08:00">
Posted on 2018-08-29 12:37:46, By <a class="url fn" href="../author/walter-hu"> Walter Hu</a>
<abbr class="published" title="2018-08-29T17:34:14.859890+08:00">
Posted on 2018-08-29 17:34:14, By <a class="url fn" href="../author/walter-hu"> Walter Hu</a>

</abbr>
</footer><!-- /.post-info -->
BIN -1 Byte (100%) author/walter-hu.gz
Binary file not shown.
@@ -111,8 +111,8 @@ <h2>All articles of JavaScript</h2>
<li><article class="hentry">
<header> <h2 class="entry-title"><a href="../../articles/random_string/" rel="bookmark" title="Permalink to JavaScript得到随机字符串">JavaScript得到随机字符串</a></h2> </header>
<footer class="post-info">
<abbr class="published" title="2018-08-29T12:37:46.449840+08:00">
Posted on 2018-08-29 12:37:46, By <a class="url fn" href="../../author/walter-hu"> Walter Hu</a>
<abbr class="published" title="2018-08-29T17:34:14.859890+08:00">
Posted on 2018-08-29 17:34:14, By <a class="url fn" href="../../author/walter-hu"> Walter Hu</a>

</abbr>
</footer><!-- /.post-info -->
BIN -2 Bytes (100%) category/javascript/index.html.gz
Binary file not shown.
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>PingBook Blog</title><link href="https://pingbook.top/" rel="alternate"></link><link href="https://pingbook.top/feeds/all.atom.xml" rel="self"></link><id>https://pingbook.top/</id><updated>2018-08-29T12:37:46+08:00</updated><entry><title>JavaScript得到随机字符串</title><link href="https://pingbook.top/articles/random_string/" rel="alternate"></link><published>2018-08-29T12:37:46+08:00</published><updated>2018-08-29T12:37:46+08:00</updated><author><name>Walter Hu</name></author><id>tag:pingbook.top,2018-08-29:/articles/random_string/</id><summary type="html">&lt;h4 id="_1"&gt;代码&lt;a class="headerlink" href="#_1" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;
<feed xmlns="http://www.w3.org/2005/Atom"><title>PingBook Blog</title><link href="https://pingbook.top/" rel="alternate"></link><link href="https://pingbook.top/feeds/all.atom.xml" rel="self"></link><id>https://pingbook.top/</id><updated>2018-08-29T17:34:14+08:00</updated><entry><title>JavaScript得到随机字符串</title><link href="https://pingbook.top/articles/random_string/" rel="alternate"></link><published>2018-08-29T17:34:14+08:00</published><updated>2018-08-29T17:34:14+08:00</updated><author><name>Walter Hu</name></author><id>tag:pingbook.top,2018-08-29:/articles/random_string/</id><summary type="html">&lt;h4 id="_1"&gt;代码&lt;a class="headerlink" href="#_1" title="Permanent link"&gt;&amp;para;&lt;/a&gt;&lt;/h4&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span class="code-line"&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="cm"&gt;/**&lt;/span&gt;&lt;/span&gt;
&lt;span class="code-line"&gt;&lt;span class="cm"&gt; * 得到随机的字符串&lt;/span&gt;&lt;/span&gt;
&lt;span class="code-line"&gt;&lt;span class="cm"&gt; * @param arrayStr&lt;/span&gt;&lt;/span&gt;
@@ -15,7 +15,7 @@
&lt;span class="code-line"&gt;const&lt;span class="w"&gt; &lt;/span&gt;randomStrPickUp&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;function&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;arrayStr&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;{&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="code-line"&gt;&lt;span class="w"&gt; &lt;/span&gt;const&lt;span class="w"&gt; &lt;/span&gt;len&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;arrayStr&lt;span class="o"&gt;.&lt;/span&gt;length&lt;span class="w"&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="code-line"&gt;&lt;span class="w"&gt; &lt;/span&gt;const&lt;span class="w"&gt; &lt;/span&gt;min&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;0&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="code-line"&gt;&lt;span class="w"&gt; &lt;/span&gt;const&lt;span class="w"&gt; &lt;/span&gt;max&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;len&lt;span class="w"&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="code-line"&gt;&lt;span class="w"&gt; &lt;/span&gt;const&lt;span class="w"&gt; &lt;/span&gt;max&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;len&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="m"&gt;1&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="code-line"&gt;&lt;span class="w"&gt; &lt;/span&gt;const&lt;span class="w"&gt; &lt;/span&gt;range&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;Math&lt;span class="o"&gt;.&lt;/span&gt;round&lt;span class="o"&gt;(&lt;/span&gt;Math&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;random&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;*&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;max&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;min&lt;span class="o"&gt;))&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;+&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;min&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;得到随机的范围&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="code-line"&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kr"&gt;return&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;arrayStr&lt;span class="err"&gt;[&lt;/span&gt;range&lt;span class="err"&gt;]&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;&lt;/span&gt;
&lt;span class="code-line"&gt;&lt;span class="err"&gt;}&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;&lt;/span&gt;
BIN +4 Bytes (100%) feeds/all.atom.xml.gz
Binary file not shown.
@@ -111,8 +111,8 @@ <h1><a href=".">PingBook Blog <strong></strong></a></h1>
<li><article class="hentry">
<header> <h2 class="entry-title"><a href="./articles/random_string/" rel="bookmark" title="Permalink to JavaScript得到随机字符串">JavaScript得到随机字符串</a></h2> </header>
<footer class="post-info">
<abbr class="published" title="2018-08-29T12:37:46.449840+08:00">
Posted on 2018-08-29 12:37:46, By <a class="url fn" href="./author/walter-hu"> Walter Hu</a>
<abbr class="published" title="2018-08-29T17:34:14.859890+08:00">
Posted on 2018-08-29 17:34:14, By <a class="url fn" href="./author/walter-hu"> Walter Hu</a>

</abbr>
</footer><!-- /.post-info -->
BIN -2 Bytes (100%) index.html.gz
Binary file not shown.
@@ -5,14 +5,14 @@ xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

<url>
<loc>https://pingbook.top/</loc>
<lastmod>2018-08-29T15:25:23-00:00</lastmod>
<lastmod>2018-08-29T17:34:21-00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>

<url>
<loc>https://pingbook.top/404.html</loc>
<lastmod>2018-08-29T15:25:23-00:00</lastmod>
<lastmod>2018-08-29T17:34:21-00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
@@ -33,7 +33,7 @@ xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

<url>
<loc>https://pingbook.top/articles/random_string/</loc>
<lastmod>2018-08-29T12:37:46+08:00</lastmod>
<lastmod>2018-08-29T17:34:14+08:00</lastmod>
<changefreq>weekly</changefreq>
<priority>0.7</priority>
</url>
@@ -299,7 +299,7 @@ xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

<url>
<loc>https://pingbook.top/category/javascript/</loc>
<lastmod>2018-08-29T12:37:46+08:06</lastmod>
<lastmod>2018-08-29T17:34:14+08:06</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
@@ -320,7 +320,7 @@ xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

<url>
<loc>https://pingbook.top/tag/javascript/</loc>
<lastmod>2018-08-29T12:37:46+08:06</lastmod>
<lastmod>2018-08-29T17:34:14+08:06</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
@@ -565,7 +565,7 @@ xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">

<url>
<loc>https://pingbook.top/author/walter-hu</loc>
<lastmod>2018-08-29T12:37:46+08:06</lastmod>
<lastmod>2018-08-29T17:34:14+08:06</lastmod>
<changefreq>daily</changefreq>
<priority>0.5</priority>
</url>
BIN -5 Bytes (100%) sitemap.xml.gz
Binary file not shown.
@@ -111,8 +111,8 @@ <h1><a href="../..">PingBook Blog <strong></strong></a></h1>
<li><article class="hentry">
<header> <h2 class="entry-title"><a href="../../articles/random_string/" rel="bookmark" title="Permalink to JavaScript得到随机字符串">JavaScript得到随机字符串</a></h2> </header>
<footer class="post-info">
<abbr class="published" title="2018-08-29T12:37:46.449840+08:00">
Posted on 2018-08-29 12:37:46, By <a class="url fn" href="../../author/walter-hu"> Walter Hu</a>
<abbr class="published" title="2018-08-29T17:34:14.859890+08:00">
Posted on 2018-08-29 17:34:14, By <a class="url fn" href="../../author/walter-hu"> Walter Hu</a>

</abbr>
</footer><!-- /.post-info -->
BIN +0 Bytes (100%) tag/javascript/index.html.gz
Binary file not shown.

Large diffs are not rendered by default.

BIN +3 Bytes (100%) tipuesearch_content.json.gz
Binary file not shown.

0 comments on commit b1825f0

Please sign in to comment.
You can’t perform that action at this time.