# Questions tagged [text]

22363 questions

2

2.1k

Views

### align-content: center not working in Chrome

I am trying to vertically align divs with flexbox, by using the align-content: center. It works fine in Firefox and IE, but it does not vertically align in Chrome. In Chrome the divs stays on top. Title Text. Title Text. Title Text. And CSS: .products-wrapper { width: 100%; min-height: 100vh; /* FLE...
Nifel

1

24

Views

### Read text files with special format in python

I want to transform a folder of text documents in the following format: texts = ['text of document 1', 'text of document 2', 'text of document 3',...] in order to apply text mining methods. So far my code is the following: import os file= '*.txt' path = 'C:\\' texts=[] for files in os.listdir(path)...
Nils_Denter

1

51

Views

### How to scan text file for string, and run code if string isn't there?

I have tried: elsif file.grep(/Mode: 1/) puts 'test' else puts 'test but else' Codacy is saying this is wrong. Is there a way to improve this? According to Codacy: unexpected token kELSIF (Using Ruby 2.2 parser; configure using TargetRubyVersion parameter, under AllCops) unexpected token kELSE...

1

21

Views

### How to change text size from OnCreate using code in Kotlin

I have an activity which have Spinner and TextView. I want to use the Spinner to change the text size in TextView. there is three size in spinner(small, mediam and large) I put these size in dimen.xml .. how can I use Spinner to Change size? I tried this code but it didn't work val fontSize = arrayO...
Mohamed Wessam

2

90

Views

### how to override svg elements like <text> in my external CSS

my problem is to override svg elements like < text > in my external CSS. for example, if I have transform: rotate in my < text > and I want to override this on a media querie @media screen and (max-width: 28.125em) in my CSS. my html : My heading so now i have the media querie @media screen and (ma...
einsiedler

3

47

Views

### How to separate words from single column

I am trying to read data from a text file using excel/VBA. However when i import the file all the words are in the same column. The text is generated from PDF while preserving the table layout. So the words are space delimited, but the spacing is not consistent. I want code to run through cells and...
Harsh Vardhan

1

42

Views

### Get text out of node HTML in Variable Text Given

I have this variable in javascript: var datos = '01080'; I need get the text 01080 from this, ignoring the hidden input or any other input tag. var text = data.text(); //I used this but it did not work if (data.match('
walter nuñez

2

18

Views

### i need to filter or remove some lines from a file

This is the input file, it is already properly structured: Name: mr. Apple class: class 1 sub: subject 1 ContactNo: 11111 Name: mr. ball class: class 2 sub: subject 2 ContactNo: 2222 Name: mr. cat class: class 3 sub: subject 3 ContactNo: 33333 class: class 4 sub: subject 4 ContactNo:444...
ARUN XZA

0

2

Views

### Error converting speech to text using speechrecognition

I am creating a code on speech to text in Python 3 #!C:/Python3.6/python.exe import speech_recognition as sr import os r = sr.Recognizer() with sr.Microphone() as source: audio = r.listen(source) text = r.recognize_google(audio) print(text) This works fine when I run this in jupyter or standalone py...
Rohit

4

99

Views

### How to create a “type along” style interface?

I'm talking about something like this: The image is just an example, I simply need the user to type a certain text letter by letter. I tried it with an overlaying TextViewon an EditText, but it looks really ugly: My next attempt would be to use Spannables to turn the overlaying text the same colo...
Big_Chair

5

1.8k

Views

### how to give simple test editing facility (bold,italic,underline) while typing text in an EditText?

the user should be able to create something like the following while typing inside the edittext itself. 'this text is Bold and this is italics .' I don't want the whole text to be in any one format(ie. bold/italics/underline). thank you.
sisir

2

11

Views

### Functionally changing key names in serialization to aeson with Text keys

I have a json object with a manually crafted ToJSON instance. I would like to replace this with a function that does not require my explicit enumeration of the key names. I am using 'rec*' as a prefix I would like to strip, and my fields start out as Text rather than string. Starting with minimal...
Mittenchops

1

1.3k

Views

### Java - Apply Effects to MaryTTS Voice

I am using a set of libraries in Java called(MaryTTS[actually is many more]) to convert text to speech for that purpose the code below is used: public class TextToSpeech { private AudioPlayer tts; private MaryInterface marytts; Map numbersMap = new HashMap(); /** * Constructor */ public T...
GOXR3PLUS

1

2.5k

Views

### C# Scramble & Descramble Text

I already got this method to scramble my text but i have no clue on how to unscramble it? string input = 'https://www.google.de/'; char[] chars = input.ToArray(); Random r = new Random(259); for (int i = 0; i < chars.Length; i++) { int randomIndex = r.Next(0, chars.Length); char temp = chars[randomI...
RaINi

1

1k

Views

### Splitting words using nltk module in Python

I am trying to find a way for splitting words in Python using the nltk module. I am unsure how to reach my goal given the raw data I have which is a list of tokenized words e.g. ['usingvariousmolecularbiology', 'techniques', 'toproduce', 'genotypes', 'following', 'standardoperatingprocedures', '.',...
Kookaburra

2

171

Views

### Can someone help me find the bug in my IBM speech to text code/

I am using websockets to send request to IBM's speech to text api, and I am getting a constant pipe break error. The documentation for IBM speech to text api says it can take up 4mb in frames, but I can only give it seventy kb without it breaking. https://www.ibm.com/watson/developercloud/doc/speech...
maha

1

345

Views

### Position ggplot text in each corner with facet

I have a data frame with 10 values in each of the 5 kinds and have 2 types. df
Rashedul Islam

2

76

Views

### SVG - create path for textpath dynamically?

I want to have a curved text along a path (half circle) in SVG. I have followed this tutorial, which is great: https://css-tricks.com/snippets/svg/curved-text-along-path/ The problem is that the path presented there works only for this specific text - Dangerous Curves Ahead. If you leave only Danger...
feerlay

5

67

Views

### Grabbing a word and variable number of characters afterwards

I have a TAB separated file containing long strings, which I intend to filter the 8th column which has a mix of letters and characters randomly, to containing only ';OCCURRENCE=some words|' part as below: input.txt 1 138440 CAMEL C T . . MANY-WORDS-AND-CHARACTERS(*/-;|\);OCCURRENCE=HOY-BR|MANY-WORDS...
bapors

1

13

Views

### Text Classification Approach

I have data with 2 important columns, Product Name and Product Category. I wanted to classify a search term into a category. The approach (in Python using Sklearn & DaskML) to create a classifier was: Clean Product Name column for stopwords, numbers, etc. Create 90% 10% train-test split Convert text...
user519326

0

10

Views

### Optimize for runtime

The following code takes in two params. An array of sentences and an array of queries. Each query has one or more words. The function below prints out index of sentence for each query that has all the words in that sentence. This is functioning code. However, it is not optimized for large inputs bec...
jisu

5

46

Views

### Removing the first title line from a text file after reading into python

I have loaded the text file by the following command. I want to remove the first title line from the contents that lines has been separated by \n. How to do it? txtfile = open(filepath, 'rt') contents = txtfile.read() contents 'Label Volume(voxels)SurfArea(mm^2) Eccentricity Elongation Orient...
sc241

2

2.5k

Views

### function ts_rank_cd(text, tsquery) does not exist

I'm using full text search supported by postgres, I installed acts_as_tsearch plugin and it works successfully, but when I tried it later I found an error runtimeError: ERROR C42883 Mfunction ts_rank_cd(text, tsquery) does not exist HNo function matches the given name and argument types. You might n...

6

3.4k

Views

### C# parsing text data line by line

I have a problem with my project, let me explain a moment here and I need some expert guidance here because i am new to programming. I have a data in notepad like this: 10192 20351 30473 40499 50449 60234 10192 20207 30206 40203 50205 60226 10192 20252 30312 40376 50334 60252 it's 26 line of...
Reza

2

954

Views

### Insert text anywhere in Windows. (Like AutoText / Intellisense)

I'm creating a small accessibility feature (C#) that has to help users to insert bits of text anywhere within Windows. Something similar to the AutoText feature in Word or Intellisense in Visual Studio. So, whether typing an email in Outlook, a note in OneNote or a comment on Facebook (with whatever...
Tys

1

27

Views

### How to change hard-coded text to 'getString' in andorid

i am used https://github.com/lingarajsankaravelu/KatexTuts this library. this library is show katex in android. in java i can change text showing display val s = resources.getString(R.string.asdf) math.setDisplayText(s) string asdf is $2^2\\times5^2$ https://i.stack.imgur.com/Ee6ZJ.png but below cod...
acckolee

2

5.7k

Views

### C#: Load *.txt to RichTextBox and convert into UTF8

I want to open text files and load them into a RichTextBox. This has been going fine so far, but now I'm struggling with an encoding issue. So I used the GetType() method from this StackOverflow page: How to find out the Encoding of a File? C# - and it returns 'System.Text.UnicodeEncoding'. My quest...
Momro

2

8.4k

Views

### Function to import data from a txt file to a SQL-Server table

I am quite new with SQL Server. I have got a .txt file with values separated like this: 20120101;001;2;0;0;0;0;0;8 20120102;002;3;0;0;0;0;0;8 20120103;003;4;0;0;0;0;0;8 ... This file is in a server and I need to import this file everyday at the same hour autommaticaly, and update the changes (the fi...
andoni90

2

1.5k

Views

### How to measure Syntactic Similarity between a query and a document?

Is there a way to measure the syntactic similarity between a query (sentence) and a document (a set of sentences)?
hatemfaheem

0

299

Views

### Which SSML Tags are supported by Android TTS default engine

I have searched a lot unable to find any solid solution for, which are valid ssml tags supported by Android TTS default engine. could any one please update me. Will these tags support on all the android devices.
Manmohan Soni

0

41

Views

### Performance optimizations of LineBreakMeasurer

I am currently writing a text block with syntax highlighting in OpenGL and to layout my lines correctly with line wrapping I am using AWTs LineBreakMeasurer. The visual results are perfect, the performance is OK, however I was wondering if there are possibilities to make it a bit faster. Currently i...
Cromon

1

483

Views

### Searching 13 million records using full text search with additional conditions

Performance issue while doing SQL Server full text search with additional conditions. (SQL Server 2012) I am trying to filter the data based on search filters list (table value parameter), which will return all the records for match filters and single record for the filter doesn't have any record fr...
K.Engineer

1

476

Views

### How can I prevent a button shrinking smaller than non-wrapping text using css?

Essentially I have a button with the word 'Delete' inside. It currently uses this css: .btn-delete { font-size: 32px; background-image: none; border: 1px solid transparent; border-radius: 15px; border-top: 0px; color: #fff; background: linear-gradient(to bottom, #ff0000, #d40000); vertical-align: mi...
Terry

1

1.1k

Views

### How to reverse search in Excel?

I have a text in a worksheet like: The girl is very beautiful I want a formula to perform a search from right to left for the word 'very', and if found then extract it to some other region of the sheet. Note: Purpose of doing reverse search is because I want to implement it in my workbook which re...
Chen Guo

1

91

Views

### How to train a machine to label individual words in a text

For a text (say): 'I am leaving India today. I am headed to USA for a week.' 'I am travelling from India to USA' I need to train the machine to label USA as 'Destination' and India as 'Source' I am using SpaCy's NER to extract the locations. How should I proceed to create a training set and train it...
Phoenix

0

625

Views

### Html2Canvas Text in input or textarea not capturing text

I am trying to capture div with image and textarea text(user input) in it. but it show me only image which is in div and showing blank text which is inside the same div. Cannot able to figure out how to capture text with latest version. Thank you for any help! I am trying to capture that on blur. wh...
H45H

1

110

Views

### measuring rate of speech in realtime

I'm looking for a quick and simple way to measure the rate at which I am speaking in real time. Course grained approaches or approximations are sufficient. The idea is to write a simple app/widget that at least tells you to speed up or slow down while speaking. Measuring things like pitch and volume...
imichaelmiers

1

118

Views

### MiniBatchSparsePCA on Text Data

Goal I'm trying to replicate an application described in this paper (section 4.1), where Sparse Principal Component Analysis is applied to a text corpus with the output being K principal components, each displaying a 'structure that is otherwise hidden'. In other words, the principal components shou...
SeánMcK

1

73

Views

### Change a value in a file Java [closed]

So, I want to change a value in the file Utilizadores.txt the default value is zero but when i click in the button the value has to change to 10 and every time i do a new one the value gets +10 the problem is when e try to do that the space where it should appear the (10/20/30...) appears blank PS:...

0

12

Views

### Full Text Search Using Multiple Partial Words

I have a sql server database that has medical descriptions in it. I've created a full text index on it, but I'm still figuring out how this works. The easiest example to give is if there is a description of Hypertensive heart disease Now they would like to be able to type hyp hea as a search term a...
Jhorra