
Portable Components, кроссплатформенная библиотека для C++ «Система должна быть спроектирована так, чтобы оставаться как можно проще после серии внесенных в нее изменений»Бьярне Строуструп – программист, автор языка C++ Преамбула В данной статье мне бы хотелось бы рассказать о довольно популярной, но так редко освещаемой на Хабре библиотеке Portable Components (сокр. POCO). Описание POCO представляет собой коллекцию классов, упрощающих процесс разработки, отладки и тестирования программного продукта. POCO ориентирована, в основном, на сетевую разработку и портирована на популярные операционные системы: Windows, Unix, Linux, eLinux, Mac OS X, Solaris, QNX Neutrino, Vxworks, Openvms, Tru64, HP-UX, Android. Библиотека может быть применена как основа к любой разработке, будь то программное обеспечение для сервера или клиента, при этом приложение гарантированно запустится на любой из имеющихся архитектур (признаюсь, иногда не без особой магии). Как изучать POCO Основные модули и примеры использования Ядро библиотеки Сжатие данных Криптография Базы данных
Algorithms and Data Structures Algorithm: a process or set of rules used for calculation or problem-solving, esp. with a computer.Program: a series of coded instructions to control the operation of a computer or other machine. Example Problem: Find the greatest common divisor (GCD) of two integers, m and n.Euclid's Algorithm: while m is greater than zero: If n is greater than m, swap m and n. Subtract n from m. n is the GCD Program (in C): Correctness Why do we believe that this algorithm devised thousands of years ago, is correct? Given m>0 and n>0, let g = gcd(m,n). So the algorithm is correct, provided that it terminates. Termination At the start of each iteration of the loop, either n>m or m≥n. So the algorithm does terminate. Testing Having proved the algorithm to be correct, one might argue that there is no need to test it. Debugging code be inserted to print the values of m and n at the end of each iteration to confirm that they behave as expected. Complexity Time If m=n, there is just one iteration; this is the best-case.
Chronic exposure to cannabinoids during adoles... [Neurobiol Dis. 2010 Создание QR-кодов на C/C++ 9 июня 2013 в 00:47 Это простой пример использования библиотеки libqrencode от FUKUCHI Kentaro для генерации bmp-файла с QR-кодом для какого-то текста. В интернете полно ссылок на эту библиотеку, но ни одного примера ее использования. libqrencode поддерживает QR Code model 2, описанный в JIS (Japanese Industrial Standards) X0510:2004 или ISO/IEC 18004. Предисловие QR-код — это двухмерный код, который может быть считан различными устройствами. Использование кода Для использования кода, приведенного выше, необходимо скачать библиотеку libqrencode, ссылка на которую есть в самом начале поста и поместить ее исходники (можно в отдельной папке) в папку с проектом. Изменив дефайны, можно перекомпилировать программу, для генерации разных url / выходных файлов / размеров пикселей / цветов пикселей. Только зарегистрированные пользователи могут оставлять комментарии.
DelphiForFun Home 18. Physicist Challenges Official 9-11 Story Sources: Deseret Morning News, November 10, 2005 Title: “Y. Professor Thinks Bombs, Not Planes, Toppled WTC” Author: Elaine Jarvik Brigham Young University website, Winter 2005 Title: “Why Indeed Did the WTC Buildings Collapse?” Author: Steven E. Jones Deseret Morning News, January 26, 2006 Title: “BYU professor’s group accuses U.S. officials of lying about 9/11” Author: Elaine Jarvik Faculty Evaluator: John Kramer Student Researchers: David Abbott and Courtney Wilcox Research into the events of September 11 by Brigham Young University physics professor, Steven E. In debunking the official explanation of the collapse of the three WTC buildings, Jones cites the complete, rapid, and symmetrical collapse of the buildings; the horizontal explosions (squibs) evidenced in films of the collapses; the fact that the antenna dropped first in the North Tower, suggesting the use of explosives in the core columns; and the large pools of molten metal observed in the basement areas of both towers.
Введение в Android NDK Для разработки приложений под ОС Android, Google предоставляет два пакета разработки: SDK и NDK. Про SDK существует много статей, книжек, а так же хорошие guidelines от Google. Но про NDK даже сам Google мало что пишет. Эта статья ориентирована на тех, кто ещё не знаком (или мало знаком) с Android NDK и хотел бы укрепить свои знания. Что такое Android NDK? Android NDK (native development kit) – это набор инструментов, которые позволяют реализовать часть вашего приложения используя такие языки как С/С++. Для чего используют NDK? Google рекомендует прибегать к использованию NDK только в редчайших случаях. Что такое JNI? Java Native Interface – стандартный механизм для запуска кода, под управлением виртуальной машины Java, который написан на языках С/С++ или Assembler, и скомпонован в виде динамических библиотек, позволяет не использовать статическое связывание. Преимущества JNI Как устроен JNI JNI таблица, организована как таблица виртуальных функций в С++. Локальные и глобальные ссылки Потоки
Practice and Learn - Google Code Jam On this page you can see results and code from past rounds of Google Code Jam, and you can try the problems for yourself. If you're new to Code Jam, try following the Quick-Start Guide. Where should I start? If you're new to programming contests, we highly recommend starting with the least difficult problems and moving up from there as you get more confident. Beware: the round that has the easiest problem A may have a very difficult problem B! Here are some choice problems for new competitors: Africa 2010, Qualification Round: Store Credit, Reverse Words. Remember, if you get stuck you can look at someone else's solution (click a "solutions" link below) or join our mailing list and ask for help. Finding Solutions You can click a "solutions" link below, but those aren't really indexed in a helpful way. Finding Inputs and Outputs You can click the link to a contest name below and download the inputs for each problem, but the correct outputs for those inputs are not provided. TopCoder
Chronicle: Figs kill when wasps dont pollinate A female fig wasp (Tetrapus americanus) is about to enter a flowering fig (Ficus maxima). Once inside, the fig wasp will pollinate and lay her eggs in the flowers that line the inside of the fig. Figs and fig wasps have evolved to help each other out: Fig wasps lay their eggs inside the fruit where the wasp larvae can safely develop, and in return, the wasps pollinate the figs. But what happens when a wasp lays its eggs but fails to pollinate the fig? The trees get even by dropping those figs to the ground, killing the baby wasps inside, reports a Cornell and Smithsonian Tropical Research Institute study published in the Proceedings of the Royal Society B: Biological Sciences (published online Jan. 13). The findings suggest that when one species in a mutually beneficial relationship fails to hold up its end of the bargain, sanctions may be a necessary part of maintaining the relationship. The study was supported by the Cornell Graduate School and Smithsonian Tropical Research Institute.
Делаем свой джойстик для Unity3D с батчингом и спрайтами Некоторое время назад мне понадобился мобильный джойстик для управления персонажем. Посмотрев на стандартный джойстик из включенного в дистрибутивную версию Unity3D пакета я понял, что это не совсем то, что мне нужно. Во-первых, там очень сильно закрученная и мудреная система вложенных друг в друга объектов. Во-вторых, джойстик не «подскакивает» к пальцу при нажатии. В-третьих, почему-то он ограничивается квадратом, а не кругом. Чтобы не изобретать велосипед, решил поискать бесплатный джойстик в местном Asset Store. Я решил помочь себе и другим, сделав бесплатный джойстик без использования платных GUI библиотек вроде NGUI. Unity3D версии 4.3 наделала много шума добавлением нативной поддержки разработки 2D игр. Проблема стандартного джойстика была еще и в том, что используемая для отрисовки GUITexture не батчится, на каждую GUITexture на экране тратится ровно 1 Draw Call. Этот же принцип, по-моему, используется в системах вроде NGUI (я не работал с ней, не могу сказать точно).
Scientists 'Switch Off' Brain Cell Death in Mice Scientists have figured out how to stop brain cell death in mice with brain disease and say their discovery deepens understanding of the mechanisms of human neurodegenerative diseases such as Alzheimer's and Parkinson's. British researchers writing in the journal Nature said they had found a major pathway leading to brain cell death in mice with prion disease, the mouse equivalent of Creutzfeld-Jacob Disease (CJD). They then worked out how to block it, and were able to prevent brain cells from dying, helping the mice live longer. The finding, described by one expert as "a major breakthrough in understanding what kills neurons," points to a common mechanism by which brain diseases such as Alzheimer's, Parkinson's, and CJD damage the nerve cells. In neurodegenerative diseases, proteins "mis-fold" in various ways, leading to a buildup of misshapen proteins, the researchers explained in the study. © 2014 Thomson/Reuters.