All Questions
32,363 questions
7706 votes
57 answers
12.1m views
Find all files containing a specific text (string) on Linux [closed]
How do I find all files containing a specific string of text within their file contents? The following doesn't work. It seems to display every single file in the system. find / -type f -exec grep -H '...
1094 votes
15 answers
676k views
Difference between text and varchar (character varying)
What's the difference between the text data type and the character varying (varchar) data types? According to the documentation If character varying is used without length specifier, the type ...
1083 votes
31 answers
2.7m views
Reading a plain text file in Java
It seems there are different ways to read and write data of files in Java. I want to read ASCII data from a file. What are the possible ways and their differences?
1020 votes
21 answers
1.4m views
Limit text length to n lines using CSS
Is it possible to limit a text length to "n" lines using CSS (or cut it when overflows vertically). text-overflow: ellipsis; only works for 1 line text. original text: Ultrices natoque mus ...
950 votes
7 answers
1.8m views
Print string to text file
In the following code, I want to substitute the value of a string variable TotalAmount into the text document, with Python: text_file = open("Output.txt", "w") text_file.write(&...
921 votes
9 answers
547k views
MySQL: Large VARCHAR vs. TEXT?
I've got a messages table in MySQL which records messages between users. Apart from the typical ids and message types (all integer types) I need to save the actual message text as either VARCHAR or ...
831 votes
14 answers
1.5m views
How to remove spaces from a string using JavaScript?
How to remove spaces in a string? For instance: Input: '/var/www/site/Brand new document.docx' Output: '/var/www/site/Brandnewdocument.docx'
667 votes
43 answers
1.1m views
How can I insert a line break into a <Text> component in React Native?
I want to insert a new line (like \r\n, <br />) in a Text component in React Native. If I have: <text> <br /> Hi~<br /> this is a test message.<br /> </text> Then ...
662 votes
9 answers
971k views
How to wrap text in LaTeX tables?
I am creating a report using LaTeX, however, the cell data in the table is exceeding the width of the page. How can I wrap the text so that it falls into the next line within the same cell of the ...
627 votes
21 answers
646k views
Best way to convert text files between character sets? [closed]
What is the fastest, easiest tool or method to convert text files between character sets? Specifically, I need to convert from UTF-8 to ISO-8859-15 and vice versa. Everything goes: one-liners in your ...
581 votes
19 answers
631k views
Android: combining text & image on a Button or ImageButton
I'm trying to have an image (as the background) on a button and add dynamically, depending on what's happening during run-time, some text above/over the image. If I use ImageButton I don't even have ...
521 votes
22 answers
612k views
How do you change text to bold in Android?
How do you change text/font settings in an Android TextView? For example, how do you make the text bold?
502 votes
2 answers
509k views
Difference between VARCHAR and TEXT in MySQL [duplicate]
When we create a table in MySQL with a VARCHAR column, we have to set the length for it. But for TEXT type we don't have to provide the length. What are the differences between VARCHAR and TEXT?
500 votes
17 answers
694k views
How to print color in console using System.out.println?
How can I print color in console? I want to show data in colors when the processor sends data and in different colors when it receives data.
493 votes
26 answers
1.4m views
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 ...