Posts by Lucas Souza • 141 points
13 posts
-
1
votes2
answers429
viewsA: Passing parameter navigation from stack navigation to child component
An alternative for your case would be to centralize in your Main component the navigation functions and descend these functions via direct link, example: export default Main = ({navigation}) => {…
-
1
votes1
answer32
viewsA: How to filter a database item through a List field?
Opa, I made a little console design and changed some things in its classes as the encapsulation to be able to demonstrate how would be a query in LINQ to do the filtering follows the code: public…
-
0
votes1
answer72
viewsA: How to make Class1.Cs appear?
Just add the namespace you want before the class in this case by your using I believe that the ideal would be something like the following by putting as namespace "Webapplication1.App_code": using…
-
0
votes2
answers93
viewsA: Help with Async C# / Winforms
You will need to use a task to run the logic: private async void bntPlay_Click(object sender, EventArgs e) { Task tks = Task.Run(() => { RobotNavigation robotNavigation = new RobotNavigation();…
-
0
votes1
answer72
viewsA: Angular - How to reuse information from one component in another to realize condition?
One idea would be to have inside the drugstore component an @Input() for each attribute you want to display, so you can put a *ngIf to hide when you’re not going to use, I don’t know what your…
-
0
votes1
answer286
viewsA: AXIOS SENDS 2 REQUESTS INSTEAD OF 1
The false occurs probably because the first request is options and then there is an update of the state of the component, making it render again, then occurs the second call that returns true. Try…
-
3
votes1
answer58
viewsA: React + typescript how to pull 1 function within a React component
You will have to use the useState hook for this, in order to have a variable state within a functional component, then you change this bit variable and show or not show the component, follow…
-
1
votes1
answer83
viewsA: Stock Control - "Database locked"
I believe the problem is that the read and executenonquery commands are coming into conflict due to lack of Ispose, follows an alternative that can give a way out to this problem. private void…
-
0
votes1
answer89
viewsA: Generating Logs with Line Error and File Error (C#)
I made an app console to illustrate an idea of how you can do this follows: static void Main(string[] args) { try { throw new Exception(); } catch (System.Exception ex) { StackTrace stackTrace = new…
-
1
votes2
answers40
viewsA: How to do JSON function return Monthly amount of liters fueled in one year period
You would need to group by date, or direct month and then select on top of the generated list by multiplying the value by the amount of liters. I made a console application to illustrate your case,…
-
1
votes3
answers507
viewsA: How to merge two Pdfs into Base64 in one
See if your library version has the Savetostream method, it is to solve. static string PdfDocumentToBase64(PdfDocument pdf) { using (var sm = new MemoryStream()) { pdf.SaveToStream(sm); var bytes =…
-
-1
votes2
answers75
viewsA: How to serialize or deserialize a json with lowercase keys and uppercase values (newtonsoft)
You can use Jsonpropertyattribute for this, example: public class Videogame { [JsonProperty("name")] public string Name { get; set; } [JsonProperty("release_date")] public DateTime ReleaseDate {…
-
-2
votes4
answers130
viewsA: Treat blank fields in calculation
Just change the input from text to number and initialize a default value like 0 <input type="number" value="0" /> or use the operator '?? 'example: var field1 =…
javascriptanswered Lucas Souza 141