How to alter WebStorm smart completion templates - resharper

When I add a Class into a Typescript Application, WebStorms Smart Code Completion finds the reference and creates an import reference automatically.
This is great, but the format is different to the TSLinter, I was wondering if there is a way of altering the generated code so that it will use single quotes instead of double quotes

Thank you #LazyOne, I altered this setting and now single quotes are used. It may be a little bit to much as it will effect all TypeScript string insertions, but I will try this for now.

Related

VSCode changes ' to " on save (autoSave)

-Edited-
First of all - thanks for the answers.
settings->quote indeed looks like
the right direction.
That being said.. I understand that there is no reality in which I get to keep BOTH my single, AND double quotes,
and just turn off ONLY the quote thing checker/fixer style.
-Original-
My VSCode changes the ['] char to ["] automatically every time it saves.
I have the autosave feature (out of focus, etc.) turned on.
So.. at this point, writing NodeJS is becoming insufferable.
Tried looking through my extensions, settings, and even deleted all the unused and old ones.
Nothing.
I'm down to these 5, and can't seem to find the answer (Of course, "Prettier" was the first thing I checked. so if it's there, I either didn't get it, or missed it.)
In the settings of VS Code, just search for javascript.preferences.quoteStyle to get the exact result. But this is the setting you need to change in order to tell Prettier that you want single quotes instead of double quotes.
You can tell prettier that you prefer single quotes by having a config file (for example, a .prettierrc at the root of your project that has singleQuote set to true. The default is false.
{
"singleQuote": true
}

String problem when executing a VBScript from within a batch file

I have a batch that I am running at the end of an installer process so that the end-users have as minimal an input as possible.
Everything with the .exe and the batch file are functioning grand. I have got a generic VBScript that performs the function of finding a string and replacing it. I have tested it on a simple string in the batch file and it works fine as below to activate the VBScript and make it perform the find and replacement.
Find_And_Replace.vbs "46233.xml" "DuchessLoco_1" "DuchessLoco_10"
The problem comes that I want the strings to Find and Replace to be far more detailed and it cannot read the characters that I'm typing in to the quotation marks.
I gather this may be because the batch itself understands certain characters that need escaping and then the VBScript will require other ones escaping in a different way. This is where my understanding is letting me down - but I am loathe to make the vbs file more bespoke as it being generic suits the fact I will have multiple different uses for it with multiple different installers over time. Below is an example of the string that I want to Find and modify. The VBScript is executing but not finding hence replacing the string likely due to my errors.
c:"deltaString">DuchessLoco_1</Name>
I have put this in my code as:
"c:\"deltaString\">DuchessLoco_1</Name>"
and this is the string that is failing to be found by the VBScript- I shall later need to move on to using more complex characters such as Tab and New line, so if it isn't possible via this method I will have to rethink my approach to the problem.

Printing literal ' in React Native text object

I want to print:
Hi, let's do this:
the issue is, it won't work with the "let's" due to the apostrophe. If I use quotes around this (""), it prints the quotes as well in the view, which I don't want.
How do I do this in React Native?
Try this
<Text>{"Let's"}</Text>
Try <Text>{"Hi, let's do this"}</Text>.
Any time you encounter any difficulty using a Text label, just remember that inside the brackets the rules of JavaScript apply, and so you can do anything in the same way that you would for a JS string.
A temporary work around is to use ' instead of '

how to input multiline statements into arangosh?

as far as I know the only way to register aqlfunctions is via arangosh. JS functions very fastly get a few more lines of code which normally also have line breaks for better understanding. Whenever I paste them into the arangosh it gets corrupt as it excepts to get a "proper" end signal/sign. If I don't know it , the only way to reset it is a shotdown. My questions are:
Is there any shortcut like which resets the line input in such a case?
How can I write JS code into several lines and paste them into the arangosh directly?
Is there another way to register (more complex) JS functions I don't know?
Thanks for your help in advance.
<STRG> + D also works in windows.
Multiline doesn't work well with the CMD, it works partly with the cygwin shell window.
However, if the context shows that a function will start (using a brace) it will offer to add another line until the brace closes.
Probably the easiest way to get in more complex code is:
require("internal").load("c:\\tmp\\test.js")
which will be executed right away, so if you define functions in that, they will be usable in the shell context from then on.

How do I put strings into stringtables in MFC?

I'm trying to localize a large MFC project where all the strings are hard-coded into the source code. (It was the easiest thing to do at the time, back before we had any idea we'd expand into other markets.) I've looked at localization tools, and invariably they say to put all the strings into the .rc file first, or just assume it has been done. Of the ones I've checked, appTranslator is the only one that even hints it may be a problem, and provides a couple of convenience functions to cut down on the wordiness of the resulting source code.
Does anybody have a better idea than going through hundreds of files manually, and making the occasional mistake along the way?
Is there some sort of product out there to help?
Does anybody have experience with doing this?
It is a tedious process to be sure. I participated in an effort like this many years ago. We did it manually. You can probably write some common code that makes the loading, checking, etc all pretty clean with minimal bloat.
I don't know of any products that will do it for you.
CStrings might be your friend - using the LoadString() member.
I would either derive from CString or write some other code that encapsulates default values (their current hard-coded values probably) and other error conditions and then use that in place of the hard-coded strings.
If you prefer not to use CString, then deriving from std::string and using the global LoadString() works fine too.
as for tools:
not sure they will work for your case:
http://www.modelmakertools.com/articles/hard-coded-strings.html
apparently this tool can find all the strings in your exe files:
http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx
Then you can search for them and replace.
I think writing a tool would be fairly straightforward - look for " character and then create an entry in an rc file that corresponds to the .cpp or .h file it came from. You will have a lot of culling to do, but it is a start. You can do a replace of the text, or insert comments, etc. You can use the line number and file name for the resource id/name in a #include.
I know it's too late but just for the search engine.
There is a feature of CString to initialize it from a resource ID.
CString((LPCTSTR)IDS_RESOURCE_ID)

Resources