Skip to content

Instantly share code, notes, and snippets.

View jeffotoni's full-sized avatar

Jefferson Otoni Lima jeffotoni

View GitHub Profile
this.upload = function() {
//var req = createXMLHTTPObject();
var fileInput = document.getElementById('files');
for (var i = 0; i < fileInput.files.length; i++) {
var file = fileInput.files[i];
var PATH_HTTP = ""
function Set(NAME_SET, VALUE_SET) {
var execVar = NAME_SET + ' = "' + VALUE_SET + '"';
eval(execVar)
}
package main
import (
// "bufio"
"flag"
"fmt"
"strings"
// "io/ioutil"
"os"
)
"scripts": {
"babel": "babel --presets es2015 ./main0.js ./main1.js ./main2.js ./main3.js ./main4.js ./main5.js -o bin/app.bundle.js",
"start": "http-server",
"webpack": "webpack"
},
const delay = (msg, time) =>
new Promise((res, rej) => {
setTimeout(() => res(`Message ${time}`), time)
})
const fn1 = (msg = "fn1", time = 1000) => delay(msg, time)
const fn2 = (msg = "fn2", time = 2000) => delay(msg, time)
const fn3 = (msg = "fn2", time = 3000) => delay(msg, time)
fn1("promise1")
import TplC from './Template/Upload/Confirm.js'
const func3 = async (callBack) => {
return new Promise((resolve, reject)=>{
console.log("####################");
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/var/www/www.hcodecommerce.com.br"
ServerName www.hcodecommerce.com.br
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteEngine On
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Upload ajax</title>
</head>
<body>
<form action="http://localhost:9002/upload" method="post" id="upload" enctype="multipart/form-data">
class ClassName {
constructor(name) {
this.name = name;
}
get method() {
return this.BuscaName()
}
########################################
name => api-connect.go
########################################
----------------------------------------
package api
import ...
func connect....