I use Insomnia as a REST client. But it started to not show Cyrillic words properly. Below you can see how it shows them:
English words are ok. It used to work with Cyrillic words perfectly. I don't know what went wrong since. May be I changed some of the settings. So, how to solve this problem?
This was a bug in 6.0.1 and a fix will be included in the next release. https://github.com/getinsomnia/insomnia/issues/1088
Related
I have no idea what on earth has happened to my VSCode. I am unable to trace which or exactly what extension caused this. But, the C++ syntax coloring and theme looks absolutely ugly.
I want this,
How can I get that back? I am unable to figure this out. I uninstalled all C/C++ extensions and still the issue remains.
VSCode colorizes brackets and parentheses to make it easier to see which opening bracket belongs to which closing bracket.
You can turn it off in the settings:
I have inherited a project that includes html email templates and the text files that get sent along with it.
The back-end puts it all together, so that it's a multipart email message in the end. In other words, if someone has HTML turned off, they can read the text version. TMI.
Problem:
The guy before me left all kinds of $!esc.html($!{XYZ}) in the text files. Where XYZ stands for various different strings in the code.
I haven't touched RegEx in years and am at a loss.
Question
Is it possible to look for every occurrence of such variables in the text files and replace it with: $!{LAST_NAME}?
Can someone point me in the right direction? I have tried one of those RegEx recipe sites, but I got stuck. Any suggestions and/or help with this would be tremendously appreciated.
I am using SublimeText3, and I know how to find & replace in .txt files only.
Peace. Calm. Light.
Not sure what 'flavor' of regex sublime uses, but this should work. I'm assuming the XYZ means it will only be letters in there?
\$!esc\.html\(\$!\{\w*\}\)
The following version accounts for any _'s
\$!esc\.html\(\$!\{(\w|_)*\}\)
For example, I have the following lines:
//sys.log(siteNameToPrepare);
//sys.log(siteNameToPrepare);
// sys.log("downloadFolder: "+downloadFolder);
// lorem ipsum ...
arbitrary codes here...
var a = _POST;
sys.log("groupManagementHandler.jhp _POST is not object");
sys.log("groupManagementHandler.jhp _POST is not object");
I only want to match sys.log(xxx) that is not commented out.
I tried to use the following regex:
[^/ ]sys.log
on the search bar (Ctrl+Shift+F), with Regex ON, to find the uncommented sys.log within files of a folder.
It matches uncommented lines in several files, however, I missed some lines that has couple of whitespaces in front of sys.log.
My question is how to match those lines? What am I missing here?
Seems like I couldn't find the answer in Google and Stackoverflow, I found this one, but this one is for Visual Studio, not Visual Studio Code.
Visual Studio Search Uncommented Code
Here's the error message I got by using the look ahead pattern:
Thanks to #Wiktor Stribiżew, now I can confirm that the regex lookahead pattern for searching within files works in older Visual Studio Code (V1.2.0) but not works in Version 1.17.1.
So this question may somehow can be seen as a duplicated question due to the bug of newer version VS code, that led me to post this question.
For someone who wants to know the answer right away, here it is as suggested by #Mark at the comment section of my question:
First open the "search in files" field using Ctrl+Shift+F
Turn on the Regex function (right-most button of the input field)
Put the following regex:
^\s*sys.log
or this regex also works
^[^/\n](?:/[^/\n]+)*sys.log
The above regex-es work for my case.
Before I got this answer, we had a discussion with #Tim and #Wiktor, they both suggested a lookahead regex pattern, and that pattern actually works on older version (V.1.2.0) of Visual Studio Code as #Wiktor pointed out. But apparently,
the advanced Regex feature for searching in files is no longer supported since V1.12.0 version. However, it's still working if you search within the file using Ctrl+F.
Thanks to #Tim, #Wiktor and #Mark who have helped to clarify things out.
I'm trying to use a .ini file as a configuration file, and to do so I'm using regex.
What I currently do is a getline of my file and for each line I get, I'm trying to determine if it is corresponding to a scope or not with the following regex : "^\[[a-zA-Z0-9]+\]$"
This regex works well according to https://regex101.com/ and Unix, but crash on my windows application (yes I try to make this app cross-platform)
So I'm wondering what is going wrong here, and why does this regex make the program crash, and how to solve this problem...
Thank everybody !
You've missed the quoting of the outer brackets. Try
^\[[a-zA-Z0-9]+\]$
or simpler
^\[\w+\]$
And don't forget to escape the \s in the c++ string ;)
See it here at regex101.
I'm working on a twitter sentiment analysis tool in C++. So far I get the tweets from Twitter and I process them a bit ( lowercase, remove RT, remove # and URLs).
The next step is to remove emoticons and all those special characters. How does one do that? before you jump me, I already looked at other similar questions but none of them deals with C++. Mostly R,Python and PHP.
I was thinking to use regex however I can't get it to work. I tried it with removal of hashtags and URLs and I gave up. I ended up using normal string:find and find_first_of.
Is there any library or method available to get rid of those emoticons and special stuff ?
Thanks
I would recommend using regular expressions for this. Now you have two options, you can either extract only the characters you are interested in (if you are working with English tweets this would probably be A-Z,a-z, numbers and maybe some symbols, depending on your needs), or you can select invalid characters (emoticons) and replace them with an empty string.
I only have experience with Qt's RegularExpression engine, but the c++ standard library has regex support (although I'm not sure how good it is with Unicode), but the ICU provides a regex library too.
*I'd provide more links but I don't have enough reputation yet :/