|
61
|
Seguridad Informática / Seguridad / Identificar un servidor?
|
en: 27 Septiembre 2021, 00:06 am
|
Hola a todos. Tengo dos dudas de novato 1) Hay forma de identificar un servidor en una red usando nmap? 2) Vamos a suponer que tengo la ip 63.45.12.34 hay forma de saber que tipo de dispositivo es? -Gracias a todos!!!
|
|
|
62
|
Comunicaciones / Dispositivos Móviles (PDA's, Smartphones, Tablets) / Ayuda Xiaomi mi 8 lite
|
en: 25 Septiembre 2021, 04:30 am
|
Hola a todos, hace poco compré por internet unos auriculares gaming tipo c (los g20 de la marca plextone) pero mi xiaomi 8 lite no los reconoce... No tengo otro móvil como para poder probarlos, alguien sabe que puede ser?
[ACTUALIZACIÓN] Mi celular no reconoce, ningún tipo de auricular tipo c, será alguna falla de software?
|
|
|
68
|
Programación / Scripting / Re: Opiniones sobre un programa que hice
|
en: 5 Septiembre 2021, 14:44 pm
|
En la primera ejecución me dio un error. Traceback (most recent call last): File "/usr/lib/python3.9/tkinter/__init__.py", line 1892, in __call__ return self.func(*args) File "/home/nitropc/./png.py", line 26, in converter im = Image.open(image_path) File "/usr/local/lib/python3.9/dist-packages/PIL/Image.py", line 2974, in open fp = io.BytesIO(fp.read()) AttributeError: 'str' object has no attribute 'read' ^CTraceback (most recent call last): File "/home/nitropc/./png.py", line 155, in <module> root.mainloop() File "/usr/lib/python3.9/tkinter/__init__.py", line 1429, in mainloop self.tk.mainloop(n)
El error se debe a que en el metodo , el argumento sebe ser un string y la variable image_path parece no ser string, así que aconsejo que siempre se convierta en string, auque cuya variable sea string (por si acaso), hazlo con str(image_path), seria Image.open(str(image_path))
Y aconsejo también que muestra la ruta del archivo png convertido que no especifica en que ruta se almacena.
Hola cómo estás? Probando y probando el programa no me sale ese error, es raro. Lo probé desde Windows y si paso jajaja.
|
|
|
69
|
Programación / Scripting / Opiniones sobre un programa que hice
|
en: 5 Septiembre 2021, 05:43 am
|
Hola a todos como están? Hace poco hice un programa en Python usando Tkinter, este es un programa que sirve para hacer un png to jpg (Un convertidor de formatos). Es algo muy simple, y me gustaría que le den una critica al código. import tkinter from tkinter import Button, Canvas, Frame, Label, LabelFrame, PhotoImage, StringVar, Text, Tk from tkinter.constants import ACTIVE, CENTER, DISABLED, FLAT, NONE, NW, RADIOBUTTON import tkinter.font as font from tkinter import filedialog as fd from tkinter import messagebox
import shutil import os
from PIL import Image,ImageTk
def exit() -> None: global root root.destroy()
def converter() -> None: global image_path global image_name
try: try: im = Image.open(image_path)
except NameError: messagebox.showerror(title="Error!", message="You must select a file!")
#I convert the image to jpg im.save(f'output_file_jpg/{image_name}', quality=95) img_name_var.set(image_name)
except OSError: #If the image has transparency I remove it rgb_im = Image.open(image_path) rgb_im = im.convert('RGB') rgb_im.save(f'output_file_jpg/{image_name}') img_name_var.set(image_name) image_path = "" image_name = "" messagebox.showinfo(title="Success!",message="successfully converted!")
def get_image() -> None: global image_path global image_name
try: #I look for the route and the name of the image image_path = fd.askopenfilenames(filetypes=[("Image Files", ".png")]) image_path = image_path[0] image_name = image_path.split("/") image_name = image_name[-1] img_name_var.set(image_name) image_name = image_name.replace('.png',".jpg")
#Display Image img = Image.open(image_path) img = img.resize((180, 160), Image.ANTIALIAS) img = ImageTk.PhotoImage(img) panel = Label(master=root, image=img) panel.image = img panel.grid(row=1,column=0,pady=1,sticky="N") bttn_convert['state'] = ACTIVE
except IndexError: pass
def main_window() -> None: try: os.mkdir('output_file_jpg') except FileExistsError: pass global root global image_path global img_name_var global bttn_convert
#Main Window config root.config(background="white") root.resizable(False,False) root.title("V1.0")
screen_width = root.winfo_screenwidth() screen_height = root.winfo_screenheight() screen_width = screen_width / 5 root.geometry(f"600x450+{round(screen_width)}+90")
#Cool Colors navy_blue = "#2A73D9" emerald_green = "#33b864" soft_red = "#b83333"
#Cool Fonts bttn_font = font.Font(family="Helvetica,Arial,sans-serif", size=12) title_font = font.Font(family="Poppins",size=15) subtitle_font = font.Font(family="Poppins",size=12)
#Texts title = Label(master=root) title.config(text="CONVERTER",bg="white",font=subtitle_font) title.grid(row=0,column=0,pady=30)
subtitle = Label(master=root) subtitle.config(text="PNG TO JPG",bg="white",font=title_font) subtitle.grid(row=0,column=0,sticky="N")
softwere_version = Label(master=root) softwere_version.config(text="V1.0",background="white") softwere_version.grid(row=1,column=0,padx=20,pady=120,sticky="SW")
img_name_var = StringVar(master=root,value='')
img_name = Label(master=root) img_name.configure(textvariable=img_name_var,bg="white") img_name.grid(row=1,column=0,pady=180,sticky="N")
#Buttons frame_buttons = Frame(master=root) frame_buttons.config(bg="white") frame_buttons.grid(row=1,column=0,pady=220,padx=110)
bttn_upload = Button(master=frame_buttons) bttn_upload.configure(text="UPLOAD A IMAGE",font=bttn_font,activeforeground="white",fg="white",activebackground=navy_blue,bg=navy_blue,borderwidth=0,cursor="hand2",command=get_image) bttn_upload.grid(row=1,column=1,padx=20)
bttn_convert = Button(master=frame_buttons) bttn_convert['state'] = DISABLED bttn_convert.configure(text="CONVERT",font=bttn_font,activeforeground="white",fg="white",activebackground=emerald_green,bg=emerald_green,borderwidth=0,cursor="hand2",command=converter) bttn_convert.grid(row=1,column=2)
bttn_exit = Button(master=frame_buttons) bttn_exit.configure(text="EXIT",font=bttn_font,activeforeground="white",fg="white",activebackground=soft_red,bg=soft_red,borderwidth=0,cursor="hand2",command=exit) bttn_exit.grid(row=1,column=3,padx=15)
if __name__ == "__main__": root = Tk()
main_window() root.mainloop()
Gracias!!!! -Panic0
|
|
|
70
|
Informática / Hardware / Que le pasa a mi Xiaomi?
|
en: 3 Septiembre 2021, 00:23 am
|
Hola a todos como están? Tengo un Xiaomi mi 8 lite desde hace ya uno o dos años. Ya es la segunda vez que ésto me sucede, el problema consiste en que queda el LED de notificaciónes parpadeando y después aparece el logo de cargando pero no carga. Esto ya me había pasado antes y se había solucionado solo. Adjunto imágen (gif) https://ibb.co/bd2MmgPAlguna idea de lo que puede ser? Gracias!!
|
|
|
|
|
|
|