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 -
C 2021-11-01 23:31:06
c how to encrypt and decrypt
#include <stdio.h> #include <stdlib.h> #include <string.h> #define N 100 int main() { int switcho; do { printf("Criptare random: 1\nCriptare avendo valore: 2\nDecriptare: 3\nSalvati: 4\n\nScegliere: "); scanf("%d&q... Add solution -
PHP 2021-10-30 04:08:13
online password generator in php
<?php function randomPassword() { $alphabet = "abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789"; $pass = array(); //remember to declare $pass as an array $alphaLength = strlen($alphabet) - 1; //put the length -1 in ca... Add solution -
Javascript 2021-10-29 21:18:11
jquery focus input end of text
<input type="text" id="Search" value="Hello" /> var searchInput = $('#Search'); // Multiply by 2 to ensure the cursor always ends up at the end; // Opera sometimes sees a carriage return as 2 characters. var strLength... Add solution -
C 2021-10-28 13:22:06
to upper in c
For those of you who want to uppercase a string and store it in a variable (that was what I was looking for when I read these answers). #include <stdio.h> //<-- You need this to use printf. #include <string.h> //<-- You need this to u... 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