Reformat Code in Notepad++ [duplicate] - editor

This question already has answers here:
Formatting code in Notepad++
(15 answers)
Closed 6 years ago.
Is there a function (and shortcut) to reformat code in Notepad++
Like CTRL+SHIFT+F in Eclipse?

TextFX hasn't been updated for a long time. A more powerful choice is UniversalIndentGUI.

If you are working with C++ then you can use the TextFX features. Go to
TextFX->Edit->Reindent C++ code
And regarding shortcuts you can always modify your shortcuts for NPP by using
Settings->Shortcut mapper
in this case go to
Settings->Shortcut mapper->Plugin commands: #141
and modify it to CTRL + SHIFT + F.

Related

IEEEtran: spaces between words in title [duplicate]

This question already has an answer here:
Alignment problem with ieeetran website citation
(1 answer)
Closed 6 months ago.
I have this bib item and I am using IEEEtran as a bibliographystyle. I have used the default IEEEtran.bst and IEEEtran.cls. I am not sure, if I need both but I have tried all variations.
#misc{clark_2022,
title={Tiktok faces investigation into its impact on Young People's Mental Health}, url={https://www.theverge.com/2022/3/2/22958900/tiktok-state-ag-investigation-teens-kids-mental-physical-health},
journal={The Verge},
publisher={The Verge},
author={Clark, Mitchell},
year={2022},
month={Mar}
}
The reference now looks like this:
What is causing it and how do I change it? Is this part of IEEEtran?
I had a similar issue with IEEEtran, and adding the xurl package seemed to completely fix it.

how to make 2 step back? ..\..\ ExtractFilePath (paramstr(0)) [duplicate]

This question already has answers here:
How to get path to the parent folder of a certain directory?
(3 answers)
Closed 6 years ago.
Hi Guys ,I need help!
When I extract file path with ExtractFilePath (paramstr(0))
I'm getting this: C:\Users\Admin\Documents\Embarcadero\Studio\Projects\example13.02\Win32\Debug
but I need to go 2 step back. C:\Users\Admin\Documents\Embarcadero\Studio\Projects\example13.02\
I don't know, How?
ExtractFilePath (paramstr(0)) how to make 2 step back ....\
I tried (ExtractFilePath (paramstr(0))+'....\')
result:
C:\Users\Admin\Documents\Embarcadero\Studio\Projects\example13.02\Win32\D‌​ebug\..\..\
ExtractFileDir(ExtractFileDir(ExtractFileDir(ParamStr(0))))

Notepad++: block comment not working

I am running Notepad++ 5.8.5 on Windows 7, editing Perl programs.
I would like to comment out a block of text lines (and later, perhaps, uncomment it).
None of the following works:
CTRL+K, CTRL+Q, CTRL+shift+K, CTRL+shift+Q,
selecting the block of lines and going to the menu: edit-> Comment/Uncomment -> Block Comment
none of the above has any effect.
What to do?
Is NP++ interpreting your file as Perl or plain text?
If NP++ is treating your file as plain text, then language specific things like that won't work.
You may want to double-check that as described here.
Why not try updating to a newer version? That's horribly out of date (a year old).
Define your own language to match to the file extension, in your case it is: txt
and then define any comment style you want. Then close and open NP++ again. Enjoy!
Path: Language--->Define your Language --> Comments & Number tab
Hank Wei

Example on using getopt.pas

Could someone provide a simple example using getopt.pas with short and long command line switches use case?
Getopt.pas is a delphi unit for parsing command line switches.
I've found more than one version of it.
from fpc http://www.koders.com/delphi/fid428067C2ABEF87A674F64BF48FD6E2278E322A18.aspx
The following is another SO question regarding this subject but no example is given; beside it this links to a source that alike the previous links is not self-contained
Is there an implementation of "getopt" for Delphi?
Here is a demo of the GPC code that you link to: getoptdemo.pas [koders.com]

OpenCV function list [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 months ago.
Improve this question
I was wondering if there is some sort of resource where I can find all the functions present in OpenCV and their declarations; without much theory of any sort. The problem with the OpenCV guide is that there is too much theory that is involved, and I wish to have a reference that can help me, find the function as and when I want them, something like a function index? I could try the header cpp files or something. I was wondering if there is some sort of online resource already present to that end?
I would highly recommend the C++ interface if you are using OpenCV 2.0, as opposed to the C documentation presented in the other answer.
Have you seen this OpenCV index? (appears broken now)
Updated: w/ different link to docs:
I recommend OpenCV C(or C++) reference. The latest version is OpenCV 2.2. You should check it carefully if you come from former versions as this version includes many new features as such as Android app. Moreover, the header files, functions and .lib file are re-organized in a more specific way.
The following post is exclusively for Python users.
1. Listing all OpenCV functions
To get the entire list of OpenCV's functions use dir(cv2):
import cv2
# all cv2 functions in a list
functions_list = dir(cv2)
# display first 20 functions
functions_list[:20]
>>>['', 'ACCESS_FAST', 'ACCESS_MASK', 'ACCESS_READ', 'ACCESS_RW', 'ACCESS_WRITE', 'ADAPTIVE_THRESH_GAUSSIAN_C', 'ADAPTIVE_THRESH_MEAN_C', 'AGAST_FEATURE_DETECTOR_AGAST_5_8', 'AGAST_FEATURE_DETECTOR_AGAST_7_12D', 'AGAST_FEATURE_DETECTOR_AGAST_7_12S', 'AGAST_FEATURE_DETECTOR_NONMAX_SUPPRESSION', 'AGAST_FEATURE_DETECTOR_OAST_9_16', 'AGAST_FEATURE_DETECTOR_THRESHOLD', 'AKAZE', 'AKAZE_DESCRIPTOR_KAZE', 'AKAZE_DESCRIPTOR_KAZE_UPRIGHT', 'AKAZE_DESCRIPTOR_MLDB', 'AKAZE_DESCRIPTOR_MLDB_UPRIGHT', 'AKAZE_create']
2. Searching for a particular function in OpenCV
What if you want to look up for a function but don't remember it clearly? Or you can only recall the function partially?
For instance, there are many functions to smooth an image, but you are unable to recall which one you want specifically. Using the following, you can get a list of all the functions available in cv2 with the a keyword.
In the following scenario we are searching for functions containing the word blur:
def search_function(name):
match_list = []
for function in dir(cv2):
if name in str.lower(function):
match_list.append(function)
return match_list
search_function('blur')
The above returns the following list:
['GaussianBlur', 'blur', 'medianBlur']
Now just append cv2. before the function of your choice and proceed.
The top two are actually referring to the OLD OpenCV (2.0) documentation. The new documentation is hosted somewhere else, here: http://opencv.itseez.com/index.html . At itseez. Its the current version >2.4. Previous answers are outdated.
Latest updates can be found through:
http://opencv.org/
From there, the documentation meta-site:
http://docs.opencv.org/

Resources