[HTML][JS] 如何透過點擊顯示一段隱藏的文字
今天要記錄的,是如何透過點擊一段文字來顯示另一段『隱藏起來的文字』。實作的方法非常單純,是事先設定好 <style> 中的 visibility 屬性,並透過 javascript 的腳本來進行切換。
實作方法真的非常簡單,可以直接看下方的範例程式碼。
Read More »[HTML][JS] 如何透過點擊顯示一段隱藏的文字今天要記錄的,是如何透過點擊一段文字來顯示另一段『隱藏起來的文字』。實作的方法非常單純,是事先設定好 <style> 中的 visibility 屬性,並透過 javascript 的腳本來進行切換。
實作方法真的非常簡單,可以直接看下方的範例程式碼。
Read More »[HTML][JS] 如何透過點擊顯示一段隱藏的文字最近接案時遇到了一個在網頁上動態新增元素的需求:我需要在資料庫後端撈取資料,按照資料的筆數新增同樣數量的元件顯示在 HTML 的頁面上。
Read More »[HTML][JS] 動態地新增元素(以 checkbox 為例)在撰寫 C++ 的過程中,我們若是想要儲存一筆陣列資料,除了使用最基礎的 array 資料結構外,就是使用標準函式庫中的 vector 了。然而並不是所有的資料都是單純的一維資料,有時我們可能有著需求要建立二維甚至更高維的初始化資料;本篇文章就是紀錄該如何做到這件事的筆記。
Read More »[C++] 二維或更高維的 std::vector 初始化筆記在使用 PHP 開發 WordPress 外掛(plugin)的過程中,我們總少不了開檔、將檔案讀取進來的動作。而在這之中,以 file_get_contents()
最為常見。
Given theRead More »LeetCode: 938-Range Sum of BST 解題紀錄root
node of a binary search tree and two integerslow
andhigh
, return the sum of values of all nodes with a value in the inclusive range[low, high]
.
The power of the string is the maximum length of a non-empty substring that contains only one unique character. Given a string s, return the power of s.Read More »LeetCode: 1446-Consecutive Characters
在 WordPress 外掛(plugin)開發的過程中,由於 WordPress 使用了 Settings API 簡化了開發者對於資料庫的讀寫,所以我們可以很便利地使用 register_setting()
、get_option()
、update_option()
等等的函式來將一些外掛的屬性資料儲存在資料庫中。
Given head which is a reference node to a singly-linked list. The value of each node in the linked list is either 0 or 1. The linked list holds the binary representation of a number.
Return the decimal value of the number in the linked list.
Read More »LeetCode: 1290-Convert Binary Number in a Linked List to Integer在使用 cp
或是 rsync
等指令複製檔案後,為了確保複製的過程中沒有出現問題,我會習慣性地使用 du
指令去查看文件的大小。