elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Introducción a la Factorización De Semiprimos (RSA)


  Mostrar Mensajes
Páginas: 1 [2]
11  Programación / Scripting / Buscar en archivo de excel un valor y darme detalles de la fila con python en: 16 Septiembre 2021, 11:22 am
Saludos soy nuevo en python, tengo que hacer un ejercicio el cual es buscar un valor en una tabla de excel, al encontrarlo deseo obtener los valores de esa fila donde esta alojado el valor que se busco, he tratado de ayudarme con algunos ejemplos pero no he llegado lejos, me sale error alguien me puede ayudar.

deseo buscar de la tabla con el dato idN


tabla orden de excel

producto                      precio               detalles                           idN
JUGUETE                      1,000.00          caja con juegos                3
CAJA  DE GALLETAS      50                    surtido                            2
papas                         12                     enchiladas                       1


Código
  1. import pandas as pd
  2.  
  3. df = pd.read_excel(
  4.    'productos.xls',
  5.    header=0,
  6.    sheet_name='Hoja1',
  7.    skiprows=2,
  8.    usecols="A:E"
  9.    )
  10.  
  11. while busqueda:= input('Buscar por numero de ingreso: '):
  12.    cont = df[df['idN'] == busqueda]
  13.    if not cont.empty:
  14.        print('¡El contenedor se ha encuentrado!')
  15.        print(precio)
  16.        print(detalle)
  17.  
  18.    else:
  19.        print('¡El contenedor no se ha encontrado!\n')





12  Programación / Scripting / Re: Python - abrir una lista cíclica en: 20 Septiembre 2020, 20:34 pm
Saludos si me sirve para la lectura , trato de enlazarlo, no lo logro mi txt tiene 6 líneas, las líneas van así:

1128
22123
31232
434546
557668
6456


el code reconoce las 6 líneas del archivo y hace una cuenta regresiva del 6 al 1



Si le agrego mas líneas reconoce las líneas y crea una cuenta regresiva, en la cuenta regresiva el numero de regresión debe abrir el numero, si toca el conteo en el 6 deseo leer la línea 6, después seguir la regresión, leer la línea 5 y así sucesivamente, ahí no consigo la lectura de la líneas, el poder adjuntar su ejemplo a el contador de líneas y regresión
13  Programación / Scripting / Re: Python - abrir una lista cíclica en: 20 Septiembre 2020, 03:34 am
Gracias por su tiempo, en la representación de navegación de la líneas que contiene el txt hago un conteo en representación con "n" por decir si cae el numero 10, deseo leer la linea 10, determinar
14  Programación / Scripting / Re: Python - abrir una lista cíclica en: 19 Septiembre 2020, 19:39 pm
Gracias voy aprendiendo hasta ahora he logrado saber cuantas líneas tiene un txt, sabiendo el numero total ahora abrir línea por línea que es en lo que estoy estancado.




Código:
import time

fichero = open('1.txt', 'r')
n = len(fichero.readlines())
print (n)
fichero.close()


with open('1.txt') as f:
data = f.readlines()[n]
print(data)



while n >  0:
    print(n)
    n = n - 1
    time.sleep(0.100)
print('FIN DE LISTA')
15  Programación / Scripting / Python - abrir una lista cíclica en: 16 Septiembre 2020, 03:00 am
Saludos estoy buscando como abrir una lista txt con python, que cada 5 segundos abrar una linea, después de los 5 segundo abra la siguiente linea, cuando llegue a la ultima linea vuelva a la linea 0 y haga la misma opción bucle

Lista
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
FIN
16  Programación / Scripting / Linea cmd para modificar tamaño de un programa en ejecución o algun script en: 28 Febrero 2019, 05:01 am
Saludos tengo una duda deseo modificar una ventana abierta de chrome abierta maximizada, deseo con una linea de comando en cmd o un sript pueda dimensionar la ventana de crhome que esta abierta, ponerla en tal coordenadas y darle tal tamaño

he tratado con una linea pero sin victoria

Código
  1. START http://m.youtube.com "size="398, 656" --window-position="12, 49""
17  Programación / .NET (C#, VB.NET, ASP) / Ayuda con reproductor VLC en: 12 Abril 2018, 04:43 am
Saludos como poder regresar a modo normal la pantalla de un video en reproducción con alguna tecla que uno dese


Código
  1. If e.KeyCode = Keys.A Then
  2. aqui regresar a pantalla normal
  3.        Else
  4.        End If

También busco cuando se ponga la pantalla fullscreen desaparecer la barra de desplazamiento, no aparezca cuando este fullscreen
18  Programación / .NET (C#, VB.NET, ASP) / Meter controles de teclado en este ejemplo de AxWindowsMediaPlayer en: 11 Abril 2018, 03:47 am
Alguien me puede ayudar a meter controles de tecla en este proyecto y responda con teclas ordenes



Deseo meter esta orden cuando este la pantalla completa obedezca la presion de la tecla A
 
Código
  1.  If e.KeyCode = Keys.A Then ''GENERO
  2.            ButtonNORMAL_Click(sender, e)
  3.        Else
  4.        End If



Código
  1. Public Class Form1
  2.    Dim POSICION As Point
  3.    Dim ANTERIOR As Point
  4.    Dim BANDERA As Boolean
  5.    Dim ALTURA As Integer
  6.  
  7.    Private Sub AxWindowsMediaPlayer1_MouseMoveEvent(sender As Object, e As AxWMPLib._WMPOCXEvents_MouseMoveEvent) Handles AxWindowsMediaPlayer1.MouseMoveEvent
  8.        POSICION = Windows.Forms.Cursor.Position
  9.    End Sub
  10.  
  11.    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
  12.        AxWindowsMediaPlayer1.uiMode = "NONE"
  13.        AxWindowsMediaPlayer1.Location = New Point(0, 0)
  14.        AxWindowsMediaPlayer1.Width = Me.Width
  15.        ALTURA = AxWindowsMediaPlayer1.Height
  16.        PanelCONTROLES.Location = New Point(0, PanelCONTROLES.Location.Y)
  17.        PanelCONTROLES.Width = Me.Width
  18.        ButtonNORMAL.Visible = False
  19.        ButtonNORMAL.Anchor = AnchorStyles.Right
  20.        ButtonCOMPLETA.Location = New Point(Me.Width - ButtonCOMPLETA.Width - 30, ButtonCOMPLETA.Location.Y)
  21.    End Sub
  22.  
  23.    Private Sub ButtonINICIAR_Click(sender As System.Object, e As System.EventArgs) Handles ButtonINICIAR.Click
  24.        If OpenFileDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
  25.            AxWindowsMediaPlayer1.URL = OpenFileDialog1.FileName
  26.            AxWindowsMediaPlayer1.stretchToFit = True
  27.        End If
  28.    End Sub
  29.  
  30.    Private Sub ButtonCOMPLETA_Click(sender As System.Object, e As System.EventArgs) Handles ButtonCOMPLETA.Click
  31.        Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
  32.        Me.WindowState = FormWindowState.Maximized
  33.        AxWindowsMediaPlayer1.Dock = DockStyle.Fill
  34.        PanelCONTROLES.Location = New Point(0, Me.Height - PanelCONTROLES.Height)
  35.        PanelCONTROLES.Width = Me.Width
  36.        ButtonNORMAL.Visible = True
  37.        ButtonCOMPLETA.Visible = False
  38.        BANDERA = True
  39.        Timer1.Interval = 1000
  40.        Timer1.Start()
  41.    End Sub
  42.  
  43.    Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick
  44.        If BANDERA = True Then
  45.            If ANTERIOR <> POSICION Then
  46.                If PanelCONTROLES.Visible = False Then
  47.                    PanelCONTROLES.Visible = True
  48.                ElseIf PanelCONTROLES.Visible = True Then
  49.                    PanelCONTROLES.Visible = False
  50.                End If
  51.                ANTERIOR = POSICION
  52.            End If
  53.        End If
  54.    End Sub
  55.  
  56.    Private Sub ButtonNORMAL_Click(sender As System.Object, e As System.EventArgs) Handles ButtonNORMAL.Click
  57.        Timer1.Stop()
  58.        BANDERA = False
  59.        Me.FormBorderStyle = Windows.Forms.FormBorderStyle.Sizable
  60.        Me.WindowState = FormWindowState.Normal
  61.        AxWindowsMediaPlayer1.Dock = DockStyle.None
  62.        AxWindowsMediaPlayer1.Height = ALTURA
  63.        PanelCONTROLES.Location = New Point(0, Me.Height - PanelCONTROLES.Height - 45)
  64.        PanelCONTROLES.Width = Me.Width
  65.        ButtonNORMAL.Visible = False
  66.        ButtonCOMPLETA.Visible = True
  67.    End Sub
  68. End Class
  69.  
19  Programación / .NET (C#, VB.NET, ASP) / Error en fullScreen AxWindowsMediaPlayer1 en: 10 Abril 2018, 01:51 am
Buen dia, una pregunta tengo un problema con la pantalla Me.AxWindowsMediaPlayer1.fullScreen = True

tengo un listado  AxWindowsMediaPlayer1.URL = LabelURLREPRODUCCIONAHORA.Text que se van cargando en el LabelURLREPRODUCCIONAHORA.Text


Tengo un boton para activar el Me.AxWindowsMediaPlayer1.fullScreen = True pero no funciona activar el fullScreen en algunos, alguien saber por que en algunos no se puede activar?
Páginas: 1 [2]
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines