Skip to content

Instantly share code, notes, and snippets.

View jbalves's full-sized avatar
🏠
Working from home

Jeferson Barros jbalves

🏠
Working from home
View GitHub Profile
teste
03-04 18:16:49.757 20988-21038/mobi.plantare V/FA: Inactivity, disconnecting from the service
03-04 18:16:50.332 20988-21038/mobi.plantare V/FA: Recording user engagement, ms: 5701
03-04 18:16:50.332 20988-21038/mobi.plantare V/FA: Connecting to remote service
03-04 18:16:50.339 20988-21038/mobi.plantare V/FA: Activity paused, time: 364956493
03-04 18:16:50.343 20988-21038/mobi.plantare D/FA: Logging event (FE): user_engagement(_e), Bundle[{firebase_event_origin(_o)=auto, engagement_time_msec(_et)=5701, firebase_screen_class(_sc)=MainActivity, firebase_screen_id(_si)=-7357298905912980394}]
03-04 18:16:50.347 20988-20988/mobi.plantare V/FA: onActivityCreated
03-04 18:16:50.363 20988-21038/mobi.plantare V/FA: Connection attempt already in progress
03-04 18:16:50.382 20988-21038/mobi.plantare V/FA: Connection attempt already in progress
03-04 18:16:50.382 20988-21038/mobi.plantare V/FA: Activity resumed, time: 364956544
03-04 18:16:50.385 20988-21038/mobi.plantare D/FA: Logging event (FE): screen_view(_vs), Bund
@jbalves
jbalves / exercicio6.js
Created July 25, 2017 05:07
exercicio6.js
//Utilizando o ExpressJS, crie uma rota que some 2 números enviados como parâmetros na URL.
//Exemplo, ao executar no navegador: http://localhost:3000/somar?num1=10&num2=30
//deverá ser retornado na tela A soma é: 40.
const express = require('express')
const app = express()
const port = 3000
app.get('/somar', (request,response) => {
@jbalves
jbalves / exercicio5.js
Created July 25, 2017 05:06
exercicio5.js
const fs = require('fs')
function readdir(path) {
return new Promise((resolve, reject) => {
fs.readdir(path, (err, paths) => {
if (err) {
reject(err)
} else {
resolve(paths)
}
})
@jbalves
jbalves / exercicio4.js
Created July 25, 2017 05:05
exercicio4.js
const fs = require('fs')
const path = './'
// Construa uma função async que utiliza a função readdirPromise com await e escreva no console a lista de arquivos/diretórios retornados.
function readdirPromise(path) {
return new Promise((resolve, reject) => {
fs.readdir(path, (err, files) => {
if (err) {
reject(err)
} else {
@jbalves
jbalves / exercicio3.js
Created July 25, 2017 05:04
exercicio3.js
const fs = require('fs')
const path = './'
//Dado que a assinatura da função readdir do módulo fs é:
/*
fs.readdir(path, (err, files) => {
if (err) {
console.log('ocorreu um erro.')
} else {
console.log(files)
@jbalves
jbalves / exercicio2.js
Created July 25, 2017 05:04
exercicio2.js
//Dado o seguinte vetor e utilizando somente map, reduce e filter.
const produtos = [
{
id: 1,
preco: 10.0,
qtd: 2
},
{
id: 2,
preco: 10.0,
@jbalves
jbalves / exercicio1.js
Created July 25, 2017 05:02
exercicio1.js
//Exercício 1
const produtos = [
{
nome: 'Bicicleta',
preco: 1200.0
},
{
nome: 'Capacete',
preco: 450.0
}
@jbalves
jbalves / gist:23254934567c3c5269aed445ad457655
Created November 14, 2016 00:32
Log shared on facebook test
11-13 20:23:21.028 12453-12453/? I/art: Late-enabling -Xcheck:jni
11-13 20:23:21.185 12453-12453/mobi.plantare W/System: ClassLoader referenced unknown path: /data/app/mobi.plantare-2/lib/arm
11-13 20:23:21.425 12453-12478/mobi.plantare W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
11-13 20:23:21.442 12453-12478/mobi.plantare W/DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
11-13 20:23:21.489 12453-12453/mobi.plantare D/FirebaseAuth: Notifying listeners about user ( Zkr8SWrw6uPrG66PgIfltNx40rX2 ).
11-13 20:23:21.567 12453-12453/mobi.plantare W/DynamiteLoaderImpl: Failed to load module version: module com.google.android.gms.flags not found
11-13 20:23:21.568 12453-12453/mobi.plantare I/DynamiteModule: Considering local module com.google.android.gms.flags:2 and remote module com.google.android.gms.flags:0
11-13 20:23:21.568 12453-12453/mobi.plantare I/DynamiteModule: Selected local version of com.google.android.gms.flags
11-13 20:2
@jbalves
jbalves / GlassFishRemoteSecureAdmin.txt
Created November 5, 2014 01:43
How to Enable GlassFish Remote Secure Admin ?
The problem
Since Glassfish version 3.1, the server could be only administrated remotely, when the secure admin feature is enabled (see here).
New since 3.1.2+ is, that every administration account must have a password if you want to enabled remote secure admin.
The next steps are all done in the asadmin console. You can start this under
Linux
[code]./<GlassfishDirectory>/bin/asadmin[/code]
Windows