windows – The Explorer preview window can not select and copy text with the mouse

I can not select text in Windows 10 from the File Explorer preview window with a text file (it works on Windows 7).

Clicking and dragging with the left mouse button to select does not work, but I can left-click to place the insertion point, and then use Shift + Arrow keys and Ctrl + C to copy the text. Also a double click on a word marks the text. It just seems to be clicking + dragging and right-clicking on the shortcut menu that does not work.

I took a quick look around and could not find a similar question. Maybe it's just me? Just one of those little things, but it annoys me!

Batch search and replace text in PDF

I'm trying to find a stack in PDF files and replace them. The aim is to search for catalog numbers in a supplier's catalog and replace them with our sales price. The result does not have to look good as long as it works 95% of the time.

For example, search for "PRODUCT9522" and replace with "PRODUCT9522 – 95.20E"

I've tried several options, such as decompressing the PDF file with pdftk and then searching and replacing with sed, but that did not work. Some Windows tools have worked to some extent, but not exactly as I wanted.

I would be very happy about your expertise in this matter.

Gray on black for text | Forum Promotion

I do that in my forums because it's easier to read. I also make the size 17px. Anyway, that seems too much, but only my style! Anyway, white on a black background seems to be smeared – I'm not sure of the word here. Has anyone seen the same?

However, at least one free XenForo design style does not accept 17px (standard dark for the standard XF 2.1 design), so be careful.

javascript – Jquery text () does not want to work with append ();

for (if i = 0; i <json.length; i ++) {
let color = $ ("td # color" + i) .text ();
let img = & # 39; img / & # 39 ;;
$ ("td # color" + i) .text (& # 39; & # 39;). append (`');
}; 

The code should iterate tds of the table and convert the text of "black", "white", etc., into images by retrieving the text data with text () and appending it to td with a unique ID. In fact, it only shows the last color (with a picture), but all previous ones are deleted.

$ .getJSON ("https://rawgit.com/Varinetz/e6cbadec972e76a340c41a65fcc2a6b3/raw/90191826a3bac2ff0761040ed1d95c59f14eaf26/frontend_test_table.json", function (json) {

$ (# Table-cars & # 39;). append ("");
for (let counter = 0; counter <json.length; counter ++) {
$ (# Table-cars & # 39;). append (""+ json[counter].title + "
"+""+ json[counter].description + ""+"" + ""+ json[counter].year + "" + ""+ json[counter].color + "" + ""+ json[counter].status + "" + ""+ json[counter].price + "руб." + "" + ""+""+""); // REPLACE COLOR TEXT // valid code, but does not work. I do not know why. // If you can - give me a hint. // The culprit is the variable "color". // Only the green color works. If you change it - EVERYTHING WORKS AS IS. for (if i = 0; i <json.length; i ++) { let color = $ ("td # color" + i) .text (); let img = & # 39; img / & # 39 ;; $ ("td # color" + i) .text (& # 39; & # 39;). append (`'); }; // Ugly code that works immediately // const img = & # 39; img / & # 39 ;; // $ ("td # color0"). html (`'); // $ ("td # color1"). html (`'); // $ ("td # color2"). html (`'); // $ ("td # color3"). html (`'); // $ ("td # color4"). html (`'); // REPLACE STATUS TEXT

Название Год Цвет Статус Цена

motorola moto g – Can I install GNU / Linux in text mode on Android?

I want to use my old smartphone (Moto 3G) like Rassbery Pi to do some low-level stuff with just one terminal. I want to install GNU / Linux in text mode, access it with SSH, connect to the Internet, and have the option of entering the installed system with an on-screen keyboard, such as in Android.

Importantly, I want to completely remove android and install GNU / Linux at this point. I do not care about SMS, phone calls, etc. (But things like camera handling and the ability to see battery status, play / record sounds, or change screen brightness are nice).

Is there a distribution that can satisfy me? And how can I install the chosen system instead of Android?

python – TypeError: normalize () is missing 1 required positional argument: & # 39; text & # 39;

I'm working on a project that takes a file, goes through a particular directory, and returns their similarities in%. I was successful, but the problem is converting it to a GUI. The raw code works, but when it is implemented in the GUI (PyQt5) it throws in TypeError: normalize () is missing 1 required positional argument: & # 39; text & # 39; Error …

Here's the raw code

import docx
Import nltk, string
From sklearn.feature_extraction.text import TfidfVectorizer
import os
from pathlib import path
from TV1 import app


def getText (filename):
doc = docx.Document (filename)
fullText = []
    for paragraph in doc. paragraphs:
fullText.append (para.text)
print (& # 39; join (fullText))
return & # 39; join (fullText)


# nltk.download (& # 39; dot & # 39;) # if necessary ...

stemmer = nltk.stem.porter.PorterStemmer ()
remove_punctuation_map = dict ((ord (char), None) for char in string.punctuation)


def stem_tokens (tokens):
return [stemmer.stem(item) for item in tokens]


& # 39; & # 39; & # 39; remove punctuation, lower case, root & # 39; & # 39; & # 39;


normalize def (text):
return stem_tokens (nltk.word_tokenize (text.lower (). translate (remove_punctuation_map))


vectorizer = TfidfVectorizer (tokenizer = normalize, stop_words = & # 39; english & # 39;)


def cosine_sim (text1, text2):
text11 = text1
text22 = open (text2, # 39, encoding = # utf-8 #, errors = # ignore #). read ()
tfidf = vectorizer.fit_transform ([text11, text22])

n = (((tfidf * tfidf.T) * 100) .A)[0, 1]
    Return & # 39;% .3f %% similarity & # 39;% n

file = & # 39; BB.docx & # 39;
spath = r # C:  Users  Black Laptop  Desktop  Work & # 39;

print (# 39; --------------------------------- & # 39)

text = getText (file)
If os.path.exists (spath):
for path to path (spath) .iterdir ():
print (path)
print (os.path.basename (path))
print (cosine_sim (text, path))
print (# 39; # 39 &)

GUI …

Import sys

from PyQt5.QtCore import (QDate, QDateTime, QRegExp, QSortFilterProxyModel, Qt,
QTime)
from PyQt5.QtGui import QStandardItemModel
from PyQt5.QtWidgets import (QApplication, QCheckBox, QComboBox, QGridLayout,
QGroupBox, QHBoxLayout, QLabel, QLineEdit, QTreeView, QVBoxLayout,
QWidget, QTableView, QTableWidget)

import docx
Import nltk, string
From sklearn.feature_extraction.text import TfidfVectorizer
import os
from pathlib import path


Class App (QWidget):
FILES, SIMILAR = range (2)

def __init __ (self):
super () .__ init __ ()
self.title = & # 39; Plagiarism Checker & # 39;
Even. Left = 50
self.top = 50
self.width = 640
self.height = 240
# self.initUI ()
self.one ()

def initUI (self):[...]

    def getText (self, filename):
doc = docx.Document (filename)
fullText = []
        for paragraph in doc. paragraphs:
fullText.append (para.text)
print (& # 39; join (fullText))
return & # 39; join (fullText)

# nltk.download (& # 39; dot & # 39;) # if necessary ...

stemmer = nltk.stem.porter.PorterStemmer ()
remove_punctuation_map = dict ((ord (char), None) for char in string.punctuation)

def stem_tokens (self, token):
return [self.stemmer.stem(item) for item in tokens]

    & # 39; & # 39; & # 39; remove punctuation, lower case, root & # 39; & # 39; & # 39;

def normalize (self, text):
return self.stem_tokens (nltk.word_tokenize (text.lower (). translate (self.remove_punctuation_map))

vectorizer = TfidfVectorizer (tokenizer = normalize, stop_words = & # 39; english & # 39;)

def cosine_sim (self, text1, text2):
text11 = text1
text22 = open (text2, # 39, encoding = # utf-8 #, errors = # ignore #). read ()
tfidf = self.vectorizer.fit_transform ([text11, text22])

n = (((tfidf * tfidf.T) * 100) .A)[0, 1]
        Return & # 39;% .3f %% similarity & # 39;% n

def one (self):
file = & # 39; BB.docx & # 39;
spath = r # C:  Users  Black Laptop  Desktop  Work & # 39;

print (# 39; --------------------------------- & # 39)

text = self.getText (file)
If os.path.exists (spath):
for path to path (spath) .iterdir ():
print (path)
print (os.path.basename (path))
print (self.cosine_sim (text, path))
print (# 39; # 39 &)


if __name__ == & # 39; __ main __ & # 39 ;:
app = QApplication (sys.argv)
ex = app ()
sys.exit (app.exec_ ())

ERROR ..

Tracing (last call last):
File "C: / Users / Black Laptop / PycharmProjects / StringPatternMatcher / CT.py", line 117, in 
    ex = app ()
File "C: / Users / Black Laptop / PycharmProjects / StringPatternMatcher / CT.py", line 29, in __init__
self.one ()
File "C: / Users / Black Laptop / PycharmProjects / StringPatternMatcher / CT.py", line 111, in one
print (self.cosine_sim (text, path))
File "C: / Users / Black Laptop / PycharmProjects / StringPatternMatcher / CT.py", line 93, in cosine_sim
tfidf = self.vectorizer.fit_transform ([text11, text22])
File "C:  Program Files (x86)  Python36-32  lib  site-packages  sklearn  feature_extraction  text.py", line 1652, in fit_transform
X = super (). Fit_transform (raw_documents)
File "C:  Program Files (x86)  Python36-32  lib  site-packages  sklearn  feature_extraction  text.py", line 1058, in fit_transform
self.fixed_vocabulary_)
File "C:  Program Files (x86)  Python36-32  lib  site-packages  sklearn  feature_extraction  text.py", line 970, in _count_vocab
For feature in analysis (doc):
File "C:  Program Files (x86)  Python36-32  lib  site-packages  sklearn  feature_extraction  text.py", line 352, in 
    tokenize (preprocessing (self.decode (doc))), stop_words)
TypeError: normalize () is missing 1 required positional argument: & # 39; text & # 39;

Operation terminated with exit code 1

Any help would be appreciated … thank you