Jump to content

LuizH.M

Members
  • Content count

    12
  • Joined

  • Last visited

Community Reputation

0 Comum

About LuizH.M

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. from urllib.request import urlopen response = urlopen("http://vimeo.com/api/v2/video/57733101.json").read().decode('utf8') dados = json.loads(response)[0] print(dados) print('Titulo: ',dados['title']) print('URL: ',dados['url']) print('Duração',dados['duration']) a parte do json fala que não está definida me ajudem pls estou usando o visual studio
  2. LuizH.M

    Criar um scroll suave html

    Estou tentando criar um scroll suave mais por algum motivo não esta indo Quem puder ajudar eu agradeço MENU <div class="navigation"> <nav class="menu"> <div class="logo"> <span>Gamer Lovers</span> </div> <ul> <li><a href="index.html">Inicio</a></li> <li><a href="#quem-somos">Quem Somos</a></li> <li><a href="https://web.whatsapp.com/send?phone=*************" target="_blank">Contato</a></li> <li><a href="#">Entrar</a></li> </ul> </nav> </div> JAVASCRIPT const menuLinks = document.querySelectorAll('.menu a[href^="#"]'); function getDistanceFromTheTop(element) { const id = element.getAttribute("href"); return document.querySelector(id).offsetTop; } function scrollToSection(event) { event.preventDefault(); const distanceFromTheTop = getDistanceFromTheTop(event.target) - 90; smoothScrollTo(0, distanceFromTheTop); } menuLinks.forEach((link) => { link.addEventListener("click", scrollToSection); }); function smoothScrollTo(endX, endY, duration) { const startX = window.scrollX || window.pageXOffset; const startY = window.scrollY || window.pageYOffset; const distanceX = endX - startX; const distanceY = endY - startY; const startTime = new Date().getTime(); duration = typeof duration !== "undefined" ? duration : 400; const easeInOutQuart = (time, from, distance, duration) => { if ((time /= duration / 2) < 1) return (distance / 2) * time * time * time * time + from; return (-distance / 2) * ((time -= 2) * time * time * time - 2) + from; }; const timer = setInterval(() => { const time = new Date().getTime() - startTime; const newX = easeInOutQuart(time, startX, distanceX, duration); const newY = easeInOutQuart(time, startY, distanceY, duration); if (time >= duration) { clearInterval(timer); } window.scroll(newX, newY); }, 1000 / 60); }
  3. LuizH.M

    Editar um css usando javacript

    Muito obrigado man
  4. LuizH.M

    Editar um css usando javacript

    Estou tentando alterar um css via javascript mas por algum motivo da erro se puder ajudar agradeço html <!DOCTYPE html> <html lang="pt-br"> <head> <!--Titulo--> <title>Projeto</title> <!--Cadeia de caracteres--> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http-equiv="X-UA-compatible" content="ei=edge"> <link rel="stylesheet" type="text/css" href="css/estilo.css"> </head> <body> <header></header> <input type="checkbox" id="chk" onclick="chk()"> <label for="chk" class="menu-chk">&#9776;</label> <div class="bg"></div> <nav class="menu" id="principal"> <ul> <li><a href="#" class="home">Home</a></li> <li><a href="#">Contato</a></li> <li><a href="#">Forum</a></li> <li><a href="#">Sobre</a></li> </ul> </nav> <footer> <script type="text/javascript" src="js/javascript.js"></script> </footer> </body> </html> css *{ padding: 0; margin: 0; } header{ position: fixed; top: 0; left: 0; height: 50px; width: 100%; background-color: #5b859a; } .menu-chk{ position: fixed; font-size: 25px; font-weight: bold; padding: 5px; width: 40px; height: 40px; text-align: center; background-color: #5b859a; color: #fff; cursor: pointer; transition: all.4s; left: 301px; top: 0; } .menu-chk:hover{ background-color: #fff; color: #5b859a; } .menu{ height: 100%; position: fixed; background-color: #222; top: 0; overflow: hidden; transition: all .4s; } #principal{ width: 300px; left: -300px; } ul{ list-style: none; } ul li a{ display: block; font-size: 18px; font-family: 'Arial'; padding: 10px; border-bottom: solid 1px #000; color: #ccc; text-decoration: none; transition: all.4s; } ul li span{ float: right; padding-right: 10px; } ul li a:hover{ background-color: #5b859a; } .home{ margin-top: 60px; background-color: #111; border-left: solid 5px #444; } js function chk() { var chk = document.getElementById('chk'); var menu = document.getElementById('principal'); chk.is(':checked'){ menu.style.left = "300px"; } }
  5. LuizH.M

    Filtrar por data

    eu sei fazer a consulta via botão mas eu queria um filtro que conforme eu fosse colocando as datas ele já iria filtrando, confirmei que no banco está no formato data Agradeço a ajuda
  6. LuizH.M

    Filtrar por data

    Tó com dificuldade para fazer um filtro que aconteça a medida que eu vou colocando as datas no input Agradeço desde já vlw <?php include_once('conexao.php'); $sql = sprintf("SELECT * FROM caixa ORDER BY 'data' "); $dados = mysqli_query($con,$sql) or die(mysqli_error()); $resul = mysqli_query($con, "SELECT sum(dinheiro) FROM caixa"); function between(){ if(!empty($data0) and empty($data1)){ $data0 = $_GET['data0']; $data1 = $_GET['data1']; $sql = mysqli_query("SELECT metodo,dinheiro,data FROM caixa WHERE data BETWEEN '$data0' and '$data1'"); $dados0 = mysqli_query($con,$sql) or die(mysqli_error()); while($linha = mysqli_fetch_array($dados0)) { ?> <tr> <td><?php echo $linha['metodo']?></td> <td><?php echo "R$ ". $linha['dinheiro']?></td> <td width="120"><?php echo date('d/m/Y', strtotime($linha['data']))?></td> </tr> <?php } ?> <?php } } ?> <!DOCTYPE html> <html lang="PT-BR"> <head> <title></title> <!-- META--> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <style> *{ margin:0px; padding:0px; } table,th,td{ border:none } table{ width:100%; display:table; } table th{ text-align:center!important; } table td{ text-align:left!important; } table.bordered>thead>tr,table.bordered>tbody>tr{ border-bottom:1px solid #d0d0d0; } table.striped>tbody>tr:nth-child(odd){ background-color:#f2f2f2; } table.striped>tbody>tr>td{ border-radius:0; }table.highlight>tbody>tr{ transition:background-color .25s ease; } table.highlight>tbody>tr:hover{ background-color:#f2f2f2; } table.centered thead tr th,table.centered tbody tr td{ text-align:center; } .title{ text-align:center!important; padding:15px 5px; font-family:'times new roman'; font-size:20px; } thead{ border-bottom:1px solid #d0d0d0; } td,th{ padding:15px 5px; display:table-cell; } .delete { -moz-box-shadow: 0px 1px 0px 0px #fff6af; -webkit-box-shadow: 0px 1px 0px 0px #fff6af; box-shadow: 0px 1px 0px 0px #fff6af; background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #ffec64), color-stop(1, #ffab23)); background:-moz-linear-gradient(top, #ffec64 5%, #ffab23 100%); background:-webkit-linear-gradient(top, #ffec64 5%, #ffab23 100%); background:-o-linear-gradient(top, #ffec64 5%, #ffab23 100%); background:-ms-linear-gradient(top, #ffec64 5%, #ffab23 100%); background:linear-gradient(to bottom, #ffec64 5%, #ffab23 100%); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffec64', endColorstr='#ffab23',GradientType=0); background-color:#ffec64; -moz-border-radius:6px; -webkit-border-radius:6px; border-radius:6px; border:1px solid #ffaa22; display:inline-block; cursor:pointer; color:#333333; font-family:Arial; font-size:12px; font-weight:bold; padding:6px 15px; text-decoration:none; text-shadow:0px 1px 0px #ffee66; } .delete:hover { background:-webkit-gradient(linear, left top, left bottom, color-stop(0.05, #ffab23), color-stop(1, #ffec64)); background:-moz-linear-gradient(top, #ffab23 5%, #ffec64 100%); background:-webkit-linear-gradient(top, #ffab23 5%, #ffec64 100%); background:-o-linear-gradient(top, #ffab23 5%, #ffec64 100%); background:-ms-linear-gradient(top, #ffab23 5%, #ffec64 100%); background:linear-gradient(to bottom, #ffab23 5%, #ffec64 100%); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffab23', endColorstr='#ffec64',GradientType=0); background-color:#ffab23; } .delete:active { position:relative; top:1px; } @media screen and (max-width: 750px){ footer{ position:absolute; top:1200px; } } </style> </head> <body> <table class="bordered striped highlight"> <p class="title">Caixa da Igreja</p> <p>Pesquise por Data : &nbsp&nbsp <input type="date" name="data0" required>&nbsp Até &nbsp&nbsp<input type="date" name="data1" required> <?php while($linha = mysqli_fetch_array($dados)) { ?> <tr> <td><?php echo $linha['metodo']?></td> <td><?php echo "R$ ". $linha['dinheiro']?></td> <td width="120"><?php echo date('d/m/Y', strtotime($linha['data']))?></td> </tr> <?php } ?> </br> </table></p> <div id="total"> <?php while($result = mysqli_fetch_array($resul)){ echo "Total R$: ".$result['sum(dinheiro)'].'<br/>'; }?> </div> </br> </body> </html>
×

Important Information

Ao usar o fórum, você concorda com nossos Terms of Use.