Many will say that it all depends on genes. Yes, undoubtedly, genes are the main clue of any personality. It cannot be done without them. But there are other equally important circumstances.
Only a free world gives birth to free individuals, ready to take as much as possible from life. And give back as much, if not more. Almost all winners of the Nobel Prize and other prestigious world awards belong to the free world. Oppressed continents, which were the majority not long ago, do not produce geniuses.
And it is the geniuses that are the progress of the world. Humanity needs them to improve the lives of every individual. Now this quality multiplies not in centuries, but in decades.
But let's get back toRichard Feynman.
The book is a vivid example of how a person enjoys life, in a good, sublime sense.
Creating global variables is generally undesirable as it can lead to hard-to-detect errors and makes it difficult to transfer code to other applications.
When using SonataAdminBundle and SonataBlockBundle, I wanted to remove the default block.
It doesn't provide much benefit, as it simply duplicates the functionality of the side menu on the dashboard.
When installing SonataBlockBundle, if we simply write in the configuration:
(in the future we will add our own blocks, but for now we just leave an empty array), we will catch an error.
As a backend, SonataAdminBundle is used. Implemented:
1. Admin panel (WYSIWYG, ckeditor), image/audio uploading, player.
2. Tags, categories, archives, tag cloud
4. RSS-feed (requires modification)
5. "Smart" caching of everything, content is served very fast
To "ease the soul":
Repeatedly had to work with a list of dates on php (by days, for example) if there is a start and end of the period ($dateStart, $dateEnd). For example, to synchronize working/non-working days for the DatePicker from jQueryUi with the backend. Or if you need to display reports by days.
I suggest several options for solving this problem, both the most obvious way and a more elegant way (as it seemed to me).
Widgets Bundle - a bundle for easy widgets management. (Supports only widgets which require only client-side code for displaying). Includes both client side (for displaying) and admin side (adds admin classes and has a SonataAdminBundle dependency) functionality.
Can be used (for example) for adding counters, banners, advertising network codes (google adsense, etc).
Was created during this blog has been developing.
During developing this blog I invented one more bicycle for Caching Symfony controller. But first of all lets see how did this task arose.
For example, I have a list of categories, archives and tags on a sidebar. It is relatively easy to get last one (one query), but much harder to get list of categories and archives. For getting categories, we need to select trees (categories can be nested) and using subqueries inside queries get number of articles in every category (result is a little bit monster). For getting the archives list, we need iterate over all articles and gather list of years/months. All this actions isn't very sophisticated, but it is better to avoid them.