lines

Batch file: store lines of command's output without writing to a file?

Windows XP My batch file runs a command that has several lines of output. How can I count (and store in a variable) the lines of output without ever writing to the disk? ...

OpenGL: GL_LINE_SMOOTH not supported on all cards; wont even draw the lines, unless...

First of all, whats the purpose of this code? glHint(GL_LINE_SMOOTH_HINT, GL_NICEST); I could put there GL_DONT_CARE but it doesnt make my lines drawn, unless i use glDisable(GL_LINE_SMOOTH) So im asking if theres some built in mechanism to make it draw the lines even if the smooth lines arent supported (So it would draw them withou...

Java OpenGL line drawing with vertex buffers

Hi, I'm trying to draw many lines on the screen at the same time using OpenGL line strips and performance is slow, and it was suggested I use a vertex buffer. I'm new to vertex buffers - do I need a new one for each line I want to draw, or do I use a single buffer for all of the lines (they are not necessarily connected to each other)? A...

For each line in selected lines (vb.net)

how can I get the lines which are have selected text in them? For example: The selected lines would be 1, 2,3 and 4 (0 being the first line) How can I get to code like: For Each line as string(or integer) in textbox1."SelectedLines" 'Do something here for each line Next Thanks ...

Snap-To lines when aligning controls at Runtime

Hi All I have an app where users can drag controls around on a Form. But they re asking me for Snap-To lines to make the alignment of controls easier. I have no idea about the snep-to lines and how to implement them - I have looked at: http://msdn.microsoft.com/en-us/library/ms752100.aspx Adorner's, but it says it's only for WPF. And I...

how to keep last n number of line from log file in php

hi i want to delete all lines from old log files and keep fresh 50 lines which is at the bottom plz give me the php code do something like this and if possible can we change the orientation of these lines normal input 111111 2222222 3333333 44444444 5555555 output like 555555 4444444 3333333 22222 111111 to see the fresh log at ...

iphone sdk: Adding a subview to a tableView

Hi guys I want to add a UIToolbar on top of a tableView, but there is only one problem - the table lines can still be seen through the toolbar. I tried to set set the toolbar's alpha to 1.0 but this didn't work. This looks very odd because I only encountered it in UITableView. Any ideas? Thanks Alex EDIT: I figured out the problem. I...

Flex - ComboBox has lines around it

I'm stumbling my way through designing my first Flex app, using Flex Builder 4 Beta 2. I'm trying to use a ComboBox, but they always seem to have lines around it and I can't figure out how to get rid of them. The ComboBox looks like this: http://www.freeimagehosting.net/uploads/a1cde1d098.png All I did was drag the ComboBox from the C...

FLOT: How to make different colored points in same data series, connected by a line?

Hi all, I think I may have stumbled onto a limitation of Flot, but I'm not sure. I'm trying to represent a single data series over time. The items' "State" is represented on the Y-Axis (there are 5 of them), and time is on the X-Axis (items can change states over time). I want the graph to have points and lines connecting those points f...

Would a regex like this work for these lines of text?

Regex: String regexp = "([0-9.]{1,15})[ \t]*([0-9]{1,15})[ \t]*([0-9.]{1,15})[ \t]*(\"(.*?)\"\\s+\\((\\d{4})\\)\\s+\\{(.*?)\\})"; Text: 1000000103 50 4.5 #1 Single (2006) 2...1.2.12 8 2.7 $1,000,000 Chance of a Lifetime (1986) 11..2.2..2 8 5.0 $100 Taxi Ride (2001) ....13.311 9 7.1 $100,000 Name Th...

Animate a e.Graphics.DrawLine with arrowhead

I need to "animate" an arrow. It can go in any direction (up, down, left, right and diagonals) and the arrowhead will be at the end. It needs to appear as if it is growing from orgin to the end. To make matters more complicated it has to be in a user control so it is possible to add to the controls collection in the forms and remove it t...

[UNIX] Sort lines of massive file by number of words on line (ideally in parallel)

I am working on a community detection algorithm for analyzing social network data from Facebook. The first task, detecting all cliques in the graph, can be done efficiently in parallel, and leaves me with an output like this: 17118 17136 17392 17064 17093 17376 17118 17136 17356 17318 12345 17118 17136 17356 17283 17007 17059 17116 E...

Hidden line removal in JavaScript or Python?

I have the following task: Input: A 3D scene comprised of a set of cuboids. Could be broken down to a set of triangles. A description of a camera: position, direction, focal length. Output: 2D wire frame projection of the scene as a set of lines. Important: Hidden lines removal should have been applied. Platform: Web app running on G...

How do you indent *every* line of a <span> element?

I have the following HTML chunk: <span class='instruction_text'> Line 1<br> Line 2 </span> And the CSS declaration of instruction_text is: .instruction_text { margin-left: 70px; font-style: italic; color: #555; } The first line has a 70px margin as expected, but the next line starts with no indent. How can I make ALL of t...

Python 2.5.2: remove what found between two lines that contain two concrete strings

Hi, is there any way to remove what found between two lines that contain two concrete strings? I mean: I want to remove anything found between 'heaven' and 'hell' in a text file with this text: I'm in heaven foobar I'm in hell After executing the script/function i'm asking the text file will be empty. Regards Javi ...

Horizontal lines and PDF drawing on iPhone/iPad Quartz 2D

I'm trying to display a PDF of music using the Quartz 2D calls: CGPDFDocumentGetPage and CGPDFPageGetDrawingTransform The problem is that some horizontal lines in the PDF get drawn thicker than others. The biggest problem is that I notice this in Preview on the Mac and on iPhone/iPad. Even when viewing this PDF in the iPhone/iPad mail,...

Is there any super fast algorithm for finding LINES on picture?

So I have Image like this I want to get something like this (I hevent drawn all lines I want but I hope you can get my idea) I need some super fast algorithm for finding all straight lines on it. I want to give to algorithm parameters like min length and max line distortion. I want to get relative to picture pixel coords start and...

How to use Haar wavelet to detect LINES on an image?

So I have Image like this I want to get something like this (I hevent drawn all lines I want but I hope you can get my idea) I want to use SURF ( (Speeded Up Robust Features) is a robust image descriptor, first presented by Herbert Bay et al. in 2006 ) or something that is based on sums of 2D Haar wavelet responses and makes an e...

Is there any algorithm for finding LINES by PIXEL COLORS on picture?

So I have Image like this I want to get something like this (I hevent drawn all lines I want but I hope you can get my idea) I need algorithm for finding all straight lines on it by just reading colors of pixels. No hard math, no Haar, no Hough. Some algorithm which would be based on points colors. I want to give to algorithm para...

why does vector.size() read in one line too little?

when running the following code, the amount of lines will read on less then there actually is (if the input file is main itself, or otherwise) why is this and how can i change that fact (besides for just adding 1)? #include <fstream> #include <iostream> #include <string> #include <vector> using namespace std; int main() { // open ...