Posts by Matheus Bessa • 1,261 points
36 posts
-
11
votes4
answers4547
viewsQ: What’s the difference between Promises and Observables?
Can anyone explain to me the difference between Promises and Observables? I would like to understand the advantages and disadvantages of each. Which is more performative, which applies a best…
javascriptasked Matheus Bessa 1,261 -
1
votes1
answer58
viewsQ: What is the difference between Httprequestcontext and Httprequest? And how to convert Httprequestcontext to Httprequest?
What is the difference between Httprequestcontext and Httprequest? And how to convert Httprequestcontext to Httprequest?
asp.netasked Matheus Bessa 1,261 -
3
votes1
answer1042
viewsQ: What is ASP.NET’s Httphandler and Httpmodule?
What is the Httphandler and Httpmodule of ASP.NET? How they work? And how to use?
-
2
votes2
answers63
viewsQ: Is it possible to insert the character '#' (hash) in the MVC routes?
It is possible to insert the character # (hash) on MVC routes? I am developing an MVC application in which one of the specifications is the use of # on the MVC routes. Is it possible to do this…
asp.net-mvcasked Matheus Bessa 1,261 -
2
votes1
answer761
viewsQ: Difference between Nhibernate first and second level cache
When searching for cache within Nhibernate, I found that there are two levels of cache that can be used, the first level and the second level. I found articles with implementations of both types and…
nhibernateasked Matheus Bessa 1,261 -
1
votes0
answers205
viewsQ: How to use Nhibernate cache with C#
Guys, how can I use cache in Nhibernate with C#? What is the best way to implement? And what considerations should I take?
-
4
votes1
answer103
viewsQ: Datareader blocks using Datareader "Close()"?
I have a little doubt regarding Datareader’s inside using blocks. If my Datareader object is inside a using block, will it be closed at the end of that block? Or do I have to insert the Close…
-
1
votes3
answers8406
viewsQ: ORA-01036: illegal variable name/number
I’m having a little problem in my application. The routine of INSERT causes me to make a mistake: ORA-01036: illegal variable name/number Remembering that the database is Oracle and the application…
-
3
votes1
answer1347
viewsQ: "Invalid Data" error when trying to decrypt a file using Tripledes
I am developing a routine that decrypts information from a ". txt" document using Tripledes. But when decrypting it generates the following error: Invalid data. Stacktrace is like this: in…
-
0
votes2
answers13820
viewsA: Differences between If and ternary operator ?:
As I know Resharper analyzes the "simplicity" of the if and suggests the expression "?:" to replace the if. I believe I’ve won in performance, yes, but nothing so significant. But consider one…
-
14
votes3
answers27590
viewsQ: How to encrypt and decrypt MD5 data using C#?
How to do MD5 encryption with C# of a text or file? And once it’s encrypted, how to decrypt?
-
1
votes3
answers9362
viewsA: How to get the value without a mask from a Maskedtextbox?
Instead of the text, you can use replace indicating the character to be taken and what will be rewritten in it, in case nothing (""). Example of a CEP field: mtxtbCep.Text.Replace("-",""); Or:…
-
6
votes2
answers2788
viewsQ: How to create a report with Crystal Reports parameters?
How to create a report with parameters in Crystal Reports? Create the report for me has no problems, but now I need to filter it according to some parameters of the system table. Can someone help me…
-
2
votes3
answers1796
viewsA: Query in an SQL string in C#
It is also nice to use parameters to your method Sqlcommand(). Example: public void SeuMetodo() { string commandText = "Insert into AppSignin(UserName) values ('@userNameParameter')"; using…
-
9
votes2
answers4809
viewsQ: Entity Framework with Oracle Banks
I am creating an application in which will use an Oracle database, but when inserting the .edmx (Entity Data Model) I came across the following situation! I can’t create a connection with Oracle…
-
1
votes2
answers957
viewsA: Loading a report in Web Forms
I found what was missing in my code. It is necessary to use the method Exporttohttpresponse() class Reportdocument() in which it asks for some parameters such as: The export type (pdf, xls, txt..)…
-
1
votes2
answers957
viewsQ: Loading a report in Web Forms
I intend to generate some reports in my application and I am using Crystal Reports. The Report itself is correct but I can’t load it on my page (.aspx). Follow the Load event code of my application:…
-
1
votes1
answer169
viewsA: Updater of a web application Asp.net mvc
You’ve heard of the framework Quartz . NET? Quartz . NET is an open-source scheduler framework based on .NET. It seems to be a great tool. I’ve never used it, but it follows a few tutorials…
-
1
votes2
answers217
viewsA: Form in view with subforms in partialView
Create properties in your main model of the models that will be loaded in your partitals. So you only need to reference a single model in your view, regardless of what your partials views can load.…
-
7
votes9
answers37388
viewsA: What should I use in CSS, id, or class?
ID is the identity of a tag. It is unique. The class you use for a group of tags. They work the same way, but try to use the id only on specific and unique tags of your system. So you avoid…
-
1
votes1
answer484
viewsQ: How much to charge on a website?
Much is said about how to develop a web application, a website or even an e-commerce. But one question that I think a lot of developers have is, "How much should I charge from this site?" How much…
c#asked Matheus Bessa 1,261 -
5
votes2
answers6454
viewsA: How to clean the combobox without losing the items?
For this you must set the selectedIndex to the first value of your combo box. In this case it would be the index "-1". Example: comboBox1.SelectedIndex = -1;
-
5
votes3
answers18905
viewsA: Algorithm for betting creation on Lotofácil
Since I am quiet, I have developed a routine that generates these "games" randomly. Take a look at: public List<int>[] GeraJogos(int numeroDeJogos) { List<int>[] jogos = new…
-
1
votes5
answers2197
viewsA: How to create a switch.. case with value ranges?
Come on. If it’s "like this," we can write something like this. public void Tests(int diasInseridos) { int dias = diasInseridos; bool selected = false;//variavel que aciona um 'break' no momento em…
-
2
votes3
answers3813
viewsA: Reports in C# MVC
I recommend using Crystal Reports. Here are some links: Download Crystal Reports SAP Crystal Reports website for developers The implementation is simple and very similar to any reporting software.…
-
0
votes2
answers1634
viewsA: How to create reports in Cristal Report with data from 2 or more tables?
I was able to find the problem and a solution! The Database Field configured above is a Database Field of type XML, in which it has full compatibility to queries with a table. However when…
-
0
votes4
answers1531
viewsA: List all Roles in Checkbox and mark the roles that the User has
The checked property is not boleana, once declared it selects alone. Try using this in the View: <div class="col-lg-7"> <h4>Permissões</h4> @foreach (var item in ViewBag.Roles) {…
-
4
votes1
answer308
viewsQ: Automatic reading routine between 2 C#databases
I need to create a C# routine that reads 2 databases and feeds the reading data into another database. The development part of the system itself I can do without problems, but I don’t know what kind…
-
1
votes2
answers1634
viewsQ: How to create reports in Cristal Report with data from 2 or more tables?
How do I create reports by Cristal Reports, using a Dataset that contains more than one Table? With a table I can work normal, but when I insert more than one table the result of the Report comes…
-
1
votes5
answers1583
viewsA: How to get the number of weeks in a date range in C#?
Try to use this, simpler: public int totalSemanas(DateTime dataInicial, DateTime dataFim) { return (dataFim - dataInicial).Days / 7; }
-
0
votes3
answers6710
viewsA: Checkboxlist on ASP.NET MVC
Try to use this. View: @using (Html.BeginForm("Index", "Home")) { <input type="checkbox" name="exemplo" /> <input type="submit" value="Submit"/> } Controller: [HttpPost] public…
-
1
votes2
answers1994
viewsQ: Get Post Data in ASP.Net MVC
I’m using MVC in my application and in Views I am using several tools from Telerik. I need to get some information from a POST that I give in mine View. Segue View: <div class="div-grid">…
-
7
votes2
answers362
viewsQ: Error using File.Delete method within Controller
I’m in trouble in my controller the moment I start a file deletion routine. I am using the method File.Delete(), but he simply does not recognize and returns me the following warning: Cannot Choose…
-
5
votes3
answers19154
viewsQ: How to take the path of the open executable in C#
How do I take the path of the project in c#? Is there any function? Or I have to write the full path on my application?
-
0
votes1
answer2060
viewsQ: OCI-22053: overflow error - C#
I am developing a web application in MVC with C#. I made a method that makes a select in my bank oracle and with the value returned I fill a DataTable. But it returns an error the moment I run…
-
2
votes1
answer6871
viewsQ: Authentication and User Permission with MVC
I’m developing an MVC 3 application, using C# for Models and Controllers and Razor with HTML for Views. I want to implement authentication and user permission to the system. How can I do this using…