intellij-idea

Remove an apostrophe at the beginning or at the end of a word with regex

隐身守侯 提交于 2020-12-26 23:17:11
问题 I have a list of String that contains word. Some words have apostrophe at the beginning or/and at the end like this: apple 'orange banana' joe's I want to delete only the apostrophes at the beginning and at the end of the words like this: apple orange banana joe's I have tried with the following regex but it doesn't work: myString.replaceAll("((?<=^)'|'(?=$))", ""); It does not work in IntelliJ: But it works with regex101.com: Why the regex dosen't works and how can I remove the beginning and

Remove an apostrophe at the beginning or at the end of a word with regex

爱⌒轻易说出口 提交于 2020-12-26 23:06:48
问题 I have a list of String that contains word. Some words have apostrophe at the beginning or/and at the end like this: apple 'orange banana' joe's I want to delete only the apostrophes at the beginning and at the end of the words like this: apple orange banana joe's I have tried with the following regex but it doesn't work: myString.replaceAll("((?<=^)'|'(?=$))", ""); It does not work in IntelliJ: But it works with regex101.com: Why the regex dosen't works and how can I remove the beginning and

Decoding IntelliJ IDEA folder name colors

强颜欢笑 提交于 2020-12-26 08:22:03
问题 I have project, that have 4 Git Roots: Project , Project-commons , Project-ui and Data Model . Due to certain config, I need to put Project-commons , Project-ui and Data Model into Project dir. But this resulted in IDEA highlighting Project-commons , Project-ui and Data Model as red folders. Git still works for me (as well as Maven), I didn't have any merge errors. What does that red highlight mean? Using "Synchronize" option to them helps, until I restart IDEA. I believe it has to do

Decoding IntelliJ IDEA folder name colors

寵の児 提交于 2020-12-26 08:21:45
问题 I have project, that have 4 Git Roots: Project , Project-commons , Project-ui and Data Model . Due to certain config, I need to put Project-commons , Project-ui and Data Model into Project dir. But this resulted in IDEA highlighting Project-commons , Project-ui and Data Model as red folders. Git still works for me (as well as Maven), I didn't have any merge errors. What does that red highlight mean? Using "Synchronize" option to them helps, until I restart IDEA. I believe it has to do

Error when collecting IntStream to map

生来就可爱ヽ(ⅴ<●) 提交于 2020-12-26 06:36:02
问题 The following code String[] values = ... .... Map<String, Object> map = new HashMap<>(); for (int i = 0; i < values.length; i++) { map.put("X" + i, values[i]); } is converted by IntelliJ to: Map<String, Object> map = IntStream.range(0, values.length) .collect(Collectors.toMap( i -> "X" + i, i -> values[i], (a, b) -> b)); which can be shortened to Map<String, Object> map = IntStream.range(0, values.length) .collect(Collectors.toMap( i -> "X" + i, i -> values[i])); The 2 stream versions don't

Error when collecting IntStream to map

柔情痞子 提交于 2020-12-26 06:32:06
问题 The following code String[] values = ... .... Map<String, Object> map = new HashMap<>(); for (int i = 0; i < values.length; i++) { map.put("X" + i, values[i]); } is converted by IntelliJ to: Map<String, Object> map = IntStream.range(0, values.length) .collect(Collectors.toMap( i -> "X" + i, i -> values[i], (a, b) -> b)); which can be shortened to Map<String, Object> map = IntStream.range(0, values.length) .collect(Collectors.toMap( i -> "X" + i, i -> values[i])); The 2 stream versions don't

Error when collecting IntStream to map

不问归期 提交于 2020-12-26 06:31:29
问题 The following code String[] values = ... .... Map<String, Object> map = new HashMap<>(); for (int i = 0; i < values.length; i++) { map.put("X" + i, values[i]); } is converted by IntelliJ to: Map<String, Object> map = IntStream.range(0, values.length) .collect(Collectors.toMap( i -> "X" + i, i -> values[i], (a, b) -> b)); which can be shortened to Map<String, Object> map = IntStream.range(0, values.length) .collect(Collectors.toMap( i -> "X" + i, i -> values[i])); The 2 stream versions don't

Spring Boot + IntelliJ + Embedded Database = Headache

让人想犯罪 __ 提交于 2020-12-24 07:14:34
问题 Either I'm missing some core concept buried deep within some documentation (Spring, Spring Boot, H2, HSQLDB, Derby, IntelliJ) or I've been staring at this for too long. I have a Spring Boot project going. Tried using and initializing an H2 DB at first, tried connecting to it in IntelliJ only to realize that I might not be able to easily browse the db without giving up my firstborn child (Connect to H2 database using IntelliJ database client). So I moved to DerbyDB. Same thing - db root folder

Spring Boot + IntelliJ + Embedded Database = Headache

℡╲_俬逩灬. 提交于 2020-12-24 07:07:50
问题 Either I'm missing some core concept buried deep within some documentation (Spring, Spring Boot, H2, HSQLDB, Derby, IntelliJ) or I've been staring at this for too long. I have a Spring Boot project going. Tried using and initializing an H2 DB at first, tried connecting to it in IntelliJ only to realize that I might not be able to easily browse the db without giving up my firstborn child (Connect to H2 database using IntelliJ database client). So I moved to DerbyDB. Same thing - db root folder

Spring Boot + IntelliJ + Embedded Database = Headache

半世苍凉 提交于 2020-12-24 07:07:03
问题 Either I'm missing some core concept buried deep within some documentation (Spring, Spring Boot, H2, HSQLDB, Derby, IntelliJ) or I've been staring at this for too long. I have a Spring Boot project going. Tried using and initializing an H2 DB at first, tried connecting to it in IntelliJ only to realize that I might not be able to easily browse the db without giving up my firstborn child (Connect to H2 database using IntelliJ database client). So I moved to DerbyDB. Same thing - db root folder