Questions tagged [long-lines]

26 questions
1
vote
2 answers

Powershell break a file up on character count

I have a binary file that I need to process, but it contains no line breaks in it. The data is arranged, within the file, into 104 character blocks and then divided into its various fields by character count alone (no delimiting characters). I'd…
yaquaholic
  • 152
  • 1
  • 11
1
vote
2 answers

Break up long for statement

I can't find an answer within the PEP 8 style guide. Is there a possibility to break up a long for statement by using round brackets instead of a backslash? The following will result in a syntax error: for (one, two, three, four, five in …
mutetella
  • 192
  • 1
  • 8
1
vote
1 answer

How to gracefully break up a long string

Look, I have seen many of the answers provided on this site that deal with aspects of my question. The [aforementioned] answers usually provide already existing examples that are too basic to be helpful--at least for me. But hey, maybe I'm…
philthy
  • 33
  • 7
0
votes
0 answers

VScodevim how to jump to a really big column position

I use vscodevim plugin in vscode. I know h for left and l for right, I need to jump to a really big column position, for example, 19001129, I typed 19001129l, it only jumped to column 99999. Is there a maximum value? How to make it bigger?
W.Perrin
  • 4,217
  • 32
  • 31
0
votes
1 answer

Breaking a long PHP **for** statement into multiple lines

In PHP for loop starts with for (init counter; test counter; increment counter) which can form quite a long line. What is the best way to break it into shorter parts? Example: for ($currentLine = fgets ($fileToAnalyse); ! preg_match("^0…
mja
  • 45
  • 5
0
votes
0 answers

How can I do a line break (line continuation) in Python for lines with multiple objects/functions in it?

With PEP 8 -- Style Guide for Python Code, the maximum line length should be 79 characters. I have a line like the following object1.function1().function2().function3() or object1.object2.object3.function1() which is more than 79 characters. How…
Vinu Chandran
  • 305
  • 2
  • 10
0
votes
0 answers

How to write feature vectors for all images of a folder in a txt file for future TSNE processing

I am creating image feature vector using resnet50 in PyTorch. Each feature vector is of length 2048. When I want to write it to a txt file, I have to convert it to str which I did in the code below. Problem is, only a few numbers from the vector of…
Mona Jalal
  • 34,860
  • 64
  • 239
  • 408
0
votes
1 answer

How to deal with long lines in Python?

I have this really long line in Python, due to several reasons, that I'm trying to break up. long_variable_name = somelongmodule.SomeLongClassName.VeryLongFunctionName(... I know the recommended way to break up a line is at the parentheses, but I…
user3757652
  • 35
  • 1
  • 2
  • 6
0
votes
1 answer

Is it possible to move crusor up & down in wrapped long line in Vi?

I have this question in my head for quite a while since I started to use vi. I know that vi can wrap the long line into a nice block, but is there a fast way for us to move 'up' or 'down' in the block (so we dont have to use right/left arrow key and…
user1948847
  • 955
  • 1
  • 12
  • 27
0
votes
1 answer

How to version control text with lines that are one paragraph long?

I want to implement simple version control in my app. But to make it any useful the lines must be split somehow so users don't have to hunt for their changes. It there preferred way to do it?
0
votes
1 answer

Long length lines in Qt

I've previously read that a line length in C++ source code files are limited means longer than a size couldn't be compiled. true yes? as you know in Qt creator many lines become long because of using Qt features, forexample for writing a string…
Novin Shahroudi
  • 620
  • 8
  • 18
1
2