中文字幕亚洲综合久久2025,欧美超碰精品在线,国产精品无码免费看一区二区http://polarbeariptv.net/龍巖小程序開發(fā),龍巖分銷系統(tǒng)centos 定時執(zhí)行 think命令http://polarbeariptv.net/post/2718.html<p>在TP5中自定義hello命令</p><p><span style="text-wrap-mode: nowrap;">&lt;?php</span></p><p><span style="text-wrap-mode: nowrap;">&nbsp; &nbsp; protected function configure()</span></p><p><span style="text-wrap-mode: nowrap;">&nbsp; &nbsp; {</span></p><p><span style="text-wrap-mode: nowrap;">&nbsp; &nbsp; &nbsp; &nbsp; $this-&gt;setName(&#39;hello&#39;)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //定義命令的名字</span></p><p><span style="text-wrap-mode: nowrap;">&nbsp; &nbsp; &nbsp; &nbsp; -&gt;setDescription(&#39;This is my command&#39;)&nbsp; &nbsp; &nbsp;//定義命令的描述</span></p><p><span style="text-wrap-mode: nowrap;">&nbsp; &nbsp; &nbsp; &nbsp; -&gt;addArgument(&#39;name&#39;)&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //增加一個名字參數(shù)</span></p><p><span style="text-wrap-mode: nowrap;">&nbsp; &nbsp; &nbsp; &nbsp; -&gt;addArgument(&#39;age&#39;);&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; //增加一個年齡參數(shù)</span></p><p><span style="text-wrap-mode: nowrap;">&nbsp; &nbsp; }</span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;">&nbsp; &nbsp; protected function execute(Input $input, Output $output)</span></p><p><span style="text-wrap-mode: nowrap;">&nbsp; &nbsp; {</span></p><p><span style="text-wrap-mode: nowrap;">&nbsp; &nbsp; &nbsp; &nbsp; //獲取輸入的參數(shù)</span></p><p><span style="text-wrap-mode: nowrap;">&nbsp; &nbsp; &nbsp; &nbsp; $name = $input-&gt;getArgument(&#39;name&#39;);</span></p><p><span style="text-wrap-mode: nowrap;">&nbsp; &nbsp; &nbsp; &nbsp; $age = $input-&gt;getArgument(&#39;age&#39;);</span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;">&nbsp; &nbsp; &nbsp; &nbsp; //輸出獲得的參數(shù)</span></p><p><span style="text-wrap-mode: nowrap;">&nbsp; &nbsp; &nbsp; &nbsp; $output-&gt;writeln(&quot;My name is $name ,age is $age&quot;);</span></p><p><span style="text-wrap-mode: nowrap;">&nbsp; &nbsp; }</span></p><p><br/></p><p>centos定時執(zhí)行</p><p>* * * * *&nbsp; php /path/to/your/project/think hello</p>Sat, 21 Jun 2025 12:45:20 +0800子頁面?zhèn)鬟f參數(shù)到父頁面http://polarbeariptv.net/post/2717.html<p>window.postMessage 是一種跨文檔通信的方法,允許來自一個文檔(例如一個網(wǎng)頁或Iframe)向另一個文檔發(fā)送消息。這在Iframe中使用尤其有用,因?yàn)樗试S父頁面和Iframe之間的安全通信。實(shí)例中在父頁面點(diǎn)擊按鈕彈出子頁面窗口,子頁面窗口關(guān)閉后需要傳遞參數(shù)到父頁面。<br/></p><p><br/></p><p>父頁面</p><p>window.addEventListener(&#39;message&#39;, function(event) {</p><p><span style="white-space-collapse: preserve;"></span>&nbsp; &nbsp; if (event.data.action === &#39;dataFromChild&#39;) {</p><p><span style="white-space-collapse: preserve;"></span>&nbsp; &nbsp; &nbsp; &nbsp; var id =&nbsp; event.data.id;</p><p><span style="white-space-collapse: preserve;"></span>&nbsp; &nbsp; &nbsp; &nbsp; var sn =&nbsp; event.data.sn;</p><p><span style="white-space-collapse: preserve;"></span>&nbsp; &nbsp; &nbsp; &nbsp; var name =&nbsp; event.data.name;</p><p><span style="white-space-collapse: preserve;"></span>&nbsp; &nbsp; &nbsp; &nbsp; var price =&nbsp; event.data.price;</p><p><span style="white-space-collapse: preserve;"></span>&nbsp; &nbsp; &nbsp; &nbsp; var thumb =&nbsp; event.data.thumb;</p><p><span style="white-space-collapse: preserve;"></span>&nbsp; &nbsp; &nbsp; &nbsp; // 處理數(shù)據(jù)</p><p><span style="white-space-collapse: preserve;"></span>&nbsp; &nbsp; &nbsp; &nbsp; console.log(id);</p><p><span style="white-space-collapse: preserve;"></span>&nbsp; &nbsp; }</p><p>}, false);</p><p><br/></p><p>子頁面</p><p><br/></p><p>$(&quot;.sel&quot;).click(function(){</p><p>&nbsp; &nbsp; &nbsp; var id = $(this).data(&quot;id&quot;);</p><p>&nbsp; &nbsp; &nbsp; var sn = $(this).data(&quot;sn&quot;);</p><p>&nbsp; &nbsp; &nbsp; var name = $(this).data(&quot;name&quot;);</p><p>&nbsp; &nbsp; &nbsp; var price = $(this).data(&quot;price&quot;);</p><p>&nbsp; &nbsp; &nbsp; var thumb = $(this).data(&quot;thumb&quot;);</p><p>&nbsp; &nbsp; &nbsp; window.parent.postMessage({ action: &#39;dataFromChild&#39;, id: id, sn: sn, name: name, price:price, thumb:thumb }, &#39;*&#39;);</p><p>&nbsp; &nbsp; &nbsp; var index = parent.layer.getFrameIndex(window.name); //獲取窗口索引</p><p>&nbsp; &nbsp; &nbsp; parent.layer.close(index);&nbsp; // 關(guān)閉layer</p><p>})</p><p><br/></p>Thu, 22 May 2025 16:32:01 +0800php 將 unicode 字符串轉(zhuǎn)中文的方法http://polarbeariptv.net/post/2716.html<p>$txt = &quot;\u7cfb\u7edf\u7e41\u5fd9\uff0c\u8bf7\u7a0d\u540e\u91cd\u8bd5&quot;;</p><p><br/></p><p>function u2c($str)</p><p>{</p><p><span style="white-space-collapse: preserve;"> </span>return preg_replace_callback(</p><p><span style="white-space-collapse: preserve;"> </span>&quot;#\\\u([0-9a-f]{4})#i&quot;,</p><p><span style="white-space-collapse: preserve;"> </span>function ($r) {</p><p><span style="white-space-collapse: preserve;"> </span>return iconv(&#39;UCS-2BE&#39;, &#39;UTF-8&#39;, pack(&#39;H4&#39;, $r[1]));</p><p><span style="white-space-collapse: preserve;"> </span>},</p><p><span style="white-space-collapse: preserve;"> </span>$str</p><p><span style="white-space-collapse: preserve;"> </span>);</p><p>}</p><p><br/></p><p>echo u2c($txt);</p><p>轉(zhuǎn)后后顯示中文“系統(tǒng)繁忙,請稍后重試”<br/></p><p><br/></p>Sun, 18 May 2025 19:46:20 +0800mysql更新某個字段中要查找的字符替換成新的字符http://polarbeariptv.net/post/2715.html<p>UPDATE news SET content = REPLACE(content, &#39;查找的字符&#39;, &#39;替換的字符&#39;) WHERE id&gt;0;</p><p><br/></p><p>content 為要查找的字段</p>Mon, 05 May 2025 23:42:18 +0800如何設(shè)置Win10默認(rèn)輸入法是英語的http://polarbeariptv.net/post/2714.html<p>1. 打開電腦之后,在桌面左下角點(diǎn)擊打開“開始”按鈕,打開“設(shè)置”選項(xiàng)。</p><p>2. 打開設(shè)置選項(xiàng)之后,在Windows設(shè)置頁面中點(diǎn)擊打開“時間和語言”選項(xiàng)。</p><p>3. 進(jìn)入時間和語言設(shè)置頁面之后,在“語言”頁面中先點(diǎn)擊“中文”選項(xiàng),再打開“選項(xiàng)”。</p><p>4. 進(jìn)入語言選項(xiàng)頁面之后,在鍵盤處點(diǎn)擊一個輸入法,打開該輸入法下的“選項(xiàng)”。</p><p>5. 進(jìn)入輸入法的設(shè)置頁面之后,在該頁面中點(diǎn)擊打開“常規(guī)”選項(xiàng)。</p><p>6. 進(jìn)入常規(guī)設(shè)置頁面之后,打開“選擇輸入法默認(rèn)模式”選項(xiàng),在下拉列表中選擇“英語”選項(xiàng)即可。</p>Sat, 26 Apr 2025 18:29:39 +0800mysql 存儲過程 動態(tài)拼接參數(shù)http://polarbeariptv.net/post/2713.html<p><span style="text-wrap-mode: nowrap;">CREATE DEFINER=`root`@`%` PROCEDURE `user`(</span></p><p> <span style="text-wrap-mode: nowrap;">&nbsp; &nbsp; IN var_sdate int(11),</span></p><p><span style="text-wrap-mode: nowrap;">&nbsp; &nbsp; IN var_edate int(11)</span></p><p><span style="text-wrap-mode: nowrap;">)</span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;">BEGIN</span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;">set @wsql=CONCAT(&#39; reg_time &gt;= &#39; ,&nbsp; var_sdate , &#39; and reg_time &lt;= &#39; , var_edate);</span></p><p><span style="text-wrap-mode: nowrap;">set @querysql=CONCAT(&quot;SELECT&nbsp; * FROM user where&quot;, @wsql);</span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;">PREPARE stmt FROM @querysql;</span></p><p><span style="text-wrap-mode: nowrap;">EXECUTE stmt;</span></p><p><span style="text-wrap-mode: nowrap;">DEALLOCATE PREPARE stmt;</span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;">END</span></p><p><br/></p>Sun, 20 Apr 2025 13:49:10 +0800centos 格式化掛載數(shù)據(jù)盤http://polarbeariptv.net/post/2712.html<p>本示例以CentOS 7.6 64位系統(tǒng)為例,介紹如何在Linux服務(wù)器上使用Parted和e2fsprogs工具分區(qū)并格式化數(shù)據(jù)盤。</p><p><br/></p><p>Linux服務(wù)器上掛載的數(shù)據(jù)盤,建議您采用GPT分區(qū)格式,并采用xfs或者ext4文件系統(tǒng)。</p><p>1、遠(yuǎn)程連接Linux服務(wù)器,并安裝Parted和e2fsprogs工具。</p><p>a、遠(yuǎn)程連接服務(wù)器。</p><p>b、運(yùn)行以下命令,切換為root用戶,并返回根目錄。</p><p>sudo su root</p><p>cd</p><p>c、依次運(yùn)行以下命令,安裝Parted和e2fsprogs工具。</p><p>安裝Parted工具:</p><p>yum install -y parted</p><p>安裝e2fsprogs工具:</p><p>yum install -y e2fsprogs</p><p><br/></p><p>2、運(yùn)行以下命令,查看服務(wù)器內(nèi)的數(shù)據(jù)盤信息。</p><p>fdisk -l</p><p>查看到的數(shù)據(jù)盤信息。</p><p><br/></p><p>3、使用Parted工具為數(shù)據(jù)盤進(jìn)行分區(qū)。</p><p>a、運(yùn)行以下命令開始分區(qū)。</p><p>parted /dev/vdb1</p><p>b、運(yùn)行以下命令,設(shè)置GPT分區(qū)。</p><p>mklabel gpt</p><p>系統(tǒng)將提示您轉(zhuǎn)換分區(qū)格式將導(dǎo)致磁盤數(shù)據(jù)丟失。本文介紹如何處理一塊全新的數(shù)據(jù)盤,因此輸入Yes即可。</p><p>c、運(yùn)行以下命令,劃分一個主分區(qū),并設(shè)置分區(qū)的開始位置和結(jié)束位置。</p><p>mkpart primary 1 100%</p><p>d、運(yùn)行以下命令,檢查分區(qū)是否對齊。</p><p>align-check optimal 1</p><p>e、運(yùn)行以下命令,查看分區(qū)表。</p><p>print</p><p>f、運(yùn)行以下命令,退出Parted工具。</p><p>quit</p><p><br/></p><p>4、運(yùn)行以下命令,使系統(tǒng)重讀分區(qū)表。</p><p>partprobe</p><p><br/></p><p>5、運(yùn)行以下命令,為/dev/vdb1分區(qū)創(chuàng)建一個文件系統(tǒng)。</p><p>根據(jù)您的需求運(yùn)行以下任一命令,創(chuàng)建文件系統(tǒng)。</p><p>創(chuàng)建一個ext4文件系統(tǒng)。</p><p>mkfs -t ext4 /dev/vdb1</p><p>創(chuàng)建一個xfs文件系統(tǒng)。</p><p>mkfs -t xfs /dev/vdb1</p><p>本示例中選擇創(chuàng)建ext4文件系統(tǒng)。</p><p><br/></p><p>6、在/etc/fstab文件中寫入新分區(qū)信息,啟動開機(jī)自動掛載分區(qū)。</p><p>a、運(yùn)行以下命令,創(chuàng)建一個名為/data的掛載點(diǎn)。</p><p>mkdir /data</p><p>b、運(yùn)行以下命令,備份/etc/fstab。</p><p>cp /etc/fstab /etc/fstab.bak</p><p>c、運(yùn)行以下命令,向/etc/fstab里寫入新分區(qū)信息。</p><p>echo `blkid /dev/vdb1 | awk &#39;{print $2}&#39; | sed &#39;s/\&quot;//g&#39;` /data ext4 defaults 0 0 &gt;&gt; /etc/fstab</p><p>說明/dev/vdb1為數(shù)據(jù)盤分區(qū)設(shè)備名、/data為本示例中自定義的掛載點(diǎn)、ext4表示ext4文件系統(tǒng),您需要根據(jù)實(shí)際情況做相應(yīng)修改。</p><p>d、運(yùn)行以下命令,查看/etc/fstab的信息。</p><p>cat /etc/fstab</p><p>如果返回結(jié)果里出現(xiàn)了寫入的新分區(qū)信息,說明寫入成功。</p><p>e、運(yùn)行以下命令,使/etc/fstab中掛載數(shù)據(jù)盤的配置生效。</p><p>mount -a</p><p><br/></p><p>7、運(yùn)行以下命令,查看目前磁盤空間和使用情況。</p><p>df -h</p><p>如果返回結(jié)果里出現(xiàn)新建文件系統(tǒng)的信息,說明掛載成功,您可以使用新的文件系統(tǒng)了。</p><p><br/></p>Fri, 04 Apr 2025 16:35:05 +0800uniapp 微信小程序v-model雙向綁定沖突http://polarbeariptv.net/post/2711.html<p><br/></p><p><span style="">&lt;input type=&quot;text&quot; class=&quot;input-text&quot; placeholder=&quot;請?zhí)顚戫?xiàng)目名&quot; :value=&quot;info.title&quot; @input=&quot;handleInput&quot; data-model=&quot;title&quot;&gt;</span></p><p><span style=""><br/></span></p><p><span style=""><br/></span></p><p><span style="">handleInput(e) {</span></p><p><span style="">&nbsp; &nbsp;var that = this;</span></p><p><span style="">&nbsp; &nbsp;var name = e.currentTarget.dataset.model;</span></p><p><span style="">&nbsp; &nbsp;that.$set(that, name, e.detail.value);</span></p><p><span style="">},</span></p><p><span style="">//數(shù)組</span></p><p style="text-wrap-mode: wrap;">handleInput(e) {</p><p style="text-wrap-mode: wrap;">&nbsp; &nbsp;var that = this;</p><p style="text-wrap-mode: wrap;">&nbsp; &nbsp;var name = e.currentTarget.dataset.model;</p><p style="text-wrap-mode: wrap;">&nbsp; &nbsp;that.$set(that.info, name, e.detail.value);&nbsp; &nbsp;</p><p style="text-wrap-mode: wrap;">},</p><p><br/></p>Wed, 02 Apr 2025 15:28:19 +0800uniapp 一個數(shù)組賦值給另一個數(shù)組后,修改值原有數(shù)組變量也會更改http://polarbeariptv.net/post/2710.html<p>小程序一個數(shù)組賦值給另一個數(shù)組后,修改值原有數(shù)組變量也會更改</p><p>原因在js代碼中,字符串、數(shù)字、布爾、這種稱為基礎(chǔ)類型是可以直接賦值的,即使是修改后也不會影響原來的數(shù)據(jù)。但是引用類型比如object,array這種就會出現(xiàn)上面描述的問題。</p><p><br/></p><p>解決方法:var data=JSON.parse(JSON.stringify(data));</p><p><br/></p>Mon, 24 Feb 2025 09:25:52 +0800js在當(dāng)前日期添加天、周、月、年http://polarbeariptv.net/post/2709.html<p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;">//創(chuàng)建date</span></p><p><span style="text-wrap-mode: nowrap;">var nowDate = new Date();</span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;">//添加天數(shù)</span></p><p><span style="text-wrap-mode: nowrap;">nowDate.setDate(nowDate.getDate() + 1);</span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;">//添加周 添加周用添加天的方式,來添加七天,即為一周</span></p><p><span style="text-wrap-mode: nowrap;">nowDate.setDate(nowDate.getDate() + 7);</span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;">//添加月數(shù)</span></p><p><span style="text-wrap-mode: nowrap;">nowDate.setMonth(nowDate.getMonth() + 1);</span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;">//添加年數(shù)</span></p><p><span style="text-wrap-mode: nowrap;">nowDate.setYear(nowDate.getFullYear() + 1);</span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;"><br/></span></p><p><span style="text-wrap-mode: nowrap;">打印格式為年月日時分秒</span></p><p><span style="text-wrap-mode: nowrap;">const year = nowDate.getFullYear();</span></p><p><span style="text-wrap-mode: nowrap;">const month = (nowDate.getMonth() + 1).toString().padStart(2, &#39;0&#39;);</span></p><p><span style="text-wrap-mode: nowrap;">const day = nowDate.getDate().toString().padStart(2, &#39;0&#39;);</span></p><p><span style="text-wrap-mode: nowrap;">const hours = nowDate.getHours().toString().padStart(2, &#39;0&#39;);</span></p><p><span style="text-wrap-mode: nowrap;">const minutes = nowDate.getMinutes().toString().padStart(2, &#39;0&#39;);</span></p><p><span style="text-wrap-mode: nowrap;">const seconds = nowDate.getSeconds().toString().padStart(2, &#39;0&#39;);</span></p><p><span style="text-wrap-mode: nowrap;">console.log(`${year}-${month}-${day} ${hours}:${minutes}:${seconds}`);</span></p><p><br/></p>Wed, 11 Dec 2024 17:16:15 +0800