Posts by Vinícius • 4,111 points
101 posts
-
1
votes1
answer30
viewsA: How to access the value of a pointer within a function in main?
I need to access the counter pointer Pont_numero_de_low notas_inside of the main notas_low function, only the output is always 0. The little you implied of your problem, you’re getting a pointer to…
-
-1
votes1
answer43
viewsA: Javascript: Is there a way to do a do-while test the condition before the end of the loop?
Javascript: There is a way to do a do-while test the condition before the end of the loop? Directly answering the question’s title In any repeating structure in JS, you can perform a break to stop…
-
3
votes1
answer115
viewsA: It is recommended to use the JSON type in the columns in the table below
I’m learning relational databases, so I decided to create a school administration system If you are learning relational databases, you should set aside the type of JSON data and try to understand…
-
3
votes1
answer94
views -
3
votes1
answer49
viewsA: Doubt with virtual properties
Marking a property as virtual indicates that it can be overwritten by child classes. Some frameworks like EntityFramework use the virtual properties to create Proxies, allowing the implementation of…
-
5
votes3
answers216
viewsA: How does date comparison work using . toLocaleDateString();?
Strings in Javascript are compared character by character, from left to right until the characters are not equal, or over no other letter to compare. You can compare sentences: "a" < "b" // true…
javascriptanswered Vinícius 4,111 -
1
votes2
answers1295
viewsA: What is the difference between prop and Emit in Vue.js?
The very one v-model is a good example for your question. The v-model is a "syntactic sugar" that uses a prop call by default of value to pass information to the child component, and an event called…
-
1
votes1
answer156
viewsA: Select on map/img
The question is not clear enough, but responding to your comment I intend to join them and relate with a link, ie.. even add a javascript/css function to upload the image and sequence display a text…
-
2
votes3
answers707
viewsA: Foreach wait for the select result to proceed
I believe that the db.query does not return a Promise, but you can create a precedent for it to return when there is a result for your query, something like the code below; // Função a ser executada…
-
0
votes1
answer510
viewsA: Hide div in materialize css
The Materializecss has the following classes to help you hide or show some element according to breakpoints: .hide // Oculta em todos os breakpoints .hide-on-small-only // Oculta no breakpoint small…
-
0
votes1
answer55
viewsA: Dynamic Import with Webpack
It is possible to realize the import of the archives inline through the svg-inline-loader in the Webpack. To avoid collision of imports svg in the archives CSS required to use configuration issuer.…
-
1
votes1
answer55
viewsQ: Dynamic Import with Webpack
In an application Vuejs template Webpack, I need to import a number of SVG’s according to a user’s parameters. The SVG’s are fixed files, but are dynamically loaded into the application. If I import…
-
0
votes3
answers62
viewsA: Memory and processing - Variables and verification
It makes no difference if you are compiling using the mode Release (with optimize code enabled), which should be used for production environment. In both cases, the code Intermediate Language…
-
1
votes1
answer288
viewsA: Api receiving date with changed month and day
When working with dates on client-side, always try using the date format ISO8601, that when sent to webApi will be correctly transformed by jsonSerializer independent of the location configured on…
-
2
votes3
answers386
viewsA: Call a single time method within an Event Handler that is called several times?
You can give a unsubscribe in the event after it runs for the first time. Something like: EventHandler meuEventHandler = null; meuEventHandler = (object sender, MeuEventArgs e) => { helloWord();…
-
0
votes2
answers71
viewsA: Controller code is executed but nothing happens
This code snippet performs an asynchronous request to your Controller: $.ajax({ url: "/Pensamento/Pesquisar", type: 'POST', contentType: "application/json; charset=utf-8", data: '{termoAPesquisar:'…
-
7
votes3
answers403
viewsQ: Best practices in Javascript variable declaration
In the MDN Variables section we have the following statement: For that Reason, it is Recommended to Always declare variables at the top of their Scope (the top of global code and the top of Function…
-
9
votes2
answers249
viewsA: What is a Saas anyway?
Using Azure as an example, The image above tries to illustrate a bit the difference between each of the available cloud modes in Azure. Iaas - Infrastructure as a Service: The provider provides all…
-
1
votes2
answers1081
viewsA: Pick Selected Element from UL
The code below is capturing all clicks performed on the document, checking if the element clicked is a LI and displaying the textContent of your first child element.…
-
3
votes2
answers164
viewsA: Types of C#Methods calls
How one method can "call" another method, what is the name of it? You are reading the code wrong. The correct one would be to affirm that the result of one method is executing another method. This…
-
3
votes2
answers639
viewsA: Event onClick is not working!
Quick response You can attach the event to a parent element that is fixed in HTML. This way, you don’t need to give the bind to the dynamically created elements. In the example below, I am creating…
-
0
votes2
answers659
viewsA: Know idle mouse time
I think the best way would be to capture if he moved the mouse. Specifically answering the above question, you can identify with the following javascript code: //variável representando o tempo…
javascriptanswered Vinícius 4,111 -
3
votes4
answers3995
viewsA: How to make a link button in Angularjs
As far as I know, the tag button does not have the attribute href. Another point, if you want to navigate to the route /register , you need to change your location for '/register' , removing the…
-
9
votes5
answers819
viewsA: Is the rest of the code inside Try executed after finding Exception?
Short answer: It will display the value 11. The value 21 would never be displayed as the catch block is executed only when there is an exception. Long answer Come on, straight from MSDN When an…
-
2
votes2
answers71
viewsA: Use a Textfield to describe a path to save the files
Use the method Directory.CreateDirectory. It will create all necessary directories and subdirectories, unless they exist, as documentation. Creates all Directories and subdirectories in the…
-
3
votes2
answers9382
viewsA: In CSS, is there any way to define the inline Hover?
Unable to define pseudo-class rules in inline css. CSS inline can only contain property statements. However, in the specific case of Hover, you can use something similar to: <a href="#"…
-
8
votes2
answers321
viewsQ: Are static classes shared by threads?
Static classes, methods and properties are shared between threads of the application? That is, if I modify the static property foo in ThreadA, and then modify the same static property foo in…
-
14
votes2
answers12979
viewsA: How to apply scrollbar only to the tbody element in an HTML table?
Change the display of thead and of tbody for block, set the maximum element size tbody and modify the property overflow-y for scroll. thead, tbody{ display: block; } tbody{ overflow-y: scroll;…
-
6
votes4
answers343
viewsA: Why not always use Optimize Code?
The option Optimize Code is enabled by default when you perform the build in release mode. The optimizations performed by the compiler may end up hindering the debug while you are developing, this…
-
1
votes1
answer496
viewsQ: Map class with json.net
Is there any way to map the properties name of a class without using the Annotation JsonProperty of Json.NET? The following structure shows two classes that inherit from the Bar class. However, the…
-
3
votes2
answers250
viewsA: Object error not instantiated
If I specifically address your problem, the object c.estado needs to be instantiated before you assign some value to properties id and sigla. You can accomplish this in the method itself:…
-
10
votes2
answers932
viewsQ: Best practices when working with Multithread
Is the pseudo-code below following the good practices for an asynchronous code? It should: Synchronously start several tasks; After starting tasks, wait for all tasks to complete a post-processing;…
-
4
votes1
answer1072
viewsA: Keyboard event does not work Jquery
You must use the event keydown in this case, because the event keypress will not be fired by keys that are not "printable", like the arrow keys on the keyboard, for example. The keypress Event is…
-
6
votes1
answer2378
viewsQ: What are the differences in performance when using querys with EF vs ADO
What is the difference in performance when using the basic query methods SqlQuery<TElement> and ExecuteSqlCommand of Entityframework in relation to directly using the ADO.NET? If there is…
-
1
votes2
answers418
viewsA: What javascript function do I use to extract an HTML block from one place and insert it into another on the same page
You can use the code below as an example, it: Captures the element h1 desired through the ID Captures the element container through the className Adds to the textContent container a new clone…
-
2
votes3
answers535
viewsA: how to perform calculations between 4 input, loading page or change value
Explaining the code below; Through the ID, captured the references of the HTML; Added an event for the elements desconto and frete, so that these will perform the function calcular() whenever a key…
-
3
votes1
answer546
viewsQ: Working with high processing load in a table
What are the possible strategies of database modeling in a scenario where one has a specific table that receives a gigantic load of statements of insert, update and delete, in addition to high data…
-
3
votes4
answers651
viewsA: display:One consumes data?
In addition to the Many Different display box types, the value None Lets you turn off the display of an element; when you use None, all Descendant Elements also have their display turned off. The…
-
2
votes1
answer1246
viewsQ: Update multiple records with Entityframework
Assuming I have the following appointment: UPDATE tb_foo SET idoso = 1 WHERE idade > 65 To carry out this same process in Lilli, I have IEnumerable<Foo> foos = contexto.Foos.Where(e =>…
-
4
votes1
answer2169
viewsQ: Best practices when filtering a query with Entityframework
I have a web api method that receives a model from a search form and according to its values, it starts to filter the result of this search, as an example below. public HttpResponseMessage…
-
2
votes3
answers838
viewsA: Uncheck a checkbox by clicking outside of it
Using the answer and the link offered by @Samirbraga, follows below code without using the event.stopPropagation(); var checkbox = $('#button-menu'); $(document).on('click', function(event) { if…
-
0
votes1
answer680
viewsA: How to return query by a string using Webapi?
The :String is not a valid Constraint for route configuration. Below is the link of constraints allowed for route configuration. Check if without this Constraint your code continues to raise this…
-
0
votes1
answer68
viewsA: View different HTML in Web App
I believe the resource media query can help you. The code below informs that the elements with the class .only-webapp will have display:none while the width is below 400px. @media(max-width: 400px){…
-
2
votes2
answers335
viewsA: How to receive multiple fields from a view in the controller
In case you want to keep the system with html pure or razor, modify the attribute name of their inputs and receive them in list form in your actions, as an example below. Html <tbody> @{ for…
-
2
votes1
answer146
views -
4
votes3
answers9903
viewsA: Get the last N characters from a string
The constant is that always the last 8 numbers are the numbers of the phone, I wonder how I separate these last 8 numbers from the remainder. Use the Substring using as parameter the size of your…
-
4
votes1
answer235
viewsQ: Updating collections with Entity framework
It is possible to update the Collection of an entity with one-to-many through his navigation property? public class Foo { public virtual IList<Bar> Bars {get; set;} public int FooID { get;…
-
1
votes1
answer184
viewsQ: Progress when requesting to download a file with Fileresult
How can I display a progressibar while the server processes a Fileresult return? I tried to perform the operation with Ajax, but it is not possible to download a file via ajax without redirecting it…
-
1
votes3
answers1235
viewsQ: Problems with Data and Globalize
When performing the Submit in a form with a date dd/MM/yyyy, the value is converted to the American format in the controller, leaving MM/dd/yyyy. Through the answer of this question, configure…
-
3
votes1
answer97
viewsQ: Use viewbags for metadata or place them in a Viewmodel
In the scenario below, I own a View that depends on some ViewBags to fill in options in selects html. When performing the POST and if something goes wrong in the registration, the user is redirected…