Pesquisar neste blog

26/01/2019

Matriz com números aleatórios em Java


/*Faça um algoritmo de uma matriz 4x4 com valores aleatórios entre 0 e 100. Apos isso determine o maior número da matriz e a sua posição.*/

import java.util.Random;

public class Main{
public static void main(String[] args){
    int[][] numAleatorio = new int [4][4];
    Random numeroRandom = new Random();
 
    for (int i = 0; i < numAleatorio.length; i++){
        for (int j = 0; j < numAleatorio[i].length; j++){
            numAleatorio[i][j] = numeroRandom.nextInt(100);//gera numero aleatorio de 0 a 100
        }
    }
 
    //int maior = Integer.MIN_VALUE;
int maior = 0, linha = 0, col = 0;

for (int i = 0; i < numAleatorio.length; i++){
    for (int j = 0; j < numAleatorio[i].length; j++){
        if(numAleatorio[i][j] > maior){
            maior = numAleatorio[i][j];
            linha = i;
            col = j;
        }
    }
}

System.out.print("\t\tMatriz\n");
for (int i = 0; i < numAleatorio.length; i++){
    for (int j = 0; j < numAleatorio[i].length; j++){
        System.out.print("\t"+numAleatorio[i][j]+" ");
    }
    System.out.println();
}
System.out.println("\nMaior valor = "+maior);
System.out.println("Linha: "+linha);
System.out.println("Coluna:"+col);
}
}

20/01/2019

Desenhando um smille em java

Classe DesenhoComponente

import java.awt.Color;
import java.awt.Graphics;
import javax.swing.JPanel;

public class DesenhoComponente extends JPanel{
   public void paintComponent( Graphics g ){
   
      super.paintComponent(g);
   
      // desenhar o rosto
      g.setColor( Color.YELLOW );
      g.fillOval( 10, 10, 200, 200 );
   
      // desenhar os olhos
      g.setColor( Color.BLACK );
      g.fillOval( 55, 65, 30, 30 );
      g.fillOval( 135, 65, 30, 30 );
   
      // desenhar a boca
      g.fillOval( 50, 110, 120, 60 );
   
      // "retocar" a boca em um sorriso
      g.setColor( Color.YELLOW );
      g.fillRect( 50, 110, 120, 30 );
      g.fillOval( 50, 120, 120, 40 );
   }
}

__________ / / ________
Código fonte principal

import javax.swing.JFrame;

public class DrawSmiley
{
   public static void main( String[] args )
   {
      DesenhoComponente painel = new DesenhoComponente();   
      JFrame aplicacao = new JFrame();
      aplicacao.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
   
      aplicacao.add( painel );
      aplicacao.setSize( 230, 250 );   
      aplicacao.setVisible( true );
   }
}

Impressão do smille



















Palavras chave:

Drawing a smille in java
Dibujo de un smille en java
Teken 'n glimlag in java
رسم smille في جافا
জাভা একটি স্মাইল অঙ্কন
Pagguhit ng isang smille sa java
Teikna broskalla í Java
Smink rajzolása a java-ban
Ngirim smile ing jawa
Parando Smille in Java
Parando Smille in Java

13/01/2019

Sequencial de 10 LEDs

Sequência de 10 LEDs com ci 555 + 7490 + 7442, ideal para luminárias de natal
Componentes utilizados:

1 ci 555
1 ci 7490
1 ci 74HC42
1 Potenciômetro 150KΩ
11 Resistores 150Ω a 390Ω
11 Leds
1 Capacitor 10uF
1 Resistor 10KΩ
1 Resistor de 1KΩ
Sequênciador de leds com ci 555, 7490 e 74HC42





















Clique aqui para fazer o download do arquivo feito no Proteus 8

Créditos para: http://www.ezuim.com/pdf/seq_10leds.pdf

Palavras chave:

Последовательность из 10 светодиодов ci 555 + 7490 + 7442
Seicheamh 10 stiúir le 555 + 7490 + 7442
Sequence 10 LED með ci 555 + 7490 + 7442
Volgorde van 10 LED's met ci 555 + 7490 + 7442
Пасля 10 святлодыёдаў з Х 555 + 7490 + 7442
ci 555 + 7490 + 7442の10個のLEDのシーケンス
ci 555 + 7490 + 7442가있는 10 개의 LED 시퀀스
Secuencia de 10 LEDs con ci 555 + 7490 + 7442
Ci 555 + 7490 + 7442 ile 10 LED dizisi
Sekwencja 10 diod LED z ci 555 + 7490 + 7442

12/01/2019

Semáforo com CI 4017 + 555

Componentes utilizados:
1 ci 555
1 ci 4017
2 leds vermelhos
2 leds amarelos
2 leds verdes
1 led qualquer
15 diodos 1N4148
1 capacitor 10 uF
1 resistor de 47KΩ
1 resistor de 1KΩ
1 resistor de 220Ω
Semáforo com ci 4017 e 555





















Clique aqui para fazer o download do arquivo feito no Proteus 8

Créditos para: http://circuitdesolator.blogspot.com/2011/01/traffic-light-circuit-based-on-4017.html

Palavras chave:

Semaphore with CI 4017 + 555
Semaphore oo leh CI 4017 + 555
Semaphore met CI 4017 +555
Semaphor mit CI 4017 + 555
Semaphore հետ CI 4017 + 555
Святло з CI 4017 + 555
Semaphore ndi CI 4017 + 555
CI 4017 + 555 සමඟ Semaphore සමඟ
Semaphore ak CI 4017 + 555
Semaphore s CI 4017 + 555
Semafor CI 4017 + 555-ga
Sémaphore avec CI 4017 + 555
סעמאַפאָרע מיט סי 4017 +555
Seapaphar le CI 4017 + 555
Семафор с CI 4017 + 555

11/01/2019

CI 74LS95

Registrador de deslocamento com CI 74LS95
Simulador Proteus 8.6














Clique aqui para fazer o download do arquivo feito no Proteus 8.6

Palavras chave:

Ofsetový registr s CI 74LS95
CI 74LS95 ഉപയോഗിച്ച് ഓഫർ രജിസ്റ്റർ ചെയ്യുക
使用CI 74LS95進行偏移寄存器
تسجيل الأوفست مع CI 74LS95
Offsetregister mit CI 74LS95
Yambani kulembetsa ndi CI 74LS95
Offset register med CI 74LS95
Offset register CI 74LS95-ga
Afrekeningsregister met CI 74LS95
Registrasi offset dengan CI 74LS95
CI 74LS95 бүхий офсет бүртгэл
Diiwaangelinta furfurista ee CI 74LS95

09/01/2019

Contador de 0 a 59

Contador com CI 74LS90 , 555 e 74LS47
Simulador Proteus 8.6


















Clique aqui para fazer o download do arquivo feito no Proteus 8.6

Palavras chave:

Räknare från 0 till 59
Ka soo horjeedka 0 ilaa 59
0에서 59 사이의 카운터
Лічыльнік ад 0 да 59
計數器從0到59
Μετρητής από 0 έως 59
Penghitung dari 0 hingga 59
Contatore da 0 a 59
0 മുതൽ 59 വരെ
0 ile 59 arasındaki sayaç
Počítadlo od 0 do 59

04/01/2019

Contador crescente / decrescente

Contador crescente e decrescente mestre escravo no Logisim usando túnel

Simulador Logisim


















Clique aqui para fazer o download do arquivo feito no Logsisim

Palavras chave:
Count increasing and decreasing master slave in Logisim using tunnel
Contador creciente y decreciente maestro esclavo en el Logisim usando túnel
Tel die toenemende en afnemende meesterslaaf in Logisim deur tonnel te gebruik
ዋሻ (ዋሻ) በመጠቀም ሎይስስሚን ሎይስምን በመጨመር እና በመቀነስ ላይ
العد زيادة وانخفاض الرقيق الرئيسي في Logisim باستخدام النفق
да лічыльніка і памяншэння гаспадара рабоў пры выкарыстанні Logisim тунэля
Избройте увеличаването и намаляването на главния slave в Logisim, използвайки тунел
Pagdugang sa pagdugang ug pagkunhod sa master slave sa Logisim gamit ang tunnel
使用隧道計算Logisim中增加和減少主從屬的數量
터널을 사용하여 Logisim에서 마스터 슬레이브 수를 늘리고 줄입니다.
Konte ogmante ak diminye mèt esklav nan Logisim lè l sèvi avèk tinèl
Tæl stigende og faldende master slave i Logisim ved hjælp af tunnel
Compter les esclaves maîtres croissants et décroissants dans Logisim à l'aide d'un tunnel
Steigerje en ferheegjen master slave yn Logisim mei tunnel
Hitung peningkatan dan penurunan master slave di Logisim menggunakan terowongan
Conta aumentando e diminuendo lo slave master in Logisim usando tunnel
Telling økende og avtagende mester slave i Logisim ved hjelp av tunnel
Tirada addoonta oo kordhaya oo yareynaya Logisim iyadoo la adeegsanayo tunnel
Räkna ökande och minskar mästarslav i Logisim med tunnel