C++ (Qt)EnumServicesStatus(hSCM,SERVICE_WIN32, SERVICE_STATE_ALL, (LPENUM_SERVICE_STATUS)&Status, Size, &Needed, &Return, &Handle)
C++ (Qt)boost::asio::async_write(socket_, boost::asio::buffer(data_, bytes_transferred), boost::bind(&session::handle_write, this, boost::asio::placeholders::error));
C++ (Qt)template <class BidirectIter, class Traits = std::iterator_traits<BidirectIter>>class tex_iterator{public: typedef BidirectIter iterator; typedef typename Traits::value_type value_type; typedef typename Traits::pointer pointer; typedef typename Traits::reference reference; typedef typename Traits::difference_type difference_type; typedef typename std::bidirectional_iterator_tag iterator_category; typedef boost::basic_regex<value_type> regex_type;
Bash@article{PhysRevD.89.072015, title = {Updated cross section measurement of <span class="aps-inline-formula"><math display="inline"><mrow><msup><mrow><mi>e</mi></mrow><mrow><mo>+</mo></mrow></msup><msup><mrow><mi>e</mi></mrow><mrow><mo>−</mo></mrow></msup><mo stretchy="false">→</mo><msup><mrow><mi>K</mi></mrow><mrow><mo>+</mo></mrow></msup><msup><mrow><mi>K</mi></mrow><mrow><mo>−</mo></mrow></msup><mi>J</mi><mo stretchy="false">/</mo><mi>ψ</mi></mrow></math></span> and <span class="aps-inline-formula"><math display="inline"><mrow><msubsup><mrow><mi>K</mi></mrow><mrow><mi>S</mi></mrow><mrow><mn>0</mn></mrow></msubsup><msubsup><mrow><mi>K</mi></mrow><mrow><mi>S</mi></mrow><mrow><mn>0</mn></mrow></msubsup><mi>J</mi><mo stretchy="false">/</mo><mi>ψ</mi></mrow></math></span> via initial state radiation at Belle}, author = {Shen, C.\,P. and Yuan, C.\,Z. and Wang, P. and Abdesselam, A. and Adachi, I. and Aihara, H. and Al Said, S. and Asner, D.\,M. and Aulchenko, V. and Aushev, T. and Ayad, R. and Bakich, A.\,M. and Bala, A. and Bobrov, A. and Bonvicini, G. and Bozek, A. and Bra\ifmmode \check{c}\else \v{c}\fi{}ko, M. and Browder, T.\,E. and Chekelian, V. and Chen, A. and Cheon, B.\,G. and Chilikin, K. and Chistov, R. and Cho, K. and Chobanova, V. and Choi, S.-K. and Choi, Y. and Cinabro, D. and Dalseno, J. and Danilov, M. and Dole\ifmmode \check{z}\else \v{z}\fi{}al, Z. and Drutskoy, A. and Dutta, D. and Eidelman, S. and Epifanov, D. and Farhat, H. and Fast, J.\,E. and Ferber, T. and Frey, A. and Gaur, V. and Ganguly, S. and Gillard, R. and Glattauer, R. and Goh, Y.\,M. and Golob, B. and Haba, J. and Hayasaka, K. and Hayashii, H. and He, X.\,H. and Hoshi, Y. and Hou, W.-S. and Hsiung, Y.\,B. and Hyun, H.\,J. and Iijima, T. and Ishikawa, A. and Itoh, R. and Iwasaki, Y. and Joffe, D. and Julius, T. and Kang, J.\,H. and Kato, E. and Kawasaki, T. and Kiesling, C. and Kim, D.\,Y. and Kim, H.\,J. and Kim, J.\,B. and Kim, J.\,H. and Kim, K.\,T. and Kim, M.\,J. and Kim, Y.\,J. and Kinoshita, K. and Ko, B.\,R. and Kody\ifmmode \check{s}\else \v{s}\fi{}, P. and Korpar, S. and Kri\ifmmode \check{z}\else \v{z}\fi{}an, P. and Krokovny, P. and Kuzmin, A. and Kwon, Y.-J. and Lee, S.-H. and Li, J. and Li Gioi, L. and Libby, J. and Liu, C. and Liu, Z.\,Q. and Lukin, P. and Matvienko, D. and Miyabayashi, K. and Miyata, H. and Mizuk, R. and Moll, A. and Mussa, R. and Nagasaka, Y. and Nakano, E. and Nakao, M. and Natkaniec, Z. and Nayak, M. and Nedelkovska, E. and Nisar, N.\,K. and Nishida, S. and Nitoh, O. and Okuno, S. and Park, C.\,W. and Park, H. and Pedlar, T.\,K. and Pestotnik, R. and Petri\ifmmode \check{c}\else \v{c}\fi{}, M. and Piilonen, L.\,E. and Ritter, M. and R\"ohrken, M. and Rostomyan, A. and Ryu, S. and Saito, T. and Sakai, Y. and Sanuki, T. and Sato, Y. and Schneider, O. and Schnell, G. and Semmler, D. and Senyo, K. and Seon, O. and Sevior, M.\,E. and Shapkin, M. and Shebalin, V. and Shibata, T.-A. and Shiu, J.-G. and Shwartz, B. and Sibidanov, A. and Simon, F. and Sohn, Y.-S. and Sokolov, A. and Solovieva, E. and Stani\ifmmode \check{c}\else \v{c}\fi{}, S. and Stari\ifmmode \check{c}\else \v{c}\fi{}, M. and Steder, M. and Sumiyoshi, T. and Tamponi, U. and Tatishvili, G. and Teramoto, Y. and Uchida, M. and Unno, Y. and Uno, S. and Urquijo, P. and Usov, Y. and Van Hulse, C. and Vanhoefer, P. and Varner, G. and Vorobyev, V. and Wagner, M.\,N. and Wang, C.\,H. and Watanabe, M. and Watanabe, Y. and Williams, K.\,M. and Won, E. and Yamamoto, H. and Yamashita, Y. and Yashchenko, S. and Yook, Y. and Zhang, C.\,C. and Zhang, Z.\,P. and Zhulanov, V. and Zupanc, A.}, collaboration = {(Belle Collaboration)}, journal = {Phys. Rev. D}, volume = {89}, issue = {7}, pages = {072015}, %commented text, commented text, numpages = {9}, year = {2014}, month = {Apr}, publisher = {American Physical Society},% doi = {10.1103/PhysRevD.89.072015},% url = {http://link.aps.org/doi/10.1103/PhysRevD.89.072015},}
C++ (Qt)#ifndef BIBTEX_PARSER_H#define BIBTEX_PARSER_H #include <string> #include <boost/algorithm/string/case_conv.hpp>#include <boost/algorithm/string/trim.hpp>#include <boost/regex.hpp>#include <boost/tokenizer.hpp> #include "core/spec_token_functions.h"#include "core/tex_iterator.h"#include "core/bibtex_entry.h" namespace bibmake { namespace core { class bibtex_parser{public: typedef std::string string_type; template <class Iterator> static bool parse(Iterator begin, Iterator end, const string_type & key, bibtex_entry & entry) { static const boost::regex comment_regex("[^\\\\](%[^\\n\\r]*)"); tex_iterator<Iterator> _begin(begin, end, comment_regex); tex_iterator<Iterator> _end(end, end, comment_regex); boost::match_results<tex_iterator<Iterator>> what; boost::regex regex("@(\\w+)[\\s\\t]*\\{[\\s\\t]*"+key); if (!boost::regex_search(_begin, _end, what, regex)) return false; entry.set_key(key); entry.set_type(what.str(1)); _begin = what[0].first; quote_list<char> quotes('{', '}'); quotes.add_quote('"', '"'); quote_extractor<char> qextractor(quotes); string_type _entry; if (!qextractor(_begin, _end, _entry)) return false; boost::tokenizer<spec_char_separator<char>> tok(_entry, spec_char_separator<char>(",", "", quotes)); regex.assign("[\\s\\t]*(\\w+)[\\s\\t]*=(.+)"); for (auto s : tok) { boost::smatch w; if (boost::regex_search(s, w, regex)) { string_type tag = boost::algorithm::to_lower_copy(w.str(1)); string_type content = w.str(2); auto first = w[2].first; auto second = w[2].second; qextractor(first, second, content); boost::algorithm::trim(content); if (!content.empty()) entry.add_field(tag, content); } } return true; } }; } /* namespace core */ } /* namespace bibmake */ #endif // BIBTEX_PARSER_H