All Questions

1
answer

What are the differences between the concepts of Polymorphism and Overwritten in OOP?

I was a bit confused when researching about polymorphism. The concept of polymorphism resembles the concept of overwriting. What are the differences between polymorphism and overwriting in OOP?     
asked on 27.09.2015 / 19:58
2
answers

Can I use empty and isset in a variable?

Here's an example: if(isset($_POST['nome']) && !empty($_POST['nome'])) { session_start(); $_SESSION['nome'] = $_POST['nome']; } View demonstração If I can not use this, what would be recommended? I'm trying to ta...
asked on 18.05.2015 / 22:51
1
answer

JavaScript ternary condition with only one value

A fairly basic JavaScript question, on a ternary condition how can I do to take action only on an if without the need of the else? Example (test) ? test1() : test2(); If you do not want anything to happen at Else, how would you look?...
asked on 06.05.2014 / 19:45
1
answer

What is the difference between printf and print?

I was doing some simple algorithms in Java and most of the time using System.out.println() or System.out.print() , but to do the definition of the number of decimal places I'm using System.out.printf() . I know there is a diff...
asked on 16.01.2015 / 00:28
3
answers

Operator Precedence

I have a question regarding the precedence of operators in JAVA. I have the following code: int x = 2; long y = 1 + x * 4 - ++x; Viewing the precedence table here . In my view the expression should be resolved as follows: 1 + x * 4 -...
asked on 16.11.2015 / 23:47
2
answers

How does the Where logic in the Entity Framework work?

I'm studying C # and just did my first query in the Data Bank: using System; using System.Data.Entity.Core; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; namespace Test.Models {...
asked on 28.04.2016 / 19:42
1
answer

How to create directory with a path that works for any OS?

I'm doing a job in Java and I need my program to create a directory in the user's home folder, but it needs to be able to create both Linux and Windows. Is it possible to create a "generic" path for this?     
asked on 02.12.2014 / 23:58
3
answers

How to convert a MySQL connection to MySQL? [duplicate]

I decided to listen to some users to make the conversion but I need your help because I have done a lot of research and nothing works. The first file is: <?php include_once("/pasta/connectserver.php"); $table = "rjpsync_tag, rjpsync_i...
asked on 17.09.2014 / 13:47
1
answer

What is the purpose of the "return true" command at the end of a function?

I noticed that in many functions in javascript I see at the end a return true . function EscreveDados(){ document.getElementById("divData").value = 'texto'; return true; } In HTML we have the tag which calls the function fol...
asked on 30.09.2015 / 18:19
3
answers

Sort a multidimensional array with numeric values

Let's suppose the following situation in which I have array composed of several array with numerical values: $array = array( array(22, 25, 28), array(22), array(22, 23) ) I would like to leave this array ord...
asked on 31.01.2014 / 17:05