Menú

Mostrar Mensajes

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ú

Mensajes - 43H4FH44H45H4CH49H56H45H

#281
En winXP que tengo con actualizaciones instaladas me sale:

Error al crear una instancia del componente COM con CLSID {B69003B3-C55E-4B48-836C-BC5946FC3B28} desde IClassFactory debido al siguiente error: 8007000e

Y en otros Win7,XP,Vista y demas sin actualizaciones instaladas funciona normalmente.
Por ese mismo problema deje de usar esa API y trabaje directamente con el protocolo del messenger, es mas seguro y hay mucho mas control de la aplicación.
#282
El code funciona, prueba con otra cuenta de gmail o como piensas es problema de tu ordenador, el mensaje de error deberia ubicarte para solucionar el problema, si no hay dicho mensaje puede ser problema en tu cuenta gmail o tu IP.
#283
Este ejemplo lo vi hace tiempo:

Código (python) [Seleccionar]
from Tkinter import *
import os
import urllib
import threading
import time

def logs(b):
    f = open('./downloads/log.txt','aw')
    f.write ("Archivo %s" % b + "descargado %s \n" % time.strftime("a Horas: %H:%M:%S en Fecha: %D"))
    f.close()


def reporthook(blocks_read, block_size, total_size):
    if not blocks_read:
        myapp.lab1["text"] = "conexión Establecida"
        return
    if total_size < 0:
        myapp.lab1["text"] = "Bloques Leidos " % blocks_read
    else:
        amount_read = blocks_read * block_size
        myapp.lab1["text"] = "Faltan: %d Kb para terminar la Descarga" %((total_size/1024) -  (amount_read/1024))
        return
   
class Hilo(threading.Thread ):
    def run ( self ):
        try:
            i = 0
            while i==0:
                c = myapp.text3.get(1.0, 2.0)
                b = c[c.rfind('/',0,len(c))+1:len(c)]
                urllib.urlretrieve("%s" % myapp.text3.get(1.0, 2.0), 'downloads/%s' % b, reporthook=reporthook)
                myapp.lab1["text"] = "ARCHIVO %s DESCARGADO" % b
                logs(b)

                myapp.text3.delete(1.0, 2.0)

                if myapp.text3.search("http://", 1.0, 1.7):
                    myapp.lab1["text"] = "CONTINUANDO DESCARGA"
                    continue;
                else:
                    myapp.lab1["text"] = "NO HAY URLS PARA DESCARGAR"
                    break;
                                     
        except:
           myapp.lab1["text"] = "ERROR VERIFIQUE conexión Y DIRECCION URL"

class Application(Frame):

   
    def limpiar(self):
        myapp.text3.delete(1.0, END)

     
    def download(self):
        if os.path.exists("downloads")==0:
            os.makedirs("downloads")

        Hilo().start()
       
    def salir(self):

        myapp.master.destroy()
        exit()


    def agregar(self):

        myapp.text3.insert(END, myapp.text3.clipboard_get()+"\n")
                     
    def createWidgets(self):

        self.lab0 = Label(self)
        self.lab0["text"] = "INTRODUCE DIRECCION A DESCARGAR"
        self.lab0["fg"]   = "white"
        self.lab0["bg"]   = "black"
        self.lab0["width"]   = 50
        self.lab0["height"]   = 3
        self.lab0.pack({"side": "top"})


        self.lab1 = Label(self)
        self.lab1["text"] = "CONTADOR DESCARGA PREPARADO"
        self.lab1["fg"]   = "white"
        self.lab1["bg"]   = "black"
        self.lab1["width"]   = 80
        self.lab1["height"]   = 3
        self.lab1.pack({"side": "top"})


        self.but1 = Button(self)
        self.but1["text"] = "AGREGAR URL DEL PORTAPAPELES"
        self.but1["fg"]   = "white"
        self.but1["bg"]   = "blue"
        self.but1["width"]   = 30
        self.but1["height"]   = 2
        self.but1["border"]   = 4
        self.but1.grid(row = 10, sticky = E, column = 2, pady = 3)
        self.but1["command"] = self.agregar
        self.but1.pack({"side": "top"})       



        self.text3 = Text(self)
        self.text3["fg"]   = "white"
        self.text3["bg"]   = "black"
        self.text3["width"]   = 80
        self.text3.pack({"side": "top"})


        self.but2 = Button(self)
        self.but2["text"] = "SALIR"
        self.but2["fg"]   = "white"
        self.but2["bg"]   = "blue"
        self.but2["width"]   = 10
        self.but2["height"]   = 3
        self.but2["border"]   = 4
        self.but2.grid(row = 10, sticky = E, column = 2, pady = 3)
        self.but2["command"] = self.salir
        self.but2.pack({"side": "left"})

        self.but3 = Button(self)
        self.but3["text"] = "LIMPIAR LISTA URL'S"
        self.but3["fg"]   = "white"
        self.but3["bg"]   = "blue"
        self.but3["width"]   = 30
        self.but3["height"]   = 3
        self.but3["border"]   = 4
        self.but3.grid(row = 10, sticky = E, column = 2, pady = 3)
        self.but3["command"] = self.limpiar
        self.but3.pack({"side": "left"})

     
        self.but4 = Button(self)
        self.but4["text"] = "INICIAR LAS DESCARGAS"
        self.but4["fg"]   = "white"
        self.but4["bg"]   = "blue"
        self.but4["width"]   = 30
        self.but4["height"]   = 3
        self.but4["border"]   = 4
        self.but4.grid(row = 10, sticky = E, column = 2, pady = 3)
        self.but4["command"] =  self.download
        self.but4.pack({"side": "right"})


    def __init__(self, master=None):
        Frame.__init__(self, master)
        self.pack()
        self.createWidgets()
       

myapp = Application()
myapp.master.title("DOWNLOADER EN LINUX - GET LINUX")
myapp.master.geometry("+600+600")
myapp.master.tk_setPalette("black")
myapp.master.resizable(0,0)

myapp.mainloop()


Espero te sirva, necesitas trabajar con hilos...
#284
Para hacerlo sencillo puedes declarar 2 variables globales
Código (vbnet) [Seleccionar]

LINK ="URL"
CODIGO = "CODE"


las cuales actualizas antes antes de

Código (vbnet) [Seleccionar]

dim p as new thread(address of Descarga)
p.start()

y las utilizas dentro de
Código (vbnet) [Seleccionar]
sub Descarga()
LINK
CODIGO
end sub

#285
Se puede hacer de este modo, actualizando la posición del pictureBox con una variable que sume o reste 1 a su valor, esta en C# solo para ubicarse.

Código (csharp) [Seleccionar]
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        int i = 10;
        int x = 0;
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            i = int.Parse(textBox1.Text);
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            if (pictureBox1.Location.X < i)
            {
                x++;
                Point nPos = new Point(x, 158);
                pictureBox1.Location = nPos;
                this.Text = pictureBox1.Location.X.ToString();
         
            }
            else if (pictureBox1.Location.X > i)
            {
                x--;
                Point nPos = new Point(x, 158);
                pictureBox1.Location = nPos;
                this.Text = pictureBox1.Location.X.ToString();
            }

        }

    }
}
#286
Java / Re: try catch, bucle
13 Febrero 2010, 06:45 AM
Algo asi podria ser:

Código (java) [Seleccionar]
import java.io.*;
public class Main {

    public static void main(String[] args) {
         //System.out.println(Integer.MAX_VALUE);
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);
        try
                {
                    String linea = "";
                    int n_elementos;
                    do
                    {
                        linea = br.readLine();
                        n_elementos = Integer.parseInt(linea);
                         System.out.println("Numero: " + n_elementos + "\n");
                    }while(IsNum(linea));
               
                }
                catch(Exception e)
                {
                    System.out.println("error: " + e.getMessage());
                    System.out.println("No es numero o esta fuera del limite");
                }
    }
    private static boolean IsNum(String cadena)
    {
        for(int i=0;i<cadena.length();i++)
            {
               int ascii =(int)cadena.charAt(i);
               if(ascii <48 ||ascii > 57 ) return false;
            }
        return true;
    }
}
#287
Este ejemplo de python 2.6 podria servirte "Demo/tkinter/matt/canvas-with-scrollbars.py"

Código (python) [Seleccionar]
from Tkinter import *
class Test(Frame):
   def printit(self):
       print "hi button"
   def createWidgets(self):
       self.question = Label(self, text="Can Find The BLUE Square??????")
       self.question.pack()
       self.QUIT = Button(self, text='Press', background='red',
                          height=3, command=self.printit)
       self.QUIT.pack(side=BOTTOM, fill=BOTH)
       spacer = Frame(self, height="0.25i")
       spacer.pack(side=BOTTOM)
       # notice that the scroll region (20" x 20") is larger than
       # displayed size of the widget (5" x 5")
       self.draw = Canvas(0, width="5i", height="5i",
                          background="white",
                          scrollregion=(0, 0, "20i", "20i"))
       self.draw.scrollX = Scrollbar(0, orient=HORIZONTAL)
       self.draw.scrollY = Scrollbar(0, orient=VERTICAL)
       # now tie the three together. This is standard boilerplate text
       self.draw['xscrollcommand'] = self.draw.scrollX.set
       self.draw['yscrollcommand'] = self.draw.scrollY.set
       self.draw.scrollX['command'] = self.draw.xview
       self.draw.scrollY['command'] = self.draw.yview
       # draw something. Note that the first square
       # is visible, but you need to scroll to see the second one.
       self.draw.create_rectangle(0, 0, "3.5i", "3.5i", fill="black")
       self.draw.create_rectangle("10i", "10i", "13.5i", "13.5i", fill="blue")
       # pack 'em up
       self.draw.scrollX.pack(side=BOTTOM, fill=X)
       self.draw.scrollY.pack(side=RIGHT, fill=Y)
       self.draw.pack(side=LEFT)
   def scrollCanvasX(self, *args):
           print "scrolling", args
           print self.draw.scrollX.get()
   def __init__(self, master=None):
           Frame.__init__(self, master)
           Pack.config(self)
           self.createWidgets()
test = Test()
test.mainloop()
#288
Hacking / Re: Ocultar virus sin cambiar tamano
28 Noviembre 2009, 04:19 AM
Cita de: Littlehorse en 27 Noviembre 2009, 21:08 PM
la esteganografia (que por cierto de hacking barato no tiene nada ;D) es un mundo inmenso.

Muy cierto, utilizando la misma el archivo contenedor no tendra variaciones en absoluto respecto a su tamaño o caracteristicas, sea visual o auditiva y obviamente existen limitaciones en cuanto al tipo de archivo apropiado para el objetivo.

En otras palabras el archivo que contiene a otro no aumenta de tamaño ni muestra un cambio perceptible... a simple vista.

Cita de: ^TiFa^ en 27 Noviembre 2009, 21:19 PM
Se que no es nada util, de hecho no lo veo nada util. Pero era una peticion, por eso le dije hacking barato porque es algo tonto  :D

Osea que es inútil saber y aplicar el Sistema Binario, Sistema Decimal, tabla ASCII, Algebra Booleana, etc????

Y muchas Universidades tienen un curso de Algebra Universal para perder el tiempo con:

Cita de: ^TiFa^ en 27 Noviembre 2009, 21:19 PM
nada util.
hacking barato porque es algo tonto  :D

:rolleyes:    :rolleyes:    :rolleyes:

Gracias por el comentario, mañana nos reunimos como cada fin de semana con los amigos y me diste buen material para reirnos bastante tiempo  :laugh:
#289
Deberias mostrar el código que hiciste para ubicar el error...
#290
.NET (C#, VB.NET, ASP) / Re: Ayuda en VB.net..
28 Noviembre 2009, 03:54 AM
Viendo el code de pasada, los datos solo se guardan en un arraylist?
Si es asi, en la clase deportista podrias agregar el almacenado fisico, ya sea en un archivo o una base de datos.