All Questions

4
answers

Regex to capture infinite groups in a URL separating them by the slash

I would like to know how I could do a regex to capture multiple groups as demonstrated in the string below: / Controller / Action / Param1 / Param2 / Param3 / ... I want to catch "Controller", "Action", "...
asked on 24.02.2017 / 02:16
3
answers

Round numbers in C # being the decimal place 0 or 5

I need to round numbers in such a way that they have only one decimal place worth 0 or 5. For example 1 -> 1 1.1 -> 1.5 1.4 -> 1.5 1.5 -> 1.5 1.6 -> 2 2 -> 2 Does anyone know of a simple way to do this?     
asked on 17.05.2014 / 18:29
2
answers

Should I adopt the naming pattern of my framework or team legacy?

Here in the company, everyone follows a pattern in the projects:    All tables must be named in the singular. Examples: "user", "event", "category". And also:    The primary primary key is named "id_table_id". Examples: "user_id", "eve...
asked on 15.01.2014 / 17:32
5
answers

How to create a view in mysql by taking data from 3 tables and repeating the different columns in the result?

I have the tables: +----------Tabela-1--------+ id | nome | cnpj | qtd1 1 | carlos | 0563233 | 4 +--------------------------+ +----------Tabela-2--------+ id | nome | cnpj | qtd2 1 | carlos | 0563233 | 6 +-------------------...
asked on 18.06.2014 / 14:20
2
answers

Definition: document.getElementById

asked on 11.01.2017 / 10:49
4
answers

Check for image return via Javascript

How to check if the image returned with 404 error via javascript. Below a sample code, I want to check if the get of this image is 404. If I want to put a certain image, if it does not return the image. <!doctype html> <html lang="...
asked on 03.06.2014 / 19:45
4
answers

How to block website and leave free only for some ips? [duplicate]

I would like to know how I can block my site that is under maintenance and leave free access for two ips, I'm doing this, but it only leaves one free. I want you to be free for both of you. $ip = '10.11.30.175'; $ip ='10.11.30.182'; if ( $...
asked on 10.10.2016 / 20:45
2
answers

Is there any way to download a Youtube video using urllib?

Is there any way to download a video on youtube using urllib in Python? I tested, but it does not work (just an example): import urllib.request youtube = "" pagina = urllib.request.urlopen(youtube) urllib.request.urlretrieve("",...
asked on 02.01.2017 / 16:45
2
answers

Is it possible to define a class within an array in earlier versions of PHP 7?

Is it possible? If yes, how? In PHP 7 it is possible to create anonymous classes, which have the possibility of being defined in any variable / property, but I do not know if it is possible to do this in previous versions, because I am not very...
asked on 05.08.2016 / 02:47
3
answers

Align text within select in Firefox

I'm trying to align the text inside a <select> but it's only aligned (by default) using Chrome and IE11 browsers (as it may seem), only in FF (v27.0.1) that the text stays in top. I have tried to use vertial-align:middle b...
asked on 07.03.2014 / 13:18