line

Title goes up if added more text

hi I'm wondering why it is happening here. If delete the text: "Sed ut persp iciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque." Then the title of the site will go up,please see the image here: http://www.freeuploadimages.org/images/sgazmtxj4f92ywdkqn82.jpg And here is the...

How to cat two files after each other but omit the last/first line respectively?

I have two files I want to cat together. However, the last line of the first file and the first line of the last file should be omitted. I am sure this can be done in a UNIX shell (or rather, Cygwin). But how? ...

Start command windows and run commands inside

Hi all, I need to start the command window with some arguments and run more commands inside. For example, launch a test.cmd and run mkdir. I can launch the test.cmd with processstartinfo , but i am not sure how to run further commands. Can I pass further arguments to the test.cmd process? How do I go about this? Thanks! Unable to a...

PHP to search text document (.txt), grab entire line and the line number

Hi there, Thank you for taking the time to read this and I will appreciate every single response no mater the quality of content. :) I'm trying to create a php script which searches a text file for specific text. A person types in the specific text within a HTML form and the php script should search for that specific text within the te...

I need to know what line endings setting to use for Textmate and SVN

I am using Textmate (bran new user) as my editor of choice. Today I did svn diff somefile and found that svn thinks I changed the entire file ! In Textmate, I went to Textmate -> Preferences -> Advanced -> Saving and Set Line Endings to LF (recommended). File Encoding is set to UTF8 (recommended). I guessed that this was the correct s...

2 dimensional array, calculating maximum value

Hey everyone, I'm trying to get the maximum value in a line in an 2d array. For example is this greyscale image. For me it's no problem to calculate the horizontal and vertical maximum grey value. However, I don't have a clue how to calculate an angled line (green line) from this 2d array. Anyone can help me out with this. ...

How to get camera position from such data generated by LSD lines detector?

So for example I have such lines with coordinates. how (using what algorithm) is it possible to generate some kind of simple 3d scene meaning get relative distance from camera to the wall that is facing us? ...

How can I draw a border with squared corners in wpf?

You know, like Battlestar paper! I have given this a few goes but now I'm stumped. I haven't yet gone down the geometery route, so I'll explain this as best as I can. I'd like the border to be sizable, but contain fixed-size corners, just like CornerRadius does. Instead of rounded corners, I'd like them to be tapered, like: /---------\...

VB: Start from specific line for SQL INSERT

Hi everyone, I have a small VB program I am doing, however I have run into a problem I can't seem to figure out. Currently my code reads a file line by and line in a loop and does some processing stuff such as SQL INSERT, however the file I'm reading from has a large portion that is configuration at the top and the data at the bottom. ...

Finding number of lines in an html textarea

I'm writing a mobile web application where scrollbars are not displayed on the device's browser. Due to this, I'm trying to dynamically modify the height of the textarea to make it bigger, however I don't know of any way to actually get the line count on an html textarea. Any help would be greatly appreciated! EDIT So I realize now t...

Get each line from textarea

<textarea> put returns between paragraphs for linebreak add 2 spaces at end indent code by 4 spaces quote by placing > at start of line </textarea> $text = value from this textarea; How to: 1) Get each line from this textarea ($text) and work with them using foreach()? 2) Add <br /> to the end of each line, except the last one? 3) ...

How to create trendline using adobe flex

I have a bubble chart where i need to draw a trendline on that showing the trend. I have Months on X axis and values (intergers or numerics) on y axis. I have gone through this link http://stackoverflow.com/questions/43224/how-do-i-calculate-a-trendline-for-a-graph , but i'm not able to understand what to use x-axis value and y- axis va...

windows batch file programming

I want to write a line of text at a specific line in an already existing text file using dos batch file programming in Windows XP.Also I want to input the line number from the user. Any help will be appreciated. ...

Processing - Line Implementation Help

I jumped into Processing (the language) today. I've been trying to implement a line without the line() function. In other words, I'm trying to replicate the line() function with my own code. I'm almost there, but not. (There's a screen, and you can click around, and this function connects those clicks with lines.) There are four differe...

Processing/Line Graphing - Help

I posted something similar yesterday, but got nothing. I spent a few hours today problem-solving, but didn't progress any. I'm using Processing (the language) and trying to implement a method that draws a line between two points. (I don't want to use the library's line() method.) My lineCreate method works great for positive slopes, bu...

Line intersection with AABB Rectangle?

Preferably without using any kind of loop, as this'll be used in a game. I wish to intersect a line with a rectangle, of arbitrary size. But I also wish for the intersection point[s] to be returned. It's possible, I've done a little googling, but still have not worked it out. The line is defined using (x1,y1,x2,y2). The rectangle has ...

Lex : print line numbers

Hello, I have a source code and I would like to add line numbers. What I've done : %{ int lines=0; %} LINE \n %% {LINE} {ECHO;printf("%d", ++lines);} However, I don't know how to catch the first line. Can you help me ? ...

Why must VB.Net line continuation character be the last one on line

Why must the line continuation character (_) be the last one on the line? Is there a technical reason for this or is this a usual Microsoft "feature"? In other basic dialects you can add a comment after it, but not in VB.net, so I'm curious as to why Microsoft decided to not allow comments on these lines. ...

Lex : line with one character but spaces

Hello, I have sentences like : " a" "a " " a " I would like to catch all this examples (with lex), but I don't how to say the beginning of the line ...

Masking the password field in java

I am developing a Java command line application and I need to display an asterisk (*), or any similar sign, when the user inputs the password. I have tried using the replace() method but it accepts only one character. Is there a way to pass all the letters and numbers as an argument for this replace method. Or else what is the method of ...