Posts by Guilherme Barros • 577 points
16 posts
-
1
votes2
answers127
viewsA: How to use Groupby according to parameter?
A little dynamic but functional way is to add static properties of the type Expression<Func<Conta, TKey>>(this is the type of data that function GroupBy of IEnumerable use to interpret…
-
5
votes2
answers1399
viewsA: Find element in HTML and add a class with pure Javascript
You can use the addEventListenner in the document to capture when the DOM is fully loaded and after that, use the querySelectorAll to capture a list of elements using their CSS selector, iterate on…
-
0
votes1
answer125
viewsA: Null ajax values for controller
Good afternoon, could try doing the action as follows: [HttpPost] public JsonResult Adicionar([FromBody] ClienteFornecedorDto dto)
-
1
votes2
answers50
viewsA: Date problem: 1919/1010/20181818 03:15:16 PM
Good afternoon, I believe that at the time of showing off you must be using something like dd/mm/Yyyy H:i:s but in php the date formatting does not require more than one letter to identify which…
-
1
votes2
answers233
viewsA: Web Service may be active, or only passive (always receive a request)
He can be active yes, study Websocket, in short, Websocket is a persistent connection between the served and the clients, the server, whenever there is a change, can send information directly to the…
web-serviceanswered Guilherme Barros 577 -
0
votes1
answer37
viewsA: Problems entering webapi(c#) registration with javascript
What is occurring is, as your front is hosted in a location other than your service, the CORS(Cross-origin Resource sharing) of the service is blocking Origin from its front end, you will need to…
-
2
votes1
answer279
viewsA: Cannot use tskill in C#
From what I understand you’re trying to kill a lawsuit, if yes why not do so: foreach(var process in Process.GetProcessesByName("com2tcp")) process.Kill(); Or, like the Ricardo Pontual suggested,…
-
5
votes1
answer77
viewsA: Java error method main is Too Complex
This code does EXACTLY the same thing as the code that is written there, only using loops, you could implement this way in your code: boolean semRepeticoes = true; for (int i = 0; i <…
javaanswered Guilherme Barros 577 -
0
votes1
answer71
viewsA: How to Generate Summation in loop fields
There are some ways this can be done, this is just one of them. Creating an array of objects to save the information of each row: To do this, first valos use the variable 'i' to make each item in…
-
4
votes1
answer170
viewsA: Generate new Migrations based on all models
If only the migration has been deleted(still with Modelsnapshot and the base still created): delete the Modelsnapshot and ALL migration-related files (*.Designer.Cs and *.resx)(in the Migrations…
-
7
votes2
answers1681
viewsA: Regex required number(s) and optional letters
This regex validates a set of alphanumerics but requires there to be at least one number: (?:([a-zA-Z]+|)\\d+([a-zA-Z\\d]+|))
regexanswered Guilherme Barros 577 -
1
votes2
answers1455
viewsA: Error in Datetime.Tryparse
You can use the following code: string vcto = "29/01/2018"; DateTime data; Boolean resp = DateTime.TryParseExact(vcto, "dd/MM/yyyy", CultureInfo.InvariantCulture, DateTimeStyles.AdjustToUniversal,…
-
0
votes2
answers99
viewsA: invalid.syntax appears when the program is run
Missing closure of the input to string conversion parentheses on the following line: palavra = str(input('digite alguma palavra: ') Should be: palavra = str(input('digite alguma palavra: '))…
-
0
votes2
answers62
viewsA: Request API not working on ASP.NET Core 2.1
Have tried removing the attribute "Route" and placing the route in the attribute Httppost itself? [HttpPost("AddOrUpdate")] public IActionResult AddOrUpdate([FromBody]CartaoModel model)…
-
0
votes1
answer239
viewsA: JSON Regular Expression and Deserialization Dictionary
Good morning, as I’m in the middle of the day the solution was quite messy but I hope you understand: Router: using Newtonsoft.Json; using System; using System.Collections.Generic; using…
-
2
votes1
answer55
viewsA: Change /controller? id=1 URL to /controller/1
You could put the following Annotation: [HttpGet("{id}")] being like this: [HttpGet("{id}")] public async Task<IActionResult> Index(int? id) { var listaDeSites = await…