Posts by HudsonPH • 2,492 points
108 posts
-
0
votes1
answer62
viewsA: Is it possible to use two identical id’s in the same table?
You need to create an auxiliary table between matches and teams, example table timesquevaojo in it will have the match id and the team id, how it will work controntoid 1 team 1 controntoid 1 team 2…
-
1
votes2
answers470
viewsA: What are the dangers of accepting a branch merge with Behind commits?
My question is, what are the dangers of accepting the merge of mine branch even if there are Behind commits? The only problem would be if there was conflict between code and you need to fix…
-
2
votes2
answers150
viewsA: How to configure custom Error 500 page?
if you use the customErros You need to do the following: In the FilterConfig.cs comment on that line //filters.Add(new HandleErrorAttribute()); on the web.config add this: <customErrors mode="On"…
-
0
votes1
answer61
viewsA: It is possible to generate routes dynamically in ASP.NET MVC4
in your controller you only need to put the route: public class HomeController : Controller { [Route("")] [Route("Home")] [Route("Home/Index-EXEMPLO")] public IActionResult Index() { return View();…
-
1
votes2
answers414
viewsA: Is there a security problem using the public schema in Postgresql?
No need to remove the public, only modify the access of users if you have more than one administrator or users with access to db. If you need to restrict organized users you can create other schemas…
-
0
votes2
answers350
viewsA: How to configure Postgresql Autoincrement using EF Core
Postgresql is not the problem, but this class that ". Fornpgsqlusesequencehilo()" When the interval is exhausted, a new interval is allocated. In practical terms, this uses a sequence that is…
-
2
votes1
answer80
viewsA: Problems with Entada mask removal in Partialviews - Asp.Net Core
This part cannot be inside the partial view, because @section doesn’t work inside her: @section Scripts { @{await Html.RenderPartialAsync("_ValidationScriptsPartial");} @*<script…
-
1
votes1
answer48
viewsA: Problem with Modal Bootstrap
First Voce should test if the value is correct in $(this).attr("data-id"), Voce can also test $(this).data("id") if your jQuery is larger than version 1.4.3 if it doesn’t work check the value that…
asp.net-mvcanswered HudsonPH 2,492 -
0
votes4
answers2635
viewsA: How to Delete File or Folder in C Language
basic example with a simple test to see if it was deleted or not. int retorno; char arquivo[] = "arquivo.txt"; retorno = remove(arquivo); if(retorno == 0) { printf("deletado"); } else { printf("nao…
-
0
votes3
answers94
viewsA: Make a function that shows whether the number is integer or not
The best solution would be (compatible with all browsers) function isInteger(numero) { return (numero ^ 0) === numero && typeof(numero) == "number"; } Example: isInteger(2) true…
-
0
votes2
answers925
viewsA: Current Date in @Html.Editorfor() Asp.Net MVC
You only need to load the date into the model to be able to view sequencia.DataSequencia = DateTime.now(); public ActionResult Details(int? id) { if (id == null) { return new…
asp.net-mvcanswered HudsonPH 2,492 -
1
votes1
answer360
viewsA: How do I work with branch merge conflict management?
After your commit you will push and create the merge request (join your branch with master), if there is a conflict: Group that has a head of architecture (or someone who manages the project) this…
-
1
votes3
answers578
viewsA: How to put two action with HTTPPOST
The problem is related to ActionResult not accepted from the methods with the same name, because this class is related to your view, it is the same thing to say that there are 2 files with the same…
-
2
votes1
answer50
viewsA: What is the smallest lag of a mobile device?
Lower resolution to smartphone is QVGA (240x320) below that only the smartwatch apple watch @media (max-device-width: 42mm) and (min-device-width: 38mm) { } Moto 360 watch @media (max-device-width:…
-
0
votes2
answers11231
viewsA: How to center my form with bootstrap leaving responsive;
The image form is outside the container so you have no alignment along with your form put this part inside the div container <div class="form-group"> <img src="Iuri.png" width="500px"…
-
1
votes5
answers1540
viewsA: Regex with Javascript - Taking only part of the string
Very simple and does not need regex: var str = "http://www.google.com/joao.pedro?a=b/"; var valor= str.substring(str.lastIndexOf(".com/")+5,str.lastIndexOf("?")); Upshot: joao.pedro explanation…
-
0
votes2
answers570
viewsA: Create a VIEW or a new TABLE in Postgres?
I had almost the same problem, but my bank is much bigger than yours and suffers updates and Insert every minute, the tables that passed 1gb I used Partition based on a column related to group. The…
-
1
votes1
answer67
viewsA: How to leave my bank in the postgres always ordered?
Knowing that your update only happens once in the day I strongly recommend creating a Materialized Views you can save in an orderly way and do the refresh daily after the update example of the…
postgresqlanswered HudsonPH 2,492 -
0
votes2
answers2717
viewsA: Pick user input value with jQuery
Use jquery, instead of this onlick put an id <button id="teste">Teste</button> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>…
-
2
votes2
answers145
viewsA: Jquery autocomplete 1.9.1
I believe Voce forgot to put jquery-ui.js <script src="https://code.jquery.com/jquery-1.9.1.js"></script> <script…
-
0
votes2
answers193
viewsA: Find string in html code
C# is the fastest way to read the 20 files and generate their result. Example in C#: StreamReader file = new StreamReader(@"c:\htmls\html1.html"); string line; line = file.ReadToEnd(); string[] x =…
-
1
votes1
answer118
viewsA: CSS must be Shorthand or Longhand
Fine tune which is the right practice, use CSS with Shorthand or Longhand? You replied with your link:…
-
1
votes2
answers56
viewsA: How to leave the four in a row?
An Row in Bootstrap is worth 12 If you want 4 column, your col-md-4 pl-2 should be col-md-3 pl-2 because you have 4 elements adding the col-md-4 16, which results in two lines Row 1 = 12 and Row 2 =…
-
2
votes1
answer109
viewsA: Doubt about modularization in MVC Application
In good practice the best would be that this part stays within a service, and it shaped in a Generic way. public async Task<List<T>> ListaAsync(){ using (HttpClient client = new…
-
3
votes2
answers170
viewsA: Switch only enters "default"
That: jj = Convert.ToInt32(Console.Read()); Trade for this: Convert.ToInt32(Console.ReadLine()); If you want to use Console.Read() Voce needs to convert the value to char. jj = Console.Read(); char…
-
2
votes5
answers625
viewsA: Allow or not allow end spaces in passwords?
Formerly: Because databases used ascii, and there was a conversation problem between line break and space, if you have seen some sites have a message "do not copy and paste your password" to prevent…
-
1
votes1
answer64
viewsA: Could someone help me with this script?
Come on, you don’t need this flag and the correct to change the color is $("nav ul a") $(window).scroll(function(){ scroll = $(window).scrollTop(); if(scroll > 200){ $("#logo").css({"margin-top":…
-
1
votes1
answer1438
viewsA: I am unable to call a jquery file in html
Let’s organize into parts, scripts and the like inside the head <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> <script…
-
0
votes1
answer53
viewsA: Rewrite 2-digit maximum input numbers for output
stopping to read after reading the number 42, then its repetition should not have a limit for(int i=0;i<100;i++){ but an infinite bond, should be something like : for(int i=0;i>-1;i++){ and…
-
1
votes2
answers867
viewsA: Navbar changing color to scroll
The problem was that you didn’t put the event on the scroll var nav = document.getElementById('nav'); window.addEventListener("scroll", function(event) { if(window.pageYOffset>100){…
-
0
votes2
answers4674
viewsA: Pick top, left element position according to parent element
A hint, that: $('#draggable').mouseup(function () { var p = $( "#mostra" ); var offset = $("#draggable").offset(); var offsetlimiteMove = $("#limiteMove").offset(); var totalLeft =…
-
0
votes1
answer113
viewsA: Update Postgresql
That way*: update NomeDaTabela as s set valor1= p.valor2, valor2= p.valor1 from NomeDaTabela as p where s.valor2=p.valor2; *make corrections according to your table.…
-
7
votes1
answer281
viewsA: What is the difference between Prototype and an Object?
Object in Javascript inherits the properties and methods of your Prototype. This is the Prototype: function Pessoa(nome, idade) { this.nome = nome; this.idade = idade; } This is the Object: var…
javascriptanswered HudsonPH 2,492 -
0
votes1
answer47
viewsA: Ajax autocomplete in Entity Framework
Jquery is missing: type: "POST", dataType: "json" $(function () { $("#pesquisaEstilo").autocomplete({ source: function (request, response) { $.ajax({ url: "/Home/GetAutoCorrect", data: { term:…
-
0
votes1
answer158
viewsA: Add photos and gallery to an ASP MVC product
Yes, it’s possible to do everything in one string only Voce can put all images in the same field FOTO and separate fonts using ";" and when the user makes the call you only need to add the…
-
3
votes1
answer1353
viewsA: C# Decimal field accept value equal to or greater than 0 in validation
Since it’s all Razor, use DataAnnotations to set the limit of 1 even to infinity (may be another number) and remove ? if the parameter is required [Range(1, Double.PositiveInfinity)] public decimal…
-
1
votes4
answers169
viewsA: Which way can I use regular expression to capture just a few link attributes
In place of match[7] use match[3] entree: ExtrairID("aaaa/manga?v=1234567890") function ExtrairID(url){ var regExp = /^.*((manga\?))\??v?=?([^#\&\?]*).*/; var match = url.match(regExp);…
-
0
votes2
answers198
viewsA: How to walk a C#class?
There’s something missing from your question, so case 1 : Voce informs the parameter(codeCabecahoPedido) and receives a list using some method public void GravaItensPedido(string…
-
6
votes1
answer221
views -
0
votes2
answers63
viewsA: Input is not making sense
you missed in the end strcat(strcat(strcat(caminho,"/"),turma),".coe"); printf("%s", caminho); FILE *cadastro = fopen (caminho, "ab"); it should be like this: FILE *cadastro = fopen…
-
0
votes3
answers187
viewsA: What do these operators " > " and " mean? "
int larger = (left > right ? left : right) In simple mode (condição ? verdadeiro : falso) before the ? would be the condition and between : the answer…
-
0
votes3
answers687
viewsA: Bundleconfig.Cs is even needed
BundleConfig or bundling It is not just a question of organization, but of performance Now in a webapi it makes no sense to use unless you have made some web pages or a documentation (more than one…
-
0
votes1
answer54
viewsA: Maintaining Complextype creation pattern in EF Core
Thus: public class Produto : atributo { public int ProdutoId { get; set; } public string NomeProduto { get; set; } } public class atributo { public string peso { get; set; } public decimal valor {…
-
0
votes1
answer250
viewsA: MVC Bundle altering css content - Font Awesome
Put the goal in the header? <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"> or <meta charset="utf-8" />…
-
0
votes1
answer24
viewsA: authentication with Formsauthenticationticket
You can use a base class with attributes clientId, createDate, lastDate, isDeleted to have the control that is editing or creating, but in this case will always be the last edition made If you want…
-
0
votes2
answers193
viewsA: Block of txt with Regex
regex: (((0[1-9]|[12][0-9]|3[01])[- /.](0[13578]|1[02])|(0[1-9]|[12][0-9]|30)[- /.](0[469]|11)|(0[1-9]|1\d|2[0-8])[- /.]02)[- /.]\d{4}|29[- /.]02[-…
-
0
votes1
answer94
viewsA: How to bring Swagger UI’s Closed Ollapse
I don’t know You still need it, but I’ll answer in case someone else needs it. In Swaggerconfig in this part here: .EnableSwaggerUi(c => { c.DocExpansion(DocExpansion.List); DocExpansion.List for…
-
1
votes2
answers461
viewsA: What is the Riot.js?
As there are already several libraries/frameworks with similar purpose (Angular, React, Vue, etc.) what would be the motivations for themselves choose Riot.js? This depends on the project, Riot.Js…
-
5
votes3
answers128363
viewsA: Number of characters of CPF, CNPJ and RG
About CPF and CNPJ CPF 11 digits and the ninth digit refers to locality The Tax Region where issued the CPF (defined by the ninth digit) has the the following coverage: 1 (DF-GO-MS-MT-TO), 2…
-
2
votes2
answers4055
viewsA: What’s the best way to save an image on Mongodb?
In the documentation of mongoDb, they recommend using "Gridfs" when the image changes from 16mb