This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # coding utf-8 | |
| print 'hello Medium' | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | this.addEventListener('fetch', function (event) { | |
| console.log('fetch'); | |
| }); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | if ('serviceWorker' in navigator) { | |
| navigator.serviceWorker.register('sw-builder.js') | |
| .then(function (reg) { | |
| console.log('serviceWorker registrado.'); | |
| }).catch(function (error) { | |
| console.warn('serviceWorker falhou.'); | |
| }); | |
| } else { | |
| console.log('serviceWorker não é suportado.'); | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # coding: utf-8 | |
| def row(k,w0,l,mu): | |
| reason = l/ mu | |
| w = w0 | |
| weights = [] | |
| for i in range(0, k+ 1): | |
| weights.append(w) | |
| w *= reason | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | Set<Saudacao> saudacoes = new HashSet<>(); | |
| String query = "SELECT ASSUNTO, TIPO FROM SAUDACAO"; | |
| try { | |
| Statement st = conn.createStatement(); | |
| ResultSet rs = st.executeQuery(query); | |
| while (rs.next()) { | |
| Saudacao saudacao = new Saudacao(); | |
| saudacao.setAssunto(rs.getString("ASSUNTO")); | |
| saudacao.setTipo(rs.getInt("TIPO")); | |
| saudacoes.add(saudacao); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | package br.edu.ufcg.embedded.util; | |
| public class AuthException extends RuntimeException { | |
| public AuthException(String message) { | |
| super(message); | |
| } | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | package br.edu.ufcg.embedded.component; | |
| import br.edu.ufcg.embedded.model.Coach; | |
| import br.edu.ufcg.embedded.model.Student; | |
| import br.edu.ufcg.embedded.model.User; | |
| import br.edu.ufcg.embedded.service.CoachService; | |
| import br.edu.ufcg.embedded.service.StudentService; | |
| import br.edu.ufcg.embedded.util.AuthException; | |
| import org.apache.tomcat.util.codec.binary.Base64; | |
| import org.json.JSONObject; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | package br.edu.ufcg.embedded.util; | |
| import java.util.List; | |
| public interface Crud<T> { | |
| T create(T t); | |
| List<T> getAll(); | |
| T getById(Long id); | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # coding: utf-8 | |
| ''' | |
| @author: wendley | |
| ''' | |
| def gerador_codigo_de_hamming(byte): | |
| byte_hamming = range(12) | |
| byte_hamming[2] = int(byte[0]) | |
| byte_hamming[4] = int(byte[1]) | |
| byte_hamming[5] = int(byte[2]) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #coding: utf-8 | |
| ''' | |
| @author: wendley | |
| ''' | |
| def verificador_de_paridade(input_value): | |
| numero_de_uns = 0 | |
| for bit in input_value: | |
| if bin(int(bit)) == bin(1): | |
| numero_de_uns += 1 | 
NewerOlder