Posts by Matheus • 616 points
74 posts
-
1
votes1
answer51
viewsA: Error in Validationresult when trying to create Migration
1º - try to put it this way: [Key] [Column(Order = 0)] public Guid objID { get; set; } 2º - Remove the constructor that generates the Guid: public ParametroArea(){ objID=Guid.NewGuid(); }…
-
1
votes1
answer37
viewsA: Mysql - exchange contents from ISO-8859-1 charset column to UTF-8
ALTER TABLE table MODIFY column TEXT [...] CHARACTER SET utf8;
-
0
votes1
answer32
viewsA: Bringing a Controller Query to the View
In case you’re trying to generate a Dropdownlist correct ? On the controller: ViewBag.ListaGenre = new SelectList(db.Genre, "GenreId", "GenreName"); And in your View: @Html.DropDownList("GenreId",…
-
-2
votes1
answer41
viewsA: How to pass a component in Vue to variable?
Try to bind the value you need +- this way: <input type="text" maxlength="1" :value="<Info/>" /> I’m not sure if it will work because I’m far from my laptop.…
-
-1
votes2
answers67
viewsA: How to move the input box
A possible solution: Give display labels: inline-block Give them a fixed width Align text to the right label { display: inline-block; width: 140px; text-align: right; } <div class="block">…
-
-2
votes3
answers358
viewsA: How to generate random hexadecimal colors with Javascript?
function getRandomColor() { var letters = '0123456789ABCDEF'; var color = '#'; for (var i = 0; i < 6; i++) { color += letters[Math.floor(Math.random() *…
-
1
votes1
answer43
viewsA: PHP: How to check if there is a field in the table, and if it does not exist, add
You can do it this way: $sql = ("IF NOT EXISTS( SELECT NULL FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = 'NOME DA TABELA' AND table_schema = 'NOME DO BANCO' AND column_name = 'NOME DA COLUNA')…
-
1
votes1
answer154
views -
-2
votes1
answer38
viewsA: How do I verify that an entity is tracked with Entity framework Core 2.0.3?
could test that way. public bool IsTracked(TEntity obj) { var response = Db.Entry(obj).State = Microsoft.EntityFrameworkCore.EntityState.Modified; SaveChanges(); return response; }…
-
0
votes2
answers148
viewsA: how to give target="_Blank" on a button
<input type="button" value="sobre" onclick="window.open('http://google.com','_blank')" >
-
3
votes1
answer108
viewsQ: Error when calculating decimal value
I need to calculate the interest value, this is the code: public async Task<decimal> CalculatesInterestAsync(decimal valorInicial, int meses, decimal juros) { var valorFinal =…
-
1
votes1
answer231
viewsQ: Upload image with Vue.js + . net core 3.0
I’m trying to upload an image, but the image always comes as null on my controller This is my Viewmodel which I receive the image: public class UpdateViewModel { [Required(ErrorMessage = "Nome é um…
-
0
votes1
answer123
viewsQ: 'Iorderedequeryable<Condominium>' does not contain a Definition for 'Tolistasync'
I’m getting the following error: as in the image below: In that part of the Code: public async Task<IEnumerable<Condominium>> FindCondominiumAllAsync() { return await FindAll()…
-
0
votes0
answers49
viewsQ: Map a Json to a Viewmodel via Automapper
I own the following Json (I’m betting just a piece of it). { "filters": {}, "competition": { "id": 2021, "area": { "id": 2072, "name": "England" }, "name": "Premier League", "code": "PL", "plan":…
-
1
votes1
answer68
viewsA: Error trying to Edit PK and UK on ASP . NET Core
The error is occurring because you are trying to update by creating a new record, with PK of an existing. Ex, here you are creating a new UnidadeDto Domain.DTO.Unit unidadeDTO = New…
-
0
votes1
answer30
viewsA: Wrong value return
I managed to solve it this way, in case someone ever needed it. var verifyChoice = game.Game.Select(x => x.PlayerMoviment.Where(y => y.Moviment != rock && y.Moviment != paper…
-
0
votes1
answer30
viewsQ: Wrong value return
I am creating a list within another one as follows: var playerGames01 = new ObjectGamePlayerMoviments(); playerGames01.Game = new List<Games>() { new Games { PlayerMoviment = new…
-
1
votes1
answer65
views -
3
votes1
answer94
viewsQ: Grouping of values
I have an application that generates the following results: I would like to know how I can arrange the object in only 1 line, say have only one date, and within the date have the schedules, to have…
-
0
votes1
answer43
viewsQ: Pick up time from the nearest array to the current time
I have the following Json: { "cod": "200", "message": 0.0055, "cnt": 40, "list": [ { "dt": 1560319200, "main": { "temp": 15.15, "temp_min": 14.49, "temp_max": 15.15, "pressure": 1021.11,…
-
1
votes2
answers64
viewsQ: Lower and higher value within Objects with the same date
I have the following Json: { "cod": "200", "message": 0.0055, "cnt": 40, "list": [ { "dt": 1560319200, "main": { "temp": 15.15, "temp_min": 14.49, "temp_max": 15.15, "pressure": 1021.11,…
-
1
votes1
answer369
viewsQ: Deserializeobject
I’m trying to use the DeserializeObject, to generate objects through the result json: { "cod": "200", "message": 0.0068, "cnt": 40, "list": [ { "dt": 1560286800, "main": { "temp": 17.14, "temp_min":…
-
2
votes1
answer819
viewsQ: Cannot Create an instance of the Abstract class on interface 'Httprequest'
I’m getting the following error: Cannot Create an instance of the Abstract class on interface 'Httprequest' In that part of my code: class FakeContext { public static HttpContext FakeHttpContext() {…
-
0
votes0
answers382
viewsQ: Message: The following constructor Parameters Did not have matching fixture data: Icompetitionservice competitionManager
I am getting the following error in my application Xunit, when using dependency injection: Message: The following constructor Parameters Did not have matching fixture data:Icompetitionservice…
-
0
votes1
answer63
viewsQ: Error trying to use Xunit
I’m trying to use XUnit to test my application, but I am getting this error at the time of injeção de dependência. I get the following error: Message: The following constructor Parameters Did not…
-
1
votes1
answer164
viewsQ: Injection error of dependency
I’m using Xunit to carry out my tests, I am trying to access my CampeonatosController, consequently I have to pass the value shown in the image below as parameter, but I am getting the error below.…
-
0
votes0
answers22
viewsQ: Show json fields on screen
I get following Json: I would like to show on screen the following fields in a table: standings>0>table>All returns from 0 to n What I have so far is: <div *ngFor="let tabelas of…
-
0
votes1
answer89
viewsQ: Sort and sort a string
Then with the sequence sorted and ordered crescently need to exclude all characters that come after (and including) the symbol "_" (without quotation marks). Could you help me where I should start ?…
-
1
votes1
answer180
viewsQ: Make Distinct Entity Framework
I’m trying to accomplish the Distinct, in my model of Phones, but none of the options I’m trying to make work. Could tell me what I’m doing wrong ? Below I described several ways I have tried to do,…
-
1
votes4
answers60
viewsA: Remove null fields from a model that receives a list
I managed to solve, If anyone needs an answer I did it this way: model.Phones = model.Phones.Where(x => x != null && x.Phone != null).Distinct().ToList();…
-
2
votes4
answers60
viewsQ: Remove null fields from a model that receives a list
I need to remove all null fields, which comes from a list of Phones, I tried to do it this way, but unfortunately it didn’t work: model.Phones = model.Phones.Where(x => x.Phone != null &&…
-
3
votes1
answer248
viewsQ: Record Email and Phone Array in Database with Entity
I need to save an html array of telefones and Emails, in the database, but I’m not sure how to receive such data. Phone and email number can be 0 ou N, as in the image below, one can add as many…
-
0
votes0
answers42
viewsQ: Keep redirecting the user until he completes a specific task
I’m developing an app to manage a condo. What I need is that after the user logs in he is redirected to the condominium registration screen (caso ele não tenha nenhum condomínio cadastrado ainda)…
-
0
votes1
answer702
viewsA: How to rename DEFAULT in the <input type ="date" > tag
Hello. Try it this way and call me back: <input placeholder="Data Inicial" type="text" onfocus="(this.type='date')" onblur="(this.type='text')" id="date"> That way it gets better.…
-
0
votes1
answer197
viewsA: Visualstudio 2017 hiding some folders in Solution Explorer
And put it in the press - I believe it will solve your problem.…
-
1
votes1
answer272
viewsQ: Check if the user has authenticated, and get authenticated user information
I want to check if you had any user authentication, and after checking if any user authenticated to get that user’s ID. I have a Middleware that will redirect the user to condominium registration…
-
1
votes0
answers119
viewsQ: Check if any user has logged in, and pick up the logged in user - core 2.1
Hello I need to check if there is any user authentication, and after checking if any user has authenticated to get this user’s ID. I own a Middleware that redirects the user to condominium…
-
2
votes1
answer135
viewsQ: Error while using Middleware
I’m trying to use Middleware, so that every time a user logs into the system it is being redirected to condominium registration screen, he can not use the system until you register at least 1…
-
4
votes1
answer180
viewsQ: Custom Data Annotations for validation
I want to create a Data Annotation to be able to check in ALL pages of my application if the user who is logging in already has 1 Condomínio registered, if there is no registered condominium it…
-
0
votes0
answers96
viewsQ: Win32exception: The network path was not found
I am getting the following error in my application that is hosted on aws Sqlexception: A network-Related or instance-specific error occurred while establishing a Connection to SQL Server. The server…
-
0
votes0
answers47
viewsQ: Argumentexception: The 'Clientid' option must be provided
I’m uploading my application to the aws servers. When I run the application locally it works perfectly, but when I test it in the cloud I get the following error. The parameter 'Clienteid' is my key…
-
0
votes0
answers31
views -
0
votes1
answer42
viewsQ: Error trying to install Ntoastnotify package by Nuget
I’m trying to install the package: Ntoastnotify version 5.0.10 in my system: Asp.Net Core 2.1 But I’m getting the following messages: Severity Code Description Project File Line Suppression State…
-
0
votes3
answers36
viewsA: Redirect when you have a page click event
Hello, Put an "ID" on your body, and do the following. $("#idBody").on("click" function() { window.location.assign("http://answall.com"); });
javascriptanswered Matheus 616 -
1
votes1
answer187
viewsA: Searching character in Specific Position - SQL Server
SELECT telefone, FROM 'Sua Tabela' WHERE SUBSTRING(telefone, 5, 1) = 9; I’m not sure if it will work because at the moment I don’t have my laptop.
-
0
votes2
answers203
viewsQ: How to Split a List Proportionately 32%, 32% and 36%
I own a lista("arquivo txt") with about 150 values with three types of flowers "Iris-setosa", "Iris-versicolor", "Iris-virginica" I need to read this file, check the amount of each flower in that…
-
3
votes1
answer512
viewsQ: Error: Cannot convert Implicitly
I’m getting the following error. It is not possible to implicitly convert "System.Linch.Iqueryable" to "Testemercos.Models.Applicationproduct". There is an explicit conversion ? in that part of the…
-
0
votes1
answer275
viewsQ: Dropdownlist with Selectlist Item
I am trying to create a Select List, but in case it is returning it to my view: Microsoft.AspNetCore.Mvc.Rendering.Selectlistitem so is not returning the Cargos that are in my database and here are…
-
0
votes1
answer389
viewsQ: Write a Json string to the database c#
I am able to receive the data correctly, and being able to separate them correctly too, only problem is that I do not know how to use the values and be able to write in the database, could help me ?…
-
2
votes1
answer24
viewsQ: Ajax problem when trying to use data in later functions
I’m trying to get the data from the functions BuscaCabeca and BuscaBraco, it is returning the data all right, but when I try to use the data created cabeca and braco is like Undefined, what I’m…