Xtumble è una suite di prodotti per gestire l’intero flusso di dati della tua azienda in modo organico e strutturato. – E-commerce attivo in pochi minuti – Sincronizzato con lo shop di Facebook – Condividi progetti con i tuoi clienti e fornitori con il modulo B2B Guarda una demo di registrazione https://www.youtube.com/watch?v=6sq8ITTWE30 Provalo senza impegno,…
Leggi tutto
Hide element on click outside, is a must-have functionality for the dropdown menu. Apart from that, it also used in some situations where you need to hide div when the user clicks outside of this element. You can easily hide div or element when click outside of it using jQuery. In the example code snippet,…
Leggi tutto
1)Purchase your Certificate SSL DVW (Domain Validated Wildcard ) from your provider. 2)Log in to your server’s terminal via Secure Shell (SSH). 3)Generate a private key and CSR by running the following command:
1 |
openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csr |
Note: Replace “server” with the domain name you intend to secure. Enter the following CSR details when prompted: Common Name: The FQDN (fully-qualified domain name) you want to…
Leggi tutto
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
// initialize cURL $ch = curl_init(); // set the URL of the remote resource to download curl_setopt($ch, CURLOPT_URL, 'http://www.site.com/index.html'); //set url as curl_init() parameter --> $ch = curl_init('http://www.site.com/index.html'); // required that no headers be downloaded curl_setopt($ch, CURLOPT_HEADER, 0); // prevent remote content from being passed to print curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); // set the timeout to 10 seconds curl_setopt($ch, CURLOPT_TIMEOUT, 10); // run the call and save the result in a variable $output = curl_exec($ch); // close cURL curl_close($ch); |
Decode JSON object with an array value:
1 2 3 4 5 6 7 8 9 10 11 12 |
$jsonobj = '{"dataset":[{"field1":"hello","field2":0,"field3":1},{"field1":"hola","field2":2,"field3":3}]}'; $obj = json_decode($jsonobj); // it returns object $array_dataset = $obj->dataset; for ($i = 0; $i < count($array_dataset); $i++) { $singoloArray = $array_dataset[$i]; foreach($singoloArray as $field => $value) { echo $field . " => " . $value . "<br>"; } } |
Decode array of JSON object:
1 2 3 4 5 6 7 8 9 10 |
$jsonobj = '[{"field1":"hello","field2":0,"field3":1},{"field1":"hola","field2":2,"field3":3}]'; $obj = json_decode($jsonobj, true); // it returns array for ($i = 0; $i < count($obj); $i++) { $singoloArray = $obj[$i]; foreach($singoloArray as $field => $value) { echo $field . " => " . $value . "<br>"; } } |
Try this on https://3v4l.org/
Easy HTML editor with instant preview into TWebBrowser Component to use: – TSynedit – TSynHTMLSyn – TWebBrowser – TTimer (set Interval 1000) – TSplitter (set Align alLeft) Here the code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
procedure TForm1.SynEdit1KeyPress(Sender: TObject; var Key: Char); begin Timer1.Enabled := True; end; procedure TForm1.Timer1Timer(Sender: TObject); var Doc: Variant; begin Timer1.Enabled := False; if not Assigned(WebBrowser1.Document) then WebBrowser1.Navigate('about:blank'); Doc := WebBrowser1.Document; Doc.Clear; Doc.Write(SynEdit1.Lines.Text); Doc.Close; end; |