Tag: php function
On Steem Blockchain, the reputation can be formatted in a logarithmetic (base 10) scale. Given recently, my PR to fix the reputation formatter in SteemJS is merged, I also …
Given two variables in PHP, write a simple function to check if they are similar arrays. Two arrays are similar if they are of same sizes and contain the …
The Cryptocurrencies such as Bitcoins, Litecoins, ETH coins are the top coins among others. The exchange rate to Fiat currency may fluctuate greatly many times per day. We may …
The Mode of an array (numbers, strings or any other types) is the most frequently one. For example, for integer array , the mode is 1 (appears twice). There …
Bing uploads a daily wallpaper, and we can show today’s Bing wallpaper via the following PHP function. <?php function display_daily_bing_wallpaper() { $bing_daily_image_xml = file_get_contents('http://cn.bing.com/HPImageArchive.aspx?idx=0&n=1'); preg_match("/<urlBase>(.+?)<\/urlBase>/ies", $bing_daily_image_xml, $matches); $bing_daily_img_url= 'https://s.cn.bing.com' …