I need help. I was compiling a code editor. How to search and replace code in Delphi TBCEditor.
Search text in TBCEditor:
Editor.Search.SearchText := Edit1.Text;
This displays the search results:
Related
Android studio lint don't work for a kotlin project.
I can't find hardcoded strings.
What can be solution for this?
Do these steps it worked for me
Download Android Studio 3.2 (in preview right now)
Open find in project window (cmd + shift + F for Mac)
Check Regex checkbox(Top right corner).
Check file mask(next to Regex) and type *.kt or choose kt from the
drop down.
Type this regex = \"\w+\" you can see the results now.
Search with this regex =\"\w+\" in case code is not formatted
properly.
Use Edit/Find/"Find in Path" (shortcut is Cmd+Shift+F on Mac).
Then select the check on "Regex?" at the top of the "Find in Path" window and type \"*\" in the search input.
Then choose to search in Directory and then select the directory with kotlin files. Search separately in /activities and in /fragments (and any other directory where you might have kotlin code).
(To search for raw strings use \"\"\"*\".)
Screenshot of "Find in Path" search for strings example
I'm not sure if this is a 100% reliable solution but it worked for me. "Analyse -> Run inspection By Name" then type "Hardcoded strings" does not work for me.
I suggest using Detekt for static analysis in Kotlin, specifically the string literal duplication.
Ah, well actually there's an update.
Kotlin IDE does understand org.jetbrains.annotations.PropertyKey 11, but it does not always work.
I have had problems if the bundle contains more than one language.
Example:
fun message(#PropertyKey(resourceBundle = "Messages") id: String) =
ResourceBundle.getBundle("Messages").getString(sid) ?: "###$id###"
For more visit:https://developer.android.com/studio/write/lint#src
The code was designed by someone. While testing I'm getting error in the code
IntnumbOfchild = Run("ELCOMPN", STRdIM, strTest1st)
Can you tell me if its related to tm1? When do we use RUN command? I cannot find the macro of this name in the project
Run is not a procedure of the standard libraries in VBA.
Thus, select the word "Run" it with the mouse cursor, and press F2:
Take a look where the VBEditor brings you.
Try to debug there.
I'm learning vuejs. I use vim as my editor.
I want to format the template section of a vue component using html-beautify, and format the script section using standard and css with css-beautify.
I'm not sure how can I do this? Any suggestion or recommended format program?
You could visual select your desired lines using linewise visual mode V and run your beautifier on them; for example locate your cursor between <script></script> tag and type: Vit then type :(this will also insert '<,'> which means visual selected lines) then run the system command js-beautify on selected lines using ! operator:
:'<,'>!js-beautify
for css and html also select their regions and run html-beautify or css-beautify
Also check this another answer of mine on how to treat each section separately: change-the-filetype-based-on-tags-regions-in-the-file
I am using a Edit Control on my MFC VC++ project, my issue is that while I am writing on Edit Control box it takes all input text in a single row. [Enter] key is not working while I am writing on it. If I paste some lines then it will show in original format means newline works here. Plz somebody help me.. !! thanks
Use ES_WANTRETURN edit box style: http://msdn.microsoft.com/en-us/library/6e36b89f%28v=vs.90%29.aspx
You can set this style in the resource editor, or in dwStyle parameter of CEdit::Create method, if edit control is created in the code.
It is possible, but I don't know how is it done.
Use the Windows Charmap.exe applet. In the Font combobox select a font that has a lot of glyphs, Arial Unicode MS is a very good choice. Tick the Advanced view checkbox and type "super" in the Search box. The grid will show all superscript glyphs, select and copy from that and paste into your source code.
Or copy/paste one of these: ¹²³⁴⁵⁶⁷⁸⁹⁰
Subscript characters: ₀₁₂₃₄₅₆₇₈₉
Adding more details to complement #HansPassant's answer. Other frequently used sets which can be used as is by copy/paste:
Superscript small case letters: ᵃᵇᶜᵈᵉᶠᵍʰⁱʲᵏˡᵐⁿᵒᵖʳˢᵗᵘᵛʷˣʸᶻ
Subscript small case letters: ₐ ₑ ₕ ᵢ ⱼ ₖ ₗ ₘ ₙ ₒ ₚ ᵣ ₛ ₜ ᵤ ᵥ ₓ
If you're wondering why few letters are missing in above series then please read below posts:
Where are the other letters in this Unicode block?
Why does the unicode Superscripts and Subscripts block not contain simple sequences of all letters?
Why is there no character for "superscript q" in Unicode?
Since there is a tag visual-studio-2012, I assume you are running Windows. There is a great opensource program called WinCompose, which allows to use easy-to-remember and intuitive shortcuts for a huge amount of Unicode symbols, including numerical super- and subscripts. Every shortcut is invoked via a Meta key (e.g. Right Alt), for example:
Meta + ^ + 1 gives ¹;
Meta + _ + 9 gives ₉.
WinCompose also supports search, can be run in background, and eliminates tedious procedure of calling Character Map with subsequent copy-pasting or remembering the Unicode charsets (but the latter are also listed):
P. S. I'm not affiliated with this software by any means. Just a happy user.
One more way for WPF users,
<TextBlock >
<Run>x</Run>
<Run FontSize="8" BaselineAlignment="TextTop" >2</Run>
</TextBlock>
Change BaselineAlignment to TextBottom if you want to use as subscript.
In VsCode download the extension "Fast Unicode Math Characters".
The hotkeys for ₂ is \_2.
The hotkeys for ² is \^2.
Looks like there are some simple tags that you can use to make any text superscript/subscript. The superscript tag is <sup> and the subscript tag is <sub>.
https://www.w3schools.com/tags/tag_sup.asp
use (Ctrl + Shift + P) command to apply superscript and subscript in Visual Studio.
This is how usually I tend to do it on Mac.
In the VS code, hit (Control + Command + Space) to bring up the Character selector and search for 'superscript' in the search box.
Click on required superscript and add it. And here is the result. Screenshot are from the VS code only.
This approach should work across most of the apps in the Mac. Tested in MacOS 12.5. (Monterey)
There are several solutions. Personally, I simply formaat the label text in Word, use a screen capture and save it as an image that I use with a label.