Posts by Thiago Lunardi • 6,968 points
255 posts
-
6
votes1
answer386
viewsA: Replace is not working C#
The method Replace() returns a value, and that value is that you are not accumulating anywhere. Change your line to: linha = linha.Replace(item.Key, item.Value); So you will accumulate the result of…
-
2
votes1
answer65
viewsA: Update warning screen
There are several ways to solve this. But as you explained that you do not want to add anything to the current system, to keep it "level", the best I see is create a windows service to periodically…
-
2
votes1
answer103
viewsA: Tag with display: None - Asp net
There are two golden rules in the programming world: Computer does not think: it does not analyze and makes no decision other than what it was instructed to do; Computer is not wrong: it does…
-
1
votes2
answers1387
viewsA: List Folders and Subfolders of an FTP with C#
In the official blog of MSDN has an article with an example of how to list contents of the folder with FTP. // Get the object used to communicate with the server. var request =…
-
1
votes1
answer1334
viewsA: How to recover last record inserted in Firebird database?
If you’re using Firebird 2, you already have RETURNING with the clause INSERT: INSERT INTO t1 (...) values (...) RETURNING pk; PK =========== 32 If it is a previous Firebird, and if you have auto…
-
3
votes3
answers1955
viewsA: How to scan data from an Excel spreadsheet
I recommend using the Spreadsheetlight. It is very simple to use and rasoably well documented. Just download the source on the official website and attach in your solution - unfortunately there is…
-
2
votes1
answer1894
viewsA: Error: The request Entity’s media type 'Multipart/form-data' is not supported for this Resource
To receive file via Webapi, and reading the data is slightly different than just emviar POST in JSON format. When a POST with type is made multipart, reading shall be done with a…
-
-1
votes3
answers243
viewsA: Does C# have native serialization?
Microsoft has adopted Newtonsoft.NET, a third-party package adopted as Official, as the guy responsible for making serializations within the environment . NET. Its use is extremely simple, just…
-
1
votes1
answer86
viewsA: SSL configuration in Microsoft Azure for Java projects running on Tomcat
As discussed in the comments, to add an SSL certificate using Azure App Service Webapp, just go on SSL Certificates option, upload your certificate and ready. You can already access using HTTPS.…
-
1
votes2
answers874
viewsA: I can’t update a reference
And the same case of another question here from the O.R., so be that answer about having problems updating Nuget Packages. This occurs when the version of a dependency on which the Nuget package was…
c#answered Thiago Lunardi 6,968 -
2
votes1
answer245
viewsA: Azure connection drops constantly
By using Azure Tools with Visual Studio, it will help you with several small tasks to speed up development. Azure SQL by default does not accept connections from outside of Azure Data Centers in…
-
1
votes1
answer50
viewsA: Error loading CREATE page
To generate a Dropdownlist it is necessary to have a collection of something to be listed. You cannot pass null in this case: @Html.DropDownList("CategoriaId", null, htmlAttributes: new { @class =…
-
0
votes1
answer933
viewsA: Problem installing new Nuget Pack
This occurs when the version of . NET Framework on which the Nuget package was compiled is different from the version of the project in which one is trying to install. The bigger problem is that the…
-
1
votes1
answer88
viewsA: Request performance using Html.Beginform versus jQuery AJAX
The truth is that there is no relationship between the two practices, so to speak. The Html.BeginForm() runs still on the server, it just helps - after all, it is a HTML Helper - creating the tags…
-
0
votes1
answer77
viewsA: Azure SQL connection failure
I don’t think it’s a database problem, otherwise you would see an error very different from the current one, something like saying that the IP address is not allowed access by the firewall. Instead…
-
1
votes2
answers923
viewsA: Merge table using a Subquery
About the error message: "parenthesis right not found" The problem is left speaking the alias of the created temporary table. select * from prova p left join ( case when p.tipo='COLETIVO' then…
-
6
votes2
answers10914
viewsA: Data type for latitude and longitude
Far from using decimal or any floating point for spatial values. Not only will you be using wrong types to record location values, but you will also experience great performance loss when doing geo…
-
0
votes1
answer63
viewsA: What is the best way to do a live stream that works on all browsers?
If you are open to using Paas - Platform as a Service - I recommend trying Azure Media Services. With it you can create live channels, each channel will create a endpoint/URL where will include in…
-
0
votes3
answers17275
viewsA: Error #1062 - Duplicate entry '1' for key 'PRIMARY'
Do the following query and see the cause of the problem: SELECT SUB_ID, COUNT(*) TOTAL FROM TABELA GROUP BY SUB_ID HAVING COUNT(*) > 1
-
3
votes2
answers84
viewsA: How to list bookings registered by a single administrator? (1:N)
The first thing I can notice is that there is no link between your reservations and who actually made the reservation. It will be nice to put a property in the class Reserva to create this link,…
c#answered Thiago Lunardi 6,968 -
2
votes1
answer144
viewsA: Skyrim style item system
I recommend only that you work with Interfaces, instead of just inheritances. In this article has a legal example, including with characters and weapons, about Injection of Dependency. I do not…
-
1
votes2
answers104
viewsA: Mysql connection error
I don’t know PHP, but I believe the method mysql_fetch_assoc($sql); must exist within the while() { }, so it will load a new row every turn in while. Try something like that: while($row =…
-
1
votes1
answer41
viewsA: Invalid Mysql characters error?
The operator LIKE needs other information - called wildcards - in his placeholder to understand what to do, such as %. So try something like this: SELECT * FROM cidades WHERE cidade LIKE '%Nárnia%'…
mysqlanswered Thiago Lunardi 6,968 -
0
votes1
answer409
viewsA: If Else if in Javascript
I believe that the difficulty of finding the problem comes from the complexity and low maneuverability of your code. It is very bad to read and understand what happens. I recommend first refactoring…
-
0
votes4
answers5604
viewsA: Call function at each time interval efficiently
I understand you’re open to options, so follow one more: Topshelf It creates a very simple environment to create Windows Services with timers. Just install Topshelf Nuget Package in your project…
-
0
votes4
answers188
viewsA: SQL Embedded in C#
The fact is to know if you really need to persist/save this data. If so, it will have to be somewhere. That part is yesterday we take the decision on persistence. Often, using a simple database like…
-
0
votes1
answer59
viewsA: Azure Storage Account - SSL Subdomain
Here is an article explaining how configure a custom domain name for your Blobs Storage endpoint. However, for your own domain, you will need to purchase your own SSL certificate for your own…
-
0
votes1
answer41
viewsA: Authentication using php and Azure webapp services
See here how to configure your App Service app to use the Azure Active Directory login.…
-
5
votes7
answers25439
viewsA: How to convert a JSON response to a C#object?
Fluent URL Http There is a component called Fluent URL Http very cool to do all this task of performing a request and receive an object already deserialized. First install the package in your…
-
0
votes2
answers164
viewsA: Exchanging Value Object in the database
It’s a typical problem to create Value Object structured in relational bases. Start to create ID for VO, by necessity, even knowing that a VO does not have ID by definition. To really help solve…
-
1
votes2
answers732
viewsA: How to structure a solution by separating Webapi from Webui using ASP.NET Identity?
The ideal is to isolate your Aspnet Identity from your main project, as it has responsibilities and rules that only belong to it and should not be mixed with your application. The implementation of…
-
2
votes2
answers351
viewsA: Upload files to different servers
You need to create a custom synchronization service. Simply do a service, which runs independently of the System A or System B and listen to the repositories and, whenever there is any change, this…
phpanswered Thiago Lunardi 6,968 -
0
votes3
answers1541
viewsA: Angularjs Format date
If it is inside the Angular controller, then one should create a formatter using Javascript only. Here is a list of references to date functions for Javascript. function pad(n) { return n < 10 ?…
-
2
votes1
answer5745
viewsA: Failure to reference a nuget package
This has happened to me, follow the steps that usually solves my problem. Make a "Clean Solution" Close the Visual Studio Via Windows Explorer, go to the folder of your solution Delete the folder…
-
1
votes1
answer344
viewsA: Group lines with null
Only with SQL Standard it is not possible to solve this. It is necessary to use analytical functions to analyze the data that will come in the next line, or that came in the previous line. This is a…
sql-serveranswered Thiago Lunardi 6,968 -
3
votes1
answer58
viewsA: Additional information: This Row already belongs to this table.
You cannot insert a row more than once in a table. The DataTable is a database relational table representation, so each row, in addition to the columns that have been defined, there is an internal…
c#answered Thiago Lunardi 6,968 -
3
votes1
answer212
viewsA: Toast notifications c#
You must use the service of Azure Notification Hub. Push notifications to any platform and back-end Reach all major platforms: iOS, Android, Windows, Kindle, Baidu Use any back-end: cloud or local…
-
2
votes2
answers209
viewsA: How to do a recurring auto update correctly?
I understand what you want to do, but this is not how you do it. Try to imagine a MMORPG, imagine the amount of hits that your database will suffer if it has thousands or millions of users. For this…
-
0
votes2
answers405
viewsA: How to integrate a Web Application with a Postgis database? What is the best way?
To make your life easier, there is in Azure Marktplace an already configured VM with all this: Opengeo Suite. Manage and store data reliably with Postgis Publish maps and data from a Variety of…
-
5
votes2
answers229
viewsA: Can try catch be replaced by using?
You exchange only the try/finally for using. Wherever there is try/catch continues to be the same, because the using does not treat exception, it only ensures that an object will only exist within a…
-
2
votes2
answers398
viewsA: Create modules using Unity (Ioc)
I know the question is about Unity, but I hope to help anyway. I have a DDD project on Github - already quite dated, by the way, but still valid for your question - where I have the injector…
-
6
votes3
answers271
viewsA: How to avoid the use of setters in such cases?
Great maturity in your interpretation. What you’re realizing is that, an oblique entity has its vision modified by whoever is looking at it. Taking the example of a Person: The government sees you…
-
2
votes2
answers310
viewsA: Which object performs best? Sqldatasource or Datatable?
The question is performance/speed? So the answer is NONE. Both are extremely slow and expensive to be allocated, solved, populated, read, etc. They are very complete objects, but with complex…
-
-1
votes2
answers569
viewsA: Relationships in Viewmodel with EF
You’re doing it right, Paulo. And it’s very nice to see this level of organization and separation of responsibilities, congratulations. Work with ViewModels is essential. What is missing in its…
-
2
votes2
answers785
viewsA: How to create a Stored Procedure for two tables
The second insert You have a syntax error. Remove the as cadastro_detalhe that will work. insert into interditado_detalhe (interditado_id, usuario_id, serventia_id, data_cadastro /*as…
mysqlanswered Thiago Lunardi 6,968 -
1
votes2
answers885
viewsA: Doubts about DAO, MVC, Multiple Tables and POJO
About MVC: View: Views only. It is recommended to type - @model, and should never have business rules in this layer - this includes any conditional, such as if, switch, etc. If necessary, create a…
-
1
votes1
answer243
viewsA: Take an Httppostedfilebase and convert to Cloudfile (Azure Files) to avoid writing the File to the Server
To keep your file in memory without having to write to the disk, you should write your file to a…
-
0
votes1
answer258
viewsA: ASP.NET MVC Integration of accounts with office365 authentication
To authenticate users on your system using Office365 account, just use this guide: Walkthrough ASP.NET MVC Identity with Microsoft Account Authentication. But it won’t work as well as they expect.…
-
0
votes1
answer273
viewsA: Create side menu like Windows 10 Weather App
In the repositories Github from Microsoft you find a specific that has dozens of examples of UWP applications. Each one showing how to use a specific resource. Here you can see the list of Examples…
-
1
votes2
answers3313
viewsA: How to work with CSS labels
I did not understand if your question is about alignment or orientation in writing. I will answer both then. ALIGNMENT Align a <label> to the left: <div…