--- layout: post title: "SQL Search 1.0 Released" postId: 320 ---
If you haven't tried out Red Gate's SQL Search yet, be sure to grab the v1.0 which was released today. I've been running the beta for the last couple of weeks and have been finding it quite useful when navigating around large SQL Server databases.
If you've used JetBrains' ReSharper before, you can think of SQL Search like ReSharper's Go to Type functionality, but for SQL Server objects rather than classes. When you hit Ctrl+Alt+D you can begin typing the first few characters of an object name and it will list all the matches for you:
Hitting 'enter' will take you to the selected object in the Object Explorer.
As a heavy keyboard user, I find this much more usable than navigating the Object Explorer with a mouse (especially for larger databases).
The only complaint I'd have is that the filtering options aren't fine-grained enough. At the moment, you can filter the list on one of the following options:
...but I'd find it more useful if you could pick multiple criteria (for example, I'd like to search the names of Tables, Views and Procedures, but not include Constraints and Triggers). Hopefully this will be added for the next version.


History of Changes
Version 0.7.3 (10/12/2006)
Changes to the Code Base
-
Upgraded to Checkstyle 4.2(BJL)
-
Upgraded to IKVM <IP_ADDRESS>(BJL)
-
[ 1546399 ] Use get/set functions for separators in PDFTextStripper(BJL)
-
PDDocument.silentPrint() to print without prompting for a printer(BJL)
-
[ 1544118 ] Bug in PDFont.getCodeFromArray(BJL)
-
[ 1529835 ] Add COSFloat.setValue()(BJL)
-
[ 1492555 ] PDChoiceField dead loop(BJL)
-
[ 1499521 ] NPE PDAppearance.convertToMultiLine(BJL)
-
[ 1522007 ] Error converting date(BJL)
-
Upgraded to Lucene 2.0.0(BJL)
-
[ 1451164 ] Problems filling combo and radio form fields(BJL)
-
Upgraded to lucene 1.9.1(BJL)
-
[ 1023133 ] Support PDF Functions(BJL)
-
Added command line org.pdfbox.PDFMerger(BJL)
-
***API Change*** Promoted AppendDoc from example to util package, renamed to PDFMergerUtility.(BJL)
-
Upgraded to IKVM-<IP_ADDRESS>(BJL)
-
[ 1391952 ] Problem extracting embedded attachments(BJL)
-
[ 1249607 ] Fixed issue with broken PDFs that contain multiple endobj(BJL)
-
[ 1153174 ] Added documentation for PDFHighlighter(BJL)
-
Removed log4j dependency(BJL)
-
[ 974661 ] getKids() Null Pointer Exception when parsing pdf(BJL)
-
Added better support for CJK encoding(BJL)
-
Changed signature of PDFPageContentStream.drawImage to take float arguments instead of int(BJL)
-
Fixed issue where form xobjects where not being drawn in the viewer(BJL)
-
Changed signature to PDDocumentCatalog.OpenAction to be an PDDestinationOrAction instead of just action.(BJL)
-
Added tolerance to text extraction sorting where text on a line was not at the same exact y coordinate but very close(BJL)
-
[ 1327133 ] Printing with form data(BJL)
-
Fixed issue with DateConverter that was trying to parse an empty string(BJL)
-
[ 1324846 ] appending text to PDPageContentStream messes up fonts(BJL)
-
Added new example ReplaceURLs to show how to replace a clickable URL in a PDF(BJL)
-
Implemented annotation drawing(BJL)
-
Implemented EndPath and StrokeAndClosePath operators(BJL)
-
Move text extraction permission checking from PDFTextStripper to ExtractText(BJL)
-
Added support for more annotations, thanks to a contribution from Paul King(BJL)
-
Created new FontBox project to hold all font library code(BJL)
-
Fixed issue where only the first page was sent to the printer(BJL)
-
Now automatically sets the page orientation when printing(BJL)
Changes to Documentation
-
Upgraded to Apache Forrest 0.8-dev(BJL)
Version 0.7.2 (09/11/2005)
Changes to the Code Base
-
Upgraded to IKVM-<IP_ADDRESS>(BJL)
-
Added support to get annotations from a page and to create a RubberStamp annotation(BJL)
-
Added PDDocument.print() to send the PDF to a printer.(BJL)
-
[ 1276623 ] NullPointerException in PageDrawer:241 when extractin images(BJL)
-
Allow creation of PDJpeg from a BufferedImage, thanks to contribution from Paul King(BJL)
-
Removed PDTiff in favor of PDCcitt(BJL)
-
PDFBox no longer requires log4j!!(BJL)
-
New class to allow you to specify 'named' regions where text is to be extracted.(BJL)
-
[ 1261555 ] Unexpected end of ZLIB input stream when stream has a zero length(BJL)
-
[ 1226665 ] ImportXFDF giving NPE error(BJL)
-
renamed COSDictionary.setItem( String, boolean ) to COSDictionary.setBoolean( String, boolean )(BJL)
-
Added sorting parameter to PDFTextStripper(BJL)
-
Fixed issues with PDF encryption(BJL)
-
Better date support, added support for PDFs that use non standard dates, support for time zone offsets(BJL)
-
FlateFilter-class now supports PNG-Predictors for decoding the imagedata, thanks to a contribution from Marcel Kammer(BJL)
-
Added support for extracting tiff images, thanks to a contribution from Marcel Kammer(BJL)
-
Added PDDocument.removePage to remove PDF pages(BJL)
-
Fixed issue when creating a COSString with a UTF 16 string(BJL)
-
Committed patch for type 1 PFB font parser(special thanks to Michael Niedermair)(BJL)
-
Committed patch for PNG predictors (special thanks Erik Martino)(BJL)
-
[ 1227428 ] failure of getMediaBox(BJL)
-
[ 1227426 ] null pointer in PDFToImage(ColorModel is null)(BJL)
-
[ 1207113 ] Enhancement: runtime accessible version(BJL)
-
[ 1213320 ] setFfFlag() of PDField not working correctly(BJL)
-
[ 1215945 ] Error in COSString.writePDF() - fixed escape sequences(BJL)
-
[ 1198912 ] COSName with escaped characters not parsed correctly(BJL)
-
Fixed issue where resources were not being cleared in PDFStreamEngine(BJL)
-
[ 1165686 ] Expected int type parse error(BJL)
-
[ 1182825 ] Wrong handling of signed/unsigned byte/int in TTF parsing(BJL)
-
[ 1182892 ] PDFHighlight.setHighlightColor was removed because it is not implemented by adobe(BJL)
Version 0.7.1 (04/10/2005)
Changes to the Code Base
-
[ 1170068 ] text field is not found(BJL)
-
fixed NPE issue where an image did not have any applied filters(BJL)
-
Fixed issue where extra spaces were being added during text extraction for type3 fonts(BJL)
-
[ 1119420 ] Extract and Update the Meta-Information as XML(BJL)
-
[ 1119410 ] Extract text in/between bookmarks(BJL)
-
[ 1164476 ] XFDFImport should fail with non XFDF document(BJL)
-
[ 1119408 ] Support named target for Bookmark extraction.(BJL)
-
Created Resources/PDFBox_External_Fonts.properties to create a mapping for non-embedded fonts(BJL)
-
**API Change** Renamed PDField.getName() to PDField.getPartialName(), added method getFullyQualifiedName() (BJL)
-
**API Change** Renamed PDWidget to PDAnnotationWidget for naming consistency(BJL)
-
Text is now extracted from embedded form xobjects.(BJL)
-
Deployed site to new hosting vendor.(BJL)
-
committed code for PDFHighlighter to highlight words in a PDF document.(BJL)
-
Added command line application org.pdfbox.PDFToImage(BJL)
-
Implemented runlength decoding(BJL)
-
Added patch from Jorge Hernández Sellés to append content streams to existing page.(BJL)
-
**API Change**renamed package from pdmodel.graphics.image to pdmodel.graphics.xobject(BJL)
-
**API Change**Removed PDRadioButton, should use PDCheckbox instead(BJL)
-
**API Change**COSStream now extends COSDictionary instead of containing a dictionary(BJL)
-
[ 1021241 ] Text extraction should follow PDF article divisions(BJL)
-
Added implementation for PDF page articles(BJL)
-
Created TextToPDF command line application(BJL)
-
Created ImageToPDF example(BJL)
-
fixed parsing of header where a trailing % exists(BJL)
-
[ 1110029 ] Character ">" not quoted in COSName::writePDF(BJL)
Version 0.7.0 (1/22/2005)
Changes to the Code Base
-
committed [ 1097913 ] Enhance LucenePDFDocument streams(thanks to Olivier Parent)(BJL)
-
Added implementation for PDF Bookmarks(BJL)
-
Added implementation for PDF Destinations(BJL)
-
Updated website for better format for documentation(BJL)
-
Now ExportFDF and ExportXFDF will default output files to pdfname.fdf and pdfname.xfdf(BJL)
-
[ 1046278 ] ClassCastException when doing FDF/XFDF(BJL)
-
ExtractText now allows you to extract text if you decrypt with the owner password(BJL)
-
Added PDF 1.5 Object Stream support(BJL)
-
Added pdmodel.common.PDStream to represent COSStream(BJL)
-
changed PDPage.getContents to use PDStream instead of COSStream(BJL)
-
Updated LucenePDFDocument Javadoc to tell which Lucene fields it populates(BJL)
-
moved HelloWorld example from persistence to pdmodel and updated to use new PD Model features(BJL)
-
Refactored PDFStreamEngine based on contributions from Christophe Huault(BJL)
-
This class no longer uses a gigantic if/else statement for all of the operators they are defined as properties when instantiating the class(BJL)
-
Updated AFM resources to be ones released on Adobe's site, include AFM license as well(BJL)
-
Added ability to embed TTF fonts, only WinAnsiEncoding is supported at this time(BJL)
-
Added ability to extract images, thanks to contributions by Brigitte Mathiak(BJL)
-
COSWriter now generates the document id if it does not already exist(BJL)
-
improved performance for text extraction(BJL)
-
[ 1058693 ] TextPosition does not take account of tz operator(BJL)
-
upgraded to log4j-1.2.9(BJL)
-
include package-list for javadocs(BJL)
-
[ 1037145 ] Infinite loop in PDFParser.parseObject(BJL)
-
fixed error where spaces before integers was causing parse errors(BJL)
Version 0.6.7 (10/09/2004)
Changes to the Code Base
-
Revamped the way character spacing and font information is obtained(BJL)
-
Improved location information about a character drawn on the screen.(BJL)
-
Changed the PDFStreamEngine.showString to showCharacter to support the newly improved location information. This will now only show one character at a time.(BJL)
-
Fixed bug in PDDocument.isOwnerPassword and isUserPassword that was using the wrong length for the encryption key(BJL)
-
Upgraded to ant 1.6.2(BJL)
-
Upgraded to checkstyle-3.4(BJL)
-
Upgraded to JUnit-3.8.1(BJL)
-
Upgraded to lucene-1.4.2(BJL)
-
Integrated patch(1016603) for issue 943319 to fix parsing of open office documents(BJL)
-
Patch:985347 No longer throw exception for "No 'ToUnicode' and no 'Encoding' for Font"(BJL)
-
Patch:996191 Fixed case statement with missing break(BJL)
-
Patch:996781 Fixed null pointer exception in acroform fields(BJL)
-
Renamed DecryptDocument to DocumentEncryption to support encryption and decryption(BJL)
-
Added load/save/encrypt/decrypt convenience methods on the PDDocument class(BJL)
-
COSWriter now attempts to keep object numbers from parsed documents and writes 'free' entries in the xref if necessary(BJL)
-
Added the ability to set the word separator on the PDFTextStripper(BJL)
-
Fixed issue where PDFBox would throw an IOException if a PDF was incorrectly missing an endobj tag(BJL)
-
Fixed 918220 where PDFBox would freeze when parsing certain cmap files(BJL)
-
Added initial colorspace support(BJL)
-
Fixed issue where AppendDoc was throwing ClassCastException(BJL)
-
Fixed 1013163 Can't parse filters that use filter abbreviation(BJL)
-
Fixed 1011244 Where encrypting then decrypting was causing a problem(BJL)
-
renamed TextPosition.getWidth to TextPosition.getCombinedHorizontalDisplacement to better reflect its actual value(BJL)
-
Fixed 919215 PDFBox now support stream replacement(BJL)
-
Fixed 955043 Added support for 'ETenms-B5-H' encoding(BJL)
-
Fixed 996050 Class Cast exception when importing(BJL)
-
Added support for Font descriptors(BJL)
-
Fixed spacing issues when doing textfield FDF import(BJL)
-
Fixed 1017175 Large number converted when re-written(BJL)
-
Fixed 1029873 PDFBox now allows for multiple xref sections(BJL)
-
Added support for document Viewer Preferences(BJL)
-
Made currentDocument and pdfDocument protected in util.Splitter to allow easier subclassing(BJL)
-
Fixed 1034427 After Splitting page orientation is lost(BJL)
-
Added the following command line applications
(BJL)
Version 0.6.6 (07/20/2004)
Changes to the Code Base
-
Improved support for setting of checkbox fields(FDF import)(BJL)
-
Added the org.pdfbox.PDFSplit utility to split a single document into many documents(BJL)
-
PDFBox now ignore the Length field that is associated with a stream, it has been found to be wrong in some documents(BJL)
-
Fixed bug when writing out PDF documents and the document contained an non alphabetic character such as ( or )(BJL)
-
Fixed bug in PDFont where dictionary encodings where not being processed correctly(BJL)
-
Fixed bug in COSDocument.isEncrypted which was comparing COSNull to the wrong object(BJL)
-
Integrated patch for supporting multiple lines in the appearance stream(BJL)
-
Upgraded to lucene-1.4-final(BJL)
-
org.pdfbox.ExtractText now uses the system encoding as the default encoding instead of ISO-8859-1(BJL)
Version 0.6.5 (03/08/2004)
Changes to the Code Base
-
Fixed bug in revision 3 encryption algorithm(BJL)
-
added support for CIDFontType0 glyph widths, which fixed issue with spaces being during text extraction(BJL)
-
Fixed infinite loop when parsing a corrupt content stream(BJL)
-
Add characterspacing + wordspacing when determining the width of a space character(BJL)
-
Added support for more font types(BJL)
-
refactored the pdmodel.interactive package, form fields use object delegation instead of inheritance for the widget, see PDField.getWidget and PDField.getKids(BJL)
-
Fixed bug where an inheritable cropbox would cause stackoverflow exception(BJL)
-
Changed usage of PDField/PDWidget to look like object delegation instead of inheritance by adding a PDField.getWidget instead of extending PDWidget(BJL)
-
refactored interactive package, this will break any existing code that uses the PDField/PDAnnotation classes. You will need to adjust your package names!!(BJL)
-
Now uses StandardEncoding as the default encoding(BJL)
-
Bug in AppendDoc example that did not take into account groups of pages(BJL)
-
PDFont now also tries the bootstrap classloader when loading AFM resources(BJL)
-
added -startPage and -endPage command line options to org.pdfbox.ExtractText(BJL)
-
Added support for corrupt PDFs with garbage before the header(BJL)
-
Fixed bug where there was whitespace instead of garbage characters in front of the first object(BJL)
-
performance improvements for the Matrix implementation(BJL)
-
upgraded to lucene 1.3(BJL)
-
fixed bug in cmap parser for cmap files that all ended in 'def'(BJL)
-
Removed createObject method from COSDocument, COSWriter will handle all object references for you(BJL)
-
Updated AppendDoc to use PDDocument instead of COSDocument and a couple bug fixes(BJL)
-
PDFParser now closes the document if there were parse errors(BJL)
-
TextPosition now has the PDFont that is associated with the piece of text(BJL)
-
Added initial version of org.pdfbox.PDFViewer, a GUI application to view the internal structure of a PDF document. This can be used for debugging purposes at this time but may end up being a Adobe Reader like application if there is enough interest(BJL)
-
Changed COSNumber/COSInteger/COSFloat interface to have both intValue and longValue(BJL)
-
Added methods isUserPassword & isOwnerPassword to PDDocument(BJL)
-
Added cmap files for CJK languages, please give me some feedback(BJL)
Version 0.6.4 (11/02/2003)
Changes to the Code Base
-
Fixed bug which caused infinite loop(BJL)
-
Fixed bug in encoding where DictionaryEncoding kept a reference instead of making a copy leading to encoding problems(BJL)
-
Added PDFTextStripper.(get|set)PageSeparator, which will allow the user to output a string after every page(BJL)
-
refactored text stripping code to separate the logic processing of PDF operators and the logic of extracting text(BJL)
-
ran findbugs on source code and fixed a couple minor issues(BJL)
-
Refactored font functionality to PDFont, some API methods are no longer available in COSObject(BJL)
-
changed name of org.pdfbox.Main to org.pdfbox.ExtractText(BJL)
-
added contribution of org.pdfbox.Overlay from Mario Ivankovits(BJL)
-
added log.isDebugEnabled checks to log4j calls(BJL)
-
added better escaping when writing COSNames(BJL)
-
fixed bug where encryption dictionary is sometimes set to COSNull instead of not being present(BJL)
Version 0.6.3 (09/13/2003)
Changes to the Code Base
-
Now contains the ability to import/set FDF data thanks to a contribution from Stefan Uldum Grinsted(BJL)
-
No longer throw an error when stream is not followed by 0A or 0D0A to allow more PDFs to be parsed(BJL)
-
Added -encoding argument to org.pdfbox.Main to control the encoding of the output(BJL)
-
Remove Prev entry from trailer if it exists because PDFBox automatically clears all old entries, only an issue when modifying/saving an existing PDF document(BJL)
-
Fixed bug in master password encryption algorithm for Revision 3 encrypted documents(BJL)
-
COSString no longer uses UTF-8 when encoding the byte array(BJL)
-
Added PDDocument.getPageCount()(BJL)
-
Fixed bug in PDFEncryption where(BJL)
-
Now enforces text extraction permissions(BJL)
Version 0.6.2 (4/18/2003)
Changes to the Code Base
-
Modified build so that build.properties settings are no longer required(BJL)
-
Added required libraries to CVS(BJL)
-
Added log4j logging(BJL)
-
Significant text extraction work(BJL)
-
Added automatic handling of files encrypted with the empty password(BJL)
-
Added automated tests and test data for text extraction(BJL)
-
Removed unimplemented decoders from filters test(BJL)
-
Fixed several LZW decode bugs introduced after 0.5.6(BJL)
-
Fixed bugs relating to processing out of spec PDF's with bad # escaping in the name ("java.io.IOException: Error: expected hex number" bug)(BJL)
-
Fixed Lucene UID generation bug(BJL)
-
Fixed GetFontWidths null pointer exception bug(BJL)
Version 0.6.1 (3/9/2003)
Changes to the Code Base
-
Fixed bug in parsing stream objects which led to "Unexpected end of ZLIB input stream"(BJL)
-
Changed license from LGPL to BSD to allow pdfbox to be used easily in Apache projects(BJL)
Version 0.6.0 (3/5/2003)
Changes to the Code Base
-
Massive improvements to memory footprint(BJL)
-
Must call close() on the COSDocument(LucenePDFDocument does this for you)(BJL)
-
Really fixed the bug where small documents were not being indexed(BJL)
-
Fixed bug where no whitespace existed between obj and start of object. Exception in thread "main" java.io.IOException: expected='obj' actual='obj<</Pro(BJL)
-
Fixed issue with spacing where textLineMatrix was not being copied properly(BJL)
-
Fixed 'bug' where parsing would fail with some pdfs with double endobj definitions(BJL)
-
Added PDF document summary fields to the lucene document(BJL)
Version 0.5.6 (11/28/2002)
Changes to the Code Base
-
Fixed bug in LucenePDFDocument where stream was not being closed and small documents were not being indexed (BJL)
-
Fixed a spacing issue for some PDF documents (BJL)
-
Fixed error while parsing the version number (BJL)
-
Fixed NullPointer in persistence example (BJL)
-
Create example lucene IndexFiles class which models the demo from lucene (BJL)
-
Fixed bug where garbage at the end of file caused an infinite loop (BJL)
-
Fixed bug in parsing boolean values with stuff at the end like "true>>" (BJL)
Version 0.5.5 (10/03/2002)
Changes to the Code Base
-
Added example of printing document signature(BJL)
-
Added example to print out form fields values(BJL)
-
Fixed bug when appending documents(BJL)
-
Various other bug fixes(BJL)
Version 0.5.4 (09/17/2002)
Changes to the Code Base
-
Fixed bug in text output where '?' instead of the proper character(BJL)
-
Fixed bug where sections of text were not being output at all(BJL)
Version 0.5.3 (09/13/2002)
Changes to the Code Base
-
Fixed bug in 128 bit encryption(BJL)
Version 0.5.2 (09/06/2002)
Changes to the Code Base
-
Fixed bug where FDF documents could not be appended to PDF Documents(BJL)
-
Catch all NumberFormatExceptions and wrap them with IOExceptions(BJL)
Version 0.5.1 (09/04/2002)
Changes to the Code Base
-
Now supports unicode for the document summary(BJL)
-
Better support for Type0 fonts(BJL)
-
Fixed bug with an empty LZW stream(BJL)
-
Fixed parsing error for ID operator(BJL)
Version 0.5.0 (08/31/2002)
Changes to the Code Base
-
Now supports unicode for the document summary(BJL)
-
Better support for Type0 fonts(BJL)
-
Fixed bug with an empty LZW stream(BJL)
-
Fixed parsing error for ID operator(BJL)
Version 0.4.1 (07/25/2002)
Changes to the Code Base
-
Fixed bug where .notdef was being output as document text(BJL)
Version 0.4.0 (07/23/2002)
Changes to the Code Base
-
Added extract text ant task(BJL)
-
Implemented AFM(Adobe Font Metrics) resource loading(BJL)
-
Fixed numerous bugs submitted by users(BJL)
-
Changed project from pdfparser to pdfbox to better reflect future needs(BJL)
Version 0.3.0 (07/09/2002)
Changes to the Code Base
-
Added indexer for the lucene project(BJL)
-
Initial implementation of PDF encryption(not working yet)(BJL)
Version 0.2.0 (06/03/2002)
Changes to the Code Base
-
Added support for the various encodings(BJL)
-
Improved the accuracy of the text output(BJL)
Version 0.1.0 (05/25/2002)
Changes to the Code Base
-
Initial Version(BJL)


| 1 | package fr.sii.ogham.testing.extension.common; | |
| 2 | ||
| 3 | import java.io.PrintWriter; | |
| 4 | import java.io.StringWriter; | |
| 5 | ||
| 6 | /** | |
| 7 | * Simple logger that writes header, success and failure using a | |
| 8 | * {@link StringWriter}. The {@link StringWriter} is passed to the constructor | |
| 9 | * to ba able to read the written strings from the external. | |
| 10 | * | |
| 11 | * <p> | |
| 12 | * This is mainly used for tests | |
| 13 | * | |
| 14 | * @author Aurélien Baudet | |
| 15 | * | |
| 16 | */ | |
| 17 | public class StringPrinter implements Printer { | |
| 18 | private final StringWriter writer; | |
| 19 | private final boolean writeMarker; | |
| 20 | ||
| 21 | /** | |
| 22 | * | |
| 23 | * @param writer | |
| 24 | * the writer that can be shared | |
| 25 | * @param writeMarker | |
| 26 | * true to write marker | |
| 27 | */ | |
| 28 | public StringPrinter(StringWriter writer, boolean writeMarker) { | |
| 29 | super(); | |
| 30 | this.writer = writer; | |
| 31 | this.writeMarker = writeMarker; | |
| 32 | } | |
| 33 | ||
| 34 | @Override | |
| 35 | public void printHeader(String marker, String header) { | |
| 36 |
1
1. printHeader : removed call to fr/sii/ogham/testing/extension/common/StringPrinter::printMarker → NO_COVERAGE |
printMarker(marker); |
| 37 | writer.append(header + "\n\n"); | |
| 38 | } | |
| 39 | ||
| 40 | @Override | |
| 41 | public void printSucess(String marker, String success) { | |
| 42 |
1
1. printSucess : removed call to fr/sii/ogham/testing/extension/common/StringPrinter::printMarker → NO_COVERAGE |
printMarker(marker); |
| 43 | writer.append(success + "\n\n"); | |
| 44 | } | |
| 45 | ||
| 46 | @Override | |
| 47 | public void printFailure(String marker, String failure, Throwable e) { | |
| 48 |
1
1. printFailure : removed call to fr/sii/ogham/testing/extension/common/StringPrinter::printMarker → NO_COVERAGE |
printMarker(marker); |
| 49 | writer.append("Test failure:" + e + "\n"); | |
| 50 |
1
1. printFailure : removed call to java/lang/Throwable::printStackTrace → NO_COVERAGE |
e.printStackTrace(new PrintWriter(writer)); |
| 51 | writer.append(failure + "\n\n"); | |
| 52 | } | |
| 53 | ||
| 54 | ||
| 55 | private void printMarker(String marker) { | |
| 56 |
1
1. printMarker : negated conditional → NO_COVERAGE |
if (writeMarker) { |
| 57 | writer.append("[marker:" + marker + "]\n"); | |
| 58 | } | |
| 59 | } | |
| 60 | } | |
Mutations | ||
| 36 |
1.1 |
|
| 42 |
1.1 |
|
| 48 |
1.1 |
|
| 50 |
1.1 |
|
| 56 |
1.1 |


Withdrawal Page
Withdrawal Amount:
RM100.00
RM200.00
RM300.00
RM400.00
RM500.00
RM600.00
RM700.00
RM800.00
RM900.00
RM1000.00
RM1100.00
RM1200.00
RM1300.00
RM1400.00
RM1500.00
Choose Your Bank:
Affin Bank Berhad
Alliance Bank Malaysia Berhad
AmBank (M) Berhad
CIMB Bank Berhad
HSBC Bank Malaysia Berhad
Hong Leong Bank Berhad
OCBC Bank (Malaysia) Berhad
Public Bank Berhad
RHB Bank Berhad
Malayan Banking Berhad
Back Account No:
Full Name:
Email Address:
*The invoice will send to this email
Saved & Confirm Withdrawal


Greetings from Dave Yorke, I am Dr. Dave Yorke, Group Accountant (R.B.T.T) However, I have already sent you this same letter by post one month ago, but I am not sure if it did get to you since I have not heard from you, hence my resending it again. I discovered a dormant account in my office, as Group Accountant with Republic Bank of Trinidad and Tobago. It will be in my interest to transfer this fund worth $28.5M Dollars (Twenty Eight Million Five hundred thousand Dollars)in an account offshore. Can you be my partner? Please get back to me ASAP if in the event you are interested. Regards and respect, Dave Yorke.


Intro:
The tool will run the user defined audit rules on supplied WSDL(though currently it supports only WSDL based on w3c schema type, it can be extended to support any XML).
The rules should be defined in XML, in a defined format which will be explained below.
The tool also has a capability of comparing two wsdl's(Mainly a old and new version of same WSDL) and run rules on the newly added/removed elements.
Also this tool is completely extensible, i.e. all the core classes are instantiated using factory backed by Configuration.xml which can supplied as input argument.
By Default Tool generates a HTML output, but you can supply any output user, which uses the tool output to generated any kind of file.
Command Line Usage:
Download the
Executable Jar from the Links Section on Left, from the directory where WsdlAuditor.jar is located run the following commands.
java -jar WsdlAuditor.jar document=<WSDL Document path/URL> ruledef=<Ruledefinition xml Path/URL> outputdir=<output directory>
If tool needs to be used in compare mode, add a parameter
comparedoc=<old wsdl path>
For Supplying Configuration to tool, which is used to configure new OutputUsers, Rule Operator Executors, Switching off Default Output.
Add following argument,
config=<configuration xml path>
Look How to Create a Rule Definition for detailed information on Rule Definition Syntax.
Look How to Extend Tool using Configuration for detailed information on Configuration File Syntax.
Eclipse Plugin Usage:
Installation
1. Install directly from eclipse using the update site URL :
http://wsdlauditor.sourceforge.net/WsdlAuditorUpdateSite/
2. Download the Update Site Zip file
WsdlAuditorUpdateSite.zip
3. Download the
Eclipse Plugin Jar.
-
Extract the Zip File.
-
Copy plugins/org.wsdl.tools.wsdlauditor.plugin_1.0.1.jar file to plugins folder in Eclipse Home.
-
Restart Eclipse.
Prefer the 1st installation method.
Now open Eclipse Preferences, you will find the "WAudit Preferences" menu, and you will find the following screen.
-
Output Directory: Directory To which audit reports are to be stored.
Required: Mandatory, if Config file is not supplied.
-
Rule Definition File Path: Complete File path of Rule Definition file
Required: Mandatory
Look How to Create a Rule Definition for detailed information on Rule Definition Syntax.
-
Configuration File Path: Complete File path of Configuration file
Required: Optional, Required only if tool needs to be extended for new rule operators or output users
Look How to Extend Tool using Configuration for detailed information on Configuration File Syntax.
-
Jar Files Path: "," separated any extra jars required
Required: Optional, Required only if tool needs to be extended for new rule operators or output users
-
Zip Output: Whether Output needs to be Zipped
Required: Optional
You will find the following menu Options in eclipse after successful installation of plugin,
-
"WAudit" Menu in Project, this will create a Audit Report for all the wsdl's in the selected project.
-
"WAudit" Menu on right click of any folder/package, this will create a Audit Report for all the wsdl's in the selected folder.
-
"WAudit" Menuon right click of any file, this will create a Audit Report for the selected file.
-
"WAudit Compare" Menu on right click of any file, this will Open a File Select Dialog Box, upon selecting the old version of the file, this will run compare rules.
How to Create a Rule Definition:
The Rule Definition is an XML file which describes the auditing rules which are to be enforced on a wsdl.(
Currently XSD for this file is not Yet Created, but will be created in later point.)
The basic structure of the Rule Definition file is as follows,
<?xml version="1.0" encoding="UTF-8"?>
<wsdlRuleEngine>
<rulesets>
<ruleset conjunction="and" name="AnnotationRule">
<group conjunction="and">
<rule on="child" oper="!Present" name="annotation" />
<rule on="child" name="annotation" ruleset="NameCapitalRule"/>
</group>
<error type="error" code="10">
<message>Every Element should have Annotation</message>
<suggestion>Add Annotation to Element</suggestion>
</error>
</ruleset>
<ruleset conjunction="and" name="NameCapitalRule">
<group conjunction="and" negate="true">
<rule on="attribute" oper="!Matches" name="name" value="[A-Z].*" />
</group>
<error type="error">
<message>name of element/value/type must start with a capital letter.</message>
<suggestion>Correct the name of the element</suggestion>
</error>
</ruleset>
<ruleset conjunction="and" name="NameAlphaNumeric">
<group conjunction="and">
<rule on="attribute" oper="!Matches" name="name" value="[a-zA-Z0-9_]*"/>
</group>
<error type="error">
<message>name must be alphanumeric.</message>
<suggestion>name must be alphanumeric.</suggestion>
</error>
</ruleset>
</rulesets>
<rules name="NameRule">
<include ruleset="NameCapitalRule" />
<include ruleset="NameAlphaNumeric" />
</rules>
<rules name="DocRules">
<include ruleset="AnnotationRule" />
</rules>
<rules name="AttributeRules" on="Attribute" change="Added">
<include rules="DocRules" />
<include rules="NameRule" />
</rules>
<rules name="SimpleRules" on="SimpleType">
<include rules="DocRules" />
<include ruleset="NameAlphaNumeric" />
</rules>
</wsdlRuleEngine>
Rule Definition Mainly Contains
- RuleSets: Set of rules Grouped Together, which are successful execution returns a Error Message
- Rules: Rules are a Set of rule sets which are to be executed on any entity.
The Following are the different supported values of all the attributes in the Rule Definition,
- conjunction: Values "and" and "or" can be used here.
- on:
- Rule: Values child,comment,attribute,value can be used here, this means the rule will be executed on those elements of an Entity
- Rules: Values Element, ComplexType, SimpleType, Enumeration,RequestType, ResponseType, Attribute, Service, Operation can be used here, this means the rule will be executed on those Entities
- oper: Values Supported by default are(new values can be supplied through Configuration.xml) StartsWith, EndsWith, Contains, Equals, Empty, Method, Matches,!Matches, In, Present,Position,DirectReturn, !StartsWith, !EndsWith, !Contains, !Equals, !Empty, !In, !Present,!Position, Primitive,!Primitive,Count
Most of the values are self explanatory.
Method: This will call the method from the class supplied in the value attribute, the class supplied should implement org.wsdl.tools.wsdlauditor.interfaces.RuleExecutor
Matches: This will execute the java RegEx, with expression supplied in the value.
In: This will check if the element is present in the "," separated values supplied in value attribute.
Position: This will check the Position of the element w.r.t its peers, the value can hold "last" or "first" mainly use on compare rules. In case this rule is used as rule on changed elements, this checks the position as per old doc if removed, or position as per new doc element.
DirectReturn: the value attribute should hold "true" or "false" and this will just return the appropriate boolean value.
Count: This will check if the count of the children or attributes is same as the value attribute.
Present: Checks if the child/attribute/value/comment is present or not.
- name: the value of this attribute depends on the "on" attribute, this can be name of the attribute or child.
if this attribute is supplied when "on" is child then the rule will be executed on child with this tag-name.
if supplied along with "Present" oper then will check the presence of child or attribute.
This can hold a value of *, which means on all the attributes(* is supported only in case the on is attribute).
- value: the value of the value which should be supplied to the rule, ex: in case of Matches value will hold the Java Pattern which has to be applied on it.
- ruleset: This is valid only in case "on" is child, this specifies the rule set which should be executed on the child element specified by name attribute.
- negate: supplied on group tag, Values true,false this just indicates rule engine to negate the cumulative result from the rules in that group
- name: name attribute on Rules, RuleSet should be unique in the corresponding peers.
- change: Change can be "Added" or "Removed" which indicates that to run the following rules on Added/Removed elements only,
Also Change is considered only if indicated along with on attribute.
- ruleset: Ruleset which needs to be included.
- rules: Rules which needs to be included.
Download the
SampleRuleDefinition.xml for further clarity.
How to Extend Tool using Configuration:
Configuration file is used to Extend the Tool and supply the new Operators and Any of the core classes,
Also it can be used to supply Output users, which generate different kind of output.
The basic Structure of Configuration file is as follows,
<?xml version="1.0" encoding="UTF-8"?>
<wsdlauditorconfig
xmlns="WsdlAuditorConfiguration"
xmlns:xsi="http://www.w3.org/2001/XMLSchema"
xsi:schemaLocation="WsdlAuditorConfiguration Configuration.xsd">
<defaultoutputdir>c:\wsdlAuditReports</defaultoutputdir>
<outputusers>
<outputuser name="DefaultHtml" disabled="false">
<class>org.wsdl.tools.wsdlauditor.html.DefaultOutputUser</class>
<outputdir>c:\wsdlAuditReports</outputdir>
<param>
<name>param1</name>
<value>value1</value>
</param>
</outputuser>
</outputusers>
<factory>
<executors>
<executor>
<operator>Contains</operator>
<class>org.wsdl.tools.wsdlauditor.ruledefn.executors.ContainsExec</class>
</executor>
</executors>
<dataobjects>
<dataobject>
<type>RuleEngine</type>
<class>org.wsdl.tools.wsdlauditor.ruledefn.RuleEngine</class>
</dataobject>
</dataobjects>
</factory>
</wsdlauditorconfig>
The main elements of the Configuration file are
- outputuser: This configuration is supplied to generate or use the output from the WsdlAuditor, this class must implement org.wsdl.tools.wsdlauditor.interfaces.OutputUser
- executor: This configuration is supplied to use new kind of operators in by WsdlAuditor, the operator should exatly match the value provided in the oper attribute on a rule, This class must implement org.wsdl.tools.wsdlauditor.interfaces.RuleExecutor
- dataobject: This configuration is supplied to provide different implementations of different core classes in the WsdlAuditor.
Different Values of type and the classes it has to implement/extend are,
- RuleEngine: The core RuleEngine class this is responsible for executing the rules on elements.
This class should extend org.wsdl.tools.wsdlauditor.ruledefn.RuleEngine
- ElementInfo: The ElementInfo class holds data about each element.
This class should extend org.wsdl.tools.wsdlauditor.ruledefn.data.ElementInfo
- Error: The Error class holds data about each error element in ruleset.
This class should extend org.wsdl.tools.wsdlauditor.ruledefn.data.Error
- Rule: The Rule class holds data about each Rule element.
This class should extend org.wsdl.tools.wsdlauditor.ruledefn.data.Rule
- RuleDefinition: The RuleDefinition class holds data about Complete RuleDefinition.xml file.
This class should extend org.wsdl.tools.wsdlauditor.ruledefn.data.RuleDefinition
Or alternatively can implement org.wsdl.tools.wsdlauditor.interfaces.RuleDefinitionInterface
- RuleParam: The RuleParam class holds data which is passed to RuleExecutor.
This class should extend org.wsdl.tools.wsdlauditor.ruledefn.data.RuleExecutorParam
- RuleGroup: The RuleGroup class holds data of group tag.
This class should extend org.wsdl.tools.wsdlauditor.ruledefn.data.RuleGroup
- Rules: The Rules class holds data of rules tag.
This class should extend org.wsdl.tools.wsdlauditor.ruledefn.data.Rules
- RuleSet: The RuleSet class holds data of ruleset tag.
This class should extend org.wsdl.tools.wsdlauditor.ruledefn.data.RuleSet
- SchemaElement: The SchemaElement class holds data about a wsdl element, this contains complete information about Element, its Reference counterpart etc.
This class should extend org.wsdl.tools.wsdlauditor.ruledefn.data.SchemaElement
- SchemaError: The SchemaError class holds error data created from executing Rule.
This class should extend org.wsdl.tools.wsdlauditor.ruledefn.data.SchemaError
- WsdlSchema: The WsdlSchema class holds error data of complete WSDL file.
This class should extend org.wsdl.tools.wsdlauditor.ruledefn.data.WsdlSchema
- RuleDefinitionReader: The RuleDefinitionReader class parses the RuleDefinition file and creates the Object structure.
This class should extend org.wsdl.tools.wsdlauditor.ruledefn.DefaultRuleDefinitionReader
Or alternatively can implement org.wsdl.tools.wsdlauditor.interfaces.RuleDefinitionReader
- DocumentParser: The DocumentParser class parses the wsdl file and creates the Object structure.
This class should extend org.wsdl.tools.wsdlauditor.document.WsdlParser
Or alternatively can implement org.wsdl.tools.wsdlauditor.interfaces.DocumentParser
Download the
SampleConfiguration.xml for further clarity.
Download the
Configuration.xsd for further clarity.


Structs The following structs are available globally. GKCoordinate Undocumented See more WGSCoordinate Undocumented See more MonitorResponse Undocumented See more Departure A bus, tram or whatever leaving a specific stop at a specific time See more Declaration Swift public struct Departure: Decodable, Equatable Diva Undocumented See more LinesResponse Undocumented See more Line Undocumented See more POIResponse Undocumented See more POI Undocumented See more Platform Undocumented See more RoutesResponse Undocumented See more Route Undocumented See more RouteChangeResponse Undocumented See more RouteChange Undocumented See more FindResponse Undocumented See more Stop A place where a bus, tram or whatever can stop. See more Declaration Swift public struct Stop: Decodable, Equatable TripsResponse Undocumented See more TripStop Undocumented See more


DrpxSelector demo
Pick one
{{value.label}}
*
{{demo.selector.current.label}}
{{demo.selector.current.value}}
Next
Prev


Returns whether or not this dialog loaded properly
Returns whether or not this Form is destroyed
Returns whether or not the data in this dialog is out of date
Get the last time this dialog's data was refreshed
Get the last time this dialog's data was refreshed
Get the title of this dialog
Get the all ViewDescriptor's associated with this Form
Find a menu def on this dialog with the given actionId
Get a string representation of this property suitable for 'reading'
Get a string representation of this property suitable for 'writing'
Perform this action associated with the given Menu on this dialog. The targets array is expected to be an array of object ids.
| Redirection>}
Parses a value to prepare for 'writing' back to the server
Get the property definition for a property name
Read all the large property values into memory in this Record
Read a large property into memory
Stream the encoded chunks of a large property without retaining them The streamConsumer will receive Base64 encoded chunks with callbacks. hasMore will be false with the final chunk.
Read a large property into memory or stream it, if a streamConsumer is provided The actual service call that retrieves the result is delegate to the 'getPropertyFn'
Generated using TypeDoc
Return the error associated with this dialog, if any


See my travel destinations!
My list of go to food~
Stores and museums at Seaport!
You can see more of my adventures below!


The main goal of DAFNA project is to design a scalable and accurate truth discovery system to score the veracity of information extracted from multiple online sources.
We provide a demo of the tool we have developped, called AllegatorTrack.
Existing truth discovery models have limited applicability and we extensively studied them in our experimental evaluation study.
Finally, we provide API so you can test the methods on your own.


Prehistoric fossils found beneath Hollywood Academy Museum
by Johnny OleksinskiBeneath Hollywood’s new Academy Museum, researchers have made a surprising discovery: the dead carpet.
Deadline reports that during construction on the new facility — which will house movie memorabilia, a 1,000-seat theater and more — paleontologists found a trove of Ice Age fossils.
“You may think that Yellowstone is scary today, but this place would have been way scarier than that,” Dr. Regan Dunn, assistant curator of the La Brea Tar Pits, told the outlet of Los Angeles 40,000 years ago.
Back then, she said, the land was colder and wetter, and overrun with “mean cats” (“much bigger” than mountain lions), bison, mammoths and “an awful lot of dire wolves.”

“In this area, you always have the possibility of running into fossils and our past inhabitants here,” Dunn said. “It’s just so cool to think about the greater Miracle Mile back so many thousands of years ago and what it looked like compared to what it looks like now.”
The museum has not yet set an opening date.


{% extends "swimtheme/base.html" %}
{% block content %}
{% include "swimtheme/includes/intro.html" with intro=self.intro only %}
{% include "swimtheme/includes/carousel.html" with carousel_items=self.carousel_items.all only %}
{% include "swimtheme/includes/body.html" with body=self.body only %}
{% include "swimtheme/includes/related_links.html" with related_links=self.related_links.all only %}
{% endblock %}


The Relationship Between Alcohol and Child AbuseThere is a clear connection between excessive alcohol consumption and violent and/or criminal behavior. Evidence of the relationship between the two dates back as far as the 4th century BC. Recently, researchers have clarified alcohols relation to violence, fueled by severely inhibited decision-making. In the US, about a third of inmates were intoxicated upon arrest; half of all domestic abuse involve drinking.  Over 1 million children are abused or neglected annually. Over 425,000 of these children were placed into the Child Welfare system.
|
|
Bullying, aggressive behavior common in schools, has become a source of many modern news reports. 1 out of 3 children and teenagers are victimized by aggressive or damaging insults at school. Cyberbullying, the act of bulling via the internet, and affects 1 out of 7 teens in the United States. Tragically, alcohol and bullying often go hand in hand.
Behaviors typical of mixing alcohol and bullying includeUnderstanding the Impact of Alcohol and BullyingDepression Self-harm (cutting, eating disorders) Post-Traumatic Stress Disorder Low self-esteem
Stress Low self-worth Low motivation Low academic performance Increased risk of suicide Aggression Schizophrenia Insomnia Panic disorders Higher risk of decreased mental wellness Learn more:This link will open in a new windowCode of Practice on Human Resource Management |
Can a bank request me to provide my HKID Card Number for exchanging a HK$500 note for notes of smaller denominations?According to the Code of Practice on the Identity Card Number and other Personal Identifiers ("the Code") issued by the Privacy Commissioner, in general, a data user cannot compel an individual to provide his ID card number except with legal authority. Moreover, identity card numbers should not be collected, unless such collection is permitted under the Code. In view that such transaction did not involve substantial risk of money laundering activities, collection of HKID Card numbers was unnecessary. However, banks are permitted to collect HKID Card copies of their customers as due diligence measures before carrying out a transaction involving an amount equal to or above HK$120,000, and if that is a wire transfer, an amount equal to or above HK$8,000 so as to comply with the relevant requirement in the Anti-Money Laundering and Counter-Terrorist Financing (Financial Institutions) Ordinance. Do I need to provide my HKID Card copy to my prospective employer?The Code permits a data user to collect the copy of an HKID Card in order to provide proof of compliance with any statutory requirement. An example of such statutory requirement is given under that paragraph in section 17J of the Immigration Ordinance (Cap 115). Employers should not collect HKID Card Copy of job applicants during the recruitment process unless and until the candidate has accepted the offer of employment. Therefore, you are only required to provide your HKID Card Copy upon acceptance of the job offer. Learn more: This link will open in a new windowYour Identity Card Number and Your Privacy |
I have a savings account at "Bank A". Recently I received a phone call from a staff member of this bank marketing its investment products to me. I am really annoyed at this kind of direct marketing calls. How does the Ordinance protect me from the unsolicited approach?Regulation on data protection in direct marketing Part VIA of the Ordinance regulates the use and provision for use of personal data in direct marketing activity. Data user (Bank A) is required to inform the data subject (you as a client of the bank) certain prescribed information and to obtain his consent. Prescribed information include the notification that the data user intends to use your personal data in direct marketing; that it will not so use your personal data unless it has received your consent or indication of no objection; the kinds of personal data to be used; and the classes of goods, facilities or services that it will promote to you. The data user should also provide the data subject with a response channel to communicate his consent or indication of no objection. Non-response of the data subject to the data user's notification does not constitute consent or an indication of no objection. The data user cannot use the data subject's personal data in direct marketing unless it has obtained the consent or an indication of no objection from the data subject. Failure to comply with the new requirements by the data user is a criminal offence punishable by a fine and imprisonment. When you receive a marketing message, ask yourself: Had the organisation sent you direct marketing messages before 1 April 2013 regarding the same kind of products it currently promotes, and you had never rejected those messages? YES – Bank A may invoke the grandfathering provisions of the Ordinance. In which case, it can continue to use your personal data for the purpose of direct marketing the same class of products, without having to inform you of the prescribed information and obtain your consent or indication of no objection. NO –Bank A may commit a breach of the new requirements if it had not obtained your consent or indication of no objection for using your personal data in direct marketing the current type of products. You may ask Bank A to remedy the breach or lodge a complaint to the PCPD. You can opt out at anytime As a data subject, you can opt out from direct marketing at anytime whether or not you have previously consented to receiving direct marketing messages. Although the Ordinance does not prescribe the manner of how a data subject should raise an opt-out request, the PCPD advises data subject to do so in writing for better protection. You should keep a copy of it which can serve as evidence for future investigation. If, after you have made an opt-out request and the organisation still keeps on using your personal data for direct marketing purpose, it may have committed an offence under the Ordinance. Learn more: |
I read from the news that a telephone company would provide its subscribers' telephone numbers and address information to the Fire Services Department ("FSD") to facilitate its handling of emergency calls more efficiently. Has it contravened the Ordinance?Having approached both organizations, it was clarified that the telephone company would only provide to FSD the telephone number and installation address of the numbers concerned, i.e. the building or the estate from which the call is made. No full address and name of the subscriber would be disclosed to FSD. According to section 2 of the Ordinance, personal data means any data relating directly or indirectly to a living individual and from which it is practicable for the identity of the individual to be directly or indirectly ascertained. As the information passed over by the telephone company to FSD do not contain any personal identifying particulars such as name and full address, these data are not regarded as personal data and this arrangement would not be in breach of the Ordinance. |
Can employers monitor employees' e-mails and phone calls?Before deciding to monitor, employers should first assess whether it is really necessary to conduct such activity having regard to the business risks that they seek to manage and the impact on personal data privacy of its employees. Employers should consider alternatives available in order to lessen the adverse impact brought by the monitoring activity. In carrying out monitoring, employers should also implement clear Employee Monitoring Policy and communicate it to the staff affected. The use, retention and processing of personal data collected should also be kept under control so as not to contravene the requirements under the Ordinance. Learn more: This link will open in a new windowPrivacy Guidelines: Monitoring and Personal Data Privacy at Work Can employers of domestic helpers install surveillance cameras at home?The same assessment process as mentioned above also applies. Given that the workplace is also the place of rest for the domestic helpers, employers should seriously consider whether it is really necessary to engage in such activity, the reasonableness as well as the openness of the activity. They should therefore inform their helpers of such practice, restrict monitoring to targeted areas (not toilets or other private areas) and make clear the purpose of monitoring and the retention period for the taped records. Learn more: Can employers install pinhole cameras?Covert monitoring is not encouraged especially when it is being used as preventive measure only. Unless justified by existence of relevant special circumstances, such as "a reasonable suspicion" of unlawful activity and there is no reasonable alternative, this should only be engaged in as a last resort. This link will open in a new windowGuidance on CCTV Surveillance and Use of Drones What can employees do if they find employers not following the "Privacy Guidelines: Monitoring and Personal Data Privacy at Work"?They can complain to the Privacy Commissioner, who can follow up with the employer and examine the case by reference to the recommended good practices suggested in the Guidelines. If the employer is uncooperative and the law on personal data protection has been breached, the Commissioner may serve an enforcement notice on the employer directing for remedial action, which, if not complied with, can attract criminal sanction. Learn more: |
Can government departments install closed-circuit televisions at gambling and hawker blackspots in housing estates, such as pavilions and parks, to tackle the problems?We will not comment on individual cases before understanding the specific situation. According to the Ordinance, "personal data" are any data relating to a living individual, which are stored in recorded form making access to or processing practicable and from which it is practicable for the identity of the individual to be directly or indirectly ascertained from it. Generally speaking, to constitute an act of collection of personal data by the data user, there should be compilation of information about an individual, whose identity must have been identified by the data user, or the data user intends or seeks to identify the identity of the individual. In general, if a monitoring and recording system is installed in a public place merely for the sake of security, it may not constitute collection of personal data (unless the data of a certain or some particular individuals are collected) and it may not be subject to the Ordinance. However, collection of personal data may take place under some special circumstances. For example, after a special incident has happened, the Authority concerned may need to review the video records for the purpose of ascertaining the identity of the individuals involved in the incident and it may then amount to collection of personal data. Therefore, organizations which intend to install monitoring and recording systems should, at least, post a notice in a prominent position near the installation, stating that the area is being monitored, the purposes of monitoring, as well as the ways of handling the records. Broadly speaking, organizations can install monitoring and recording systems only if it is necessary for fulfilling their legitimate functions or activities, such as for security reasons, the monitoring of illegal acts (e.g. throwing objects from height, installation of closed-circuit televisions at hygiene blackspots by Team Clean), etc. Before an organization installs a monitoring and recording system, it is suggested that it should establish the collection purposes, evaluate the risks of monitoring, and consider if there is any other substitute that is less privacy intrusive in order to strike a balance between the protection of privacy rights of individuals and the smooth operation of the organizations. When an organization has decided to install a monitoring and recording system, it is suggested that in the interest of transparency it should post a notice in a prominent position near the installation (the notice should be as close to the installation as practicable; the words should be clear and noticeable) so that sufficient notice is drawn to the public or the people affected hat their activities may be recorded and the reasons for collection of their personal data. The organizations concerned are suggested to formulate policies on video monitoring, and the persons who can access and view the contents of the tapes. Moreover, the organizations should also prescribe the retention period of the tapes and delete the data in the tapes accordingly, and steps shall also be taken to ensure that the tapes are securely kept. In conclusion, when using monitoring and recording devices in public place, it is our view that a proper balance should be struck between the protection of public interests and personal data privacy. Data users should handle the issue in a fair and transparent manner giving due regards to the rights of personal data privacy. Learn more: This link will open in a new windowGuidance on CCTV Surveillance and Use of Drones |


Writing Cloudkick Query Language parser using Waxeye
First, some background.
At Cloudkick we use a special query language that allows users to filter a set of nodes on which the agent checks are applied. It is also used on the dashboard where it helps users find nodes quickly.
This query language is simple and powerful, allowing for the construction of complex queries with parenthesis and negated expressions. Specific details are available on our wiki. We encourage users to write simple queries as with most of the other things - simple is almost always better.
I helped develop the Python based parser which we currently use and powers the query language. This parser generates tokens from a user’s query, using them to construct a new query which is then sent to Solr (among other things, we use Solr to index node documents). Details about Solr query generation are not important for this post, but I have mentioned them so you get the whole picture.
The current parser is not perfect, but for the most of the times, it works.
Recently we have stumbled across Waxeye. Waxeye is an easy to use parser generator, which among other languages also supports Python and JavaScript. This is perfect for us because adding auto-complete support for queries on the frontend is on our road-map. Thanks to Waxeye we will not need to develop another parser in JavaScript and will only have to maintain a single grammar file.
Since the parser generator looks easy to use and is pretty cool, I have dedicated myself to write a simple grammar for our query language which is available on github. Please keep in mind that what is available now is not the final result; it is just a quick thing I wrote while playing with Waxeye.
Since the parser makes a lot of function calls and there is also a lot of looping going on I was curious how it would perform with PyPy - after all there are a lot of function calls to in-line and some of the loops should probably be JIT-ed as well.
I decided to make a quick and very unscientific benchmark (although, I don’t think my benchmarks are any worse than all the “NodeJS is faster than <enter your favorite web server name here>” benchmarks which have started to appear in the past year or so).
The code used to perform benchmarks is located on github, as is the parser code generated by Waxeye.
PyPy needed on average 1.71 seconds to complete 100 iterations and CPython only needed 0.61 seconds, which means, that in this case, PyPy was almost 3 times slower.
In the second benchmark I decided to ramp up the loop iteration count to 1000. In this case, PyPy completed on average in 5.81 seconds and CPython in 5.97 seconds - here PyPy beat CPython, but only by a fraction.
The raw results can be found here.
I can imagine the difference would be a lot bigger (in favor of PyPy) if I bump the iteration count even further, but I was only interested about a real world example and not about some unrealistic (in our case), high number of iterations.
So for our specific case and code, it looks like that using PyPy would not bring us speed improvements.
Update: Alex Gaynor has emailed and asked me which version of PyPy I have used, because he could not replicate the results using the latest nightly build.
He also said that changing the classes to a new style should speed things up, so I have made another set of benchmarks, this time using the latest nightly build (PyPy 1.5.0-alpha0) and I have changed all the parser classes so now they inherit from the base object class.
So yes, when using the latest nightly build and new style classes, PyPy beat CPython for about 0.5 seconds.
It is also nice see to see such a quick response from the PyPy team, so definitely thumbs for them.
Update 2: Here is a table with all the results:
| # of iterations | CPython 2.6.6 (new style classes) | PyPy 1.4.1 (old style classes) | PyPy 1.5.0-alpha0 (new style classes) |
|---|---|---|---|
| 100 | 0.557 seconds | 1.719 seconds | 1.813 seconds |
| 1000 | 5.476 seconds | 5.818 seconds | 5.0134 seconds |
P.S. #1: I forgot to add that I have emailed the author with some questions about Waxeye and he was very kind and responsive and has answered all my questions and even posted some suggestions how to improve our parse - I thank him for that.
P.S #2. If you develop parsers as a hobby or you enjoy developing scalable solutions in Python or JavaScript (NodeJS), you should check out this page.


Rock Paper Scissors Challenge
Rock Paper Scissors
user
comp
0
:
0
ENDLESS GAME OF Rock paper scissors.
Make your move.


--- layout: post title: Solid Waste Routing tip of the week date: 2011-02-06 14:37:24.000000000 -06:00 type: post published: true status: publish categories: - Route Optimization tags: [] meta: _edit_last: '15714693' _wpas_done_twitter: '1' _wpas_skip_fb: '1' author: login: broberts65 email<EMAIL_ADDRESS>display_name: Bob Roberts first_name: '' last_name: '' ---
UPDATE Today was Part 2 of Solid Waste Routing Tip of the Week.
I will soon be posting a solid waste routing tip of the week. These will be ideas or strategies for improving efficiency in solid waste collection. I will also be offering my new paper "Solid Waste Routing" as a download.
Feel free to contact me if you would like more information or to comment on my Route Optimization blog articles.
BR


Brexit Secretary Barclay - EU elites' sympathies lie with a Corbyn government
(Reuters) - Brexit Secretary Stephen Barclay has accused the European Union ‘elites’ of preferring a British government led by current opposition leader Jeremy Corbyn after the upcoming UK elections.
Writing in the Sunday Times newspaper, Barclay said he was ‘dismayed’ by the comments of Donald Tusk in his farewell speech on Wednesday, wherein the outgoing European Council President said that Britain will lose influence in international affairs and become a “second-rate player” after leaving EU.
"This interference in our domestic election campaign shows where the EU elites' real sympathies lie: with a Corbyn government which would renegotiate a deal and then campaign against it in another referendum, propped up by the SNP or the Liberal Democrats who would simply revoke article 50 without letting the British people have a say", Barclay wrote bit.ly/2QtN3An.


Amazon DynamoDB
Offering
highly-scalable NoSQL database
Features
up to a maximum of 32 vCPUs and 244 GiB of RAM
10 GB up to a maximum of 64 TB Volume growing
Low Latency Read Replicas, up to 15 in three AZ
Available
Backup & Recovery
Automatic, Continuous, Incremental Backups and Point-in-time Restore
Security


Remote control car
By the end of this workshop you'll have built your own RC car with a wireless controller! Learn circuitry, programming and how to communicate wirelessly.
Arduino Pong
Ever wanted to build your own game controller? This workshop will take you through building your own retro Pong controller!
Microbit Snake
Build the classic game Snake on a microcontroller! Learn to program in Python no matter your previous experience.


Natural Academy
Home
Math
Science
English
About
Numbers and Operations
Solving Equations with one Unknown
Linear Equations and Functions
System of Equations
Geometry
Date and Modeling


Phasor estimation example
In this example, the current phasor estimation is made with the FCDFT and HCDFT with and without Mimic Filter, and with Modified Cossine Filter. The main goal of this example is to show the DC exponential decay offset effect in the phasor estimators.
Contents
Load file with simulated fault, which contains current and voltage signals.
file = load('SIMULATED_FAULT.dat');
Phase A current -
Ia = file(:,8);
time vector
t = file(:,2);
Anti-Aliasing Filter
To avoid aliasing effect, an analog anti-aliasing filter is used. The analog filter used is the 2º order Butterworth with a 480 Hz cut-off frequency for a 960 Hz sampling frequency.
% % % Filter Data % $f_c$ - cut-off frequency fc = 480; order = 2;
Filter project with normal frequency
[zerosNorm,polesNorm,gainNorm] = buttap(order); [numNorm,denNorm] = zp2tf(zerosNorm,polesNorm,gainNorm);
Readapt filter frequency
[num,den] = lp2lp(numNorm,denNorm,2*pi*fc);
filtered
Ia = lsim(tf(num,den),Ia,t);
Sampling
The sampling frequency chosen is 960 Hz, giving 16 samples per cycle
f - Fundamental frequency in Hz
f = 60;
Angular frequency in rad/s
w = 2*pi*f;
T - Fundamental period in s
T = 1/f;
N - Samples per cycle
N = 16;
- Sampling frequency in Hz
fs = N*f;
discretization step in s
dtd = 1/fs;
- Total samples
Ntotal = length(t);
Step simulation in ms
dt = 10e-6;
Obtaining the step reason dividing the required sampling frequency by the step simulation
p1 = round(dtd/dt);
Discret current
Ia = Ia(1:p1:Ntotal,1);
Discrete time
t = t(1:p1:Ntotal);
Ploting the current
figure1 = figure(1); plot(Ia);
Phasor Estimation
For the phasor estimation, the sampled signal is windowing depending of the phasor estimator. For each window, the phasor estimation is computed along the signal length
FCDFT
Variables initialization
Ntotal = length(Ia);
P_FOURIER = ones(Ntotal,1);
window = ones(N,1)*0.1;
for k=1:Ntotal
Signal windowing
for j=1:N-1 window(j) = window(j+1); end window(N) = Ia(k);
Computing the phasor
P_FOURIER(k)= FCDFT(window);
end
FCDFT with MIMIC filter
Computing the digital mimic filter parameters for a time constant with 1 cycle
cycles = 1; [K,taud] = mimicParameters(cycles);
Applying mimic filter in the signal
Variables initialization
Ntotal = length(Ia);
P_FOURIER_MIMIC = ones(Ntotal,1);
for k=2:Ntotal
Mimic Filter usage
P_FOURIER_MIMIC(k) = K*((1+taud)*P_FOURIER(k) - taud*P_FOURIER(k-1));
end
Ploting signal with FCDFT
figure2 = figure(2); plot(abs(P_FOURIER));
Ploting signal with FCDFT with mimic filter
figure3 = figure(3); plot(abs(P_FOURIER_MIMIC));
HCDFT
Ntotal = length(Ia);
P_HFOURIER = ones(Ntotal,1);
window = ones(N,1)*0.1;
for k=1:Ntotal
Signal windowing
for j=1:N-1 window(j) = window(j+1); end window(N) = Ia(k);
Computing the phasor
P_HFOURIER(k)= HCDFT(window);
end
HCDFT with MIMIC filter
Computing the digital mimic filter parameters for a time constant with 1 cycle
cycles = 1; [K,taud] = mimicParameters(cycles);
Applying mimic filter in the signal
Variables initialization
Ntotal = length(Ia);
P_HFOURIER_MIMIC = ones(Ntotal,1);
for k = 2:Ntotal
Mimic Filter usage
P_HFOURIER_MIMIC(k) = K*((1+taud)*P_HFOURIER(k) - taud*P_HFOURIER(k-1));
end
Ploting signal with HCDFT
figure4 = figure(4); plot(abs(P_HFOURIER));
Ploting signal with HCDFT with digital mimic filter
figure5 = figure(5); plot(abs(P_HFOURIER_MIMIC));
Phasor Estimation using Modified Cossine Filter
Modified Cossine Filter Variables initialization
Ntotal = length(Ia);
P_MDC = ones(Ntotal,1);
window = ones(N+1,1)*0.1;
for k = 1:Ntotal
Signal windowing
for j = 1:N window(j) = window(j+1); end window(N+1) = Ia(k);
Computing the phasor
P_MDC(k) = MDC(window);
end % Ploting the Phasor computed using modified cossine filter figure6 = figure(6); plot(abs(P_MDC)); snapnow;


We use cookies to improve user experience, and analyze website traffic. For these reasons, we may share your site usage data with our analytics partners. By clicking "Accept & Procced" you consent to store on your device all the technologies described in our Cookie Policy.


This page was created to assist those who have food restrictions find something to eat at different restaurants.The map feature was created so that the user can physically see where the different restaurants are located.The facts page gives information on different topics relating to food.The search page is for the user to search a restaurant by name and by food restriction.The info page gives more information about the different food restrictions that we cover.The home page gives different pictures of foods of people have a certain food restriction can eat.


Archbishop Pietru Pace Street,
Victoria,
Gozo
For more information, including setup and configuration of Google Classroom send an email to<EMAIL_ADDRESS>Please click the link above to book an appointment slot, and choose the appropriate date depending on the class the student is assigned to. You are required to sign in on your Gmail Account.


Nameless Spirit:
If we are to destroy them we must get the four goblets from them. You should look for the shadows of Halisha in the deepest part of the Four Sepulchers.
Would you help me gather the four goblets? What do you have to lose? It'll be good for you!
"What's in it for me?"


--- layout: post title: Outstanding Responsive Moodle Themes date: '2019-10-10T01:45:00.001+05:30' author: Sahil Rajput tags: modified_time: '2019-10-10T01:45:18.484+05:30' blogger_id: tag:blogger.com,1999:blog-5250005448924290719.post-6231120328331702271 blogger_orig_url: https://www.jaadujinn.ml/2019/10/outstanding-responsive-moodle-themes.html ---


Bug summary:
search function in SEARCH ITUNES not working properly
Observed Behavior (a description of what happened with the app):
I searched "mis" in SEARCH ITUNES, trying to add a new podcast, but it shows "org.json.JSONException: No value for feedurl".
Expected Behavior (a description of what you expected to happen):
Show the list of podcasts that contains "mis" in their titles.
Steps to Reproduce (the steps to reproduce the problem):
1. click the three lines at the top left corner, click "Add Podcast"
2. click "SEARCH ITUNES"
3. click the magnifyer icon on the top right corner, search "mis" there
Additional information:
Sometimes, the search function works, but sometimes just not. Even when I see there's "The Daily" podcast there, but if I search "daily", it gives me no results.
Attachments:


hcash
2.0.0
hcash
Public Member Functions
|
List of all members
CSemaphore Class Reference
#include <
sync.h
>
Collaboration diagram for CSemaphore:
Public Member Functions
CSemaphore
(int init)
void
wait
()
bool
try_wait
()
void
post
()
Constructor & Destructor Documentation
◆
CSemaphore()
CSemaphore::CSemaphore
(
int
init
)
inline
Member Function Documentation
◆
post()
void CSemaphore::post
(
)
inline
Here is the caller graph for this function:
◆
try_wait()
bool CSemaphore::try_wait
(
)
inline
Here is the caller graph for this function:
◆
wait()
void CSemaphore::wait
(
)
inline
Here is the caller graph for this function:
The documentation for this class was generated from the following file:
F:/hshare_org/Hcash/libraries/include/hshare_wallet/
sync.h
Generated by
1.8.13


<EMAIL_ADDRESS>Donald Ervin Knuth is an American computer scientist, mathematician, and professor emeritus at Stanford University. He is the 1974 recipient of the ACM Turing Award, informally considered the Nobel Prize of computer science. He is the author of the multi-volume work The Art of Computer Programming.
Data structure that stores an ordered collection of items.
Non mutable data structure that stores an ordered collection of items.
Unordered data structure that stores non duplicate elements.
Data structure that stores data in the form of key-value pairs. The keys defined for a dictionary need to be unique and inmutable.
my_list = []
for value in range(number_of_loops):
my_list.append(value)
my_list = [value for value in range(number_of_loops)]
1000000 elements 100 times
| Execution | Good | Bad |
|---|---|---|
| 1 | 4.59093912300159 | 8.143455826000718 |
| 2 | 4.8011583119987336 | 8.315980260998913 |
| 3 | 4.879687515000114 | 8.516897788998904 |
def modulus_validation(value):
return value % 2 == 0
my_list = [value for value in range(number_of_loops)
if modulus_validation(value)]
my_tuple = tuple(value for value in range(number_of_loops))
my_set = {value for value in range(number_of_loops)}
my_dict = {value: value for value in range(number_of_loops)}
def generator():
return [x*2 for x in range(number_of_loops)]
def generator_testing():
for loop_count in generator():
foo = loop_count + 3
def generator():
return (x*2 for x in range(number_of_loops))
def generator_testing():
for loop_count in generator():
foo = loop_count + 3
100000 elements 100 times
| Execution | Good | Bad |
|---|---|---|
| 1 | 0.00007136500062188134 | 0.73487311499775387347 |
| 2 | 0.00006704999395878986 | 0.78135660300176823512 |
| 3 | 0.00006757699884474277 | 0.78059898499486735091 |
100000 elements
| Execution | Good | Bad |
|---|---|---|
| 1 | 14.8 MiB | 17.9 MiB |
| 2 | 15.1 MiB | 17.9 MiB |
| 3 | 15.1 MiB | 17.9 MiB |
def my_generator(start_value):
while True:
yield start_value
start_value += 1
my_list = [value for value in range(number_of_loops)]
number_of_loops - 10 in my_list
my_set = {value for value in range(number_of_loops)}
number_of_loops - 10 in my_set
1000000 elements 100 times
| Execution | Good | Bad |
|---|---|---|
| 1 | 0.00002259300526930019 | 1.35211111600074218586 |
| 2 | 0.00002240200410597026 | 1.32580057100130943581 |
| 3 | 0.00002333900192752481 | 1.33889542100223479792 |
lis = list(ascii_lowercase)
examples = [lis[int(random() * 26)] for _ in itertools.repeat(None, NUMBER_OF_ELEMENTS)]
def string_joiner():
final_string = ''
for c in examples:
final_string += c
def string_joiner():
''.join(examples)
1000000 elements 100 times
| Execution | Good | Bad |
|---|---|---|
| 1 | 0.80223171800025738776 | 7.63557597099861595780 |
| 2 | 0.66454874399641994387 | 7.96551577700302004814 |
| 3 | 0.74826748399937059730 | 8.09755125200172187760 |
def c_style(a, b, c, d):
return "Ms. %s! My %s crawled in my %s and then I %s it. Can I have another one?" % (a, b, c, d)
def format_string(a, b, c, d):
return "Ms. {}! My {} crawled in my {} and then I {} it. Can I have another one?".format(a, b, c, d)
def format_string_position(a, b, c, d):
return "Ms. {0}! My {2} crawled in my {1} and then I {3} it. Can I have another one?".format(a, b, c, d)
def f_string(a, b, c, d):
return f"Ms. {a}! My {b} crawled in my {c} and then I {d} it. Can I have another one?"
1000000 iterations
| Execution | C-style | Format | Format position | F-string |
|---|---|---|---|---|
| 1 | 0.46259 | 0.58916 | 0.63243 | 0.28413 |
| 2 | 0.47330 | 0.59852 | 0.65713 | 0.28615 |
| 3 | 0.48110 | 0.60279 | 0.64672 | 0.28645 |
def intermediate_testing():
for loop_count in range(number_of_loops):
print ('Hi')
print ('How')
print ('Are')
print ('You')
def intermediate_testing():
for loop_count in range(number_of_loops):
print ('Hi how are you')
1000 elements 100 times
| Execution | Good | Bad |
|---|---|---|
| 1 | 0.25645959700341336429 | 1.21774623300007078797 |
| 2 | 0.31354732700128806755 | 1.19317356900137383491 |
| 3 | 0.28303264900023350492 | 1.19775679000304080546 |
def intermediate_no_print_testing():
for loop_count in range(number_of_loops):
foo = 20
foo += 20
foo += 20
foo += 20
def intermediate_no_print_testing():
for loop_count in range(number_of_loops):
foo = 20 + 20 + 20 + 20
1000000 elements
| Execution | Good | Bad |
|---|---|---|
| 1 | 0.00134055600210558623 | 0.00921671200194396079 |
| 2 | 0.00171371600299607962 | 0.01043715400010114536 |
| 3 | 0.00144171599822584540 | 0.00964901599945733324 |
def expensive_function(value):
time.sleep(value / (NUMBER_OF_ELEMENTS * NUMBER_OF_ELEMENTS))
def bad_cache_testing(number_of_loops):
for loop_count in range(number_of_loops):
expensive_function(loop_count % 2)
@lru_cache(maxsize=8)
def cached_expensive_function(value):
time.sleep(value / (NUMBER_OF_ELEMENTS * NUMBER_OF_ELEMENTS))
def good_cache_testing(number_of_loops):
for loop_count in range(number_of_loops):
cached_expensive_function(loop_count % 2)
10000 elements
| Execution | Good | Bad |
|---|---|---|
| 1 | 0.01419296399399172515 | 3.38171269500162452459 |
| 2 | 0.03052311800274765119 | 3.45804396000312408432 |
| 3 | 0.03121864800050389022 | 3.44148204400698887184 |
def non_expensive_function(value):
return value + 1
def bad_cache_testing_non_expensive(number_of_loops):
for loop_count in range(number_of_loops):
non_expensive_function(loop_count % 2)
@lru_cache(maxsize=8)
def cached_non_expensive_function(value):
return value + 1
def good_cache_testing_non_expensive(number_of_loops):
for loop_count in range(number_of_loops):
cached_non_expensive_function(loop_count % 2)
10000 elements 100 times
| Execution | Good | Bad |
|---|---|---|
| 1 | 0.02496753699961118400 | 0.01382279099925654009 |
| 2 | 0.03057814600470010191 | 0.01395637800305848941 |
| 3 | 0.01116664300207048655 | 0.01298988499911502004 |
for i in range(number_of_loops):
pass
for _ in itertools.repeat(None, number_of_loops):
pass
100000 elements 100 times
| Execution | Itertools repeat | Range |
|---|---|---|
| 1 | 0.07015533499361481518 | 0.22255428100470453501 |
| 2 | 0.08758715000294614583 | 0.25886086199898272753 |
| 3 | 0.07864977700228337198 | 0.21787663800932932645 |
class Slots:
__slots__ = ('x', 'y', 'z')
def __init__(self, x, y, z):
self.x, self.y, self.z = x, y, z
class NoSlots:
def __init__(self, x, y, z):
self.x, self.y, self.z = x, y, z
100000 elements
| Execution | Slots | NoSlots |
|---|---|---|
| 1 | 18.52261703599651809782 | 20.02937265099899377674 |
| 2 | 20.30710838698723819107 | 20.14936627399583812803 |
| 3 | 19.39120069799537304789 | 18.79476003900344949216 |
100000 elements
| Execution | Slots | NoSlots |
|---|---|---|
| 1 | 30.3 MiB | 39.6 MiB |
| 2 | 30.1 MiB | 39.6 MiB |
| 3 | 30.1 MiB | 39.6 MiB |


{% extends 'ta_app/base.html' %} {% block content %} {% include 'students/_menu.html' %}
| Job Details |
| {% include 'ta_app/jobs/_modal_job_details.html' with data=app.job %} |
I confirm I am withdrawing from my TA position for this course and terminating this contract.
I have been in contact with the LFS Academic Coordinator regarding this choice.
Please click on the "Confirm" button to terminate this contract.


WOPFE
☰
Test [[${test.name}]]
Name
Type
Questions
No created questions found.
Add answers
Select a type
Options
Text


“Subtracting from your list of priorities is as important as adding to it.”
― Frank Sonnenberg
Create new To-Do List
View all To-Do Lists


|
| Last modified on Sat Jul 22 11:14:10 2023 UTC. | Improve this page |
Doxygen has many, many features, and accepts various syntaxes for its commands.
In the previous versions the recommended syntax was the traditional C++ one, with //
for comments, and \
for escape characters and commands.
However, experience proved that back slashes and triple slashes are more difficult to read; given these subjective reasons, the syntax moved to the original Java documentation style, considered to have a better readability.
/**
Comments instead of ///
Use C style blocks of /** */
instead of C++ ///
lines.
/**
* ...
*/
Note: Uninterrupted sequences of lines refer to the same object. To be sure the commands are not grouped together when this is not required, use separate comment blocks.
@
Commands instead of \
Use @
to prefix commands, instead of \
, which is considered too visually hurtful.
@brief
Explicitly use the @brief
command before the brief description. End the text with a dot. For visibility reasons, add an empty line inside the same comment block.
/**
* @brief Base for all architecture implementation classes.
*/
@details
Explicitly use the @details
command, on a separate line, before the main documentation text.
For class member functions, the details should be placed before the implementation; although allowed by Doxygen, avoid placing details both at the declaration and definitions, since it is difficult to keep them consistent (see below).
/**
* @details
* The @ref trace_streambuf_base class implements an @ref ostream class
* to be used by the @ref trace class.
*/
@brief
with declarations and @details
with definitionsContrary to Java, the C++ sources are usually split between a .h file with declarations and a .cpp file with the method/functions definitions.
Always add the @brief
, @param
and @return
/@retval
commands in the header file before the member declaration, and the detailed part of the documentation before the member definition (be it in .h for inline definitions or in .cpp for regular definitions).
Always use `something` instead of @c
something, or @p
something, or <code>something
</code>.
Use underscores to mark italics texts.
Use asterisks to mark bold texts.
@code
for sequences of source linesWhen including lines of code, surround them by @code
, @endcode
and add the language. For visibility reasons, add empty lines inside the comment block.
/**
* @code{.cpp}
* set_class_name("os::infra::test_suite");
* @endcode
*/
@verbatim
for other pre-formatted linesWhen including other lines, like shell commands, surround them by @verbatim
, @endverbatim
:
/**
* @verbatim
* /bin/bash micro-os-plus-se.git/scripts/runTests.sh
* @endverbatim
*/
Use *
to enter bulleted lists, and #
to enter numbered lists.
For multiple levels use additional indentations.
* first level 1
* first level 2
* second level 2
* second level 1
Use the below syntax to enter tables. Columns can be left/right aligned.
| Right | Center | Left |
| ----: | :----: | :---- |
| 10 | 10 | 10 |
| 1000 | 1000 | 1000 |
Links to other pages can be expressed with the following markup:
[The link text](http://example.net/)
@tparam
for template parametersUse @tparam
for template parameters. Start the explanation with upper case and end it with dot.
/**
* @tparam T Type of the implementation class.
*/
@param
for function parametersUse @param [in]
for usual input parameters, and occasionally [out]
for output parameters. Start the explanation with upper case and end the line with a dot.
To make the explanation more readable, use tabs to right align the content.
/**
* @param [in] c An additional character to consume.
*/
If the function has no parameters, use a custom paragraph containing None., indented with a tab and terminated with a dot.
/**
* @par Parameters
* None.
*/
@return
or @retval
for the returned resultIf the function returns discrete values, enumerate them with @retval
and terminate the list with an empty line.
/**
* @retval -1 Error
* @retval 0 OK
*/
If the function returns a scalar value, use a @return
and explain what the value represents.
/**
* @return The number of bytes actually written.
*/
If the function has no return value, use a custom paragraph containing Nothing., indented with a tab and terminated with a dot.
/**
* @par Returns
* Nothing.
*/
@headerfile
to define the header full pathFor each class, structure, enum or other object definition, use @headerfile
to specify the full header path.
/**
* @headerfile CoreInterruptNumbers.h "hal/architecture/arm/cortexm/include/CoreInterruptNumbers.h"
* @brief ARM Cortex-M architecture interrupt numbers base
*
* @details
* Interrupt numbers defined by the Cortex-M0 light architecture.
*/
class cortex_m0_interrupt_number ...
The first name should be present in the filesystem, so it might need some prefixing. The second name is passed to the output.
The comment block should be continuous to the object comments, otherwise the header file definition is not attached to the object.
@name
to define custom member groupingFor a better look, it is recommended to group class definitions based on their logic, instead of the default class visibility grouping.
Groups have names and descriptions (be sure the comments are continuous up to the @{
opening brace).
It is recommended to repeat the name in the closing @}
brace, as seen below.
For readability, use an empty line after opening braces and before closing braces.
Note: In the current version, @nosubgrouping
is not working as expected, so it is to be avoided.
Note: Groups do not nest.
/**
* @name Standard template types
*
* These types permit a standardised way of
* referring to names of (or names dependent on) the template
* parameters, which are specific to the implementation. Except
* when referring to the template, (in which case the templates
* parameters are required), use these types everywhere
* else instead of usual types.
* @{
*/
typedef T implementation_t;
/**
* @}
*/
/**
* @name Constructors/destructor
* @{
*/
/**
* @brief Base constructor.
* @param [in] implementation Reference to the implementation class.
*/
trace_streambuf_base(implementation_t& implementation);
/**
* @brief Base destructor.
*/
virtual
~trace_streambuf_base();
/**
* @}
*/
/**
* @headerfile trace.h "portable/diagnostics/include/trace.h"
* @ingroup diag
*
* @brief Trace light base class.
* @tparam T Type of the implementation class.
*
* @details
* This class provides no functionality, it is used only as a
* light alternative to trace_ostream_base.
*/
template<class T>
class trace_light_base
{
...
};
@ingroup
To include a definition in one or more modules, use @ingroup
.
/**
* @brief Stack size type.
* @ingroup core_thread
*/
If multiple definition are from the same group, they can be grouped with @{
… @}
:
/**
* @ingroup core_thread
* @{
*/
<- mandatory different blocks
/**
* @brief Stack element type.
*/
typedef hal::arch::stack_element_t element_t;
/**
* @brief Stack size type.
*/
typedef hal::arch::stack_size_t size_t;
/**
* @}
*/
Please note the mandatory empty lines after @{
and before @}
.
Also please note that when using together with @name
, @ingroup
with must be inside @name
.
@name
This command allows to define the name of the section within a page. Usually it is used with @{
… @}
:
/**
* @name Constructors & Destructor
* @{
*/
<- mandatory different blocks
/**
* @brief Constructor.
*/
main_thread(void);
/**
* @brief Destructor.
*/
~main_thread();
/**
* @}
*/
Recommended sections name are:
@name Types & Constants
@name Constructors & Destructor
@name Operators
@name Public Member Functions
@name Public Static Member Functions
@name Private Member variables
Use plural.
@brief Type of variables holding mutex recursion counters.
@brief
and @details
For headers which define @details
too, add an extra line.
@brief Type of variables holding scheduler state codes.
@details
Usually a boolean telling if the scheduler is ...


I think of SSH Remote Port Forwarding as an "I, as the attacker, need you to give this to me".
Open a port on me and give me your service through our connection to my new port


Track and Field data
Load the trackfieldrecords.rdata
file with the objects runMen
and runWomen
containing national records (a few years ago…) for several track and field events like 100m, 200m and so on up to marathon.
- Explore the data for both men and women using the
pairs()
- plotting function (you must exclude the Nation variable since this is non-numeric). Which events appear to be most correlated with each other? Check by using thecor()
- function.

For dataset: runWomen
pairs(runWomen[,-8], cex = 0.7)
cor(runWomen[,-8])
M100 M200 M400 M800 M1500 M3000 M42K
M100 1.000 0.947 0.808 0.693 0.704 0.724 0.683
M200 0.947 1.000 0.836 0.690 0.671 0.690 0.682
M400 0.808 0.836 1.000 0.887 0.771 0.767 0.710
M800 0.693 0.690 0.887 1.000 0.894 0.856 0.782
M1500 0.704 0.671 0.771 0.894 1.000 0.968 0.879
M3000 0.724 0.690 0.767 0.856 0.968 1.000 0.899
M42K 0.683 0.682 0.710 0.782 0.879 0.899 1.000
Womens running 3000m and 1500m have highest correlation (0.968)
- Run the following command and inspect the results:
cor(runWomen[,-8], runMen[,-9])
If you were going to “predict” a nation’s record for women’s M3000, which record among men would you use (rows in the table are women variables, columns are men)?
cor(runWomen[,-8], runMen[,-9])
M100 M200 M400 M800 M1500 M5000 M10K M42K
M100 0.650 0.760 0.777 0.804 0.784 0.718 0.713 0.651
M200 0.716 0.799 0.811 0.817 0.766 0.703 0.703 0.621
M400 0.645 0.715 0.792 0.778 0.770 0.738 0.731 0.691
M800 0.595 0.697 0.740 0.785 0.834 0.817 0.820 0.785
M1500 0.517 0.636 0.676 0.848 0.876 0.858 0.868 0.822
M3000 0.571 0.681 0.684 0.856 0.882 0.865 0.864 0.814
M42K 0.612 0.701 0.647 0.811 0.830 0.803 0.817 0.762
Men’s M1500 shows the highest correlation to women’s M3000 and appears to be the best indicator, but in order to really check this we should run a regression analysis with cross-validation to see which predicts best.
- Run a PCA (with scale=FALSE) on the men’s data and print out a summary and the weights (loadings) for the two first PC’s. How many components is needed to explain at least 99% of the variation in the data? Try to give an interpretation of PC1, and explain why so few components explains so much of the total variability.
pr <- prcomp(runMen[,1:8], scale = FALSE)
summary(pr)
Importance of components:
PC1 PC2 PC3 PC4 PC5 PC6
Standard deviation 9.571 0.64469 0.16890 0.05837 0.02504 0.0117
Proportion of Variance 0.995 0.00451 0.00031 0.00004 0.00001 0.0000
Cumulative Proportion 0.995 0.99964 0.99995 0.99999 1.00000 1.0000
PC7 PC8
Standard deviation 0.00553 0.00191
Proportion of Variance 0.00000 0.00000
Cumulative Proportion 1.00000 1.00000
pr
Standard deviations (1, .., p=8):
[1] 9.57139 0.64469 0.16890 0.05837 0.02504 0.01174 0.00553 0.00191
Rotation (n x k) = (8 x 8):
PC1 PC2 PC3 PC4 PC5 PC6 PC7
M100 0.000311 0.00379 -0.000446 0.03426 0.0692868 0.185797 -0.387429
M200 0.000656 0.00660 -0.004506 0.06800 0.0994247 0.274399 -0.850073
M400 0.001759 0.01308 -0.005035 0.13044 0.2647439 0.885091 0.355339
M800 0.005393 0.03175 -0.020469 0.38876 0.8602795 -0.326436 0.027660
M1500 0.014222 0.08536 -0.050540 0.90239 -0.4184781 -0.015186 0.015555
M5000 0.078990 0.37121 -0.921125 -0.08648 0.0031867 0.000642 0.000858
M10K 0.180437 0.90259 0.385347 -0.06522 0.0031326 -0.002815 -0.000183
M42K 0.980290 -0.19749 0.004152 0.00345 -0.0000589 0.000652 -0.000359
PC8
M100 0.8996602
M200 -0.4330211
M400 -0.0551806
M800 -0.0018789
M1500 0.0073064
M5000 0.0012362
M10K -0.0009295
M42K 0.0000788
Only one component is needed to explain more than 99% of the variation. From the loadings we see that the loading weight for M42K (Marathon) is totally dominating with a weight of 0.98. All other weights are small. PC1 is therefore more or less indentical to the Marathon variable.
PC1 is located in the direction of larget variability, and due to the large scale of marathon times, this variable totally dominates the PCA. In such cases it may be better to use standardized variables (which is equivalent to running the Eigenvalue decomposition on the correlation matrix instead of the covariance matrix of the variables).
- Re-run the PCA with option
scale=TRUE
inprcomp()
. How many variables are needed to explain 99% of the variation in this case? How much is explained by the two first components? How would you interprete the loadings of PC1, PC2 and PC3?
pr <- prcomp(runMen[,1:8], scale = TRUE)
summary(pr)
Importance of components:
PC1 PC2 PC3 PC4 PC5 PC6 PC7
Standard deviation 2.563 0.953 0.4076 0.3615 0.2859 0.26585 0.21933
Proportion of Variance 0.821 0.114 0.0208 0.0163 0.0102 0.00883 0.00601
Cumulative Proportion 0.821 0.935 0.9557 0.9720 0.9822 0.99106 0.99707
PC8
Standard deviation 0.15305
Proportion of Variance 0.00293
Cumulative Proportion 1.00000
pr
Standard deviations (1, .., p=8):
[1] 2.563 0.953 0.408 0.361 0.286 0.266 0.219 0.153
Rotation (n x k) = (8 x 8):
PC1 PC2 PC3 PC4 PC5 PC6 PC7 PC8
M100 0.315 0.5716 0.322 -0.1783 0.269 -0.5781 0.1425 -0.10781
M200 0.336 0.4638 0.372 0.2485 -0.158 0.6498 -0.1218 0.09974
M400 0.356 0.2439 -0.615 -0.5946 -0.236 0.1619 -0.0119 0.00229
M800 0.369 0.0142 -0.496 0.5214 0.541 -0.0318 -0.2233 0.03623
M1500 0.374 -0.1404 -0.105 0.4103 -0.494 -0.1747 0.6048 -0.14352
M5000 0.365 -0.3129 0.194 -0.0463 -0.237 -0.1448 -0.5974 -0.54333
M10K 0.367 -0.3071 0.180 -0.0985 -0.120 -0.2202 -0.1728 0.79734
M42K 0.343 -0.4319 0.228 -0.3176 0.489 0.3413 0.4028 -0.15986
Now we need 6 components to achieve 99% explained variance. Two components explain about 93.5% of the total variance. The loadings for PC1 are almost identical for all variables, hence PC1 is close to identical to the average run record across all distances for each country. PC2 has weights ranging from highly negative for marathon to highly positive for M100. This PC therefore contrasts short versus long runs. PC3 is a component that contrasts medium long distances (400, 800 and 1500 m) and either short or long distances. This component appears to extract information about how these distances differ from both sprint and endurance distances.
Make a biplot with the first two components. You may use the argument “xlabs” in biplot to indicate that “Nations” should be used to label the scores from each country. Give comments to how the nations cluster relative to the loadings.
biplot(pr, xlabs = runMen$Nation, cex = 0.7)
On the first axis (PC1) we observe that Cook’s Islands and West Samoa have the largest weights, and they therefore have on average poor (long time) national records for all distance. At the other end we find USA and others with on average good national records. Along PC2 (vertically) we find those with relatively poor times on long distances, but relatively good times on short, at the bottom (Dom. Repub, Bermuda, Singapore, Malaysia, Thailand and West Samoa) whereas at the top we find countries with poor records on short distances compared to their long distance records (Costa Rica, North-Korea, Cook’s Island and others).
- Let’s try to predict the 3000M national records for women using the men’s data. First use a least squares approach using the men’s variables directly as predictor for women’s M3000. To accomplish this use
runWomen$M3000
as response inlm()
. Are there any significant variables? What is the \(R^2\) and the adjusted \(R^2\) values?
lmmod <- lm(runWomen$M3000 ~ M100 + M200 + M400 + M800 + M1500 +
M5000 + M10K + M42K, data = runMen)
(lm_sumry <- summary(lmmod))
Call:
lm(formula = runWomen$M3000 ~ M100 + M200 + M400 + M800 + M1500 +
M5000 + M10K + M42K, data = runMen)
Residuals:
Min 1Q Median 3Q Max
-0.7333 -0.2060 -0.0537 0.2496 0.7184
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -6.09205 1.98465 -3.07 0.0037 **
M100 -23.17895 23.87260 -0.97 0.3370
M200 18.93566 13.76942 1.38 0.1762
M400 -11.69187 5.19182 -2.25 0.0295 *
M800 6.06528 2.25105 2.69 0.0100 *
M1500 1.70738 1.16573 1.46 0.1503
M5000 0.20068 0.28632 0.70 0.4871
M10K 0.08099 0.14783 0.55 0.5866
M42K -0.00202 0.01715 -0.12 0.9070
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
s: 0.357 on 43 degrees of freedom
Multiple R-squared: 0.84,
Adjusted R-squared: 0.81
F-statistic: 28.2 on 8 and 43 DF, p-value: 1e-14
lm_sumry[c("r.squared", "adj.r.squared")]
$r.squared
[1] 0.84
$adj.r.squared
[1] 0.81
Two variables are significant at 5% level in this fitted model, M800 and M400. The \(R^2\)-values indicate more than 80% explained variance. There is a slight difference between the adjusted and the non-adjusted \(R^2\) indicating that there may be too many variables included in the model.
- Either perform a manual elimination of insignificant variables, or run
backward()
from the mixlm-package to find a reduced model with only significant effects (5% testlevel). Which variables do you end up having in your model?
red.mod <- backward(lmmod, alpha = 0.05)
Backward elimination, alpha-to-remove: 0.05
Full model: runWomen$M3000 ~ M100 + M200 + M400 + M800 + M1500 + M5000 +
M10K + M42K
<environment: 0x7fac34092650>
Step RSS AIC R2pred Cp F value Pr(>F)
M42K 1 5.49 -101 0.644 7.01 0.01 0.907
M10K 2 5.53 -102 0.687 5.32 0.32 0.576
M100 3 5.64 -104 0.730 4.15 0.86 0.359
M200 4 5.75 -104 0.746 3.03 0.92 0.343
M5000 5 6.20 -103 0.755 4.55 3.67 0.061 .
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
summary(red.mod)
Call:
lm(formula = runWomen$M3000 ~ M400 + M800 + M1500, data = runMen)
Residuals:
Min 1Q Median 3Q Max
-0.6139 -0.2798 -0.0541 0.2591 0.7221
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -6.930 1.687 -4.11 0.00015 ***
M400 -11.241 4.286 -2.62 0.01166 *
M800 6.661 2.211 3.01 0.00412 **
M1500 3.556 0.806 4.41 0.000058 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
s: 0.359 on 48 degrees of freedom
Multiple R-squared: 0.819,
Adjusted R-squared: 0.808
F-statistic: 72.6 on 3 and 48 DF, p-value: <2e-16
In addition to M400 and M800 I find M1500 to be highly significant after removing other variables. This “covered” effect from the full model was because of the inflated variances due to multicollinear variables in the full model.
- Fit another model using all principal component scores from the men’s data as predictors for women’s M3000. The scores are stored in the principal component object as element names
x
. Which components are significant at a 5% test level? Compare the \(R^2\) values with those from the full model using all original variables as predictors.
#You need to transform the scores into a data.frame first
PCdata <- as.data.frame(pr$x)
pcrmod <- lm(runWomen$M3000 ~ PC1 + PC2 + PC3 + PC4 + PC5 +
PC6 + PC7 + PC8, data = PCdata)
summary(pcrmod)
Call:
lm(formula = runWomen$M3000 ~ PC1 + PC2 + PC3 + PC4 + PC5 + PC6 +
PC7 + PC8, data = PCdata)
Residuals:
Min 1Q Median 3Q Max
-0.7333 -0.2060 -0.0537 0.2496 0.7184
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 9.49673 0.04956 191.61 < 2e-16 ***
PC1 0.27603 0.01952 14.14 < 2e-16 ***
PC2 -0.17201 0.05249 -3.28 0.00208 **
PC3 0.03614 0.12279 0.29 0.76990
PC4 0.53593 0.13844 3.87 0.00036 ***
PC5 0.00982 0.17503 0.06 0.95551
PC6 0.04261 0.18825 0.23 0.82201
PC7 -0.09547 0.22818 -0.42 0.67772
PC8 0.04242 0.32698 0.13 0.89737
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
s: 0.357 on 43 degrees of freedom
Multiple R-squared: 0.84,
Adjusted R-squared: 0.81
F-statistic: 28.2 on 8 and 43 DF, p-value: 1e-14
Components 1,2 and 4 are highly significant, the others not. The \(R^2\) values are identical to the full model on the orginal variables since we use all available components. The information content in PC1-PC8 is therefore the same as in the eight original variables.
- Perfom a model reduction also for the PCR-model by excluding Principal components until you have only PC’s significant at 5% test level. Compare the estimated regression coefficients between the full and the reduced PCR-models. Why do you think the effects don’t change for the variables retained in the model?
pcr.red.mod <- backward(pcrmod, alpha = 0.05)
Backward elimination, alpha-to-remove: 0.05
Full model: runWomen$M3000 ~ PC1 + PC2 + PC3 + PC4 + PC5 + PC6 + PC7 + PC8
<environment: 0x7fac4d0228c8>
Step RSS AIC R2pred Cp F value Pr(>F)
PC5 1 5.49 -101 0.632 7.003 0.00 0.96
PC8 2 5.50 -103 0.683 5.020 0.02 0.90
PC6 3 5.50 -105 0.733 3.071 0.05 0.82
PC3 4 5.51 -107 0.749 1.158 0.09 0.76
PC7 5 5.54 -108 0.763 -0.667 0.19 0.66
summary(pcr.red.mod)
Call:
lm(formula = runWomen$M3000 ~ PC1 + PC2 + PC4, data = PCdata)
Residuals:
Min 1Q Median 3Q Max
-0.7232 -0.2207 -0.0461 0.2415 0.6907
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 9.4967 0.0471 201.67 < 2e-16 ***
PC1 0.2760 0.0186 14.88 < 2e-16 ***
PC2 -0.1720 0.0499 -3.45 0.00118 **
PC4 0.5359 0.1315 4.07 0.00017 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
s: 0.34 on 48 degrees of freedom
Multiple R-squared: 0.839,
Adjusted R-squared: 0.829
F-statistic: 83.3 on 3 and 48 DF, p-value: <2e-16
The reduced model has only PC1, PC2 and PC4 as predictors, and the \(R^2\) is almost as high as for the full model. The estimated effects are identical due to the fact that the PC’s are orthogonal to each other and explain independent variability.
- For special interested: Use the estimated effects (alphas from the lecture) from the reduced PCR-model to compute PCR-estimated regression coefficients (betas in the lecture) for the original variables back back-rotation. Compare the estimated regression coefficients from the PCR-approach with Least squares estimates using original (BUT SCALED) variables.
#PCR-estimated betas using components 1,2 and 4. The %*% operator is the inner-product
#multiplier in R
PCRest <- pr$rotation[,c(1,2,4)] %*% (coef(pcr.red.mod)[-1])
#Scaling the original variables and re-running the least squares model:
runMen.scaled <- as.data.frame(scale(runMen[,-9]))
lmmod2 <- lm(runWomen$M3000 ~ M100 + M200 + M400 + M800 + M1500 +
M5000 + M10K + M42K, data = runMen.scaled)
#Estimates without intercept.
Estimates <- cbind(coef(lmmod2)[-1],PCRest)
colnames(Estimates) <- c("Least Squares", "PCR")
Estimates
Least Squares PCR
M100 -0.1355 -0.10698
M200 0.2015 0.14607
M400 -0.2789 -0.26247
M800 0.3879 0.37900
M1500 0.2673 0.34725
M5000 0.1622 0.12968
M10K 0.1477 0.10142
M42K -0.0189 -0.00125
For most of the variables the PCR-estimates are closer to zero (shrinkage effect) which induces a bias, but as lectured, the PCR-model may have smaller variance for the estimates due to avoidance of the multicollinearity problem. It seems like PCR has down-weighted the short and long distances compared to the Least Squares approach, which seems reasonable.