Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
98 views

I use std::format in my logging, and it largely works great. However, std::format ignores extra arguments which I do not like. E.g., std::format("x = {}", x, y) compiles, so I want a ...
bers's user avatar
  • 6,299
2 votes
2 answers
179 views

I've just come across such usage of Perl constants: use strict; use warnings; use constant PI => 4 * atan2(1, 1); print("The value of PI is: ${\PI}\n"); # The value of PI is: 3....
Eugene Yarmash's user avatar
0 votes
1 answer
56 views

I am following https://learn.microsoft.com/en-us/azure/azure-monitor/reference/supported-metrics/microsoft-compute-virtualmachines-metrics to export some metrics from Azure. If build some code that ...
MHU's user avatar
  • 17
2 votes
1 answer
82 views

I saw this code snippet on the React dev page (https://react.dev/reference/react/memo#updating-a-memoized-component-using-state): export default function MyApp() { const [name, setName] = useState(''...
matronator's user avatar
1 vote
1 answer
68 views

I'm trying to use the Scala extensions to extend the String context to time the execution of a costly method And I came with this: extension(sc: StringContext) def timeit(args: Any*): String = { ...
dr jerry's user avatar
  • 10.1k
-1 votes
1 answer
87 views

When deploying a Windows EC2 instance with Terraform, I want to create a user using the User_Data template. I am also passing a random_password variable to the template. In the main.tf I have: ...
kfkenshin's user avatar
0 votes
1 answer
49 views

I have a data class Shift: @Serializable data class Shift( @SerialName("id") val id: String, @SerialName("username") val username: String, @SerialName("start")...
ZoutigeWolf's user avatar
19 votes
1 answer
2k views

I need braces in a raw string literal that uses interpolation: var bar = "Bar"; var s = $""" Foo {bar} Baz {{Qux}} """; Console.WriteLine(s); I expect ...
lonix's user avatar
  • 22.4k
0 votes
0 answers
27 views

Consider the following simple example. Two counters are rendering, once with ref that gets updated every second and one static: <script setup> import { onMounted } from 'vue'; import { ref } ...
CMTV's user avatar
  • 3,111
1 vote
2 answers
184 views

Hoping you can help - this may be a simple question. I've got a list of the unicode values of emojis, and I'm trying to randomly display one. Here is where I'm hardcoding displaying the smiley: ...
mark0417's user avatar
0 votes
1 answer
364 views

Having a hard time trying to make this work. I'm trying to use the generate block to add a for_each and run the module multiple times depending on how much entries I have in the variable s3, but ...
Kaleby Cadorin's user avatar
5 votes
3 answers
231 views

Original Question My boyfriend is celebrating his birthday shortly and I am ordering a custom cake for him. I want to write Happy Birthday on it in a clever Ruby coding way. It will be on a black ...
programmersgirlfriend's user avatar
0 votes
0 answers
32 views

I am trying to print a line from a file with interpolation. I have the following code: open FH, "<", "file.txt"; my $line = <FH>; print "line = " . $line . "...
Robert Key's user avatar
1 vote
1 answer
287 views

I am sure this is not a unique requirement and I have delt with this type of issue using eval() syntax in few other programming and scripting environments. My problem: I am trying to create a ...
ankur kapoor's user avatar
-1 votes
1 answer
781 views

Java finally supports string interpolation! I'm very happy about it. However, the syntax seems to me a bit clumsy // string templating syntax from Java 23 String greeting = STR."Hello \{name}!&...
Powet's user avatar
  • 307
1 vote
1 answer
36 views

I am trying to create a subclass of HashMap with its own string representation. I figured that I just needed to override toString() in the subclass: class Foo extends HashMap { String toString() { ...
Xophmeister's user avatar
  • 9,249
0 votes
1 answer
51 views

I am passing in the following as a query (.dbtable) to pyspark, running in jupyter notebook on AWS EMR. num = [1234,5678] newquery = "(SELECT * FROM db.table WHERE col = 1234) as new_table" ...
andruidthedude's user avatar
0 votes
1 answer
133 views

I am building a yaml string within Jenkins scripted pipeline that is parametrized. The problem is that I get error interpolating string with a variable that is a list of maps. I don't think I can use ...
Dmitry Tokarev's user avatar
0 votes
0 answers
26 views

I am using a release pipeline to get a valid token, the client secret, and the user password via Azure Key Vault I am getting the client secret, and the user password. I did some tests and saw that ...
Bandit's user avatar
  • 523
0 votes
1 answer
336 views

I'm trying to create a reusable component for presenting a Swift collections OrderedSet into a SwiftUI List with delete, move and add handlers. I would like to be able to pass in an OrderedSet of any ...
thiezn's user avatar
  • 2,034
-1 votes
1 answer
1k views

I have a shell command in my Jenkins script that uses string interpolation for non secret values as well as secret values. For non secret values, you are expected to use double quotes and the string ...
Mo0rBy's user avatar
  • 760
0 votes
2 answers
118 views

I have a few similarly named arrays and I need to loop through the array names: level_1_foo level_2_foo level_3_foo level_4_foo level_5_foo I'd like to do something like the following where x is the ...
John Cowan's user avatar
  • 1,764
0 votes
1 answer
330 views

I need this: If the following formatted value is null, display N/A. Otherwise, display the formatted value. It needs to be with string interpolation. I tried to do something like nested interpolation: ...
ISquared's user avatar
  • 472
0 votes
0 answers
311 views

Short Version after reading the httpclient logs, I'm seeing that some characters are being url-encoded. I dont want that to happen. Long Version the url I'm calling is split into <base url>+<...
Jonathan-Zollinger's user avatar
1 vote
2 answers
195 views

tl;dr Skip to PROBLEM below. CONTEXT In my algebraic math program a formula can be entered in the following forms (as lines of VB6 code). (Spaces within strings will be ignored): formula1$ = "SUM ...
steveOw's user avatar
  • 1,021

1
2 3 4 5
23