I have a Flex layout with some fixed size boxes into which I want to display text. However the text length is very variable, so it is necessary to scale, wrap and possibly elide (using ellipsis) the text.
The basic algorithm needed is:
fill bounding box with text, scaling font size to fit
if font size < minimum
set font size to mi...
i wonder why backspace character in common linux terminals does not actually erase the characters, when printed (which normally works when typed)..
this works as expected:
$ echo -e "abc\b\b\bxyz"
xyz
(\b evaluates to backspace, can be inserted also as ctrl-v ctrl-h - rendered as ^H (0x08))
but when there are less characters after t...
Disclaimer: Not a programmer by trade, but I've messed around a little in the past.
Problem: I have a CLI program that generates an output text file from a text file list of inputs. I have been manually changing inputs in the text file to view the changes in output; however, this is inefficient. I would like to define a range of inputs ...
I'm trying to reutilize code that generates FILE fields for use when something is to be added to the database, and grayed out (and disabled) with data already in the database when the item in question is being edited or viewed in detail. However, I can't seem to get the text to fill the field. I'm using this:
echo '<input type="file" na...
I have a website in 3 languages: english, dutch and russian.
There's a little CMS where the user can update the text on the website.
everything works good, except for the russian text.. If I enter any russian text in the form in the CMS, I get "????" in the phpmyadmin database and on the website.
I am completely new to charsets, it's ...
I would like to use UltraEdit regular expression (perl) to replace the following text with some other text in a bunch of html files:
<style type="text/css">
#some-id{}
.some-class{}
//many other css styles follow
</style>
I tried to use <style type="text/css">.*</style> but of course it wouldn't match anything because the dot matc...
Hi, i'm trying to write a text file on remote server,
i'm using the following code:
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult Index(UserModels model)
{
if (!ModelState.IsValid)
{
return View("Index");
}
try
{
using (StreamWriter w = new StreamWriter(Server...
There is a text file containing words with 1 space between each of them. And there is also a command line entry that gives the length of line (output) wanted. Output will be words that fit into the length of the line (taken from command line).
Also the first word will be on the left side of the line and the last word will be right side ...
Is it to possible to capitalize the letters in a Textfield as they are being typed by the user in Java?
E.g. The user would type 'hello' and 'HELLO' would appear in the Textfield.
(Odd request and I don't like the idea either).
...
My PHP backend sends XML response to the client (ajax):
<response>
<code>0</code>
<message>OK</message>
</response>
in the javascript I'm trying to get CODE value in this way:
var errorCode = $('code', xml).text();
and then depending on errorCode value I do processing.
It is working fine in all browsers I tested except IE7. In...
Hello,
I have a C# program where I am using a lot of RegEx.Replace to replace text in my text file.
Here is my problem.
In my text file, I have a code such as "M6T1". This code is listed in numerous places in the text file.
However, I only want to delete it from the bottom (last instance) in the text file. There will always be a "M...
Hello,
I need to strip the last line from a text file. I know how to open and save text files in C#, but how would I strip the last line of the text file?
The text file will always be different sizes (some have 80 lines, some have 20).
Can someone please show me how to do this?
Thanks.
...
How can I know the displayed text in the UILabelView? I have a large text and I am going to have 3 uilabels that represent 3 columns of an iPad App like NYTimes one. When I put the large text in the first column (UILabelView) I need to know how much of the text is displayed there..
If U suggest another solution please let me know.
Char...
Hi,
I am currently in need of a way to programmatically remove some text from Makefiles that I am dealing with. Now the problem is that (for whatever reason) the makefiles are being generated with link commands of -l<full_path_to_library>/<library_name> when they should be generated with -l<library_name>. So what I need is a script to f...
Is there a way of manipulating big blocks of text?
For example, I have a web site where users can write fictions. The String class is insufficient for storing chapters so someone found a workaround by mapping to a Blob. That's for persistence and in general I'm wondering if there are alternatives to using String arrays.
...
can xterm can be used to process ANSI escape sequences and output the resulting text into a file?
i mean e.g. like this:
$ echo -e "\e[31mfoo\e[0m" | xterm -SOME_NICE_OPTION
foo
xterm has a slave mode, but i'm not sure whether it can be used to this type of task.
echo "foo" | xterm -S120
writes "foo" into xterm window
i have play...
I am not very familiar with VBA but need to use it for a new software program I am using (not Microsoft related)
I have a text file that has columns of data I would like to read into VBA.
Specifically the text file has 4 entries per row. Thus I would like to load in the column vectors (N by 1).
The text file is separated by a space be...
Hello,
I posted this yesterday on SO, and I received an answer that works great, but I need to change it around and I don't know how.
Here is my original question:
I need to strip the last line from a text file. I know how to open and save text files in C#, but how would I strip the last line of the text file?
The text file will al...
HI All
I am creating a log file for our website which will log every log-in by all the users to our orders area. I wish to know if you think its good to enter this log info in just one single file or should this be split up once the log file hits a certain size? My concern is that this file will get rather large over time, but im not c...
This application is used to let you use our company basecamp site and only that site. When logged in, if you go to post a new message, you can insert text in the title text field, but if you try to tap in the message body section, it does not bring up the keyboard. I have to assume it's something with my coding, because safari works just...