Posts by Daniela Morais • 4,687 points
91 posts
-
2
votes1
answer200
viewsQ: How to return the value according to the received parameter?
I had to mock with DAO, but the method receives a spreadsheet object and according to the id attribute of the Spreadsheet I need to return a different value. How do I do this to correctly compare…
-
6
votes2
answers459
viewsQ: What does "Auto Packing the Repository for Optimum performance" mean?
I went to give git push in a remote repository and the following message appeared: Auto packing the repository for optimum performance. You may also run "git gc" manually. See "git help gc" for more…
-
2
votes0
answers375
viewsQ: How to automate the deployment process?
Using Jenkins, to get changes to a branch and send immediately to production what are the ways to build the server infrastructure? I mean, there is another possibility to do this besides owning more…
-
8
votes2
answers9322
viewsQ: How to push remote branches?
I have a local branch called ResultadoAPI, the remote is located in origin/Feature/Resultadoapi I tried to push in several ways but this remote continues outdated…
gitasked Daniela Morais 4,687 -
5
votes1
answer171
viewsQ: How to automate testing?
It is common each time deploy a bug occurs to go along, often noticed only months after that change. To solve this, I want to know if it’s possible to test ALL main functionalities in an automated…
-
2
votes1
answer49
viewsQ: Why is my regex not working as expected?
I really have difficulty assembling regular expressions, mainly by varying their behavior in each language. I am translating a Java code for JS, in which the regular expression is…
-
2
votes1
answer184
viewsQ: Why is my variable null?
I am translating a function from Java to JS, the logic remains the same but the results are different. In the regular expression test, returns match when I test 40kb but when compiling the code I…
-
8
votes1
answer72
viewsQ: Why does the Regex result have two values?
I need patterns kb, Mb or Gb, I’m using regular expression (k|m|g)b$ and it has to be at the end of the line. The test of my expression results in only 1 match when I test "20kb", but in this script…
-
0
votes2
answers147
viewsQ: How to save app data to smartphone?
To not depend on internet connection, it is possible to save on mobile data related to the app? For example, when opening for the first time select the language and in the next uses of the app it is…
-
7
votes4
answers342
viewsQ: What is the function of the " | " operator within the catch?
I read that || (OR) is for boolean operations and | (Bitwise Operation) for bit operations. What is your function within a catch with multiple exceptions, then? I mean, I know it eliminates…
-
0
votes1
answer122
viewsQ: Why does my JS display alert when you don’t need it?
My button works correctly and suddenly doesn’t work anymore: While updating user information with the correct data, does not enter the event button to update but add-user event as it is displayed…
-
3
votes1
answer471
viewsQ: Is it possible to run class unit test with inheritance?
I need to do a unit test of PlanilhaReader but this extension ArrayList<String> and override the method contains. Is there any way to execute it? @Component public class PlanilhaReader extends…
-
30
votes2
answers45293
viewsQ: What is a deploy?
Each module of the project has a .war and a .war exploded, What are the functions of this artifacts in this "deploy" process? And what is Jenkins' function in that context? I understand that deploy…
-
5
votes1
answer1926
viewsQ: How to declare and initialize two-dimensional matrices?
I have to save the row, column and contents of a spreadsheet. For this I created a two-dimensional matrix. My difficulty is how to initialize it? I believe the statement is no longer correct because…
-
1
votes1
answer1162
viewsA: Insert Google Maps search bar
You need to develop your own bar. There is a similar option available that can be customized: Using Search Widget Locating User Input In Google Maps API Recalling that the purpose of the API is to…
-
9
votes1
answer10051
viewsQ: What is the difference between @Postconstruct and the constructor?
What’s the difference of using the annotation @PostConstruct instead of using constructor method and its advantages? I ask based on these two versions of the same class that only differ by this…
-
3
votes1
answer214
viewsQ: What is the similar command in git to Intellij’s "git revert"?
How to reverse the state of a specific file via git commands? Similar to option git revert of Intellij where I select the files I want to revert. When I select all options in the git revert, lists…
-
1
votes3
answers173
viewsQ: Are there any techniques to apply maintenance in the code?
Besides applying high cohesion and low coupling, how to handle codes like this? They may even be legible but this excess of logical operators, I do not see it possible to refactor even with…
-
0
votes1
answer157
viewsQ: What is the best way for an Activity to call itself?
The app displays random questions by following as template to QuestionsActivity, that is, the user chooses true or false and will only change the question (textView) and the screen design will…
-
10
votes4
answers1233
viewsQ: What is the difference between OO and DDD?
I read about Domain Driven Design, it seems to use the concepts of object orientation but is based more on business rules. Is there nothing else that actually differentiates OO from DDD? If it is…
-
8
votes2
answers226
viewsQ: Why does Value in Spring MVC need an asterisk?
Why do I need to put * no value when there is nothing else? I mean, before using Spring MVC worked smoothly only as /planilha/. The getPlanilha works properly but if it has the same RequestMethod…
-
5
votes2
answers4825
viewsQ: How to apply the Singleton pattern correctly?
The class PEHandlerService need to have a single instance and do not want to use synchronized because of the slowness, I developed the following code: public class PEHandlerService extends…
-
0
votes0
answers47
viewsQ: Why my Asynctask Freeza?
The moment I instate an object EmailTask the app hangs =( public void send(View view){ EditText text = (EditText) findViewById(R.id.editText); Switch iluminacao = (Switch)…
-
0
votes1
answer211
viewsQ: Why can’t I instantiate an object by clicking my button?
The operation of the button is correct, it executes all previous lines. However, when instantiating an object Email displays the error. public void send(View view) { EditText text = (EditText)…
-
1
votes0
answers113
viewsQ: How do I correctly import using Maven in Android Studio?
I imported the org.apache.commons:commons-email through the command ALT + SHIFT + CTRL + S in Android Studio. The class identified without problems but I can not compile the project! PS: I entered…
-
1
votes1
answer118
viewsA: Why can’t I run the file located in the bin?
I got the/ These packages needed to be installed: sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1
-
1
votes1
answer118
viewsQ: Why can’t I run the file located in the bin?
I need to use the file flare and flasm, which chown and permission are correct. Why can I execute only one and not the other? -rwxr-xr-x 1 daniela.morais sudo 64808 Mar 19 13:54 flare* -rwxr-xr-x 1…
-
12
votes2
answers2347
viewsQ: Why does my Try/catch only accept "Exception and" (Generic)?
I want to specify the exceptions, not in this general way but the item.write only accepted Exception e public File saveFile(FileItem item, File dirFile, String filename) { dirFile.mkdirs(); File…
-
2
votes1
answer1120
viewsQ: Is there any method that returns information about the smartphone?
I want information like the version of Android and device model, the method System.getProperties() me returns the properties of the App.
-
5
votes2
answers116
viewsQ: How to make readable the code that uses String properties?
I have a string that uses parts of another string, how to make this code more "clean"? Since it is very difficult to understand. String sessionHash = dirPath.substring(dirPath.substring(0,…
-
4
votes1
answer934
viewsQ: How to add button in Maps?
I selected a Google Maps Activity when creating the project, as I added this button in the layout? <Button android:id="@+id/btn_draw_State" android:layout_width="40dp"…
-
5
votes1
answer148
viewsQ: How do I start Maps in a specific place?
How do I make the App, when opening Google Maps, zoom in on a specific place (for example, a specific coordinate)? The codes of the demo it shows ALL continents when initializing being necessary to…
-
4
votes1
answer128
viewsQ: What is the best way to follow the software flow?
I have a big project, how do I follow the flow (step by step)? I have several classes and have no idea which methods are called, which classes are etc. I put a breakpoint in a point that I know goes…
-
2
votes2
answers4191
viewsQ: When do I use Pathparam or Queryparam?
I know the difference, but when do I use Pathparam or Queryparam? It is correct the following explanation? If there is a scenario to Retrieve a record based on id, for example you need to get the…
-
22
votes2
answers4841
viewsQ: How does the merge work?
I created another branch as backup and give merge in it, suppose I’m in branch daniela3: git merge origin/develop Only my branch daniela3 will be affected or origin/develop too? I mean, I’ll be…
-
1
votes2
answers8009
viewsA: Set JS variable in input value HTML
$.ajax({ url: 'api/user/getSession', type: 'POST', success: function(data){ $("#nome").val(data.nome), $("#perfil").val(data.perfil), $("#empresa").val(data.perfil) } });…
-
1
votes1
answer740
viewsQ: How to temporarily store data with good practices?
I have only one page where are all the scripts, when a user clicked on certain data, would redirect it to a specific script and needed to save this data (which he clicked) to put in a case he wanted…
-
4
votes1
answer831
viewsA: Calling JS function inside modal
'click button#update' : function(evt){ (...) $modal.show(function (evt){ (...) }); validateEmail = function(email) { var re =…
-
4
votes1
answer831
viewsQ: Calling JS function inside modal
I have an event where a modal is displayed, in it I want to call a function validateEmail but I can’t. validateEmail: function(email) { var re =…
-
3
votes2
answers8009
viewsQ: Set JS variable in input value HTML
I have several inputs in an HTML, where the Ids are correct. I want to search the value of these inputs with these Javascript variables, but only the nome takes the variable value! The rest of the…
-
6
votes1
answer345
viewsQ: Force Javascript to cancel field registration with required (HTML 5)?
I have a registration field that are required to be completed via HTML5. However, by clicking the unsubscribe button, HTML5 does not let Javascript return to the previous page! = ( Requires me to…