line

Question about Java File Reader.

Hello. I'm having some problems with the FileReader class. How do I specify an offset in the lines it goes through, and how do I tell it when to stop? Let's say I want it to go through each line in a .txt file, but only lines 100-200 and then stop? How would I do this? Right now I'm using ReadLine() but I don't think there's a way to s...

How to edit the first line in a text file in c++?

I have a text file looks like this : 100 50 20 90 4.07498 0.074984 37.1704 28.1704 20.3999 14.3999 48.627 35.627 .... I need to edit this file so that everything is kept the same except the first line, 3rd item. The ouput should look like this: 100 50 19 90 4.07498 0.074984 37.1704 28.1704 20.3999 14.3999 48.627 35.627 .... How can...

Ruby (Gruff) Draw a line

I have two arrays: x = x coordinates and y = y coordinates. I want to use gruff library in ruby to create a line based on the x and y coordinates. How can I do that? ...

Problem with empty line in FlowDocument with Figure in WPF

I put this content as Document in FlowDocumentReader. FlowDocument flDoc = new FlowDocument(); flDoc.ColumnGap = 10; flDoc.ColumnWidth = 130; flDoc.TextAlignment = TextAlignment.Justify; flDoc.IsOptimalParagraphEnabled = true; flDoc.IsHyphenationEnabled = true; flDoc.IsColumnWidthFlexible = true; Paragraph par = new Paragraph(); par....

Javascript draw dynamic line

Hello, I'm looking for Javascript code for letting the user draw a line (on an image). Just as the line tool in Photoshop (for example): The user clicks on the image, drags the mouse (while the line between the start point and the mouse point is dynamically drawn on mouse drag). I would also need a callable function to send the page ...

Overwriting lines in file in C

Hi, I'm doing a project on filesystems on a university operating systems course, my C program should simulate a simple filesystem in a human-readable file, so the file should be based on lines, a line will be a "sector". I've learned, that lines must be of the same length to be overwritten, so I'll pad them with ascii zeroes till the en...

Notepad++ -like line-selecting in textarea with jquery?

Hey Is is possible to trigger a link to select a single line inside textarea. If it is, how? Martti Laine ...

Draw a line in crystal report

I want to draw a line in Crystal report. I can do that from a sub-menu but this line I need to draw in a Group section Field object with a background color property set to some color. So whenever I draw a line it gets overlapped by this FieldObject. How can I make sure that line would be visible over the background color of object? ...

AS3 change lineStyle of existing line

Hi all im drawing a line from 0,0 to 100,100 im using this to modify the linestyle: draw_line.graphics.lineStyle(1, 0xFF0000); That line is now of 1 thickness. Is there anyway i can change the thickness of the line to say 10, but without redrawing the line? ...

Search and get a line in Python

Is there a way to search, from a string, a line containing another string and retrieve the entire line? For example: string = qwertyuiop asdfghjkl zxcvbnm token qwerty asdfghjklñ retrieve_line("token") = "token qwerty" ...

How to show number of a line in a RichTextBox C#

I am making a simple text and script editor with code highlighting. For that I use a RichTextBox. But I don't know how to make it show the lines' numbers on the left side, like in VS or Notepad++. Is there any solution? ...

How can I put a horizontal line between vertically ordered elements?

I have a set of vertically ordered elements. They are displayed with the following code: JPanel myPanel = new JPanel(); myPanel.setLayout(new BoxLayout(myPanel, BoxLayout.Y_AXIS)); JButton button = new JButton("My Button"); JLabel label = new JLabel("My label!!!!!!!!!!!"); myPanel.add(button); myPanel.add(label); I would like to put a...

How to extract a couple marked strings from a line (python)

My Friends, I spent quite some time on this one... but cannot yet figure out a better way to do it. I am coding in python, by the way. So, here is a line of text in a file I am working with, for example: ">ref|ZP_01631227.1| 3-dehydroquinate synthase [Nodularia spumigena CCY9414]..." How can I extract the two strings "ZP_01631227.1" ...

read a line in java

i want the easiest way to read a line in java. after that i want to tokenize it. ...

PHP text formating: Detecting several symbols in a row

I have a kind of strange thing that I really nead for my text formating. Don't ask me please why I did this strange thing! ;-) So, my PHP script replaces all line foldings "\n" with one of the speacial symbol like "|". When I insert text data to database, the PHP script replaces all line foldings with the symbol "|" and when the script ...

PHP: Ajax ignores line foldings in the text

I don't understand why my AJAX script ignores all line foldings. I first type text to the textarea and then put onclick to send button. Here is my AJAX realization: // creating ajax object // ==================== function createRequestObject(){ try { return new XMLHttpRequest() } catch(e) { try { return new ActiveXObject('Msxml2.XMLHTT...

How to save memory when reading a file in Php ?

I have a 200kb file, what I use in multiple pages, but on each page I need only 1-2 lines of that file so how I can read only these lines what I need if I know the line number? For example if I need only the 10th line, I don`t want to load in memory all the lines, just the 10th line. Sorry for my bad english! ...

How come drawing this line at (0,0) doesn't really draw it at (0,0)?

Update: Once and for all, how can I draw a line that goes from (0,0) to the opposite corner of the stage? Here is what I have: package { import flash.display.Sprite; import flash.display.LineScaleMode; import flash.display.CapsStyle; import flash.display.JointStyle; import flash.display.Shape; import flash.ev...

How do you draw a line from one corner of the stage to the other?

I am completely perplexed. I asked this question and it (any mentioned solution) doesn't seem to be working at all. All I want is to draw a line from one corner to the other. Here again is the link to the SWF file I have (it's embedded in an HTML document): test.html Here is the source: package { import flash.display.Sprite; ...

SSRS VS05 - Create a Scale break in a Line chart

Is there a way to add a Scale Break in Visual Studio 2005 for an SSRS line chart report? The reason is because I have some data like the following: Vendor Date Amount ------ ---- ------ Test 1/1 0.0093 Test 1/2 0.0072 Test1 1/1 0.0033 Test1 1/2 -0.0450 Volume 1/1 343203 Volume 1/2 493902 I'm...