Posts by Ricardo Rodrigues de Faria • 983 points
33 posts
-
2
votes3
answers1534
viewsA: Create global function in Angularjs?
You can create a service that provides this function, is the angular way of doing something like. angular.factory('meuServico', meuServicoFunction); function meuServicoFunction($mdToast) { var…
-
0
votes2
answers260
viewsA: Angular - delete $Scope.categoria_nova;
When your screen renders, the angular understands that it references the variable $scope.categoria_nova that was not instantiated in the controller, so it is the instantiation automatically. When…
-
1
votes2
answers556
viewsA: How to change the value of an input by a Factory?
The modification you are making, is outside the scope of the angular, it is done directly in the html element. Currently, the angular cannot recognize this type of change and therefore it is…
-
2
votes1
answer367
viewsA: How do I choose the right scope for a bean?
The difference is basically in the duration of each. @RequestScoped It is born and dies after each request, no state is saved. It should be used on pages that only send data for viewing and have no…
-
2
votes1
answer468
viewsA: Hibernate Multitenant problem with identification of current tenancy
The MultiTenantSchemaResolver is only responsible for defining which schema will be used, the responsible for the "magic" of schema exchange is the MultiTenantProvider. Look at these methods…
-
6
votes1
answer640
viewsQ: What is the difference between a DLL produced with C++ and a C#
After some time searching, I did not find any results for this issue, the topics already existing in MSDN also returned nothing in relation to support of the 2 in Windows. In summary, the question…
-
1
votes1
answer146
viewsA: Include additional files to the DLL with JNA
I’ve gone through all the documentation on JNA and there really is the possibility to attach a file to the execution of DLL, the solution I found was to create methods in the DLL to assign the path…
javaanswered Ricardo Rodrigues de Faria 983 -
0
votes2
answers61
viewsA: Doubt $http Angularjs
Guilherme, as quoted by @Murilomittmann, it is possible to do yes, but it was not made for this, the ideal is to use GET. The http protocol describes that GET should be used to request resources, so…
angularjsanswered Ricardo Rodrigues de Faria 983 -
2
votes2
answers1154
viewsA: How can I order a Linkedlist?
Tomé, for this situation of simple ordering, you do not need to implement a whole comparison logic, java itself already provides Apis for sorting lists through the method Collections.sort(), this…
-
0
votes1
answer146
viewsQ: Include additional files to the DLL with JNA
am having a problem running a DLL in Java via JNA, the DLL searches for a file that is in the same folder called "propriedades.properties", this DLL works normally, but when using JNA it does not…
javaasked Ricardo Rodrigues de Faria 983 -
1
votes1
answer1538
viewsA: Validate Login with Sqlite
I have no way of knowing which return executed after this code, but is probably checking if the user is different from null, I would make the following change: Usuario usuarioLinha; if…
-
4
votes1
answer152
viewsA: How does Angularjs databinding and Dirty-check work?
First I will answer regarding Dirty-checking, in the case of angular, once an object is bound to the scope, all values of the current state of the object are saved and the object is "marked". Every…
-
3
votes2
answers140
viewsA: Angularjs - A service is not "static"?
When making an exchange using window.location, what happens is a page exchange by the browser, so the entire angular application is reloaded and the values reset. It’s like opening up from scratch.…
angularjsanswered Ricardo Rodrigues de Faria 983 -
2
votes1
answer303
viewsA: Performance when generating a JSF table
To make official an answer. The main problem in question is the lack of use of Lazyload and not in select. Page rendering, even with purely html element, are able to lock your browser considerably…
-
3
votes1
answer659
viewsA: Angularjs - Modularize a code to be reusable in multiple projects
Some important points on the definition of reusable modules: The module name cannot be something simplistic that can already exist in the application (this would generate conflicts at the angle),…
angularjsanswered Ricardo Rodrigues de Faria 983 -
3
votes2
answers2346
viewsA: Angularjs - File organization for large project
The first point I would like to address is with regard to libs, most of the current Angular projects, use the dependency manager bower, the bower is responsible for controlling the libs versions of…
angularjsanswered Ricardo Rodrigues de Faria 983 -
0
votes1
answer956
viewsA: How to disable spring security
commented the excerpts that activate the spring security of your web.xml trying to explain what each excerpt is responsible for doing, it is important to note, that although spring security will be…
-
13
votes1
answer8620
viewsA: What is $Scope for. $apply ?
In Angular 1.x, current version, changes made "outside" of the angular are not identified by it, $scope.apply() or $scope.digest() do the job of asking the angular to review their variables in…
-
2
votes3
answers2556
viewsA: How to know how many objects were instantiated?
In Java there is a modifier called static which makes the values/methods within the scope of the class, not the instance, so you can easily create a variable public static int contadorInstancias =…
-
2
votes1
answer168
viewsA: JPQL - SQL query
You are trying to write an sql query in a JPQL, in fact, the navigation in a JPQL works like the navigation in your same class, no tables involved, so to make your query the correct one would be.…
-
2
votes3
answers182
viewsA: How to instantiate an Activity with Edittext fields without being automatically selected?
By default android always marks what contains the input with <autofocus/> or the first, a solution is in onCreate insert the following excerpt: InputMethodManager imm =…
-
1
votes2
answers959
viewsA: How to remove item from array in Service after using $filter in the Angularjs controller?
Index is modified because your list does not have an attribute track by, it is used so that the angle can find the object and mark it if you do not enter the track by, it automatically creates a key…
angularjsanswered Ricardo Rodrigues de Faria 983 -
0
votes1
answer125
viewsA: Import Android library in Java project: Noclassdeffounderror
If the library in question uses Android features, as is the case of the package android.os, then you won’t be able to use it in a java desktop project. The library was not designed in a way to keep…
-
1
votes4
answers541
viewsA: Navigate through screens carrying information
The most common practice is the use of query Parameters, in the case exactly as you are using. Thus, when loading a controller, it is simpler to know if the route in question is for editing or new…
-
3
votes3
answers2015
viewsA: How to create a controller service?
This code presented by you could rather be converted into service, the issue is that what it does, is not the behavior of an angular service. In general, services offer access to features or…
angularjsanswered Ricardo Rodrigues de Faria 983 -
3
votes1
answer82
viewsA: Directive as Function parameter?
only a correction {{login.user}} is not a directive, is an expression. Now responding, you do not need to use the expression, just insert serviceLogin(login.user, login.pass) that the angular will…
-
0
votes1
answer133
viewsA: Problem with JPQL using JSF
the mapping is correct, so must be missing the definition of the class in the persistence.xml, an alternative, is to enable automatic detection, where JPA will fetch the project classes annotated…
-
2
votes1
answer201
viewsA: SQL/ JPQL query
You can directly return one Map, just write the following query: SELECT new Map(q.codigo, q.pergunta) FROM Questao q WHERE q.curso_codigo = ?1 AND q.complexidade = ?2 This query should return a Map…
-
4
votes6
answers17707
viewsA: How to validate date with Angularjs or jQuery?
The angular does not offer any kind of function to validate dates, at least not that I know of, but there are several directives that take care of this. Alternatively, there is the javascript…
-
1
votes1
answer375
viewsA: Hibernate brings the incomplete object (without foreign keys)
As stated in the mapping, its Collections linked to the Questao object are "Lazy", check here in the mapping: <set name="compartilhamentoQuestoeses" table="compartilhamento_questoes"…
-
1
votes1
answer391
viewsA: Render delay with Angular + jQuery
This is a very common doubt, the angular actually renders page and directive elements without having loaded some elements, this is normal. To correct this, there is a directive of the angular core…
-
1
votes2
answers367
viewsA: User authentication with $rootScope
I believe that analyzing a rule on every route that is only valid after login is a waste of processing. You can register a specific System for the user variable and only redirect it when it changes,…
angularjsanswered Ricardo Rodrigues de Faria 983 -
2
votes1
answer107
viewsA: Offline Web application server and client application takes position
There is way yes, from html 5 there is a specification own for offline app, besides there are several Apis that facilitate the cache of Resources to take over when the server for some reason is…