Posts by Ricardo • 14,521 points
350 posts
-
1
votes3
answers202
viewsA: Form Dynamic
Three possible problems: the extension is . html, change it to . php. you are accessing the file via protocol file: , you must access by localhost+path to the project (which should be inside htdocs…
-
2
votes3
answers5893
viewsA: What is operator overload?
Operator overload means to reset the operation that the symbol will perform as the operator + of Java that for integer numbers perform a sum and for strings a concatenation the operator = in PHP…
-
0
votes2
answers111
viewsA: $_GET['id'] does not return value
@Besides, although this question has already been answered there is something wrong with your code there is a natural form of a & of the URL turn a $ even when sending a <form> using the…
-
0
votes3
answers1664
viewsA: How to Display SQL Query in an Array
Utilize print_r with the return of the database within HTML tags <pre> as follows: $query=mysql_query("select country, count(*) as quantidade from customer group by country"); $valores =…
-
0
votes2
answers838
viewsA: How to create a button if you are logged in to an account
How do I: I divide page into small HTML blocks and I will assemble under conditions, conditions that can be the user login in this way: session_start(); if((!isset($_SESSION['email']) == true) and…
-
0
votes2
answers178
viewsA: Picking up items with array prefixes
Another approach would be this: <?php $arr = array('one' => 1, 'two' => 2, 'three' => 3, 'my_one' => 55, 'my_two' => 33); foreach($arr as $key => $value){ if(strripos($key,…
-
1
votes3
answers812
viewsA: jQuery is still "necessary"?
It is necessary: NAY Jquery for the objectives pointed in the image is almost unnecessary (although I find it much better to use jquery to make AJAX requests) but* when you want to work with the…
-
5
votes1
answer392
viewsA: What’s the difference between $var and $var?
$var is a variable and $$var is a "variable variable" whose name is the value of $var. take the example: <?php $var = "hoje"; echo $var; $$var = 'ontem'; echo $hoje; ?> Use $$var is not very…
-
2
votes1
answer477
viewsA: Implement form, causing the message to be sent directly to my email
I use the Smtpmailer class for this purpose (it is necessary at least one GMAIL for this since we will use your SMTP server) I am putting some methods that make use of this class (all documented).…
-
1
votes2
answers125
views -
1
votes2
answers2471
viewsA: Load HTML pages into a <div>
As I do: I break HTML into modular . php files (each with a menu, navbar, etc.), then create a . php main and colo the requires of the compositions in this way: require_once…
-
1
votes1
answer640
viewsQ: Save input field to database
How to store the last 100 searches made to a website (PHP/MYSQL) divided by countries (e.g., store the last 100 searches for books in Macedonia). Search is a simple field: <input type="text"…
-
1
votes2
answers239
viewsQ: Retrieve database records by date field?
How do I recover users recorded in a database table by the dt_birth field through two values representing the minimum and maximum age of the users that will be returned, the minimum and maximum age…
-
1
votes5
answers294
viewsA: Problem with calculator program
If I’m not mistaken the switch of C is only of integer primitive values (this may have changed in the latest versions) another detail in char op you are assigning two characters soon the last will…
-
4
votes4
answers10030
viewsQ: Mysql error 1054 Unknown column
I’m making an SQL that counts how many names in the table start with any letter but an error is being returned: Column not found: 1054 Unknown column 'A' in 'Where clause' To the following SQL:…
-
11
votes1
answer480
viewsA: What does this expression mean *=
Simplified Answer That’s an abbreviated form of: $b = $b * 200; similarly there are abbreviations for sum, division and multiplication $b = $b - 200; $b -= 200; $b = $b + 200; $b += 200; $b = $b /…
-
10
votes8
answers67841
viewsA: How to export an HTML/PHP page to PDF
I already make use of the Headless Browser Phantomjs to download COMPLETE WEB pages FAITHFULLY rendered to displayed in the common browser (it interprets JS and CSS) but with it it is also possible…
-
4
votes2
answers328
viewsA: How to swap a string with jQuery?
If the values are static you can exchange directly: var src = "/kit_150x150-12por-150x150.png"; var src = src.replace("150x150.png", "238x238.png"); or dynamically using a regex (test it on this…
-
0
votes1
answer1286
viewsQ: Where to put PHP code that takes user machine information?
I created some functions responsible for taking the user’s IP (and ISP, parents, browser, OS) in order to keep a control of who accesses, how many times in a given minute I do not know where to…
-
1
votes1
answer117
viewsQ: It is possible to get the Error Number returned by Page
I created a page (following the one taught in this page ) error for Error 404, but this way would have to make an error page for each HTTP Status, then Try to make a gnerica where it was possible to…
-
3
votes2
answers305
viewsA: I know the variable value, but the switch only goes to the default
Try to use: (trim(strip_tags($subsecao))) This code removes all HTML tags and removes all left and right spaces from the function return, Obs: the use of strip_tags in HTML BADLY formatted can…
-
0
votes2
answers2792
viewsA: Practice deploying, how to do?
There is an article in English explaining how deploy is done with Git Article in English, edited Portuguese version Translated and Edited Excerpt from the article: Local repository If you already…
-
1
votes4
answers452
viewsA: & Together with PHP operators and functions
This is a reference operator that allows instead of working with the value of the variable to work with your address, see example below: <?php $a = &$b; // aqui $a e $b apontam para a mesma…
-
2
votes7
answers1131
viewsA: Too many screens or a screen with too much information?
The book Designing Web Interfaces from Editora O'Reilly (focused only on interface patterns and some "conventions" that aim to provide a better user experience) "says" that we should limit the…
-
1
votes8
answers3054
viewsA: When to use Waterfall and when to use Scrum?
When to use Waterfall The Waterfall lifecycle is mainly used when the software to be built is mathematically and/or formally defined where all its requirements and logic are previously established…
-
14
votes5
answers17889
viewsA: Why choose C instead of C++ or C++ instead of C?
C and C++ belong to different architectures* Despite the possibility of using the structural paradigm C++ (c++ is multi-paradigm), however it is not possible to use the OO paradigm (in all its…
-
-1
votes8
answers13920
viewsA: Is <br> or <br/> or <br />right?
In files whose extension is . html you can use all three <br>, <br/> and <br /> interpolated without causing damage but when the extension is . xhml I remember being required the…
-
17
votes8
answers5920
viewsA: Is it always guaranteed that a multi-threaded application runs faster than using a single thread?
Not, there are several issues that interfere with performance being they: In a program multithreads so that a thread in operation it is necessary to make a context change (what consumes processor…
-
41
votes4
answers41133
viewsA: What are they and where are the "stack" and "heap"?
Definitions Stack On the stack, allocated objects are stored within function scopes including local variables of functions, arguments, addresses of code areas being executed before other function…
-
0
votes2
answers4148
viewsQ: What should an HTML value attribute contain?
In a maintainability and organization perspective what should contain a value attribute? a number representing a word: <label><input type="radio" name="order"…
-
2
votes1
answer655
viewsQ: Grab attributes from a Thread object?
Is it possible to take the attributes of a Thread object? because I am using threads to read several files (one per thread) (which have float numbers separated by n) store the floats to sum the…
-
23
votes2
answers268
viewsQ: Null attributes on an object is Bad?
I have an object that has 7 attributes: 2 attributes are always with some value assigned. 3 values are always set if a filter query is required (3 attributes are filters). The last 2 attributes are…
-
3
votes2
answers3174
viewsA: Limit Input to a range of values
Try to bind the onchange event to a javascript function that will check the input field change and whenever it is changed check the input field value, something like this:…
-
6
votes3
answers2583
viewsQ: SQL of tables with multiple relationships
How would be the SQL representations of creation and correct insertion of the tables below so that it is possible to have/store the total number of videos of a genre so that it is possible to take,…
-
3
votes1
answer184
viewsQ: How to maintain banner of website partnerships?
I’m developing a site where I will put banner of partner sites (visits touch) but I don’t know how should be the insertion of the partners banners but I thought of two ways. Insert direct into HTML…
-
1
votes0
answers60
viewsQ: DAO class recording in multiple tables
I have a model object Mensagem that has the attributes Tipo and Descricao, the information of this object must be saved in a database, so I created a DAO class responsible for inserting it in the…
-
11
votes3
answers505
viewsQ: What are the native exceptions of PHP?
Where it is possible to check all exceptions (native) that can be released by PHP? I searched and only found ways to treat with try/catch.
-
2
votes2
answers170
viewsQ: Check UNIQUE element before inserting it
I have a table in a Mysql database where one of your fields (email) is UNIQUE, when entering a record I must first perform a select checking if there is a record whose email field matches the email…
-
1
votes1
answer505
viewsA: Is there a need to install a php plugin in Aptana 3, like PDT for example?
There is no need to install any plugin in Aptana (I also use this version), however Aptana has some faults like not to warn that a certain method header is misspelled (the method does not exist) but…
-
15
votes13
answers20263
viewsA: What makes a language to be considered low/high level?
What makes a language low/high level is their level of abstraction, the closer to the hardware (even to the point where knowledge about the hardware will be implemented and installed) the lower…
-
2
votes2
answers2522
viewsQ: addeventlistener does not work with passing parameters
I have two inputs that both have an id, and I have a button with an oncick event attached (directly in HTML) that takes the value of both input fields, now I intend to separate the javascript in a…
javascriptasked Ricardo 14,521 -
7
votes1
answer104
viewsQ: Generic CRUD or Sqls specifics
In a system that tends to grow in number of classes and users, what would be the best approach to work with access to the database? create a generic CRUD? or create specific methods to insert and…
-
10
votes3
answers3406
viewsQ: Storing representative values of a user’s 'sex' in databases
I have some doubts about the representation of some fields in the database. How should I store fields such as "sex" in tables in the database? In the literal form "male" and "female" or through…
-
7
votes2
answers344
viewsQ: Split column into multiple tables
I want to save a set of information about movies in a database but I have a question, I must organize the genres in column (example below). Database: Mysql 5.6.21 Engine: innoDB or organize gender…
-
4
votes2
answers1914
viewsQ: Multiple JDK/JRE
Can I have multiple JDK/JRE facilities? because I have two different software and one depends exclusively on the 32bits version (aptana studio 3) and I’m already using the 64 bits version in the…
-
1
votes1
answer139
viewsQ: Associative array or object to save temporal meta-data?
I have a system that will parse web pages, during the process the parser should store some data on the page such as: page type (dynamic, static), size(in bytes) these data on the page should be…
-
1
votes0
answers63
viewsQ: Access video properties on "Video content sites"
How do I get the properties (duration, resolution, title, hash) of videos hosted on sites like Liveleak, Hulu, youtube, it is possible to download the header of these videos? I have an application…
-
13
votes4
answers452
viewsQ: & Together with PHP operators and functions
What is the meaning of the use of & together with operators and functions in PHP because I checked in some libraries (example) and functions this use (I am aware of the use together with…
-
4
votes4
answers6834
viewsQ: Find character in string
How to find the position of a given character, where the string has many of these characters in the same string, for example: find the 3rd letter X in the string Y. some way to accomplish this?…
-
4
votes2
answers3377
viewsQ: Meanings of data-value, data-title, data-... attributes in HTML
I have seen in various HTML code markings such as: data-value, data-title, are almost always tag attribute names with the suffix: data-, I would like to know what they mean and without any…