All Questions

1
answer

Dynamic typing and team development

There is some good practice, standardization, recommendation, etc. that aims to prevent invalid types from being passed to methods and functions? If I'm working alone, it's calmer, I wrote the method myself so I know what kind of parameters i...
asked on 07.06.2018 / 21:20
2
answers

What is the difference between the expressions "int a" and "const int & a" as function arguments in C ++?

Let's say I have two functions: int soma_a(int a, int b){ return a + b; } and int soma_b(const int& a, const int& b){ return a + b; } What would be the difference between soma_a and soma_b     
asked on 07.08.2018 / 21:55
2
answers

Increase div height with animation using CSS

I have this code that creates a wine glass with CSS: body{ background: #000; } .wrap { width: 100px; margin: 0 auto; position: relative; } .glass{ margin: 0 auto; height: 100px; width: 100px; border-radius:...
asked on 02.06.2018 / 21:39
1
answer

How to only allow numbers at a prompt in javascript?

I want to be able to put only numbers when I insert something into the prompt. var count = prompt("Teste"); How can I do this?     
asked on 09.07.2018 / 07:58
1
answer

Terms used in CSS

Knowing that CSS literally means Cascade Style Sheets , I regularly see the term "property" being used to refer to left , width , top , background etc . Faced with this, I had the following doubt: Is this referral...
asked on 22.07.2018 / 02:15
2
answers

I can not format date

I'm trying to format one date to be the same as another, the first comes straight from the bank but the other needs to be in the same format. Calendar cal = Calendar.getInstance(); SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); Stri...
asked on 03.07.2018 / 00:00
1
answer

How to use dplyr within a function?

Let's say I wanted to create a function that internally uses some functions of the dplyr or any tidyverse that use this type of syntax. By way of illustration: exemplo <- function(df, predicado, sumario) { df %>% filter(predicad...
asked on 29.06.2018 / 16:40
2
answers

Bring the columns of the DataTable by the Datatabe Ajax itself

Is there a way to bring the columns of the DataTable through the API from Ajax? As an example we have this code $(document).ready(function() { $('#example').DataTable( { "processing": true, "serverSide": true, "ajax...
asked on 02.08.2018 / 20:50
1
answer

Adding value to a date with PHP

I'm having a problem adding a date that comes from the database that comes as follows: Ex .: 05/10/2018 17:48:27 I'm using the following method to add days to that date: date('d/m/Y H:i:s', strtotime('+10 days', strtotime('10/05/2018 17:48:27'...
asked on 07.08.2018 / 16:21
1
answer

Are methods objects in Ruby?

Ruby has the class Proc , which is defined in the documentation as    blocks of code that have been bound to a set of local variables. Once   bound, the code may be called in different contexts and still access   those variables....
asked on 01.12.2017 / 13:53