Questions tagged [text]

Text is a sequence of printable characters.

Text is a sequence of printable characters.

Text can be unformatted (plain) or formatted (rich).

The most common character codes used for representing text are Unicode and ASCII:

  • ASCII is a character code and an encoding.
  • Unicode is a complex standard, with multiple encodings, the most common of which is UTF-8.
31743 questions
457
votes
28 answers

How to replace multiple substrings of a string?

I would like to use the .replace function to replace multiple strings. I currently have string.replace("condition1", "") but would like to have something like string.replace("condition1", "").replace("condition2", "text") although that does not…
CQM
  • 42,592
  • 75
  • 224
  • 366
456
votes
26 answers

How can I replace text with CSS?

How can I replace text with CSS using a method like this: .pvw-title img[src*="IKON.img"] { visibility:hidden; } Instead of ( img[src*="IKON.img"] ), I need to use something that can replace text instead. I have to use [ ] to get it to…
MokiTa
  • 4,760
  • 3
  • 15
  • 16
456
votes
30 answers

Using .text() to retrieve only text not nested in child tags

If I have html like this:
  • This is some text First span text Second span text
  • I'm trying to use .text() to retrieve just the string "This is some text",…
    Matt
    • 23,363
    • 39
    • 111
    • 152
    432
    votes
    12 answers

    How to search a string in multiple files and return the names of files in Powershell?

    I have started learning powershell a couple of days ago, and I couldn't find anything on google that does what I need so please bear with my question. I have been asked to replace some text strings into multiple files. I do not necessarily know the…
    Bluz
    • 5,980
    • 11
    • 32
    • 40
    427
    votes
    6 answers

    How to stop text from taking up more than 1 line?

    Is there a word-wrap or any other attribute that stops text from wrapping? I have a height, and overflow:hidden, and the text still breaks. Needs to work in all browsers, before CSS3.
    Franky
    425
    votes
    9 answers

    Scatter plot with different text at each data point

    I am trying to make a scatter plot and annotate data points with different numbers from a list. So, for example, I want to plot y vs x and annotate with corresponding numbers from n. y = [2.56422, 3.77284, 3.52623, 3.51468, 3.02199] z = [0.15, 0.3,…
    Labibah
    • 5,371
    • 6
    • 25
    • 23
    405
    votes
    8 answers

    How can I find elements by text content with jQuery?

    Can anyone tell me if it's possible to find an element based on its content rather than by an ID or class? I am attempting to find elements that don't have distinct classes or IDs. (Then I then need to find that element's parent.)
    sisko
    • 9,604
    • 20
    • 67
    • 139
    351
    votes
    7 answers

    What is "entropy and information gain"?

    I am reading this book (NLTK) and it is confusing. Entropy is defined as: Entropy is the sum of the probability of each label times the log probability of that same label How can I apply entropy and maximum entropy in terms of text mining? Can…
    TIMEX
    • 259,804
    • 351
    • 777
    • 1,080
    350
    votes
    8 answers

    Input text dialog Android

    When a user clicks a Button in my App (which is printed in a SurfaceView), I'd like a text Dialog to appear and I would like to store the result in a String. I'd like the text Dialog to overlay the current screen. How can I do this?
    Luke Taylor
    • 9,481
    • 13
    • 41
    • 73
    344
    votes
    11 answers

    How to place and center text in an SVG rectangle

    I have the following rectangle: I would like to center the word "Fiction" inside of it. For other rectangles, does SVG word wrap to stay within them? I can't seem to find anything specifically…
    Lady Aleena
    • 3,595
    • 2
    • 16
    • 14
    328
    votes
    39 answers

    How can I read and parse CSV files in C++?

    I need to load and use CSV file data in C++. At this point it can really just be a comma-delimited parser (ie don't worry about escaping new lines and commas). The main need is a line-by-line parser that will return a vector for the next line each…
    User1
    • 39,458
    • 69
    • 187
    • 265
    318
    votes
    36 answers

    Extracting text from HTML file using Python

    I'd like to extract the text from an HTML file using Python. I want essentially the same output I would get if I copied the text from a browser and pasted it into notepad. I'd like something more robust than using regular expressions that may…
    John D. Cook
    • 29,517
    • 10
    • 67
    • 94
    310
    votes
    21 answers

    How can I detect the encoding/codepage of a text file?

    In our application, we receive text files (.txt, .csv, etc.) from diverse sources. When reading, these files sometimes contain garbage, because the files where created in a different/unknown codepage. Is there a way to (automatically) detect the…
    GvS
    • 52,015
    • 16
    • 101
    • 139
    310
    votes
    4 answers

    SQL Server Text type vs. varchar data type

    I have variable length character data and want to store in SQL Server (2005) database. I want to learn some best practices about how to choose TEXT SQL type or choose VARCHAR SQL type, pros and cons in performance/footprint/function.
    George2
    • 44,761
    • 110
    • 317
    • 455
    308
    votes
    15 answers

    Setting a max character length in CSS

    I am making responsive website for school and my question is: How do I set a max character length of the sentences (with CSS) on my website (like 75 characters) that when I have a very large screen, the sentences wont go further than 75…
    Sharif1111
    • 3,117
    • 2
    • 11
    • 4