Posts by Eric Chiesse • 368 points
8 posts
-
1
votes1
answer380
viewsA: Django does not validate changed fields in the client by JS
The validation problem occurs because you are putting queryset=Curso.objects.none() in cursos_da_area = forms.ModelMultipleChoiceField. queryset values are used exactly to validate user input. When…
-
1
votes1
answer174
viewsA: How to add directories to search for modules in Lua?
Lua searches the modules using the variable package.path which in turn is started by reading a system variable called LUA_PATH. To add a new place to search for modules just change one of these…
-
0
votes1
answer90
viewsA: How to make a generic implementation of the Bisection method in MATLAB?
It is possible to isolate the method in MATLAB. For this, you need to use function handlers The following function implements the bisection method: function [x, err] = rootBissect(fn, xMin, xMax,…
-
2
votes1
answer793
viewsA: Noreversematch error in Django
In your for in index.html you should call perfil.id and not keyPerfil.id The line would look like this: <a href="{% url 'exibirURL' perfil.id %}">{{perfil.nome}} / {{perfil.email}}</a>…
-
1
votes3
answers142
viewsA: Is there any way to get a particular line from a string?
I would split the string based on the rows and then take the second row indexing the resulting table. Ex: s=[[Pão com Requeijão]] function split(str, sep) local ret = {} str = table.concat{str, sep}…
-
2
votes2
answers528
viewsA: How to call class method in another app?
It can be simpler and more elegant yes. Use the module only and create a function that gives access to an internal dictionary of the module. Ex: File "Config.py" _parameters = { 'url_m' : 'domain',…
-
1
votes1
answer41
viewsA: Doubt in case of Stop
If I understand you correctly, you mean that the lists are equal if the second element of each item is equal. That is, the comparison should be made only by the second element of the tuple. In fact,…
haskellanswered Eric Chiesse 368 -
2
votes1
answer221
viewsA: How to use a class array as a pointer?
In the first case it is in the stack and in the second in the heap. But in both cases the members should be accessed with the . and not with ->. Only use -> to override a pointer. But you’ve…