Is there an option to set pycharm to index the lines of a function in addition to line index of the file - indexing

Is there an option to set pycharm to index the lines of a function in addition to line index of the file.
Visual ex:
The index im looking for is coloured in green

Related

CorelDRAW VBA Text Manipulation

I want to write a VBA script for CorelDRAW to assign an Object Style to various text strings within a Paragraph Frame.
Something like (psuedo code example):
- move cursor forward to next Start of Line
- select text from cursor to next Tab character
- set selected text to Object Style 1
I have not been able to find any examples or doco of using scripting to do text manipulation in CorelDRAW. I'd be happy to do it using Javascript (available in CDGS 2019) if that is easier.
The way I see this script working is that I would manually position the text cursor at the start of the paragraph frame, hit a shortcut key to invoke the script, and then repeat until all desired changes are made. Possibly add looping at a later step.
Can somebody point me in the right direction please.

how to check MS Word paragraph line spacing using vba script

how to check MS Word paragraph line spacing using vba script.
here is code where line spacing are change in paragraph(1).
we add paragraph(1) line space 2.
now how can we get it if we give same paragraph(1) and its gives us 2.
To check line spacing: Selection.ParagraphFormat.LineSpacing
Te increase line spacing Selection.ParagraphFormat.LineSpacing = .LineSpacing + 1
Te decrease line spacing Selection.ParagraphFormat.LineSpacing = .LineSpacing - 1
thanks.
Record a macro where you change the line setting and then look at the result you get.
If there is any keyword you don't understand put the cursor on it and press F1, this will bring up the MS Help page for that keyword.
To record a macro you need to have the Developer Tab enabled.

Text from excel cells to individual word files

I have an Excel file that looks like this:
A B
1 Title_1 Description_1
2 Title_2 Description_2
Is it possible to output each title and description to individual Word files with column A for file name of the Word file and column B to its content?
For example the macro would create a new Word file give it file name 'Title_1' and copy 'Description_1'. Then create a new Word file again give it file name 'Title_2' and copy 'Description_2'. And do this until all data from the Excel file is copied.
Thank you for your time. :)
What you want to look into is called a "Mail Merge". Use a search engine and look for "mail merge excel word 2007" (or whatever year of MS Office that you are working with). You can create an excel macro that creates instances of word, populates the word doc with whatever you want from your excel spreadsheet, save the word doc with any name you want, export to PDF, etc.
Here are some hints to start you off:
in the VBE go to tools references and add one for Microsoft Office.
Use these two lines of code to create an object:
Dim MyWord
Set MyWord = CreateObject("Word.Application")
Now you can precede any code for word with MyWord for example to add a Document in word would be Documents.Add so remotely from Excel it will be MyWord.Documents.Add
You will want to loop through your cells in excel. On each iteration of the loop populate two variables, one with the text you want in the file and one with the file name.
Then simply use MyWord to enter the results of the variable then save the file using the result of the other variable.
Post back if you get stuck but give it a go first.
This is easy form any operating system, assuming you are using windows you will use a batch script(easiest).
First use save as/export on the data ribbon to save as a CSV.
Second you will need a batch script to read the CSV and use the first value as the file name the second value as the contents. If you want it to be a doc or docx instead of txt just rename the file in the same loop or add it to the file name when you output to text.
Here is a similar post with all the resources you would need to slap together a quick batch script.
read csv file through windows batch file and create txt file

Excel: 2007-2013 TypeGuessRows - Character Value

I need to import an excel 2007-2013 file into MSSQL but the characters are being truncated within a column. The quick fix is to sort the rows from largest to smallest interns of character sting length.
I require a permanent solution and the following answer (see below) worked for .exe files however what will be the corresponding solution for .xlsx files.
Thanks
Chantelle
To change the value of TypeGuessRows, use these steps: 1.On the Start
menu, click Run. In the Run dialog box, type Regedt32, and then click
OK. 2.Open the following key in the Registry editor:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Jet\4.0\Engines\Excel
Note For 64-bit systems, the corresponding key is as follows:
HKLM\SOFTWARE\wow6432node\microsoft\jet\4.0\engines\excel
3.Double-click TypeGuessRows. 4.In the DWORD editor dialog box, click Decimal under Base. Type a value between 0 and 16, inclusive, for
Value data. 5.Click OK, and then exit the Registry Editor.
A second way to work around this problem (without modifying the
registry) is to make sure that rows with fields, which have data 255
characters or greater, are present in the first 8 rows of the source
data file. shareedit
answered Jan 20 '14 at 11:21
Suji 112

Deleting a line from a text file in VB08

I am working on a program with a list box that displays text from a selected text file. I have already made it to delete the item from the listbox but I don't know how to get it to delete that same line from the text file so it doesn't just display it again when you reopen the dialog. Any help? I am using streamwriter and streamreader. I can also TeamView if needed.
The easiest and in most cases best approach is to overwrite the whole file. So you you want to delete all lines that are no longer in the ListBox?
Dim resultLines = From line In IO.File.ReadAllLines(path)
Join item In lb.Items On item.ToString Equals line
Select line
IO.File.WriteAllLines(path, resultLines)
This reads all lines from the file and joins them with the not deleted items in the ListBox. The resulting lines are written back to the file.
The simplest method is to re-write the file using the contents of the listbox. You didn't specify any mapping from the text file to the listbox, so I can't give more detail.