Programming :: PHP - Show Text Between Two Characters?
Dec 1, 2010I wish to show text between two characters with PHP. Here is some example text:
<p class="abc">My</p>
<table border="1">
<tr><td>name</td><td>is</td></tr>
[code]...
I wish to show text between two characters with PHP. Here is some example text:
<p class="abc">My</p>
<table border="1">
<tr><td>name</td><td>is</td></tr>
[code]...
I am using a VRS for ftp operations. I have bought it with OpenSuSe 11.3 installed without any Control Panel installed. I have used NX and installed IceWM as windows manager. It works really great. Then system wanted me to upgrade. I did so. After upgrade to 11.4, my programs screwed up. They don't show any text at all but squares instead. I have tried everything i know to fix this but i could not manage to repair it.
My VRS has 512mb RAM , OpenSuse 11.4 (32-Bit) and has no control panel. I use yast through SSH Telnet client (Putty).
I am having some text rendering issues.I am using F14 and having blocky (dark black blob) covering certain letters and/or numbers when rendering to my Monitor. I am using 'mesa' drivers and was wondering if this has anything to do with it.I wish to use only non-proprietary drivers.I have several friends whose machine I manage and they have been experiencing a similar phenomena.I use 19 and 22 inch LCD monitors and my friends have similar LCD monitors.I have attached a copy of some output with the problem. I have tried different fonts but have not been able to resolve the issue. Could someone help me in getting a possible solution to this problem?
View 12 Replies View RelatedNow the messages in certain programs, like yast or in the console, are in spanish, but the special characters are written wrong:
felisa:~ # man ls
Man: find all matching manual pages
* ls (1)
[code]...
I have the following in my .screenrc file
hardstatus string '%{= kw}[%{r} %d/%m/%Y %C %A %{w}] [%= %{= kw}%-Lw%{= kW}%{r}%n:%t%?%?%{= kw}%?%+Lw%?%?%= ] [ %{r}%l%{w} ]%{w}%{w}'
and the statusbar shows up as
[ 30/12/2010 8:24 PM ] [ 0$ bash 1-$ bash 2:bash ] [ 0.00 0.03 0.04 ]
I want it like this instead:
[ 30/12/2010 8:24 PM ] [ 0:bash 1:bash 2:bash ] [ 0.00 0.03 0.04 ]
When I open a terminal or konsole window, output (either STDOUT or STDERR) sometimes contains funny characters instead of something meaningful. Can someone explain how I might correct this situation?
ANALYSIS:
One very repeatable example involves using the manual page command
Code:
man set... man page output ...upstart - event-based init daemon
In my copy of the output, there are several problems in the very first screen. In the synopsis section, there is "{ value | ?value? ..." Replace the '?' with a lower-case-a-under-a-carat character (a-hat).
I suspect the garble character might be apostrophe in real life.
In other places, I see var?/able or how?/ever or trans?/action where the '?' is again a-hat and the '/' represents end of line or newline. I suspect the garble character might be a hyphen in real life.
All of this suggests that there is a conflict between the character stream written to STDOUT by the man command and the character-display settings (is that "code page" or similar?) of the specific terminal or konsole in use.
In specific, I use konsole v1.6.6 from KDE v3.5.10. In general, I'm running Ubuntu Hardy (v8.04.3 LTS).
I have installed scim and anthy. Most Japanese characters display, but some websites and files show garbage characters. Is there any way to resolve this?
View 1 Replies View RelatedI have installed scim and anthy. Most Japanese characters display, but some websites and files show garbage characters.
View 1 Replies View RelatedI have a number of text files (26 per database x 100+ databases) which need 'correcting' in order to import into postgresql. I think that I have identified all the problem characters and I need to automate the process as much as possible. I have a script to convert the characters and I do them one by one (not effecient but easier to understand).
[Code].....
I have a question regarding to the Graphical Splash Screen. Is their a way to show the text based startup on booting your OS? So. I don't the OpenSuse Background with the loading line. But i want the half transparent black background if possible or just the black background with all the loading texts. The black and white screen.
View 9 Replies View RelatedI can't find the reason cups pdf driver do this. I created my default printer as is told:
CUPS PDF--> Generic Printer--> Generic CUPS-PDF Printer
The pdf created shows well, but when i drag to select and copy text, it copies some strange characters as following:
✁✂✂✄
☎✆✝✞✟✟✝✆✠✡☛ ☞✌☛✍✡✎ ✏ ☛✄✑✄ ✎✞✟✄✂✒✞✓ ✔✁✓✁ ✕✖✞✑✗✓✞ ✍✁✂✂✄
☎✆✝✞✟✟✝✆✜✁ ✢✖✟✝✖✛✁ ✘✞✂ ✘✖✣✞✓✄ ✏ ✤✁✛✥ ✜✁✦✟✄✣☎✘✄✛
✁✂✂✄
☎✆✝✞✟✟✝✆✕✞✛✓✞✝✄✟ ✘✞ ✙✣✁ ✑✞✣✝✞ ✖✣✝✞✂✖✧✞✣✝✞★ ✍✞✛✣✖✛✁✂✂✄
i have a problem, when i open OO, the text of the menus is replaced by little rectangles.
For example, instead of:
File Edit View etc..
(they look more like rectangles than squares) i also have this problem with drop down menus, font names, font styles and even with the numbers on the ruler.
Ubuntu 9.10, OO 3.1
I have an odd request, lets say I have a text file like this:
Quote:
Code:
__##___##___IIIIII
__##___##_____II__
__##___##_____II__
__#######_____II__
__##___##_____II__
__##___##_____II__
__##___##___IIIIII
I want a script that will replace all of the hash tabs with random characters.I found this command will generate a random character
Quote:
apg -a1 -n1 -m1 -x1 -d
how to script a search and replace using that random character upon each successive find until the end of file occurs.
I configured cups and I managed to print successfully with generic text only but my problem is that the printout always comes out as 80 columns. anything more than 80 colums wraps on the next page. I tried changing the pagesize at the textonly.ppd but it didn't work.my textonly.ppd is
*PPD-Adobe: "4.3"
*%
*% Text-only printer definition
[code]...
i am on processing text tasks And i found that if you assign a text to a variable is chomp'ed automatically the newline
Code:
variable=$(cat file.txt)
The problem is i can only access the items/lines using:
Code:
for line in $variable
do
echo $line
# Other commands
done
how do i convert this to an indexed array. More importantly, how do i get access to individual $line[0], ..., $line[n] Another thing, if the file.txt, has lines with spaces it is a mess using the for...in..., but echoing prints line by line...o_0
I need to insert 3-4 lines of text to the beginning of a text file. The file is a largish MYSQL dump, the result of a backup shell script. This shell script should insert the required text.I've wrestled with sed, but lost.
View 2 Replies View RelatedI have to delete a certain line of text from the a textfile via ubuntu's shell scripting.I have done research, and it seems that most people advocate the usage of sed /d option. sed makes does not edit the text file. Hence, most options I discovered involved the use of a temporary variable/textfile and then overwriting the old file with the temporary new file. Is there anyway whereby I can bypass the use of temporary storage containers? I hope there is any magical combination of commands to edit the file directly.
View 3 Replies View RelatedI want to display something in my text view widget in glade using c code. that's all right.
now I need to attach a save button beneath the text view.so that on click the text view content should save as a txt file..
I want to display the contents of a particular log file (simple text file, I mean in Linux). But there is a problem: The contents need to be organized in a fixed format. Have a look at this log file:
sampleLog.txt
Code:
User Name: XYZ
Reported Problems Description: Blah! Blah! Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah!
[code]....
So, while displaying the contents of above file on a web page, I want to format the field names found in the log file: User Name:, Reported Problems Description:, and Remarks:. These fields may contain a variable length of text and no specific line number is assumed for them to appear on.
The desired output should look like this:
User Name: XYZ
Reported Problems Description: Blah! Blah! Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah! Blah!Blah!
[code]....
Well, what I am trying to do may sound wierd to some of you. The filed "Reported Problems Description:" can possible contain text which embeds colon (.
I'm really new to Linux so this will probably sound like a pretty naive question to most users, but how do you change the root password?To install Java, I have to type # su into Terminal,which then asks for the password.What's weird is that when I start typing a password, no characters show up. I don't know if this is supposed to happen or not.I've found a bunch of different sites on the Internet that explain how to change the root password, but none of them seem to work for my specific work station.
I've got Ubuntu 9.10 64 bit. In the GRUB boot menu, I can choose to boot normal or in recovery mode (I'm led to believe older versions don't have this option).I've tried typing # sudo passwrd into Terminal, but I already have a root password set up apparently, so I can't change it there.
I am trying to find sed command combination to print out the "start command" line, the id line and all lines between "details" and "stop command" only if "error" exists. Here's the original output (test.txt):
start command
id 1
kajsdlfjsalj
[code]...
a sed command to add a text before line number in text file? I have text file with 500 lines, and i want to add 3 more lines with text after line 300, OR before line 302, isn't no problem.
View 16 Replies View RelatedI am running Ubuntu 11.04 Encrypted LVM.I have problem with plymouth resolution. I managed to fix ugly plymouth with SterUpManager. But when i boot, before logo appears i get message: "Vga=189 is deprecated. Use set gfxpayload=800x600x24,800x600 before linux command instead.I don't want this message.I have followed this tutorial showthread.php?t=1446132, but tis doesn't work for me. I don't know why.So, everything i want is just a text during boot and a passphrase prompt --> no logo and no VGA message.
View 2 Replies View RelatedAfter a recent CentOS upgrade, my PHP has gone nuts.About 50% of the time, the websites will show just fine from my web-server.Most of my sites are wordpress related; all have the same issue. Standard HTML sites load okay all the time, though.
View 12 Replies View RelatedI somehow managed to screw up my lucid lynx system so that all files show up under Nautilus properties as Type Plain Text. When I double click a file, any file, the system tries to open it as plain text with gedit. Everything worked correctly until yesterday when I tried to install a new version of PyQt4. If I reboot with an old (karmic) version of Ubuntu and bring up Nautilus Properties on the same file (my data partition can be opened in other OS's) the files show up with the correct file type (PDF, ODT, etc) So the problem is not in the file itself, but rather in the lucid OS, which is mis-interpreting the file type. As I said I somehow messed it up when installing the new version of PyQt4.
View 7 Replies View RelatedHowto configure Ubuntu 11.4 with Gnome to show boot text messages on the screen, each time during the startup?
View 3 Replies View RelatedI have created a text file in Linux, and I only want to show certain users. Here is my text file:
usr user tty Limbo?
11 12:06:13 APW no
12 12:06:13 APW no
[code]...
When viewing a particular text file in vim or less on Linux or OS X, all the en dashes show up as highlighted "<97>" characters.What control-sequence do I need to type in order to substitute the hyphens back? For example, the following doesn't work in vim:% s/<97>/--/gTyping bracket nine seven bracket is not the same as typing the actual special character.
View 2 Replies View Relatedfor example
else {
for fileDOC in $location/*.doc
do
[code]...
I'm working on my ncurses application, written in C. I get user input through a loop which uses getchar(). I was able to recognize Ctrl-n by comparing the keypress to ASCII character 16, and this seems to work fine. However, if I noticed that the ASCII character for Ctrl-j (10) is the same as the Line Feed. I tested this, and if I press enter on the keyboard I get the same ASCII value as when I press Ctrl-j.
So, what do I do if I want Ctrl-j to mean something different in my program than pressing enter?The ncurses terminal mode is set to raw, with a 100 millisecond timeout, and keypad is on (I'm already using the up and down arrow-keys).