Format dates in PHP
ormatting dates in PHP is an essential task for any web developer. It is important to display dates in a format that is easy to read and understand for users. In this article, we will…
ormatting dates in PHP is an essential task for any web developer. It is important to display dates in a format that is easy to read and understand for users. In this article, we will…
Check if HTML element exists // jQuery if($(“#myElm”).length > 0) { console.log(“Element exists”); } // Pure javascript var my_elm = document.getElementById(“myElm”); if(typeof(my_elm) != ‘undefined’ && my_elm != null){ console.log(“Element exists”); }
Simple copy-and-paste example: DECLARE @timestamp BIGINT = 1661881445; SELECT DATEADD(S, @timestamp, ‘1970-01-01’) Or for values greater than 2147483647 DECLARE @t AS BIGINT = 4956739375 DECLARE @oneyear AS INT = 31622400 SELECT DATEADD(SECOND, @t % @oneyear,…
/** * Remove substring from string * * Here is an inline example: * <code> * <?php * echo rmv(‘mxaxuxix’, ‘x’); // return ‘maui’; * * ?> * </code> * @param string $subject * @param…
function att($arr, $class = null) { $return = “<table” . (!is_null($class) ? ‘ class = “‘ . $class . ‘”‘ : null) . “>”; foreach ($arr as $key => $value) { $return .= “<tr>”; foreach…
We regret to announce that the sitemap generator service in the free version without registration will be ineterrupted from 08/08/2022. It will remain available only to registered users. We had to make this decision due…
We haven’t heard from you in a long time, but we haven’t abandoned the project. We are going back to work more motivated than before thanks to your support. Here’s what’s new this month: The…
package main import ( “fmt” “math/rand” “strconv” “time” ) func random(min, max int) int { rand.Seed(time.Now().UTC().UnixNano()) return rand.Intn(max-min) + min } func main() { myrand := random(1, 91) fmt.Println(strconv.Itoa(myrand)) }
Let’s take the example of having to select all the div with the data-lang attribute different from “it”: div:not([data-lang=it]) { // Your CSS here. } If you want to select elements that have an attribute…
var jsElm = document.createElement(“script”); jsElm.type = “application/javascript”; jsElm.src = “https://cdn.dotmaui.com/libs/jquery/3.6.0/jquery.min.js”; document.head.appendChild(jsElm);