Yo utilizo este y genial:
https://www.elgrupoinformatico.com/elimina-carpetas-vacias-windows-t23795.html
Saludos
https://www.elgrupoinformatico.com/elimina-carpetas-vacias-windows-t23795.html
Saludos
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú
Dim palabras() As String = txtOracion.Text.Split(" ") 'txtOracion es un textbox
Dim contador = 0
For i = 0 To palabras.Count() - 1
For j = 0 To palabras(i).Length - 1
If palabras(i)(j) = "a" Or palabras(i)(j) = "A" _
Or palabras(i)(j) = "e" Or palabras(i)(j) = "E" _
Or palabras(i)(j) = "i" Or palabras(i)(j) = "I" _
Or palabras(i)(j) = "o" Or palabras(i)(j) = "O" _
Or palabras(i)(j) = "u" Or palabras(i)(j) = "U" Then
contador += 1
End If
Next
Next
lblVocales.Text = contador.ToString() 'lblVocales es un Label
Private Sub Form_Load()
Timer1.Interval = 1000
Timer1.Enabled = True
End Sub
Private Sub Timer1_Timer()
if mario1.visible = true
mario1.visible = false
luigi1.visible = true
else
mario1.visible = true
luigi1.visible = false
end if
End Sub
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Graphics;
import java.awt.Rectangle;
import java.awt.event.KeyEvent;
import java.awt.event.KeyListener;
import javax.swing.JPanel;
public class GamePanel extends JPanel implements Runnable, KeyListener {
public static final int GAME_WIDTH = 640;
public static final int GAME_HEIGHT = 480;
private int expectedFps = 60;
private Thread gameThread;
private final Rectangle rectangle = new Rectangle(0, 0, 32, 32);
private final Rectangle rectangle2 = new Rectangle(0, GAME_HEIGHT - 32, 32, 32);
private boolean existenCuadros = false;
public GamePanel() {
this.setPreferredSize(new Dimension(GAME_WIDTH, GAME_HEIGHT));
this.gameThread = new Thread(this);
}
@Override
public void run() {
long start;
long elapsed;
long wait;
while(true) {
start = System.nanoTime();
this.repaint();
elapsed = System.nanoTime();
wait = 1000/expectedFps - (elapsed-start)/1000000;
wait = (wait < 0) ? 0 : wait;
try {
Thread.sleep(wait);
} catch(InterruptedException ex) {
}
}
}
private void init() {
this.gameThread.start();
this.addKeyListener(this);
this.setFocusable(true);
this.requestFocus();
}
@Override
public void addNotify() {
super.addNotify();
init();
}
private void dibujaCuadros(Graphics g) {
}
@Override
public void paintComponent(Graphics g) {
g.setColor(Color.DARK_GRAY);
g.fillRect(0, 0, GAME_WIDTH, GAME_HEIGHT);
g.setColor(Color.WHITE);
g.fillRect(rectangle.x, rectangle.y, rectangle.width, rectangle.height);
g.setColor(Color.CYAN);
g.fillRect(rectangle2.x, rectangle2.y, rectangle2.width, rectangle2.height);
for(int i=1; i<=20; i++) {
if(existenCuadros)
g.setColor(Color.YELLOW);
else
g.setColor(Color.DARK_GRAY);
g.drawLine(0, i*rectangle.height, GAME_WIDTH, i*rectangle.height);
g.drawLine(i*rectangle.width, 0, i*rectangle.width, GAME_HEIGHT);
}
}
@Override
public void keyTyped(KeyEvent e) {
}
@Override
public void keyPressed(KeyEvent e) {
switch(e.getExtendedKeyCode()) {
case KeyEvent.VK_LEFT:
rectangle.x -= 32;
if(rectangle.x < 0) rectangle.x = 0;
break;
case KeyEvent.VK_RIGHT:
rectangle.x += 32;
if(rectangle.x >= GAME_WIDTH) rectangle.x = GAME_WIDTH - rectangle.width;
break;
case KeyEvent.VK_UP:
rectangle.y -= 32;
if(rectangle.y < 0) rectangle.y = 0;
break;
case KeyEvent.VK_DOWN:
rectangle.y += 32;
if(rectangle.y >= GAME_HEIGHT) rectangle.y = GAME_HEIGHT - rectangle.height;
break;
case KeyEvent.VK_A:
rectangle2.x -= 32;
if(rectangle2.x < 0) rectangle2.x = 0;
break;
case KeyEvent.VK_D:
rectangle2.x += 32;
if(rectangle2.x >= GAME_WIDTH) rectangle2.x = GAME_WIDTH - rectangle2.width;
break;
case KeyEvent.VK_W:
rectangle2.y -= 32;
if(rectangle2.y < 0) rectangle2.y = 0;
break;
case KeyEvent.VK_S:
rectangle2.y += 32;
if(rectangle2.y >= GAME_HEIGHT) rectangle2.y = GAME_HEIGHT - rectangle2.height;
break;
case KeyEvent.VK_C:
existenCuadros = !existenCuadros;
break;
}
}
@Override
public void keyReleased(KeyEvent e) {
}
}
Private Function esNumeroPerfecto(ByVal numero As Double) As Boolean
Dim aux(7) As Double
Dim i As Integer
aux(0) = 6
aux(1) = 28
aux(2) = 496
aux(3) = 8128
aux(4) = 33550336
aux(5) = 8589869056
aux(6) = 137438691328
aux(7) = 2305843008139952128
For i = 0 To 7
If numero = aux(i) Then
Return True
End If
Next
Return False
End Function
Este se tarda una eternidad en comprobar los ultimos 2 numeros de la lista
Private Function esNumeroPerfecto(ByVal numero As Double) As Boolean
Dim aux As Double = 1
Dim aux2 As Double = 0
Dim sum As Double = 0
While aux <= (numero / 2)
aux2 = numero Mod aux
If aux2 = 0 Then
sum += aux
End If
aux += 1
End While
Return (sum = numero)
End Function
#include <stdio.h>
int main()
{
printf(" /");
printf(" ()");
printf(" ||");
printf(" ||");
printf(" __ \\");
printf(" / > \\");
printf(" ||` .-"||".");
printf(" \\/ _//. `\");
printf(" ( (-' \ \");
printf(" \ ) | |");
printf(" `" / /");
printf(" / /");
printf(" | ( _");
printf(" \ `.-.-.'o`\");
printf(" '.( ( ( .--'");
printf(" `"`"'`");
return 0;
}