All Questions

3
answers

Why do libraries use "! function_exists ('function') "whenever there is a declaration of a function?

I have already used several PHP libraries and I have noticed that they always use the same statement whenever there is a declaration of a new function. if (! function_exists('funcao')) { function funcao($arg) { } } That is, the fun...
asked on 06.03.2017 / 17:09
1
answer

In R, when a vector becomes "too long"?

When trying to create an infinite vector ( 1:Inf ) I received the following message:    Error in 1: Inf: result would be too long to vector However, when the vector does not know in memory the message is usually different. The code...
asked on 02.03.2017 / 18:18
1
answer

Effective internet connection test

I have an application in which I test a connection before consulting a webservice , to display a message to a user who does not have an internet connection. I use a method like this: public static boolean isConnected(Context context) { Co...
asked on 09.04.2017 / 01:36
2
answers

Ask and store user permission to use full-screen?

Apps usually ask permission to use Smartphone features such as microphone, camera ... I wonder if you can do the same on a page so that FullScreen mode is automatically activated whenever the user opens the page, since the same gave permission fo...
asked on 03.03.2017 / 20:29
1
answer

Difference between fflush and setbuf

What is the difference between the functions fflush(stdin); and ** setbuf(stdin, NULL);** ? When to use and when not to use each?     
asked on 12.11.2016 / 15:33
2
answers

Condition in join or in where?

Is there a difference if I use: select * from a left join b on a.id = b.id and b.id2=1 where ... or select * from a left join b on a.id = b.id where b.id2=1 Sent on: Fri ? The first SQL returned me super fast, the second one did...
asked on 30.08.2016 / 13:52
1
answer

How do I loop endlessly without bursting memory?

I'm trying to make a program that makes requests on a DDE server, so I need to collect the data every 0.1 sec. But at each iteration of the program the computer's memory increases and in the end to the script. I'm trying like this: def requ...
asked on 23.02.2017 / 20:26
2
answers

SQL LIKE is Case Sensitive?

When I had this doubt, I did not find quick results in Portuguese that offered a response (most of the results are in StackOverflow in English). It would be interesting to have an objective answer here in Portuguese to help the community....
asked on 23.03.2017 / 16:46
1
answer

JTable getValueAt () behaving differently than expected

I have a JFrame where there is a JTable that displays some data. When the user selects some records and clicks a certain button, these selected records must be deleted. When only one record is selected, everything works perfectly, but problem...
asked on 19.11.2016 / 02:22
1
answer

Is it correct, following object orientation, to use pointers for C ++ functions?

I'm creating classes that represent items in a menu, each item executes an action and I'm assigning the action by a function pointer to each instanced menu item, is this valid following POO? or is there an easier and more practical way to do it?...
asked on 15.10.2016 / 04:35