All Questions

2
answers

Foreach inside foreach

I need to execute a foreach within another foreach in PHP. But it returns me the following error:    Parse error: syntax error, unexpected T_FOREACH referring to the line where the second foreach occurs Here's part of the...
asked on 02.04.2015 / 20:29
3
answers

Is it possible to create an information bank in JavaScript?

How can I create a simple database without using a server? I think the answer would be no, but check the following: I'm at work and I do not have access to databases or servers. This way I can work only on the local network and shared folde...
asked on 29.08.2014 / 18:41
3
answers

Regex capturing exactly x digits of a string

I'm trying to make a regular expression where it exactly captures x digits (specifically in my case x = 6). Example: "test 1 n ° 123456 end of test" "test 2 n ° 7890123 end of test" I want to return only the "123456" in the regular exp...
asked on 19.12.2018 / 22:38
2
answers

How to split a multi-part image with a link?

I would like to know how to split an image that can have multiple parts so that I can set the number of parts, and assign a different link to each part. Bonus: If the parts can assume any geometric shape, it would be great.     
asked on 19.11.2014 / 19:22
2
answers

How to make mobile sum in R?

I have a 1:50 vector and I need to make a moving sum (equal to the moving average), ie in the case of the last 5 observations, the new vector would be c(sum(1:5), sum(2:6), sum(3:7), ..., sum(45:49), sum(46:50)) . The aggregate func...
asked on 17.12.2018 / 15:51
2
answers

Currency exchange online

I spent some time looking for a site where I can change currency. Where can I make requests via client-side script using a url address and receive a JSON object with the conversion. (I ended up finding a solution I like that I put here.)    ...
asked on 17.12.2013 / 00:17
2
answers

Is a module the same as a class in Python?

Is a module the same as a class? If not what are the differences? I ask this because according to The Zen of Python , modules should be used instead of if s. The problem is that after searching I looked the same.     
asked on 05.03.2015 / 02:08
3
answers

Difference in months of date in postgresql

I need to take the difference of two dates, for example 03/16/2013 to 07/16/2014. If I do select extract('Month' from age(data1, data2)) What will return is a result 4 , since it informs that the difference enters the date is 1 year o...
asked on 15.08.2014 / 01:44
2
answers

How to use power notation in HTML?

How to format 2 numbers in power? Example: 2, 2 = 2² 3, 2 = 3² 5, 3 = 5³ 6, 2 = 6²     
asked on 03.09.2014 / 21:51
2
answers

Pass parameter without specifying the type of the variable to receive in the function

I'm creating a function in Java that returns the type of the variable and as such, since I'm trying to figure out its type, I have no way of telling the function what type of variable to expect. What I'm trying to build is the following: pub...
asked on 12.01.2015 / 15:42