Counting up within text program? - text

I am editing app code to increase floors in tiny tower.
My dilemma is I need to have a large amount of text with a single number increasing by one after some constant text repeating over and over.
Sorry, I'm not good at describing what I need so I'll show y'all an example of what I need.
[Fs]**X**[Fs][Ff]58[Ff][Fl]1[Fl][Fod]0[Fod][Fsbt]1[Fsbt][Fsi]-1[Fsi][Fst]-1[Fst][Fstk]0,0,0[Fstk][Flst]0,0,0[Flst][Fn][Fn]|
I need this line of text repeating over and over again with the exception of the bolded X increasing by 1 every time the text repeats.
Such as
[Fs]**1**[Fs][Ff]58[Ff][Fl]1[Fl][Fod]0[Fod][Fsbt]1[Fsbt][Fsi]-1[Fsi][Fst]-1[Fst][Fstk]0,0,0[Fstk][Flst]0,0,0[Flst][Fn][Fn]|[Fs]**2**[Fs][Ff]58[Ff][Fl]1[Fl][Fod]0[Fod][Fsbt]1[Fsbt][Fsi]-1[Fsi][Fst]-1[Fst][Fstk]0,0,0[Fstk][Flst]0,0,0[Flst][Fn][Fn]|[Fs]**3**[Fs][Ff]58[Ff][Fl]1[Fl][Fod]0[Fod][Fsbt]1[Fsbt][Fsi]-1[Fsi][Fst]-1[Fst][Fstk]0,0,0[Fstk][Flst]0,0,0[Flst][Fn][Fn]|[Fs]**4**[Fs][Ff]58[Ff][Fl]1[Fl][Fod]0[Fod][Fsbt]1[Fsbt][Fsi]-1[Fsi][Fst]-1[Fst][Fstk]0,0,0[Fstk][Flst]0,0,0[Flst][Fn][Fn]| ETC...
I have manually written this code out to 5000 lines and I can't take it anymore. I don't know how many I need but if someone could give me either straight up the text that I need or some way for me to do it myself that would be amazing.
I need it to count up to at least 10k and id say 100k at the max.
Thanks for your help and please ask any questions if you need them answered to further help me.

In bash you could do
printf '[Fs]%s[Fs][Ff]58[Ff][Fl]1[Fl][Fod]0[Fod][Fsbt]1[Fsbt][Fsi]-1[Fsi][Fst]-1[Fst][Fstk]0,0,0[Fstk][Flst]0,0,0[Flst][Fn][Fn]|\n' {1..100000} > /path/to/the/outputfile
To create a file outputfile with the first 100k lines.
On Linux or Mac open a terminal (on Windows you can use WSL, gitbash, or cygwin), type bash, press enter, type the command from above, press enter again.

Related

Sublime text multiple cursors?

Sublime Text is so damn advanced and this seems like such a stupid question, but...
I started writing a for loop in PHP (using SFTP), loved that it gave me a choice to auto-generate the loop. However, it enters this weird multi-cursor mode, which
1)I am not really sure how to use/exit without using the mouse;
2) it seems useless, seeing as all 3 type the same thing, even though I need to change, for example, the $i > x or $i = x.
Although Sublime does indeed support the idea of multiple cursors (which is an incredible time saver and useful as all get out, as we're about to see), what you're actually asking about here is a snippet which in this case happens to also include multiple cursors.
The general idea is that for code that you're likely to type many times (e.g. a for loop), you can create a snippet that will generate the bulk of the text for you in one shot, and then allow you to easily customize it as needed. In this case, the snippet in question is part of the default functionality of Sublime and is provided by the shipped PHP package.
To answer point #2 in your question first, this is far from useless. As seen here, I enter the text for and then press Tab to expand the snippet out. The first thing to notice here is that the status line says Field 1 of 4 to tell me that I'm in a snippet and that it contains four fields.
The first field is the name of the control variable for the loop, and all of them are selected so that as I change the name, all of them change at the same time because when there are multiple cursors, the text you type appears at all of them at the same time.
Once I'm done changing the name of the variable, I press Tab again to go to the next field, which allows me to easily change the point at which the loop starts. Another press of Tab takes me to the third field, where I can specify where the loop ends.
One last press of Tab exits the snippet and selects the text in the loop, so I can start writing my code (caveat: I am not a PHP developer).
At this point you can see Sublime offering another snippet for echo, which would expand out to an echo statement complete with quotes, then allow me to edit the text in the echo and skip to the end.
Circling back around to the first point in your question, you can use Esc at any point to jump out of a snippet and go back to regular editing. You can also use Tab or Shift+Tab to move through the fields in the snippet, and pressing Tab at the last field in the snippet exits it as well.
In this particular case, the first field in the snippet sets up multiple cursors, and so exiting the snippet while this field is active leaves multiple cursors in effect. You can jump back to a single cursor by pressing Esc one more time (this is true regardless of how you ended up with multiple cursors).

Soft lines after html elements and a specific letter showing wrongly in Linux

The previous week I moved my local server with my site from a computer with Windows to another one with Linux.Thats when i noticed that there are some weird soft lines after elements and the letter "Λ" (which is greek) showing like its damaged.Its important to mention that if i zoom out the letter is displayed correctly.Also i visited my site from a PC with windows and everything seems fine. I hope that these photos will help you understand better the problem.
Soft Lines + Letter Problem
Soft Lines + Zoom Out
I have read somewhere (don't remember much where exactly) that many problems of the sort are caused by the encoding.
So you might want to ensure that your characters are UTF-8.
Have a look at this article
Hope it helps

Can't find “referenced string” in OllyDBG

So I am trying to reverse a program and crack it but I am not able to find any of the Strings through searching for "referenced Strings" or "binary Strings", I am new to OllyDBG and I don't know a lot about it, which is why this is driving me crazy. I'd like to know how or where I can find the Strings then or if there is another method of finding a given Assembly Line where I could start.
Thank you already :)
Edit: If you need any more information, just ask and I'll deliver it.
Already asked in ReverseEngineering Stackexchange but it seems like nobody there knows or has the time to answer.
searching for All referenced strings only show you some function that push address of string but it cant find the address when calculate the address before.
here is a good idea:
press Alt + M and press Ctrl + B and search. it will find any string.
and then select the memory and use memory break-point for selected memory.
In OllyDBG it is not egal where you do the search. If you search in memory dum window, it will search in only one page. But if you search on memory pages window, it will run through all the pages looking for your string. Also, try searching for utf16 chars.
If you are in the right module Alt+E where the strings should be and you still could not find, the program could have hid it as an anti debugging measure, you may try to track it down by setting breakpoints on Symbolic Names Ctrol+N(which may be hid too) or try using the button method (which is very bad)

Finding 2 numerical strings on same line

I am new to Notepad++ and have ben researching how to do this, but it seems each answer I try to mimic doesn't work correctly.
Here is the scenario:
I have 2 text files, each with ATM transactions such as time of transaction (In military time, such as 18:09) and transaction amount (Displayed as 43.00)
I need to find a way to search the document so that it only returns matches where both the time and amount are there, and on the same line of the document.
Example would be, I need to find on this huge text file where both 43.00 and 18:09 appear on the same line, allowing my to verify the transaction was valid.
Any ideas on how to do this? I am using the latest Notepad++6.8 and have downloaded the compare plugin.
Thank you and I will begin researching how the coding works in notepad++ in the meantime, as I am not an experienced programmer (Just had 1 college course in C++ which I loved but eh)
Cheers!
Ctrl-F, Select "Regular expression" as Search mode and then write:
8:09.*43.00
Ctrl F, search for 43.00 or 18:09.

Fortran77 automatically determine how many lines of text are at the top of a data file

An (old) instrument of mine is generating ASCII data files with text descriptions at the top of the file, before the data. But the number of lines of descriptive text varies from run to run. How can I get Fortran77 to determine this automatically?
Here is an example data file, below the line.
Line of explanatory text.
Notice the possible blank lines.
More text.
The number of lines is NOT the same every time.
1.0, 2.0
2.0, 4.0
3.0, 6.0
4.0, 8.0
[I found the answer myself. Posting here to help others. It is quite annoying having to wait 8 hours to answer my own question, but I understand why the rule exists. Stupid posers!]
A crude but effective solution, if your text never starts with a number (which is my case):
Assume the input file is named Data.dat.
integer NumTextLines
real X
open(8,"Data.dat")
NumTextLines=-1
50 NumTextLines=NumTextLines+1
read(8,*,err=50) X
close(8)
open(8,"Data.dat")
Every time the program tries to read a word from a text line into the real variable X, the read statement errors and program control goes back to line 50. If the read statement is successful, then you don't want to increment NumTextLines any more. Close the file and re-open it to start over from the beginning. But now you know NumTextLines. So you can read the text one line at a time, and either save it or skip it.
{Above method works on most of my files, but not all. Another way is to read each line into a character*500 variable (say, A), then test the ASCII value of the first element of the character array. But that gets complicated.}

Resources