| varexpress=require('express'); | |
| varapp=express(); | |
| app.get('/',function(req,res){ | |
| res.send('Hello World!'); | |
| }); | |
| app.listen(3000,function(){ | |
| console.log('Example app listening on port 3000!'); | |
| }); |
| const{ Pool, Client }=require('pg') | |
| functionconnect_data(){ | |
| constpool=newPool({ | |
| user: 'postgres', | |
| host: 'localhost', | |
| database: 'postgres', | |
| password: 'abc123', | |
| port: 5432, | |
| }) | |
| pool.query('SELECT * from municipios',(err,res)=>{ | |
| console.log(err,res) | |
| pool.end() | |
| }) | |
| constclient=newClient({ | |
| user: 'postgres', | |
| host: 'localhost', | |
| database: 'postgres', | |
| password: 'abc123', | |
| port: 5432, | |
| }) | |
| client.connect() | |
| client.query('SELECT NOW()',(err,res)=>{ | |
| console.log(err,res) | |
| client.end() | |
| }) | |
| } | |
| connect_data() |
| <!DOCTYPE html> | |
| <htmllang="en"> | |
| <head> | |
| <metacharset="utf-8"> | |
| <title>Green Planning</title> | |
| <metacontent="width=device-width, initial-scale=1.0" name="viewport"> | |
| <metacontent="" name="keywords"> | |
| <metacontent="" name="description"> | |
| <imgsrc="login2.png" alt="login2.png" class="img3"> | |
| <!-- Google Fonts --> | |
| <linkhref="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,700,700i|Poppins:300,400,500,700" | |
| rel="stylesheet"> | |
| <linkhref="https://fonts.googleapis.com/css?family=Comfortaa&display=swap" rel="stylesheet"> | |
| <!-- Bootstrap CSS File --> | |
| <linkhref="./lib/bootstrap/css/bootstrap.min.css" rel="stylesheet"> | |
| <!-- Libraries CSS Files --> | |
| <linkhref="C:\Users\lucas\Desktop\conversor\font-awesome-4.7.0\font-awesome-4.7.0\css\font-awesome.min.css" | |
| rel="stylesheet"> | |
| <linkhref="./lib/animate/animate.min.css" rel="stylesheet"> | |
| <!-- Main Stylesheet File --> | |
| <linkhref="style.css" rel="stylesheet"> | |
| </head> | |
| <body> | |
| <!--========================== | |
| Header | |
| ============================--> | |
| <mainid="main"> | |
| <formaction="connect_db.php" method="POST"> | |
| <divclass="loginimg"> | |
| <h1style="font-family: 'Comfortaa', cursive; font-size: 130px; color: #cab97f;">Green Planning</h1> | |
| <h2style="font-family: 'Comfortaa', cursive;">Dream On!</h2> | |
| </div> | |
| <divclass="container-fluid"> | |
| <inputtype="text" placeholder="Busca" name="uname" style="outline: none;" required> | |
| <iclass="fa fa-search" aria-hidden="true"></i> | |
| <br> | |
| </div> | |
| <divclass="container" align="center" id="botao"> | |
| <inputtype="submit" name="send_button" value="Buscar" style="outline: none;" class="cancelbtn"></input> | |
| </div> | |
| </form> | |
| <inputtype="submit" name="out-button" value="Sair" style="outline: none;" class="cancelbtn" id="outbutton"></button> | |
| </main> | |
| <!-- JavaScript Libraries --> | |
| <scriptsrc="./lib/jquery/jquery.min.js"></script> | |
| <scriptsrc="./lib/jquery/jquery-migrate.min.js"></script> | |
| <scriptsrc="./lib/bootstrap/js/bootstrap.bundle.min.js"></script> | |
| <scriptsrc="./lib/easing/easing.min.js"></script> | |
| <scriptsrc="./lib/wow/wow.min.js"></script> | |
| <scriptsrc="./lib/waypoints/waypoints.min.js"></script> | |
| <scriptsrc="./lib/counterup/counterup.min.js"></script> | |
| <scriptsrc="./lib/superfish/hoverIntent.js"></script> | |
| <scriptsrc="./lib/superfish/superfish.min.js"></script> | |
| <scripttype="text/javascript" src="connect_db.js"></script> | |
| <scripttype="text/javascript"> | |
| functionchangeBt(){document.getElementById("botao").innerHTML='<img src="loading.gif" width="100px" height="100px">';} | |
| </script> | |
| <!-- Template Main Javascript File --> | |
| <scriptsrc="login.js"></script> | |
| </body> | |
| <footerid="footer"> | |
| <divclass="container-fluid"> | |
| <divclass="social-links"> | |
| <ahref="https://linkedin.com" class="linkedin"><iclass="fa fa-linkedin"></i></a> | |
| </div> | |
| <divclass="credits"> | |
| Designed by <ahref="https://github.com/FelippeS" target="blank">Felippe Sposito</a> | |
| , <ahref="https://github.com/ErickOliveiraT" target="blank">Alef de Paula</a> | |
| , <ahref="https://github.com/ErickOliveiraT" target="blank">João Victor Madeira</a> | |
| , <ahref="https://github.com/ErickOliveiraT" target="blank">Lucas Kallás</a> | |
| and <ahref="https://github.com/ErickOliveiraT" target="blank">Daiane </a> | |
| </div> | |
| </div> | |
| </footer> |
| const{ app, BrowserWindow }=require('electron') | |
| const{ Pool, Client }=require('pg') | |
| functioncreateWindow(){ | |
| // Cria uma janela de navegação. | |
| letwin=newBrowserWindow({ | |
| webPreferences: { | |
| nodeIntegration: true | |
| } | |
| }) | |
| win.maximize(); | |
| win.removeMenu(); | |
| // e carregar o index.html do aplicativo. | |
| win.loadFile('index.html') | |
| win.webContents.openDevTools() | |
| /*mainWindow.on('closed', function(){ | |
| mainWindow = null; | |
| })*/ | |
| } | |
| app.on('ready',createWindow) | |
| app.on('window-all-close',function(){ | |
| if(process.platform!=='darwin'){ | |
| app.quit(); | |
| } | |
| }) | |
| app.on('activate',function(){ | |
| if(mainWindow===null){ | |
| createWindow(); | |
| } | |
| }) |
O desenvolvimento do projeto se embasou em um front-end desenvolvido em Node JS, HTML com estilização do CSS, a utilização do framework Electron foi o que tornou isso possível. A interface web transformada em aplicação possuí uma barra para a pesquisa com uma palavra chave, que no caso seria alguma cidade brasileira, após a busca será apresentada informações referentes a localização buscada, as mesmas podem ser divididas em geográficas e social. Os índices pluviométricos, temperaturas e topografia, enquanto que os índices sociais serão representados por residências com a presença de agua potável, o ofertamento de energia elétrica e também com saneamento básico.
The project development was based on a front end developed in Node JS, with CSS and HTML, using the Electron framework was what made it possible. The web interface turned into application has a search bar with a keyword, which in this case would be some Brazilian city, after the search will be presented information regarding the searched location, they can be divided into geographic and social. Rainfall indices, temperatures and topography, while social indices will be represented by households with clean water, electricity and basic sanitation.
Ascensão a resiliência desafiou ambos os membros da equipe a encararem novas áreas, utilizou-se conhecimento em desenvolvimento web, com processamento em banco de dados com reunindo as informações que foram coletadas, a inteligência artificial deverá como trabalho final cruzar os dados com cada região oferecendo uma piscina de soluções que possam reduzir os problemas abordados.
Rise to resilience challenged both team members to tackle new areas, using knowledge in web development, database processing with gathering the information that was collected, artificial intelligence should as a final work cross-check the data with each region offering a pool of solutions that can reduce the problems addressed.
Nós pensamos bastante sobre o desafio que escolheríamos, depois de muito tempo gasto nessa importante questão, nós percebemos que Ascensão a Resiliência era a melhor da opções para trabalhar porque ele era o único desafio no qual pensamos que poderíamos fazer bem no tempo especificado do evento. Então, nós começamos a trabalhar, primeiro adquirindo dados e conhecimento.
We thought a lot about the challenge that we would choose, after a lot of time spent in that important question, we found that Rise to Resilience the best of the options to work because it was the only challenge which we thought we could do well in the specified time in the event. So, we started working in that idea, first aquiring data and knowledge.