All Questions

3
answers

"Smart" columns in MySQL

Is there a way I can assign something to a column in MySQL so that when I perform the query I select them? SELECT filtro_1,filtro_2,filtro_3 FROM filtros But if the table is changed (like adding a new filter, now the filtro_4...
asked on 23.05.2015 / 06:46
3
answers

How do I return a value in the Brazilian currency format in the Django view?

How do I return the 1768 value in the currency format BRL 1.768,00 in the Django view? def moeda(request): valor = 1768 # formata o valor return HttpResponse('Valor: %s' % valor)     
asked on 27.05.2015 / 15:32
2
answers

Is there any way to handle all software exceptions?

I am creating a DLL for use in many of my projects. I've created a method that captures Source, Message, and other variables I've set, mounts an email, and sends it to myself. (a kind of error log by email). Is there any way to reference th...
asked on 30.01.2015 / 16:14
2
answers

How to format a date by displaying the month name in angular?

I have an object Date in my controller in Angular. $scope.date = new Date; I would like to format this date in the view to display the full month name. I want the name to be displayed in Portuguese. Is there any formatting to dis...
asked on 07.11.2016 / 19:55
1
answer

How to declare various conditions within an if

I have two ifs that take into account 3 conditions, one of them with multiple possibilities. I'm doing this, but it's not working: if (($var1 == $var2) && ($var3 == 1 || 3 || 5 || 7 || 8 || 12) && ($var4 > 16)) {...
asked on 06.06.2015 / 02:11
2
answers

How to print a txt file in Python

How to print a txt file in Python? I'm not referring to print but rather to print to the printer. Thank you (:     
asked on 20.05.2015 / 21:03
3
answers

Foreach returning unconverted array

I'm using this little code to pick up words with a minimum of 2 characters, but it returns me:    Notice: Array to string conversion in echo $ word; preg_match_all("/[a-z0-9\-]{2,}/i", "oi voce tem problema pra entender isso?", $output_arr...
asked on 14.01.2015 / 00:05
2
answers

Menu to select color

I'm making a tool, and I need a menu for color selection. Could someone tell me how to do? Something similar to this:     
asked on 24.06.2015 / 16:44
3
answers

Multiple connections with the Bank

In a PHP system that communicates with BD (MySQL) to retrieve the information and return it to the user who accesses it, is it necessary to establish multiple connections with the Bank? Or just one?     
asked on 20.12.2014 / 19:04
2
answers

.gitignore delete all folders except one

I need to make a .gitignore delete all the folders except one. Example: Library/nao_ignorar Library/ignorar Library/ignorar Library/ignorar ....     
asked on 07.12.2014 / 03:52