Bespoke solutions to a cluttered framework.
Tax and legal advisory services for financial wealth planning and generational transitions (succession planning), family business governance, with particular attention to national and international asset engineering, assistance to private clients or family business for investment opportunities in real estate, finance, art and collectables.
Tax, legal and finance advisory services to companies and corporate groups, including extraordinary financial operations, on both a national and international platform.
We assist clients with contracts, budget issues and directors' responsibilities, in planning, transfer pricing, corporate reorganisations, litigation, and in dealings with the authorities. We provide a 360 ° service to foreign investors.
Our strength is based on experience consolidated in an international arena. We can offer legal and tax advice on all aspects regarding Trusts, as well as assistance to the trustees, settlors, beneficiaries or other persons connected to the Trust.
Tax, legal and finance advisory for the internationalisation of companies and groups, backed by an established network of associates worldwide.
We assist clients who invest and trade in an international market through joint ventures, contracts, corporate and tax planning, transfer pricing, due diligence and tax assessment.
Consultancy services for the definition and implementation of structured cooperation between companies, mergers and acquisitions. We assist investors and companies in the structuring of the transaction, from business planning to due diligence, legal tax and financial, to the negotiation and conclusion of the agreements.
We have gained considerable experience in the areas of turnaround, appraisals, evaluations and restoration plans or debt restructuring.
Tax, legal and finance advisory services to the investor on major real estate transactions, from simple purchase and sell, to more complex building projects.
We assist real estate funds, companies and investors from negotiation to implementation of the transaction, both nationally and internationally.
We have consolidated experience in the field of banking taxation of banks and financial intermediaries. We assist the client in all matters of ordinary and extraordinary tax demands, tax compliance and tax litigation.
We assist clients in pre-litigation and litigation. We strive to reach the most advantageous solution for them. We prepare the necessary and appropriate defence for better protection of their rights in matters of taxation, civil, bankruptcy and commercial.
We offer a 360° consultancy service on administrative issues and declarative obligations for companies, entities and individuals. We assist the client by providing tailored advice which, in full compliance of the law, provides a clear view of the performance of the company through timely economic and financial planning.


Hugh, very well done and right on the mark. People tend to equate false bravado with leadership. This is a key reason a greater number of new business leaders tend to be introverts, as shareholder math needs to work. At some point, the false bravado man has to put up or shut up. Elected officials have less of a direct scorecard and even when the math works in their favor, the other side will make up a different story.
As I read this, it is quite clear, Trump who is executing exceedingly well with these ten marketing keys. The dilemma for all of us, is what lies beneath is an exploitive, egomaniacal man.
I doubt there is anything beneath his surface. He's all surface — thin skinned and a vacuum within.
Interesting comment last night that "Trump has your back." This is interesting as his history has been all about taking care of his back only and exploiting others for gain. And, he is still doing it. That is the skill of his marketing genius.
You have provided a good summary of modern political tactics and discourse. I would add but one element to this list: Righteous amorality.
By the way, I think you may be unintentionally casting aspersion upon Cocker Spaniels.
I apologize to all the cocker spaniels out there!
Hugh – we've certainly been seeing a lot of this lately.
Let's hope it never gets that far!! Thanks for the input, as usual.
Great post! I wanted to laugh, but instead I almost cried. Perhaps there would be a glimmer of hope if we let the Cocker Spaniels vote instead of the lemmings?


Kryptonian Warrior: Sanctuary Renewed For A Fourth Season!
I watch a hell of a lot of US TV and one that I actually really enjoy is Sanctuary... OK so it's no secret that I have a massive crush on Amanda Tapping but I actually quite like the the show as a whole and some of its crazy plot lines and monsters too.
Although other shows that I love are now coming to an end like Stargate: Universe and Smallville (although there are whispers on the grapevine that Smallville might surpass its 10th and final season with an 11th) good news came to us all recently with the announcement that a fourth season of 13 episodes has been commissioned by Syfy.
I can never get enough of Amanda so this is great news for me, roll on season 4!!!


text:
published by RUDN UNIVERSITY
Training, Language
and Culture
rudn.tlcjournal.org
Dr Prof Elena N. Malyuga
Peoples' Friendship University of Russia (RUDN University)
2520-2073 (Print) | 2521-442X (Online)
Platinum Open Access
DOAJ, Ulrich's Web, Linguistics Abstracts Online (Wiley), Google Scholar, EBSCO, Russian Science Citation Index, ROAD, CyberLeninka, British Library, Bodleian Libraries (University of Oxford), Ghent University Library
Creative Commons Attribution CC BY 4.0
Quarterly (March, June, September, December)
No Article Processing Charges apply
Training, Language and Culture (TLC) is a peer-reviewed journal that aims to promote and disseminate research spanning the spectrum of language and linguistics, education and culture studies with a special focus on professional communication and professional discourse. Editorial Board of Training, Language and Culture invites research-based articles, reviews and editorials covering issues of relevance for the scientific and professional communities.
The journal is published by Peoples' Friendship University of Russia (RUDN University) with assistance from The International Language Association (ICC) (Germany). Currently indexed in a variety of acclaimed research databases with more to come.
Training, Language and Culture invites authors to submit manuscripts that have not been published before and are not under consideration for publication elsewhere. Submissions are accepted in English only. Submitted manuscripts must comply with the general academic requirements, fall within the aims and scope of the journal, present original research, and appeal to a wide range of specialists within the scientific community. Please read and follow our Submission Guidelines carefully. Doing so will ensure that the publication of your manuscript is as rapid and efficient as possible. The publisher reserves the right to return manuscripts that are not prepared in accordance with these instructions. For any enquiries please contact us at info@tlcjournal.org.
Tweets by TLC_Journal
What does TLC stand for?
TLC stands for Training, Language and Culture.
What is TLC?
Training, Language and Culture (TLC) is a peer-reviewed journal that aims to promote and disseminate research spanning the spectrum of language and linguistics, education and culture studies with a special focus on professional communication and professional discourse. Editorial Board of Training, Language and Culture invites research-based articles, reviews and editorials covering issues of relevance for the scientific and professional communities. The Journal is published by Peoples' Friendship University of Russia (RUDN University) with assistance from The International Language Association (ICC).
What does TLC focus on?
Training, Language and Culture covers the following topics of scholarly interest: theoretical and practical perspectives in language and linguistics; culture studies; interpersonal and intercultural professional communication; language and culture teaching and training, including techniques and technology, testing and assessment.
Who makes up TLC Editorial Board?
TLC Editorial Board is composed of prominent international scholars who help oversee procedures for manuscript submission, acceptance, release, and publication, as well as the criteria for peer review and other editorial matters. This is a highly experienced and well-respected team of experts who take an active part in defining and following the journal's aims, scope, policies and editorial coverage. TLC is supervised by Editor-in-Chief Dr Elena Malyuga (RUDN University, Russia) and Co-Editor Barry Tomalin (ICC, Germany). The list, background and contact information of TLC Editorial Board members is available here.
Who can contribute research papers to TLC?
TLC welcomes contributions from scholars, teachers and trainers engaged in the fields of expertise outlined in the journal's Aims and Scope and offering an in-depth analysis of the corresponding issues from both theoretical and practical perspectives.
Is TLC an Open Access journal?
TLC provides Platinum Open Access to all of its publications.
Does TLC publish research into English exclusively?
While we are mainly committed to publishing research into English, we also welcome enquiries into other languages. The language of publication, however, is English only.
Can I submit my paper in any language?
TLC only accepts articles in English and does not provide translation services.
Does TLC publish original research exclusively?
Apart from original research papers, TLC also publishes quality reviews on books, textbooks, articles and periodicals dealing with the relevant issues.
Can I contact a TLC representative?
You can contact us at info@tlcjournal.org. We will get back to you in the shortest possible time.
What does RUDN University stand for?
RUDN University stands for Peoples' Friendship University of Russia.
Where is RUDN University located?
Peoples' Friendship University of Russia is located in Moscow and is ranked first among Russian higher educational institutions in terms of internationalisation, as recorded by the Reuter Agency.
What is RUDN University famous for?
RUDN University is first and foremost famous for its international cooperation which is an integral part of the university's activity and a key instrument in ensuring high-quality education complying with the international standards. As of today, 30% of the total number of international students studying in Russia are RUDN University students coming from 150 countries from around the globe. In total, the university is currently Alma Mater to about 27 thousand students representing over 450 of the world's nations. Today, university graduates are successfully building their careers in 190 countries.
Who are RUDN University lecturers?
The university employs over 5 thousand staff members, including over 2 thousand top-qualified professors and lecturers, 15 full and corresponding members of the Russian Academy of Sciences, 32 Honorary Scientists of Russia, and 11 Honorary Members of Russian Higher Education.
Who does RUDN University collaborate with?
RUDN University offers majors in the framework of all levels of training with more than 250 cooperation agreements entered into with foreign universities (Université Nice Sophia Antipolis, Universidad Complutense de Madrid, Università degli Studi di Bari Aldo Moro, etc.), as well as research and educational centres. The university is a member of the BRICS Network University and a leading university of the Consortium of Higher Educational Institutions implementing the International Human Rights Protection MA programme supported by the Office of the United National High Commissioner for Human Rights.
Does RUDN University support sustainable development?
In December 2019, GreenMetric presented the results of the world university environmental sustainability ranking. RUDN University took the 38th place among the universities of the world, once again confirming the position of the greenest university in Russia in terms of Transport Policy, Waste Management and Water Resources.
Which RUDN University department runs TLC?
TLC is an initiative of one of RUDN University departments – the Dpt of Foreign Languages at the Faculty of Economics. The department is run by a prominent Russian teacher and researcher Prof Elena Malyuga and focuses on a number of topical research issues, such as LSP, specialised translation, applied linguistics, professional communication, etc. In order to promote research in these areas of study, the department hosts a number of international conferences, such as the international research conference Topical Issues of Linguistics and Teaching Methods in Business and Professional Communication. The conference is a collaborative work of the department and Cambridge English Language Assessment, British Council, Cambridge University Press, American, Italian and Chinese Embassies in Moscow, the British Council, Cervantes Institute, Goethe Cultural Centre, German Academic Exchange Service, CampusFrance, Pearson Longman, McMillan, Heinemann publishing houses. TLC was intended as one more step towards promotion of research in the field of related topics and yet another opportunity to strengthen the university's international ties.
Where can I learn more about RUDN University?
You can learn more about RUDN University by visiting the University's official website at eng.rudn.ru.
What does ICC stand for?
ICC stands for International Certificate Conference – The International Language Association.
What is ICC?
ICC is a Non-Government Organisation (NGO) with participatory status at the Council of Europe. It is also a member of the Professional Network Forum at the ECML (European Centre for Modern Languages) and of EUCIS LLL (European Civil Society Platform on Lifelong Learning).
What is the mission of ICC?
ICC sets standards for a transnational network of language learners providing foreign language teaching and learning with exchange of ideas and know how.
How does ICC function?
ICC works through individuals and institutions (at a local level), networks of members (regional level), through the involvement of our member organisations in national initiatives and government committees (national level), and through activities and representations at the European Commission and Council of Europe and other supra-national bodies (international level).
How does ICC promote quality standards?
ICC promotes quality in foreign language teaching and learning by certifying progress and achievement in language acquisition; certifying teachers' competence to teach; assuring the quality of courses offered; offering guidelines for the evaluation of teaching institutions; and providing criteria for the evaluation of teaching materials and courses.
Where is ICC located?
ICC office is located in Bochum, Germany.
How can I contact an ICC representative?
You can contact ICC at info@icc-languages.eu.
Where can I learn more about ICC?
You can learn more about ICC by visiting the organisation's official website at icc-languages.eu.
Dr Elena N. Malyuga
Dr Elena N. Malyuga is Dr of Linguistics, Full Professor, Head of Foreign Languages Department (Faculty of Economics, RUDN University), Chairperson of the Business and Vocational Foreign Languages Teachers National Association, Editor-in-Chief of Issues of Applied Linguistics, and also Editor-in-Chief of Training, Language and Culture. Her scientific interests include theory and practice of intercultural professional and business communication and sociolinguistics. Has authored over 300 publications. Most recent work includes Linguistic Pragmatics of Intercultural Professional and Business Communication – a monograph published by Springer.
See Editorial Board for more information.
Barry Tomalin
Glasgow Caledonian University London
Barry Tomalin MA International Liaison and Communication (University of Westminster) is a specialist in international communication, cultures, soft power and media. Founder and facilitator of the ICC-recognised Business Cultural Trainers Certificate, he teaches at Glasgow Caledonian University London, Birkbeck College University of London and International House London. Author and co-author of a number of books on international business culture. Key interests are in international communication, media and cultures.
Dr Michael McCarthy
Dr Michael McCarthy is Emeritus Professor of Applied Linguistics in the School of English, University of Nottingham, UK. He holds/has held Visiting Professorships at the University of Limerick (Ireland), Newcastle University (UK), and Penn State University (USA). He is an Honorary Professor of the University of Valencia, Spain. Has been involved in the study and teaching of English for more than 50 years. For the last 30 years, he has worked with large, computerised corpora of English texts, investigating them to establish how the vocabulary and grammar of English are really used at the present time and how they are evolving and changing. His research has focused on everyday spoken English. He is author of more than 50 books and 112 academic papers dealing with research and teaching of the English language, especially as a second or foreign language. He has taught in the UK, the Netherlands, Spain, Sweden and Malaysia. He is a Fellow of the Royal Society of Arts.
Dr Robert O'Dowd
University of León
León, Spain
Dr O'Dowd teaches English as a Foreign Language and is a teacher-trainer at the University of León, Spain. He studied European Studies at the University of Limerick in Ireland, before going on to do an MA at the University of Ulster, Northern Ireland and then a PhD at the University of Essen in Germany. He has taught English at universities in Ireland, Germany and Spain and has published widely on the application of online intercultural collaboration and exchange in education. He has edited the volume Online Intercultural Exchange: A practical introduction for foreign language educators for Multilingual Matters. One of his most recent publications is the co-edited volume Online Intercultural Exchange: Policy, Pedagogy, Practice published by Routledge. He recently coordinated the INTENT project - a European Lifelong Learning Programme (LLP) project on promoting online intercultural exchange in European Higher Education.
Dr Elsa Huertas Barros
Senior Lecturer in Translation Studies in the School of Humanities and BA Translation Course Leader, University of Westminster. Completed a 4-year degree in Translation and Interpreting at the University of Granada, followed by a Masters in Advanced Studies in Translation and Interpreting. Was awarded a PhD in Translation, which focuses on the role of interpersonal competence in translator training. Holds qualifications in Teaching Spanish as a Foreign Language and TEFL. Has worked in several universities, including the University of Westminster, Imperial College, UCL and Royal Holloway University of London. Research interests lie in the fields of translator training and languages, particularly translator competence, interpersonal competence, collaborative learning and student-centered teaching methodologies.
Dr Olga V. Aleksandrova
Olga V. Aleksandrova is Full Professor and Head of English Linguistics Department at Lomonosov Moscow State University. Has authored a raft of manuals and articles devoted to the study of modern English language, its grammar, innovative trends, cognitive linguistic and cultural studies. She is a member of editorial boards in several scientific journals, a member of the Russian Higher Attestation Commission that oversees the awards of advanced academic degrees. She also holds membership in a number of professional associations of linguists and language teachers in Russia and abroad, and has participated in defining the Russian national academic standards in philology for universities.
Dr Lilia K. Raitskaya
Moscow State Institute of International Relations (MGIMO University)
Lilia K. Raitskaya is Doctor of Education, Professor in the Department of Education and Psychology, and Rector's Counsellor at MGIMO University Administration. Editor of the Journal of Language and Education. Has authored over 150 articles and books, 8 monographs and about 30 textbooks for university students. Research interests cover academic development, methodology of scientific research in social sciences, the discourse of international scholarly publications, science editing, rhetoric and discourse of scholarly texts.
Dr Alex Krouglov
Alex Krouglov holds MA in Translation, Interpreting and Language Training, and a PhD in Linguistics. Emeritus Associate Professor, London Metropolitan University, Senior Teaching Fellow, University College London and Leading Researcher, Rezekne Academy of Technology. His main research areas are Sociolinguistics, Translation, Interpreting and Education. Author of numerous research articles, chapters and textbooks. Has been involved in teaching Translation, Interpreting, Languages and Linguistics in various countries. Has conducted many teacher training and translation/interpreting workshops and led a number of international projects in the fields of Higher Education: Tempus, Erasmus+, European Commission, United Nations. Has engaged as an expert in Higher Education for the World Bank, British Council, and many other international and national organisations. Has been involved in assignments as translator, interpreter and assessor.
Dr Igor E. Klyukanov
Cheney, USA
Igor E. Klyukanov is Professor of Communication in the Department of Communication Studies at Eastern Washington University, USA. He has authored numerous articles, book chapters, and books in communication theory, semiotics, translation studies, general linguistics, and intercultural communication. His works have been published in the US, Russia, England, Spain, Costa Rica, Serbia, Bulgaria, India and Morocco. His textbook Principles of Intercultural Communication has been adopted by over 30 Colleges and Universities in the US. His monograph A Communication Universe: Manifestations of Meaning, Stagings of Significance won the 2012 NCA Philosophy of Communication Division 2012 Best Book Award. He is also the translator and editor of Mikhail Epstein's book The Transformative Humanities: A Manifesto. He served as an associate editor of The American Journal of Semiotics and is the founding editor of Russian Journal of Communication.
Michael Carrier
Highdale Consulting
Michael Carrier is CEO of Highdale Consulting, consults for a number of educational organisations. Has worked in language education for 30 years as a teacher, trainer, author, and director. Lectures worldwide. Formerly Director, English Language Innovation at the British Council in London, CEO of International House world schools network and Executive Director of Eurocentres USA. Focuses on teacher development, intercultural awareness, and the application of digital technology to education. Most recently co-edited Digital Language Learning. He has written a number of ELT coursebooks and skills books.
Dr Joongchol Kwak
Hankuk University of Foreign Studies
Joongchol Kwak is Professor Emeritus at the Graduate School of Interpretation & Translation (GSIT), Director of the Center for Interpreting and Translation at Hankuk University of Foreign Studies (HUFS), and Council member of the International Federation of Translators (FIT). Holds a PhD in Journalism & Communication. Former President of Korean Association of Translators and Interpreters (KATI). Acted as Interpreting Coordinator for the US Presidential Debates in 2016. Research interests cover interpretation of diplomatic and political discourse, medical interpreting, machine translation, and training of TV news interpreters.
Dr Chai Mingjiong
Chai Mingjiong is Professor in Translation and Interpreting Studies at the Graduate Institute of Interpretation and Translation (GIIT), Shanghai International Studies University (SISU). Acting Editor in Chief of East Journal of Translation. Commands nationwide prestige in the field of translation.
Dr Claudia Schuhbeck
International Certificate Conference – The International Language Association (ICC)
Claudia Schuhbeck is Director of EuroCsys Intenational Liaison. She has a DSc in Education at the Paris-Lodron University of Salzburg, Austria. For the past ten years has developed innovative multicultural programmes for faculty and students at universities in different parts of the world, using the latest technology and neuroscience to increase the effectiveness of the teaching-learning process. Currently researcher and international liaison for European Competence Systems.
Dr Enrique F. Quero-Gervilla
University of Granada
Enrique F. Quero Gervilla is Dr of Linguistics, Professor of Slavic Studies, Dean of the Faculty of Translation and Interpreting, Head of the Department of Greek and Slavic Philology at the University of Granada.
Dr Iván Vicente Padilla Chasing
National University of Colombia
Iván Vicente Padilla Chasing is Dr of Literary Studies, Associate Professor in the Department of Literature and Literary Studies at the National University of Colombia. Has been researching the 19th century and contemporary Colombian literature. He is part of the Sociological Aesthetics Study Group led by Professor Hélène Pouliquen at the Caro y Cuervo Institute (Bogotá).
Robert Williams is principal lecturer in the Department of Modern Languages and Cultures at the University of Westminster. Teaches on the MA TESOL and is course leader for the MA International Liaison and Communication, a pioneering course training people to be the bridge across communities and between language groupings. Currently the internal quality assurance member for CoMoViWo – a project designing intercultural communication training material in English and Spanish, with a specific focus on e-communication. Has over 30 years' experience in language education as a teacher, teacher trainer, assessor and consultant. Has been involved in many EU co-funded development projects and also chairs an annual Intercultural Masterclass through UK Trade and Industry and regularly speaks at conferences across Europe and beyond.
Anthony Fitzpatrick
Anthony Fitzpatrick is board member, Co-Chair and former Director of the ICC, former director of the Deutsche VolkHoschul-Verband, Germany. From February 1995 was entrusted with the affairs of the International Certificate Conference (ICC) as Secretary General, responsible for co-ordination of the work of the organisation. As former Head of Foreign Language Projects at the German Institute for Adult Education (DIE), was responsible for the development of curricula and language examinations offered in seven European languages including Japanese. Since the launch of the education programmes of the European Commission in 1989, he has been involved in over 20 EC-funded projects, chiefly as project coordinator.
Myriam Fischer-Callus
Myriam Fischer-Callus is Project Manager for the ICC-Languages EUROLTA language teachers training programme. She was Director of English Studies at the Volkhochschule in Aschaffenburg, Germany and is a member of the German work group that that developed a language portfolio for adults (accredited by the Council of Europe in 2006). She has been coaching volunteer teachers in teaching German as a second language, a teacher training concept accepted by BAMF (The German Ministry of Migration).
Before you proceed to submit your paper, please make sure it meets our requirements
Follow @TLC_Journal
info@tlcjournal.org | info@icc-languages.eu | © RUDN University

redpajama_set_name: RedPajamaCommonCrawl


text:
»REVENUE LAWS TECH., CLARIFYING, & ADMIN CHANGES.
Status: Ch. SL 2012-79 (Senate Action) (Jun 26 2012)
S 826/S.L. 2012-79
Bill S 826/SL 2012-79 (2011-2012)
Summary date: Jun 27 2012 - More information
AN ACT TO MAKE TECHNICAL, CLARIFYING, AND ADMINISTRATIVE CHANGES TO THE TAX AND RELATED LAWS. Summarized in Daily Bulletin 5/17/12, 5/31/12, and 6/4/12. Enacted June 26, 2012. Effective June 26, 2012, except as otherwise provided.
Banking and Finance, Transportation, Property and Housing, Tax
Bill S 826 (2011-2012)
Summary date: Jun 4 2012 - More information
Senate amendment makes the following changes to 2nd edition. Current law repealed GS 105-130.6 regarding subsidiary and affiliated corporations effective January 1, 2012. Amends GS 105-130.2 to add definitions for the following terms that were previously defined in repealed GS 105-130.6: (1) affiliate, (2) parent, and (3) subsidiary. Makes conforming changes to the numbering of the provisions in GS 105-130.2. Makes conforming changes to GS 105-122(b1), 153A-279(a)(1), 160A-236(a)(1), and 160A-626(a)(1) to reflect the repeal of GS 105-130.6. Amends GS 105-130.14 to provide that corporations filing consolidated tax returns for federal income tax purposes cannot file a consolidated or combined return with the NC Secretary of Revenue except (1) as specifically directed in writing by the Secretary under GS 105-130.5A (was, GS 105-130.6) or (2) with written advice from the Secretary allowing (was, requiring) a consolidated return in response to a written request from the corporation under GS 105-130.5A. Repeals GS 105-262(b) regarding notice and hearing exceptions for rules proposed under repealed GS 105-130.6.
Amends GS 105-164.3 (definitions) to specify that a (26b) prepaid calling service and a (27a) prepaid wireless calling service must meet the requirement of being sold in predetermined units or dollars.
Amends GS 105-164.4B(a) to delete the terms, but retaining the provisions concerning over the counter sales and delivery to a specified address.
Amends GS 105-236 to make adjustments providing that the penalty for failing to file a return accrues during the time that the failure continues to an amount not to exceed 25% in the aggregate (was, whichever was greater, 25% in the aggregate or $5.00); and to provide that the penalty for failing to pay tax when it is due is 10% of the tax (was, 10% of the tax, subject to a $5.00 minimum). Effective January 1, 2014.
Rewrites GS 121-5(e) as Archives and Records Management Fund (was, Program Funding). Establishes the Fund as a special revenue fund consisting of fees credited to the Fund under GS Chapter 161. Specifies how the Fund revenue may be used. Effective July 1, 2012.
Amends GS 105-330.3 to specify the applicable rates at which interest accrues on unpaid taxes for unregistered classified motor vehicles. Makes conforming change to subsection (b) of GS 105-330.4.
Makes technical changes.
Summary date: May 31 2012 - More information
Senate committee substitute makes the following changes to 1st edition.
Adds two sections to make technical and clarifying changes to GS 105-134.5 and GS 105-134.6. Adds a new section to provide a tax credit under Article 3J in GS Chapter 105 (tax credits for small businesses) for the tax years of 2007-2010 to a taxpayer who files an amended return before January 1, 2013, provided the taxpayer (1) did not timely claim a credit, (2) would have been ineligible to claim a credit because the taxpayer did not meet the statutory environmental impact standard before SL 2010-147 (which modified the standard and made the changes retroactive to January 1, 2007) was enacted, and (3) satisfies the standard after the enactment of SL 2010-147.
Adds sections to make clarifying changes to provisions in GS Chapter 105, and amends GS 105-160.3(b) to add that an estate or trust is not allowed an education expenses credit. Makes clarifying changes to the definition of over-the-counter drug in GS 105-164.3(25a). Makes clarifying changes to the provisions concerning tax on unregistered vehicles in GS 105-330.3. Makes additional technical and clarifying changes.
GS 105, GS 20, GS 45, GS 143, GS 160A, GS 161, GS 100A


Sheffield City Council is calling on all community groups, schools, residents and businesses to help give the city a Spring Clean beginning Monday 16th March.
People are being asked to support the Council and its partners as part of a nationwide Keep Britain Tidy spring clean to help keep the city looking its best.
Beginning Monday 16th March and during that week leading up to Saturday 21st March – which marks the first day of spring – a number of litter picks will be happening across Sheffield in neighbourhoods, parks and busy shopping areas thanks to community groups that have already signed up to help. Other groups, local residents, schools and businesses are also being urged to take pride in their city and do the same.
Cllr Jayne Dunn, Cabinet Member for Environment, Recycling and Streetscene, said: "Our Streets Ahead team, teams in parks and housing areas work really hard all year round to keep our city clean and looking its best for residents and visitors. The Clean Up week is all about encouraging people to take responsibility for the community that they live in.
Zahira Naz, Community Organiser for Darnall and Tinsley who works for Darnall Forum, commented: "We have been litter picking in the local area for around two years now. We wanted to be more involved in the community and play a part in creating a place that's nice to live.
Community groups, residents and businesses can all take part. Sheffield City Council is providing litter picking tools on a first come, first served basis and will also be disposing of the bags of rubbish collected. Call 0114 273 4567 to register your interest.


text:
\subsection*{\centering Abstract}
\textit{
Consider the following framework of universal decoding suggested in \cite{merhav:universal}. Given a family of decoding metrics and random coding distribution (prior), a single, universal, decoder is optimal if for any possible channel the average error probability when using this decoder is better than the error probability attained by the best decoder in the family up to a subexponential multiplicative factor.
We describe a general universal decoder in this framework. The penalty for using this universal decoder is computed. The universal metric is constructed as follows. For each metric, a {\em canonical} metric is defined and conditions for the given prior to be {\em normal} are given. A sub-exponential set of canonical metrics of normal prior can be merged to a single universal optimal metric. We provide an example where this decoder is optimal while the decoder of \cite{merhav:universal} is not.
}

\section{Introduction}\label{sec:intro}

\nocite{ElkayamEE2014}
Metric based decoders are usually used to decode codes in digital communication. Typically, the metric tries to capture the most likely codeword that was transmitted. When the channel over which the codeword was transmitted is known at the receiver, the \emph{Maximum Likelihood} (ML) decoder is used for optimal performance (in terms of block error rate). When the channel is not known at the receiver, other solutions are required.

Usually another assumption is made, for example, the channel $W_{\theta}(\by|\bx)$ belongs to some family of channels indexed by $\theta \in \Theta$. The family of channels can have some measure defined over it (Bayesian approach), \eg, fading channel, or the channel is one of several possible channels (deterministic approach), \eg, discrete memoryless channels (DMCs). The performance in the first case can be measured over the channel realization, and in the latter per specific channel.

A universal decoding is \emph{optimal} with respect to a given family of channels if the performance when using the universal decoder is not worse (in the error exponent sense) than when the optimal decoder is used; specifically, the error exponent is not smaller than that of the optimal decoder.

In \cite{goppa1975nonprobabilistic}, Goppa offered the \emph{maximum mutual information} (MMI) decoder, which decides in favor of the codeword having the maximum empirical mutual information with the channel output sequence. Other universal decoders have been suggested over the years for ISI channels \cite{DBLP:journals/corr/HuleihelM14, lapidoth2000gaussian, farkas2008blind},Interference channels \cite{merhav1993universal}, finite state channels \cite{ziv1985universal}, \cite{lapidoth1998universality}, Individual channels \cite{DBLP:journals/tit/LomnitzF13}, and \cite{DBLP:journals/tit/LomnitzF13a}. In \cite{feder1998universal}, Feder and Lapidoth provide a fairly general construction of a universal decoder for a given class of channels. Their construction has two key points. The first is the use of uniform random coding distribution (prior), which means that all codewords have the same probability; this allows the use of the \emph{merged decoder}. The second is the definition of a separable family, which means that there is a countable set of channels that can be used as representative, in the sense that if the performance of the universal decoder is good over these channels, then it would be good over the whole family of channels.

In \cite{merhav:universal} Merhav proposed another framework of universal decoding, namely, universality relative to a given set of decoding metric over arbitrary channels, where optimality means that the performance of the universal decoder is not worse (in the error exponent sense) than the performance when any other metric from the family is used. The decoder proposed by Merhav in \cite{merhav:universal} uses an equivalent of ``types'' that is a set of input and output sequences of the channel for which the metrics of the family provides the same value. The universal decoder that is based on ties in the metric, thus, does not seem to be the most general.

In this paper we generalize the construction in \cite{merhav:universal}, which in some sense also generalizes Feder and Lapidoth`s universal decoder, \cite{feder1998universal}. The quantity $\pem$, which is the error probability when using the metric $m$, given that $\bx$ was transmitted and $\by$ was received, is defined. This quantity plays an important role in the computation of the average error probability and can be used to compare the performance between different metrics. Based on $\pem$ we will define, for a metric $m$, a ``canonical metric'' $\overline{m}\BRA{\bx,\by}=-\log \pem$, which is equivalent to $m$. The canonical metrics (or the associated error probabilities $\pem$) serve, in turn, to define a universal decoder relative to a set of metrics, called the \textbf{Generalized Minimum Error Test}. We derive the penalty of using this universal metric, and show when this metric is optimal (in the error exponent sense).

The definition of the canonical metric is related to the definition in \cite{lomnitz2012communication} of \emph{empirical rate function}. This rate function, which is a function of the transmitted word $\bx$ and the received word $\by$, was defined in an attempt to remove the probabilistic assumption in communication and get a rate function that fits the individual sequences of input and output. Specifically, after we introduce the notion of normal prior, we show that for every metric $m$ over a normal prior there exists a ``tight'' empirical rate function, \ie, the canonical metric, and $\overline{m}\BRA{\bx,\by} \approx \log\BRA{ \frac{P(\bx|\by)}{Q(\bx)}}$. Here $\approx$ means equal up to a sub-exponential factor and $P(\bx|\by)$ is a probability distribution over $\cX$. A set of countable ``tight'' rate functions can be merged into a single universal decoding metric that is optimal with respect to all the decoding metrics in the set. This is the generalization of the merged decoder of \cite{feder1998universal}.

\section{Notation}

This paper uses bold lower case letters (\eg, $\bx$) to denote a particular value of the corresponding random variable denoted in capital letters (\eg, $\bX$). Calligraphic fonts (\eg, \calX) represent a set.
Throughout this paper $\log$ will be defined as base 2 unless otherwise indicated. $\PR{A}$ will denote the probability of the event $A$. We will use the $o$ notation. Specifically, $o(n)$ will be used to indicate a sequence of the form: $n \cdot \lambda_n$ where $\lambda_n \toinf 0$ and $o(1)$ is a sequence that goes to 0. A sequence of positive numbers $\chi_n$ is said to be \textbf{subexponential} if $\limtoinf \frac{1}{n}\log(\chi_n) = 0$. With the $o$ notation this is just $\chi_n=2^{o(n)}$

\section{Preliminaries}

A rate-$R$ blocklength-$n$, \textbf{random code} with prior $Q_n(\bx)$ is:
\begin{align}
\cC = \BRAs{\bx(1), \bx(2), ..., \bx(2^{nR}) } \subset \cX^n,
\end{align}
where each codeword $\bx(i)$ is drawn independently according to the distribution $Q_n(\bx)$. The \textbf{encoder} maps the input message $k$, drawn uniformly over the set $\BRAs{1, ..., 2^{nR}}$, to the appropriate codeword, \ie, $\bx(k)$. A \textbf{decoding metric} is a function $m: \cX^n \times \cY^n \to \mathbb{R}$. The \textbf{decoder} associated with the decoding metric $m$ is the function $\cD_m: \cY^n \to \BRAs{1, ..., 2^{nR}}$ defined by:

\begin{align}
\cD_m(\by) = \hat{i} = argmax_{1 \leq i \leq 2^{nR}} \BRA{m(\bx(i),\by)}.
\end{align}

\begin{definition}
The \textbf{average error probability} associated with the decoder $\cD_m$ over the channel $W_n(\by|\bx)$ is denoted by $\bar{P}_{e,m,W}\BRA{R}$. The error probability captures the randomness in the codebook selection, the transmitted message, and the channel output.
\end{definition}

\begin{remark}
We will generally refer to a metric as a decoder where it would be understood that we refer to the decoder associated with the given metric.
\end{remark}

\begin{remark}
When the decoding metric $m(\bx,\by) = W_n(\by|\bx)$, the error probability is minimized and the decoder is called the Maximum Likelihood decoder. The \textbf{mismatch} case is when the metric is not matched to the channel and may result in performance degradation.
\end{remark}

\begin{definition}
For a family of decoding metrics:
\begin{align}\label{def:met_familty}
\cM_n = \BRAs{m_{\theta}(\bx,\by) : \theta \in \Theta_n, \bx \in \cX^n, \by \in \cY^n}.
\end{align}
Denote:
\begin{align}\label{def:met_error_probability}
\bar{P}_{e,\cM_n,W_n}\BRA{R} = \min_{\theta \in \Theta_n}\bar{P}_{e,m_{\theta},W_n}\BRA{R},
\end{align}
the minimum error probability over the channel $W_n(\by|\bx)$ when the best metric matched for this channel is used.
\end{definition}

\begin{definition}
A sequence of decoding metrics $u_n$, independent of $\theta$, and their associated decoders is called \textbf{universal}. The sequence of universal decoding metrics $u_n$ (and their decoders) is \textbf{optimal} (in the error exponent sense) with respect to the family $\cM_n$ if:
$$\limtoinf \frac{1}{n}\log\BRA{\frac{\bar{P}_{e,u_n,W(\by|\bx)}\BRA{R}}{\bar{P}_{e,\cM_n,W(\by|\bx)}\BRA{R}}} \leq 0$$
for every channel $W(\by|\bx)$.
\end{definition}

Consider a metric $\metric{m}$. The pairwise error given that $\bx$ was transmitted and $\by$ was received is given by:
\begin{align} \label{def:pair_err}
\pem = Q_n(m(\bX,\by) \geq m(\bx,\by)).
\end{align}

The probability given by \eqref{def:pair_err} is for a single (random) codeword $\bX$, to beat the transmitted word $\bx$ given that the received word was $\by$. Notice that in case of a tie, we are assuming that an error has occurred.

The term $\pem$ can be used to compute the average error probability for any rate $R$ as can be seen in the following lemma.
\begin{lemma} \label{lem:comm_total_error}
\begin{equation}\label{eq:union_bound_cliped}
 \frac{1}{2} \leq \frac{\bar{P}_{e,m,W}\BRA{R}} {\E{\min\BRA{1, 2^{nR} \cdot \pem}}} \leq 1,
\end{equation}
where the expectation is with respect to $Q(\bx)W(\by|\bx)$.
\end{lemma}

This lemma is given in \cite{merhav:universal}. The upper bound follows from the union bound. The lower bound follows from a lemma proved by Shulman in \cite[Lemma A.2]{ShulmanPHD}; namely, that the union clipped to unity is tight up to factor 2 (for pairwise independent events).

\begin{definition}
We say that the metric $u_n$ \textbf{dominates} $m_n$ if for all $\bx,\by$:
\begin{equation}\label{def:dominate}
\pe{u_n} \leq \pe{m_n} \cdot 2^{n \cdot \lambda_n}
\end{equation}
with with $\lambda_n \toinf 0$.
\end{definition}

The following lemma, which also appears in \cite{merhav:universal}, follows from lemma \eqref{lem:comm_total_error}:
\begin{lemma} \label{lem:preformence_compre}
\begin{align} \label{preformence_compre}
\bar{P}_{e,u_n,W}\BRA{R} \leq 2\cdot 2^{n \cdot \lambda_n} \cdot \bar{P}_{e,m_n,W}\BRA{R} \\
\bar{P}_{e,u_n,W}\BRA{R} \leq 2\cdot \bar{P}_{e,m_n,W}\BRA{R+\lambda_n}.
\end{align}
In particular, if metric $u_n$ dominates $m_n$ then the average error exponent when using the metric $u_n$ is not worse than using the metric $m_n$.
\end{lemma}

Obviously, an optimal universal decoding metric is a metric that dominates all the metrics in the family \eqref{def:met_familty}.

\section{ The Generalized minimum error test} \label{sec:dec_comp}

In this section we propose our universal decoder, the \textbf{Generalized Minimum Error Test (GMET)}. The decoder estimates the metric that minimizes the pairwise error probability.
\begin{definition}
For the given family of metrics \eqref{def:met_familty}, let:
\begin{equation}\label{def:U}
2^{-n\cdot U_n(\bx,\by)} \triangleq \min_{\theta \in \Theta_n} \pe{m_{\theta}}.
\end{equation}
$U_n(\bx,\by)$ is the GMET. Let:
\begin{equation}\label{def:redundancy}
K_n(\Theta_n) \triangleq \MAX{\by} \; \EQn{2^{n\cdot U_n(\bX,\by)}}.
\end{equation}
$K_n(\Theta_n)$ is termed the \textbf{redundancy} associated with the decoder.
\end{definition}

The performance degradation of the proposed universal decoder relative to any metric $m_{\theta}(\bx,\by)$ in the family can be measured through the redundancy as demonstrated in the following Theorem.

\begin{theorem} \label{theorem:universal_decoder}
For any $\theta \in \Theta_n$
\begin{equation}\label{eq:U_dominate}
\pe{U_n} \leq \pe{m_{\theta}} \cdot K_n(\Theta_n).
\end{equation}
In particular, if $K_n(\Theta_n)$ is sub-exponential then the universal decoder $U_n(\bx,\by)$ is optimal.
\end{theorem}

\ifISITpaperFull

\begin{proof}
\begin{align*}
  \pe{U_n} &=                    Q_n\BRA{U_n(\bX,\by) \geq U_n(\bx,\by)} \\
           &=                    Q_n\BRA{2^{n\cdot U_n(\bX,\by)} \geq 2^{n\cdot U_n(\bx,\by)}} \\
           &\overset{(a)}{\leq} \EQn{2^{n\cdot U_n(\bX,\by)}} \cdot 2^{-n\cdot U_n(\bx,\by)} \\
           &\overset{(b)}{\leq}  \pe{m_{\theta}} \cdot K_n(\Theta_n) \\
\end{align*}
where (a) follows from Markov's inequality and (b) from the definition of $K_n(\Theta_n)$ \eqref{def:redundancy} and $U_n(\bx,\by)$ \eqref{def:U}.
If $K_n(\Theta_n)$ is sub-exponential then $U_n(\bx,\by)$ dominates every metric $m_{\theta}$. By Lemma \ref{lem:preformence_compre} the universal decoder is optimal.
\end{proof}
\else

  \begin{proof}
  The proof appears in \cite{ElkayamUniversal} and omitted here due to space limitation.
  \end{proof}
\fi

Theorem \ref{theorem:universal_decoder} provides a quite general construction of a universal decoder. However, bounding $K_n(\Theta_n)$ might not be an easy task.

\subsection{Conditions for universal decoding}
Obviously, for a family of a \emph{single} metric there must be a universal decoder, \ie, the same single metric or an equivalent metric. By analyzing this simple case we get a core understanding of when the proposed GMET decoder is optimal.

\begin{definition}
For a given matric $m(\bx,\by)$ let:
\begin{equation}\label{def:canonic_metric}
\bar{m}(\bx,\by) \triangleq -\frac{1}{n}\log\BRA{\pem}.
\end{equation}
$\bar{m}(\bx,\by)$ is called \textbf{the canonical metric} associated with $m(\bx,\by)$.
\end{definition}
The canonical metric $\bar{m}$, which is equivalent to the original metric $m$ as it induces the same order of the candidate words, is the proposed universal decoder for the family of a single metric $m(\bx,\by)$. The next definition captures the cases where this universal metric is optimal in the sense of Theorem \ref{theorem:universal_decoder}.
\begin{definition} \label{def:normal} \mynewline
\begin{enumerate}
  \item The metric $m(\bx,\by)$ over the prior $Q_n(\bx)$ is \textbf{normal} if
  \begin{equation}\label{def:NormalMetric}
    \EQn{2^{n\cdot \bar{m}(\bX,\by)}} \leq 2^{n\cdot\lambda_n}
  \end{equation}
  uniformly over $\by$, where $\lambda_n \toinf 0$.
  \item The prior $Q_n(\bx)$ is normal if each metric over $Q_n(\bx)$ is normal (uniformly over all the metrics, \ie, the bound in \eqref{def:NormalMetric} is independent of the metric).
\end{enumerate}
\end{definition}
Normal metrics are exactly those metrics that might admit an optimal universal decoder.

The following lemma provides a sufficient condition for a given discrete prior $Q_n(\bx)$ to be normal. The condition is very mild and easy to check.
\begin{lemma}
Let $\chi_n = -\log \BRA{ \min_{\bx : Q_n(\bx) \neq 0}Q_n(\bx)}$. If $\chi_n$ is sub-exponential, then $Q_n(\bx)$ is normal.
\end{lemma}
\begin{proof}
The proof is given in the appendix (Proposition \ref{prop:normal_prior}) where we also introduce the concept of ``rate function'' and relate it to the canonical metric.
\end{proof}

\subsection{The Merged decoder}
If the family of metrics \eqref{def:met_familty} is finite, we can "merge" all the metrics and get a bound on $K_n(\Theta_n)$. If the family size grows sub-exponentially over the normal prior, then the family admits a universal decoder.

\begin{theorem}
Suppose $Q_n(\bx)$ is normal and $\Theta_n$ is finite, then:
\begin{enumerate}
  \item $K_n(\Theta_n) \leq |\Theta_n|\cdot 2^{o(n)}$
  \item If $|\Theta_n|$ grows sub-exponentially, then the family $\Theta_n$ admits an optimal universal decoder.
\end{enumerate}
\end{theorem}

\ifISITpaperFull

\begin{proof}
For each $\by$:
\begin{align*}
\EQn{2^{n\cdot U_n(\bX,\by)}} &= \EQn{\frac{1}{\min_{\theta \in \Theta_n } \pe{m_{\theta}} }} \\
&\overset{(a)}{\leq} \sum_{\theta \in \Theta_n } \EQn{\frac{1}{\pe{m_{\theta}}}} \\
&\overset{(b)}{\leq} |\Theta_n| \cdot 2^{o(n)}
\end{align*}
(a) follows by taking $\max$ over all $\by$ and (b) from Theorem \eqref{theorem:universal_decoder}.
\end{proof}
\else

\fi

\subsection{Approximation of the universal decoder}
As noted also in \cite{merhav:universal}, the proof actually gives conditions for a universal decoding metric to be optimal. Suppose that there exists another universal metric $U_n'(\bx,\by)$ such that:
\begin{equation}\label{Approximate:App}
2^{-n\cdot U_n'(\bx,\by)} \leq 2^{-n\cdot U_n(\bx,\by)+o(n)}
\end{equation}
and
\begin{equation}\label{Approximate:Kraft}
\EQn{2^{n\cdot U_n'(\bx,\by)}} \leq 2^{o(n)}.
\end{equation}
Then it follows that:

\begin{align*}
  \pe{U_n'} &=                    Q_n\BRA{U_n'(\bX,\by) \geq U_n'(\bx,\by)} \\
            &\overset{(a)}{\leq} \EQn{2^{n\cdot U_n'(\bX,\by)}} \cdot 2^{-n\cdot U_n'(\bx,\by)} \\
            &\overset{(b)}{\leq} 2^{o(n)} \cdot 2^{-n\cdot U_n(\bx,\by)} \\
            &\overset{(c)}{\leq}  \pe{m_{\theta}} \cdot K_n(\Theta_n) \cdot 2^{o(n)}\\
\end{align*}
where (a) follows from Markov's inequality, (b) is the given conditions, and (c) is Theorem \ref{theorem:universal_decoder}. In particular, if $K_n(\Theta_n)$ is subexponential, then $U_n'(\bX,\by)$ is also optimal.
Now,
\begin{align*}
  \pe{m_{\theta}} &=    Q\BRA{m_{\theta}(\bX,\by) \geq m_{\theta}(\bx,\by)} \\
                  &\geq Q\BRA{m_{\theta}(\bX,\by)   =  m_{\theta}(\bx,\by)} \\
                  &\geq Q\BRA{\forall \tau\in\Theta_n, m_{\tau}(\bX,\by) =  m_{\tau}(\bx,\by)} \\
\end{align*}
So there are several general approximations that might be used instead of the original proposed decoder, \ie:
\begin{equation}\label{Decoder:App1}
2^{-n \cdot U_{n,1}(\bx,\by)} = \MIN{\theta \in \Theta_n}Q\BRA{m_{\theta}(\bX,\by)   =  m_{\theta}(\bx,\by)}.
\end{equation}
and
\begin{equation}\label{Decoder:App2}
2^{-n \cdot U_{n,2}(\bx,\by)} = Q\BRA{\forall \tau\in\Theta_n, m_{\tau}(\bX,\by)   =  m_{\tau}(\bx,\by)},
\end{equation}
where in the definition of $U_{n,2}(\bx,\by)$ we can avoid the minimization over $\theta$ as it is effectively done in the probability computation. For each of these decoders the condition \eqref{Approximate:Kraft} should be checked and universality(optimal) of the approximation implies universality of the GMET decoder, but not vice versa (\cf\ example \ref{Example:FSC}). Notice that $U_{n,2}(\bx,\by)$ is the decoder proposed by Merhav in \cite{merhav:universal}. These approximations might be useful when computation of the exact GMET is hard and these approximation are easier to calculate.

\ifISITpaperFull

\begin{remark}
The decoder $U_{n,2}(\bx,\by)$ has a nice property of being a ``asymptotically tight rate function'' (when it is optimal) in the following sense:
The use of the Markov's inequality gives the upper bound on $\pe{U_{n,2}}$:
\begin{align*}
  \pe{U_{n,2}} \leq 2^{-n\cdot U_{n,2}(\bx,\by)} \cdot 2^{o(n)}.
\end{align*}
However, for $U_{n,2}$ it is also true that $\pe{U_{n,2}} \geq 2^{-n\cdot U_{n,2}(\bx,\by)}$. To see this, recall from \cite[Eq. (4),(5)]{merhav:universal}:
\begin{equation*}
\mathcal{T}_n(\bx|\by) = \BRAs{ \bx' \in \cX^n : \forall \theta \in \Theta_n, m_{\theta}(\bx',\by) = m_{\theta}(\bx,\by)}
\end{equation*}
and
\begin{equation*}
2^{-n\cdot U_{n,2}(\bx,\by)} = Q_n\BRA{\mathcal{T}_n(\bx|\by)}.
\end{equation*}
Then:
\begin{align*}
  \pe{U_{n,2}}  &=     \sum_{\bx' : U_{n,2}(\bx',\by) \geq U_{n,2}(\bx,\by) } Q_n(\bx') \\
                &\geq  \sum_{\bx' : U_{n,2}(\bx',\by)   =  U_{n,2}(\bx,\by) } Q_n(\bx') \\
                &\overset{(a)}{\geq}  \sum_{\bx' \in \mathcal{T}_n(\bx|\by) } Q_n(\bx') \\
                &= Q_n\BRA{\mathcal{T}_n(\bx|\by)} \\
                &= 2^{-n \cdot U_{n,2}(\bx,\by)}
\end{align*}
where (a) follows because $U_{n,2}(\bx,\by) = U_{n,2}(\bx',\by)$ for $\bx' \in \mathcal{T}_n(\bx|\by)$.
Putting these together we have:
\begin{equation}\label{App:Tight}
-\frac{1}{n}\log\BRA{\pe{U_{n,2}}} = U_{n,2}(\bx,\by)+o(1)
\end{equation}
So we see that the metric $U_{n,2}$ is almost in the canonical form (up to a vanishing term), which means that we can use it to evaluate the performance of the decoder (instead of using $\pe{U_{n,2}}$). It is not apparent that $U_n$ in general has the ``asymptotically tight'' property of $U_{n,2}$. This means that $U_n(\bx,\by)$ as a rate function provides only the lower bound on performance, and it might be that the performance is better in the sense that $-\frac{1}{n}\log\BRA{\pe{U_n}}$ might be larger than $U_n(\bx,\by)$ by a non-vanishing term.
\end{remark}

\else

\fi

\section{Examples}
\subsection{Normal priors examples}
\begin{example}
  Let $Q_n(\bx^n)$ be an i.i.d. probability distribution function, namely, $Q_n(\bx^n) = \prod_{i=1}^n Q(\bx_i)$. Obviously, $$\min_{\bx : Q_n(\bx^n) \neq 0}Q_n(\bx^n) = \BRA{\min_{\bx:Q(\bx)\neq0}Q(\bx)}^n$$ and $$-\log\BRA{\min_{\bx:Q_n(\bx^n)\neq0}Q_n(\bx^n)} = n \cdot \log\BRA{\min_{\bx:Q(\bx)\neq0}Q(\bx)},$$ which is subexponential (actually, linear in $n$).
\end{example}
\begin{example}
  Let $Q_n(\bx)$ be uniform over some set $B_n \subset \cX^n$. If $|\cX|$ is finite, then $|B_n|\leq |\cX|^n$ and $-\log\BRA{|B_n|^{-1}} \leq -\log\BRA{|\cX|^{-n}} = n\cdot\log\BRA{|\cX|}$, which is subexponential. Hence, $Q_n(\bx)$ is normal.
\end{example}

\subsection{DMC and Constant type metrics}

It is instructive to validate the fact that the family of metrics for DMCs, and more generally, metrics that are constant on types admits universal decoding over any normal prior. To see this notice that at first glance the metric family $\Theta_n$ is infinite, but since only the order on the input space induced by the metric matters, there are only a finite number of metrics that the minimum in \eqref{def:U} is achieved on. Moreover, the minimum in \eqref{def:U} occurs on some specific type and there is a polynomial number of types, so the set of metrics that receives the minimum of each type dominates the minimization and we can merge only a polynomial number of metrics to get the universal metric, which then follows to be optimal.

\subsection{Finite state metrics} \label{Example:FSC}

In this section we define a family of metrics that can be calculated using a finite state machine. This family was used in \cite{ziv1985universal}, where it was proved that the code length of the conditional Lempel-Ziv algorithm can be used as a universal decoding metric for finite state channels. For each $n$, let $\cS_n$ be the state space with $|\cS_n|$ states. A state machine is defined by the next state function $g: \cX \times \cY \times \cS_n: \rightarrow \cS_n$, and $q: \cX \times \cY \times \cS_n: \rightarrow \mathbb{R}$ the output function. The first state is $s_0$. The metric $m(\bx^n,\by^n)$ is computed as follows: Let $s_i=g(s_{i-1},x_i,y_i)$ for $i=1...n$, Then: $m(\bx^n,\by^n)=\sum_{i=1}^n q(s_i,x_i,y_i)$.

The number of next state functions is: $|\cS_n|^{|\cS_n|\cdot|\cX|\cdot|\cY|}$. Once the next state is given, only the type ($\bx,\by$ and the state) determines the metric value. In particular, the number of metrics that minimizes the pairwise error in \eqref{def:U} can be bounded by $B_n = |\cS_n|^{|\cS_n|\cdot|\cX|\cdot|\cY|}\cdot \BRA{n+1}^{|\cX|\cdot|\cY|\cdot|\cS_n|}$. Let $|\cS_n|=n^{\alpha}$. It is easy to see that $\limtoinf \frac{1}{n} \log \BRA{B_n} = 0$ for $\alpha < 1$ and $\limtoinf \frac{1}{n} \log \BRA{B_n} > 0 $ for $\alpha \geq 1$, so when $\alpha < 1$ this family admits an optimal universal decoder.

When $|\cS_n|=n$, \ie $\alpha=1$, there exists a next state function such that the state in every different time is different, and in particular, given the sent and received words, we can construct a metric that gives maximal value to these two words and smaller metric value to other codewords. This means that the minimum in \eqref{def:U} is always $Q(\bx)$ and our decoder choose the codeword according to the a priori information, independently of $\by$. Clearly, this decoder is useless and not optimal.

Notice that metrics of different ``next state function'' admits no ties in general. Thus the type based universal decoder of \cite{merhav:universal} is not optimal, while our decoder, described above, is optimal for this family of finite state metrics with $\alpha < 1$.

\ifISITpaperFull

\subsection{$k^{th}$ order Markov metrics}

A $k^{th}$ order Markov metric is a special case of a finite state metric where the state contains the last $k$ samples of $\bx,\by$. This class of metrics is interesting as it can be used to approximate several other interesting metrics, \eg, metrics of stationary ergodic channels and finite state channels with hidden channel state. It is interesting to examine the possible Markov order (as a function of $n$) that allows universal decoding. Denote the order by $k_n$. The number of states is then $|\cS_n|=\BRA{|\cX|\cdot|\cY|}^{k_n}$. Universal decoding is possible as long as $|\cS_n|=n^{\alpha}, \alpha<1$. Taking the $\log$ of both sides, we have:
$k_n < \frac{\log(n)}{\log\BRA{|\cX|\cdot|\cY|}}$.

\else

\fi

\section{Summary and conclusions}

A general universal decoder for a family of decoding metrics is described. This decoder generalizes several known universal decoders. The decoder, termed Generalized Minimum Error Test, uses the minimum error principle. We would like to explore the usability of the minimum error principle in other areas, including universal source coding with side information. Some further research regarding the infinite (abstract) alphabet is needed. Also, extension of the results here to network cases and to channels with feedback is also investigated in on-going research.

\section{Acknowledgment}
Interesting discussions with Neri Merhav are acknowledged with thanks. Comments by the anonymous referees are greatly appreciated.

\appendices
\section{ Rate functions} \label{App:rate_func}

In order to analyze the performance of a metric decoder, we would need somehow to ``normalize'' the metric in order to remove its redundancy, \ie, the performance depends only on the order induced by the metric and not the specific value of the metric. However, for rate function (which we will define here) the value of the metric provides a hint to the performance of decoding with this metric. Throughout we will refer to a distribution $Q_n(\bx)$ as the prior and we'll assume it to be fixed. Through the whole treatment above, the output sequence $\by$ always held fixed.

\begin{definition} \mynewline

\begin{enumerate}
  \item
  A function $R:\cX_n \rightarrow \mathbb{R} \cup \BRAs{-\infty}$ is called \textbf{rate function} over the prior $Q_n(\bx)$ if:
\begin{align}\label{def:rate_func}
\PR{R(\bX) \geq t} = Q_n(R(\bX) \geq t) \leq 2^{-nt}.
\end{align}
  \item
The function $R$ is an \textbf{asymptotic rate function} if there exists a sequence $\lambda_n$ such that $\lambda_n \toinf 0$ and
\begin{align}\label{def:asym_rate_func}
Q_n(R(\bX) \geq t) \leq 2^{-n(t-\lambda_n)}.
\end{align}
  \item
Given any function $R$ (not necessarily a rate function) define:
\begin{align}\label{def:optimal_rate_func}
\Omega_R(\bx) = -\frac{1}{n}\log\BRA{Q_n(R(\bX) \geq R(\bx))}.
\end{align}
$\Omega_R(\bx)$ is the \textbf{canonical rate function} associated with the order $R$.
\end{enumerate}
\end{definition}

\begin{proposition} \label{prop:rate_func_properties} \mynewline
(a) The function $\Omega_R(\bx)$ preserves the order induced by $R$ on $\bx$. That is, $R(\bx_1) \leq R(\bx_2)$ implies $\Omega_R(\bx_1) \leq \Omega_R(\bx_2)$. If $Q_n(\bx_2) > 0$, then $R(\bx_1) < R(\bx_2)$ implies $\Omega_R(\bx_1) < \Omega_R(\bx_2)$. \\
(b) $\Omega_R(\bx)$ is a rate function. \\
(c) For any rate function $R$ and any $\bx$: $R(\bx) \leq \Omega_R(\bx)$.
\end{proposition}

\ifISITpaperFull

\begin{proof} \mynewline
(a) Let $f(t) = Q_n(R(\bX) \geq t)$. $f(t)$ is a decreasing function. $\Omega_R(\bx) = -\frac{1}{n}\log(f(R(\bx)))$ and (a) follows. \\
(b) Notice that since $\Omega_R(\bx)$ preserves the order in $R$, then $Q_n(\Omega_R(\bX) \geq \Omega_R(\bx)) = Q_n(R(\bX) \geq R(\bx)) = 2^{-n\cdot \Omega_R(\bx)}$ and the condition \eqref{def:rate_func} is met with equality. For other $t$-s that are not equal to any $\Omega_R(\bx)$ the condition can be easily verified by noting that $Q_n(\Omega_R(\bX) \geq t)=2^{-n\cdot \Omega_R(\bx)}$ for some $\bx$ such that $t < \Omega_R(\bx)$. \\
(c) If $R$ is a rate function then
\begin{align*}
  2^{-n \cdot \Omega_R(\bx)} &= Q_n(\Omega_R(\bX) \geq \Omega_R(\bx)) \\
                             &= Q_n(R(\bX) \geq R(\bx))  \\
                             &\leq 2^{-n \cdot R(\bx)}.
\end{align*}
\end{proof}
\else

\fi

\begin{example}
Let $R(\bx) = \frac{1}{n} \log \BRA{\frac{P_n(\bx)}{Q_n(\bx)}}$ where $P_n(\bx)$ is a probability distribution, then $R$ is a rate function. To see this, notice that by using Markov's inequality
\begin{align*}
  Q_n(R(\bX) \geq t) &= Q_n(2^{n \cdot R(\bX)} \geq 2^{n \cdot t}) \\
  & \leq \EQn{2^{n \cdot R(\bX)}} \cdot 2^{-n \cdot t} \\
  & = \EQn{\frac{P_n(\bx)}{Q_n(\bx)}} \cdot 2^{-n \cdot t} \\
  & = \sum_{\bx} Q_n(\bx) \cdot \frac{P_n(\bx)}{Q_n(\bx)} \cdot 2^{-n \cdot t} = 2^{-n \cdot t}.
\end{align*}
\end{example}

\begin{definition}
We say that the function $R:\cX_n \rightarrow \mathbb{R} \cup \BRAs{-\infty}$ is an \textbf{asymptotically tight rate function} over the prior $Q_n(\bx)$ if there exists a sequence $\lambda_n$ such that $\lambda_n \toinf 0$ and
\begin{align}\label{def:tight_rate_func}
2^{-n(R(\bx)+\lambda_n)} \leq Q_n(R(\bX) \geq R(\bx)) \leq 2^{-n(R(\bx)-\lambda_n)}.
\end{align}
\end{definition}

Notice that for any function $R$, $\Omega_R(\bx)$ is a trivially asymptotically tight rate function (even not asymptotically). The following proposition gives sufficient conditions for any function $R$ to be an asymptotically tight rate function.

\begin{proposition} \label{prop:asymptotic_rate_func_cond}
For any function $R$ we have:
\begin{equation}
2^{-n \cdot \Omega_R(\bx)} \leq \EQn{ 2^{n \cdot R(\bx)} } \cdot 2^{-n \cdot R(\bx)}.
\end{equation}
In particular, if
\begin{equation} \label{eq:e1231}
2^{-n \cdot (R(\bx)+\lambda_n)} \leq 2^{-n \cdot \Omega_R(\bx)}
\end{equation}
and
\begin{equation} \label{eq:e1232}
\EQn{ 2^{n \cdot R(\bx)} } \leq 2^{n \cdot \chi_n}
\end{equation}
with $\lambda_n, \chi_n \toinf 0$, then $R$ is an asymptotically tight rate function and $\EQn{2^{n \cdot \Omega_R(\bX)}}$ is also sub-exponential.
\end{proposition}

\ifISITpaperFull

\begin{proof}
By Markov's inequality:
\begin{align*}
2^{-n \cdot \Omega_R(\bx)} =& Q_n(R(\bX) \geq R(\bx)) \\
                           =& Q_n(2^{n \cdot R(\bX)} \geq 2^{n \cdot R(\bx)}) \\
                        \leq& \EQn{2^{n \cdot R(\bX)}} \cdot 2^{-n \cdot R(\bx)}.
\end{align*}
Combining this with \eqref{eq:e1231}, \eqref{eq:e1232}: $2^{-n \cdot (R(\bx)+\lambda_n)} \leq 2^{-n \cdot \Omega_R(\bx)} \leq 2^{-n \cdot (R(\bx)-\chi_n)}$. In other words, $R$ is asymptotically tight.
Observing that \eqref{eq:e1231} implies that $2^{n \cdot (R(\bx)+\lambda_n)} \geq 2^{n \cdot \Omega_R(\bx)}$, and taking $\EQn{\cdot}$ of that we get $\E{2^{n \cdot \Omega_R(\bx)}} \leq 2^{n \cdot (\chi_n +\lambda_n)}$.
\end{proof}
\else

  \begin{proof}
  The proof appears in \cite{ElkayamUniversal} and omitted here due to space limitation.
  \end{proof}
\fi

Recall from definition \ref{def:normal} that the prior $Q_n(\bx)$ is \textbf{normal} if $\EQn{ 2^{n \cdot \Omega_R(\bx)} }$ is subexponential for all $R(\bx)$. The following proposition bounds $\EQn{ 2^{n \cdot R(\bx)} }$ for any rate function $R(\bx)$ and provides a condition on the prior $Q_n(\bx)$ being normal.

\begin{proposition} \label{prop:normal_prior} \mynewline
(a) Suppose that there exists some $B_n$ that bounds the rate function $R$ from above, \ie, $\PR{nR(\bX) \geq B_n}=0$. Then \begin{equation}
\EQn{2^{nR(\bX)}} \leq 1+\ln(2)\cdot B_n.
\end{equation}
(b) If $\cX_n$ is discrete, $\chi_n = -\log \BRA{ \min_{\bx : Q_n(\bx) \neq 0}Q_n(\bx) }$ is a bound on any rate function. In particular, if $\chi_n$ is subexponential then the prior $Q_n(\bx)$ is normal in the sense of definition \ref{def:normal}.
\end{proposition}

\ifISITpaperFull

\begin{proof}
(a) By \cite[Lemma 5.5.1]{koga2002information}, for a non-negative R.V. $Z$ it holds that $\E{Z} = \int_0^{\infty} \PR{Z \geq z}dz$.
\begin{align*}
  \E{2^{nR(\bX)}} &= \int_0^{\infty} \PR{2^{nR(\bX)} \geq t}dt \\
                  &= \int_0^{\infty} \PR{nR(\bX) \geq \log(t)}dt \\
                  &\overset{(1)}{\leq} 1+ \int_1^{2^{B_n}} \PR{nR(\bX) \geq \log(t)}dt \\
                  &= 1+ \int_1^{2^{B_n}} \PR{R(\bX) \geq \frac{\log(t)}{n}}dt \\
                  &\overset{(2)}{\leq} 1+ \int_1^{2^{B_n}} 2^{-n \cdot \frac{\log(t)}{n}} dt \\
                  &= 1+ \int_1^{2^{B_n}} \frac{dt}{t}\\
                  &= 1+ \ln(t)|_{1}^{2^{B_n}} = 1+ \ln(2)\cdot B_n.
\end{align*}
Inequality (1) follows because $\PR{\cdot} \leq 1$ and $\PR{nR(\bX) \geq \log(2^{B_n})}=0$ and (2) because $R$ is a rate function.

(b) For any $\bx$ with $Q_n(\bx) > 0$ we have:
\begin{align*}
n\cdot R(\bx) &\leq n\cdot \Omega_R(\bx) \\
              &= -\log \BRA{Q_n(R(\bX) \geq R(\bx))} \\
              &\leq -\log \BRA{Q_n(\bx)} \\
              &\leq -\log \BRA{ \min_{\bx : Q_n(\bx) \neq 0}Q_n(\bx)}.
\end{align*}
\end{proof}
\else

  \begin{proof}
  The proof appears in \cite{ElkayamUniversal} and omitted here due to space limitation.
  \end{proof}
\fi

\bibliographystyle{IEEEtran}

redpajama_set_name: RedPajamaArXiv


Not every entrepreneur has the charisma of Steve Jobs. But every budding entrepreneur has room to grow. Let this individual show you how to grow from zero to hero.
Let us now introduce a suitable Kanji that depicts the way Rebecca Judd lives. Kanji is ingrained in the Japanese culture with each character having a different meaning. 尊 is a common trait that every successful commentator must possess. We feel that the Kanji character below best captures the essence of this influencer.
Rebecca Judd is a very passionate commentator who has made great contributions to society. Want to know more? Follow their social media links below!
Either this Influencer has no content to show, or their content is hidden.
We hope you've found inspiration from Rebecca Judd's perspective on life.
I share in hopes that what I share will help others.


2. This Order comes into force from the date of signing.
1. Add the words "Head of the Anti-Corruption Directorate with the Prosecutor General of the Republic of Azerbaijan" and "Head of Department for the Investigation of Grave Crimes of the Prosecutor General's Office of the Republic of Azerbaijan " after the words "Head of Human Resources Department of the Prosecutor General's Office of the Republic of Azerbaijan" in paragraph 1 of the Order of the President of the Republic of Azerbaijan "On approval of the Collegium of the Prosecutor General's Office of the Republic of Azerbaijan" No. 746 dated June 19, 2001 (Legislative collection of the Republic of Azerbaijan, 2001, No. 6, Article 429).


You will feel incredibly relaxed and your skin will regain its purity, radiance and balance.
The treatment ends with a plant extract mask, from which your face will emerge new and radiant.
Essence oils diffuse their precious active ingredients, which are beneficial in terms of balancing and purifying the skin.
At the end of the treatment, your skin is cleaner, finer and the pores have been tightened. Your face appears healthy and well rested.
The therapeutic essential oils, specially prescribed for oily skin, diffuse into the skin whilst the soothing aromatic scent relaxes.
Aromatic Equilibre is recommended for oily and combination skins. It is particularly suitable for young skins, to re-balance the action of sebaceous glands and to enhance the appearance of skin.
The beneficial effects of the treatment will be prolonged by careful cleansing of the skin with Microbiotic Mousse, Toner and Acnilogic products.


text:
🇧🇸Nassau
Discovery Island, The Bahamas – A Veritable Fata Morgana to Uncommon Travelers
This view of Discovery Island doesn't fit the technical definition of a Fata Morgana. The complex superior mirage named for the sorceress Morgan le Fay of Arthurian legend carries some rather specific criteria. In many ways, though, Discovery Island is all kinds of ignis fatuus to me.
I first spied Discovery immediately upon checking into The Marley Resort in Nassau and retreating to my balcony. Lush green trees appeared to fill her interior. Brilliant white sands skirted her shores. Low-lying structures hinted at civilization. A private island paradise, perhaps? I was intrigued and anxious to hop over.
Later on, though, it became clear that I was better off staying away.
Discovery Island is actually two islands in one, albeit in name only. The western end is known as Balmoral Island. It's a shore excursion playground for Royal Caribbean. The east side, Sandals Island, is an offshoot of the Sandals Royal Bahamian Resort.
So, in this one small islet you have separate outposts representing two of the leading purveyors of mass tourism in the Caribbean. As a bonus(?), you also have the only Starbucks on a private island! That claim, though, may also not be what it seems…
Discovery Island… At least it's nice to look at from afar.


The page provides the exchange rate of 79800 Philippine Peso (PHP) to Bitcoin (BTC), sale and conversion rate. Moreover, we added the list of the most popular conversions for visualization and the history table with exchange rate diagram for 79800 Philippine Peso (PHP) to Bitcoin (BTC) from Sunday, 21/04/2019 till Sunday, 14/04/2019. Latest update of 79800 Philippine Peso (PHP) exchange rate.
Convert currency 79800 PHP to BTC. How much is 79800 Philippine Peso to Bitcoin? — 0.290 Bitcoin.
79800 Philippine Peso to Bitcoin, convert 79800 PHP in BTC.


"Years of education in studio art and design and a variety of art practices have directed my path to a diverse and sometimes unpredictable process of creating the "unique print". As a former art teacher and avid traveler, I collect materials wherever I land, record images, and experiment with varied mediums, which are recorded in my art. Monotype has been my focus for more than a decade and remains a challenging and evolving journey.
To create my prints I use an assortment of tools including brayers, brushes, and various textured objects to apply paint to the plexi plate. This is then printed on to dampened rag paper with a Takach etching press. Original stencils, string, and other found materials are used to produce line and shape. I often repaint and print the plate up to four times with variations, in order to capture subtleties built up under the surface. Other mediums are often added to the print using techniques such as transfer methods and chine colle. To further expand the process I sometimes use drawing materials or collage the monotype prints to complete the piece.


Please enter your sign-on ID.
We specialize in providing commercial loans and lines of credit to help you meet your business needs and goals. We offer the expertise to design the loan best suited for your business including revolving lines of credit for day to day working capital or seasonal financing. We can also provide term financing for your equipment purchases, leasehold improvements or other longer term capital needs.
Long term financing is available to meet your commercial mortgage needs. If you are purchasing a new building or expanding an existing site, we offer a variety of financing programs. Whether it's a construction loan or a long-term mortgage for your business, Connecticut Community Bank can finance it for you.
Standby letters of credit may be required to enhance the credibility of the underlying transaction and provide assurance of payment to the beneficiary.
A variety of commercial loan products and financing terms are available to meet your needs and enhance your business. Contact us for further information.
All loans subject to credit review and approval.
Connecticut Community Bank in Fairfield County, a top CT community bank, offers personal and business banking services including checking accounts, savings accounts, business loans, cash management, mortgages and more. Learn more about us, bank online or visit one of our CT banking locations in Darien, Greenwich, Westport, Norwalk, Stamford or Fairfield.
© 2017 Connecticut Community Bank, N.A. All rights reserved.
By accessing the noted link you will be leaving Connecticut Community Bank, N.A.'s website and entering a website hosted by another party. Please be advised that you will no longer be subject to, or under the protection of, the privacy and security policies of Connecticut Community Bank, N.A.'s website. We encourage you to read and evaluate the privacy and security policies of the site you are entering, which may be different than those of Connecticut Community Bank, N.A.


text:
#include "VirtualFont.h"

using namespace std;
using namespace ci;

const int stride = sizeof(Vec2f) * 2;

VirtualFont::VirtualFont(LayoutCache &layoutCache, TextItemizer &itemizer, float baseSize)
:
layoutCache(layoutCache),
itemizer(itemizer),
baseSize(baseSize)
{
    vertices.reserve(4 * 2);
    colors.reserve(4);

    setSize(baseSize);
    setColor(ColorA(0, 0, 0, 1));
}

bool VirtualFont::addActualFont(const string &lang, ActualFont *font)
{
    if (font)
    {
        /*
         * WHY USING std::vector INSTEAD OF std::set?
         * BECAUSE ORDER OF INSERTION MATTERS
         */

        for (auto &tmp : fontSetMap[lang])
        {
            if (tmp == font)
            {
                return false;
            }
        }

        fontSetMap[lang].push_back(font);
        return true;
    }

    return false;
}

const FontSet& VirtualFont::getFontSet(const string &lang) const
{
    auto it = fontSetMap.find(lang);

    if (it == fontSetMap.end())
    {
        it = fontSetMap.find("");

        if (it == fontSetMap.end())
        {
            return defaultFontSet;
        }
    }

    return it->second;
}

ActualFont::Metrics VirtualFont::getMetrics(const Cluster &cluster) const
{
    return cluster.font->metrics * sizeRatio;
}

ActualFont::Metrics VirtualFont::getMetrics(const string &lang) const
{
    auto &fontSet = getFontSet(lang);

    if (fontSet.empty())
    {
        return ActualFont::Metrics();
    }
    else
    {
        return fontSet.front()->metrics * sizeRatio;
    }
}

float VirtualFont::getDescent(const LineLayout &layout) const
{
    return layout.maxDescent * sizeRatio;
}

float VirtualFont::getMiddleLine(const LineLayout &layout) const
{
    return 0.5f * (layout.maxAscent - layout.maxDescent) * sizeRatio;
}

float VirtualFont::getOffsetX(const LineLayout &layout, Alignment align) const
{
    switch (align)
    {
        case ALIGN_MIDDLE:
            return -0.5f * getAdvance(layout);

        case ALIGN_RIGHT:
            return -getAdvance(layout);

        default:
            return 0;
    }
}

float VirtualFont::getOffsetY(const LineLayout &layout, Alignment align) const
{
    switch (align)
    {
        case ALIGN_MIDDLE:
            return getMiddleLine(layout);

        case ALIGN_TOP:
            return +getAscent(layout);

        case ALIGN_BOTTOM:
            return -getDescent(layout);

        default:
            return 0;
    }
}

float VirtualFont::getAdvance(const LineLayout &layout) const
{
    return layout.advance * sizeRatio;
}

float VirtualFont::getAdvance(const Cluster &cluster) const
{
    return cluster.combinedAdvance * sizeRatio;
}

float VirtualFont::getHeight(const LineLayout &layout) const
{
    return layout.maxHeight * sizeRatio;
}

float VirtualFont::getAscent(const LineLayout &layout) const
{
    return layout.maxAscent * sizeRatio;
}

LineLayout* VirtualFont::createLineLayout(const string &text, const string &langHint, hb_direction_t overallDirection)
{
    return createLineLayout(itemizer.processLine(text, langHint, overallDirection));
}

LineLayout* VirtualFont::createLineLayout(const TextLine &line)
{
    auto layout = new LineLayout(this, line.langHint, line.overallDirection);

    map<uint32_t, Cluster> clusterMap;
    auto buffer = hb_buffer_create();

    for (auto &run : line.runs)
    {
        clusterMap.clear();

        for (auto &font : getFontSet(run.language))
        {
            font->reload();

            if (font->loaded)
            {
                layout->maxHeight = std::max(layout->maxHeight, font->metrics.height);
                layout->maxAscent = std::max(layout->maxAscent, font->metrics.ascent);
                layout->maxDescent = std::max(layout->maxDescent, font->metrics.descent);

                run.apply(line.text, buffer);
                hb_shape(font->hbFont, buffer, NULL, 0);

                auto glyphCount = hb_buffer_get_length(buffer);
                auto glyphInfos = hb_buffer_get_glyph_infos(buffer, NULL);
                auto glyphPositions = hb_buffer_get_glyph_positions(buffer, NULL);

                bool hasMissingGlyphs = false;

                for (int i = 0; i < glyphCount; i++)
                {
                    auto codepoint = glyphInfos[i].codepoint;
                    auto cluster = glyphInfos[i].cluster;

                    auto it = clusterMap.find(cluster);
                    bool clusterFound = (it != clusterMap.end());

                    if (codepoint)
                    {
                        if (clusterFound && (it->second.font != font))
                        {
                            continue; // CLUSTER FOUND, WITH ANOTHER FONT (E.G. SPACE)
                        }
                        else
                        {
                            auto offset = Vec2f(glyphPositions[i].x_offset, -glyphPositions[i].y_offset) * font->scale;
                            float advance = glyphPositions[i].x_advance * font->scale.x;

                            if (clusterFound)
                            {
                                it->second.addShape(codepoint, offset, advance);
                            }
                            else
                            {
                                clusterMap.insert(make_pair(cluster, Cluster(font, codepoint, offset, advance)));
                            }
                        }
                    }
                    else if (!clusterFound)
                    {
                        hasMissingGlyphs = true;
                    }
                }

                if (!hasMissingGlyphs)
                {
                    break; // NO NEED TO PROCEED TO THE NEXT FONT IN THE LIST
                }
            }
        }

        if (run.direction == HB_DIRECTION_RTL)
        {
            for (auto it = clusterMap.rbegin(); it != clusterMap.rend(); ++it)
            {
                layout->addCluster(it->second);
            }
        }
        else
        {
            for (auto it = clusterMap.begin(); it != clusterMap.end(); ++it)
            {
                layout->addCluster(it->second);
            }
        }
    }

    hb_buffer_destroy(buffer);
    return layout;
}

shared_ptr<LineLayout> VirtualFont::getCachedLineLayout(const string &text, const string &langHint, hb_direction_t overallDirection)
{
    return layoutCache.getLineLayout(this, text, langHint, overallDirection);
}

void VirtualFont::setSize(float newSize)
{
    size = newSize;
    sizeRatio = newSize / baseSize;
}

void VirtualFont::setColor(const ColorA &color)
{
    colors.clear();
    colors.emplace_back(color);
    colors.emplace_back(color);
    colors.emplace_back(color);
    colors.emplace_back(color);
}

void VirtualFont::begin()
{
    glEnable(GL_TEXTURE_2D);
    glEnableClientState(GL_VERTEX_ARRAY);
    glEnableClientState(GL_TEXTURE_COORD_ARRAY);
    glEnableClientState(GL_COLOR_ARRAY);

    glVertexPointer(2, GL_FLOAT, stride, vertices.data());
    glTexCoordPointer(2, GL_FLOAT, stride, vertices.data() + 1);
    glColorPointer(4, GL_FLOAT, 0, colors.data());
}

void VirtualFont::end()
{
    glBindTexture(GL_TEXTURE_2D, 0);

    glDisable(GL_TEXTURE_2D);
    glDisableClientState(GL_VERTEX_ARRAY);
    glDisableClientState(GL_TEXTURE_COORD_ARRAY);
    glDisableClientState(GL_COLOR_ARRAY);
}

void VirtualFont::drawCluster(const Cluster &cluster, const Vec2f &position)
{
    for (auto &shape : cluster.shapes)
    {
        auto glyph = cluster.font->getGlyph(shape.codepoint);

        if (glyph && glyph->texture)
        {
            auto ul = position + (shape.position + glyph->offset) * sizeRatio;
            auto lr = ul + glyph->size * sizeRatio;

            vertices.clear();

            vertices.emplace_back(ul);
            vertices.emplace_back(glyph->u1, glyph->v1);

            vertices.emplace_back(lr.x, ul.y);
            vertices.emplace_back(glyph->u2, glyph->v1);

            vertices.emplace_back(lr);
            vertices.emplace_back(glyph->u2, glyph->v2);

            vertices.emplace_back(ul.x, lr.y);
            vertices.emplace_back(glyph->u1, glyph->v2);

            glyph->texture->bind();
            glDrawArrays(GL_TRIANGLE_FAN, 0, 4);
        }
    }
}

VirtualFont::Style VirtualFont::styleStringToEnum(const string &style)
{
    if (style == "bold") return VirtualFont::STYLE_BOLD;
    if (style == "italic") return VirtualFont::STYLE_ITALIC;
    if (style == "bold-italic") return VirtualFont::STYLE_BOLD_ITALIC;

    return VirtualFont::STYLE_REGULAR; // DEFAULT
}

string VirtualFont::styleEnumToString(VirtualFont::Style style)
{
    switch (style)
    {
        case VirtualFont::STYLE_BOLD:
            return "bold";

        case VirtualFont::STYLE_ITALIC:
            return "italic";

        case VirtualFont::STYLE_BOLD_ITALIC:
            return "bold-italic";

        default:
        case VirtualFont::STYLE_REGULAR:
            return "regular";
    }
}

redpajama_set_name: RedPajamaGithub


text:
import {readLockAsync, writeLockAsync} from "../../src/lock/Lock";
import {TimeoutError} from "../../src/lock/Error";

describe('Lock', () => {
    test('should be able to just read', async () => {
        let count = 0;
        const currentCount = await readLockAsync(async () => {
            return count;
        })
        expect(currentCount).toBe(count);
    });
    test('should be able to just write', async () => {
        let count = 0;
        const currentCount = await writeLockAsync(async () => {
            return count + 1;
        })
        expect(currentCount).toBe(1);
    });
    test('write should be a blocking operation', async () => {
        let count = 0;
        writeLockAsync(() => new Promise<void>(resolve => {
            setTimeout(() => {
                count = count + 1;
                resolve();
            }, 100)
        }))

        const currentCount = await readLockAsync(async () => {
            return count;
        })

        expect(currentCount).toBe(1);
    });

    test('read will timeout if requested', async () => {
        let count = 0;
        writeLockAsync(() => new Promise<void>(resolve => {
            setTimeout(() => {
                count = count + 1;
                resolve();
            }, 100)
        }))

        await expect(async () => await readLockAsync(async () => {
            return count;
        }, 10)).rejects.toThrow(TimeoutError)
    });
    test('read write timeout if requested', async () => {
        let count = 0;
        readLockAsync(() => new Promise<void>(resolve => {
            setTimeout(() => {
                resolve();
            }, 100)
        }))

        await expect(async () => await writeLockAsync(async () => {
        }, 10)).rejects.toThrow(TimeoutError)
    });
});


Today we welcome the incredible Kiki Hamilton.
Kiki Hamilton is the author of the YA historical fantasy series THE FAERIE RING. Book 1, THE FAERIE RING and Book 2, THE TORN WING are both out now. Book 3, THE SEVEN YEAR KING releases in May of 2013.
Thanks for inviting me over to STEAMED! Though I'm not a writer of steampunk fiction, I do write historical fantasy (THE FAERIE RING (2011) and THE TORN WING (2012) )which has some notable similarities with steampunk, such as life in the Victorian era.
One of the questions I'm frequently asked is how much research do I have to do for my books? The short answer is A LOT! The longer answer is that I do spend quite a bit of time researching Victorian England, as well as British faerie lore, but luckily, I find it fascinating. The goal of any writer who sets their story in the Victorian era is to make the reader feel like they've stepped back through time (or taken a time machine…) and are walking the foggy, cobblestone streets of the past along with the characters.
How does one accomplish that?
Hopefully, the reader can see the interior of the pub, along with the patrons, can smell the spilled ale, can hear the notes of the piano and feels immersed in this world.
This is a critical part of any story. Characters need to be described in a way that is suitable to the era. Character definition is an opportunity to further immerse the reader into another era. Dress, language, backstory and motivations each play a part in creating a mental image for the reader. Tying each of those to the time period reinforces the setting and mood you've established.
For me, this is one of the most enjoyable parts of writing THE FAERIE RING series – finding ways to weave actual history with the fantasy story I'm telling. I like to think of the books as 'what if…' stories which is similar to the alternate timelines that many steampunk novels employ.
Using language that is suitable to the timeframe is an important piece in creating the world of your novel. Using language or terms that are too modern for a Victorian setting (anachronistic) is one of the fastest ways to pull your reader out of the 'dream' and remind them that they're reading and not living your story.
So, that's a quick look at some of the considerations I put into writing historical fantasy. Hope you found it interesting and helpful! Any others we should add to the list?
First off, we have some winners to announce.
Congratulations! Email me at suzannelazear (@) hotmail to claim your prize.
Now, on to Book Monday.
I have a huge soft spot for young adult faerie books, since I write about faeries. I have an even larger soft spot for Victorian faerie stories.
This book didn't disappoint me one bit.
Hamilton skillfully combines faerie lore with Victorian London weaving together an enchanting tale of magic, mystery, and mayhem.
Tiki is a teen-pickpocket living with her "family" of orphan thieves, including little Clara, who's often sick. When Tiki steals a ring from the palace she thinks first of Clara and how the ring could buy the medicine they need for the littlest and frailest member of their band. Only the ring Tiki stole binds the treaty between the royal family and the fey. Away from the safety of the palace, the ring–and Tiki–become a target. If the ring is destroyed then the treaty is broken and the fey can do as they will, probably at the cost of mortal London. In order to save the treaty–and humanity, she must figure out who to trust, which includes the handsome rascal Riecker and the young Prince Leopold.
This fast-paced action-packed story is full of twists and turns that had me glued to my chair. I fell in love with Tiki from the very beginning. She's plucky, and resilient, and even though life hasn't dealt her the best hand, she's not bitter, rather, she rolls with the punches and does what she needs to do to survive–and protect her family. I love how loyal she and the other orphans in their little band really take care of each other — even little Clara.
Hamilton's version of Victorian London comes alive–complete with the grit, despair, and poverty all-too-common in that era. However, thanks to Tiki and her resistance, even when the story gets dark, there's always a glimmer of hope. It's also quite fun to journey through London with Tiki–from the streets of London to the palace and thanks to the brilliant descriptions you feel like you're *right there*.
Again, I loved the way Hamilton seamlessly melded faerie lore–and even Gaelic–into her Victorian world. Like in faerie lore, these faeries aren't always nice, especially those of the dark court. There's something for everyone in this story–a little historical fiction, a little romance, a really good story, faeries, action, and mystery. I highly recommend this to anyone who's a fan of either faeries or Victorian stories.
Since I love this story so much and am going to buy a final copy, I'm going to give away my ARC. All you have to do is leave me a comment and tell me what sort of faerie (dark or bright) is your favorite. Contest open internationally, ends October 9th, 2011, at 11:59 PM PST.
Today we have Jane George, author and illustrator of the YA book, The Mumbo Jumbo Circus.
As a kid, I was exposed to such imaginative oddities as The Wild, Wild West TV show and The 7 Faces of Dr Lao.
These kinds of cultural influences wax and wane, and now the lure of the mysterious, the impossible, and the forbidden is stronger than ever. The resurgence of interest in circus arts, sideshow and burlesque theater may be part of the same cultural backlash to beige-box consumerism that spawned Steampunk. Humans crave color, imagination and creative freedom.
In Austin, Texas, The East Side Show Room serves up gourmet cuisine and vintage cocktails with a side of cabaret in a steampunky-circus atmosphere. For a Tim Burton meets the circus experience, there is Cirque Berzerk in Los Angeles. And in San Francisco you can have, "Love, Chaos & Dinner," in a tent with Teatro ZinZanni.
While the delights of classic roadside attractions like The Thing are now few and far between, there are performers who are carrying on the tradition of Sideshow and the Ten-in-One.
Austin, Texas is also home to Noel Benedetti aka Ballyhoo Betty, a sideshow performer who specializes in fire arts.
Noel is blogmistress of www.HeyRubeCircus.com , a fantastic celebration of all things circus and sideshow. She is affiliated with 999 Eyes Freakshow, The Invisible Man Corporation, and The Surreal Sideshow.
Noel suggested I look up a visual artist and sideshow performer named Jason Black, aka The Black Scorpion. Among the venues he performs at is Coney Island's Sideshows by the Seashore.
He, born a naked baby boy with irregular hands, unlike any other.
When him you see, understand you will.
Witnessing his Anti-Act is the longest day you will ever live.
Remember he is breathing for something onstage, and living the rest for his life.
That last line stays with you, doesn't it? I'll bet his act does too.
Current circus and sideshow acts could be be said to be more about individualism and creativity than about "Hey, Rube" hucksterism. This is especially true in the modern world of burlesque. A revival in burlesque and the art of the striptease happened in the Nineties and has been gaining in popularity ever since. Partly driven by a nostalgia for old-time glamor, modern burlesque is also a feminine reclaiming of the "male gaze," often in intelligent and hilarious send-ups of the medium. Burlesque is theater, cabaret and performance art rolled into one.
Hot Pink Feathers is performing a Sally Rand-type showgirl routine, with feather fans and dripping-pearl bikinis, in San Francisco's Carnavale Parade on Sunday, May 29. Say hello to them at the staging area 9am-12 at Bryant between 21st & 22nd. Parade starts at noon. They can also be seen on the 2nd Saturday of every month at Café Van Kleef, where they perform with the Blue Bone Express brass band. Next show is June 11.
For a while now, circus arts have been making their way back to the more intimate, single ring circus. When I saw an equine show produced by Cirque du Soleil called Cheval Theatre, I could practically reach out and touch the horses. I definitely felt the whoosh as they galloped past my seat.
A circus dedicated to this connection between performer and audience is Circus Flora in St. Louis. Circus Flora weaves a theatrical storyline through their classical circus acts. From their site, "The artistry, magic and charm of Circus Flora's performances have made it part of the vanguard of the "new circus" movement in North America."The artistry, magic and charm of Circus Flora's performances have made it part of the vanguard of the "new circus" The theme of their performances changes annually. This year it's a Victorian-era riverboat theme entitled Vagabond Adventures.
That quote could have been written about my recently-released, young adult fantasy, The Mumbo Jumbo Circus. It describes the themes of my novel perfectly. One random commenter will receive a paperback of The Mumbo Jumbo Circus. Step Right Up! into the world of human possibility that is this writer's imagination.
Freedom, creativity and individualism are hallmarks of modern sideshow, burlesque, cabaret, and circus arts. Just like the relationship between author and reader, the magic is in the point of connection. I like to think of a circus ring as a sacred circle of human possibility. Happy performing, in whatever you do!
What do you love most about the circus?
Jane is giving away a copy of The Mumbo Jumbo Circus to one lucky commenter (North America only please). Contest ends 11:59 PM PST June 1, 2011.


Music of the Month For a contribution of 20.00 a month (28.00 outside of the US), I'll be sending you a recording from somewhere interesting, each and every month. Some months you will have a choice, some months it will be a surprise, and once in a while, there will be an extra bonus surprise as well. Check out other ways to donate at The Rent Party.
My July 2018 pick for Music of the Month is a collaboration between the Lebanese born pianist Philippe El Hage and Palestinian percussionist Youssef Hbeisch. On Asrar, the two artists compose and improvise around each other in a way that is spotaneous, thoughtful and full of energy. They are joined on some tracks by singer Houry Dora Apartian-Friedli, flautist Ramy Maalouf and on one track by bassist Ognjen Beader.
Born in Byblos in 1979, Philippe began studying music in Lebanon. In 2000, he obtained a degree (DEUG) in French Literature from Saint Joseph University (USJ) in Beirut before moving to Paris to complete his piano studies at the Boulogne Billancourt Conservatory. He followed advanced courses for three years at the Regional National Conservatory (CNR) of the city of Rueil-Malmaison under Chantale Riou, obtaining the First Prize in Piano (Gold Medal). In May 2005, thanks to his piano improvisations, he is nominated for the Paris Young Talents 2005 Contest organized by the city of Paris. After two years of advanced Piano Jazz courses at the Gabriel Fauré Conservatory under Francois POPINEAU, Philippe El Hage begins performing in Lebanon, France and Italy in concerts of classical music and improvisation. In September 2007, El Hage releases his first album, Byblos, which he recorded in France. Many other recordings followed in many different styles, leading to this 2018 release.
These recordings were donated by the artists so your subscription and purchase all goes to support the magazine and radio programs. We thank them all for their generous support.


I was browsing my yahoo mail this morning and came across a folder I created long time ago for forwarded messages. I've got a collection of nice messages and inspiring stories in there, but found this one really inspiring at the moment.
This was forwarded to me some time in June of 2007.
Hearing his voice, the little boy became alarmed and made a U-turn to swim to his father. It was too late. Just as he reached his father, the alligator reached him.
>From the dock, the father grabbed his little boy by the arms just as the alligator snatched his legs. That began an incredible tug-of-war between the two. The alligator was much stronger than the father, but the father was much too passionate to let go. A farmer happened to drive by, heard his screams, raced from his truck, took aim and shot the alligator.
You and I can identify with that little boy. We have scars, too. No, not from an alligator, but the scars of a painful past. Some of those scars are unsightly and have caused us deep regret. But, some wounds, my friend, are because God has refused to let go. In the midst of your struggle, He's been there holding on to you.
The Scripture teaches that God loves you. You are a child of God. He wants to protect you and provide for you in every way But sometimes we foolishly wade into dangerous situations, not knowing what lies ahead. The swimming hole of life is filled with peril – and we forget that the enemy is waiting to attack. That's when the tug-of-war begins – and if you have the scars of His love on your arms, be very, very grateful. He did not and will not ever let you go.
Never judge another person's scars, because you don't know how they got them. Also, it is soooo important that we are not selfish – to receive the blessings of these messages, without forwarding them to someone else.