Tag:Text content

  • A batch that lists each line of text in reverse order

    Time:2021-1-25

    Copy codeThe code is as follows: @echo off : lists each line of text in reverse order:: cannot handle double quotes:: code by jm 2006-10-5 Modified on 2007-3-13 [email protected] for /f “delims=” %%i in (test.txt) do ( set “str=%%i” set var= call :intercept ) pause goto :eof :intercept if not “%str%”==”” ( set “var=%str:~0,1%%var%” set […]

  • Splicing adjacent odd and even lines of text content

    Time:2021-1-20

    Copy codeThe code is as follows: @echo off goto run The problem is that there is a text file, and the contents are as followsaccident n. Accident (factor)across Across across across across across across across across across across across across across across across across across across across across across across across across across across across […]

  • Code for batch processing to realize the center display of text content

    Time:2020-7-28

    a.txt   code: [Promise don’t come easy] I should have known all along. There was something wrong. I just never read between the lines. Then I woke up one day and found you on your way. Leaving nothing but my heart behind. What can I do to make it up to you. Promises don’t come […]

  • Code for batch processing to change horizontal column of text content into vertical column

    Time:2020-7-26

    Because the forum will swallow the first space in each line of text, the screenshot is shown. The number of characters per line is the same, but the number of characters is unknown.Notice that there is a space after the third line r of the text. The fourth line is followed by a space.The output […]

  • Example of PyQt4 real time display text content GUI

    Time:2020-2-13

    First, create a txt.py file to save the contents of the crawler #! /usr/bin/env python # -*- coding: utf-8 -*- Txt_name = [‘photographer Li Xiaolei’, ‘match Hanfeng’, ‘Shi Yong Gang’, ‘CCTV5 sports news’, ‘Yoga Lin’, ‘Hangzhou Weibo city event’, ‘May days’, ‘beauty’s new vision’, ‘talk about your feelings’, ‘people.com.cn, ‘CCTV news’, ‘Jia Ling’, ‘released in […]

  • Get the text content of div in Python and compare it with the scenario

    Time:2019-4-19

    The content of div is: <div style= “background-color: RGB (255, 238, 221);”>The username or password you entered is incorrect. </div> # coding:utf-8 from selenium import webdriver browser = webdriver.Firefox() url = ‘file:///C:/Users/li/Desktop/hello.html’ browser.get(url) Alert_inf= “The username or password you entered is incorrect. ” s = browser.find_element_by_xpath(“//div[@id=’status’]”) b = s.text print b if b.encode(‘utf-8’) == alert_inf: […]