Separar por vírgula cada item e cada item ficar entre aspas simples
$codigoProduto = array("maçã", "banana");
$codigoProdutoStr = sprintf("'%s'", implode("','", $codigoProduto));
// 'maçã','banana'
function generateRandom(min, max) { | |
var num = Math.floor(Math.random() * (max - min + 1)) + min; | |
return ([8, 15].includes(num)) ? generateRandom(min, max) : num; | |
} | |
// except 8, 15 | |
var test = generateRandom(1, 2000) | |
console.log(test) |
function getPalavras() { | |
listaPalavras = `sagaz | |
âmago | |
negro | |
êxito | |
mexer | |
termo | |
senso | |
nobre | |
algoz |
#!/usr/bin/env bash | |
sudo apt -y install git | |
# sublime | |
# baixar deb https://download.sublimetext.com/sublime-text_build-3211_amd64.deb | |
# snap | |
sudo apt install snapd |
#!/bin/bash | |
pid_discord_hex=$(wmctrl -l | grep -i discord | awk '{print $1}'); | |
wmctrl -a $pid_discord_hex -i; | |
xdotool mousemove 97 1053; # btn icon, abre opcoes de status | |
xdotool click 1; | |
sleep 1 | |
xdotool mousemove 207 1003; # btn custom status |
<html> | |
<script> | |
var Pessoa = { | |
pesquisa: function (arg1, callback) { | |
callback([ | |
{ | |
nome: 'Vinícius' | |
}, | |
{ | |
nome: 'Amanda' |