All Questions

2
answers

How to access an element inside another HTML element with pure JavaScript

I would like to know how to access an element within another element through the id using pure JavaScript. Currently I use getElementsByTagName('a') but as in my project I will have several elements of the same type, it will not be usu...
asked on 26.08.2014 / 20:09
3
answers

Date in the format dd / mm / yyyy?

I created a table, where I put the user's registration on a card for printing; so this table has several records (5 per page) and for each page I access a record in the same table I made an array_push with values -> $sql = mysql_query("SELECT...
asked on 19.08.2014 / 23:51
2
answers

When to use div + selector in CSS

When I'm developing a front-end for a website, I put the name of the selector directly, for example .seletor1 , .seletor2 , and so on. I recently had to work on the classes of a plugin I downloaded, and I saw that it contained:...
asked on 25.06.2014 / 14:04
2
answers

How to format all the elements of a list in Python?

In php, when I want to generate a array formatted, I use the array_map function. So: $numeros = range(1, 10); array_map(function ($value) { return sprintf('%04', $value); }, $numeros); Return: array('0001', '0002', '...
asked on 28.10.2015 / 19:43
1
answer

Place Authorization: Basic on api

I'm creating an API as I said, and I need to use Authorization: Basic KEY to send login and password via header. Unfortunately I have no concept header('Authorization: Basic dXNlcjpwYXNzd29yZA=='); This code I have to send and in...
asked on 08.08.2014 / 03:17
2
answers

Turn local into zip code

Does anyone know a script in the R, or could you help me put one together, that takes the name of a place and looks for the zip code of this?     
asked on 26.08.2014 / 17:25
3
answers

How to use a PHP variable in javascript?

Can you declare a variable in PHP and then use it in JavaScript? Example: <? var w_qtd_v = 0; ?> <script language="javascript"> w_qtd_v = w_qtd_v + 1; </script>     
asked on 12.08.2014 / 16:41
2
answers

How to persist the state of a queue of requests?

I'm working on a C # application that needs a queue of items of type Pedido . Basically whenever a new request is created it is queued and the application shows the requests in sequential order that must be delivered. When a request is fin...
asked on 30.06.2014 / 23:37
3
answers

Doubt with Javascript Replace

My situation : I have a masked input like this: 0,0000 % . However, to be able to validate as a wish, I need to use a replace , changing the comma by point, removing the % and then treating the value this way: 0.0000 ....
asked on 11.08.2014 / 16:14
2
answers

How to damage a website using XSS / SQL injection?

I'm not a hacker, but I know some techniques. I'm training security and I was really thoughtful about it. Every time I inject a script, it is a alert() , nothing dangerous for the host (for example). I do not have a website, there is no wa...
asked on 21.06.2014 / 05:06