What do you want to save?
Add Code snippet
New code examples
-
PHP 2021-11-06 11:07:07
hex to rgba php
function hex2rgba($color, $opacity = false) { $default = 'rgb(0,0,0)'; //Return default if no color provided if(empty($color)) return $default; //Sanitize $color if &quo... Add solution -
Javascript 2021-11-05 10:16:14
random id js
var ID = function () { // Math.random should be unique because of its seeding algorithm. // Convert it to base 36 (numbers + letters), and grab the first 9 characters // after the decimal. return '_' + Math.random().toString(36).substr(2, 9); }; Add solution -
C++ 2021-11-04 14:21:17
delete last char of string C++
st = myString.substr(0, myString.size()-1); Add solution -
PHP 2021-11-02 18:46:13
Admob server-side verification php
// Google admob public key $verifier_keys = '{"keys":[{"keyId":3335741209,"pem":"-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE+nzvoGqvDeB9+SzE6igTl7TyK4JB\nbglwir9oTcQta8NuG26ZpZFxt+F2NDk7asTE6/2Yc8i1A... Add solution -
Javascript 2021-10-28 16:11:06
trim comma in javascript
let myString = "string,with,trailing,comma,"; // remove the last character of the string (regardless of what it is) myString.substr(0, myString.length-1) // remove only a comma if it appears at the end of the string myString.replace(/,$/, &quo... Add solution -
PHP 2021-10-28 12:05:16
wordpress plugin public page
public function mypage_rewrite_ext() { global $wp_rewrite; $plugin_url = plugins_url( 'mypage.php', __FILE__ ); $plugin_url = substr( $plugin_url, strlen( home_url() ) + 1 ); // The pattern is prefixed with '^' // The substitution is p... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5