All Questions

1
answer

Relationship between state, city, municipality and district

I downloaded an IBGE xml file with data from states, cities, municipalities and districts. I made the split for 4 tables and made their relationships. Follow SQLFiddle My question is: Is this relationship right? Can you still imp...
asked on 15.04.2014 / 05:38
3
answers

Problems with regular expressions (friendly url)

I'm having trouble reading a product's code from a friendly URL. With the regular expression that I put, it is accepting all the characters that are in front of the product code, that is, typing produto/9789/quantidade/5 it understands...
asked on 23.12.2014 / 13:46
2
answers

How to sum two integer arrays with pointer arithmetic?

I'm doing an exercise in which I pass by parameter two arrays of integers already defined by the user. I need now, in a third array, to store the sum of the two received arrays, in the same positions, using pointer arithmetic. Ex: vet 1 [1,...
asked on 12.02.2014 / 21:01
3
answers

How to read file passing part of the name in Java

Example.: The name of my file would be 001nome.txt , this file will have a variable action on the name depending on the entity, ie an hour it can be 001nome.txt at another time it can be 999nome.txt . Doubt.: How...
asked on 28.02.2014 / 20:11
1
answer

VirtualHost in separate file - Apache compiled

Because there is a large amount of VirtualHosts I have, the file in /etc/apche247/conf/extra/httdp-vhost.conf is extensive and disorganized. I know some ways to create VirtualHost dynamic, but in Apache's automatic instal...
asked on 20.01.2014 / 00:47
1
answer

generic CRUD or specific SQLs

In a system that tends to grow in number of classes and users, what would be the best approach to working with database access? create a generic CRUD? or create specific methods to insert and update each model class that is persisted in th...
asked on 09.04.2015 / 15:10
1
answer

Include tag in the first word of a string

I do not know much about regex, so I got this rule ready. $break_title = preg_replace('/(?<=\>)\b\w*\b|^\w*\b/', '<span>$0</span>', $title); return $break_title; The problem is that it does not recognize the cedilla, so th...
asked on 17.10.2014 / 21:52
2
answers

How to save / retrieve image in memory on android?

Hello, I have a Bytes Array which is a image from it, how can I save it in external memory and if there is no save in the internal memory of android? and then how can I be recovering that image? I need to save in a place that these im...
asked on 16.12.2014 / 12:54
2
answers

How to check in C if the file is empty?

Good evening, I'm working with C, and it turns out that I have a function or method that you have to print the data, the meal markings, for students who book a meal on the system. In the method the system must check if this file is empty a...
asked on 10.01.2015 / 23:21
1
answer

What is the difference between $ ('id') and $$ ('# id') in MooTools?

For those of you who are familiar with jQuery, the existence of two functions to select elements in MooTools seems a bit confusing. Considering that I have some element like <div id="id">Conteúdo</div> What's the difference b...
asked on 02.11.2014 / 01:34