All Questions

1
answer

What is __all__ used for in Python?

I've seen some Python code whose __init__.py file has a __all__ variable with a list assigned. Example: __all__ = ['foo', 'bar'] I've noticed that in Python, when things start with underline , it means that it'...
asked on 10.01.2017 / 19:17
2
answers

Are business rules always related to validation?

Since I started studying object orientation I hear a lot about business rules. Basically, as I understand it to this day, an object must have methods encapsulating the business rules and modifying its state must be done through these methods and...
asked on 28.01.2015 / 18:16
2
answers

Ticket generation in .NET

To this day I have often imagined situations in which a system might need to generate boletos, although until now I have never developed anything like this, and so I decided to research how to do this in .NET. I researched a little and all I fou...
asked on 15.12.2015 / 19:42
2
answers

What are "weak references"? When to use them?

In managed memory environments such as Java, Python, and JavaScript, I've read something about weak references (% with%). I read that it had something to do with detecting the objects that can be collected, but it was not clear. My question...
asked on 14.07.2018 / 04:03
1
answer

Is there a way to build a useful application based entirely on the functional paradigm?

The functional paradigm, in theory, is beautiful to see. Pure Functions , immutable objects and predictable outputs. This can facilitate development, decrease the incidence of bugs , and help maintainability. From this, is there a way to bui...
asked on 23.11.2017 / 02:48
1
answer

Control the CPU fan in C #

How do I read and set the fan speed of the CPU and also read the current speed? I tried to use this code but I did not get results either. [DllImport("Cimwin32.dll")] static extern uint32 SetSpeed(in uint64 sp); private void button1_Click(...
asked on 13.12.2013 / 11:44
2
answers

get original HTML entities with javascript

I need all the original HTML entities of a paragraph, especially the accents, the methods I know recover only some entities, as in the example below where ">" is correctly coded but "รง" is not. It is important that the code can differentia...
asked on 20.08.2015 / 21:46
2
answers

What is the difference between the terms "extension" and "component"?

I've received an
asked on 07.01.2016 / 00:29
4
answers

Sending mail via PHPmailer to Gmail [closed]

I can not send an email to my Gmail account via PHP. I had a previous project where I tried to use phpmailer and I can not get it working properly (2 months trying). I have now finished a site and just need to put it up, and phpmailer...
asked on 29.09.2015 / 17:50
4
answers

Generate random numbers that result in a fixed sum

I need to generate random values for the inputs text of my table (remembering that it can have N rows), my code today can generate the numbers but I need the number generated to be at most X so that it does not exceed the value of the column Max...
asked on 24.02.2014 / 13:58