This is a sample script for transposing slice from (n x m) to (m x n) for golang.
package main
import "fmt"
func transpose(slice [][]string) [][]string {
digitalocean_domain.example example.com | |
digitalocean_record.example example.com,<DO ID> | |
digitalocean_record.fd-gmail-txt example.com,<DO ID> | |
digitalocean_record.fd-mx["alt1.aspmx.l.google.com."] example.com,<DO ID> | |
digitalocean_record.fd-mx["alt2.aspmx.l.google.com."] example.com,<DO ID> | |
digitalocean_record.fd-mx["aspmx.l.google.com."] example.com,<DO ID> | |
digitalocean_record.fd-mx["aspmx2.googlemail.com."] example.com,<DO ID> | |
digitalocean_record.fd-mx["aspmx3.googlemail.com."] example.com,<DO ID> | |
digitalocean_record.fd-ns["1"] example.com,<DO ID> | |
digitalocean_record.fd-ns["2"] example.com,<DO ID> |
This fork of JamieMason's implementation changes the key
parameter to be an array of keys instead of just a single key. This makes it possible to group by multiple properties instead of just one.
const groupBy = keys => array =>
array.reduce((objectsByKeyValue, obj) => {
const value = keys.map(key => obj[key]).join('-');
var __sys = {}; | |
var ua = navigator.userAgent.toLowerCase(); | |
var s; | |
(s = ua.match(/msie ([\d.]+)/)) ? __sys.ie = s[1] : | |
(s = ua.match(/firefox\/([\d.]+)/)) ? __sys.firefox = s[1] : | |
(s = ua.match(/chrome\/([\d.]+)/)) ? __sys.chrome = s[1] : | |
(s = ua.match(/opera.([\d.]+)/)) ? __sys.opera = s[1] : | |
(s = ua.match(/version\/([\d.]+).*safari/)) ? __sys.safari = s[1] : 0; | |
function typeofUndefined(value) { |
Entendo que o Windows apresenta a mensagem "outro computador desta rede tem o mesmo endereço IP desta rede..." mesmo não estão ligado a uma rede.
Para sermos mais assertivos qual o tipo de conexão que utiliza?
Recomendo que faça o procedimento abaixo para redefinir as configurações de rede do computador:
Steps to deploy a Node.js app to Digital Ocean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt
If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a
I will be using the root user, but would suggest creating a new user
<?php | |
namespace Treffynnon; | |
/** | |
* A PHP class to access a PHP array via dot notation | |
* (Agavi http://www.agavi.org was the inspiration). | |
* | |
* This was hacked in to an existing codebase hence the | |
* global config array variable. |
<?php | |
function varexport($expression, $return=FALSE) { | |
$export = var_export($expression, TRUE); | |
$export = preg_replace("/^([ ]*)(.*)/m", '$1$1$2', $export); | |
$array = preg_split("/\r\n|\n|\r/", $export); | |
$array = preg_replace(["/\s*array\s\($/", "/\)(,)?$/", "/\s=>\s$/"], [NULL, ']$1', ' => ['], $array); | |
$export = join(PHP_EOL, array_filter(["["] + $array)); | |
$export = preg_replace('(\d+\s=>\s)', '', $export); // REMOVE THE NUMERIC INDEXES | |
if ((bool)$return) return $export; else echo $export; | |
} |