Posts by Alisson • 1,422 points
31 posts
-
0
votes1
answer199
viewsA: How do I make my form work with reCAPTCHA?
Since you need to use ajax instead of the standard form Submit, a simple way that I see to do this is like this: var formData = $('#submeter').serializeArray()[0]; formData.Titulo =…
-
0
votes3
answers312
viewsA: Validate three fields
The simplest way would be to use the min. In that case, I put in for min of the first input is equal to the sum of the other two inputs, and includes a ng-message for min: <md-input-container…
-
1
votes1
answer105
viewsA: $routeProvider does not work - Angularjs
You are using the version 1.5.11 angular, but is using the version 1.6.6 angular-route. Work with the same versions to avoid problems. Also, use: <a href="#home">Go to home</a> instead…
-
0
votes1
answer345
viewsA: When running the POST passing object via the URI of a Webapi, the object arrives as null in the method
You must pass the original object to the call, rather than manually serialize, because the method itself PostAsJsonAsync will already serialize. The way you’re showing it, it would serialize…
-
2
votes2
answers100
viewsA: My App does not load list of items
The problem is when your code gets here: lv.ItemsSource = _data; ...the method CarregaDados(idorcamento) which has been called some lines above has not yet executed, nor populated the variable…
-
2
votes2
answers739
viewsA: MVC Custom and Friendly Routes | Create a Route with only one parameter in the URL
The order in which routes are declared makes a difference. There is the possibility of a URL hit with two routes, but the router will compare with the routes in the order they were declared. The…
-
2
votes1
answer86
viewsA: Jquery event does not run after click
Your problem is classic (almost everyone ends up going through this problem). I myself have spent hours on it a few times. You are adding the elements in the DOM after the bind click (as they are…
-
1
votes1
answer31
viewsA: In savechages it says which column is null and has value
The Entity Framework by default treats primary keys as Identity, so it will ignore any value you set for IdBalanca, once it is the key. At the same time, because it is Identity, the Entity Framework…
-
2
votes1
answer2607
viewsA: Change existing column to Identity
Cannot change an existing column to Identity in SQL Server, so EF6 ends ignoring the identity: true Migration, which to me is wrong, should give you an error warning that he can not generate a…
-
3
votes1
answer257
viewsA: What is GUID for Visual Studio projects
If you copy the project for another Solution, no problem. Visual Studio uses these Guids to manage references/dependencies between projects. This is an example of the GUID:…
-
22
votes3
answers1780
viewsA: Is the SQL language object oriented?
SQL means Structured Query Language, that is, it is a structured language, specific for handling in relational databases (whether SQL Server, Mysql, etc). Therefore, there is no support for object…
-
1
votes2
answers50
viewsA: doubt with query in sql
I’d do it that way: select * from ( select *, posicao = row_number() over (partition by cargo order by salario desc) from pessoas ) a where posicao = 1 The subquery will then group by the post and…
-
4
votes2
answers150
viewsA: How do you register all validation classes with Dryioc?
It was kind of complicated to solve this problem, it took me a long time, but here’s the solution I found. First, we created a method like this: public static void RegisterGeneric<T>(Container…
-
3
votes2
answers105
viewsA: interpret string C#
The library Ncalc simplifies this for you. Install it by Nuget: Install-Package ncalc Then use it that way: using NCalc; using System; namespace ConsoleApplication1 { class Program { static void…
-
0
votes1
answer960
viewsA: How to redirect view in a controller with Angularjs
You need to use the service $location to change routes/views. app.controller('departmentRegisterController', ['$location', '$scope', function ($location,$scope) { var vm = this; vm.Cadastrar =…
-
3
votes1
answer66
viewsA: Simulate a Master/Detail report with foreach
Following this output you requested, you can do so: <table> @foreach (var unidade in Model.GroupBy(i => i.unidade)) { <tr> <td>UNIDADE @unidade.Key</td> </tr>…
-
5
votes2
answers2552
viewsA: Claims Identity MVC
Claims need to be added before you can Signin user, and should be added to the object ClaimsIdentity that is created to effect that Signin. You must have a class you inherit from IdentityUser and is…
-
1
votes1
answer512
viewsA: Notifications with Signalr
An interesting way to send a notification to specific users is by using groups. For each type of notification, you create groups for each item and connect necessary customers to these groups. A…
-
1
votes1
answer55
viewsA: Relationship of Fluentapi Tables
If the project belongs to a manager in a specific company, I would do it: public class Projeto { public int ProjetoId { get; set; } public string ProjetoNome { get; set; } public int EmpresaId {…
-
3
votes1
answer744
viewsA: Printscreen in C#
I remember taking a code somewhere (probably in the OS itself) to do this (I used it to print the screen when I made a mistake, so email it to the development team). Create a reference to a RECT:…
-
1
votes1
answer1325
viewsA: How to fix the last column with horizontal scroolbar?
I used css to try to freeze this last column. For this I created the following classes: .bootgrid-wrapper { width: 90%; // 100% menos o tamanho da ".fixed-column-right" overflow-x: scroll;…
-
2
votes1
answer982
viewsA: Updating application(C#) in real time with Database (Mysql)
At first I see two possible solutions to this: Signaler and Masstransit. In both cases, you will need an application to run on a server (it may be the same as the database), in case Masstransit…
-
0
votes1
answer207
viewsA: Treat multidimensional array in Angularjs
The problem is in the mounting of these arrays. You created two arrays (gang and products) that do not have the slightest relationship with each other. In fact, I understand that you do not even…
-
1
votes1
answer57
viewsA: Filter for a multidimensional matrix
One option is to create a function to take care of that filter. I updated your Jsfiddle with a possible solution. In short, I adjusted its function filterTurma() thus: $scope.filterTurma =…
-
-1
votes2
answers1485
viewsA: Loading with Angularjs
I believe the problem is your scripts being loaded inside the tag <body>. When the html is rendered in the browser, the scripts within the tag <body> containing the angular and your…
-
1
votes1
answer471
viewsA: How to render dynamic images with angular
Instead of trying to concatenate the two values into html, create a method in the controller that concatenates the values: $scope.getProjectUploadUrl = function (project) { return project.way +…
-
11
votes1
answer1562
viewsA: Unit Of Work + Ioc + Idisposable
I don’t know which dependency injection framework you’re using, but usually these frameworks have something called lifestyle (which you yourself showed in your code), and depending on the lifestyle,…
-
5
votes1
answer257
viewsA: Entity Framework Async Performance
The former is being misused. The method needs to be public async Task<List<Holiday>> and you must use the await (equal to the action of your Controller): public async…
-
1
votes1
answer1210
viewsA: How to decrease byte array size that represents an image
I have situations where a user’s avatar is stored in the bank at high quality, but sometimes to render a thumbnail very small (and as I don’t have a reduced version of the saved image anywhere) I…
-
4
votes1
answer430
viewsA: Using synchronous methods together with asynchrons
I believe a deadlock is occurring, try to modify this your method QueryProfileAsync to use ConfigureAwait(false), thus: public static async Task<IEnumerable<T>>…
-
0
votes1
answer274
viewsQ: Why does ng-repeat from Angularjs not work in Bootstrap Modal?
In my project, I used a nesting of ng-repeat to assemble several checkbox dynamically, enabling the user to combine filters, what works perfectly when mine controller upload the lists. Now, the user…