Giter Site home page Giter Site logo

sqsmetricformatter's Introduction

SQSMetricFormatter

SQSMetricFormatter is an NSNumberFormatter subclass that is capable of parsing and displaying numbers in units (of the user's choice) that can include standard SI/metric prefixes. In addition to the subclass (and supporting code such as categories), the repo includes unit tests and a trivial OS X demo application.

Requirements

The SQSMetricFormatter code aims to be cross-platform (i.e. OS X and iOS), linking against Foundation.framework. Only the "modern" (10.4+) NSNumberFormatter behavior is supported. While the code has no inherent dependency on a particular development environment, the Xcode project encapsulating the code expects Xcode 4 or newer.

License

SQSMetricFormatter and accompanying code is Copyright (C) 2011-2012 by Synthetiq Solutions LLC and is made available under the standard 3-clause BSD license. Please see the license text at the top of any header file for full details.

If you wish to use this code but are unable to comply with the BSD license requirements (including but not limited to attribution), proprietary licenses with or without technical support are available. Please contact [email protected] for more information.

Usage

While SQSMetricFormatter.h/.m (and its supporting NSDecimalNumber category) can be added directly to a project, it is more maintainable to add the whole SQSMetricFormatter project to a shared workspace.

Standard project dependency considerations apply: since a category is contained herein, it is necessary to add -ObjC to the client target's linker flags. If a shared workspace is used, setting the user header search path to ${BUILT_PRODUCTS_DIR} will let Xcode see public headers.

To see how to configure the formatter, see the headers and the practical demonstration of class properties in the demo application, all implemented as User Defined Runtime Attributes in Interface Builder.

Contributing

If you would like to contribute, please fork the repository, commit your changes, and submit a pull request. Your pull request will get quicker attention if:

  • Each commit is limited in scoped and logged with appropriate comments.
  • Your pull request itself is well documented.

If you add a feature please also add one or more supporting unit tests. Also please run the unit test suite before submitting a pull requests; pull requests that fail unit testing will be rejected.

Finally, and this goes without saying, please make sure that, if applicable, you have permission from your employer or client to contribute work you have done for hire.

sqsmetricformatter's People

Contributors

shultzc avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.