Posts by Dante • 1,215 points
37 posts
-
-1
votes2
answers108
viewsA: Error calling function Rand() in setting a property
In PHP the function of generating random numbers is as follows: mt_rand(inicio, fim) So, test with your code like this: //Criar um código aleátorio var $min = 000001; var $max = 100000; var $codigo…
-
1
votes3
answers7377
viewsA: submit a form with jQuery by clicking a button outside of the form
You can do this via Javascript... First create a javascript function that will take your form by ID and submit. ex: function submete() { document.getElementById('IDDOSEUFORM').submit(); } And after…
-
0
votes2
answers454
viewsA: Is there a way to know which file a piece of html is in?
What could be done is to use some IDE for the development of the website or some text editor that provides support for HTML or contains plugins make your life easier. ps: A lightweight and simple…
-
1
votes1
answer2209
viewsA: Set a dialer as default
Go to Settings -> Apps -> Manage Apps. Select the "All" tab and go to the current dial app. Look for the "Clear Presets" button and press. Now, when you select dial, you should be asked to…
-
0
votes3
answers878
viewsA: How to hide URL ID?
The problem is that you are making this request using a "get" method instead of "post" Here a good explanation!…
-
1
votes1
answer574
viewsA: ORA-1691: Unable to extend lob segment
To know the size of a tablespace it is necessary to know the size of the data files that constitute this tablespace. For this we can use the following querys to check the size of a database. - Seat…
-
2
votes2
answers410
viewsA: Form only submits with the Enter key
What could be done is to go directly via Javascript and disable the button click event. In some very rare cases the Javascript confuses the action of clicking a button that has images as "icons"...…
-
0
votes1
answer1780
viewsA: error :Exception in thread "main" java.lang.Nullpointerexception
The mistake: Exception in thread "main" java.lang.Nullpointerexception at Ordering.milkMassas(Request.java:80) means that you are trying to do some operation on an object that is null! I usually say…
-
0
votes2
answers9661
viewsA: CRUD with MVC and DAO in PHP
Come on! To begin with, I would like to highlight the true concept of MVC: MVC is a software architecture standard that separates information (and its business rules) from the interface with which…
-
1
votes1
answer1184
viewsQ: Error in XSD validation
My XSD after some modifications by another team started giving error: Parse Error at line 33 column 14: s4s-elt-invalid-content.1: The content of '#AnonType_TxnHdrTransaction' is invalid. Element…
-
2
votes2
answers508
viewsA: When is it recommended to use decreasing indexes?
Imagine an index in a column of a grouped table: CREATE TABLE mytable ( pk INT NOT NULL PRIMARY KEY, col1 INT NOT NULL ) CREATE INDEX ix_mytable_col1 ON mytable (col1) The col1 index keeps ordered…
-
1
votes2
answers1416
viewsA: What is the behavior of static variables in . NET?
The parts of a Java program (variables, methods and objects) live in one of the two places in memory: Stack and Heap. Instance variables and objects are stored in Heap (or static), and local…
-
2
votes3
answers8406
viewsA: ORA-01036: illegal variable name/number
I believe your mistake lies in the parameters you passed. This error happens mainly when the parameters passed are not the same as those in the query and you can see that your last 2 fields are…
-
1
votes1
answer114
viewsA: How to add Googlemap programmatically to a Relativelayout?
The code to have it added in your Relativelayout would look like this: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical"…
-
3
votes1
answer1635
viewsA: JDBC Sqlite - Java
You can make the connection like this: import java.sql.*; public class Test { private Connection conexao; public Statement statement; public ResultSet resultset; public PreparedStatement prep;…
-
6
votes1
answer931
viewsA: Persistent connection to Mysql database
That depends on a lot. Multiple instances (Keep connection open) can be useful if there is a large continuous demand, or if the database access control and supported operations (Insert, alter,…
-
7
votes1
answer19780
viewsA: How to install . apk apps via adb?
Connect your device to your computer (with debugging]a). Download and install the Android SDK on your computer. Once the SDK is installed, launch the Android SDK Manager (located in the…
-
6
votes2
answers6739
viewsA: What are Usability Principles?
Much has been discussed about Nielsen’s 10 Heuristics on Usability, I do not intend to re-discover the wheel. On the contrary, I also want to bring to my posts such premises and emphasize their…
-
9
votes4
answers28007
viewsA: How to read CSV files in Java
Dude, you can just use Opencvs (http://opencsv.sourceforge.net/) To adapt and use it just use the following code: public class ParseCSV { public static void main(String[] args) { try { //csv file…
-
7
votes3
answers4376
viewsA: What is an N-Tier application?
A N-Tier application, an n-layered application program, is an application developed to have several logical layers. Each layer is self-contained enough so that the application can be divided into…
software-architectureanswered Dante 1,215 -
1
votes4
answers2752
viewsA: No access permission for Apache 2.4.6
When it happened to me, I went to the archive: /etc/apache2/conf-available/php5-fpm.conf Replaces all the: Order Deny,Allow Deny from all For: Require all granted And I deleted it in apache2.conf:…
-
3
votes2
answers465
views -
0
votes2
answers479
viewsA: I cannot insert in related tables
$query2 = "INSERT INTO dell (id_item, fabricante, modelo, tipo, data, url, serie, proprietario, origem, venc_garantia, tipo_instalacao, configuracao, uname_a, instalacao, servicos, tombamento)…
-
11
votes3
answers11642
viewsA: What is the definition of the term coupling?
They talked so much about the definition, I’ll talk a little bit about Weak coupling: Introducing Weak coupling is one of the main requirements for building quality object-oriented (OO) software.…
-
1
votes1
answer192
viewsA: Problems when running on grails project
I’ve had this problem in Grails...I fixed it doing so: 1 - Abra o Eclipse 2 - Vá em "Run as..." 3 - "Run Configurations" 4 - Escolha "Enviroment tab" 5 - Depois "Replace native enviroment with…
-
6
votes2
answers958
viewsA: What is the difference between: Urlencode, Escapeuristring and Escapedatastring
Urlencode Returns a string in which all non-alphanumeric characters except -_. are replaced with a percent sign (%) followed by two hexadecimal digits and coded spaces as a (+). Ex.: <?php echo…
-
1
votes1
answer512
viewsA: Payment by cell phone credit
Dude, I’ve used Pagtotal for purchases with cell phone credit...I never had problem, the service is fast and no headache. And their support is pretty sweet too. Here the site:…
online-paymentanswered Dante 1,215 -
3
votes2
answers1253
viewsA: Attach TXT file using Javamail
Man, what I use is like this: public void sendMail(String from, String to, String subject, String message, String attach) { MimeMessage mimeMessage = mailSender.createMimeMessage();…
-
1
votes1
answer282
viewsA: font-face Internet Explorer
Modify your font-face for this code and see if it works: @font-face { font-family: MyFont; src: url('myfont.ttf'); } @font-face{ font-family: MyFont_IE; src: url('myfont.eot'); } .my_font{…
-
2
votes2
answers869
viewsA: Validation with JSF
You can do this using Primefaces. In your Selectonemenu you would have the following properties: a Property called required="true" that would say that the field is required. a Property called…
-
2
votes1
answer189
viewsA: Date validation with Zend
Dude, when the person reports the birthday date you can pick up check if the date they reported is earlier than the date to be 18. For example: If the guy said he was born in 1998-07-07, that date…
-
1
votes4
answers1377
viewsA: Error on AVD startup - Android Studio
The recommended is you leave all your Android SDK updated with the latest packages available. Here in the blog of Felipecosse has a link that perfectly explains the same settings as the phones you…
-
3
votes1
answer4727
viewsA: scanf/gets equivalent for java
In JAVA the best way to do this is to actually use the Scanner class. The meaning of the Scanner class for many at first is a little complicated to understand, but over time the programmer gets used…
-
1
votes4
answers3679
viewsA: Consume values from a webservice
First you need to choose which type of Webservice you will create and how you will create. There is this guide to create Restful webservices and with the use of JAX-WS:…
-
1
votes2
answers1136
viewsA: How to read a user-submitted file using Fileinputstream?
You can add the primefaces library to your project and use the Uploadfile component to do this. Download the primefaces library directly on the website: http://www.primefaces.org/ On your website it…
-
1
votes1
answer224
viewsA: Error accessing method in a class
First check that your Activity is being configured correctly on Androidmanifest.xml. ex: <activity android:name="com.example.task.secondActivity" android:label="@string/app_name" /> If it…
-
0
votes3
answers302
viewsA: Practical use of Constant scalar Expressions in PHP and other languages
Man, I’ll try to explain a good use with an example. In the PHP code below you can see all variants of scalar expression for PHP encoding, but let’s talk about them. We have the flexibility to use…