Posts by Samuel Diogo • 433 points
19 posts
-
2
votes1
answer175
viewsQ: Self Join subquery approach
I have a attendance list table, where I need a list identifying who was present: Table structure: create table lista_presenca_usuario ( id int identity(1,1), usuarioId int, dia int, turno int,…
-
0
votes4
answers4308
viewsA: Load component only after finishing HTTP requests
Using Promise.all() for cases where several components have different data sources, which was my case-problem. First I had to go through all of us from the object form to find which ones need to…
-
4
votes4
answers4308
viewsQ: Load component only after finishing HTTP requests
My application uses angular-6-json-schema-form to create and manage forms dynamically. Now I would like the select Component, for example have your data coming from some REST source: My attempts:…
-
2
votes1
answer480
viewsA: Asp.Net Core Webapi Returning Object List
Leo, this seems like a mistake circular reference which generally creates an exception at the time of serialization. Add the line below in the method ConfigureServices class Startup.cs, this tends…
-
2
votes2
answers268
viewsA: Azure phpMyAdmin error: Access denied!
In general, this error occurs when the Mysql process is not running, when this happens, I restart the application and access the site or send a ping, check if the process "mysqld" appears in Process…
-
1
votes5
answers1602
viewsA: Change return /Date(1386295200000)/ to date format
I recommend using the framework Momentjs to do treatment dates. Here is an example from the documentation of Bootgrid $("#grid").bootgrid({ converters: { datetime: { from: function (value) { return…
-
0
votes1
answer193
viewsA: Nhibernate Self-reference Mapping
To solve this problem, I found two valid approaches: Where().FetchMany().Single() or Where().FetchMany().AsEnumerable().FirstOrDefault() The problem is that the First() and its variations propagates…
-
0
votes1
answer193
viewsQ: Nhibernate Self-reference Mapping
Hello, I need to return a list of child objects of the same kind as the father. however, using nhibernate, it only returns one child object, while in the bank I have 3 children. Below are excerpts…
-
1
votes2
answers1534
viewsA: How to remove blank line "Return"
A good alternative would be to use regex! See: using System; using System.Text.RegularExpressions; namespace teste { class Program { static void Main(string[] args) { string[] itens = { "exemplo1",…
-
7
votes2
answers1861
viewsA: How to refresh page and not send duplicate data to PHP database?
An alternative: is you create a session variable to check if there has already been a request, see: if( $_SERVER['REQUEST_METHOD']=='POST' ) { $request = md5( implode( $_POST ) ); if( isset(…
-
6
votes2
answers1634
viewsA: What is ASP.NET vNext? What is the correct name?
What is ASP.NET vNext? It’s nothing but codename for the next version of Asp.net in development. Let’s say, if today we have Aspnet 5 version in production, vNext may be Asp.net 6. see Wiki. See…
-
1
votes1
answer791
viewsA: Create search button like twentyfourteen theme
See how simple jquery commands and use of css can help: When the user clicks on the search button, it displays the search form.. See an example in practice: $( "#btn-search" ).click(function() {…
-
3
votes1
answer1214
viewsA: Bootstrap blocks
Come on. bootstrap works with a grid of 12 cells, so create a line, where each cell(div) will be of col-[Xs or Md or lg size, is your criterion]-3. example: <div class="row"> <div…
-
0
votes3
answers3089
viewsA: Publication of MVC 4 site on IIS is giving error
Hello, my server is Windows Server 2008 R2, I know how it is to suffer to configure.. rsrs The first step is to install via Microsoft Web Platform the recommended settings for IIS, see in this…
-
3
votes4
answers1666
viewsA: SQL Injection via url
I would do as Rcio Simao proposed, using PDO, but if in your case it is complex change all the code from mysqli to PDO, follows below, an alternative: <?php class DB{ private $conn; public…
-
1
votes5
answers758
viewsA: How to embed CSS in HTML tags?
Hello, Before sending the text by email, prepare the text for sending, follow a short example with Jquery: $( "#prepareToSend" ).one( "click", function() { $("[class=texto]").css( "color", "red" );…
-
3
votes6
answers41250
viewsA: How to prevent Submit from an empty form?
<script> $(document).ready(function(){ $(".form").submit(function(e) { e.preventDefault();//evito o submit do form ao apetar o enter.. }); }); </script> And would still use the logic…
javascriptanswered Samuel Diogo 433 -
3
votes2
answers465
viewsA: Is there an alternative to the PHP mysql_connect command?
I also recommend using PDO, because your DAL layer is not dependent on which database version to use, now one day you can migrate your application to POSTGRE, MSSQL... Anyway, another alternative is…
-
4
votes3
answers57228
viewsA: What to use require/include/require_once/include_once?
Error handling: include: if the file does not exist, a Warning (E_WARNING) is launched but your application keeps working. require: if php does not locate the file, a fatal error is released…