Skip to main content
Filter by
Sorted by
Tagged with
3 votes
1 answer
111 views

Demo code: System.Console.WriteLine($"CDbl: {(CDbl("234.56"))} {(CDbl("234.56")).GetType} {(CDbl("234.56")).ToString("0.0")}") ...
kwc's user avatar
  • 339
0 votes
2 answers
108 views

I have implemented std::fmt::Display for my struct and I have followed the example from the Display's documentation almost verbatim. However, when I try to pad the string representation, it does not ...
sampathsris's user avatar
  • 22.4k
-4 votes
6 answers
215 views

I'm trying to make my own video game in Unity. I have a series of biomes. They eventually evolve from bad to good, based on a float converted into an int going from 0 to 100, giving a biome Value of +...
user30342766's user avatar
3 votes
3 answers
186 views

For example, I know 0.12 is not exactly equals to 12/100 in decimal because it needs to be rounded to some value. However, I'm not asking about mathematical problem , but about Javascript spec that ...
wcminipgasker2023's user avatar
3 votes
2 answers
163 views

This happened after migrating from Flutter 3.10.5 to 3.24.5. I have a method on a class that uses a String with the information of what FontWeight to use. Basically, something like this: final ...
Gabriel Bertollo's user avatar
1 vote
1 answer
135 views

I'm trying to write a currency in the Dutch format: €1.000,00 meaning: Euro sign before the amount Between thousands a dot Between cents a comma However when I use CultureInfo "nl-NL" or &...
SmugSnail's user avatar
0 votes
0 answers
53 views

I'm using a website called dcoder.tech to help me test how well I use swift. They show you one test case and the results that your code should output. You write a program that takes input, the website ...
Justa Guy's user avatar
0 votes
0 answers
25 views

let m = {name : "mastan"}; let n = {name : "mastan"}; m == n // this gives false because m and n are 2 different objects JSON.stringify(m) == JSON.stringify(n) // this gives true ...
Mastan Khan's user avatar
3 votes
2 answers
84 views

I am using an arraylist to hold different shape objects that are a subclass of an abstract superclass. The superclass contains two abstract methods: surface_area and volume respectively. After I add ...
Kaleb Weikel's user avatar
1 vote
1 answer
149 views

I have a number of user-defined classes for which I would like to define a to_string function. However, instead of defining this for just std::string, I would like to define this for all the possible ...
Involute's user avatar
  • 245
1 vote
2 answers
80 views

So I'm pulling an array of collections from mongoDB and one of the documnets in the collection is a "price" document saved in the DB as a number (int32). const hotAssets = await Asset.find({ ...
Dror Salomon's user avatar
-4 votes
1 answer
65 views

I have in this code: label_time.Text = time.ToString("mm"); and it shows only up to 60 minutes and for the remaining 30 minutes starts from 0 and in the end it shows 30. How do I make it so ...
Preslava Ivanova's user avatar
0 votes
1 answer
299 views

I'm studying java and have a question about toString method. In both case: //**Case1: ** @Override public String toString(){ return "Hello world"; } //**Case2:** public String toString()...
Truong Nguyen's user avatar
-3 votes
2 answers
124 views

I researched extension methods and found out they are static. I want to know if ToString is a static method? Because all extension methods are static ... so ToString is a static method too?
YaSecu's user avatar
  • 95
-2 votes
2 answers
87 views

this is my code function createPhoneNumber(numbers) { const phonelimit = [10] for(var i = 0; i < 10; i++) { var j = i + 1 if (i == 9) { j -= 10 ...
WillBeTheBestInTheFuture's user avatar
0 votes
1 answer
116 views

Imagine I make an array e.g. int[] a = new int[5], why I cannot use System.out.print(toString(a))? I imported the method by the way, import static java.util.Arrays.toString; but I get compile error I'...
mohamad hashemi's user avatar
3 votes
1 answer
121 views

With g++ version gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~16.04) , when I compile this code like g++ -O3 <file>, and run the executable, then the app gives a seg fault #include <iostream>...
cryptickey's user avatar
0 votes
1 answer
125 views

I've been working on integrating a third-party payment gateway into my e-commerce website using SpringBoot. So far, I've followed the steps outlined in online tutorial videos without any issues. ...
cherylchang's user avatar
2 votes
1 answer
108 views

We use Lombok, and my architect wants us to always use the Lombok @ToString instead of custom implementation. I want IntelliJ to flag any toString() implementation as a warning. How do I do that? I ...
Roger C S Wernersson's user avatar
3 votes
1 answer
162 views

I have record with many members and I want Console.WriteLine(myRecord); to output its values. However one of its members is an array and it will be printed as MyOtherRecordType.Item[] Is there a an ...
Sinatr's user avatar
  • 22.3k
-1 votes
1 answer
104 views

I'm doing my program on .net 7 using entity framework. I need to format my prices like this : 1'234.56 However, they're appearing like this : 1234.56 f.Price.ToString("0.00"); The problem ...
sorrow's user avatar
  • 1
0 votes
1 answer
78 views

the object f string conversion, but not call the prototype chain toString method function fn(){} fn.prototype.toString = function(){ console.log("toString call"); return {}; } fn....
zhang xue's user avatar
0 votes
2 answers
228 views

I'm very new with JavaScript and I was trying to play around doing a function that should do some basic validation of phone numbers. I know for a professional result you should use regex but I'm just ...
Soine's user avatar
  • 11
1 vote
1 answer
3k views

It gives me an error that slice is not function despite I convert the slice from number to string. where is the issue ? var weight = prompt("Enter your Weight"); var height = prompt("...
Kimo's user avatar
  • 25
-4 votes
1 answer
3k views

According to .NET documentation: decimal value = 16325.62m; string specifier; // Use standard numeric format specifiers. specifier = "G"; Console.WriteLine("{0}: {1}", specifier, ...
Notaras's user avatar
  • 767
0 votes
1 answer
102 views

I printed a value using print(v) and got 7:0. I can't find any reference to a representation format with a colon-zero at the end. (or with a colon-number) I am not looking for help to change the way ...
Jay Michael's user avatar
0 votes
1 answer
337 views

I am currently trying to set up my local network by following the steps at https://docs.hedera.com/hedera/sdks-and-apis/sdks/set-up-your-local-network. I have the code: const { Client, ...
Drew's user avatar
  • 1
0 votes
1 answer
293 views

I'm encountering an error in my Flutter app when trying to log the Change object in the onChange method of my Cubit. The error message is as follows: Error: The argument type 'String' can't be ...
Ahmed Adel's user avatar
0 votes
1 answer
602 views

I'm encountering an error in my Flutter app when trying to log the Change object in the onChange method of my Cubit. The error message is as follows: '''' Error: The argument type 'String' can't be ...
Ahmed Adel's user avatar
1 vote
1 answer
520 views

[] Above is my data in Stata. The data are xtset using incidentCode and monthlyDate. I need to either interpolate or fill or extract missing values for the variables called, year and month. The ...
Kathryn Roman Banda's user avatar
-1 votes
1 answer
487 views

I have a C# program that adds properties to a JObject but when I convert to string, it has \r and \n characters in the output. I'm using a very simple example with only the name and value: JObject jo ...
Velocedge's user avatar
  • 1,504
0 votes
0 answers
75 views

I am stucked with this, if you can help me I'd be thankfull I have a problem converting a big double to string with ToString("f") In my code, I have the element double test = Convert....
Ivan Magnin-oddos's user avatar
1 vote
1 answer
2k views

Can someone explain what I'm doing wrong and/or missing here. I have java.nio.file.Path objects that work fine in my Java application. The only issue is when I try to print them out in logs, and the ...
alexdlaird's user avatar
  • 1,323
1 vote
1 answer
1k views

I am using a Quarkus application which have a dependent client service which pass me the response as a Uni object type Uni<Response> response = clinetService.someMethod(id); Now I need to pass ...
abhishek narayan's user avatar
1 vote
2 answers
36 views

Dear people who can solve this question, I truly appreciate your kindness! I am a new programming learner(less than 1 year) I try to use toSting() but it will print out the empty index too, how can i ...
Cocopapoo's user avatar
0 votes
1 answer
313 views

I'm working on a project for a java class and I'm stuck on this issue. When I run the program and test menu options 4 and 5 I get lists to print but they print as [Dog@42a57993, Dog@75b84c92, Dog@...
Jweese1220's user avatar
0 votes
1 answer
388 views

I am hosting API and client will be build by someone else and consume my API. But while testing I am getting below exception while deserialized in client project. System.Runtime.Serialization....
Android Guy's user avatar
0 votes
0 answers
23 views

My program is when all the three cells have been clicked, all the color of the cell will be appeared in green. In my Javascript program, there is a code line "countx = 1", the idea is to ...
eric2023's user avatar
0 votes
2 answers
63 views

I want to keep the order as it is in this code, but I don't know how to make the value of degree under the value of university @Override public String toString() { return "Education&...
HGSu's user avatar
  • 35
0 votes
1 answer
672 views

I'm following an online tutorial on Solana but I'm stuck when I try to make a new transaction using the Phantom wallet - Create React App keeps showing the error message: Unhandled Runtime Error ...
claywintringham's user avatar
0 votes
2 answers
90 views

I can't convert array's numbers into strings. What is wrong with my code? I also tried: this.userIds.toString().split(',') collectIds() { this.array.forEach((e, i) => { // [8, 8, 8, ...
monny's user avatar
  • 127
0 votes
0 answers
189 views

I have a C# .NET 6 class that looks like the following public class HtmlElement { public string Prop1 { get; set; } public string Prop2 { get; set; } public string Prop3 { get; set; } ...
CrazyEight's user avatar
-1 votes
2 answers
55 views

` I am doing a problem and we are supposed to write a program that reads a sequence of positive integers. The first zero terminates the input. For each input, N, the program computes the smallest base ...
helios's user avatar
  • 1
1 vote
1 answer
250 views

Is there a way to generate formatting members in Visual Studio like in Rider? When I generate ToString in Visual studio I get this: Which is useless to me. when I generate formatting members in Rider ...
dankupst's user avatar
0 votes
1 answer
73 views

I created a Search in vb.net button that allows me to display the elements of my table 'book' with as properties (code_ouvrage,id, title book, publishing house and date of edition) now I would like ...
Cheikh Diallo's user avatar
0 votes
1 answer
154 views

Consider the following code: class Node { constructor(data = null, parent = null) { this.data = data; this.parent = parent; this.children = []; } appendChild(data) { this....
Cody's user avatar
  • 2,701
0 votes
1 answer
51 views

I have something like this: private async Task<ProductDo> GetProductsAsync(int tariffId) { var filter = new MyFilter { Expression = (x, _) => x.Id == tariffId || x....
Aleksej_Shherbak's user avatar
0 votes
0 answers
81 views

I am using replace() to replace the bullet points in a text field. It shows up correctly in the console.log but when I use the end function to copy and paste the string into a new text field, it ...
Urbanus1234's user avatar
-2 votes
1 answer
184 views

When dealing with floating-point numbers, −0 is a different number from 0. I am building a timer application in JavaScript and apparently found out the hard way when converting the number of minutes ...
azoundria's user avatar
  • 1,025
0 votes
3 answers
461 views

In this function onAuthenticationSuccess I have the following code to check if the user has a certain role and then i tried to redirect him to the right path, but it seems to be not working, is there ...
Elias's user avatar
  • 1

1
2 3 4 5
53