Skip to content

Instantly share code, notes, and snippets.

View vitorpiovezam's full-sized avatar
🎯
Focusing

Vitor Goncalves Piovezam vitorpiovezam

🎯
Focusing
View GitHub Profile
package br.fiap.conexao;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import javax.swing.JOptionPane;
public class Conexao {
-- 1
select
e.department_id as Dept,
e.first_name as Nome,
e.job_id as Job,
round(e.salary) as Salario,
(EXTRACT(year from e.HIRE_DATE) - EXTRACT(year from CURRENT_DATE))* -1 as Anos
from employees e
join departments d
on (e.department_id = d.department_id)
@vitorpiovezam
vitorpiovezam / customFormat.js
Created December 5, 2018 17:19
formatador de data mutante
//*** This code is copyright 2002-2016 by Gavin Kistner, !@phrogz.net
//*** It is covered under the license viewable at http://phrogz.net/JS/_ReuseLicense.txt
//*** Reuse or modification is free provided you abide by the terms of that license.
//*** (Including the first two lines above in your source code satisfies the conditions.)
// Include this code (with notice above ;) in your library; read below for how to use it.
Date.prototype.customFormat = function(formatString){
var YYYY,YY,MMMM,MMM,MM,M,DDDD,DDD,DD,D,hhhh,hhh,hh,h,mm,m,ss,s,ampm,AMPM,dMod,th;
var dateObject = this;
2019-02-17T04:59:13.758430+00:00 app[web.1]: > node-rest-mysql@1.0.0 start /app
2019-02-17T04:59:13.758432+00:00 app[web.1]: > node server.js
2019-02-17T04:59:13.758434+00:00 app[web.1]:
2019-02-17T04:59:14.022412+00:00 app[web.1]: Server ready at http://127.0.0.1:59378
2019-02-17T05:00:12.041711+00:00 heroku[web.1]: State changed from starting to crashed
2019-02-17T05:00:11.948019+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
2019-02-17T05:00:11.948019+00:00 heroku[web.1]: Stopping process with SIGKILL
2019-02-17T05:00:12.020809+00:00 heroku[web.1]: Process exited with status 137
2019-02-17T05:06:21.143649+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/user" host=api-idoctor.herokuapp.com request_id=fcbab4cf-4649-4168-a38a-810e3955a7b0 fwd="177.33.153.109" dyno= connect= service= status=503 bytes= protocol=https
2019-02-17T05:06:21.950960+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path
package br.com.fiap.primeiroaplicativo;
import android.support.annotation.NonNull;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.EditText;
@vitorpiovezam
vitorpiovezam / cloudSettings
Created March 4, 2019 03:00
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-03-04T03:00:05.275Z","extensionVersion":"v3.2.5"}
@vitorpiovezam
vitorpiovezam / query.graphql
Last active March 6, 2019 01:02
graphql-queries
# Filtering the projects who have the value 'name' = "GrapQL"
project(name: "GraphQL") {
# These values will return in your JSON response
tagline
}
}
@vitorpiovezam
vitorpiovezam / types.graphql
Last active March 6, 2019 01:02
graphql model
type @model Project {
name: String
tagline: String
contributors: [User] # Reference to your User Type
}
{
"name": "apollo-graphql",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
# The following types define the data model of the example service
# based on which the GraphQL API is generated
type User @model {
id: ID! @isUnique
name: String
dateOfBirth: DateTime
# Uncomment below - you can declare relations between models like this