python (65.1k questions)
javascript (44.2k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (12.9k questions)
Groovy: Class fields default conditional values
I have below sample classes in my application:
class A {
Integer a
String b
Integer c = (a < 5) ? a+5 : a+10
}
class B {
void method1() {
A a = new A(a:4, b:"test")
...
Phoebe
Votes: 0
Answers: 2
Job-DSL parameters in a for loop
I'm creating my jobs on Jenkins dynamically with job-dsl,
I want every Map item to have its own parameters, so I tried to do something like that:
def jobs = [
[
name: "query-es-statis...
Moshe
Votes: 0
Answers: 1
How to use variable in sh curl groovy using quotest?
i have a script
Date date = new Date()
String datePart = date.format("yyyy-MM-dd HH:mm:ss")
sh "curl 'www.link.com' --json '{"datas": "${datePart}"}'"
result ...
German Varanytsya
Votes: 0
Answers: 1
Regex - get list comma separated allow spaces before / after the comma
I try to extract an images array/list from a commit message:
String commitMsg = "#build #images = image-a, image-b,image_c, imaged , image-e #setup=my-setup fixing issue with px"
I want to ...
Barel Elbaz
Votes: 0
Answers: 1