Back to Basics: The structure of a Program
Overview • The process of building a program • What a translation unit (TU) is, and its relationship to the code you write • The phases of translation • Declarations, definitions, and linkage • The one-definition compilation process translation • In C++, translation is performed upon a translation unit (TU) in nine well- defined stages • Evocatively named Phases 1 through 9 • A translation unit is defined (roughly) The Structure of a Program 20Copyright © 2020 Bob Steagall K E W B C O M P U T I N G Phases of Translation 21 CppCon 2020 - The Structure of a Program Phase 1 Phase 2 Phase 3 Phase 4 Phase 5 Phase0 码力 | 64 页 | 390.34 KB | 5 月前3Back to Basics: Templates - Part 1
lambda functionsCppCon 2021 – Back to Basics: Templates – Part 1 Copyright © 2021 Bob Steagall Translation Units • Compilation • The process of converting human-readable source code into binary object standard calls the compilation process translation 25CppCon 2021 – Back to Basics: Templates – Part 1 Copyright © 2021 Bob Steagall Translation Units • In C++, translation is performed in nine well-defined These are what we usually refer to as pre-processing • The output of Phase 6 is a translation unit • A translation unit is defined [5.1] as • A source file • Plus all the headers and source files included0 码力 | 68 页 | 436.75 KB | 5 月前3Just-in-Time Compilation - J F Bastien - CppCon 2020
In this talk I'll tell you about C++ AoT compiler, JiTs for dynamic language, JiTs for binary translation, and dive back 20, 30, 40, 50, 60 years, way back into compiler history and read wonderful academic “just-in-time” compilation (JiT) techniques since the 1960s. Broadly, JiT compilation includes any translation performed dynamically, after a program has started execution. We examine the motivation behind “just-in-time” compilation (JiT) techniques since the 1960s. Broadly, JiT compilation includes any translation performed dynamically, after a program has started execution. We examine the motivation behind0 码力 | 111 页 | 3.98 MB | 5 月前3Django CMS 3.0.x Documentation
cms.plugin_pool import plugin_pool from polls_plugin.models import PollPlugin from django.utils.translation import ugettext as _ class CMSPollPlugin(CMSPluginBase): model = PollPlugin # model where plugin app: from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool from django.utils.translation import ugettext_lazy as _ class PollsApp(CMSApp): name = _("Poll App") # give your app a name, with in the previous tutorial): from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from cms.toolbar_pool import toolbar_pool from cms.toolbar_base import0 码力 | 180 页 | 1.56 MB | 6 月前3Django CMS 2.1.x Documentation
CMS_DBGETTEXT Default: False (unless dbgettext is in settings.INSTALLED_APPS) Enable gettext-based translation of CMS content rather than use the standard administration interface. Requires django-dbgettext deprecated and will be removed in 2.2. 4.3.8. CMS_DBGETTEXT_SLUGS Default: False Enable gettext-based translation of page paths/slugs. Experimental at this stage, as resulting translations cannot be guaranteed object add an optional language parameter to the get_absolute_url function: from django.utils.translation import get_language def get_absolute_url(self, language=None): if not language: language0 码力 | 81 页 | 554.09 KB | 6 月前3Django CMS 2.1.x Documentation
CMS_DBGETTEXT Default: False (unless dbgettext is in settings.INSTALLED_APPS) Enable gettext-based translation of CMS content rather than use the standard administration interface. Requires django-dbgettext deprecated and will be removed in 2.2. CMS_DBGETTEXT_SLUGS Default: False Enable gettext-based translation of page paths/slugs. Experimental at this stage, as resulting translations cannot be guaranteed object add an optional language parameter to the get_absolute_url function: from django.utils.translation import get_language def get_absolute_url(self, language=None): if not language: language = get_language()0 码力 | 63 页 | 485.38 KB | 6 月前3Django CMS 3.9.x Documentation
import plugin_pool from polls_cms_integration.models import PollPluginModel from django.utils.translation import gettext as _ @plugin_pool.register_plugin # register the plugin class PollPluginPubl Add cms_menus.py in polls_cms_integration/: from django.urls import reverse from django.utils.translation import gettext_lazy as _ from cms.menu_bases import CMSAttachMenu from menus.base import NavigationNode 2/topics/i18n/translation/#django.conf.urls.i18n.i18n_patterns]. For more information about this see the official Django documentation [https://docs.djangoproject.com/en/dev/topics/i18n/translation/#interna0 码力 | 417 页 | 1.68 MB | 6 月前3Django CMS 3.8.x Documentation
import plugin_pool from polls_cms_integration.models import PollPluginModel from django.utils.translation import gettext as _ @plugin_pool.register_plugin # register the plugin class PollPluginPubl Add cms_menus.py in polls_cms_integration/: from django.urls import reverse from django.utils.translation import gettext_lazy as _ from cms.menu_bases import CMSAttachMenu from menus.base import NavigationNode 2/topics/i18n/translation/#django.conf.urls.i18n.i18n_patterns]. For more information about this see the official Django documentation [https://docs.djangoproject.com/en/dev/topics/i18n/translation/#interna0 码力 | 413 页 | 1.67 MB | 6 月前3Django CMS 3.11.10 Documentation
import plugin_pool from polls_cms_integration.models import PollPluginModel from django.utils.translation import gettext as _ @plugin_pool.register_plugin # register the plugin class PollPluginPubl Add cms_menus.py in polls_cms_integration/: from django.urls import reverse from django.utils.translation import gettext_lazy as _ from cms.menu_bases import CMSAttachMenu from menus.base import NavigationNode 2/topics/i18n/translation/#django.conf.urls.i18n.i18n_patterns]. For more information about this see the official Django documentation [https://docs.djangoproject.com/en/dev/topics/i18n/translation/#interna0 码力 | 493 页 | 1.44 MB | 6 月前0.03Django CMS 2.4.x Documentation
For django 1.4 more infos can be found here: https://docs.djangoproject.com/en/dev/topics/i18n/translation/#internationalizati on-in-url-patterns If you are still running django 1.3 you are able to archieve /i18n/translation.html#django.conf.urls.i18n.i18n_patterns]. For more information about this see the official django documentation [https://docs.djangoproject.com/en/dev/topics/i18n/translation/#inter hide_untranslated is True in your CMS_LANGUAGES and you are on a page that doesn’t yet have an English translation and you view the German version then the language chooser will redirect to /. The same goes for0 码力 | 156 页 | 727.78 KB | 6 月前3
共 130 条
- 1
- 2
- 3
- 4
- 5
- 6
- 13