Posts by M. Bertolazo • 653 points
37 posts
-
2
votes1
answer87
viewsA: Disable + one day of the week Datepicker
You can use the method getDay() to pick up the day of the week if it is 5 (Friday) you ignore the day too: function disableDates(date) { if (date.getDay() === 5) return false; var dt =…
datepickeranswered M. Bertolazo 653 -
0
votes1
answer106
viewsA: How can I count how many times a number appears in multiple arrays?
Assuming that onlyNumbers is already an array of arrays, since the Map method returns an array, I think you can do the following: first, to concatenate the arrays: var mergedArray =…
-
1
votes2
answers56
viewsA: How to ignore a query line in the database?
You can use the distinct to distinguish the results of select, but in this case I believe you want to distinguish only by the column "disposition", since it is the only duplicated/quadrupled in the…
-
0
votes1
answer35
viewsA: Registration game with Postman
You are calling the request the wrong way, the correct would be so: { "JogoNome": "Forza Horizon", "JogoDescricao": "Jogo de corrida realista.", "DataLancamento": "23/10/2012" }…
-
1
votes2
answers105
viewsA: C# calculator not working
In the Menuescreva() method you are instantiating the variables numero1 and numero2, which in turn are discarded at the end of the method. These variables only exist in the scope of the method. When…
-
0
votes2
answers249
viewsA: C# API Routes (Beginner)
You can do it like this: In your settings, the default will be: config.Routes.MapHttpRoute( name: "DefaultApi", routeTemplate: "api/{controller}/{action}" ); In your controller, you should use two…
-
1
votes1
answer57
viewsA: How to transform boolean input values to string values using C# (MVC)?
You should not treat this in your frontend, the user can handle this function. Send in your form to the controller the value of the field: $("Tipo_ope").val(); Obs: this selector may be wrong,…
-
2
votes1
answer198
viewsQ: Text-Align of a Label only
On a ". cshtml" web page I have several Abels declaring the class horizontal form and the class control-label. By default, these classes align right in my project, ie.. implement the property…
-
1
votes1
answer1366
viewsA: How to connect to Mongodb Compass Community?
First of all, I think it’s important to note that everything you need to know about mongoDB at the beginning, will easily find on documentation. To be able to connect to Compass you need to have an…
mongodbanswered M. Bertolazo 653 -
1
votes1
answer137
viewsQ: Calling Jquery function inside a For loop
$("#divOpcoes").fadeOut(500, function () { $(this).text('Opção ' + indiceAtual + ".").fadeIn(500); }) The line above is within a for loop and "indiceAtual" variable is incremented with each loop…
jqueryasked M. Bertolazo 653 -
1
votes1
answer258
viewsA: Fileupload is not passing the file to Code Behind
Researching a little, it seems to be a problem of Asp itself.. you need to add a Rigger to your Updatepanel in order to trigger an event at the click of the button: <Triggers>…
-
0
votes4
answers302
viewsA: getElementById not working
I believe your problem has to do with GIFT from the page, taking a look at the OS, I found the following reply, which, in my view, is the same case.. however, as I reported in the comment above,…
javascriptanswered M. Bertolazo 653 -
2
votes1
answer135
viewsA: Change print quality in C#
Try using the Eventhandler Printpage Kind property. using(PrintDocument print = new PrintDocument()) using(PrintPreviewDialog dialog = new PrintPreviewDialog()) { print.PrintPage += Print_PrintPage;…
-
1
votes1
answer51
viewsA: Continuing task execution even after exception
From what I understand, your problem is: you want to stop thread execution if within any of the methods there is an exception. The solution to this is: Your methods return a bool, which is set to…
-
1
votes1
answer30
viewsA: What is the best way to return function-specific error codes?
I believe that this is something particular of each programmer and each project, there are several ways to make a validation method, for example: have those who prefer to show errors through a class…
algorithmanswered M. Bertolazo 653 -
0
votes1
answer64
viewsA: C#XML Namespace Control
Reading a little the documentation I found the following: the attribute xmlns means Namespace, and there are also several examples, in your case, test this: XNamespace nameSpace =…
-
0
votes1
answer61
viewsQ: Linq to Objects - Performance
When searching for best practice content when using LINQ I came across the following filter situation: // Filtros int idBairro = 8626; first way: IQueryable<TesteConsulta> queryCidade = (from…
-
0
votes1
answer79
viewsA: Linq to Entities - Count elements of a query referencing two contexts
I meeting with a more experienced developer has found the following solution: First I managed to reduce one of the querys by already existing a database view with the data from the third. Working…
-
-1
votes1
answer79
viewsQ: Linq to Entities - Count elements of a query referencing two contexts
I have the following query: var query = (from q1 in query1 join q2 in query1 on q1.idGenerico equals q2.idGenerico into q2Left from q2 in q2Left.DefaultIfEmpty() join q3 in query3 on q2.idGenerico…
-
0
votes1
answer27
viewsA: Printpreviewdialog in the browser
I believe that the right command is this, in case someone has the same doubt: Page.Registerclientscriptblock("Print", "window.print();")
-
0
votes1
answer27
viewsQ: Printpreviewdialog in the browser
I have the following code in a MVC project inside a cshtml: var w = window.open('', "print", "height=400,width=600"); w.document.write(json.html); w.document.close(); w.setTimeout(w.print, 1000); It…
-
0
votes1
answer41
viewsQ: Rescue button through id
Good night, I’m developing a graph, academic work.. .. The idea is to make a "maze", so I go the same at runtime, and I keep a "reference" of each button in a list, but I got to a point where I need…
-
1
votes2
answers1092
viewsA: How to use Insert with multiple C# SQL records
I believe your problem is in the syntax of Insert, if you perform all cmd that are commented on, you would make a record for each line.. a solution would be: insert into ccliente TODAS AS…
-
-1
votes1
answer616
viewsA: What is the difference between Getkeystate() and Getasynckeystate()?
Apparently it has to do with return of the method, in the documentation there is a specific explanation: "The key status returned from this Function changes as a thread reads key messages from its…
-
4
votes1
answer435
viewsA: Demonstrate calculator in Stack
It is common for calculators to use batteries, there are even calculators that work with RPN, but in your case I believe that it is not necessary RPN. What you should do to work with stack is to…
c#answered M. Bertolazo 653 -
0
votes1
answer105
viewsA: How to show a message after a send action?
Well, I believe that your mistake is in logic, in your "IF" you have an exception, and in your "ELSE" would be where you actually send the email, IE, Toast should be at the end of ELSE, so: //When…
-
4
votes2
answers1020
viewsQ: Format ZIP in Query - Mysql
In my column of the bank I have the field CEP varchar(20), and a record: "92820142" there is some way to format in the pattern: 92,820-142 during the consultation? I tried using the format, but it…
mysqlasked M. Bertolazo 653 -
8
votes1
answer4507
viewsA: Httpwebrequest fault
I found the solution in the comment link, the problem was security protocol, just add the following line before resquest: System.Net.ServicePointManager.SecurityProtocol =…
-
4
votes1
answer4507
viewsQ: Httpwebrequest fault
I’m trying to consume a Webservice via Webrequest in c# and I just can’t get any response from the server. However, via Postman I get the answer using the same parameters. code: var JsonCliente =…
-
0
votes1
answer62
viewsQ: Increment object to HTTP request
I am trying to make a request in which I send a JSON (POST) and receive another, I am doing the following: mount/feed my object and call this request: string URLRequest = URL + customer_id +…
-
2
votes3
answers7927
viewsA: Doubt about Struct and Pointer for Struct
Good morning, I believe these doubts of yours exist because you haven’t mastered pointers and struct yet.. I will try to answer in a simple and easy way according to what I know. 1) Because I don’t…
-
1
votes0
answers46
viewsQ: Chart.Js mousehover action
Hello, I would like to know how to increase the size of the "legend" in the mousehover action of the Chart.js.library. I read and did not find in the documentation, someone would know? follows image…
-
0
votes1
answer681
viewsA: Delete record in text file
comment * Dude, because you’re working with Vector logic it has to be something like this: Modify: 1- Ask what the name of the film is. 2- Scan the vector by comparing. 3- With the vector in hand,…
-
0
votes1
answer219
viewsA: How to store the distinct elements that occur in another vector?
Good morning, first I strongly suggest that you fix your code and work with Linked list, which is much easier. But let’s answer: In the vector below 300 elements, I need to store the elements…
canswered M. Bertolazo 653 -
-1
votes1
answer305
viewsA: Parameters named in - Asp.net url
I will use the answer field because I cannot comment yet. What you’re doing with the snippet is sending two attributes through the URL, you can: 1-use attributes this way (pull URL information to a…
-
1
votes2
answers924
viewsA: How to locate a value that is in the vector but in the incorrect position?
Man, learn to debug your code. To locate a position of a value in a vector you can do a function that sweeps this vector looking for a given value. make go inside for is a bad programming practice..…
canswered M. Bertolazo 653 -
0
votes4
answers1252
viewsA: What are ASAX extensions for?
Hello, from my experience with C#, Global.ASAX serves as a start of your system, is a manager, will manage what happens in case of errors and what you do when you start a debug