Posts by mauricio caserta • 1,196 points
24 posts
-
0
votes1
answer51
viewsA: PHP if elseif conditions
The builder if has the return of type booleano, that is, test whether the condition is verdadeira or falsa. Thus, your code is testing whether the variable $texto1 is true, and since it is not…
phpanswered mauricio caserta 1,196 -
0
votes1
answer43
viewsQ: Set height for Uiscrollview
I’m creating an app for iOS using Swift, I’m having a lot of difficulty regarding the height of UIScrollView, I’m using auto-layout and create the following structure: Uiscrollview Uiview // View…
-
1
votes1
answer363
viewsQ: HTML layout ratio
I’m starting a project using the library materialize css, I don’t know much about layouts, I’m struggling with the ratio of the elements of HTML. In the layout next, is with the expected ratio:…
-
0
votes1
answer40
viewsQ: Virtualhost returning strange characters?
I need to access a virtual host of my machine, and of a device Android (consume a API) When access the virtual host with the name I defined in my hosts "http://api.xpto/usuarios", I can receive the…
-
5
votes0
answers1238
viewsQ: Error: Trust Anchor for Certification path not found
I have an app Android, using the library Retrofit to manipulate requests, while trying to make any request in a android 5.0 or less, I receive the following log: I/call:…
-
4
votes1
answer771
viewsQ: Picasso cache of images
I’m testing the library Picasso in the android in two situations: 1 - When loading an image, in a url publish (without sending headers authentication), the image is loaded into the ImageView, and…
-
3
votes2
answers517
viewsQ: Function load() jQuery + Twig
I’m developing a system using PHP, with the idea of owning only one page. How? (I do not know if it is the best solution, I believe it is not) , I developed a side menu that is fixed and the…
-
5
votes8
answers2113
viewsA: Is using customer validation enough?
A good example of this, is a API central, be consumed by several customers, as a client web and another Android. The client web can even validate, but what if the Android not do? The dados will be…
-
0
votes1
answer180
viewsQ: Problems with tokens stored in Session?
I am developing an application in php and in the authentication part I have the following code : public function chamaApi(){ // chamada na api via curl $profile = json_decode($response);…
-
15
votes4
answers52318
viewsA: What is the difference between PUT and POST?
PUT places a file or resource in a URI specific. If a file or resource already exists in this URI, the method PUT will replace the file (or resource). If there is no file or resource there, the…
-
2
votes1
answer95
viewsA: Input Password - HTML5, Intel xdk, Cordova
Junior, try to use the autocapitalize as off <input type="password" name="senha" value="" autocapitalize="off">
-
8
votes4
answers3838
viewsA: What is the expression 'if __name__ == "__main__"' for?
When the interpreter Python reads a source file, it executes all the code found in it. Before executing the code, it will define some variáveis special. For example, if the interpreter Python is…
pythonanswered mauricio caserta 1,196 -
14
votes5
answers4312
viewsA: What does Nan mean in Javascript?
The estate NaN represents "Not -to- NUmber". This property indicates that a value is not a legal number. source - w3schools…
-
7
votes6
answers992
viewsA: Like saving today at the bank?
Leonardo, you can use the function getdate() of PHP. Example taken from phpnet: <?php $today = getdate(); print_r($today); The result obtained in $today is similar to this: Array ( [seconds]…
-
8
votes6
answers16518
viewsA: What does NULL really mean?
Null is basically no value. Ex: public $variavel = 0; //não é nulo! public $variavel; // é nulo
-
17
votes6
answers10103
viewsA: What is a Web Service?
My concept of Web Service is : An app (I’ll call it API) which takes parameters and executes instructions, for example a register. An application receives the parameters "email" and "password",…
-
3
votes2
answers1727
viewsQ: Is token in the URL safe?
I’m developing an application, and I’m having doubts in the password recovery part. I have a method that the user inserts the email that is registered in the application when they forget the…
phpasked mauricio caserta 1,196 -
1
votes2
answers276
viewsA: Prevent form Ubmit, but allow other actions by typing enter in an input
I believe it is not the best solution, but it worked here, using the stop(); $(document).ready(function() { $('#txtPesquisaServidor').keydown(function(event){ if(event.keyCode == 13) {…
-
3
votes4
answers3477
viewsA: Principle of Delegation, what is it?
In Object-Oriented Programming, according to Angun Croll, engineer and author of the blog Javascript, defines the Delegation as being a technique promoting the re-use of the code by allowing the…
oopanswered mauricio caserta 1,196 -
1
votes2
answers3817
viewsA: How to format whole number in currency with javascript?
José, you can use jQuery Maskmoney plugin https://plugins.jquery.com/maskMoney/ That is the basic use : $("#id_input").maskMoney();…
-
4
votes1
answer133
viewsA: How can I read Docblock from a PHP method to a string?
This can be done by using the getDocComment, that is present in the classes ReflectionMethod and ReflectionFunction. See the description of the method in Documentation. /** * This is an Example…
-
0
votes0
answers213
viewsQ: PHP using MVC
I’m creating an application in PHP (without frameworks) using MVC, but I’m having a lot of doubts, because until today I only used Symfony to make PHP applications. I have doubts about the routing…
-
4
votes3
answers4210
viewsA: Send form without using PHP or similar
To send an email form with only some programming language. In PHP it is very simple, look for the mail function(); Follow an example: <?php $para = "[email protected]"; $nome =…
-
0
votes1
answer117
viewsQ: Service to manage PHP sessions (Symfony2)
I need to create a PHP Service to manage the Sessions of an application, someone has a practical example for this? PS: I am a beginner! :)