Posts by Giancarlo Abel Giulian • 3,999 points
173 posts
-
1
votes1
answer30
viewsQ: Plugin to create runtime variable instance builder
I need to create some tests using variables already instantiated at runtime, and instead of manually mounting, object by object, attribute by attribute, I would like some tool that automates this…
-
2
votes0
answers260
viewsQ: Cannot load driver class: org.sqlite.JDBC
I’m trying to set up an access from my application to an Sqlite database using the file application.properties Spring Boot, but not recognizing the driver. How can I proceed so that when booting…
-
0
votes2
answers489
viewsA: Replace configuration line with Ansible
Worked that way: - name: Change to Symfony development enviroment for reflect the changes directly on the vagrant box replace: dest: /vagrant/symfony-standard/web/app.php regexp: \$kernel = new.*$…
-
0
votes2
answers489
viewsQ: Replace configuration line with Ansible
Filing cabinet: <?php use Symfony\Component\HttpFoundation\Request; /** @var \Composer\Autoload\ClassLoader $loader */ $loader = require __DIR__.'/../vendor/autoload.php'; if (PHP_VERSION_ID <…
-
0
votes1
answer95
viewsA: Block mobile browser popup by pressing screen element
The problem was solved by adding the following block CSS: img { -webkit-touch-callout: none !important; }
-
0
votes1
answer95
viewsQ: Block mobile browser popup by pressing screen element
Description: A friend is developing an application in which a web page is accessed and when interacting with the elements is sent to a file PHP controls to manipulate a robot with the Arduino. For…
-
0
votes3
answers2121
viewsQ: Add line at the end of the file with the sed command
I am configuring a virtual machine to install JDK 7, Tomcat 7, Jboss EAP 7 and Postgresql. Follow the project on Github for anyone interested: cresol-enviroment-Vagrant. I’m at the part where you…
-
2
votes1
answer1097
viewsA: Spring Boot Application Not Initiating in Heroku
Answer: I created the file Procfile at the root of the project with the following content: web: java -jar -Dserver.port=$PORT target/people-on-map-site.War I pulled into the repository and gave the…
-
1
votes1
answer1097
viewsQ: Spring Boot Application Not Initiating in Heroku
I have the following open source application: people-on-map-site. And I have a Heroku account and this project integrated with the Github repository. However when doing Deploy appears these messages…
-
3
votes1
answer544
viewsA: Error logging in with Facebook on Android
Friend, managed to solve the problem? This key hash is to be used in development? It is because we need to inform this key hash in the settings of our app on the Facebook Developer website. The…
-
1
votes1
answer432
viewsA: No bean named 'entityManagerFactory' available
Answer: The problem was in the test, needs the note @MockBean on top of an object that is a class being a service or repository, that is, it is necessary to mock. Example: @MockBean private…
-
0
votes1
answer432
viewsQ: No bean named 'entityManagerFactory' available
I am testing my Spring application with Junit, however the error occurs after placing the annotation @EnableJpaRepositories: Caused by:…
-
4
votes3
answers19255
viewsA: What is the difference between while, for, while and foreach?
Answer: All of them can be used to create a loop, however there are some patterns to use one or another command. Patterns: If you need to iterate a list of objects, the most appropriate commands are…
-
1
votes0
answers75
viewsQ: Automatic public project deploy to AWS instance
Question: I would like to know how to configure the Travis CI to automatically deploy a public project from GitHub after running the build and all tests pass. I noticed this file configuration…
-
0
votes3
answers4951
viewsA: Json PHP and Mysql
Answer: $lista_json = array("objects_array" => array()); foreach($result as $row){ $obj = array ( "nome" => utf8_encode($row['nome']), "idEstado" => $row['idEstado'], "uf" =>…
-
1
votes1
answer24505
viewsA: Could not connect: No connection could be made because the target machine actively refused them
Answer: As you are using the database on the same machine of the application the connection configuration to the database can be changed to: <?php $HOST = 'localhost:3388'; $USER= '*****'; $PASS=…
-
1
votes2
answers1309
viewsA: Why put COMMIT at the end of the script using the Firebird database
Answer: The command COMMIT at the end of the script ensures that all instructions placed above it will be executed after the execution of that command. Using this command can avoid data…
-
2
votes1
answer427
viewsA: Access url with ajax and get return
Code: success : function(data) { var jsonData = JSON.parse(data); var items_length = jsonData.items.length; var items = jsonData.items; for (var i=0; i < items_length; i++){…
-
1
votes2
answers88
viewsA: Credit card in android app
Answer For security reasons that may be contractual or privacy terms, it is best that this card information stays in the server database. Nothing prevents the phone is stolen and the data is in the…
-
2
votes2
answers182
viewsA: Load alternative image in case you don’t have the correct image
Answer: $player_img = "players/" . $row['LastName'] . "_" . $row['FirstName'] . ".png"; if (file_exists($player_img)){ echo '<img src="'.$player_img.'"></img>'; } else { echo '<img…
phpanswered Giancarlo Abel Giulian 3,999 -
1
votes1
answer297
viewsA: Multi Tenancy with Hibernate update schema
Answer: You can use the framework Flyway to update all schemas or databases when initializing your application. References: Flyway Update all schemas with multitenancy architecture…
-
3
votes2
answers4072
viewsA: How to create notifications?
Example: public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main);…
-
1
votes0
answers38
viewsQ: Confirm email signup in an automated SNS topic
I use the SNS service in an application, the following process is done: User informs their location, and if there is no city inserted in the bank is created a record in the table regarding the city…
-
2
votes1
answer1008
viewsQ: Error inflating class android.support.design.widget.Navigationview
It is working correctly on most devices, however on other devices the following error is occurring: android.view.Inflateexception: Binary XML file line #16: Error inflating class…
-
0
votes1
answer1000
viewsQ: Maven Settings.xml file not found
I am following the following article: JBOSS/WILDFLY Maven plugin for deploy LOCALHOST/REMOTE server. I want to implement this in the project I have here to do continuous integration, testing using…
-
2
votes0
answers108
viewsQ: Plugin Execution not covered by Lifecycle Configuration
I have implemented unit tests in my application using Jasmine and I want to configure a continuous integration in Maven so that the tests run automatically. Already working, however an error is…
-
1
votes1
answer2928
viewsQ: No Qualifying bean of type found for dependency
I searched Stackoverflow and Stackoverflow in Portuguese but nothing guaranteed the solution to the problem. I have been through this problem several times but at the moment I do not find the…
-
1
votes1
answer104
viewsQ: Methods to test Spring application are not found
I am following the following article: Introduction To Spring MVC Test Framework I have the following code: this.mockMvc.perform(get("/product/1")) .andExpect(status().isOk().…
-
3
votes2
answers976
viewsA: Attribute "wrap" of the textarea tag
The wrap attribute specifies how the text in the textarea element is to be adjusted when a form is submitted. Soft: The text in the widget is not adjusted when it is submitted in a form. This is the…
-
0
votes1
answer517
viewsA: method to login using Datasnap
You need to first create the methods of Datasnap for Android and put in your application, example: C:\Win32ProxyDownloader.exe -language java_android -host 127.0.0.1:8080 -output C:\test Then you…
-
0
votes1
answer782
viewsA: How to load blob field image?
As I mentioned in comment on the question I prefer to make calls HTTP to display the image instead of passing a base64 in the element img. I do this way to show the image(s)): Controller.php: if…
phpanswered Giancarlo Abel Giulian 3,999 -
1
votes1
answer748
viewsQ: Select option in select otherwise with Angularjs
I recently found that example in Jsfiddle to select particular option in one element select. I noticed that it is selected as follows: HTML: <div class="listitem" ng-repeat="Choice in…
-
3
votes1
answer528
viewsQ: Value attribute of options in select are not set correctly
I need to go through an element select on a page HTML placing the elements option within it. I can already do that, the problem is that in the attribute value of those option should receive the…
-
2
votes1
answer62
viewsA: Item class in list always initializes active
I arranged it in a simple way, using the directive ng-class: <ul class="nav nav-pills nav-stacked" ng-init="inicializadorObjeto()"> <li ng-class="{'active':objeto.posicao == 0}"…
-
3
votes1
answer62
viewsQ: Item class in list always initializes active
I used as a reference for solving the problem: angular ng-repeat Skip an item if it Matches Expression. Next, we know that Bootstrap has the class active to mark with a different color of the…
-
3
votes1
answer1209
viewsQ: Is there any object recognition framework for Android?
I wonder if you have knowledge and if there is a framework for recognizing objects, people, anyway, things, ready to be used on Android. It’s similar to the idea of the app Google Goggles and the…
-
10
votes0
answers558
viewsQ: Facebook Login button has no action
I’m testing the Facebook Login API, but by clicking the button Log in with Facebook nothing happens, only the bar where it has the time turns black for a moment and then comes back with the color of…
-
2
votes1
answer455
viewsQ: Recover Cookies in Spring Security Authentication
How can I recover cookies when the user logs in through Spring Security and with the implementation of the interface AuthenticationProvider? If I recover an instance of HttpServletRequest from a…
-
1
votes0
answers138
viewsQ: Error Wrong number of Arguments in production environment
I have an application in development and production, and only in the production mode this presenting the following error: [0m[31m13:11:45,758 ERROR [io.undertow.request] (default task-118) UT005023:…
-
1
votes1
answer667
viewsQ: Keep database connection open in PHP
When using a PHP application with Firebird database we use the methods ibase_connect() to open the connection to the database and ibase_close() to close that connection. If the connection is opened…
-
1
votes2
answers275
viewsQ: Import PHP files through the URL instead of the disk path
When I use an architecture like MVC in a PHP project separating the models, controllers, services, views often using the functions include or require the application gets lost importing the PHP…
-
6
votes4
answers2145
viewsA: What technique do I use to keep a form field completed or selected after $_POST[]?
Small examples showing how it can be done: COOKIE: PHP transparently supports HTTP cookies. Cookies is a mechanism for storing data in the remote browser and allows the ratreaming or identification…
-
4
votes2
answers923
viewsA: Report error while performing UPDATE with SQL
I use it this way with Firebird: if ($query){ echo "Tudo OK"; } if (ibase_errmsg()){ echo "Erro técnico: ".ibase_errmsg(); } You can do with the function mysql_error(). mysql_error - Returns the…
-
3
votes2
answers872
viewsA: Return only integers
As mentioned in the comments, use the function parseInt(). In English (taken from the Mozilla Developers website): The parseint() Function parses a string argument and Returns an integer of the…
-
2
votes0
answers96
viewsQ: Wildfly in production does not recover properties and SQL script values
I am using a development environment and another production environment, in the development environment using the concept of i18n (Internationalization) is recovered correctly for example the value…
-
2
votes1
answer1008
viewsA: Treating error when no data is returned (Angularjs)
Answer code you mentioned as reference: <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <script…
-
15
votes8
answers5012
viewsA: Printing a String until a space is found
Example: $nome_completo = "Ciclano Fulano"; $palavras = explode(" ", $nome_completo); $primeiro_nome = $palavras[0]; print_r($primeiro_nome); Upshot: Ciclano…
-
2
votes3
answers4534
viewsA: Convert json object in php
I’ve been through this problem and found this solution: if ($_GET['tipo'] == 'GET_OBJECT'){ header("Content-type: application/json; charset=utf-8"); $object = $_GET['object']; $objectController =…
-
0
votes1
answer59
viewsA: How to list database time count result
Example: $hours = mysql_query("SELECT registration, duration FROM reports GROUP BY registration"); while($row = mysql_fetch_assoc($hours)){ <tr> <td align="center"><div…
-
1
votes1
answer117
viewsA: How to pass an imageview that is in an Array List to another imageview in another Activity
Example: Bundle extras = new Bundle(); extras.putParcelable("Bitmap", bmp); intent.putExtras(extras); startActivity(intent); And in the second Activity: Bundle extras = getIntent().getExtras();…
androidanswered Giancarlo Abel Giulian 3,999