Archive
Getting Eclipse CDT to spell check non-source files
- Problem:
- Using Eclipse Luna CDT, with C/C++ spelling engine, to document C and C++ code in Doxygen (Eclox plugin),
- Spell check works for inline Doxygen documentation. My API-level code comments in *.[ch](pp)* files gets spell-checked alright (Well…:
- I had to download a decent dictionary to avoid recommendation like this one:
. I am using the aspell dictionaries from here and here. This is before a restart/recheck:
- I still do not know how to teach the C++ spell check engine that a newline does not start a new sentence:
- The oft-referred to menu: Edit / Spell check does not show up for me:
- I had to download a decent dictionary to avoid recommendation like this one:
- However, spell check ignores my standalone *.dox files with high-level documentation.
- Using Eclipse Luna CDT, with C/C++ spelling engine, to document C and C++ code in Doxygen (Eclox plugin),
- What I have tried:
- Workaround:
- Terrible, but since a similar question is still open on stackoverflow): If you can (*.dox requires all comments to be within c-style comments anyway), rename your *.dox files to *.dox.cpp. Terrible, but works:
- A bit less terrible if you mange to store your standalone *.dox files as *.dox.cpp permanently do this if you get your Doxygen to handle these extensions.
- What is nice to see is that the spell-checker recognizes Doxygen’s built-in reserved words (as opposed to my custom-defined Doxygen-commands).
- Terrible, but since a similar question is still open on stackoverflow): If you can (*.dox requires all comments to be within c-style comments anyway), rename your *.dox files to *.dox.cpp. Terrible, but works:
- Other things to try:
- I could not get Hunspell4Eclipse to work, despite going to considerable trouble getting the marketplace into my Eclipse installation
- I have not tried eSpell.
Enterprise Library Logging Sample
Using Enterprise Library (still on 5), You can declaratively configure the logger properties (including desired formatting, see Textformatter template below)) in the app.config’s appsettings:
<loggingConfiguration name="Logging Application Block" tracingEnabled="true" defaultCategory="General" logWarningsWhenNoCategoriesMatch="true"> <listeners> <add name="Event Log Listener" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FormattedEventLogTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FormattedEventLogTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" source="Enterprise Library Logging" formatter="Text Formatter 2" log="" machineName="." traceOutputOptions="None" /> <add name="Rolling Flat File Trace Listener" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" fileName="%AppData%\trpsoft\langlabemailer\trace-rolling.log" footer="" formatter="Text Formatter" header="" rollFileExistsBehavior="Increment" rollInterval="Day" rollSizeKB="1000" maxArchivedFiles="10" traceOutputOptions="None" /> <add name="Flat File Trace Listener" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.FlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.FlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" fileName="%AppData%\trpsoft\langlabemailer\exception.log" header="" footer="" formatter="Text Formatter" traceOutputOptions="None" /> <add name="Rolling Flat File Trace Listener 2" type="Microsoft.Practices.EnterpriseLibrary.Logging.TraceListeners.RollingFlatFileTraceListener, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" listenerDataType="Microsoft.Practices.EnterpriseLibrary.Logging.Configuration.RollingFlatFileTraceListenerData, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" fileName="%AppData%\trpsoft\langlabemailer\exception-rolling.log" footer="" formatter="Text Formatter" header="" rollFileExistsBehavior="Increment" rollInterval="Hour" rollSizeKB="100" maxArchivedFiles="10" filter="All" /> </listeners> <formatters> <add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" template="Timestamp {timestamp} Message {message} Category {category} Priority {priority} EventId {eventid} Severity {severity} Title {title} Machine {localMachine} App Domain {localAppDomain} ProcessId {localProcessId} Process Name {localProcessName} Thread Name {threadName} Win32 ThreadId {win32ThreadId} Extended Properties {dictionary({key} - {value})}" name="Text Formatter" /> <add type="Microsoft.Practices.EnterpriseLibrary.Logging.Formatters.TextFormatter, Microsoft.Practices.EnterpriseLibrary.Logging, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" template="Timestamp: {timestamp}{newline} Message: {message}{newline} Category: {category}{newline} Priority: {priority}{newline} EventId: {eventid}{newline} Severity: {severity}{newline} Title:{title}{newline} Machine: {localMachine}{newline} App Domain: {localAppDomain}{newline} ProcessId: {localProcessId}{newline} Process Name: {localProcessName}{newline} Thread Name: {threadName}{newline} Win32 ThreadId:{win32ThreadId}{newline} Extended Properties: {dictionary({key} - {value}{newline} )}" name="Text Formatter 2" /> </formatters>
<categorySources> <add switchValue="All" name="General"> <listeners> <add name="Rolling Flat File Trace Listener" /> </listeners> </add> <add switchValue="All" name="Exceptions"> <listeners> <add name="Event Log Listener" /> <add name="Rolling Flat File Trace Listener 2" /> </listeners> </add> </categorySources> <specialSources> <allEvents switchValue="All" name="All Events" /> <notProcessed switchValue="All" name="Unprocessed Category" /> <errors switchValue="All" name="Logging Errors & Warnings"> <listeners> <add name="Event Log Listener" /> </listeners> </errors> </specialSources> </loggingConfiguration> <exceptionHandling> <exceptionPolicies> <add name="Log and Rethrow"> <exceptionTypes> <add name="All Exceptions" type="System.Exception, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" postHandlingAction="NotifyRethrow"> <exceptionHandlers> <add name="Logging Exception Handler" type="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging.LoggingExceptionHandler, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging, Version=5.0.505.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" logCategory="Exceptions" eventId="100" severity="Error" title="Enterprise Library Exception Handling" formatterType="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.TextExceptionFormatter, Microsoft.Practices.EnterpriseLibrary.ExceptionHandling" priority="0" /> </exceptionHandlers> </add> </exceptionTypes> </add> </exceptionPolicies> </exceptionHandling> <appSettings>
Import and call the logger like so:
using Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging; using Microsoft.Practices.EnterpriseLibrary.Logging; Logger.Write("regex:RegExRecordingFileGroup - target:" + "\t" + _filenamenoext + "\t" + strGroups);
the latter can be easily imported and analyzed in MS-Excel:
These are obviously only the simplest examples, study the Enterprise Library documentation for more customization
Testing my Langlabemailer…
… to improve the integration of the digital audio lab into the university’s language teaching processes – 1000 emails at a time. (Coming soon: same day delivery. More on this project will be available here: https://2013.iallt.org/session/driving-tutorial-call-face-face-classroom-and-what-it-took).
Scraping RSS of online actualités for language learning materials production
- The capability of RSS-news feed integration of foreign language news may be standard now in most LMS, but was not in 2002 (not even having an LMS was standard, I had to build my own while it took the university a few more years to adopt Blackboard as I had recommended in 2000):
- But RSS-feed display is skin-deep and, even in extensive-reading pedagogies, not sufficient for integration into teaching and learning which requires more post-processing.
- At a recent Digital Humanities Unconference, I was asked how I had “scraped” (RSS-scraping was chosen since it easier than screen scraping, for RSS is devoid of most markup, as long as it validates) into a SQL-server database. Here are some code-snippets to get you
- from the web
- into the database:
- The scraped plain text in the database can form the foundation for post-processing for SLA-purposes, see e.g. glossing for reading comprehension facilitation or question generation with the trpQuizConverter for
- from the web
Source code samples
Language Lab Web Portal, University of Michigan – Dearborn
For lack of even an LMS – which in post-secondary language lab environments in the US in the “noughties” commonly has had to double as CMS and Groupware -, the lab web portal in the post title had to fulfill many functions.
While the technically most advanced features probably was full text search against both database and file system (uploaded documents) – which I could relatively easily implement thanks to MS-SQL-Server and a limited number of database tables –, I liked best the collaborative building of a bank of language learning exercises using authentic materials, i.e. interactive websites from the target culture.
A few sample illustrations of the use in both language lab and affiliated computerized classrooms you can see here:
The list below links to a series screencasts of the Language Lab Web Portal that I made for training and demonstration purposes. They show the language lab web portal software in action: