Posts by novic • 35,673 points
1,265 posts
-
1
votes1
answer96
viewsA: Run unit test with memory database and fromsqlraw is giving error
The same problem contained in the OS questionEn Entity Framework Core Fromsqlraw mock test cases, reports through the link that the in-memory database does not support pure SQL execution and the…
-
1
votes1
answer49
viewsA: How to format number string with . net core?
This is simple just using the toString("N0") with N formatting in number and zero removing the decimal part and also to put the culture of Brazil specify in the second parameter:…
-
2
votes1
answer64
viewsA: How do I not need to request the api all the time?
The simplest can be used the Cache in-memory in ASP.NET Core (translation: Memory cache) that can be configured in seconds, minutes, days, etc. its permanence in the information memory, that is,…
-
0
votes1
answer38
viewsA: How to show the data on the front end using Razor pages?
To display following your last question (How to consume data from an api to show on the front end using Razor pages?) to which you want to print on your screen only cities follow the example below,…
-
2
votes2
answers97
viewsA: React components that receive ownership of an object as content do not update, how to deal with it?
These days had the same problem is a question, where I even reported to the user who asked me about copying the new state to the object, which in case I used spread operator, so I understand when…
-
0
votes1
answer216
viewsA: How to consume data from an api to show on the front end using Razor pages?
Relevant remark: that one api returns an object that in its members has other objects and one of them is a list of cities, so there is no way to return for this api what is asked and I decided to…
-
1
votes1
answer71
viewsA: Remove All from a list
Missed what object crave rule out of the list and the correct method is splice that removes the item from the list, and Slice returns you parts of a array and it’s not what you need. There are other…
-
1
votes1
answer40
viewsA: How to insert data from one array into another for object type
Can map to a new variable the data contained in a array and taking each position and turning into objects with key and value and for this use the method map of array to recreate this array object,…
javascriptanswered novic 35,673 -
1
votes1
answer132
viewsA: Contador simple em Javascript
Basically need to show the data as the start and end with certain step by step, did right (basically) but at the time of showing it should be accumulative and at the end of the day its code always…
-
0
votes1
answer28
viewsA: Help with PHP Multidimensional Array?
You can use a array_map for the construction of a new array by the initial model, is a array main and within each other position array, with a simple change function can be made a array representing…
-
2
votes2
answers258
viewsA: Sort array within another array with Reactjs
Create a new state called sumary to summarise the array state-owned players and the same operation that is done directly in the table does in some method or when loading the component. In…
-
3
votes1
answer60
views -
0
votes1
answer137
viewsA: Dynamically change field in Reactjs
Your code has many problems and errors that I ended up identifying as for example onChange has a delegate different defineRisco() and caused a erro, the other situation is the kind of <input>…
-
0
votes1
answer78
viewsA: How to change the style of a Komponent that was imported into React with Styled-Component
Basically I did the test in your code and it’s working perfectly, of course I use <Input /> which has been the declared component, example: const Input = window.styled.input` border: 1px solid…
-
0
votes1
answer42
views -
1
votes1
answer63
viewsA: How to work with filter in an array typescript?
What you missed is confusing the variable created to show the information in your component with the one that returns a result of your API request, i.e., this.tipoRacas is the variable of the…
-
0
votes1
answer16
viewsA: How do I deactivate @Editorfor?
Just add readonly in the attributes part: @Html.EditorFor(model => model.cd_time, new { htmlAttributes = new { @class = "form-control", @readonly="readonly" } }) References:…
-
0
votes1
answer31
viewsA: Conditional rederization of a component from a selected item
What’s in the documentation says at the event onChange is responsible for changing the status of a previously configured variable in its component Autocomplete. This already happens in the natural…
-
2
votes2
answers131
viewsA: Inserting objects into an array through a loop
The correct way using the method push is to pass the new object created integrally, example: const aniversarios = [] aniversarios.push({ ... objeto criado}); Final example: const aniversarios = []…
-
1
votes1
answer240
viewsA: Use component when clicking on jsx button
There are always these problems about how to create a component within the other and in the current question how to render through the information collections, simple, just create a state of type…
-
0
votes1
answer169
viewsA: @bind and @onchange for a select on blazor c#
In Blazor only needs the element <select> have a bind for the exchange of information in the second <select>, a basic example illustrating a basic situation: Classes: public class…
-
1
votes1
answer364
viewsA: Using jquery field mask in ASP.net Core MVC
The way the installation is not done yet for ASPNET CORE, so follow these steps: Download the package on the website [ download ] : Unzip in a directory and search for the folder dist/ that has the…
-
0
votes1
answer222
viewsA: Add values from a column (array) - Vue.js?
I don’t quite understand your code, I’m going to propose here a way to sum up the items of a array by a certain key and also add new items in that array. Was used computed to create a function that…
-
1
votes1
answer34
viewsA: How to get an instance in . net core without using constructor
His example does not match the reality of Dependency Injection that can happen in the case . NET Core in two ways, by the constructor or by the method, the first already knows how the other works is…
-
2
votes1
answer301
viewsA: Change Laravel directory /directory 8
Yes it is possible to change the recording location of your images to the folder public, open the folder file config by the name of filesystems.php and create an entry in array disks by the name of…
-
3
votes1
answer45
viewsA: Node JS - Function with Return does not pass data
The correct and used way is as follows by returning the Promise and in the Node resolve and bring the result, example: AtividadesTodas() { return…
-
1
votes1
answer168
viewsA: Button Ubmit and building components dynamically in Reactjs
Usually when you start with React this is one of the difficulties to understand the state(s) of a component and when you want to create elements that may have a list in your case are ingredients of…
-
1
votes3
answers80
viewsA: Know the total values in the php array
Utilize array_reduce, that will reduce these array in another type of data with a specific value, in which case the reduction is the counting of items that are less than 7, creating a function…
-
0
votes1
answer19
viewsA: I would like to send data from a txt(read) file to a listbox
Basically to read a text file where each line represents a number ip and add in a Listbox is simple: using (StreamReader str = new StreamReader("ip.txt")) { string item = string.Empty; while ((item…
-
0
votes1
answer175
viewsA: Image gallery in React, how to select the active image and reflect only on the component itself?
Well I imagine that it is a product registration and inside has a list of images where the first image will appear as default and to the left the list of images of this product, when clicking is…
-
1
votes1
answer176
views -
2
votes1
answer128
views -
1
votes1
answer113
viewsA: Dependency Injection and Generic Repository Windows Forms C#
This happens in Desktop programming, because the entity is already in your Context and has not been removed in the first recording, so that you do not have this problem in all operations after the…
-
2
votes1
answer38
viewsA: append function only adds last item of my array
Using the same instance and overwriting only the value, examples: The wrong way: const names = ["Autur", "Pamela", "Vanessa"]; function show(values) { const ulNames =…
-
2
votes2
answers147
viewsA: query in PHP is empty but in SQL Server it works
To succeed in sending values to a Stored Procedure has to pass a array of parameters, minimum example: Table: Stored Procedure ALTER PROCEDURE [dbo].[SP_INSERT_SOURCES] @Name VARCHAR(50), @Created…
-
1
votes1
answer279
viewsA: How to format a field from a Jquery Datatable to Money format using the Jquery Mask Plugin?
Following this response from stackoverflow en Formatting Brazilian currency in Javascript in the method render add the function as in the example: { data: 'ValorParcela', title: 'ValorParcela',…
-
0
votes1
answer137
viewsA: How to open or close all items on an Accordion
There is a way that the elements appear in their entirety and also the opposite is true, write this Javascript obtained in the stackoverflow itself in the question: Bootstrap 4 Accordion Toggle All…
-
0
votes1
answer61
viewsA: useState in Reactjs?
To have the expected effect and type in the text box and show the result you have to use the useState to save the current status and in the event onChange of <input /> change this state,…
-
0
votes1
answer51
viewsA: REACT Condition for NULL value in Input
You are receiving a list of values and by the way you have created a single state variable for everything, this is the problem, when you have a list of values you have to change the position of each…
-
2
votes1
answer52
viewsA: How to get around the use of reserved database words with Hibernate?
Solutions found in stackoverflowEn In that reply: Postgres DDL error: 'syntax error at or near "user"' [Uplicate] is as follows: @Entity @Table(name = "\"User\"") public class User implements…
-
0
votes1
answer141
viewsA: Calling Api in useEffect doesn’t work?
Failed to execute the Promise for the execution to be processed: const [fullCurrency,setFullCurrency] = useState(''); function carregaMoedas(){ api.get('currencies?apiKey=do-not-use-this-key')…
react-nativeanswered novic 35,673 -
4
votes1
answer119
viewsA: Moment - problem with Timezone
In the documentation you have to call the method parseZone(false) for React-Native: const chegada = '2020-11-03T06:15:00.000-03:00'; const formatada = moment .parseZone(chegada) .format('DD/MM/YYYY…
-
0
votes1
answer98
viewsA: Problem in custom auth 7
There are two errors in your code one of them in the validation method where you placed the table users which is actually usuarios in the validation unique of cpf and email example as it should be:…
-
2
votes1
answer42
views -
0
votes1
answer42
viewsA: How do I get two numbers typed by the user via form and send to a function that will pick a random value between them in React
I don’t know where you’re learning React, because, is doing everything wrong, using commands that should not use and not using the state resources of the local component, minimal example to solve…
-
5
votes2
answers139
viewsA: What is the default (Object) for in C#?
In this particular case it is the operator pattern or literal which produces a standard value of a certain type, such as the standard value of a int is the number 0, the default value the literal of…
-
2
votes1
answer69
viewsA: How to change state of an object attribute with React Hooks
You are creating a new item in this object because it was written in the code a name totally different from the others and so it copies the existing keys and creates an id with the value already…
-
2
votes1
answer73
viewsA: Exception in Laravel Request validation
Create a custom validation with the command line: php artisan make:rule CategoryInputUnique generating in the folder app\rules a class CategoryInputUnique, inside has a method with the following…
-
2
votes2
answers1471
viewsA: How to change color of a div with button click on Reactjs + CSS
There are several strategies to change colors of some element with React but, yours was not the best choice, because, is mixing commands, components in React need to have global or local states for…
-
3
votes1
answer141
viewsA: How to Resolve Infinite Request Loop React.js?
In its code the useEffect need to know what to do, the code does not know what is the time of its stop or the moment that it can be executed. Since the code should be executed only once when…