When I try to enter square brackets inside gfsh they do not always show on screen and if they are followed by digits the first two are not considered.
If I for example enter connect --locator=somehost[12345] this is shown:
It seems to help when I hit [ twice because then one [ makes it to the screen. But it remains impossible to get the closing square bracket ].
Please note that I use a German setting and thus have to press AltGr + 8 for the opening square bracket [ and AltGr + 9 for the closing square bracket ].
Other characters work, for example { and } which I also have to enter using AltGr + 7. The backslash \ that I have to enter by pressing AltGr + ß doesn't work too.
I posted this problem also on the Geode Jira.
As a workaround it works to enter those special characters using their Ascii value.
On Windows this is:
Alt + 9 + 1 for the opening square
bracket [
Alt + 9 + 2 for the
backslash \
Alt + 9 + 3 for the
closing square bracket ]
Please note that you have to use the numerical keyboard for this.
Related
I'm trying to replace newline etc kind of values using regexp_replace. But when I open the result in query result window, I can still see the new lines in the text. Even when I copy the result, I can see new line characters. See output for example, I just copied from the result.
Below is my query
select regexp_replace('abc123
/n
CHAR(10)
头疼,'||CHR(10)||'allo','[^[:alpha:][:digit:][ \t]]','') from dual;
/ I just kept for testing characters.
Output:
abc123
/n
CHAR(10)
头疼,
allo
How to remove the new lines from the text?
Expected output:
abc123 /nCHAR(10)头疼,allo
There are two mistakes in your code. One of them causes the issue you noticed.
First, in a bracket expression, in Oracle regular expressions (which follow the POSIX standard), there are no escape sequences. You probably meant \t as escape sequence for tab - within the bracket expression. (Note also that in Oracle regular expressions, there are no escape sequences like \t and \n anyway. If you must preserve tabs, it can be done, but not like that.)
Second, regardless of this, you include two character classes, [:alpha:] and [:digit:], and also [ \t] in the (negated) bracket expression. The last one is not a character class, so the [ as well as the space, the backslash and the letter t are interpreted as literal characters - they stand in for themselves. The closing bracket, on the other hand, has special meaning. The first of your two closing brackets is interpreted as the end of the bracket expression; and the second closing bracket is interpreted as being an additional, literal character that must be matched! Since there is no such literal closing bracket anywhere in the string, nothing is replaced.
To fix both mistakes, replace [ \t] with the [:blank:] character class, which consists exactly of space and tab. (And, note that [:alpha:][:digit:] can be written more compactly as [:alnum:].)
So I query that pulls text from a column called "description."
Each description contains a list like so:
1) Some text here
2) Some text here
3) Some text here
The problem is when I run the query in my zsh script the new lines return a "+" symbol instead of a carriage return.
1) Some text here + 2) Some text here + 3) Some text here...
The code is
tempdescriptionday4=$(/Applications/Postgres.app/Contents/Versions/12/bin/psql -h 1.1.1.1 -p5555 -U myuser mytable -t -c "SELECT description FROM cycle_10 WHERE air_date = 2020-11-10"
I'm trying to inject this list into an XML file for an RSS feed but I'm stuck on how to format this properly. I tried replacing the + symbol with
but that didn't work--I still am not getting a new line. Any ideas?
Found this in the postgresql12 manual — it's called:linestyle
"Sets the border line drawing style to one of ascii, old-ascii, or unicode. Unique abbreviates are allowed. (that would mean one letter is enough.) The default setting is ascii. This option only affects the aligned and wrapped output formats"
So for me since I have multiple lines in a cell it "wraps" the text at the end making it a wrapped output format.
"ascii style uses plain ASCII characters. Newlines in data are shown using a + symbol in the right-hand margin." When the wrapped format wraps data from one line to the next without a new line character, a dot"." is shown in in the right-hand margin of the first line, and again in the left-hand margin of the following line."
There's also "old-ascii" style that uses a ":" for wrapping and a "unicode" style which uses an ellipsis symbol in the right and margin of first line.
So the problem I have is that the output format is using ASCII by default when there's no available option for XML output style for new lines. Bummer.
Turning linestyle off fixes removing the + symbol but I want the outputted linestyle to be XML so if it strips any new line indication there's no way for me to format it. "-A --no-align Switches to unaligned output mode. (The default output mode is aligned.) This is equivalent to \pset format unaligned."
So I used awk to substitute the + symbol for
and also tried
but those are not creating new lines for me? It validates as proper XML.
I was using Intellij on my Dell Latitude E 7470. It's the smaller laptop without a special numeric keyboard. When you want to use asci code, you must press fn + alt + the number combination representing the asci on keys jkluiop... It was working just fine but I reinstalled Win some time ago and now when I press for example fn +alt + 123 to write curly braces, it automatically jumps to the bottom of the class declaration and creates the curly braces there and not at the spot where I'm writing them... Thanks for any kind of help.
This is how the keyboard looks
keyboard layout
Update - solution
I figured it out. The fn + fn key 1 was end, fn 2 was down and fn 3 was bound as page down. When combined with alt it was using predefined IntelliJ shortcuts I had to remove. This functionality is probably caused by the newest Bios version of Dell Latitude laptops in version 20 + ... I personally have latitude E7470 but I have read on different forums other users complaining about incorrect workings of fn key and inability to change them because the system or Bios settings for FN keys were all removed.
Is there a way in Intellij IDEA (I'm using version 13) to automatically add a space to line comments between the two slashes and the text:
If I enter :
//This is a comment
I'd like to get the following when I run a code reformat (Ctrl-Alt-L on Windows)
// This is a comment
It's for Javascript files but should be working for other file types.
If you press CTRL / or CMD / it will put // at the beginning of the line and the comment will be properly indented.
// comment with two indents
For this to work Comment at first column must be checked in Editor->CodeStyle->Javascript->Wrapping and Braces->Keep when reformatting like mentioned in another answer.
This screenshot is for Java, but it works the same for Javascript. Just choose javascript in the menu
If you want to write multiline comment you can use CTRL SHIFT / or CMD SHIFT / That way when you go into new line, you will have one space after the comment start
/*
* there is space before this*/
How do I disable adding a matching open square bracket '[' character when typing a close square bracket ']'?
I've tried various combinations of the Smart Key options, and none of them do what I want. I am able to disable automatically adding a closing bracket ']' when I type an open bracket '[', but not the other way around.
Example:
I have the following line:
if ([myObject respondsToSelector:#selector(outline)])
and my cursor is between the ')' and ']' characters. When I type ']' this is what I get:
if ([myObject respondsToSelector:[#selector(outline) ]])
I expect that the existing ']' will be overwritten by the one I type, or at least that a new '[' will not be added.
I am using AppCode 1.6.2 and the IdeaVIM plugin.
Thank you!
In the XCode preferences under the 'Text Editing' tab there is a 'Automatically balance brackets in Objective-C method calls option'. Uncheck that box.