Programming :: Aligning Two Different Pieces Of Text On Opposite Sides Of Screen
Mar 21, 2009
I have written a CGI script which prints 2 tags at either end of the screen (actually they are the "Previous page" and "Next page" links for either end of the screen). The left one is under a <DIV ALIGN="LEFT"></DIV> and the right one <DIV ALIGN="RIGHT"></DIV>. Unfortunately they don't line up on screen - the left "Previous page" text is one line higher than the "Next page" link - I tried putting in a <NOBR> tag between them but it didn't work - can someone tell me what to do?
how to get the sine of an angle. it just says that the sine of angle A is opposite/hypotenuse. that's all find and dandy if you have a triangle, but how do you get the sine of an Angle without that information? Calculators do this. pop in Sin(35) and you'll get the sine of angle 35. how does that work? I've attempted to look up the Function definition in the standard C library, but all I can find is the function prototype in the header - where the heck is the function definition?
This obnoxious bar has just appeared in Smplayer at the top of the screen. It stays there even when I go full screen. Now full screen isn't full screen and there are black edges on both sides of the screen. I have not be able to figure out how to hide it. I do not need or want this onscreen display. How can I configure Smplayer to make this go away? How can I get my 16:9 full screen aspect ratio back? I have done nothing to mplayer or smplayer as far as editing any or changing any configuration files. I tried several videos and it displays on all of them. It was not there last time I used Smplayer.
I'm looking for software which will allow me to record a screen-cast of a terminal based application, recording keystrokes, timing of keystrokes, and audio. I see a couple of advantages to this approach over video capture: Display independence: the viewer can display text in any resolution/style they want, not limited to the resolution of the recorded video. Ability to copy and paste text from the screencast. DSABE? (Does Such A Beast Exist?)
I have an Acer tiny desktop using laptop components and I want to replace its small laptop hdd running Vista with a Kingston SSDNow V Series Boot Drive 30GB and install Ubuntu, since it will support TRIM. I am aware of the current issues on some new hard drives with 512 vs. 4k sector sizes and the necessity to align sectors for those drives. And I know I've seen some posts or discussion of aligning sectors for SSD's.
I'll be doing more searching for info on this, but my previous searches on the 4K sector alignment issue for the new WD hdd's on linux were confusing. Does anyone have definitive information on the necessity of aligning 4k sectors on current Linux kernels, or on whether aligning sectors is necessary for SSD's?
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.
I 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.
I 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:
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.
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 (.
When I was installing Ubuntu onto my laptop, I probably did a mistake partitioning the hard drive by selecting align to: nothing, because I didn't want to have unallocated spaces between partitions. However, this resulted in partitions' misalignment as no one partition in the extended one (including the one that is extended) doesn't start on a physical sector boundary. As I already have much data on the HDD and I don't have another one that big, it is impossible for me to erase existing partitions and then copy the data back. So, is there please a way to get the partitions aligned properly without deleting them?
Here is output from fdisk -lu: Disk /dev/sda: 750.2 GB, 750156374016 bytes 255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0xd58c6e9d
If the arrowhead points up, the standard behavior is to sort with lower values first and higher values later. In my ubuntu install, it does the opposite. Names and dates sort descending when the arrow points up.
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):
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.
After getting my components, building my computer, installing ubuntu and beginning to configure things I found out about the issues with aligning Western Digital's wd20ears 2TB hard drive. So I'm wondering what my options are. It's Maverick I've installed and when I go to the 'administration > disk utility' it reports a 1MB partition at the front, then 2TB partition for Ubuntu, then 25GB swap. Can/should I be worrying about this now? Am I too late to do anything except start over (remove old partitions and create new ones beginning in the right sector?) I read in this thread (this thread here) a post that made me hope perhaps I'm worrying about a non-issue but I don't know enough to diagnose things (or fix) myself...
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.
I need to be able to compress into multiple pieces while still being able to be read by someone else who has windows, I can only download unrar but not rar. Why is this?
I need files to be <= 5GB to put on S3. Right now I have an ugly tar / gzip / cut before upload, then cat / zcat / tar on download, but it's really ugly - and nearly every archiver should support archive splitting right? What's the best way?
I have downloaded ubuntu 10.10 64bit and have also burned it to good disk at 4x speed. when i boot it from cd everything goes simple and fine till it comes to a mixed orange colour screen and then nothing goes further, it just halts there with this full blank screen. so i have to do a hard shutdown. then i tried wubi.it went good. after rebooting it asks for installation options. there are five of them. in the normal mode the same thing gets repeated again. but in safe graphics mode ubuntu gets installed but few errors are shown after installation. there is no graphical screen and only this text screen comes again and again.
I've just dicovered GNU screen, a program that allows you to setup multiple terminals, from which you can detach and re-attach, so that you can have programs running in a session to a remote server and then log off from that server while the programs keep running! Great for over night copying jobs on my file server. the output of a command is rather long and the text scrolls off the screen. How do i scroll up to read the output? Shift + page up doesn't work...
I was wondering if there's any resource that explains how to use w3m. I checked the man page but this just lists the startup options. I also did some google searches but couldn't find anything useful. I was able to find bits and pieces of info on different sites (e.g. how to enter a URL, how to go back a page, etc.) but there was no site that had all this sort of information in one place.
I would like to use my laptop at home, where I don't have internet access (don't ask, long story). My question are two-fold;
** How do I prevent various pieces of software trying to access the net for updates etc. I presume they are likely to hang, lock up, and generally cause trouble.
** Can anyone recommend a working practice for installing updates and/or new software, either from USB or CDROM/DVD? I have good (legitimate!) access to assorted computer facilities at my office. I am using 11.04
I used linux for a long time now, mostly ubuntu-based distros but these days I decided to try openSUSE. Must say, It is a really nice distro, with lots of new features. There is one that I never seen before but I admit it is very useful: the auto resize window feature. I use the 11.3 (KDE) (milestone 4) version. Just wanted to ask if this is a package for ths or is hard-coded into the system? And is it KDE-specific?
I have managed to get Compiz Desktop Cube working with 4 viewports. Everything is great but I have noticed the that cube will show the running applications in the bottom panel, from the previously active viewport, on all sides of the cube.
Anyone know how to set it so that the bottom panel on each side of the cube displays only the applications that are running in the currently visible viewport? I hope that's clear because I'm not 100% sure of the terminology.er to determine the viewport you are looking for.
I would like to ask the following: 1) ls -l |grep test -> this will grep every "ls -l" output line 2) ls -1 |xargs grep test -> this will grep every single file with test 3) ls -1 |xargs echo -> this will echo directory list 4) ls -1 |echo -> this does nothing!!!
My question is: how some command can receive input from "both sides" (grep can grep whole output or every single file - xargs, the same is for i.e. wc command). 4) echo does nothing (it's a single echo command).