python скрипт.py &
import urllib2
from multiprocessing.dummy import Pool as ThreadPool
urls = [
'http://www.python.org',
'http://www.python.org/about/',
'http://www.onlamp.com/pub/a/python/2003/04/17/metaclasses.html',
'http://www.python.org/doc/'
]
# Make the Pool of workers
pool = ThreadPool(4)
# Open the urls in their own threads
# and return the results
results = pool.map(urllib2.urlopen, urls)
#close the pool and wait for the work to finish
pool.close()
pool.join()
@GeneratedValue(strategy = GenerationType.TABLE)
- говорит, что нужно использовать таблицу для генерации PK. Не таблицу, на которую маппится сущность, а просто таблицу. Отсюда и возникает таблица hibernate_sequences. И возникает она из-за hibernate.hbm2ddl.auto=update.@Transaction
говорит, что метод будет транзакционным. Что это значит. Это значит, что вызов метода будет обернут в proxy объект, у которого будет сессия, и при вызове всех вложенных методов эта сессия будет одна и та же, и при завершении метода транзакция закроется.propagation = Propagation.REQUIRED
- это означает, что наличие сессии при вызове метода обязательно, если ее нету, то hibernate попытается ее создать.RuntimeException
, как этим управлять написано в документации к hibernate.@Repository("personDao")
задает имя бина.urls.parallelStream().forEach(u ->
{
LOG.debug("Page: " + u + usersResponse.pages.total_pages);
try
{
String r = <Send getRequest>
}
catch (Exception e)
{
LOG.error(e);
}
});
Знаю c#, немного с++.
P.S. по началу буду использовать Windows, но в будущем(далеком) думаю пересесть на Archlinux.
P.P.S. Думаю, что перед освоением ассемблера нужно больше узнать обо всем.
[guest@localhost tmp]$ cat "file.html" | sed 's/"http/\n&/g' | sed -n 's/^"\(http[^"]*\)".*/\1/p'
http://tasteofcountry.com
https://s3.amazonaws.com/tsm-images/logos/footer/204-light.png?id=78
http://tasteofcountry.com/shocking-country-music-splits/
http://tasteofcountry.com/reba-mcentire-narvel-blackstock-relationship-timeline/
http://screencrush.com/official-batman-vs-superman-plot-synopsis/?footer
http://wac.450f.edgecastcdn.net/80450F/screencrush.com/files/2015/07/batman-vs-superman-300.jpg?w=180&h=120&zc=1&s=0&a=t&q=89
http://popcrush.com/stars-who-were-born-rich/?footer
http://wac.450f.edgecastcdn.net/80450F/popcrush.com/files/2015/04/born-rich-300.jpg?w=180&h=120&zc=1&s=0&a=t&q=89
http://diffuser.fm/offensive-band-names/?footer
http://wac.450f.edgecastcdn.net/80450F/diffuser.fm/files/2015/03/offensive-band-names.jpg?w=180&h=120&zc=1&s=0&a=t&q=89
http://comicsalliance.com/comic-book-movie-behind-the-scenes-pictures/?footer
http://wac.450f.edgecastcdn.net/80450F/comicsalliance.com/files/2015/05/behind-the-scenes-300.jpg?w=180&h=120&zc=1&s=0&a=t&q=89
http://tasteofcountry.com/you-think-you-know-country-taylor-swift/?footer
http://wac.450f.edgecastcdn.net/80450F/tasteofcountry.com/files/2014/08/taylor-swift-sexy.jpg?w=180&h=120&zc=1&s=0&a=t&q=89
[guest@localhost tmp]$
<VirtualHost a.b.c.d:80>
ServerName site.ru
ServerAlias www.site.ru *.site.ru
...
</VirtualHost>