text
stringlengths
454
608k
url
stringlengths
17
896
dump
stringclasses
91 values
source
stringclasses
1 value
word_count
int64
101
114k
flesch_reading_ease
float64
50
104
? Check status of user def is_admin? self.username end This method is going to return the username, which is probably set to something, and that means true when you ask this way. You probably meant to check if the admin attribute on that user model...? In the following code - require 'active_record' class Order < ActiveRecord::Base end order = Order.find(1) ... As per find() is an instance public method. So why can we call Order.find(1) here? Shouldn't it be Order.new.find(1)? I have added few libraries in my application and I have tested it in my local machine and they are working. But when I host it on my server and set the env to productions those libraries are not loading or the effects are appearing on my page. have a project model which I'd like to set the default_scope to filter out projects where the user doesn't have permission to view them. Think something along the lines of the projects having a list of teams and companies that the user must be in to access the data. default_scope seems to work well if I hard code it as I really don't want a dev to accidentally not have these permissions filters in use. The lists of teams and companies a user is in is stored in the session. Forgot Your Password? 2018 © Queryhome
https://www.queryhome.com/tech/115040/having-trouble-with-boolean-method-in-rails
CC-MAIN-2019-39
refinedweb
231
72.56
My work uses FreeBuilder extensively to generate the Builder pattern for Java classes. In addition to this, we use the generated Builder classes to deserialize the data calsses using Jackson. After a while it became tiresome to type @FreeBuilder and class Builder extends ... everywhere. So I decided to write and IntelliJ IDEA plugin that does it for me. These are the things I wanted the plugin to do for me: - Annotate the public class from the current file with @FreeBuilderannotation. - Create an inner class for the annotated class - this should be a staticclass if the annotated class is an abstractclass and a child class if the annotated class is an interface. - Ensure that the generated Builderclass is annotated with @JsonIgnoreProperties(ignoreUnknown=true)because this is a convention we like to follow. - Ensure that the parent class gets annotated with @JsonDeserialize(builder=...)annotation. - Rebuild the project so that the annotation processing for FreeBuilder runs. After poking around the IntelliJ Plugin development documentation, I was able to write a simple enough plugin that does it. For whatever reason, trying to find how to achieve simple things like how to create a new class that you can add as a child to an existing class was painful. The plugin is available here from the IntelliJ plugin repository and the source code is here on GitHub. In addition to the above mentioned features, I wanted to make sure that the annotations gets added only if the annoattion classes were in the classpath of the current module. The plugin also displayes messages when it decides to skip a step because an annotation class was not in the classpath or because nnotations already exist on the class. A short demo of the plugin in action is shown below.
https://sdqali.in/blog/2018/05/05/freebuilder-plugin-for-intellij/
CC-MAIN-2019-30
refinedweb
292
52.09
We have compiled most frequently asked .NET Interview Questions which will help you with different expertise levels. .NET Interview Questions on XML Note: In this chapter, we will first just skim through basic XML interview questions so that you do not get stuck up with simple questions. Question 1. What is XML? (B)What is XML? Answer: XML (Extensible Markup Language) is all about describing data. Below is a XML, which describes invoice data. <?xml version="1.0 " encoding=''ISO-8859-1" ?> <invoice> <productname>Shoes</productname> <qty>12 </qty> <totalcost>100</totalcost> <discount>10</discount> </invoice> An XML tag is not something predefined but it is something you have to define according to your needs. For instance, in the above example of the invoice, all tags are defined according to business needs. The XML document is self-explanatory; anyone can easily understand looking at the XML data what exactly it means. Question 2. What is the version information in XML? Answer: “Version” tag shows which version of XML is used. Question 3. What is the ROOT element in XML? (B)What is the ROOT element in XML? Answer: In our XML sample given previously,<invoice></invoice> tag is the root element. Root element is the top most elements for a XML. Question 4. If XML does not have a closing tag will it work? Answer: No, every tag in XML, which is opened, should have a closing tag. For instance, at the top, if I remove the </discount> tag that XML will not be understood by a lot of applications. Question 5. Is XML case-sensitive? Answer: Yes, they are case-sensitive. Question 6. What is the difference between XML and HTML? Answer: XML describes data while HTML describes how the data should be displayed. Therefore, HTML is about displaying information while XML is about describing information. Question 7. Is XML meant to replace HTML? Answer: No, they both go together one is for describing data while the other is for displaying data. Question 8. Can you explain why your project needed XML? Answer: that want to exchange information. However, because they work in two completely opposite technologies it is difficult to do it technically. For instance, one application is made in Java and the other in. NET. However, both languages understand XML so one of the applications will spit XML file, which will be consumed and parsed by other applications You can give a scenario of two applications, which are working separately, and how you chose XML as the data transport medium. Question 9. What is DTD (Document Type Definition)? Answer: It defines how your XML should structure. For instance, in the above XML, we want to make it compulsory to provide “qty” and “total cost”, also that these two elements can only contain numeric. Therefore, you can define the DTD document and use that DTD document within that XML. Question 10. What is well-formed XML? Answer: If an XML document is confirming to XML rules (all tags started are closed, there is a root element, etc) then it is a well-formed XML. Question 11. What is a valid XML? Answer: If XML is confirming DTD rules then it is a valid XML. Question 12. What is the CDATA section in XML? Answer: All data is normally parsed in XML but if you want to exclude some elements, you will need to put those elements in CDATA. Question 13. What is XSL? Answer: XSL (extensible Style Sheet) Language is used to transform XML documents into some other document. Therefore, its transformation document can convert XML to some other document. For instance, you can apply XSL to XML and convert it to HTML documents or probably CSV (Comma Separated Value) files. Question 14. What is element and attributes in XML? Answer: In the below example invoice is the element and the in number the attribute. <invoice in number=1002x/invoice> Question 15. Which are the namespaces in .NET used for XML? Answer: “System.xml.dll” is the actual physical file, which has all XML implementation. Below are the commonly used namespaces: - System.Xml - System.Xml.Schema - System.Xml, XPath - System.Xml.Xsl Question 16. What are the standard ways of parsing XML documents? Answer: XML parser sits in between the XML document and the application that want to use the XML document. Parser exposes a set of well-defined interfaces, which can be used by the application for adding, modifying, and deleting the XML document contents. Now whatever interfaces XML parser exposes should be standard or else that would lead to different vendors preparing their own custom way of interacting with XML documents. There are two standard specifications, which are very common and should be followed by an XML parser: DOM (Document Object Model) DOM Is a W3C (World Wide Web Consortium) recommended way for creating XML documents. In DOM, we load the entire XML document into memory and allows us to manipulate the structure and data of the XML document. SAX: Simple API for XML SAX is an event-driven way for processing XML documents. In DOM, we load the whole XML document into memory and then the application manipulates the XML document (See Figure 18.1). However, quite resource-intensive. SAX parsers parse the XML document sequentially and emit events like start and end of the document, elements, text content, etc. Therefore, applications that are interested in processing these events can register implementations of callback interfaces. SAX parser then only sends those event messages, which the application has demanded. Figure 18.2 is a pictorial representation of how the DOM parser works. Application queries the DOM Parser for the “quantity” field. DOM parser loads the complete XML file into memory. DOM parser then picks up the “quantity” tag from the memory-loaded XML file and returns back to the application. SAX parser does not load the whole DOM into memory but has an event-based approach. SAX parser while parsing the XML file emits events. For example, in Figure 18.3, its has emitted Invoice tag start event, Amount Tag event, Quantity tag event, and Invoice end tag event. However, our application software is only interested in quantity value. Therefore, the events is suppressed. For instance in Figure 18.3 only quantity tag event is sent to the application software and the rest of the events are suppressed Question 17. In what scenarios will you use a DOM parser and SAX parser? Answer: - if you do not need all the data from the XML file then the SAX approach is much preferred to DOM as DOM can be quite memory intensive. In short, if you need a large portion of the XML document it’s better to have DOM. - With the SAX parser, you have to write more code than DOM. - If you want to write the XML into a file, DOM is the efficient way to do it. - Sometimes you only need to validate the XML structure and do not want to retrieve any Data for those instances SAX is the right approach. Question 18. How was XML handled during COM times? Answer: During COM, it was done by using MSXML (Microsoft extensible Markup Language). Question 19. What is the main difference between MSML and .NET Framework XML classes? Answer: MSXML supports XMLDOM and SAX parsers while .NET framework XML classes support XML DOM and XML readers and writers. MSXML supports asynchronous loading and validation while parsing. For instance, you can send synchronous and asynchronous calls to a remote URL. However, as such, there is no direct support „ of synchronous and asynchronous calls in .NET framework XML. However, it can be achieved by using “System.Net” namespaces. Question 20. What are the core functionalities in the XML .NET framework? Can you explain in detail those functionalities? Answer: The XML API for the .NET Framework comprises the following set of functionalities: XML readers: With XML readers, the client application gets a reference to instances provide a in-memory representation for the data in an XMLDOM structure as defined by W3C. It also supports browsing and editing of the document. Therefore, it gives you a complete memory tree structure representation of your XML document. Question 21. What is XSLT? Answer: XSLT (extensible Stylesheet Language Transformations) is a rule-based language used to transform XML documents into other file formats. XSLT is nothing but generic transformation rules, which can be applied to transform XML documents to HTML, CS, Rich text, etc. You can see in Figure 18.4 how the XSLT processor takes the XML file and applies the XSLT transformation to produce a different document. Question 22. Define XPath? Answer: It is an XML query language to select specific parts of an XML document. Using XPath, you can address or filter elements and text in an XML document. For instance, a simple XPath expression like “Invoice/ Amount” states find “Amount” node that is Chilean of “Invoice” nodes. Question 23. What is the concept of XPointer? Answer: XPointer is used to locate data within XML document. XPointer can point to a particular portion of a XML document, for instance address.xmlttxpointer (/descendant: : streetnumber[@id=9]) So the above XPointer points street number=9 in “address .xml”. Question 24. What is an XMLReader Class? Answer: It is an abstract class available from the System.XML namespace. XML reader works on a read-only stream browsing from one node to other in a forward direction. It maintains only a pointer to the current node but has no idea of the previous and the next node. You cannot modify the XML document, you can only move forward. Question 25. What is XMLTextReader? Answer: The “XmlTextReader” class helps to provide fast access to streams of XML data in a forward-only and read-only manner. It also checks if the XML is well-formed. However, XMLTextReader does not validate against a schema or DTD (Document Type Definition) for that you will need “XmlNodeReader” or “XmlValidatingReader” class. The instance of “XmlTextReader” can be created in a number of ways. For example, if you want to load the or/ect is you use the “value” property. As shown in the above code “data” gets the value from the XML using “reader . Value”. Question 26. How do we access attributes using “XmlReader”? Answer: The below snippets shows the way to access attributes. First in order to check whether there any attributes present in the current node you can use the ( ); Question 27. Explain simple Walkthrough of XmlReader. Answer: In this section, we will do a simple walkthrough of how to use the “XmlReader” class. Sample for the same is available in both languages (C# and VB.NET) which you can find in “WindowsApplicationXMLVBNET” and “WindowsApplicationCSharp” folders. The task is to load the “TestingXML.XML” file and display its data in a message box. You can find the “TestingXML.XML” file in “BIN” directory of both folders. Figure 18.5 shows are the display of the “TestingXML.XML” file and its content. Both the projects have the command button “CmdLoadXML” which has the logic to load the XML file and display the data in the message box (See Figure 18.6). I have pasted only the “CmdLoadXML” command button logic for simplicity. Following are the basic steps done: - Declared the “XMLTextReader” object and gave the XML filename to load the XML data. - Read the “XMLTextReader” object until it has data and concatenate the data in a temporary string. - Finally, display the same in a message box. It holds true for the C# code as shown in Figure 18.7. Figure 18.8 shows the output. Question 28. What does XmlValidatingReader class do? Answer: XmlTextReader class does not validate the contents of an XML source against a schema. The correctness of XML documents can be measured by two things is the document is well-formed and is valid. Well-formed means that the overall syntax is correct. Validation is much deeper which means is the XML document is proper with respect to the schema defined. Therefore, the XmlTextReader only checks if the syntax is correct but does not do validation. There is where XmlValidatingReader class comes into the picture. Therefore, this again comes at a price as XmlValidatingReader has to check for DTD and Schema’s that is the reason they are slower compared to XmlTextReader.
https://btechgeeks.com/xml-interview-questions-in-dot-net/
CC-MAIN-2021-43
refinedweb
2,059
66.74
The Flask Mega-Tutorial, Part IV: Database This is the fourth (this article) - created our login form, complete with submission and validation. In this article we are going to create our database and set it up so that we can record our users in it. To follow this chapter along you need to have the microblog app as we left it at the end of the previous chapter. Please make sure the app is installed and running. Running Python scripts from the command line In this chapter we are going to write a few scripts that simplify the management of our database. Before we get into that let's review how a Python script is executed on the command line. If you are on Linux or OS X, then scripts have to be given executable permission, like this: chmod a+x script.py The script has a shebang line, which points to the interpreter that should be used. A script that has been given executable permission and has a shebang line can be executed simply like this: ./script.py <arguments> On Windows, however, this does not work, and instead you have to provide the script as an argument to the chosen Python interpreter: flask\Scripts\python script.py <arguments> To avoid having to type the path to the Python interpreter you can add your microblog/flask/Scripts directory to the system path, making sure it appears before your regular Python interpreter. From now on, in this tutorial the Linux/OS X syntax will be used for brevity. If you are on Windows remember to convert the syntax appropriately. Databases in Flask We will use the Flask-SQLAlchemy extension to manage our application. This extension provides a wrapper for the SQLAlchemy project, which is an Object Relational Mapper or ORM. ORMs allow database applications to work with objects instead of tables and SQL. The operations performed on the objects are translated into database commands transparently by the ORM. This effectively means that we will not be learning SQL in this tutorial, we will let Flask-SQLAlchemy speak SQL for us. Migrations Most database tutorials I've seen cover creation and use of a database, but do not adequately address the problem of updating a database as the application grows. Typically you end up having to delete the old database and create a new one each time you need to make updates, losing all the data. And if the data cannot be recreated easily you may be forced to write export and import scripts yourself. Luckily, we have a much better option. We are going to use SQLAlchemy-migrate to keep track of database updates for us. It adds a bit of work to get a database started, but that is a small price to pay for never having to worry about manual database migrations. Enough theory, let's get started! Configuration For our little application we will use a sqlite database. The sqlite databases are the most convenient choice for small applications, as each database is stored in a single file. We have a couple of new configuration items to add to our config file (file config.py):. Here is our updated package init file (file app/__init__.py): from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy app = Flask(__name__) app.config.from_object('config') db = SQLAlchemy(app) from app import views, models Note the two changes we have made to our init script. We are now creating a db object that will be our database, and we are also importing a new module called models. We will write this module next.. Let's start by creating a model that will represent our users. Using the WWW SQL Designer tool, I have made the following diagram to represent our users table: The id field is usually in all models, and is used as the primary key. Each user in the database will be assigned a unique id value, stored in this field. Luckily this is done automatically for us, we just need to provide the id field. The nickname and The role field is an integer, we will use it to keep track of which users are admins and which are not. Now that we have decided what we want our users table to look like, the job of translating that into code is pretty easy (file app/models.py): from app import db ROLE_USER = 0 ROLE_ADMIN = 1 class User(db.Model): id = db.Column(db.Integer, primary_key = True) nickname = db.Column(db.String(64), index = True, unique = True) email = db.Column(db.String(120), index = True, unique = True) role = db.Column(db.SmallInteger, default = ROLE_USER) def __repr__(self): return '<User %r>' % (self.nickname) The User class that we just created contains several fields, defined as class variables. Fields are created as instances of the db.Column class, which takes the field type as an argument, plus other optional arguments that allow us, for example, to indicate which fields are unique and indexed. The __repr__ method tells Python how to print objects of this class. We will use this for debugging. Creating the database With the configuration and model in place we are now ready to create our database file. The SQLAlchemy-migrate package comes with command line tools and APIs to create databases in a way that allows easy updates in the future, so that is what we will use. I find the command line tools a bit awkward to use, so instead I have written my own set of little Python scripts that invoke the migration APIs. Here is a script that creates the database (file db_create.py): #!flask/bin/python from migrate.versioning import api from config import SQLALCHEMY_DATABASE_URI from config import SQLALCHEMY_MIGRATE_REPO from app import db import os.path db.create_all() if not os.path.exists(SQLALCHEMY_MIGRATE_REPO): api.create(SQLALCHEMY_MIGRATE_REPO, 'database repository') api.version_control(SQLALCHEMY_DATABASE_URI, SQLALCHEMY_MIGRATE_REPO) else: api.version_control(SQLALCHEMY_DATABASE_URI, SQLALCHEMY_MIGRATE_REPO, api.version(SQLALCHEMY_MIGRATE_REPO)) Note how this script is completely generic. All the application specific pathnames are imported from the config file. When you start your own project you can just copy the script to the new app's directory and it will work right away. To create the database you just need to execute this script (remember that if you are on Windows the command is slightly different): ./db_create.py After you run the command. This will allow us to recreate the database while leaving the existing repository if we need to. Our first migration Now that we have defined our model, we can incorporate it into our database. We will consider any changes to the structure of the app database a migration, so this is our first, which will take us from an empty database to a database that can store users. To generate a migration I use another little Python helper script (file db_migrate.py): #!flask/bin/python import imp from migrate.versioning import api from app import db from config import SQLALCHEMY_DATABASE_URI from config import SQLALCHEMY_MIGRATE_REPO migration = SQLALCHEMY_MIGRATE_REPO + '/versions/%03d_migration.py' % (api.db_version(SQLALCHEMY_DATABASE_URI, SQLALCHEMY_MIGRATE_REPO) + 1) tmp_module = imp.new_module('old_model') old_model = api.create_model(SQLALCHEMY_DATABASE_URI, SQLALCHEMY_MIGRATE_REPO) exec old_model in tmp_module.__dict__ script = api.make_update_script_for_model(SQLALCHEMY_DATABASE_URI, SQLALCHEMY_MIGRATE_REPO, tmp_module.meta, db.metadata) open(migration, "wt").write(script) api.upgrade(SQLALCHEMY_DATABASE_URI, SQLALCHEMY_MIGRATE_REPO) print 'New migration saved as ' + migration print 'Current database version: ' + str(api.db_version(SQLALCHEMY_DATABASE_URI, SQLALCHEMY_MIGRATE_REPO)) The script looks complicated, but it doesn't really do much.. While I have never had problems generating migrations automatically with the above script, I could see that sometimes it would be hard to determine what changes were made just by comparing the old and the new format. To make it easy for SQLAlchemy-migrate to determine the changes I never rename existing fields, I limit my changes to adding or removing models or fields, or changing types of existing fields. And I always review the generated migration script to make sure it is right. It goes without saying that you should never attempt to migrate your database without having a backup, in case something goes wrong. Also never run a migration for the first time on a production database, always make sure the migration works correctly on a development database. So let's go ahead and record our migration: ./db_migrate.py And the output from the script will be: New migration saved as db_repository/versions/001_migration.py Current database version: 1 The script shows where the migration script was stored, and also prints the current database version. The empty database version was version 0, after we migrated to include users we are at version 1. Database upgrades and downgrades By now you may be wondering why is it that important to go through the extra hassle of recording database migrations. Imagine that you have your application in your development machine, and also have a copy deployed to a production server that is online and in use.. If you have database migration support, then when you are ready to release the new version of the app to your production server you just need to record a new migration, copy the migration scripts to your production server and run a simple script that applies the changes for you. The database upgrade can be done with this little Python script (file db_upgrade.py): #!flask/bin/python from migrate.versioning import api from config import SQLALCHEMY_DATABASE_URI from config import SQLALCHEMY_MIGRATE_REPO api.upgrade(SQLALCHEMY_DATABASE_URI, SQLALCHEMY_MIGRATE_REPO) print 'Current database version: ' + str(api.db_version(SQLALCHEMY_DATABASE_URI, SQLALCHEMY_MIGRATE_REPO)) When you run the above script, the database will be upgraded to the latest revision, by applying the migration scripts stored in the database repository. It is not a common need to have to downgrade a database to an old format, but just in case, SQLAlchemy-migrate supports this as well (file db_downgrade.py): #!flask/bin/python) print 'Current database version: ' + str(api.db_version(SQLALCHEMY_DATABASE_URI, SQLALCHEMY_MIGRATE_REPO)) This script will downgrade the database one revision. You can run it multiple times to downgrade several revisions. Database relationships Relational databases are good at storing relations between data items. Consider the case of a user writing a blog post. The user will have a record in the users table, and the post will have a record in the posts table. The most efficient way to record who wrote a given post is to link the two related records. Once a link between a user and a post is established there are two types of queries that we may need to use. The most trivial one is when you have a blog post and need to know what user wrote it. A more complex query is the reverse of this one. If you have a user, you may want to know all the posts that the user wrote. Flask-SQLAlchemy will help us with both types of queries. Let's expand our database to store posts, so that we can see relationships in action. For this we go back to our database design tool and create a posts table:. Let's modify our models to reflect these changes ( app/models.py): from app import db ROLE_USER = 0 ROLE_ADMIN = 1 class User(db.Model): id = db.Column(db.Integer, primary_key = True) nickname = db.Column(db.String(64), unique = True) email = db.Column(db.String(120), unique = True) role = db.Column(db.SmallInteger, default = ROLE_USER)) We have added the Post class, which will represent blog posts written by users. The user_id field in the Post class was initialized as a foreign key, so that Flask-SQLAlchemy knows that this field will link to a user. Note that we have also added a new field to the User class called posts, that is constructed as a db.relationship field. This is not an actual database field, so it isn't in our database diagram. For a one-to-many relationship a db.relationship field is normally defined on the "one" side. With this relationship we get a user.posts member that gets us the list of posts from the user. The first argument to db.relationship indicates the "many" class of this relationship. The backref argument defines a field that will be added to the objects of the "many" class that points back at the "one" object. In our case this means that we can use post.author to get the User instance that created a post. Don't worry if these details don't make much sense just yet, we'll see examples of this at the end of this article. Let's record another migration with this change. Simply run: ./db_migrate.py And the script will respond: New migration saved as db_repository/versions/002_migration.py Current database version: 2 It isn't really necessary to record each little change to the database model as a separate migration, a migration is normally only recorded at release points. We are doing more migrations than necessary here only to show how the migration system works. Play time We have spent a lot of time defining our database, but we haven't seen how it works yet. Since our app does not have database code yet let's make use of our brand new database in the Python interpreter. So go ahead and fire up Python. On Linux or OS X: flask/bin/python Or on Windows: flask\Scripts\python Once in the Python prompt enter the following: >>> from app import db, models >>> This brings our database and models into memory. Let's create a new user: >>> u = models.User(nickname='john', email='john@email.com', role=models.ROLE_USER) >>> db.session.add(u) >>> db.session.commit() >>> Changes to a database are done in the context of a session. Multiple changes can be accumulated in a session and once all the changes have been registered you can issue a single db.session.commit(), which writes the changes atomically. If at any time while working on a session there is an error, a call to db.session.rollback() will revert the database to its state before the session was started. If neither commit nor rollback are issued then the system by default will roll back the session. Sessions guarantee that the database will never be left in an inconsistent state. Let's add another user: >>> u = models.User(nickname='susan', email='susan@email.com', role=models.ROLE_USER) >>> db.session.add(u) >>> db.session.commit() >>> Now we can query what our users are: >>> users = models.User.query.all() >>> print users [<User u'john'>, <User u'susan'>] >>> for u in users: ... print u.id,u.nickname ... 1 john 2 susan >>> For this we have used the query member, which is available in all model classes. Note how the id member was automatically set for us. Here is another way to do queries. If we know the id of a user we can find the data for that user as follows: >>> u = models.User.query.get(1) >>> print u <User u'john'> >>> Now let's add a blog post: >>> import datetime >>> u = models.User.query.get(1) >>> p = models.Post(body='my first post!', timestamp=datetime.datetime.utcnow(), author=u) >>> db.session.add(p) >>> db.session.commit() Here we set our timestamp in UTC time zone. All timestamps stored in our database will be in UTC. We can have users from all over the world writing posts and we need to use uniform time units. In a future tutorial we will see how to show these times to users in their local timezone.. To complete this session, let's look at a few more database queries that we can do: # get all posts from a user >>> u = models.User.query.get(1) >>> print u <User u'john'> >>> posts = u.posts.all() >>> print posts [<Post u'my first post!'>] # obtain author of each post >>> for p in posts: ... print p.id,p.author.nickname,p.body ... 1 john my first post! # a user that has no posts >>> u = models.User.query.get(2) >>> print u <User u'susan'> >>> print u.posts.all() [] # get all users in reverse alphabetical order >>> print models.User.query.order_by('nickname desc').all() [<User u'susan'>, <User u'john'>] >>> The Flask-SQLAlchemy documentation is the best place to learn about the many options that are available to query the database. Before we close, let's erase the test users and posts we have created, so that we can start from a clean database in the next chapter: >>> users = models.User.query.all() >>> for u in users: ... db.session.delete(u) ... >>> posts = models.Post.query.all() >>> for p in posts: ... db.session.delete(p) ... >>> db.session.commit() >>> Final words This was a long tutorial. We have learned the basics of working with a database, but we haven't incorporated the database into our application yet. In the next chapter we will put all we have learned about databases into practice when we look at our user login system. In the meantime, if you haven't been writing the application along, you may want to download it in its current state: Download microblog-0.4.zip. Note that I have not included a database in the zip file above, but the repository with the migrations is there. To create a new database just use the db_create.py script, then use db_upgrade.py to upgrade the database to the latest revision. I hope to see you next time! Miguel #1 Alexander Manenko said : Thank you for this article! #2 Doug said : First off, I just wanted to say that I love the flask tutorials, and look forward to more in the future. They are a huge help! Unfortunately, I am having a bit of trouble with the migration script and was wondering if you might be able to offer any insight. Inside of my models, I have the following column: date_added = db.Column(db.DateTime, default=datetime.datetime.utcnow) When I run db_migrate.py it converts that into the following line inside of my migration: Column('date_added', DateTime, default=ColumnDefault(<function <lambda> at 0x101dddd70>)) Later, when this line of the db_migrate.py script hits that line it causes a SyntaxError: a = api.upgrade(SQLALCHEMY_DATABASE_URI, SQLALCHEMY_MIGRATE_REPO) Any thoughts? #3 Miguel Grinberg said : Hi Doug, thanks for your comments. I couldn't find anything in writing that explains the problem, but it is clear that sqlalchemy-migrate does not know how to handle a column default that is a function instead of a regular value. The automatic generation of migration scripts is an experimental feature, so this may be one of the aspects that isn't very polished. Maybe if you fix the migration script by hand to have the default function it will work. As a side comment, I prefer not to use these sort of implicit updates that happen outside of your control, as I believe they make the code harder to understand and maintain. I like changes to the database to be explicit and always under my control, so I always update fields myself. #4 Ben said : Hi Miguel, Thanks for these, they are amazingly helpful. I am currently having some issues querying against all posts from a date range, eg. The date 7 days. The issue comes from the fact that the datetime format doesn't recognize just the date part. I could not find much in the sqlalchemy documentation about it. Any help would be appreciated! Thanks, Ben #5 Miguel Grinberg said : Hi Ben, thanks for following the tutorial. To find posts that are in a date range you can use the filter() method of the query class. For example, if you want all posts between 2012-04-20 and 2012-04-27 you would do this: Post.query.filter(Post.date >= datetime(2012,4,20), Post.date < datetime(2012,4,27)). Note that the way I constructed the query you will get all the posts from the 20th to (and including) the 26th, but nothing from the 27th. If you wanted to include the 27th then you would say Post.date < datetime(2012,4,28). I hope this makes sense. Thanks! #6 Doug said : Miguel, you are awesome for responding to your comments so quickly! I wanted to say thank you for your response to mine last week. I came to the same conclusion as you about sqlalchemy-migrate not being able to handle functions as column defaults; Hopefully they address this in a future update. I was able to sidestep the issue by specifying the function as my default value in the model's constructor. Keep up the excellent work! #7 smitty said : I went kinda crazy trying to use the introductory Flask examples with SQLalchemy. Chapter 18 of the Flask documentation seems key for defining a data model as a singly .py file, and then getting it to play nicely with Flask. In my medium-weight pythonista opinion, the whole business of factory methods and function decorators cuts against the grain of the KISS principle that motivates python in general. Possibly that is all 'nature of the beast'. Cheers, Chris #8 JonoB said : When I run ./db_create.py, i get a Permission denied error. What am I doing wrong? #9 JonoB said : OK, fixed the permission issue. But now when I run ./db_create.py I get the following errors: from: can't read /var/mail/migrate.versioning from: can't read /var/mail/config from: can't read /var/mail/config line4: import: command not found ...etc ...etc #10 JonoB said : Finally managed to sort this out. Ignore the shebang stuff. Just type: python db_create.py Also, __FILE__ should be __file__ Finally, the hyperlink to the file download doesn't work.
http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-iv-database
CC-MAIN-2014-15
refinedweb
3,594
65.73
FP-growth algorithm Have you ever gone to a search engine, typed in a word or part of a word, and the search engine automatically completed the search term for you? Perhaps it recommended something you didn’t even know existed, and you searched for that instead. This requires a way to find frequent itemsets efficiently. FP-growth algorithm find frequent itemsets or pairs, sets of things that commonly occur together, by storing the dataset in a special structure called an FP-tree. The FP-Growth Algorithm, proposed by Han in , is an efficient and scalable method for mining the complete set of frequent patterns by pattern fragment growth, using an extended prefix-tree structure for storing compressed and crucial information about frequent patterns named frequent-pattern tree (FP-tree). In his study, Han proved that his method outperforms other popular methods for mining frequent patterns, e.g. the Apriori Algorithm and the TreeProjection . The FP-growth algorithm scans the dataset only twice. The basic approach to finding frequent itemsets using the FP-growth algorithm is as follows: 1 Build the FP-tree. 2 Mine frequent itemsets from the FP-tree. The FP stands for “frequent pattern.” An FP-tree looks like other trees in computer science, but it has links connecting similar items. The linked items can be thought of as a linked list. The FPtree is used to store the frequency of occurrence for sets of items. Sets are stored as paths in the tree. Sets with similar items will share part of the tree. Only when they differ will the tree split. A node identifies a single item from the set and the number of times it occurred in this sequence. A path will tell you how many times a sequence occurred. The links between similar items, known as node links, will be used to rapidly find the location of similar items. FP-growth algorithm Pros: Usually faster than Apriori. Cons: Difficult to implement; certain datasets degrade the performance. Works with: Nominal values. General approach to FP-growth algorithm - Collect: Any method. - Prepare: Discrete data is needed because we’re storing sets. If you have continuous data, it will need to be quantized into discrete values. - Analyze: Any method. - Train: Build an FP-tree and mine the tree. - Test: Doesn’t apply. - Use: This can be used to identify commonly occurring items that can be used to make decisions, suggest items, make forecasts, and so on. #variables: #name of the node, a count #nodelink used to link similar items #parent vaiable used to refer to the parent of the node in the tree #node contains an empty dictionary for the children in the node class treeNode: def __init__(self, nameValue, numOccur, parentNode): self.name = nameValue self.count = numOccur self.nodeLink = None self.parent = parentNode #needs to be updated self.children = {} #increments the count variable with a given amount def inc(self, numOccur): self.count += numOccur #display tree in text. Useful for debugging def disp(self, ind=1): print (' '*ind, self.name, ' ', self.count) for child in self.children.values(): child.disp(ind+1) rootNode = treeNode('pyramid',9,None) rootNode.children['eye'] = treeNode('eye',13,None) rootNode.disp() pyramid 9 eye 13 Constructing the FP-tree In addition to the FP-tree, you need a header table to point to the first instance of a given type. The header table will allow you to quickly access all of the elements of a given type in the FP-tree. In addition to storing pointers, you can use the header table to keep track of the total count of every type of element in the FP-tree. createTree(), takes the dataset and the minimum support as arguments and builds the FP-tree. This makes two passes through the dataset. The first pass goes through everything in the dataset and counts the frequency of each term. These are stored in the header table. def createTree(dataSet, minSup=1): #create FP-tree from dataset but don't mine headerTable = {} #go over dataSet twice for trans in dataSet:#first pass counts frequency of occurance for item in trans: headerTable[item] = headerTable.get(item, 0) + dataSet[trans] for k in list(headerTable): #remove items not meeting minSup if headerTable[k] < minSup: del(headerTable[k]) freqItemSet = set(headerTable.keys()) #print 'freqItemSet: ',freqItemSet if len(freqItemSet) == 0: return None, None #if no items meet min support -->get out for k in headerTable: headerTable[k] = [headerTable[k], None] #reformat headerTable to use Node link #print 'headerTable: ',headerTable retTree = treeNode('Null Set', 1, None) #create tree for tranSet, count in dataSet.items(): #go through dataset 2nd time localD = {} for item in tranSet: #put transaction items in order if item in freqItemSet: localD[item] = headerTable[item][0] if len(localD) > 0: orderedItems = [v[0] for v in sorted(localD.items(), key=lambda p: p[1], reverse=True)] updateTree(orderedItems, retTree, headerTable, count)#populate tree with ordered freq itemset return retTree, headerTable #return tree and header table updateTree() grow the Fp-tree with an itemset. def updateTree(items, inTree, headerTable, count): if items[0] in inTree.children:#check if orderedItems[0] in retTree.children inTree.children[items[0]].inc(count) #incrament count else: #add items[0] to inTree.children inTree.children[items[0]] = treeNode(items[0], count, inTree) if headerTable[items[0]][1] == None: #update header table headerTable[items[0]][1] = inTree.children[items[0]] else: updateHeader(headerTable[items[0]][1], inTree.children[items[0]]) if len(items) > 1:#call updateTree() with remaining ordered items updateTree(items[1::], inTree.children[items[0]], headerTable, count) updateHeader() makes sure the node links points to every intance of the this item on the tree def updateHeader(nodeToTest, targetNode): #this version does not use recursion while (nodeToTest.nodeLink != None): #Do not use recursion to traverse a linked list! nodeToTest = nodeToTest.nodeLink nodeToTest.nodeLink = targetNode def loadSimpDat(): simpDat = [['r', 'z', 'h', 'j', 'p'], ['z', 'y', 'x', 'w', 'v', 'u', 't', 's'], ['z'], ['r', 'x', 'n', 'o', 's'], ['y', 'r', 'x', 'z', 'q', 't', 'p'], ['y', 'z', 'x', 'e', 'q', 's', 't', 'm']] return simpDat The createTree() function doesn’t take the input data as lists. It expects a dictionary with the itemsets as the dictionary keys and the frequency as the value. A createInitSet() function does this conversion for you def createInitSet(dataSet): retDict = {} for trans in dataSet: retDict[frozenset(trans)] = 1 return retDict simpDat = loadSimpDat() simpDat [['r', 'z', 'h', 'j', 'p'], ['z', 'y', 'x', 'w', 'v', 'u', 't', 's'], ['z'], ['r', 'x', 'n', 'o', 's'], ['y', 'r', 'x', 'z', 'q', 't', 'p'], ['y', 'z', 'x', 'e', 'q', 's', 't', 'm']] initSet = createInitSet(simpDat) initSet {frozenset({'z'}): 1, frozenset({'s', 't', 'u', 'v', 'w', 'x', 'y', 'z'}): 1, frozenset({'e', 'm', 'q', 's', 't', 'x', 'y', 'z'}): 1, frozenset({'p', 'q', 'r', 't', 'x', 'y', 'z'}): 1, frozenset({'h', 'j', 'p', 'r', 'z'}): 1, frozenset({'n', 'o', 'r', 's', 'x'}): 1} #The FP-tree myFPtree, myHeaderTab = createTree(initSet, 3) myFPtree.disp() Null Set 1 x 1 r 1 s 1 z 5 x 3 t 2 y 2 r 1 s 1 s 1 t 1 y 1 r 1 The item and its frequency count are displayed with indentation representing the depth of the tree. Mining frequent items from an FP-tree There are three basic steps to extract the frequent itemsets from the FP-tree: 1 Get conditional pattern bases from the FP-tree. 2 From the conditional pattern base, construct a conditional FP-tree. 3 Recursively repeat steps 1 and 2 on until the tree contains a single item. The conditional pattern base is a collection of paths that end with the item you’re looking for. Each of those paths is a prefix path. In short, a prefix path is anything on the tree between the item you’re looking for and the tree root. ascendTree(), which ascends the tree, collecting the names of items it encounters def ascendTree(leafNode, prefixPath): #ascends from leaf node to root if leafNode.parent != None: prefixPath.append(leafNode.name) ascendTree(leafNode.parent, prefixPath) The findPrefixPath() function iterates through the linked list until it hits the end. For each item it encounters, it calls ascendTree(). This list is returned and added to the conditional pattern base dictionary called condPats. def findPrefixPath(basePat, treeNode): #treeNode comes from header table condPats = {} while treeNode != None: prefixPath = [] ascendTree(treeNode, prefixPath) if len(prefixPath) > 1: condPats[frozenset(prefixPath[1:])] = treeNode.count treeNode = treeNode.nodeLink return condPats findPrefixPath('x', myHeaderTab['x'][1]) {frozenset({'z'}): 3} findPrefixPath('r', myHeaderTab['r'][1]) {frozenset({'x'}): 1, frozenset({'z'}): 1, frozenset({'t', 'x', 'y', 'z'}): 1} The FP-growth algorithm is an efficient way of finding frequent patterns in a dataset. The FP-growth algorithm works with the Apriori principle but is much faster. The Apriori algorithm generates candidate itemsets and then scans the dataset to see if they’re frequent. FP-growth is faster because it goes over the dataset only twice. The dataset is stored in a structure called an FP-tree. After the FP-tree is built, you can find frequent itemsets by finding conditional bases for an item and building a conditional FP-tree. This process is repeated, conditioning on more items until the conditional FPtree has only one item. excerpts from photo This Post Has 9 Comments rootNode = treeNode(‘pyramid’,9,None) rootNode.children[‘eye’] = treeNode(‘eye’,13,None) in google collab it’s showing error H i, I am beginner in programming. have to implement fp-growth algorithm in c++. can any one provide its full working code please? The full code can be found here: dats=[[‘google’,’amazon’,],[‘amazon’,’google’,’python’,’cse’],[‘cse’,’google’],[‘amazon’,’python’], [‘cse’,’amazon’,’python’,’google’],[‘amazon’,’google’,’cse’,’data’,]] class fptree: def __init__(self,ide,cnt,parent): self.ide=ide self.cnt=cnt self.parent=parent self.link=None self.child={} def increm(self,cnt): self.cnt+=cnt def genFi(data,minsp,dic=False): kdc={} fi,sfi=[],[] nnewdata={} for dat in data: for i in range(0,len(dat)): if dat[i] not in kdc: kdc[dat[i]]=1 elif dat[i] in dat[0:i]: continue else: kdc[dat[i]]+=1 for k,v in kdc.items(): if v1: genTree(data[1:],cnt,null.child[data[0]],kdc) #nodes with same names but in different paths Hi, nice article. One note, your ‘createInitSet’ function does not seem to do what it needs to do. It doesn’t count the frequencies, it just sets all frequencies to 1. I suggest the following: def createInitSet(dataSet): retDict = {} for trans in dataSet: if frozenset(trans) in retDict: retDict[frozenset(trans)] += 1 else: retDict[frozenset(trans)] = 1 return retDict Please note I’m no python expert, there might be a more efficient expression, but it does what it needs to do. Kind regards. thanks mate Hi, I really like your website and appreciated your efforts to write this out in python3. For FP growth, I think you are taking reference of by Peter Harrington, right? I realized that the there is a function to mine the tree automatically, which is missing from your post. Have you tried translate it into python3? not successful?? def mineTree(inTree, headerTable, minSup, preFix, freqItemList): bigL = [v[0] for v in sorted(headerTable.items(), key=lambda p: p[1])] # (sort header table) for basePat in bigL: # start from bottom of header table newFreqSet = preFix.copy() newFreqSet.add(basePat) # print ‘finalFrequent Item: ‘,newFreqSet #append to set freqItemList.append(newFreqSet) condPattBases = findPrefixPath(basePat, headerTable[basePat][1]) # print ‘condPattBases :’,basePat, condPattBases # 2. construct cond FP-tree from cond. pattern base myCondTree, myHead = createTree(condPattBases, minSup) # print ‘head from conditional tree: ‘, myHead if myHead != None: # 3. mine cond. FP-tree # print ‘conditional tree for: ‘,newFreqSet # myCondTree.disp(1) mineTree(myCondTree, myHead, minSup, newFreqSet, freqItemList) Yes it is referenced from Peter Harrington’s book. I think I did not try it. I was more interested in finding out how the algorithm works. Thanks for the suggestion. I will give it a try. Hi, thank you for your codes. I tried to do it by myself and I found that items of which frequencies less than the minSup still showed up. I am wondering if I misunderstand anything. Best Hi, using the mineFPtree with python 3 I have an error: bigL = [v[0] for v in sorted(headerTable.items(), key=lambda p: p[1])] # (sort header table) AttributeError: ‘NoneType’ object has no attribute ‘items’ any thoughts? thanks in advance. Btw, there is a Fp-growth algorithm library to use with python3? I tried the pyspark but I end up with connection errors, spark stuff…
https://adataanalyst.com/machine-learning/fp-growth-algorithm-python-3/
CC-MAIN-2022-05
refinedweb
2,096
56.25
Fam, help me!...i'm new to python and currently trying to write a function that adds values to an empty list. it should return true when i add values and false, if i add a value that already exists in the list. The issue is when i add a value that already exists, it still prints it out when the function is called instead of given the designated error message. I know something's wrong, i just don't know where exactly. I'd appreciate your input (pun intended). This is the code i came up with: myUniqueList = [] def addToMyUniqueList(x): if x != myUniqueList: print("My unique list:") print(myUniqueList) else: print("Error; item already exists!") addToMyUniqueList(myUniqueList.append(3)) output: My unique list: [3] addToMyUniqueList(myUniqueList.append(3)) output: My unique list: [3, 3] Discussion (6) On another note, you can use the backtick symbol(`) to create code boxes. You write it three times then your code and end the code section with three more backticks. After the first three backticks, you can also write python(in all lowercase) to get syntax highlighting for python in your post. If you are interested you can press the info-box thing here on Dec to read more about the markdown syntax used 😁 So I think the issue is the use of the not equals operator (!=). It checks if the thing to the left is not equal to the thing on the right. If I understood your example the check if statement with values witten out would be: Because, the value on the left is a number and the the value to the right is a list containing the value 3 they will never be equal. Instead python as two other operators in and not in. Which can be used to check if a values exist in a list (or other container supporting it). In this case the is statement would be: Hope this was helpful, feel free to ask any questions if I was unclear😊 Oh, this was really helpful. I was totally unaware of these other operators. The code works fine now. Thanks again!. Thanks to @dmitrypolo and @Fredrik Bengtsson for their help. It does what i want now! hurray!! lol. myUniqueList = [] def addToMyUniqueList(x): if x not in myUniqueList: print("New item added:", x) return myUniqueList.append(x) else: print("ERROR!!! Item already exists!") addToMyUniqueList("salt") print(myUniqueList) The function you created also does not return anything, it only prints out information. Your appendoperation should happen when one of the conditions matches. Oh, thanks Dmitry...This was really helpful. To be honest, i didn't quite understand the use of the return(statement), but your input helped me find out more. The code works fine now.
https://practicaldev-herokuapp-com.global.ssl.fastly.net/itchyonion/adding-values-to-an-empty-list-5000
CC-MAIN-2021-17
refinedweb
458
74.29
Opened 10 years ago Closed 10 years ago Last modified 7 years ago #8626 closed Uncategorized (wontfix) Translations from "en_US" locale being used even though request.LANGUAGE_CODE is "en" Description I've got a situation where even though the template has request.LANGUAGE_CODE=="en", the "en_US" translations are being rendered instead of the "en" translations. Furthermore, if request.LANGUAGE_CODE=="en-gb", the "en_GB" translation is being pulled back, correctly. In summary: - if LANGUAGE_CODE=="en" -> pulls back "en_US" translations (incorrect) - if LANGUAGE_CODE=="en-gb" -> pulls back "en_GB" translations (expected result) - if LANGUAGE_CODE=="en-us" -> pulls back "en_US" translations (expected result) To demonstrate the problem I put together and attached a tar.gz of a simple project directory: - A homepage that has a dropdown control for selecting/setting the user's chosen language, choices are "en", "en-gb" and "en-us". The form sets the request.LANGUAGE_CODE via the set-language view (django.conf.urls.i18n). urls.py is setup to activate the set-language view when user clicks Submit. The homepage itself lives at /index.html/ - Three locale translations corresponding, i.e. "en", "en_GB" and "en_US" in the locale subdir. I've localized the text "Homepage" with different text strings for each of the three locales. django.po - A settings.py which specifies the three LANGUAGES, a LANGUAGE_CODE of "en". It also pulls in the LocaleMiddleware as is necessary for locale translations. I think the other settings/files included are not relevant to the problem (e.g. the sqlite_db database file, etc), they're only included to form a runnable project. I've been able to show this behaviour in 1.0-beta_2-SVN-8643 - simply go to the homepage at /index.html/ and choose the different language values and submit. The page refreshes to show the current value of request.LANGUAGE_CODE and also which translation has been pulled back. Attachments (4) Change History (16) comment:1 Changed 10 years ago by comment:2 Changed 10 years ago by comment:3 Changed 10 years ago by I can confirm this is happening (using the project provided). Poking around a lot, the problem seems to be happening as result of something inside django.utils.translation.trans_real.translation(). The Django development server makes a call to activate("en_US") as part of setting up itself initially and then the correct locale is set for each request. Somehow, as part of that initial setup, the en_US translation is being cached for I'll pick this up again in the morning if nobody solves it in the interim. comment:4 Changed 10 years ago by comment:5 Changed 10 years ago by This is very weird. From what I can see, the fault isn't on Django's part. I have the exact same setup working perfectly (after fixing #7163) for providing Serbian language in two scripts (sr and sr_LATN). Unless I'm missing something, Python gettext (or gettext in general, don't know anything about the implementation) will choose the en_US translation over the en translation even if they both exist. But it only happens for the en locale. I'm attaching a "diagnostic" diff for trans_real and a tgz of your app with two Serbian locales added so you can see for yourself. Phew, for once not having English as my primary language seems to make things easier for me ;) comment:6 Changed 10 years ago by Okay, that was fun... This is a problem in Python's locale module, where (basically) en is mapped to en_US in the locale.locale_alias dict. This in turn causes the wrong .mo file to be loaded. In detail: gettext.translation (which is used in django.utils.translation.trans_real.translation) calls gettext.find to locate the correct .mo file to load, which calls (the misnamed) gettext._expand_lang ( gettext._expand_lang returns a list of possible locale names for the given locale). Finally, gettext._expand_lang calls locale.normalize for the normalized name of a locale, and locale.normalize uses the locale.locale_alias dict. And it just so happens that en is mapped to en_US.ISO8859-1... >>> import gettext >>> gettext.find('django', 'locale', ['en'], all=1) ['locale/en_US/LC_MESSAGES/django.mo', 'locale/en/LC_MESSAGES/django.mo'] >>> gettext._expand_lang('en') ['en_US.ISO8859-1', 'en_US', 'en.ISO8859-1', 'en'] >>> >>> # Monkey patch our way out of trouble. >>> import locale >>> locale.locale_alias['en'] = 'en.ISO8859-1' >>> gettext.find('django', 'locale', ['en'], all=1) ['locale/en/LC_MESSAGES/django.mo'] >>> gettext._expand_lang('en') ['en.ISO8859-1', 'en'] (The output is from a session in the project directory.) I'll attach a patch. Changed 10 years ago by Patch the locale.locale_alias dict for 'en'. comment:7 Changed 10 years ago by I don't see a nicer way to fix this, but if anybody has a bright idea... comment:8 Changed 10 years ago by Wow guys, that was smart and digging at very low level. Following a suggestion from Malcolm I had been trying to even unconditionally (by not checking if the new one shared a lang spec prefix with a previously cached one) deepcopying the Python translation objects in translation._fetch and littering the trans_real.py file with debugging statements, all without success and without a clue of what could be the real cause of the problem. comment:9 Changed 10 years ago by This is excellent work and it's nice to understand what's going on. However, at the end of the day, I suspect this is probably not a bug. Firstly, the locale.locale_alias dictionary maps every single "language only" locale specifier to a languagee + country version. It's unfortunate that English as spoken by the English isn't the canonical mapping and the US version is used instead, but a choice had to be made. The fact is that the designator "en" is ambiguous. It needs to be mapped to "English as spoken in XYZ" for some value of XYZ. With, say, Norwegian, the intuitively right thing is what actually happens because Norwegian as spoken by the people of Norway is relatively obvious (the English case was obvious, too, dagnabbit! But they chose poorly! Yes, I know there are historical reasons why this is done in POSIX systems; doesn't make it right :-( ) The same problem as noted here will occur if somebody creates differing "es" and "es_ES" translations. They will always get back the "es_ES" version. Again, because the initial designator has to have the ambiguity resolved somehow. Conclusion: this is a wontfix situation, because it's arguably not a bug and the behaviour is consistent. If we patch English, why not start patching all the other locales ( en_uk -> en_GB, but english_uk -> en_EN ... huh?!)? A documentation patch (in a separate ticket so that it can be handled in isolation) might be appropriate to explain this. I realise the whole i18n situation can get pretty convoluted when you're trying to do the right thing. comment:10 Changed 10 years ago by To make this work, you can use en-en as the LANGUAGE_CODE instead of comment:11 Changed 7 years ago by I ran into this problem today. with the following imported: from django.utils.translation import activate you can do: activate(request.LANGUAGE_CODE) this will properly set the language when request.LANGUAGE_CODE is 'en' (instead of the improper en-us default) comment:12 Changed 7 years ago by Milestone 1.0 deleted tar.gz of the project demonstrating the problem
https://code.djangoproject.com/ticket/8626
CC-MAIN-2018-22
refinedweb
1,231
58.48
Frequently Asked Questions¶ -? Are there any plans for @app.route decorator like in Flask?¶ There are couple issues here: - This adds huge problem name “configuration as side effect of importing”. - Route matching is order specific, it is very hard to maintain import order. - In semi large application better to have routes table defined in one place. For this reason feature will not be implemented. But if you really want to use decorators just derive from web.Application and add desired method. Has aiohttp the Flask Blueprint or Django App concept?¶ If you’re planing to write big applications, maybe you must consider use nested applications. They acts as a Flask Blueprint or like the Django application concept. Using nested application you can add sub-applications to the main application. see: Nested applications. How to create route that catches urls with given prefix?¶ Try something like: app.router.add_route('*', '/path/to/{tail:.+}', sink_handler) Where first argument, star, means catch any possible method (GET, POST, OPTIONS, etc), second matching url with desired prefix, third – handler. Where to put my database connection so handlers can access it?¶ aiohttp.web.Application object supports dict interface, and right place to store your database connections or any other resource you want to share between handlers. Take a look on following example: the minimal supported version is Python 3.4.2¶ As of aiohttp v0.18.0 we dropped support for Python 3.3 up to 3.4.1. The main reason for that is the object.__del__() method, which is fully working since Python 3.4.1 and we need it for proper resource closing. The last Python 3.3, 3.4.0 compatible version of aiohttp is v0.17.4. This should not be an issue for most aiohttp users (for example Ubuntu 14.04.3 LTS provides python upgraded to 3.4.3), however libraries depending on aiohttp should consider this and either freeze aiohttp version or drop Python 3.3 support as well. As of aiohttp v1.0.0 we dropped support for Python 3.4.1 up to 3.4.2+ also. The reason is: loop.is_closed appears in 3.4.2+ Again, it should be not an issue at 2016 Summer because all major distributions are switched to Python 3.5 now. How a middleware may store a data for using by web-handler later?¶ aiohttp.web.Request supports dict interface as well as aiohttp.web.Application. Just put data inside request: async def handler(request): request['unique_key'] = data See code for inspiration, aiohttp_session.get_session(request) method uses SESSION_KEY for saving request specific session info. How to receive an incoming events from different sources in parallel?¶ For example we have two event sources: - WebSocket for event from end user - Redis PubSub from receiving events from other parts of app for sending them to user via websocket. The most native way to perform it is creation of separate task for pubsub handling. Parallel aiohttp.web.WebSocketResponse.receive() calls are forbidden, only the single task should perform websocket reading. But other tasks may use the same websocket object for sending data to peer: to programmatically close websocket server-side?¶ For example we have an application with two endpoints: - /echoa websocket echo server that authenticates the user somehow - /logout_userthat when invoked needs to close all open websockets for that user. Keep in mind that you can only .close() a websocket from inside the handler task, and since the handler task is busy reading from the websocket, it can’t react to other events. One simple solution is keeping a shared registry of websocket handler tasks for a user in the aiohttp.web.Application instance and cancel() them in /logout_user handler: async def echo_handler(request): ws = web.WebSocketResponse() user_id = authenticate_user(request) await ws.prepare(request) request.app['websockets'][user_id].add(asyncio.Task.current_task()) try: async for msg in ws: # handle incoming messages ... except asyncio.CancelledError: print('websocket cancelled') finally: request.app['websockets'][user_id].remove(asyncio.Task.current_task()) await ws.close() return ws async def logout_handler(request): user_id = authenticate_user(request) for task in request.app['websockets'][user_id]: task.cancel() # return response ... def main(): loop = asyncio.get_event_loop() app = aiohttp.web.Application(loop=loop) app.router.add_route('GET', '/echo', echo_handler) app.router.add_route('POST', '/logout', logout_handler) app['handlers'] = defaultdict(set) aiohttp.web.run_app(app, host='localhost', port=8080) How to make request from a specific IP address?¶ If your system has several IP interfaces you may choose one which will be used used to bind socket locally: conn = aiohttp.TCPConnector(local_addr=('127.0.0.1, 0), loop=loop) async with aiohttp.ClientSession(connector=conn) as session: ... See also aiohttp.TCPConnector and local_addr parameter. How to use aiohttp test features with code which works with implicit loop?¶ Passing explicit loop everywhere is the recommended way. But sometimes, in case you have many nested non well-written services, this is impossible. There is a technique based on monkey-patching your low level service that depends on aioes, to inject the loop at that level. This way, you just need your AioESService with the loop in its signature. An example would be the following: import pytest from unittest.mock import patch, MagicMock from main import AioESService, create_app patching the AioESService with and instance of itself but adding the explicit loop as an extra (you need to load the loop fixture in your test signature). The final code to test all this (you will need a local instance of elasticsearch running): import asyncio from aioes import Elasticsearch from aiohttp import web class AioESService: def __init__(self, loop=None): self.es = Elasticsearch(["127.0.0.1:9200"], loop=loop) async def get_info(self): return await self.es.info() class MyService: def __init__(self): self.aioes_service = AioESService() async def get_es_info(self): return await self.aioes_service.get_info() async def hello_aioes(request): my_service = MyService() cluster_info = await my_service.get_es_info() return web.Response(text="{}".format(cluster_info)) def create_app(loop=None): app = web.Application(loop=loop) app.router.add_route('GET', '/', hello_aioes) return app if __name__ == "__main__": web.run_app(create_app()) And the full tests file: from unittest.mock import patch, MagicMock from main import AioESService, create_app class TestAioESService: async def test_get_info(self, loop): cluster_info = await AioESService("random_arg", loop=loop).get_info() assert isinstance(cluster_info, dict) using the side_effect feature for injecting the loop to the AioESService.__init__ call. The use of **args, **kwargs is mandatory in order to propagate the arguments being used by the caller. API stability and deprecation policy¶ aiohttp tries to not break existing users code. Obsolete attributes and methods are marked as deprecated in documentation and raises DeprecationWarning on usage. Deprecation period is usually a year and half. After the period is passed out deprecated code is be removed. Unfortunately we should break own rules if new functionality or bug fixing forces us to do it (for example proper cookies support on client side forced us to break backward compatibility twice). All backward incompatible changes are explicitly marked in CHANGES chapter. How to enable gzip compression globally for the whole application?¶ It’s impossible. Choosing what to compress and where don’t apply such time consuming operation is very tricky matter. If you need global compression – write own custom middleware. Or enable compression in NGINX (you are deploying aiohttp behind reverse proxy, isn’t it).
https://aiohttp.readthedocs.io/en/1.3.3/faq.html
CC-MAIN-2018-34
refinedweb
1,208
52.05
Sound.SC3.RW.HP Description Hash parentheses. A simple minded haskell pre-processor that extends the haskell do syntax by rewriting # parenthesised elements of a right hand side expression as monadic bindings. The basic pre-processor is hp_rewrite. Synopsis - indent_of :: String -> String - remove_indent :: String -> String - split_on_1 :: Eq a => [a] -> [a] -> Maybe ([a], [a]) - hp_remove_inline_do :: String -> [String] - hp_indent :: String -> Maybe Int - hp_non_inline :: [String] -> [Bool] - hp_uncontinue :: [String] -> [String] - hp_names :: Name_Supply - has_hash_paren :: String -> Bool - hp_analyse :: Name_Supply -> String -> (Name_Supply, ([Binding], HP)) - hp_analyse' :: Name_Supply -> String -> ([Binding], String) - hp_build :: ([Binding], HP) -> [String] - hp_process :: Name_Supply -> String -> (Name_Supply, [String]) - hp_rewrite :: [String] -> [String] - hp_rewrite_ghcF :: IO () String remove_indent :: String -> StringSource Delete indentation of line. remove_indent " a <- b" == "a <- b" List split_on_1 :: Eq a => [a] -> [a] -> Maybe ([a], [a])Source Variant of splitOn requiring one match only. split_on_1 " <- " " a <- f #(b) #(c)" == Just (" a","f #(b) #(c)") split_on_1 " do " " let a = do f #(b) #(c)" == Just (" let a =","f #(b) #(c)") Inline do hp_remove_inline_do :: String -> [String]Source Split inline do line into separate lines. let r = [" let a = do " ," f #(b) #(c)"] in hp_remove_inline_do " let a = do f #(b) #(c)" == r Continuation lines hp_indent :: String -> Maybe IntSource Return indent of s if it has_hash_paren. hp_indent " a <- f #(b) #(c)" == Just 2 hp_non_inline :: [String] -> [Bool]Source Note which lines are continued hash parenethsis lines. hp_non_inline ["f = do" ," a #(b)" ," #(c)" ," #(d)" ," p #(q) #(r)"] == [False,False,True,True,False] hp_uncontinue :: [String] -> [String]Source Re-layout to put broken hash parenthesis lines onto one line. let r = ["f = do" ," a #(b) #(c) #(d)" ," p #(q) #(r)"] in hp_uncontinue ["f = do" ," a #(b)" ," #(c)" ," #(d)" ," p #(q) #(r)"] == r Hash Parentheses hp_names :: Name_SupplySource Name supply for introduced variables. hp_names !! 9 == "_hp_9" has_hash_paren :: String -> BoolSource Does s have a hash parenthesis expression. has_hash_paren " a <- f #(b) #(c)" == True hp_analyse :: Name_Supply -> String -> (Name_Supply, ([Binding], HP))Source Process one line of hash-parenthesis re-writes. hp_analyse' :: Name_Supply -> String -> ([Binding], String)Source Variant of hp_analyse for examining intermediate state. let r = ([("_hp_0","b"),("_hp_1","c (d e)")]," a <- f _hp_0 _hp_1") in hp_analyse' hp_names " a <- f #(b) #(c (d e))" == r let r = ([("_hp_0","a")]," return (f _hp_0)") in hp_analyse' hp_names " return (f #(a))" == r let r = ([("_hp_0","a"),("_hp_1","d e"),("_hp_2","c _hp_1 f"),("_hp_3","b _hp_2 g")] ,"c <- f (_hp_0,_hp_3) h") in hp_analyse' hp_names "c <- f (#(a),#(b #(c #(d e) f) g)) h" == r let r = ([("_hp_0","v w")]," return (h (_hp_0 * 2))") in hp_analyse' hp_names " return (h (#(v w) * 2))" == r hp_process :: Name_Supply -> String -> (Name_Supply, [String])Source Process a line for hash parentheses. hp_rewrite :: [String] -> [String]Source Run hash parenthesis rewriter. let {i = ["main = do" ," let a = f #(b) (#(c) * 2)" ," d <- e" ," p <- g #(q r)" ," #(s #(t u))" ," return (h (#(v w) * 2))"] ;r = ["main = do" ," _hp_0 <- b" ," _hp_1 <- c" ," let a = f _hp_0 (_hp_1 * 2)" ," d <- e" ," _hp_2 <- q r" ," _hp_3 <- t u" ," _hp_4 <- s _hp_3" ," p <- g _hp_2 _hp_4" ," _hp_5 <- v w" ," return (h (_hp_5 * 2))"]} in hp_rewrite i == r hp_rewrite_ghcF :: IO ()Source Arguments as required by ghc -F -pgmF.
http://hackage.haskell.org/package/hsc3-rw-0.14/docs/Sound-SC3-RW-HP.html
CC-MAIN-2018-05
refinedweb
502
50.3
The AND logic seems odd to me too, the OR is more what I'm looking for. Is a RS485 based solution more robust ? So an AND gate is what I need to test the low cost version, right ? Any model in particular (I've found this one for instance: CD4081 Is a shielded cable worth the price in my case ? If you wanna use the IRremote library you have to modify it quite extensively, #include <IRremote.h>int RECV_PIN = 11;IRrecv irrecv(RECV_PIN);decode_results results;void setup(){ Serial.begin(9600); irrecv.enableIRIn(); // Start the receiver}// ...void loop() { if (irrecv.decode(&results)) { Serial.println(results.value, HEX); dump(&results); irrecv.resume(); // Receive the next value }} Why ? Just to contribute to the knowledge base: I've tested with some 5 meters long cables, clearly not the best quality cables, and my (single for the moment) receiver works like a charm.=> That's a good point! Where I work we had a Satellite box at one end of the building and someone who wanted to channel change it one floor down and at opposite side of building. We de-soldered the IR LED from the remote and placed it on about 50 meters of screened audio cable at the satellite box and it worked a charm. I would assume IR receiver would work just as well.
http://forum.arduino.cc/index.php?topic=125629.msg945632
CC-MAIN-2014-52
refinedweb
224
74.69
hi everyone, im very new to programing, and i just made my first program/ game... if you could call it that...called pick a number, reeeeeaaalllyyy simple, at first it ran, then i tired to make it a lil more complicated, and now it wont run, can some one help me out. and tell me wwhat i didd wrong, here's the code Code: #include <iostream> using namespace std; int main() { int thisisanumber; cout<<"hello! where going to play a game, if you win your cool... if you lose.... well then you suck Pick a number from 1-10: "; cin>> thisisanumber; cin.ignore(); if ( thisisanumber == 36) { cout<<"Yo your cool, Congratz\n"; } if ( thisisanumber <= 101) { cout<<"I Said 1 through 100, Try again"; // if a person types over 100 { if ( thisisanumber <= 37) { cout<<" Your to High TAKE IT DOWN A NOTCH"; // is a persons answer is too high } if ( thisisanumber >= 35) { cout<<" Your To Low, go up up up."; // if a persons answer is too low } cin.get(); } // this is were it syad the problem is
https://cboard.cprogramming.com/game-programming/78667-need-help-my-first-program-printable-thread.html
CC-MAIN-2017-30
refinedweb
176
88.36
GameUI GameUI is the code which provides the VGUI 'frontend': broadly speaking, the main menu and loading screens. GameUI panels are children of their own dedicated panel ("GameUI Panel"). The client's RootPanel is used only for in-game HUD elements. Contents Source 2009 In the original branches of Source (from Source 2006 to The Orange Box), GameUI is a closed engine library manipulable to a limited extent by editing .res script files. These define properties like width, height, element location, and so on. You can add new non-interactive elements and with a bit of effort hide existing ones. It is possible to create new VGUI panels that behave in exactly the same way as GameUI ones. Starting with Source 2013 (which uses elements from Team Fortress 2), such panels can override the default main menu with four new functions included in IGameUI. It's worth noting that most source engine games should still have this this version of GameUI, regardless of weather they also have a custom UI like Panorama or Scaleform UI. Left 4 Dead and Alien Swarm The Alien Swarm SDK contains the complete source for the newer L4D-style GameUI, which has been moved into the client library. It has been redesigned for consoles' lack of a pointing device: everything is integrated into the same navigable menu system, and you can't be in more than area at once. It's also far, far easier to program. Creating a new window - Create a new class, inheriting from CBaseModFrame. - Create an accompanying "<class name>.res" script in game\resource\ui\basemodui\. - Add a new entry to the WINDOW_TYPEenum. - Edit the enormous switch in CBaseModPanel::OpenWindow()to include your new enum and class. The ugly enum/switch indirection is presumably designed to allow a single "window type" value to open slightly different window objects depending on the UI's state. Too bad Valve haven't found any excuse to do that yet! Opening windows Use CBaseModFrame* CBaseModPanel::OpenWindow(): #include "gameui\swarm\basemodpanel.h" using namespace BaseModUI; void openwindow() { CBaseModFrame* mainMenu = CBaseModPanel::GetSingleton().GetWindow( WT_MAINMENU ); CBaseModPanel::GetSingleton().OpenWindow( WT_GAMESETTINGS, mainMenu ); } The arguments are: WINDOW_TYPE &wt - An enum value that defines which precise window to open. CBaseModFrame* caller - The window which requested this one to open. Among other things, this becomes the target of 'back' buttons on the new window. bool hidePrevious - Hides callerif true. KeyValues* pParameters - Passed on to the new window. OnOpen() is called on the opened window. Startup The initialization sequence is: CGameUI::Initialize() CBaseModPanel::RunFrame() CBaseModPanel::OnGameUIActivated() CBaseModPanel::OpenFrontScreen() CBaseModPanel::OpenWindow() CBaseModPanel is a singleton; CBaseModFrame is the base class of all windows.
https://developer.valvesoftware.com/wiki/GameUI
CC-MAIN-2021-04
refinedweb
438
57.67
Sep 10, 2007 08:03 PM|SomeNewTricks2|LINK Hello, Please help me find why this HttpModule is not firing at all using System; using System.Collections; using System.Data; using System.Diagnostics; using System.Web; namespace MyModules { public class TestHttpModule : IHttpModule { public void Init(System.Web.HttpApplication Application) { Application.Error += new System.EventHandler(OnError); } public void Dispose() { } protected virtual void OnError(object sender, EventArgs args) { HttpApplication app = (HttpApplication)sender; app.Server.GetLastError(); app.Response.Write("An error"); app.Context.ClearError(); app.Response.End(); } } } I placed the above class in the App_Code folder. In the web.config file, I useed this: <httpModules> <add name="TestHttpModule" type="MyModules.TestHttpModule" /> </httpModules> Any help please? In the Default.aspx page I am writing "throw new ApplicationError("..")" and I see that the HttpModule is not firing any event! Thanks Member 37 Points Sep 11, 2007 08:02 PM|SomeNewTricks2|LINK This is driving me crazy! I downloaded a sample code for a video on the website that talks about HttpModule! It works fine, when I move the same HttpModule to my application, the module never runs!! Is there a special workaround we should do to make an HttpModule works on a website under .NET 3.0\5 on VS 2008 Beta 2 with Vista/IIS 7? Thanks All-Star 45667 Points MVP Sep 13, 2007 09:11 AM|haidar_bilal|LINK This is related to IIS 7 and Integrated Mode related to Application pool. Have a look at this post of mine, I had same thing and I did solve it!! Regards Apr 07, 2010 05:22 AM|chazelton|LINK Holy crap this fixed my issue. Same as the unlucky soul above I was scratching my head at this. The module worked perfectly in "Cassini" the buit in webdev server in Visual Studio but no go on a production IIS 7.0. Basically registered the module in both places in the web config. both the <httpModules> section and the <modules> section. This was very frustrating not to mention that this was the only place I could find anything regarding the issue. Stuff like this is really annoying. So Bilal a toast to you, or in this case let's just go with the bottle....I need it right about now whew! Member 4 Points Apr 23, 2010 10:54 AM|meetsankar|LINK Thanks chazelton you saved me lot of time :) Jul 15, 2011 02:32 PM|politus|LINK the link in the answer is now 7 replies Last post Jul 15, 2011 02:32 PM by politus
http://forums.asp.net/p/1156817/1902668.aspx?Re+HttpModule+Events+not+firing+in+ASP+NET+2+0
CC-MAIN-2014-42
refinedweb
421
60.11
Hello, I had followed your examples and from that I had set it up so that all I had to do was pass my query to one function in an imported module and I would get back the sql result. That worked great until I wanted to run through a large csv file checking against the database and then writing results to another csv. I ended up opening and closing too many ports and hit the port limit, at which my script failed. Since I do not have administrator access to change the number of ports or the wait time for the ports to become accessible, the only choice was to change my code. I know that I need to create one connection and then use it for several queries, instead of reconnecting everytime rapidly. I've tried two different approaches to integrating the mysqlconnector code into mine and each time I think I have everything ironed out I get : File "E:\Python\ if self.db( TypeError: 'NoneType' object is not callable I didn't see an example of where there was one function for the connection and one function for the queries and it seems a bit tricky to get that to work, but now I can't figure out how to work around this error. Any help would be appreciated. Thanks! Question information - Language: - English Edit question - Status: - Solved - Assignee: - No assignee Edit question - Solved: - 2012-03-13 - Last query: - 2012-03-13 - Last reply: - 2012-03-13 So if I have thousands of queries to make to the DB, then the Mysql Connector code and all of the related logic have to/should be in a single function? I think my problem is that I had stuff going on in different functions and that presents the problem of either separating the cursor from the connection code or calling the function with the connection and cursor each time, which again creates too many port openings in too short a time frame. Would that be a correct statement? Thanks for the help!! In pseudocode, it's probably best to do it like this: Start Program Open Connection Load Data Iterate through data - Call function to update mysql, pass connection object as one of the variables. So for the above example: def execute_sql(SQLcode = "SELECT * from somewhere", cursor): return cursor.fetchall() See what I mean? You don't have to have it all in one function, you can pass the cursor object! Thanks TinBane, that solved my question. If I understood correctly, you are: 1) Reading a CSV file 2) Check data read from CSV with database 3) Based on the result from database, write something back to another CSV This is not working code, but I would do something like this: def check_data(): .connect( .. your connection data ) path/to/ input.csv" ) path/to/ output. csv") cnx = mysql.connector csv_in = open("/ csv_out = open("/ data_in = .... # Read the data from CSV in a list or dictionary .. csv_in.close() cursor = cnx.cursor() for data in data_in: execute( "SELECT something FROM somewhere WHERE your_id = %s", (data[0],) # data[0] contains an ID of some sort cursor. row = cursor.fetchone() # I expect one row if row[0] != data[1]: # write something to csv_out csv_out.close() cursor.close() cnx.close() Hope this helps.
https://answers.launchpad.net/myconnpy/+question/189484
CC-MAIN-2017-34
refinedweb
547
69.62
Jakarta Ant has become a widely accepted standard for Java project build automation. It is not only a tool, but also a very powerful language that allows you to describe complex build and deployment scenarios. At the same time, it is not a scripting language, but a process-oriented language. The convenient thing about Ant is that it's XML-based, so you can easily generate and edit its build files with lots of tools. And finally, Ant is also an open platform and a framework allowing you to plug in new functionality. All of these things make Ant more than suitable for the role of a general purpose automation tool. If you would like to automate the following tasks, then there's a good chance that you should consider adding Ant support into your product: All of these features can be used in any combination with each other. You can find the complete list of Ant tasks on the Jakarta Ant Web site. And if those are not enough, a customer can always add her own features by implementing a standard Ant task. We assume that you are familar with Ant's Projects, Targets, and Properties, and that you know what the build file looks like. All of those things will be the same even if you're going to call Ant from your application. All you need is to complete the following steps: Projectclass. BuildListenerto connect Ant to your GUI, or just for logging purposes. InputHandlerto catch the input requests from Ant tasks. Let's take a look at each step in more detail. The key class in the Ant framework is the org.apache.tools.ant.Project class. You can create the entire Project structure by invoking the appropriate methods on this class; however, it's not the most convenient way to work with an Ant project. Instead, you can use a default ProjectHelper implementation to parse a good old build.xml file. The most attractive part of the Ant integration is the possibility of using standard and familiar build.xml files. import java.io.*; import org.apache.tools.ant.*; ... Project project = new Project(); project.init(); File buildFile = new File( baseDir, "build.xml"); ProjectHelper.configureProject( project, buildFile); You can pass property values to your Ant project. There are two types of properties. A user property cannot be overwritten or redefined within the build process. To specify it, you can use the following command: project.setUserProperty( name, value); A project property can be redefined within the build process. To populate these, use the following command: project.setProperty( name, value); For example, you can use the GUI to let the customer edit certain properties, or load a properties file from the hard drive, or obtain them from some other source. import java.io.*; import java.util.*; ... Properties prop = new Properties(); prop.load( new FileInputStream( "build.properties")); for( Enumeration en = prop.keys(); en.hasMoreElements(); ) { String key = ( String) en.nextElement(); project.setProperty( key, prop.getProperty( key)); } To be able to monitor what's happening during the build, you should register a BuildListener. There're a number of standard listeners available: You can also provide your own implementation of the BuildListener interface to receive events when the build is started or finished, a target is started or finished, a task is started or finished, or when a message is logged. project.addBuildListener( new DefaultLogger()); project.addBuildListener( new MailLogger()); In case a user interaction is required during the build process, Ant provides an InputHandler interface abstraction. With this, you can register one of the standard input handlers, such as the DefaultInputHandler, that outputs the prompt to the System.out and reads the input from System.in. Another handler is the PropertyFileInputHandler, which uses the prompt as a key to look up a value in the property file. The name of the file is read from the ant.input.properties system property. import org.apache.tools.ant.input.*; ... project.setInputHandler( new PropertyFileInputHandler()); Once you have a Project instance configured, you can execute any target defined in this particular build.xml file by using the target name: project.executeTarget( targetName); That's about it. Now we can look at some practical applications.
http://www.onjava.com/pub/a/onjava/2002/07/24/antauto.html
crawl-002
refinedweb
697
57.16
How to create sitemaps for a Nuxt 3 static-generated site - Date. As Nuxt 3 and its content module are currently in beta, other libraries that perform sitemap generation haven’t yet been updated to support these. Due to this, I’ve had to look into a temporary solution that would work for the time being. I have managed to create a working solution and wanted to write up a blog in case it helps anyone else. Installation To do this, we will first need to install our sitemap library which can be installed like so: yarn add sitemap Once the library has been installed, we will need to create a server folder within our sites root directory with a routes sub-folder inside it. Once this has been done we can create our sitemap file within the server/routes folder. This file will contain the following: import {serverQueryContent} from '#content/server'; import {SitemapStream, streamToPromise} from 'sitemap'; // noinspection TypeScriptUnresolvedFunction export default defineEventHandler(async (event) => { const articles = await serverQueryContent(event).find(); const sitemap = new SitemapStream({ hostname: '' }); // Our root page. sitemap.write({ url: '/' }); // Other page URLs. sitemap.write({ url: '/example/page-1' }); sitemap.write({ url: '/example/page-2' }); // Our Nuxt content pages. articles.forEach((article) => sitemap.write({ url: article._path, changefreq: 'monthly' })); sitemap.end(); return (await streamToPromise(sitemap)); }); Here we are generating a sitemap based on our static pages and fetching our dynamic pages from the Nuxt content module. This means that any static pages such as pages/test/hello-world.vue would need to be entered as /test/hello-world in the sitemap. Meanwhile any dynamic pages such as /blog/post-1 would be automatically added if created via Nuxt content. Creating for static sites As you may of spotted, we are using static generation for our app and so these routes will never exist upon deployment. Thankfully Nuxt lets us pre-render these pages which would build our sitemap when building. We can do this by adding the following to our nuxt.config file: import { defineNuxtConfig } from 'nuxt' export default defineNuxtConfig({ nitro: { preset: 'aws-lambda', prerender: { routes: ['/sitemap.xml'] } } }) And that’s it! We’ve now created a sitemap for our statically generated Nuxt 3 application. You can see a live preview of this sitemap by visiting in your browser once deployed. Here is a live preview of this in action from my businesses website.
https://charliejoseph.com/blog/creating-sitemaps-with-nuxt-3-and-nuxt-content
CC-MAIN-2022-27
refinedweb
395
65.32
Motion Sensor triggering on its own - Matt Pitts last edited by Matt Pitts Hi, I build a mysensors motion sensor with a nano a couple of weeks ago, and initially it appeared to be working very well and has been switching on my lights when motion is detected for the last few weeks perfectly happily However I have noticed over the last few days it has been triggering on its own without any motion. I was watching the mqtt messages earlier today and it was appearing to be triggered with motion every few minutes, even though nothing was there. I have not tried swapping the sensor for another one in case its a problem with the sensor, but I was wondering if there is any other possible reason for these false triggers?? I do have the sensor powered directly from the nano via the 5v pin, is that likely to cause any problems? I've also just rememebered that there is a radiator in the hall way where the sensor is placed, so I'm wondering if when the heating comes on it detects that heat and triggers the sensor? Yes, the motion sensor actually detects heat movement. So you probably shouldn't point the motion detector against a radiator. - Matt Pitts last edited by thanks @hek the sensor is currently stuck half way up a wall, where would you recommend installing it? wall or ceiling? I was also a little unclear about the jumper settings which is best? On the wall, in a corner pointing into the room (away from the windows). I usually put them just below the ceiling, but it depends on your wall height. ________WINDOW___________________ |* RADIATOR | \ | \ | \ | | | A tutorial how a PIR sensor is detecting, using the Fresnel lens. To understand that the PIR is detect areas of "heat" and "cold" I have just find out the same problem with one of my nodes that have a HC-SR501 motion sensor. It is a Arduino 5v with the same sketch as 3 other nodes. It updates every second and i have it right now in a closed box so it shuld not trigger any motion. I have tried to clearEEPROM and tried again, but i get the same result. What can i do? - sundberg84 Hardware Contributor last edited by @ErrK try to rewire the node - you can also measure if the signal pin from motion sensor is high all the time. @sundberg84 thanks. I will try it. @ErrK I had similar problem with my hc-sr501 pir. It seems that some pirs are very sensitive to any electromagnetic noise. For me pir was reporting false positives each time nrf was sending data. You can easily test it: just remove any gw.send commands and solder led to pir output (of course through 1k resistor). When pir is detecting a motion output goes high so led will go on for the time set by pir potentiometer. In my case each sending (when for example battery level was reported each 30 min) resulted in false pir trigger. It seems that this depends on specific device. I switched pirs between my sensors and this false triggering went to other node Finally I solved this problem in software. I can share my sketch that is working well for two of my nodes. Btw: there are many discussions on the web about those pir false triggering concerning remote radio nodes. I took the idea of software solution from there. Of course in your case reasons can be different... @Maciej-Kulawik Thanks. Today my second node started to do this too. I have tried to change the HC-SR501 and the problem seams to be on the node and not on the sensor. Can i see how you fixed this in the sketch? - Jan Gatzke last edited by I have solved this by reading the status of the HC-SR501 twice. Works finde for me. boolean tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH; Serial.println(tripped); if (tripped==1){ //wait delay(100); //read the pin again tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH; if (tripped==1){ gw.send(msg2.set(tripped?"1":"0")); // Send tripped value to gw } } - robosensor last edited by The same problem for me. Different HC-SR501 sensors (connected to one of three nodes with this sensors) periodically entering "flood mode" with continuous sending 1/0 values. I suspect that this is power supply related problems. I have for a sonar sensor (Ultrasonic Module HC-SR04) used in RPI and written in Python, used to measure 3 times and if all 3 measurements are same, then result is valid and data send. This is working perfect for me. You can create something similar for your Arduino intdistance = 0 distance = -1 continueLoop = True log.debug("Loop until distance1 = distance2 = distance3") while(continueLoop): #distance = ser.read(size=3) distance = ser.readline() getValue1 = distance.rstrip('\r\n') log.debug("distance1: %s", getValue1) distance = ser.readline() getValue2 = distance.rstrip('\r\n') log.debug("distance2: %s", getValue2) distance = ser.readline() getValue3 = distance.rstrip('\r\n') log.debug("distance3: %s", getValue3) distance == getValue1 if getValue1 == getValue2 and getValue2 == getValue3 : continueLoop = False intdistance = int(distance) log.info("distance: %d to be sent to Agocontrol", intdistance) - Jan Gatzke last edited by @robosensor Have you tried to enable the ibternal pullup for the pin? - robosensor last edited by @Jan-Gatzke said: @robosensor Have you tried to enable the ibternal pullup for the pin? Didn't read biss0001 datasheet, so I don't know is output pin 5V-compatible (for pullup) or not, so I didn't tried to enable internal pullup. In any case I will try to check what happens with OUT pin of module during this 1/0 flood. Thanks @Jan-Gatzke it did not work for me this time. I'm using a 5v Arduino Pro mini and when i measure the power on the HC-SR501 i get 3.71v. When i measure the power on the VCC i get 3.69v and when i measure the RAW i get 5.43v. Here you can se how everything is wired, I use the Easy/Newbie PCB by @sundberg84. First i used the 5v cable to the raw on the PCB and then it did't work. When I change to connect to the PWR then it works. Don't know why. Maybe @sundberg84 know why? - sundberg84 Hardware Contributor last edited by sundberg84 Work your way backwards with the multimeter. Are you powering with 5v there shouldnt be a drop to 3v. Check volt over arduino and then vcc output. As i said work you way backwards in the circuit. I suspect a faulty hardware somewhere, measure the input and output on the voltage regulator on the arduino. @ErrK In my case PIR switches into HIGH for some seconds (depending on potentiometer), so reading after 100ms will give the same value. @ErrK Unfortunately my solution is not 100% reliable. For 2 of my nodes it works well, but for 3rd node (the same hardware, the same sketch, only PCB is a little bi different - previous version, but difference only in dimension) - pir is false triggerring almost each minute (sometimes with 2 minutes delay with false triggering). And I checked - it is not caused by NRF sending. I have no idea whats going on. @Maciej-Kulawik , how are you powering the node? I had once a PIR false-triggering due power instabilities... - fifipil909 last edited by Hi, i'm wanted to share my experience also with those sensor. I had a lot of issue with false trigger when running on 3.3V. In my case the power was definitely the issue. it's looks like sleeping the radio/mcu cause some noise on the voltage line. I solve 100% of my false trigger issue when doing a small sleep, before enabling the sleep with interrupt. gw.sleep(500); gw.sleep(INTERRUPT,RISING, SLEEP_TIME); @rvendrame I'm powering all with 2xAA baterries. On PIR I removed regulator. The problem with false trigerring is independent from voltage level. It is the same if I put old baterries (2,8V) or brand new (3,2V). @fifipil909 I also suspect that it is somehow connected to powering noises and mcu sleeping. In my one case PIR is triggering each minute - and sleep time is also one minute. @Maciej-Kulawik , maybe if you try to power the PIR with +5V for a while and watch the results? Don't forget to keep all GNDs inter-connected... I'm also having this issue at 3V. It gets triggered if there is a (little) voltage drop. All my pirs only wake with an interrupt and no timer, then it works fine. But with a sleep timer it won't work the normal way. At 5V everything works fine. Maybe @fifipil909 's solution works. - ahmedadelhosni last edited by I was testing the below sensor with 3.3v and it was reporting false status. It worked well with 5v. Although the site claims it works between 3 to 5 volts. Maybe power issues @ahmedadelhosni All those PIRs are built using the same chip. All all have 3,3v regulator onboard, so they always work with 3,3v. I don't understand why powering directly with 3,2v from battery makes so trouble. Maybe this LDO regulator adds some additional stabilisation/filtering on power line, when powered with greater voltage... @Maciej-Kulawik It can be that the on-board LDO needs more than 3.3v to activate. It maybe even dropping the voltage from batteries, and doing nothing but disturbing Maybe it worth to remove it when running the circuit with 3V from batteries. @rvendrame But I work only with pirs with ldo removed (and diode). @Maciej-Kulawik if so, your PIR looks to need at least 3.3V, so the ~3V from 2xAA is not enough and it is causing instabilities (probably the same as reported by others here). - ahmedadelhosni last edited by @Maciej-Kulawik I didnt know that info. Thanks. Did you guys get them working? I tried to power the pir sensor via the "H" pad directly with 3.3V from a boost converter (via a coin cell). Now I get random readings that I didn't have when using a stable 3.3V source. Any ideas how to solve this? I haven't (yet) removed the voltage regulator on board. Perhaps that might help... I have the same issue first when I tried to power the PIR with the VCC from the arduino mini pro 3.3V. It seems like the PIR does not work with 3.3V. Now I power the PIR directly from the 9V battery. Problem solved. - fifipil909 last edited by Hi, False detection is only due to power stability issue. Personnaly i remove the regulator and power the PIR without any boost on the VCC pin. Even below 2v the PIR continue working without any a single issue. Did you try to do a small delay before sleeping with interupt ? See my post a bit upper. For me it solve all my false trigger issue. - m26872 Hardware Contributor last edited by I know this thread's about hc-501. But I guess one can apply some of my hc-505 (mini-pir) experiences from here: Same problem here every time m node wake-up I have a false trigger. With delay (@fifipil909) it's not better Mhm I still have strange results from my PIR sensor (doesn't even seem to be the wake up that influences them). I have the pir with diode and voltage regulator removed powered by a boost converter with the low pass filter and a pull down resistor. Using a clean 3.3V worked though, but I really want to use batteries (with sometimes less than 3V). Directly powering the sensor with the 2.x V did not work either. For one of the guys with working sensors: what is your exact setup? None of the tipps I found seem to work. I would really love to get one sensor running. Only idea I still have is to try with another sensor. Here is the code I am currently using: #include <MySensor.h> #include <SPI #ifdef DEBUG #define DEBUG_SERIAL(x) Serial.begin(x) #define DEBUG_PRINT(x) Serial.print(x) #define DEBUG_PRINTLN(x) Serial.println(x) #else #define DEBUG_SERIAL(x) #define DEBUG_PRINT(x) #define DEBUG_PRINTLN(x) #endif MySensor gw; // Initialize motion message MyMessage msg(CHILD_ID, V_TRIPPED); void setup() { DEBUG_SERIAL(9600); // <<<<<<<<<<<<<<<<<<<<<<<<<< Note BAUD_RATE in MySensors.h DEBUG_PRINTLN("Serial started"); gw.begin(); // Send the sketch version information to the gateway and Controller gw.sendSketchInfo("Motion Sensor Test", "24052016"); pinMode(DIGITAL_INPUT_SENSOR, INPUT); // sets the motion sensor digital pin as input // Register all sensors to gw (they will be created as child devices) gw.present(CHILD_ID, S_MOTION); } void loop() { // Read digital motion value boolean tripped = digitalRead(DIGITAL_INPUT_SENSOR) == HIGH; DEBUG_PRINT("Got tripped: "); DEBUG_PRINTLN(tripped); gw.send(msg.set(tripped?"1":"0")); // Send tripped value to gw DEBUG_PRINTLN("Sleeping till next interrupt"); // Sleep until interrupt comes in on motion sensor. Send update every two minute. //gw.sleep(INTERRUPT,CHANGE, SLEEP_TIME); // Sleep until interrupt comes in on motion sensor. Won't wake up otherwise gw.sleep(500); gw.sleep(INTERRUPT, CHANGE, 0); //gw.sleep(INTERRUPT, RISING, 0); } Does anyone have an idea how to get the pir sensor running with a coin cell? Or perhaps if that doesn't work with 2 aa's? See my post above - Luca Fabbriani last edited by Sorry for necroposting on my first forum post but I have the exact same issue at the moment. I power PIR sensors from the same 3.3V switching regulator that powers an esp12 module. I took off the anti-inversion diode and the linear regulator, added a 470uF and 100nF capacitor on the sensor supply input. This has been done to two sensors, one is working flawlessly the other one has a false trigger once every half an hour. Adding HF and LF bypass capacitors with some improvement told me that was a supply instability issue but it's not solving the problem completely. My suspect is that the polarity inversion diode that I took off had a role in the play improving the supply voltage stability.....I'll try to put back the diode and I'll let you know. cheers Luca
https://forum.mysensors.org/topic/3287/motion-sensor-triggering-on-its-own/13
CC-MAIN-2019-22
refinedweb
2,378
66.33
autobox::Closure::Attributes - closures are objects are closures use autobox::Closure::Attributes; sub accgen { my $n = shift; return sub { $n += shift || 1 } } my $from_3 = accgen(3); $from_3->n # 3 $from_3->() # 4 $from_3->n # 4 $from_3->n(10) # 10 $from_3->() # 11 $from_3->m # "CODE(0xDEADBEEF) does not close over objects." At that moment, Anton became enlightened. This module uses powerful tools to give your closures accessors for each of the closed-over variables. You can get and set them. You can get and set arrays and hashes too, though it's a little more annoying: my $code = do { my ($scalar, @array, %hash); sub { return ($scalar, @array, %hash) } }; $code->scalar # works as normal my $array_method = '@array'; $code->$array_method(1, 2, 3); # set @array to (1, 2, 3) $code->$array_method; # [1, 2, 3] my $hash_method = '%hash'; $code->$hash_method(foo => 1, bar => 2); # set %hash to (foo => 1, bar => 2) $code->$hash_method; # { foo => 1, bar => 2 } If you're feeling particularly obtuse, you could do these more concisely: $code->${\ '%hash' }(foo => 1, bar => 2); $code->${\ '@array' } I recommend instead keeping your hashes and arrays in scalar variables if possible. The effect of autobox is lexical, so you can localize the nastiness to a particular section of code -- these mysterious closu-jects will revert to their inert state after autobox's scope ends. Go ahead and read the source code of this, it's not very long. autobox lets you call methods on coderefs (or any other scalar). PadWalker will let you see and change the closed-over variables of a coderef . AUTOLOAD is really just an accessor. It's just harder to manipulate the "attributes" of a closure-based object than it is for hash-based objects. <#moose:jrockway> that reminds me of another thing that might be insteresting: <#moose:jrockway> sub foo { my $hello = 123; sub { $hello = $_[0] } }; my $closure = foo(); $closure->hello # 123 <#moose:jrockway> basically adding accessors to closures <#moose:jrockway> very "closures are just classes" or "classes are just closures" Shawn M Moore, sartak@gmail.com The "WHAT?" section is from Anton van Straaten: my $code = do { my ($x, $y); sub { $y } }; $code->y # ok $code->x # CODE(0xDEADBEEF) does not close over $x This happens because Perl optimizes away the capturing of unused variables. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
http://search.cpan.org/~sartak/autobox-Closure-Attributes-0.04/lib/autobox/Closure/Attributes.pm
CC-MAIN-2015-11
refinedweb
396
55.88
26 October 2012 06:40 [Source: ICIS news] By Helen Yan ?xml:namespace> SINGAPORE Availability of lower-priced material coming from eastern Europe will further weigh on Asian BR values into next month, they said. Spot BR prices were assessed at an average of at $2,650/tonne (€2,041/tonne) CFR (cost and freight) NE (northeast) “We lost out one contract for November and December delivery of BR to a European supplier who quoted much lower than our offers,” a northeast Asian BR producer said. BR from east Demand in Europe is slumping amid the ongoing eurozone debt crisis, prompting that region’s producers to export more to Asia, where demand, although soft, has not fallen as steeply as in “Some European BR suppliers have been very aggressive in the Indian market and we have been getting very competitive offers from them. We expect BR prices to drop lower to around $2,500/tonne CFR India in November,” an Indian buyer said. Falling prices of feedstock butadiene (BD) are also dragging down BR values. “Demand for BR is flat and we have revised our BR offers down in line with the drop in the feedstock BD price,” a northeast Asian BR producer said. BD prices were assessed at $1,840-1,860/tonne CFR NE Asia on 19 October, down by about $50/tonne from the previous week, according to ICIS. “Bids for BR are at around $2,650/tonne CFR NE Asia or lower than this level as demand for BR is very weak in Demand for BR is expected to remain weak in Asia as indicated by falling vehicle sales and cuts in production by automakers in The country’s territorial dispute with In September, Toyota Motor Cop saw a 48.9% year-on-year slump in car sales
http://www.icis.com/Articles/2012/10/26/9607140/asia-br-price-pressures-heighten-on-supply-from-east-europe.html
CC-MAIN-2014-41
refinedweb
302
51.41
This on the service at the client Side. Flow of the Article Step 1: Create Database I have created a table named “WCF”. This table got two columns Name and EmpId. Both are of data type nvarchar. EmpId is primary key. Step 2: Create Data Model - Open Visual studio, select File->New->Project->Web->ASP.Net Web Application. Give any meaningful name. I am giving name here DataServ. Step 3: Create ADO.Net Data Service Here, we will create ADO.Net Data Service on the data model; we have created in Step 2. - Right click on DataService project in solution explorer and Add New Item. Go to Web tab and select ADO.Net Data Service option. Leave the entire default name or give as of your desire. For me, I am leaving the default names - Edit or modify the WebDataService1.svc.cs as below WebDataService1.Svc.cs - - Right click on solution name in solution explorer and add a New Project by right clicking there. Select WCF Service Application. Give any name , I am giving name here RestTService. - Delete all the default code generated. I am not changing here Contract name and Service implantation name, so it is IService1 and Service1. - Open Web.Config file and delete all the default EndPoint setting or in other words delete System.ServiceModel code. - Open markup of Servic1.svc, by right clicking and selecting View markup and modify the code as below. <%@ ServiceHost Language=”C#” Debug=”true” Service=”RestService.Service1″ CodeBehind=”Service1.svc.cs” Factory= “System.ServiceModel.Activation.WebServiceHostFactory”%> - Now we need to create the DTO class. We will be creating this inside a class library. So to do so, add a new project in the solution of the type class library. Give it name either Businessclass or any name of your choice. - Add a class WCFDTO in the class library project. This class will be acting as data transfer class between REST Service and client. WCFDTO.cs - Compile the project. - Now we will create the contract. Contract got 5 operations. IService1.cs Service implantation Service1.cs -.cs Explanation: - In constructor we are initializing a variable with the base URI of the service. ServiceUri = “”.Trim().TrimEnd(‘\\’);. Update Operation We are calling PUT method of HttpClient class. And passing serialized data contract. Delete Operation We are calling DELETE method of HttpClient class. And passing serialized data on which delete is to be performed. Select Operation We are passing the EmpId to select the particular record. At HttpResponse message, we are getting the XML data and we desearlizing that using theresponse.content.ReadDataContract Load Operation This method will fetch all the records from the table. Here we are desearlizing List of data contract. So, the entire cleint will look like Program.cs Conclusion This article explained about, building a REST ful WCF operation for CRUD operation on a table using ADO.Net Data Service. This also explained how to consume a REST service in a client. Thank you for Reading One thought on “CRUD operation on a REST WCF service” Hi Dhananjay, Thanks for the post. Really appreciate. I created a new application and followed the steps you had mentioned as well downloaded your sample from below link and tried it. Either way i’m getting the below error when trying to get the list of data from DB. Error in line 1 position 7. Expecting element ‘ArrayOfWCFDTO’ from namespace ‘’.. Encountered ‘Element’ with name ‘HTML’, namespace ”. Also when inserting data, the code passes without any error but the database is not getting update. Could you please let me know what might be the problem for the error. Appreciate any immediate help. Thanks, Yuva
https://debugmode.net/2009/12/12/crud-operation-on-a-rest-wcf-service/
CC-MAIN-2022-05
refinedweb
606
61.83
Why? Don't you know about them? This is a discussion on Regulars Who Don't Use Code Tags within the A Brief History of Cprogramming.com forums, part of the Community Boards category; Why? Don't you know about them?... Why? Don't you know about them? I don't when there's not much code needed, like in int i=0; i++; or something like that. With longer chunks, tho, it's really necessary. -Govtcheez govtcheez03@hotmail.com why should I use them? Oskilian Because code looks like **** otherwise.Because code looks like **** otherwise Ramble. Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream. we should deal with the phat threads... i posted it in the mod board a while back, and no result came of it... hasafraggin shizigishin oppashigger... PHP Code: #include <stdio.h> int main(void) { printf("Why don't you guys like PHP? It formats AND colors!\n"); return 0; } Gays can't love like real people entropysink.com -- because arses weren't designed for running websites. the wonders of technology! what next? cows that can fly?
http://cboard.cprogramming.com/brief-history-cprogramming-com/3530-regulars-who-don%27t-use-code-tags.html
CC-MAIN-2014-42
refinedweb
187
80.28
ANNUAL '13 2012 10 PAGES KEY ECONOMIC STATISTICS 17 TOP INDUSTRIES REVIEWED Hiring trends for 2013 revealed Accounting industry to be haunted by regulations Home prices to suffer from abrupt correction in 2013 Foreign law firms dominate Hong Kong Display to 20 December 2013 HONG KONG BUSINESS ANNUAL 2013 1 2 HONG KONG BUSINESS ANNUAL 2013 Contents Annual 2013 2013 OUTLOOK 10 12 14 16 18 20 Hong Kong economy poised for modest recovery by 2013 Hong Kong’s accounting industry to be haunted by regulations in 2013 Home prices to suffer "abrupt correction" in 2013 Retail sector to edge up at a gingerly pace Check out what jobs will be in demand come 2013 Hong Kong legal industry seizes more opportunities for growth 14 MOST READ IN 2012 22 A month-by-month review of Hong Kong’s top stories in 2013 COMPANIES AND INDUSTRIES Demand for home healthcare equipment surges Hong Kong is world’s second largest exporter of computer parts 32 Hong Kong faces intensifying competition in jewellery exports 34 The key to enhance HK’s competitiveness 36 Hong Kong is the world’s 10th largest trading economy 38 Why Hong Kong is a regional leader in construction 40 Hong Kong clothing companies excel in ODM, OEM production 42 A peek inside Hong Kong’s telco industry 44 The key to electronics industry’s success revealed 46 Textiles industry responds swiftly to fashion trends 48 Hong Kong as a major printing center of the world 50 Hong Kong lures more foreign investments in F&B 52 The future of telematics in Hong Kong 54 Lighting companies move their production to China 56 Value of travel goods exports up 14% to HK$35.3b 58 HK’s top market for leather goods revealed 30 28 30 56 BY THE NUMBERS Labour Force, Unemployment and Underemployment Number of Establishments, Persons Engaged and Vacancies (Other than those in the Civil Service) by Industry Section 66 Wage Indices by Industry Section and Broad Occupational Group 69 Salary Indices for Middle-level Managerial and Professional Employees by Selected Industry Section 70 Consumer Price Indices and Year-on-year Rates of Change at Section Level for November 2012 60 61 HONG KONG BUSINESS ANNUAL 2013 3 Contents Annual 2013 72 High-Flyers 2012 72 AIA Pension And Trustee 100 Godiva 102 Hästens Co. Ltd. 76 Ageas Insurance Company (Asia) Limited 78 ALTRUIST 80 AV Consultant (Int ’l) Ltd 82 Canadian International School 84 Chartis Insurance Hong Kong Limited 86 CLP Power Hong Kong Limited 88 Cosmo Hotel Hong Kong Cosmo Hotel Mongkok 90 Bao Gallery by Crystallize•Me Ltd 92 FreyWille 94 Fuji Xerox (Hong Kong) Ltd. 96 Fujitsu 98 Galaxy Macau 4 HONG KONG BUSINESS ANNUAL 2013 82 92 104 Hong Kong Matchmakers 106 HSBC Insurance 108 M800 LIMITED 110 Shama Management Ltd. 112 Rhombus International Hotels Group 114 Standard Chartered Bank 100 (Hong Kong ) Limited 116 The Cityview 118 The Mercer 120 Thomas, Mayer & Associes 122 Ultra Active Technology Ltd 124 Universal Audio & Video Centre 126 Wharf T&T Limited 128 Zchron Design 112 126 HKB INHOUSE AD HONG KONG BUSINESS ANNUAL 2013 5 ANNUAL 2013 Established 1982 Editorial Enquiries: Charlton Media Group 19/F, Yat Chau Building, 262 Des Voeux Road Central Hong Kong. +852 3972 7166 Publisher & EDITOR-IN-CHIEF Associate Publisher Assistant Editor Art Director Editorial Assistant Media Assistant Editorial Assistant Tim Charlton Louis Shek Jason Oliver Jane Kristine Cruz Queenie Chan Daniela Gujilde Alex Wong ADVERTISING CONTACTS Louis Shek +852 60999768 louis@hongkongbusiness.hk Laarni Salazar-Navida lanie@charltonmediamail.com Rochelle Romero rochelle@charltonmediamail.com ADMINISTRATION Lovelyn Labrador accounts@charltonmediamail.com Advertising advertising@hongkongbusiness.hk Editorial editorial@hongkongbusiness.hk PriNting Gear Printing Limited 1/F Express Ind Building 43 Heung Yip Road Aberdeen, Hong Kong Can we help? Editorial Enquiries If you have a story idea or just a press release please Email: editorial@hongkongbusiness.hk and our news editor will read it. Media Partnerships Please Email: editorial@hongkongbusiness.hk and put “partnership” on the subject line and it will forward to the right person. Subscriptions Email: subscriptions@charltonmedia.com Hong Kong Business is published by Charlton Media Group. All editorial is copyright and may not be reproduced without consent. Contributions are invited but copies of all work should be kept as Hong Kong Business can accept no responsibility for loss. We will however take the gains. Sold on newstands in Hong Kong, Macau, Singapore, London and New York *If you’re reading the small print you may be missing the big picture 6 HONG KONG BUSINESS ANNUAL 2013 HONG KONG BUSINESS ANNUAL 2013 7 SINGAPORE BUSINESS REVIEW | JUNE 2012 49 OPINION HEMLOCK The Joys Of Charging Non-Residents More HEMLOCK hemlock@hellokitty.com O ne quick way of reducing Hong Kong’s air pollution would be to raise cross-harbour tunnel tolls. The main (Causeway Bay-Hung Hom) tunnel’s toll has been HK$20/HK$10 for cars/taxis for what seems like decades. Increase that charge, say, fivefold and cut the other tunnels’ fees by a few bucks, and you would almost certainly migrate a lot of commuters onto buses (currently underutilized) and trains, and spread the rest out onto the less popular routes, thus reducing congestion significantly. It won’t happen because assorted vocal scumbags who want to leech off the rest of the population one way or another would wet themselves about the ‘unfairness’ of it all and the supposed impact on their sorry livelihoods. By contrast, the charges for non-residents at public hospitals went up relatively recently – a mere nine years ago. As for residents, these are flat-rate per-day fees in basic categories like out-patient, in-patient and intensive care; you do not get an itemized bill for each test, procedure or drug. The decision to raise the charges for what are mainly in practice visitors and not for locals seems a bit illogical – if costs rise, they rise for all users. Since raising the rock-bottom hospital bills for entitlement-minded residents would be near-impossible, the obvious thing to do would be to just leave this whole area alone. For some reason, officials want to go ahead and push up nonresidents’ charges. If the only people affected were tourists, it would be no big deal. But Mainland spouses of Hong Kong residents count as non-res. Cue a great wailing and gnashing of teeth, as affected Hongkongers complain that it’s ‘unfair’ and Chief Executive CY Leung’s enemies in the Legislative Council pounce with glee on another policy to fight to the death over. On the face of it, Mainland spouses are indeed non-residents, so should be treated as such, and the Court of Final Appeal endorsed the principle earlier this year (concerning maternity fees). However, the disgruntled have a point. If a Hongkonger marries someone from Timbuktu, Greenland or Tahiti, the spouse gets to live here instantly with an ID card, thus cheap local hospital bills. Marry a Mainlander, and your spouse joins a lengthy waiting list to come here. It is hard to see why the government is choosing this particular fight. Maybe the idea is just to burden Legco’s oppose-everything brigade with yet more causes. Far better to clamp down on the great tourism menace. I’m not sure what free meds columnist Lau Nai-keung is getting from Queen Mary’s these days, but his lapses into lucidity seem to be getting more frequent – to the extent that we’re in danger of missing the rabid mouth-frothing venom and hate of past times. In an article on thinking out of the box, he questions the value of the tourism industry and asks why no-one proposes slapping a hefty tax on all the designer-label junk visitors buy, so at least we get some revenue out of it (and hopefully drive some of the crowds away). Hong Kong has long been in a trance about tourism. Years of official boasting about rising visitor numbers have left people unable to imagine that the industry might cost most of us more than it’s worth. The equation for finding out would start with what visitors spend, 8 HONG KONG BUSINESS ANNUAL 2013 then subtracting how much of it promptly leaves the city’s economy (most of it, given that we don’t manufacture the junk). You would also include luxury retailers’ higher rents, at least some of which will also end up overseas as part of big landlords’ offshore investment portfolios. And you would add luxury retail outlet staff’s incomes, minus what they were earning before the tourism boom drove their locally-oriented employers out of business. Then we get to the fun part: the externalities. This includes the costs arising from the extra pollution caused by tour buses, like the medical treatment of additional cases of pulmonary diseases. It includes the cost of cleaning up the wee-wee and other items deposited in public areas by tourists. It includes the cost of extra time it takes locals to buy things they need after their local shops close down, or the higher prices for infant formula in their neighbourhood. And of course it includes the rising rents that surviving locally-oriented retailers pass on to us. Then there is the mental stress, as I, and a million others, get increasingly irritated at having to drag Japanese, European and the inevitable Mainlanders out of the way every time I go to my local 7-Eleven for a few cans of drink. (I can say “Who said you can come to this neighbourhood?” in Korean, Italian and Polish.) Net outcome, probably: a few landlords and luxury brands are raking in billions that won’t trickle down, some retail workers might have seen a pay rise, while the other 98% of us are net financial losers – subsidizing the landlords and designer labels. It’s a parasite industry, and we should start spraying some DDT. This is a battle nearly all parts of the non-tycoon part of the population could agree on. But it’s ‘a pillar industry’, and ‘less tourists = more wealth’ is too counterintuitive for most people to bear. At least we could put cross-harbour tunnel tolls up for non-residents. Banking Technology news transmitted daily on asianbankingandfinance.net Get daily industry specific news for Banking Technology only at asianbankingandfinance.net Click on the right hand side under sections to get your industry content, your way. Sign up for the weekly Banking Technology newsletter. Only at asianbankingandfinance.net HONG KONG BUSINESS ANNUAL 2013 9 ECONOMIC OUTLOOK Hong Kong economy poised for modest recovery by 2013 GDP expected to grow but below long-run potential of 4.5% E xperts believe that the economic outlook of 2013. Hang Seng Bank economist Ryan Lam points out that the quarterly growth trajectory will be similar to what happened in 2012, with a slow start and gradually gaining traction from 2Q13. “Marginal improvements in exports and steady consumption will serve to lift Hong Kong’s GDP growth to 3% in 2013, from an estimated 1.5% in 2012 but still below its long-run potential growth of around 4.5%,” he says. Nomura shares the same view adding that fiscal stimulus and a moderate improvement in external demand are expected to lift real GDP growth from 1.2% in 2012 to 2.5% in 2013. Nomura’s analyst Young Sun Kwon believes that Hong Kong’s fiscal stimulus in 2013 will be expansionary as the budget for fiscal year 2012 includes not only inflation-mitigating measures but also an income tax reduction for individuals of up to HK$12,000 per person and a 14.8% increase in capital expenditure. “We 10 HONG KONG BUSINESS ANNUAL 2013 “Hong Kong’s fiscal stimulus in 2013 will be expansionary." expect the FY13 budget to also be expansionary given that external demand remains weak. We also expect the government to continue implementing more macro-prudential property tightening measures, such as hikes in stamp duty if house prices continue to rise, although so far these piecemeal measures have had limited success in cooling the property market. Because of the USD/HKD peg, Hong Kong is importing the super loose monetary policy of the US, and it remains unclear whether tighter macro-prudential measures can provide a sufficient offset in the long run,” says Young. second quarter. An exports recovery began in August and picked up momentum in September. Domestic demand remains strong, especially in relation to the property market. There is a recovery underway in much of the region that should result in a similar recovery in Hong Kong’s fourth quarter. On the mainland, monetary easing and investment approvals are restarting the investment cycle and should mean that third quarter GDP growth was the trough. A recovery on the mainland will boost Hong Kong’s re-export business, as well as the offshore renminbi market and finance sector in general,” he says. Optimistic Moody’s Analytics analyst Alastair Chan is the most optimistic noting that GDP could accelerate to as high as 3.3%. Chan believes that there are already signs that the city-state is turning a corner starting 3Q12. “Hong Kong’s economy recovered in the third quarter after a contraction in the Trade Incoming trade figures have been highly volatile over the past two months but Hang Seng Bank believes that Hong Kong’s seasonally adjusted growth suggests the export sector has been on the mend since September. Exports unexpectedly dropped 2.8% in October, after a strong gain ECONOMIC OUTLOOK of 15.2% in September. Lam notes that the significant volatility likely reflected both the base effect due to a strong October growth last year at +11.5% as well as launch of major tech products in October. “Overall, we expect a sustained recovery to prevail in the course of 2013. The International Monetary Fund projects that the growth of global economy will accelerate from 3.3% in 2012 to 3.6% next year. Our study finds that a 3.6% rise in the global GDP translates into a 10.4% export growth in Hong Kong. Of note, the export growth has been about five percentage points below the growth rate implied by the regression analysis since 2011, probably due to stronger structural headwinds such as rising labor costs in the mainland and faster relocation of low-end manufacturing enterprises to the ASEAN countries,” says Lam. Trade balance Moody’s Analytics notes that Hong Kong’s trade balance remained firmly in deficit even as trade is picking up in the region and across the world. The situation however, it says, is expected to improve come 2013, thanks to China boosting Hong Kong’s re-export business. “Recent data show firming domestic demand in China, which accounts for 52% of Hong Kong’s trade. China’s industrial production (+9.6%), fixed asset investment (+20.7%) and retail sales growth (14.5%) accelerated year over year in October. Purchasing managers’ indexes confirm that trend continued in November. Fixed investment is growing on account of stimulus measures enacted since the end of 2011 and steady approvals of infrastructure projects, which is supporting gains in electricity, rail equipment and crude oil output. This all should support Hong Kong’s manufacturing exporters,” it says. Hong Kong’s trade deficit narrowed to HK$42.7 billion in October from September’s HK$45.2 billion. Labour market Hang Seng Bank believes that the unemployment rate may rise in a way to reconcile the discrepancy with lackluster economic performance since 1Q12 but it does not see much risk for a spike in the jobless rate beyond 4%. “A closer examination of the job figures suggests that structural factors might have played an important role in improving the resilience of the labour market. The key difference between the current and previous downturns is that manufacturing, import & export trade, wholesale & retail and transportation & storage sectors, which tend to be hardest hit by the global slowdown, are much less labour intensive than they were a decade ago. Specifically, it takes at least 20% less amount of workers to produce one unit of output in these sectors. The fact that the hardest-hit sectors contribute much to GDP but relatively little to employment, help explain why jobless rate is not responsive to the slowdown in GDP growth,” Lam says. Consumption Hang Seng Bank says that the Quarterly projection for Hong Kong GDP (% YoY) Sources: Census & Statistics Department of HKSAR Reuters EcoWin, Hang Seng Bank “Recent data show firming domestic demand in China, which accounts for 52% of Hong Kong’s trade." momentum gained in consumer spending, which now accounts for 66% of real GDP, will carry over into 2013 since labour income growth has been on a positive trend and wealth effects have turned from neutral to positive. Retail sales growth volume increased by 8.5% y-o-y in September from 3.2% in August while the PMI rose to 50.5 from 49.6. Hang Seng Bank however cautions that renewed inflation pressure will weigh on purchasing power to some extent. Nomura believes that domestic fixed asset investment will also give a boost to private consumption but Hang Seng Bank cautions that the scale and timing of any re-acceleration in capital spending remains the principal source of uncertainty among the GDP components. Lam notes that firms have not been steering away from long-term capital expenditure plans so far. “Growth in gross fixed capital formation is 8.8% year-todate and this might allude to some underlying improvement in corporate confidence. On the back of the ongoing acceleration in infrastructure projects of the authority and a steady property market, capital expenditure on building and construction is expected to witness eye-catching growth. The investment cycle in machinery and equipment should remain strong as well for a variety of reasons, ranging from reduced macroeconomic uncertainty, exceptionally low funding cost, to improving foreign direct investment in Hong Kong,” he says. Inflation Renewed capital inflows and further asset market rallies pose as upside risks to the inflation outlook for the year ahead. Hang Seng Bank believes that inflation is likely to be higher by mid2013 than it is now in the territory. CPI inflation ticked up to 3.8% y-o-y in October from 3.7% in September on food prices. “Headline inflation will rebound gradually throughout next year, reaching 5% by year end and averaging 4.3% for the whole of 2013,” says Lam. Nomura agrees while noting that the uptick will be partly offset by inflation-mitigating fiscal measures such as a temporary waiver of public housing rent and electricity subsidies. “We expect CPI inflation to rise from 4.0% in 2012 to 4.3% in 2013,” says Young. HONG KONG BUSINESS ANNUAL 2013 11 ACCOUNTING OUTLOOK Hong Kong’s accounting industry to be haunted by regulations in 2013 IPOs are also expected to finally rebound, and more Chinese firms are seen to merge with local firms. H ong Kong’s accounting industry has been mired in different challenges over the years, most of which involve fast-changing rules and regulations that affect every firm’s client such as accounting standards, disclosure requirements, listing and corporate governance rules. The inevitable link between China and Hong Kong is also one of the biggest factors affecting the industry. Against this backdrop, accounting firms strive to stand out in the market by embracing change and offering quality service to their clients. According to Roy Lo, deputy managing partner at SHINEWING, they have witnessed the rapid growth of China, in which Hong Kong accountants have been playing an increasingly important role. Lo is expecting a positive outlook on the 12 HONG KONG BUSINESS ANNUAL 2013 “the IPO market in Hong Kong has become rather quiet in the past few months with fewer companies going listed." accounting industry in this coming 2013, based on the fact that the capital market in China will continue to flourish. He adds that the demand for professional accountants would remain high as China’s economy is boosting. And the demand is not just in the auditing and tax field, but increasing number of specialists are also required in other new scopes, such as risk management, internal control, corporate governance, forensic accounting and corporate finance. IPOs will finally rebound Ernst & Young notes that after a slow start to 2012, momentum lifted in the second quarter, but significant macroeconomic volatility and changes in political leadership in many parts of the world weighed on global IPO activity for the remainder of the year. However, Lo reckons that while the IPO market in Hong Kong has become rather quiet in the past few months with fewer companies going listed, he sees more PRC companies going to Hong Kong for listing in 2013. “Our estimation is that the number could reach around 100.” The Hong Kong, Shanghai and Shenzhen exchanges only completed 214 deals which raised US$27.9b, down 62% by capital raised compared to 2011. According to Jacky Lai, assurance partner at Ernst & Young, despite investors showing signs of scepticism, the Greater China market has seen signs of improvement in the last quarter – thanks to the People’s Insurance Co of China raising US$3.4b, the largest deal on HKEx ACCOUNTING OUTLOOK this year. Ernst & Young also expects to see more H-share IPO offerings in Hong Kong following the introduction of new supportive policies that allow medium to small privately-owned enterprises to list in Hong Kong’s H-share market. Ringo Choi, Asia-Pacific IPO Leader at Ernst & Young, agrees with Lo’s positive outlook for IPOs in 2013 as he notes that many new supportive policies - which were on hold amid leadership change – will start to take effect. They include economic initiatives that will be rolled out in the Mainland and expected to benefit companies in certain preferential sectors. “With expected reduced stock market volatility, supportive new economic policies, and better and brighter economic prospects, IPO activities in the latter half of 2013 is set to improve – suggesting that it could be the right time for companies currently in the pipeline to list next year,” he adds. More merging firms More Chinese accounting firms are looking to merge with Hong Kong firms in 2013, says Lo. SHINEWING is actually the first of its kind, a PRCbased firm that has integreated with a local company. Such integration will be a trend, notes Lo, and is powerful in creating synergy, in terms of deep indigenous knowledge, extensive network and strong manpower resources. A majority of listed companies in Hong Kong come from PRC. “Under integration, the PRCbased accounting firms could utilize their profound knowledge of the development of China’s capital market as well as the business practices of those PRC firms, while the Hong Kong-based accounting firms could make use of their familiarity with the listing requirements and procedures in Hong Kong,” says Lo. This way, both firms could establish a platform bridging between Chinese financial practices and international accounting standards, offering the genuine integration for clients in China, Hong Kong as well as overseas. Another pressing challenge that the industry will be facing in 2013 is dealing with regulations. As Andrew Ross, managing director at Baker Tilly Hong Kong puts it: “There are only three key issues for the Hong Kong accounting industry in 2013: regulation, regulation, regulation.” Haunting regulations The first, but continuing issue is that of the US regulators, the SEC and the PCAOB, requesting information from Hong Kong audit firms about the audits of their PRC clients which are registered in the USA, notes Ross. He adds that the SEC, and more recently the SFC (HK’s equivalent of the SEC) has taken legal action against a number of audit firms to try to obtain the audit information and, subsequently, to charge the firm with regulatory breaches when they refuse to provide the information. The core of the issue, reckons Ross, is that the PRC authorities (nominally the CSRC) forbid PRC companies and their auditors from releasing this information to foreign regulators on the grounds that it may contain ‘state secrets.’ The problem is, of course, that PRC authorities can and often do, regard all information in or about the PRC as ‘state secrets.’ “Consequently, the auditors are caught in a regulatory sandwich between the increasingly aggressive demands of the SEC and the stonewall position of the PRC authorities. The SEC actions follow on from the more restrained, but persistent and continuing, efforts of the PCAOB. It is reported that around 15 HK audit firms have been subject to SEC/ PCAOB examination,” adds Ross. Another key issue to watch out for in 2013 is the introduction of statutory enforcement of Hong Kong’s ‘continuous disclosure’ regime for ‘price sensitive information’ or PSI. Hong Kong, like Australia, Singapore, and Malaysia, has a continuous disclosure requirement for release of PSI by listed companies. There are carve-outs and safe harbours in all the continuous disclosure jurisdictions but whether these protections are available to the company in any particular situation can be very difficult to judge, reckons Ross. The new PSI Law begins operation on 1 January 2013 and will be operated by the SFC but Ross reveals some trepidation amongst directors and company secretaries about how aggressive the SFC enforcement of the Andrew Ross Roy Lo new PSI will be. The new statutory penalties include barring officers from managing a listed company and barring them access to the financial markets for up to 5 years, costs of the investigation and prosecution and a fine on each guilty officer of up to HKD8 million (USD1 million). “Given that the previous SEHK prosecutions seemed to run at about one or two cases per month, these fears may be well founded,” warns Ross. From the FRC to HKICPA Lastly, the pending transfer of audit practice review responsibilities to the Financial Reporting Council or FRC is also expected to make a noise in the industry in 2013. While the FRC’s main work is to regulate financial reporting by HK listed companies and the auditor’s work on those financial reports, the job has inevitably been focused on the work of auditors rather than the responsibilities of the directors of listed companies. Ross notes that the HKICPA, the statutory body responsible for registration and regulation of accountants, has run a full-on programme of practice review by HKICPA staff for over 20 years. But the government has decided that the practice review should be transferred to the FRC as the HKICPA is not perceived overseas as a body independent of the profession. “In my view, this reason is a triumph of form over substance because in my lengthy and extensive experience in regulation in a number of countries, the HKICPA regulatory performance in terms of response, investigation and prosecution is amongst the most (if not the most) thorough and aggressive in the World. It is certainly much more active and successful than most formally independent accounting regulators that I have had experience of in other countries,” he says. All this comes on top of the perennial issues such as: the world economy; squeeze on audit fees; retaining staff during a market downturn; staying competitive etc; which all seem relatively pale compared to the three Kings of the three regulation issues, Ross concludes. HONG KONG BUSINESS ANNUAL 2013 13 PROPERTY OUTLOOK Home prices to suffer "abrupt correction" in 2013 Experts note some pieces of evidence that HK’s housing investment appeal is waning. T he International Monetary Fund recently warned that the property sector remains the main source of economic risk in the city-state by 2013. It cautioned that the sharp rise in Hong Kong's home prices especially in the mass market segment has spurred the chances of an ‘abrupt’ correction that could severely batter the economy. Home prices in 2012 rose by 20% which was twice that of late 2008. IMF says that half of the outstanding loans are currently from the property sector, and the use of real estate as collateral also poses risks. Moving forward, many believe that housing market may be set to boom further following the U.S. Federal Reserve’s announcement of a third round of quantitative easing. Some indications of a waning investment appeal of the city-state’s housing market however emerged recently. Property investments Colliers International predicted a promising year for Hong Kong’s property market in 2013 except for 14 HONG KONG BUSINESS ANNUAL 2013 "Home prices especially in the mass market segment has spurred the chances of an 'abrupt' correction that could severely batter the economy." the residential sector, especially the luxury segment due to government cooling measures. Colliers notes that investment appetite shifted to the office sector which was particularly evident after the extension of Special Stamp Duty (SSD) and implementation of Buyers’ Stamp Duty in the residential market. Nomura believes likewise while noting that apart from the cooling measures that have brought policy risk back to the fore, affordability and growth will be the dominant themes in 2013, with the property market walking a tightrope between growth and inflation. “As growth slows and the marginal price setter becomes increasingly elusive, the affordability issue will re-engage. Conversely, if growth accelerates, interest rates may rise earlier than expected. In either case, we expect physical prices/rents to stall with only a mid-single digit annual rise over the next two years.” Nomura says that there are some disturbing undercurrents developing behind the seemingly fairly healthy fundamentals of the property market. Private median household income vs housing rents for instance suggests that in order for rents to catch up to incomes, there is scope for rents to rise another 28%. Nomura however cautioned that income growth is slowing – although the private median household income rose by 7.1% y-y in 2Q12, this is much slower than the 12% y-y increase in incomes in 2Q11. Having peaked at 14.8% y-y in December 2011, the household income growth rate has slowed for two quarters already. “Given the recent push back on next year’s planned minimum wage hike to HKD30/hour and the continued pressure faced by the financial services industry, we see a real risk that income growth will continue to slow.” Residential market Residential sales started 2012 with a volume rally in the 1Q, which weakened soon afterwards particularly on the luxury market. The average luxury residential price increased by PROPERTY OUTLOOK 4% between January and October but Colliers sees downward adjustment pressure and expected it to soften to the end-2011 level in average by the end of 2012. With the government’s intention to curb speculation in the housing market and the implementation of BSD, end users are expected to dominate the market, says Colliers. “Short-term price consolidation is anticipated in 4Q 2012 and 1Q 2013 while end users are expected to return to the market after the Lunar New Year when lenders become more active in offering mortgage loans.” Colliers projects the average luxury residential rent and price to edge down by 5% and 10% respectively. Dragon babies Nomura meanwhile is not seeing the usual boom in Dragon babies spurring demand. .” Looking over the past two years, overall private housing sales declined by 37% in 2011 which experts say is understandable given government measures. But Nomura says that it is important to note that in 2011, the top end was still relatively resilient, falling by only 3%. Comparatively, in the first ten months of 2012, while home prices had rallied by 20%, volume had continued to contract by 5%. More importantly, this 5% decline in volume was nearly across the board. “Stripping out the primary market where the developers’ product offerings could distort the picture, in the secondary market, we see that the HKD5-10mn category was the only segment to see a rebound of 6%. Combined with the change in transaction velocity that our mainland demand survey shows, this suggests that demand is now very narrow and is largely driven by local end-users.” Nomura believes that investment appeal of Hong Kong housing to mainlanders has now been greatly diminished only by looking at the yields that have compressed since 2010. “Over the past two years, mass housing yields have compressed from 3.62% to 3.20%, while luxury housing yields have come down from 2.68% to 2.41%. While headline deposit rates are still at 0.01% and there is still arguably positive carry on mortgage rates around 2.1%. Grade A office market Colliers projects that despite tenants’ sustained cautious attitude on their Private housing sales by price range Source: Centaline, Nomura Research “In the first ten months of 2012, while home prices had rallied by 20%, volume had continued to contract by 5%, nearly across the board." operation cost, limited supply and an increase in leases due to expire in late 2013 are expected to fuel the average Grade A office rent to rise by 5% and office price by 9% over the next 12 months. The average Grade A office rent in Central/Admiralty fell most notably in the 1H2012, but has witnessed stabilising signs since mid 2012. Colliers believes that in the other key business hubs such as Wan Chai/ Causeway Bay, Island East and Sheung Wan, lease renewal is expected to dominate in 2013 due to the low vacancy rates in the areas. Over in Kowloon East, Colliers notes that the rental gap with individual sub-markets, such as Island East is seen to be narrowing due to the surge in rents experienced by Kowloon East since the government announced the CBD2 project. In recent months, the consulting firm says that Kowloon East is no longer seen to be the top option when it comes to relocation options for cost-saving reasons. Instead, a new trend is surfacing in the district. It shared that, “As more owners of industrial and industrialoffice .” Property consulting firm DTZ believe otherwise noting that rentals for prime office space are seen to dip by a further 5% in 2013 after plummeting 20% so far this year with financial firms expected to continually cut costs. The rental slump in the Central/ Admiralty areas weighed on the overall Hong Kong office rents causing them to drop by 9% y-y to HK$61 psf in the 4Q. Retail market Retail property registered the most outstanding performance in 2012 with 11% growth in average rents of high streets and 28% rise in overall retail property prices between January and October. But retail sales are slowing from 21% at the end of 2011 to only 7% in September 2012, notes Nomura. Retail sales value of jewellery, watches, clocks and other valuable gifts saw the first single-month dip in August 2012 since July 2009. HONG KONG BUSINESS ANNUAL 2013 15 RETAIL OUTLOOK Retail sector to edge up at a gingerly pace With sluggish improvement in the global economy, 2013 may not be a far cry from 2012’s bleak performance. A nalysts had expected a gray picture for the retail sector in their 2012 outlooks, citing bigger challenges, further growth moderation, and weak consumer sentiment as factors that drag the sector down. Colliers International describes the local retail sales market as facing “mounting challenges from the contracting Eurozone and the still struggling United States.” Lacklustre 2012 performance According to Lily Lo, Assistant Economist with DBS, retail sales growth has been disappointing, particularly in 2H12. Low retail sales growth figures of late, such as 3Q’s 5.9% versus 2Q’s 10.3%, can be explained by weaker tourist spending. “Although Chinese tourist arrivals grew steadily at 23.8% YTD versus 23.7% YTD in October last year, their contribution to retail sales value growth has declined,” she says. Values now stand from 44.3% in 1Q12 to just 11.7% in 3Q12, according to DBS’ calculations. 16 HONG KONG BUSINESS ANNUAL 2013 “The critical data to watch in 2013 is mainland tourist spending, as this has been supporting the growth of the industry for the last few years.” Tourists from the mainland have apparently been spending less on luxury items. A market analyst who requested anonymity, agrees with Lo, saying, “For the first ten months of 2012, total retail sales increased by 9.9% yoy in value and 7.0% yoy in volume, significantly lower than those at the same period a year earlier.” The market analyst notes that a few subsectors like consumer durable goods and daily goods sold in supermarkets performed relatively well. But Lo says that spending on jewellery, watches, clocks and valuable gifts have all decelerated from an average of 0.3% in 2Q to -1.8% in 3Q. She also says that other popular tourist items such as electrical goods and photographic equipment, which serve as a ‘proxy’ for locals’ retail spending, displayed bearish trends. Growth tapered considerably from an average of 28.8% in 2Q to just 12.0% in 3Q. “Travel Industry Council of Hong Kong reported that average tourist spending decreased 25% from last year to $5,000 to $6,000 per person over the Golden Week,” Lo further explains. Impact of slashed GDP forecast Nomura revised down its GDP growth forecast from 1.5% to 1.2% in mid-November, but it kept its 2013 forecast unchanged at 2.5%. The research firm cites Hong Kong’s weaker-than-expected 1.3% Q3 GDP growth from Q2’s 1.2%. “This downside surprise was largely the result of a weak contribution from external trade, even as domestic demand remained supported by a stable job market as well as fixed investment and government spending,” it reports. Looking ahead, research firm Credit Suisse lowered its GDP growth forecast for Hong Kong in 2013 to 3.4% from 3.9%. Colliers International, on the other hand, foresees a slightly higher economic growth of 4.9% next year. It admits though, that the uncertain economic situation in the Eurozone RETAIL OUTLOOK and slowing economic growth in China will restrain overall economic growth in Hong Kong. “However, the introduction of QE3 will boost the world’s economy in nominal terms,” Colliers explains. Effects in the retail sector With this slash in GDP growth forecast, will there be any effects on the retail sector? “The effect should be minimal,” Lo remarks. The forecast, according to the DBS economist, reflects the government’s view of the economy; thus economic fundamentals shouldn’t react to GDP forecasts. But the market analyst that Hong Kong Business interviewed remarks that a lower 2013 forecast certainly means lower growth in the retail sector, most particularly in durable goods and daily goods sold by supermarkets. He also explains that there are three things which retail sales mainly depend on: local GDP growth and job market, inflation pressure, and Chinese tourist per-capita spending. As Hong Kong is a small open economy, the first two factors are actually dependent on global market by large. “Given the current slightly better outlook for US, Euro area, and China’s growth, I would think that the slowdown in Q3 may not affect next year’s performance much,” he asserts. Gabriel Chan, an analyst with Credit Suisse, explains that the answer to the nagging question of whether inflation is bad for retailers depends on the pricing power and cost structure of the retailers. “During inflationary periods, retailers may find it easier to raise prices, but at the same time, key cost items, including product costs, staff costs and rental rates, are on the rise as well,” he elaborates. What does 2013 hold? According to Hang Seng Bank’s Hong Kong Economic Monitor report, marginal improvements in exports and steady consumption will help lift Hong Kong’s economic growth to 3% in 2013, from an estimated 1.5% in 2012 but still below its long-run potential of around 4.5%. “Annual inflation is, however, set to edge up to 4.3%, mainly driven by a rebound in grain prices and rising rents,” the report notes. It also mentions that the 2013 forecast for retail sales value is pegged at 13.0, a three percentage point increase as compared to its 2012 forecast of 10.0. In addition to this, DBS analyst Lo says that consumption will get a boost from an uptick in the Chinese economy. “China’s economic recovery in 2013 will exert a positive impact on locals’ consumption via better equity market performance, sustained property price levels and generally more upbeat consumer sentiment,” she comments. The Tourism Board reports that visitor arrivals in Hong Kong were up 11.9% year-on-year for October to reach 4.24 million. Tourists from mainland China still form a big chunk as they contributed over 1.28 million overnight arrivals. Meanwhile, sameday, in-town visitor arrivals rose 20.6% to more than 2.22 million. Lo says tourists have been spending less on luxury items in Hong Kong. On the surface this is directly due Projection on personal consumption expenditure (% YoY) Sources: Census & Statistics Department of HKSAR, Hang Seng Bank estimates Joanne Lee Lily Lo to China’s economic slowdown this year, she says, but there are no guarantees that spending on these items will pick up considerably as China’s growth reaccelerate. “That’s because Chinese tourists’ spending habits might have changed. For instance, there are more channels to purchase luxury items now, including reputable online shopping sites. Also, more mainlanders are flocking to Taiwan to shop,” she explains. Looking forward, the market analyst who requested anonymity says that steady tourism inflows will continue to support the retail sales business next year, particularly during the promotions season generally covering the year-end until early next year. Lo warns though that should weakness in retail sales extend into Christmas, pressure on retail employment will start to mount as retail sales growth will have weakened for over a quarter already as unemployment is a lagging indicator, she says. Edward Fung, research head of Maybank Kim Eng, says that both sales and expenditure on customer side haven’t been performing well recently. “Judging from the statistics released by the HKSAR Government, retail sales and consumer spending have been struggling in the past few months, particular on the high end luxury segment,” Fung says. Consumers, on the other side, are generally trading down. High rental costs and increase in wages pose as key risks to retailers. The critical data to watch in 2013 is mainland tourist spending, as this has been supporting the growth of the industry for the last few years, Fung says. Lo asserts, “Weak retail sales is expected for the remainder of 2012. We are penciling in 9.0% growth for retail sales value growth in 2012, versus 24.8% in 2011,” she says. Joanne Lee of Colliers International says that 2013 still has to be cautious about the softening economic growth in China as Chinese spenders will continue to tighten their belts. But on a more positive note, Lee says “The strengthening of the yuan, combined with Hong Kong’s minimal tax rates, suggest Hong Kong will continue to attract mainland shoppers, especially those from second and third tier cities of China where luxury retailers are still lacking.” HONG KONG BUSINESS ANNUAL 2013 17 HIRING & SALARY OUTLOOK The year will start slow but a hiring rebound is expected in the second half of 2013. J ob seekers looking to land a job in 2013 are in for an unpredictable ride as the start of the year forebodes slow hiring activities due to the global risk and weak demand. But don’t fret. If the property bubble does not burst and China’s growth rate moves forward, Hong Kong’s servicesdriven economy should rebound in the second half of 2013 and signs are pointing to a more positive third and fourth quarter which will no doubt have a positive impact on hiring, according to Matthew Bennett, managing director at Robert Walters. He adds that with manufacturing and trade beginning to look a little more solid on the Mainland, it will only take a couple of consecutive quarters for this confidence to return. Jobs in demand in 2013 So what will be the hiring and 18 HONG KONG BUSINESS ANNUAL 2013 “Randstad 2012 World of Work Report revealed that 58% of employees are expecting to leave their jobs." recruitment trends in Hong Kong in 2013? What jobs will be in demand? Bennett says industries that are still hiring are retail, logistics, tourism, telecommunication and traditional banking front office roles and corporate and transactional banking. Most jobs in demand will be those that can have a direct impact on the bottom line. Randstad director Brien Keegan adds that as their 2012 World of Work Report revealed that 58% of employees are expecting to leave their jobs, there is likely to be demand across all industries for organisations to stay intact. “Certainly in Hong Kong, we are seeing an increasing demand for those with language skills that have worked for multinational environments. Additionally in different sectors, we see large demand for staff, for instance within the retail and luxury brand sector we see a high demand for merchandising talent at all levels,” says Keegan. Anthony Thompson, senior managing director for Hong Kong & Southern China at Michael Page concurs that there will be continued demand for talented professionals with Chinese and English language skills. However, he warns that employers will keep a watchful eye on economic conditions in Europe which continue to have a material impact, particularly on the financial services sector and manufacturingrelated industries. This sentiment is likely to create some nervousness around recruitment activity within these industries. Demand for multilingual talents As international law firms continue to expand in Hong Kong, HIRING & SALARY OUTLOOK multilingual legal practitioners for private practice might be in luck in 2013. With the growing importance companies are placing on talent management, quality human resources practitioners will also continue to be in demand. Within sales, Thompson adds that employers will keep looking for professionals with proficiency in English and Chinese and a good understanding of local markets along with an international perspective. There will be increased demand for digital marketing and online marketing specialists as the growth in technology and sophistication of social networking continues to change the way people communicate and impacts how businesses deal with their customer base. Demand for audit and compliance pros “There will also be demand for audit and compliance professionals as regulatory requirements for organisations in Hong Kong become tighter, including areas in the manufacturing sector such as quality assurance, quality control and social compliance which are becoming more important,” he notes. Robert Half director Pallavi Anand also recognised this increase in demand for, and shortage of compliance professionals in Hong Kong. Due to the talent shortage, she notes that many companies are considering to hire people directly from consultancy firms and the “Big Four” and that companies are looking for candidates with experience of between five and 12 years. “We see a compelling opportunity for professionals with experience at auditing firms to consider going into the compliance profession. Top candidates with a strong background in compliance can expect a salary increment of 20% to 40% on the average when moving to another company, while those with the relevant skills but no previous compliance experience can still expect a salary increment of 10%15%,” reckons Anand. She adds that regulatory changes, the rise in the number of mergers and acquisitions, and the subsequent integration process are also driving the increase in demand for contract staff, particularly those with PMP (project management) qualification, change management experience and knowledge of new regulations e.g. the Dodd-Frank Act. Pay rise and bonus Employers will definitely have to reconsider their proposition of bonuses and salary increases as 95% of employees are expecting a pay raise and a one-time bonus in 2013, according to the Randstad Workmonitor Report. “With the expectations of salary increases and bonuses, those that do not receive them may look elsewhere. As a result, organisations need to look at their overall employer value proposition of bonuses and salary increases,” reckons Randstad’s Keegan. Robert Walters’ Bennett says these salary increases can reach 4% with inflation being forecasted at around 4% in 2013. Bonuses will be paid predominantly around the profitability of an organisation as a whole so he says there could be a drop in bonuses paid Key reasons employees are likely to leave Source: Michael Page Anthony Thompson Brien Keegan Matthew Bennett Pallavi Anand in Hong Kong due to poor results in the US and Europe. “All in all I would say that 2013 will be very similar to 2012 in terms of overall packages. However a stronger second half in 2013 could help with some upside for bonuses paid in 2014,” says Bennett. Michael Page’s Thompson agrees and says that experienced and talented professionals will continue to be offered financial incentives to join new organisations in 2013. There have also been many organisations that offer inducements to retain staff and Thompson expects this to continue next year. Challenges in 2013 The stability and slow pace of the market still poses the biggest challenge for employers and employees alike in 2013. Bennett notes that it has been over 12 months now of a weak global economy and it is getting harder to motivate staff through increased earnings and promotions when the market will not let a business scale. Talent attraction and retention will remain a key employer challenge in 2013, according to Thompson. There continues to be a shortage of quality professionals in the market across all sectors, with the best talent receiving multiple job offers. At the same time, recruitment decisionmaking processes have become slower therefore employers risk losing good candidates to other offers when they take too long to make a decision. To retain their best people, Thompson reckons employers will need to be more proactive in communicating with staff and managing their career expectations while providing opportunities to keep them challenged and engaged in their role. “This will be more challenging for multinational employers managing their Asia-based employees, with potential restrictions around the ability to offer incentives and advancement opportunities due to many decisions being made at head offices in either Europe or the United States where there is a higher focus on cost control. With these unpredictable economic market conditions, those companies that best adapt to local markets will be the most successful in both retention and attraction,” he adds. HONG KONG BUSINESS ANNUAL 2013 19 LEGAL OUTLOOK Hong Kong legal industry seizes more opportunities for growth Optimism lingers despite a week IPO outlook. H ong Kong’s legal industry continued to attract foreign firms and professionals in 2012 with 23 foreign registered law firms forming associations with local firms as of the end of April 2012, data from Hong Kong Trade Development Council (HKDTC) show. In total, Hong Kong, known as the international law capital of Asia, had more than 9,000 practising solicitors and barristers. HKTDC notes that 788 local solicitor firms and 70 foreign law firms had set up presence in Hong Kong during the said period, including more than half of the Global 50 law firms with a presence in Hong Kong. In terms of size, foreign law firms continue to dominate the market. Foreign law firms have topped Hong Kong Business's inaugural Top 25 law firm rankings for 2012 based on the number of employees with only six local firms making it to the list. US 20 HONG KONG BUSINESS ANNUAL 2013 "In total, Hong Kong, known as the international law capital of Asia, had more than 9,000 practising solicitors and barristers." law firm Baker & Mckenzie landed the top spot based on size with 273 law professionals, beating out Hong Kong’s oldest local law firm, Deacons, who took the second spot. As Hong Kong is a leading international financial centre, HKTDC expects that the growing demand for services related to finance, such as initial public offering (IPO), will help stimulate continual demand for legal services. Yun Zhao, associate professor of law at the University of Hong Kong meanwhile notes that the industry presents huge growth opportunities moving forward as Hong Kong-based law firms are yet to maximize their full advantage in the Mainland under the Closer Economic Partnership Arrangement (CEPA) between Hong Kong and the Mainland compared with law firms from other jurisdictions. “Hong Kong law firms failed to make full use of these favorable measures. On the one hand, the measures have been in force for a relatively short period of time, Hong Kong law firms will need some time to congest these measures and take concrete measures; on the other hand, it takes some time for some Hong Kong law firms to satisfy the requirements in the measures. With the CEPA almost in place for 10 years and more attention has been put to this document, Hong Kong law firms should be able to grasp this golden opportunity to expand their existence in the mainland market.” As of 1 May 2012, HKDTC notes that Hong Kong law firms, including many Hong Kong-based foreign law firms, had set up 111 representative offices on the Chinese mainland. Beijing, Shanghai and Guangzhou are the most popular cities to establish mainland presence. Six Hong Kong LEGAL OUTLOOK law firms have also entered into association arrangements with their mainland counterparts under CEPA such as Woo Kwan Lee & Lo. Arbitration Hong Kong Legal Training Institute believes that the Hong Kong legal industry will keep on growing in 2013, particularly in the arbitration or related sectors given the international trade activities in Asia and China. “The growing need for legal practitioners to know about these areas would mean more focus being placed in the development of their Alternative Dispute Resolution. We see specialised practices such as arbitrators or counsel to have very promising opportunities for growth.” Secretary for Justice Rimsky Yuen was quoted in a forum held recently that as regards arbitration, the new Arbitration Ordinance (AO) which came into effect in June 2011 will continue to shape the HK legal landscape moving forward. “The new Arbitration Ordinance in Hong Kong is modelled on the UNCITRAL Model Law adopted by the United Nations Commission on International Trade Law. The Ordinance reinforces the advantages of arbitration, respecting the parties' autonomy as well as saving them time and expense, and at the same time protecting confidentiality in arbitration proceedings and related court hearings.” Norton Rose partner Jim James notes that a key feature of this AO was the different regimes for domestic arbitrations (i.e. arbitrations involving Hong Kong parties) and international arbitrations (effectively, arbitrations with an international element). “The AO abolishes this distinction and establishes a unitary regime based on the Model Law, which will apply to all arbitrations and not merely to 'international commercial arbitration'. This approach is similar to the approach taken in other jurisdictions such as the United Kingdom and Singapore.” Zhao notes meanwhile that the industry can expect more competition in arbitration services with the establishment of the International Chamber of Commerce’s office in HK which will be in direct competition with the Hong Kong International Arbitration Center. “This year China International Economic and Trade Arbitration Commission (CIETAC) also set up a Hong Kong office; on December 2012 the Shenzhen Court of International Arbitration was formally set up. With all these developments, it is expected that the arbitration market in Hong Kong will also become more competitive.” Mediation Another significant development in HK’s dispute resolution methods was the enactment in June this year of the Mediation Ordinance which will take effect January 2013. Mediations are generally conducted on a confidential and without prejudice basis. Such terms are generally agreed upon by the parties prior to the mediation. DLA Piper explains that the Mediation Ordinance gives legislative force to those rights and obligations. By doing so, DLA Piper notes that the parties to a mediation in Hong Kong can have the comfort and certainty of knowing that: its communications will remain confidential save for specific exceptions; and those communications cannot be disclosed or admitted in evidence without prior court approval. According to DLA Piper, this statutory assurance of confidentiality is important in the context where a party may be penalised for refusing to mediate. For instance, in Hong Kong a court, it said, is required to consider a party's (un)willingness to participate in mediation in determining whether or not it should make an adverse cost against it. The law firm however notes that that the Mediation Ordinance does not address the accreditation of mediators - therefore as it stands, any impartial individual can be engaged act as mediator. “The Mediation Ordinance is also silent on the question of whether mediators can, following the mediation provides any professional advice or opinion to any of the disputing parties. Therefore this issue should be addressed by the parties in the mediation agreement to avoid any later conflict.” IPO Clyde & Co’s managing director in Asia Michael Parker sees the IPO market in Hong Kong to remain in the red next year even as two giant accountancy firms already expressed optimism. Hong Kong’s IPO market hit a fouryear low in 2012 but KPMG and Ernst & Young in separate reports predict a "The new Arbitration Ordinance (AO) which came into effect in June 2011 will continue to shape HK legal landscape moving forward." pick up in 2013 with the recovering Chinese economy boosting sentiment for fund raising. The Hong Kong Stock Exchange fell to fourth place in the global ranking for IPOs in 2012 after holding the top position from the previous three years. KPMG forecasts that Hong Kong's IPO market will total $16.1 billion, with about 85 offerings, while Ernst & Young estimates that the amount raised will be about $16.7 billion. The estimates are far greater than an estimated $11 billion in IPO funds this year, a four-year low and about one-third of the amount raised in 2011, according to KPMG. Among firms planning IPOs next year according to a Reuters report include Sany Heavy Industry, Huishan Dairy, Lukoil, Hong Kong Airlines, Erdenes Tavan Tolgoi coal mine, and China Galaxy Securities. Major sources of growth While it has been pretty grim year so far with the IPOs, Clyde & Co’s Parker believes that mergers & acquisitions should be bullish next year even if IPO will continue to be very poor. “We've got a lot of clients who are interested to make acquisitions in the region whether it be China or Indonesia and are charging pretty well.” Construction is also expected to become a major growth source amid a huge amount of construction going on in Hong Kong and the Asian region. “The infrastructure plans are so much for this region including huge plans in China, for their airports in particular which is going to be a long -term construction project, a 10-year project I suspect. And also, they plan to have new airlines coming into the market while the existing ones are looking to expand,” said Parker. Aside from Hong Kong and China, the new countries to which Clyde & Co expects to source growth include Myanmar, Vietnam, Cambodia as well as Korea. The insurance industry, Parker added, will give a big boost. “The insurance industry, is very active at the moment and there is a lot of potential there because people in this region compared to let’s say, Europe or America, do not have as much of insurance as they do in other parts of the world.” HONG KONG BUSINESS ANNUAL 2013 21 TOP NEWS IN 2012 MOST READ Daily news: RETAIL Graff Diamonds to open second Hong Kong branch More IPO glitter comes to Hong Kong. Graff Diamonds, the Londonbased jeweler that claims to have handled more exceptional gems than any other, will launch an IPO in Hong Kong to finance its expansion within Asia, especially in China. Graff’s IPO could raise up to US$1 billion and increase the company’s equity to some US$5 billion. MARKETS & INVESTING Easy money draws droves of Hong Kong investors What should have been a humdrum day of selling banknotes marking the Bank of China’s 100th anniversary spun out of control into a “Get rich quick” opportunity that drew frantic investors by the hundreds. Persons eyeing instant fourfold profits mobbed the bank’s 50 branches in the city beginning Feb. 12, the day before the sale started, and on Feb. 13. TRANSPORT & LOGISTICS Goodbye to cross-border permits? Motoring to Guangdong from 22 HONG KONG BUSINESS ANNUAL 2013 Hong Kong will be easier starting March—but only for a few. Owners of Hong Kongregistered private cas will be allowed to travel to neighboring Guangdong next month in the first phase of a scheme that should eventually pave the way for less complicated road travel. growth. RESIDENTIAL PROPERTY Hong Kong’s most outstanding companies were once again recognized at the Hong Kong Business High-Flyers. Hong Kong Business Magazine holds this prestigious event every year to formally acknowledge the excellence of top enterprises that offer innovative products and exceptional services. Global crisis + low season = floundering property market The January numbers for Hong Kong’s property market sectors mostly make for disheartening reading. Residential sales again plummeted, this time to 18% month-on-month to 3,507 units this January, the lowest figure since November 2008. Sales of luxury homes valued over HK$10 million fell 17% to 385, said Knight Frank LLP, the British global residential and commercial property consultant. ECONOMY HR & EDUCATION Ailing Hong Kong needs more than band-aid therapy Petty solutions aren’t going to do it for Hong Kong, which stands to take a tremendous hit from the explosive Eurozone debt crisis. Employers not firing staff, but aren’t hiring either Over 90% of all businesses surveyed in HSBC’s December PMI reported no changes to their headcount. Comments Donna Kwok, the bank’s economist for Greater China: "Although unemployment growth is no longer as strong as it was in early 2011, employers have kept staffing levels steady despite slower new business inflows. Over 90% of all businesses surveyed in HSBC’s December PMI reported no changes to their headcount." ECONOMY Hong Kong domestic exports plunge 20.6% yoy Exports continue to wilt before the worldwide economic slowdown. The Census & Statistics Department reported that domestic exports dropped sharply by 20.6% from January to November 2011 compared to the same period in 2011. Exports for November alone were also down significantly: they plummeted 37.6% yearon-year. Chief Executive Donald Tsang rang the alarm bells for Hong Kong at the Fifth Asian Financial Forum, saying the city urgently needs wholesale strategies that promote sustainable growth in light of another impending global economic downturn. ECONOMY MEDIA & MARKETING Hong Kong Business HighFlyers awardees revealed Hong Kong’s best companies were recognized at this year’s awards held at Hotel LKF. Hong Kong Business Magazine has been giving recognition to industry-leading businesses since 2004. This year, Taiwan prefers China over Hong Kong In banking as well as trade, size truly matters. Despite its ongoing travails, China’s huge economy is attractive enough for Taiwan’s bankers to rate it as their top overseas market this year and the one promising the highest MARKETS & INVESTING Microfinance pilot scheme a definite go The highly-anticipated microfinance pilot scheme will begin loaning start-up capital to qualified business owners in the middle of this year. The Hong Kong Mortgage Corporation, Ltd said the three-year microfinance pilot scheme aims to assist people who want to start their own business or receive training for skills upgrading or certification, but who lack the financial means or have difficulties in obtaining loans from traditional finance sources. TOP NEWS IN 2012 MOST READ Daily news: ECONOMY shows that persistent leasing demand drove up rents by 4.5% for both prime street shops and premium centres. Capital values for prime street shops also rose a further 9.7% in the first two months of 2012. FINANCIAL SERVICES RETAIL February a good month for retail Total retail sales volume for February less the effects of inflation rose 10% compared to the same month a year earlier. The Census & Statistics Department said the gross value of total retail sales in February is initially placed at $33.8 billion, a 15.7% increase year-on-year. January. AVIATION HKIA scheduled to open third runway by 2023 The Executive Council’s endorsement of the construction of a third runway at Hong Kong International Airport should see the new runway completed by 2023. FINANCIAL SERVICES Loan approvals rise sharply in February The Monetary Authority has announced upbeat news for the property sector. It said new loans approved during February rose 44.1% to $14.4 billion while new mortgage loans drawn down that month increased 25.8% to $7.6 billion compared to January. Swiss private bank to do business in Hong Kong Hong Kong now has 154 licensed banks. The Swiss private bank, Pictet & Cie (Europe) S.A., received a banking licence that took effect April 18, said the Monetary Authority. Pictet & Cie is today one of Switzerland’s largest private banks, and one of the premier independent asset management specialists in Europe. ECONOMY COMMERCIAL PROPERTY Inflation slows in February One-off government relief measures helped tame inflation in February. The Census & Statistics Department said inflation rose 4.7% in February over the same month last year. The inflation rate was 6.1% this Retail drives Hong Kong property prices upwards Despite rising rents, local and international retailers continued their aggressive expansion to secure retail premises in prime locations. Property consultants Jones Lang LaSalle’s latest research COMMERCIAL PROPERTY BOC Hong Kong’s preprovision operating profit up by 27% to HK$6.8b The reported PPOP figure is 22% higher than operating expenses. BOCHK’s net interest income expanded as NIM of Rmb business made gains and core NIM remained stable. Furthermore, there were small write-back in loan provisions. BOCHK was tagged the best performer among all HK/China banks. ECONOMY A look into Leung’s mind Hong Kong’s Chief Executiveelect Leung Chun-ying has been a media darling since his election. Among the more interesting revelations about his plans for Hong Kong as reported by local and international media: - He intends to set up a new investment fund to grow the economy, using the Exchange Fund as a model. GNP, GDP improve in 4Q 2011 Hong Kong’s gross national product rose 7% to $511.3 billion in the fourth quarter last year over the same period in 2010. The Census & Statistics Department also reported that the city’s gross domestic product improved 6.5% to $505 billion. FOOD & BEVERAGE Swire Pacific and China Foods: off the hook on disinfectanttainted Coke Nine batches were reported to have snuck in to the market and the plant of origin may be owned by Coca-Cola. In a research by Maybank Kim Eng sourced from the mainland press, nine batches of disinfectant-tainted Coke produced in a Coke’s Shanxi bottling plant had entered the market, according to official investigation notice. Latest news from Shaxi Food Quality Supervision and Inspection centre confirmed the products are safe. MARKETS & INVESTING HKEx has a new Chairman Sir Chung-kong Chow, former boss of Hong Kong’s MTR metro system, now heads the Hong Kong Exchanges and Clearing, Ltd. Chow’s appointment as HKEx Chairman has been endorsed by Chief Executive Donald Tsang. Financial Secretary John Tsang appointed Chow as a director of HKEx earlier this month for a two-year term. HONG KONG BUSINESS ANNUAL 2013 23 TOP NEWS IN 2012 MOST READ Daily news: ECONOMY MARKETS & INVESTING Dim economic outlook confronts Hong Kong Tourism remains only one of a few bright lights in the otherwise gloomy economic landscape facing Hong Kong this year. Hong Kong’s export volume to Europe dropped 9% year-on-year in the first four months of the year while new export orders weakened. Secretary for Financial Services & the Treasury Prof KC Chan told lawmakers that Hong Kong’s near-term export outlook remains bleak. Gujarat seeks Hong Kong investments A business delegation from the western Indian state of Gujarat examined bilateral business opportunities with Hong Kong. The 12-member business delegation also pitched Gujarat as a destination for large infrastructure investments through public private partnerships. It briefed Hong Kong’s top corporate groups and business organisations about the state-sponsored private equity investment company, Gujarat Venture Finance, Ltd., its operations and funds for Hong Kong investments. ECONOMY Swipe it! Credit card transactions up 3.4% in 1Q12 People continued to spend but at a slower pace compared to 2011 because of the unfavourable economic environment. The total value of credit card transactions in the first quarter 2012 was $121.2 billion, up 3.4% on the previous quarter and 15% year-on-year, the Monetary Authority said. The quarter saw 103.5 million credit-card transactions, down 2.2% on the previous quarter and up 8.4% year on year. 24 HONG KONG BUSINESS ANNUAL 2013 FINANCIAL SERVICES Hong Kong opens financial dispute resolution centre Hong Kong takes another step to preclude massive investor losses from unregulated equities trading. The city’s newly opened Financial Dispute Resolution Centre was established to help customers seeking claims against banks or brokers. The centre provides an avenue for customers with claims of up to US$64,000 and will allow them to settle disputes with banks and brokers outside of court. MARKETS & INVESTING IPO investors score a victory In a first for Hong Kong, investors burned in a bungled IPO can get some of their money back. A milestone court settlement reached in Hong Kong will see investors get most of their money back from a Chinese textile company accused by regulators of exaggerating its earnings in an IPO. COMMERCIAL PROPERTY Leasing demand for warehouses on the rise Some logistics operators have already pre-committed yet-tobe vacated warehouses due to the current high occupancy level. The steady local retail sales performance is driving continuous demand for warehouses from third-party logistics companies. Ramp access warehouse premises with sizes in the range of 50,000 to 100,000 sq ft are preferred in the market. AVIATION Turbulence up ahead for Cathay Pacific Airways?”. ECONOMY Tsang arrives in Taipei Financial Secretary John Tsang is in Taipei as head of a delegation that officiated at the opening of the Hong Kong Economic, Trade & Cultural Office. Tsang told Taipei media this was his second visit to Taiwan as the Honorary Chairperson of the Hong Kong-Taiwan Economic & Cultural Cooperation & Promotion Council. ECONOMY Capital duty to be banished by June 1. COMMERCIAL PROPERTY Hong Kong office rent increases slowing Professional real estate services firm Jones Lang LaSalle said rents in top tier markets aren’t increasing. Its Q1 Asia Pacific Office Index Report in 27 key markets in Asia Pacific found that in Q1 2012 compared to Q4 2011, rents increased in 13 markets, were static in three markets and fell in 11 markets. The Index monitors grade A net effective rents. TOP NEWS IN 2012 MOST READ Daily news: Its fleet will consist initially of three Airbus A320s, a number that is expected to rise to 18 aircraft in 2015. propels profits of Hang Seng Bank Ltd by 14%. Hang Seng Bank, which is controlled by HSBC Holdings Plc, saw its net income rise to HK$9.3 billion from HK$8.2 billion year-on-year. Net interest income rose 8.5% to HK$8.3 billion while net fee income, derived mostly from credit cards, stockbroking services and mutual funds, fell 5% to HK$2.41 billion. ECONOMY RESIDENTIAL PROPERTY TRANSPORT & LOGISTICS AVIATION MTR net profit crashes by over a third A weaker property market inflicts a 33% plunge in net profit on MTR Corporation, Ltd during the first half. MTR runs the Hong Kong MTR metro system and is also a major property developer and landlord in the city. Net profit for the first half plummeted 33% to HK$5.9 billion from HK$8.8 billion a year earlier due to smaller revaluation gains. MTR posted a revaluation gain of HK$1.74 billion, sharply lower than the revaluation gain of HK$4.41 billion a year earlier. Hong Kong Airlines cuts services to London The last flight from London to Hong Kong will be on September 10. General Manager Albert Chan said the airline will end its service between Hong Kong and London due to poor demand. The last flight from London to Hong Kong will be on September 10. ‘’Given the profitability of our regional routes, we believe that we now have the optimal fleet to continue to build a business . . . focused on Asia Pacific,’’ an HKA spokesperson said. Here’s how HK property market struggled amid the global lull Market remained resilient thanks to investor interest, low lending rates and rising rental returns. According to Jones Lang LaSalle’s quarterly Global Market Perspective,: • The global economic outlook has weakened as euro strains reemerges. Asia Pacific markets will continue to drive global growth this year, however, a deceleration is increasingly apparent. HOTELS & TOURISM AVIATION RETAIL Mainland and Philippine visitors boost Hong Kong’s tourism The Hong Kong Tourism Board said 16% more visitors came to the island during the first half compared to the same period in 2011. Of Hong Kong’s 22.3 million visitors, 15.6 million were from mainland China, or a rise of 22.7% year-on-year. Visitors from the Philippines were the highest from Southeast Asia, growing 16.9% in overall arrivals and 18.2% in overnight arrivals. Jetstar Hong Kong to fly next year Budget airline Jetstar Hong Kong will begin operating next year with some of its rates 50% cheaper than full service options in regular airlines. Jetstar Hong Kong, a subsidiary of Australia’s Qantas Group, is on track to start services next March but subject to regulatory approval. Its fares are expected to be up to 50% cheaper to a number of destinations including mainland China, Japan, South Korea and South East Asia. H&M refuses rent increase Swedish retail clothing company H & M Hennes & Mauritz AB will shutter its flagship store in Hong Kong due to an increase in rent. The 2,800-square-meter store is located in the business district and will be shut down in the next few months. H&M, however, will retain its 11 other branches in Hong Kong. Renminbi accounts to be available to non-HK residents Renminbi services will be available to them from August 1. Authority Chief Executive Norman Chan said banks in Hong Kong may begin offering renminbi services to non-Hong Kong residents next month, adding this was another important milestone for the development of offshore renminbi business in Hong Kong. MARKETS & INVESTING FINANCIAL SERVICES Hang Seng Bank grows in a slowing economy A growth in lending income HKEx completes acquisition of LME Shareholders of the London Metal Exchange have approved their company’s takeover by the Hong Kong Exchanges & Clearing Ltd. The vote to approve taken on July 25 will see HKEx take over ownership of the world’s leading commodity exchange for US$2.2 billion. It saw 99.24% of shareholder in favor, said LME. The proposal needed the support of more than 50% of shareholders and owners controlling at least 75% of the stock. HONG KONG BUSINESS ANNUAL 2013 25 TOP NEWS IN 2012 MOST READ Daily news: President Vagit Alekperov said the company has been faced with a number of legal complications concerning the Hong Kong listing. ECONOMY names, www. dxjrj.com, and. The website looks similar to the official website of Dah Sing Bank, Limited (Dah Sing Bank). Dah Sing Bank has clarified that it has no connection with the fraudulent website. More rich becoming less richer in Hong Kong The continuing economic slump reduced the ranks of the rich in Hong Kong by over 17% in 2011. ECONOMY FINANCIAL SERVICES BOC Hong Kong profits up 5% in 3Q MayBank highlights latest operating trends. BOCHK’s 9M12 reported pre-provision operating profit (PPOP) rose by 5% YoY to HKD18.9b. Stripping out the Lehman Brothers related write-back, MayBank noted that core PPOP rose by 24% YoY, as rise in income (20%, higher net interest income and trading gain) was much higher than rise in expenses (12%). LEISURE & ENTERTAINMENT Hong Kong loses to Singapore in English speaking skills English skills are ‘significantly below’ peers. According to Education First’s English Proficiency Index (EF EPI), Hong Kong’s English skills fall significantly below those of other territories in East Asia where English is an official language. FINANCIAL SERVICES What you need to know about HKMA’s surprising intervention A whopping $1.85bn was bought. According to Bank of America Merrill Lynch, after intervening for the first time 26 HONG KONG BUSINESS ANNUAL 2013 since 2009 at the strong end of the peg last Friday, The Hong Kong Monetary Authority (HKMA) intervened again earlier in the week. A combined $1.85bn was bought according to an emailed statement by HKMA. Hong Kong inflation higher than expected due to rising rental rates Inflationary pressures will persist. COMMERCIAL PROPERTY “Ginza-style” comes to Causeway Bay Hong Kong’s world record high rents are forcing more shops and restaurants to stay open until well into the evening. Shops and restaurants in main districts such as Causeway Bay are operating longer hours to cope with soaring rents. This trend is encouraging developers to build “Ginza-style” commercial projects to support 24-hour businesses. Ginza-style means that two businesses share the same space. According to BBVA, Hong Kong’s inflation rate rose to 3.8% y/y (consensus: 3.5% y/y) from 3.7% y/y the previous month. Although still on a broad declining trend, inflation was somewhat higher than expected due to rising housing rental rates. “We expect inflationary pressures to remain in this range due to a buoyant property market and loose global monetary policies.” FINANCIAL SERVICES Beware of this fraudulent website: HKMA Domains are similar to the official website of Dah Sing Bank. The Hong Kong Monetary Authority (HKMA) wishes to alert members of the public in Hong Kong to a fraudulent website with the domain MARKETS & INVESTING LUKoil delays Hong Kong listing to 2013 LUKoil, Russia’s second largest oil company, has postponed its Hong Kong listing to 2013. The oil major, which is also the world’s second largest public company, said the delay was caused by legal restrictions. The fairly large loss in the number of rich residents was traced to the volatile stock market that wiped out a great portion of the wealth of those who are no longer “High Net Worth Individuals” (HNWIs), according to the latest AsiaPacific Wealth Report 2012. Many of Hong Kong’s wealthy derive their wealth from substantial exposures in the stock market, whose falling fortunes have reflected the economic downturn plaguing the city. ECONOMY Hong Kong is again world’s freest economy Hong Kong has again been cited as the economy that offers the highest level of economic freedom worldwide. The Economic Freedom of the World: 2012 Annual Report co-published by the Cato Institute, Canada’s Fraser Institute and think tanks around the world showed Hong Kong leading the ranking of 144 countries and economies. It said Hong Kong offers the highest level of economic freedom worldwide, with a score of 8.90 out of 10. Behind Hong Kong were Singapore (8.69), New Zealand (8.36), and Switzerland (8.24). TOP NEWS IN 2012 MOST READ Daily news: wherein it described the challenges to the business in passenger and cargo revenues as well as cost pressures. CCB International Securities notes that 2013 appears to be equally challenging, at least at the start. RESIDENTIAL PROPERTY World Development (17)) led the list with 9 units sold. MARKETS & INVESTING RESIDENTIAL PROPERTY Asia’s “jet set” forsake Hong Kong for Singapore Rich and well-traveled Asians would rather buy property in Singapore. Almost a third of Asia’s “mobile millionaires” who live, work or spend more than half their time outside their countries of origin prefer Singapore as a second home, said a joint survey by RBC Wealth Management and The Economist Intelligence Unit.. FINANCIAL SERVICES HSBC study spots a dark new twist in aviation sector by 2013 Asian LCCs at most risk of declining capacity growth. HSBC expects full service airlines, especially those with large cargo operations, to improve the most in 2013. In contrast, off a stronger base, risks are rising for LCCs, it said. Hong Kong to become world’s largest financial center by 2017 Jobs. ECONOMY RESIDENTIAL PROPERTY Singapore beats Hong Kong in quality of living ranking Singapore is Asia’s best but only ranked 25th globally. Vienna retains the top spot as the city with the world’s best quality of living, according to the Mercer 2012 Quality of Living Survey. Zurich and Auckland follow in second Only 15 residential units sold over the weekend That is a 25% drop. According to Maybank Kim Eng, over the weekend, only 15 units of primary residential properties were being transacted, a 25% WoW drop. The Reach (Yuen Long, JV of Henderson Land (12) and New AVIATION Li expands Australian business empire Buys third Aussie company this year. Hong Kong and Asia’s richest man, Li Ka-shing, is buying Cheetham Salt, Australia’s largest salt producer. The deal worth US$157 million was made through a subsidiary, Cheung Kong Life Sciences. Cheetham Salt operates eight solar salt fields and five refineries in Australia and has the capacity to produce 1.4 million tonnes of salt annually. The deal is expected to be completed by February 2013 following regulatory approval. Asia’s top real estate investment ranking for 2013 excludes Hong Kong You won’t believe the country which topped the list. Real estate investor sentiment in the Asia Pacific property sector remains relatively positive, despite continuing global economic uncertainty, according to Emerging Trends in Real HOTELS & TOURISM Tourist count surges 11.9% to 4.24m Visitors from Mainland are still a big chunk. According to a release, visitor arrivals to Hong Kong were up 11.9% year-on-year for October to reach 4.24 million, the Tourism Board said today. Of these, more than 2.01 million were overnight arrivals, up 3.6% on last year. Mainland China contributed over 1.28 million overnight arrivals. Meanwhile, same-day, in-town visitor arrivals rose 20.6% to more than 2.22 million. AVIATION Cathay Pacific reduces passenger capacity by 1.6% 2013 is seemingly another difficult year for Cathay. Cathay Pacific (CX) hosted a quarterly analyst briefing, following closely on its trading statement of 23 November Estate® Asia Pacific 2013, a real estate forecast jointly published by the Urban Land Institute (ULI) and PricewaterhouseCoopers (PwC). TRANSPORT & LOGISTICS MTR buys 23 Chinese trains for US$2.57m New diesel/electric trains pollute less and are less noisy. The Mass Transit Railway Corporation has bought 23 trains for US$25.7 million from China CNR Company. The new trains, which will be used in the city’s transit system, will become operational in early 2014. The CKD0A locomotives ordered by MTR meet the strictest global emission standards and reduce operational noise to less than 70 decibels, lower than the 78-decibel standard on the Chinese mainland. HONG KONG BUSINESS ANNUAL 2013 27 company and industry - medical & healthcare equipment industry Demand for home healthcare equipment surges Ageing population and increased health consciousness are driving up demand. I n the first seven months of 2012, Hong Kong’s total exports of medical and healthcare equipment increased by 3%. Exports to the Chinese mainland, the largest market for Hong Kong’s medical and healthcare equipment exports, grew by 9%. However, exports to the US and the EU dropped by 13% and 6%, respectively. Among different product categories, Hong Kong’s exports of miscellaneous medical instruments and appliances which include sight testing instruments and veterinary science appliances, increased by 11% in the first seven months of 2012, while exports of electro-diagnostic apparatus (including apparatus for functional exploratory examination or for checking physiological parameters) increased by 13%. Outsourcing is growing in popularity among overseas manufacturers of medical and healthcare equipment in recent years. Hong Kong companies stand a good chance in acting as contract 28 HONG KONG BUSINESS ANNUAL 2013 manufacturers or as sourcing partner given their edge in quality assurance and IPR protection. Sales Channels Medical equipment is mainly sold directly to hospitals and clinics, while healthcare equipment is mostly distributed to department stores, chain stores and supermarkets via local or overseas trading companies. Wellestablished suppliers, such as Osim and OTO, have set up their own specialty shops. Many of Hong Kong’s medical and healthcare goods are exported under OEM arrangements with supplied product specifications and designs. Hong Kong manufacturers maintain a great reputation for handling customer’s intellectual properties (IP) and sensitive technology. Recently, Hong Kong manufacturers have been increasingly involved in product design and development, engineering, modelling, tooling and quality control. Many “In the first seven months of 2012, Hong Kong’s total exports of medical and healthcare equipment increased by 3%.” Hong Kong manufacturers apply different international certifications for their products to differentiate them from lowerend products. Industry Trends Demographic trends have important impact on the medical and healthcare equipment industry. According to World Health Report released by the a World Health Organisation, the world average life expectancy will rise to 73 years by 2025 – a 50% improvement on the 1955 average of only 48 years. Currently, there are more than 759 million people aged 60 or above which accounts for 11% of the world’s total population. According to the United Nations, there will be 2 billion people in the world who are aged 60 and over by 2050. These trends have resulted in an increasing demand for medical and healthcare products designed for the ageing population. The increasing share of medical services or healthcare in household expenditures in some developing countries can be translated into more opportunities for Hong Kong exporters of medical and healthcare products. medical & healthcare equipment industry - company and industry Performance of Hong Kong’s Exports of Medical and Healthcare Equipment^ 2010 2011 Jan-Jul 2012 HK$ Mn. Growth % HK$ Mn. Growth % HK$ Mn. Growth % Domestic Exports 23 -21 15 -35 9 +4 Re-exports 10,057 +5 10,933 +9 6,394 +3 Of Chinese Mainland origin 4,108 +3 4,382 +7 2,553 +3 Total Exports 10,080 +5 10,948 +9 6,403 +3 by Markets 2010 2011 Share% Growth% Share% Growth% Chinese Mainland 54.4 +6 55.7 +11 US 13.7 +8 14.3 +14 EU (27) 9.6 +7 9.4 +7 Germany 3.3 +11 3.7 +21 Netherlands 1.8 +16 1.8 +10 Japan 5.6 -21 4.7 -9 ASEAN 3.1 +3 2.7 -3 Russia 1.4 +66 1.6 +23 Taiwan 1.8 +3 1.5 -14 J an-Jul 2012 Share% Growth% 58.2 +9 12.9 -13 8.8 -6 3.5 +4 1.5 -21 4.7 +6 3.1 +18 1.9 +112 1.3 +5 by Categories 2010 2011 Jan-Jul 2012 Share% Growth % Share% Growth % Share% Growth % Miscellaneous Medical Instrument and 26.9 -11 23.6 -5 24.2 +11 Appliances Miscellaneous Electro-Diagnostic Apparatus 16.2 * 19.0 +27 21.1 +13 Syringes/Needles etc for Medical/Surgery 12.9 +72 12.5 +5 12.8 +1 ^ Since offshore trade has not been captured by ordinary trade figures, these numbers do not necessary reflect the export business managed by Hong Kong companies. * Insignificant Source: HKTDC Research CEPA Provisions Under the Mainland and Hong Kong Closer Economic Partnership Arrangement (CEPA), all items can enjoy duty-free access to the mainland beginning from 1 January 2006 by meeting the CEPA rules of origin. According to the stipulated procedures, products which have no existing CEPA rules of origin will enjoy tarifffree treatment upon applications by local manufacturers and upon the CEPA rule of origins being agreed and met. regulations cover various aspects of design, clinical evaluation, manufacturing, packaging, labelling and post market surveillance of medical devices. In the EU, medical devices are covered by three main directives which set out the requirements for performance and safety of medical devices and procedures for checking product compliance. A product is required to have a CE mark to show full compliance with relevant directives. The CE mark enables the product to be marketed in any EU member country. General Trade Measures Affecting Exports of Medical and Healthcare Equipment Equipment for medical purposes face stringent regulations in overseas markets. In the US, the Food and Drug Administration is responsible for ensuring that medical devices comply with the safety and effectiveness requirements stipulated in the Federal Food, Drug and Cosmetic Act. The US Product Trends As a result of the ageing population, treatments for cardiopulmonary disease, diabetes, and neurological disorders will see rapid growth, and so will orthopaedic devices and pharmaceuticals that can help ageing baby boomers stay active. In addition, increased consciousness in personal health and fitness in developed countries is boosting the demand for home- “Innovations such as microminiature and remote surgery techniques, DNA-based diagnostics, tissue-engineered organs and advanced information technologies provide solutions to some of the most persistent and debilitating healthcare problems and create demand for new medical and healthcare devices.” based or self care equipment such as commode chair, pill alarm box, ionizers and positioning aids, shower chairs, walkers, canes, crutches and patient lifts. These equipment facilitate the prevention, detection and control of diseases. Modern technology is playing a major role in the medical and healthcare equipment industry. Innovations such as microminiature and remote surgery techniques, DNAbased diagnostics, tissueengineered organs, and advanced information technologies provide solutions to some of the most persistent and debilitating healthcare problems and create demand for medical equipment utilising these new technologies. In addition, the bluetooth technology also gives rise to new medical devices such as a patient-worn pulse oximetry and a portable patient monitor. Technology has also given rise to telemedical services and lessinvasive procedures. HONG KONG BUSINESS ANNUAL 2013 29 company and industry - information technology equipment Hong Kong is world’s second largest exporter of computer parts Find out what the future holds for Hong Kong’s exports of IT equipment. H ong Kong exports a wide range of information technology (IT) products, especially computer parts and accessories like motherboards, keyboards, computer cases, power supplies, display cards, memory cards, LAN cards and cables and harnesses. According to the latest available statistics, Hong Kong was the world’s second largest exporter of computer parts and accessories in value terms in 2010 after the Chinese mainland. Most Hong Kong manufacturers have relocated their production facilities to the Chinese mainland, where various production processes like PCB assembly, plastics injection moulding and sheet metal working are carried out. The success of Hong Kong’s IT equipment industry also lies in efficient 30 HONG KONG BUSINESS ANNUAL 2013 management. Against the fast-changing markets, Hong Kong companies emphasise quick response to ensure effective marketing services to their customers, and to monitor the changing product trends. Many Hong Kong companies have strengthened their quality assurance and environmental management systems, and are accredited with ISO 9000 - an internationally recognised standard for quality management system, and ISO 14000 - a standard for environmental management system. Hong Kong’s exports of IT equipment expanded steadily by 6% in the first seven months of 2012. Exports of computer parts and accessories declined by 2%, while exports of complete computers and office machines grew by double digits in the period. “Hong Kong’s exports of IT equipment expanded steadily by 6% in the first seven months of 2012.” Sales Channels Hong Kong companies usually appoint agents, which may be exclusive distributors, to cater to distribution, technical support and after-sales services. Small manufacturers of computer parts usually sell to local dealers, who assemble the complete set computers with parts imported or sourced locally. Promotion via participation in trade fair missions organised by the Hong Kong Trade Development Council (HKTDC) is an effective way for Hong Kong’s IT IT equipment companies to establish connections with potential buyers. Industry Trends Increasing competition from the mainland information technology equipment - company and industry Performance of Hong Kong’s Exports of IT Equipment 2010 2011 Jan-Jul 2012 HK$ Mn. Growth % HK$ Mn. Growth % HK$ Mn. Growth% Domestic Exports 1,142 -4 2,381 +109 1,488 +22 Re-exports 331,677 +34 377,004 +14 231,014 +6 Of Chinese Mainland origin 238,925 +37 275,162 +15 170,954 +7 Total Exports 332,819 +33 379,386 +14 232,502 +6 2010 2011 Total Exports by Major Markets Share% Growth% Share% Growth% Chinese Mainland 69 +37 68 +12 US 6 +14 6 +10 EU (27) 6 +20 6 +11 Netherlands 2 +10 1 -4 Germany 2 +30 2 +18 ASEAN 7 +32 8 +45 Japan 3 +30 3 +11 Jan-Jul 2012 Share% Growth% 69 +7 6 +22 5 -7 1 -7 1 -16 9 +5 3 +17 2010 2011 Jan-Jul 2012 Total Exports by Categories Share% Growth % Share% Growth % Share% Growth % Computer Parts & Accessories 49 +31 46 +7 45 -2 Computers 30 +34 33 +28 35 +13 Office Machines 21 +39 20 +10 21 +11 Since offshore trade has not been captured by ordinary trade figures, these numbers do not necessarily reflect the export business managed by Hong Kong companies. Source: HKTDC Research and other Asian suppliers has long been a threat to Hong Kong companies. In response, many manufacturers have shifted the more labourintensive processes across the border. They have also changed their product mix to strengthen their competitiveness, moving towards higher value-added and more sophisticated products. Moreover, they have focused more on ODM business, rendering increased valueadded services to overseas customers. The most important attribute of their success in ODM business is product design and development capability, while knowledge of world product trends and consumer preferences in different markets are also their edge.. Detailed information, as well as the origin rules for electronic items, is available from the following hyperlink: english/cepa/tradegoods/files/ mainland_2012.pdf General Trade Measures Affecting Exports of IT Products Hong Kong exporters should be attentive to the growing popularity of green concept in the marketplace. Especially in Europe, consumers are generally conscious of environmental protection. Not surprisingly, the EU has adopted a number of directives “The industry is in the process to launch computer products with interfaces of faster communication speed or higher data transfer rate, especially those in USB 3.0 specification.” for environmental protection, which may have an impact on the sales of IT equipment. These include the restrictions on batteries and accumulators that contain mercury, as well as the Directive on Waste Electrical and Electronic Equipment implemented in August 2005, and the Directive on Restriction of Hazardous Substances that came into effect in July 2006. Product Trends 31 company and industry - jewellery industry Hong Kong faces intensifying competition in jewellery exports Blame it on suppliers from China, India, and Thailand. H ong Kong is the world’s fifth largest exporter of fine jewellery after India, the US, Switzerland and Italy. In the first eleven months of 2011, the growth of Hong Kong’s total exports of precious jewellery accelerated to 37% year-on-year, following an increase of 21% in 2010. However, prices of precious metals and stones have surged dramatically. In volume terms, Hong Kong’s exports of precious jewellery actually declined. The top three markets of Hong Kong’s precious jewellery exports are the US, the EU and Switzerland, collectively accounting for some 60% of the total. Sales (in value terms) to most traditional markets continued with their growth momentum in the first eleven months of 2011. For example, Hong Kong’s exports to the US and the EU increased 32% and 20% respectively after increasing 20% and 8%, respectively, in 2010. Hong Kong’s jewellery exporters are facing intensifying competition from suppliers in 32 HONG KONG BUSINESS ANNUAL 2013 the Chinese mainland and other countries, particularly India and Thailand. This, together with the price fluctuation of precious metals, diamonds, precious stones and materials, has somewhat trimmed down their profit margins. Yet, compared with other industries, jewellery makers are already in a better position to pass cost increases onto buyers and end users if they are caused by price surges of precious materials, which make up the most part of a jewellery article’s value. Sales Channels The jewellery industry of Hong Kong is by and large export-oriented. The trade is characterised by a subcontracting system under which small- and medium-sized factories provide subcontracting services, such as mould making, precision casting, gemsetting, polishing and electroplating, to larger manufacturers or local jewellery retailers. Mass production of jewellery products is normally restricted to established “Hong Kong is leading in the production of pure gold items, and a major centre for the production of jade jewellery.” manufacturers which are equipped with more sophisticated and automated production machines. The jewellery items made for export usually bear buyers’ brand names or logos. Some jewellery makers have set up overseas offices and outlets to promote sales. Online display is another growing trend. Some Hong Kong manufacturers are making inroads into retail and distribution in Hong Kong, helped by the flourishing tourist industry. According to Hong Kong Tourism Board’s survey, in 2010, vacation overnight visitors’ spending on jewellery and watch accounted for 25% of their total spending on shopping; as for those from the Chinese mainland, the share was higher at 28%. Industry Trends Recent technological development allows massive production of jewellery products with good quality and competitive prices. While Hong Kong’s jewellery industry remains basically a handicraft industry, a number of larger establishments have made use of sophisticated and automated production equipment. These manufacturers integrate advanced production techniques, such as electroforming, with handicraft skills to enhance their efficiency. They install computer-aided design and manufacturing (CAD/CAM) systems, as well as computer numerically controlled (CNC) machine tools in their product design and manufacturing processes. New technologies also enable Hong Kong manufacturers to develop new materials for fashionable jewellery items other than fixing defects and to increase the accuracy of the designed output. On marketing and distribution, some Hong Kong jewellers have built up their own branded jewellery or licensing agreements. While this is an effective strategy to enhance long-term competitiveness, it may also require local jewellery manufacturers to move into distribution. Apart from establishing direct retail outlets, the rapid development of online shopping in recent years is also noteworthy. It is expected that the application of e-commerce in the jewellery sector will continue to proliferate. Over the longer term, the development of internet shopping represents a new direct sales Jewellery industry - company and industry Performance of Hong Kong’s Jewellery Exports^ Precious Jewellery 2009 2010 Jan-Nov 2011 (SITC 897.3) HK$ Mn. Growth % HK$ Mn. Growth % HK$ Mn. Growth% Domestic Exports 5,789 -35 7,219 +25 7,830 +20 Re-exports 22,718 -20 27,378 +21 35,074 +42 Of Chinese Mainland origin 15,421 -22 19,069 +24 21,990 +26 Total Exports 28,507 -23 34,597 +21 42,903 +37 Precious Jewellery 2009 2010 by Markets Share% Growth% Share% Growth% US 35.7 -27 35.2 +20 EU (27) 24.1 -24 21.4 +8 France 5.4 -21 5.8 +30 United Kingdom 6.8 -24 5.7 +2 Italy 4.2 -22 3.5 +2 Switzerland 6.9 -25 7.8 +38 Macau 2.9 +30 3.6 +53 ASEAN 4.7 +9 4.9 +25 Chinese Mainland 7.1 +68 6.3 +8 India 1.2 -33 1.1 +9 J an-Nov 2011 Share% Growth% 34.1 +32 19.0 +20 5.6 +29 5.6 +33 2.8 +4 7.5 +38 6.7 +184 5.6 +66 5.0 +8 4.9 +521 Precious Jewellery 2009 2010 Jan-Nov 2011 by Categories Share% Growth % Share% Growth % Share% Growth % Articles of Jewellery, of Precious Metal 95.4 -24 96.3 +23 97.3 +38 Articles of Pearls, Precious or Semi-precious Stones 4.4 -2 3.2 -11 2.6 +12 Goldsmiths’ & Silversmiths’ Wares, Precious Metal 0.2 -13 0.5 +180 0.1 -66 Pearls, Gem-Stones and Rough Diamonds 2009 2010 Jan-Nov 2011 (SITC 667) HK$ Mn. Growth % HK$ Mn. Growth % HK$ Mn. Growth% Domestic Exports 202 -5 130 -36 97 -18 Re-exports 69,971 -17 95,678 +37 115,118 +34 Of Chinese Mainland origin 4,341 -23 5,672 +31 5,495 +9 Total Exports 70,173 -17 95,808 +37 115,215 +33 Imitation Jewellery 2009 2010 Jan-Nov 2011 (SITC 897.2) HK$ Mn. Growth % HK$ Mn. Growth % HK$ Mn. Growth% Domestic Exports 83 -26 101 +21 88 -3 Re-exports 6,954 -17 8,293 +19 8,138 +7 Of Chinese Mainland origin 6,585 -18 7,810 +19 7,554 +6 Total Exports 7,038 -17 8,394 +19 8,226 +7 Note: ^ Since offshore trade has not been captured by ordinary trade figures, these numbers do not necessarily reflect the export business managed by Hong Kong companies. Source: HKTDC Research method for Hong Kong jewellers in promoting their products. CEPA Provisions Under the Mainland and Hong Kong Closer Economic Partnership Arrangement (CEPA), the mainland has given all products of Hong Kong origin, including jewellery, tarifffree treatment starting from 1 January 2006. According to the stipulated procedures, products which have no existing CEPA rules of origin can enjoy tarifffree treatment upon applications by local manufacturers and upon the CEPA rule of origins being agreed and met. Non-Hong Kong made jewellery products remain subject to tariff rates as high as 35% when entering the mainland. The promulgated rules of origin for jewellery to benefit from CEPA’s tariff preference are basically similar to the existing rules governing Hong Kong’s exports of these products. Generally speaking, for jewellery articles of precious metal, moulding, identified as the principal process for the purpose of delineating their origin, is required to be carried out in Hong Kong. If assembling is required, it must also be done in Hong Kong. General Trade Measures Affecting Jewellery Exports In China, all gold trading at the wholesale level for producers and wholesalers now takes place in the Shanghai Gold Exchange, introducing market prices to the transactions. In 2004, China removed all barriers to “Hong Kong is the world’s second largest exporter of imitation jewellery and the fifth largest exporter of precious jewellery.” gold licensing for manufacture, distribution and retail of gold jewellery products, and allowed some mainland companies to import gold jewellery. In August 2010, China announced to let more banks import and export gold, to open trading further to foreign companies, to increase foreign members on the Shanghai Gold Exchange, and also to study ways to allow foreign qualified bullion suppliers to deliver to the exchange. Effective from May 2005, the value added tax (VAT) on exports of jewellery articles of gold and precious materials under general trade is exempted, but the VAT on the import content of such trade, collected when imported into China, is not rebated. Starting from July 2007, for certain pearl, precious stones and precious metal, the rebate rate was reduced from 13% to 5%. On the other hand, effective from April 2009, the export tax rebate on imitation jewellery has been lifted from 5% to 9%. Diamond (including rough diamond and unset polished diamond) imports and exports under general trade are required to go through the declaration formalities with the customs located inside the Shanghai Diamond Exchange (SDE). Diamonds directly entering SDE from overseas are exempted from import duty, value-added tax and consumption tax. All diamonds traded in SDE are exempted from value-added tax. Product Trends In terms of materials, white metal will remain the mainstream, while there has been a renewed interest and demand for colour stone jewellery. Demand for yellow gold is on a rise again, albeit with a fashionable twist. Titanium is gaining popularity for its light weight, strong nature and non-sensitivity to the human body. It is also worth noting that, in recent years, consumption of diamond jewellery has increased rapidly, particularly in emerging economies. HONG KONG BUSINESS ANNUAL 2013 33 company and industry - household electrical appliances industry The key to enhance HK’s competitiveness According to the latest available figures, Hong Kong was the world’s second largest exporter of hair dressing apparatus in value terms in 2010. H ong Kong produces and exports a wide range of household electrical appliances, including: (1) kitchen appliances ranging from food grinders, mixers and juicers to thermic appliances like coffee makers, toasters, electric knives, electric kettles and ovens; (2) home care appliances like electric fans, air conditioning machines, vacuum cleaners, floor polishers, space heaters and irons; (3) personal care products like hair dressing and hand drying apparatus, shavers, hair clippers, massagers, face steamers and electric toothbrushes; and (4) household lighting products. According to the latest available figures, Hong Kong was the world’s second largest exporter of hair dressing apparatus, and the fifth largest exporter of electric food grinders, mixers and juicers in value terms in 2010. Hong Kong’s total exports of household electrical appliances increased by 5% in the first half of 2012. Sales of major products like household lighting products and hair dressing/hand drying apparatus expanded in the period, while exports of thermic domestic 34 HONG KONG BUSINESS ANNUAL 2013 appliances declined by 3%. Sales Channels Hong Kong manufacturers of household electrical appliances mostly produce on OEM and ODM basis for reputable brand names, of which some have set up buying offices in Hong Kong for direct sourcing. Hong Kong companies also sell to specialised importers and traders in North America and Europe, who may distribute the merchandises through their own channels or re-sell to their clients for further distribution. There are a few large Hong Kong manufacturers like Goodway and Megaman marketing electrical appliances under their own brand names, while smaller companies also sell their brand products to smaller importers and distributors overseas. Their sales network covers not only the developed economies, but also emerging markets like Latin America and Eastern Europe. Promotion via participation in trade fairs is an effective way for Hong Kong companies of household electrical appliances to explore “Hong Kong’s total exports of household electrical appliances increased by 5% in the first half of 2012.” market opportunities. Important trade fairs include the CES Show held in the US, CeBit Home Fair and Domotechnica in Germany, and Hong Kong Electronics Fair organised by the Hong Kong Trade Development Council (HKTDC). Industry Trends Hong Kong exporters of household electrical appliances are subject to fierce competition from other Asian suppliers. Particularly in the case of simple appliances involving lesser technological input, Hong Kong companies have long been competing with Southeast Asian suppliers and local Chinese enterprises. companies to enhance their competitiveness. CEPA Provisions Since the implementation of the third phase household electrical appliances industry - company and industry Performance of Hong Kong’s Exports of Household Electrical Appliances ^ 2010 2011 Jan-Jun 2012 HK$ Mn. Growth % HK$ Mn. Growth % HK$ Mn. Growth% Domestic Exports 59 +4 54 -8 14 -47 Re-exports 21,487 +20 22,008 +2 10,948 +5 Of Chinese Mainland origin 20,594 +22 21,172 +3 10,609 +6 Total Exports 21,546 +20 22,062 +2 10,962 +5 2010 2011 Total Exports by Major Markets Share% Growth% Share% Growth% US 31 +27 30 -1 EU 23 +8 20 -8 Germany 5 +16 5 -2 United Kingdom 5 +23 3 -27 France 3 +44 3 +1 Japan 16 +33 20 +26 Chinese Mainland 6 +11 7 +6 Autralia 3 +16 3 +1 Jan-Jun 2012 Share% Growth% 28 -1 18 -13 4 -9 3 -8 3 -14 25 +38 6 -7 3 +9 2010 2011 Jan-Jun 2012 Total Exports by Categories Share% Growth % Share% Growth % Share% Growth % Household Lighting Products 22 +8 24 +17 23 +7 Thermic Domestic Appliances 23 +67 23 +1 20 -3 Hair Dressing / Hand Drying Apparatus 10 +14 9 -2 10 +13 Table/Floor/Wall/Window Fans, Output < 125W 5 +4 5 +1 8 +27 Domestic Vacuum Cleaners 4 +20 4 +4 5 +89 Since offshore trade has not been captured by ordinary trade figures, these numbers do not necessarily reflect the export business managed by Hong Kong companies. Source: HKTDC Research tarifffree. General Trade Measures Affecting Exports of Household Electrical Appliances Hong Kong exporters should be attentive to the growing popularity of green concept in the marketplace. Especially in Europe, consumers are generally conscious towards environmental Household electrical appliances carrying a single function are “Industry players are focusing on the development of LED lamps, which can reduce power consumption with an even longer lifetime than the electronic compact fluorescent lamps.” much sought after in Western markets. These include heatingbased products, like coffee/tea makers and toasters; and motorbased appliances such as food choppers, blenders and juiceextractors. Regarding household lighting products, aesthetic design is among the major elements manufacturers harness to tap the market demand. A wide range of lighting sets for domestic uses, such as track lights, linear lights and spotlights, are offered in a great variety of novelty designs in order to meet different consumer preferences. Along with the growing concern on environmental protection, the provision of environmentally appealing electrical appliances which comply with, for instance, European or North American eco-labelling and energysaving schemes, is becoming a competitive edge of Hong Kong exporters of household electrical appliances. HONG KONG BUSINESS ANNUAL 2013 35 company and industry - import and export industry Hong Kong is the world’s 10th largest trading economy In 2011, Hong Kong’s total merchandise trade increased by 11% to US$910.5 billion. H ong Kong’s import and export trading firms are active in sourcing various types of goods, including raw materials, machinery and parts, and a wide range of consumer goods. There are three main types of sourcing activities: (1) sourcing goods produced in Hong Kong; (2) sourcing goods from around the region for re-exports; and (3) sourcing goods from one country to be shipped directly to a third country without touching Hong Kong ground. According to the Census and Statistics Department, Hong Kong’s sales value of offshore trade (includes both “merchanting” and “merchandising for offshore transactions”) in 2010 amounted to HK$3,886.3 billion, up 32.6% over 2009. In comparison, the value of re-exports was HK$2,961.5 billion in 2010, up 22.8% over 2009. The amount of offshore trade has surpassed the value of Hong Kong’s reexports. 36 HONG KONG BUSINESS ANNUAL 2013 Service Providers Hong Kong’s import and export trading firms are typically small, employing around 6 persons each on average. There were 102,273 import and export trading firms in Hong Kong in 2011, with less than 300 of these firms having more than 100 employees each. There are three broad categories of import and export trading firms: • Left hand-right hand traders: these refer to trading firms which match sellers and buyers without adding any significant value to the process. These firms rely on their specialist knowledge of the sources of products in the region and the low costs of their supplies as their main competitive advantages. • Traders with some value added services: Many firms now source raw materials for their suppliers and provide finance for these materials. They often use letters of credit from their customers as a guarantee for raising finance for their purchase orders. “As at December 2011, 495,847 people were employed in the import and export trade sector, which had 102,273 establishments.” • Traders with sophisticated value-added services: In certain cases exporting firms have added value to their traditional activity to such an extent that it may be difficult to retain the label of being exporters. The business environment for Hong Kong’s trading firms is becoming more challenging amid the growing trend toward direct dealing between customers and manufacturers, known as “trade disintermediation”. In 2010, the rate of gross margin1 of merchanting was 6.1%, down from 6.9% and 8.6% in 2009 and 2004 respectively, illustrating the squeeze in margin. In the same period, the commission rate of merchandising2 for offshore transactions was 5.5% (2004: 3.6%; 2009: 5.5%), while the rate of re-export margin was 15.9% (2004: 17.3%; 2009: 16.9%). Exports Hong Kong’s import and export trading sector exports its services mainly in the form of offshore buying and selling of goods. Given Hong Kong’s proximity and the relocation of In 2011, Hong Kong earned US$35.2 billion import and export industry - company and industry Industry Data Import and Export Trade : December 2011 Number of Establishments : 102,273 Employment : 495,847 (US$ BILLION) 2005 2006 2007 2008 2009 2011 Export of Merchanting and Trade-related Services 20.8 22.9 25.5 27.7 26.5 35.2 Year-on-year (YoY) growth +10.7% +9.9% +11.6% +8.5% -4.3% +12.6% Contribution to Services Exports 32.7% 31.5% 30.1% 30.0% 30.9% 29.2% Source: Gross Domestic Products (Quarterly), Census and Statistics Department Major Export Markets of Merchanting and Trade-related Services (US$ million) 2009 YoY growth 2010 YoY growth US 7,790 29.4% +0.9% 9,657 30.9% +24.0% China 5,518 20.8% -16.9% 6,632 21.2% +20.2% UK 1,596 6.0% -4.1% 2,067 6.0% +29.5% Germany 1,316 5.0% -18.0% 1,561 5.0% -18.6% Japan 1,383 5.2% +0.3% 1,522 4.9% +10.1% Source: Report on Hong Kong Trade in Services Statistics, Census and Statistics Department from exporting merchanting and trade-related services, accounting for 29.2% of total services exports. The Chinese mainland accounted for 21.2% of Hong Kong’s exports of merchanting and trade-related services in 2010. Industry Development and Market Outlook • Despite the gloomy global economy, Hong Kong’s total merchandise trade increased 11% to US$910.5 billion in 2011, helped to an extent by the economic gravity shifted from West to East. This followed a strong trade performance in 2010, recording a surge of 23.9% to US$820 billion. Many other countries in Asia also showed remarkable growth in exports and imports in both 2010 and 2011. • In addition, over the past few years, there has been an increase in companies in developed economies treating Asia as a market instead of a pure production base. Based on WTO statistics, North America’s exports to Asia expanded 27% in 2010, surpassing 13% in respect of its exports to Europe for the same year. Similarly, Europe’s exports to Asia expanded 22% in 2010, surpassing 13% in respect of its exports to North America for the same year. The Closer Economic Partnership Arrangement between Hong Kong and the Mainland(CEPA) According to the “Measures for the Administration on Foreign investment in Commercial Fields”, which became effective in December 2004, foreign-owned enterprises are allowed to enter the mainland market to engage in trading business, not being subject to any minimum annual trading value. However, foreignowned enterprises need to meet the regulations on the minimum registered capital (as stipulated in the related rules of Company Law3), registered capital and investment value. Under CEPA, Hong Kong service suppliers (HKSS) can provide commission agents’ services in respect of chemical fertilisers, processed oil and crude oil, and wholesale trade services and retailing services in respect of chemical fertilisers. In addition, for the same HKSS which open more than 30 stores accumulatively on the mainland, if the commodities for sale include pharmaceutical products, pesticides, mulching films, “In 2011, about 14% of the Chinese mainland’s exports (US$258 billion) and 13% of imports (US$220 billion) were handled via Hong Kong and 61.6% of Hong Kong’s total re-exports were originated from the Chinese mainland.” chemical fertilisers, vegetable oil, edible sugar and cotton, and the above commodities are of different brands and come from different suppliers, the Hong Kong service supplier is allowed to operate on a whollyowned basis. Currently, a single foreign enterprise under the same condition can only hold a maximum 49% share in the business. 1 “Rate of gross margin” refers to the gross margin from merchanting expressed as a percentage of the sales value of goods involved, while “commission rate” is the commission from merchandising for offshore transactions expressed as a percentage of the sales value of goods involved. “Rate of re-export margin” is defined as the re-export margin expressed as a percentage of the value of re-exports. 2 The difference between “merchanting” and “merchandising” is that, an establishment engaged in “merchanting” takes ownership of the goods involved, whereas one engaged in merchandising transactions does not take ownership of the goods involved. 3 According to Company Law, the minimum registered capital is RMB 30,000. HONG KONG BUSINESS ANNUAL 2013 37 company and industry - building and construction industry Why Hong Kong is a regional leader in construction The adoption of specialised construction techniques, such as reclamation and design-and-build methods, has made Hong Kong a regional leader. C onstruction activities can broadly be classified into three categories, namely buildings (residential, commercial, and industrial/storage/service), structures and facilities (transport, other utilities and plant, environment, and sports and recreation), and nonsite activities (decoration, maintenance and repair, etc.). The overall gross value of construction work performed by main contractors in Hong Kong (in real terms) has been rising since 2009. A strong growth of 35% in the value of public sector sites drove up the construction activity by 16% to HK$129 billion in 2011. Recently the rise in public expenditure on infrastructure has mainly been driven by the Ten Mega Infrastructure Projects and transport infrastructural projects, including the Guangzhou-Shenzhen-Hong Kong Express Rail Link, and the Hong KongZhuhai-Macau Bridge. To expand land supply and enhance infrastructure, the government will carry out works in new development districts such as Tseung Kwan O, Kai Tak, Tuen Mun and Yuen Long. These works include land formation, road construction and laying of water mains. As the infrastructure projects are being rolled out as scheduled, the demand for construction services in Hong Kong, particularly demand from the public sector, 97% of the construction industry. The majority of the small ones act as “The ten mega infrastructure projects announced in 2007 are being rolled out in phases as scheduled, boosting Hong Kong’s construction market.” subcontractors to the large companies, which tend to be main contractors. There are quite a number of very can tender public sector projects so long as they have good track records and sufficient financial capability. Many services professionals are involved in the building and construction industry, notably architects, surveyors and engineers. Exports Hong Kong’s expertise in timely construction of quality high-rise residential and commercial buildings is internationally renowned and in great demand in overseas markets, especially on the Chinese mainland. The Middle East has arisen to be a market with growing potential for Hong Kong’s construction companies. Government infrastructure plans as well as stimulus packages provide good support to construction activities in the Gulf region. Taking Saudi Arabia for example, the government launched a stimulus package valued over US$100 billion in 2011, with nearly half of the investment going to the infrastructure development. According to the country’s infrastructure report released in the first quarter of 2012, the construction industry is expected to grow at 5.4% in 2012. Major types of Hong Kong’s exported services include project management, contracting and engineering consulting. Industry Development and Market Outlook To achieve the objective of promoting economic growth through infrastructural development, the Hong Kong government has been increasing its infrastructure investment over the past few years. Some of the mega infrastructure projects announced 38 HONG KONG BUSINESS ANNUAL 2013 building and construction industry - company and industry Summary of 10 infrastructure projects Project Description Value (US$min) Commencement Target completion 1. South Island Line (SIL) Linking Admiralty to the Southern District on Hong Kong Island 1,590 2011 2015 2. The Shatin to Central Link (SCL) •Connecting the northeast New Territories and Hong Kong Island 8,321 2012 2018 / 2020 3. The Tuen Mun Western Bypass and Tuen Mun Chek Lap Kok Link • Linking up Deep Bay in Shenzhen, the northwest New Territories and Hong Kong International Airport Over 2,500 To be announced 2016 4. The GuangzhouShenzhen-Hong Kong Express Rail Link • Linking up the national rail network of the Chinese mainland • Connecting West Kowloon to Shibi, Guangzhou 8,000 2010 2015 5. Hong Kong-Zhuhai Macau Bridge • 29.6 km-Bridge with 6 lanes • Linking up Hong Kong, Zhuhai and Macau 2,740 2010 2016 6. Hong Kong-Shenzhen Airport • A dedicated rail link between Shenzhen Airport and Hong Kong International Airport N.A. N.A. N.A. 7. Hong Kong-Shenzhen Joint Development of the Lok Ma Chau Loop • Lok Ma Chau Loop, an area near the Hong KongShenzhen border • Working with Shenzhen authorities to develop the area N.A. N.A. N.A. 8. West Kowloon Cultural District (WKCD) • The flagship art and culture development in Hong Kong with aims to provide a platform to enhance arts education and cultural exchange and cooperation. Over 2,769 2013 2015 ( first phase) 9. Kai Tak Development Plan • An area consisting of former Hong Kong airport and its adjoining parts • To be developed into an area for commercial, residential, recreational, tourism and community uses together with supporting infrastructure. Over 16,700 2009 2013 / 2016 / 2021 ( In 3 phases) 10. New Development Areas (NDAs) • In the Northern New Territories • Purposes of land use include housing, employment, high value-added and non-polluting industries N.A. N.A. 2019 (first phase) Source: Various press and government sources in the Policy Address in October 2007 have had their details published and tenders released, thereby driving up local construction activities. Apart from the ten infrastructure projects, the Hong Kong government has also forged ahead with other works, such as Operation Building Bright and Revitalising Historic Building. In addition, further development of the Hong Kong International Airport, including the construction of the third runway, has been approved. In the Budget 2012/13, the Hong Kong government projected that total public spending on infrastructure will go up by 7.4% to HK$62 billion (US$7.9 billion) for the fiscal year ending 31 March 2013. As a result, the total value of infrastructural projects is expected to rise significantly from HK$62 billion in 2007/08 to HK$184 billion in 2012/13. In the next few years, the public infrastructure expenditure is estimated to exceed HK$70 billion annually. Infrastructure Projects in the Region Many Asian countries need to upgrade their basic infrastructure such as road networks, port facilities, and housing. The rise of Asian consumerism has also led to rising investment in modernising their retail distribution channels. Shopping malls are springing up in many Asian countries, typically India, Indonesia, the Philippines, Thailand, Malaysia and Vietnam. Hong Kong construction companies are actively seeking opportunities in these markets. Luks Group, for example, engages in cement production and property “Hong Kong’s construction industry performed well in the second quarter of 2012, with the gross value of construction work performed by main contractors amounting to HK$39.2 billion (US$5.0 billion), gaining 34% year-on-year (YoY).” development in Vietnam. The Middle East is another market which has attracted many Hong Kong companies, with many projects won in many Middle East countries. Hip Hing Construction has won contracts in Abu Dhabi’s (the capital city of the UAE) carbon-free city Masdar, as well as contracts in Dubai to construct a 72-storey residential building called HHHR Tower together with Al Ahmadiah Contracting & Trading. Paul Y was awarded a contract worth US$77 million to build the 54-storey Arraya Office Tower in Kuwait. Another Hong Kong construction company, Chun Wo Development, also entered the Middle East market with initial investments in two residential projects in Abu Dhabi (expected to be completed by 2013). HONG KONG BUSINESS ANNUAL 2013 39 company and industry - clothing industry Hong Kong clothing companies excel in ODM, OEM production They are able to deliver quality clothing articles even in short lead times. S tarting 1 January 2009, textile and clothing products originating in China no longer require any import licence or surveillance document before entering the EU. Meanwhile, textile and clothing shipments to the US made on or after 1 January 2009 are no longer subject to any quotas. decreased by 7% year-on-year in the first four months of 2012, when domestic exports and re-exports declined by 23% and 6%, respectively. During January-April 2012, Hong Kong’s clothing exports to the US and EU, the two largest markets that accounted for 65% of the total, rose by 1% and fell by 19%, respectively. The clothing industry is a major manufacturing sector of Hong Kong. It is the third largest manufacturing employer in Hong Kong, with 1,034 establishments hiring 11,375 workers as of December 2011. Performance of Hong Kong’s Exports of Clothing Hong Kong and mainland clothing manufacturers have relocated their production of lower-end and mass products to Southeast Asian countries like Bangladesh, Vietnam and Indonesia. Their manufacturing operations on the mainland are now focused on more sophisticated and higher valueadded items or urgent orders. Hong Kong’s total exports of clothing fell by 7% year-on-year in the first four months of 2012 after an increase of 2% in 2011. During January-April 2012, Hong Kong’s domestic exports of clothing saw a decline of 23%, while re-exports fell by 6%. Productwise, Hong Kong’s exports of woven wear fell by 8% year-on-year in the first four months of 2012, with woven wear for men/ “Hong Kong’s total exports of clothing decreased by 7% year-on-year in the first four months of 2012.” boys and women/girls decreasing by 4% and 10%, respectively. Meanwhile, knitted wear fell by 6%, with items for men/boys and women/ girls dropping by 5% and 7%, respectively. Clothing accessories fell by 2%, while other apparel articles slid by 7%. Sales Channels Hong Kong’s clothing manufacturers have comprehensive knowledge about sourcing and products. They are able to understand and cater for the preferences of the dispersed). Industry Trends Online shopping and marketing: Online shopping is increasingly popular in Hong Kong’s major markets, including China. According to China Internet Network Information Center (CINNIC), the total number of online shopping transactions on the Chinese mainland exceeded RMB $750 billion in 2011, boasting 173 million online shoppers. Growing importance of private labels: Private or house labels, in essence, have become an increasingly effective marketing tool among garment retailers. In order to differentiate as well as upgrade the image of their products, major retailers have started to put a stronger emphasis on their own labels. Rising green consciousness: Consumers are becoming more practical, thoughtful and socially conscious. For instance, according to Textile Exchange, retail sales of organic cotton products will likely grow to US$7.4 billion in 40 HONG KONG BUSINESS ANNUAL 2013 clothing industry - company and industry Lorem 2010 2011 Jan-Apr 2012 (HK$ billion) Value Growth % Value Growth % Value Growth% Domestic Exports 3.2 -28 2.8 -14 0.7 -23 Re-exports 183.6 +7 18.78 +2 48.6 -6 Of Chinese Mainland origin 176.9 +6 177.7 +1 44.9 -8 Total Exports 186.8 +6 190.6 +2 49.2 -7 2010 2011 by Markets Share% Growth% Share% Growth% US 36.6 +8 35.0 -3 EU 35.2 +1 33.0 -5 Germany 8.6 +5 8.4 * United Kingdom 9.7 -3 8.2 -14 France 3.6 +7 3.5 -3 Italy 3.6 +7 3.5 +1 Netherlands 3.5 +4 3.2 -6 Japan 6.5 -3 7.3 +15 Chinese Mainland 3.6 +18 4.8 +39 Australia 2.6 +1 2.8 +8 Canada 3.5 +2 3.5 +4 Jan-Apr 2012 Share% Growth% 35.9 +1 28.7 -19 7.4 -21 7.1 -22 3.1 -18 2.8 2.5 -26 6.9 -9 6.0 +9 3.5 -6 3.4 -9 2010 2011 Jan-Apr 2012 by Categories Share% Growth % Share% Growth % Share% Growth % Woven wear 33.1 +2 33.6 +3 37.8 -8 For men or boys 11.5 +7 12.6 +12 13.9 -4 For women or girls 21.6 * 20.9 -1 23.9 -10 Knitted wear 16.5 +10 15.9 -2 16.3 -6 For men or boys 5.1 +13 5.1 +4 5.6 -5 For women or girls 11.4 +9 10.8 -4 10.7 -7 Clothing accessories 6.9 +12 7.7 +14 7.1 -2 Of textile fabrics 2.1 +10 2.3 +12 1.9 -8 Of non-textile fabrics 4.8 +14 5.4 +15 5.2 +1 Other apparel articles 43.4 +6 42.8 +1 38.8 -7 ^ Since offshore trade has not been captured by ordinary trade figures, these numbers do not necessarily reflect the export business managed by Hong Kong companies. * Insignificant Source: HKTDC Research 2012. Growing interest in China’s domestic market: The rapid expansion of mainland’s economy has drawn the attention of both Hong Kong and foreign clothing companies. While some well-established foreign players including C&A, Uniqlo and H&M are seeking to expand in the lower-tier cities, those which are not yet present on the mainland are working hard to mark their inroads. CEPA The promulgated rules of origin for clothing items to benefit from CEPA’s tariff preference are basically similar to the existing rules governing Hong Kong’s exports of these products. Generally speaking, the principal manufacturing process of cut knitto-shape-panels, the principal process is linking of knit-toshape panels into garment. If stitching is required, it must also be done in Hong Kong. Detailed information is available from the following hyperlink: http:// “During January-April 2012, Hong Kong’s clothing exports to the US and EU, the two largest markets that accounted for 65% of the total, rose by 1% and fell by 19%, respectively.” tradegoods/files/mainland_2011. pdf. General Trade Measures Affecting Exports of Clothing. HONG KONG BUSINESS ANNUAL 2013 41 company and industry - telecommunications equipment industry A peek inside Hong Kong’s telco industry Hong Kong exports a variety of telecommunications equipment, ranging from basic telephones, mobile phones to sophisticated system products. H ong Kong’s exports of telecommunications equipment rose by 11% in the first seven months of 2012. Exports to the Chinese mainland, the largest market, expanded by 15% in the period, while exports to the US and the EU increased amid continued consumer demand for telecommunications products. Sales of mobile phones with advanced features, particularly the so-called smart phones, are rising rapidly. Broadband applications for the fixed-network, especially those making use of optical communications technologies, are hot areas for development. With respect to domestic products, higher frequency cordless phones are sought after in the market. Industry Features Hong Kong exports a variety of telecommunications equipment, ranging from basic telephones to sophisticated system products. Major export items include corded phones, cordless phones, mobile phones, etc. According to the latest available statistics, Hong Kong was the world’s largest exporter of telephone sets in value terms in 2010. Another major export category is parts and accessories, including parts for system products and a variety of mobile phone accessories. Hong Kong also exports different kinds of telecommunications apparatus with radio reception, like walkie talkies and base stations for telecommunications. Other items include navigational apparatus like GPS devices and telephone switching/exchange equipment. Sales Channels Hong Kong companies usually sell their products on OEM and ODM basis to overseas telephone companies and specialised “Hong Kong’s exports of telecommunications equipment rose by 11% in the first seven months of 2012.” importers of telecommunications equipment, which are capable of obtaining approvals from relevant telecommunications authorities in the corresponding markets. After-sales services, such as installation and maintenance, are usually undertaken by the overseas buyers, while Hong Kong suppliers provide technical support to their buyers. On the other hand, a few Hong Kong companies market their own brand products in markets like the US and the EU. Some companies also have offices in overseas countries to monitor local distribution and/or after-sales services. Industry Trends Increasing competition from mainland and other Asian suppliers has long been a threat to Hong Kong companies. In response, many Hong Kong companies have differentiated their products by enhancing product features, and enriched their product lines through new product development. Meanwhile, Hong Kong companies put more emphasis on ODM manufacturing... 42 HONG KONG BUSINESS ANNUAL 2013 telecommunications equipment industry - company and industry Performance of Hong Kong’s Exports of Telecommunications Equipment ^ 2010 2011 Jan-Jul 2012 HK$Mn. Growth % HK$Mn. Growth % HK$Mn. Growth % Domestic Exports 10,257 +33 2,466 -76 114 -95 Re-exports 284,282 +33 354,327 +25 221,461 +13 of Chinese Mainland Origin 247,478 +35 315,183 +27 194,188 +11 Total Exports 294,540 +33 356,793 +21 221,575 +11 Total Exports by Major Markets Chinese Mainland US EU(27) Netherlands Germany ASEAN Singapore India 2010 2011 Share% Growth% Share% Growth% 41 +41 44 +28 13 +35 10 -7 13 +22 12 +11 5 +31 4 -4 2 +21 1 +4 7 +26 6 +9 3 +26 2 -6 5 +86 5 +22 Jan-Jul 2012 Share% Growth% 45 +15 10 +12 11 +3 4 +11 1 -2 6 +2 2 -16 5 +1 Total Exports by Categories 2010 2011 Jan-Jul 2012 Share % Growth % Share % Growth % Share % Growth % Parts of Telecommunications 46 +39 47 +25 47 +10 Equipment Other Apparatus for 33 +28 28 +2 30 +19 Transmission or Reception Telephone Sets 20 +30 24 +45 22 +3 Radar/radio Navigational Aid Apparatus 1 +50 1 +5 1 +17 ^ Since offshore trade has not been captured by ordinary trade figures, these numbers do not necessarily reflect the export business managed by Hong Kong companies. Source: HKTDC Research General Trade Measures Affecting Exports of Telecommunications Equipment IT equipment. Spurred by the demand for high-speed data transmission and Internet access via the fixed-network, broadband applications, especially those making use of optical communications technologies, are hot areas for development. “Sales of mobile phones with advanced features, particularly the so-called smart phones, are rising rapidly.” But some companies have continued to concentrate on the digital subscriber line (DSL) technology, which utilises the existing copper telephone lines to deliver highspeed data services., 2.4GHz and 5.8GHz cordless phones for the US. Higher frequency products are well sought after due mainly to their better communication quality and enhanced security. Yet corded telephones are not expected to become obsolete in the medium term. HONG KONG BUSINESS ANNUAL 2013 43 company and industry - electronics industry The key to electronics industry’s success revealed Hong Kong’s electronics industry is the largest merchandise export earner of the territory, accounting for 55% of Hong Kong’s total exports in 2011. H ong Kong’s electronics industry is the largest merchandise export earner of the territory, accounting for 55% of Hong Kong’s total exports in 2011. According to the latest available statistics, Hong Kong was the world’s largest exporter of telephone sets; the second largest exporter of calculators, sound recording apparatus, computer parts/accessories and video recording/ reproducing apparatus (including DVD recorders/players); and the world’s third largest exporter of radios and video cameras/recorders (including digital cameras) in value terms in 2010. The success of Hong Kong’s electronics industry lies in efficient management. Against the fast changing markets, Hong Kong companies emphasise quick response to ensure effective marketing services to their customers, and to monitor the changing product trends. Hong Kong’s electronics exports rose by 4% in the first half of 2012, after a 9% growth in 2011. Exports of IT equipment, telecommunications equipment and AV equipment grew by different degrees. But exports of semiconductor items were lacklustre. Sales Channels Hong Kong manufacturers of finished electronic items mostly produce on OEM merchandise under their own channels or re-sell to their clients for further distribution. Hong Kong is an important trading hub for electronic parts and components in Asia- Pacific. Many items from the US, “Hong Kong’s electronics exports rose by 4% in the first half of 2012.” Europe, Japan, Taiwan, and South Korea are reexported via Hong Kong to the Chinese mainland, and vice versa. A number of multinational manufacturers of parts and components have set up their offices in Hong Kong, engaging in sales, distribution and sourcing activities in the Asia-Pacific region. Industry Trends.. 44 HONG KONG BUSINESS ANNUAL 2013 electronics industry - company and industry Performance of Hong Kong’s Exports of Electronics ^ 2010 2011 Jan-Jun 2012 HK$ Mn. Growth % HK$ Mn. Growth % HK$ Mn. Growth% Domestic Exports 17,156 +14 9,532 -44 3,449 -41 Re-exports 1,673,793 +28 1,841,149 +10 930,284 +4 Of Chinese Mainland origin 1,072,585 +28 1,202,871 +12 612,577 +6 Total Exports 1,690,949 +28 1,850,680 +9 933,733 +4 210 2011 Total Exports by Major Markets Share% Growth% Share% Growth% Chinese Mainland 63 +29 64 +10 EU (27) 8 +24 8 +3 Germany 2 +27 2 +7 Netherlands 2 +26 1 -9 US 7 +25 6 -4 ASEAN 6 +26 6 +15 Singapore 2 +22 2 +6 Japan 4 +20 3 +3 Jan-Jun 2012 Share% Growth% 64 +4 7 * 2 * 2 +11 7 +7 6 +4 2 -2 4 +11 2010 2011 Jan-Jun 2012 Total Exports by Categories Share% Growth % Share% Growth % Share% Growth% Finished Products 25 +26 26 +14 28 +12 Parts and Components 75 +29 74 +8 72 +1 2010 2011 Jan-Jun 2012 Total Exports by products Share% Growth % Share% Growth % Share% Growth % AV Equipments & Parts 14 +12 13 -2 13 +7 IT Equipment & parts 20 +33 20 +14 22 +8 Telecom. Equipment & Parts 17 +33 19 +21 20 +13 Semiconductors, Electronic Valves & Tubes 29 +24 29 +7 27 -4 ^ Since offshore trade has not been recorded by ordinary trade figures, these numbers do not necessarily reflect the export business managed by Hong Kong companies. * Insignificant Source: HKTDC Research General Trade Measures Affecting Exports of Electronics electronic products. On the back of technological advancement and falling prices amid keen competition, conventional IT products like desktop and notebook computers have become mass “Hong Kong was the world’s largest exporter of telephone sets; and the second largest exporter of calculators, sound recording apparatus, computer parts/accessories and video recording/ reproducing apparatus in value terms in 2010.” products. Now, the industry is focusing on further technological enhancement to sustain their business. Notably, mobile computer devices with wireless connectivity, in particular the tablets such as the iPad, are well received in the market. Meanwhile, 45 company and industry - textiles industry Textiles industry responds swiftly to fashion trends Hong Kong’s textiles industry serves not only the local clothing manufacturers, but also those on the Chinese mainland and other offshore production bases. T he textiles industry – comprising spinning, weaving, knitting and finishing of fabrics – had a total of 766 manufacturing establishments as of December 2011, employing 5,787 workers, or 5.2% of the local manufacturing workforce. The textiles industry is one of Hong Kong’s major export earners, accounting for 2.5% of the total exports for the first four months of 2012. After levelling off in 2011, Hong Kong’s textile exports fell by 13% in the first four months of 2012. Re-exports, accounting for more than 98% of total textiles exports, experienced a decline of the same magnitude, while domestic exports continued its downtrend with a 17% slide. With 72% of them originating from the Chinese mainland, re-exports also registered a decrease of 13% in January-April 2012. Product-wise, Hong Kong’s exports of textile yarns (down 21%), woven fabrics (down 16%), knitted or crocheted fabrics (down 7%) and cotton (down 16%) all suffered decline, in the first four months of 2012. Sales Channels The industry is capable of producing either a wide range of quality products in bulk or specialised items within a short lead-time.. The Interstoff Asia International Fabric Show, held twice a year in spring and autumn, is a significant marketing and sourcing platform in the region for both fabric manufacturers and buyers alike.added activities such as sales and marketing, quality control, designs and development, while offshore plants are specialised in production operations. This, in turn, results in a high “Asia is the leading market for textiles exported from Hong Kong, accounting for more than 92% of the total textile exports.” proportion of re-exports (98%) in Hong Kong’s textiles exports portfolio. With rising labour costs, RMB appreciation, fluctuations in raw material prices and stricter environmental regulations on the Chinese mainland, many Hong Kong’s textiles manufacturers have re-allocated their production facilities to other Southeast Asian countries, like Vietnam, Cambodia and Bangladesh. A few companies have even set up offshore production in Latin America (e.g. Mexico) to take advantage of preferential treatments allowed by regional trade agreements such as North American Free Trade Agreement (NAFTA). CEPA Provisions On 18 October 2005, the mainland and Hong Kong textiles, tariff-free treatment starting from 1 January 2006. According to the stipulated procedures, products which have no existing CEPA rules of origin will enjoy tariff-free treatment upon applications by local manufacturers and upon the CEPA rule of origins being agreed and met. But nonHong Kong made textile products will remain subject to average tariff rates of 10-25% when entering the mainland General Trade Measures Affecting Exports of Textiles. Product Trends Among various kinds of fibres, cotton remains the most preferred material for consumers in the apparel market. With reference to the 2012 survey by the Cotton Incorporated, more than 8 out of 10 UK 46 HONG KONG BUSINESS ANNUAL 2013 textiles industry - company and industry Performance of Hong Kong’s Exports of Textiles^ (HK$ Billion) 2010 2011 Jan-Apr 2012 Value Growth % Value Growth % Value Growth % Domestic Exports 1.954 -10 1.576 -19 0.474 -17 Re-exports 85.895 +14 86.215 * 25.926 -13 Of China-origin 666.549 +13 61.016 +1 18.600 -13 Total Exports 87.848 +14 87.791 * 26.400 -13 by Markets 2010 2011 Share% Growth% Share% Growth% China 71.0 +13 67.6 -5 Vietnam 5.3 +21 6.3 +19 Cambodia 3.2 +35 3.8 +18 Indonesia 3.6 +16 4.0 +12 Bangladesh 3.1 +22 3.4 +12 Sri Lanka 1.6 +7 1.6 +2 US 1.5 +12 1.6 +9 Thailand 1.1 +25 1.5 -3 Philippines 0.9 +6 1.3 +24 India 0.9 +27 1.0 +9 J an-Apr 2012 Share% Growth% 65.5 -17 6.8 -4 4.8 +22 4.0 -13 4.0 -6 1.7 -4 1.7 +6 1.5 -15 1.3 -10 1.0 -9 by Categories 2010 2011 Jan-Apr 2012 Share% Growth % Share% Growth % Share% Growth % Textile Yarns 29.0 +18 26.9 -7 28.3 -21 Woven Fabrics 30.1 +7 30.8 +2 28.3 -16 Knitted or Crocheted Fabrics 22.3 +11 23.0 +3 22.8 -7 Cotton 18.0 +4 18.1 +1 16.9 -16 Special Yarns and Fabrics 8.3 +29 8.3 * 8.6 -8 Man-made Textile Materials 8.3 +14 9.0 +8 8.5 -8 Finishing accessories 7.0 +21 7.5 +8 8.4 +4 Textile Made-up 2.9 +5 3.0 +5 3.0 -2 Others 3.8 +9 3.7 -2 2.9 -33 Floor Coverings 0.4 +16 0.4 +19 0.7 +61 ^ Since offshore trade has not been captured by ordinary trade figures, these numbers do not necessarily reflect the export business managed by Hong Kong companies. * Insignificant Source: HKTDC Research consumers prefer cotton clothing because of comfort (87%), nature (87%) and quality (85%). Meanwhile, some man-made fibre fabrics, such as polyester and polyester blends, are gaining popularity, partly due to the technical improvements such as moisture absorption. From the perspective of product innovation, microfibers are drawing greater attention from textiles manufacturers. The major benefits of textile products made of microfibers are its light in weight and superior performance in keeping warm. Aside from microfibers, many innovative new fibres and fabrics have bought demand in many different areas. To answer the needs, more and more breathable, flexible, anti-bacterial, anti-ultraviolet, wrinkle-free, water-resistant and environmental friendly materials are being invented and marketed. Consumers, particularly Europeans, are enthusiastic “Hong Kong’s textiles industry is reputed as a supplier of quality dyed and printed fabrics. It is also strong in cotton spinning, denim weaving, knit-toshape panel knitting and fine-gauge cotton knit manufacturing.” recycling of wastewater. Apart from rising green consciousness, product safety remains a major concern for consumers, not confining to developed market, but emerging markets such as the Chinese mainland. With the rapid urbanisation of towns, along with the marriage and baby boom, the demand for high-end household textile products is growing rapidly on the Chinese mainland. It is reported that the annual growth rate of consumption of household textile products will exceed 20% in the next 10 years, while the sector of household products is expected to replace the garment industry to present the leading demand for textiles. HONG KONG BUSINESS ANNUAL 2013 47 company and industry - printing industry Hong Kong as a major printing center of the world A large number of local and international newspapers, journals, periodicals and religious books and textbooks are printed in Hong Kong. P rinting is a supporting industry to publishing, advertising and various light consumer goods industries (toys, food, cosmetics etc). It is a leading manufacturing industry in Hong Kong. Overseas customers are increasingly looking for faster turnaround and shorter delivery time in order to maximise return through smaller but more frequent orders. Hong Kong printers are known for quality, quick delivery, competitive pricing and ability to cope with short-notice printing jobs. The quality is comparable to that of the US, Germany and Japan, the pioneers in printing technology. Hong Kong printers are also known for their inventiveness and willingness to find solutions to production problems. Hong Kong’s excellent telecommunication networks are great assets of the industry. In effect, publishers in Hong Kong can quickly access information from various parts of the world, an advantage of vital importance to time-sensitive publications. With proximity to the mainland market and a high degree of freedom of the press, Hong Kong has attracted many international publishers/news agencies (esp. media firms) to set up regional centres here. The Financial Times (Asia Edition), The Economist, The International Herald Tribute, The Asian Wall Street Journal etc, are all printed in Hong Kong and some are shipped into China for distribution. Sales Channels An estimated 60-70% of the export business is attributable to orders received directly from overseas countries. Within this, about a quarter of them come from major international publishers in Hong Kong. Export orders are mainly handled by larger printers or dealers, who have established business relationships with overseas customers. In order to expand business networks, explore market opportunities, and promote company image abroad, Hong “More products could now be printed in presses, e.g. wallpaper, desk pads and mouse pads, fabric posters, plastic labels etc.” Kong manufacturers and distributors may participate in trade fairs and study missions organised by the Hong Kong Trade Development Council (HKTDC). Industry Trends Many trends in printing pertain to the advent of new technology or production techniques. Filmless printing, such as computer-to-plate (CTP), is becoming mature. With CTP technology, images can be transmitted onto a zinc plate directly without the process of colour management and making colour separation films. This development can shorten the prepress production time and produce more defined images. Digital printing enables direct imaging texts and graphics going directly from the computer to the printing machine without the use of plates. This shortens production time and cost, and improves speed and accuracy. It is easy to operate and suitable for printing small quantities with flexibility, short lead time and customisation (e.g. advertisements and personalised direct mailing, tickets). Some printers are also offering the “total solution”, including auxiliary services like design, data-processing, translation and editing and electronic publishing etc. Some large printers have developed vertically, such as manufacturing or trading paper, or forming strategic partnerships with suppliers, in order to reduce the effects from paper price fluctuations and allow the company to have better control of material supplies. To reduce operation costs, local printers (mostly larger sized) have shifted a major share of their operations to China. However, they maintain their Hong Kong offices to receive overseas orders. They are also increasingly making use of high tech to cut costs e.g. overseas buyers could place orders from abroad through broadband connections, given they are confident with Hong Kong printers’ reputation and wanted to maintain their long-standing business connections. CEPA Provisions. 48 HONG KONG BUSINESS ANNUAL 2013 printing industry - company and industry Performance of Hong Kong’s Exports of Printed Matter ^ 2010 2011 Jan-Jul 2012 HK$Mn. Growth % HK$Mn. Growth % HK$Mn. Growth % Domestic Exports 1,803 -2 1,656 -8 892 -8 Re- exports 16,729 +14 17,110 +2 8,942 -7 Of Chinese Mainland Origin 15,946 +13 16,347 +3 8,553 -6 Total Exports 18,532 +12 18,765 +1 9,833 -7 by Markets 2010 2011 Jan-Jul 2012 Share% Growth% Share% Growth% Share% Growth% US 28.8 +9 26.9 -5 27.6 -6 EU (27) 27.6 +8 27.8 +2 25.7 -12 United Kingdom 11.9 +3 11.8 * 11.1 -14 Germany 3.9 +9 4.0 +5 3.7 -13 Chinese Mainland 11.5 +14 10.8 -5 12.7 +7 ASEAN 8.0 +21 8.8 +12 9.6 -1 Australia 5.1 +13 5.1 +2 4.8 -11 Japan 3.6 +18 4.3 +21 4.1 +5 2010 2011 Jan-Jul 2012 by Categories Share % Growth % Share % Growth % Share % Growth % Miscellaneous Books Brochures etc. 52.6 +14 54.3 +5 54.1 -5 Paper & Paperboard Label of All kinds 20.4 +18 20.1 -1 22.9 +4 Children’s Picture, Drawing or Colouring Books 9.0 -6 7.6 -15 7.3 -11 Printed or Illustrated Postcards, Printed Cards 5.4 -11 5.1 -3 4.4 -15 Transfers 2.5 +24 2.6 +6 2.9 +2 Trade advertising materials, commercial 2.0 +26 2.2 +10 2.4 -18 catalogues, etc. ^ Since offshore trade has not been captured by ordinary trade figures, these numbers do not necessarily reflect the export business managed by Hong Kong companies. * Insignificant Source: HKTDC Research General Trade Measures Affecting Exports of Printed Matters The US Consumer Product Safety Improvement Act of 2008 (CPSIA) requires manufacturers and importers to show their products intending for children under 12 do no contain harmful levels of lead and phthalates. The regulation has also affected products such as children books. However, in August 2011, the US Congress passed an amendment to the CPSIA that exempts ordinary children’s book from third-party testing. The EU’s new toy safety Directive (Directive 2009/48/ EC) came into effect on 20 July 2011. Any books falling under the definition of a toy will have to be compliant with the new Directive if sold on the European market. Product Trends Children books are becoming more sophisticated as children do not only read books, but they may also listen and talk to them, use them to build models or solve puzzles, or even play with soft toys that are housed inside the book. The rising trend of distance learning, where teachers and students are geographically separated, will rely on electronic devices as well as printed matter for information exchanges. Demand for printed matter related to educational purpose is expected to increase. Traditional printed products are required to have innovative designs to meet the needs of various market segments. For example, everyday items such as calendar can take different forms from desktop models to large 3D wall calendars. Higher printing quality is required, thus 5-colour/7-colour presses are being introduced. “New printing machines are invented to this regard. Another trend is environmentalism, with the use of environmentally friendly supplies.” As emphasis on packaging increased, users of packaging require better quality materials e.g. highly embellished folding boxes, tamper proof and safety features, pressure sensitive self adhesive labels with no label look, media and heat resistence and deep freeze products etc. As publishers pledged to be more environmentally friendly, printshops are pushed to use more environmentally friendly supplies e.g. recycled paper and synthetic paper (which may affect printing quality and needs adjustment on printers’ part), UV ink and ink based on beans (which would reduce the use of chemical solvents in cleansing). The chemical-free plate system is introduced, which does not require the use of chemicals. Although the use of FSC or PEFC-certified paper remains relatively small, it is increasing fast. HONG KONG BUSINESS ANNUAL 2013 49 company and industry - processed food and beverages industry Hong Kong lures more foreign investments in F&B Many Hong Kong brands have successfully entered overseas markets as well. T he processed food and beverages industry in Hong Kong is characterised by its active trading activities. Major food importers/traders in Hong Kong include Dah Chong Hong, Four Seas Food Investment, EDO Trading Co, Kwan Hong Yuen Trading Co Ltd, Yu Kee Trading Co Ltd, Sun Shun Fuk etc.. Sales Channels various mainland cities. cholesterollowering spreads and high calcium milk. While health issues are creating new openings, microwave and packaged foods also provide a promising growth for the sake, the growth rate of organic food sales in the US was 8%, and reached US$29 billion in 2010. Organic food encompasses a wide range of products including cheese, meat, wine, spices, nuts, canned goods etc. herbal or floral teas. 50 HONG KONG BUSINESS ANNUAL 2013 “Hong Kong’s re-exports of food and beverages accounted for more than 90% of Hong Kong’s total exports of food and beverages.” convenience. As people are getting more health conscious, organic food is becoming more popular nowadays. Organic is a guarantee about how an agricultural product was grown and handled before it reached the consumer. As many crops and livestock are already genetically modified (GM), and many food products are made from genetically modified organisms (GMO), consumers have paid more attention to GM food labelling. getting popular in big cities such as Beijing and Shanghai, shoppers 21,108 COs approved as at 31 July 2012. General Trade Measures Affecting Exports of Processed Food and Beverages • The United States. processed food and beverages industry - company and industry Performance of Hong Kong’s Exports of Processed Food and Beverages^ 2010 2011 Jan-Jul 2012 HK$Mn. Growth % HK$Mn. Growth % HK$Mn. Growth % Domestic Exports 2,396 +26 2,807 +17 1,462 -1 Re- exports 34,459 +18 39,418 +14 21,334 +3 Of Chinese Mainland Origin 3,965 +18 5,121 +29 3,471 +27 Total Exports 36,855 +18 42,225 +15 22,796 +2 by Markets 2010 2011 Jan-Jul 2012 Share% Growth% Share% Growth% Share% Growth% ASEAN 24.8 +40 34.9 +61 36.4 +17 Vietnam 22.6 +45 32.3 +64 34.1 +19 Chinese Mainland 44.7 +54 33.7 -14 32.3 -5 Taiwan 7.9 -59 8.1 +18 4.7 -43 Macau 11.8 +22 13.4 +30 14.7 +7 USA 3.4 +9 2.8 -5 3.3 +17 EU 1.8 +16 1.3 -15 1.6 +12 Canada 1.3 +8 1.2 +3 1.2 -5 UAE 0.6 +149 0.6 +23 1.2 +143 2010 2011 Jan-Jul 2012 by Categories Share % Growth % Share % Growth % Share % Growth % Processed food 85.1 +17 83.6 +13 82.7 +4 Poultry cuts and offal (other than liver) frozen 18.2 +43 16.7 +5 14.7 -18 Edible offal of swine, frozen 13.8 +18 8.4 -30 9.3 +14 Edible offal of bovine animals, frozen 3.7 -37 1.8 -45 2.8 +41 Pistachios. fresh or dried 4.3 +80 5.0 +31 3.5 -4 Almond, fresh or dried 3.3 +22 5.3 +87 5.5 +35 Beverages 14.9 +26 16.4 +26 17.3 -2 Spirits obtained by distilling grape wine/marc 5.7 +18 5.8 +17 6.3 +3 Wine of fresh grapes (excl. sparkling wine) 3.5 +80 4.4 +43 4.7 -2 ^ Since offshore trade has not been captured by ordinary trade figures, these numbers do not necessary reflect the export business managed by Hong Kong companies. * Insignificant Source: HKTDC Research • The European Union. • The Chinese Mainland Recently, the Ministry of Health (MOH) released the Standard for Nutrition Labelling of Prepackaged Foods (GB 280502011). The standard will come into effect on 1 January 2013 and requires the nutrition labelling of prepackaged food to include nutrition information, nutrition claims and nutrient function claims. It furthermore gives requirements as to nutrition information specifications regarding the content of transfatty acids. The Standard moreover requires a description of the level, content, increase or decrease of energy and nutritional component the first seven months of 2012, Hong Kong’s total exports of processed food and beverages increased by 3% and reached HK$23 billion.” Product Trends In developed economies like the US and the EU, there has been a shift in taste in favour of healthy foods, partly as a result of the aging population who seek easy-to-prepare, high quality nutritional foods to compensate for their lowered taste sensitivity. According to the Health and Dietary Survey 2008 conducted by the US FDA, when consumers buy a product for the first time, almost 80% would read the food label. The government’s 2010 Dietary Guidelines for Americans also upheld healthy eating habits. Food manufacturers are introducing low cholesterol/ carbohydrate/added sugar foods e.g. cane sugar has substituted syrup as an ingredient of some drinks, and the ice cream’s calories and fats contents are HONG KONG BUSINESS ANNUAL 2013 51 company and industry - auto parts & accessories industry The future of telematics in Hong Kong Telematics, that is the integration of computing, wireless communications and GPS, may be another growth area of product and service development. H ong Kong exports a large variety of auto parts and accessories. They include safety glass, rear-view mirrors, locks, car seats, electrical lighting, wiring sets and exhaust systems. Hong Kong companies are a major producer of car audio products and car security systems. As consumers are getting more concerned about passenger safety, driving performance and environmental friendliness, these areas may be the focus of innovation by auto parts suppliers. Building new models with different value-added functions or features is also a core strategy for some manufacturers. There is an increasing trend of using more electronic components in automobile. Telematics, that is the integration of computing, wireless communications and GPS, may be another growth area of product and service development.ong’s exports "Hong Kong companies are a major producer of car audio products and car security systems." of auto parts and accessories is the dominance of re-exports, which account for about 99%. Participation in international trade fairs and exhibitions will not only help Hong Kong companies to know the latest technologies and the product trends, but also meet with potential business partners and overseas manufacturers. Major international trade fairs include shifted. CEPA The Mainland and Hong Kong Closer Economic Partnership Arrangement (CEPA) was concluded in June 2003 and subsequently expanded in following years. All products made in Hong Kong, subject to CEPA’s rules of origin, enjoy duty-free access to the Chinese mainland. In 1994, the US’s three largest automotive manufacturers, Chrysler, Ford and General Motor, established the 52 HONG KONG BUSINESS ANNUAL 2013 auto parts & accessories industry - company and industry Export Performance of Hong Kong’s Auto Parts and Accessories Industry^ 2009 2010 Jan-Sep 2011 HK$ Mn. Growth % HK$ Mn. Growth % HK$ Mn. Growth% Domestic Exports 23 -65 27 +20 13 -32 Re-exports 11,291 -16 15,293 +35 12,132 +8 Of Chinese Mainland origin 8,280 -15 11,637 +41 9,192 +8 Total Exports 11,314 -15 15,320 +35 12,144 +8 2009 2010 by Markets Share% Growth% Share% Growth% Chinese Mainland 25.8 -18 25.5 +34 USA 20.5 -7 20.9 +38 EU (27) 22.6 -20 20.6 +24 Germany 6.6 -18 6.5 +34 Netherlands 4.4 +31 3.7 +12 Japan 10.9 -12 9.9 +23 ASEAN 5.5 -20 5.7 +40 Jan-Sep 2011 Share% Growth% 25.2 +7 21.3 +8 19.9 +4 5.0 -24 3.8 +16 8.9 -5 5.8 +11 2009 2010 Jan-Sept 2011 by Categories Share% Growth % Share% Growth % Share% Growth % Radiobroadcast receivers for motor vehicles 15.6 -36 15.4 +34 13.9 -4 Parts and accessories of motor cycles/cycles/ invalid carriage 9.7 -26 8.9 +24 10.2 +27 Radio navigational aid apparatus 10.7 -2 10.2 +29 10.4 +20 Parts and accessories of motor vehicles 6.9 -26 8.0 +58 9.0 +27 Revolution counters, production counters, taximeters, mileometers, etc., speed indicators/ 13.7 +22 14.6 +44 10.7 -24 tachometers Other burglar alarm 8.0 -8 7.5 +27 9.5 +33 Parts for use in the compression ignition internal combustion piston engines, nesoi 6.8 -13 7.9 +59 8.7 +16 Parts for use in the compression ignition internal combustion engines 4.8 +15 5.0 +42 6.0 +29 New pneumatic tyres of rubber 3.6 -8 3.2 +21 3.4 +19 ^. Source: HKTDC Research has been replaced by the ISO/TS 16949. Product Trends There is an increasing trend of using more electronic components in automobile, including engine control, instruments, safety electronic components, navigational components, security components and other related products. It is estimated that electronics components now account for around 35% of the total vehicle components, up from less than 25% in 2000. Telematics, that is the integration of computing, wireless communications and GPS, is expected to be another growth area of product and service development. Among the vast range of “Many manufacturers are producing auto parts on OEM basis, but some large manufacturers are producing under their own brand names and designs.”. HONG KONG BUSINESS ANNUAL 2013 53 company and industry - lighting industry Lighting companies move their production to China Hong Kong exports a wide range of lighting products, including table, bedside, floor-standing and portable lamps. T he lighting industry of Hong Kong is largely made up of small- and mediumsized companies. Their products are usually meant for home improvement and domestic purposes. The largest export categories include battery-operated portable lamps, such as torches, hand lanterns, handheld incandescent lamps and LED lamps for outdoor, sports and/or diving uses. Most Hong Kong lighting product manufacturers have relocated their production facilities to the Chinese mainland. Their offices in Hong Kong are mainly responsible for product development, marketing and logistic support. Many manufacturers are able to undertake product design, plastics injection moulding, vacuum coating, enamel plating and assembly production in-house. The success of Hong Kong’s lighting industries also lies in efficient management. Against the fast changing market, Hong Kong companies emphasise quick response to the market, while keeping a close eye on product trends. Hong Kong’s total exports of lighting products rose by 2% in 2011, after growing by 10% in 2010. Sales of electric lamps performed 54 HONG KONG BUSINESS ANNUAL 2013 well, while exports of portable lamps were steady. But exports of discharge lamps and filament lamps declined in 2011. Sales Channels Hong Kong’s lighting manufacturers mostly produce on OEM and ODM basis for overseas importers and distributors. In view of intensified competition, ODM has outpaced OEM as their major business. A few manufacturers and traders also promote lighting products with their own brand names or trademarks. Hong Kong companies usually sell directly to overseas buyers, including volume importers and regional distributors of hardware and general merchandise. Some of the companies also deal with buying offices set up by overseas buyers in Hong Kong. Some large Hong Kong companies even sell directly to large-scale retailers like hypermarkets, supermarkets and chain stores, as well as buying groups/cooperatives of smaller retailers in North America and Europe in order to reduce the levels of distribution and associated costs. Industry Trends Intensified competition from mainland and “Hong Kong’s total exports of lighting products rose by 2% in 2011.” other Asian suppliers, which are increasingly equipped with automatic production machines, has long been a threat to Hong Kong companies. In response, Hong Kong manufacturers have differentiated their products by enhancing product features and aesthetic design, and enriched their product assortment by exploring new product lines. There are an increasing number of Hong Kong manufacturers applying advanced technology for product design and production. For instance, computer aided design (CAD) has been adopted to improve the aesthetic and mechanical designs of lighting products. Applications such as the use of 3-dimension computer aided industrial design (CAID) also facilitate companies to enhance their design capabilities. Modern technology for plating, polishing, sheet metal cutting, die-casting, etc. has also been applied to improve the product precision and quality. lighting industry - company and industry Performance of Hong Kong’s Exports of Lighting Products ^ 2009 2010 2011 HK$ Mn. Growth % HK$ Mn. Growth % HK$ Mn. Growth % Domestic Exports 46 -54 55 +21 49 -10 Re-exports 8,726 -21 9,603 +10 9,799 +2 Of Chinese Mainland origin 7,428 -22 8,347 +12 8,661 +4 Total Exports 8,772 -21 9,658 +10 9,849 +2 2009 2010 2011 Total Exports by Major Markets Share% Growth% Share% Growth% Share% Growth% EU (27) 30 -28 29 +4 26 -9 Germany 8 -5 8 +8 8 +4 France 5 -38 4 +4 4 * US 23 -26 23 +9 22 -3 Chinese Mainland 20 -13 19 +6 17 -8 Japan 8 +10 10 +32 15 +61 Australia 2 -8 3 +23 3 +13 2009 2010 2011 Total Exports by Products Share% Growth % Share% Growth % Share% Growth % Battery Operated Portable Lamp 20 -23 21 +15 20 +1 Electric Lamp & Lighting Fittings 18 -26 18 +9 20 +16 Discharge Lamps 18 -5 17 +1 14 -17 Filament Lamps 9 -11 9 +9 8 -9 Chandeliers & Wall Lighting 7 -27 7 +11 10 +46 ^ Since offshore trade has not been recorded by ordinary trade figures, these numbers do not necessarily reflect the export business managed by Hong Kong companies. * Insignificant Source: HKTDC Research enjoy tariff-free treatment upon applications by local manufacturers and upon the CEPA rule of origins being agreed and met. In the main, the CEPA origin criteria for Hong Kong items include change in tariff heading, performance of specific manufacturing process in Hong Kong, as well as fulfillment of value-added requirement, under which at least 30% of the FOB value of the products, and that the final manufacturing or processing operations should be completed in Hong Kong. General Trade Measures Affecting Exports of Lighting Products Exports of electric lighting products that required external power for operation are usually subject to relevant safety requirements in overseas markets. Hong Kong exporters should be attentive to the growing popularity of green concept in the marketplace. Especially in Europe, consumers are generally conscious towards environmental protection. Not surprisingly, the EU has adopted a number of directives for environmental protection, which may have an impact on the sales of lighting products. These include the restrictions on batteries and accumulators that contain mercury, as well as the Directive on Waste Electrical and Electronic Equipment (WEEE) implemented in August 2005, and the Directive on Restriction of Hazardous Substances (RoHS) that came into effect in July 2006, under which lighting products are among the affected items. Product Trends One of the significant developments in the lighting industry is the booming of DIY (do-ityourself) market. DIY products are increasingly popular, especially in North America and Western Europe. Hence, a wide range of hardware items, including lighting products, are offered for DIY “Due to environmental concerns, energy-efficient items like the integrated electronic compact fluorescent lamps are in demand.” purposes. Meanwhile, decorative items are no longer limited to Christmas lighting sets. They also include a wide range of domestic lighting products, such as track lights, linear lights and spotlights of different novelty designs. Due to environmental concerns, lighting products of higher energy efficiency and longer lifetime are preferred. Notably, Australia has banned the sale of most incandescent light bulbs that cannot meet the minimum energy efficiency requirements since 2010. The EU and the US have also started to phase out certain incandescent light bulbs by 2012 and 2014 respectively. As a result, energy-efficient items like the integrated electronic compact fluorescent lamps are in demand. In addition, the industry is focusing on the development of LED lamps and lighting apparatus, which are more energy-efficient with an even longer lifetime than the compact fluorescent lamps. HONG KONG BUSINESS ANNUAL 2013 55 company and industry - travel goods and handbags industry Value of travel goods exports up 14% to HK$35.3b Hong Kong’s travel goods and handbags industry benefits from the production skills developed in other light manufacturing industries, such as clothing, leather, plastics and metal. H ong Kong companies export a wide range of travel goods and handbags, which accounted for 46.7% and 53.3% respectively. Major products include leather handbags (30%), cases for binoculars, cameras, musical instruments and spectacles (27%), handbags with plastics/textiles sheeting (24%) and wallets and purses (15%). During the first three quarters of 2011, the value of Hong Kong’s total exports of travel goods and handbags increased by 14% and reached HK$35.2 billion. The US was the largest export market for travel goods and handbags in Jan – Sep 2011 (accounting for 26% of total), followed by the EU (22%), China (13%), Japan (10%) and South Korea (10%). In terms of product categories, exports of travel goods and handbags both increased by 14%. Sales Channels Many of Hong Kong’s travel goods and handbags are exported under OEM arrangements with overseas 56 HONG KONG BUSINESS ANNUAL 2013 manufacturers. Buyers usually provide product specifications and designs. Yet, Hong Kong manufacturers are increasingly involved in product design and development, engineering, modelling, tooling and quality control. Apart from online shopping, retail channels of distribution of the travel goods and handbags industry primarily include department and specialty stores, national and mass merchant retailers, warehouse clubs, and company-owned retail stores. In order to establish connections and explore market opportunities, travel goods and handbags manufacturers and traders can join trade fair missions organised by the Hong Kong Trade Development Council (HKTDC) and to participate in various international trade fairs. CEPA Provisions The Mainland and Hong Kong Closer Economic Partnership Arrangement (CEPA) was concluded in June 2003 and was expanded in subsequent years. All “Hong Kong companies produce good quality, middle to low priced luggage bags and handbags on OEM basis.” products made in Hong Kong, subject to CEPA’s rules of origin, enjoy duty-free access to the Chinese mainland. Industry Trends Sales of travel goods are largely influenced by the number of travels people undertake. With the rising income and easy access to travel visa/permit, Chinese tourists are the fastest-growing group of international tourists in the world. Due to closer economic ties with the rest of the world and rising affluence, more Chinese people are planning to travel overseas for either business or leisure purposes. Yet, most of them are looking for value-for-money luggage and other travel goods, which offer a huge market potential for Hong Kong manufacturers. Trade Measures Affecting Exports of Travel Goods and Handbags Hong Kong’s handbags and briefcases manufacturers also face challenges from the regulatory environment overseas. For health reasons, the EU has adopted a Directive aimed at prohibiting the trading of leather articles which contain azo-dyes, from which aromatic amines travel goods and handbags industry - company and industry Performance of Hong Kong’s Exports of Travel Goods and Handbags^ 2009 2010 Jan-Sept 2011 HK$ Mn Growth % HK$ Mn Growth % HK$ Mn Growth % Domestic Exports 14 -44 15 +11 15 +33 Re-exports 38,135 -15 41,705 +9 35,224 +14 Of Chinese Mainland origin 31,078 -21 32,908 +6 26,733 +9 Total Exports 38,149 -15 41,720 +9 35,239 +14 by Markets 2009 2010 Share% Growth% Share% Growth% US 28.6 -25 28.5 +9 EU (27) 26.2 -21 23.7 -1 Italy 6.6 -18 5.1 -15 U.K. 5.7 -17 5.1 -1 France 3.8 -21 3.9 +14 China 8.1 +11 10.5 +42 Japan 10.3 -11 10.3 +10 South Korea 8.9 +19 8.3 +2 ASEAN 2.8 -9 2.9 +11 Jan-Sept 2011 Share% Growth% 26.4 +3 21.8 +5 5.4 +17 3.8 -14 3.8 +14 13.0 +46 9.9 +11 9.9 +38 3.0 +20 by Categories 2010 2011 Jan-Sept Share% Growth % Share% Growth % Share% Growth % Travel Goods 46.0 -21 46.9 +12 46.7 +14 Handbags 54.0 -9 53.1 +8 53.3 +14 ^ Since offshore trade has not been captured by ordinary trade figures, these numbers do not necessary reflect the export business managed by Hong Kong companies. * Insignificant Source: HKTDC Research may be released. The Chinese government is also increasingly concerned about the pollution caused to the environment in the process of leather tanning. It appears likely that more stringent regulations on environmental protection could be put in place in future. Product Trends Today’s travellers are not only seeking increased comfort and convenience while travelling, but are searching for products that also offer fashion and functionality. According to the Travel Goods Association in the US, increasingly popular 20-inch suitcase and carry-on luggage in different sizes are in demand. In addition, many new fabrics and materials have been introduced, including micro fleece grid fabric, crinkle nylon/polyester blends, suede skin etc. Nowadays, many consumers preferred cheaper and more casual softside bags and luggage (whose production is labour intensive), in particular for hybrid luggage, instead of hardside luggage (capital intensive). As electronic gadgets are becoming more popular, demand for cases for electronic gadgets such as iPad, Blackberry and mobile phones is increasing significantly. Besides the consumer market, many companies will order them as corporate gifts for their clients, creating a new market niche for the industry. With more women in the workplace, many of the new travel goods are being specifically designed for women, including portfolios, computer bags and wheeled totes for female professionals. In addition, there are new luggage lines that feature special sections for toiletries, cosmetics, shoes and other items that enable female travellers to travel more conveniently. Meanwhile, ergonomicallydesigned items continue to be in high-demand, with new items including luggage with handle “Due to closer economic ties with the rest of the world and rising affluence, more Chinese are planning to travel overseas for either business or leisure purposes, offering a huge market potential for luggage bags and other travel goods as well.” systems that can be alternated for left-handed and righthanded people; products with weight-bearing, push-button retractable handles and four swivel wheels that allow bags to pivot 360 degrees; luggage with a shock-absorbing wheel system that adjusts to surface changes for smooth rolling; and a collection that features a removable wheel and handle system for numerous travel options etc. For handbags, styles and colours are closely aligned with the trend in the fashion industry. Some of the current trends in handbag design include: handbags made out of lamb/deer skin, denim and wool that almost imitate clothing, use of unconventional materials like canvas, emphasis on delicacy in details, leather bowling bags, handbags made of faux fur and vintage design with beading and embellishment. As handbags become accessories to fashion, their life cycles have shortened, and new items are introduced all year round. HONG KONG BUSINESS ANNUAL 2013 57 company and industry - leather consumer goods industry HK’s top market for leather goods revealed The US remains the leading export destination for Hong Kong’s leather consumer goods. I n face of rising operation costs in Hong Kong, the majority of local manufacturers have shifted a significant part of production to the Chinese mainland, leaving only limited capacity in Hong Kong to meet small and quick orders. Some manufacturers have invested heavily in advanced automated machinery and operation systems to streamline the whole production process. Many Hong Kong companies are engaged in the trading of leather consumer goods. Some of them are appointed by foreign brands as their agents in the region, including the Chinese mainland. A number of Hong Kong’s leather consumer goods companies, such as Mirabell, Staccato and Belle, take strong initiatives in developing the mainland market. Performance of Hong Kong’s Exports of Leather Consumer Goods After registering an increase of 13% last year, Hong Kong’s exports of leather consumer goods fell slightly by 1% to HK$14.3 billion in the first four months of 2012. Re-exports, 58 HONG KONG BUSINESS ANNUAL 2013 accounting for almost all exports of leather consumer goods from Hong Kong, also fell by 1%, while domestic exports were up 3%. The US remains the leading export destination for Hong Kong’s leather consumer goods, accounting for 29% of the total during January-April 2012, followed by the EU and the Chinese mainland, with respective shares of 15% and 14%. Productwise, exports of leather footwear, representing for more than half of Hong Kong’s total exports of leather consumer goods, fell by 10% during the first four months of 2012, while sales of handbags, trunks and suitcases and other clothing accessories rose by 15% and 5%,, “Overseas buyers regard Hong Kong as an important sourcing centre for leather consumer goods.” modelling, tooling and quality control. However, many of them still prefer selling to overseas importers and distributors, who in turn market to wholesalers and retailers. With an aim to foster local footwear design talent and encourage more Hong Kong leather footwear suppliers to enhance the design components of their products, the Federation of Hong Kong Footwear, sponsored by Hong Kong Trade Development Council (HKTDC), organises the Hong Kong Footwear Design Competition every year. Industry Trends In pursuit of lower production costs, higher profit margins, expanding capacity and product range extension, leather consumer goods manufacturers in Hong Kong have shifted a significant part of their production facilities to the Chinese mainland. Leather industry is highly specialised and vertically integrated. Relocation may also provide the advantage of being more accessible to the raw materials and facilitating retail and distribution. In view of soaring production costs, manufacturers have further invested in advanced automated machinery and operation systems to streamline the whole leather consumer goods industry - company and industry Lorem 2010 2011 Jan-Apr 2012 Value Growth % Value Growth % Value Growth% Domestic Exports 0.01 +17 0.010 +5 0.002 +3 Re-exports 43,382 +25 48.934 +13 14.299 -1 Of Chinese Mainland origin 35.785 +16 36.977 +3 10.015 -5 Total Exports 43.392 +25 48.944 +13 14.301 -1 2010 2011 by Markets Share% Growth% Share% Growth% US 38.4 +20 31.9 -6 EU (27) 19.9 +7 19.2 +9 Italy 4.0 -2 4.2 +19 Germany 4.0 +2 3.8 +7 France 1.7 +11 1.7 +9 Chinese Mainland 8.8 +70 12.5 +61 South Korea 6.5 +153 8.8 +51 Macau 3.4 +87 3.9 +29 Japan 6.1 +1 6.2 +15 Australia 2.9 +10 2.8 +8 Taiwan 2.1 +78 2.2 +18 Jan-Apr 2012 Share% Growth% 28.7 -5 15.4 -10 4.1 +6 3.0 -3 1.9 +34 14.3 +2 10.5 +5 7.0 +63 6.6 -9 3.4 +4 2.5 +7 2010 2011 Jan-Apr 2012 by Categories Share% Growth % Share% Growth % Share% Growth % Footwear 65.7 +20 59.4 +2 53.7 -10 Handbags, Trunks, Suitcases 24.5 +49 30.4 +40 36.7 +15 Apparel 2.6 +2 2.7 +19 2.1 -5 Gloves, Mittens, Mitts 2.1 +13 2.2 +19 1.9 * Other Clothing Accessories 5.1 +20 5.2 +15 5.6 +5 ^ Since offshore trade has not been captured by ordinary trade figures, these numbers do not necessarily reflect the full picture of the export business managed by Hong Kong companies. * Insignificant Source: HKTDC Research production process. The mainland and Hong Kong agreed in October leather consumer goods, tarifffree treatment starting from 1 January 2006. 12- 16% (in-quota) and 30% (out-quota). For leather footwear, the applicable import duties are 17.3%, 21.6% or 24 %( in-quota) depending on the type of shoes, and 30% or 4,300 yen/pair whichever is higher (out-quota). Product Trends With many people becoming more willing to spend on stylish and luxurious handbags, leather vogue handbags are drawing more and more attention in the fashion world, and have been considered a wind vane reflecting the current trends of the season and forming the vogue mark in people’s wardrobe. Looking ahead, leather formal wear is forming a trend alongside with the rise of “Hong Kong’s exports of leather consumer goods fell slightly by 1% in the first four months of 2012, after increasing 13% last year. Re-exports, accounting for nearly all exports of leather consumer goods from Hong Kong, also fell by 1%, while domestic exports saw growth of 3%.” feminism. As leather consumer goods are increasingly viewed as fashion accessories, the trend, from smart over clean chic, neo sports up to romanticism, is expected to remain popular in the market. As an encouraging sign, the China Leather Industry Association (CLIA) announced that profits in the leather sector reached US$9.3 billion in 2011, showing a 29% soar in profits registered by largescale leather enterprises. Nowadays, however, the primary market requirement for any leather good is performance. This means improving the unique leather properties such as water vapour absorption and permeability, robustness and ductility. For footwear, its elegance and durability for upholstery leather, while softness and elegance for garments and leather goods. HONG KONG BUSINESS ANNUAL 2013 59 numbers | indicators Labour Force, Unemployment, and Underemployment Labour Force, Unemployment and Underemployment Period Labour force (Thousands) Labour force participation rate (%) Male Female Total Male Female Overall 2009 1944.5 1715.8 3 660.3 69.4 53.2 60.8 2010 1931.3 1700.0 3 631.3 68.5 51.9 59.6 2011 1942.7 1760.4 3 703.1 68.4 53.0 60.1 6/2011 - 8/2011 1952.4 1770.4 3 722.8 68.7 53.2 60.3 7/2011 - 9/2011 1950.6 1775.3 3 725.8 68.6 53.2 60.3 8/2011 - 10/2011 1947.7 1773.6 3 721.3 68.4 53.1 60.1 9/2011 - 11/2011 1944.9 1779.1 3 724.0 68.2 53.2 60.1 10/2011 - 12/2011 1945.7 1787.3 3 733.0 68.2 53.4 60.2 11/2011 - 1/2012 1955.9 1790.6 3 746.5 68.6 53.4 60.4 2/2011 - 2/2012 1964.7 1803.0 3 767.7 68.8 53.7 60.6 1/2012 - 3/2012 1970.5 1803.2 3 773.7 68.9 53.6 60.7 2/2012 - 4/2012 1965.9 1808.2 3 774.1 68.7 53.7 60.6 3/2012 - 5/2012 1969.3 1816.7 3 785.9 68.8 53.8 60.7 4/2012 - 6/2012 1970.8 1826.1 3 796.9 68.8 54.1 60.8 5/2012 - 7/2012 1978.6 1825.6 3 804.2 69.0 54.0 60.9 6/2012 - 8/2012 1979.3 1823.6 3 803.0 69.0 53.9 60.8 7/2012 - 9/2012 1974.6 1817.2 3 791.8 68.8 53.6 60.6 8/2012 - 10/2012 1975.1 1820.9 3 795.9 68.8 53.6 60.6 Unemployed (Thousand) Unemployment rate(1) (Seasonally adjusted) % Underemployed (Thousand) Underemployment rate % 2009 192.6 5.3 83.8 2.3 2010 157.2 4.3 72.5 2.0 Period 2011 126.7 3.4 63.3 1.7 6/2011 - 8/2011 129.6 3.2 67.2 1.8 7/2011 - 9/2011 125.9 3.2 65.3 1.8 8/2011 - 10/2011 124.4 3.3 57.8 1.6 9/2011 - 11/2011 120.3 3.3 54.5 1.5 10/2011 - 12/2011 116.0 3.3 52.4 1.4 11/2011 - 1/2012 111.8 3.2 55.7 1.5 2/2011 - 2/2012 119.1 3.4 56.5 1.5 1/2012 - 3/2012 124.1 3.4 58.6 1.6 2/2012 - 4/2012 124.7 3.3 57.5 1.5 3/2012 - 5/2012 123.4 3.2 54.0 1.4 4/2012 - 6/2012 125.5 3.2 54.6 1.4 5/2012 - 7/2012 128.5 3.2 56.6 1.5 6/2012 - 8/2012 131.6 3.2 63.4 1.7 7/2012 - 9/2012 132.9 3.3 59.2 1.6 8/2012 - 10/2012 131.0 3.4 57.4 1.5 Note: “Unemployment rate (seasonally adjusted)â€? refers to the unemployment rate adjusted for seasonal variations using the X-12 ARIMA method. Seasonal adjustment is not applicable to annual average unemployment rates. Source: Census and Statistics Department, Hong Kong Special Administrative Region 60 HONG KONG BUSINESS ANNUAL 2013 numbers | indicators Number of Establishments, Persons Engaged and Vacancies (Other than those in the Civil Service) by Industry Section No. of establishments As at end of Year Month No. of persons engaged Male Female No. of vacancies Total Industry Section B : Mining and quarrying 2009 3 83 4 87 0 2010 3 76 7 83 3 2011 2 65 6 71 **** 6 2 63 6 69 **** 9 2 65 6 71 **** 12 2 65 6 71 **** 3 2 67 6 73 **** 6 2 76 7 83 **** 2011 2012 No. of establishments As at end of Year Month No. of persons engaged Male Female No. of vacancies Total Industry Section C : Manufacturing 2009 12 924 75 507 49 400 124 907 1 161 2010 12 441 70 794 46 796 117 590 1 567 2011 12 011 68 540 41 839 110 379 1 946 6 12 296 69 849 43 967 113 816 2 164 9 12 109 67 909 43 625 111 534 2 306 12 12 011 68 540 41 839 110 379 1 946 2011 2012 3 11 951 66 598 41 373 107 971 2 859 6 11 867 67 471 40 166 107 637 2 970 No. of establishments As at end of Year Month No. of persons engaged Male Female No. of vacancies Total Industry Sections D & E : Electricity and gas supply, and waste management 2009 312 8 733 2 137 10 870 31 2010 324 8 741 2 334 11 075 60 2011 2011 2012 326 8 487 2 129 10 616 **** 6 326 8 674 2 346 11 020 **** 9 322 8 651 2 322 10 973 **** 12 326 8 487 2 129 10 616 **** 3 329 8 388 1 979 10 367 **** 6 333 8 245 2 083 10 328 **** Source: Census and Statistics Department, Hong Kong Special Administrative Region HONG KONG BUSINESS ANNUAL 2013 61 numbers | indicators Number of Establishments, Persons Engaged and Vacancies (Other than those in the Civil Service) by Industry Section No. of establishments As at end of Year Month No. of persons engaged Male Female No. of vacancies Total Industry Section F : Construction sites (manual workers only)(1) 2009 992 49 674 3 480 53 154 30 2010 1 101 51 040 4 385 55 425 68 2011 1 172 63 402 5 993 69 395 330 6 1 062 54 115 4 494 58 609 302 2011 2012 9 1 143 58 322 5 406 63 728 534 12 1 172 63 402 5 993 69 395 330 3 1 143 64 996 5 646 70 642 666 6 1 157 64 960 6 761 71 721 588 No. of establishments As at end of Year Month No. of persons engaged Male Female No. of vacancies Total Industry Section G : Import/export, wholesale and retail trades(2) 2009 171 324 384 476 417 857 802 333 9 387 2010 178 243 395 871 417 359 813 230 11 423 2011 2011 2012 180 546 392 864 421 720 814 584 13 344 6 180 835 391 609 421 191 812 800 13 464 9 181 341 392 624 424 654 817 278 13 878 12 180 546 392 864 421 720 814 584 13 344 3 180 652 390 210 423 787 813 997 17 125 6 181 222 393 236 424 545 817 781 16 039 No. of establishments As at end of Year Month No. of persons engaged Male Female No. of vacancies Total Part of Industry Section G : Import/export trade and wholesale 2009 111 939 289 128 273 423 562 551 4 812 2010 116 530 297 069 267 812 564 881 6 487 2011 117 269 293 593 266 017 559 610 7 067 2011 2012 6 117 517 289 643 271 156 560 799 8 267 9 117 859 291 976 272 367 564 343 7 743 12 117 269 293 593 266 017 559 610 7 067 3 116 950 288 405 268 748 557 153 8 945 6 117 207 290 085 268 262 558 347 9 141 Note: (1) Establishments in construction sites refer to number of sites, while persons engaged and vacancies refer to manual workers only. (2) The industrial coverage is not complete. Figures for the individual industry sections and the total figures relate only to those selected industries covered in the Quarterly Survey of Employment and Vacancies (SEV) and the Quarterly Employment Survey of Construction Sites. (3) Starting from March 2009 round of the SEV, the survey coverage has been expanded to include more economic activities in some of the industries due to the change in industrial classification. Please refer to “Concepts and Methodsâ€? on page 13 for details. (4) Accommodation services sector covers hotels, guesthouses, boarding houses and other establishments providing short term accommodation. Source: Census and Statistics Department, Hong Kong Special Administrative Region 62 HONG KONG BUSINESS ANNUAL 2013 numbers | indicators Number of Establishments, Persons Engaged and Vacancies (Other than those in the Civil Service) by Industry Section No. of establishments As at end of Year Month No. of persons engaged Male Female No. of vacancies Total Part of Industry Section G : Retail(2) 2009 59 385 95 348 144434 239782 4575 2010 61 713 98 802 149547 248349 4936 2011 63 277 99271 155703 254974 6277 6 63 318 101966 150035 252001 5197 2011 2012 9 63 482 100648 152287 252935 6135 12 63 277 99271 155703 254974 6277 3 63 702 101805 155039 256844 8180 6 64 015 103151 156283 259434 6898 No. of establishments As at end of Year Month No. of persons engaged Male Female No. of vacancies Total Industry Section H : Transportation, storage, postal and courier services(2)(3) 2009 8805 105738 53559 159297 1457 2010 9484 107498 54046 161544 2086 2011 2011 2012 9769 108406 57068 165474 2507 6 9741 108270 54816 163775 3011 9 9744 108301 55474 165474 2431 12 9769 108406 57068 165637 2507 3 9709 108941 56696 166706 3197 6 9665 110306 56400 817 781 3408 No. of establishments As at end of Year Month No. of persons engaged Male Female No. of vacancies Total Industry Section I : Accommodation(4) and food services 2009 14679 118220 128825 247045 4725 2010 15977 125403 129885 255288 7814 2011 16763 126336 139979 266315 8992 6 16801 126466 139629 266095 8119 9 16817 127827 138486 266313 7988 12 16763 126336 139979 266315 8992 3 16854 129207 139841 269048 11036 6 16929 130392 141886 272278 12266 2011 2012 Source: Census and Statistics Department, Hong Kong Special Administrative Region HONG KONG BUSINESS ANNUAL 2013 63 numbers | indicators Number of Establishments, Persons Engaged and Vacancies (Other than those in the Civil Service) by Industry Section No. of establishments As at end of Year Month No. of persons engaged Male Female No. of vacancies Total Industry Section J : Information and communications 2009 9026 57293 30554 87847 1427 2010 9958 58210 30684 88894 2084 2011 10756 61337 31931 93268 2222 2011 2012 6 10477 59004 32055 91059 2192 9 10617 59156 32507 91663 2240 12 10756 61337 31931 93268 2222 3 10973 61551 33637 95188 2475 6 11079 62604 33287 95891 2380 No. of establishments As at end of Year Month No. of persons engaged Male Female No. of vacancies Total Industry Section K : Financing and insurance(2) 2009 17 574 88 111 97 503 185 614 2 900 2010 19 026 94 232 102 181 196 413 4 429 2011 20 610 100 660 106 664 207 324 4 168 6 19 655 97 190 105 645 202 835 4 866 9 20 039 100 501 106 134 206 635 4 755 12 12 20 610 100 660 106 664 207 324 4 168 2011 2012 3 20 690 100 644 109 307 209 951 4 559 6 20 854 101 284 105 709 206 993 4 386 No. of establishments As at end of Year Month No. of persons engaged Male Female No. of vacancies Total Industry Section L : Real estate 2009 11 992 68 562 39 848 108 410 1 692 2010 12 942 70 131 42 411 112 542 2 603 2011 2011 2012 14 250 76 208 46 044 122 252 2 504 6 13 713 74 876 43 905 118 781 3 128 9 13 911 75 936 44 059 119 995 2 884 12 14 250 76 208 46 044 122 252 2 504 3 14 208 75 929 46 126 122 055 3 264 6 14 357 77 730 46 625 124 355 2 862 Source: Census and Statistics Department, Hong Kong Special Administrative Region 64 HONG KONG BUSINESS ANNUAL 2013 numbers | indicators Number of Establishments, Persons Engaged and Vacancies (Other than those in the Civil Service) by Industry Section No. of establishments As at end of Year Month No. of persons engaged Male Female No. of vacancies Total Industry Sections M & N : Professional and business services(2)(3) 2009 34 420 148 360 153 992 302 352 4 037 2010 36 899 157 176 157 168 314 344 5 623 2011 39 157 163 455 165 338 328 793 6 582 6 38 155 160 328 160 384 320 712 6 571 9 38 758 163 683 162 204 325 887 6 674 12 39 157 163 455 165 338 328 793 6 582 3 39 393 164 616 165 566 330 182 8 359 6 39 907 163 888 169 416 333 304 9 359 2011 2012 No. of establishments As at end of Year Month No. of persons engaged Male Female No. of vacancies Total Industry Sections P - S : Social and personal services(2)(3) 2009 35 953 150 174 272 560 422 734 7 710 2010 39 018 153 779 279 033 432 812 10 377 2011 41 194 157 839 283 866 441 705 12 445 6 40 590 153 695 285 039 438 734 12 736 9 40 930 157 427 283 216 440 643 13 901 12 41 194 157 839 283 866 441 705 12 445 3 41 703 156 938 287 689 444 627 16 312 6 42 273 158 989 291 600 450 589 16 493 2011 2012 No. of establishments As at end of Year Month No. of persons engaged Male Female No. of vacancies Total Total of industry sections above(1)(2)(3) 2009 318 004 1 254 931 1 249 719 2 504 650 34 557 2010 335 350 1 292 951 1 266 289 2 559 240 48 137 2011 2011 2012 346 556 1 327 599 1 302 577 2 630 176 55 146 6 343 653 1 304 139 1 293 477 2 597 616 56 645 9 345 733 1 320 402 1 298 093 2 618 495 57 688 12 346 556 1 327 599 1 302 577 2 630 176 55 146 3 347 617 1 328 085 1 311 653 2 639 738 69 966 6 349 645 1 339 181 1 318 485 2 657 666 70 841 Source: Census and Statistics Department, Hong Kong Special Administrative Region HONG KONG BUSINESS ANNUAL 2013 65 numbers | indicators Wage Indices by Industry Section and Broad Occupational Group September 1992 =100 Nominal wage index Real wage index(1) 2011 2011 2011 2012 2012 2011 2011 2011 2012 2012 Jun Sep Dec Mar Jun Jun Sep Dec Mar Jun Craftsmen and operatives 154.3 154.2 155.3 158.7 159.3 103.4 110.6 102.6 103.4 103.4 Supervisory, technical, clerical and miscellaneous nonproduction workers 173.5 177.8 183.5 185.3 180.6 116.3 127.6 121.3 120.7 117.2 All selected occupations 164.3 166.5 170.0 172.6 170.5 110.1 119.5 112.4 112.5 110.6 - - - - - - - - - - Supervisory, technical, clerical and miscellaneous nonproduction workers 181.7 187.5 188.1 190.2 189.5 121.8 134.5 124.3 123.9 122.9 All selected occupations 181.7 187.5 188.1 190.2 189.5 121.8 134.5 124.3 123.9 122.9 Craftsmen and operatives 151.8 154.8 155.4 154.2 157.7 101.8 111.1 102.7 100.4 102.4 Supervisory, technical, clerical and miscellaneous nonproduction workers 164.5 167.7 168.0 167.9 168.8 110.2 120.3 111.0 109.4 109.6 All selected occupations 158.2 161.4 161.8 161.1 163.3 106.1 115.8 106.9 105.0 106.0 - - - - - - - - - - Supervisory, technical, clerical and miscellaneous non production workers 144.9 147.2 150.6 152.1 156.0 97.1 105.6 99.6 99.1 101.2 All selected occupations 144.9 147.2 150.6 152.1 156.0 97.1 105.6 99.6 99.1 101.2 - - - - - - - - - - Supervisory, technical, clerical and miscellaneous nonproduction workers 191.3 192.2 190.3 193.6 196.2 128.2 137.9 125.8 126.1 127.3 All selected occupations 191.3 192.2 190.3 193.6 196.2 128.2 137.9 125.8 126.1 127.3 Industry section/ Broad occupational group Manufacturing Import/export, wholesale and retail trades Craftsmen and operatives(2) Transportation Accommodation (3) and food services Craftsmen and operatives(2) Financing and insurance Craftsmen and operatives(2) Source: Census and Statistics Department, Hong Kong Special Administrative Region 66 HONG KONG BUSINESS ANNUAL 2013 numbers | indicators Wage Indices by Industry Section and Broad Occupational Group September 1992 =100 Nominal wage index Real wage index(1) 2011 2011 2011 2012 2012 2011 2011 2011 2012 2012 Jun Sep Dec Mar Jun Jun Sep Dec Mar Jun - - - - - - - - - - Supervisory, technical, clerical and miscellaneous nonproduction workers 184.6 185.8 192.2 192.2 193.9 123.8 133.3 123.9 125.2 125.9 All selected occupations 183.6 184.5 191.3 191.3 193.4 123.1 132.4 123.3 124.6 125.5 - - - - - - - - - - Supervisory, technical, clerical and miscellaneous non-production workers 181.6 184.8 185.8 188.2 192.0 121.7 132.6 122.8 122.6 124.6 All selected occupations 181.6 184.8 185.8 188.2 192.0 121.7 132.6 122.8 122.6 124.6 Craftsmen and operatives - - - 173.8 187.5 - - - 113.2 121.7 Supervisory, technical, clerical and miscellaneous non-production workers 209.9 221.6 226.9 226.3 230.9 140.7 159.0 149.9 147.4 149.9 All selected occupations 206.6 215.3 222.0 219.7 226.3 138.5 154.4 146.7 143.1 146.8 Craftsmen and operatives 159.7 161.6 162.9 163.0 166.5 107.1 116.0 107.7 106.2 108.0 Supervisory, technical, clerical and miscellaneous nonproduction workers 174.6 178.5 179.7 181.8 183.5 117.0 128.1 118.8 118.4 119.1 All selected occupations 173.4 177.2 178.3 180.3 182.1 116.2 127.1 117.9 117.5 118.2 Industry section/ Broad occupational group Real estate leasing and maintenance management Craftsmen and operatives Professional and business services Craftsmen and operatives(2) Personal services All selected industry sections (4) Note: (1) The Real Wage Indices are derived by deflating the Nominal Wage Indices by the 2009/10-based Consumer Price Index (A). (2) Data for “craftsmen and operatives” are not available for the survey period. (3)Accommodation services sector covers hotels, guesthouses, boarding houses and other establishments providing short term accommodation. (4)Figures for “All selected industry sections” refer to all industries covered by the wage enquiry of the Labour Earnings Survey, including electricity and gas supply; sewerage and waste management; and publishing. Source: Census and Statistics Department, Hong Kong Special Administrative Region HONG KONG BUSINESS ANNUAL 2013 67 numbers | indicators Salary Indices for Middle-level Managerial and Professional Employees by Selected Industry Section Salary Index (A) (June 1995=100) Nominal Salary Index Real Salary Index (1) Selected industry section 2010 2011 2012 2010 2011 2012 Manufacturing, electricity and gas supply 117.5 121.1 124.9 105.0 102.7 102.1 Building and construction, and related trades 116.9 125.6 132.3 104.5 106.5 108.1 Import/export, wholesale and retail trades 129.8 137.7 144.5 116.0 116.8 118.1 Transportation, storage, communications and travel agencies 123.6 127.7 133.7 110.4 108.3 109.3 Financing and insurance 145.8 154.9 159.3 130.3 131.4 130.2 All selected industry sections 130.3 138.0 143.9 116.5 117.0 117.7 Salary Index (B) (June 1995=100) Nominal Salary Index Real Salary Index (1) Selected industry section 2010 2011 2012 2010 2011 2012 Manufacturing, electricity and gas supply 146.0 152.2 160.0 130.5 129.1 130.8 Building and construction, and related trades 161.8 177.4 190.9 144.6 150.5 156.1 Import/export, wholesale and retail trades 158.5 170.5 181.0 141.6 144.6 148.0 Transportation, storage, communications and travel agencies 171.5 178.8 188.4 153.2 151.7 154.1 Financing and insurance 181.7 196.6 205.8 162.3 166.8 168.2 All selected industry sections 165.7 178.1 188.5 148.0 151.1 154.2 Note: Figures refer to June of the year. As from 2011, both Real Salary Indices (A) and (B) are derived by deflating the corresponding Nominal Salary Indices by the 2009/10-based Consumer Price Index (C). To facilitate comparison, the Real Salary Indices prior to 2011 have been recompiled using the 2009/10-based Consumer Price Index (C). Source: Census and Statistics Department, Hong Kong Special Administrative Region 68 HONG KONG BUSINESS ANNUAL 2013 numbers | indicators Consumer Price Indices and Year-on-year Rates of Change at Section Level for November 2012 Composite CPI CPI(A) Index for Nov 2012 % Change over Nov 2011 114.9 +4.2 115.6 Meals bought away from home 112.8 +4.6 Food, excluding meals bought away from home 118.5 CPI(B) Index for Nov 2012 % Change over Nov 2011 Index for Nov 2012 % Change over Nov 2011 +4.2 115.2 +4.4 113.5 +3.8 113.1 +4.7 113.1 +4.7 111.9 +4.4 +3.5 118.8 +3.6 119.2 +3.9 116.4 +2.7 118.5 +5.2 122.4 +6.3 117.2 +5.0 115.1 +4.2 Private housing rent 118.3 +5.0 117.9 +5.7 117.2 +5.0 115.7 +4.4 Public housing rent 117.0 +9.7 147.4 +9.7 147.8 +9.8 - - Electricity, gas and water 147.5 +4.6 89.4 +4.6 91.7 +4.3 95.0 +5.3 Alcoholic drinks and tobacco 91.3 +1.1 124.3 +1.3 121.7 +0.9 114.2 +0.6 Clothing and footwear 121.7 +2.0 117.1 +2.2 117.1 +2.1 120.7 +1.7 Durable goods 118.4 -1.4 91.1 -2.1 92.3 -1.4 93.5 -0.9 Miscellaneous goods 92.5 +2.1 106.9 +3.1 108.0 +2.3 107.1 +1.0 Transport 107.4 +2.2 106.5 +1.7 108.0 +2.1 111.1 +2.8 Miscellaneous services 108.6 +2.8 105.2 +1.9 107.7 +2.7 109.3 +3.5 Selected major groups Educational services 108.2 +3.8 107.7 +3.9 107.7 +3.7 109.0 +3.7 Information and communications services 94.6 -2.6 95.1 -2.3 94.3 -2.8 94.3 -2.8 Medical services 108.4 +2.3 107.9 +2.3 108.6 +2.4 108.6 +2.2 112.3 +3.7 113.7 +4.2 111.8 +3.6 111.3 +3.3 Section Food Housing # All items % Index for Change Nov 2012 over Nov 2011 CPI(C) * Denotes a figure within ±0.05%. - Not applicable. Note: The CPI(A), CPI(B) and CPI(C) are compiled with reference to the average expenditure patterns for different groups of households as obtained from the Household Expenditure Survey. By aggregating the expenditure patterns of all households covered by the above three indices, a Composite CPI is also compiled. The expenditure ranges of the households covered in the 2009/10-based CPI series are as follows: Approximate percentage of households covered % Average monthly household expenditure range (at 2009/10 prices) $ Average monthly household expenditure range (adjusted to 2011 prices) $ CPI(A) 50 4,500 - 18,499 4,800 - 19,600 CPI(B) 30 18,500 - 32,499 19,600 - 34,400 CPI(C) 10 32,500 - 65,999 34,400 - 69,900 Composite CPI 90 4,500 - 65,999 4,800 - 69,900 Apart from “Private housing rent” and “Public housing rent”, the “Housing” section also includes “Management fees and other housing charges” and “Materials for house maintenance”. Source: Census and Statistics Department, Hong Kong Special Administrative Region HONG KONG BUSINESS ANNUAL 2013 69 70 HONG KONG BUSINESS ANNUAL 2013 High-Flyers 2013 Profiles of Hong Kong’s Outstanding Enterprises and Business Leaders AIA Pension And Trustee Co. Ltd. 72 I Ageas Insurance Company (Asia) Limited 76 I Altruist 78 I AV Consultant (Int ’L) Ltd 80 Canadian International School 82 I Chartis Insurance Hong Kong Limited 84 I Clp Power Hong Kong Limited 86 Cosmo Hotel Hong Kong, Cosmo Hotel Mongkok 88 I Bao Gallery By Crystallize•Me Ltd 90 I Freywille 92 Fuji Xerox (Hong Kong) Ltd. 94 I Fujitsu 96 I Galaxy Macau 98 I Godiva 100 I Hästens 102 I Hong Kong Matchmakers 104 Hsbc Insurance 106 I M800 Limited 108 I Shama Management Ltd. 110 I Rhombus International Hotels Group 112 Standard Chartered Bank (Hong Kong ) Limited 114 I The Cityview 116 I The Mercer 118 I Thomas, Mayer & Associes 120 Ultra Active Technology Ltd 122 I Universal Audio & Video Centre 124 I Wharf T&T Limited 126 I Zchron Design 128 CONTRIBUTING WRITERS: Chris Cotrell, Kapila Bandara, Gloria Fung HONG KONG BUSINESS ANNUAL 2013 71 ENTERPRISE AWARD AIA PENSION AND TRUSTEE CO. LTD. AIA MPF'S REVOLUTIONARY MPF SCHEMES STAND OUT IN HONG KONG W ith the rapid ageing of populations particularly in Asia, the need for comprehensive pension and retirement schemes intensifies. According to the Hong Kong government, the population is on an ageing trend and the ratio of people over 65 years old is expected to rise from 13% in 2011 to 30% in 2041. This is where AIA Pension and Trustee's ("AIA MPF") products and services come in. With a vast experience in handling retirement schemes in Hong Kong, AIA MPF definitely has the breadth and depth of expertise to provide retirement products tailored to suit the needs of both corporations and individuals. With this unmatched success, AIA MPF has bagged the Hong Kong Business High Flyers Most Outstanding Enterprise Award for four years in a row. The MPF Scheme has been changing the landscape in Hong Kong with the implementation of the Employee Choice Arrangement (the 72 HONG KONG BUSINESS ANNUAL 2013 "ECA") in November 2012. So what are AIA MPF's competitive advantages? How does AIA MPF leverage on its strenghts to embrace the challenges and the opportunities brought by the ECA and win the award? AIA’s MPF schemes According to Bonnie Tse, Chief Executive Officer of AIA MPF, the major competitive edge of their MPF schemes is their well-established multi-manager strategy. “Our platform includes 25 constituent funds managed by 5 renowned investment managers, and fund choices which cover a wide range of geographical locations and asset classes like lifestyle funds, dynamic asset allocation funds, equity funds, fixed income funds and funds investing in index-tracking funds, which may accommodate members’ varying investment appetites and risk tolerance levels,” says Tse. She cites one of their products, the Manager’s Choice Fund, that adopts dynamic asset Bonnie Tse, Chief Executive Officer of AIA MPF HONG KONG BUSINESS ANNUAL 2013 73 AIA PENSION AND TRUSTEE CO. LTD. PHILOSOPHY As a responsible market leader, AIA MPF strives to help customers realize their retirement dreams by providing retirement offerings with great value, choice and simplicity. allocation strategy to invest in equities and bonds based on the economic and market outlook. The Fund may allocate from 10% to 90% of its assets in equities, with the balance invested in bonds. The allocation will change based on the investment manager’s view on the economic and market outlook. It may be suitable for members who have limited knowledge and time to switch funds on their own. Tse reckons that the implementation of the ECA gives employees greater autonomy in choosing MPF providers and schemes. However, she strongly recommends employees not to switch MPF providers just for the sake of change. Instead, Tse advises employees to first know themselves and assess their current risk tolerance level, investment needs and the retirement savings and investments they currently have, as well as the services, fees and fund performance etc. of their existing MPF provider. Employees also need to know other providers, get more information about their services, fees and fund performance, and then do the comparison. “If the products and services provided by their existing MPF provider meet their needs, then there is no urgency to switch. When comparing MPF providers, employees are reminded to adopt a holistic approach. It is not advisable to focus on management fees only. Rather, one should also consider factors like fund choices, fund performance, and the simplicity and flexibility of the MPF service platform,” notes Tse. Strategies for a growing market share To grow market share in this competitive market, AIA MPF plans to strictly implement its customer value proposition of Value, Choice and Simplicity. “By striving to provide MPF offerings with great value, choice and simplicity, we endeavour to ensure every cent of our customers’ contribution works toward their prosperous retirement future,” says Tse. AIA MPF knows the importance of value as it strives to maximise returns on every cent of customers' contributions. The company currently provides 7 low-fee MPF funds with management fees as low as 0.99% p.a. and in line with the launch of the ECA, AIA MPF has recently launched three ECA fee rebate offers, including an extra one-off HK$4,000 management fee rebate, first year up to 0.45% p.a. management fee rebate and perpetual 0.20% p.a. management fee rebate. The second facet is choice that enables customers to enjoy real freedom in fund selection and fund switching. Since the MPF funds cover different geographic locations and fund categories, customers have high flexibility to choose MPF funds that suit their risk appetites and the market conditions. Depending on market conditions, members can also switch their 74 HONG KONG BUSINESS ANNUAL 2013 investment choices within as little as one day, without switching MPF schemes. Lastly, AIA MPF believes in the power of simplicity and helping customers manage their MPF investments with ease. For instance, the LifeEasy service launched in 2008 is an automatic asset rebalancing service which reallocates the investment proportion of equities and bonds in members’ MPF investments based on their age or desired number of saving years. And in May 2012, AIA MPF launched the staged withdrawal service that enables members to withdraw their MPF assets in stages when they reach the age of 65 in accordance with their desires and personal financial needs. AIA MPF's consistency in providing excellent products and services to its clients is proof that AIA MPF remains committed to its growth strategies. The company is also building future MOST Outstanding Enterprise Photo (top): AIA MPF announced new ECA fee rebate offers for both existing and new members Photo (bottom left to right): The management team of AIA MPF; AIA MPF distributed candies to the public at various busy areas all over Hong Kong during 1-7 Nov 2012 to increase peoples’ awareness on the ECA FAST FACTS • AIA MPF is a member of AIA Group Limited • AIA Group Limited is listed on the Main Board of The Stock Exchange of Hong Kong Limited under the stock code 1299 • AIA MPF is Hong Kong's 3rd largest MPF service provider in terms of asset under management as of 30 September 2012 success through investing in strategic projects. AIA MPF is also working on a multi-channel system through which customers can access its services by broadening its distribution. This will enable the company to generate long term value and deliver improved levels of service. HONG KONG BUSINESS ANNUAL 2013 75 AGEAS INSURANCE COMPANY (ASIA) LIMITED PHILOSOPHY Driven by an ambition to achieve and excel by nurturing lasting relationships, Ageas Hong Kong is committed to becoming a leading financial services provider in Hong Kong. 76 HONG KONG BUSINESS ANNUAL 2013 Quality, customised products and services earn Ageas Hong Kong High-Flyers Award A geas Hong Kong has once again won the Hong Kong Business High-Flyers Award in the Life Insurance category. This is the sixth year that the company has been honoured with this prestigious award which has been recognizing the excellence of leading businesses since 2004. “We are delighted to receive this Award,” comments Stuart Fraser, CEO of Ageas Insurance Company (Asia) Limited (Ageas Hong Kong). “As a company that believes in meeting the constantly evolving challenges in the marketplace, we aim to satisfy our customers’ needs by providing them with comprehensive products and outstanding services.” One of Hong Kong’s largest life insurance companies, Ageas Hong Kong is a wholly owned subsidiary of Ageas, an international insurance company with a heritage spanning more than 180 years. Ageas ranks among Europe’s top 20 insurance companies, with 13,000 employees working throughout Europe and Asia. By combining its global strength with local flexibility, it offers the Hong Kong market a diversity of financial protection products and wealth management services. “The High-Flyers Award is one of a number of accolades we have received recently.” Fraser adds. “We were also named Best-in-Class in Training and Development (Insurance) and Outstanding Achiever in Social Media Engagement (Insurance) in the Benchmark 2012 Wealth Management Awards.” Innovative and comprehensive one-stop financial planning solutions Ageas Hong Kong nurtures long-term customer relationships with a holistic approach to financial planning that is based on the three pillars of “Protection”, “Savings” and “Investment”. This allows customers to take good financial care of themselves at different stages of their lives. It also offers them a complete spectrum of innovative, diversified and competitive products. “In 2011, we were among the first companies authorised to provide Capital Investment Entrant Scheme (CIES) products for those wishing to apply for the right of abode in Hong Kong as investors. It successfully captures the business opportunities generated from the growing trend of investment immigration,” says Fraser. “The appreciation of the Renminbi (RMB) has created huge demand for RMB-denominated products. In response, we have launched the ‘Dynasty’ RMB Endowment Plan series, which secures a guaranteed return at policy maturity, and customers will also benefit from the RMB’s potential appreciation.” Launched in September, the revolutionary Life Insurance Hong Kong Kowloon This page clock-wise: Ageas enhanced its brand awareness and signified its commitment to the city by becoming the first company to launch twin neon signs along Victoria Harbour; An overview of future financial needs is just a few clicks away with free and easy-to-use Ageas smartphone apps; The eyecatching and innovative “Calling Dayo, Calling DoDo” advertising campaign using QR code Opposite page: Ageas Hong Kong’s CEO Stuart Fraser regards its dedication to excellent service and responsiveness to market needs as key factors in its success FAST FACTS • • • Ageas Elite Choice Insurance Plan aims to enable customers to accumulate and protect their wealth in today’s prolonged low-interest-rate environment by allowing investors to choose their own currency mix and benefit from both annual crediting interest and currency appreciation opportunities. Ageas Hong Kong also cares for its customers’ well-being. “Our Advanced Care Protector was the first in the market to cover people against less severe critical illnesses and diabetes,” Fraser points out. Leader in IT development Meanwhile, Ageas Hong Kong leverages on IT advances to extend the reach of its marketing and promotion activities and build its business. For instance, it was the first insurance company to start using Google Apps, and its free, easy-to-use smartphone apps help users to get an instant and precise picture of the funds they will need at various stages in their lives. It has also scored several “firsts” in the Hong Kong insurance sector, in terms of integrating social media platforms with advertising campaigns. These include: • Using cutting-edge QR technology to allow customers to call stand-up comedian and Ageas spokesperson Dayo Wong and renowned movie and TV artiste DoDo Cheng and hear their smart financial tips. • Employing “U-tie” technology to enable people to scan its advertising on MTR billboards and receive details of the latest promotions. • Developing an iPad Financial Needs Analysis tool. Its financial status is confirmed by global ratings agencies (A- (Excellent) by A. M. Best, A- by Fitch Ratings, and Baa1 by Moody’s). It has more than 2,700 professionally trained and highly skilled consultants. Seven percent of them are members of the elite Million Dollar Round Table for financial professionals. The company has been awarded the ”Caring Company” logo every year since the programme began in 2002. Serving society Ageas Hong Kong actively gives back to the community too. “We are committed to our corporate responsibilities,” says Fraser. “To this end, we have been a presenting sponsor of Kitchee Escola, a school that has been providing free football training to aspiring young footballers, since 2008.” The company was also the major sponsor of a fundraising exhibition match between visiting English Premier League Team Arsenal and Hong Kong League winners Kitchee. This raised funds for the Kitchee Foundation’s project to build a youth football development centre in Hong Kong. Ageas Hong Kong has been out in full force at the Oxfam Trailwalker for the past eight years. Three of its teams trekked the arduous 100-km MacLehose Trail in 2012, and the company was the champion in the insurance category for the third year running. HONG KONG BUSINESS ANNUAL 2013 77 ALTRUIST COMPANY PHILOSOPHY Altruist’s company philosophy represents the highest service standards and underscores a commitment to continuously upgrade Financial Consultants’ education level and professionalism. Pioneer Altruist lays out path to financial security and well-being A t a time of lingering uncertainties in the global economy, individuals are acutely aware of the critical role of how financial planning will play in their lives in terms of their health, family, careers and personal interests. But on the path to financial security, individuals must navigate the proliferation of financial planning choices promoted by various providers: banks, insurance companies, financial institutions etc. The channels and choices are aplenty, but the true problem is: in an era of information overload, how can an average person manage and understand what will help fulfil his or her financial dreams? This is exactly where Altruist, an independent financial consultancy firm, comes in to fill the gap. Altruist was founded in 2001 by President Albert Lam, with the mission to deliver comprehensive solutions and to ensure the financial health and well being of its customers. Being the pioneer in the industry, all its professional consultants weigh their moral and ethical obligations in creating tailor-made financial solutions, aiming to provide impartial advice to thousands of men and women pursuing their life goals. Altruist adopts a wholesome approach through which it embraces its clients, colleagues, the industry in which it operates, as well as the community. In this way, Altruist lives up to its proposition, as its name suggests – a group of people working for the happiness and welfare of others. “What underpins the operations of Altruist are five 78 HONG KONG BUSINESS ANNUAL 2013 principles – our philosophy, the mission of long-tem financial planning, our training and coaching that meet professional standards, the customer-centric service and most of all, the Altruistic spirit,” says Lam. “Altruist’s company philosophy represents the highest service standards and underscores a commitment to continuously upgrade the education levels and professionalism of Financial Consultants,” Lam further elaborates. As such, Altruist is committed to providing training and daily coaching which is second to none. “Investing in our people is our top priority. We place tremendous resources to provide the most comprehensive training curriculum to reinforce their belief, product knowledge, as well as sales skills, in order to meet the increasing challenges.” This means the customers will be advised by highly motivated professionals who fully understand the financial products and are capable of delivering high quality after-sales service. “Our professionals are well aware that there is no such thing as the best product, but a solution best suited the customer’s long-term needs. They combine the most ideal solution with excellent service, and tailor make the best advice to every individual. While every consultant undertakes to deliver this promise by adhering to the moral and ethical obligations, our clients’ interests are always well-protected,” Lam elaborates. What Altruist offers its customers are protection FINANCIAL PLANNING This page clock-wise: Celebrating the Mid-Autumn Festival with the elderly at Caritas Elderly Centre – Lai Kok; Our trailwalker team has successfully challenged the 100km MacLehose Trail; An outing trip with the underprivileged kids from Open Door Ministries; Sponsoring the Otic Charity Concert; Sponsoring Auto Italia Ferrari Team in the Macau GT Cup. Opposite page: Mr. Albert Lam, President of Altruist FAST FACTS plans and savings plans for the long term. Lam points out, “Long-term protection, which is the fundamental step of a healthy financial plan, enables customers to manage risks so that their dependents do not suffer unexpectedly. Once protection is secured, customers could consider building up savings over a specified period so they can have adequate financial resources to draw on when they retire. It also provides a cushion against the inadequacies of the MPF. Protection complemented with savings is a security against most eventualities.” Guiding the customer through his or her personal or family objectives is the ultimate goal of Altruist’s well-informed Financial Consultants. They complete this relationship by delivering the best service. “Our action speaks for ourselves. Our associates are able to build up a strong relationship with the clients and achieve mutual trust and respect. It is also self-explanatory by our endless referrals from those satisfied customers,” Lam says with pride. At the industry level, Altruist helps to shape the evolution of financial planning, insurance and broker community, including regulatory aspects in Hong Kong. “Altruist is the founding member of The Institute of Financial Planners of Hong Kong Limited and Independent Financial Advisors Association Limited – where our Chief Operation Officer Glenn Turner, chairs the Association. He is also a general committee member of the Hong Kong Confederation of Insurance Brokers. In addition, we also obtained membership with industrial association like The Life Underwriters Association of Hong Kong and the General Agents & Managers Association of Hong • • • • • Founded in 2011 by Mr. Albert Lam First to obtain joint venture insurance agency license in Shenzhen & Ningbo Independence is the competitive advantage Delivers a total well-being solution to customers: WEALTH • HEALTH • WISDOM Recognised as a Caring Company since 2003 Kong. Not only our personnel are actively involved in the work of these associations, our executives are regularly invited as the guest speakers in various seminars and workshops, demonstrating our devotion to help driving the industry forward.” Altruist also maintains its community obligations through educational initiatives and programs driven by altruistic objectives. The company offers a scholarship at the Polytechnic University of Hong Kong and Kwantlen Polytechnic University in Canada. In addition, it has sponsored activities such as the Walk for Millions, Trailwalker, and supported the activities of organisations such as Breast Concern, Otic Foundation, Caritas, Open Door Ministries as well as Sunshine Action. For people seeking to build a financially secure future while ensuring the long-term well-being of themselves and their family, Altruist remains a trusted company. HONG KONG BUSINESS ANNUAL 2013 79 AV Consultant (Int’l) Ltd PHILOSOPHY To seamlessly convey feeling and emotion through high quality audio/video equipment and professional skill without affecting the interior design, and to simplify house operation (environment and audio visual) with ease and style. AV Consultant creates ambiance for movie and music lovers to feel alive I n the hands of an audio-visual specialist, private residences are transformed into places where AV equipment blends seamlessly into the interiors of the home, creating a lively atmosphere. Alan Lee, the founder of AV Consultant (Int'l) Ltd., says, “Audio and video is not just about the hardware, it is about feelings and emotions.’’ His showroom on Duddell Street, Central provides clues to what he can achieve in a home, combining the functionality of the AV equipment with aesthetics. In the showroom, on one wall, two large embedded speakers are cleverly concealed beneath an attractive print, as if they were part of the artistic décor in a living room. Alan explains: “I aim to provide a solution that creates feelings and emotions.’’ He adds that the objective is to convey feelings and emotions without the audience noticing the equipment. The AV equipment is adorned to match the colours of the interior, thus complementing the shades and the designs of the living room. What sounds good also needs to look good. By using his knowledge and experience, Alan also aims to make life easier for those who find it difficult to operate the equipment. His solution is to use touch panels (Smart Home/Automation System). These, he 80 HONG KONG BUSINESS ANNUAL 2013 says, can make the life of the client enjoyable in that the spouse or even the children can fully appreciate the pleasure of the audio/video system, while it also simplifies the operation of other comforts in the house such as lighting, drapery and air-conditioning. “Our main focus is to provide solutions with out-of-theordinary AV and smart home products.’’ AV systems, can be complicated and difficult to use, but AV Consultant helps to simplify a client’s everyday operations, so systems can be used more often. “This definitely enhances a household’s lifestyle.’’ AV Consultant undertakes projects to deliver high-end home entertainment systems including karaoke, video library, audio library, smart home, and even the D-Box motion system, whose motions are synchronized with the actions on screen, providing a realistic, live-action experience to the viewer. AV Consultant is the first company in Hong Kong to introduce this wonderful technology. “We offer a broad range of products, including lighting, Smart-Home (home automation), sofas and IT systems,’’ Alan says, emphasising that AV Consultant is not only a high-end AV products vendor. Rather, it is also an integrator that takes care of the entire house system. “We are a service company instead of just an equipment provider.’’ Professional AV/Automation Consultant This page clock-wise: Entertainment Room - When Elegance meets Performance; Looks Like Nomal Speaker; Speaker with Style Opposite page: Alan Lee, the founder of AV Consultant (International) Ltd., FAST FACTS • • • • AV Consultant has been in the business for more than 20 years and in that time Lee has built up a portfolio of commissions including home theatre projects for leading Canto-Pop singers/directors and commercial projects to create screening rooms, club houses, churches, and universities. Alan is billed as the most popular AV reviewer in China and Hong Kong. He writes weekly columns in AV magazines, the HMV newsletter and a few AV magazines published in mainland China. He is also the first person in Hong Kong, Taiwan and China to have received certification by the ISF (Imaging Science Foundation) and THX (a George Lucas company) in 1995. The ISF certification recognises video calibration, while THX governs installation and set up of a home theatre system from product selection to final calibration. Apart from being a well-known AV reviewer, Alan also had done radio and TV programs at RTHK as well as in various TV station including TVB. Currently, he is the chairman of the Asia HD Association and committee member/certified instructor of the CEDIA China. Lastly, Alan stresses that audio and video systems should be integrated seamlessly into the life of the people without affecting the interior design. Most important of all, systems must be reliable and simple to use. • • • • • 1995 - Alan Lee, certified by THX of LucasFilm, first in Hong Kong, Taiwan and China 2002 - First "Full Digital Video" Home Theater Demo in Hong Kong 2004 - Designed and Lectured AV Seminars for Sony Customer, First Time in Asia Including Japan 2004 - Organised the first projector showcase featuring 16 brands in Hong Kong 2005 - Organised the first projector showcase in Shanghai, China 2007 - Founding member of the Asia HD Association 2009 - Chairman of the Asia HD Association 2010 - Guest speaker and calibrator for the AVATAR blu-ray launch in China 2011 - Committed member and certified instructor of CEDIA China HONG KONG BUSINESS ANNUAL 2013 81 CANADIAN INTERNATIONAL SCHOOL MISSION To develop responsible global citizens and leaders through academic excellence. Paving the road to academic success and beyond M any parents believe that academic success alone ultimately sets exceptional students apart from good ones. However, educators at Canadian International School of Hong Kong believe that the foundation for building success starts at an early age and requires a careful balance of academics, extracurricular activities and community service. The Head of School at CDNIS, Dave McMaster, explains that facilitating this balance is key to helping students reach their post-graduate goals and ease them into university life. “Universities are always looking for students with top academic performance, but they also take into consideration the holistic review of applicants,” he states. Having worked with students at CDNIS for the past eleven years and having worked with three graduating classes under the International Baccalaureate (IB) curriculum, McMaster is proud to share the continuously rising achievements of each new graduating class. “The 2012 graduating class was exceptional and we believe the class of 2013 will perform even better. We have students going into a great variety of programmes all over the world,” he states. From business, liberal arts and professional studies such as law and medicine, to less traditional disciplines such as fine arts and film, McMaster says CDNIS’s diverse IB programme has given students the opportunity to explore their options and excel at whichever area their interest might be. 82 HONG KONG BUSINESS ANNUAL 2013 While the majority of students enroll in direct entry Medical and Law schools, as well as the more traditional Commerce, Engineering and Science programmes, this past year, more students than ever chose to attend universities renowned for their arts programmes, a trend McMaster notes as growing. This, he explains, has to do with the school’s guidance counsellors and teachers, who are keen to help students explore their interests and passions. In fact, Head of Guidance Bob Bate says students are encouraged to talk about their post-secondary plans with their family, teachers and friends early on. “We start conversations around careers and postsecondary transition in grade 10 and it is built off of our Careers 10 class. Students do a wide range of assessments and aptitude tests to help them better understand what options may be available to them that they have not yet considered,” says Bate. Ensuring students know as much as possible about the universities they are applying to, the school organizes campus tours during school breaks. “In addition, we host more than 300 universities on campus, 70 of which are part of an annual university fair,” Bate explains. “Students are encouraged to attend the university presentations to learn as much as possible about the various schools and the programmes they offer. Not only are CDNIS students very knowledgeable about the universities and programmes they are applying to,” Bate adds, “the students are also well prepared for the rigors of university life. In terms of work load and research skills, grade 12 students in the second year of the IB International School This page clock-wise: CDNIS alumni Simon Chan (’10) and Gabrielle Munoz (’12) discuss her work which was on display as part of the 2012 IB Graduation Art Show; Students representing 41 different nationalities study at CDNIS; Flags representing CDNIS’ student nationalities are displayed in the school’s entrance; Head of Guidance, Bob Bate, meets with students regularly to discuss their post-secondary options Opposite page: Dave McMaster, Head of School at Canadian International School of Hong Kong FAST FACTS • • • • Diploma Programme are working at a similar level as a first year university student.” McMaster says students often apply to as many as eight universities in three countries with 100% of graduates going on to university. “Our students are academically successful and the majority will go to the schools of their choice. This past year alone, we had five students accepted at the Art Institute of Chicago, one of the world’s top art schools.” With impressive academic records, CDNIS students were offered an impressive amount of scholarships. “Our students were offered approximately HKD $16 million in scholarships to attend various schools around the world. One of our most outstanding students received a USD $140,000 full scholarship to the Art Institute of Chicago,” says McMaster. With a nurturing staff and a knowledgeable team Canadian International School of Hong Kong was established in 1991 with 81 students A through-train IB World School, offering the Primary Years, Middle Years and Diploma Programme in addition to the Ontario Secondary School Diploma all on one campus Currently over 1,800 students of 41 nationalities and 250 staff CDNIS is committed to developing caring young people who possess a sense of social responsibility. of counsellors dedicated to helping students excel beyond high school, McMaster says the sky is the limit for CDNIS graduates. “Our students understand they are very privileged in that they are given many opportunities and experiences. We try our hardest to ensure that these experiences and what they’ve learned here will help them not only in university but as successful global citizens.” HONG KONG BUSINESS ANNUAL 2013 83 Chartis Insurance Hong Kong LimiteD MISSION AIG is excited about the potential of tomorrow globally and in Hong Kong. AIG aims to be the best general insurance company in Hong Kong. Our mission starts with being “an Employer of choice in an Industry of choice”. This means not only working with our customers and our business partners but also our staff and industry stakeholders to ensure this vision becomes a reality. 84 HONG KONG BUSINESS ANNUAL 2013 Chartis Insurance stands out in Hong Kong W ith a client base of more than 120,000 individual customers and 11,000 corporate customers in Hong Kong, Chartis Hong Kong is one of the leading providers of general insurance in the city. Serving Hong Kong since 1931, Chartis Insurance Hong Kong stands out to its customers because of a combination of corporate longevity, financial strength, international experience and local knowledge. We have been serving Hong Kong customers locally for over 80 years, providing them with insurance cover through the decades,” says Marc Breuil, President and CEO of Chartis Insurance Hong Kong. Rated A by S&P with a stable outlook, the company has the financial strength and the international reach that comes with being part of AIG, one of the world’s largest insurance groups. Locally, Chartis is one of the best capitalized Hong Kong domiciled General Insurance Companies. This is particularly important in Hong Kong where the next few years will see the introduction of a new Independent Insurance Authority and a new RBC-based solvency regime. Mr Breuil, who is back to Hong Kong for the second time, believes that Chartis’ key strengths lies with its staff, their dedication and professionalism. “It is that blend of local and international talent and experience which enable us to continually adapt our insurance products to protect customers from a range of risks. Our customers vary from individual holiday-makers to multinational companies looking to manage exposure on balance sheets against the evolving risks they face. Indeed, in 2011 Chartis was the second largest direct underwriter of General Insurance in Hong Kong (excluding inward reinsurance). The company has a very diverse portfolio with significant global scale, which is supported by its capital market strength. In the US, Chartis businesses recently rebranded to AIG. In line with this change, Chartis in Hong Kong will re-brand to AIG in the first quarter of 2013, marking a significant milestone for the company. Aligned with the rebrand to AIG is a new brand promise – ‘Bring on Tomorrow’. “Bring on Tomorrow underscores AIG’s tremendous tenacity and ambition – to solve problems, to innovate for the benefit of our clients, and to act as a powerful, global team,” said AIG President and Chief Executive Officer Robert H. Benmosche. .” Chartis’ competitive advantage So what sets Chartis’ claims service apart from its competitors? “By the close of 2012 Chartis in Hong Kong will have reviewed 68,000 claims,” says Breuil. “What matters most to our customers is the ability to process these claims anywhere in the world on local General Insurance This page clock-wise: Chartis Cup, an annual charity rugby event sponsored by Chartis, raised US$64,000 this year to renovate schools for needy children in areas damaged by the 2011 floods in Thailand Opposite page: Marc Breuil, President and CEO of Chartis Insurance Hong Kong Limited FAST FACTS terms. Being part of AIG gives Chartis in Hong Kong the advantage of global reach, and provides access to 9,000 claims professionals in over 160 countries and jurisdictions. This is a unique set of capabilities which is critical for the insurance business,” he added. “Chartis also provides a customer-focused service. The claims team manages claims in a consistent and fair manner that is pro-active and transparent. For large and multinational customers, Chartis also offers a tailor-made claims service to meet our customers’ requirements; we call it - Claims Account Relationship Management.” “Our Claims Account Relationship Managers work with claims teams across all regions to ensure consistency and clarity of service. We work with brokers and customers to agree clear benchmarks and expectations, as well as marinating open channels of communication. We build tripartite working relationships between customers, brokers and the claims teams to deliver our claims service,” says Breuil. Keeping its focus Chartis is single minded in its focus on underwriting principles, discipline and standards, and not distracted by the competition. Breuil believes that insurers should focus on producing a sustainable business model to back products and meet potential customer claims. “That starts with underwriting discipline, with knowing risk and knowing how to price it properly. It takes years of experience to build up this kind of knowledge, and with a 80-year presence in Hong Kong Chartis has this knowlegde. Among the top insurers in the world, AIG has the most well-balanced portfolio in terms of geographies and distribution between the major lines of business,” he adds. Chartis’ dedication and excellence played a pivotal role in providing momentum to Hong Kong’s insurance industry. Chartis has been a pioneer in offering innovative insurance solutions to businesses and consumers to address evolving insurance needs, with new insurance products introduced over the years, such as Environmental liabilities, Product contamination, Directors and Officers liability, Dragonshield, CyberEdge and many others. Breuil cites cyber threat as an emerging new risk which is threatening businesses and consumers in an increasingly interconnected world. “Providing dedicated insurance products is one of the key ways to manage new risks and address changing concerns. Hence Chartis developed CyberEdge, the most comprehensive cyber product available to commercial enterprises in Asia Pacific.” General Insurance • Chartis Insurance Hong Kong Limited is a member of American International Group, Inc. (AIG) • Chartis in Hong Kong will be rebranded to AIG in the first quarter 2013. • The financial strength of Chartis Insurance Hong Kong Limited is vetted by global rating agencies: A (stable outlook) by S&P, A2 (stable outlook) by Moody’s. • AIG’s strategic vision is to be the most valued insurance company. Chartis initiatives While ensuring world-class service, Chartis in Hong Kong also positions itself as an industry employer of choice. “Beyond the strength of our best-in-class insurance products and services, we also put forward our management values in ways our staff, customers and business partners can relate to,” says Breuil. “Transparency, fairness, integrity and professionalism are the key values Chartis adheres to as an employer to ensure we attract and retain the best talent in the industry. In 2013, we are introducing new maternity benefits for our staff that we believe will be a first in the Hong Kong general insurance industry. This is particularly relevant to the 60% of our staff who are female. Another program offered by Chartis is the Volunteer Time-Off (VTO) leave allowance where employees may provide a public service and make a difference in their communities by participating in charitable initiatives or volunteering to work for charities of their choice.” The “Giving Back” VTO program was established to support activities that enhance and serve communities. Employees can donate up to 16 hours each calendar year to an eligible charity. HONG KONG BUSINESS ANNUAL 2013 85 CLP Power Hong Kong Limited PHILOSOPHY Towards a sustainable future From our beginnings in Hong Kong over a century ago, CLP has become one of the leading power companies in the Asia-Pacific region. In a changing world, our mission is to produce and supply energy with minimal environmental impact to create value for shareholders, employees and the wider community Environmental protection – a key pillar in CLP’s brand identity M any 86 HONG KONG BUSINESS ANNUAL 2013 Environmental Performance This page clock-wise: CLP’s expert technicians are committed to provide world-class electricity supply reliability; Mr. Richard Lancaster, Managing Director of CLP Power; The Junior Green Engineer Programme aims at nurturing a new generation of green pioneers Opposite page: The usage of natural gas has been increased as a clean energy alternative. FAST FACTS. • • Today CLP Power is Hong Kong’s biggest power company, with almost 4,000 staff catering to the energy needs of more than 80 per cent of the population. – minimising the environmental impact of energy generation and delivery,” says Mr Lancaster. HONG KONG BUSINESS ANNUAL 2013 87 Cosmo Hotel Hong Kong Cosmo Hotel Mongkok PHILOSOPHY The hotel industry is a people business. When you are serving people things become exciting, dynamic and different every day. To me, having a "Passion to Serve" is of top importance and this is also from this our service motto "Beyond thoughtful. Anytime. Everywhere" derived. I believe in "anticipate and act" instead of "wait and see". With this in mind we come up with thoughtful services that tug on every guest's heartstring. And of course I value the core of our Cosmo family. I treat all employees as one family. I strongly believe a caring company culture with development prospects is the key to a happy workforce. 88 HONG KONG BUSINESS ANNUAL 2013 Home away from home- staying green amidst a buzzing city at Cosmo Hotels B eing the pluralistic city that it is, Hong Kong attracts travellers with different agendas from around the world on an impressive scale. From business and corporate travellers to families and young adventurers, their budgets, needs and expectations are different. Yet, Anita Chan, General Manager of city hotels Cosmo Hotel Hong Kong and Cosmo Hotel Mongkok, observes, no matter the purpose of their travels to the city, be it business or leisure, guests are always looking for a convenient location and a green, environmentally-friendly experience. The fact that both hotels are located in the heart of the city- the Hong Kong branch being only moments away from important commercial hubs, and the Mongkok location being close to a mix of old and new Hong Kong, make the conventional check in / out time a topic to be challenged and revisited. And to do this, both the Cosmo Hong Kong and Cosmo Mongkok work hard to create personalised experiences that tug on the heartstrings of each guest. From providing an extensive network of shuttle buses to a pioneering 24-hour check in check out service, Chan and her team is there to ensure guests get the most out of their visit. “Because we are a city hotel and there is so much happening in Hong Kong, guests can do a variety of activities around the clock.” When booking directly through the hotel’s website, guests can enjoy a full 24-hour stay, service which gives them the chance to explore all aspects of sightseeing, entertainment and night life without having to work their schedule around their check out time. And to help guests trek the city, the hotel’s two locations together provide 6 shuttle routes to 22 popular hotspots around the city including the Hong Kong Convention and Exhibition Centre and major commercial buildings in Hong Kong for business travelers, as well as popular tourist must visit spots such as Ocean Park, Elements and IFC shopping malls. “This service caters to the needs of all sectors of travellers and it really connects them to the entire city,” says Chan. And with a passion for providing a greener experience for guests, Cosmo Hotel Hong Kong and Cosmo Hotel Mongkok are not only Green Globe certified hotel, but the two has scored impressive ratings of 83 per cent and 85 per cent respectively by fulfilling over 51% of 320 compliance indicators. The various green policies the hotels are adopting include an investment in LED lighting to conserve as much as 20 per cent of energy and as much as 14 per cent drop in linen laundry and subsequently a 16 per cent drop in water consumption as a result of effective reuse of linens and towels by guests. “We are also the first 100 per cent smoke-free four- Green City Hotel This page clock-wise: Lobby at Cosmo Hotel Hong Kong; Superior Green Room in Cosmo Hotel Hong Kong; Cosmo Hotel Mongkok; Room Cosmorganic in Cosmo Hotel Mongkok Opposite page: Anita Chan, General Manager of Cosmopolitan Hotel Hong Kong, Cosmo Hotel Hong Kong and Cosmo Hotel Mongkok FAST FACTS star hotel in Hong Kong and properties are using ecofriendly natural refrigerants for the air-conditioning system to make sure our ozone layer is free from harm,” Chan shares. On top of that, Breeze on fifth floor of Cosmo Hotel Hong Kong serves as an open patio and has an abundance of greenery. The certification not only recognizes the hotels’ dedication to environmental initiatives, but it highlights their work in facilitating social economic well-being among its staff and within the community through two main initiatives. The hotel also provides opportunities for hospitality students to intern at the two properties. "We are also keen to encourage more young people to join our industry and through letting students come work with us, it gives them a full picture of all the expertise and departments that it takes to run a hotel," says the hospitality veteran. Launched for the first time in 2012, the One Family Program extends internship opportunity to families of selected staff members into the hotel for an insider look at what the hospitality industry is all about. “Our industry requires that staff work long hours; we felt this program was a great way for families to understand and have more appreciation for what our staff do at work. It also gives them a chance to experience what it is like to work in various posts of the hotel,” says Chan. While focusing their efforts on a green travel experience, the hotels also ensure they invest the same enthusiasm to providing top-notch service. To provide a comfortable stay for guests, each room features high quality Simmons mattresses fitted with 300 thread-count sheets, a pillow menu with 11 options, a four-choice water bar as well as an iPod dock. These amenities all aim to cater to and exceed the expectations of guests. With the evolving technology and the transparency of the Internet world, Chan capitalizes on them to interact with her guests. The hotels take notes from online travel reviews like Tripadvisor, “We understand guests’ expectation, feedbacks and we engage with them by even replying their comments. It’s all due to our "Passion to Serve." In fact, this was also being mentioned in one of the reviews on Tripadvisor where guest praised us for having the “passion to wanting to assist.” When booking directly through the hotel’s website, guests can be sure they are getting exactly what they see. In fact, Cosmo Hotel Mongkok’s website was recently recognized by Hospitality Sales & Marketing Association International with the Adrian Silver award. “Our website is a show flat of the hotel, the first stop where we see guests before they check in. All images are real photos and the site presents our hotel’s character vividly. We don’t exaggerate and we offer exclusive promotions on there,” says Chan. Uniquely catering to the different needs of different guests, the Cosmo Hotels seek to continue to evolve with the traveling trends. “At the end of the day, visitors are looking for a comfortable place to rest their head. But as the dynamics and demographics of the traveller continues to evolve, we too have to provide dynamic services to satisfy all customers.” • Dorsett Hospitality International, listed on the Hong Kong Stock Exchange (HKEx Stock Code: 0035), owns and manages 17 hotels globally, of which 8 are under development in China, Hong Kong, Singapore and United Kingdom. • Cosmo Hotels became Green Globe-certified in 2012. • Cosmo Hotels are awarded “Certificate of Excellence 2012” by Tripadvisor. • Cosmo Hotel Mongkok's brand website is named “Adrian Silver Award” by Hospitality Sales & Marketing Association International. HONG KONG BUSINESS ANNUAL 2013 89 Bao Gallery by Crystallize•Me Ltd PHILOSOPHY Crystallize.Me believes in creating a unique and memorable experience for each and every one of their customers. This has been the key to their success and is evident in both the quality of their products and the premium service provided by all their members of staff. By offering customers the very best in luxury crystal products, Crystallize.Me has been a pioneer in showcasing the true artistic splendidness and originality of finely crafted crystal pieces in China and Hong Kong. 90 HONG KONG BUSINESS ANNUAL 2013 Crystal clear - CrystallizE.Me provides light and sparkle to those with an eye for luxury accents S ourcing unique and exclusive crystal lighting, decorative objects and bespoke accessories from around the world, Crystallize.Me brings the best of crystal works to Hong Kong and China. Setting the standard and educating discerning collectors and connoisseurs in Beijing, Shanghai, Chengdu and Hong Kong, Crystallize.Me continues to flourish as the go-to source for the sparkling products. Managing director of the company Raymond Chui and his team has been busy at work the past year to bring even more exciting crystal elements to the cities. “Along with winning major contracts including Shangri-La Shanghai and signing an exclusive contract with Spanish crystal chandelier leader, Iris Cristal, we were able to host our successful crystal glass art exhibitions in both Beijing and Shanghai,” he says. With a 40-year history in crystal, Crystallize.Me is leader in the industry - bringing top quality pieces from leading names around the world to local buyers. Chui observes the trends in crystal lighting, accessories and fashion. “There are two seemingly opposite trends that are developing in the crystal industry; one is the progress of technology in the production process and the other is a resurgence of traditional craftsmanship.” These opposite trends appeal to distinctive sets of clients, those who strive for contemporary styling and those who seek the unique and the extraordinary. The advancement in technology has led to more finely cut crystals due to precision cutting machinery as well as the decrease in the use of materials containing lead. Machine-cut crystal, while resulting in modern pieces, lacks the emotions and passion of traditional. This, says Chui, is the reason why the market for hand-made pieces exists. “The growing use of machinery has increased the value of traditional craftsmanship as it becomes increasingly rare. Although the use of technology has come a long way in the crystal industry, it still cannot truly replicate the artistic quality, intimacy and unique personalization of hand-crafted crystal pieces." Leading the industry for 40 years, Crystallize.Me’s clients too have cultivated an extensive and in-depth knowledge about the value of crystal. “Many buyers are becoming savvier in identifying and appreciating the differences between high and low-quality crystal products.” Because of this informed appreciation for fine crystal works, customers are also fully aware of the value of fine pieces. “Instead of focusing solely on Crystal Lighting & Home Deco Clockwise from top left: The Crystallize.Me booth at the 2012 International Hotel and Architectural Lighting Fair in Shanghai; In June 2012, Crystallize.Me participated in the Shanghai 'Women's Round Table Trust' Charity Event; Crystallize.Me's new CAT.i product; Chandelier design from IRIS Series Lighting, Crystallize. Me is an exclusive reseller for the Spanish crystal chandelier leader Opposite page: Mr. Raymond Chui Managing Director of Crystallize. Me FAST FACTS price, customers now value the quality of original designs, superior craftsmanship, and the use of highquality materials. Hopefully, this trend will continue to motivate an improvement in overall quality and services in our industry.” Chui observes that crystal is nothing less than works of art. They become valuable collectibles that make great investment and beautiful style statements. Many high-quality crystal products are considered and treated as pieces of art. Overseas, many designers and artists collaborate with big name brands to produce crystal products that are unique in design and creation. Chui believes Crystallize.Me can facilitate this trend in Hong Kong and China. “Crystallize.Me has plans to bring this concept to the Chinese market as more people now appreciate crystal products for not only their practical use, but also their artistic quality. It is exactly for this reason that we have chosen to set up our showrooms as galleries rather than regular stores,” says Chui. Besides providing crystal pieces to clients, the company is also an expert on all services related to crystal. “Crystallize.Me has always provided our customers with services to help satisfy their needs. Along with services such as light installation, procurement and customization, Crystallize.Me has recently started offering a beautifying service that not only provides a professional cleaning service for customers with luxury lighting but also helps upgrade existing light bulbs with our own beautifully designed and energy efficient CAT.i LED light bulbs.” Launching its own brand of light LED light bulbs, CAT.i, seems to be a natural move for the company as lighting is one of its major focuses. The right amount of lighting not only provides illumination, but it also sets the ambience and uplifts the mood of the space. “Our CAT.i LED light bulbs have been designed to not only be energy efficient and environmentally friendly, but also to improve and enhance the beauty of our customer’s lights and lighting fixtures,” said Chui. To maintain its reputation as the top crystal source, the company strives to continuously keep on the edge of trends to bring the best and latest to its customers. “The market is constantly changing and we are always interested in staying up-to-date on the latest trends and developments in the industry. At the same time, we strive to ensure that the philosophy behind the Crystallize.Me brand stays constant and that is the focus on providing our customers with a unique and memorable experience. Our plans for the future will continue to uphold this principle as we further develop the different brands, products and services provided under our group.” • 2000 - Branched out in mainland China as “Crystallize Me”, the one and only high-end luxury crystal lighting brand • 2002 - Project for APEC VIP room, Shanghai Westin Hotel, and the Bund in Central Shanghai • 2004 - Expanded into the market in Beijing, became the lighting supplier for China World Hotel and the Beijing Shangri-La Hotel • 2005 - Created “JK Blue” crystal gift associated with COFCO Plaza; as well as the “world’s 100 most famous diamonds” replicas • 2006 - “JK Blue” fashion jewelry • 2009 - Combine lighting/ jewellery/gifts into the concept of Crystallize Me • 2010 - Applied the new concepts of our showroom into Bao Gallery • 2011 - On-going Bao Gallery Crystal Art Experience is associated with China’s top crystal artists from Qinhua University, Central Academy of Fine Arts, and Shanghai University • 2012 - Launched the CAT.i brand. Environmentally friendly LED light bulbs designed especially to visually enhance chandeliers and other luxury lights. HONG KONG BUSINESS ANNUAL 2013 91 FreyWille PHILOSOPHY “I believe that art is important for a happy life. To see the good, the beautiful, in everything around us makes us more positive, interesting people. It connects us together. My wish is to bring happiness.” Dr. Friedrich Wille Symphony of colours- mingling art into everyday life with Viennese enamel Jewelry F or many women, it would not be an understatement to say that dressing well is as much a lifestyle choice as it is an art. And the details that go into an outfit are what make sophisticated dressers stand out from the crowd. And one of the best ways for a style maker to set his or herself apart is to accessorise with unique, one-ofa-kind items that will make them stand out from the masses. This is exactly the kind of person Viennese jeweller FREYWILLE has in mind when creating the brand’s art-inspired jewelry and accessories. With a passion for the extraordinary, the brand is noted for its exquisite artisanship and its traditional enamelling techniques. As FREYWILLE’s CEO Dr. Friedrich Wille explains, it is its passion for the arts and a love for refinement that inspire the brand to create its colourful collection of trinkets and gems. The brand was founded in 1951 and last year they have been celebrating their 60th anniversary, bringing reformation to the company that was founded on the principles of hand crafting wearable art in the finest enamel And over the years, the brand continues to perfect this distinctive style and strives to remain true to its identity. “FREYWILLE is a very special brand,” says Dr. Wille. “Of course we keep track of the jewelry 92 HONG KONG BUSINESS ANNUAL 2013 world, but to us it is more important to stay true to our philosophy and style, which is unique and artistically precious like no other luxury brand.” Its iconic appeal and artistry, says the CEO, is exactly why clients keep coming back for more of its wearable art pieces. “We use enamel as our canvas. FREYWILLE was born with the idea of creating wearable pieces of art. During our long history we developed important links to famous artist’s foundations, such as Gustav Klimt, Hundertwasser, Alphonse Mucha and Claude Monet who actively approached us and allowed us to create designs inspired by those great artist’s masterpieces.” These artistic collaborations are especially interesting because it allows these artists’ works to be showcased through a different and highly specialised medium- enamel. “We treat our production as an old craft. Since 1951, all our handmade jewelry pieces are produced in our artistic workshop in Vienna where each single piece underlies the controlling hands of our goldsmith and masters of enameling.” Tradition is a large part of the brand’s success, but it is its pioneering spirit that keeps it thriving. “Our academically trained design team is also composing their own artworks, images inspired by ancient cultures, important architecture but also abstract Enamel Jewelry This page from top to bottom: 18k yellow gold and white gold diamond cufflinks, 18k solid gold Daisy ring, Gold-plated Waterdrop pendant,18k solid gold rings, Gold-plated fountain pen Opposite page: Dr. Friedrich Wille, CEO of FREYWILLE FAST FACTS • • • • • • • • • themes such as feelings of love passion and joy.” Described by Dr. Wille as ‘non-traditional’, the brand designs with women who wish to make a statement in mind. “Different collections appeal to a certain character, culture or age group. Some of our customers collect all pieces of one collection. Others mix and match our collections according to their style and mood.” And with the success of its women’s accessories, the brand also branched out to include pieces for men with its range of ties, pens, cufflinks and belts. This, says Dr. Wille, is an effort to offer more choices for the fashion-conscious male consumer. “Globally, 1950s : Folkloric designed enamel jewelry 1960s : Created a collection for Harrods, decorated with Swarovski crystal 1970s : Formed an association with YSL 1980s : Royal bangle, Egyptian collection 1990s : Diva bangle, “Hommage à Claude Monet”, Iris collection 2000-07 : Halfmoon pendant, “Hommage à Hundertwasser”, Spiral of Life collection 2008: Diva bangle, “Ode to Joy of Life,” Heavenly Joy collection 2011: Luna Piena pendant “Hommage à Gustav Klimt”, Hope collection 2012: “Floral Symphony” Collection, “The Spirit of Africa” Collection, 18k solid gold Daisy ring, Gold-plated Waterdrop pendant men started to pay more attention to the details of their outfits.” Happily positioning itself as a niche jewelry brand, the CEO says they have no plans to venture beyond jewelry and accessories. And it is with good reason FREYWILLE remains focused and dedicated fully to its craft. “It takes a very long time to design a new product shape in enamel. We will never become a brand that expands on a huge set of products, as the very nature of enamel production is too elaborate for that. However, we keep our mind open. If an interesting idea comes to our mind, we are always willing to explore it.” HONG KONG BUSINESS ANNUAL 2013 93 FUJI XEROX (HONG KONG) LTD. PHILOSOPHY The “Good Company” concept was launched in 1992, to promote three attributes aimed at keeping and balancing the company for being “Strong”, “Kind” and “Interesting”. Efficiencies and Cost Reductions gained from Document Management Solutions M r Herbert Hui, Managing Director of Fuji Xerox (Hong Kong) Ltd., proudly states: “Fuji Xerox Hong Kong provides document consultancy services and solutions to customers in every industry, through a full range of knowledge and document solutions. We work closely with customers to manage and improve their document-intensive business processes. We take an enterprise-wide view of documents throughout the lifecycle to identify where process efficiencies and cost savings can be made, and develop solutions that deliver sustainable business benefits throughout the enterprise.’’ When a 5-star hotel in Hong Kong sought to introduce mobile technology to enrich the experience that guests have when they check-in, they turned to Fuji Xerox Hong Kong. The luxury hotel was eager to implement a user-friendly, efficient system through mobility and electronic document management solution. Similarly, Fuji Xerox Hong Kong implemented the electronic document management solution (EDMS) to streamline and centralise the document process in a top steel company. In this case, Fuji Xerox Hong Kong delivered a total solution from EDMS, infrastructure, servers to backup solutions. These are just two of the multitude of projects that Fuji Xerox Hong Kong undertakes and they illustrate 94 HONG KONG BUSINESS ANNUAL 2013 some of the expertise that the company brings to its customers, both large and small. In delivering the various solutions, Fuji Xerox draws on 50 years of experience and expertise in document management. A few months ago Fuji Xerox was also ranked by Gartner, Inc in the Leaders Quadrant of the 2012 Magic Quadrant for Managed Print Services (MPS) Worldwide. MPS is a service that helps a company gain control of processes and costs for document output so as to raise the productivity and reduce the cost. In implementing the service, it takes the Lean Six Sigma approach, ensuring consistency and providing a value-added service. One of the key areas in which Fuji Xerox Hong Kong excels is the Total Office Solution. This involves hardware, software and services. Hardware includes multi-function devices (MFD), printers, IT-related equipment (such as PCs, servers, switches, etc.). Software includes office automation solutions such as manageability solutions (print management), electronic document management solutions (EDMS), mobility solutions, production printing, and one-to-one marketing solutions. The services include “Service Plus” to MFD, project management and outsourcing services. Fuji Xerox Hong Kong offers office solutions for small and medium business as well as multinational Total Office Solution This page: Fuji Xerox Hong Kong shared its document consultancy solutions and services in Solution Day 2012; The diagram shows the key benefits of Fuji Xerox’s Manageability Solution Opposite page: Mr. Herbert Hui, Managing Director of Fuji Xerox (Hong Kong) Ltd. FAST FACTS • Xerox Corp and Fuji Xerox were placed by Gartner, Inc in the Leaders Quadrant of the 2012 Magic Quadrant for Managed Print Services Worldwide in October 2012. • Established in 1964 and known formerly as Rank Xerox (Hong Kong) Ltd, Fuji Xerox Hong Kong became part of Fuji Xerox Co., Ltd. in December 2000. • Recognised as Caring Company for 10 Consecutive Years from 20022012. companies. The company also implements industry specific applications, such as for architectural practices, construction and engineering companies, educational institutions, hotels and the retail sector. “These solutions aim to solve the customer’s problems in document related processes. Customers enjoy the efficiency gains, improved bottom line through consolidation, right-sizing and managed printing. Various solutions are evaluated differently on the potential gains and will also depend on a customer’s situation”, Hui explains. Whatever the solution implemented, Fuji Xerox Hong Kong pays special attention to sustainability to reduce the environmental impact. The company’s Sustainability Report 2012, earned a respectable B+ GRI grade from the Hong Kong Quality Assurance Agency among non-listed companies. The report outlines strategies and activities taken to meet commitments to customers, employees and the community. Under the theme, Connecting to 360o of SustainabilityTM, the company takes a holistic approach to sustainability. As the use of mobile devices continues to grow at a rapid rate, Fuji Xerox Hong Kong is also keeping pace with the latest developments by providing Enterprise Mobility Solutions. This includes four core elements – mobile security, mobile printing, a mobile document management system and mobile form application using mobile devices, online or offline. “For businesses faced with cost pressure in a weak economic environment we help take advantage of innovations in business processes, technology and document management to change the way they do business”, Hui said. HONG KONG BUSINESS ANNUAL 2013 95 FUJITSU PHILOSOPHY ‘Shaping tomorrow with you’ Demand grows in HK and Asia for I.T.-MANAGED Services T he past twelve months have been tough for many organizations. Faced with a weak global economy and an increasingly competitive marketplace, enterprises across various sectors are leaning towards trimming expenditure on information technology as they strive to keep operating costs low and reduce capex. Amid this backdrop of challenges in the operating environment, demand for IT managed services has been steadily increasing, as enterprises realize the potential to increase productivity while minimizing risks and reducing costs. In Hong Kong alone, the predicted growth rate for these services through 2012 to 2013 is 8-9%, according to IDC. Increasing agility, lowering costs IT managed services is an area in which Fujitsu Hong Kong has extensive experience, ranging from managed data centers and migration services, to end user services and infrastructure support. Derek Yiu, General Manager, Solutions and Services Business at Fujitsu Hong Kong, points to many factors fuelling the march of IT managed services, such as customers’ desire for higher levels of service to sharpen their competitive edge, as well as enterprises’ need for improved site effectiveness. Underpinning this is the widespread drive to maximise cost savings by reducing total cost of ownership. Yiu explains that there has been a noticeable surge in interest for two particular areas of IT managed services – onsite and desktop managed services, and 96 HONG KONG BUSINESS ANNUAL 2013 data centre services. The traditional work environment can result in a tricky equation, namely the upfront and ongoing costs associated with laptop and PC installation and management, compounded by prevailing difficulties surrounding system downtime and support. As such, many organizations are deploying onsite and desktop managed services, specifically leveraging virtualized client infrastructure, to reduce costs, increase productivity and improve operational efficiency. The number of businesses requesting data centre services is also on the rise as many enterprises seek to embark on a journey into the cloud. Research firm IDC estimates that in Asia Pacific, the cloud market will swell from US$2.9 billion in 2011 to US$32 billion in 2020 at a 31% compound annual growth rate. Again, the potential for significant cost savings and efficiency gains are the key drivers. Industries as diverse as financial services, telecommunications, supply chain and Macau gaming are all clamoring for data centre and virtualization services given the benefits on offer, from huge scalability to greater control and tighter data security. Companies in these sectors are keen to find cloudbased IT managed services partners who can be the architect, developer and operator of private clouds. Driving value through effective, efficient and flexible IT services Yiu says this is an area in which Fujitsu excels. Fujitsu operates more than 100 data centres globally with worldwide service desks that support Leading ICT Solutions and Service Provider This page: As a result of IT skills shortage, companies are looking to leverage Fujitsu’s expertise in IT managed services for a robust, yet easily manageable system. Opposite page: Derek Yiu, General Manager, Solutions and Services Business at Fujitsu Hong Kong FAST FACTS over 30 languages. Fujitsu is responsible for the integration, enhancement and evolution of IT assets and business applications. Besides, Fujitsu wraps its leading infrastructure products and solutions with world-class data center and managed services to deliver greater value to enterprises across a multivendor environment, Yiu adds. Fujitsu remains vendor-neutral and implements solutions tailored to suit the specific needs of individual enterprises, offering greater scalability, flexibility, resilience and efficiency. “As Hong Kong serves as a key regional data centre and information hub, Fujitsu leverages global capabilities and best practices coupled with extensive local experience to support multinational companies to design and implement a world-class cloud platform,” Yiu says. Enterprises from finance, telecom and logistics will increasingly adopt private cloud technologies, including software-as-a-service and infrastructureas-a-service, to enhance customer experience and become more agile. One of the sectors which has benefited from Fujitsu’s expertise is Macau’s gaming industry. As Macau rapidly expands, companies are struggling to find the right candidate to support their IT needs. The IT skills shortage will also haunt companies in Hong Kong and Greater China. As a result, companies are looking to leverage Fujitsu’s expertise in IT managed services to provide them with a robust but easily manageable system, to ensure that the best available technologies are applied in the most appropriate way to enhance business performance. The path to successful IT transformation Yiu explains that the heavy cost burden is driving businesses to consolidate their IT systems through virtualization and the cloud to eliminate much of the space and power required, reduce costs and improve IT service levels for business users. A recent study by Forrester has shown that businesses in Asia Pacific and Japan see cloud computing as an integral part of their strategy, with 68% of organizations saying that unless they opt for cloud initiatives, they could fall behind the competition. In 2013, Yiu says, Fujitsu expects an even greater focus on virtual applications and cloud spending, as enterprises understand the long-term benefits of the cloud. A virtual ecosystem will emerge as virtual appliances gain traction in IT operations, replacing a lot of the physical components. Research firm Gartner has forecast that the worldwide cloud services market will reach US$150.1 billion in 2013 and Fujitsu believes that spending on enterpriseclass cloud services will increase. Traditionally, most managed services platforms were designed with the management of remote servers located on a customer’s premises in mind, Yiu explains. But in the age of the cloud, those servers are rapidly being moved, either into a data centre owned by the solutions provider or another facility managed by the hosting provider. In either scenario, the need for users to manage their own servers remotely has been reduced. The only thing that really needs to be remotely managed is the network that provides access to those servers. The cloud provider is obliged to provide a dependable and seamless data centre operation and uphold enterprise level SLAs. This enables chief information officers to de-risk their IT and focus on higher-value work and innovation. Depending on individual business needs, enterprises can adopt IaaS, PaaS, SaaS or even the private cloud. Yiu says a trustworthy and reliable service provider should study and understand the client’s business needs, facilitate change management and customize the most suitable solutions to help the client achieve long-term business success. • Fujitsu is the world’s third-largest IT services provider, with over 170,000 professionals, serving customers in more than 100 countries. As a leader in ICT solutions and services for 78 years, the group pursues strong innovation initiatives to create new value for customers with R&D investment at USD 2.9 billion. • Operating in Hong Kong for over 50 years, delivering real business value for customers across various industries by combining global expertise with local experience and facilities. The Hong Kong office also serves the Macau market, further extending the outreach of the company’s world-class services and solutions to the gaming and hospitality industries. • In 1997 and 1998 respectively, Fujitsu Hong Kong merged with ICL Hong Kong, a leading computer hardware and services company, and Amdahl, a well-known mainframe computer provider, further strengthening our capabilities in offering mission-critical solutions and services. • Fujitsu has established more than 100 data centres globally, exceeding 1 million square feet of raised floor space. Offices have been set up in principal business areas and the service desk centres support over 30 languages, enabling Fujitsu to provide a seamless service to customers worldwide. • Nominated as the Best Virtual Desktop Solution provider in e-brand Award held by e-zone and Business IT Excellence Award organized by PC Market. These awards recognise outstanding computer and digital products (or services) providers. HONG KONG BUSINESS ANNUAL 2013 97 GALAXY MACAU PHILOSOPHY Their philosophy is “World Class Asian Heart.” The Galaxy’s Brilliant ‘Seattleite’ J ane Tsai lights up like a shooting star when we talk about Seattle and Galaxy Macau. As the Vice President of Marketing Communications at Galaxy Macau, Tsai, a Seattle native (known as ‘Seattleites’), is beaming about her role with the company. She says, “There are very few chances in your life when you can launch a mega-brand. There are clearly pillars of the gaming industry, and that’s all very compelling. But we are launching a true global brand here, and I find that very exciting. I tell my family back home that the pace here is just so fast compared to the U.S.” One would expect to hear this from a focused and energetic executive like Tsai, who joined Galaxy Macau in 2010 during the pre-launch period and who has steadied the course ever since. Prior to becoming Galaxy Macau’s first ‘Seattleite,’ as it were, Tsai served as the CEO and business director for such companies as Inspirasian, with over 15 years of marketing acumen in the Asia-Pacific region. She has been a seasoned adviser for international firms such as Hotels.com and Expedia.com. She holds a degree in economics from Whitman College in Washington State. Speaking of Galaxy Macau’s success, Tsai says, “It does not happen overnight to open a resort of this scale. It needs the right investment, vision and great timing. In terms of timing, it had to be right for us. The gaming climate had to evolve to right level of diversification before we were ready to open. If we had opened any earlier than we did, it would have 98 HONG KONG BUSINESS ANNUAL 2013 been premature. Once the central government and the Macau government became active in promoting diversification, we knew that our opening time was right.” She continues, “When you have a market that is this saturated for gaming and tourism, in this densely packed city, it really does take vision and a product to be unique. So to hear Francis Lui talk about his vision is inspiring. It shows a level of insight into this region that is really special for this Southeast Asian-inspired resort. Mr Lui’s vision to bring the very best in an Asian resort experience to Macau and nearer to our core customers from China was very astute. Going further, Tsai explains, “This vision extends to the service provided by our staff through our ‘World Class, Asian Heart’ Philosophy. There’s a global awareness that Asian hospitality is of the highest standard. So what then becomes a challenge for any country in a region that has such high standards, is how do you stand out? With our ‘World Class, Asian Heart’ service philosophy, we deliver five star hospitality from the heart with sincerity. That’s the differentiator which we reinforce in our training, with our relationships with vendors and our employees, everything is done with sincerity.” This might explain why the company won three awards this year from the Asia Hotel Awards in Shanghai. The StarWorld Macau (opened in 2006) won the “Annual Best Hotel Service” award, whilst Galaxy Macau took home the prize for “Best Integrated Resort of Asia”. Overall, Galaxy Entertainment Group founder and chairman Dr. Lui Leading Integrated Resorts This page clock-wise: Aerial view of Galaxy Macau; Grand Cotai Suite bedroom, Banyan Tree Macau; Wavepool at Galaxy Macau; Macallan Whisky Bar & Lounge Opposite page: Jane Tsai, Vice President Marketing & Communications of Galaxy Macau FAST FACTS • Galaxy Entertainment Group launched their StarWorld resort in 2006 and launched Galaxy Macau in May 2011. This year it won three cherished prizes from the Asia Hotel Awards in Shanghai. The company plans to open two new hotels under the Ritz Carlton and Marriott names with 1,300 rooms by 2015. Chee Woo received the “Outstanding Achievement of the Year Award”, making it the first time a single hotel group has been awarded all three awards. A latest example of this high level of service and standards is their new UA Galaxy Cinema. Tsai says, “For the recent 100-year Titanic anniversary movie, we had the highest grossing volume in the region, meaning Hong Kong and South China. It was pretty cool. What’s more interesting is that the theatre showed that we are filling a need not just for guests but for the local community. Before then, we were challenged for choice with few local cinemas. For first release films, people were hopping on a ferry over to Hong Kong. Now we have a ninescreen cineplex that can seat 1,000 people. In the Director’s Club, you get the full lazy-boy experience with your feet reclined, and a call button for service. We recently used the venues for public speaking events. Some incentive groups bring in whole teams to watch a movie. We’ve even had lectures from the University of Macau.” For the future, Tsai is excited to watch the property grow as Macau develops. An example of this growth will be the opening of the light-rail in the next few years. Tsai says, “The new light rail will have its first stop in Cotai right outside our east entrance. They’ve started on the construction, which is key, as the light rail will alleviate a lot of traffic congestion in Macau.” And towards 2015 Galaxy will also open up their sizable phase two landbank. In the meantime, Tsai adds, “It’s a rare opportunity to build a resort like this in terms of brand strategy, the messaging, the positioning of the company, everything.” You could say this Seattleite is certainly on the right orbit in this Galaxy. HONG KONG BUSINESS ANNUAL 2013 99 GODIVA PHILOSOPHY For nearly 85 years, Godiva has created the world’s most elegant, hand-crafted chocolate to please and delight customers, from royalty to workers, adults and children. Only the finest quality Belgian chocolate is used, along with high-quality ingredients for fillings and decorations. Godiva owns and operates all its own shops to preserve its tradition of providing the finest chocolates in varieties appropriate to global countries and cultures. The company strives to be a business whose goal is customer satisfaction and delight. 100 HONG KONG BUSINESS ANNUAL 2013 chocolates that seduce the palate and captivate the eyes make for much more than just sweet treats G ODIVA’s history began more than 85 years ago in Brussels, Belgium when master chocolatier Joseph Draps founded a chocolate company named in honor of the legendary Lady GODIVA. According to legend, in 1057, the people of Coventry were suffering from extremely heavy taxes imposed by their lord, Leofric the Dane. Leofric’s sympathetic wife, Lady GODIVA, was determined to convince him to reduce the taxes, while Leofric believed her shameless to plead for the unworthy serfs. Lady GODIVA responded by saying he would discover how honorable the serfs were and struck a deal: Lady GODIVA would ride unclothed through the streets of the city, “clad in naught but my long tresses,” and if the citizens of Coventry remained inside shuttered buildings and did not peek at her, their tax burden would be lifted. The following morning she made her famous ride and the citizens of Coventry graciously stayed inside to spare Lady GODIVA any feelings of shame. Leofric kept his word and reduced the grateful people’s taxes. Today, in Europe, Lady GODIVA is celebrated in countless works of art, including tapestries, paintings, sculptures and literature. Anyone who has seen a bitter and rustic cocoa in the raw will agree that it looks like nothing more than an ordinary bean. But with imagination and incredible gastronomic talents of a cocoa confectioner, they turn from ordinary seeds into extraordinary morsels packed with excitement and surprise. With incredibly creative flavours, the modern-day luxury candy has become as much as a gourmet treat as it is a lifestyle essential. Coming in tantalizing shapes and beautifully packaged, each cocoa creation delights the taste buds and teases the senses. Walking pass the shop front of GODIVA, it is hard not to be captivated by its vast selection and colourful designs. Resisting one of GODIVA’s chocolate treats is nearly impossible. Shoppers may not know what exactly it is about the chocolatier’s creations that are so irresistible, but the brand’s Regional Connoisseur Master, Mr. Wong Yim Yin, knows the secret to the brand’s appeal. “To surprise and delight our clients, we are always creative with our chocolates. Each season, our team in Belgium and the US will design and create different flavours through their research from around the world. We want to put different cultural inspirations in our chocolates,” Wong explains. Products such as chocolate mooncakes are the perfect example of catering to the needs of a specific region. These special flavours are sampled Premium Chocolatier This page clock-wise: Mr Chris Choi, Sales Operations Director; GODIVA 2013 Limited Edition Chinese New Year Collection Opposite page: GODIVA Flagship store located at IFC mall, Hong Kong FAST FACTS and critiqued by in-house master chocolatier Thierry Muret before they reach the palates of consumers. “Thierry Muret will decide if the flavours are appropriate for a specific occasion. Chocolate mooncakes are not just pieces of chocolate, they need to convey the sentiments of the Mid-Autumn Festival,” says the ambassador. Almost as important as flavour, packaging is also a big part of GODIVA’s delectable brand image. Colourful boxes and beautifully wrapped hampers and baskets will instantly remind shoppers of the joy that comes with each holiday. “We want our customers to be visually stimulated as well. Pieces of chocolate will be decorated to match the holiday mood.” But as the ambassador explains, the best way to understand what flavours will appeal to customers is to ask them. And to maintain a good relationship with chocolate lovers is an important aspect of GODIVA’s success. The brand’s Sales Operations Director, Mr Chris Choi, encourages the shop front staff to sample chocolates and to take note of customer feedback. “Every time we have a new product, we provide clear guidelines to our staff about each chocolate and we encourage customers to sample them,” says Choi. Through understanding the products, Choi believes the staff will be better able to cater to the specific tastes of each client. “Even with our most experienced sales representatives, we are constantly training and educating them with new knowledge about chocolate. This helps refresh their knowledge as well as give them the opportunity to taste new chocolates,” he explains. When the brand brainstorms new ideas for seasonal and new flavours, headquarters often turn to local shop staff for ideas. “This is because they know best what our customers like and dislike. We often discuss this information and put them to use when developing new chocolates,” says Choi. The brand also changed the culture of holiday gift-giving in the city. While the Chinese culture is all about traditions, GODIVA has been able to change the mindset of gift giver; many now turn to chocolate treats for even the most traditional of Chinese holidays. Hampers filled with cocoa goodies like chocolates, cocoa drinks, biscuits and even chocolate dipped fruits make for impressive and delicious gifts for Chinese New Year, Mid Autumn Festival as well as western holidays like Christmas and Valentine’s Day. “We create a sense of joy through our chocolates. They are emotional creations that will add to the festive spirit of any holiday,” says Wong. Indeed, the exceptional creativity and cultural inspirations make GODIVA’s chocolate treats so irresistible. And with GODIVA committing to bring out the best creations each year, we have yet to experience more delectable and more exquisite flavors in the years to come. • With exquisite taste, premium quality, seasonal packaging, exclusive boutiques and innovative products, GODIVA Chocolatier is dedicated to over 85 years of excellence and innovation in the Belgian tradition. • Recognized around the world as the leader in premium chocolates, we bring the most ultimate chocolate experience and emotional appeal of gifting to chocolate lovers worldwide. • GODIVA Chocolatier produces many different chocolate pieces that fall into different categories and are often mixed and matched to create a wide range of collections for personal, sharing, holiday and special occasion use. HONG KONG BUSINESS ANNUAL 2013 101 HÄSTENS PHILOSOPHY I have the strong belief that quality sleep is important to people’s health, and I realise that when I introduce a best quality bed like Hästens to people in Hong Kong is bringing them a good health and a better life. I really have no doubt to take up this mission. Hästens has 160 years history manufacturing beds in Sweden; all beds are handmade with 100% natural material which means zero damage to the human body. Hästens’ commitment makes me and my team work harder to tell people why a quality deep sleep means so much to them. 102 HONG KONG BUSINESS ANNUAL 2013 The value of deep sleep- a better morning and a better life A nyone who’s been bed ridden from a cold or forced to stay away from sports because of a strained back will know that you cannot put a price on health. We don’t think about the pleasures we get from having the freedom to engage in activities we love or spending time with those important to us. All of these things will become impossible if our health fails us. Often we realise this when it is too late and are met with the harsh reality that even the greatest wealth in this world will not bring our health back. So what is the price of health? Maybe it’s spending big dollars on health foods or putting a personal trainer on payroll. But few of us take the time to consider the quality of the place we one third of our lives - our beds. Scientific studies has proven that deep sleep for six to eight hours each night will significantly improve not only your health, but help you tackle each day with a refreshed jolt of energy. And as Andrew Wong, executive director of luxury bedding brand Hästens Hong Kong explains, many people may not even realise they are not getting the full benefits of their nightly sleep. “When we achieve success at work, we often reward ourselves with an expensive car or a nice meal. But these are not things that will ultimately give us a good quality of life,” he explains. And with the prices of luxury real estate hitting new heights, people are looking for equally luxurious accessories to go into their homes. But Hästens’ high-end beds are all about quality and comfort, and those who are investing in one of its wool and horsehair beds are getting more than just a name brand. “Each of our beds is hand made in Sweden out of all-natural materials. The wool offers insulation while the horsehair ensures proper ventilation and prevents excessive sweating.” Previously a name that is exclusively familiar in Europe, Hästens is bringing its quality bedroom essentials and its passion for quality rest to Asia in recent years. With a new showroom in Causeway Bay, the brand is capturing the attention of the healthy savvy bunch. “We are educating our customers about the importance of deep sleep. After they have an understanding about how our beds will help them sleep better, they will also understand that they are expensive for a reason,” says Wong. Wong and his team understands that their brand provides an extremely niche product and he couldn’t be happier about the small but targeted audience they are attracting. “We are comfortable to be a niche product because at our price range and quality, we have very few competitors. And even among other luxury brands, we are strongly confident that our products are of the highest quality.” And just exactly how do you convince someone to spend tens of thousands of dollars on a bed. “A lot of our customers come to us through recommendations Luxurious Bedding This page clock-wise: Hästens Store Hong Kong at Lee Garden Hub; Hästens bed model 2000T II; Hästens bed model Vividus; (bottom): Jan Ryde with Michelle Reis celebrating Hästens HK Store Opening Opposite page: Andrew Wong, executive director of Hästens Hong Kong FAST FACTS • Hästens ("Hast" is Swedish for horse) history is the backbone of the company. The brand was founded in 1852, is Sweden's oldest manufacturer of beds and began by primarily making saddles. • The saddle makers of Hästens initially manufactured beds only on demand, which then increased at a rate that making beds over time became the main business for the company. • In the late 1980's, Jan Ryde, the present owner took over the reins at Hästens and thus became the fifth generation to run the privately owned family company. • Hästens bed as the Purveyor to the Royal Court of Sweden, has a 25 years guaranteed against spring and frame breakage. • Today, Hästens has 234 stores all over the world, and Asia is one of the fast growing places for introducing good health from Hästens bed's quality deep sleep. from friends and family. And when they are here, we invite them to try our beds. We have a room in our showroom reserved exclusively for our clients to rest and try a Hästens bed for themselves.” With support from the brand’s Swedish headquarters, Wong and his team helps to build Hong Kong as the Asian hub for Hästens beds. Following the new showroom in Causeway, the brand is looking to set to more locations around the city. Along with that, the growth for the brand is especially impressive in Mainland China. “We have new shops opening every month. In the past year alone, we’ve opened 10 showrooms in China. The demand for luxury goods in China is high and we fill a gap in the market for high-end bedding in the country.” A huge part of Wong’s job, besides helping customers find the right bed, is education. Hästens hope to share with shoppers the scientific research evidence on the importance of sleep and finding on the benefits of a great bed. “When you are comfortable in your sleep, you don’t move around at all. And when you are completely still, it is when you can really fall into a deep, rejuvenating sleep.” HONG KONG BUSINESS ANNUAL 2013 103 Hong Kong Matchmakers PHILOSOPHY • There is no relationship without repeat dates, there are no repeat dates if the first date did not go well, and if the first date didn’t go well, you bear 50% of the responsibility. So do try very, very hard to make your first date, & subsequent dates wonderful. • Instead of counting differences, learn to count similarities • Instead of counting faults, learn to count merits • Remember you are looking for a “husband” and not a “boyfriend” • Seek what you need and not what you want • Nobody is perfect, not even you 104 HONG KONG BUSINESS ANNUAL 2013 “Finally here is someone who has put some class in the business of matchmaking –” P erhaps it is not in our culture to openly admit our emotional needs, articulate our feelings and seek help… perhaps invincible people like ourselves cannot be vulnerable… or perhaps some charlatans have been giving the business a bad name … Whatever the reasons and for the longest time, the word “matchmaker” has always been associated with negative connotations in Hong Kong. Eyebrows would be raised by sheer mentioning of the word just as animated discussions would drop to whispers, even those who secretly yearn for services would deny it in public and feign disdain. Then amidst those who snicker and sneer, she came along and dares to make matchmaking respectable. Celebrity matchmaker Mei Ling Ng Liu is the founder and Managing Director of Hong Kong Matchmakers. Speaking five languages, Mei Ling has had an exciting career across three continents prior to matchmaking - she was a university lecturer, a senior corporate executive and a successful entrepreneur. In 2007, she sold her business and in semi –retirement, decided she would champion the cause of Hong Kong women who for years, have been suffering the unfair disadvantages caused by gender imbalance. Mei Ling attended, and was certified by the Matchmaking Institute of New York, the rest is history. After she published her book How To Find A Husband (distributed by Bookazine), the immediate fan who rushed to include her in a documentary was Première Paris, the French TV show aired during prime time and won instant accolade . CNN & TVB Pearl followed, and finally TVB Jade included her in a 10 x episode reality show Brides Wannabe (initially named “How To Find A Husband”) which took Hong Kong by storm and made Mei Ling a star. The show smashed all rating records in Hong Kong, China, S.E. Asia and North America. The euphoria went on for months, albeit not everybody in the show was lucky, in fact many faced harsh and unfair criticism both from the public and from the media, a few even had to skip town. Somehow, Mei Ling was the only person who came out of all these unscathed. She is well loved and deeply respected by the general public for her refreshing candor and no-nonsense approach to relationships, and continues to command a huge following. Today, not only is Hong Kong Matchmakers the largest , the most prestigious and the most successful company in this business in Hong Kong, Mei Ling is also a reputable author, a radio show host, a popular columnist for the HK Economic Times’ ETNET and a frequent guest speaker at major events. There are many dating services and matchmakers in Hong Kong before you, so what makes you different ? “ We don’t try to be everything to Matchmaking Services Photos: Mei Ling Ng Liu, seen at her beautiful home; Mei Ling together with famous TVB comedian Yuen Siu Cheung who imitated her. everybody, we focus on one small segment of the market only, give it all we’ve got, do it properly and do it well. ” replied Mei Ling. The Client Hong Kong Matchmakers specializes primarily in the market of mature professionals, entrepreneurs and senior executives in the higher income group. They only accept legally single university graduates who have passed their mandatory Background Check and personal interview with their Consultants. The Consultant To be a Consultant in Hong Kong Matchmakers, the minimum criteria include two university degrees, prior experience in senior executive level, tech savvy, a people person, good communication skills, strong in networking, 50 years old or above, and herself happily married for a minimum of ten years. Matching Asked about the men/women ratio in her database, Mei Ling said proudly they maintain a constant balance of 50/50 – not by luck, but by sheer hard work. For instance, when the balance began to tilt earlier this year, they posted a notice in their website immediately, suspending all registrations from women, while remaining open to men. Apart from HK, their overseas offices are constantly promoting registrations from men from all over the world, very especially HK Chinese men who work and reside outside Hong Kong. Supporting Services The primary agenda is matching of course, but apart from which there is a dazzling, impressive menu of some 50 different kinds of supporting services available, the extent of coverage varies according to the level of the Plans. These include all things imaginable, from make up, hair styling, photography, personal trainer, image consultation, date coaching, counseling to wine appreciation, geography, history, specific sports, cooking, sex education…you name it. Assuming a lady would fall in love with a German from Munich, not only will she learn in the shortest period of time that the Bavarian clock ticks anticlockwise, she will also learn key German phrases, how to eat white sausage with sweet mustard and wash it all down with a stone mug of Loewenbraeu… such is the extent of their service. Finally, a question that most of us have been itching to ask: why would a decent, successful, eligible bachelor come to you for help? The same reason why he goes to a headhunter, a real estate agent or a travel agent. He can certainly do everything himself, but agents are specialists, more efficient, saves him time and hassle. We do it full time, professionally and on purpose, sure beats him doing it part time, half heartedly, by chance. In Hong Kong, if you are a party animal, a young & sociable hunk, you could make a hundred friends a month, but not everybody is that gregarious or hunky for that matter. Frequent travels plus long working hours make things even more difficult. Where else would you go to meet an entire group of vetted, like minded potential candidates all wanting the same thing you do without ulterior motives? What advice would you give women seriously looking for husbands? I would say remember the four “A’s” – Age, Appearance, Aptitude and Attitude. AGE – 90% of Hong Kong men are hypersensitive to the numerical age of women. For ladies over 35, it certainly helps to maintain a young mind and a youthful, positive attitude towards life. APPEARANCE – Beauty may only be skin deep, but if he is not already attracted by the cover, he is not going to read the book. APTITUDE – Many “ educated & successful” women are only experts in one field, otherwise boring, ignorant & sometimes even stupid about everything else. Learn to be interested to be interesting. ATTITUDE – Ditch your princess attitude and foul temper or he’ll ditch you. If you are serious about finding a life partner, get off your high horses, stop fantasizing and learn how to give in order to get. FAST FACTS The following findings have been calculated based on a combination of government statistics, 2010 census, the actual computer analysis of our huge database over the past 5 years and the laws of average: • Total population of HK = 7 million • Total tax payers in HK = 1.2 million • Male tax payers = 63% = 756,000 • Single male tax payers = 32%= 241,920 • Male tax payers above age 35 = 61% = 147,571.2 • Ditto earning above HK$500,000p.a. = 29% = 42,795.6 • Ditto ethnic Chinese = 92% = 39,371.9 • Ditto still without girlfriends = 46% = 18,111.1 • Ditto seriously wanting to get married = 50% = 9,055.5 • Ditto and non smokers = 78% = 7063.3 • With human decency & right core values = 35% =2,472.2 • With good communication skills = 25% = 618 • With compatibility & common interests = 40% = 247 • With reasonable appearance = 50% = 123.6 • Divided by 18 districts in HK = 6.87 • Possibility of chance encounter for the sociable = 25% = 1.7 So ladies, if you are sociable & seeking men with the above criteria, there should be 1.7 men in your district. More if you lower your requirements and less if you increase your demands. HONG KONG BUSINESS ANNUAL 2013 105 HSBC Insurance PHILOSOPHY HSBC is committed to connecting our customers to opportunities that help protect and grow their wealth across every life stage and ambition. HSBC builds on the Group’s international and business connectivity as well as our global wealth capabilities to offer customers with simple, relevant and tailored solutions. HSBC insurance products cater to customers’ wealth needs across various life stages S aving for the golden years remains the principal goal of every one in five persons in Hong Kong. But many are not familiar with retirement products and are unable to save enough for their twilight years. “Those facing this predicament should start early planning of their retirement and savings needs to achieve their long-term financial goals,” Jim Costello, Director and Head of Wealth Insurance, HSBC Insurance said. To fulfill diverse individual wealth needs, HSBC lays out a variety of solutions including annuities, investment-linked insurance and other long-term investments. “The ageing population triggers worries for the majority of Hong Kong people who think they do not have enough time to save sufficiently for retirement. This may explain why there has been an increasing demand for life products, especially annuities.” Considering the growing demand for life insurance, HSBC Insurance grew its new life business by 20 percent compared with the first nine months of 2011, maintaining its leadership with a market share of 23.1 percent. As a market leader in life insurance business, HSBC offers a comprehensive range of insurance solutions to cater to different customer needs. “Our investment-linked products provide a platform for customers to make their own investment choice to capture the potential growth and our traditional 106 HONG KONG BUSINESS ANNUAL 2013 products provide guaranteed returns, which are fit for more conservative customers. In view of ageing population, we also focus on developing post-retirement products, such as our EarlyIncome Annuity Plan, to help customers enjoy a more relaxing retirement life. Moreover, we also focus on developing RMB insurance business to meet customer demands for capturing the growth potential of RMB.” Through HSBC’s integrated bancassurance model, insurance products are manufactured and distributed through an extensive network, under the same brand and one roof. “This allows us to understand customer needs better and offer solutions that meet financial goals of customers. By offering one-stopshop financial services and maintaining long-standing relationships with our customers as their financial services partner, we are in a better position to anticipate their needs and offer solutions most appropriate for them to meet their financial goals.” HSBC Insurance aims to be the customers' trusted partner for the long-term as they protect, grow and create wealth across life stages. Advisers first understand the needs and financial goals of customers, the level of risk they are willing to take and their investment horizon. The focus is on helping customers with wealth needs such as protection for the family, education for their children, retirement, managing and growing wealth and legacy planning. Wealth Insurance This page clock-wise: HSBC Centre; HSBC Main Building Opposite page: Jim Costello, Director and Head of Wealth Insurance, HSBC Insurance interacts with students at an HSBC Insurance sponsorred event; Jim Costello, Director and Head of Wealth Insurance, HSBC Insurance FAST FACTS • HSBC Insurance (Asia-Pacific) Holdings Limited is a wholly owned subsidiary of The Hongkong and Shanghai Banking Corporation Limited, which is in turn owned by HSBC Holdings plc, the London-based holding company of the HSBC Group. • HSBC Insurance is part of HSBC's global Retail Banking and Wealth Management operations, providing a broad range of quality insurance products and services to retail customers. • HSBC Insurance is the largest administrator of retirement schemes in Hong Kong. “Financial solutions, which are suggested based on these broad parameters, underline the fact that life insurance should be a key part of the overall wealth portfolio,” Costello stated. Last but not least, HSBC works to increase the awareness among customers for financial preparedness via educational tools and initiatives to provide practical illustrations for retirement savings. Not long ago, the Bank launched a quiz that awarded a HK$1.28 million worth of retirement solutions, equivalent to two years’ worth of retirement savings, to the grand prize winner. All winners were also eligible for free financial planning sessions with an HSBC financial adviser. HONG KONG BUSINESS ANNUAL 2013 107 M800 LIMITED PHILOSOPHY As an international hub of business communications in Asia, M800 Limited collaborates to help partners and enterprise customers grow without limits. M800 delivers global business opportunities through pioneering technologies M illions of us barely give it a second thought, but hundreds of toll free numbers that we dial to access a diverse array of services ranging from checking exclusive offers at an international luxury hotel chain operating in China to seeking quick assistance and information through a call centre, are made possible by M800 Limited, an international hub of business communications. Global voice exchange, reverse charging services, China & international toll-free services and 800 global services, and text-based SMS exchange are four of M800 Limited’s principal services. A unit of the Ganges Group, a well-established investment arm that has been developing advanced communications environments for leading global corporations, M800 Limited, delivers innovative telecommunications and mobile commerce solutions over highly reliable and scalable global infrastructure. Since its founding in 2007, the company has grown rapidly and has also earned recognition from the telecom industry. Among the most recent was being honoured as the Intelligent Telecom Solution Provider by Mediazone Publishing’s flagship publication, ‘Hong Kong’s Most Valuable Companies.’ Also, Red Herring named M800 108 HONG KONG BUSINESS ANNUAL 2013 Limited for the Top 100 Global and Top Asia 100 Award, which salutes leading private companies in Asia. China Unicom recognised M800 Limited as one of the best product service providers in the China Unicom Great Wall Awards. Chief Executive Steven Yap says the company is preparing for further growth as he shows us the vast floor space below his offices, acquired to house additional staff, specialising in different disciplines including apps developers and programmers. For research and development, the company is committing 25% of its annual earnings. His confidence in the future growth potential of the company is founded on the proliferation of connected devices, especially smart phones and tablets. For the millions who linger for hours thumbing their smart phones as they peek in and out of the social media universe. M800 Limited provides the infrastructure and technologies to support the development of the mobile app, created for one of its partners. Some of its key features take into account the future needs of mobile users connected to the internet. For professionals such as bankers and securities or even bullion brokers, this app, could be of immense value, he says. More importantly, the app is also meant for Intelligent Telecom Solutions Provider This page clock-wise: M800 Limited Tell the World. Grow Your Business campaign; Mr. Steven Yap Opposite page: Steven Yap, Chief Executive Officer of M800 Limited FAST FACTS • Founded in 2007 by the Ganges Group • Builds international bridges of communication that span telecommunications, internet applications, and mobile e-commerce • Best Product Innovations Award presented by China Unicom • Honoured as the Top Asia 100 Award by Red Herring • Honoured as the Top Global 100 Award by Red Herring businesses that market various apps to smart phone users, and for co-branded and hosted apps on the cloud. Mr Yap also points out that the app is an open platform that can be leveraged by third party developers to create voice applications of high definition. Mr Yap notes that one day, gaming, too, will be possible through the app, and that for enterprise customers, it “can facilitate encrypted messages.” This cross-platform mobile communications app that connects users through 3G as well as Wi-Fi networks, perfectly illustrates how M800 Limited is shaping its future and that of smart phone users. The company’s commitment is made possible by four key features: Location Based, Authentication, Identification, and Security. These strengths combined with outstanding telecommunications infrastructure and pioneering in-house technologies, allow M800 Limited to excel in data mining as well, so vital to corporations operating in any sector. Mr Yap also adds that for M800 Limited, the voice business remains important. The company serves voice customers through international partners and in mainland China through the country’s leading telcos. Its clients include corporations operating airlines and tourism ventures, banking and finance, conferencing and call centres, delivery and logistics. M800 Limited has been building hundreds of session Border Controllers globally, as well as setting up SMS gateways, and switches. This gives the IP network boards secure carrier class, an advanced-level of functionality, flexibility and performance and which is enhanced by our real time monitoring system and intelligent routing system. As a global hub of business communications, Hong Kong-based M800 Limited will continue to remain relevant to enterprises, delivering groundbreaking telecommunications and mobile commerce solutions over a reliable international infrastructure. HONG KONG BUSINESS ANNUAL 2013 109 SHAMA MANAGEMENT LTD. PHILOSOPHY Shama’s philosophy is to offer serviced apartments that epitomize comfort, style and luxury. Guests experience a warm welcome from staff that personalise the living experience with their professional ethos. Shama is a fusion of boutique and function with modern décor, and an emphasis on clean, simple, contemporary furnishings with a seamless blend of comfort and technology. 110 HONG KONG BUSINESS ANNUAL 2013 Shama serviced apartments fuse luxury lifestyle with a warm, personal touch G uests who lay down their travel bags at Shama’s stylish serviced apartments, having inhaled the energy in the city for the first time, should not have to wonder about wandering in the neighbourhood to figure out the locality, or labour to find things they need most. They can find answers to their long list of inquiries within the walls of the apartments themselves. So the morning after the check-in search for a place to hit the treadmill should be considered done. Friday evening and the expat could be searching for an opportunity to socialise. The weekend is at hand and that is just the opportunity to sharpen up the backswing and improve clubhead speed in preparation for a round of golf. Parents are visiting and the guest needs to book an out-of-the-ordinary choice for dinner. For all this and then some, Shama is prepared to point guests in the right direction for services under its ‘no boundaries’ lifestyle proposition. The service also allows long-term tenants the privilege of access to private clubs such as the KEE Club where invitee-only occasions are a regular occurrence. Shama’s relationship with the KEE Club has endured a decade. Shama, which means tranquility in Sanskrit, stands out from the crowd with this personalised service, which complements the style and luxury the serviced apartments promise. “We like to fast-track the social lives of our tenants,’’ says Elaine Young, who launched the first boutique serviced apartments with 20 units on Elgin Street in SoHo in 1996. She points out that activities arranged for tenants and those that are brought within their reach, foster a sense of belonging during their stay in Hong Kong. Young adds that insider knowledge of the neighbourhood, such as the chief executive’s favourite restaurant, shared with Shama’s tenants, make their life in Hong Kong a pleasure. “Most tenants are corporates. We know what they like,’’ says Young. Young, who admits being passionate about the hospitality sector, says she also loves interior design and takes great satisfaction in being able to source materials such as fabrics and fixtures. Locations of Shama properties are chosen after extensive research. The fact that properties are in the heart of a city’s prime commercial and/or residential district, allow residents numerous advantages – be it the convenient transport links, proximity to cultural and entertainment venues, or the easy access to essential amenities, such as grocery stores and laundry services. The Shama brand came into being in 2001. In 2002, the flagship Shama Causeway Bay with 110 Serviced Apartment This page clock-wise: Every Shama property is located in the heart of a city’s prime district; Shama Luxe at Xintiandi, the first Shama property in China; Shama brings tenants comfort, style and luxury. Opposite page: Elaine Young, Executive Director, ONYX Hospitality Group FAST FACTS • In 1996 Elaine Young introduces the first boutique serviced apartments with 20 units on Elgin Street in the Soho district of Hong Kong (Property sold in 1997) • Shama brand established in 2001 • First property in China opens in 2007 under the new premier tier Shama Luxe • ONYX Hospitality Group acquires Shama in 2010 • Shama celebrates 10th Anniversary in 2011 individual apartments was established. In 2007, Shama made the leap into mainland China with the opening of the first property Shama Luxe, positioned at the premier level. Located in Xintiandi Shanghai, it provides 100 apartments. Two years ago, the luxury boutique serviced apartment portfolio Young built up with her partners, was acquired by ONYX Hospitality Group, a leading Asian hotel management company based in Thailand. The ONYX portfolio of four brands Saffron, Shama, Amari and OZO, continues to evolve with more assets being added in Hong Kong and beyond its shores, including as far as Sri Lanka and Qatar, where in-bound visitor numbers are rising at doubledigit rates. Shama’s footprint is growing in mainland China with management contract signed for a new development in Hangzhou in Zhejiang Province Shama HEDA Hangzhou is to open in 2013 providing 101 luxuriously appointed one and two bedroom units and it will mainly cater to business travellers. The property features a fully equipped business centre and swimming pool. Other facilities include a children’s play area and tenants lounge. Shama has now built up a portfolio of a dozen luxury boutique apartments in Hong Kong, Bangkok, Dalian and Shanghai. • BANGKOK Shama Sukhumvit Bangkok • DALIAN Shama Luxe Grand Central Dalian • HONG KONG Shama Causeway Bay Shama Central Shama Fortress Hill Shama Hollywood Shama Midlevels Shama Tsim Sha Tsui • SHANGHAI Shama Luxe at Xintiandi Shama Luxe Huashan Shama Century Park Shama Xujiahui • HANGZHOU Shama HEDA (opening soon in 2013) HONG KONG BUSINESS ANNUAL 2013 111 RHOMBUS INTERNATIONAL HOTELS GROUP PHILOSOPHY To be one of the premier hospitality services providers, operating properties in major international cities and key destinations within Asia and Europe. Rhombus’ portfolio consists of quality products which exceed the expectations and needs of its 3 key stakeholders: Owners/Investors, Guests and Employees. Rhombus cares and is committed to continuously delivering excellence combined with versatile services and products to its Owners/ Investors and Guests while providing vast opportunities to its Employees 112 HONG KONG BUSINESS ANNUAL 2013 SERVING IT RIGHT WITH AN INTERNATIONAL PERSPECTIVE R unning a successful hotel, according to Founder & CEO of Rhombus International Hotels Group Calvin Mak, is much more than satisfying your guests during their stays - a great deal of it has to do with scouting the right talent for the right task. As the Rhombus Group expands its operation into more destinations in the coming years, Mak thinks it is important to ensure the staff grow at the same pace as the group. Rhombus Group is slated to launch a handful of new properties in the coming months. These include two hotels in Causeway Bay Hong Kong , a 300-room hotel only five minutes away from London’s Heathrow Airport and a hotel in Xiamen, China. Mak describes the Rhombus Group as a professional hotelier, catering to all aspects of hospitality business but not only limited to operating a hotel. “Any project we touch turns into gold, we partner with investors to ensure the best return of their investment by providing them with an international team of highly professional staff who are ready to serve.” Hard work, according to Mak, is what the group’s reputation built on and it is this reputation that attracts investors to partner with Rhombus Group. “We have a great track record of 95% occupancy rate all year round in Hong Kong, even during the financial down turn in 2007 and 2008.” Mak says their good reputation has given them the freedom to choose which projects they associate themselves with. “We are not out there seeking to secure contracts. Investors are coming to us, wanting to work with us and partner with our group.” Surfing market trends The Founder & CEO, who came to the city eight years ago from Vancouver and built up Hong Kong’s arm of the group, believes their ability to expand steadily at a fast pace is because they have a team of highly capable staff. They are able to gauge and plan their development strategy according to market trends. “The financial issues in Europe and North America along with the recent war in the Middle East and the territorial dispute between Japan and China are all global factors that posted challenges for us in the past couple of years, however our team reacted promptly and we are still able to have a very good return for all our owners and investors.” Mak says. His strategy for dealing with these global issues is to run all properties as an international hotel. What that means, he explains, is not to rely on a single targeted market of travellers and always look out for travel trends.“ US corporate travellers used to be the top segment for Hong Kong hotels. Now it’s the second or third, and we’ve seen slowing down in the last eight months in the number of Japanese travellers.” Offering its services to a diverse set of guests means Rhombus Group is able to take advantage of other segments that are on the rise to pick up on the slack. “Our mother country is providing us with a tourism Leading Hospitality & Hotel Management This page clock-wise: Lobby of Hotel Panorama by Rhombus; Lobby of Hotel LKF by Rhombus; Guestroom of Hotel Pennington by Rhombus; Guestroom of Hotel de EDGE by Rhombus; Guestroom of Hotel Bonaparte by Rhombus; Swimming Pool of Rhombus Fantasia Chengdu Hotel; Awardwinning Spa Verta at Hotel Verta by Rhombus Opposite page: Calvin Mak, Founder & CEO of Rhombus International Hotels Group FAST FACTS • Named ‘Leading Hotel Management’ by Hong Kong Business High-Flyers Awards 2011 • Named ‘Hong Kong’s Most Valuable Company 2011’ by Mediazone Group • Named ‘Most Progressive Hotel Group of the Year’ at the Asia Hotel Forum 2011 • One of the ‘Best Choice International Hotel Management Company for Investors’ at the 11th China Hotel Forum 2010-2011 push by allowing 14 provinces to travel outside of China to Hong Kong. This is one of the great benefits of being the gateway of China.” Strategic star ratings Another strategy that goes hand in hand with the expansion of the group is to strategically managing hotels with different ratings in one area. This can capitalise the traffic of travellers with different budgets and needs in a particular neighbourhood. “For instance, we have a three, four and five star hotel on Hong Kong Island. This strategy is nothing new but it’s certainly been on the raise in recent years. We are developing our new properties with this concept in mind.” But being able to spot all these trends has as much to do with market and industry knowledge as it does with surrounding himself with the right staff. Being the recipient of the Leading Management Award, Mak shares his thoughts on managing staff in an industry where providing top-notch service is a top priority. “The key to building a great team is all about care. Most of the times, staff do not know their own potential and it is the management’s job to tell and show them what they are capable of,” he says. To do this, Mak says it is crucial to select the right person for the right job. “Our industry requires individuals who are ready to serve. If you’re shy and would rather hide behind a desk, this is not the job for you.” “Rhombus Group is keen to provide staff with career development opportunities to grow and to experience which money cannot buy “For instance, we always encourage our staff to try new dishes on the menu. How can we recommend a dish to our guests if we don’t even know how it tastes like,” Mak says. Mak always encourages the staff to see and experience more; he believes this is the key to building a great hotel that can serve international travellers. “The more we know about their cultures and behaviours, the better we can provide service that suits their needs.” HONG KONG BUSINESS ANNUAL 2013 113 Standard Chartered Bank (Hong Kong) Limited PHILOSOPHY In consumer banking, we are committed to become a customer-focused organization. Consumer banking in Hong Kong is a dynamic business which targets at both retail and SME segments, offering a wide range of banking products and services. Standard Chartered’s services are provided to different segments, from private banking, priority banking, preferred banking to small and medium sized businesses operating in Hong Kong. The products and services provided include bank accounts, credit cards, personal loans, mortgages, foreign exchange, deposits and wealth management products. Standard Chartered is a major market player in credit cards and is one of the leading card issuers in Hong Kong, focusing on differentiated customer propositions. The bank also maintains a solid market leading position in mortgages, focusing on product innovation, customer services and profitability. 114 HONG KONG BUSINESS ANNUAL 2013 Charting a course for growth Embarking on the Next Wave of Customer Journey S tandard Chartered's performance was particularly strong this year, for multiple reasons. One was their improved online investment capabilities. Mr. Basker Rangachari, Chief Marketing Officer for Hong Kong and Northeast Asia at Standard Chartered Bank, explains that, "We are enabling our customers to live a digital lifestyle and do banking-onthe-go. Our Breeze family of apps puts money management at your fingertips. For example, with Breeze Trade, customers can track the latest stock prices, and capture lucrative investment opportunities anytime anywhere, with NO Minimum Brokerage, NO Trade Lodgment fees and NO Custodial Fees!" Q: What are the best features of this? A: "This unique App has many market-leading features: • Buy and sell Hong Kong stocks with just 3 clicks. • View major market indices, create a personalized list of favorite stocks, access real time market news • Scribble notes on trading ideas to share instantly with friends via SMS or email. • View stock holding and portfolio value at a glance. - Utilize advanced features such as Enhance Limit Order, Market Order, Stop Loss - Modify/cancel orders via Securities hotline and Online Banking. - Get FREE unlimited real time stock quotes without logging in. - Receive free price alerts via email instantly when selected counters reach preset price level or move beyond the preset value." Q: How is your Online Unit Trusts platform progressing? A: "Our Online Unit Trusts trading platform enables Customers to place orders and manage their Unit Trusts online. It is a new channel for customers to self-manage their Unit Trusts investments, on top of having the ability to seek assistance via their Relationship Managers (RM). With this launch, we expect many customers will opt to trade online with unparalleled convenience, whilst engaging their RM’s for value added wealth management services. Using this platform, customers will be able to: • Search for funds in the Fund Super Mart • Subscribe for New / Existing funds • View Holdings, Order status and Transaction History • Switch or Redeem Funds • Exercise Cooling Off for recently purchased funds More research and automated advisory functionality will be added in future to enhance customer experience." Branding Excellence – Branch Façades and Branch TV network Building a strong portfolio also means branching out in unique ways. Q: Tell us more about your branding techniques: A: “To build brand awareness via our branch network, Consumer Banking This page left to right: Breeze Family; Causeway Bay Branch Opposite page: Basker Rangachari, Chief Marketing Officer for Hong Kong and Northeast Asia at Standard Chartered we invested over HK$100 million in 2011 to optimize and retrofit the bank’s branch network. We invested further to enhance our branch exterior infrastructure with dominant, uniquely-designed and branded branch façades at 10 strategically-located branches. Our strategic intent was to uplift our brand awareness in the branch neighborhood and digitize our customer engagement and communication channels." He continues, "We have strategically enhanced our branch façade infrastructure with a huge LED external TV at strategically located branches, including Causeway Bay, Canton Road, Central and Queen’s Road East. This Branch Façade project was subsequently extended to more branches and we now have over 150 in-branch digital LED TV screens, that enable us to provide relevant content and messages to our customers." Rewarding loyal customers with a long term commitment - Revolutionary Securities Trading Marketing Campaign Q: How does your new strategy benefit all parties? A: Standard Chartered Hong Kong Consumer Banking outperformed all major banks in Asia Pacific and Hong Kong by winning 3 coveted awards in The Asian Banker Excellence in Retail Financial Services International Award 2012, including Best Retail Bank in Asia Pacific, Best Retail Bank in Hong Kong, and Best Employee Engagement. To celebrate this record achievement and to thank our loyal customers, we launched a “Best-in-class” securities trading offer, providing up to 5 years of FREE buy stock trades* for customers. In addition to capturing mind share with our target customer segment, this marketing campaign helped deepen our customer relationships." He adds," This revolutionary campaign was widely recognized in the industry, and led us to win 10 awards at the recent Marketing Excellence Awards 2012 organized by Marketing Magazine. In addition to winning awards for “Excellence in Advertising”, “Excellence in Digital Marketing” and many others, we were named as the “Marketer of the Year” for 2012, outperforming many well brands across all industries." Leadership Insights - Global Renminbi Index Q: What else is on the horizon? A: “Further to the launch of Standard Chartered Hong Kong SME Leading Business Index since July 2012, we launched the Standard Chartered Renminbi Globalisation Index (RGI) – the first industry benchmark that effectively tracks the progress of Renminbi-based business activity worldwide - in Nov 2012." Q: What does the Index offer? A: "The Index, released on a monthly basis, offers corporates and investors a quantifiable view of the latest trends, size and levels of offshore activity that are driving the adoption of Renminbi (RMB) as an international reserve currency. To complement the Index, Standard Chartered announced the results of its first quarterly Offshore Renminbi Corporate Survey, wherein companies across Asia and Europe shared their motivations and expressed a strong appetite for using RMB offshore in the next six months. Going forward, the survey will provide a qualitative indicator to forecast the direction of the market." "The Index covers three markets which dominate the offshore RMB business: Hong Kong, London, and Singapore. It measures business growth in four key areas: deposits (denoting store of wealth), Dim Sum bonds and Certificate of Deposits (as vehicles for capital raising), trade settlement and other international payments (unit of international commerce) and foreign exchange (unit of exchange). As RMB internationalises, there is capacity to include additional parameters and markets, aligning the Index with future development." FAST FACTS • Standard Chartered Bank (Hong Kong) Limited (SCBHK) has played a key role in establishing Hong Kong as a global financial centre. • Listed in Hong Kong since 2002, Standard Chartered is headquartered in London. • Standard Chartered’s history in Hong Kong dates back to 1859. In 1862, Standard Chartered started to issue banknotes in Hong Kong and is acknowledged as the oldest noteissuing bank in Hong Kong. Footnote: (* Subject to terms and conditions. Customer must be a Priority Banking customer and deposit no less than HK$1,000,000 new funds; or sign up for the Salary BonusPack Basic Services and deposit a monthly amount of HK$80,000 or above via auto-payroll services to enjoy 5-year BUY Securities Brokerage Fee Waiver. Priority Banking or Preferred Banking customer, who signs up for the Salary BonusPack Basic Services and deposit a monthly salary amount of HK$20,000 or above via auto-payroll services, can enjoy 3-year BUY Securities Brokerage Fee Waiver. Promotional campaigns ends on 31 Dec 2012. Offer is applicable to buy securities transactions submitted over Online Banking and Breeze Trade only and is subject to relevant terms and conditions.) HONG KONG BUSINESS ANNUAL 2013 115 THE CITYVIEW PHILOSOPHY The Cityview strives to attain higher standards through genuine personal service and attention to detail, including environmental issues. After our conversion into a fourstar hotel in 2008, we have attracted travellers from all over the world, keeping the ‘international’ flavour of our former brand while upgrading the facilities. The high percentage of repeat customers and the number of prestigious awards indicates that the hotel is meeting its objectives satisfactorily. We also treasure our staff, offering continuing training and job monitoring to ensure that staff is working with a profession attitude and to the best of their ability. 116 HONG KONG BUSINESS ANNUAL 2013 The business of being green T he hospitality industry is known for making things happen and going to great lengths to please and serve. Naturally, running a hotel means wastage and magnified consumption. From leftover food at the restaurants to working the washing machines day and night to churn out clean towels and bed sheets, keeping a hotel in top-notch shape requires much more than just a dedicated staff. Hence, environmental consciousness isn’t what hotels are known for. However, this is not necessarily the case at all hotels. Take The Cityview - for the past years, the hotel has been serving business and leisure travellers from around the world, with many from South East Asian executives returning time and again over the years. Conveniently located just minutes from the Yau Ma Tei MTR station, the hotel not only takes into heart the services provided to guests, but is also working to ensure the guest experience is one that is environmentally friendly. The Cityview General Manager Alex Wu and his team dedicated the past year to building the hotel’s reputation and facilities to meet international environmental standards. The hotel has submitted itself to Australian environmental certification EarthCheck; recently earning the Bronze Certificate from the independent organization. Wu hopes his team can work towards achieving the Silver recognition in 2013. “We are the only independent hotel in Hong Kong to achieve this certification from EarthCheck. We are proud of this achievement because we want to be able to give back to the community,” says Wu. Among the many ways the hotel gives back is with its compost program. A compost machine is installed into the hotel premises to process all leftover food items. The compost produces organic fertiliser which The Cityview freely gifts local farming and tree planting initiatives. While as a business decision, the initial cost of implementing a green approach might be high, the benefits reach far beyond that of monetary gains. “We feel that we can connect with travellers and companies with a shared passion for a greener environment,” says Wu. “And through our green movement, we’ve actually been able to attract more clients. There are many international corporations that also take environmental conservation very seriously. These companies will often look for hotels that share the same values; they choose to stay at a hotel that they know are being socially and environmentally responsible.” Aside from expanding its plans for an even greener property, the hotel is also experiencing some physical changes. These are also initiatives to create a more corporate image—a direction in which the hotel hopes to take in the coming years. The Cityview will be expanding its business appeal through creating an atmosphere that better suits the needs of business travellers. The Executive Wing will be expanded to include nine new rooms, each dedicated to comfort and conducting business. The entire Premier Wing, which will be home to the new executive suite, will be renovated to bring rooms a more modern and stylish appeal. This overhaul will breathe new life into the 156 rooms that first BUSINESS HOTEL This page clock-wise: The Cityview’s City Cafe, Crystal Ballroom, Executive Room, and Premier Room Opposite page: Alex Wu,General Manager of The Cityview FAST FACTS • Oct-12 Cordons Bleus 2012 GHM Recommendation Restaurant honoring The Cityview - City Café as Best Hotel Buffet Restaurant. • Oct-12 The environmental performance of The Cityview has been recognised by EarthCheck; the travel and tourism industry’s leading environmental management, benchmarking and certification company. By undertaking benchmarking with EarthCheck, The Cityview has joined other industry leaders who have demonstrated a willingness to take meaningful steps towards resolving some of the very real issues that face the planet. • Jul-12 The Balcony becomes the corporate member of “Commanderie Des Cordons Bleus De France”, a world-class cuisine and cultural organization that recruits and assesses outstanding chefs and gourmets • Jun-12 The Cityview earns 2012 TripAdvisor Certificate of Excellence • Jun-12 City Cafe received recognition of “2012 Most Popular QTS Merchant Award (Online Voting) - Restaurant”, organized by Quality Tourism Services Association welcomed guests in the 80s. This will not only create a more comfortable atmosphere for travellers, but the renovation is a part of the hotel’s strategy to build its competitiveness among business hotels in the same category. “It’s important for us to expand on the business clientele. Compared to leisure travellers, these individuals tend to spend more time and money at the hotel, enjoying breakfast in the morning and booking conference rooms and ballrooms for meetings,” says Wu. Currently, Wu says 30 to 35% of guests fall under the corporate category. The General Manager hopes that upon the completion of the renovations in 2014, business travellers will occupy half of the hotel’s rooms. Welcoming more executive guests mean hotel staff has to be increasingly sensitive towards the needs of different cultures. From language training to catering to the dietary needs of the international traveller, staff will be receiving full support from management. “We want to take into consideration the different skills our staff will need to acquire in order to effectively serve our guests,” says Wu. HONG KONG BUSINESS ANNUAL 2013 117 THE MERCER PHILOSOPHY The hotel business is all about passion and enthusiasm. These are even more vital for boutique hotels. You also need to be creative, flexible and able to multitask. Therefore it is always important to explore, to experience, to think out of the box. We also encourage our staff to participate and experience, to develop a positive attitude when facing challenges. We join Hopewell Bowling Charity League and Tree Planting Challenge of Friends of The Earth together to promote teamwork. “Don’t believe what you see. When you believe it, you’ll see it. This has always been my philosophy” General Manager Rebecca Kwan said. 118 HONG KONG BUSINESS ANNUAL 2013 Boutique sleep in THE city’s charming neighbourhood A nyone who’s tried to book a hotel room for a special occasion or just a mini getaway in the city can tell you that both demand and prices for top hotels in Hong Kong are high. As the city continues to be an important destination for regional and international business, executives and business travelers find themselves scrambling to fight over accommodations with the growing number of travellers. This has not only given rise to a blooming hotel industry, but it’s also created a new demand for extraordinary accommodations. The Mercer’s General Manager Rebecca Kwan, agrees that frequent and seasoned travellers expect not only top-notch service and environment that they have become accustomed to at five-star chain hotels, but they also are on the look out for that little extra something special. “That unique ‘wow factor’ is why travellers have become increasingly drawn to boutique hotels in the past five years,” says the hospitality veteran. Since welcoming guests from around the world a year ago, Mercer has become a welcomed and exceptional addition to the Sheung Wan neighbourhood. “There are so many choices out there for travellers and our neighbourhood offers a unique and hidden side of the city that repeat visitors to the city will find charming,” Kwan explains. “The neighbourhood has plenty to offer yet it is only moments away from the Macau Ferry Terminal and one MTR stop from Central; for business travellers looking for a home away from home, our location offers the perfect balance of convenience and culture,” says Kwan. That unique wow factor also including the spacious room, comfortable beds in The Mercer, even with coffee machine, kitchenette and microwave in One Bedroom Suite. Guests can enjoy complimentary wifi, buffet breakfast, minibar and local calls with free coffee and tea throughout the day. They feel refresh, comfortable, relax and luxury, even wishes to stay longer. Also, on service side, we try to get more details about our guests before their arrival, such as the purpose of their stay and the company or kind of business they’re in. And during their stay, guests are encouraged to communicate directly with Kwan herself through the boutique hotel’s intranet, “Through what we know about them and my interaction with them, we can make better recommendations for restaurants, things to do and sights to see.” Taking into heart the guest experience has also helped the hotel build its customer service. “We proactively ask our guests for feedback and are keen to learn what they like and disliked about their stay with us.” But Kwan says the key to customer service is to not only listen to what guests have to say, but to make constructive changes based on their suggestions. “For instance, we thought our international mix of guests would enjoy a classic Boutique Hotel This page clock-wise: Swimming pool at The Mercer; View of the hotel at night; One bedroom suite at The Mercer Opposite page: Rebecca Kwan, General Manager of The Mercer FAST FACTS • Dorsett Hospitality International (HKEx Stock Code 2266) currently owns and manages 18 hotels in Mainland China, Hong Kong and Malaysia; with 7 more opening within the next 2 years in Mainland China, Hong Kong, Singapore and United Kingdom bringing the total room count to more than 7,000. • There are three brands under Dorsett Hospitality International including d.Collection featuring a series of boutique hotels, including The Mercer; Dorsett Hotels & Resorts comprising upscale Dorsett Grand and mid-scale Dorsett; and value-led Silka Hotels. Continental breakfast. But in fact, many of them told us they prefer local flavours such as dim sum and we have since added more of these classic Cantonese items to our breakfast menu to cater to their needs.” She feels the boutique hotel model fits in perfectly with the old-meets-new, East-meets-West personality of the neighbourhood. “There are many hidden gems in the area, be it art galleries or restaurants.” Adding to the diverse dining scene of Sheung Wan, The Mercer introduces an all-new Japanese restaurant to its premises. But it’s not just any ordinary Japanese restaurant. Sushi Yoshitake is a Michelin 3 Star Restaurant in Japan and just awarded as Michelin 2 Star after its 2 months opening in Hong Kong. In keeping with the boutique hotel’s intimate and exclusive setting, only 14 diners can be served at the bar, where the chef dishes up catches of the day freshly flown in from various parts of Japan daily. Its mysterious Omekase menu, where the chef serves whatever he feels is the best he has to offer on the day, and the exclusivity and privacy the restaurant offers is already generating plenty of buzz among foodies in the city.” Being a boutique hotel in an obscure neighbourhood for travellers, Kwan felt the biggest challenge in the year since the opening is actually bringing guests into the neighbourhood. Few businessmen and travellers are familiar with the area they may have hesitation about Mercer’s pricing, which is comparable to four to five star hotels in the city. “But our rooms are very spacious with everything just on your finger tips. Most rooms are over 500 sq ft are fitted with a kitchen, dining area, living room and a master suite. “Once they step into our hotel, they always end up liking the experience. Repeat visits and positive comments on the Web prove that all it takes is for them to experience our service, facilities and neighbourhood.” “We are very happy to be here at a time where this unique nighbourhood is on the rise and growing.” “Upcoming, we will add in more wow factors to the hotel. We planned to extend the cooperation with the neighbourhood to provide additional benefits for our guests, to enrich their stay, so they can fully immersed in the culture and the area.” Rebecca plans to implement her plan for The Mercer in 2013. HONG KONG BUSINESS ANNUAL 2013 119 THOMAS, MAYER & ASSOCIES PHILOSOPHY Our approach is to focus on making a valuable contribution to the progress of our client’s business. In today’s complex international environment, the most important is to determine client’s problematic and understand his global situation so that a proper strategy is adopted”. THE FRENCH CONNECTION: BRINGING EUROPEAN VENTURES TO THE CITY’S DOORSTEPS J ust as everyone else is scrambling to set up in China to get a piece of the country’s booming economy, French law firm Thomas, Mayer & Associés (“TMA”) finds itself comfortably taking advantage of the legal security and expertise Hong Kong offers to clients doing business in the region. Steadily growing its prescence in Hong Kong since 1995, the firm specializes in providing legal services to French and continental European entrepreneurs looking to explore the Asian market as well as assisting Asian clients hoping to set up in Europe. As Eric Mayer, partner at TMA explains, there’s simply no need to directly venture into China in order to tap into that market. “In fact, our competitive edge lies in the fact that we are based in Hong Kong where we make use of the unique legal, financial and economic advantages offered by the city as a platform where China linked investments can be structured, and in our connections with other firms and professionals in the city and in mainland China, which enables us to handle complex cross border legal issues in clients best interests in a hostile and complex environment” he says. Servicing mainly French clients or those with business links in France, TMA is one of the few, if not the only, firm in the whole of Asia with such a large team of French native lawyers. “All but one 120 HONG KONG BUSINESS ANNUAL 2013 of our Hong Kong based team of twelve lawyers are French,” he says. “Often, French firms in China will only have one or two French lawyers heading a Chinese team. Our advantage is that we have a very good understanding of the French business culture and that enables us to gain the complete trust of our clients.” And the clients that are trusting TMA for legal advice ranges from small exporters to leading French and European groups and manufacturers. “A lot of these clients understand that it is important to establish themselves in China. But legal agreements pertaining to the setting up of a business such as a wholly foreign owned enterprise and the actual completion of important investment deals are preferably and often done in Hong Kong because of the legal security and advantages that the city offers.” “We are very familiar with the legal community in Hong Kong and we have good relationships with different firms,” Mayer explains. If a client needs assistance in a field where other firms expertise might be more valuable and necessary in light of what is at stake, the firm always has the right connection to make things work. “We know how to assist best our clients and get when necessary the best help available out there and use our connections to their advantage.” Hong Kong will most often be the stepping stone LAW FIRM This page: Eric-Jean Thomas and Eric Mayer celebrating the 15th anniversary of TMA in 2011 Opposite page: Partners Eric Mayer (left) and Eric-Jean Thomas FAST FACTS into the Chinese market. This is why Mayer simply does not see the need in setting up in China. “We are ‘the’ French firm in Hong Kong. There’s no need for us to compete with similar firms in China. To many, China is still seen as extremely pragmatic and it’ll be years before the new generation of lawyers who are not exposed so much to legal system of the common law can catch up to the international standards and global expertise of those in Hong Kong.” In fact, firms in China often enlist TMA and its team of lawyers when they need help structuring an investment which is linked to China, Asia, or Europe. “Implementing business plans and setting up foreign investment vehicles in mainland China does not prevent the investors from securing their investment deal in Hong Kong with all the benefits such an approach brings. This is why businesses like to secure their investment agreements with our help in Hong Kong : they do not want to involve Chinese officials and authority,” says Mayer as he explains that Hong Kong will unlikely be replaced for some time by China as a top international business hub because of the rule of law and flexibility of business environment it offers. Mayer attributes the firm’s success also to its group of loyal staff, on which client loyalty is partly built upon. “We have a very low staff turn over rate. Our expertise and what Hong Kong has to offer as a platform is one thing, but there is another factor helping TMA keeping and following up its clients : they are comfortable working with the same lawyer they are familiar with over the years and this is one of the reasons why they keep coming back to us; • The firm celebrated it’s 15th anniversary in 2011 • The Paris office, which opened in September 2010, is a subsidiary of the firm’s head office based in Hong Kong • Practice areas: International business law, mergers and acquisitions, joint ventures, company and commercial law, international tax law, international arbitration, private international law, and immigration law. they’ve benefited from being regularly advised by the same people and have therefore trusted us over the years and they continue to trust us.” Because of their French-centric culture, the firm is able to cultivate new clients that value their approach and culture which is both French and international. “Many times, in an acquisition deal in which we act for the vendor, the purchaser has their own team of lawyers, but after the acquisition is done, we often end up becoming their lawyers because they trust that we can do a good job following up on the development of the company,” explain Mayer. The firm’s reputation is something Mayer takes very seriously; and he’s not about to change client’s perception of the firm. “We don’t want to expand too quickly as it has been the case in the past 10 years; at present we can comfortably deal with all our clients on a personal level and that’s one of the reasons why they like working with us.” HONG KONG BUSINESS ANNUAL 2013 121 ULTRA ACTIVE TECHNOLOGY LTD PHILOSOPHY UAT continually seeks to provide customers with the best possible solutions comprising high performance products and services From boardroom to seminar room, UAT integrates AV solutions A 122 HONG KONG BUSINESS ANNUAL 2013 n award-winning audiovisual and video conferencing solutions provider in Hong Kong with a 15-year track record, Ultra Active Technology Limited (UAT) is a highly sought-after name, wherever there are top-level conferences taking place across time zones, highprofile meetings, important lectures, presentations, and even informal occasions. Half of the top 20 banking and finance companies in Hong Kong, the world’s four leading sportswear companies, 80 percent of the large telecom companies listed in Hong Kong and all universities in Hong Kong, including the Chinese University of Hong Kong, the Hong Kong University of Science & Technology, the Open University of Hong Kong and the University of Hong Kong are among the more than 3,000 clients who have benefited from UAT’s expertise in video conferencing collaboration, deluxe boardroom design and audio visual integration, which form this internationally-accredited and wellrecognised company’s three principal businesses. As for audio-visual integration, UAT excels in this field as it understands the brands (such as AMX, Extron, Mitsubishi, Polycom and Sharp), sound, lighting, cabling, matrix, network, signal, program and project management. In this sphere, UAT offers the expertise to address mission critical facilities. The company’s professional creative team has often demonstrated the ability to program controls, mix and match AV equipment, fine-tune sound and adjust the lighting to create the best possible environment. UAT has also built a reputation for designing deluxe boardrooms. Conference rooms of companies are used for activities ranging from internal uses such as worldwide conferences, board meetings and staff training, to external uses such as sales meetings, room rental and social gatherings. For companies that require AV solutions for such a diverse array of uses, UAT brings its expertise to integrate audio and video with a company’s business culture as well as furniture, lighting and interior design. AV technology pioneers UAT’s presence in Hong Kong’s private and public sector institutions is hard to miss. The Polycom high definition video conferencing system, a quality product that is highly visible in conference rooms, was first introduced into the city by UAT, one of the system integrators in Hong Kong. Preferred partner UAT’s customers belong to a range of sectors such as banking and finance, listed companies, hotels, the Hong Kong Government, the Judiciary, hospitals, as well as multinational corporations. It has become a preferred partner to numerous enterprises because it takes pride in delivering top- Innovative AUDIOVISUAL Technology This page: UAT is a renowned company specialised in integration of audiovisual systems and video conferencing Opposite page: Tony Cheung,Chief Executive Officer of UAT FAST FACTS of-the-line products and services. This commitment is represented in UAT’s philosophy of “Providing The Best.” One area in which UAT has demonstrated its capabilities is in providing conference rooms with advanced AV facilities, not only to corporations, but also to leading tertiary institutions that demand the best. UAT has designed and built multimedia seminar rooms, lecture theatres, conference rooms and moot courts for the Chinese University of Hong Kong, the Hong Kong University of Science & Technology, the Open University of Hong Kong and the University of Hong Kong. One of the biggest challenges UAT undertook was the new Centennial Campus of The University of Hong Kong, which required working on a demanding schedule to deliver a pleasant education environment. The new facilities delivered by UAT feature multipoint video conferencing system with content sharing feature; audio system with echo cancellation and feedback limiter control; ceiling and table microphones and speakers; high definition projector, interactive board, plasma, LCDs and visualizer presentation systems; recording and live streaming solution; and central control system with touch panels. To students, such a comprehensive solution paves way for efficient exchange of ideas, sharing of assignments, accessing program materials and attending online lectures more easily, while for academics and universities it represents efficient operations and delivery of teaching programs to talented students without being hindered by geographical boundaries. The new tools also allow for exceptional interaction and innovative experience. Highly in-demand There is also high demand from corporates and organization for UAT’s video wall solution to monitor, control and interact with their assets, activities or infrastructure. This high impact visual presentation combines multiple LCD monitors with various layouts options. The interface is easy-to-use allowing the user to select different layouts and output signals including multipoint videoconference, Blu-ray video, HDTV, and wired and wireless PC content. Users can even spread one image across multiple monitors. To display text and images in sharp focus, UAT adopts an ultra-slim bezel. The lines between neighbouring monitors appear almost seamless. Interfaces are designed to offer different monitor configurations depending on its use. The solution is especially designed for corporate video conferencing displays, traffic and transportation management centres, power and utilities control rooms, surveillance and security common rooms and broadcast. While providing these solutions and others to thousands of customers, UAT has also continued to engage with the community for a decade and a half. One major undertaking was when UAT celebrated the 15th anniversary over two days in May. In those 48 hours, staff and volunteers of the UAT Association dedicated their time to 15 charitable events. During those two days, employees joined blood donations, gave away food and clothing, provided massages to the elderly, cared for the moderately handicapped and engaged in flag selling to raise funds for worthy causes. In a charity basketball contest, five colleges participated – CNEC Christian College, CNEC Lee I Yao Memorial Secondary School, Kwai Chung Methodist College, Ng Siu Mui Secondary School, and Ying Wa College. This rounded up the 15 activities marking 15 fruitful years. • • • • • • Celebrated 15th Anniversary in May 2012. Introduced the first Polycom highdefinition video conferencing experience to Hong Kong. More than 3,000 audio-visual projects delivered UAT is included in the Specialist List of Contractors to carry out audio and video electronics installation for the Hong Kong Government. UAT, an International InfoComm Member, trained a group of employees to be qualified as InfoComm Certified Technology Specialist, underlining its expertise in the audio-visual industry. UAT is accredited ISO 9001. UAT is also accredited ISO 14001 and OHSAS 18001 to recognize its international standard of product and service. HONG KONG BUSINESS ANNUAL 2013 123 UNIVERSAL AUDIO & VIDEO CENTRE PHILOSOPHY Going the ”little extra mile” to please our customers is our company’s motto. We pride ourselves in applying our expertise in selecting the right products for our clientele and offering a “through train” service from product advices, delivery, installation to repair services. Ensuring our customers their peace of mind is the key to our long term relationships with our clients. 124 HONG KONG BUSINESS ANNUAL 2013 Pinpoint your gadget needs with the expert advice I n the electronics world, much like all industries where trends are what dictate sales, innovations are the bread and butter of the retail sector. So when the latest novelties are just updates of older products, consumers are less eager to upgrade their existing collection of electronic products. This is exactly what Helen Yip Lee, Director of Universal AV Centre, observed in the past year. “The market is relatively quiet because as an industry that depends heavily on exciting and new product launches, there are simply not much ground-breaking innovations in the past year.” Consumers may find there are numerous new products, but these, as Mrs. Lee explains, are often just facelifts of products that have shook the market in the last few years. “Take the smart phone for example, there isn’t anything truly new coming out; it’s all just updates and upgrades of existing products that are already widely used by consumers.” As an industry driven by trends, this undoubtedly undermines consumers’ enthusiasm and is a major contributing factor in the rather quiet market last year. And as a retail store, there’s not much that can be done to influence or change these trends. Therefore, at times like this, it is more important than ever to curate the right stock and build a store with products that truly trigger the needs of customers. This is where a boutique retailer like Universal AV Centre, with three outlets at top luxury retail hot spots in the city, can thrive. Bigger is not always better when it comes to retailers, especially for customers looking for the latest innovations and top-notch customer service. While there are plenty of good reasons to buy from large chain stores, smaller stores offer the care and attention to customer needs in a way that is simply not possible elsewhere. For over 20 years, Universal AV Centre has been the go-to destination for those with a big appetite for the latest electronic goods but little time to research their needs. “Large chain stores can carry every brand under the sun; but we offer a more refined selection for our customers, weaving out the products and brands we feel are not up to their standards and expectations,” Mrs. Lee explains. Because of the intimate setting of the shop, the staff is able to give their full attention to customers, often helping them refine their needs and choices. “Our customers are not consumers who can afford to spend a lot of time researching their needs. This is why they come to us. Our knowledgeable staff can always help them with informed recommendations and narrow down their options, making the buying experience a smooth and hassle-free one.” In fact, Universal AV Centre is so well noted for its customer service that a large chunk of its business comes from repeat visits and referrals. But a lot of times, making the right recommendation could mean not making the biggest possible sale. But both Mrs. Lee and her staff agree that building trusting relationships with clients, even if it means sacrificing an initial sale, is the only way to grow a business. “We have cultivated a culture where, because we don’t have the capacity to stock up a lot of one AV Shop This page clock-wise: Products available at Universal Audio and Video Centre; Helen Yip Lee, Director of Universal Video and Audio Centre Opposite page: Universal Audio and Video CentreMiramar branch; Universal Audio and Video Centre- Pacific Place branch; Universal Audio and Video- Landmark branch FAST FACTS • • • • • product, are able to recommend products based on what the client needs, rather than what leftover stock we need to get rid of,” says Mrs. Lee. This unique culture is the result of years of service to customers and a dedicated team of staff who are in for the long run. “Our customers can easily find the same staff at our shop if they have questions or need help; at large chains, it is not always possible to find the same staff that service you the last time,” Mrs. Lee recalls one incident several years back where one of her clients bought a new TV system Universal AV was founded in 1990 There are now 3 branches: Pacific Place in Admiralty, The Landmark in Central and Miramar Shopping Centre in Tsim Sha Tsui The company employs 30 staff and trains them to serve the customers from purchase through installation Clients come from all over the world Most of the best brands of televisions, smart phones, digital cameras, audio and video equipment and other electronic gadgets is available. for his elderly mother. “Like many seniors, she found fiddling with technology a bit of a challenge. She kept calling us back week after week for a refresh on how to use the remote. In the end, we visited her home three times to teach her how to operate her TV.” All this, she notes, is free of charge. “We are of course happy that our clients keep returning. But what makes us truly proud is the trust they put in us. They know they can rely on us if they encounter problems and we are always happy and willing to help.” HONG KONG BUSINESS ANNUAL 2013 125 Wharf T&T Limited PHILOSOPHY Wharf T&T strictly focuses on enabling customers' businesses with proficient domain know-how and quality communications/ technology solutions. Backed by the state-of-the-art "Fibre-to-theDesk" (FTTD) ultra-high speed broadband network, Wharf T&T possesses strong system integration capabilities and a full suite of subscriptionbased Fibre Cloud solutions to cope with the evolving demand of ICT adoption in the business sector. 126 HONG KONG BUSINESS ANNUAL 2013 Hong Kong’s leading ICT service provider serving business customers S ince it was licensed in 1995, Wharf T&T is committed to providing quality service to its clients in Hong Kong and has become the first and only comprehensive ICT service provider in Hong Kong focusing on the business sector - from small and medium companies to large organizations. With this unwavering dedication to customer service, Wharf T&T has been named the Outstanding Enterprise for the Fixed Network and Broadband Telecommunications category in the HK Business High Flyers Awards 2012. Vincent Ma, Wharf T&T’s President, comments, “The award reaffirms our commitment to excellence in delivering high quality IT and Communications service targeting business enterprises in Hong Kong. Wharf T&T’s business model and market positioning is unique. We are the only telecommunications operator in Asia dedicated to serving the business sector with 100% business brand.” In January 2006, Wharf T&T integrated with COL, an IT services company with over 40 years of experience in Hong Kong. They offered a full range of IT infrastructure and application services to their customers. Since then, the company has emerged as a leading integrated ICT solution provider with the best-of-breed optical fibre network and system integration capabilities, enabling a full range of professional ICT solutions encompassing voice, data, conferencing, email messaging, web-building and hosting, IT security, network solution and integration, application implementation, data centre, business continuity and disaster recovery services. According to Ma, the company’s mission is to enable customers' businesses. The company utilizes its strong system integration capabilities and a full suite of subscription-based Fibre Cloud solutions to cope with the evolving demand of ICT adoption in the business sector. Wharf T&T’s unique business model is not only well-received by SMEs, but also by large enterprises who entrust their mission-critical ICT projects to the company. Wharf T&T has gained customer mindshare and secured a wide and solid customer base of over 47,000 SMEs and large enterprises across industries. Most of the world’s 50 biggest banks classified by Global Finance (2011) and Hang Seng Index’s listed companies have already been added in its customer portfolio. “Wharf T&T currently manages seven data centres and disaster recovery sites spanning Hong Kong. Our capability to provide ultra-high speed Fibre-to-theDesk network infrastructure, coupled with advanced equipment and multiple sites option allows us to be the vendor-of-choice for data centres and business continuity management,” says Ma. Green and CSR initiatives The company strives to excel in its business while making it a point that it does not discount the need Fixed Network and Broadband - Telecommunications This page clock-wise: Ocean Park Fun Day with HKCS Small Group Home; Wharf T&T's data centre; Leadership Development Programme; Rice Packing for the People’s Food Bank Opposite page: Vincent Ma, President, Wharf T&T Limited FAST FACTS • Wharf T&T is a leading ICT service provider serving business customers in Hong Kong. • Licensed in 1995, Wharf T&T is a core member of the Wharf Group with over HK$6 billion invested in its own telecommunications network infrastructure in Hong Kong. • By 2013, Wharf T&T’s undisrupted ultra-high speed Fibre-to-the-Desk network will be able to serve over 95% of the business customers in Hong Kong. for a commitment to environmental sustainability. Upon the establishment of CSR committee in 2010, Wharf T&T has put in place the Environmental Policy and Green Purchasing Policy to take necessary steps to reduce carbon emission. “Our data centre management services, business continuity & recovery services and tape vault services achieved ISO14001 Environmental Management certification. It is believed that we can play a part in promoting green ICT technology,” says Ma while adding that Wharf T&T is the first ICT service provider attaining LOOP - Gold Label. With all these efforts towards environmental sustainability, Wharf T&T believes that corporate social responsibility and business objectives can co-exist. “Our mission is to deliver business value by thinking innovatively and embracing long term sustainable effort to economic, social and environmental impacts in the communities where we do businesses,” adds Ma. In 2011, its parent company, the Wharf Holdings, launched a CSR programme named “Project WeCan” - a 360° school improvement programme with a funding of HK$150 million by the Group aiming to help 10 local secondary schools, benefiting 10,000 students in Hong Kong who possess great potential amid scarce opportunities. “Wharf T&T has been working closely with our partnering school - CCC Kei Heep Secondary School to provide support for the schools as needed, including arranging interaction with the students, providing executive sharing and career talks etc. Over 30 activities have been arranged with the students of Kei Heep since 2011,” adds Ma. Plans for 2013 Ma also said that while the business strategy to focus on the business sector has made the company successfully transform into a leading ICT service provider, the company needs to evolve to create more value for their customers. He reveals that in 2013, Wharf T&T will introduce a fresh identity that captures the essence of their evolution by adding numerous magic IT wands to their existing emblem. This fresh identity is not only a logo of Wharf T&T, but also signifies over 2,000 talented and determined professionals who are more than ready to unlock more value for businesses. “The new logo represents a successful business transformation from a telecommunications company into a leading IT and Communications expert. The formal announcement will be made in March 2013 along with an advertising campaign,” says Ma. With Wharf T&T’s strong commitment to excellence, clients can surely look forward to more exciting products and services for 2013. HONG KONG BUSINESS ANNUAL 2013 127 Zchron Design PHILOSOPHY Our ‘design and build’ concept aims to provide onestop shopping for interior building work, from the design brief to completion and handover for a set price, delivered at a set time, based on professional standards. We cater to the residential, retail and corporate markets. By being designer, project manager and main contractor, we are able to manage each project effectively and efficiently by coordinating with all the suppliers and sub-contractors. 128 HONG KONG BUSINESS ANNUAL 2013 The Building Blocks to reliable and quality interior designs I It’s hard to find an interior designer who can visualize your perfect home; it’s even harder to find someone whom you can trust to take full control of your project. Be it a residential or commercial space, it is important to create a personal identity and to convey an emotional connection through the interior design. For a home, it may be designing a space that brings you peace of mind at the end of a long work day; for a business, it is a matter of solidifying your brand identity and creating an image that echoes the products and services you provide. Whatever your needs may be, it is incredibly important to entrust this task to someone who can create the right mood and utilize a space to suit your needs. But giving this responsibility to an interior designer can be a difficult decision; especially when Hong Kong homeowners have had largely negative experiences with their designers and contractors. According to Nison Chan, managing director and founder of Zchron Design, repeat business for an interior designer is a rare thing in Hong Kong. “Most of the time, homeowners end up being unhappy with the results, it could be because the designs do not turn out the way the client envisioned, or the craftsmanship is questionable or simply because projects are rarely delivered on time,” he explains. With a focus dedicated specifically to luxury properties—apartments that are at least 2,000 square feet and houses at are at least 3,000 square feet— Chan and his team pride themselves in delivering what they promise. “We create three-dimensional renderings that we follow strictly during the entire project. We are able to create homes that are at least 95 per cent identical to these renderings. There will be no surprises when the project is completed.” Previously under Krishom Design, Chan set up Zachron Design this past year as a subsidiary that caters exclusively to residential projects. This, he explains, allows the team to be more focused. “From contractors to sourcing, commercial and residential projects are very different. By setting up two different branches, we are able to separately target the needs of these two groups of clients.” But more importantly, this diversification grew out of a need to brand the company as a leading name in interior design. “There is a lack of branded interior design firms in Hong Kong. I feel this is what the market needs because clients want to turn to someone with a good reputation, someone they can rely on to do a good job, to deliver on time and to create designs that capture what they want. Through this branding, I want to represent ourselves as reliable designers that deliver top-quality designs and craftsmanship,” says Chan. The designer admits that it is all about working closely with clients to turn their dream homes into reality. Many clients, Chan says, want to give input into their designs. From furniture sourcing trips to Europe to brainstorming sessions, communication is Interior Design This page clock-wise: Living area; Multi-function room; Master bathroom; Dining area Opposite page: Nison Chan, Chairman and Chief Designer of Zchron key to customer satisfaction. But often, a client’s visions are simply not viable. This is where the designer and his team should step in. “We have to guide each client and give them our professional opinion; when we know what they want is not going to be visually appealing or functional, it is our responsibility to tell them.” The vast experience of Chan and his team makes them a trusted authority on the subject, and gives them a defining edge that keeps clients coming back. And with ultra-luxury property and commercial projects such as Carlsberg, Dairy Farm and the Kuwait Consulate under his belt, it is easy to understand why Chan is the go-to source for quality designs. “We are very proud to say that a lot of clients come to us by word-of-mouth referral,” he says. “We truly value their business because it means they believe in our ability to create great designs and service.” HONG KONG BUSINESS ANNUAL 2013 129 Index STATISTICAL TABLES AND CHARTS Following an alphabetical listing of the statistical tables and the pages where they appear Labour force, unemployment, and underemployment 60 Number of Establishments, Persons Engaged and Vacancies (Other than those in the Civil Service) by Industry Section 61 Wage Indices by Industry Section and Broad Occupational Group 66 Salary Indices for Middle-level Managerial and Professional Employees by Selected Industry Section 69 Consumer Price Indices and Year-on-year Rates of Change at Section Level for November 2012 70 HONG KONG’S HIGH FLYERS Outstanding Enterprises 2012 72 AIA Pension And Trustee Co. Ltd. 102 Hästens 76 Ageas Insurance Company (Asia) Limited 104 Hong Kong Matchmakers 78 ALTRUIST 106 HSBC Insurance 80 AV Consultant (Int ’l) Ltd 108 M800 LIMITED 82 Canadian International School 110 Shama Management Ltd. 84 Chartis Insurance Hong Kong Limited 112 Rhombus International Hotels Group 86 CLP Power Hong Kong Limited 114 Standard Chartered Bank (Hong Kong ) Limited 88 Cosmo Hotel Hong Kong Cosmo Hotel Mongkok 116 The Cityview 90 Bao Gallery by Crystallize•Me Ltd 118 The Mercer 92 FreyWille 120 Thomas, Mayer & Associes 94 Fuji Xerox (Hong Kong) Ltd. 122 Ultra Active Technology Ltd 96 Fujitsu 124 Universal Audio & Video Centre 98 Galaxy Macau 126 Wharf T&T Limited 100 Godiva 128 Zchron Design 130 HONG KONG BUSINESS ANNUAL 2013 HONG KONG BUSINESS ANNUAL 2013 131 132 HONG KONG BUSINESS ANNUAL 2013
https://issuu.com/charlton_media/docs/hkb_highflyers2012
CC-MAIN-2017-09
refinedweb
63,123
51.28
I don't know why, but just hitting a simple carrage return is giving me a coulumn break. I'm not sure how to make this stop? Which "Enter" are you using... Numpad "Enter"--default keyboard shortcut is set for column break "Enter"--Carriage return Both "Enter"s are giving me a column break. I just want them to work like a normal "Enter" should. Are you using a Windows laptop? There are a number of them that seem to map the numpad Enter and the alphapad enter together, and changing the stae of the NumLock toglles back and forth. If you have such a sytem, the only thing you can do is Edit > Keyboard Shorcuts... and remap the numpad Enter key to be a paragraph break, then create a new shortcut, if you want one, to replace the column break. Try holding Shift and hitting Enter or Return? Reset your preferences:- forums.adobe.com/thread/526990 Shift enter works, I'll reset my preferences. Thanks! I think you'll find that Shift + Enter is a soft return (forced line break) or a frame break, depending on the status of the numlock. Yea, but if it works, it works =) TwitchOSX wrote: Yea, but if it works, it works =) Until you try to apply paragraph styles, and what was intended to be two separate parapgraphs is seen as one, and can't be assigned separate paragraph styles. TwitchOSX wrote: Yea, but if it works, it works =) The point is it DOESN'T work if the keybord binds both keys together. First of all, you don't get a paragraph break, you get a force line break, which is not the same at all, and second, if the keys are bound tegether the numlock will toggle that back and forth between the forced line break and the frame break, just as without the shift it toggles paragraph return and column break. This is a BIOS problem, or perhaps a keyboard problem, and it cannot be "fixed" in ID, only worked around by editing keyboard shorcuts so both the regular and numpad enter keys are both assigned to the same tasks. CTRL + ENTER works!! I'm using a PC, and control + enter key (either standard or the number pad enter key) work. Silly but it works.
http://forums.adobe.com/message/4324725
CC-MAIN-2014-15
refinedweb
383
78.18
lio_listio(), lio_listio64() Initiate a list of I/O requests Synopsis: #include <aio.h> int lio_listio( int mode, struct aiocb* const list[], int nent, struct sigevent* sig ); int lio_listio64( int mode, struct aiocb64* const list[], int nent, struct sigevent* sig ); Arguments: - mode - The mode of operation; one of: - LIO_WAIT — behave synchronously, waiting until all I/O is completed, and ignore the sig argument. - LIO_NOWAIT — behave asynchronously, returning immediately; the signal specified by the sig argument is delivered to the calling process when all the I/O operations from this function are completed. - list - An array of pointers to aiocb or aiocb64 structures that specify the I/O operations that you want to initiate. The array may contain NULL pointers, which the function ignores. - nent - The number of entries in the list array. This must not exceed the system-wide limit, _POSIX_AIO_MAX. - sig - NULL, or a pointer to a sigevent structure that specifies the signal that you want to deliver to the calling process when all of the I/O operations are completed. call. The lio_listio64() function is a large-file version of lio_listio(). The aio_lio_opcode field of each aiocb structure in list specifies the operation to be performed (see <aio.h>): - LIO_READ requests aio_read() . - LIO_WRITE requests aio_write() . - LIO_NOP causes the list entry to be ignored. If mode is LIO_NOWAIT, lio_listio() and lio_listio64() use the sigevent structure pointed to by sig to define both the signal to be generated and how the calling process is notified when the I/O operations are complete: - If sig is NULL, or the sigev_signo member of the sigevent structure is zero, then no signal delivery occurs. Otherwise, the signal number indicated by sigev_signo is delivered when all the requests in the list have been completed. - If sig->sigev_notify is SIGEV_NONE, no signal is posted upon I/O completion, but the error status and the return status for the operation are set appropriately. - If sig->sigev_notify is SIGEV_SIGNAL, the signal specified in sig->sigev_signo is sent to the process. If the SA_SIGINFO flag is set for that signal number, the signal is queued to the process, and the value specified in sig->sigev_value is the si_value component of the generated signal. For regular files, no data transfer occurs past the offset maximum established in the open file description associated with aiocbp->aio_fildes. The behavior of this function is altered according to the definitions of synchronized I/O data integrity completion and synchronized I/O file integrity completion if synchronized I/O is enabled on the file associated with aio_fildes. (see the definitions of O_DSYNC and O_SYNC in the description of fcntl() .) Returns: If the mode argument is LIO_NOWAIT, and the I/O operations are successfully queued, these functions return 0; otherwise they return -1 and set errno . If the mode argument is LIO_WAIT, and all the indicated I/O has been completed successfully, these functions return 0; otherwise, they return -1 and set errno. In either case, the return value indicates only the success or failure of the lio_listio() call itself, not the status of the individual I/O requests. In some cases, one or more of the I/O requests contained in the list may fail. Failure of an individual request doesn't prevent completion of any other individual request. To determine the outcome of each I/O request, examine the error status associated with each aiocb control block. Each error status so returned is identical to that returned as a result of calling aio_read() or aio_write(). Errors: - EAGAIN - The resources necessary to queue all the I/O requests weren't available. The error status for each request is recorded in the aio_error member of the corresponding aiocb structure, and can be retrieved using aio_error() . The number of entries, nent, exceeds the system-wide limit, _POSIX_AIO_MAX. - EINVAL - The mode argument is invalid. The value of nent is greater than _POSIX_AIO_LISTIO_MAX. - EINTR - A signal was delivered while waiting for all I/O requests to be completed during an LIO_WAIT operation. However, the outstanding I/O requests aren't canceled. Use aio_fsync() to determine if any request was initiated; aio_return() to determine if any request has been completed; or aio_error() to determine if any request was canceled. - EIO - One or more of the individual I/O operations failed. Use aio_error() with each aiocb structure to determine which request(s) failed. - ENOSYS - The lio_listio() function isn't supported by this implementation. If either lio_listio() succeeds in queuing all of its requests, or errno is set to EAGAIN, EINTR, or EIO, then some of the I/O specified from the list may have been initiated. In this event, each aiocb structure contains errors specific to the read() or write() function being performed: - EAGAIN - The requested I/O operation wasn't queued due to resource limitations. - ECANCELED - The requested I/O was canceled before the I/O was completed due to an explicit aio_cancel() request. - EINPROGRESS - The requested I/O is in progress. The following additional error codes may be set for each aiocb control block: -. Classification: lio_listio() is POSIX 1003.1 AIO; lio_listio64() is Large-file support
http://developer.blackberry.com/playbook/native/reference/com.qnx.doc.neutrino.lib_ref/topic/l/lio_listio.html
CC-MAIN-2019-47
refinedweb
847
53.71
2 years ago, at WWDC 2017, Apple released the Vision framework, an amazing, intuitive framework that would make it easy for developers to add computer vision to their apps. Everything from text detection to facial detection to barcode scanners to integration with Core ML was covered in this framework. This year, at WWDC 2019, Apple released several more new features to this framework that really push the field of computer vision. That’s what we’ll be looking at in this tutorial. What We’ll be Building in this Tutorial For many years now, Snapchat has reigned as the popular social media app among teens. With its simple UI and great AR features, high schoolers around the world love to place cat/dog filters themselves. Let’s flip the script! In this tutorial, we’ll be building Snapcat, the Snapchat for Cats. Using Vision’s new animal detector, we’ll be able to detect cats, place the human filter on them, and take pictures of them. After taking pictures of our cats, we’ll want to scan their business cards. Using a brand new framework, VisionKit, we’ll be able to scan their business cards just like the default Notes app on iOS. That’s not all! If you remember 2 years ago my tutorial on using Vision for text detection, I ended by saying that even though you could detect text, you would still need to integrate the code with a Core ML model to recognize each character. Well finally, Apple has released a new class under Vision to recognize the text it detects. We’ll use this new class to grab the information from the scanned cards and assign it to our cat. Let’s get started! The project in this tutorial was built using Swift 5.1 in Xcode 11 Beta 7 running on macOS Catalina. If you face any errors when go through the tutorial, try to update your Xcode to the latest version or leave a comment below. Getting the Starter Project To begin, download the starter project here. Build and run on your device. What we have is the iconic Snapchat camera view. To create this, I added a ARSCNView, or an SceneView that is capable of displaying AR content, and overplayed it with a button. When the shutter button is pressed, the app takes a snapshot of the current frame of this scene view and passes it along the navigation stack to the Cat Profile View where it’s loaded the profile image. In this view, we have empty fields for the data: Name, Number, and Email. This is because we haven’t scanned the business card yet! Clicking on the button has no action yet because this is where we’ll implement the document scanning program via VisionKit. Image Recognition – Detecting a Cat Using VNRecognizeAnimalsRequest Our first step is to detect cats in our camera view. Head over to CameraViewController and at the top of the file, type import Vision. This imports the Vision framework into this file, giving us access to all the classes and functions. Now we want our app to automatically place the human filter (“the human emoji”) on our cat with no input from us whatsoever. This means that we need to scan the frames in our camera view every few milliseconds. To do this, modify your code to look like below: We create an instance of timer and define it in our viewWillAppear function. We schedule the timer to perform the function detectCat() in the interval of every half a second. However, you’ll experience an error displayed because we have not created the function called detectCat. This is a simple fix. Here is the viewWillAppear function. Insert the code in the CameraViewController class: Let’s build and run the project so far. The moment our CameraViewController is initialized, we should see the text “Detected Cat!” printed to the console every half second. Now here comes to the fun part where we’ll use the new VNRecognizeAnimalsRequest, a built-in class that lets you detect cats and dogs. Modify the detectCat() function to look like this: There’s quite a bit going on here but I’ll go through it line by line. First, we implement a guard function that checks to make sure that the current frame in our Preview View has an image. If this image can be captured, we create a special CIImage using the pixel buffer of that frame’s image. Here’s some terminology! The CIImage class we’re using is a representation for an image as a CoreImage. This type of images are great when you want to analyze the pixels in them. A pixel buffer stores an image data in the main memory. Before explaining the next few lines of code, it’ll help to understand how Vision works in case you’re unfamiliar. Basically, there are 3 steps to implement Vision in your app, which are: - Requests – Requests are when you request the framework to detect something for you. - Handlers – Handlers are when you want the framework to perform something after the request is made or “handle” the request. - Observations – Observations are what you want to do with the data provided with you. So first, we create a VNRecognizeAnimalRequest to detect animals. This is a new VNImageRequest that was introduced in iOS 13 specifically for animal detection. Next, within the handler of this request, we get the result and filter the labels in our first result. Why are we doing this? This is because currently, the VNRecognizeAnimalRequest can detect both cats and dogs. For our use, we only want cats which is why we define an array called cats where the identifier is equal to “Cats”. Finally, for each cat observation, we print that we found a cat to the console. This is just to see if Vision is detecting cats. Remember, we’ve only defined the request. Now we need to ask Vision to perform the request. After defining the request, we ask VNImageRequestHandler to perform the request on our CIImage we defined earlier. A VNImageRequestHandler is basically a specific type of VNRequest that is used to process images using one or more image analysis requests. Build and run the project on a device. I don’t have a cat so I’ll be using some images from online. If Vision correctly detects the cat, then we should be able to see it printed to the console. It works!! But how should we let users know that the app detects a cat? It’s time to code again. At the top of the class where we initialized the timer object, type the line: var rectangleView = UIView(). This initializes a UIView which we can modify to be a box. We’ll place this box around the coordinates where our Vision function can detect the cat. Inside the detectCat() method, insert self.rectangleView.removeFromSuperview() at the beginning. Then modify the for loop to look like this: Here’s what we’re doing. We are defining our rectangleView to have the bounds of the result’s bounding box. However, this is something worth mentioning. In Vision, the size of the result’s bounding box is smaller than the size of your previewView. This is because when Vision analyzes the image, it scales down the image to speed up computer vision processes. That’s why when we create the bounds for our rectangleView, we have the multiply it by the constant to scale it up. After defining the frame, all we do is set the view to have a transparent background and a border of width 3 and color red. We add this to our previewView. Now, you may be wondering why we included the line of code self.rectangleView.removeFromSuperview() at the beginning of the function. Remember, our Vision code is running every half a second. If we don’t remove the rectangleView, we’ll have a lot of boxes on our view. Ok! Build and run the app! Are you seeing the boxes? Yes! It’s working. Now we have one last thing to do: place a human emoji near the cat. This is really simple. Here’s what we do. Ath the top of the class, underneath where we define our rectangleView, type the line: var humanLabel = UILabel(). Inside the for loop of our detectCat() function, we need to add this label to our view. Here’s how to do that. This is really easy to follow. We still have the same frame for our rectangleView. Now, we set the text of the label to be an emoji followed by the font size. Since we want the labels to cover the entire box, we set its width and height to be the same as the rectangleView. Finally, we removed the code that would create a border and instead add the label to our box and add the box to the previewView. Build and run the app. Is the code working? Can you see the human emoji on the cat? It works! We’ve got a human emoji placed on the cat. Now, of course, it’s not perfect because Vision only detects a cat object, not the facial features of the cat. Hopefully Apple will add that soon and we can further refine the filter. Scanning the Business Card Using VNDocumentCameraViewController Whew! We made it through the first part. From here on, it gets a little easier. When you snap the picture of your cat, you automatically get pushed to the Cat Profile view where you can see the image you’ve taken, the details of the cat, and a button that says “Scan For Details“. We’ll be pulling up the new document scanner code when this button is tapped on. Navigate to CatProfileViewController.swift. At the top of the file, underneath import UIKit, type import VisionKit. The difference between Vision and VisionKit is that while Vision lets your perform computer vision analyses on an image, VisionKit is a small framework that lets your app use the system’s document scanner. Now within the scanDocument() function, all you need to add are three lines of code. The VNDocumentCameraViewController() is a special type of view controller created by Apple which is used to scan the documents. We set the delegate of that controller and present the view controller. Next, you need to implement the VNDocumentCameraViewControllerDelegate in the class. Change the line where we define out CatProfileViewController class to look like this. Build and run the app. After taking a picture, when you press “Scan for Details”, the device’s document scanner should pop up. Looks like it’s scanning! However, when we press “Save”, nothing happens. This is because we haven’t implemented any delegate methods yet. Underneath, the scanDocument() function, type the following. The documentCameraViewController(didFinishWith:) is a method that runs when the Save button is clicked. We take the first scan, make it an image, and set the catImageView to display this image. We’re doing this to make sure that the scanner is working well. Build and run the app. When you have to scan for details, scan over any business card and when you click “Save”, it should dismiss the document scanner and set the image to the catImageView. Now that the app is able to detect the business card, let’s further implement it to extract the textual data from the card. Text Recognition Using VNRecognizeTextRequest With the new API, VNRecognizeTextRequest, introduced in iOS 13, it’s pretty easy to finds and recognizes text in an image. Again, first import VisionKit in the file because the new API is bundled in the framework. As explained earlier, this will bring over the Vision API’s. Next, before the viewDidLoad() function, type the following: The VNRecognizeTextRequest is just like the VNRecognizeAnimalsRequest class that we’ve used earlier. This request tells Vision to run text recognition on whatever image we pass to it. Later, when Vision detects text in a image, we’ll assign it to the variable recognizedText. Head over to the viewDidLoad() function and update the code like below: In the code, we initiate a VNRecognizeTextRequest. Vision returns the result of this request in a VNRecognizedTextObservation object. This type of observation contains information about both the location and content of text and glyphs that Vision recognized in the input image. For every item in the requestResults array, we choose the first topCandidates. What is this? Well for every observation Vision makes, it outputs a list of potential candidates for the detected text. In some cases, it may be useful to consider all the possible text. For our case, we only care about the most accurate prediction. Finally, we take the candidate.string and add it to our recognizedText. After going through every observation in the requestResults array, we set the text of the catDetailsTextView to our recognizedText. Your code should look a little like the image below: You can build and run the app now but nothing will happen. Why? This is because we still haven’t defined a handler to perform the request. This can be accomplished in a couple lines of code. Head back to the documentCameraViewController(didFinishWith:) function and modify it like this: The code above should look familiar as we used it in the first section of the tutorial. We define a handler of type VNImageRequestHandler and input the cgImage of our scan. A VNImageRequestHandler is an object that processes one or more image analysis requests pertaining to a single image. By specifying the image, we can begin executing the Vision request. In the do block, we ask the handler to perform the Vision request we defined earlier. x Build and run the app. Is it working? It seems to be working quite well! We’re able to gather all the text from the scanned card and place it onto the text view. Fine Tuning the Text Recognition Now in my image above, the text recognition worked great. However, I’ll try to help you fine tune our VNRecognizeTextRequest in case it didn’t work so well for you. At the end of our viewDidLoad() function, type the following: These are some of the values that the VNRecognizeTextRequest has. You can modify them to fine tune your application. Let’s go through these. .recognitionLevel: You have two options between these: .fastand .accurate. When you want the request to recognize text, you can choose between recognizing faster or more accurately. Apple advices to use .accuratebecause even though it take slightly more time, it works well for recognizing texts in custom font shapes and size. The advantage with .fastis that it takes up less memory on the device. .usesLanguageCorrection: Here’s how Vision Text Recognition Request works. After grabbing the text from each observation, it doesn’t just output that text to you. It goes through another layer of Natural Language to change any misspelled words. Think if it like a spell and grammar check. By changing this Boolean value, you can enable this on or off. When should you set this to true? If your application is being used to recognize text from a book or a document, then you should enable this setting. However, in our scenario, we’re using it to detect names, numbers, and email addresses. If we enable this setting, it’s possible that the request may think the number 1 is the lowercase letter l. Or another example is the last name He which Vision may correct to Hey or Hi. .customWords: This value is an array that can be used for specific words. In our scenario, we’re detecting emails which generally end in @email.com. While this isn’t a word on its own, we wouldn’t want Vision predicting these characters to be something else. By offering custom words, the text recognition request analyzes the image a second time to see if any of those words appear so it can recognize them properly. Build and run the app. Is there any improvement? Did the recognition system get better or worse? By fine tuning these parameters, you can utilize Vision’s text recognition system to be the best in your app. Conclusion In this tutorial, as you can see, it is so easy to take advantage of all the new API’s in Vision to perform object recognition. You learned how we can use the brand new animal detector to recognize cats and dogs in an image. You should also understand how the new framework, VisionKit, makes scanning documents a breeze. Finally, the coveted text recognition APIs became available in Vision. With easy-to-use API’s and lots of parameters for fine tuning the system, you can easily implement text recognition in your apps. However, this isn’t all that was announced at WWDC 2019. Vision also introduced API’s to classify images into categories, analyze saliency, and detect human rectangles. I’ve attached some great links if you want to continue learning more about Vision. - Vision Documentation - WWDC 2019 Session: Understanding Images in Vision Framework - WWDC 2019 Session: Text Recognition in Vision Framework - AppCoda Tutorial: Using Vision Framework for Text Detection in iOS 11 I’d love to know what you’re building with Vision! Leave a comment below if you have a question or want to share what you’re working on. You can download the full tutorial here. Thanks for reading! Catch you in the next article!
https://www.appcoda.com/animal-recognition-vision-framework/
CC-MAIN-2020-40
refinedweb
2,916
65.62
October 10, 2018Sebastien Stormacq Since November 2017, Canadian customers can use Amazon Echo devices to interact with Alexa in English. Today, we announced that Amazon Alexa and Alexa-enabled devices will be available with Canadian French later this year. Starting today, developers can use the Alexa Skills Kit (ASK) to build skills for customers in Canada using the new French (Canada) language model. If you are new to skill development, check out this detailed walkthrough to get started. If you’re an experienced Alexa developer, you can enhance your existing skill by extending it to support the new French language model for Canada. This tutorial will show you how you can add support for the French (Canada) French. 3. Follow the steps below to complete the Language Settings screen: 4. Now provide the interaction model for the French (Canada) version. You can do this by copying the interaction model from one of the English versions of our skill, and translating the sample utterances and slot values and synonyms. Alternatively, if your skill already supports French for France, you can just copy the interaction model as-is as a first step. In this example, we’re starting from Canadian English. Switch to the Canadian English version by clicking on the language dropdown in the skill builder, and choose English (CA). 5. Click on JSON Editor on the left side bar. This displays the complete interaction model for the skill in JSON format. 6. Select and copy all of the JSON in the code window. 7. Switch back to French (CA). We now have the language model built for French (Canada). You now need to translate the invocation name, the sample utterances, the slot values, and the synonyms. You also must localise the skill metadata, including skill name, description, keywords and the icons, should they contain localised (Canada), French, English (India), English (Australia) and Japanese. See the Slot Type Reference for a list of slot types for each supported locale. Once you have finished translating your interaction model for French French (Canada): 'use strict'; let EnglishStrings = { "WELCOME_MSG": "Welcome to {0}", "HELP_MSG": "Welcome to {0}. You can play, stop, resume listening. How can I help you ?", "UNHANDLED_MSG": "Sorry, I could not understand what you've just said.", "CAN_NOT_SKIP_MSG": "This is radio, you have to wait for next track to play.", "RESUME_MSG": "Resuming {0}", "NOT_POSSIBLE_MSG": "This is radio, you can not do that. You can ask me to stop or pause to stop listening.", "STOP_MSG": "Goodbye.", "TEST": "test english", "TEST_PARAMS": "test with parameters {0} and {1}", }; let FrenchStrings = { "WELCOME_MSG": "Bienvenue sur {0}", "HELP_MSG": "Bienvenue sur {0}. Vous pouvez démarrer, arrêter ou reprendre. Que souhaitez-vous faire ?", "UNHANDLED_MSG": "Désolé, je n'ai pas compris ce que vous avez dit.", "CAN_NOT_SKIP_MSG": "C'est de la radio, vous devez attendre le titre suivant.", "RESUME_MSG": "Je redémarre {0}", "NOT_POSSIBLE_MSG": "C'est de la radio, vous ne pouvez pas faire ca. Vous pouvez me demander d'arrêter ou de metre en pause pour arrêter la musique.", "STOP_MSG": "au revoir !", "TEST": "test français", "TEST_PARAMS": "test avec paramètres {0} et {1}", }; export const strings = { "en-GB": EnglishStrings, "en-US": EnglishStrings, "en-CA": EnglishStrings, "fr-FR": FrenchStrings, "fr-CA": FrenchStrings }; As you can see, languageStrings object contains five objects, one for each supported English language (en-CA, en-US, en-GB), one for French for France (fr-FR), and one for Canadian French.' locales, with appropriate translations. You can see this in action by looking at the JSON request sent to your skill through the service simulator. When testing in the simulator, be sure to select the tab for the language you want to test. In our example, when testing from the Canadian French language, the request sent to the skill includes the fr. import { i18n } from './utils/I18N'; Step 3: Access the language strings in your code Once you are done defining and enabling language strings, you can access these strings using the i18n(request,key, vars… order a Canadian French device would receive the speech output “Bienvenue sur Ma Radio.” const request = input.requestEnvelope.request; return ResponseFactory.init() .speak(i18n.S(request, "HELP_MSG", skill_name) .withShouldEndSession(false) .getResponse(); That’s all that it takes to update your skill for French customers in Canada. We are excited to have Alexa available in French in Canada, and we can't wait to see what you will build. Check out our documentation to learn more about how you can use ASK to create multi-language Alexa skills. Check out the following training resources, tutorials, and code samples to start building Alexa skills:
https://developer.amazon.com/blogs/alexa/post/a35a1a38-07fd-4d38-a99c-8d7a3f0be34b/how-to-update-your-alexa-skills-for-french-speakers-in-canada
CC-MAIN-2019-22
refinedweb
758
64.91
Table of Contents SE (§11.1). Such an object can be used to carry information from the point at which an exception occurs to the handler that catches it. Handlers are established by catch clauses of try statements (§14.20). (§11.2). If no such handler is found, then the exception may be handled by one of a hierarchy of uncaught exception handlers (§11.3) - thus every effort is made to avoid letting an exception go unhandled. The exception mechanism of the Java SE platform is integrated with its synchronization model (§17.1), so that monitors are unlocked as synchronized statements (§14.19) and invocations of synchronized methods (§8.4.3.6, §15.12) complete abruptly. An exception is represented by an instance of the class Throwable (a direct subclass of Object) or one of its subclasses. Throwable and all its subclasses are, collectively, the exception classes. Note that a subclass of Throwable must not be generic (§8.1.2). The classes Exception and Error are direct subclasses of Throwable. Exception is the superclass of all the exceptions from which ordinary programs may wish to recover. Error is the superclass of all the exceptions from which ordinary programs are not ordinarily expected to recover. Error and all its subclasses are, collectively, the error classes. The class Error is a separate subclass of Throwable, distinct from Exception in the class hierarchy, to allow programs to use the idiom " } catch (Exception e) {" (§11.2.3) to catch all exceptions from which recovery may be possible without catching errors from which recovery is typically not possible. run-time exception classes. The unchecked exception classes are the run-time exception classes and the error classes. The checked exception classes are all exception classes other than the unchecked exception classes. That is, the checked exception classes are all subclasses of Throwable other than RuntimeException and its subclasses and Error and its subclasses. Programs can use the pre-existing exception classes of the Java SE platform API in throw statements, or define additional exception classes as subclasses of Throwable or of any of its subclasses, as appropriate. To take advantage of compile-time checking for exception handlers (§11.2), it is typical to define most new exception classes as checked exception classes, that is, as subclasses of Exception that are not subclasses of RuntimeException. An exception is thrown for one of three reasons: A throw statement (§14.18) was executed. An abnormal execution condition was synchronously detected by the Java Virtual Machine, namely: evaluation of an expression violates the normal semantics of the Java programming language (§15.6), such as an integer divide by zero. an error occurs while loading, linking, or initializing part of the program (§12.2, §12.3, §12.4); in this case, an instance of a subclass of LinkageError is thrown. an internal error or resource limitation prevents the Java Virtual Machine from implementing the semantics of the Java programming language; in this case, an instance of a subclass of VirtualMethodError is thrown. These exceptions are not thrown at an arbitrary point in the program, but rather at a point where they are specified as a possible result of an expression evaluation or statement execution. An asynchronous exception occurred (§11.1.3). occur only as a result of: An invocation of the (deprecated) stop method of class Thread or ThreadGroup. The (deprecated) stop methods may be invoked by one thread to affect another thread or all the threads in a specified thread group. They are asynchronous because they may occur at any point in the execution of the other thread or threads. An internal error or resource limitation in the Java Virtual Machine that prevents it from implementing the semantics of the Java programming language. In this case, the asynchronous exception that is thrown is an instance of a subclass of VirtualMethodError. Note that StackOverflowError, a subclass of VirtualMethodError, may be thrown synchronously by method invocation (§15.12.4.5) as well as asynchronously due to native method execution or Java Virtual Machine resource limitations. Similarly, OutOfMemoryError, another subclass of VirtualMethodError, may be thrown synchronously during object creation (§12.5), array creation (§15.10.1, §10.6), class initialization (§12.4.2), and boxing conversion (§5.1.7), as well as asynchronously. The Java SE platform permits a small but bounded amount of execution to occur before an asynchronous exception is thrown. Asynchronous exceptions are rare, but proper understanding of their semantics is necessary if high-quality machine code is to be generated. The delay noted above). When interfaces are involved, more than one method declaration may be overridden by a single overriding declaration. In this case, the overriding declaration must have a throws clause that is compatible with all the overridden declarations (§9.4.1). The unchecked exception classes (§11.1.1) are exempted from compile-time checking. Of the unchecked exception classes, error classes are exempted because they can occur at many points in the program and recovery from them is difficult or impossible. A program declaring such exceptions would be cluttered, pointlessly. Sophisticated programs may yet wish to catch and attempt to recover from some of these conditions. Of the unchecked exception classes, run-time exception classes are exempted because, in the judgment of the designers of the Java programming language, having to declare such exceptions would not aid significantly in establishing the correctness of programs. Many of the operations and constructs of the Java programming language can result in exceptions at run time. The information available to a Java compiler, and the level of analysis a compiler performs, are usually not sufficient to establish that such run-time exceptions cannot occur, even though this may be obvious to the programmer. Requiring such exception classes to be declared would simply be an irritation to programmers. For example, certain code might implement a circular data structure that, by construction, can never involve null references; the programmer can then be certain that a NullPointerException cannot occur, but it would be difficult for a Java compiler to prove it. The theorem-proving technology that is needed to establish such global properties of data structures is beyond the scope of this specification. We say that a statement or expression can throw a checked exception class E if, according to the rules in §11.2.1 and §11.2.2, the execution of the statement or expression can result in an exception of class E being thrown. We say that a catch clause can catch its catchable exception class(es). The catchable exception class of a uni- catch clause is the declared type of its exception parameter (§14.20). The catchable exception classes of a multi- catch clause are the alternatives in the union that denotes the type of its exception parameter (§14.20). A class instance creation expression (§15.9) can throw an exception class E iff either: The expression is a qualified class instance creation expression and the qualifying expression can throw E; or Some expression of the argument list can throw E; or E is determined to be an exception class of the throws clause of the constructor that is invoked (§15.12.2.6); or The class instance creation expression includes a ClassBody, and some instance initializer block or instance variable initializer expression in the ClassBody can throw E. A method invocation expression (§15.12) can throw an exception class E iff either: The method to be invoked is of the form Primary.Identifier and the Primary expression can throw E; or Some expression of the argument list can throw E; or E is determined to be an exception class of the throws clause of the method that is invoked (§15.12.2.6). For every other kind of expression, the expression can throw an exception class E iff one of its immediate subexpressions can throw E. A throw statement (§14.18) whose thrown expression has static type E and is not a final or effectively final exception parameter can throw E or any exception class that the thrown expression can throw. For example, the statement throw new java.io.FileNotFoundException(); can throw java.io.FileNotFoundException only. Formally, it is not the case that it "can throw" a subclass or superclass of java.io.FileNotFoundException. A throw statement whose thrown expression is a final or effectively final exception parameter of a catch clause C can throw an exception class E iff: E is an exception class that the try block of the try statement which declares C can throw; and E is assignment compatible with any of C's catchable exception classes; and E is not assignment compatible with any of the catchable exception classes of the catch clauses declared to the left of C in the same try statement. A try statement (§14.20) can throw an exception class E iff either: finally block can complete normally; or Some catch block of the try statement can throw E and either no finally block is present or the finally block can complete normally; or A finally block is present and can throw E. An explicit constructor invocation statement (§8.8.7.1) can throw an exception class E iff either: Some expression of the constructor invocation's parameter list can throw E; or E is determined to be an exception class of the throws clause of the constructor that is invoked (§15.12.2.6). Any other statement S can throw an exception class E iff an expression or statement immediately contained in S can throw E. It is a compile-time error if a method or constructor body can throw some exception class E when E is a checked exception class and E is not a subclass of some class declared in the throws clause of the method or constructor. It is a compile-time error if a class variable initializer (§8.3.2) or static initializer (§8.7) of a named class or interface can throw a checked exception class. It is a compile-time error if an instance variable initializer or instance initializer of a named class can throw a checked exception class unless that exception class or one of its superclasses is explicitly declared in the throws clause of each constructor of its class and the class has at least one explicitly declared constructor. Note that no compile-time error is due if an instance variable initializer or instance initializer of an anonymous class (§15.9.5) can throw an exception class. In a named class, it is the responsibility of the programmer to propagate information about which exception classes can be thrown by initializers, by declaring a suitable throws clause on any explicit constructor declaration. This relationship between the checked exception classes thrown by a class's initializers and the checked exception classes declared by a class's constructors is assured implicitly for an anonymous class declaration, because no explicit constructor declarations are possible and a Java compiler always generates a constructor with a suitable throws clause for that anonymous class declaration based on the checked exception classes that its initializers can throw. It is a compile-time error if a catch clause can catch checked exception class E1 and it is not the case that the try block corresponding to the catch clause can throw a checked exception class that is a subclass or superclass of E1, unless E1 is Exception or a superclass of Exception. It is a compile-time error if a catch clause can catch (§11.2) checked exception class E1 and a preceding catch clause of the immediately enclosing try statement can catch E1 or a superclass of E1. A Java compiler is encouraged to issue a warning if a catch clause can catch (§11.2) checked exception class E1 and the try block corresponding to the catch clause can throw checked exception class E2, a subclass of E1, and a preceding catch clause of the immediately enclosing try statement can catch checked exception class E3 where E2 <: E3 <: E1. Example 11.2.3-1. Catching Checked Exceptions import java.io.*; class StaticallyThrownExceptionsIncludeSubtypes { public static void main(String[] args) { try { throw new FileNotFoundException(); } catch (IOException ioe) { // Legal in Java SE 6 and 7. "catch IOException" // catches IOException and any subtype. } try { throw new FileNotFoundException(); // Statement "can throw" FileNotFoundException. // It is not the case that statement "can throw" // a subtype or supertype of FileNotFoundException. } catch (FileNotFoundException fnfe) { // Legal in Java SE 6 and 7. } catch (IOException ioe) { // Legal in Java SE 6 and 7, but compilers are // encouraged to throw warnings as of Java SE 7. // All subtypes of IOException that the try block // can throw have already been caught. } try { m(); // Method m's declaration says "throws IOException". // m "can throw" IOException. It is not the case // that m "can throw" a subtype or supertype of // IOException, e.g. Exception, though Exception or // a supertype of Exception can always be caught. } catch (FileNotFoundException fnfe) { // Legal in Java SE 6 and 7, because the dynamic type // of the IOException might be FileNotFoundException. } catch (IOException ioe) { // Legal in Java SE 6 and 7. } catch (Throwable t) { // Legal in Java SE 6 and 7. } } static void m() throws IOException { throw new FileNotFoundException(); } } By the rules above, each alternative in a multi- catch clause (§14.20) must be able to catch some exception class thrown by the try block and uncaught by catch clauses. For example, the second catch clause below would cause a compile-time error because exception analysis determines that SubclassOfFoo is already caught by the first catch clause: try { ... } catch (Foo f) { ... } catch (Bar | SubclassOfFoo e) { ... } When an exception is thrown (§14.18), control is transferred from the code that caused the exception to the nearest dynamically enclosing catch clause, if any, of a try statement (§14.20) that can handle: If within a method, then the caller is the method invocation expression (§15.12) that was executed to cause the method to be invoked. If within a constructor or an instance initializer or the initializer for an instance variable, then the caller is the class instance creation expression (§15.9) or the method invocation of newInstance that was executed to cause an object to be created. If within a static initializer or an initializer for a static variable, then the caller is the expression that used the class or interface so as to cause it to be initialized (§12.4). Whether a particular catch clause can handle an exception is determined by comparing the class of the object that was thrown to the catchable exception classes of the catch clause. The catch clause can handle the exception if one of its catchable exception classes is the class of the exception or a superclass of the class of the exception. Equivalently, a catch clause will catch any exception object that is an instanceof (§15.20.2) one of its catchable exception classes. The control transfer that occurs when an exception is thrown causes abrupt completion of expressions (§15.6) and statements (§14.1) until a catch clause is encountered that can handle the exception; execution then continues by executing the block of that catch clause. The code that caused the exception is never resumed. All exceptions (synchronous and asynchronous) optimized code has speculatively executed some of the expressions or statements which follow the point at which the exception occurs, such code must be prepared to hide this speculative execution from the user-visible state of the program. invoked. In situations where it is desirable to ensure that one block of code is always executed after another, even if that other block of code completes abruptly, a try statement with a finally clause (§14.20.2) may be used. If a try or catch block in a try- finally or try- catch- finally statement completes abruptly, then the finally clause is executed during propagation of the exception, even if no matching catch clause is ultimately found. If a finally clause is executed because of abrupt completion of a try block and the finally clause itself completes abruptly, then the reason for the abrupt completion of the try block is discarded and the new reason for abrupt completion is propagated from there. The exact rules for abrupt completion and for the catching of exceptions are specified in detail with the specification of each statement in §14 and for expressions in §15 (especially §15.6). Example 11.3-1. Throwing and Catching Exceptions The following program normally or abruptly, a message is printed describing what happened.]"); } } } If we execute the program, passing it the arguments: divide null not test The declaration of the method thrower must have a throws clause because it can throw instances of TestException, which is a checked exception class (§11.1.1). A compile-time error would occur if the throws clause were omitted. Notice that the finally clause is executed on every invocation of thrower, whether or not an exception occurs, as shown by the " [thrower(...) done]" output that occurs for each invocation.
http://docs.oracle.com/javase/specs/jls/se7/html/jls-11.html
CC-MAIN-2015-06
refinedweb
2,834
52.6
1 import java.util.*;2 public class Pippin {3 public static void main(String argv[]){4 TreeMap tm = new TreeMap();5 tm.put("one", new Integer(1));6 tm.put("two",new Integer(3));7 tm.put("three",new Integer(2));8 Iterator it = tm.keySet().iterator();9 while(it.hasNext()){10 Integer iw = tm.get(it.next());11 System.out.print(iw);12 }13 } 14.} 1 public class TestQ20 implements Runnable {2 3 public static void main (String[] args){4 new Thread( new TestQ20() ).start(); 5 // start some other process here6 }7 public void run(){8 for( int i = 0 ; i < 1000 ; i++ ){ 9 // select statement to go here 10 someComplexProcess();11 }12 }13 // remaining methods 14 } 1 public class TechnoSample {2 public static void main (String[] args){3 TechnoSample tq = new DerivedSample();4 ((DerivedSample)tq).echoN( tq.paramA ); 5 }6 int paramA = 9 ; 7 }8 class DerivedSample extends TechnoSample {9 int paramA = 3 ;10 void echoN( int n ){11 System.out.println("number is " + n );12 } 13 } protected float calculate( int x, int y ) Now you have to extend ClassA with ClassB and override the calculate method with a new version. This new calculate will have to call the processB() method which has the following declaration, where MyException is a custom Exception extending Exception. protected float processB( int x ) throws MyException What features should your overriding calculate method in ClassB have? Object + BaseWidget (abstract) +-- SlowWidget +-- FastWidget (implements Runnable) The options show signatures of various methods in another class. Choose the methods you would be able to call with an instance of SlowWidget. 1 public class TopLevel { 2 3 public static void main (String[] args){4 // what goes here?5 System.out.println("Created " + nt );6 }7 8 static class Nested {9 String id ;10 Nested( String s ){ id = s ; }11 } // end Nested12 } Select all options for line 4 that would create a local instance of Nested. public class NormClass { long startTime ; public class NestedClass { // methods and variables of NestedClass } // other methods and variables of NormClass} Which of the following can be used by a method inside NestedClass to refer to the startTime variable in the enclosing instance of NormClass? import java.util.*;public class Laxton{ public static void main(String argv[]){ HashMap hm = new HashMap(); hm.put("1","one"); hm.put("2","two"); hm.put("3","one"); Iterator it = hm.keySet().iterator(); while(it.hasNext()){ System.out.print(it.next()); } }} public class TechnoSample { public static void main (String[] args){ int j ; for( int i = 10, j = 0 ; i > j ; j++ ){ i = i - 1 ; } // Statement can go here }} Which of the following statements about this code are correct? public float aveCalories( ) Your Apple class, which extends GenericFruit, overrides this method. In a DietSelection class which extends Object, you want to use the GenericFruit method on an Apple object instead of the method in the Apple class. Select the correct way to finish the statement in the following code fragment so that the GenericFruit version of aveCalories is called using the gf reference. 1. GenericFruit gf = new Apple();2. float cal = // finish this statement using gf class FrequencyException extends Exception{ public String getMessage(){ return "Frequency Exception"; }}public class Note{ public static void main(String argv[]){ Note n = new Note(); System.out.print(n.tune()); } public int tune(){ try{ return play(444); }catch(Exception e){ System.out.println(e.getMessage()); }catch(FrequencyException fe){ System.out.println(fe.getMessage()); }finally{ return 2; } } public int play(int iFrequency)throws FrequencyException{ return 1; }} public class TestQ38 { public static void main (String[] args){ Object obj = buildTest( 3 ) ; System.gc(); System.out.println("exiting"); } public static TestQ38 buildTest(int n ){ TestQ38 t = null ; for( int i = 0 ; i < n ; i++ ){ t = new TestQ38( i ) ; } return t ; } String name ; public TestQ38( int n ){ name = "Number " + n ; } public void finalize(){ System.out.print("finalize " + name ) ; }} Assume that garbage collection runs and all elligible objects are collected and finalized. public class Test { int iTime=7; public static void main(String argv[]){ Test t = new Test(); t.calc(10); } public void calc(int iTime){ start: for(int i =0; i < 2; i++){ if(i >1){ break start; System.out.println(iTime); } System.out.print(i); System.out.print(iTime); } }} public class Test { public static final StringBuffer style = new StringBuffer("original"); public static void main (String[] args){ Test tq = new Test(); tq.modify( style ); System.out.println("Now " + style ); } public void modify( StringBuffer sb ){ sb.append(" is modified" ); }} public class Test { static Object theObj ; static Object[] someObj ; static String letters[] = {"A", "B", "C", "D" }; static char[] caps = {'A', 'B', 'C', 'D' }; public static void main (String[] args){ someObj = new Object[ 3 ] ; int[] theInts = null ; // what can go here? } Select the statements that would cause a compiler error when used to replace the comment. 1 public class TechnoSample {2 public static void main(String [] args) {3 double num = 7.4; 4 int a = (int) Math.abs(num + .5);5 int b = (int) Math.ceil(num + .5);6 int c = (int) Math.floor(num + .5);7 int d = (int) Math.round(num + .5);8 int e = (int) Math.round(num - .5);9 int f = (int) Math.floor(num -.5);10 int g = (int) Math.ceil(num -.5);11 int h = (int) Math.abs(num - .5);1213 System.out.println("" + a + b + c + d + e + f + g + h);14 }15 } What is the result? 10 int i=3, j=0, result=1;11 result += i-- * --j ;12 System.out.println( result ); What is the result? 1 class Bool {2 static boolean b;3 public static void main(String [] args) {4 int x=0; 5 if (b ) {6 x=1;7 }8 else if (b = false) {9 x=2;10 }11 else if (b) {12 x=3;13 }14 else {15 x=4;16 }17 System.out.println("x = " + x);18 }19 } The presence of a mapping for a given key withinthis collection instance will not prevent the keyfrom being recycled by the garbage collector. Which concrete class provides the specified features? class A extends Thread { public void run() { try { synchronized (this) { wait(); } } catch (InterruptedException ie) { System.out.print(interrupted()); } } public static void main(String[] args) { A a1 = new A(); a1.start(); a1.interrupt(); }} What are the possible results of attempting to compile and run the program? class C { public static void main(String[] args) { Boolean b1 = Boolean.valueOf(true); Boolean b2 = Boolean.valueOf(true); Boolean b3 = Boolean.valueOf("TrUe"); Boolean b4 = Boolean.valueOf("tRuE"); System.out.print((b1==b2) + ","); System.out.print((b1.booleanValue()==b2.booleanValue()) + ","); System.out.println(b3.equals(b4)); }} What is the result of attempting to compile and run the program? abstract class TechnoSuper { abstract void TechnoMethod(); } class TechnoSub extends TechnoSuper { void TechnoMethod(); } Which of the following statements are legal instantiations of a TechnoSuper variable? interface Remote{ public void test();}public class Moodle{ public static void main(String argv[]){ Moodle m = new Moodle(); } public void go(){ //here }} public class Flip{ public static void main(String argv[]){ System.out.println(~4); }} public class Mickle extends Thread implements Runnable{ public static void main(String argv[]){ Mickle m = new Mickle(); m.start(); } public void run(){ go(); } public void go(){ int i; while(true){ try{ wait(); System.out.println("interrupted"); }catch (InterruptedException e) {} } }} class Wchapel{ String sDescription = "Aldgate"; public String getDescription(){ return "Mile End"; } public void output(int i ){ System.out.println(i); }}interface Liz{}public class Wfowl extends Wchapel implements Liz{ private int i = 99; public static void main(String argv[]){ Wfowl wf = new Wfowl(); wf.go(); } public void go(){ //here }} public class Tux extends Thread{; } } } class Base extends Object implements Runnableclass Derived extends Base implements Observer Given 2 variables created as follows: Base base = new Base();Derived derived = new Derived(); Which of the Java code fragments will compile and execute without errors? 1 public class EqualsTest {2 public static void main(String[] args) {3 Long L = new Long(5);4 Integer I = new Integer(5);5 if (L.equals(I)) System.out.println("Equal");6 else System.out.println("Not Equal");7 }8 } 1 public class Base extends Object {2 String objType;3 public Base() {4 objType = "Base";5 }6 }78 public class Derived extends Base {9 public Derived() {10 objType = "Derived";11 }12 public static void main(String[] args) {13 Derived derived = new Derived();14 }15 } What will happen when this file is compiled? 1 class Demo {2 String msg = "Type is ";3 public void showType(int n) {4 String tmp;5 if (n > 0) tmp = "positive";6 System.out.println(msg + tmp);7 }8 } Which of the following line revisions would eliminate this warning? char PiChar = XXXX;? 1] 's'). 'll:)
http://www.javabeat.net/cert/scjp-6-0/mocks/scjp_1_4_mock_exam_questions_16.php
CC-MAIN-2013-48
refinedweb
1,429
55.24
Opened 14 years ago Closed 14 years ago Last modified 12 years ago #259 closed defect (invalid) Admin errors with edit_inline and foreign keys. Description The following model breaks the admin interface: from django.core import meta # Create your models here. class Parent(meta.Model): fields = ( meta.CharField('title', maxlength=50), ) admin = meta.Admin() def __repr__(self): return self.title class Child(meta.Model): fields = ( meta.CharField('title', maxlength=50), ) admin = meta.Admin() def __repr__(self): return self.title class Relate(meta.Model): fields = ( meta.ForeignKey(Parent, edit_inline=True, edit_inline_type=meta.TABULAR), meta.ForeignKey(Child), ) def __repr__(self): return self.get_parent().title + " -> " + self.get_child().title If there are no records in the 'relate' table, there appears to be no way to add them. If there are, then pressing 'save' in the parent admin view when one of the records shows a line of hyphens results in an error. Change History (4) comment:1 Changed 14 years ago by comment:2 Changed 14 years ago by I tried that -- the model above was an attempt to get a minimal model that still exhibited the behavior I was seeing. The big problem is not the display problem anyway, it's that pressing save gives this traceback: There's been an error: Traceback (most recent call last): File "/home/axa/django/django_src/django/core/handlers/base.py", line 63, in get_response return callback(request, **param_dict) File "/home/axa/django/django_src/django/views/admin/main.py", line 864, in change_stage new_object = manipulator.save(new_data) 1470, in manipulator_save new_rel_obj.save() 734, in method_save opts.pk.name), db_values + [getattr(self, opts.pk.name)]) File "/home/axa/django/django_src/django/core/db/base.py", line 10, in execute result = self.cursor.execute(sql, params) ProgrammingError: ERROR: invalid input syntax for integer: "" UPDATE test_admin_relates SET parent_id='4',child_id='' WHERE id='3' I realise I should probably have raised two separate cases and included the traceback in my report. Sorry. comment:3 Changed 14 years ago by This is due to the fact that you use edit_inline but didn't define any field with core=True. This is needed for django to know what lines actually are empty or deleted. If your child table has some name field or something like that that shouldn't be empty, just give that the core=True flag and then django won't try to save empty lines any more. At least that's what I stumbled over myself when I forgot to use core=True with edit_inline=True :-) You need to specify num_in_adminso that Django knows how many inline-editable fields should be there.
https://code.djangoproject.com/ticket/259
CC-MAIN-2019-51
refinedweb
432
51.24
Visual C++ - Sum of 0 to N Numbers - n (n+1) / 2 Here is the Visual C++ program for the sum of 0 - N using the formula n (n+1) / 2. Source Code #include <iostream> void main() { int N, sum = 0; std::cout << "Program for sum of all numbers from 0 - N\n"; std::cout << "Enter N: "; std::cin >> N; sum = N * (N+1) / 2; std::cout << "The sum of all numbers between 0 and " << N << " is: " << sum << "\n"; } Output Program for sum of all numbers from 0 - N Enter N: 100 The sum of all numbers between 0 and 100 is: 5050
http://www.softwareandfinance.com/Visual_CPP/VCPP_Sum_0_N_Numbers.html
CC-MAIN-2017-43
refinedweb
103
57.1
Verify whether s list of number is part of the fibonacci series c program to check whether a given number is a fibonacci number or not program to check fibonacci series properties of fibonacci numbers fibonacci sequence facts nth fibonacci number java fibonacci series in data structure check fibonacci series in c I have made a function which takes a list as an input and returns a list too. e.g. input is [4,6,8,10,12] and output should be [0,0,1,0,0] because 8 belongs in fibonacci series my code is for i in input1: phi=0.5+0.5*math.sqrt(5.0) a=phi*i out =[ i == 0 or abs(round(a) - a) < 1.0 / i]; return out; This will work: input1 = [4,6,8,10,12] out=[] for i in input1: phi=0.5+0.5*math.sqrt(5.0) a=phi*i out.append(i == 0 or abs(round(a) - a) < 1.0 / i); To convert bool to int import numpy y=numpy.array(out) new_output = y*1 Checking if a number is fibonacci – Ritambhara Technologies, How do you check whether a number is in Fibonacci series or not? Python program to check Fibonacci number # python program to check if given # number is a Fibonacci number import math # function to check perferct square def checkPerfectSquare (n): sqrt = int (math. sqrt (n)) if pow (sqrt, 2) == n: return True else: return False # function to check Fibonacci number def isFibonacciNumber (n): res1 = 5 * n * n + 4 res2 = 5 * n * n -4 if checkPerfectSquare (res1) or checkPerfectSquare (res2): return True else: return False # main code num = int (input ("Enter I would think that the best way is probably to write a function called is_fibonacci, which takes a numerical input and returns True if the input is a fibonacci number, otherwise False. Then you can just do a list comprehension on your initial list input1: return [1 if is_fibonacci(num) else 0 for num in input1]. (Of course, is_fibonacci could automatically return 1 or 0 instead of a Boolean, in which case the list comprehension is even simpler.) Writing the is_fibonacci function is an interesting exercise that I will leave to you :) (But happy to help if you are struggling with it.) How to Calculate the Fibonacci Sequence (with Pictures), since (5*3*3 + 4) is 49 which is 7*7. 2 + 4 or in the form 5i 2 – 4 This should solve I guess import math # A function that returns true if x is perfect square def isPerfectSquare(x): s = int(math.sqrt(x)) return s * s == x # Returns true if n is a Fibinacci Number, else false def isFibonacci(n): return isPerfectSquare(5 * n * n + 4) or isPerfectSquare(5 * n * n - 4) i = [4, 6, 8, 10, 12] print(i) j = [] # A utility function to test above functions for item in i: if (isFibonacci(item) == True): j.append(1) else: j.append(0) print(j) Output: [4, 6, 8, 10, 12] [0, 0, 1, 0, 0] What is the 10th number in the Fibonacci sequence?, , you should think of 0 coming before 1 (the first term), so 1 + 0 = 1. Active 3 years, 4 months ago. Viewed 18k times. 37. We are given a sequence of numbers, as a vector foo. The task is to find is foo is monotonically increasing - every item is less than or equal to the next one - or monotonically decreasing - every item greater than or equal than the next one. This does what you want def isFibonaccy(inputList): out = [] for i in inputList: phi = 0.5 + 0.5 * math.sqrt(5.0) a = phi * i out.append(int(i == 0 or abs(round(a) - a) < 1.0 / i)) return out print(isFibonaccy([4, 6, 8, 10, 12])) # -> [0, 0, 1, 0, 0] What is the Fibonacci Sequence (aka Fibonacci Series)?, 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946… This code is tested in Keil uVision 4. Developed for ARM LPC2148 by Abhay Kagalkar ARM Code : AREA Prime_or_Not,code,readonly ENTRY MOV R0,#15 ;Number which you want to test CMP R0,#01 ;Comparing with 01 BEQ PRIME ;If equal declare directly as prime CMP R0,#02 ;Compare with 02 BEQ PRIME ;If equal declare directly […] Verify whether s list of number is part of the fibonacci series, This will work: input1 = [4,6,8,10,12] out=[] for i in input1: phi=0.5+0.5*math.sqrt(5.0) a=phi*i out.append(i == 0 or abs(round(a) - a) < 1.0 / i);. Enter a positive number: 12331 The reverse of the number is: 13321 The number is not a palindrome. In the above program, use is asked to enter a positive number which is stored in the variable num. The number is then saved into another variable n to check it when the original number has been reversed. How to Check if a given Number is Fibonacci number?, A number is given to you, how will you check if that number is a Fibonacci L and S within a given fixed length results in the Fibonacci numbers; the number of 1. Select the list you want to check the certain value from, and click Kutools > Select > Select Specific Cells. See screenshot: 2. In the Select Specific Cells dialog, select Equals from the first drop down list in Specific type section, and then enter the value you want to check and locate into the next textbox. The Mathematical Magic of the Fibonacci Numbers, Algorithm · Array · Strings · Linked List · Tree A simple way is to generate Fibonacci numbers until the generated number is about Fibonacci numbers that can also be used to check if a given number is Fibonacci or not. int s = sqrt (x); The k-Fibonacci sequence is defined by the numbers which satisfy the second order recurrence relation F k,n = kF k,n−1 + F k,n−2 with the initial conditions F k,0 = 0 and F k,1 = 1. Falcon [6] defined the k-Lucas sequence which is companion sequence of k-Fibonacci sequence defined with the k-Lucas numbers which are defined with - What's the problem you are facing exactly? - You don't need semicolons at the end of lines. - I have a function which takes input as list of numbers and should return the output is list as well, input1=[4,6,8,10,12] and it should return [0,0,1,0,0] because 8 belongs in fib series and rest dont - Here is a working shorter version of your code: phi=0.5+0.5*math.sqrt(5.0)and then out = [1 if abs(round(phi*i) - phi*i) < (1/i) else 0 for i in input1]using list comprehension. I replaced aby phi*i. If something unclear, feel free to ask - it returns 0 0 0 0 0 only - Print your out and compare it to the OP's desired output. Do you get the same format of output? I don't - Can you make it 0 and 1 for the sake of OP - @MahinMalhotra: Try my answer in the comments above
http://thetopsites.net/article/52404133.shtml
CC-MAIN-2020-45
refinedweb
1,202
66.37
Anyone who knows me very well could probably tell you that I’m a pretty big fan of Particle, a provider of hardware and software components for building internet-connected products (IoT). I love their product suite because they have abstracted the common functions of IoT products into easy-to-use components while still allowing access to all the nitty-gritty details for those of us who need to get down to that level. Recently, I was working on a project where I needed to add a display to a device that I had built. I wanted to use the Particle Photon to present some status to the user, so I picked up a cheap OLED display on Amazon, wired it up, and within no time, I was rendering text and graphics on the display. Below, I will outline the process I followed to get it working. Choosing a Display Finding a display was the first step. I searched Amazon for “SPI OLED Display” and quickly found the product shown below. The one I bought was from a seller called HILetGo, but there were actually many sellers offering essentially the same thing. If you’d rather not go through Amazon, you can buy a similar device from Adafruit or SparkFun. These types of displays can be controlled by either I2C or SPI. Personally, I prefer working with SPI because it’s easier to implement, and it’s usually faster for transferring data. The resolution of this display is 128 x 64. Each pixel is either on or off; there is no color variation, but you can vary the brightness. You can also find displays with different color options. This display, and the others like it, all use the same display driver chip, the SSD1306. This chip accepts commands via I2C, SPI, or parallel interfaces. Open-source libraries are readily available for talking to them. Wiring It Up To communicate with this chip via an SPI interface, you will need five micro-controller pins. Three are the typical SPI signals for Clock, MOSI, and Chip Select. The other two are the DC (Data/Command) and Reset signals. Additionally, the board requires power and ground as usual. This particular display can be powered from three tp 5VDC, but not all of them accept that wide of a range, so check the datasheet. The labeling on these boards doesn’t make it super-obvious which pins are for what purpose. That’s because the pins are used for different purposes depending on which interface you are utilizing. When using the SPI interface, the signals map to the pin labels as follows: SPI Clock: “D0” SPI MOSI: “D1” Data/Command: “DC” Chip Select: “CS” Reset: “RES” Next, you’ll need to figure out which pins to connect these to on your Particle device. The DC, CS, and Reset pins can be connected to any GPIO pins that you have available. The other two require the use of the SPI peripheral, so you’ll need to check the Particle reference document to determine which pins connect to the SPI Clock and MOSI. For the Photon, those pins are A3 and A5, respectively. If for some reason those pins are unavailable, there is a second SPI peripheral available on the Photon. Adafruit Libraries Now that you have the display wired up to your Particle board, the next step is to pull in a library so that you can talk to it. Conveniently, Adafruit has written an open-source library called Adafruit_SSD1306 which is specifically designed for talking to this display driver. The Adafruit_SSD1306 is really just a thin wrapper on top of another library, Adafruit_GFX, which does most of the heavy lifting of rendering lines, shapes and fonts. The Adafruit_SSD1306 library handles the SPI/I2C communication and the formatting of the commands and data to send to the driver. If you’re building your project with Particle’s web-based IDE, then adding the library is as simple as clicking on the Libraries icon, searching for “Adafruit_SSD1306”, and clicking Add. If you are using the Particle CLI to build your project, you can add the library by executing the following command: particle library add Adafruit_SSD1306. After that, you’re ready to start writing code and printing things to your display. Sample Code To initialize the display, all you have to do is create an instance of the Adafruit_SSD1306 class and call the begin() function on it. The code below initializes the display driver and shows the Adafruit splash screen for two seconds. #include "Adafruit_SSD1306.h" #define OLED_DC A1 #define OLED_CS A2 #define OLED_RESET A0 static Adafruit_SSD1306 display(OLED_DC, OLED_RESET, OLED_CS); void display_init() { display.begin(SSD1306_SWITCHCAPVCC); display.display(); // show the splash screen delay(2000); display.clearDisplay(); // clear the screen buffer display.display(); } The Adafruit_GFX library can render text with various sizes and can even invert the pixels to produce a highlighted effect. The following code sets the font size and cursor position, then renders a few lines of text to the display. display.clearDisplay(); display.setTextSize(2); display.setTextColor(WHITE); display.setCursor(0,0); display.println("Atomic"); display.println("Object!"); display.println("SSD1306"); display.display(); Sorry for the poor images. My display is covered by a piece of plexiglass that has a couple small scratches on it! Rendering bitmap images is really easy, too. Start out with a bitmap image with a resolution that’s less than or equal to your display. Using a program like Adobe Photoshop, adjust the image so that every pixel is either white or black. Then, use a program like Image2Code to convert the image to an array of bytes. Finally, add the byte array to your program and call display.drawBitmap(...) to render the image. uint8_t const ao_logo[] = { ... output from Image2Code here ... }; display.clearDisplay(); display.drawBitmap(0, 0, ao_logo, 128, 64, WHITE); display.display(); There is a ton more that you can do with this library, including drawing lines, curves, importing different fonts, etc. Hopefully this is enough to get you started. Now go make pretty things! Resources Display on Adafruit SSD1306 Datasheet Tutorial on Adafruit Adafruit_SSD306 Source Code Adafruit_GFX Source Code
https://spin.atomicobject.com/2017/10/14/add-oled-particle-device/
CC-MAIN-2018-43
refinedweb
1,021
62.98
x::run() adapts std::thread and std::packaged_task to LibCXX's reference-counted object model. x::run() takes a reference to an object with a run() method, which gets invoked in a new thread. #include <x/obj.H> #include <x/ref.H> #include <x/threads/run.H> class buttonObj : virtual public x::obj { public: bool run(int x, int y); buttonObj() noexcept; ~buttonObj(); // ... }; typedef x::ref<buttonObj> button; // ... button okButton=button::create(); // ... x::runthread<bool> ret=x::run(okButton, 100, 100); // ... if (ret->terminated()) // ... ret->wait(); bool status=ret->get(); In Makefile.am: AM_CXXFLAGS=@STDTHREAD_CXXFLAGS@ x::run() and x::start_threadmsgdispatcher() requires additional compilation flags for threading support added to the Makefile.am, from the @STDTHREAD_CXXFLAGS@ which gets set up from configure.ac. The first parameter to x::run() is a reference to an object that itself implements a run() method, possibly with parameters. x::run takes the reference to an object, and invokes the referenced object's run(), forwarding to it the remaining arguments to x::run(). The referenced object's run() gets invoked in a new execution thread, meanwhile x::run() returns a x::runthread<. The arguments to T> run() must be copy-constructible. x::run() copies the arguments, and the thread object's run() gets invoked with the copied arguments, which get destroyed after run() returns, and just before the new execution thread terminates. x::run() takes care of instantiating a new std::thread, and joining the thread when it's done. With x::run(), there is no concept of joinable and detached threads. The thread started by x::run() holds its own reference on the object whose run() method got invoked, and releases the reference when run() returns. The calling thread may keep its reference to the object, for other purposes, or all of its references to the object can go out of scope, but the new thread's reference keeps the object from getting destroyed until run() returns. When run() returns, an internal cleanup thread takes care of joining the terminated thread. x::run() returns a x::runthread<, where T> T is the type of the return value from the thread object's run(). Its terminated() method returns a boolean that indicates whether run() in execution thread started by x::run() returned and the thread has terminated. get() waits for the run() method to return, and if T is not void, returns its return value (the return type of run() must be, naturally, copy-constructible. If the execution thread terminated with an exception, rather than returning from its run(), get() rethrows that exception. wait(), wait_for(), and wait_until() wait until the execution thread terminates (either by returning from its run(), or by throwing an uncaught exception). wait() waits indefinitely, until run() returns. wait_for() and wait_until() take a std::chrono::duration or a std::chrono::time_point, respectively, setting the timeout for the wait. All execution threads are expected to terminate before the main application exits by returning from main() or by calling exit(). A warning message gets printed to standard error if not, and abort() follows if the remaining threads still do not terminate after thirty seconds. x::runthread<T> refers to a template class that inherits from a non-template x::runthreadbaseObj class, whose reference type is x::runthreadbase. It implements just the terminated() and wait() methods. In contexts where the return value from an object's run() is not required, this allows implementation of non-templated code that waits for arbitrary execution threads to terminate.. run() methods must be copy-constructible It's already been mentioned that arguments to execution threads' run() methods must have a copy constructor. #include <x/obj.H> #include <x/ref.H> #include <x/threads/run.H> class widget; class rendererObj : virtual public x::obj { public: void run(widget &w); // ... }; void runawidget(const x::ref<renderObj> &r, const widget &w) { x::run(r, w); } In this example, the thread object's run() method takes a reference to a non-constant widget object. However, the argument to x::run() is a reference to a constant widget object. This is because the arguments get copied for the new execution thread. The thread object's run() method get invoked with the thread's copy of each argument passed to x::run(). The run() method's prototype can specify either a constant reference, or a mutable reference to a type, in either case it'll get resolved. This means that although an object may have overloaded run() methods, a run() that takes a reference to a constant object will never be used if there's an overloaded run() method that takes a reference to a mutable object (as long as all other parameters are the same). template<typename objClass, typename baseClass, typename ...Args> auto start(const x::ref<objClass, baseClass> &thread, Args && ...args) -> typename x::runthread<decltype(thread->run(x::invoke_run_param_helper <Args>()...))> // ... As described previously, x::run() returns a x::runthread<, where T> T gives the return type of the object's run(). Sometimes its useful to define a template that uses a related type, such as a corresponding x::ptr, instead. x::invoke_param_helper() helps in construing the parameters to a run as if they were invoked in the executed thread, given the original parameters to x::run(). Its definition is very short: template<typename param_type> class run_param { public: typedef typename std::decay<param_type>::type &type; }; template<typename param_type> typename run_param<param_type>::type &invoke_run_param_helper(); Each parameter to x::run() is decay-copied into the new execution thread's context, then passed by reference to a run() method. To supply a default thread name for logging purposes, subclass from x::runthreadname and implement getName(), as follows: #include <x/obj.H> #include <x/runthreadname.H> class myThreadObj : virtual public x::obj, public x::runthreadname { public: // ... void run( ... ); std::string getName() const { return "mythread"; } }; x::run() invokes getName() prior to invoking the thread object's run(), to set the thread's name, for logging purposes. By default, x::run() has no issues with starting multiple concurrent threads, at the same time, using the same class instance. To prevent that, subclass x::runthreadsingleton: #include <x/obj.H> #include <x/runthreadsingleton.H> class myThreadObj : virtual public x::obj, virtual public x::runthreadsingleton { // ... }; x::run() now throws an exception if an earlier x::run() spawned a thread on the same object, and the earlier thread is still running. Use virtual public inheritance to subclass x::runthreadsingleton, so that a subclass that inherits from multiple thread singletons gets a single instance of x::runthreadsingleton. auto ret=x::run_lambda([] (const x::netaddr &addr) { x::fd sock=addr->connect(); return sock; }, x::netaddr::create("localhost", "http")); ret->wait(); x::fd val=ret->get(); x::run_lambda() starts a new thread that starts running the lambda given as its first parameter, then returns a x::runthread<, that can be used to wait for the lambda to finish, then retrieve the return value from the lambda. T> x::run() takes care of the hard work of using std::thread directly, notably the requirement to join the started thread before std::thread's destructor gets invoked. std::thread is privately owned by a x::runthread< that gets returned by T> x::run(). Additionally, the started thread maintains its own reference on the thread object, and the x::runthread instance. If all other references to the thread object go out of scope, the thread object does not get destroyed before its run() returns, since it holds the last remaining reference to the thread object. Furthermore, there's also an indirect reference on the x::runthread, with its private std::thread instance, that does not get released until after run(), at which point its turned over to a cleanup thread. The first call to x::run() starts a separate thread that joins all threads that return from thread objects' run()s. A single cleanup thread gets used for all x::run()s-started execution threads. A terminated thread's x::runthread, containing its std::thread, gets turned over to the cleanup thread, which joins it, sets its x::runthread's terminated() to true, and makes the return value from the thread object's run() get()able from the x::runthread. Even if the x::runthread that's returned by x::run() gets ignored, an internal reference to it gets held by the executing thread. This keeps it from getting destroyed until run() returns and the thread terminates. When that happens, the x::runthread gets turned over to the cleanup thread, which joins the terminated thread, and then releases the last reference on the x::runthread, finally destroying it. For this reason, the x::runthread could, but should not be used as a mcguffin. The cleanup thread is unable to continue joining other threads until any destructor callbacks return. fork() invalidates all threads and all thread support library classes. They are used extensively by LibCXX, so after a fork(), the child processes cannot use any LibCXX classes or methods. fork() has no effect in the parent process. All threads remain valid. All thread objects remain valid. Use x::forkexec to safely fork() and exec() another process. See also: Chapter 16, Forking other processes. The full log message format generated by the application logging subsystem includes the name of the running thread. This is set by getName() method of the thread object passed to x::run(), if the thread class inherits from x::runthreadname, or a default name.
http://www.libcxx.org/ethreads.html
CC-MAIN-2018-39
refinedweb
1,565
54.42
Useful Scala Compiler Options (Part 3) Useful Scala Compiler Options (Part 3) The third part in the series on Scala compilers focuses on -Xlint. See how it can help improve your code and avoid funky code smells. Join the DZone community and get the full member experience.Join For Free In my previous two posts on Scala Compiler options, we saw a number of options that can improve your experience developing Scala. In this post I want to focus on one option in particular: -Xlint. If you thought the other options made your life better, this one will improve it by leaps and bounds. -Xlint enables a number of linting options in the Scala compiler that will produce warnings about various code smells. There are 15 linting options in Scala 2.11. By default, they are disabled, but can all be enabled by adding -Xlint to your scalacOptions setting. They can also be enabled individually by using -Xlint:<option>. Most of the resources I've seen suggest enabling all of the options and calling it a day. This is good advice and you should probably follow it, but I wanted to take some time to dig into what you are actually getting when you enable this option. In addition, it's very helpful to see the linting warnings to understand what issue the compiler has surfaced and why it was produced. Adapted Args The Scala compiler can attempt to adapt a set of arguments into a tuple. This can lead to an issue where a tuple is passed to a parameterized function that takes a single argument. There are several ways to catch adapted arguments, as I've mentioned in previous blog posts, but this is yet another way to handle it. As we have seen before, this warning can be triggered by trying to pass a tuple to a single argument constructor: def insert[A](value: A): Long = ??? insert(1,2,3,4) Nullary Unit In Scala, functions that take no arguments (nullary functions) can be defined in one of two ways: def executeQuery: Int def executeQuery(): Unit However, the recommended style is to use the parenthesis when the function produces a side effect. So a code block like the following will trigger the Nullary Unit warning: def executeQuery: Unit = () warning: side-effecting nullary methods are discouraged: suggest defining as `def nullary()` instead def executeQuery: Unit = () ^ Nullary Override Nullary methods can cause us more pain, because methods defined without parenthesis are actually considered different methods signatures: trait Row { def columns: Int = ??? } class PGRow extends Row { override def columns(): Int = ??? } warning: non-nullary method overrides nullary method override def columns(): Int = ??? This can also be a pain point when trying to interoperate with Java. If we had a Java class that inherited from Row in the previous example, we would also have this issue. Inaccessible Due to Scala’s scoping rules, it is possible to define classes and methods in such a way that they are impossible to override because their arguments are private: object Database { private class DatabaseConnection class DatabaseConnectionPool { def apply(conn: DatabaseConnection): DatabaseConnectionPool = ??? } } warning: method apply in class DatabaseConnectionPool references private class DatabaseConnection. Classes which cannot access DatabaseConnection may be unable to override apply. def apply(conn: DatabaseConnection): DatabaseConnectionPool = ??? ^ In this example, the DatabaseConnection is exposed in the DatabaseConnectionPool’sapply method, but it is private to the Database object. While this is valid Scala code, it can be a code smell because if we try to extend DatabaseConnectionPool we will be unable to. Infer Any When we let the compiler infer the types of our values, we can sometimes get surprising results. In the worst case, the compiler can’t infer anything about the value that we gave it and must resolve it to Any. In the vast majority of cases, we don’t want our values to just be Any, so it would be helpful if the compiler would warn us when a value was inferred to be Any. val values = Seq(4, 4, "", 'g) warning: a type was inferred to be `Any`; this may indicate a programming error. val values = Seq(4, 4, "", 'g) Missing Interpolator Scala offers us string interpolation through StringContext. An example of basic interpolation is `s"$x is a number"`. Sometimes, we forget to add the interpolator: def displayRow(row: Row) = "$row" warning: possible missing interpolator: detected interpolated identifier `$row` def displayRow(row: Row) = "$row" ^ In this case, we can get an error warning us that we probably forgot s. Note that this warning will not trigger if there is no variable in scope that comes after $ in the string: def displayRow(row: Row) = "$table" Doc Detached I find this option to be quite puzzling because, try as I might, I cannot trigger it. At first glance, its name suggests that it will warn that you have free hanging documentation blocks; however, this is not the case. I looked at the source code of the compiler and found a comment saying that it will “only warn in the presence of suspicious tags that appear to be documenting API.” Basically, this option is supposed to warn you if you have free-hanging API documentation. Despite being able to see the heuristic for what constitutes API documentation, I still cannot produce the warning from this option. If anyone has found this option useful in the past, I’d be interested to hear about your experience with it. Private Shadow Sometimes we have to deal with mutable variables. The linter can provide some protection from shadowing names of mutable variables such that they would cause the variable from a parent class to not receive the assignment. In this case, assigning to conn would change in PGDatabase but not in Database: class Database { val conn: Connection = ??? } class PGDatabase extends Database { private[this] val conn: Connection= ??? def updateConnection(connection: Connection) = conn = connection } The linter can warn us of this: private[this] variable conn in class PGDatabase shadows mutable conn inherited from class Database. Changes to conn will not be visible within class PGDatabase - you may want to give them distinct names. conn = connection ^ Type Parameter Shadow Similar to the private shadowing issue, type parameters can be shadowed as well. It is unlikely that you want to shadow a type parameter (although you can), so this lint warning will prevent you from writing code like the following: class Table[T] { def column[T](a: String): T = ??? } :12: warning: type parameter T defined in method bar shadows type T defined in class Table. You may want to rename your type parameter, or possibly remove it. def column[T](a: String): T = ??? ^ defined class Table In this case, we defined the type parameter on the class and then redefined it on the method. Poly Implicit Overload This warning is less relevant these days, as View Bounds have been deprecated for a while, and as far as I’ve seen, not really used anyway. The gist of the error is that if you have two implicit definitions and one of them is parameterized and you then attempt to use the parameterized definition in a View Bound, the Scala compiler will emit an error that looks something like this: parameterized overloaded implicit methods are not visible as view bounds Option Implicit In Scala, we make use of implicits, sometimes without being fully aware of what we are relying on. Often the only reason we are able to treat one value as another is the result of an implicit that we were unaware of. This can be especially problematic when converting from Java classes to Scala classes that have an implicit conversion in the Predef: case class Row(name: String, value: Option[Double]) { def this(value: java.lang.Double) = this("field", Option(value)) } This compiles because Scala's Predef defines implicit conversions from Java's String and Double to Scala's String and Double. However, there is a problem. If value is passed into the auxiliary constructor as null, then a Null Pointer Exception will be raised. To warn of these implicit conversions being applied when creating an Option, we can use option-implicit to generate this warning: warning: Suspicious application of an implicit view (scala.this.Predef.Double2double) in the argument to Option.apply. def this(value: java.lang.Double) = this("field", Option(value)) Delayed Init Select Scala’s DelayedInit delays the initialization of code in a class or object body. Although it is now deprecated, it still appears regularly enough in Scala applications in the form of the App trait. Problems can occur when using values that are exposed from classes of objects from outside of that scope: object DataBaseConnection { val maxConnections = Main.maxConnections } object Main extends App { val maxConnections = 5 } Main.scala:2: warning: Selecting value maxConnections from object Main, which extends scala.DelayedInit, is likely to yield an uninitialized value val maxConnections = Main.maxConnections As the error indicates, it is possible that Main.maxConnections has not been initialized when it is being used inside DataBaseConnection. By Name Right Associative Sometimes some of Scala’s more powerful features don’t always play well together. One example is trying to use a right associative method with a by-name parameter: class Database { def >>:(x: => Row): DatabaseId = ??? } warning: by-name parameters will be evaluated eagerly when called as a right-associative infix operator. For more details, see SI-1980. def >>:(x: => Row): DatabaseId = ??? As we can see, due to a compiler bug, we cannot have the argument be both a by-name parameter and a right associative function. If you want to learn more about why this is, take a look at SI-1980. Package Object Classes This warning might seem a little odd at first. It will raise a warning when you have defined a class inside a Package Object: package object db { case class DbValue() } warning: it is not recommended to define classes/objects inside of package objects. If possible, define class DbValue in package db instead. While it might seem no different than defining DbValue in the db package, it is actually discouraged because it can be problematic for the compiler. In addition, there is the chance of naming collisions between projects under the same package name that depend on each other. Unsound Match The unsound match option is hugely beneficial especially if you find yourself using more complicated match statements. In many cases, the compiler can determine if your match statement has holes in it that could cause a value to fall through and cause a MatchError. For example, if you match on an Option type, and only have a branch for Some, the compiler can warn you: def parseResultSet(res: Option[Int]): Int = res match { case Some(v) => v } warning: match may not be exhaustive. It would fail on the following input: None def parseResultSet(res: Option[Int]): Int = res match { ^ However, this will not catch logic errors, so it is still possible to write match statements that cause errors: def parseResultSet(y: Option[Int]): Int = y match { case Some(v) if v < 0 => v case None => 0 } This block of code will throw an error when Some(1) is passed in, but this cannot be caught by the linter. Stars Align In addition to matches being unsound, it is also possible to pattern match case classes with variable arguments in such a way that is valid code, but can result in odd errors. The following example shows two cases in which this can happen: trait Row case class Insert(table: String, rows: Row*) def insert(i: Insert) = i match { case Insert(table, rows) => case Insert(table, head, tail @ _*) => } :17: warning: A repeated case parameter or extracted sequence is not matched by a sequence wildcard (_*), and may fail at runtime. case Insert(table, rows) => ^ :18: warning: Sequence wildcard (_*) does not align with repeated case parameter or extracted sequence; the result may be unexpected. case Insert(table, head, tail @ _*) => ^ In the first case, the rows may not match depending on the number of elements in that field. In the second case, we try to capture the head and the tail of the sequence, which can also fail to match at runtime. Wrapping Up Hopefully this deep dive into -Xlint has given you a better understanding of a number of code smells that can crop up in Scala and how to catch them at compile time. Armed with this knowledge, you should experience a significant improvement in your ability to develop in Scala. Published at DZone with permission of Ryan Plessner , DZone MVB. See the original article here. Opinions expressed by DZone contributors are their own. {{ parent.title || parent.header.title}} {{ parent.tldr }} {{ parent.linkDescription }}{{ parent.urlSource.name }}
https://dzone.com/articles/useful-scala-compiler-options-part-3?fromrel=true
CC-MAIN-2019-30
refinedweb
2,114
50.57
The root of all evil is optimization? Or apathy?14 Jun 2013 This post was imported from blogspot. You've probably heard the refrain "Premature optimization is the root of all evil". Well, how did that turn out? Every Windows computer is filled with little gadgets in the system tray. Users may not know what those little icons are, but each one seems to make the hard drive thrash for 10 additional seconds on startup, and uses 10 additional megabytes of RAM. Plus there's all these hidden services that the user cannot see or measure, but slow down the PC just as much as those system tray icons. Of course, some of these apps are small, optimized, and necessary, but a few bad apples (which users have no way to locate) ruin the startup experience. I have a somewhat different opinion: I think that optimization is the main job of many programmers—not all programmers by any means, but many. Look, here's an algorithm that searches a list of points for the closest one: using System.Windows; ... public int ClosestPointTo(Point near, IList<Point> list) { return list.IndexOfMin(p => (p - near).Length); } Well, that was easy! So how come I spent days researching and writing an R*-tree implementation? Because the easy solution is just too damn slow! Anybody can find "naive" solutions to problems, and if that was all we needed, it would be easy to find programmers that are "good enough". But inevitably, as the problem size grows larger, the naïve solution isn't good enough. And when the problem size gets really huge (as it inevitably will for somebody), even the solutions everyone thought were good become useless. I admit, I have a bad habit of premature optimization, and it is a vice, sometimes. For example, for my company I wrote turn-by-turn navigation software called FastNav, which requires files in a proprietary format called a "NaviMap" file, which are converted from Shapefiles. I thought it would be neat to "script" the conversion process with text files, using ANTLR to parse expressions that would then be interpreted, but I was concerned that interpreting dynamically-typed expressions would be slow. So I spent a lot of time writing a little compiler that converted these textual expressions to statically-typed, compiled MSIL, typed according to the schema of the Shapefile. So now I have this ultra-fast expression evaluator. But guess what? My MapConverter is still slow to this day, because it turned out that the bottleneck was elsewhere (I improved the worst bottleneck, which left other bottlenecks that were difficult to fix. Users weren't complaining, so I let it be). But FastNav itself was also too slow, running on a 400MHz WinCE device, and I spent six months just optimizing it until my boss was satisfied (and that was after writing all the drawing primitives from scratch because WinCE drawing code is abysmal and AGG, while faster than WinCE itself, was still too slow). There are no good profilers for WinCE, and over time I developed an intuition that the bottlenecks of the code on WinCE were dramatically different than the bottlenecks on the desktop (actually, on the desktop version, there weren't really any bottlenecks to speak of); so much so that desktop profiling results were completely useless. So I painstakingly benchmarked flash I/O performance (horribly slow), floating point (horribly slow), font drawing (horribly slow if the text is rotated, fast otherwise), and all the various modules of FastNav, optimizing each one until the product was finally usable. I even optimized std::vector (writing a replacement called inline_vector and then, finding that this didn't really help, a simpler replacement called mini_vector), implemented my own hashtables, and replaced the memory manager (new and delete) to optimize small allocations. Optimization has always been an important and necessary part of my work. Around 1998 I wrote the (now-dead) Super Nintendo emulator SNEqr in C++, but I was told that C optimizers are "really good now" and there's no reason to use assembly language anymore. Well, silly me, I believed them and wrote the CPU emulator in C--it was horrifically slow, and became about 10 times faster when I rewrote it in assembly language. And every program I write seems to end up with something that is too slow, something that either gets optimized--or that users just have to live with. After all this experience, I have a tendency to optimize sooner rather than later, and it can be a bad habit because I may choose to optimize the wrong things--the non-bottlenecks. But I'm convinced that premature optimization is nowhere near as bad as not giving a f*ck, which is a much more common practice. For example, how as it that every other program needs a splash screen and takes a few seconds to start on an idle system? I have never written a program that takes more than a second or two to start--except thanks to big and slow third-party components. I recently made an app for Taxi dispatchers called IntelliMap. On my fast developer machine it takes at least 6 seconds to restart after having started once. But that's the WPF version. I originally wrote it with WinForms and that version restarts instantaneously, as if it was Notepad or something. But I was told that the user interface looked "too 90s" and should be modernized using WPF and Infragistics controls. Luckily I had used the MVVM pattern, and I was able to switch to new view code while using the same models and viewmodels. In fact, I kept the WinForms version operational in the same executable file. To this day you can start it with the "--winforms" switch and it starts instantly, albeit with a "90's" interface, and fewer features since I didn't bother maintaining the WinForms version. The problem is worse than it sounds. Because while it might take 6 or 7 seconds to restart on my fast developer machine, it takes over 45 seconds to restart (not cold-start) on one of our client's machines. And it's not just startup time; the WPF UI is more sluggish, and uses a lot more memory. This really ticks me off. I wrote a program that starts instantly. But then I had to use second- and third-party libraries that are hella slow. The "Premature optimization" argument says you should wait to optimize; wait until your application is slow, then profile the code to find and remove the bottlenecks. But there are three problems: - If you're waiting for it to be slow on your fast developer machine, you're waiting too long. Some of your end users will have much older, slower hardware. - If you don't have good habits, then your code will be slow throughout. So there won't just be one or two bottlenecks you have to optimize, but many; each bottleneck you fix will just cause the next one to become more apparent. If you have a habit of writing fast code, the bottlenecks will be fewer and you'll expend less effort optimizing (unless of course, the OS itself is slow, WinCE I'm talking to you). - This argument is hard to apply to libraries. Apparently Microsoft and Infragistics felt that their WPF controls were fast and lean enough for them. But it's not fast enough for me! When writing a low-level library that other people will rely on, it's no good for a developer to wait until it's too slow for them. Libraries are used for many reasons by many people. Library code that is not a bottleneck in one application will surely become a bottleneck in some other application. Every application stresses low-level libraries somehow, but each app causes stress in a different place. This implies that core, oft-used libraries should be optimized uniformly. You might say "well, even so, it's only inner loops that need optimization". But lots of non-loops need optimization too, just in case the client application calls those non-loops inside an important loop. In my opinion, the lower level the code is, the more important its speed is. I write a lot of low-level code, so speed is almost always important to me. And it's irritating to have to rely on slow libraries written by others, especially closed-source commercial stuff that I cannot even understand, let alone do anything about. And when it comes to code that is used by lots of different people, premature optimization of the public interface or the system architecture may be warranted even when optimization of the implementation is not. I don't have any great examples handy, but consider the IEnumerator interface: you have to call MoveNext() and then Current--two interface calls per iteration. Since this is a fundamental, ubiquitous interface, used constantly by everyone and often used in tight loops, it would have been good if it could iterate and return the next item with a single interface call: bool MoveNext(out T current). Since it's a public API though, it cannot be changed; that's why public interfaces need careful design up-front. (Of course, performance isn't the only factor in API design; things like flexibility and ease-of-use are equally important.) You don't have to optimize alone Some people seem to believe that there are two kinds of languages: fast and efficient languages that make the developer work harder, like C/C++, and "RAD" languages that are easy to use and productive, like Ruby or C#, but have speed limits at runtime. Some people have assumed you can't have runtime performance and productivity all in one language, and I reject that assumption in the strongest terms. That language can exist, should exist, and even does exist to some extent (e.g. D2). The arguments against premature optimization are that it's a waste of time if you're optimizing the wrong thing, or that it makes code harder to understand, or that you might make a mistake and turn correct code into faulty code. But what if it was easy, and what if it didn't harm readability at all? Would there be a reason not to optimize then? An obvious example of this kind of optimization--easy optimization that doesn't harm readability--is when you go to your compiler settings and enable optimizations. Ahh, all in a day's work! But the optimizer can't do everything, because you have knowledge that it does not, and it will probably never be smart enough to convert your linear search of a sorted list into a binary search. In the long run, a big part of the solution is to give the compiler more knowledge, e.g. by using programming languages with features like "effects" and "global optimizations". Another big part of the solution is to have standard libraries that not only have lots of fast algorithms to call upon, but also make those algorithms easy to find and use. But there are also simple and easy optimizations that the programmer could use himself in his own code, that just require some tweaks to our programming languages. For instance, let's say you want to run some sort of search through some data structure, and scan the results only if there is more than one of them. It's so easy to write this: if (DoSearch().Results.Count > 1) foreach(var r in DoSearch().Results) { // do something with r }Now, if we refactor it like this instead: var rs = DoSearch().Results; if (rs.Count > 1) foreach(var r in rs) { // do something with r } That's 20 seconds we'll never get back. Or perhaps more than 20 seconds if this is an "else if" clause in a chain, because you'll have to spend some time thinking about how to refactor it: if (...) { ... } else if (DoSearch().Results.Count > 1) { foreach(var r in DoSearch().Results) { // do something with r } } else if (...) { ... } Plus, refactoring makes the code longer now. So should we even bother? Isn't this the premature optimization that we were warned about? But, what if the data structure is large? We shouldn't do the search twice, should we? I say this dilemma shouldn't exist; it is entirely a flaw in the programming language. That's why I defined the "quick binding" operator for EC#: if (DoSearch().Results=:rs.Count > 1) foreach(var r in rs) { // do something with r } It may look weird at first (it's reverse of the := short variable declaration operator in Go, and I am considering whether to use "::" for this operator instead) but now there's no dillema. It's easy to create a new variable to hold the value of DoSearch().Results, so you may as well just do it and move on. No need to weigh the pros and cons of "premature optimization". Another good example is LINQ. Suppose we have a long list of numbers and we'd like to derive another list of numbers. Doesn't matter exactly what the query says, here's one: List<int> numbers = ... // get a list somehow var numbers2 = (from n in numbers where n < 100000 select n + 1).ToList();But LINQ involves a bunch of delegate methods which, given the way .NET is designed, cannot be inlined. You can get more speed using a loop like this: for (int trial = 0; trial < 200; trial++) { numbers2 = new List<int>(); for (int i = 0; i < numbers.Count; i++) { int n = numbers[i]; if (n < 100000) numbers2.Add(n + 1); } } I just benchmarked this on my PC (200 trials, 1000000 random numbers of at most 6 digits) and got: LINQ: 2500ms (100579 results) for: 859ms (100579 results) foreach: 1703ms (100579 results) So the plain for-loop is almost 3 times faster (surprisingly the foreach version, not shown, is only slightly faster.) So, should you write a plain for-loop instead to get that extra speed? Usually, the answer is "of course not". But my answer is "of course not--your computer should write the plain for-loop instead". This is one of many reasons why EC# will have a procedural macro system. So that end-users can optimize code themselves, using macros to detect certain code patterns and rewrite them into more efficient forms. Of course, the most common optimizations can be bundled into a DLL and shared, so most people will not write these transformations themselves. Typically, a user will simply have to write a global attribute like [assembly: LinqToForLoop] to install the macro in their program, or they could attach an attribute to a class or method for more conservative optimization. I haven't actually figured out how the LinqToForLoop macro code would look. My thinking right now is that this type of macro, that looks for a code pattern and rewrites it, should "register" the kinds of nodes it wants to look at. The compiler will look for these nodes on the macro's behalf and give them to the macro when found. This will be more efficient than the obvious solution of simply passing "the whole program" to the macro and letting the macro find things itself. Since programmers will inevitably use lots of macros, it would be terribly inefficient for each one to scan the program separately.< Published on CodeProject >
http://loyc.net/2013/the-root-of-all-evil-is-optimization-no.html
CC-MAIN-2019-26
refinedweb
2,582
69.52
On Thu, 2006-12-14 at 14:58 -0500, Kyle McMartin wrote:> I posted a patch to Paul this week to fix this, Hm, I didn't see it on linuxppc-dev.> Since ppc32 can't do a 64bit comparison on its own it seems, gcc> will generate a call to a helper function from libgcc. What other> arches do is link libgcc.a into libs-y, and export the symbol> they want from it.You still get to 'accidentally' do 64-bit arithmetic in-kernel that waythough. Might be better just to provide __ucmpdi2, just as we have forthe other functions which are required from libgcc It'd be better just to fix the compiler though -- which is in fact whatthey've done:'ve applied this as a temporary hack to the Fedora kernel until thecompiler is updated there...--- linux-2.6.19.ppc/arch/powerpc/kernel/misc_32.S~ 2006-11-29 21:57:37.000000000 +0000+++ linux-2.6.19.ppc/arch/powerpc/kernel/misc_32.S 2006-12-17 12:19:48.000000000 +0000@@ -728,6 +728,27 @@ _GLOBAL(__lshrdi3) or r4,r4,r7 # LSW |= t2 blr +/*+ * __ucmpdi2: 64-bit comparison+ *+ * R3/R4 has 64 bit value A+ * R5/R6 has 64 bit value B+ * result in R3: 0 for A < B+ * 1 for A == B+ * 2 for A > B+ */+_GLOBAL(__ucmpdi2)+ cmplw r7,r3,r5 # compare high words+ li r3,0+ blt r7,2f # a < b ... return 0+ bgt r7,1f # a > b ... return 2+ cmplw r6,r4,r6 # compare low words+ blt r6,2f # a < b ... return 0+ li r3,1+ ble r6,2f # a = b ... return 1+1: li r3,2+2: blr+ _GLOBAL(abs) srawi r4,r3,31 xor r3,r3,r4--- linux-2.6.19.ppc/arch/powerpc/kernel/ppc_ksyms.c~ 2006-12-15 17:19:56.000000000 +0000+++ linux-2.6.19.ppc/arch/powerpc/kernel/ppc_ksyms.c 2006-12-17 12:16:54.000000000 +0000@@ -161,9 +161,11 @@ EXPORT_SYMBOL(to_tm); long long __ashrdi3(long long, int); long long __ashldi3(long long, int); long long __lshrdi3(long long, int);+int __ucmpdi2(uint64_t, uint64_t); EXPORT_SYMBOL(__ashrdi3); EXPORT_SYMBOL(__ashldi3); EXPORT_SYMBOL(__lshrdi3);+EXPORT_SYMBOL(__ucmpdi2); #endif EXPORT_SYMBOL(memcpy);-- dwmw2-To unsubscribe from this list: send the line "unsubscribe linux-kernel" inthe body of a message to majordomo@vger.kernel.orgMore majordomo info at read the FAQ at
http://lkml.org/lkml/2006/12/17/46
CC-MAIN-2013-20
refinedweb
392
56.76
Hi has anybody had a issue when processing a updateCursor over a versioned table that contains a blob field? If the table is not versioned the cursor completes ok but if it is versioned python totally crashes after processing a few records. I have also tested the size of the blob and it seems the if the size is smaller (~<500kb) the cursor completes without issue (versioned or unversioned). I am writing a script to reduce the size of images in a attachment table as it causes issues with collector taking them offline and have come across this issue. I have a work around but was just wondering if anyone else has come across this issue with the (da) updateCursor? What DBMS are you working with? By a few, do you mean 3 or so? How are you processing the blob before updating it? Hi Joshua, DBMS: SQL Server 2012 Yes only about 3 or 4 records process before it crashes. Even if I don't process the blob at all (i.e change nothing in the record) and perform the update it crashes? cheers Callum Is this a geodatabase table or feature class with attachments enabled, or were the blobs/images inserted into a SQL Server table through another means? I ask because so far I don't see this issue, so I am trying to understand what may be different with your environment. The more information you can give the better. For example, what desktop application are you using? ArcMap? Stand-alone Python script? What versions of software? What version of ArcGIS for Server? Can you provide snippets of the functional code so we can see all of the arguments you are passing? Yes it is a geodatabase feature class with attachments enabled. Basically I have a test script which cursors over the features in the feature class and then for each feature cursors over the related attachment records. Pretty standard stuff. It always crashes after 3-4 records. It is important to note that it only crashes when the feature class is registered as versioned and the images in the attachment table are large. I have also had a colleague of mine replicate the issue in a completely separate environment. We are using desktop 10.4.1 and ArcGIS for Server 10.3.1 Test Script: # Script to hightlioght insertCursor Issue on attachment table that is versioned in sde # # Callum Smith # 30/6/2016 import arcpy import os # Change dataPath to the location of the data ##dataPath = r'D:\CBS\cursorIssue\geodatabase.gdb' dataPath = r'D:\CBS\cursorIssue\DOWNERGIS@Dev@GISADMIN.sde' # Run for either Large Images or SmallImages fcName = 'FC_LargeImages' #fcName = 'FC_SmallImages' fc = os.path.join(dataPath, fcName) attachTable = os.path.join(dataPath, fcName + '__ATTACH') try: # Insert Cursor print 'Running the Cursor on the Featurclass...' fields = ['GLOBALID'] with arcpy.da.SearchCursor(fc, fields) as searchCursor: for row in searchCursor: globalID = row[fields.index('GLOBALID')] print 'Processing Feature: ' + str(globalID) edit = arcpy.da.Editor(dataPath) edit.startEditing(False, True) edit.startOperation() # Insert Cursor on attach Table. count = 1 whereClause = '"REL_GLOBALID" = ' + "'" + str(globalID) + "'" attachCusorFields = ['CONTENT_TYPE', 'DATA_SIZE', 'DATA', 'ATT_NAME'] with arcpy.da.UpdateCursor(attachTable, attachCusorFields, whereClause) as attachCursor: for attachRow in attachCursor: attName = attachRow[attachCusorFields.index('ATT_NAME')] print ' Attachment: {0} ---> {1}'.format(count, attName) attachCursor.updateRow(attachRow) count += 1 # Stop Editing. edit.stopOperation() edit.stopEditing(True) print 'Process Complete.' except Exception, err: print err This is the error I get. cheers Callum What version of Python interpreter are you using? I had this error when I was trying to manipulate some dataset, but the problem went away once I switched from 32 bit interpreter to 64 bit interpreter. Hi Dianna I have tried both the 32 and 64 bit versions and they both give the same error. cheers Callum Hi Callum, please open a support call so you get this fixed. There might be other workflows, like dumping and reloading downsized attachments. Thanks Bruce yes I have opened a call and are working through it with ESRI. I do have a workaround in place like you suggest which dumps the attachments to the file system, processes them and then reattaches them. Works fine. Hopefully ESRI will identify the issue with the updateCursor which I think is a bug? Will post any updates on this issue I get from ESRI here.
https://community.esri.com/t5/python-questions/issue-with-da-updatecursor-on-a-versioned-table-with-blob-field/m-p/504865
CC-MAIN-2021-04
refinedweb
721
58.79
This is a C Program to emulate N-dice roller. This can be done by generating random number between 1-6. Here is source code of the C Program to Emulate N Dice Roller. The C program is successfully compiled and run on a Linux system. The program output is also shown below. #include <stdio.h> #include <stdlib.h> #include <time.h> int main(int argc, char **argv) { printf("Enter the number of dice: "); int n, i; scanf("%d", &n); printf("The values on dice are: ( "); for (i = 0; i < n; i++) printf("%d ", (rand() % 6) + 1); printf(")"); return 0; } Output: $ gcc EmulateNDice.c $ ./a.out Enter the number of dice: 3 The values on dice are: ( 6 6 5 ) Sanfoundry Global Education & Learning Series – 1000 C Programs. Here’s the list of Best Reference Books in C Programming, Data Structures and Algorithms.
http://www.sanfoundry.com/c-program-emulate-n-dice-roller/
CC-MAIN-2017-39
refinedweb
143
75.2
Allow access to inline code blocks from Pure I had a thought that it might be nice to be able to overload the existing %< %> code block mechanism to also allow it to be used for entering long multi-line strings I thought perhaps the blocks could be annotated with something specific ... e.g., %< -*- str:mystr -*- Hello World %> This could be treated as being equivalent to defining a const string with the name mystr in some reserved namespace (e.g. __bigstrings__). Anyway, just an idea! I think that conflating big strings with inline code isn't such a great idea, I'm afraid that it would be rather confusing. Also, the syntax looks a bit awkward for this purpose. But feel free to supply a patch if it's still important for you. Closing the issue for now.
https://bitbucket.org/purelang/pure-lang/issues/34/allow-access-to-inline-code-blocks-from
CC-MAIN-2018-30
refinedweb
137
69.52
#include <c4d_falloffdata.h> A data class for creating falloff plugins. Falloffs appear in any falloff description (unless the flag PLUGINFLAG_HIDE is set during registration) and extend the functionality of effectors and anything that uses falloffs. Use RegisterFalloffPlugin() to register a falloff plugin. Called to initialize the falloff when it is first created. Called to initialize the falloff just before sampling. Allows to setup any necessary data in falldata or bc. Called to sample any point. Assign res to return the sampled value. Called to free the falloff. Called to check for a change in the falloff. Called to change the visibility of any element in the falloff description. Just return true or false for the id (like NodeData::GetDEnabling). Called to get the number of handles for the falloff. Same as ObjectData::GetHandleCount with additional FalloffDataData. Called to get a handle for the falloff. Same as ObjectData::GetHandle with additional FalloffDataData. Called to set a handle for the falloff. Same as ObjectData::SetHandle with additional FalloffDataData. Called when the user has moved handle i to position p. Constrain the movement and update the internal data. Called to draw the falloff in the viewport. Same as ObjectData::Draw with additional FalloffDataData. These predefined color constants should be used: FALLOFFCOLORS Called to process messages sent to the falloff.
https://developers.maxon.net/docs/Cinema4DCPPSDK/html/class_falloff_data.html
CC-MAIN-2020-24
refinedweb
216
62.24
Getting started With Microsoft Expression Encoder, you can work with video by using the Expression Encoder object model (OM), which is based on the Microsoft .NET Object Model Framework. To work with the Expression Encoder OM, you must have both Expression Encoder and Microsoft Visual Studio 2005 or Microsoft Visual Studio 2008 installed on your computer. You can access most Expression Encoder features through the OM. The OM is designed to make the functionality of Expression Encoder available without having to write much code. For example, the following C# code uses the Expression Encoder OM to create a job, add a video file to the job, and then encode the video.); } If you follow the comments in the code, you can see the outline of the steps for encoding a video by using C# and the Expression Encoder OM. The preceding code has five steps: Identify the media sources that you want to process. Create a job to process the media sources, and then add the media sources. Optionally, add a progress callback function to view the progress of the file encoding. Identify the location for the output. Execute the project. Before you test this code for yourself, make sure that both Expression Encoder and either Visual Studio 2005 or Visual Studio 2008 are installed on your computer. To create a project in Visual Studio In Visual Studio, click File, point to New, and then click Project. For this example, in the Project dialog box, under Visual C# in the Project Types list, click Windows. Under Templates, click Console Application. In the Name text box, type a name for your project. For this example, use MyEncoderApplication. Click OK. Before you can use the Expression Encoder OM in Visual Studio, you must add references to the Expression Encoder assemblies. To add the Expression Encoder assemblies In Visual Studio, click Project, and then click Add Reference. In the Add Reference dialog box, press and hold the CTRL key, and then click Microsoft.Expression.Encoder, Microsoft.Expression.Encoder.Types, Microsoft.Expression.Encoder.Utilities, and WindowsBase. Click OK. Now that you have added the references to the Expression Encoder assemblies, you are ready to start coding. In Visual Studio, use the using statement to declare that the Expression Encoder namespace is being used. At the top of the file that you just created, locate the other using statements, and then type using Microsoft.Expression.Encoder. The code at the top of the page should now resemble the following. Next, create an instance of a MediaItem class. The MediaItem class passes the file name to the constructor, which enables you to locate a video or audio file, extract relevant information about the file, and encode it. Locate the following code. After the curly brace, add the following declaration, replacing the generic path with the path of the video that you want to encode. Now that you have declared the MediaItem class, your next steps are to create a job and then add the media file to the job. After the MediaItem declaration, add the following code. If you want to encode multiple items, you must declare multiple MediaItem classes and then repeat job.MediaItems.Add(mediaItem); until you add all the files that you want to encode. Each MediaItem class will need a unique name, such as mediaItem1 and mediaItem2. Before you begin encoding the files, set the directory in which to save the encoded files by setting the OutputDirectory property. In your code, after the list of media items that include your job, add the following code. By default, Expression Encoder creates subfolders in the directory in which it stores the encoded files. You can stop Expression Encoder from creating subfolders (and therefore saving the files in the directory itself) by changing the CreateSubfolder property. To change the CreateSubfolder property, type job.CreateSubfolder = false;. For this example, use the default setting, "true." If you want to show the progress of your encoding project, you can add a progress event handler function. Define the function by adding the following code after the job.Encode function and the closing curly brace. Scroll up several lines in the code and add a call to this function after the job is created. The following call to the function appears after the output directory and before the call to encode. Now you're ready to encode the file. Add the following code after the OutputDirectory declaration (and the CreateSubfolder declaration, if you chose to include it). Now you're ready to compile and run the application. On the Debug menu, click Start Without Debugging. The Command Prompt window appears. When the command prompt in the window reads Press any key to continue, the encoding is finished. If you open the output directory, you'll see a new file that has the same name as the original, but with a .wmv file name extension. The final code resembles the code at the start of this topic.); } This time, when you run the application, you will see the progress of the project being encoded in the Command Prompt window. You have just encoded your video by using the Expression Encoder OM.
http://msdn.microsoft.com/en-us/library/cc761462(v=expression.30).aspx
CC-MAIN-2014-52
refinedweb
860
64.91
thanks very much for the help mate. why is it that although it is encoded as utf-8, it cannot be displayed? if i use decode will i then get unicode? and im guessing map(unicode, fileList)... Type: Posts; User: docGroup14; Keyword(s): thanks very much for the help mate. why is it that although it is encoded as utf-8, it cannot be displayed? if i use decode will i then get unicode? and im guessing map(unicode, fileList)... hi guys, very quick question. how can i add files from a glob command to a listbox? fileList = [] os.chdir("c:\\Nokia\\Images") for file in glob.glob("*.jpg"): yeah im going to use that, but i dont like it :( edit: the reason i dont like it, is that it requires a busy wait or a timer waiting until the gps has finished. ah the reason i didn't want to use something like this is because if the gps thread takes longer than 30 seconds to complete, then another thread will still be made. when you told me to use... thanks Y.A.K i will give it a shot. my dumb error was that im testing for mac_address == '' but i tried to load something into mac_address, and if there was an exception i just wrote "pass". when... oh crap, sorry for wasting your time was a really dumb error on my part. btSocket = socket.socket(socket.AF_BT, socket.SOCK_STREAM) #create bluetooth socket if mac_address == '': address,services = socket.bt_discover() #search bluetooth devices print... hi, thanks for the reply. i did manage to run bt_discover from some other code so you are right it is indeed a code error. here is the code, it crashes, i think because of multiple threads. Y.A.K... hi guys, been messing about as you can probably tell from my previous posts but now i think i may have broken something! my phone will no longer connect bluetooth from the python interpreter. it... 1 final question if i may: if i were to use another thread is there anyway to get the pid of the new thread so i can use thread synchronisation (i.e. wait on the pid of the new thread)? the... thanks, i had noticed that during testing. I will see how it goes and may use another thread. thanks for the help docGroup14 thanks for the info, the only reason i wanted to use threads was because i want the gps program to run in the background, and i wish for users to be able to use other functions of my program while it... hi, thanks for the help so far. but when i use timer.cancel the whole app closes even though there is a lock waiting for the exit key to be pressed. any ideas on what might be happening? thanks... thanks - much appreciated cheers, that seems like a decent way to do it :) while you are here, could you tell me how I would go about passing a variable to a thread. For example if I wanted to pass "lock" to a thread when... just to let you know, this was solved by putting the connect and readData in one big method, instead of split up. Not sure why this solves it, but hey!! hi guys, sorry for all the questions recently. I want my main program to call a thread which will check gps data from a bluetooth gps device every 30 seconds. I can do this, however I can't kill... hi guys, i am having a problem with socket.recv. def readAndSend(): global btSocket data_received = 0 while(data_received == 0): #while there is not data, monitor channel excellent, thanks for the help ah thanks, i will try that now. one question: if i convert mac_address to a string then read it in from the file. can i use it in btsocket.connect(mac_address)? hi guys, i have this code: mac_address = (address, services.values()[0]) if appuifw.query(u"Do you want to always connect to this device?", "query") == True: f =... hi guys, i am trying to make an app which uses the camera, however if the lens cover is opened then the phone switches to the camera app, but i'd like it to stay in my app. is there any way to...
http://developer.nokia.com/Community/Discussion/search.php?s=7c7e49e17f9a14189c095e18a823765d&searchid=1842775
CC-MAIN-2013-48
refinedweb
718
82.95
diff --git a/index.py b/index.py index 5368000b71f30a75c1e723ea68740c10bdd0b121..3d279adeeb31169ad5613e511a5aacf33916218d 100644 --- a/index.py +++ b/index.py @@ -168,7 +168,7 @@ class Duck @@ -311,7 +311,7 @@ class Monet diff --git a/main.py b/main.py index c6d25094554d5be191073a6d4d0fb4e03ece93c1..5d33dfe19335d4e810ed1f10aa144b2fd78cc779 100755 --- a/main.py +++ b/main.py @@ -1,41 +1,87 @@ import argparse import time -from index import Index +from index import Index, DuckDBIndex, MonetDBIndex from search import Search -def bulk_index(index: Index, args: argparse.Namespace): +def bulk_index(args: argparse.Namespace): + index = Index.get_index(args.engine, args.database) filename = args.data index.bulk_index(filename) -def query_index(index: Index, args: argparse.Namespace): +def query_index(args: argparse.Namespace): + index = Index.get_index(args.engine, args.database) query_terms = args.terms - iterations = args.iterations search = Search(index) - if iterations: - times = [] + result = search.search(query_terms) + print(result) + + +def benchmark(args: argparse.Namespace): + duckdb_index = DuckDBIndex(args.duckdb) + monetdb_index = MonetDBIndex(args.monetdb) + + indices = [duckdb_index, monetdb_index] + + queries = [ + 'President of the United States', + 'I put on my robe and wizard hat', + 'You were merely born in the darkness', + diam. Pellentesque ut neque. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. In dui magna, posuere eget, vestibulum et, tempor auctor, justo. In ac felis quis tortor malesuada pretium. Pellentesque auctor neque nec urn. Praesent metus tellus, elementum eu, semper a, adipiscing nec, purus. Cras risus ipsum, faucibus ut, ullamcorper id, varius ac, leo. Suspendisse feugiat. Suspendisse enim turpis, dictum sed, iaculis a, condimentum nec, nisi.. Fusce pharetra convallis urna. Quisque ut nisi. Donec mi odio, faucibus at, scelerisque quis, convallis in, nisi. Suspendisse non nisl sit amet velit hendrerit rutrum. Ut leo. Ut a nisl id ante tempus hendrerit. Proin pretium, leo ac pellentesque mollis, felis nunc ultrices eros, sed gravida augue augue mollis justo. Suspendisse eu ligula. Nulla facilisi. Donec id justo. Praesent porttitor, nulla vitae posuere iaculis, arcu nisl dignissim dolor, a pretium mi sem ut ipsum. Curabitur suscipit suscipit tellus. Praesent vestibulum dapibus nibh. Etiam iaculis nunc ac metus. Ut id nisl quis enim dignissim sagittis. condimentum. Maecenas egestas arcu quis ligula mattis placerat. Duis lobortis massa imperdiet quam. Suspendisse potenti. Pellentesque commodo eros a enim. Vestibulum turpis sem, aliquet eget, lobortis pellentesque, rutrum eu, nisl. Sed libero. Aliquam erat volutpat. Etiam vitae tortor. Morbi vestibulum volutpat enim. Aliquam eu nunc. Nunc sed turpis. Sed mollis, eros et ultrices tempus, mauris ipsum aliquam libero, non adipiscing dolor urna a orci. Nulla porta dolor.. Fusce neque. Suspendisse faucibus, nunc et pellentesque egestas, lacus ante convallis tellus, vitae iaculis lacus elit id tortor. Vivamus aliquet elit ac nisl. Fusce fermentum odio nec arcu. Vivamus euismod mauris. In ut quam vitae odio lacinia tincidunt. Praesent ut ligula non mi varius sagittis. Cras sagittis. Praesent ac sem eget est egestas volutpat. Vivamus consectetuer hendrerit lacus. Cras non dolor. Vivamus in erat ut urna cursus vestibulum. Fusce commodo aliquam arcu. Nam commodo suscipit quam. Quisque id odio. Praesent venenatis metus at tortor pulvinar varius.', + ] + + short_queries = [f'{query[:17]}...' for query in queries] + term_amounts = [f'{len(duckdb_index.get_terms(query)):>10}' for query in queries] + + iterations = 20 + + for filename in args.input: + benchmark_times = [] + + print(f'Filename: "{filename}"') + + for index in indices: + index.clear() + print('Indexing...') + index.bulk_index(filename) - for _ in range(iterations): - start = time.time() - search.search(query_terms) - times.append(time.time() - start) + times = [] + for query in queries: + start = time.time() - avg_time = sum(times) / len(times) - print(f'Average query time over {iterations} iterations: {avg_time:.3f}s') - else: - result = search.search(query_terms) - print(result) + for _ in range(iterations): + search = Search(index) + search.search(query) + end = time.time() -def dump_index(index: Index, args: argparse.Namespace): + avg_time = (end - start) / iterations + times.append(f'{avg_time:.04}s') + + benchmark_times.append(times) + + print('-' * 53) + print('Query'.rjust(20), '#terms'.rjust(10), 'DuckDB'.rjust(10), 'MonetDB'.rjust(10)) + print('-' * 53) + + for row in zip(short_queries, term_amounts, *benchmark_times): + print(' '.join([col.rjust(10) for col in row])) + + print() + + +def dump_index(args: argparse.Namespace): + index = Index.get_index(args.engine, args.database) print(index) -def clear_index(index: Index, args: argparse.Namespace): +def clear_index(args: argparse.Namespace): + index = Index.get_index(args.engine, args.database) index.clear() @@ -43,33 +89,46 @@ def main(): parser = argparse.ArgumentParser(prog='old_duck', description='OldDuck - A Python implementation of OldDog, using DuckDB') - parser.add_argument('database', help='The database file to use') - parser.add_argument('-e', '--engine', help='The database engine to use', - choices=('duckdb', 'monetdb'), default='duckdb') - subparsers = parser.add_subparsers(dest='command') subparsers.required = True parser_index = subparsers.add_parser('index') - parser_index.add_argument('data', help='The file to read and index documents from') + parser_index.add_argument('-i', '--input', help='The file to read and index documents from', required=True) + parser_index.add_argument('--database', help='The database file to use', required=True) + parser_index.add_argument('-e', '--engine', help='The database engine to use', + choices=('duckdb', 'monetdb'), default='duckdb') parser_index.set_defaults(func=bulk_index) parser_query = subparsers.add_parser('query') - parser_query.add_argument('-i', '--iterations', help='Number of iterations', - type=int, default=0) - parser_query.add_argument('terms', help='The query terms', nargs='*') + parser_query.add_argument('--database', help='The database file to use', required=True) + parser_query.add_argument('-e', '--engine', help='The database engine to use', + choices=('duckdb', 'monetdb'), default='duckdb') + parser_query.add_argument('terms', help='The query terms', nargs='+') parser_query.set_defaults(func=query_index) - parser_clear = subparsers.add_parser('dump') - parser_clear.set_defaults(func=dump_index) + parser_benchmark = subparsers.add_parser('benchmark') + parser_benchmark.add_argument('--duckdb', help='The DuckDB database file', + required=True) + parser_benchmark.add_argument('--monetdb', help='The MonetDB database name', + required=True) + parser_benchmark.add_argument('-i', '--input', action='append', help='Input files to read data from', + required=True) + parser_benchmark.set_defaults(func=benchmark) + + parser_dump = subparsers.add_parser('dump') + parser_dump.add_argument('--database', help='The database file to use', required=True) + parser_dump.add_argument('-e', '--engine', help='The database engine to use', + choices=('duckdb', 'monetdb'), default='duckdb') + parser_dump.set_defaults(func=dump_index) parser_clear = subparsers.add_parser('clear') + parser_clear.add_argument('--database', help='The database file to use', required=True) + parser_clear.add_argument('-e', '--engine', help='The database engine to use', + choices=('duckdb', 'monetdb'), default='duckdb') parser_clear.set_defaults(func=clear_index) args = parser.parse_args() - - index = Index.get_index(args.engine, args.database) - args.func(index, args) + args.func(args) if __name__ == '__main__': diff --git a/query.py b/query.py index 86903a908b3d242f61d0ddfe7a38059b065196ab..4d1e4714198d1de879f289830b174db9469a9c8f 100644 --- a/query.py +++ b/query.py @@ -1,4 +1,4 @@ -def bm25(terms, disjunctive=False): +def bm25(terms, disjunctive=True): term_list = ', '.join([f"'{term}'" for term in terms]) constraint = '' if disjunctive else 'HAVING COUNT(distinct termid) = (SELECT COUNT(*) FROM termids)' @@ -20,7 +20,3 @@ def bm25(terms, disjunctive=False): FROM subscores GROUP BY docid) AS scores JOIN docs ON scores.docid=docs.docid ORDER BY score DESC; """ - - -def tfidf(terms, disjunctive=False): - return '' diff --git a/search.py b/search.py index a2c349d1cb6687fc171dccde8f85f7814ce0ed4e..1ea9125e8de8456bfeba5c5b4cadaf6db06da8d5 100644 --- a/search.py +++ b/search.py @@ -11,8 +11,6 @@ class Search: def search(self, terms, method='bm25'): if method == 'bm25': sql_query = query.bm25(terms) - elif method == 'tfidf': - sql_query = query.tfidf(terms) else: raise NotImplementedError(f'Search method "{method}" was not implemented') diff --git a/washington_data_short.json b/washington_data_short.json new file mode 100644 index 0000000000000000000000000000000000000000..fd32eb1cd917776487bd787090826eb2d76b3f5b --- /dev/null +++ b/washington_data_short.json @@ -0,0 +1 @@ +[{"name": "b2e89334-33f9-11e1-825f-dabc29fd7071", "body": "NEW ORLEANS \u2014 Whenever a Virginia Tech offensive coach is asked how the most prolific receiving duo in school history came to be, inevitably the first road game in 2008 against North Carolina comes up.\nMidway through the first quarter, Virginia Tech had to call two timeouts in a row because then-freshmen Jarrett Boykin and Danny Coale couldn\u2019t seem to line up right, and \u201cthey had those big eyes out there looking around,\u201d Kevin Sherman, their position coach, said recently.\nNow that Boykin and Coale have only Tuesday\u2019s Sugar Bowl remaining before leaving Virginia Tech with every major school record for a wide receiver, they\u2019ve taken a different stance.\n\u201cI still don\u2019t think that was on us. Macho [Harris] was in the game and he lined up wrong,\u201d said Boykin, as Coale sat next to him nodding in agreement.\nJust add that to the list of slights these seniors have had to overcome.\nBoykin has been the team\u2019s.\nCoale, an Episcopal High graduate, leads Virginia Tech with 785 receiving yards this year. He is right behind Boykin in the school record books and became the team\u2019s starting punter by the end of this season. Coach Frank Beamer has frequently marveled how \u201cDanny just always seems to be open.\u201d\nAnd yet neither warranted even honorable mention all-ACC status this year, a snub that quarterback Logan Thomas said made him \u201cextremely upset\u201d and left Beamer wondering about the media members who participated in the voting.\nIn retrospect, Boykin said he recognizes the lack of notoriety is partly due to Virginia Tech\u2019s offensive philosophy. The Hokies have always been known for their rushing attack, and this year was no different. Running back David Wilson earned ACC player of the year honors during a year when Thomas set multiple records for a first-year quarterback.\n\u201cThere\u2019s just some things that we were held back from being able to show,\u201d Boykin said, \u201cthat we\u2019re just as good as [South Carolina wide receiver] Alshon Jeffrey and [Oklahoma State wide receiver] Justin Blackmon. I feel like they\u2019re great athletes, but at the same time we\u2019re right up there with them.\n\u201cIt\u2019s great playing wide receiver here because once we throw the ball, you have opportunities to get big chunks of yardage. What we can\u2019t do is we\u2019re not going to catch 100 balls for 1,500 yards and 22 touchdowns.\u201d\nThe other issue is that neither has the sort of attention-grabbing personality or pedigree associated with big-time wide receivers these days.\nCoale has graduated with a degree in finance and was named the ACC\u2019s top scholar-athlete this year. He speaks in measured tones reminiscent of a CEO and has yet to join Facebook or Twitter. Boykin is so quiet around the team facility that Beamer said he sometimes doesn\u2019t notice him until he\u2019s making catches on the practice field or in games.\nComing \u201cmust have thought I was a walk-on. I prefer to just fly under the radar.\u201d\nBut their accomplishments haven\u2019t gone unnoticed now that the clock is ticking on their careers. Quarterbacks coach Mike O\u2019Cain said Thomas\u2019s comfort level during his record-setting first year under center is a direct reflection of Boykin and Coale. \u201cNot only are they gonna run the right route with the right timing, you know they\u2019re gonna catch the ball,\u201d he said.\nYears of lining up together has also created a special bond between the two, and it played out before the ACC championship game this year.\nBoykin was supposed to deliver the pregame speech, but always reticent about public speaking, he was afraid he might stutter and not be taken seriously. He asked Coale to take his place.\n\u201cI\u2019ve been through his struggles, he\u2019s been through mine,\u201d Coale said. \u201cHe\u2019s a guy that I know I can count on, whether it\u2019s five years from now, I just know I can count on him and he\u2019ll be there. I know when I look back, part of my Tech experience is going to be him.\u201d"}, {"name": "749ec5b2-32f5-11e1-825f-dabc29fd7071", "body": "Set down your champagne and gaze west, as the bubbly planet Venus kicks off Sunday night\u2019s first evening of the New Year.\nSee this splendid planet about 23 degrees above southwestern horizon at sunset. You can\u2019t miss this ultrabright beacon \u2014 about negative fourth magnitude \u2014 skimming over the treetops. By mid-January, Venus hangs 30 degrees above the horizon at sunset, and the planet sets about 8:10 p.m.\nOn Jan. 24, a waxing young moon begins to ascend toward Venus in the western heavens. The lunar crescent sneaks closer to alluring Venus on Jan. 25, and by the evening of Jan. 26, the moon has passed by our neighbor planet.\nLike a 1950s teenager at a diner, Jupiter loiters in the east-southeast sky at dusk, in the Aries constellation. It\u2019s a negative second magnitude (very bright) object. The waxing gibbous moon approaches this large planet Sunday and snuggles closer Monday evening. By Tuesday, the moon has passed Jupiter, but have no fear, we get an \u201cinstant replay\u201d from Jan. 28-31.\nBright enough to see from the light-polluted Washington area, Mars and Saturn, both zero magnitude objects, become the New Year\u2019s late-night revelers. The reddish Mars rises just before midnight now in the east. A few hours later, at 1:30 a.m., the ringed Saturn ascends the east-southeast. By late January, both planets loiter in the Virgo constellation, as Mars will rise about 9 p.m. and Saturn appears just before midnight.\nFind fleet Mercury now before sunrise in the southeast, in the constellation Ophiuchus, hugging the horizon.\nWith hot coffee, toast the Baby 2012 by viewing the Quadrantids meteor shower peak early Wednesday morning. The big, fat moon sets at 3:15 a.m., so very early risers could catch some falling stars between then and sunrise. The International Meteor Organization () says the hourly rate could be 120, but, in all honesty, you\u2019ll be lucky to spot a handful. If you spy them, they appear to emanate from the near the Big Dipper and Little Dipper constellations in the northeast. You might see a few errant Quadrantids up to Jan. 12, according to the IMO.\nJan. 5 \u2014 \u201cHow Do Astronomers Know How Big Asteroids Are?\u201d a lecture by astronomer Melissa Hayes-Gehrke, at the open house, University of Maryland Observatory, College Park. Weather permitting, see the night sky through telescopes after the lecture. 8 p.m., 301-405-6555.. umd.edu/ openhouse.\nJan. 8 \u2014 \u201cA Survey of Star Atlases,\u201d presented by astronomer Cal Powell at the Northern Virginia Astronomy Club meeting, Room 80, Enterprise Hall, George Mason University, Fairfax. 7 p.m..\nJan. 14 \u2014 Guy Brandenburg explains \u201cMaking Your Own Telescope\u201d at the National Capital Astronomers meeting, University of Maryland Observatory, College Park. 7:30 p.m. astronomers.org.\nJan. 14 \u2014 Stargazing at the National Air and Space Museum\u2019s Public Observatory, adjacent to the museum building. 6:45 p.m. National Air and Space Museum, National Mall. Free.. si.edu.\nJan. 20 \u2014 Anne Lohfink, an astronomer who researches the physics of compact cosmic objects and their surroundings, speaks at the open house, University of Maryland Observatory, College Park. View the heavens through telescopes after lecture, weather permitting. 8 p.m. 301-405-6555..\nJan. 28 \u2014 Neither Bieber nor Bono compare to authentic stars: \u201cHow Are Stars Born?\u201d at the Montgomery College Planetarium, Takoma Park. 7 p.m. departments/planet/.\nJan. 28 \u2014 \u201cSand Dunes Throughout the Solar System,\u201d a lecture by geologist Jim Zimbelman of the Smithsonian Center for Earth and Planetary Studies. This is part of the Smithsonian\u2019s Stars Lecture Series. 5:45 p.m., Albert Einstein Planetarium, National Air and Space Museum, the Mall. After the presentation, stargazing at the museum\u2019s public observatory (about 6:45 p.m.) ."}, {"name": "69654742-33d7-11e1-825f-dabc29fd7071", "body": "DES MOINES \u2014 Two days before the voting begins in the wildest Republican race anyone can remember, the GOP candidates for president were engaged in a frenzy of old-school retail politicking acutely aware that a poor finish in Tuesday\u2019s Iowa caucuses would probably end some of their prospects.\nOn Saturday evening, the Des Moines Register released a poll showing a highly volatile race, with former Massachusetts governor Mitt Romney holding a slight lead at 24\u00a0percent among likely caucus attendees and Rep. Ron Paul (Tex.) in second with 22\u00a0percent. But former Pennsylvania senator Rick Santorum, showing a late burst of momentum that has brought him from the back of the pack to 15\u00a0percent, was poised to move into second place if he can continue gaining over the next two days.\nMeanwhile, three former front-runners were struggling to regain their footing, with former House speaker Newt Gingrich at 12\u00a0percent, Texas Gov. Rick Perry at 11 percent and Rep. Michele Bachmann (Minn.) at 7 percent.\nCaucuses are notoriously difficult to predict, given the fact that they require voters to venture out on a winter night and spend an evening arguing politics with their neighbors, but the Register\u2019s late poll has had a strong record of foreshadowing the results.\nIn recent days, the candidates\u2019 arguments have pitted voters\u2019 pragmatism against their passions, with Romney representing the safe, establishment-approved pick and his rivals vying to be the conservative alternative.\n\u201cThis is a process not just of putting your name or your hand next to someone who you kind of like. It\u2019s also selecting who our nominee ought to be, who you think could beat Barack Obama,\u201d Romney told a crowd of hundreds Thursday afternoon as he stood on a chair in the faux \u201cMusic Man\u201d set in Mason City.\nBut on Saturday, as Santorum addressed about 50 people outside a library in Indianola, he insisted: \u201cI understand they\u2019re all saying who can win and cannot. Trust your own heart. Trust your head. Trust your gut. And vote for who you think is best.\u201d\nAmong the serious caucus contenders, only Paul was missing. He and his senator son, Rand Paul of Kentucky, will be back Monday to launch a five-county tour.\nRon Paul has lately found himself at the top of polls, joining a procession of contenders \u2014 some credible, others less so \u2014 who have soared and fallen, often within a matter of weeks.\nSome have stumbled, spectacularly. Others have been pushed. Gingrich was hit by almost $3\u00a0million in negative advertising in Iowa from a Romney-aligned super PAC \u2014 an outside group barred from coordinating with his campaign.\nThe volatility reflects Republicans\u2019 fervor to pick their strongest nominee against a vulnerable president and the dissatisfaction and mistrust many conservatives, especially those who align with the tea party movement, feel toward Romney.\nRalph Davey, 60, a retiree from Manly who came out to hear Gingrich speak at the local shopping mall last week, has been going back and forth over whether to support him or Romney.\nRomney \u201cknows a lot about business, and he\u2019d be able to create jobs. But he seems wishy-washy on issues. He seems to change with the circumstances,\u201d Davey said. \u201cI like his electability. He doesn\u2019t have skeletons in the closet. Newt definitely does.\u201d\nParadoxically, the tumult in the field and the fragmentation of the electorate may have worked to Romney\u2019s benefit, creating an opportunity for him to prevail in a state where he was trounced four years ago.\nIt was once expected that Romney would put forth no more than a token effort in Iowa, where he blew $10\u00a0million on a distant second-place finish in 2008. But as it became clear that a strong showing \u2014 even a victory \u2014 might be possible, Romney has put in a heavy campaign schedule here in the final days.\nIowa has a history of knocking establishment GOP candidates down a peg, so if Romney can avoid that jinx he would be well situated going forward.\nRomney is the overwhelming favorite in New Hampshire, which holds its primary Jan.\u00a010. And it is questionable how strong a threat Paul or Santorum would be over the long run. On the other hand, if Gingrich or even Perry were to get a bump out of Iowa, they could potentially pick up momentum.\nRomney originally planned to spend more time over the weekend in New Hampshire. But he was drawing large and enthusiastic crowds here, and Romney\u2019s aides scratched that plan so he could dart back to Iowa. He added two afternoon campaign stops in the heavily Republican northwestern corner of the state, where he performed well in 2008, and he has scheduled four large rallies Monday in the state\u2019s population centers.\nThis campaign season has also, again, proved that experience is an asset when it comes to running for president. It is probably not a coincidence that two of the candidates best positioned for Tuesday\u2019s caucuses \u2014 Romney and Paul \u2014 are the ones who have been there before.\n\u201cPeople like Ron Paul and Mitt Romney are benefiting from the fact that they had infrastructure from the past that they could build on,\u201d said Steve Scheffler, president of the Iowa Faith and Freedom Coalition.\nMany political veterans here expect turnout at the caucuses to top 2008\u2019s record 118,000. But they worry that Iowa\u2019s cherished, quirky process has begun to lose its intimate feel \u2014 and its influence.\nI.\nThat has contributed to voters\u2019 uncertainty, Scheffler said.\n\u201cThe candidates haven\u2019t been here, and their messages and their stands are similar,\u201d he said. \u201cYou don\u2019t have that one personality that sticks out from the others.\u201d\nAdam Gregg, 28, a Des Moines lawyer, came to see Romney speak at an ice-cream parlor in Le Mars on Saturday.\n\u201cBack in \u201906 and \u201907,\u201d Gregg said, \u201cyou saw all the presidentials going to state legislative fundraisers. They were all over the Iowa circuit. That\u2019s one of the starkest contrasts to me.\u201d\nSantorum is one who has been doing things the old-fashioned way \u2014 more by necessity, because of his strapped finances, than by choice.\nHaving made more than 250 appearances in the state over the past six months, \u201ca guy like Santorum gave Iowans all across the state multiple opportunities to meet him and get to know him,\u201d said Craig Robinson, a blogger who writes for the Web site the Iowa Republican.\nThat patient, shoe-leather approach is paying off with an eleventh-hour surge in the polls for Santorum, who noted with some satisfaction that he has not had to spend the final days before the caucuses crisscrossing Iowa on frantic bus tours, as his rivals have.\n\u201cEverybody\u2019s sort of running around trying to get to all these counties. We\u2019ve done all that,\u201d he said during a leisurely interview Friday afternoon at his campaign headquarters in Urbandale.\nLater that evening, Santorum spent more than an hour at a sports bar, joining fans to watch Iowa State play Rutgers in the New Era Pinstripe Bowl.\nOne significant difference from 2008 is the lack of political cohesion among evangelicals, whose mobilization was the key to former Arkansas governor Mike Huckabee\u2019s victory over Romney in 2008. This time around, however, there are at least four candidates competing for their votes.\n\u201cNo one candidate has brought all the values voters together,\u201d Huckabee said in an interview. \u201cAnd the splitting of that vote helps Romney.\u201d\nThe political climate may also diminish the influence of socially conservative voters here.\n\u201cEconomic issues are at the forefront now, even among conservatives, unlike they were four years ago,\u201d said Tim Albrecht, who worked for Romney\u2019s operation in 2008 but now is unaffiliated and is an aide to Iowa Gov. Terry Branstad.\nThe Iowa caucuses have provided the first real test of the new world of outside money in presidential campaigns, unleashed by a Supreme Court decision last year.\nSpending by outside groups \u2014 technically independent of the campaigns but often run by some of the candidates\u2019 closest allies \u2014 used to be virtually nonexistent in primary campaigns. This year, it has accounted for 43\u00a0percent of all spending on television ads.\nThe tone of the ads in many cases has been far more negative than the candidates personally would dare to project when speaking about members of their own party.\nAlmost none of the donors of that money have been revealed, and they probably won\u2019t be until Jan.\u00a031 \u2014 after the polls close in the Florida primary and after a nominee may already be chosen.\nThe new rules have given a boost to candidates who already have a network of rich supporters \u2014 most notably Perry and Romney. This kind of support may soon be an unwritten requirement for a successful campaign.\nGingrich initially believed that he could overcome the influence of negative advertising with a strong message and the kind of coverage he draws.\n\u201cThat\u2019s the secret of the Gingrich campaign,\u201d he said in an interview in late October. \u201cThe other guy gets to raise a lot of money to buy radio ads, and I get to do talk radio. It\u2019s probably almost impossible to buy enough radio to offset what I can do with talk radio.\u201d\nThe most recent polls suggest that view may have been overly complacent.\nAt one point Gingrich said, \u201cI wouldn\u2019t vote for the guy they are describing.\u201d"}, {"name": "d5966ad2-33f9-11e1-825f-dabc29fd7071", "body": "Towel draped over his head and shoulders, staring at the ground as he mouthed lyrics to the music blaring from his headphones, John Wall appeared flustered, angry and distant as he sat in the visiting locker room at Bradley Center.\nWall had his worst game of the season \u2014 and arguably one of the worst of his young career \u2014 as the Washington Wizards lost to the Milwaukee Bucks, 102-81, on Friday and dropped to 0-3. The statistics told one side of the story \u2014 six points on 1-of-9 shooting, with seven assists and four turnovers \u2014 and Wall\u2019s body language told another, as he was unusually disengaged and disconnected, even as his teammates attempted a fourth-quarter rally to cut a 26-point deficit down to single digits.\nAfterward, Coach Flip Saunders expressed disappointment in the best player on his roster for failing to fight through a challenging night.\n\u201cNo matter how bad you\u2019re playing, you don\u2019t want someone to look at you and say, \u2018What\u2019s wrong with you?\u2019\u2009\u201d Saunders said. \u201cThe only thing you can be consistent about is how hard you play, and with passion and energy. John has a tendency to get down on himself when he\u2019s not making plays. We got down big. He got down. We\u2019ve got to work as a team. He\u2019s got to work on it too. As a leader, everyone is looking for him.\u201d\nWall often had trouble containing his emotions through adversity as a rookie, but his frustration with a ragged start to this season was encapsulated by a sequence with about five minutes left in the fourth quarter against the Bucks.\nMil.\nWall was hoping that this would be a breakout season for him, but he has gotten off to a thorny start, struggling to find a way to balance being a facilitator and a scorer and not doing particularly well at either one. He\u2019s averaging just 13 points, six assists and 4.7 turnovers but also is shooting just 27 percent from the field.\n\u201cI\u2019m not really worried about myself getting going, I\u2019m just trying to run the team as much as everybody wants me to do. That\u2019s all I\u2019m trying to do,\u201d Wall said. \u201cEverybody trying to say I\u2019m trying to look for scoring, but I\u2019m just trying to take open shots that I got. I know teams know what I want to do, they making it tough for me. I just got to make shots and trust that my teammates will make shots when they get open and when I find them.\u201d\nThe Wizards haven\u2019t been able to support that trust, as they rank 29th in the league in field goal shooting (38.6 percent), making it hard for a player to get assists. Andray Blatche is admittedly \u201cin a funk,\u201d averaging just eight points on 11-of-41 shooting (26.8 percent) this season. In the past two games, Washington\u2019s starting shooting guards \u2014 Jordan Crawford in Atlanta and Nick Young in Milwaukee \u2014 shot a combined 1 for 16.\nWall.\nBut\u2019t get any lighter with a home-and-home, back-to-back set against Boston starting on Sunday at 6 p.m. at Verizon Center, followed by Orlando on the road and New York at home.\n\u201cIt\u2019s getting tough,\u201d Wall said. \u201cWe\u2019ve just got to find a way to win. You don\u2019t want to start the season 0-10 or 0-6 or nothing like that, so you got to find a way to win one of these games.\u201d\nSaunders and assistant Randy Wittman spoke to the players after the loss in Milwaukee and veterans Maurice Evans and Rashard Lewis continued the conversation in a mini-players-only meeting afterward.\n\u201cWe got on each other,\u201d Young said. \u201cYou don\u2019t want to get used to losing, but we\u2019ve got to stick together. You can\u2019t have somebody mad every night. That don\u2019t help the team. We\u2019ve got to come together as a family. This is really all we\u2019ve got in here.\u201d\nSaunders said the team has to figure out something soon. \u201cWe don\u2019t have a lot of time. We\u2019re not going to say, \u2018We\u2019re going to get this figured out in practice.\u2019 We can\u2019t,\u201d Saunders said. \u201cBottom line is, we\u2019ve got to put people on the floor that are going to compete and play hard. If that happens to be that some of our most talented guys, they\u2019re not the ones to do it, then they are not going to be able to play.\u201d"}, {"name": "f2c10c06-2c0c-11e1-9952-55d90a4e2d6d", "body": "A developer who stands to gain millions by building headquarters for the state Department of Housing and Community Development in Prince George\u2019s County owes Maryland more than $124,000 in back taxes, penalties and interest, according to state records.\nThe Maryland comptroller\u2019s office has filed several tax liens over the past seven years against Carl S. Williams for failing to pay state withholding taxes for employees at one of his companies. As of Dec.\u00a028, the bill remained unpaid, state officials said.\nThe liens stem from nonpayment of withholding taxes for King\u2019s Kids Child Development, a division of a company where Williams was in charge.\n\u201cWhen the corporate entity does not pay, we can go after the managing member,\u201d said Sharonne Bonardi, the director of the compliance division within the comptroller\u2019s office. \u201cThat\u2019s why he was assessed personally for the tax debt.\u201d\nBarb Clapp, a spokeswoman for the developer, said Williams filed an appeal over the back taxes Sept. 14, which the state confirmed this week. On Sept. 19, the state announced that it had selected him to develop the new headquarters near the New Carrollton transit hub.\nWilliams is a principal of Grand Central Development, and he hopes to lead a team that will build the New Carrollton mixed-use development. The project, known as Metroview, would house the first state agency with headquarters in Prince George\u2019s.\n Clapp said Williams took over as executive director of St. Paul Development Corp., a nonprofit group that builds affordable housing in Prince George\u2019s and owns the day-care center, in 2006. Some of the company\u2019s tax troubles predate his appointment as executive director, she said. Clapp also said some payments were applied to taxes owed by St. Paul Development.\n\u201cHe didn\u2019t know about some of it,\u201d Clapp said. \u201cWhen he learned, he filed an appeal.\u201d\nThis week, state officials said the balance includes $67,329.26 in taxes, $46,897.781 in interest and penalties of $9,895.60. The state would not provide a breakdown of when the taxes were incurred.\nBut the outstanding bill is just one of the financial problems that companies headed by Williams have faced.\nThe charter of the Carl Williams Group, a development company founded in 2005 in Prince George\u2019s, was revoked by the State Department of Assessments and Taxation two years ago for failing to file a 2008 property tax return with the state. Clapp said the company did not file a property tax return with the state because it did not own any personal property. As a result, the company\u2019s charter was revoked. Clapp said the Carl Williams Group is no longer doing business.\nThe Woodviews at St. Paul Limited Partnership \u2014 a division of St. Paul Development, which Williams heads \u2014 filed for Chapter 11 bankruptcy in 2008. Williams\u2019s spokeswoman added that he is not personally liable for the bankruptcy of Woodview. The company ran into trouble with county officials, she said.\n\u201cWe got caught in the pay-to-play game of Jack Johnson, and our necessary county approvals were not approved because we would not pay,\u201d Clapp said.\nAnd the Carl Williams Group was sued by UrbanAmerica, a real estate investment company, over the alleged nonpayment of a loan. Last year, the trial court entered a judgment against the Carl Williams Group for $9\u00a0million. Clapp said the loan at issue in the lawsuit stems from a $100\u00a0million project in the county that was never built. The Carl Williams Group is appealing, and UrbanAmerica, which sued Williams personally but lost, has also filed an appeal.\nClapp said Williams has shepherded many projects in the county, including the Jericho City senior living project in Landover and the St. Paul Retirement Community at Addison in Capitol Heights. But, she said, many of the financial problems of his companies can be blamed on a sluggish real estate market and the play-to-pay culture in Prince George\u2019s. Metroview, a mixed-use project that still needs financing, would be Williams\u2019s largest project.\nAs part of a push to promote transit-oriented development, Gov. Martin O\u2019Malley (D) announced last year the intention to move the housing agency from Anne Arundel County to a site near a Metro station in Prince George\u2019s. O\u2019Malley announced the selection of Grand Central Development and the location with much fanfare during a news conference in front of the New Carrollton Metro station in September.\nThe state Board of Public Works still has to decide whether Grand Central Development should be awarded the 15-year, $40\u00a0million lease for the agency\u2019s move to New Carrollton.\nAccording to state officials, the panel was supposed to consider the project before the end of the year, but the lease never made it onto the board\u2019s agenda. Grand Central was one of 16 bidders for the project.\nMichael A. Gaines Sr., the assistant secretary of real estate for the Department of General Services, who has handled the requests for proposals for the relocation, did not return repeated calls to his office.\nWilliams, a developer and executive director of St. Paul Development, spoke briefly about the DHCD development\u2019s prime location, just 12 minutes by rail from the Baltimore-Washington International Marshall Airport, and his plans to build 442 apartment units, 22\u00a0percent of which will be affordable housing.\nWilliams will be joined by Tim Munshell of Montgomery County in developing Metroview, which includes 30,000 square feet of retail space, four floors of office space for DHCD and office space for the city of New Carrollton. The pair is also working on another multimillion-dollar, mixed-use project in Baltimore County.\nMunshell did not return a phone call or a message left with his company spokesman.\nThe announcement of the development selection for DHCD came before Grand Central Development underwent a tax clearance review by the comptroller\u2019s office.\nThe compliance division within the comptroller\u2019s office was unaware of the liens filed against Williams until they were brought to its attention by The Washington Post on Dec. 20.\nBonardi, the director of that division, said her office searched for days and could not find any liens placed against Williams or any delinquencies against the Carl Williams Group.\nJoseph Shapiro, a spokesman for the office, was adamant that no liens were placed against Williams by the comptroller\u2019s office.\nIt was not until documents from the Prince George\u2019s Circuit Court were provided to the state by The Washington Post that officials located the liens.\nBonardi said there was a \u201cdisconnect\u201d because the liens were under the federal identification number of the King\u2019s Kids Development Center and Williams\u2019s Social Security number.\nSylvia Brokos, the manager of business tax collections within the comptroller\u2019s office, said Williams\u2019s back taxes would not necessarily disqualify him from a contract.\nShe said all companies seeking state contracts must pass a tax clearance process that includes a search for back taxes and a review to make sure the company\u2019s charter is in good standing.\nIn Williams\u2019s case, only Grand Central Development, which was formed in November 2010, would go through that process.\n\u201cWe do not look beyond that to the principal, not unless they are the sole proprietor,\u201d Brokos said."}, {"name": "4db820a0-3251-11e1-8c61-c365ccf404c5", "body": "In this remote, sun-blasted corner of southern Yemen, there\u2019s a battle raging that is as important to the United States as it is to this nation\u2019s beleaguered government.\nEach day, American-backed Yemeni forces engage in a grueling struggle to retake territory from militant Islamists \u2014 a conventional army pitted against a guerrilla militia with grand ambitions to stage an attack on U.S. soil. Each day, the soldiers feel increasingly besieged.\n\u201cWe are like an island in a sea of al-Qaeda,\u201d said Lt. Abdul Mohamed Saleh, standing at a checkpoint on a desolate highway that connects Zinjibar with the port city of Aden. \u201cWe are surrounded from every direction.\u201d\nThe.\nIn May, they overran large swaths of Abyan province, including this regional capital. Today, they rule over significant territory in this strategic region, near important oil shipping lanes.\nThe.\nThat base may already be taking shape. A rare recent visit to Zinjibar, the first by a Western journalist since the Islamist fighters swept into the city, revealed just how entrenched the militants have become here.\nAt.\n\u201cThey\u2019ve attacked us three times already today,\u201d Katib said, his emotions rising.\nSaleh\u2019s.\nAlthough.\nIn.\nWith Saleh\u2019s government in disarray, the United States has stepped up operations against AQAP, using drone strikes to kill several of the group\u2019s top officials, including Anwar al-Awlaki, the radical Yemeni-American cleric implicated in helping to motivate several attacks in the United States.\nBut such a strategy has its limits in Zinjibar.\nLess than a mile from the highway stands Zinjibar\u2019s main soccer stadium. Outside, a half-built apartment complex is riddled with holes from mortar shells. On a rooftop, soldiers peer from behind sandbags. Two tanks stand nearby. Inside the stadium, walls have crumbled from shelling; the artificial grass is littered with debris and bullets.\nThe Islamists emerged in March, taking over the town of Jaar and nearby areas. By the end of May, they had entered Zinjibar. They seized government buildings and looted banks and military depots.\nMost troops, police officers and local officials fled Zinjibar, an ancient city that was once a major trading center with the Far East. Tens of thousands of residents fled as well, triggering a humanitarian crisis.\nAccording \u2014 Islamic law. AQAP leaders said this year that they were operating under that name.\nThe ease of their takeover prompted Saleh\u2019s critics to accuse him of purposely losing territory to convince the United States and Yemen\u2019s neighbors that chaos would ensue if he were to step down. Opposition figures describe al-Qaeda\u2019s presence in Abyan as exaggerated, a diversion by Saleh to remain in power.\nBut the soldiers of Brigade 25, who live inside the military base, have no doubts about their enemy\u2019s identity. The only government forces who did not flee, they have been pummeled almost daily by mortars, rockets and snipers.\nWadhan Ali Said, a slim 20-year-old soldier, bears the scars of a sniper\u2019s.\nLater in September, after reinforcements arrived, the soldiers managed to lift the siege. But the militants have kept up the pressure, moving in highly organized cells. They use loudspeakers outside the base in a psychological assault on the soldiers.\n\u201cThey say they are the followers of Osama bin Laden,\u201d Said said. \u201cThey give us lectures on Islam. Then, they tell us they will enter the base tonight.\u201d\nYemeni security forces have unleashed an intensive campaign of aerial bombings and shelling in southern Yemen. They have sent large numbers of reinforcements, including some U.S.-trained counterterrorism units.\nYet.\nGen..\n\u201cThey are already acting like they are rulers of a state,\u201d Somli said.\nThe streets of Zinjibar are eerily quiet. Houses are abandoned, shops and gas stations closed. There\u2019s no electricity. The landscape is silent, a wasteland littered with bullets and graves. Not a single resident was seen in more than four hours spent inside government-controlled areas of the city.\nMost of the city\u2019s inhabitants are 35 miles away, in Aden. They traveled with only the possessions they could carry. They have sought refuge there in dozens of schools, turning classrooms into makeshift homes.\nBut even Aden may not be safe.\n\u201cIf we don\u2019t manage to stop them, their next target will be Aden,\u201d warned Brig. Awad al-Qatabi, the head of Yemeni National Security in the city.\nThose.\n\u201cAnyone who supports Saleh is considered an agent of America and the West,\u201d said Salah Nasser Nashir, 34, a farmer, who fled in July.\nHe was more afraid of the indiscriminate bombings by security forces than he was of al-Qaeda, echoing comments by others who fled Zinjibar. \u201cWe fled not because of al-Qaeda, but because the government was shelling us,\u201d he said.\nStill.\n\u201cThis is Allah\u2019s law,\u201d he heard the voice say, before the knife came down on his left wrist.\nMore world news coverage:\nRussia arrests New Year\u2019s protesters\nMaliki marks end of U.S.-Iraq pact\nIn Egypt, an act of courage that launched a revolution\nRead more headlines from around the world"}, {"name": "2ee2b1ca-33d9-11e1-a274-61fcdeecc5f5", "body": "Early \u201cPamela, this is Mitt.\u201d\n\u201cThey use our names!\u201d said Ms. Powers, a gregarious 47 year old who, likewise, considers herself on a first-name basis with Mitt, Newt, Rick and the other Republican hopefuls.\nThe Powerses started concentrating on the Iowa caucuses about a month ago, spending $200 on tickets to a Dec. 10 debate. They have spent days and weeks warming and cooling to candidates.\nThey are trying to recapture the electricity they felt four years ago when Michelle Obama took Ms. Powers\u2019s arm in front of the pork tent at the Iowa State Fair, the first step in their journey off the Republican rolls and into the fold of Obama voters.\nNow, political disappointment and personal progression have led them back to the GOP, but the Powerses are scrambling to find someone who possesses the attributes on their checklist \u2014 electability, passion, depth and strong moral values. Like the vast ranks of their ambivalent brethren who will determine the winner of the Iowa caucuses and possibly the Republican nominee, the Powerses are still having a tough time.\n\u201cI\u2019ve got to figure it out by Tuesday,\u201d Ms. Powers said.\nAt.\nRomney staff members offered them signs to hold. They declined, instead keeping their hands warm in their pockets.\nRomney\u2019s bus arrived in an area of the parking lot marked off by upended shopping carts. The Powerses cheered as the candidate, his wife and New Jersey Gov. Chris Christie took turns testifying to Mitt Romney\u2019s love of America.\nAs Romney thanked people for coming, Ms. Powers found herself deep in conversation with another undecided voter at the foot of the stage. They talked about Romney\u2019s trouble connecting, Perry\u2019s trouble speaking, Paul\u2019s radicalism, Michele Bachmann\u2019s inexperience and Rick Santorum\u2019s fervor.\nThe Powerses thawed for a few minutes in the supermarket and then drove their beige Saab downtown to give Newt Gingrich, who they had all but written off, a last look at a \u201cMoms Matter Coffee Break\u201d event.\nThe couple found seats in the back of the small room decorated with Elvis album covers. On stage, GOP pollster Frank Luntz warmed up the audience by showing off his stars-and-stripes sneakers (\u201cespecially made for me by K-Swiss\u201d) and asking undecided voters to raise their hands. The Powerses, like most in the room, lifted their arms.\nMoments later, Gingrich took the stage. As he spoke about how \u201cin a different world it would have been great not to have been divorced,\u201d Ms. Powers slowed the chewing of her gum. She nodded approvingly as Gingrich talked about how \u201crights come from our creator.\u201d\nWhen Gingrich made the case that he is more electable than Romney (\u201cI\u2019m a more effective debater\u201d) and decried the millions of dollars spent on negative ads to run his name through the mud, Mr. Powers momentarily stopped checking the photos on his phone to listen.\nAt the end of the event, Gingrich choked up as he spoke about his mother\u2019s death and the impact \u201cthe real problems of real people in my family\u201d had on his policy thinking.\nMs. Powers thoughts turned to her own mother, who had died on Christmas Eve 2009, after a battle with cancer. The ordeal, she said, strengthened her Catholic faith, which in turn led her to seek a Republican candidate who shares her moral values.\nWhen Gingrich finished speaking, his cheeks shining with tears, she clapped wildly.\n\u201cPeople are going to go nuts on the crying, but that was as real as anything you can see,\u201d she said as she left the coffee shop. \u201cI thought Newt was off my ballot. But Mitt doesn\u2019t make that connection.\u201d\nThe couple fueled up on moo shoo pork slices at Fong\u2019s Pizza and talked about Santorum as a \u201ca victorious underdog\u201d and Romney as a \u201clast man standing.\u201d\nMr. Powers lamented the \u201cbombardment\u201d of anti-Gingrich television ads from Romney-supporting super PACs. \u201cIt has influenced us,\u201d he said unhappily. His wife excused Romney of any blame for the ads and then spotted one of Gingrich\u2019s daughters walking into the restaurant. \u201cYou picked a great place!\u201d she called out to her. Hearing no response, she turned back to the fortune cookies on the table.\n\u201cOoooh look!\u201d she said, reading the fortune: \u201cLinger over dinner discussions this week for needed advice.\u201d\nThe couple stopped home to check voice mails (Dan Quayle called on behalf of Romney, Romney called on behalf of Romney) and changed into warmer clothes for the drive out to Marshalltown to see Santorum.\nAs their car slid by acres of crushed pale cornstalk, Ms. Powers rebuked her husband for failing to photograph her \u201carm-in-arm with Mitt today\u201d and to be ready with the camera \u201cwhen Rick comes.\u201d\nEach\u2019s entrance. He wore an Iowa State sweater-vest and spoke under muted TVs tuned to C-SPAN, which showed him speaking, on a seven-second delay, to the voters in the room.\nMs. Powers clapped vigorously as Santorum talked about \u201cthe crossroads of American civilization\u201d and asserted that \u201cI know life begins at conception.\u201d.\n\u201cHow will you conserve your integrity when you\u2019re operating in the Washington machine?\u201d Ms. Powers asked from the back. She maintained eye contact with Santorum throughout his lengthy answer. When the event broke up, she stepped into the dining room with a broad smile across her face.\n\u201cDone!\u201d she exclaimed, her face flush from the heat. \u201cI know who I\u2019m caucusing for. No one talks like that.\u201d\nHer husband, less impressed, shrugged.\nOn the drive back to Des Moines, night blotted out the barren fields, and the couple debated Santorum\u2019s performance. \u201cHis answers are too long,\u201d said Mr. Powers. \u201cThat\u2019s the beauty of Rick Santorum,\u201d his wife countered.\nThey talked about his answer on Iran. \u201cHe said we\u2019re going to blow \u2019em up,\u201d said Mr. Powers. \u201cI didn\u2019t hear that at all,\u201d Ms. Powers said.\nThey compared his substantive answers to Romney\u2019s patriotic \u201cpep rally,\u201d but then Ms. Powers suggested she hadn\u2019t decided after all.\n\u201cIt would be interesting, at the very least,\u201d Ms. Powers said, \u201cto go see Mitt in that kind of venue.\u201d"}, {"name": "a9552634-2c06-11e1-9952-55d90a4e2d6d", "body": "The District and Prince George\u2019s County had nearly the same number of homicides in 2011, a major departure from a high 20 years ago, when the city saw 325 more slayings than the county.\nIt\u2019s is surging, and the county as a whole saw a slight increase last year.\nThere were 97 slayings in Prince George\u2019s in 2011, four more killings than in 2010. In the District, the year saw 108 homicides, down from 132 in 2010 and the lowest homicide total in the city since 1963.\n\u201cWe share many of the same issues,\u201d said D.C. Police Chief Cathy L. Lanier. \u201cQuite a few of our victims come from Prince George\u2019s County.\u201d\nThe police department\u2019s 7th District east of the Anacostia River \u2014 neighborhoods including Barry Farm and Congress Heights \u2014 saw its annual homicide count drop 55 percent, with 24 fewer killings in 2011. Neighborhoods across the border in Prince George\u2019s 4th District \u2014 including Hillcrest Heights and Oxon Hill-Glassmanor \u2014 saw their count more than double, up by 21 slayings.\nLaw enforcement officials said the trend along the Prince George\u2019s border reflects problems that migrated with those who left the District for inside-the-Beltway county neighborhoods, including issues connected with poverty and long-simmering neighborhood disputes.\nSome D.C. residents who still see frequent violence in their neighborhoods are weary, and say there\u2019s not much to celebrate in the city\u2019s declining homicide numbers.\n\u201cI\u2019m slow to get too excited,\u201d said the Rev. Donald Isaac, executive director of the East of the River Clergy, Police, Community Partnership. \u201cAs soon as you begin to celebrate, it can reverse so quickly.\u201d\nPrince George\u2019s Police Chief Mark Magaw said crime has long run \u201cback and forth\u201d between the District and Prince George\u2019s, and he has pushed this year for increased cooperation between the two police departments.\n\u201cIt\u2019s one big community now,\u201d he said. \u201cNo longer do we have the luxury of saying, \u2018We only have to worry up to Southern Avenue,\u2019\u2009\u201d one of the borders between the city and county.\nThough killings in both the District and Prince George\u2019s averaged about two per week during 2011, overall violent crime in the city fell by 10 percent and in the county by 12 percent.\nBut the city had a 6 percent jump in property crime, largely due to a growing problem with thieves grabbing smartphones, computer tablets and other electronic devices from people and cars. \u201cSnatching electronics is the battle of the century,\u201d Lanier said. \u201cIt\u2019s the single biggest problem I have in term of numbers.\u201d\nMayor Vincent C. Gray (D) said that the decline in homicides in the District is encouraging and that the city should work to try to get to fewer than 100 slayings in 2012.\n\u201cWhen people see crime going down like this, especially homicides, they are going to feel safer,\u201d Gray said. \u201cMy sense is that people do feel safer. On the other hand, when you still see north of 100 homicides in the city, even though it\u2019s a stark reduction, people are going to continue to be concerned about it. Some additional vigilance is going to serve you well, too.\u201d\nKillings in the District have fallen rapidly in recent years, with 2011 bringing the lowest number of slayings in nearly 50 years.\n\u201cWhen I started here in 1990, the two things that used to really bother me was that we were known as the murder capital of the world and the city of unsolved homicides,\u201d Lanier said. \u201cOur detectives and our police officers have done an amazing job turning that around. We are no longer either one of those things.\u201d\nHomicides in Prince George\u2019s have been generally trending downward as well, though at a slower pace.\nThe rest of the region\u2019s suburbs have far fewer homicides than the District and Prince George\u2019s, with most counties recording 2011 homicide numbers roughly unchanged from the prior year. Fairfax County was an exception, with a decrease from 16 to 11.\nThough Montgomery County had just 16 homicides in 2011, in March it saw one of the year\u2019s highest-profile murders in the region when Brittany Norwood, an employee at a Bethesda Lululemon yoga store, fatally bludgeoned and stabbed a co-worker, Jayna Murray.\n.\nThe Northeast quadrant of the city, covered by the 4th and 5th districts, ended the year with a combined eight more killings than in 2010.\nArea crime watchers say they\u2019ve seen violence steadily shift from the District into Prince George\u2019s.\nThe migration of many of the District\u2019s poorer residents to inside-the-Beltway communities in Prince George\u2019s has been happening for years, fueled by the District tearing down some public housing, said former D.C. police chief Isaac Fulwood Jr., who led the department in the early 1990s, when the city had nearly 500 homicides a year.\nThat shift has had lasting effects, he said.\n\u201cPeople from D.C. that had to move tended to move to Prince George\u2019s County, and they took with them the things that poverty brings: Lack of access to everything,\u201d said Fulwood, who is now chairman of the U.S. Parole Commission.\nThe Prince George\u2019s police department, which has more than 2,000 fewer officers than in the District, was left to deal with neighborhood disputes that people brought with them, as well as new beefs created in the large apartment complexes in Prince George\u2019s.\n\u201cAlabama Avenue, Stanton Road subsidized housing, all of that is gone,\u201d Prince George\u2019s Deputy Chief Craig Howard said. \u201cNow when you ride through those areas, there are townhouses, single-family homes.\u201d\nLast year\u2019s killings in Prince George\u2019s did not seem to follow any common thread, officials said. Young men and women sometimes killed one another in petty disputes.\nThe majority of the killings in Prince George\u2019s happen inside the Beltway, a more urban setting than the rest of the county. Because Prince George\u2019s has a larger overall population than the District, its homicide rate was lower than the city\u2019s, with about 11 killings per 100,000 residents, compared with about 17 per 100,000 residents in the District.\nAcross the nation during the first half of last year, the homicide count increased by about 1\u00a0percent for cities the size of the District, and remained the same for counties such as Prince George\u2019s, according to FBI crime statistics.\nLanier, who hoped to have fewer than 100 homicides in the District in 2011, said she remains frustrated by the numbers. \u201cWe\u2019re not where we need to be until we have less than 50,\u201d she said.\nThe Washington Post\u2019s homicide count includes criminal killings within the borders of the city or the county, but does not include killings that officials have ruled justified. Prince George\u2019s homicide numbers last year included one killing investigated by Laurel police and one on the Bowie State University campus.\nLanier said the District had fewer gang-related homicides than in prior years. Most killings happened amid personal disputes, often stemming from squabbles at nightclubs where people had been drinking, she said.\nShe added that her department\u2019s homicide closure rate is about 94 percent, which sends a message to criminals.\n\u201cWord travels pretty quickly when a homicide happens and an arrest is made,\u201d Lanier said. \u201cYour risk of being caught is pretty high if you commit a homicide in D.C.\u201d\nPrince George\u2019s police\u2019s homicide closure rate was 66 percent last year, a slight increase over 2010.\nIn Prince George\u2019s, 16 people were killed in January, including a teenager who used to cook eggs for his 3-year-old brother, an ice cream truck driver and a University of Maryland student who tutored athletes. But by year\u2019s end, overall crime had dropped compared with 2010, with violent crime down about 12 percent and property crime down about 10 percent.\nLanier\u2019s biggest success was in the 7th District, which has regularly led the city in killings and some other crimes. In 1993, the 7th District alone had 133 homicides. Last year it had 20.\n\u201cA lot of it is the officers being out there, being visible,\u201d 7th District Commander Joel Maupin said. He said officers continue to take guns off the streets, and often blanket neighborhoods with extra patrols when they get a tip that violence might be coming.\nIt is essential, he said, to make arrests in crimes such as robberies and burglaries because it prevents future violence.\n\u201cRemoving these individuals from the streets and doing it quickly reduces crime,\u201d Maupin said.\nIsaac, the clergyman who works in the same neighborhoods as Maupin, said his group visits every family that loses someone to violence, offering burial support, grief counseling and other services. \u201cEven if you have one homicide a month, it\u2019s impacting out there,\u201d Isaac said.\nRead more local news from The Washington Post:\nRobert McCartney: What will happen in 2012?\nIn Va., an abundance of offbeat bills\nMetrobus employees: Tight schedules don\u2019t allow for bathroom breaks\nVincent Gray focuses on future after tough first year in office"}, {"name": "7cecbc12-33de-11e1-a274-61fcdeecc5f5", "body": "Mike Shanahan will close his 28th season as a coach in the NFL on Sunday, when his Washington Redskins play what is essentially a meaningless game in Philadelphia. And though he has seen almost everything in pro football \u2014 he has been hired and fired, made and missed the playoffs, won and lost the Super Bowl \u2014 he has never faced the circumstances he does now. Whatever happens against the Eagles, Shanahan will have back-to-back losing campaigns for the first time in his 17 full seasons as a head coach.\nFor the Redskins, who haven\u2019t had consecutive winning seasons since 1991-92, such is life. But for the man who was hired to overhaul the entire organization, this is new.\n\u201cI couldn\u2019t have handled it earlier in my career,\u201d Shanahan said Friday, not long after the Redskins practiced for the final time this season. \u201cYou don\u2019t know the big picture. You\u2019re just trying to survive. Unless you\u2019ve been with different programs or organizations that have been down or have been up, you can\u2019t really relate to where you\u2019re at now. I can relate to this.\u201d\nShanahan opened his Redskins tenure by going 6-10 in 2010. Win Sunday, and he only matches that record. Lose, and he has his worst record as a head coach. Jim Zorn \u2014 whose tenure running the Redskins was mocked from near and far \u2014 won 12 games in his two seasons with Washington. The Redskins must win Sunday for Shanahan to match that.\nYet ask Shanahan to take stock as he winds down the second of two difficult seasons, and he is unwavering.\n\u201cI feel very good about this football team and the direction we\u2019re headed,\u201d he said, \u201cbecause we\u2019ve got the right people.\u201d\nRegardless of Sunday\u2019s outcome, the Redskins will finish in last place in the NFC East for the fourth consecutive year. Yet Shanahan can sit behind his desk \u2014 tape of a practice session frozen on a television screen over one shoulder, the Redskins\u2019 entire depth chart on the wall he faces \u2014 and emphatically restate his belief that the franchise he oversees will win, and soon. He does so, he said, because he can draw on all those experiences, good and bad. What others see? How others evaluate his team? It doesn\u2019t matter to him.\n\u201cHe doesn\u2019t let perception become reality,\u201d said his son Kyle, the Redskins\u2019 offensive coordinator. \u201cHe knows what he\u2019s doing. All of us know what we\u2019re doing, but the difference with him is, he\u2019s so strong in his personality and he\u2019s had so much success his whole career, he\u2019s seen it all. He knows when things are done right, when things are done wrong. And he knows we\u2019re doing it right.\u201d\nThere are, Mike Shanahan believes, several aspects to \u201cdoing it right,\u201d.\n\u201cThe key is you have to keep the right people coming in through the draft, through free agency,\u201d Shanahan said. \u201c.\u2009.\u2009. You can\u2019t make a lot of bad decisions. You\u2019re going to make some, but if you do, admit it was a bad decision and move on.\u201d\nThat, essentially, is what has happened at quarterback in Shanahan\u2019s two seasons in Washington. In 2010, he traded for Philadelphia\u2019s Donovan McNabb, wasn\u2019t.\nBeck started the next three games \u2014\u2019s game, Grossman is tied for the league lead with 19 interceptions.\n\u201cYou make [the decisions] based on what you see,\u201d Shanahan said. \u201cIf John didn\u2019t play the way he did for that quarter [against Philadelphia] \u2014 the drives, all that \u2014 then we wouldn\u2019t have gone to him. .\u2009.\u2009.\u2019s a little more mobile? We didn\u2019t know that.\u201d\nThe episode raised questions about Shanahan\u2019s.\nSc.\n\u201cThe thing that people think is that I\u2019m sitting here doing all the evaluating,\u201d he said. \u201c.\u2009.\u2009. My main thing is I get everybody involved. That\u2019s how you eliminate mistakes. I\u2019ve got to feel comfortable. They\u2019ve got to feel comfortable. I\u2019ve been doing this thing a long time, and I\u2019ve made my share of mistakes. You have to learn how to limit mistakes.\u201d\nBeginning with last year\u2019s.\n\u201cYou\u2019re changing not just one guy; you\u2019re changing all 11 guys,\u201d defensive coordinator Jim Haslett said. \u201c.\u2009.\u2009. You\u2019re really starting it over from square one last year. And we made great progress, but we got to keep working at it. We got to keep getting better at it.\u201d\nThat, Shanahan believes, will happen \u2014 and soon. He can tick off the plays from 2011 that still knock around in his mind \u2014 \u2014 and build his case that his last-place Redskins aren\u2019t terribly far from first.\n\u201cYou win those games, we\u2019re playing for something right now,\u201d Shanahan said. \u201cYou\u2019ve got to keep things in perspective.\u201d\nHow Shanahan does that, players and coaches say, does not change. Not from day to day. Not from week to week. And not from season to season, regardless of how difficult things become.\n\u201cHe works in every aspect of it a lot more than I realized, from personnel to defense to special teams to offense, but he doesn\u2019t try to control everything,\u201d Kyle Shanahan said. \u201cHe makes everyone accountable. .\u2009.\u2009. If the players mess up in the game, and we didn\u2019t put them through that situation, it\u2019s definitely not their fault. It\u2019s on us all the way. He coaches his coaches hard, which makes us better coaches.\u201d\nEventually,.\n\u201cI\u2019m impervious to it,\u201d he said. \u201cYou have to be, because you have to have a plan. .\u2009.\u2009. What you have to have is belief in what you\u2019re doing. And I do, because I\u2019ve been doing it for a while.\u201d"}, {"name": "153127ee-341e-11e1-825f-dabc29fd7071", "body": "COLUMBUS, Ohio \u2014 As the Washington Capitals headed to their dressing room after 40 minutes of play on Saturday night, some players slammed their sticks in the tunnel while others threw their heads back and stared at the ceiling. It looked as though the team\u2019s 2011 might end with a whimper against the worst team in the NHL.\nA furious third-period comeback instead launched Washington into 2012 with its first three-game winning streak since October.\nThree goals in the span of 2 minutes 53 seconds erased a two-goal deficit and fueled the Capitals to a 4-2 win over the Columbus Blue Jackets at Nationwide Arena. It marked just the third time this season that Washington has rallied to win a game after trailing entering the third period.\nThe victory improved the Capitals to 5-2-1 in their past eight contests and gave them a much-needed two points to complete a run of three wins in four nights. Washington (20-15-2) holds 42 points but is sitting outside the Eastern Conference playoff picture in ninth place.\n\u201cFor a while here we were going win one, win two, lose a couple \u2014 we were going back and forth,\u201d defenseman Dennis Wideman said. \u201cWe needed to string some together. The top teams are starting to pull away from us and we\u2019re getting into that time of year where you need to crank it up and start running some wins together to try to get back up there were we need to be.\u201d\nColumbus, which has just 10 wins in 38 games, outworked the Capitals through the first two periods and carried a two-goal advantage into the final period of regulation. No one in the visitors\u2019 dressing room was pleased with the effort. But rather than accept a subpar fate, Washington opted to throw everything it had at the Blue Jackets.\n\u201cWe had nothing to lose,\u201d Coach Dale Hunter said. \u201cWe were down 2-0, it\u2019s an all-out blitz and the guys did a great job skating, playing hard, never quit, and it\u2019s a credit to them.\u201d\nHunter wanted pressure from all areas, with defensemen pinching to help keep offensive play alive. Ovechkin began the onslaught when he recorded his first goal of the night 4:23 into the third. Though scored as unassisted, his one-timer from the left faceoff circle that broke Steve Mason\u2019s shutout bid was set up by a slap pass from Wideman.\nThe defenseman set up another tally when he found Alexander Semin, whose wicked wrister at 6:48 evened the score at 2 during four-on-four play while the Capitals\u2019 Dmitry Orlov and Grant Clitsome of Columbus were in the penalty box for matching roughing minors.\nTwenty-eight seconds later Wideman added a goal of his own, his first in nine games. The blast of a slap shot, which also came during four-on-four play, deflected off a Blue Jacket\u2019s stick to beat Mason (22 saves) and stood as the game-winner.\nOvechkin added his second of the night and 16th of the season as insurance with just less than nine minutes remaining in regulation with a slap shot on the power play. The star left wing has seven goals in the past eight games.\n\u201cEverybody was upset how we playing [in the first two periods]. I don\u2019t think we play at all our game,\u201d Ovechkin said. \u201cSo we just play hard and again this kind of win that we need and all the momentum on our side.\u201d\nUntil the final period, though, the contest was hardly under the Capitals\u2019 control. The game featured choppy play with turnovers aplenty, an abundance of whistles and more than 34 minutes of scoreless action.\nEarly in the game, the Blue Jackets showed a willingness to win battles for the puck in corners and along the boards, forcing the issue against Washington, which looked beleaguered in its second game in as many nights.\nAs the first period wore on, Columbus (10-23-5) gained some momentum and in the final five minutes of the period peppered netminder Tomas Vokoun (35 saves) with shots from all angles and speeds. The veteran goaltender remained composed and helped Washington reach the intermission in a scoreless tie.\nIn the second, what was already a slow-moving contest regressed to more of a crawl as whistles for offsides, high sticks, icings or shots off the netting occurred with stunning frequency. With the play continuing in spurts, the first goal grew in importance, and Columbus got it when a turnover by Jason Chimera turned into a goal by John Moore at 14:47 of the second.\nSamuel Pahlsson made it 2-0 with just 34.9 seconds remaining in the second, but that tally, which could have set Washington on its heels, galvanized the group into making sure it didn\u2019t let the week of progress unravel in one night.\n\u201cIt\u2019s a big win for us. Losing here would have erased the big effort against Buffalo and Rangers earlier this week,\u201d Vokoun said. \u201cWe need these points. We\u2019re not sitting in the second or first place where we can say, \u2018Well we have a nice comfortable cushion.\u2019 We\u2019re actually outside the playoffs so we need every point we can get.\u201d\nCapitals note: Mike Green missed a 23rd consecutive contest with a strained right groin muscle. He made the trip with the team, however, and took part in an optional on-ice workout Saturday."}, {"name": "8d0035ac-340b-11e1-a274-61fcdeecc5f5", "body": "The last day of a warm December was one of the month\u2019s warmest. Washington\u2019s high temperature Saturday was 62, just a degree short of the 63-degree top reading for the entire month.\nSaturday\u2019s soaring mercury helped cement the month\u2019s place as one of the most meteorologically benign Decembers here since National Weather Service recordkeeping began in 1871.\nAs the last hours of December and 2011 faded, it appeared that the month\u2019s average temperature could be as high as 45 degrees. That would be less than a degree below the 45.6 degree record, set in 1889 and not matched until 1984.\nIn recent years, December warmth has seemed more frequent and less of a surprise. News reports from the days of Washington\u2019s warmest December suggest a greater degree of wonder.\nA story in the Dec. 27, 1889 Washington Post asked whether the Gulf Stream had shifted position. (The answer: No.) A Dec. 16 report told of snow seen atop a train arriving from the Northeast, calling it \u201cthe first evidence that Washingtonians have yet had of the actual presence of winter.\u201d"}, {"name": "a0fb5cda-340b-11e1-825f-dabc29fd7071", "body": "Packers already clinched North and home-field,Lions and Falcons already clinched playoff spots\nSan Francisco 49ers: Already clinched West Clinch first-round bye: W OR T and Saints T/L OR Saints L\nNew Orleans Saints: Already clinched South Clinch a first-round bye: W and a 49ers T/L OR T and 49ers L\nNew York Giants: Clinch East: With a W/T against Cowboys.\nDallas Cowboys: Clinch East:With a W against Giants\nNew England Patriots: Already clinched East, bye Clinch home field: W OR Ravens and Steelers L/T\nBaltimore Ravens: Already clinched playoff spot Clinch North: W/T and Steelers T/L OR Steelers L Clinch home field: W and Patriots L\nPittsburgh Steelers: Already clinched playoff spot Clinch North: W and Ravens T/L OR T and Ravens L. Clinch home field: W and Patriots L, Ravens L/T\nDenver Broncos: Clinch West:W OR T and Raiders T/L OR Raiders L\nOakland Raiders: Clinch West: W and Broncos T/L OR T and Broncos L Clinch playoff spot: W and Bengals L and Titans L/T OR W and Bengals L and Jets W\nCincinnati Bengals: Clinch playoff spot: W/T OR Jets T/L and Raiders T/L OR Jets T/L and a Broncos T/L\nNew York Jets: Clinch playoff spot: W and Bengals L, Titans T/L and Raiders T/L OR W and Bengals L and Titans T/L and Broncos T/L\nTennessee Titans: Clinch playoff spot:W and and Bengals L, Jets W and Raiders T/L OR W and Bengals L, Jets W and Broncos T/L OR W and Bengals L, Jets T/L, Raiders W and Broncos W"}, {"name": "69f1a5e2-342d-11e1-825f-dabc29fd7071", "body": "ATLANTA \u2014 The Virginia football team gained entry into the Chick-fil-a-A Bowl on Saturday night in large part because it spent the fall listening to all the things it hadn\u2019t accomplished in a long time and then accomplishing those very things. Next item on the list: The Cavaliers had not concluded a season with a victory since 2005.\nBut this was not a night for fitting endings. Depleted by injuries on defense and continuously flummoxed on special teams, Virginia did not possess enough offensive firepower to overcome a sizable hole. Despite totaling 435 total yards, the Cavaliers fell to Auburn, 43-24, at Georgia Dome and will have to resolve to finish next season on a higher note.\n\u201cThey played better than we did; they made more plays than we did,\u201d Virginia Coach Mike London said of Auburn. \u201cSo my hat goes off to them, and we just regroup, get ready and remember this experience. Because this is something we want to do, play in the postseason and have a chance to play teams like that.\u201d\nThe final two minutes of the third quarter did a fine job of encapsulating the night. Auburn (8-5) had blocked a punt by Virginia (8-5) in the first quarter. So the Cavaliers tried a rugby-style punt out of their own end zone late in the third. The Tigers blocked that one, too, resulting in a safety.\n\u201cThe second one was on me because I got nervous after we got the first one blocked,\u201d Virginia special teams coordinator Anthony Poindexter said. \u201cYou really can\u2019t do what we tried to do down there. .\u2009.\u2009. That was kind of an overreaction to getting the first one blocked.\u201d\nOn the ensuing free kick, the Tigers returned the ball 62 yards to the Virginia 15-yard line. Two Auburn penalties turned an easy field goal attempt into a 45-yarder, but the Tigers converted anyway.\nIn the weeks leading up to Saturday, relatively little of the public discussion centered on either squad\u2019s special teams units, but that proved to be a critical facet of the game. Two plays after Auburn\u2019s first blocked punt, quarterback Kiehl Frazier scored on a three-yard touchdown run to tie the game at 7.\nThe Cavaliers began the second quarter by completing a 10-play, 73-yard drive with a six-yard touchdown pass from quarterback Michael Rocco to Kris Burd, his second scoring reception of the night. But as far as highlights go, that was about it for Virginia. Burd, a fifth-year senior who finished with six receptions for 103 yards, left the game early in the fourth quarter with what he later described as a collarbone injury.\n\u201cI thought we were blocking great up front,\u201d Virginia offensive coordinator Bill Lazor said. \u201cWe knew we\u2019d get better as the game went on. We knew we\u2019d be stronger as it went, but we just couldn\u2019t put enough points on the board to go with it.\u201d\nMeantime, the Virginia defense struggled increasingly as the game progressed. Defensive coordinator Jim Reid said that after Auburn\u2019s first few offensive drives, \u201cI thought we were going to shut \u2019em out.\u201d\nHowever, missed tackles and over-pursuit \u2014 \u201cthings we hadn\u2019t done all year,\u201d Reid said \u2014 made the Virginia defense susceptible to giving up big plays.\nAfter holding Auburn to 37 yards in the first quarter, Virginia\u2019s defense gave up plays of 22, 25, 28, 50 and 60 yards in the second quarter, during which the Tigers gained 237 total yards. That\u2019s more yards than Auburn gained in losses to Georgia and Alabama this season.\nBut the Cavaliers\u2019 defense was not at full strength Saturday. First team all-ACC cornerback Chase Minnifield sat out the final game of his collegiate career with a knee injury, as did redshirt junior middle linebacker Steve Greer, a second team all-ACC pick and Virginia\u2019s leading tackler this season.\nGreer suffered a partially torn anterior cruciate ligament in his right knee during practice two weeks ago and will undergo surgery Tuesday.\u00a0\n\u201cGetting a hold of their offense, they really came out with it seemed like just different kind of stuff, misdirections and what-not, that I didn\u2019t pay attention to on film as much,\u201d said redshirt freshman linebacker Henry Coley, who replaced Greer in the starting lineup. \u201cI put myself in bad spaces.\u201d\nThe Cavaliers gave up a season-high 455 total yards against the Tigers, though to point the finger at any one defensive player would be foolish.\nIn the midst of all those yards were more special teams miscues by the Cavaliers. Auburn also attempted an onside kick in the second quarter and converted.\nThe Tigers scored a touchdown five plays later to take a 21-14 lead.\nLate in the first half, Virginia faked a 32-yard field goal attempt and had holder Jacob Hodges run the ball on fourth and six. He came up three yards short of the first down marker. Auburn scored a touchdown nine players later to go up 28-14.\n\u201cWe hadn\u2019t been to a bowl game around here since [2007]. That alone, I feel, launches the team forward,\u201d Burd said. \u201cBehind Coach London and the atmosphere he\u2019s bringing, how the community is behind us and how people are really buying in, I feel like this was definitely a great launching point for the program, and I\u2019m excited to see where it goes.\u201d"}, {"name": "6033cbfe-21e8-11e1-a34e-71d4bf6b8d0a", "body": "It was the kind of year that made a person look back fondly on the gulf oil spill.\nGranted, the oil spill was bad. But it did not result in a high-decibel, weeks-long national conversation about a bulge in a congressman\u2019s.\n.\nSo finally, repelled by the drainage ditch that our political system has become, we turned for escape to an institution that represents all that is pure and wholesome and decent in America today: college football.\nThat was when we started to have fond memories of the oil spill.\nI\u2019m \u201cJersey Shore\u201d went to Italy and then \u2014 in an inexcusable lapse of border security \u2014 were allowed to return.\nBut: \u201cOops.\u201d\nAs.\nWere there any positive developments in 2011? Yes:\n\u2022 Osama bin Laden, Moammar Gaddafi and the New York Yankees all suffered major setbacks.\n\u2022 Kim Kardashian finally found her lifetime soul mate for nearly 21 / 2 months.\n\u2022 Despite a prophecy by revered Christian radio lunatic Harold Camping, the world did not end on May 21.\nCome to think of it, that last development wasn\u2019t totally positive, not when we consider all the other things that happened in 2011. In case you\u2019ve blotted it out, let\u2019s take one last look back, through squinted eyelids, at this train wreck of a year, starting with ...\nJANUARY\n... which sees a change of power in the House of Representatives, as outgoing Democratic Speaker Nancy Pelosi hands the gavel over to Republican John Boehner, who, in the new spirit of Washington bipartisanship, has it checked for explosives.\nIn the State of the Union address, President Obama calls on Congress to improve the nation\u2019s.\nThe month\u2019s.\nIn Egypt, demonstrators take to the streets to protest the three-decade regime of President Hosni Mubarak following revelations that \u201cHosni Mubarak\u201d can be rearranged to spell \u201cA Bum Honks Air.\u201d The movement continues to grow in ...\nFEBRUARY\n... when \u201cArab Spring\u201d anti-government demonstrations spread from Egypt to Yemen, then to Iraq, then to Libya, and finally \u2014 in a development long feared by the U.S. government \u2014 to the volatile streets of Madison, Wis., where thousands of protesters occupy the state capitol to dramatize the fact that it\u2019s.\nIn other national news, a massive snowstorm paralyzes the Midwest, forcing a shutdown of Chicago\u2019s O\u2019Hare Airport after more than a dozen planes are attacked by yetis. President Obama responds with a nationally televised speech pointing out that the storm was caused by a weather system inherited from a previous administration.\nIn Europe, the economic crisis continues to worsen, especially in Greece, which has been operating under a financial model in which the government spends approximately $150 billion a year while taking in revenue totaling $336.50 from the lone Greek taxpayer, an Athens businessman who plans to retire in April. Greece has been making up the shortfall by charging everything to a MasterCard account that the Greek government applied for \u2014 in what some critics consider a questionable financial practice \u2014 using the name \u201cGermany.\u201d\nIn a historic episode of the TV quiz show \u201cJeopardy!,\u201d two human champions are swiftly dispatched by an IBM supercomputer named Watson, which combines an encyclopedic knowledge of a wide range of subjects with the ability to launch a 60,000-volt surge of electricity 25 feet.\nOn Broadway, the troubled musical \u201cSpider-Man: Turn Off the Dark\u201d suffers a setback when three actors and 11 audience members are injured in what the producers describe as a \u201ccatastrophic spandex failure.\u201d\nIn sports, two storied NFL franchises, the Pittsburgh Steelers and the Green Bay Packers, meet in Super Bowl XLV, a tense, back-and-forth battle won at the last minute, in a true shocker, by Watson the IBM supercomputer.\nSpeaking of shocking, in ...\nMARCH\n... the European economic crisis worsens still further as Moody\u2019s downgrades its credit rating for Spain following the discovery that the Spanish government, having run completely out of money, secretly sold the Pyrenees to China and is now separated from France only by traffic cones.\nIn domestic news, the renegade Wisconsin Democratic state legislators are finally captured in a late-night raid by the elite Wisconsin State Parliamentarian SWAT team, which knocks down the legislators\u2019 hotel room door using a 200-pound, steel-reinforced edition of Robert\u2019s Rules of Order. The SWAT team then subdues the legislators using what one source describes as \u201ca series of extremely aggressive cloture votes.\u201d\nOn.\nIn tech news, Apple, with much fanfare, unveils the latest model of its hugely popular iPad tablet computer. The new model, called the iPad 2, is similar to the original iPad but \u2014 in yet another example of the brilliant customer-pleasing innovation that Apple has become famous for \u2014 has a \u201c2\u201d after it. Apple enthusiasts line up by the thousands to buy the new model, even as excitement builds for the next iPad, which, according to rumors swirling around an excited Apple fan community, will feature a \u201c3.\u201d\nThe troubled musical \u201cSpider-Man: Turn Off the Dark\u201d suffers yet another setback when four orchestra musicians are killed by what producers describe as a \u201cfreak clarinet accident.\u201d Responding to the tragedy, President Obama delivers a nationally televised address, expressing his personal sympathy and noting that Republicans in Congress have repeatedly blocked the administration\u2019s proposed $37 billion Federal Department of Woodwind Safety, which would create literally dozens of jobs.\nIn sports, National Football League team owners lock out the players after negotiations break down over the issue of \u2014 in the words of NFL Commissioner Roger Goodell \u2014 \u201clocker rooms being littered with reeking jockstraps the size of hammocks.\u201d\nSpeaking of negotiations, in ...\nAPRIL\n... a major crisis is barely avoided when Congress, after frantic negotiations, reaches a last-minute agreement on the federal budget, thereby averting a government shutdown that would have had a devastating effect on the ability of Congress to continue spending insanely more money than it actually has.\nMeanwhile the economic outlook remains troubling, as Federal Reserve Chairman Ben Bernanke, in a rare news conference, consumes an entire bottle of gin. Things are even worse in Europe, where Moody\u2019s announces that it has officially downgraded Greece\u2019s credit rating from \u201cpoor\u201d to \u201crat mucus\u201d following the discovery that the Acropolis has been repossessed.\nOn \u201cbirther\u201d.\nMeanwhile the troubled musical \u201cSpider-Man: Turn Off the Dark\u201d\u2019s producers describe as \u201csome audience unpleasantness during the flying scenes.\u201d\nBut.\nSpeaking of joyous, in ...\nMAY\n...\u2019s legal rights, the SEALs convert him into Purina brand Shark Chow; he is then laid to rest in a solemn ceremony concluding upon impact with the Indian Ocean at a terminal velocity of 125 miles per hour.\nWhile Americans celebrate, the prime minister of Pakistan declares that his nation (a) is very upset about the raid and (b) had no earthly idea that the world\u2019s most wanted terrorist had been living in a major Pakistani city in a large high-walled compound with a mailbox that said BIN LADEN.\n\u201cAs God is my witness,\u201d states the prime minister, \u201cwe thought that place was a Wal-Mart.\u201d\nIn\u2019s.\nMeanwhile, \u201cSpider-Man: Turn Off the Dark,\u201d the entire cast is sucked through the theater ceiling, never to be seen again.\nAs the month draws to a close, a Twitter account belonging to Anthony Weiner \u2014 a feisty, ambitious Democratic up-and-comer who managed to get elected to Congress despite looking like a nocturnal rodent that somehow got a full-body wax and acquired a gym membership \u2014 tweets a link to a photograph of a pair of briefs containing what appears to be a congressional member rarin\u2019 to filibuster, if you catch my drift. This member immediately captivates the nation, although, surprisingly, President Obama fails to deliver a nationally televised address about it. The drama continues to build in ...\nJUNE\n... when Weiner denies that he sent the photo, although he admits he cannot say \u201cwith certitude\u201d whether the member is or is not his. He finally confesses to sending the photo, and, as the pressure on him to resign becomes overwhelming, he is left with no choice but to declare his intention to seek the Republican presidential nomination.\nNo, I\u2019m kidding. Weiner resigns and takes a full-time position in the private sector admiring himself in the mirror.\nMeanwhile the Republican field does in fact continue to grow as Michele Bachmann, Rick Santorum,Mitt Romney, the late Sonny Bono and somebody calling himself \u201cJon Huntsman\u201d all enter the race, bringing the Republican contender total to roughly 125.\nIn Washington, Congress is under mounting pressure to do something about the pesky federal debt, which continues to mount as a result of the fact that the government continues to spend insanely more money than it actually has. Congress, after carefully weighing its three options \u2014 stop spending so much money; get some more money somehow; or implement some combination of options one and two \u2014 decides to go with option four: continue to do nothing while engaging in relentlessly hyperpartisan gasbaggery. Incredibly, this does not solve the debt problem.\nThe\u2019s to change Greece\u2019s credit rating to, quote, \u201ca word we can\u2019t say, but trust us, it\u2019s worse than rat mucus.\u201d\nBut perhaps the month\u2019s \u201cSpider-Man: Turn Off the Dark.\u201d\nSpeaking of disturbing, in. ..\nJULY\n....\nSpeaking \u2014 A SUPER committee! \u2014 comes up with a plan, by a later date, that will solve this pesky problem once and for all. Everybody involved heaves a sigh of relief and basks in the feeling of satisfaction that comes from handling yet another crisis, Washington-style.\nBut things are not so rosy in Europe, where the debt crisis continues to worsen with the revelation that Greece has sold the naming rights to itself and will henceforth be officially known as the Republic of Burger King. In response, Moody\u2019s lowers Greece\u2019s bond rating to the point where it is no longer represented by words or letters, just a brownish stain on the rating document.\nIn England, the News Corp. media empire comes under scrutiny for alleged phone hacking when an investigation reveals that calls to Queen Elizabeth\u2019s private mobile number are being answered by Rupert Murdoch speaking in a high-pitched voice.\nOn a positive note, NFL owners and players are finally able to settle their dispute, thereby averting the very real danger that millions of fantasy football enthusiasts would be forced to develop lives.\nSpeaking of threats, in ...\nAUGUST\n... Standard & Poor\u2019s makes good on its threat to downgrade the U.S. credit rating, noting that the federal government, in making fiscal decisions, is exhibiting \u201cthe IQ of a turnip.\u201d Meanwhile Wall Street becomes increasingly jittery as investors react to Federal Reserve Board Chairman Bernanke\u2019s surprise announcement that his personal retirement portfolio consists entirely of assault rifles.\nWith the stock market in a steep nosedive, economic growth stagnant and unemployment relentlessly high, the White House, moving swiftly to prevent panic, reassures a worried nation that President Obama will once again be vacationing on Martha\u2019s Vineyard, where he will recharge his batteries in preparation for what White House press secretary Jay Carney promises will be \u201ca real humdinger of a nationally televised address.\u201d\nIn political news, Texas Gov. Rick Perry announces that he will seek the Republican nomination with a goal of \u201crestoring the fundamental American right to life, liberty and a third thing.\u201d-runners, Bachmann\u2019s candidacy immediately sinks like an anvil in a duck pond.\nAbroad, a wave of riots sweeps across England as thousands of protesters take to the streets of London and other major cities to strike a blow against racism and social injustice by stealing consumer electronics and designer sneakers.\nAs \u201cSpider-Man: Turn Off the Dark.\u201d The producers, determined to escape the bad luck that has haunted the current theater, move the entire production to New Jersey, which unfortunately turns out to be directly in the path of Hurricane Irene.\nSpeaking of disasters, in ...\nSEPTEMBER\n....\nIn domestic news, President Obama returns from his Martha\u2019s\u2019s time for another presidential getaway.\nMeanwhile on the Republican side, Herman Cain surges to the top of the pile with his \u201c9-9-9\u201d.\nIn what is seen as a sign of public disenchantment with the political process, voters in New York\u2019s Ninth Congressional District, choosing a replacement for disgraced Rep. Anthony Weiner, elect Anthony Soprano, despite the fact that he is a fictional character and not even Jewish.\nDisenchantment is also apparent in New York\u2019s Zuccotti Park with the birth of the Occupy Wall Street movement, a gathering of individuals who seek to focus the nation\u2019s.\nAs \u201cSpider-Man: Turn Off the Dark.\u201d\nThe downward trend continues in ...\nOCTOBER\n... which sees yet another troubling development in the world economic crisis when an International Monetary Fund audit of the 27-nation European Union reveals that 11 of the nations are missing. \u201cAlso,\u201d states the audit report, \u201cthe nation claiming to be Slovakia is in fact Belize using a fake ID.\u201d Meanwhile in Greece, thousands of rioters take to the streets of Athens to protest a tough new government austerity program that would sharply reduce the per diem rioter allowance.\nIn Arab Spring developments, Libyan strongperson and lunatic Moammar Gaddafi steps down and receives an enthusiastic sendoff from his countrymen, who then carry him, amid much festivity, to his retirement freezer.\nOn.\nAttorney General Eric Holder announces that the FBI has uncovered a plot by Iran to commit acts of terror in the United States, including assassinating the Saudi ambassador, bombing the Israeli Embassy, and \u2014 most chillingly \u2014 providing funding for traveling productions of \u201cSpider-Man: Turn Off the Dark.\u201d\nOn the political front, Sarah Palin announces that she will not seek the Republican presidential nomination, noting that the GOP field is \u201calready funny enough.\u201d\nIn technology news, Apple releases the iPhone that comes after the iPhone 4, which was rumored to be named the \u201c5,\u201d but which instead is named \u2014 talk about innovation \u2014 the \u201c4S.\u201d It is of course a huge hit with Apple fans, who, upon purchasing it, immediately form new lines outside Apple stores to await the next breakthrough iPhone, preliminarily rumored to be named the \u201c4.7.\u201d\nIn sports, one of the most exciting World Series in history is won by some team other than the New York Yankees.\nHumanity reaches a major milestone as the United Nations estimates that the population of the Earth has reached 7 billion people, every single one of whom sends you irritating e-mails inviting you to join something called LinkedIn.\nThe month ends on a tragic note when Kim Kardashian, who only 72 days earlier had a fairy-tale $10 million wedding to the love of her life, professional basketball player whatshisname, files for divorce, citing irreconcilable differences in height. \u201cAlso,\u201d she states in the filing documents, \u201cI am a total slut.\u201d\nSpeaking of fairy tales, in ...\nNOVEMBER\n... the congressional Supercommittee, after months of pondering what to do about the fact that the federal government is spending insanely more money than it actually has, announces that, in the true \u201ccan-do\u201d.\nUndaunted, Democratic and Republican leaders move forward with the vital work of blaming each other. As it becomes clear that Congress will do nothing, a visibly frowning President Obama delivers a nationally televised address in which he vows to, quote, \u201ccontinue reading whatever it says here on the teleprompter.\u201d\nSpeaking of the many benefits provided by the federal government: As Thanksgiving approaches, the Department of Homeland Security, having apparently handled all the other terrorist threats, issues a warning, including a scary video, on the dangers of: turkey fryers. I am not making this item up.\nAbroad, the worsening Greek economic crisis forces Prime Minister George Papandreou to resign, leading to the formation of a new coalition government headed \u2014 in what some economists view as a troubling sign \u2014 by Bernie Madoff.\nIn domestic politics, the Republican Party is rocked by polls showing that 43 percent of all likely voters \u2014 nearly 55 million people \u2014!\nSpeaking of extraterrestrial phenomena: Astronomers watch closely as an asteroid 1,300 feet across hurtles extremely close to Earth. Incredibly \u2014 NASA calls it \u201ca one in a billion chance\u201d \u2014 the asteroid fails to hit anyone or anything connected with \u201cSpider-Man: Turn Off the Dark.\u201d\nIn business news, GM, responding to fears that the Chevy Volt might be prone to catch fire, issues a message to the six American consumers who have actually purchased Volts, assuring them that the car is \u201ccompletely safe\u201d and \u201cshould never be parked near buildings.\u201d American Airlines files for Chapter 11 bankruptcy, but assures its passengers that \u201cnormal flight operations will remain just as screwed up as before.\u201d\nThe month ends on a reflective note as Americans pause to observe Thanksgiving very much as the Pilgrims did in 1621, by pepper-spraying each other at malls.\nSpeaking of pausing, in ...\nDECEMBER\n... Herman Cain announces that he is suspending his presidential campaign so he can go home and spend more time sleeping in his basement. This leaves the Republicans with essentially a two-man race between Gingrich and Romney, which means it\u2019s only a matter of time before we start hearing the name \u201cBob Dole.\u201d\nThe U.S. Postal Service, facing huge losses, announces a cost-cutting plan under which it will start delivering first-class mail \u201cto totally random addresses.\u201d The resulting savings will enable the USPS \u201cto continue providing every American household with a minimum of 145 pounds of junk mail per week.\u201d\nMeanwhile, \u201cenough stuffing to choke a buffalo.\u201d\nAbroad, the member nations of the European Union, in a last-ditch effort to avoid an economic meltdown, announce that they are replacing the euro with a new unit of currency, the \u201cpean,\u201d the exchange rate for which will be linked to the phases of the moon. The goal, according to the EU announcement, is \u201cto cause American tourists to become even more confused than they already are.\u201d The plan starts paying dividends immediately as a pair of elderly ladies from Indianapolis purchase two croissants at a Paris cafe for six peans and wind up leaving the equivalent of a $3,780 tip.\nThe \u201cmagical powers.\u201d\nSo the nation is clearly in good hands, and as the troubled year finally comes to an end, throngs of New Year\u2019s revelers, hoping for better times to come, gather in Times Square to watch the descent of the famous illuminated ball, followed by the rise of what appears to be a mushroom cloud from the direction of \u201cSpider-Man: Turn Off the Dark.\u201d\nBut there\u2019s no need to worry: The president is planning a nationally televised address. So everything will be fine. Happy new year.\nDave Barry, co-author of the novel Lunatics \" target=\"_blank\">\u201cLunatics,\u201d which is being published this month, can be reached at wpmagazine@washpost.com. Read his Year in Review stories from past years, and chat with him Tuesday at noon ET."}, {"name": "dbe17e88-331b-11e1-825f-dabc29fd7071", "body": "The Vatican is set to launch a structure Monday that will allow Anglican parishes in the United States \u2014 and their married priests \u2014 to join the Catholic Church in a small but symbolically potent effort to reunite Protestants and Catholics, who split almost 500 years ago.\nMore than 1,300 Anglicans, including 100 Anglican priests, have applied to be part of the new body, essentially a diocese. Among them are members of St. Luke\u2019s in Bladensburg, which this summer became the first group in the country to convert to Catholicism.\nSt. Luke\u2019s and Baltimore\u2019s Mount Calvary, which also applied to join, were part of the Episcopal Church, the official wing of American Anglicanism. But most of those joining the new structure are Anglicans who aren\u2019t part of the Episcopal Church.\nIt\u2019s.\n\u201cIt\u2019s the largest reunification effort in 500 years,\u201d said Susan Gibbs, a spokeswoman for the new body, called an ordinariate.\nThe possibility of dozens of married Catholic priests could provide fodder for Catholics who want the Vatican to open up on the issue of priestly celibacy. There are about 40,000 Catholic priests in the United States.\nGibbs declined to say which priests and parishes have expressed interest. But congregants at St. Luke\u2019s,.\nMore.\nTens of thousands have left the Episcopal Church since then for breakaway groups.\nBut people in both movements \u2014 Anglo-Catholics and Episcopal breakaway groups \u2014 tend to voice similar concerns about the liberal direction of the Episcopal Church. They mention the ordination and marrying of gays and lesbians; the ordination of women; and leaders who view the Bible as metaphor, not fact.\nIn 1980, the Vatican created a different system for American Anglicans to join the Catholic Church but didn\u2019t give them as much freedom as the new structure provides. In the 32 years since, 90 Anglican priests have joined the Catholic Church, as have seven congregations, totaling 1,230 families, Gibbs said. Almost all are in Texas and Pennsylvania.\nThe U.S. ordinariate is the second. One that launched this year in England has more than 1,000 members and 57 priests, Gibbs said.\nCardinal Donald Wuerl, archbishop of Washington, has been the Vatican\u2019s point man on setting up the ordinariate.\nGibbs said that the movement wouldn\u2019t change the church\u2019s position on celibacy and that the exception is only for married Anglican priests.\n\u201cIt\u2019s written into the founding documents,\u201d she said. \u201cThe norm is celibacy.\u201d\nOne of the Episcopal Church\u2019s longtime liaisons with other faiths, including the Catholic Church, said the Vatican could have consulted more with Episcopal leaders before announcing the changes.\n\u201cIf this papacy sees this as the only way to dialogue with other religions, that\u2019s troubling,\u201d said the Very Rev. Thomas Ferguson, who from 2001 until 2010 worked on ecumenical outreach. Ferguson is dean of Bexley Hall Seminary in Columbus, Ohio.\nHe predicted that the new structure wouldn\u2019t draw that many people.\n\u201cIn the end, we\u2019re a country founded on religious beliefs, and people need to go where they\u2019re called to go,\u201d Ferguson said.\n\u201cThat\u2019s fine. God bless them.\u201d"}, {"name": "92c0a656-3448-11e1-825f-dabc29fd7071", "body": "BEIJING \u2014 A forceful 6.8-magnitude earthquake hit off the coast of southeastern Japan on Sunday, rattling buildings in Tokyo and jolting a nation still recovering from last year\u2019s mega-disaster.\nBut the earthquake caused little apparent damage, with no initial reports of damaged buildings or injuries. It prompted no tsunami warning, and nuclear plants across the nation reported no irregularities.\nThe earthquake was centered near Japan\u2019s Izu Islands, about 307 miles south-southwest of Tokyo, according to the U.S. Geological Survey. The quake struck at a depth of 217 miles; such a deep jolt is less likely to cause damage than one close to the surface.\nFor those in Tokyo, this was among the biggest shakes since the 9.0-magnitude earthquake of March 11 that triggered Japan\u2019s greatest crisis since World War II. Books fell off shelves, and buildings quivered.\nSome roads were temporarily closed, but the train system was unaffected.\n\u201cMemorable start to New Year \u2014 about to greet Emperor and Empress for New Year when Imperial Palace began to shake,\u201d John Roos, the U.S. ambassador to Japan, said in a message on Twitter.\nThe March 11 earthquake, which struck off the northeastern coast, led to the deaths of more than 20,000 and sparked a triple meltdown at the Fukushima Daiichi nuclear plant. Since that day, Japan \u2014 whose islands stretch along the world\u2019s most seismically active region \u2014 has had at least 16 earthquakes or aftershocks of magnitude 6.5 or higher.\nMore world news coverage:\nRussia arrests New Year\u2019s protesters\nMaliki marks end of U.S.-Iraq pact\nIn Egypt, an act of courage that launched a revolution\nRead more headlines from around the world\n"}, {"name": "2ebf4e80-346d-11e1-88f9-9084fc48c348", "body": "BEIJING \u2014 North Korea vowed an \u201call-out drive\u201d Sunday toward economic prosperity, setting a vision for a nation with fewer food shortages, a stronger military and a people who defend their new supreme leader with their lives.\n\u201cThe whole Party, the entire army and all the people should possess a firm conviction that they will become human bulwarks and human shields in defending Kim Jong Eun unto death,\u201d said an editorial carried in the country\u2019s three major state-run publications.\nNorth Korea uses its annual New Year\u2019s editorial to set the agenda for the nation, and outside analysts describe it as a fiery keynote. This year\u2019s message provided a window into the country\u2019s policymaking \u2014 and its many challenges \u2014 after the death of Kim Jong Il, who left behind a failing nuclear-armed nation led by an inexperienced hereditary successor.\nThe editorial, outside experts said, tried both to push for economic growth and build support for the young leader, who is thought to be in his late 20s. The editorial made clear that Kim Jong Eun would follow Kim Jong Il\u2019s plan to build a prosperous nation, and it described the successor as a perfect duplicate of his father. Kim Jong Eun\u2019s legitimacy, experts say, depends on that link, especially as he tries to build support among older party and military elites. But his country also faces problems \u2014 notably, chronic food shortages and human rights abuses \u2014 that his father and grandfather either failed to or neglected to address.\n\u201cIt is the steadfast determination of our Party that it will make no slightest vacillation and concession in implementing the instructions and policies [Kim Jong Il] had laid out in his lifetime,\u201d the editorial said.\nAfter 63 years of rule by the Kim family, North Korea has among the world\u2019s lowest living standards, its people confined in a secretive police state. But North Korea has long tabbed 2012 \u2014 the 100th anniversary of founder Kim Il Sung\u2019s birth \u2014 as a year for massive development and emergence as a \u201cstrong and prosperous\u201d first-world state. The Sunday editorial described 2012 as a \u201cmajor, important occasion for displaying the might of Korea.\u201d\nThe editorial made a rare mention of the country\u2019s \u201cburning\u201d food problem, but it outlined only vague steps for a solution, calling on \u201cloyalty to the revolution\u201d and a radical increase in crop yield.\nBefore Kim Jong Il\u2019s\u2019s new leadership. The State Department\u2019s top Asia diplomat, Kurt Campbell, will visit Beijing, Seoul and Japan this week.\nNorth Korea\u2019s Sunday editorial included almost none of its typical criticism of Washington, though several times it mentioned the imperialist threat that surrounded it. The country also described \u201cU.S. aggressor forces\u201d as the main obstacle to peace on the Korean Peninsula. But it gave no mention of its nuclear weapons program \u2014 a sign, experts said, that the country might be open to further talks.\n\u201cBefore Kim Jong Il died, North Korea started to have that dialogue, and they were willing to accept the U.S.\u2019s nutritional aid,\u201d said Ryoo Kihl-jae, a professor at Seoul\u2019s University of North Korean Studies. \u201cSo it was very natural for North Korea not to denounce the U.S. in this editorial. It\u2019s a sign that they are still willing for dialogue in the future.\u201d\nMore world news coverage:\nRussia arrests New Year\u2019s protesters\nMaliki marks end of U.S.-Iraq pact\nIn Egypt, an act of courage that launched a revolution\nRead more headlines from around the world"}, {"name": "95195e84-32fe-11e1-825f-dabc29fd7071", "body": "With Republican voters in Iowa set to finally begin picking a nominee to challenge President Obama, GOP officials in Washington are quietly and methodically finishing what operatives are calling \u201cthe book\u201d \u2014 500 pages of Obama quotes and video links that will form the backbone of the party\u2019s attack strategy against the president leading up to Election Day 2012.\nThe document, portions of which were reviewed by The Washington Post, lays out how GOP officials plan to use Obama\u2019s words and voice as they build an argument for his defeat: that he made specific promises and entered office with lofty expectations and has failed to deliver on both.\nRepublican officials say they will leverage the party\u2019s.\nThe decision by GOP officials to finalize a strategy at this stage underscores the view, in both parties, that the general-election campaign has begun \u2014 even if an official Republican nominee has not been selected.\nThe new GOP playbook is designed to take one of Obama\u2019s great assets \u2014 the power of his oratory \u2014 and turn it into a liability. It details hundreds of potential targets, partially a result of a president who Republican strategists say is unusually prone to making detailed promises.\nA 2009 Obama statement that his stimulus bill would lift 2\u00a0million Americans out of poverty, for example, is paired against census data showing that more than 6\u00a0million Americans have fallen into poverty since he took office. A pledge that an administration housing plan would \u201chelp between 7 and 9 million families restructure or refinance their mortgages\u201d is paired against news reports showing the government spent far less than promised and aided fewer than 2\u00a0million.\n.\nOne Obama quote will be featured prominently: In 2009 he said on NBC\u2019s \u201cToday\u201d show that if he could not fix the economy in three years, \u201cthen there\u2019s going to be a one-term proposition.\u201d\n\u201cThat\u2019s a clip the American people will hear and see over and over and over again throughout the next year,\u201d said Republican National Committee Chairman Reince Priebus. \u201cThe nice thing about Barack Obama is that he\u2019s given us plenty of material. The one thing he loves to do is give speeches.\u201d\nA similar in-his-own-words strategy has already been adopted by Obama\u2019s campaign and the Democratic National Committee designed to portray GOP front-runner Mitt Romney as a flip-flopper.\nA \u201cMitt vs. Mitt\u201d online video, showing Romney expressing opposing views on various issues over time, gained considerable attention and prompted a new round of questions from primary rivals and journalists about whether Romney can be trusted.\nWith a campaign war chest expected to total at least $750\u00a0million, the Obama campaign and the DNC are likely to continue hammering Romney\u2019s shifting stances on hot-button issues to portray him as lacking a moral core.\nAt the same time, Obama\u2019s\u2019s leadership.\n\u201cFour \u2014 promises that have been fulfilled,\u201d said Obama spokesman Ben LaBolt. \u201cCompare.\u201d\nGOP officials are set to roll out new attacks in the coming days, starting Tuesday on caucus day in Iowa with a new video showing clips from Obama\u2019s victory speech there four years ago. The RNC will buy TV ad time in select battleground-state markets within weeks.\nOnce a nominee is established, the strategy book will then serve as a turnkey battle plan as the campaign and RNC staff begin close coordination.\nA Romney win should make for an easy transition, as the book\u2019s primary author, Joe Pounder, a 28-year-old specialist in the political dark arts and the RNC\u2019s research director, is a former Romney campaign aide. And Romney appears to already have adopted the same approach \u2014 often quoting Obama directly and even visiting venues where Obama spoke as a candidate or as president.\nLast summer, Romney spoke at a now-shuttered Allentown, Pa., metal works factory that Obama had hailed a year earlier before it closed as a symbol of his economic success. The event was accompanied by a video, called \u201cObama Isn\u2019t Working,\u201d depicting images of the visit coupled with a year-after picture of the abandoned factory floor.\nLast week, Romney spoke in Davenport, Iowa, down the street from the spot where Obama gave one of his last pre-caucus campaign speeches four years earlier.\n\u201cHe closed with these words: \u2018This is our moment. This is our time,\u2019\u2009\u201d Romney said. \u201cWell, Mr. President, you have now had your moment. We have seen the results. .\u2009.\u2009. You have failed to deliver on the promises you made here in Davenport.\u201d\nSeveral Republican strategists said that striking the right tone in attacking Obama will be tricky, because many Americans, even if they disapprove of his job performance, still see the country\u2019s first black president as a historic and admirable figure. Polls show that most people like him personally \u2014 making them more likely to discount traditional attack ads.\nStill, party officials believe that many independent voters \u2014 more than eight in 10 of whom think the country is on the wrong track, according to a November Washington Post-ABC News poll \u2014 are ready to accept the premise that Obama didn\u2019t work out. Officials said they settled on the plan to use the president\u2019s own words after examining private and public polls showing that the approach resonated with swing voters nationally and in key battlegrounds.\n\u201cBecause the president remains personally well liked, [the GOP strategy] is a good way to not have to swim against that tide,\u201d said Ed Gillespie, a former RNC chairman who is in regular contact with senior party officials. \u201cIt\u2019s his own words.\u201d\nSimilar \u201cspoke so beautifully\u201d and promised recovery but now worrying that his policies were costly and ineffective.\n\u201cWe don\u2019t bang voters upside the head with an anti-Obama message, but we appeal to their sensibility that maybe they supported him in the past, and we make it okay for them to not support him now,\u201d said Jonathan Collegio, a Crossroads spokesman.\nThe RNC\u2019s\u2019s ground floor, staring at a dozen flat-screen TVs and monitoring the Web.\nIn.\nThe new book contains more than a dozen chapters, including a 73-page section titled \u201cThe Obama Economy,\u201d and has separate chapters logging local-level campaign promises delivered during stops in places such as Cleveland, Denver and Scranton, Pa.\nWhen\u2019s past statements in each locale, said Sean Spicer, the RNC\u2019s spokesman. Promises relating to the Hispanic community will be fed to Hispanic bloggers and media.\n\u201cHe made so many promises in so many places,\u201d Spicer said. \u201cThe goal is whenever he does an interview in Scranton, Columbus, Ames, Cleveland or wherever, that every local reporter, blogger and concerned citizen says, \u2018Hey, we\u2019re armed here with information about the last time you were here, and we want you to answer to yourself.\u2019\u2009\u201d\nThe strategy can be seen in several Internet ads produced by the party in recent weeks.\nA video titled \u201cFailed Promises: Scranton\u201d was released in November to coincide with an Obama visit to the northeastern Pennsylvania city. It shows Obama speaking about jobs and the economy, his face depicted through shattered windows of an abandoned factory as job-loss stats flash across the screen.\nAnother RNC ad, \u201cIt\u2019s Been Three Years,\u201d shows Obama as a candidate saying the \u201creal question\u201d is whether Americans would be better off in four years. Then it shows a clip from an October ABC interview when he tells George Stephanopoulos that \u201cI don\u2019t think they\u2019re better off than they were four years ago.\u201d\nThe spot ends with Obama the 2008 candidate drawing roaring applause when he proclaims: \u201cThis country can\u2019t take four more years of the same failed policies. It\u2019s time to try something new.\u201d\nPolling analyst Scott Clement contributed to this report."}, {"name": "b0172374-349d-11e1-88f9-9084fc48c348", "body": \u2019s disparaging name: Redskins.\nAs the legal battle over the name enters its 20th year, let\u2019s review some highlights of a struggle in which moral victories by the plaintiffs often coincided with demoralizing losses by the team on the field \u2014 including dashed hopes of winning another Super Bowl.\n* * *\n1992: The American Jewish Committee voices support for the lawsuit. The term \u201credskins\u201d is not an honorific to Native Americans, as Washington claims; it\u2019s an insult, says the AJC. Seven years later, when communications executive Daniel Synder buys the team, Native Americans assume that he\u2019ll be more sympathetic than the previous owner because he is Jewish. They are sorely mistaken.\nOn the gridiron, Gibbs takes the team to the NFC divisional playoffs (January 1993) but loses to the San Francisco 49ers. After 12 seasons and three Super Bowl wins, Gibbs retires. It is the end of times for Washington football.\n* * *\n1993: Webster\u2019s Third New International Dictionary Unabridged (3rd ed., Merriam-Webster, 1993) defines the team name as \u201ctaken to be offensive.\u201d This contrasts with a Washington Post-ABC News poll the previous year in which 89\u00a0percent of respondents said they favor keeping the team\u2019s name because \u201cthe name is not intended to be offensive.\u201d\nDefensive coordinator Richie Petitbon replaces Gibbs as head coach and is promptly fired after losing 12 of the season\u2019s 16 games.\n* * *\n1994: The InterFaith Conference of Metropolitan Washington joins the call for a name change.\nWashington hires Norv Turner as head coach and the team loses 13 of 16 games.\n* * *\n1995-99: The lawsuit, Harjo et al v. Pro-Football Inc., finally gets a hearing before the U.S. Trademark Trial and Appeal Board. A three-judge panel rules that the team name and logo violate the Lanham Act prohibition on any trademark that \u201cconsists or comprises .\u2009.\u2009. matter which may disparage .\u2009.\u2009. persons, living or dead .\u2009.\u2009. or bring them into contempt, or disrepute.\u201d\nWashington takes the case to the U.S. Court of Appeals, which eventually overturns the trial board\u2019s ruling, saying that Harjo and the others had waited too long to file the lawsuit. The plaintiffs later petition the U.S. Supreme Court to reverse that decision, but the high court refuses to take the case.\nSnyder purchases the Washington team in 1999, along with the newly built Jack Kent Cooke Stadium in Landover. He immediately removes the former team owner\u2019s name from the arena and sells the naming rights to Federal Express for an estimated $250\u00a0million. Friends of Cooke, who had died of a heart attack two years earlier, pitch a fit. But Snyder calms them by declaring that, out of respect for tradition, he will never give in to the demands of the Native Americans.\nThen again, they don\u2019t have millions to spend on naming rights.\n* * *\n2000-04: Hundreds of high schools and universities stop using Native American imagery as sports logos and mascots. As African Americans press their fight to change the Virginia state song, \u201cCarry Me Back to Ole Virginny,\u201d which makes references to \u201cdarkies\u201d and \u201cmassas,\u201d Native Americans hope that more of Washington\u2019s black fans will join in solidarity with their struggle.\nHope springs eternal.\nTurner takes Washington to the NFC divisional playoffs against the Tampa Bay Buccaneers. With less than two minutes to go, the team is poised to take the lead with a field goal when \u2014 oops! \u2014 the snap is botched and the game is lost, 14-13.\nTurn.\n* * *\n2005-10: The American Psychological Association supports the Native Americans\u2019 case with research showing the corrosive effects of racial stereotyping on children. But after a dejected Gibbs retires in 2008, it is the Washington fan who seems to need psychological help the most. It\u2019s as if spiritual war is being waged against the team, which soon becomes one of the most dispirited franchises in the NFL.\nBy the time Jim Zorn is hired and fired as head coach and Mike Shanahan arrives to take his place, Washington will have burned through eight head coaches since 1992. The team has also started 21 quarterbacks.\nAbout the only thing that hasn\u2019t changed through all that is the team\u2019s reputation as losers \u2014 and that cursed name.\n* * *\n2011: Harjo tells the U.S. Senate Committee on Indian Affairs: \u201cThe term \u2018redskins\u2019 is the most vile and offensive term used to describe Native Americans. It is most disturbing to the overwhelming majority of Native Americans throughout the country that the professional football team in the nation\u2019s capital uses a team name that demeans us.\u201d\n* * *\n2012: Another lawsuit to get rid of the team name, Blackhorse et al v. Pro-Football Inc., will be working its way through the courts, this one from a younger group of Native Americans who cannot be said to have \u201cwaited too long to file.\u201d\nBut they have already waited too long for justice."}, {"name": "fdce25a8-30c0-11e1-b034-d347de95dcfe", "body": "It\u2019s never enough, unless it\u2019s too much. In 2012, commuters in the D.C. region will renew their love-hate relationship with transportation projects and programs, including some scheduled for completion and others just getting started. Here are 10 efforts likely to get attention.\nThe high-occupancy toll lanes on the western side of the Capital Beltway are scheduled to open late in 2012. The D.C. region hasn\u2019t seen anything like them. Will they become the way of the future?\nTravelers still ask about \u2014 and complain about \u2014 what\u2019s going on in the 14-mile work zone between Springfield and the Dulles Toll Road interchange. But they\u2019ve also begun to ask how the lanes will function when they finally open.\nThe HOT lanes managers will spend months preparing drivers to use them. And even before the lanes open, drivers will experience some improvements at the interchanges being rebuilt to accommodate the new lanes.\nAfter a half century of discussion and debate, opening 18 miles of the Intercounty Connector was a top transportation story of 2011. But it opened in segments, and the biggest part didn\u2019t open till the end-of-the-year holidays were upon us.\nThis\u2019t be a question of paying $4 to use the entire highway at rush hour, but rather a choice to pay 70 cents to travel from southbound Interstate 95 to southbound Route 29, cutting a corner off the Capital Beltway when traffic reports say it\u2019s especially congested.\nThe repeated rounds of heavy rain this fall pushed back the Woodrow Wilson Bridge project\u2019s goal of opening new lanes on the Capital Beltway near Telegraph Road in Virginia. Important parts of the remaining work on the Beltway require warmer weather, so expect to see the lanes in their current configuration through the winter.\nThen.\nMore.\nMeanwhile, the Maryland State Highway Administration will begin to upgrade intersections near the newly consolidated Walter Reed National Military Medical Center on Rockville Pike in Bethesda. Several projects are scheduled to start this spring.\nThis D.C. project also made the list of 2011\u2019s top transportation stories, but several of the new 11th Street Bridge\u2019s most important and beneficial elements aren\u2019t scheduled to open till later this year. The new span taking traffic away from downtown and over the Anacostia River is scheduled to open this month, following December\u2019s opening of the new inbound span.\nThat will clear the way for completion of the ramps that will link the highways on either side of the river. Also scheduled for this year is completion of the third new span, which will provide a new link for local traffic between neighborhoods on both sides of the river.\nAt.\nOrange.\nAfter.\nMetro.\n.\nThe transit staff also will look at simplifying the complex fare structure, which is based on distance traveled and time of day. I hope that will include eliminating the \u201cpeak-of-the-peak\u201d rate for the height of rush hour. Advocates envisioned that in part as a congestion management technique, but it\u2019s been just one more way of baffling tourists.\nMany\u2019Arcy Road, resurfacing of I-66 between the Beltway and Route 50, the beginning of the Washington Boulevard bridge over Columbia Pike, construction on the Linton Hall Road overpass at Route 29 in Gainesville, and a \u201cGreat Streets\u201d safety and beautification project on Minnesota Avenue in D.C.\nThere\u2019s Kenilworth Gardens segment."}, {"name": "4f255be8-30ac-11e1-8c61-c365ccf404c5", "body": "BUENOS AIRES \u2014 Some make the mistake of calling Juan Carlos Rennis\u2019s school an academy, a word he associates with elitist institutions, blue blazers and snooty attitudes.\n\u201cWe\u2019re a technical school,\u201d Rennis, rector for 17 years, said with conviction. \u201cWe take people and teach them to do a job.\u201d\nRennis, a wiry man with a booming voice, wasn\u2019t talking about plumbing or cabinet-making. But the job his 600 students are training for is one he considers of equal practical value \u2014 and far greater emotional significance \u2014 to the country: reporting the latest scores, trades, contract talks, back-office negotiations and other minutiae of the most Argentine of passions, sports.\nIn metropolitan Buenos Aires alone, there are about a dozen institutions like the 51-year-old Superior School of Sports Journalism that Rennis runs, each year churning out hundreds of sportswriters, play-by-play broadcasters, color commentators, camera operators, Web designers and sports analysts.\n\u201cI don\u2019t know if there\u2019s another place in the world that has so many of these schools,\u201d said Roberto Bermudez, a teacher at the Superior School.\nIn some ways, it\u2019s easy to see why the \u201ccolegios deportivos,\u201d or sports schools, thrive here, replacing university journalism departments for anyone who dreams of covering sports, particularly soccer, or futbol, as it is known. The country is sports-mad.\nTake Buenos Aires: Although big U.S. metropolitan areas \u2014 New York, say, or Chicago \u2014 may boast of two football teams and two baseball clubs, the Argentine capital and its suburbs have a dozen first division soccer clubs, each with its own stadium.\nThat means fans, lots of them, who require clear reporting on the latest twist in a complex schedule of matches and championships that even an aficionado can have trouble keeping straight.\nAnd it\u2019s not just the games. The machinations of Argentine soccer\u2019s scandal-plagued governing body here, the Argentine Football Federation, provide constant fodder for sports radio and TV and the front page of the city\u2019s newspapers.\n\u201cYes, the passion for soccer in Argentina is exaggerated,\u201d said Miguel Angel Vicente, sports editor at the country\u2019s biggest paper, Clarin. \u201cIt occupies a space that it shouldn\u2019t. But this is the way we are, and hopefully one day, we\u2019ll change and lower our temperature for this.\u201d\nAside from mainstream media, the soccer teams themselves \u2014 at least those in the first division \u2014 each have two or more affiliated radio stations and Web sites providing blanket coverage. Many of those who work there refined their vocation at the sports schools.\nAmong the recent graduates of the Superior School is Adrian Michelena, 22, who is held up as the latest success story. Upon getting his diploma, he found himself overseas, covering the Argentina rugby team\u2019s international matches for Clarin.\n\u201cThe preparation they give you is really precise,\u201d Michelena said of his training. \u201cThe rules, the techniques, the tactics and also the strategy. They teach you to know each one of the sports, the most minuscule of details.\u201d\nAlthough the focus is soccer, all sports that Argentines follow are given attention: basketball, polo, rugby, horse-racing, volleyball. Rennis said 22 sports are covered in 18 different classes.\n\u201cNine of 10 graduates will work in soccer,\u201d he said. \u201cBut maybe 10 percent can make a niche covering something else. What if some editor says, \u2018Okay, who can go cover the South American bocce championship?\u2019\u2009\u201d\nThe school\u2019s administrators point out that the curriculum goes well beyond games and jocks and scores. There are also classes in philosophy, linguistics and languages to round out the students during the three years, on average, they will spend at the school.\n\u201cThis school has a program that\u2019s very broad, very humanistic,\u201d Bermudez said.\nStill, on a recent night, most of the chatter in the classrooms was soccer-related.\nBermudez taught his class how to analyze a game on live television. In a packed basement classroom, Juan Pablo Peralta, a 32-year-old teacher, alumnus and member of a third-division soccer team, expounded on the intricacies of tactics. Next door, another group of students were putting on a mock radio show, highlighting scores and trades.\nPaulo Stepper\u2019s turn as mock host was clumsy, his teacher pointed out to him afterward.\nBut Stepper, 25, was undaunted. He explained that he had been a bored accounting student before he transferred to the sports school. He now dreams of one day recounting the day\u2019s games for readers of a major newspaper.\n\u201cThis is hard, yes,\u201d he said. \u201cBut with practice, you can get over your fears and surprise yourself.\u201d\nMore world news coverage:\nRussia arrests New Year\u2019s protesters\nMaliki marks end of U.S.-Iraq pact\nIn Egypt, an act of courage that launched a revolution\nRead more headlines from around the world"}, {"name": "cc64bb44-3336-11e1-a274-61fcdeecc5f5", "body": "Iran is quietly seeking to expand its ties with Latin America in what U.S. officials and regional experts say is an effort to circumvent economic sanctions and gain access to much-needed markets and raw materials.\nThe\u2019 back yard.\nThe visit reinforces recent commitments by Iran to invest millions of dollars in economic development projects for the region, from a mining joint venture in Ecuador to factories for petrochemicals and small-arms ammunition in Venezuela.\nIran has also dramatically expanded its diplomatic missions throughout the hemisphere and dispatched members of its elite Quds Force \u2014 the military unit U.S. officials in October linked to a foiled assassination plot in Washington \u2014 to serve in its embassies, U.S. officials and Iran experts say.\nThe importance of Ahmadinejad\u2019s visit was underscored last week by Iran\u2019s state-owned Press TV, which said promotion of \u201call-out cooperation with Latin American countries is among the top priorities of the Islamic Republic\u2019s foreign policy.\u201d\nIran has dispatched a stream of lower-ranking officials to the region in recent months. Ahmadinejad granted a live interview Dec. 13 with Venezuela\u2019s state-owned broadcaster TeleSUR in which he hailed the close ties between the two countries and boasted of Iran\u2019s advances in military technology, including unmanned drones.\n\u201cNo one dares attack Iran,\u201d Ahmadinejad said in the interview.\nWith its latest outreach, Iran appears to be seeking to woo back Latin American countries that have grown wary of doing business with Tehran. Iran\u2019s.\nBut with Western nations threatening to boycott Iranian oil, the country\u2019s leaders are scrambling to find willing foreign partners who can soften the blow of sanctions and provide diplomatic cover for Iran\u2019s nuclear ambitions, current and former U.S. officials say.\n\u201cIran has been actively working for years to expand its ties and influence in the Western Hemisphere, and it has found willing partners in the region\u2019s anti-American despots,\u201d said Rep. Ileana Ros-Lehtinen (R-Fla.), chairman of the House Foreign Affairs Committee.\nRos-Lehtinen said she was disturbed by Ahmadinejad\u2019s plans for what she called a \u201ctour of tyrants,\u201d saying it would bring \u201cthe Iranian threat closer to our shores.\u201d\nThe visit is expected to include Venezuela, Ecuador, Cuba and Nicaragua, where the Iranian president will be a guest at the inauguration of newly reelected leader Daniel Ortega.\nYet Iran\u2019s\u2019s nuclear program.\nSome would-be allies also have been disappointed when Iran failed to deliver on promised development projects and joint ventures, such a proposed $350 million deep-water port for Nicaragua.\nA report released in November by the Center for Strategic and International Studies, a Washington think tank, questioned whether Iran ever could succeed at building an effective support network in the region, even if it managed to make good on its grandiose commitments.\n\u201cWhile Iran\u2019s overtures to peripheral states have the potential to weaken U.S. attempts to contain and isolate Iran, Tehran\u2019s web is fragile and possibly illusory,\u201d the CSIS report said.\nIran\u2019s ambitions in the region date back at least two decades, and Tehran was linked in the 1990s to two bombings of Jewish centers, including Argentina\u2019s worst-ever terrorist attack in 1994.\nRelations between Iran and Latin America began to warm shortly after the 2005 election of Ahmadinejad, who made the region a diplomatic priority. Iran has since opened six new missions there \u2014 in Colombia, Nicaragua, Chile, Ecuador, Uruguay and Bolivia \u2014 and has expanded embassies in Cuba, Argentina, Brazil, Mexico and Venezuela.\nFormer U.S. intelligence officials say the presence of Quds Force officers and other military personnel in diplomatic missions enhances Iran\u2019s ability to carry out covert activities, sometimes in conjunction with members of the Iran-backed Hezbollah militant group that operates extensive networks in Latin America and maintains ties with drug cartels. U.S. officials say the Quds Force was behind the alleged plot to hire Mexican drug gangs to assassinate a Saudi diplomat in Washington.\n\u201cFor Iran to be so active in Venezuela and for the Quds Force to be there can only suggest Iran is serious about asymmetrical force projection into our neck of the woods. If Israel bombs Iran, we may well see retaliatory strikes aimed at U.S. interests coming from these Quds Force guys in South America,\u201d said Art Keller, a former case officer with the CIA\u2019s counterproliferation division.\nAs.\nAnalysts argue that an expanded foothold in Latin America also could provide Iran with strategic advantages in its protracted struggle with Western powers. In Venezuela, where President Hugo Chavez is an avowed supporter of Tehran\u2019s nuclear ambitions, Iran has opened bank branches and transportation companies that U.S. officials say enable Iran to circumvent sanctions.\nOne Iranian-owned bank drew special scrutiny in a study commissioned by the Pentagon\u2019s Defense Threat Reduction Agency. The study, released in May, described Venezuela\u2019s Banco Internacional de Desarrollo as an \u201copaque\u201d institution with an all-Iranian board of trustees.\nThe bank, which is now under U.S. sanctions for supporting terrorist networks, operates with only a single branch in Caracas and appears immune from oversight by the country\u2019s regulators, according to the report\u2019s author, Douglas Farah, a senior fellow at the International Assessment and Strategy Center.\nSuch institutions \u201cafford Iran and its proxy elements state cover and effective immunity for its covert activities,\u201d Farah said in testimony in July to the House Homeland Security subcommittee on counterterrorism and intelligence.\nThrough them, Iran can achieve such goals as \u201cunfettered access to global banking facilities, ports and airports; mining of precursor elements for WMD and advanced weapons systems fabrication; and a regional base for infiltration and contingency operations aimed at undermining the United States and its interests,\u201d Farah said.\nMore world news coverage:\nIndia\u2019s drug trials fuel controversy\nIran claims nuclear fuel advance\nArgentine sports obsession sprouts sportswriter schools\nRead more headlines from around the world"}, {"name": "81c54a46-326d-11e1-825f-dabc29fd7071", "body": "Gy."}, {"name": "a2a3858a-326c-11e1-825f-dabc29fd7071", "body": "It."}, {"name": "0e1df3bc-326e-11e1-825f-dabc29fd7071", "body": "The."}, {"name": "c2b2e87c-3170-11e1-b034-d347de95dcfe", "body": "Thomas Heath is away, but we still found some things of interest to pass on until he returns.\nWhen Jeremy Farber launched his company 10 years ago under the name Miami Computers, the moniker was a bit of a misnomer. After all, its headquarters was actually in upstate New York.\nToday, the Chantilly-based firm is called PC Recycler but even that name isn\u2019t a perfect fit. Farber\u2019s company doesn\u2019t just discard old electronics, it first wipes their data and shreds them into confetti.\n\u201cA couple of our big customers early on were big government contractors and they loved us, but they were really interested in information security,\u201d Farber said. \u201cIt was a very big priority to them, more so than the environmental aspect of it.\u201d\nThe latest tool in that effort is a $100,000 machine that allows the firm to destroy equipment faster through a process called degaussing. Essentially the magnetic field that allows a device to store data is eliminated, and the data is taken along with it.\nThere\u2019s no shortage of devices to demolish as cybersecurity concerns continue to trouble government and commercial entities alike, Farber said. Though most security efforts are aimed at a device that\u2019s in use, he said the risks don\u2019t necessarily end once it\u2019s unplugged.\n\u201cBecause a lot of the attacks come over the Net it gets a lot of publicity, but there are just as many breaches that happen through physical loss,\u201d he said. \u201cA lot of people don\u2019t understand that the information is just as accessible once the device is offline.\u201d\n\u2014 Steven Overly\nPottery Barn has been added to the growing list of merchants vacating Friendship Heights. The home furnishings store notified customers last week that its location at Chevy Chase Pavilion will close on Jan. 16., making it the third retailer in the area, after Borders and Filene\u2019s Basement, to turn off the lights in the past 12 months.\nOfficials at Williams-Sonoma, which owns Pottery Barn and West Elm, were not available for comment. No other Pottery Barn stores are slated to close, according Williams-Sonoma\u2019s most recent regulatory filings. Pottery Barn, with 7 percent increase in revenues in the third quarter, has been leading the company\u2019s sales growth.\nThe home furnishing store has locations in Clarendon, Tysons Corner and White Flint. The store at the Pavilion, located at 5335 Wisconsin Ave. NW, occupies two floors. It\u2019s unclear whether Akridge Real Estate Services, which owns the nine-story complex, has another tenant lined up for the space, since the company did not return calls for comment.\n\u2014 Danielle Douglas\n\u00a0When Lowe\u2019s, the home improvement chain, pulled out of plans to anchor a development in Baltimore in October, it prompted concerns that the chain also would opt against opening a store on New York Avenue in a planned development in Northeast Washington where Wal-Mart also has agreed to open a new location.\nBoth projects have the same developer, Rick Walker, and Walker had long pitched the plan of building the Wal-Mart store on top of a home improvement big box on New York Avenue at the corner of Bladensburg Road, just as he planned to build a Wal-Mart store above a Lowe\u2019s in Baltimore.\nWalker is no longer marketing his New York Avenue project, called the Pointe at Arbor Place, as having a home improvement store. He says he is juggling his tenant mix and is attempting to attract a national pet supplies chain to his project. Wal-Mart says it is still committed to the site.\nLowe\u2019s still appears to be coming to New York Avenue, however, but to\u00a0the Shops at Dakota Crossing, a development planned down the road by Fort Lincoln and Trammell Crow Co. That project recently lost a commitment from Target but now has a commitment from Lowe\u2019s, according to a person familiar with the deal. Hagans declined to discuss Lowe\u2019s but said the development team recently inked a deal with TD Bank to finance construction. A Lowe\u2019s spokeswoman declined to comment.\n\u2014 Jonathan O\u2019Connell\nThe Department of Veterans Affairs\u2019 inspector general said in a report released last month that the agency showed a potential bias toward incumbent Booz Allen Hamilton, the McLean-based contractor, in its acquisition of support services for its information security and privacy programs.\nThe acquisition, which was awarded in late September 2010, favored Booz Allen by making knowledge of VA procedures and practices a significant selection factor without making clear in the solicitation it would be important. Though Booz Allen\u2019s proposal cost the most, its knowledge and experience helped it win the decision, said the IG memo, which was first reported by NextGov.\nThe VA\u2019s acquisition office generally disagreed with the inspector general\u2019s findings.\nIn a statement, Booz Allen said the report \u201cwas not directly focused on actions by Booz Allens itself, and we have no comment on its conclusions.\u201d\n\u2014 Marjorie Censer\nMalika Levarlet, a Washington-based associate at Sheppard, Mullin, Richter & Hampton, is getting kudos for being the first lawyer at the firm\u2019s D.C. outpost to take on a political asylum case through the human rights nonprofit Human Rights First.\nThe firm awarded Levarlet, a corporate lawyer and American University law alumna, its Pro Bono Attorney of the Year award, an annual honor recognizing attorneys\u2019 community service work.\nLevarlet worked closely with a woman who was forced to flee her native Cameroon after advocating for transparent elections and equal access to health care for prisoners to gain political asylum in the United States. Her efforts helped Sheppard Mullin nab the Frankel Award from Human Rights First, which goes to law firms taking on asylum cases on behalf of clients from dozens of countries.\n\u2014 Catherine Ho"}, {"name": "92f648ce-31b9-11e1-a274-61fcdeecc5f5", "body": "The District government has selected two restaurant operators to open locations in a city office building in the Benning neighborhood of Northeast Washington, in what could serve as a test-run for bringing new food options to the area around St. Elizabeths Hospital.\nThe D.C. Department of General Services chose the two restaurant operators in December to fill 4,500 square feet in the ground floor of the Minnesota-Benning Government Center, a 232,000-square-foot, five-story office building at 4058 Minnesota Ave. NE that houses the city\u2019s jobs agency, the Department of Employment Services.\nThe first is Cohn\u2019s Hospitality and Management Academy, a caf\u00e9 and job training program founded by restaurateur Paul J. Cohn. Cohn\u2019s company, Capital Restaurant Concepts, is behind J. Paul\u2019s and Georgia Brown\u2019s.\nCohn would open next door to the 1,500-square-foot Eclectic Caf\u00e9, a new restaurant concept from the former owners of East River Bagel, a fixture of Minnesota Avenue until its closing in 2011.\nUnder Mayor Vincent C. Gray (D), the District has targeted retail and hospitality as industries to find opportunities for unemployed residents \u2014 particularly in neighborhoods east of the Anacostia River, where unemployment and poverty rates run higher than elsewhere in the city.\nIf the deals for restaurants in the Minnesota-Benning Government Center are successful, they could provide a blueprint for how the city government might deliver restaurants and retail to areas around St. Elizabeths Hospital, where a new headquarters for the U.S. Coast Guard is being built for 3,700 employees, but where there are few jobs or places to eat lunch.\nCohn\u2019s restaurant would be part culinary and part workforce education. For a year or more he has planned a culinary and hospitality institute that would offer training for District teens interested in learning kitchen management, purchasing, marketing and accounting.\nDarrell Pressley, a spokesman for the general services agency, said the culinary institute would fill 3,000 square feet of the building and work closely with the jobs agency to employ District residents.\n\u201cIn partnership with [the Department of Employment Services], D.C. youth and young adults will be hired to take part in an 18-plus month program where they learn the skills necessary to run a restaurant,\u201d Pressley said in an e-mail.\nThe agency issued a solicitation for interested restaurateurs in September, 10 months after the building was completed. The Cohn and Eclectic concepts beat out TD Burger Bar, Wise Counsel LLC and PTC, which does business as Roadside Caf\u00e9.\nBoth selected businesses would have to agree to leases with the city. The solicitation calls for a lease of at least three years at a rate of $20 a square foot or more.\n"}, {"name": "0f507be2-30de-11e1-a274-61fcdeecc5f5", "body": "As any new resident to our region can attest, apartments within walking distance of a Metro station charge a premium in monthly rent, one that renters appear willing to pay.\nAnd no wonder, according to a recent report, Washingtonians suffered through the worst traffic congestion in the nation in 2010, losing an average of 74 hours a year sitting in traffic, costing an average of nearly $1,500 a person.\nThese high transportation costs make many apartment renters more than willing to pay higher rent to be able to walk to a Metro station and avoid the frequently gridlocked highways on their daily commutes.\nTo calculate how much more, we analyzed two sets of apartments from a sample of the region\u2019s apartment property inventory. One group included those located within one-half mile of a Metro station, and a second included those located farther than one-half mile from a station. According to this analysis, Washingtonians have consistently paid more in rent to live within walking distance of a Metro stop, even throughout the recent downturn.\nOf course, countless other factors affect apartment rents, the age and quality of the property, safety of the neighborhood and proximity to employment and retail nodes, to name just a few. But this clearly shows that transit-oriented development remains in strong demand in D.C.\nZooming in a little closer to the submarket level, the trend still holds true..\nWhile Prince George\u2019s County offered the most affordable Metro-walkable apartments in the region, rents there are still 11 percent higher than those for properties located farther from Metro stations in the same submarket.\nNo individual submarket has a premium as high as the metrowide average because submarkets with no Metro stations (Loudoun County, outlying Maryland counties and outlying Virginia counties) have rents on the lower end of the spectrum, pulling down the non-Metro-walkable aggregate at the metro level.\nWhile the apartment rent premium in Fairfax County is the smallest at about 9 percent, the county currently only has two Metro stations, in Vienna and Dunn Loring.\nWhen the first phase of the Silver Line increases Metro service in the county in 2013 or 2014, apartments located near the new stations should command above-average rents based on the trends in other submarkets.\nStephanie Hession is a senior real estate economist with CoStar Group in Washington."}, {"name": "ef241d24-3218-11e1-b692-796029298414", "body": "A black punching bag hovers alongside the desk in Grant Verstandig\u2019s office. A pair of worn sneakers rest on the arm of a white, modular sofa. Overhead, a photo of a hulking Muhammad Ali hangs from the wall.\nIf it weren\u2019t for the panoramic view of the Georgetown waterfront, this space could be mistaken for a college dorm room. Perhaps that\u2019s fitting for the 22-year-old chief executive of Audax Health, a start-up that blends social media with health care.\nThe company has been Verstandig\u2019s brainchild since the District native endured a spate of intensive knee surgeries to correct sports-induced injuries. It\u2019s banner product, called Careverge, will make a public debut next week at the Consumer Electronics Show in Las Vegas.\nCareverge users answer a series of questions about their health history that range from daily dietary habits to specific chronic illnesses. The site allows them to anonymously read relevant Web resources, connect with similar users and set health goals. Audax plans to market Careverge as a benefit for companies to offer employees.\nBut while Washington has become home to a crop of 20-something entrepreneurs with ambitious plans to launch businesses, Audax may stand out for the seasoned lineup of mentors Verstandig has managed to recruit to its board.\nJohn Sculley, the former chief executive of Pepsi and Apple, has been a financial backer and business adviser since May 2011. He had been hunting for a health care investment when a business contact introduced him to Audax.\nFrom the health arena, Verstandig has brought on Dr. Richard Klausner, former executive director for global health of the Bill and Melinda Gates Foundation and director of the National Cancer Institute from 1995 to 2001.\nKlausner, who worked with Verstandig\u2019s mother in the Clinton administration, also introduced him to the health and science fields as a high school student through summer work at the National Institutes of Health.\nAlso on the board are Roger W. Ferguson Jr., president and chief executive of retirement services provider TIAA-CREF, and John Wallis Rowe, the former chairman and chief executive of insurance firm Aetna.\nVerstandig said the makings of the business really began in his Brown University dorm room where, while laid up after a knee operation, he began to compile a list of industry contacts. Then through social media, e-mail and telephone calls, he began to network.\n\u201cThe candid truth is spending a lot of time not being able to move made you focus,\u201d said Verstandig, who would later drop out to focus on the company full time.\nHis persistence and charm \u2014 it\u2019s clear Verstandig can talk his way through almost any social situation \u2014 impressed Sculley. During their meeting, Sculley twice asked Verstandig to name his biggest mistake. His response \u2014 setting unrealistic expectations and misreading progress \u2014 aren\u2019t uncommon for first-time entrepreneurs.\n\u201cIn every case, except this one, I always work with serial entrepreneurs,\u201d Sculley said. \u201cI said, \u2018Gee, this violates everything I said I\u2019m going to do. I\u2019m not going to work with people who have never built companies before and yet here is a guy who resembles in some ways Steve Jobs and Bill Gates when they were in their 20s.\u2019\u201d\nFor a maturity beyond his years, Verstandig certainly looks his age. Smelling of cologne and wearing a V-neck sweater and dark denim jeans, his office attire could transition easily to a bar in Foggy Bottom.\nBut casual is to be expected at a company like Audax. Ping-pong tables, remote-control helicopters and oversized bean-bag chairs are just a few of the start-up staples that the company makes available to its 55 employees.\nVerstandig admits that his position has come with a steep learning curve, particularly as a first-time CEO without any prior business experience or education.\n\u201cBack in the early days I did everything myself because I thought I could do it faster, better, quicker, but now I just hire people who are smarter and hire people who are more experienced,\u201d he said.\nAnd then there are challenges beyond his control. Health care can be a notoriously stubborn market where attempts at innovation become bogged down by bureaucracy, regulation and big business.\n\u201cYou have to be acutely aware of all those things that are swirling around, but at the end of the day, one thing I\u2019ve learned from my mentors is you can\u2019t control what you can\u2019t control,\u201d Verstandig said.\nTiming, however, may be on the company\u2019s side. Verstandig and Sculley both believe that health care reform at the federal level combined with other initiatives to revamp the system make now an opportune moment for a company like Audax to make a strong play.\n\u201cI am absolutely convinced that the health care problem that we have in the economy will eventually be solved largely by innovation from the private sector and not the government,\u201d Sculley said."}, {"name": "c2e30376-3162-11e1-b034-d347de95dcfe", "body": "Washington area banks sold fewer troubled loans in the first nine months of the year, despite a continued inflow of distressed assets, according to data from Charlottesville-based research firm SNL Financial.\nThe 43 local banks the firm reviewed disposed of a total of $228 million in nonaccrual loans \u2014 those 90 days past due \u2014 through the end of September, leaving $1.5 billion in troubled assets sitting on their books. A year earlier, those same institutions traded $517 million in problem loans, with a total $1.6 billion in bad debt remaining.\nKeep in mind that the numbers are skewed because of the inclusion of Capital One Financial Corp. The McLean-based behemoth accounts for more than 75 percent of all the nonaccrual loans and more than 90 percent of the asset sales in the area for both years.\nExcluding Capital One, local sales of troubled assets declined by roughly 12 percent to $12.4 million, while the universe of distressed debt grew about 8 percent to $360.6 million at the end of September.\nSome area banks no longer may feel an urgency to off-load problem loans as asset values in the Washington area have largely stabilized, said David G. Danielson, president of Danielson Associates, a banking consultant firm in Bethesda.\n\u201cAsset values, in some cases, have stabilized at a level that\u2019s still below what they were written out to on the banks\u2019 books,\u201d he said. \u201cSo banks are still reluctant to sell them and take the hit to capital, but they feel much better, particularly in the Washington area, about their ability to work out [distressed loans] with little or no loss.\u201d\nBanking consultant Bert Ely agreed that more banks may be entertaining loan modification under the assumption that they will take less of a loss than if they sell at the bottom of the market.\n\u201cThey think prices are going to go up and there will be a recovery in values,\u201d he said. \u201cThe thing about that is it\u2019s a judgment call, and bankers don\u2019t always get it right.\u201d\nHolding on to problem loans as the volume continues to rise seems counterintuitive. But many local banks have stashed away enough cash in reserves to offset loan losses. The current volume of troubled loans, though edging up, remains much lower than in 2009 at the height of the banking crisis.\nA majority of area banks, having logged record profits this year, are healthy enough to withstand an uptick in problem loans and hold off on asset sales. Others, however, may lack the financial capacity to clean up their balance sheet.\n\u201cIf a bank is having trouble, they will hold off on selling assets because that makes them recognize a loss,\u201d Ely said. \u201cAnd many times the loss is more than what they reserved for, and so they\u2019ll drag their feet.\u201d\nMeanwhile, there were some significant jumps in noncurrent loans this year.\nThe Industrial Bank of the District, for instance, logged a 34 percent year-over-year increase to $16.1 million in problem loans. Alliance Bank nearly tripled its portfolio of nonaccrual loans to $10 million through the first nine months of the year. However, the Chantilly-based bank was among the most active sellers this year, clearing $725,000 in problem loans off of its books.\nThere were a number of banks that bucked the prevailing trend and cleared a higher percentage of problem loans off of their books this year.\nCardinal Bank of Tysons Corner, for example, traded $3.5 million in distressed assets through the end of the third quarter, a 15.5 percent increase over the prior year. Herndon-based MainStreet Bank sold a little over $1 million in troubled loans, though its total nonaccrual loans shot up to $4.9 million at the end of September.\n\u201cSome banks, particularly if they\u2019ve been in a turnaround mode, want to clear the debt and eliminate the distraction that a lot of problem assets cause,\u201d Ely said.\nA few banks have experienced an overall drop in distressed assets. Vienna-based Business Bank, for instance, whittled its noncurrent loans down from $1.8 million at the end of September 2010 to $576,000 this year. The bank sold $533,000 in problem loans this year, compared to $1 million through the end of September.\nVirginia Heritage of Fairfax also recorded a decline in total nonaccrual loans, from $1.2 million through September 2010 to $435,000 for the same period this year. Distressed assets at WashingtonFirst Bank dwindled from $7.5 million at the end of the third quarter of 2010 to $3.5 million at the end of September 2011."}, {"name": "2f3ee892-2d89-11e1-8af5-ec9a452f0164", "body": "The first quarter of fiscal 2012 got off to an all-too-familiar start, with federal agencies operating under a series of short-term continuing resolutions, instead of year-long budgets. Still, that didn\u2019t stop agencies from awarding contracts worth more than $45 billion.\nWith budgets now in place, that pace likely will speed up. Deltek has identified more than 3,500 solicitations worth up to $325 billion planned for release early this year.\nFirst, we take a look at some of the more notable contract awards from the first quarter:\nThe General Services Administration awarded more than 20 contracts under its $5 billion Connections II contract vehicle. A recompetition of the original Connections contract, the program provides telecommunications infrastructure equipment and services.\nAir Combat Command awarded almost 30 contracts under its $4.7 billion Contract Advisory and Assistance Services IV vehicle, which covers technical assistance and systems engineering.\nThe Office of Personnel Management awarded contracts to CACI, U.S. Investigations Services and KeyPoint Government Solutions for background investigation fieldwork services worth $2.5 billion. These contracts pay for the investigations needed to clear government employees and contractors for sensitive work.\nNaval Air Systems Command awarded its $2 billion Training Systems Contract III program, which supports Navy training systems, to more than 25 companies.\nNow agencies are readying to release thousands of solicitations in the second quarter of fiscal 2012. While it\u2019s possible to predict release dates relatively accurately using historical trends and current data, it will never be perfect. That said, Deltek expects several major solicitations:\nThe Army is planning to release a solicitation for logistics related services under a $23 billion program called EAGLE.\nThe Air Force is readying a solicitation for training systems under the $20 billion Training Systems Acquisition III program.\nSpace and Naval Warfare Systems Command is planning a $16 billion acquisition of secure single-channel tactical software-defined handheld radio systems. Under existing contracts, this equipment has been provided by Harris and Thales.\nThe Navy is readying solicitations worth up to $10 billion for services related to implementing the Next Generation Enterprise Network. NGEN replaces the existing Navy network, NMCI, provided by HP Enterprise Services (formerly EDS).\nThe Army is planning a $5 billion solicitation for computer equipment and related services under the ITES 3H program, which is meant to be the primary vehicle the Army uses to buy IT equipment.\nThe Department of Homeland Security is set to release its $2 billion FirstSource 2 solicitation, which will replace First Source in providing the agency IT equipment, software and related services. First Source 2 will be set aside for small businesses.\nAlready this fiscal year, there have been several pieces of legislation and policy relevant to government contractors:\nMost noteworthy was the passage of two appropriations bills, providing funding for federal agencies for the full 2012 fiscal year.\nIn November, President Obama released a memorandum pushing for making federal records management more cost effective and transparent and for moving from paper to electronic records.\nThat same month, Obama called on agencies to develop plans to reduce by 20 percent (from 2010 levels) their costs in areas like travel, mobile devices and printing.\nIn December, Obama issued a memorandum directing agencies to implement energy conservation measures with a payback of less than 10 years. Specifically, he challenged them to award at least $2 billion in performance-based contracts designed to implement energy efficiency measures in government buildings.\nKevin Plexico is vice president of federal information solutions at Herndon-based Deltek, which conducts research on the government contracting market."}, {"name": "e251666c-2bef-11e1-9952-55d90a4e2d6d", "body": "Contractors are lining up for a rare opportunity to win a spot on a military radio program as the Army seeks to replace its cancelled ground mobile radio initiative.\nIn the competitive and crowded field of military electronics, some companies are looking to partnerships to bolster their credentials.\nThe Army late last year released a draft solicitation for the new effort, known as the multi-tier networking vehicular radio program. The winning contractor will be expected to build, integrate and test radio sets that will offer improved communication within vehicles.\nIn a move to stake an early claim on the program, McLean-based ITT Exelis and Falls Church-based Northrop Grumman announced last month that they plan to partner on the effort. Northrop would lead the team and provide the radio system, while Exelis would support radio development and vehicle integration, among other elements.\nGreg Bublitz, director of business development for network communication systems at Northrop Grumman, said ITT made an attractive teammate in part because of its experience producing large numbers of radios and keeping costs low.\nThe team likely will encounter plenty of competitors, said Loren Thompson, a defense industry consultant with the Lexington Institute, who forecasts some consolidation within the military electronics industry.\n\u201cThere aren\u2019t very many big new starts in military electronics,\u201d he said. \u201cIt\u2019s really crucial for the leading companies to put together the strongest possible teams if they want to have a future.\u201d\nGeneral Dynamics is among those companies with plans to compete, said Chris Brady, vice president of assured communications for General Dynamics\u2019s C4 systems unit.\n\u201cIt\u2019s a significant opportunity to break into one of these funded programs,\u201d he said.\nGeneral Dynamics hasn\u2019t decided whether it will be part of a team, said Brady, but the company certainly would be the prime contractor. Still, he said there are downsides to teaming.\n\u201cA principal consideration here will be unit cost, and every time you add members to your team, you have to consider the ripple of [general and administrative expense] and markups,\u201d Brady said. \u201cThat\u2019s cost that you would be well served to avoid in a competition like this.\u201d\nCompany officials agree that price likely will be a key part of the evaluation criteria, along with meeting certain performance standards.\n\u201cAffordability is going to be, I think, one of the keystone requirements,\u201d said Dennis Moran, vice president for government business development in Harris\u2019s radio communications unit, which also expects to participate in the competition.\nGiven shrinking defense dollars and a large group of military electronics competitors, alliances will be one strategy companies use, Thompson said.\nThe ITT and Northrop team \u201cdemonstrates the fluidity of the military electronics market,\u201d he said, noting that the two are opponents in other competitions. \u201cWhen the technologies and skills are fungible, the teams will coalesce and come apart with amazing agility depending on how opportunities emerge.\u201d"}, {"name": "8e81b89c-3181-11e1-a274-61fcdeecc5f5", "body": "In a lawsuit some have dubbed \u201cWinklevoss Part II,\u201d Facebook is getting sued by a former Mark Zuckerberg associate Paul Ceglia, who\u2019s claiming 50 percent ownership of the world\u2019s most famous social networking site. Ceglia is on his third set of lawyers, now being represented by Ohio attorney Dean Boland, since filing suit in 2010 (among those that have come and gone are mega-firm DLA Piper). Facebook is being defended by a five-lawyer team at Gibson Dunn & Crutcher, including Washington partner Thomas Dupree, which intends to ask a judge to dismiss the case. Dupree, 41, cut his teeth as a young associate representing George W. Bush in Bush v. Gore, the historic U.S. Supreme Court case that resolved the 2000 presidential election in Bush\u2019s favor. He\u2019s represented some of the world\u2019s most recognizable companies, including Chrysler and Mattel, and served in the Justice Department from 2007 to 2009, eventually rising to second-in-command of the civil division. He talked to Capital Business about how he and New York co-counsel Orin Snyder landed the Facebook account, and what it\u2019s like working with Ted Olson \u2014 the senior Gibson Dunn partner who helped lead the legal challenge to California\u2019s Proposition 8.\n How did you and co-counsel Orin Snyder come to represent Facebook in the Ceglia case? \nThomas Dupree: Gibson Dunn has previously represented Facebook in a number of matters, including before the Federal Trade Commission. Orin\u2019s and my practice focuses on civil litigation, and we have experience in cases that attract media interest, so it was a natural fit.\nAre you on Facebook? \nYes.\nCentral to Ceglia\u2019s claim is proving the age of the ink in the 2003 contract Ceglia says entitles him to a major stake in Facebook \u2014 if the document is real, the ink should be several years old. If it\u2019s fake, as you argue, the ink should only be a year old. Your forensic experts think there are red flags about the document\u2019s authenticity, like inconsistent margins, font size and font density. How did you find your experts?\nWe wanted the best, so we retained some of the top document authentication experts in the country \u2014 experts who have worked for the Justice Department and have decades of forensic experience. (They include Frank Romano, a document origination expert, and Gus Lesnevich, a former forensic document examiner for the Secret Service.)\n You\u2019ve represented some big names in major litigation \u2014 Chrysler, George W. Bush, Time Inc. Is working with Facebook, which is powerful in a different way than many traditional corporations, any different? \nIt is not particularly different. Facebook has a stellar team of in-house lawyers who are not just technologically savvy, but have terrific legal instincts and strategic judgment.\n What are some new or interesting things you\u2019ve learned from working this case? \nThe entire lawsuit is an attempted shakedown. Paul Ceglia is trying to extort a settlement from Facebook and Mark Zuckerberg based on a fabricated contract and so-called e-mails he created out of whole cloth.\n(Boland, Ceglia\u2019s attorney, is pushing back with fraud allegations of his own, saying Facebook lawyers are concealing evidence by withholding from the court content from several computers containing electronic communications by Zuckerberg. The contract was not forged, and its authenticity has been confirmed by several experts, Boland said.)\n What was it like working on Bush v. Gore as a young associate? \nIt was a very intense 36 days. Regular life pretty much came to a halt. We were writing briefs around the clock and always strategizing and trying to anticipate the next move. In retrospect, there was obviously some history to it, but at the time we were focused on winning the case. It was the most demanding pace of any matter in my professional career. I remember one night when I set the alarm for 3 a.m. so I could be up and have a new draft of a brief written by 6 a.m.\n How did you get on that case, and what did you get out of it? \nI had the good fortune as a young associate to work with Ted Olson, who headed up our legal team. Ted has been a mentor to me over the course of my career, and is the gold standard for how a lawyer should conduct himself in public life."}, {"name": "48b59c08-318a-11e1-a274-61fcdeecc5f5", "body": "Nearly a third of lawyers plan to make new hires in the first quarter of 2012, according to a quarterly hiring survey by legal staffing firm Robert Half Legal.\nThirty-one percent of lawyers said they plan to add legal jobs in the first three months of the year \u2014 up from the 25 percent who projected hiring in the fourth quarter of 2011. Law firms are expected to do the majority of the hiring, and the strongest areas of growth are likely to be in bankruptcy and foreclosure, litigation and labor and employment.\nThe survey interviewed 200 lawyers nationwide \u2014 100 lawyers at law firms with at least 20 employees, and 100 corporate lawyers at companies with at least 1,000 employees \u2014 and the hiring outlook in the Washington region mirrors nationwide findings, said Jonathan Witmer, Robert Half Legal\u2019s metro market manager for the District and Baltimore.\n\u201cA majority of the lawyers we surveyed nationally and here in D.C. are feeling good about hiring,\u201d he said. \u201cFirms are being smarter about how and when they add personnel.\u201d\nLaw firms and in-house counsel in the region also are using more contract and temporary lawyers \u201cthat can get work done and be off the books until the next time the workload spikes,\u201d Witmer said.\nLaw firms continue to focus on hiring senior and partner-level lawyers with books of business and expertise in high-demand practice areas, said Robert Half Legal executive director Charles Volkert. He added that corporations also are hiring more legal staff in an ongoing effort to bring more work in-house and reduce outside legal spending. \u201cGeneral counsel are handling more matters internally in areas such as corporate transactional, labor and employment, intellectual property, litigation and regulatory law,\u201d Volkert said.\n \nDougherty previously was a consultant at B&D Consulting, the Indiana law firm\u2019s lobbying group. He will counsel pharmaceutical, biotech and medical device companies in reimbursement strategies for products and technologies, Arent Fox announced in December."}, {"name": "32534192-323c-11e1-b692-796029298414", "body": "Short takes on the week's announcements and deals.\nRockville based defense contractor Lockheed Martin said it has been selected by the National Science Foundation to operate and maintain the support infrastructure for the U.S. Antarctic Program. The multi-year contract has a value of $2 billion.\nSilver Spring-based United Therapeutics has received approval in France for the intravenous use of Remodulin for treatment of pulmonary arterial hypertension.\nRockville-based Neuralstem has received approval from the Food and Drug Administration to advance to Phase Ib in its ongoing clinical trial to test its neuroregenerative compound NSI-189 for the treatment of major depressive disorder.\nFour companies have received loans from the Anne Arundel Economic Development Corp.: Annapolis-based Chesapeake Light Craft, $300,000; Annapolis-based OpinionWorks, $100,000; Glen Burnie-based Six C/D Associates, $35,000; and Glen Burnie-based Honey Bee Diner, $35,000."}, {"name": "e571c8d2-2ccb-11e1-8af5-ec9a452f0164", "body": "Construction trucks hummed in the distance as Edens President Jodie McLean outlined plans for a Neiman Marcus Last Call Studio at Mosaic District, a collection of shops, offices and residences rising in Merrifield.\n\u201cIt\u2019s only their second location in the area, after the store at Congressional Plaza,\u201d she said, while flipping to a rendering of the 15,200-square-foot clothing store. \u201cIt\u2019s going to be right at the main entrance on Lee Highway and District Avenue.\u201d\nNeiman Marcus is the latest merchant to sign on at Mosaic, where Target and MOM\u2019s Organic Market have agreed to fill some of the 350,000 square feet of retail set to open in October. That phase, one of four, also is to include an eight-screen theater run by Angelika Film Center, a New York City outfit that shows art house and mainstream films.\n\u201cRight over there, behind the theater, is where we\u2019ll have the outdoor screen that we can program for all kinds of community events,\u201d McLean said, pointing to the side of a four-story structure facing what will be one of the project\u2019s two parks.\nAcross the way on Strawberry Lane and District Avenue, construction workers toiled on the 150-room Hotel Sierra, overlooking the site of a 7,000-square-foot Black\u2019s Bar & Kitchen. The restaurant is to be one of several eateries, including Cava, Matchbox, Sweetgreen and Taylor Gourmet, opening in the fall.\nResidents of the 112 town homes being built by EYA and AvalonBay\u2019s 531-unit apartment complex on the west end of the site will be able to walk to get dinner.\n\u201cThere were a lot of national restaurants interested, but it was important to us to bring unique food offerings that felt like they belonged to the community,\u201d McLean said.\nShe noted that a number of national apparel chains also wanted in on the project, but Edens opted for local boutiques such as Lou Lou and Dawn Price Baby. About 25 percent of the retail tenants are local.\nAll told, the retail portion of the first phase of the project is about 80 percent pre-leased. Another 250,000 square feet of retail is to be opened piece by piece in the next three phases.\n\u201cThe retail makeup is something that we\u2019ve probably spent more time on than anything from a merchandising standpoint,\u201d said Steve Boyle, managing director at Edens. \u201cThere is a sameness to retailing that we wanted to avoid, and that sameness is manifesting itself in merchandising and design.\u201d\nEvery inch of Mosaic, he said, is designed to create a walkable cityscape that flows into the neighboring developments in Merrifield. Edens is creating a new grid of streets to allow traffic to flow in and out of the site, as well as 4,000 parking spaces in four above-ground parking garages. There is to be a bus to shuttle visitors over from the Dunn Loring-Merrifield Metro station a half-mile away.\nThe Mosaic District Community Development Authority, an arm of Fairfax County, issued $66 million worth of bonds in June to finance the road and utility infrastructure. Edens is to repay the debt via future property taxes.\n\u201cThe project has the ability to transform and revitalize the area,\u201d said Fairfax Supervisor Linda Smyth (D-Providence). \u201cWhen I go out to civic association meetings, one of the first questions people ask me is, \u2018What\u2019s the latest on Merrifield?\u2019 People are interested because they see this as an asset to their community. \u201d\nMosaic is the outgrowth of a redevelopment plan that county officials introduced in 1998 to transform Merrifield from a semi-industrial mishmash into a mix of stores, homes and offices.\nEdens became involved in the project in 2004 by teaming with National Amusement, owner of the former movie theater site on which Mosaic is being built. They submitted a proposal just as the county approved Mill Creek Residential Trust\u2019s retail and apartment project atop the Dunn Loring-Merrifield Metro station.\nWhen Mosaic got through the regulatory process, the project faced the turmoil of the recession, which made retailers apprehensive about making decisions, McLean said. Boston-based National Amusement even backed out of a deal to operate a theater. Edens bought National Amusement\u2019s share of the development.\nOnce the economy started to rebound, the pace of leasing picked up. Now it\u2019s just a matter of filling the few remaining slots. McLean said two homegrown boutiques are close to signing on, but she said she wouldn\u2019t share names until the ink was dry on the agreement."}, {"name": "e348254a-31be-11e1-b034-d347de95dcfe", at how various segments of the local fitness industry are doing as the market is gaining more attention.\nIt.\n\u2014 Danielle Douglas\nGy.\n\u2014 Jonathan O\u2019Connell \nThe.\n\u2014 Catherine Ho \nThat New Year\u2019s pledge to shed a few extra pounds and kick up the exercise regimen might be best followed by a cold, frothy beer \u2014 at least that\u2019s the ethos of NAKID Social Sports.\nOne of Washington\u2019s many adult recreation leagues, NAKID (which stands for No, Adult Kickball Isn\u2019t Dumb) is a fitness haven for the decidedly unathletic.\n\u201cThe league started to really focus on the social aspects of sports, and to focus on the fact that we\u2019re a bunch of adults playing a children\u2019s game, so things shouldn\u2019t be taken too seriously,\u201d said Erin Reilly, executive vice president for events.\nThere\u2019s a decent business to be made of children\u2019s games it seems. Last year, the league attracted 10,000 participants from around the region to play kickball, volleyball, dodgeball and, most recently, flag football.\nBut the big draw for many of those who take part is the post-game trek to a nearby bar. Reilly said the league regularly hosts professional game nights, movie screenings and parties \u2014 all of which drive traffic to other neighborhood businesses.\nTucked in the shadow of the Capitol, My Brother\u2019s Place used to close its doors on Sundays. It\u2019s not a busy day for the nearby government employees that have kept its business humming for 31 years .\nBut the NAKID began hosting outdoor sports on the mall, and sending players to belly up to the bar. Now, when the league is in season, Sundays draw a rambunctious crowd sporting a rainbow of league T-shirts.\n\u201cFor us it\u2019s been very good, especially in the summer months,\u201d said co-owner and events coordinator Martin Scahill. \u201cBecause we\u2019re only located one block from the mall, it gives them a place to come that\u2019s easy walking distance to get affordable drinks and food.\u201d\nReilly said the league negotiates discounts for its members and requires that the bars serve Bud Light, one of the league\u2019s primary sponsors. NAKID also has partnerships with D.C. United, the Wizards and the Capitals for discounted game nights.\nFor the businesses, the arrangement brings new customers.\n\u201cIt\u2019s a very transient area,\u201d Scahill said. \u201cLots of young professionals are moving in and out of the area. It gives them an opportunity to interact and see what\u2019s going on.\u201d\n\u2014 Steven Overly \nSales for the fitness apparel industry worldwide in 2011, up 6.7 percent from 2010, according to research firm IBIS World."}, {"name": "8c95ab52-30a9-11e1-b034-d347de95dcfe", "body": "The payroll tax debate on Capitol Hill is putting a spotlight on taxes for everyone in 2012, but especially employers. While many of us like to avoid knowing too many of the details about how much we pay in taxes and where all the money goes, area employers should take note of the known new taxes that they\u2019ll be paying in the new year to budget for the increases.\nFor the past two years, payroll tax credits and tax cuts have benefitted both employers and employees. In 2010, Congress provided tax credits to employers for hiring new employees and in 2011 reduced the employees\u2019 share of the payroll tax by two percent. That means American workers making $50,000 kept an extra $1,000 in their pocket. Last month, President Obama signed into law a two-month extension of the current two percent reduced employee rate with the hopes of making it effective for the full year.\nRegardless of what Congress ultimately decides with the payroll tax, there are a couple of other taxes on the horizon that business owners need to be aware of. They include state and federal unemployment insurance taxes.\nBecause of the recession, one of the largest tax increases employers will continue to face is escalating unemployment insurance (UI) taxes. As many employers know, they pay the taxes to their states to fund the unemployment benefits provided to former employees who are out of work and collecting unemployment benefits. With more unemployed individuals who are collecting unemployment benefits for longer periods of time, these taxes are inevitably escalating to meet the growing need.\nEmployers may be shocked when they receive their unemployment insurance tax notices for 2012 between now and February. Maryland had an historic increase two years ago, in which some employers\u2019 unemployment insurance taxes grew by 400 percent. While the Maryland tax rate table will not change for 2012, many employers will see higher tax rates as the full impact of past layoffs affects their tax rate. Employers in Virginia and the District should also expect higher UI tax liabilities. The taxes will be due on April 30, 2012.\nThe recession has also taken a toll on federal unemployment taxes. Virginia and 20 other states were forced to borrow money from the federal UI trust fund to pay benefits. This will mean higher UI taxes (as much as 50 percent more per employee) for employers who operate in these states. These increased taxes will be due by January 31, 2012.\nNonprofits are also facing serious UI financing challenges, as many have opted for the reimbursement method of funding their UI costs. Under this method, the employer is required to pay only when benefits have been charged against their account. Unfortunately, the economic downturn has negatively affected some nonprofits and layoffs have occurred. These nonprofits now must pay dollar-for-dollar for each dollar in benefits paid.\nThus, if a \u201cseparated\u201d employee collects the full duration of regular benefits (26 weeks) and is eligible for $400 per week, the nonprofit will owe $10,400.\nFinally, the Social Security wage base has increased for the first time in three years, up to $110,100 for tax year 2012. For the past three years, the wage base was set at $106,800. In addition, Social Security recipients will receive a three percent cost of living raise in January. Paying for the 2012 cost of living increase will come as greater taxes are collected from employers, the self-employed and high-wage earners. High-wage earners seeing an increase in their Social Security taxes are the folks defined as those earning more than $110,100 in 2012.\nCharlie Wolf is chief executive of Payroll Network, an independently owned payroll management company operating in the Washington and Baltimore metropolitan areas."}, {"name": "6c22fff2-3237-11e1-b692-796029298414", "body": "Cognosante of McLean appointed Stephen Gantz vice president of health reform.\nEarth Networks of Germantown appointed Thomas Spendley, former vice president of software development at Thomson Reuters, vice president of engineering.\nInternational Foundation for Electoral Systems of the District appointed Judy A. Black, a policy director at Brownstein Hyatt Farber Schreck, secretary of the board of directors.\nThe American Land Title Association of the District appointed Jessica McEwen, former legislative assistant to Rep. Joe Donnelly (D-Ind.), director of government affairs.\nThe Ballston Business Improvement District of Arlington appointed Tina Leone executive director.\nThe National Health Council of the District appointed Larry Hausner chairman, LaVarne A. Burton chairwoman-elect, Nancy Brown vice chairwoman, Eric Racine treasurer and Tom Wallace secretary.\nVienna Tysons Regional Chamber of Commerce of Vienna appointed Lisa F. Huffman, former vice president of business development for the Fairfax County Chamber of Commerce, president.\nCoStar Group of the District appointed Rene Circ director of research industrial in the property and portfolio research division.\nNorthwest Federal Credit Union of Herndon appointed Jim Northington chief credit officer.\nSandy Spring Bank of Olney appointed Nina Baranchuck vice president and chief investment officer in the investment management and fiduciary services division.\nVirginia Commerce Bank of Arlington appointed Mark S. Merrill executive vice president and chief financial officer.\nBracewell & Giuliani of the District appointed Paul S. Maco partner.\nSend information about promotions, appointments and personnel moves in the Washington area to Appointments, Business News, The Washington Post, 1150 15th St. NW, Washington, D.C. 20071-5302, or to appointments@washpost.com."}, {"name": "c2b4843e-2be9-11e1-9952-55d90a4e2d6d", "body": "Company: Near Infinity.\n Location: Reston.\n Number of employees: 70.\nBrandon Marc-Aurele, 22, wasn\u2019t used to receiving gifts from his boss.\nSo when one arrived in his inbox earlier this year, he paid it no notice.\n\u201cI got an e-mail from my manager and assumed it was just more work,\u201d said Marc-Aurele, a junior software engineer at Near Infinity. \u201cI let it just sit there for a while before I opened it.\u201d\nThe e-mail turned out to include a $50 gift card to NewEgg.com, a computer parts site Marc-Aurele frequented.\n\u201cIt was so thoughtful,\u201d Marc-Aurele said. \u201cI wasn\u2019t expecting it at all.\u201d\nNear Infinity, a Reston-based software development company, gives managers $100 to spend on each employee every year.\nSome managers take their team on quarterly lunches, while others purchase gifts throughout the year.\n\u201cManagers love it because they don\u2019t have to come and ask us for approval if they want to do something nice for an employee,\u201d said Karen Upton, director of human resources.\nOver the summer, Caroline Wizeman took a group of interns and employees out for bowling. They left work after lunch, went to Bowl America in Sterling for a few games, then stopped for ice cream.\n\u201cIt\u2019s great because we can tailor rewards for our employees,\u201d said Wizeman, director of marketing and communications. \u201cLike, I wasn\u2019t going to take my team out for happy hour because so many of them weren\u2019t 21 yet.\u201d\nThe company keeps a running spreadsheet where employees can log their interests and hobbies, ranging from their favorite coffee shops and sports teams to coveted items they\u2019d never buy for themselves.\n\u201cThis really allows managers to get to know their employees and to thank them in a personal way,\u201d Upton said."}, {"name": "8eaa2058-2ccb-11e1-8af5-ec9a452f0164", "body": "In this current job market it is incredibly important to be able to outshine your competition in all stages of a job interview. I asked our top recruiters what their key tips were for those seeking new job opportunities. Here is what they had to say about the interview process.\nDo your research\nMake sure you have a working knowledge of the company, including its mission, products/services and industry. Acquire strategic information such as their core competencies and values. For instance, if you\u2019re interviewing with GE, your answers should reflect their five \u201cGrowth Leadership Traits.\u201d\nSpend a good deal of time researching and preparing for each interview you do. If you only spend 10 minutes researching a company and another interviewee spent three hours on their research, it will be very evident to recruiters. Do your homework and it will pay off in the end.\nBe relevant and concise\nWhen.\nBe engaged and don\u2019t dominate\nRecruit.\nAsk great questions\nPrepare a list of questions you want to ask the interviewer. Pose questions that demonstrate your knowledge of the organization and subtly convey your expertise. Ask pertinent questions to better understand what the recruiter is looking for (e.g., if you\u2019re attending a finance information session, don\u2019t ask questions about information systems or marketing). Avoid being overly aggressive \u2014 excessive questions can discourage potential employers.\nPractice makes perfect\nLike a stage actor, rehearsing will help you convey your ideas in an eloquent, persuasive and authentic manner. Prepare answers to commonly asked interview questions. Have five to 10 behavioral scenarios (e.g., \u201cTell me about a time you had to work cooperatively with someone who did not share your values or ideas\u201d; \u201cShare a time when you did not reach the expected goals of a project. What did you learn and what could you have done differently?\u201d; etc.).\nRemember to say \u2018Thank you\u2019 and leave a positive impression\nIt might sound trivial, but those two words can go a long way. Say \u201cthank you\u201d to any recruiter you talk to, whether it is a brief meeting at a career fair or a full-fledged job interview. Send follow-up e-mails to thank them for their time and send \u201cthank you\u201d.\nLooking for powerful results? With preparation, practice and focus you can ace interviews and assess which companies are the best fit for you. You\u2019ll also outshine the competition.\nJeff Inc., a human resource consulting firm specializing in executive assessment and leadership development."}, {"name": "1c63af38-3198-11e1-a274-61fcdeecc5f5", "body": "Who: Jennifer Silberman, vice president of corporate responsibility.\nCompany: Hilton Worldwide.\nCharitable giving highlights: Hilton Worldwide gives about $1 million annually to the Washington region.\nTell me about the company\u2019s philanthropy.\nWe have four areas of focus that matter most to our business. First is creating opportunities, which focus on training future leaders in hospitality around the world to make hospitality an attractive business for young people. Second is strengthening communities, which is understanding the kinds of needs that make a community successful where our hotels are located, such as entrepreneurship, community development, disaster preparedness. Thirdly, celebrating cultures is where we bridge cultures through what we do everyday in our business, which is travel. Lastly is sustainability. We need natural resources to sustain our business so we think about the impact we have on those resources, such as repurposing waste.\nTell me about the new Global Soap Project partnership.\nWe need to repurpose soap otherwise it\u2019s going to end up in a landfill. We saw it as a great opportunity to not only minimize waste but also to repurpose it for community needs. Global Soap Project collects our used soap, breaks it down, makes it into new soap and distributes it to communities in need.\nHow did you get connected with them?\nThey were looking for a global hospitality partner. We approached them at a great time because we were really looking to get our arms around this issue and how we can be strategic with an organization as opposed to just a sponsorship relationship.\nWhat sealed the deal to choose Global Soap Project as a partner?\nIt\u2019s a great mission. Sometimes partnerships are really complicated. This one was a really easy concept. Their leadership was really important because they have several members that understand and have worked for global hospitality companies.\n\u2014 Interview with Vanessa Small "}, {"name": "8213c0f4-2cff-11e1-8af5-ec9a452f0164", "body": "Last November, after a long day of meetings, Dana Tai Soon Burgess, founder of a modern dance company in the District, opened a letter with disappointing news.\nThe District\u2019s Commission on Arts and Humanities informed him that it was unable to provide his organization with a grant this year. This was among a series of letters he\u2019d received from foundations, which were forced to redirect their dwindling funds from arts groups toward human services organizations.\nThe decision put Burgess\u2019s studio $51,000 in the red during that quarter \u2014 an amount that represented a fifth of its annual budget.\nBurgess found out just before heading to a rehearsal that night for the company\u2019s upcoming 20th anniversary spring show, now jeopardized by the funding cuts. He also had to consider shortening or terminating dancers\u2019 contracts and giving up its rental space.\n\u201cI just sat there for a couple hours after my heart palpitations passed and then I thought, \u2018Who would care enough about dance and the performing arts to help?\u2019\u201d Burgess said.\nAt the top of his list was Jane Cafritz, interior designer and founder of Jane R. Cafritz Antiques and Interiors in D.C.\nA lover of the arts and a Washington Ballet donor, she had been a regular supporter of Burgess\u2019s studio after seeing a show 10 years ago.\nWhen she received his e-mail, \u201cthere was no question in my mind whether or not to help,\u201d said Cafritz, who also called on an old friend, Georgiana Warner, to join in the challenge.\nThe three of them brainstormed ways to raise funds on a time crunch.\nThey began mailing letters and making phone calls to people familiar with the dance company, asking for gifts above $2,000.\n\u201cIt\u2019s so hard to ask because people get asked by so many organizations, but this was an emergency situation. We told them, \u2018You know Dana, and love his work. Can you help us out?\u2019\u201d Cafritz said.\nWithin weeks, pledges were made. Checks sent. And the giving circle was born.\nIn less than a month, the group raised $50,000, covering expenses into 2012.\n\u201cThe giving circle completely saved our spring and fall season,\u201d Burgess said.\nBurgess and his staff are now looking to use the giving circle to reach individual givers as government and foundation resources dry up.\n\u201cThis is a really wonderful start, at a very important juncture at our company turning 20, to turn to this direction to look for individual supporters that we haven\u2019t reached out to at this level,\u201d Burgess said.\nThe spring concert is set for April."}, {"name": "a552eada-2cc9-11e1-8af5-ec9a452f0164", "body": .\nDuchene\n\u201cFish Window Cleaning is the largest commercial and residential window cleaning business in the country. Our company is headquartered in St. Louis, with four franchise locations in Maryland. As of April 2011, I am the owner of Fish Window Cleaning in Annapolis.\n\u201cOur window cleaners are licensed, bonded, insured, come in uniform and are trained professionals. We focus on cleaning from the ground up to five stories, and we also clean gutters, chandeliers, screens, mirrors, ceiling fans and those hard to reach and maintain windows.\n\u201cMy.\n\u201cFor.\n\u201cOne thing I have been meaning to pursue is reaching out to firefighters \u2014.\u201d\nAsher Epstein, managing director, Dingman Center for Entrepreneurship\n\u201cThat is always a good question: How do you find those people who are self-motivated to do the work? I have to say that it sounds like you are doing all of the right things. Since you aren\u2019t\u2019d stick with that too.\n\u201cKeep finding new and innovative ways to get in front of your target employees. I think the firefighter idea is really fantastic. I would definitely recommend you try to tap into that market and for the exact reasons you said \u2014.\n\u201cYou could also try to get hooked into the community college. Students would likely be interested in a job at which they can make their own hours. Overall, it sounds like you\u2019ve got the right strategy and I really wouldn\u2019t change much. Give it time and stick with it \u2014 it sounds like this is a very successful and proven model.\u201d\nDuchene\n\u201cThat is great to hear. I have no doubt that I\u2019ll be able to grow my franchise with time. I will also be sure to tap into the firefighter market in the very near future. I definitely think I could be on to something there.\u201d"}, {"name": "9cb90546-2cd6-11e1-8af5-ec9a452f0164", "body": "Columbia-based Corporate Office Properties Trust is selling off office buildings worth millions in an effort to position itself better as its core customers face tougher times.\nCOPT, a specialty real-estate investment trust, has focused on providing office space specifically designed for Defense Department bodies and defense contractors, often buying up space near bases. But analysts say the company has been hurt by cuts to government spending and the resulting hit to contractors.\nThe company \u201cwas exceptionally good at taking advantage of the growth of the federal government\u2019s overall budget,\u201d said John W. Guinee, managing director at Stifel Nicolaus. \u201cThat worked very, very well from Sept. 11 ,2001, until about a year ago, maybe even two years ago.\u201d\nLast month, COPT announced it is significantly expanding its strategic reallocation plan \u2014 or its strategy to sell certain properties more quickly \u2014 from $260 million in assets to $572 million. The company also said it was revising its earnings per share for the quarter ending Dec. 31 to reflect losses.\nWhen COPT announced its strategic reallocation plan in April, the company said the strategy would allow it to reduce its \u201cexposure to traditional suburban office buildings\u201d and increase its percentage of buildings serving its \u201csuper core customers,\u201d or government agencies and defense contractors.\n\u201cFrankly, from 2008 until recently it was a poor market for selling assets. We\u2019re using the current environment to catch up on some rational pruning,\u201d said Roger A. Waesche Jr., COPT\u2019s president, in an April call with investors.\nWaesche is in the process of taking over from Rand Griffin, COPT\u2019s chief executive since 2005, who announced in September that he would retire at the end of March.\nGuinee said the company now is trying to reposition by selling off assets it bought at the height of the market \u2014 in 2006 and 2007 \u2014 but have become less desirable.\n\u201cThe thing to do is to take [their] medicine and to sell all the assets that [they] think don\u2019t have any long-term growth potential,\u201d Guinee said. \u201cI don\u2019t really think they have any other choice.\u201d\nLast.\nSince announcing the plan in April, COPT said it has sold $76.7 million in properties.\nIn a report issued Dec. 6, BMO Capital Markets backed rapidly disposing of unwanted assets.\nWaesche \u201ccould look to quickly put his signature on the business by using the current point in time, when the stock is out of favor, to accelerate dispositions \u2014 a faster move to focus on its \u2018super-core\u2019 defense/IT niche,\u201d the analyst report said.\nGuinee said the company\u2019s sales now will position it better for the future.\n\u201cThey\u2019ll clearly be a stronger company a year from now,\u201d he said.\nCOPT, which declined to elaborate on its plans, has scheduled a Jan. 12 call with investors to provide guidance on 2012."}, {"name": "fdafa37c-2db3-11e1-8af5-ec9a452f0164", a look at how various segments of the local fitness industry are doing as the market is gaining more attention."}, {"name": "dc1b1862-2daf-11e1-b030-3ff399cf26f3", "body": "Happy New Year! But before we get too far into 2012, let\u2019s check in with some of the people I wrote about in 2011.\nChristy Winton got an inadvertent lesson in how mean the Internet can be. In October, Christy\u2019s 79-year-old mom, Joy Bricker, moved out of the TownePlace Suites by Marriott in Falls Church where she\u2019d lived for 10 years. I wrote about how Joy was moving to New York state to live in the farmhouse Christy rents.\n\u201cSome of the retaliation toward me was not nice,\u201d Christy told me when I called her recently. Some online commenters said anyone who let their mother live in a hotel for 10 years must be an awful daughter.\n\u201cThat was where she wanted to be,\u201d Christy said. \u201cIt\u2019s amazing the perception people get when they read stories. And the negativity. .\u2009.\u2009. Just shows you how people are.\u201d\nBut there was plenty of good, too. The coverage \u2014 in my column, on CNN, in the Huffington Post \u2014 helped Joy reconnect with people she\u2019d known over the years.\n\u201cIt\u2019s an adjustment, of course,\u201d Christy said of her mother\u2019s new rural life. \u201cBut she\u2019 a very adaptable person.\u201d\nThen Joy shouted over the phone: \u201cI plan to be in Washington in 2012!\u201d\nConcepcion Picciotto has had an unusual living arrangement, too. She\u2019s the peace activist who since 1981 has mounted a vigil in front of the White House.\nWhile she spends the majority of every day and night in her makeshift camp in Lafayette Park, Concepcion retreats for a few hours each day to a house on 12th Street NW to shower and eat. That house is for sale, and it looked like Concepcion would have to leave.\nShe\u2019s still able to use the house, she told me last week. While she and owner Ellen Benjamin \u2014 who inherited the house when her peace activist husband William Thomas Hallenback died in 2009 but who does not live there \u2014 still don\u2019t get along, Concepcion is being allowed to stay for now.\n\u201cI\u2019m in limbo,\u201d she told me.\nEllen said two people have expressed interest in buying the Peace House, one of whom is connected with the Occupy D.C. movement. Both have assured her that they would like to use the house as a headquarters for activists. It would be up to the new owner whether Concepcion could stay.\nThere\u2019s nothing sadder than a locked library, and that was the state of things when I last wrote about the Historical Society of Washington. The handsome Kiplinger Library, gem of the society\u2019s headquarters at Mount Vernon Square, had been forced to close, the most visible victim of the society\u2019s slow slide into insolvency.\nA savior came in the form of the agency that runs the D.C. convention center. It will operate a visitors center in the old Carnegie Library building and take over the site\u2019s expensive overhead.\nThe Kiplinger Library\u2019s doors are still locked, but they will be open Jan. 16 \u2014 Martin Luther King Jr. Day. The hope is to open the library two days a week after that.\nSo, we still have to wait \u2014 and two days a week is a fraction of how often the library used to be open \u2014 but it\u2019s better than nothing. What\u2019s more, the society just got a donation of fascinating graphical materials that show the evolving landscape of Washington. The collection, more than 4,000 pieces, was assembled over the years by Kiplinger Washington Editors, the personal-finance publishers, headed today by major Washington history buff Knight Kiplinger. It includes maps, paintings panoramic prints, photographs by Mathew Brady. There\u2019s even a receipt for a D.C. dog licensing fee, signed by Thomas Carbery, the city\u2019s mayor from 1822 to 1824.\nThere\u2019s barely a week left to make a difference in our 2011 fundraising drive for Children\u2019s National Medical Center. The campaign ends Friday. Why should you donate? To help ensure that Children\u2019s Hospital can do what it\u2019s done since being founded in 1870: treat every child, no matter how much money he or she may have.\nTo make a tax-deductible donation to the hospital\u2019s uncompensated care fund, go to washingtonpost.com/childrenshospital, or send a check or money order (payable to Children\u2019s Hospital) to Washington Post Campaign, P.O. Box 17390, Baltimore, Md. 21297-1390.\nDonors who give $250 or more will receive a $20 gift certificate to the Chef Geoff family of restaurants."}, {"name": "d7a6a3fc-2d26-11e1-b030-3ff399cf26f3", "body": "Nevermind that it\u2019s a federal holiday. And nevermind that the vast majority of Washington area schoolchildren will be snoozing late, savoring their last day of winter break.\nOn Monday morning, a few students are headed to class.\nSchools opened their doors Jan. 2 in Alexandria and Howard, St. Mary\u2019s and Charles counties, while elsewhere in the region \u2014 and in eight of the nation\u2019s 10 largest school systems \u2014 students are free to enjoy the nation\u2019s official celebration of New Year\u2019s Day.\nSome parents in Alexandria, home to thousands of federal workers and countless others who follow the federal calendar, assumed their kids would have the day off. As 2012 approached, they were not pleased to discover otherwise.\nMatt Petersen said he would keep his two children home despite initial objections from his fifth-grade daughter, who fretted about ruining her perfect attendance record.\n\u201cWe won\u2019t literally be out of town,\u201d he said, \u201cbut it\u2019s one of the main holidays on the calendar, and it\u2019s just inappropriate for them to have class.\u201d\nOthers see an unequivocal upside.\n\u201cI was very surprised that the kids were going to be in school Monday, but once I thought about it \u2014 it\u2019s great!\u201d said Scott Boggess, also of Alexandria. \u201cMy wife and I are going to go out to eat a nice lunch and to see a movie that\u2019s not animated.\u201d\nSchool.\nShe said those who are peeved might blame Virginia\u2019s so-called \u201cKings Dominion law.\u201d It prohibits schools from opening before Labor Day and makes it difficult, Gorsuch said, to shoehorn enough instructional days into the calendar before standardized tests are administered in the spring.\nMoreover, not every parent has a paid holiday Monday.\n\u201cThere\u2019s a big voice out there that\u2019s just as happy to have their kids go back to school on January 2nd, because they\u2019re going back to work,\u201d Gorsuch said.\nRead more on PostLocal.com: \nNew Year\u2019s baby a precious surprise\nViola Drath: A remarkable life hijacked\nGetting a handle on the new bag tax\nTwo killed in New Year\u2019s crash in Bethesda"}, {"name": "5b0a7ae4-1cff-11e1-a1c9-d8aff05dec82", "body": "THE BOY IN THE SUITCASE\nBy Lene Kaaberbol and Agnete Friis\nTranslated from the Danish by Lene Kaaberbol\nSoho. 313 pp. $24\nNovels about stolen children are emotionally hard for most readers to handle, and yet they are instantly compelling because so much is at stake: a child\u2019s tender psyche or even life. With a mystery about a stolen inheritance or even a great painting filched from a museum, it\u2019s easy enough to assume a commonsensical Buddhist point of view: In the end, it\u2019s only stuff. But when a 3-year-old is forcibly taken from his anguished mother, as happens in this terrific Danish thriller, you know you\u2019re in for a frantic read. Is this \u201cfun\u201d? Yes and no. What\u2019s for sure is that, once you start reading, you can\u2019t stop \u2014 it\u2019s as if the poor kid\u2019s life depends on your getting to the end as fast as possible.\nEven the title of this first in a series by two Danish writers with their own careers \u2014 Lene Kaaberbol does fantasy, Agnete Friis writes children\u2019s books \u2014\u2019s the central figure in this new series \u2014 a Red Cross nurse with a social conscience so robust that she sometimes neglects her husband and children to help maltreated refugees and illegal immigrants.\nKaaberol and Friis have packed plenty of depressing information about human trafficking into their labyrinthine tale, much of it related to poverty and social breakdown in the Eastern European countries once dominated by the Soviet Union. Most of the novel\u2019s richness, however, comes from the supple rendering of the two mothers whose stories are told on parallel tracks. Borg is all too believable, a nurse who \u201ccould always be counted on. She led a remarkably efficient one-woman crusade to save the world,\u201d according to her exasperated husband. \u201cIt was only her own family who could reduce her to abject helplessness.\u201d\nYou. \u201cShe did not want to admit to [a police detective] just how alone she was. It was shameful, like some embarrassing disease.\u201d Sigita is forced to draw on reserves of strength and cunning she didn\u2019t know she had as she maneuvers desperately to find her child.\nBorg\u2019s\u2019s search for someone \u2014 practically anyone \u2014 who speaks the boy\u2019s language so she can find out who he is.\nThis series debut \u2014 translated with assurance by Kaaberbol \u2014 looks like another winning entry in the emotionally lacerating Scandinavian mystery sweepstakes."}, {"name": "41395194-323a-11e1-b692-796029298414", "body": "DES MOINES \u2014 At nearly every event, Ron Paul begins on a high note. He generally smiles, introduces a member of his family, talks up his campaign and says how pleased he is with the way things are going.\nAnd then, for the next 45 minutes or so, he outlines a view of the world so bleak it would make Chicken Little sound like an optimist.\nThere will be a total collapse of the economy. An eruption of violence in the streets. Martial law is just around the corner.\nPaul says he would like to cut $1\u00a0trillion out of the budget.\n\u201cPeople say that means everybody will suffer,\u201d he adds. Some probably will, he concedes, but \u201cthey should have to suffer.\u201d\nAnd then there are the sorts of ominous predictions he made at an evening rally here Wednesday: \u201cThere are certain events that are coming that are going to happen \u2014 they are going to be very dangerous. They might come in a day, a week or a year.\u201d\nNot exactly morning in America.\nPaul\u2019s sky-is-falling message goes against everything a successful American politician is supposed to do. In the land of hope and change, where a little malaise can undercut a campaign, it is almost always the sunniest candidate who succeeds.\nBut the Republican congressman from Texas is betting that the usual optimism and laundry list of promises \u2014 millions of jobs, bringing people together, changing the tone in Washington \u2014 is not what voters want to hear this year. The latest Iowa polls, which show Paul in a virtual tie for first place with Mitt Romney ahead of Tuesday\u2019s caucuses, suggest that he has found an audience.\n\u201cI want someone to give it to me straight. We aren\u2019t getting a lot of fluff, and he isn\u2019t offering us a prize or a present or something to make us feel good,\u201d said Tom Icatar, 65, who saw Paul at a West Des Moines town hall. \u201cI think he\u2019s been consistent and honest. He is giving people the bitter medicine they need to have.\u201d\nJordan Sorensen, 23, of Adele, Iowa, said after an event in Perry that \u201cwe\u2019ve heard the same old political talk of promising this and that. Ron Paul isn\u2019t the most brilliant speaker, he isn\u2019t great with rhetoric, but it\u2019s refreshing for me to hear something that\u2019s more truthful. He is realistic about what he is working with, and he is less full of it.\u201d\nThe fact that Paul is resonating with some voters is more reflective of the moment than the man. Paul has long spoken in such apocalyptic terms, but after years of war and financial hardship, his leave-\u2019em-alone foreign policy and get-the-government-off-my-lawn domestic approach is a match for the times. And to his backers, his anti-politician demeanor confirms their sense that he\u2019s telling the truth, unlike what they see as a bunch of overproduced alternatives.\n\u201cThe others are political-machinery people. They change their message to tell us what we want to hear, not what\u2019s actually needed,\u201d Steve Chase, 63, said at the event in Perry. Paul, he said, is \u201cthe least likely to create a situation that will lead to the destruction of everything.\u201d\nMost of Paul\u2019s rivals also lay out the difficulties America faces \u2014 it\u2019s just that it\u2019s not all they focus on.\nGov..\nIn Romney\u2019s ads, there are green fields, kids playing baseball, factory workers strolling on the shop floor, and soundtracks of soothing music as the candidate strolls hand in hand with his wife, Ann.\nAnd in his speeches, Romney quotes \u201cAmerica the Beautiful,\u201d promises more and better jobs (11 million to be exact) and invokes what he sees as a pre-Obama heyday linked to Ronald Reagan.\n\u201cI\u2019m asking each of you to remember how special it is to be an American,\u201d Romney said in Davenport on Tuesday. \u201cThat.\u201d\nThe speech later became the basis for a Romney ad called \u201cAmerican Optimism.\u201d\nPaul offers little of this. His ads and rhetoric are filled with images of destruction and decline. There are shuttered stores, dark clouds, barking dogs, and federal department buildings lined up for destruction all set to to urgent music.\nPaul says sanctions on Iran will lead to another useless and costly foreign war. Mounting debts and more bailouts will lead to the government printing more money, which will make the dollar worthless. The latest bill to fund the Defense Department is a slip into tyranny.\n\u201cIf we continue to do what we do, if we have runaway inflation, everybody gets thrown out on the streets, because the whole thing comes down on our head,\u201d he said last week at a town hall at the Iowa Speedway in Newton, in front of about 200 people.\nAt another stop, he said: \u201cIf we continue to [spend money overseas], we will have an economic calamity, we will have runaway inflation . . . we will have violence in the streets, and that will be very, very dangerous.\u201d\nPaul does offer a solution to avoid all the calamity he sees \u2014 lawmakers should just follow what\u2019s laid out in the Constitution \u2014 but he makes no promises to directly improve people\u2019s lives.\n\u201cAll of a sudden, people are tired of the wars, they are tired of this economy, they are tired of the Federal Reserve, they are tired of Congress spending a lot of money, and they are looking for some change,\u201d Paul said, summing up the state of mind of his audiences. \u201cAnd I am suggesting one significant change. Why don\u2019t we just follow the Constitution?\u201d\nThere is one radical change Paul likes: the Internet.\n\u201cFortunately we\u2019re able to get some information out, and a lot of what we\u2019ve done in our campaign makes use of the Internet,\u201d Paul said at a rally in Des Moines.\nAs might be expected, however, Paul anticipates a problem or two on that front as well.\n\u201cBut also,\u201d he went on to say, \u201cthere\u2019s an attack on the Internet now.\u201d"}, {"name": "38e709f4-302e-11e1-8149-868dd2c9e12e", "body": "Chris Masters enjoys a well-made suit. But recently he has been looking for a place to buy them other than frenzied department stores where women\u2019s clothes dominate the sales floor.\nThat\u2019s why Masters treks to the appointment-only menswear boutique Alton Lane in Dupont Circle for custom ensembles.\nClients\u2019s club ambiance, complete with flat-screen TV and leather sofas.\n\u201cWomen are not the only ones that put extra care into their appearance,\u201d said Masters, director of marketing for a real estate firm in Alexandria. \u201cIt\u2019s nice to see more stores recognizing that this area is full of sophisticated men that want to look good.\u201d\nAlton Lane, originally a New York City boutique, opened its first branch in Washington recently as part of a resurgence in menswear that has drawn new retailers to the market, while spurring the expansion of existing stores in the past year.\nJack.\nThere are dozens of area department, specialty and discount stores that carry men\u2019s suits and sportwear. But the new shops are fueling a nascent movement in local retail catering to men who are interested in tailored suits and custom jeans.\nGuys across the country are buying slacks, shirts and coats at a pace that exceeds women. Sales of U.S. menswear climbed 6.5\u00a0percent to $53.7\u00a0billion through October, eclipsing the 1.5\u00a0percent gain in women\u2019s wear during the same period, according to market research firm NPD Group.\nMen.\n\u201cIt\u2019s no longer good enough to look like you just rolled out of bed and went to work,\u201d Cohen said. \u201cGuys are dressing better to separate themselves from the competition, which we haven\u2019t seen in decades.\u201d\nResponding to the trend, designer Vera Wang is making a foray into men\u2019s formal wear, while Isaac Mizrahi\u2019s label is set to bring out a collection of dress shirts and neckties, analysts note.\nHakob Stepanyan, a 26-year-old research associate at an investment firm in Arlington County, admits that he spends more on shirts and slacks these days to make an impression at work.\n\u201cI\u2019m more selective about what I wear than I was in college, because you have to dress the part to get ahead,\u201d he said. \u201cValue and durability also mean a lot more.\u201d\nAlton Lane has surpassed 3,000 customers and $3\u00a0million.\n\u201cThe retail industry runs on brand inflation \u2014 the $3,000 Prada suit doesn\u2019t cost close to that to make, but they\u2019re paying for the Fifth Avenue address and ads,\u201d said Colin Hunter, a co-owner of Alton Lane who met his partner, Peyton Jenkins, while attending the University of Virginia 12 years ago. \u201cThere are ways to offer a more honest pricing structure that\u2019s focused on a better shopping experience for guys.\u201d\nThe.\nThis \u201cstyle bar,\u201d as she calls it, has become so popular that Muccio expanded her ground-floor operations upstairs for the Black Room, a members-only studio that debuted on Black Friday. Guests are treated to cocktails as Muccio offers personal styling and consultation starting at $600.\nMuccio says her frequent clients include executives, government officials and local celebrities. She would not reveal names.\n\u201cWashington is a very important market for retailers,\u201d said Robert Hensely, executive vice president of store operations at Jos. A. Bank of Hampstead, near Baltimore. \u201cThe growth of collateral industries associated with the federal government, be it lobbying or communications, works hand in hand with our fashion.\u201d"}, {"name": "ed3bb34a-333b-11e1-825f-dabc29fd7071", "body": "Stephen J. McCormick, 97, a White House radio correspondent in the 1930s, who later was the host of Washington-based news programs for NBC-TV, died Nov. 30 at a rehabilitation facility in Bar Harbor, Maine.\nHe had congestive heart failure, his daughter said.\nMr. McCormick came to Washington in the mid-1930s and worked for a local radio station before joining the Mutual Broadcasting System. He broadcast the \u201cfireside chats\u201d of President Franklin D. Roosevelt, went on to cover three other presidents and became a top executive for the Mutual network.\nBeginning in 1954, Mr. McCormick was the host of two public affairs programs broadcast nationally by NBC-TV, \u201cThe American Forum\u201d and \u201cYouth Wants to Know.\u201d\nWith \u201cAmerican Forum,\u201d he served as moderator between two people arguing opposite points of a public issue. \u201cYouth Wants to Know\u201d was an interview show in which children and teens asked questions of politicians and other public figures in the news.\n\u201cThe moderator must be neutral,\u201d Mr. McCormick told The Washington Post in 1956, describing the role of a news-show moderator. \u201cNo public affairs discussion program can last for very long if word gets around that the moderator favors one point of view. Guests will just refuse to take part in the show.\u201d\nIn March 1956, Sen. John F. Kennedy (D-Mass.) appeared on \u201cYouth Wants to Know\u201d and was asked if he would consider accepting an offer to be a vice presidential candidate.\n\u201cI think it\u2019s a bad idea in politics and every other kind of job to accept or refuse things which have not and probably will not be offered to you,\u201d Kennedy replied.\n\u201cI suppose it\u2019s like saying to a girl, \u2018If I asked you to marry me, and I\u2019m not asking you to marry me, would you marry me?\u2019 I suppose, when the time comes, we can make a better judgment on it.\u201d\nAmid gentle laughter, Mr. McCormick added, \u201cI wouldn\u2019t be surprised, after reading about you for many years, Senator, if we had a lot of girls who were thinking of marrying you.\u201d\nStephen Joseph McCormick was born May 4, 1914, in Taunton, Mass., and attended Boston University before coming to Washington.\nDuring World War II, he served in the Army in the Pacific and received the Bronze Star Medal for service during the Battle of Saipan. He stayed in the Army reserve for many years, reaching the rank of lieutenant colonel.\nMr. McCormick\u2019s television career was at its height in the 1950s. He played himself in the 1959 Doris Day-Jack Lemmon film \u201cIt Happened to Jane.\u201d\nBy 1960, he had returned to radio as a vice president in charge of the Mutual Broadcasting System\u2019s Washington operation. He continued to appear on the air, with news and interview shows, well into the 1970s.\nMr. McCormick was Mutual\u2019s anchor at national political conventions for 20 years and also produced and directed the network\u2019s coverage of the Mercury, Gemini and Apollo manned spaceflights. He sometimes contributed feature stories to the BBC.\nHe lived in Alexandria and Potomac for many years before moving to Swan\u2019s Island, Maine, about five years ago. He was a founding member of the Radio and Television Correspondents Association and was a member of the White House Correspondents Association, National Press Club and Army and Navy Club.\nA daughter, Patricia Delano, died in 2010.\nSurvivors include his wife of 66 years, Theo Henelt McCormick of Swan\u2019s Island; daughter Teddi Harrison of Carlsbad, N.M.; and five grandchildren.\nIn describing his broadcasting style in 1956, Mr. McCormick called himself \u201cthe greatest neutral in Washington.\u201d\n\u201cI have absolutely no opinions when I\u2019m on the air,\u201d he told The Post, \u201cand I have very few opinions when I\u2019m off the air.\u201d"}, {"name": "fe7d6ba0-34bf-11e1-81ef-eaf2bd09c8a2", "body": "PHILADELPHIA \u2013 In a performance befitting their dismal, error- and injury-plagued campaign, the Washington Redskins stumbled their way through a 34-10 loss to the Philadelphia Eagles in their final game of the season Sunday.\nThe Redskins have been plagued by mental gaffes, turnovers, injuries to key players and flat-out poor play all season long.\nSunday\u2019s game was no different.\nRex Grossman kept team and individual turnover streaks intact with his 20th interception of the season. Poor tackling and breakdowns in pass coverage led to big scoring plays for the Eagles (8-8). Ineffective red-zone play and penalties kept the Redskins from scoring.\nAt one point, the Redskins had both running backs Roy Helu and Evan Royster on trainer\u2019s tables, receiving treatment from the medical staff. Linebacker Brian Orakpo missed the second half with a pectoral muscle injury. There was a 21-point fourth-quarter collapse. And of course, the package wouldn\u2019t have been complete without a blocked field goal, so Washington allowed one of those as well.\nThe.\nBut beyond that, highlights were few for the Redskins. The Eagles, in contrast, racked up 390 yards of offense \u2014 190 of them in the fourth quarter \u2014 and had three pass-catchers with at least 86 receiving yards apiece. Washington\u2019s defense gave up at least 30 points for the fourth time in the last five games, and the 24-point loss was the Redskins\u2019 largest margin of defeat this season.\nSo ended the worst year in Mike Shanahan\u2019s 17 full seasons as a head coach.\nThe\u2019s arrival.\nIt also marked a third consecutive losing season for one of the NFL\u2019s most storied franchises, and the eighth time in the last 10 seasons that the Redskins have failed to post a winning record.\nThe Redskins\u2019 standing in the NFC East already had been determined prior to Sunday\u2019s game. For the fourth consecutive year, they finished last in the division.\nBy virtue of their record and following strength-of-schedule determinations, the Redskins learned on Sunday that they will hold the sixth overall pick in April\u2019s draft.\n\u201cExtremely frustrating to lose 11 ballgames, another game to a divisional opponent,\u201d said linebacker London Fletcher. \u201cFelt like we played good football in the first half, and then in the fourth quarter, it got away from us. . . . Not enough good football for 60 minutes.\u201d\nThe\u2019s pass was slightly underthrown, and Moss had to slow up for it, but the ball slipped between Moss\u2019s arms for an incompletion at the goal line.\nAnd then came an unfortunate second quarter, which featured the same misfortunes that have plagued the Redskins all season.\nOn the third play of the quarter, wide receiver Anthony Armstrong had slipped past two defenders 54 yards downfield. But Grossman\u2019s.\nLater.\nPhiladelphia scored on a seven-yard touchdown pass from quarterback Michael Vick to wide receiver Chad Hall, who slipped feeble tackle attempts by DeAngelo Hall and Perry Riley and stepped into the end zone.\nThe Redskins moved to the Philadelphia 35 before turning over the ball on downs with 44 seconds left, but Orakpo sacked Vick and forced a fumble, and Washington recovered at the 17.\nThe.\n\u201cI\u2019ve been a Redskin for seven years. I can\u2019t tell you when things went our way when it comes to stuff like that,\u201d Moss said after the game, still upset. \u201cI just have to learn how to deal with it, put it behind me.\u201d\nTwo plays later, the Redskins reached the 7-yard line, but couldn\u2019t stop the clock and couldn\u2019t get lined up in time to try a field goal. They entered halftime without a point.\nWashington\u2019s.\nDespite their struggles, Washington entered the fourth quarter having allowed only 200 total yards, and less than two minutes in, a Gano field goal cut the lead to 13-10.\nBut.\n\u201cI thought it was competitive until the post route,\u201d Shanahan said. \u201cWe really had a chance for three quarters, but when you\u2019re 0 for 3 in the red zone, you don\u2019t win games. We had moved the ball against them as much as anybody had moved it against them. They were giving up 225 yards a game and we had that at halftime. But we didn\u2019t score points. . . . You can\u2019t go on the road and win games like that.\u201d"}, {"name": "c0556f00-2b21-11e1-bbb4-584e01ef538d", "body": "It was a first for Texas: a state office devoted to consumers struggling to find affordable health insurance coverage. With funds from the federal health reform law, the Texas Consumer Health Assistance Program was launched last January.\nA $2.8\u00a0million \u2014 a quarter of whom lack insurance \u2014 more aware of coverage options.\n\u201cThe grant provided us with the opportunity to .\u2009.\u2009. actually take the 20 or 30 minutes, or however long, to help someone complete an application,\u201d said Audrey Seldin, senior associate commissioner for consumer protection at the Texas Department of Insurance, which oversees the program.\nBut less than a year after it opened, the Texas Consumer Health Assistance Program is preparing to shut down, a victim of Congress\u2019s.\nTexas is among the 35 states that received health reform grants to build consumer assistance programs more than a year ago. The Affordable Care Act of 2010 set aside nearly $30\u00a0million to fund the program in 2010, which states have used to handle questions about how to obtain affordable health coverage or appeal denied insurance claims.\nThe health reform law also authorized future funding for the consumer assistance program, but left it to Congress to appropriate that money \u2014 in contrast to most other provisions in the law, which were automatically funded into the future. When the House and Senate failed to pass a budget last year, operating instead on a short-term fix that continued all existing appropriated programs, the consumer assistance program was shut out.\n\u201cI don\u2019t know that, while health reform was being debated, any of us understood how hard it would be to get additional funding going forward,\u201d said Christine Barber, a senior policy analyst with Community Catalyst, a Boston-based community advocacy group that has worked with many of the new programs.\nBar\u00a0million more Americans by 2019.\n\u201cI have a little bit of a nightmare about what will happen\u201d when the funding runs out, said Victoria Veltri, who oversees Connecticut\u2019s grant and is currently looking to the state or private foundations to continue her program. \u201cI won\u2019t stop searching for funding.\u201d\nConnect.\n\u201cWe haven\u2019t lost one yet,\u201d Mia Poliquin Pross, associate director of the Maine consumer assistance program, said of the claim denials her two attorneys have appealed. \u201cWe would really like to ramp up that portion of the work.\u201d\nThe consumer assistance programs have also served as an informal monitor of health insurance materials and policies, often tipped off by consumers\u2019 questions. Multiple states, including Massachusetts and New York, have reported back to the federal government certain insurers that are out of compliance with a given health reform provision, or are incorrectly advertising their services.\nAs.\nOthers are exploring how they might be able to move forward without federal funding. But the uncertainty of whether or not that will happen is already taking its toll: Massachusetts\u2019s new outreach coordinator left when the state could not guarantee she would have a job next year.\n\u201cWe expected these grants would be funded continually,\u201d said Brian Rosman of Health Care for Massachusetts, which has run the state\u2019s consumer assistance program. \u201cTo walk away now from the investment, that seems really counterproductive, given that we\u2019re now getting closer to 2014. I would think these programs would be needed more than ever.\u201d\nMany running the grants expressed a similar frustration, not only over investing in a program that would be dismantled so quickly but also at increasing consumers\u2019 awareness of the new departments, only to lose the capacity to handle increased call volumes.\nCarla Obiol, a deputy commissioner at the North Carolina Department of Insurance, is managing a $1.2\u00a0million grant that allowed the state to create an ombudsman office devoted to handling health insurance issues that she describes as \u201cconsumer assistance on steroids.\u201d\n\u201cIt\u2019s not just about handling complaints,\u201d Obiol said. \u201cWe\u2019re adding an educational element, so folks understand they have a right to appeal [an insurance claim denial] and take advantage of that option.\u201d\nShe\u2019s frustrated at spending so much time building a department only to face the prospect of shutting down. \u201cWhile we do think this service is so important,\u201d she said, \u201cWhy would we build a great data system and recruit professional folks thinking this is going to fold?\u201d\nObiol and many others are looking to other federal grant opportunities to continue parts of their programs. Funds to build new health insurance marketplaces, which will launch in 2014, do include some money for consumer assistance, although more limited in scope.\nThe Department of Health and Human Services is working with states to explore other sources of funding to keep their programs running.\nSome states have managed to move forward with their programs, even after funding has run out. New York\u2019s.\nNot all states have applied for health exchange grants, and those that have may use the funds solely to set up the new insurance marketplace.\nFor many programs, the future remains less certain.\n\u201cWe\u2019re exploring all options,\u201d said Kimberly Cammarata, an assistant attorney general in the Maryland Consumer Protection Division. \u201cThe reality is we need these people. I\u2019m cautiously optimistic that things will work out.\u201d"}, {"name": "7f2d27e8-3233-11e1-b692-796029298414", "body": "The U.S. Navy has estimated a worst-case cost overrun of as much as $1.1\u00a0billion for the aircraft carrier USS Gerald R. Ford, the service\u2019s most expensive warship.\nThe carrier is being built by Huntington Ingalls Industries under a cost-plus, incentive-fee contract in which the Navy pays for most of the overruns. Even so, the service\u2019s efforts to control expenses may put the company\u2019s $579.2\u00a0million profit at risk, according to the Navy.\nA review of the carrier\u2019s rising costs began in August after the Navy\u2019s program manager indicated that the \u201cmost likely\u201d overrun had risen to $884.7\u00a0million, or about 17\u00a0percent over the contract\u2019s target price of $5.16\u00a0billion. That\u2019s up from a $650\u00a0million overrun estimated in April, according to internal Navy figures made available to Bloomberg News. The worst-case assessment would be about 21\u00a0percent over the target.\n\u201cRegular reviews of the cost performance indicated cost increases were occurring,\u201d Capt. Cate Mueller, a Navy spokeswoman, said in a statement.\nSome rising costs are tied to construction inefficiencies, the Navy said. Sean Stackley, Navy assistant secretary for acquisition, directed the review \u201cto determine specific causes and what recovery actions could be put in place,\u201d Mueller said.\nEven\u00a0billion in reductions through 2021. The service has already offered to delay construction of the second Ford-class vessel, the CVN-79 John F. Kennedy, by two years.\nStackley\u2019s assessment is focusing on \u201cevery aspect of the ship\u2019s construction including the risks\u201d of delays and cost growth to both contractor- and government-furnished equipment, Mueller said. Among the largest government-furnished equipment is the carrier\u2019s nuclear reactor.\nThe review includes officials from Stackley\u2019s office, as well as the Naval Sea Systems Command, the chief of naval operations and the Navy\u2019s supervisor of shipbuilding, Mueller said.\nLate delivery of Huntington-furnished material has been a key factor in late assembly and inefficient construction, the Navy said. Still, the carrier remains on schedule for its planned September 2015 delivery, the service said.\nHuntington Ingalls\u2019s goal is to reduce the program\u2019s costs, chief executive Michael Petters said in an interview.\n\u201cIf there was something else I thought we needed to do, we\u2019d be doing it,\u201d Petters said. \u201cIf there is something else somebody else thinks we ought to be doing, we\u2019ll listen and, if it makes sense, we\u2019ll do it.\u2019\u2019\nMueller said some of Huntington\u2019s cost-control efforts are producing \u201cfavorable results.\u201d For example, the Newport News, Va.-based shipbuilder has established specific labor-cost targets for its key manufacturing and construction jobs. Mueller did not say whether those moves have reduced costs yet.\nThe Navy also has agreed to consider changes to specifications and modify them \u201cwhere appropriate to lower cost and schedule risk,\u201d Mueller said.\nHuntington has designated a senior vice president and ship construction superintendent with daily oversight responsibility.\nThe Navy plans to report a new contract completion cost in its next annual report to Congress. The document would be submitted to lawmakers next year.\nMueller declined to discuss the current overrun estimates. The Navy earlier disclosed that the carrier faced the $650\u00a0million overrun to complete the contract \u2014 562 million of which the Navy would absorb, the remaining $88 million absorbed by Huntington.\nThe completed initial vessel, the first of three in the $40.2\u00a0billion program, is projected to cost at least $11.5 billion.\nThe $11.5 billion comprises $2.9 billion in detailed design and $8.6 billion for construction and government-furnished equipment, such as the nuclear reactor. An additional $3.7\u00a0billion is for research that applies to all three vessels in the class, the Navy said.\nThe Congressional Budget Office wrote in a June report that cost growth typically occurs when a ship is more than half finished. The Ford design contract is about 42\u00a0percent complete.\nThe Navy\u2019s projected cost has risen 10\u00a0percent between the fiscal 2008 and 2012 budgets and \u201cfurther increases appear likely,\u201d CBO analyst Eric Labs wrote.\nThe office estimates that the final price tag will be about $12.9\u00a0billion if the increases in the aircraft carrier\u2019s cost follow historical patterns.\nAny discussion of cost growth should reflect the Gerald Ford\u2019s status as a first-of-a-kind ship under development, Petters said.\n\u201cA lead ship comes with a whole lot of churn \u2014 things that don\u2019t go the way it should,\u201d he said. \u201cIt\u2019s like building a prototype.\u201d\n \n mustreads.\n\n"}, {"name": "415dda64-34b0-11e1-81ef-eaf2bd09c8a2", "body": "New year, old habits: Sports Nation often gets it shorts all bunched up about everything and anything. At the moment, you can turn on talk radio \u2013 or dip a big toe in an online forum \u2014 and hear the clamor about next Monday\u2019s Alabama-LSU BCS title game. Oh, the horror \u2014 the horror!!! \u2014 this rematch stirs up.\nThis unrelenting devotion to all matters sporting strikes me as a springboard to insanity.\nThink about this:\nWe have been at war somewhere in the world since 2001 \u2014 at war \u2014 and that gets less scrutiny than an average NFL game. For real. Buccaneers-Falcons is dissected in detail much more than U.S.-Afghanistan; that\u2019s an NFC divisional game weighed against an international armed conflict.\n(I often am told that I\u2019m just an old man out of touch. Guess what? I once was a young man out of touch. So, trust me, age has nothing to do with this. What\u2019s right is right and what\u2019s wrong is wrong, and America\u2019s continued obsession with sport at the expense of substance remains the Achilles\u2019 heel of our culture.)\nWhat concerns me about our ongoing fight against terrorism is this:\nThe.\nSo, yes, I worry.\nWe spend more money on stadiums than schools.\nAt our institutions of higher learning, we care more about basketball than biology.\n\u201cCrossfire\u201d has been replaced by \u201cPardon the Interruption\u201d; actually, that\u2019s probably a good thing.\nSometimes I stumble upon Skip Bayless and Stephen A. Smith on ESPN2\u2019s \u201cFirst Take\u201d and wonder, \u201cIs this a \u2018Saturday Night Live\u2019 sketch?\u201d I half-expect one of their heads will explode one morning while shouting, and if that happens, I fully expect the other guy will keep on shouting.\nThey never stop screaming, because they believe it\u2019s entertaining or because they\u2019re really serious; it\u2019s either disingenuous or distressing. Heck, these fellows have convictions about EVERYTHING; I mean, how much conviction can you have about an offensive coordinator\u2019s third-down play selection?\n(How out of whack are our priorities and sensibilities? Just look at the \u201cCall of Duty\u201d video-game series. In November 2009, \u201cCall of Duty: Modern Warfare 2\u201d set a first-day sales record with 4.7 million copies to reap $310 million. In November 2010, \u201cCall of Duty: Black Ops\u201d topped that with 5.6 million and $360 million in sales in its first 24 hours. Then, in November 2011, \u201cCall of Duty: Modern Warfare 3\u201d hit 6.4 million and $400 million on opening day. It\u2019s a battlefield out there, and while we ignore real war, we love to shoot \u2019em up on our PlayStations.)\nI used to think I loved sports as much as the next guy \u2014 well, unless the next guy walks in wearing a Yankees baseball cap, Lawrence Taylor football jersey and New York Rangers wristwatch \u2014 but I now realize I only liked sports in spurts. Which, frankly, might be healthier.\nSure, as a kid, nothing beats the anticipation of going to the ballpark or watching a big game on TV. But as an adult? Sports is still a great release; beyond that, there\u2019s got to be more to a fine day than getting World Series home-field advantage by winning the All-Star Game. There has to be a greater sense of accomplishment than seeing your alma mater\u2019s biggest rival go on probation, no?\nI\u2019m not a religious man, but something tells me that just walking by a church on any given Sunday is a better idea than slouching on a couch on any given Sunday.\nI\u2019m not just talking here about a New Year\u2019s resolution, I\u2019m talking about a New Year\u2019s revolution. Let\u2019s put the games on pause and pick up our lives.\nIf nothing else, we need to downsize Big Monday.\nBy the way, how can Alabama be playing for the national championship? The Crimson Tide already lost to LSU and didn\u2019t even win its own conference. Who\u2019s minding the BCS store, Howdy Doody?\nQ. Will LSU be national champion even if it loses to Alabama in the BCS title game? (Philip Murphy; Boardman, Ohio)\nA. Actually, I believe the combination of an LSU loss and a Notre Dame loss elevates the Fighting Irish to No. 1.\nQ. Has a newspaper ever resorted to \u201cflex scheduling\u201d to replace one of your less interesting columns? (Mark Concannon; Whitefish Bay, Wis.)\nA. Under your proposal, newspapers would run my column no more than once a month.\nQ. The Golden State Warriors hired a TV announcer as their new coach. Any chance you\u2019ll leave the broadcast booth to be a poker coach? (Mark Cohen; Gibsonia, Pa.)\nA. If I\u2019m qualified to be a poker coach, then the game truly involves no skills.\nQ. Do you stash your mouth guard between your face mask and helmet between marriages? (Mike Jonas; Berwyn, Ill.)\nA. Pay the man, Shirley."}, {"name": "052c18ba-34ad-11e1-88f9-9084fc48c348", "body": "TEHRAN \u2014 \n vs. No. 24 Penn State.\nWhere: Cotton Bowl, Dallas.\nTV: ESPNU.\nRecords: Cougars 12-1; Nittany Lions 9-3.\nYes, it\u2019s a Jan. 2 bowl game played at the Cotton Bowl that isn\u2019t called the Cotton Bowl. The Cotton Bowl, the game, is Friday at the JerryDome. Bowl season: where common sense goes to die. In any case, it\u2019s your last chance to see Case Keenum \u2014 owner of many NCAA passing records and averaging nearly 400 passing yards this season \u2014 in a Houston uniform, though his previous bowl forays have been a bit disastrous: In three bowl games, Keenum has three touchdown passes and seven interceptions, six of them coming in the 2009 Armed Forces Bowl against Air Force. Penn State has the nation\u2019s fifth-ranked passing defense (162.2 yards allowed per game) and has allowed only nine passing touchdowns this season, fourth in the nation.\nWho: Ohio State vs. Florida.\nWhere: EverBank Field, Jacksonville, Fla.\nTV: ESPN2.\nRecords: Buckeyes 6-6; Gators 6-6.\nThe Buckeyes, soon to be coached by Urban Meyer, take on the Gators, formerly coached by Urban Meyer. It\u2019s been reported that Meyer might not even watch the game because of his conflicted interest in both teams, but does anyone really believe that? Both tradition-rich teams stumbled badly this season, with scandal-plagued Ohio State suffering its first losing season in Big Ten play since 1999 and Florida losing six of its last eight games. The Gators ranked 102nd nationally in total offense and the Buckeyes ranked 107th. Expect malaise.\nWho: No. 12 Michigan State vs. No. 18 Georgia.\nWhere: Raymond James Stadium, Tampa.\nTV: WJLA-7, WMAR-2.\nRadio: WSPZ (570 AM).\nRecords: Spartans 10-3; Bulldogs 10-3.\nMichigan State Coach Mark Dantonio has won four straight against rival Michigan, but is 0-4 in bowl games as the Spartans head coach. Here\u2019s to guessing that his job is safe, because wins over the Wolverines are likely more important than wins in bowl games named after mid-range steak restaurants. Georgia Coach Mark Richt\u2019s job also is likely safe, which you probably couldn\u2019t say after the Bulldogs lost to Boise State and South Carolina to start the season. Georgia rebounded, however, winning 10 straight before losing to No. 1 LSU in the SEC title game. The Bulldogs finished third nationally in total defense (268.5 yards per game allowed); the Spartans were fifth (272.7).\nWho: No. 10 South Carolina vs. No. 21 Nebraska.\nWhere: Florida Citrus Bowl Stadium, Orlando.\nTV: ESPN.\nRadio: WWXX (92.7 FM), WWXT (94.3 FM), WTEM (980 AM).\nRecords: Gamecocks 10-2; Cornhuskers 9-3.\nCoach Steve Spurrier has the Gamecocks on the verge of the first 11-win season in program history, but he\u2019s 1-4 in bowl games at South Carolina, with his only win coming in the 2006 Liberty Bowl. The Cornhuskers\u2019 rushing game ranks 13th nationally, and quarterback Taylor Martinez has nine rushing touchdowns, but none since a 34-27 win over Ohio State on Oct. 8. He\u2019ll be chased around the field by South Carolina defensive end Melvin Ingram, a first-team all-American who has a team-high 8 1/2 sacks, picked off two passes and also scored on a fake punt earlier this season.\nWho: No. 6 Oregon vs. No. 9 Wisconsin.\nWhere: Rose Bowl, Pasadena, Calif.\nTV: ESPN.\nRadio: WWXX (92.7 FM), WWXT (94.3 FM), WTEM (980 AM).\nRecords: Ducks 11-2; Badgers 11-2.\nNeither the Ducks nor the Badgers have had much success of late in Pasadena. Oregon lost there after the 2009 season to Ohio State; the Ducks\u2019 last postseason win at the Rose Bowl came all the way back in 1916, when Ivy League teams were still being invited to prestigous bowl games. (Oregon defeated Penn that year, 14-0.) Wisconsin, meanwhile, lost in last season\u2019s Rose Bowl game. There will be points: Only 12 teams have scored 80 touchdowns in a season since 1996, and Oregon and Wisconsin are two of them. They rank No. 3 (Oregon, 46.2 points per game) and No. 4 (Wisconsin, 44.6) nationally in scoring offense. Badgers running back Montee Ball had a national-best 1,759 rushing yards and 38 total touchdowns; he\u2019s four short of tying Barry Sanders\u2019s single-season record of 42.\nWho: No. 3 Oklahoma State vs. No. 4 Stanford.\nWhere: University of Phoenix Stadium, Glendale, Ariz.\nTV: ESPN.\nRadio: WWXX (92.7 FM), WWXT (94.3 FM), WTEM (980 AM).\nRecords: Cowboys 11-1; Cardinal 11-1.\n After Monday night, the next time Stanford quarterback Andrew Luck and Oklahoma State wideout Justin Blackmon will meet likely will be in the green room at the NFL draft. Luck, who ranked fifth nationally in passing efficiency and threw 35 touchdown passes this season, is almost certain to go No. 1. Blackmon, second nationally in receptions per game (9.4), eighth in receiving yards (111.3 per game) and tied for third in receiving touchdowns (15), is projected by many draft gurus as a top 5 prospect. Again, there will be points: Oklahoma State scored at least 30 points in every game this season, ranking second to Houston in scoring offense. Stanford was sixth in that category. Neither team defends the pass very well, with the Cardinal at 78th nationally and the Cowboys 102nd.\n\u2014 Matt Bonesteel"}, {"name": "f6f5dae2-1c47-11e1-a1c9-d8aff05dec82", "body": "KHANDWA, India \u2014 Two months after he lost his wife to Alzheimer\u2019s disease, 80-year-old Sharad Geete made a shocking discovery. The free drugs his wife, Sheela, had been receiving for two years before she died were part of a clinical trial.\n\u201cThe doctor told us that the medicines will be given free and that they were going to be launched soon by a foreign company. Not once did he say it was an experiment or a trial. If I knew, would I have taken the risk?\u201d asked Geete, sitting in his home in Khandwa, a small town in the central Indian state of Madhya Pradesh.\nSince.\nA Madhya Pradesh state government probe found that six doctors had violated ethical standards in gaining patients\u2019 consent for participation in drug trials and did not compensate those who suffered adverse side effects in 76 drug trials on 3,300 patients since 2006, according to results released last June.\nIn the wake of the recent controversies, the Indian Council for Medical Research invited public feedback on\">draft guidelines about compensation for injuries that occur during clinical research.\nThe consent form that Geete signed said the medicines were part of a study. \u201cI was so stressed about my wife\u2019s health, I said okay, okay to everything and signed on the form. We never questioned the doctor, we trusted him blindly,\u201d Geete said about his wife, who was a singer. \u201cShe became bedridden and stopped speaking or hearing us. She became a vegetable.\u201d\nAcross India, 1,700 people who participated in clinical drug trials died between 2007 and 2010, the government\u2019s drug regulatory agency said, although no autopsies were carried out to determine the causes of the deaths. In 2010, 22 families of the dead were compensated by U.S. and European drug companies, ranging from $2,000 to $20,000.\nClinical drug trials in 2010 generated business worth $300\u00a0million.\n\u201cIndia is emerging as a hub for drug trials, and Indian patients are like guinea pigs,\u201d said C.M. Gulhati, editor of the Monthly Index of Medical Specialities journal.\n\u201cThe ethical review panels are bogus,\u201d he said in an interview. \u201cThe drug control authority approves almost all the trial applications without rigorous scrutiny. And poor, unsuspecting patients get duped, while doctors and hospitals earn money.\u201d\nIn the central Indian city of Indore that Geete and his wife visited for treatment of Alzheimer\u2019s,\u2019s disease, seizures, eye infection, and heart and gastric illnesses.\n\u201cA handful of doctors had turned it into a business on the side. And most patients had no idea what was going on,\u201d said Anand Rai, a doctor at the government-run M.Y. Hospital and a whistleblower. \u201cMany of the trials were conducted on children, mentally ill patients and illiterate people.\u201d\nRai said he retrieved forms that showed thumb impressions and were countersigned not by independent witnesses but by doctors. The Hindi form was one page long, \u201cwith difficult words,\u201d Raid said, and the English forms he retrieved were about 30 pages long.\nLast month, Rai said he received an e-mail from the U.S. Food and Drug Administration office at the U.S. Embassy in New Delhi seeking \u201cspecific information on the clincial trials of concern\u201d that were conducted in Madhya Pradesh.\nA Merck spokesman said in an e-mail that the company was aware of the allegations but its subsidiary MSD in India had provided information about their trials to the Indian drug regulatory agency, and \u201cwas not found liable for any compensation\u201d and no deaths were reported in their trials, which have been continuing for five years.\nA spokesman for Pfizer said that the company canceled its trial in Indore because proper processes were not followed, and that it has produced an audio book in Indian languages that is shared with staff and patients, to educate participants about their rights and responsibilities.\n\u201cPeople will think twice and thrice before coming to a hospital in Indore now because of this scandal,\u201d said Sharad Pandit, chief medical health officer in Indore.\nBut one doctor named in the probe said that all the trials have been ethical and legal, and that the protocols were the same as those followed in South Korea, Malaysia and Thailand.\n\u201cThe consent process is very detailed, meticulous and standardized. Even less-educated and illiterate patients understand the nuances of blinding, control and randomization,\u201d said Apoorva Puranik, a neurologist who said he conducted trials on 40 patients on behalf of MSD, Pfizer and Eisai, a Japanese drug company.\nThe FDA has already approved the new dosage of Eisai\u2019s Donepezil tablets for patients suffering from Alzheimer\u2019s disease, partly based on the Indore trials, he said. An FDA spokesman declined to share any information on the drug.\nQuestions.\nPATH International had said the goal of the study was not to assess the efficacy or safety of the vaccine but generate evidence to introduce it into India\u2019s immunization program. But an investigative report by Sama, a New Delhi-based women\u2019s health advocacy group, said many young girls suffered from acute stomach aches, headaches and dizziness. The government subsequently stopped the study.\nLast month in Indore, a government probe recommended that doctors videotape the process of securing consent, and put up large signs on the hospital walls that inform patients about ongoing drug trials.\nMeanwhile, health activists across India are collecting signed testimonials from hundreds of drug-trial participants and their families. \u201cWe will soon launch legal claims\u201d against drug companies, said Amulya Nidhi, a health activist with the Health Rights Forum in Indore.\nMore world news coverage:\nRussia arrests New Year\u2019s protesters\nMaliki marks end of U.S.-Iraq pact\nIn Egypt, an act of courage that launched a revolution\nRead more headlines from around the world"}, {"name": "5057141e-3261-11e1-825f-dabc29fd7071", "body": "She hangs there nightly, a yellow or white or spookily orange disk, the bringer of tides, the caster of romantic shadows. She waxes and wanes and sometimes she turns ruddy as the shadow of the Earth crosses her face. For all her beauty, though, our moon hides a lumpy, unflattering secret: She\u2019s lopsided. Her backside is much thicker than her front. And no one knows why.\nIt\u2019s unseemly, really. After more than 100 robotic and human missions to the moon, scientists still can\u2019t account for why one half \u2014 the half we can\u2019t see \u2014 is taller than the other.\nTwin NASA probes that arrived at our satellite this weekend may finally reveal a shocking truth: that early on, a smaller twin moon smushed into her. As this intruder splatted into its big sister, it shattered \u201clike a mega-avalanche,\u201d said Erik Asphaug, the planetary scientist at the University of California at Santa Cruz who published the twin-moon idea in the journal Nature in August. His co-author was Martin Jutzi of the University of Bern in Switzerland.\nThis collision would have spread a wide hump of rock onto the back of the moon. There, the material cooled and hardened into a thick crust: the far-side lunar highlands.\n\u201cThis is one of those ideas that all sorts of people will try to prove wrong,\u201d said Maria Zuber, the MIT scientist heading up the new NASA moon mission. \u201cBut it\u2019s extremely testable.\u201d\nAnd so GRAIL will test it. Designed to probe the moon\u2019s interior, the two washing-machine-size spacecraft will reveal the thickness of the moon\u2019s crust, its topmost layer.\nIf the two-moon theory is correct, the backside crust will be much thicker than that of the front side. The hump should taper toward the equator.\nGRAIL could also spot another hidden feature predicted by the theory. If a second moon did crash into the first, the collision would have occurred when the big moon was young and hot. A thin layer of molten heavy elements including uranium and potassium still burbled just under the crust.\nThe backside impact would have squeezed this liquid, pushing it around to the front side. There it would have cooled and hardened, leaving a telltale layer.\nThe existence of both features \u2014 a thick backside crust and a thin, dense layer under the front\u2019s crust \u2014 would offer strong support for the twin-moon theory, Asphaug said.\nWhen Zuber first heard the notion, she scoffed. \u201cThis is going to be nonsense,\u201d she recalled thinking. But computer simulations run by Asphaug and Jutzi were compelling leading Zuber to reverse course. \u201cIt\u2019s a plausible scenario,\u201d she said.\nThe idea is also simple, another stroke in its favor. By contrast, other explanations for the moon\u2019s front-back discrepancy tend toward the complicated and unsatisfying.\n\u201cThere are all these theories out there,\u201d Asphaug said, \u201cthat have big warts on them.\u201d\nSuch as: Maybe the front side of the moon was terribly unlucky, flattened by seven or eight big space rocks. The problem: Asteroids and comets arrive from all directions; there\u2019s no reason impacts should cluster. \u201cIt\u2019s like flipping a coin and getting heads eight times,\u201d Asphaug said.\nAnother theory suggests that the backside hump is a tidal bulge. Planets and moons sport such bulges when they get tugged at \u2014 and the Earth tugs on the moon a lot. The problem: Tidal bulges tend to be symmetrical, so there should be a bulge on both sides of the moon.\nAsphaug\u2019s theory requires a very specific sequence of events some 4.5 billion years ago, when the infant Earth was a molten ball.\nLong before life appeared, rocky debris ricocheted around the early solar system. Something the size of Mars plowed into the Earth, sending huge globs of molten material hurtling into space. The largest glob coalesced into the moon. This catastrophic-impact theory of moon formation is widely accepted by scientists.\nTo that, Asphaug and Jutzi threw in a twist: What if a second, smaller glob of Earth-stuff also got blasted free? If it launched at a particular angle, the glob would have coalesced into a second body and drifted behind the moon in roughly the same orbit.\nAfter a few million years, the pull of the sun would have drawn the smaller moon closer to the bigger moon. Eventually, the two bodies collided \u2014 in slow motion. A fast collision would have excavated a giant crater. But a slow collision \u2014 just the type predicted by the computer simulations \u2014 would have pancaked the small moon onto the surface, leaving evidence for GRAIL to spot.\nIt\u2019s a quirk of happenstance that GRAIL will be able to test the theory at all. Zuber proposed the $400 million mission five years ago, long before Asphaug and Jutzi published their idea. Zuber wanted to probe other, more general questions: Does the moon have a solid core? How long did the moon take to cool after it formed? And did the moon once have a magnetic field?\n\u201cYou might think we already know all there is to know about the moon,\u201d said Zuber. \u201dOf course, that\u2019s not the case.\u201d\nThe twin GRAIL probes arrived in a high lunar orbit this weekend, but they won\u2019t begin collecting data until March.\nBy then, thrusters will have dropped the pair to just 35 miles above the surface. Flying in formation \u2014 one ahead of the other \u2014 the probes will map minute fluctuations of the moon\u2019s gravity over its entire surface. This new gravity map will be 100 to 1,000 times as accurate as current maps. From it, scientists will infer the internal structure of the moon \u201cfrom crust to core,\u201d Zuber said.\nAsphaug said there\u2019s an even better way to test the long-shot idea, though it\u2019s one that GRAIL can\u2019t carry out: Study rocks from the far side of the moon. The Apollo astronauts collected hundreds of pounds of moon rocks \u2014 but all of them came from the Earth-facing side."}, {"name": "343aec92-34be-11e1-88f9-9084fc48c348", "body": "CARACAS, Venezuela \u2014 An arbitration panel has awarded U.S. oil giant Exxon Mobil $908\u2009million in compensation for Venezuela\u2019s 2007 nationalization of its assets, less than 10\u2009percent of what the company sought in a long legal battle with the OPEC nation.\nVenezuelan President Hugo Chavez will probably celebrate the ruling as a vindication of his nationalist confrontation with oil companies, which is aimed at increasing revenue from the industry to boost funding for state-led anti-poverty programs.\nBut Venezuela faces another arbitration with Exxon over the nationalization of the Cerro Negro heavy oil project, as well as more than a dozen pending claims from companies such as ConocoPhillips resulting from a wave of state takeovers.\n\u201cThey must be elated that they got off so cheap. It\u2019s certainly a happy new year for Venezuela,\u201d said Russ Dallen, head bond trader at investment bank Caracas Capital Markets.\n\u201cBut what gives Exxon hope is that it\u2019s only the first of two arbitration proceedings.\u201d\nAn Exxon spokesman said in an e-mail Sunday that the International Chamber of Commerce (ICC) had ruled that Venezuela\u2019s state oil company, PDVSA, \u201cdoes have a contractual liability to Exxon Mobil. The ICC award is for $907,588,000.\u201d\nExxon had sought as much as $10 billion in compensation for its heavy crude upgrading project in the South American country\u2019s vast Orinoco belt, which was nationalized by Chavez along with three others. The award is less than the $1 billion that Venezuela offered in compensation in September.\nIn addition to the ICC claim, Exxon filed for arbitration with the World Bank\u2019s International Center for Settlement of Investment Disputes over the same issue. The Exxon spokesman said that case was scheduled to be argued next month, and that the date for any verdict was not yet known.\nPrices for Venezuela\u2019s widely traded bonds are likely to react positively to the news given some expectations that the award could have been higher, Dallen said. Venezuela\u2019s sovereign debt and PDVSA\u2019s bonds may get a lift Monday.\nA limited payout in the claim will help the socialist Chavez continue to boost state spending on public assistance and housing for the poor in the run-up to his October reelection bid, which is seen as the toughest of his 13 years in power.\nThe dispute between Exxon and Chavez became symbolic of the conflict between countries seeking more revenue from the booming oil industry and companies insisting on respect for investments and compensation for state takeovers.\nThe ICC decision appears to award Exxon a sum close to the $750 million it said it invested in the project \u2014 the amount Venezuela says Exxon deserves after the takeover.\nBut.\n\u201cExxon took a risk when they went in. I\u2019m sure they were expecting more than just making their money back,\u201d Dallen said, adding that it will be hard to reach a definitive conclusion about what the decision means until more details are released.\nThe Exxon spokesman told \u00adReuters that the company was still reviewing the more-than-400-page ruling.\nIn 2007, Venezuela bought back $630\u2009million in bonds issued to finance the Cerro Negro project, which Dallen said may have figured into the calculation of the award.\nLocal analyst Asdrubal Oliveros of Ecoanalitica estimated the value of Exxon assets in Venezuela at $4.5\u2009billion.\nConoco Phillips was an investor in two of the four Orinoco upgrader projects. Exxon and Conoco, which had in total asked for as much as $40\u2009billion in compensation, both left the country after the nationalizations.\nVenezuelan Energy Minister Rafael Ramirez has said the country does not expect to pay more than $2.5\u2009billion for the combined total of the claims by the two companies. PDVSA said in a debt prospectus that it had set aside $1.5\u2009billion in provision for litigation as of the first semester of 2011.\nVenezuela\u2019s outstanding arbitration claims include disputes with Swiss cement maker Holcim and Canadian miner Gold Reserve, which could force it to make large payouts.\nChavez\u2019s steady push to boost control over the country\u2019s oil industry started in 2004 and was followed by similar efforts in oil-producing countries ranging from Ecuador to Kazakhstan.\nCritics say his nationalization drive has slowed foreign investment that could help lift Venezuela\u2019s crude production, which has been stagnant for years, and has left fewer companies interested in its oil fields.\nRelations between Exxon and Venezuela were particularly acrimonious. In 2008, Exxon won an injunction against PDVSA to freeze up to $12\u2009billion of its assets, a ruling that was quickly overturned but triggered furious criticism from Chavez.\nOil companies have remained eager to invest in the Orinoco belt, which is considered one of the world\u2019s largest crude reserves, with Chevron and Spain\u2019s Repsol signing investment deals in 2010 for new multibillion-dollar projects there.\n \n Hogge are still at work. They reach over the side of their boat and haul up a deformed peeler crab trap heavy with mud, grass and too many sea grapes to count. Inside, flat on its back, white belly gleaming in the sun, is a tiny dead blue crab.\nThe trap once was sturdy chicken wire coated by vinyl, but now it is a dilapidated animal trap, jailing creatures until they perish. New pots come with a buoy that floats to the surface and marks a trap\u2019s place in the water. But boats often snag the ropes, and storms may roll the trap, wrapping the tether around it and pulling the buoy under during the March-to-November open crab fishery.\n\u201cSome of them you can\u2019t get,\u201d Edward Hogge said. \u201cThey\u2019re so old, they\u2019ve been in the water so long, they fall apart.\u201d\nEarlier in the day, the Hogges pulled up traps with three dead or dying eels, a weakened oyster toadfish and a dead croaker.\n\u201cLast year, we caught a lot of them,\u201d Cheryl Hogge said of ghost pots. \u201cI think we caught, like, 348 or something, right up at the top of the most caught.\u201d\nVirginia is trying to create a more animal-friendly pot. It would have a portal made of a plant-based polymer that dissolves if left in water for a year or more, allowing animals to escape forgotten pots.\nThe loss of the Chesapeake Bay\u2019s most recognized seafood is detrimental to more than just the crab. Restaurants, retailers and customers pay more for crabs, and watermen, who rely on the creatures for income, suffer too.\nIn 2007, the federal government allocated $15\u00a0million to Maryland and Virginia \u201cto assist those economically hurt by the commercial fishery failure, and to support the restoration of the fishery.\u201d In other words, taxpayers would help watermen put food on the table and scientists to resurrect the crab.\nVirginia used its money to develop a Blue Crab Fishery Resource Disaster Relief Plan.\nWhen then-Gov. Tim Kaine (D) insisted that watermen work for the assistance, the Virginia Department of Natural Resources and the Virginia Institute of Marine Science came up with the ghost pot removal program.\nEdward Hogge said recruiting watermen for the work was a good idea. \u201cThose guys at VIMS are very smart, but they don\u2019t know the water like we do.\u201d\nHogge was chosen for the job after state officials entered his winter dredging license in a lottery. He was issued a new, $2,500 side-scan imaging sonar for his 51-year-old boat and paid $300 per day and fuel costs for up to 50 days. He and his wife spend six hours on the water, usually starting at 7 a.m., when temperatures often are below 30 degrees on the water.\nLike most watermen, Hogge would rather be crabbing, and he wants the state to open the winter fishery.\n\u201cIt took our work, and there\u2019s nothing for us to do,\u201d he said. \u201cNow they want to take this program away. I have no education. I quit school in the fifth grade. I was married by the time I was 17. I\u2019ve got to do something.\u201d\nAs he steered the boat back, Hogge had an admission about the winter dredge harvest, which involves raking up crabs that have buried themselves in the bay bottom to shelter from the cold. \u201cThat dredge is heavy when it comes down. When I drag it, I catch about three bushels of crabs. But I also kill three bushels. If it doesn\u2019t get all the crab, it gets part of it.\u201d\nEarlier, as he loaded a ghost pot onto his boat, Hogge had another admission. Most watermen are honest workers, he said, but \u201cthis was thrown overboard deliberately. A lot of them don\u2019t care. That\u2019s just the way some people are.\u201d"}, {"name": "d6a1161e-3234-11e1-8c61-c365ccf404c5", "body": "Two Dec. 27 front-page articles illustrated the devastating impact that drug use has on society, though one would not know it just reading the headlines.\n\u201cA grim tally, driven by drugs\u201d told of the continuing spread of cartel violence southward. \u201cU.S. cites gains in housing veterans\u201d trumpeted recent success by the Department of Veterans Affairs in decreasing the number of homeless veterans by eliminating the requirement for successful substance abuse and mental health treatment as a condition for awarding a housing voucher. The second article espoused the virtues of fewer homeless veterans without addressing how the treatment of these veterans will be handled. I agree that ending homelessness is a top priority, but so, too, is treatment. We should not be out to improve homelessness statistics at the expense of drug treatment for homeless veterans.\nDrug supply and demand are two dimensions of the same problem. Only when our demand for drugs decreases will the violence south of the border decline as well.\n Jodi Peters, Arlington\nThe writer was a senior adviser at the Office of National Drug Control Policy from 2007 to 2009."}, {"name": "67e9663c-212b-11e1-a624-a985dfc4f35d", "body": "Executives at Merkle, a Columbia-based marketing services company, blow off steam racing dune buggies across the Baja California peninsula, climbing Mount Rainier, bouncing along Colorado River white water and running with the bulls in Pamplona, Spain.\nI have written about sexier companies than Merkle, which \u2014 to put it simply \u2014 collects and analyzes massive amounts of data, then advises clients \u2014 from Clorox to Disney \u2014 on how to find new customers and keep them happy.\nThere are no set hours for Merkle\u2019s 1,500\u00a0employees, including the 419 who work locally. You do the job, keep the clients satisfied, and push the envelope on what you can do for them. Drive by the five-story suburban headquarters any weekend or weeknight, and you\u2019ll find a dozen cars in the parking lot.\n\u201cWe are a work-hard, play-hard kind of company,\u201d said David Williams, the 48-year-old chairman and chief executive. \u201cMerkle is not for everybody.\u201d\nDon\u2019t talk to Merkle about \u201cwork-life balance.\u201d\n\u201cIf some person is going to miss a kid\u2019s recital tonight because they are taking care of a client, [that] is a practical reality at Merkle,\u201d said the hard-charging entrepreneur. \u201cWe are willing to do what it takes to take care of business. A lot of people aren\u2019t willing to work that hard.\u201d\nOne of the company\u2019s mottos is \u201cbusiness is personal.\u201d\nIt isn\u2019t easy to get hired. The screening process includes making a presentation before three people, who then vote on whether they want you.\nThe rewards are high. The average Merkle salary is about $90,000, and all employees get health-care coverage. Every quarter, the company awards a handful of \u201cdream grants,\u201d from $1,000-to-$5,000, that allow a person or small team to do whatever they want, whether it\u2019s go to Boston for a Red Sox game or climb down a cave in Belize.\n\u201cWe really want hard chargers,\u201d said Williams.\nThe company grossed around $300\u00a0million in 2011, and earns a profit of about $50\u00a0million based on a profit percentage in the mid-teens. It also has little debt.\nA recent investment of $75\u00a0million by Technology Crossover Ventures, a Silicon Valley-based venture capital firm, pegged Merkle\u2019s worth at $400 million. That means Williams, who owns just shy of half of the company, is a happy man.\nThis is a focused bunch. And like most corporate cultures, Merkle\u2019s starts at the top \u2014 with a boss whose hobby is driving race cars.\nWilliams grew up in Philadelphia and studied marketing and finance at Shippensburg University in south-central Pennsylvania, where he graduated in 1985.\nLike most entrepreneurs, Williams pined to own his own company. He planned on growing a landscaping business that he had begun in college, but one of his customers said he \u201cwas on a path to nowhere\u201d and suggested he become a stockbroker.\nWilliams \u2014 born with a talent for numbers \u2014 took the stockbroker exam in 1985. He was hired by Butcher & Singer, a storied Philadelphia investment house, where he thrived.\nHis \u201caha moment\u201d hit when he noticed that his wealthiest clients were entrepreneurs who had sold their businesses at some point in their lives.\n\u201cThe only way to build equity is to actually own a business,\u201d said Williams, who was earning about $60,000\u00a0a year at the time and trying to build a stake by investing in rental properties.\nOne of his customers at the time, a retired Air Force colonel named Harvey Blanton, started talking about selling a profitable Lanham-based marketing company he owned called Merkle Computer Systems. The company earned $800,000 in profits on $2.5 million in revenue. It had 23 employees.\nAfter failing to get Butcher & Singer interested in Merkle, Williams decided to buy the company himself in 1988. He borrowed $5 million of the $5.3 million purchase price, selling a couple of his rental properties to raise the $300,000 down payment. He asked his clients if any were interested in investing in the company, and one became a partner \u2014 and a business coach.\nWilliams was turned down by about a dozen banks before one agreed to lend him $2.5 million. He borrowed the rest from Blanton.\nHe had a quick awakening when Merkle lost one of its biggest clients in his first year and Blanton took ill, removing a key advisor. But Williams pushed through.\n\u201cI wasn\u2019t worried about failure because I had so much exposure to it [growing up],\u201d said Williams, who says a lifelong battle with dyslexia, a reading disorder, hardened him against embarrassment.\nMerkle had started as a data processing company that kept track of union and association members and where they lived. Using that as a core, Merkle rode the direct-mail and direct-marketing boom of the \u201990s.\nCatalogues became mainstream. Credit card solicitation grew. The Internet opened up new ways to reach customers. Big companies hired Merkle, especially the telecom giants of the day \u2014 MCI, AT&T and Bell Atlantic \u2014 all of whom were competing furiously for landline and cellphone customers.\nAs computer horsepower grew, Merkle married the technical aspects of large data compilation with analysis that predicts consumer behavior. To parse the information even more, it hired statistics experts.\nThe company says its secret sauce lies in its analytics. For example, when Dell computer wanted to send catalogues to 120 million potential customers, Merkle helped them narrow the focus to those most likely to buy a laptop computer. Merkle sent out thousands of catalogues, digesting the responses to come up with a profile of a likely Dell customer. Then they used that profile to project likely customers across the United States.\nMerkle prefers to work with Fortune 1000 companies and major nonprofit organizations, such as the American Cancer Society. It focuses on growth industries and large \u201cbest in breed\u201d corporations such as Dell, Geico, DirecTV, Wendy\u2019s, OnStar, Urban Outfitters, T.G.I. Friday\u2019s, Disney and Microsoft.\nIn addition to its Columbia headquarters, it has offices in Boston, Chicago, Denver, Little Rock, Minneapolis, New York, Philadelphia, Seattle and Hagerstown.\nAnd Williams has his sights set on raising revenue to $1\u00a0billion a year.\nThe company has had many offers from suitors in the last half dozen years, and Williams said receiving venture capital investment means the company will have to reach some sort of decision point in five to seven years. But no one knows the end game.\nIn the meantime, the racing-car enthusiast has no intention of putting on the brakes.\n\u201cI intend to work very hard my entire career,\u201d he said. \u201cI want to be around a really smart, hardworking group of people.\u201d"}, {"name": "bb260b3a-274c-11e1-ba51-99a2b27f6305", "body": "Five months in an Egyptian jail gives a person a lot of time to think. When you are not pacing or trying to catch an hour of afternoon sun through the barred window, there are thoughts of home, family, the freedoms Westerners take for granted, what exactly got you into the mess and even why you came to the country that locked you up. Two months after my release, as I watch news of the Egyptian military\u2019s violent suppression of protests and raids on nongovernmental organizations, I still think of my first hours of arrest, when I was handcuffed and blindfolded.\n.\nBut in post-revolutionary Egypt, my attempts to educate and interact with the local population led to my arrest, to solitary confinement and eventually to the threat of five simultaneous life imprisonments for \u201cespionage\u201d and \u201cincitement.\u201d\nOn.\n.\nSome.\nOn June 12, two dozen state security officials barged into my hostel room, handcuffed and blindfolded me, and transported me to their general prosecutor.\nPeople ask, \u201cWere you scared?\u201d I was terrified and confused. Over time I also became angry and lonely. The initial 14 days were the \u201cbest\u201d part of my imprisonment because there was at least human interaction. The prosecutor and I bantered about politics, religion and the Middle East conflict. The conversations were jovial, mostly innocuous, save for some random accusations: \u201cSecurity reports inform us that you were smuggling weapons from Libyan revolutionaries into Egypt,\u201d or my favorite \u2014 but perhaps irrelevant \u2014 charge: \u201cIlan, you used your seductive powers to recruit Egyptian women and that is a crime.\u201d\nAfter these first two weeks, the interrogations ended, but my detention continued. Thus began my solitary confinement, which became the true ordeal \u2014.\nPeople ask, \u201cWere you tortured?\u201d I was not beaten \u2014 but consider what it\u2019s like to spend nearly 150 days (3,600 hours) alone in a 10-by-10 room with a bed and chair, a small barred window and no idea what would come next.\nPeople ask, \u201cSo what do you think of Egypt and your mission now?\u201d My answer is constantly evolving. As my detention and recent events and repressions in Egypt make clear, the revolution brought only superficial change. The junta\u2019s focus on external actors represents a desperate attempt to avoid culpability and abdication of power.\nHosni Mubarak\u2019s notorious state security forces still arbitrarily arrest Egyptians without real charges or trials (as they did me), denying anything resembling due process. Prosecutors and judges go through the motions of court proceedings, but the Supreme Council of the Armed Forces really calls the shots.\nWas my trip reckless or \u201cwrong\u201d?.\nMy hasbara provided a viewpoint that changed the mentalities of former Muslim Brotherhood members, the prosecutor and my guards, whose last words were \u201cShalom, we hope you forgive us.\u201d Israelis and Arabs can continue to maintain the status quo of mutual avoidance or they can dare to coexist. To those who wrongly held me, I say simply, I forgive you."}, {"name": "ad505a4c-3237-11e1-8c61-c365ccf404c5", "body": "Regarding the Dec. 29 front-page article \u201cPentagon thinning ranks of top brass\u201d:\nI served on active duty in the military and am in the reserves. Vice Adm. William E. Gortney\u2019s comment that it takes so long to eliminate senior officers because \u201cyou need time to work this\u201d and \u201cyou can\u2019t just give people their pink slips\u201d shows a disconnect with the real world.\u00a0General officers serve at the pleasure of the president.\u00a0Since they are all eligible for retirement (with immediate collection of benefits), why wait to let them go?\u00a0In the civilian world, folks get let go on short notice all of the time.\n Sean F. Conroy, McLean"}, {"name": "507123bc-3334-11e1-825f-dabc29fd7071", "body": "Four years ago this week, a young and inspirational senator who promised to turn history\u2019s page swept the Iowa caucuses and began his irresistible rise to the White House.\nBarack Obama was unlike any candidate the country had seen before. More than a mere politician, he became a cultural icon, \u201cthe biggest celebrity in the world,\u201d: \u201cThere\u2019s no one as Irish as Barack O\u2019Bama.\u201d) Electoral contests rarely hold out the possibility of making all things new, but Obama\u2019s supporters in large numbers fervently believed that 2008 was exactly such a campaign.\nAs.\nObama\u2019s largest problem is not the daunting list of difficulties that have left the country understandably dispirited: the continuing sluggishness of the economy, the broken political culture of Washington, the anxiety over America\u2019s future power and prosperity.\nOn each of these matters, Obama has plausible answers and, judging by improvements in his poll ratings since September, he has made headway in getting the country to accept them.\nMost Americans still believe that Obama inherited rather than caused the economic turmoil. Barring another crisis in Europe, there is a decent chance of somewhat better times by Election Day. Obama\u2019s fall offensive against Republicans in Congress has paid dividends. Voters seem inclined to blame Washington\u2019s dysfunction on the GOP, not on a president they still rather like. Most also think Obama\u2019s foreign policy has put the nation on a steadier course. To the extent that bellicosity from the Republicans \u2014 notably from Mitt Romney \u2014 portends a return to George W. Bush\u2019s foreign policy, Obama will enjoy an advantage. Ron Paul\u2019s strength in Iowa and New Hampshire suggests that there are even Republicans who are exhausted with foreign military adventures.\nFor all these reasons, Democrats are far more bullish on the president\u2019s reelection chances than they were even a few months ago, and for what it\u2019s worth, I put the odds in his favor. Yet the threat that should most concern Obama may not be any of the particulars that usually decide elections but the inevitable clash between the extravagant hopes of 2008 and the messy reality of 2012.\nIn\u2019s behalf this year that they felt the first time around.\nSome point to disappointment over his failure to confront the Republicans early enough and hard enough. How, they ask, could Obama possibly have expected cooperation from conservatives? Others are frustrated that he couldn\u2019t.\nFew\u2019s behalf four years ago, the alternative reggae band Michael Franti & Spearhead promised a country that would \u201csoar through the sky like an eagle\u201d and saw Obama as \u201cseeking finds of a new light.\u201d\nThese are not the standards of normal politics. Can voters who supported someone as a transcendent figure reelect him as a normal, if resilient, political leader? This is Obama\u2019s challenge.\n ejdionne@washpost.com \n"}, {"name": "7441217c-3332-11e1-825f-dabc29fd7071", "body": "Let us count the ways in which the nomination of Ron Paul would be groundbreaking for the GOP.\nNo other recent candidate hailing from the party of Lincoln has accused Abraham Lincoln of causing a \u201csenseless\u201d war and ruling with an \u201ciron fist.\u201d Or regarded Ronald Reagan\u2019s presidency a \u201cdramatic failure.\u201d Or proposed the legalization of prostitution and heroin use. Or called America the most \u201caggressive, extended and expansionist\u201d empire in world history. Or promised to abolish the CIA, depart NATO and withdraw military protection from South Korea. Or blamed terrorism on American militarism, since \u201cthey\u2019re terrorists because we\u2019re occupiers.\u201d Or accused the American government of a Sept. 11 \u201ccoverup\u201d and called for an investigation headed by Dennis Kucinich. Or described the killing of Osama bin Laden as \u201cabsolutely not necessary.\u201d Or affirmed that he would not have sent American troops to Europe to end the Holocaust. Or excused Iranian nuclear ambitions as \u201cnatural,\u201d while dismissing evidence of those ambitions as \u201cwar propaganda.\u201d Or published a newsletter stating that the 1993 World Trade Center attack might have been \u201ca setup by the Israeli Mossad,\u201d and defending former Ku Klux Klan Grand Wizard David Duke and criticizing the \u201cevil of forced integration.\u201d\nEach of these is a disqualifying scandal. Taken together, a kind of grandeur creeps in. The ambition of Paul and his supporters is breathtaking. They wish to erase 158 years of Republican Party history in a single political season, substituting a platform that is isolationist, libertarian, conspiratorial and tinged with racism. It won\u2019t happen. But some conservatives seem paradoxically drawn to the radicalism of Paul\u2019s project. They prefer their poison pill covered in glass and washed down with battery acid. It proves their ideological manhood.\nIn many ways, Paul is the ideal carrier of this message. His manner is vague and perplexed rather than angry \u2014 as though he is continually searching for lost car keys. Yet those who reject his isolationism are called \u201cwarmongers.\u201d The George W. Bush administration, in his view, was filled with \u201cglee\u201d after the Sept. 11 attacks, having found an excuse for war. Paul is just like your grandfather \u2014 if your grandfather has a nasty habit of conspiratorial calumny.\nRecent criticism of Paul \u2014 in reaction to racist rants contained in the Ron Paul Political Report \u2014 has focused on the candidate\u2019s.\nThis is the reason Paul is among the most anti-Lincoln public officials since Jefferson Davis resigned from the United States Senate. According to Paul, Lincoln caused 600,000 Americans to die in order to \u201cget rid of the original intent of the republic.\u201d Likewise, the Civil Rights Act of 1964 diminished individual liberty because the \u201cfederal government has no legitimate authority to infringe on the rights of private property owners to use their property as they please.\u201d A federal role in civil rights is an attack on a \u201cfree society.\u201d According to Paul, it is like the federal government dictating that you can\u2019t \u201csmoke a cigar.\u201d\nThe \u2014\u2019s freedom. It increased the liberty of Carlotta Walls LaNier, who was spat upon while trying to attend school. A choice between freedoms was necessary \u2014 and it was not a hard one.\nPaul\u2019s conception of liberty is not the same as Lincoln\u2019s \u2014 which is not a condemnation of Lincoln. Paul\u2019s.\n michaelgerson@washpost.com \n"}, {"name": "08c2ef8c-3307-11e1-a274-61fcdeecc5f5", "body": "Could 2012 turn conventional wisdom on its head? Here\u2019s the conventional wisdom: President Obama\u2019s reelection is vulnerable to the weak economy and high joblessness. Here\u2019s.\nTo which they respond: Obama\u2019s anti-business rhetoric and policies have impeded recovery; the Affordable Care Act (\u201cObamacare\u201d) and new regulations create uncertainties that deter hiring; and Obama hasn\u2019t dealt with the explosion of federal debt.\nJust which narrative triumphs may well determine the election. If Obama convinces Americans that he\u2019s set a course for a stronger recovery, then he wins. If the Republicans successfully cast his policies as producing prolonged stagnation, they win. Though the debate matters, the economy\u2019s actual performance \u2014 for better or worse \u2014 will decide how many Americans feel. And this will depend on forces and events over which the candidates have little or no control.\nWhat\u2019s the 2012 outlook?\nMany forecasts see modest growth. Here are some numbers from IHS Global Insight, a major consulting firm. The economy will expand 1.8 percent, almost the same as in 2011 (estimate: 1.7 percent). Payroll jobs will grow about 145,000 a month, rising gradually; that\u2019s decent but probably wouldn\u2019t cut the unemployment rate. Indeed, normal labor force growth and the prospect that some discouraged workers will start looking for jobs indicate the unemployment rate (8.6 percent in November) could average 8.7 percent, only slightly below the 9 percent of 2011.\nThis forecast depicts a plodding economy; should it materialize, it would favor the Republicans. \u201cConsumers face too many negatives to allow a robust spending recovery \u2014 a weak labor market, high debt burdens, house prices that have not yet hit bottom, price increases that have outpaced wage growth, and a lack of confidence in the government\u2019s ability to make things better,\u201d says IHS.\nBut \u2014 a level often associated with a low or declining unemployment rate. Housing construction was up 9.3 percent in November over October and 24.3 percent over November 2010.\nFor Obama, the economy holds two large potential pluses.\nFirst, there\u2019s.\nSecond,.\nThe upshot: More Americans may be in a position to borrow to buy a home or vehicle, relieving some pent-up demand. Home sales may already be reviving. In November, new contracts reached their highest level in 19 months.\nBy contrast, Europe and China pose big risks. In Europe, Italy and Spain have nearly 500 billion euros worth of maturing debt in 2012, reports the Institute of International Finance. If they can\u2019t refinance \u2014 if bond markets won\u2019t renew loans at acceptable interest rates \u2014 they would default or need to be rescued. Either way, Europe would face greater austerity and a deep recession. This would hurt U.S. exports and the profits of American multinational firms.\nThe danger from China is a collapsing real estate \u201cbubble\u201d that, if it occurred, would result in bankruptcies of developers, loan losses to banks and slower economic growth. The effects would spread beyond China, because construction fuels its demand for cement, steel, copper and other raw materials traded on world markets. Again, U.S. exports could suffer.\nGiven all the possibilities, handicapping the election based on the economy is nearly futile. It\u2019s 2012\u2019s political wild card that \u2014 when played \u2014 may prove decisive, if accidental.\n"}, {"name": "b97c78a4-331e-11e1-825f-dabc29fd7071", "body": .\nTaxpayers\u2019s expiration is a victory for common sense just the same.\nMeanwhile, a lesser-known but equally dubious energy tax break also expired when the year ended Saturday: the credit that gave electric-car owners up to $1,000 to defray the cost of installing a 220-volt charging device in their homes \u2014 or up to $30,000 to install one in a commercial location. As a means of reducing carbon emissions, electric cars and plug-in hybrid electrics are no more cost-effective than ethanol. What\u2019s more, only upper-income consumers can afford to buy an electric vehicle (EV); so the charger subsidy is a giveaway to the well-to-do.\nThe same goes for the $7,500 tax credit that the government offers purchasers of electric vehicles, a subsidy that, alas, did not expire at year\u2019s end. The Obama administration says that the credit helps build a market for EVs, which helps create jobs. Given the price of eligible models, like the $100,000 Fisker Karma, that rationale sounds an awful lot like trickle-down economics.\nBackers\u2019 commitment to what looks increasingly like an industry not ready for prime time.\nSales \u2014 while repeatedly raising the sticker price. And now Fisker has announced a recall of the cars because of a potential defect in its batteries \u2014 made by A123 Systems, another large recipient of Energy Department support.\nEvidence is mounting that President Obama was overly optimistic to pledge that there would be 1 million EVs on the road by 2015. Electric cars are not likely to form a significant part of the solution to America\u2019s.\nThe ethanol credit was on the books for 30 years before it finally died. Let\u2019s hope Congress can start unwinding the federal government\u2019s bad investment in electric vehicles faster than that.\n"}, {"name": "af8f7bda-34c6-11e1-88f9-9084fc48c348", "body": "The Iowa caucuses are almost here!\nIn less than 48 hours, Republicans will gather across the Hawkeye State to pick the man or woman they think should be the next president.\nAt this point, there\u2019s not much left for the candidates \u2014 or the reporters who cover them \u2014 to do but wait and wonder. Now, the Fix isn\u2019t a betting man, but there is no better way to wile away the hours between now and Tuesday night than to do a bit of odds-setting.\nBelow are the odds we give each candidate in Iowa. The numbers are based on conversations with strategists for many of the contenders, independent poll figures and a little bit of historical context sprinkled in for taste.\n.\nAlthough more social conservatives than mainstream Republicans participate in the caucuses, the fracturing of the evangelical vote means that Romney\u2019s 25\u00a0percent could be enough (or close to enough) to win the nomination. (He received 25\u00a0percent in the Iowa caucuses in 2008 and lost to former Arkansas governor Mike Huckabee by nine points.)\nRomney and his team know that a victory in Iowa followed by another in New Hampshire would all but lock up the nomination for him, so he is pushing \u2014 hard.\n Rick Santorum (4-1): A Des Moines Register poll released Saturday night made plain that the former senator from Pennsylvania is the momentum candidate. Although he took 15\u00a0percent overall in the four-day survey, he was at 21\u00a0percent in the final two days \u2014 a sign that he is peaking in the waning moments.\nThe key for Santorum is how much of the vote he can peel off other socially conservative candidates \u2014 most notably Texas Gov. Rick Perry, who, despite major spending in Iowa, doesn\u2019t appear to be rising fast enough.\n Ron Paul (5-1): The congressman from Texas has the most reliable base \u2014 between 15\u00a0percent and 19\u00a0percent \u2014 in the field. But his ability to grow beyond that has always been very much up in the air, and it\u2019s.\nAlthough conventional wisdom holds that if turnout in the caucuses is low (less than 100,000) it\u2019s good for Paul, there\u2019s also a case to be made that high turnout (120,000 or more) might be even better. The more nontraditional Republicans who decide to vote Tuesday (Iowa has same-day registration), the better for Paul.\n Newt Gingrich (20-1): If the caucuses had been held Dec.\u00a03, Gingrich would have won. But his baffling pledge not to go negative combined with his inability to raise enough money to compete with his rivals (and their affiliated super PACs) on television doomed his chances over the past month.\nGingrich has insisted that South Carolina is where he will make his stand, but if he finishes outside of the top three in Iowa it might be hard for him to raise more money and stay viable through the Palmetto State\u2019s Jan.\u00a021 primary.\n Rick Perry (25-1): The Texas governor\u2019s inability to gain any real traction despite outspending all of his rivals in the Hawkeye State reveals just how damaging his disastrous debate performances were late last year.\nAlthough Perry is, at best, a socially conservative spoiler for the likes of Santorum at this point, he will almost certainly be remembered as a \u201cwhat might have been\u201d candidate. His profile \u2014 and ability to raise money \u2014 should have made him Romney\u2019s main competition nationally and the front-runner in Iowa. Instead, he\u2019ll be the latest reminder that candidates and the campaigns they run matter.\n.\nBachmann\u2019s inability to raise money has badly hamstrung her, and she has been a shadowy presence on Iowa airwaves over the past month. If she does come in sixth Tuesday night, it\u2019s hard to imagine her staying in the race through the Jan.\u00a010 New Hampshire primary."}, {"name": "c1a204be-3246-11e1-a274-61fcdeecc5f5", "body": "Children in snow suits are a common sight during winter. But in 1962, Peter from \u201cThe Snowy Day\u201d was something most children in the United States had never seen before: an African American character who was the hero of his own book.\n\u201cNone of the manuscripts I\u2019d been illustrating featured any black kids \u2014 except for token blacks in the background,\u201d wrote author and illustrator Ezra Jack Keats, who died in 1983. \u201cMy book would have him there simply because he should have been there all along.\u201d\nFirst published 50 years ago, \u201cThe Snowy Day\u201d is a gentle story that revels in the wonder of an urban snowfall. It also was quietly groundbreaking, both as what is widely considered the first picture book to star a black child and in its use of collage, for which Keats won the 1963 Caldecott Medal. Writers such as National Book Award winner Sherman Alexie, who thanked Keats in his 2007 acceptance speech, and award-winning author/illustrator Bryan Collier have cited \u201cThe Snowy Day\u201d as an inspiration.\n\u201cThe fact that it\u2019s still around \u2014 and picture books are like lettuce in the grocery store, they disappear so fast \u2014 the fact that it\u2019s still with us is something,\u201d said Newbery and National Book Award winner Katherine Paterson, who is the National Ambassador for Young People\u2019s Literature. \u201cIt\u2019s so important for a child to be able to say, \u2018There I am in the book,\u2019\u2009\u201d said Paterson, whose daughters are Chinese and Native American. \u201cThat\u2019s been a wonderful change, even in the lifetime of my children, who are in their 40s now.\u201d\nTo celebrate the book\u2019s 50th anniversary, Viking has issued a special edition that includes eight pages of supplemental material, including the magazine photos of a little boy that inspired Keats and a fan letter from poet Langston Hughes. \u201cThe Snowy Day and the Art of Ezra Jack Keats,\u201d the first major U.S. exhibition about Keats, opened this fall at the Jewish Museum in New York and will travel to Massachusetts, California and Ohio in 2012 and 2013.\nCollier, whose book \u201cUptown\u201d won the first Ezra Jack Keats award, still remembers his mother, a Head Start teacher, bringing home \u201cThe Snowy Day.\u201d \u201cIt was the first time I saw a kid that looked like me,\u201d Collier said. \u201cAt 4, I didn\u2019t have the vocabulary to articulate what I was looking at. But I remember seeing Peter, and this kid looked just like me. The yellow-print housedress the mom wears \u2014 my mother had a housedress like that, too. Even the pattern of the pajamas \u2014 my great-uncle had pajamas like that. It felt so real.\u201d\nBack in the 1940s, 22 years before \u201cThe Snowy Day\u201d was published, Keats had cut out pictures from Life magazine of the young boy, who was being vaccinated, said Deborah Pope, executive director of the Ezra Jack Keats Foundation in New York, which supports arts and literacy programming in schools, libraries and other institutions. He pinned them to a wall in his studio; meanwhile, he continued illustrating other people\u2019s books.\nKeats\u2019s book, when it appeared, \u201cwas both a social, personal and artistic breakthrough,\u201d said Pope, whose father was Keats\u2019s best friend. \u201cIt really opened up the wellspring of his inner voice. He said that the book \u2014 as artists sometimes say \u2014 the book kind of burst out of him. He had never done anything like this before.\u201d\nIf it had purely been a \u201ccause\u201d book, some argue, \u201cThe Snowy Day\u201d would be just a footnote. The fact that children still read it today has to do with the universality of the story and Keats\u2019s stunning collages.\n\u201cThat\u2019s what struck me: It was gorgeous,\u201d said Laura Ingalls Wilder Award winner Tomie dePaola, who has written or illustrated more than 200 books. \u201cIt deserves all the fame and notice it\u2019s going to get.\u201d\nKeats\u2019s art has a richness and depth, Christopher Award-winning author and illustrator Jerry Pinkney said, that only increases as you peel away its layers.\n\u201cHe brought his sensibilities as a painter, his ability to remember his childhood and express it in a way that other kids could connect to, his total love of the city,\u201d said Pinkney, who curated an exhibit in Los Angeles in the 1990s that included Keats\u2019s work. \u201cYou take a 32-page picture book \u2014 packed into those 32 pages is all of that.\u201d\nKeats once attended art classes with Jackson Pollock and was working during the height of abstract expressionism.\n\u201cHe\u2019s been compared to Edward Hopper: taking the ordinary and making it extraordinary,\u201d said Nick Clark, chief curator for the Eric Carle Museum of Picture Book Art in Amherst, Mass., where the exhibit will be on display this year. Collage, Clark suggested, might be a way of using scraps of paper to suggest \u201clife\u2019s detritus.\u201d Clark added that Keats had the ability to take the poverty and squalor he saw as he walked through his neighborhood and recombine them in a way that was beautiful: \u201cSo there are these exquisitely rendered reproductions of graffiti. He found a way to capture this other beauty.\u201d\nAlthough the 50th anniversary has been cause for celebration, when \u201cThe Snowy Day\u201d was first published some critics questioned whether a Jewish man had the right to tell a story about an African American child.\n\u201cCarry that to an extreme, and none of us could write,\u201d Paterson said. \u201cThere\u2019s no space for the imagination.\u201d\nThe controversy was \u201cdevastating\u201d to Keats, Pope said. He had grown up in a poor immigrant family and changed his last name from Katz to Keats after years of anti-Semitism. Pope says he asked: \u201cHow can you put a color on a child\u2019s experience in the snow?\u201d\nWinning the Caldecott Award and receiving fan letters from Hughes and other African American activists helped stem the criticism. \u201cIt was such a vindication,\u201d said Regina Hayes, president and publisher of Viking Children\u2019s Books in New York. At the time, full-color printing was very expensive, and most picture books were either black and white, or alternated between black and white and color pages. \u201cIt was really a commitment. Everyone [at Viking] was completely aware that this was going to be the first mainstream picture book to feature an African American child as a main character.\u201d\n\u201cIt holds up the need for everybody to be included,\u201d Pinkney said. \u201cBut I think, you know what, the art stands up. And good art gets better. .\u2009.\u2009. It\u2019s going to stand up 50 years from now. We\u2019re going to celebrate that 100th year.\u201d"}, {"name": "fe4a4de6-3268-11e1-a274-61fcdeecc5f5", "body": "ONE ISSUE THAT demands more attention in the scandal surrounding D.C. Council member Harry Thomas Jr. (D-Ward 5) is the role played by the independent non-profit that administers city grant money for youth programs. Was it a lack of proper controls, susceptibility to political pressure or perhaps both that resulted in funds intended for children\u2019s baseball going, as alleged, to Mr. Thomas? Did this faulty oversight result in other questionable appropriations? D.C. officials should not wait for the outcome of the criminal probe of Mr. Thomas to undertake their own scrutiny of how wisely its money is being allocated.\nInvestigation by D.C. Attorney General Irvin B. Nathan, which resulted in Mr. Thomas agreeing without admission of wrongdoing to repay the city $300,000, details how the DC Children & Youth Investment Trust Corp. was hoodwinked into directing money earmarked in 2007 for youth baseball to a group that, in turn, funneled it to groups controlled by Mr. Thomas. According to the attorney general\u2019s civil complaint filed in June, the trust followed Mr. Thomas\u2019s direction to pick the Langston 21st Century Foundation as recipient for the funds that were regularly doled out despite seemingly weak documentation. Did no one in the trust think it unusual that it was Mr. Thomas\u2019s council office that was providing the spare budget narratives and work plans, not to mention putting in requests for the issuance of checks?\nThis wasn\u2019t the only time that the trust followed Mr. Thomas\u2019s lead. A March 12, 2010, account in the Washington City Paper by Mike DeBonis, now with The Post, examined $1.3 million set aside in the fiscal 2010 budget for gang intervention and youth anti-crime initiatives. The money was competitively bid in Ward 6 but not in Ward 5, where, a trust official said, \u201cWe met with the Ward 5 council member [Mr. Thomas] and talked about what we felt would be the best way to serve the community. We talked about a number of organizations that he suggested we look at that he knows have a track record of good services.\u201d More recently, the Brookland Heartbeat, a neighborhood publication in Ward 5, raised questions about a $560,000 grant given by the parks department in the summer of 2008 to the trust to fund programs to support a Ward 5 initiative by Mr. Thomas. No evidence of wrongdoing has emerged. But it\u2019s only prudent that the city demand a better accounting of exactly how those monies were spent.\nThe trust is generally seen as doing truly laudable work in creating better opportunities for D.C. youth. Trust President Ellen London told us that procedures have changed dramatically; for instance, there is now a requirement that all grants be competitively bid and approved by the board. At the initiative of Mr. Nathan, the city entered into a new agreement with the trust that includes better controls. Not only does it tighten how city funds are accounted for, but it also requires the trust to disclose all communications from council members or staffers regarding the distribution of funds. Clearly that\u2019s a step in the right direction \u2014 but we would also urge the D.C. Council to take its own look at whether further improvements are warranted.\n"}, {"name": "e5b6b2b4-2814-11e1-af61-6efac089e2f6", "body": .\nThousands.\nAccording.\nAnother area of uncertainty: the number of individuals injured in medical experiments. \u201cWe don\u2019t think it\u2019s a big problem,\u201d commission chair Amy Gutmann said, \u201cbut it\u2019s perceived as a big problem because we\u2019re one of the only developed countries that does not guarantee compensation for injured subjects.\u201d\nThe commission encouraged the government to establish such a system. It did not endorse a particular approach but rightly pointed to the \u201cno fault\u201d\u2019s morally responsible behavior is that it has seen the number of court cases and its litigation costs go down."}, {"name": "d7f23238-32f6-11e1-8c61-c365ccf404c5", "body": "In her very good Dec. 25 Outlook article, \u201cThe colder war,\u201d\u00a0Heather Conley\u00a0left out a key fact for U.S. policy interests in the Arctic. She mentioned the importance of the Convention on the Law of the Sea for Arctic issues but did not note that the United States has not ratified the convention, despite broad support in industry, the armed forces and the Senate. A handful of senators has opposed ratification for reasons inexplicable to anyone who looks rationally at U.S. national security interests in the Arctic region and elsewhere.\nAs a result, the United States is on the outside looking in as the rules of the road for the warmer Arctic are made by those who are a party to the convention. The Senate needs to ratify the Law of the Sea Convention as early as possible to ensure the United States has a leading voice on issues covered by the convention that relate to our national security, of which the Arctic is perhaps the most urgent.\n Kenneth C. Brill, Bethesda\nThe writer was acting assistant secretary of state for oceans and environmental affairs for two stints, in 1999 and in 2001."}, {"name": "72f097a4-3269-11e1-825f-dabc29fd7071", "body": "The philosophers were in town last week, swarming the Marriott Wardman Park hotel for the American Philosophical Association\u2019s annual conference, at which the meaning of a great many things was debated, including the meaning of meaning (\u201cWhat Is Meaning?\u201d Hall IV-F, 9-11 a.m.), and a great many thoughts were thought, including thoughts about thought (\u201cThinking About Thinking,\u201d Hall IV-J\u201d).\nIn one largish ballroom, a different sort of panel was happening. It featured the Dish\u2019s Andrew Sullivan and two other men who looked like Andrew Sullivan \u2014 pleasant, bearded, round-faced men, which is a chic sub-style among many of the attendees here, optionally accessorized with square glasses and male-pattern baldness. The panel was called \u201cFrom Philosophical Training to Professional Blogging.\u201d\n\u201cPerennially, departments of philosophy are under attack,\u201d said Andrew Light, the George Mason University professor who organized and monitored the panel discussion. \u201cWe\u2019re always looking for better ways to sell the major.\u201d\nThere are jobs for philosophers. (There is, at least, \u201cJobs for Philosophers,\u201d a publication of the APA). But the irksome perception persists that a philosophy degree is only slightly more useful than an English degree, and so it was thought that a panel such as this might give frightened philosophers \u2014 many of whom came to this conference in search of gainful employment \u2014 a spot of hope.\nPhilosophers: If you are pinning your hopes of gainful employment on blogging, don\u2019t.\nBut\u2019s degree in philosophy from the University of Montana.\n\u201cWhat blogging created was a Platonic dialogue,\u201d Sullivan said, to perhaps the only audience that would intuitively understand that the \u201cP\u201d should be capitalized.\nPhilosophy, Roberts said, taught him to dissect and make arguments.\nFor centuries, philosophers were regular engagers in mainstream cultural conversation, contributing to discussions of issues that tinged on values and ethics. The American Pragmatists \u2014 the John Dewey types \u2014 were known for this, commenting on education and social reform in the early part of the 20th century. But in recent decades, Light said, \u201cphilosophers have ceded these questions of value and importance to economists,\u201d who are prone to taking the important questions of life and sticking numbers on them.\nThe Internet is the new public sphere, and so the blog might be a way to reclaim old standing, to demonstrate the practical value of having someone with foundational philosophical knowledge ring in on the issues of the day.\nThe professorial attendees at the panel found this concept rather fascinating.\nOne gentleman was bothered by the comment-jacking that he sees happen on message boards. \u201cIt\u2019s zigzags and red herrings .\u2009.\u2009. all of which seems not in line with philosophy,\u201d he fretted during the Q&A portion of the event. How could one enter the blogosphere without relinquishing one\u2019s credentials as an academic?\nReading the comments \u201cis a truly existential\u201d experience, one of the panelists assured him.\nAnother attendee wondered whether the \u201cpublic sense of self\u201d achieves an outsize importance on Twitter.\nPerhaps, the panelists agreed. But from a philosophical perspective, the benefits of freewheeling intellectual rigor online far outweigh the downsides.\nOn blogs, Yglesias said, \u201cYou can see which issues bring people together.\u201d\nLike, Roberts said wryly, \u201cJustin Bieber\u2019s paternity test.\u201d"}, {"name": "46382344-34d0-11e1-81ef-eaf2bd09c8a2", "body": "PHILADELPHIA \u2014 When the season had finally ended, Rex Grossman was the first player off the field, sprinting into the stadium tunnel for a final time. Later, his hair still damp from a postgame shower, Grossman walked out of the Washington Redskins\u2019 locker room wearing a blue pinstripe suit and pulling a roller bag behind him.\nFirst stop, the team bus. Then on Monday morning, Redskins Park to pack up his locker. And after that \u2014 who knows? Grossman will be a free agent, and the future of the Redskins\u2019 quarterback position is up in the air.\nAs the Redskins begin to weigh their options, though, Grossman said he\u2019d like to return to Washington next season.\n\u201cI really enjoy it here. I really enjoy this offensive system, what they\u2019re building here,\u201d he said following the Redskins\u2019 34-10 loss to the Eagles on Sunday. \u201cSo I\u2019d love for this to be the place where I end up.\u201d\nOf course, that decision will ultimately be made by Coach Mike Shanahan and his staff, not the nine-year veteran quarterback. Shanahan in recent weeks has said the team\u2019s turnover problems this season were unacceptable. In 13 starts, Grossman had 20 interceptions and five lost fumbles.\nShanahan already has started evaluating the quarterbacks who will be available in this year\u2019s NFL draft. Before that, though, the team will have to make a decision on Grossman \u2014 and all of the other free agent quarterbacks, including Green Bay\u2019s Matt Flynn, who raised some eyebrows Sunday with his six-touchdown, 480-yard performance.\nGrossman\u2019s agent, Drew Rosenhaus, attended the Redskins\u2019 game Sunday at Lincoln Financial Field and said it\u2019s too early to guess what Grossman might do in free agency.\n\u201cI don\u2019t really want to speculate what might happen right after a loss like this,\u201d he said.\nAfter beating out John Beck in a preseason position battle, Grossman started 13 of the Redskins\u2019 16 games. He threw at least one interception in each but also threw for at least 250 yards seven times. In Sunday\u2019s season finale, he was 22-for-45 passing for 256 yards with one touchdown and one interception.\nThat lone interception Sunday was the product of a broken play, resulting in a severely underthrown pass to Anthony Armstrong. Still, it was the type of play that highlighted one of Grossman\u2019s biggest strengths \u2014 his fearlessness in heaving the ball downfield \u2014 and biggest drawbacks \u2014 the tendency for the other team to make the catch.\n\u201cHoudini couldn\u2019t have thrown the football in that,\u201d Shanahan said. \u201cBut Rex threw the ball up in the air, gave [Armstrong] a chance to make a play.\n\u201cRex played a heck of a ballgame today,\u201d the coach continued. \u201cTo have that type of pass rush and make some of the throws that he did under duress, I don\u2019t have a problem with the way he played.\u201d\nEven though Shanahan benched Grossman in favor of Beck for a three-game stretch, the coach said Grossman made strides from Week\u20091 to Week 17.\n\u201cI think Rex feels a lot more comfortable with the system. The more reps you get, the better off you feel,\u201d Shanahan said. \u201cYou can see over the last four or five games, he\u2019s felt a lot more comfortable.\u201d\nThe season might have had more lows than highs \u2014 Grossman predicted a division title for a team that won only five games \u2014 but the veteran quarterback said he\u2019ll look back on the year and note the positives. \u201cThere\u2019s a lot of good things,\u201d he said.\nDespite missing three games, Grossman finished the season with 3,151 passing yards, just 42 yards shy of his career high, set in Chicago in 2006. His 20 interceptions matched his career high, also set in 2006.\nHe was a free agent each of the past three years, signing a one-year contract with the Redskins the past two. So Grossman is certainly familiar with offseason uncertainty.\n\u201cIt\u2019s part of this job. .\u2009.\u2009. Obviously, everybody would love to have a 10-year contract worth $200 million and you could just Albert Pujols it,\u201d he said. \u201cThat\u2019s not always the case and you just got to work hard and go about it, worry about what you can control and take care of business.\u201d\nThe free agent market for quarterbacks is not expected to be a deep one, and with Grossman having spent three years in this system \u2014 he was Houston\u2019s backup quarterback in 2009 under offensive coordinator Kyle Shanahan \u2014 it\u2019s possible Washington might still represent his best opportunity to contribute to an NFL team next year.\n\u201cI\u2019m not sure what my opportunities are going to be. But I hope this is the best opportunity,\u201d he said. \u201cAnd like I said, it\u2019s a very good team, I\u2019m proud of every single teammate that I played with.\u201d"}, {"name": "e74d9a6c-34cf-11e1-81ef-eaf2bd09c8a2", "body": "PHILADELPHIA \u2014 The mix-up, apparently, started when Washington Redskins quarterback Rex Grossman could not hear the entirety of a play call from offensive coordinator Kyle Shanahan. It came at the end of the first half, when Sunday\u2019s 34-10 blowout loss to the Philadelphia Eagles was still very much a game, and the exchange was almost comical.\nWhen Grossman completed his final throw of the half over the middle \u2014 instead of throwing to the end zone or chucking it away, as the coaches\u2019 truncated message would have conveyed \u2014 Nick Sundberg, the long snapper, thought he was supposed to go onto the field for a hurry-up field goal on fourth down. Yet when he arrived, starting center Will Montgomery was standing over the ball, with his hand on the ball.\n\u201cI heard people yelling, \u2018Spike!\u2019\u2009\u201d Sundberg said. \u201cI knew it was fourth down, but it just created a bunch of confusion. I turned around to run off thinking that I\u2019d made a mistake instead of just trusting myself, and it cost us.\u201d\nThe mess meant the Redskins didn\u2019t even attempt a field goal before the clock expired, but it was just a small slice of a disastrous day on special teams that contributed significantly to Washington\u2019s 11th loss of the season. The Redskins punted poorly. They had their fifth field goal of the season blocked. They committed a pair of penalties on a punt return, including one by special teams captain Lorenzo Alexander.\n\u201cVery weird,\u201d Sundberg said.\nThe uneven special teams play started from the very first time they lined up to punt after an opening three-and-out series. Sav Rocca, the former Eagle who spent a largely successful first season in Washington, dropped the ball to his foot.\n\u201cBut it was a bit breezy out there,\u201d Rocca said. The ball ended up on the outside of his foot, a 22-yard shank that gave the Eagles the ball in Washington territory. They needed to drive 31 yards to kick a 35-yard field goal and take a 3-0 lead.\nThat was part of a day in which Rocca averaged just 36.6 yards per kick, and the Redskins netted just 30.2 yards in net punting \u2014 both their second-worst numbers of the season.\n\u201cI feel like I kind of fell off the last three or four games,\u201d Rocca said.\nIn the second quarter, Grossman threw three straight incompletions after the Redskins reached the Philadelphia 18. Still, place kicker Graham Gano had a seemingly easy 36-yard field goal.\nGano had made his last 13 kicks over four games. Rocca barely got the snap down, but \u201cI thought I hit it well,\u201d Gano said. It didn\u2019t matter, because Eagles defensive lineman Derek Landri completely overwhelmed Redskins offensive lineman Tyler Polumbus, who was playing right guard on the place-kicking team.\nThe resulting block not only meant the Redskins went without a score \u2014 one of three trips to the red zone in which they came up with all of three points \u2014 but it led to Gano getting drilled as he tried to tackle Philadelphia\u2019s Dominique Rodgers-Cromartie, who scooped up the ball. The kicker sat at his locker after the game with his right ankle heavily wrapped and his back iced, right where Philadelphia lineman Jason Babin had kneed him. Of the 10 field goals he missed on the year, half were blocked.\n\u201cI think we actually had seven blocked, but two of them went in,\u201d Gano said. \u201cIt\u2019s frustrating.\u201d\nCoach Mike Shanahan said he had never seen a team have five field goals blocked in a season. \u201cI don\u2019t think I\u2019ve ever seen three,\u201d he said.\nAnd all that set up the confusion at the end of the half.\n\u201cI wasn\u2019t sure exactly what we were doing,\u201d Montgomery said.\nAn apt description of an entire day of special teams futility."}, {"name": "c07082d6-34a4-11e1-88f9-9084fc48c348", "body": "Eva Zeisel, who designed and produced stylish but simple lines of tableware that were credited with bringing a sense of serenity to American dinnertime, died Dec. 30 at her home in New City, N.Y.\nMrs. Zeisel was 105 and had come to America just before World War II, after a harrowing series of adventures in the turbulent Europe of the 1930s.\nHer daughter, Jean Richards, confirmed the death but said she did not know the medical cause.\nMrs. Zeisel was widely regarded as a master of modern design. Her salt and pepper shakers, creamers and ladles are included in the collections of the Museum of Modern Art in New York. Yet she resisted being characterized as an artist. \u201cArt has more ego to it than what I do,\u201d she once told the New Yorker.\nWhat Mrs. Zeisel did was create everyday objects that fundamentally changed the look of American kitchens and dining rooms.\nShe brought \u201ca trained designer\u2019s eye and touch to the kind of inexpensive daily goods that were available to everyone,\u201d said Karen Kettering, vice president for Russian art at Sotheby\u2019s and a former curator at the Hillwood Estate, Museum and Gardens in the District, which featured a retrospective of Mrs. Zeisel\u2019s work in 2005.\nM.\nWhile in that position, Mrs. Zeisel was falsely accused of conspiring to assassinate Soviet dictator Joseph Stalin. She spent more than a year in a Soviet prison, much of that time in solitary confinement. Her experience there would deeply inform \u201cDarkness at Noon,\u201d the novel about life under Stalinism written by a childhood friend, Arthur Koestler.\nWhen guards called Mrs. Zeisel from her cell one day, she thought she was about to be executed. Instead, she was released. She fled to Austria, only to be forced to flee again when Adolf Hitler\u2019s Germany annexed that country. Mrs. Zeisel went to England and then to New York, where the design community quickly recognized her talent.\nMrs. Zeisel often said that her work was about the \u201cplayful search for beauty.\u201d\nAlong with some of her contemporary designers, Mrs. Zeisel replaced the florid, gilded style of earlier eras with simple colors. Her most famous table collection from the 1950s is pure white.\nHer work often was described with words not usually associated with tableware: human, sensual, voluptuous. Many of her designs are curvaceous and reminiscent of the \u201cfeminine midriff,\u201d Kettering said. Mrs. Zeisel designed flower vases with belly buttons. Her bowls were not meant to be stacked but rather to nestle together. Big spoons could be seen as protecting smaller ones.\n\u201cAll of my work is mother-and-child,\u201d Mrs. Zeisel once said.\nHer work reached the height of its popularity during the Cold War. Art critics believe it helped provide a sense of tranquillity during the tensions of the time, Kettering said.\nShe added that critics have noted a resurgence in the popularity of Mrs. Zeisel\u2019s work since the terrorist attacks of Sept. 11, 2001. A tableware collection from the 1950s was re-released several years ago by Crate and Barrel.\nEva.\nOnce in the United States, Mrs. Zeisel broke onto the artistic scene in the 1940s when Castleton China invited her to design a table collection. It would later be displayed at MOMA.\nHer first marriage, to Alex Weissberg, ended in divorce. Her second husband, Hans Zeisel, died in 1992 after 54 years of marriage.\nSurvivors include two children from her second marriage, Jean Richards of New City and John Zeisel of Montreal; and three grandchildren.\nMrs. Zeisel was the author of \u201cEva Zeisel on Design: The Magic Language of Things.\u201d Her memoir of the Soviet prison is forthcoming, her daughter said.\n\u201cI search for beauty,\u201d Mrs. Zeisel told The Washington Post in 2003. \u201cI never wanted to do something grotesque. I never wanted to shock. I wanted my audience to be happy, to be kind.\u201d"}, {"name": "82fed8ae-31a1-11e1-b034-d347de95dcfe", "body": "Delores Price hit the grocery store on New Year\u2019s Day prepared to beat Montgomery County\u2019s new nickel bag tax.\nBut she emerged from the Shoppers Food & Pharmacy in Wheaton clearly irked. Although Price had brought several cloth bags from home, she said, she had underestimated her shopping by four bags, drawing a 20-cent surcharge.\n\u201cThis is ridiculous,\u201d said Price, a retired federal worker, as she unloaded a full cart into the trunk of her car outside the store on Randolph Road. \u201cYou shouldn\u2019t have to pay for bags when you spend enough money in the store.\u201d\nAcross Montgomery, the debut of the bag tax surprised many shoppers, drew praise from some who said they hope it will clean up the environment and angered others who said any new tax is too much in a tight economy.\nStores.\nAt a Starbucks in Germantown, confused customers asked whether the tax applied to the little bag for their muffin. Answer: Muffin bags are still free, but the bigger bags with the handles will cost you.\nMontgomery\u2019s tax on plastic and paper bags, which the County Council approved in May, is an expanded version of a 5-cent bag tariff enacted in the District two years ago. While the District\u2019s surcharge applies only to businesses that sell food or alcohol, Montgomery\u2019s bag tax involves nearly all retail establishments, not just those that sell food. The few exceptions include paper bags from restaurants and pharmacy bags for prescription drugs.\nMontgomery officials have said they expect the tax to raise $1 million a year, most of which will go toward financing storm water management and water quality programs. Some revenue will be used to buy reusable bags for the poor and elderly, officials have said.\nThe.\nBut that\u2019s easier said than done, many said Sunday.\nBar.\n\u201cI probably remember 20 percent of the time,\u201d Fisher said. \u201cI have a lot of very nice bags at home, and I don\u2019t have a car. If it\u2019s not in my purse, it\u2019s not going to happen.\u201d\nMont.\n\u201cI actually do think the 5-cent tax is good for people like me, who forget and need that little reminder, that little smack upside the head,\u201d Berliner said.\nJeff, \u201cI\u2019ll run back now\u201d to avoid the tax.\nSeveral shoppers said they\u2019ll reluctantly pay for the convenience of not having to remember to bring their own bags.\nJulie Simms of Germantown said she spent 20 cents on plastic bags at Safeway on Sunday, even though she has plenty of bags at home that she forgot to bring.\n\u201cIt\u2019s ridiculous,\u201d Simms said of the new tax. \u201cWith today\u2019s economy the way it is, every 5 cents adds up.\u201d\nshaverk@washpost.com\n\nRead more on PostLocal.com: \nNew Year\u2019s baby a precious surprise\nStudents, parents ask: What holiday?\nViola Drath: A remarkable life hijacked\nTwo killed in New Year\u2019s crash in Bethesda"}, {"name": "a4b784c6-34c3-11e1-81ef-eaf2bd09c8a2", "body": "MARSHALLTOWN, Iowa \u2014 Losing hope that their Iowa brethren will coalesce around a suitably like-minded candidate in Tuesday\u2019s Republican caucuses, national conservative leaders are beginning to accept the increasingly likely prospect of a Mitt Romney nomination, and how and whether they can live with that.\n\u201cThe answer to that, to a large extent, totally rests with Romney,\u201d said Richard A. Viguerie, a direct-mail pioneer and longtime leader of the conservative movement . \u201cThe first half-dozen moves are his. We\u2019re just tired of supporting the Republican establishment candidates and getting nothing but lip service in return. Those days are over with.\u201d\nViguerie said his hope is that if Romney wins the nomination, he makes a strong effort to win over conservatives, and the most critical step he can take is to select an appealing running mate.\n\u201cRomney\u2019s got a big hill to climb to get conservatives enthusiastically on board,\u201d he said. \u201cI don\u2019t know if he is capable of doing that. He needs tens of thousands of conservatives and tea parties and bloggers and organizations singing that song.\u201d\nThe.\nMeanwhile, Romney, the former Massachusetts governor whom they have resisted out of concern that he is too moderate, is in position to win the caucuses, even though about three-quarters of the vote will probably go to someone else.\nThe other candidates and their supporters continued making the case Sunday for voters to rally around a single conservative to block Romney\u2019s nomination. But to many, the prospects appeared dim.\nPastor Dan Berry of the Cornerstone Family Church in Des Moines said after services Sunday that several candidates appeal to conservative Christians \u2014 and a number had sought his endorsement. He declined, he said, in part because so many of the candidates are appealing \u2014 including Romney.\nThe splintering is in sharp contrast with 2008, when former Arkansas governor Mike Huckabee rallied conservative voters to win the caucuses.\n\u201cFour years ago, people had their minds made up early,\u201d Berry said. \u201cIt was easy for a lot of the Christian conservatives to make their decision earlier. That\u2019s not the way it\u2019s happening this time, with all the ups and downs, it\u2019s been harder to choose. They all have strengths. Most people think the Christian conservative is only concerned about the social part of it. We\u2019re all concerned about life and marriage, but also the economy.\u201d\nSantorum compared the difference between 2008 and this year to ordering at his favorite cheesesteak shop in Pennsylvania. \u201cYou ever been to Geno\u2019s in Philadelphia?\u201d he asked on the trail last week. \u201cHow long does it take you to order at Geno\u2019s? You know what they sell? Cheesesteaks. That\u2019s it. It\u2019s pretty simple to order. Go to a menu where you\u2019ve got three or four pages of menu and it\u2019s going to take you longer to order. In 2008, you had a Geno\u2019s election. Mike was the cheesesteak. .\u2009.\u2009. He was it.\u201d\nGingrich, campaigning at a sports pub in Marshalltown on Sunday, said the potential for conservatives to rally around one candidate does not end in Iowa.\n\u201cIt\u2019s pretty clear from the Des Moines Register poll that conservatives who want real change are going to get probably between 70 and 75\u00a0percent of the vote, and the only moderate establishment candidate is going to get about 20 or 25\u00a0percent of the vote despite massive spending for two consecutive races,\u201d Gingrich said. \u201cAnd I think that\u2019s going to set the stage for the whole rest of the campaign.\u201d\nHe added: \u201cIt\u2019s.\u201d\nCampaigning on Sunday in Atlantic, Iowa, Romney was asked about his outreach to social conservatives. He said that his goal in Iowa is to be seen as the candidate capable of winning, which means building support and organization in other states.\n\u201cIt\u2019s been important to me,\u201d he said, \u201cto make sure that I have a team and a capability to go the full distance, to get the nomination and to have the people in Iowa who caucused for me be proud that they were on that team from the very beginning.\u201d\nSome \u2014 someone like Louisiana Gov. Bobby Jindal. But time is short for that, the leader said. \u201cYou have a number of people who are good candidates, but none just leaps out at you, so where do people land?\u201d he asked.\nSeveral people interviewed at Cornerstone Family Church on Sunday said they were looking for the candidate who best represented their Christian values. Some said Romney wasn\u2019t ideal, but they could accept him as the nominee if necessary to beat President Obama.\n\u201cMy gut feeling is it\u2019s going to end up being Romney. He won\u2019t be my first choice. Or my second choice. But I\u2019ll support him if it comes to that,\u201d said Mike Carolus, 59, a mechanic from Des Moines, who said he\u2019d prefer Perry or Bachmann.\n\u201cThe way I feel about this election is, you can go down through every single one of them, and if you\u2019re looking for Mr. or Mrs. Perfect, you\u2019re not going to find it,\u201d said Dan Brown, a trader from Des Moines who said he\u2019d be willing to support the candidate he calls \u201cthe plastic man\u201d because of his background in business. \u201cMy number one agenda is to get Obama out of there. After that, I\u2019ll look at the issues.\u201d"}, {"name": "ca334a80-34d4-11e1-88f9-9084fc48c348", "body": "NEW ORLEANS \u2014 Michigan defensive lineman Ryan Van Bergen thought he had seen and heard it all during his previous four years in Ann Arbor, from being a part of Lloyd Carr\u2019s final team in 2007 to the tumultuous three years that followed under Rich Rodriguez to finishing the 2010 season with the third-worst defense among Bowl Championship Series conference teams.\nBut then one day this past spring, new defensive coordinator Greg Mattison popped in some video of the Baltimore Ravens, his previous coaching stop, and told the 288-pound Van Bergen he wanted him to emulate defensive tackle Haloti Ngata.\n\u201cI was like, \u2018So you want me to play like Haloti Ngata?\u2019 \u201d Van Bergen recalled this week. \u201cHe was like, \u2018Yeah,\u2019 and gave me the shrug like I\u2019m crazy for not knowing what he meant. \u2018Haloti Ngata is 330 [pounds]. I\u2019m not Haloti Ngata, coach.\u2019\u2009\u201d\nThe.\nA year after ESPN analyst Chris Spielman referred to Michigan\u2019s defense as \u201ca bunch of guys who would be nice little subs at Indiana,\u201d the Wolverines have improved to 17th in the country without making significant personnel changes. Instead, as Virginia Tech\u2019s coaches have pointed out several times this week, it has been Mattison and first-year Coach Brady Hoke\u2019s ability to \u201ccoach them up\u201d that has led the Wolverines to their first BCS game since 2007.\n\u201cThese coaches just really understand the Michigan tradition,\u201d defensive end Craig Roh said. \u201cThey\u2019ve brought it to life through practice, through camp, through all that stuff. It has enlivened all of us right now. I think that\u2019s why you see, I guess, a change in the environment.\u201d\nWhen Hoke and Mattison first returned to Ann Arbor \u2014 Hoke was a defensive line coach when Michigan shared the 1997 national championship and Mattison was the Wolverines\u2019 defensive coordinator in 1995 and 1996 \u2014 they encountered a team that \u201cbroke every record you didn\u2019t want to break as a team,\u201d Van Bergen said this week. \u201cI would think that we have a blueprint as far as what not to do.\u201d\nEnter Mattison, who had spent the past two years as the Ravens\u2019 defensive coordinator when his good friend, Hoke, called one day wondering if he\u2019d be interested in returning to the college ranks.\nTo the surprise of some, Mattison took the job rather than staying in Baltimore to coach Ray Lewis and Ed Reed.\n\u201cI just missed the chance to take some young man that maybe is not a great football player, or people say he\u2019s not a great football player, or he doesn\u2019t believe he\u2019s a great football player, and help him get to become as great as he can,\u201d said Mattison, who added he wouldn\u2019t have made the move if it were any other school. \u201cThat\u2019s something that I\u2019ve always enjoyed in all my years of coaching and I missed it.\u201d\nMattison brought with him the complex coverage schemes of the NFL and blitz packages that are so extensive Virginia Tech offensive coordinator Bryan Stinespring said recently, \u201cIt\u2019s almost like they\u2019ve got a different playbook.\u201d\nThe end results are evident on the scoreboard.\nThe.\nBut for a unit that had \u201cexperienced so much pain and suffering,\u201d according to Roh, it was Mattison\u2019s tacit belief that seemed to make all the difference. And so even though Van Bergen still jokes about being compared to Ngata, he\u2019s more than happy to point out just how far this defense has come.\n\u201cI don\u2019t think it had anything to do with buying in. It was more about staying in. When things started going wrong, you could see the team kind of fall apart a little bit,\u201d Van Bergen said of past seasons. \u201cGuys didn\u2019t want to be too committed because if you\u2019re too committed and things start going wrong, you can take a lot of the blame. .\u2009.\u2009.\n\u201cWe\u2019ve been through the worst of fires, we\u2019ve been through the worst that can happen to us, so whatever these coaches tell us to do, let\u2019s make sure we don\u2019t have any regrets. We\u2019re sitting here right now and I don\u2019t think there\u2019s a guy on the team probably too regretful about anything.\u201d"}, {"name": "df15406e-330a-11e1-a274-61fcdeecc5f5", "body": "Four years ago, the five Romney sons were a staple on the campaign trail, their heavy brows, square jaws and penchant for corny jokes coming together in a sort of cubist portrait of their father.\nThis time around, Mitt Romney\u2019s.\n\u201cMy dad is my hero,\u201d son Josh Romney, 36, a Salt Lake City real estate investor, told supporters at a cafe here on a recent morning. \u201cHe\u2019s taught me everything I know about being a father, about loving this country and about raising a family, so for me to be able to be on the campaign trail and talk about him and share stories about my dad to other people is a thrill.\u201d\nIn many ways, they are the ideal surrogates to hold down the fort in New Hampshire, one of Romney\u2019s strongholds, while the GOP presidential candidate focuses his efforts on Tuesday\u2019s Iowa caucuses. They are clean-cut and attractive, conversant about taxes and foreign policy, at ease in the media spotlight and full of darling tales about growing up with their energetic father.\nBut they have done little to dispel the impression that Romney is a little too polished and aristocratic. Three of the five attended Harvard Business School, like their father, and showed up wearing versions of Romney\u2019s jeans-and-blazer campaign trail uniform. Matt and Craig Romney work in real estate. Ben Romney, who was absent, is completing his medical residency in Utah.\nThe\u2019d like to see.\n\u201cIt shows what a strong candidate he is that the boys are out here for him while he\u2019s out there in Iowa,\u201d said Pam Skinner, a local Romney activist. \u201cOf course, it helps to have a big family.\u201d\nWithin the Republican field, Romney\u2019s family is hardly the largest. Jon Huntsman Jr. and Rick Santorum each have seven children, and Rep. Michele Bachmann (Minn.) famously raised five children and fostered 23.\nNor is the Romney family the most visible. That distinction probably belongs to the self-described \u201cHuntsman girls,\u201d who grabbed attention with their quirky Web videos about Huntsman\u2019s rivals and irreverent tweets. (They lamented last month that tweets directed to the Romney brothers go unreturned.)\nBut Romney\u2019s sons are a potent force for a candidate who has struggled to connect personally with voters. Along with their mother, Ann, Romney\u2019s wife of 42 years, they provide a stark contrast to rival Newt Gingrich, who has been married three times. And they would help level the playing field in a general election, presenting a wholesome image to rival that of President Obama.\nTagg, \u201cFive Brothers,\u201d which inspired some mocking for its wholesome banter.\nDuring their campaign swing through New Hampshire, the brothers kept it light with the occasional policy answer or flubbed attempt at humor \u2014 for example, when Matt, 40, the second son, made a joke about Obama\u2019s birth certificate. \u201cRepeated a dumb joke,\u201d he later tweeted. \u201cMy bad.\u201d\nThey made a few cracks about their father but never at his expense. About his habit of planning out every moment of their vacations, when the boys wanted to laze around on the beach. About his stinginess, which \u201cCongress is going to learn pretty quickly.\u201d About how, as head of the 2002 Winter Olympics organizing committee, he learned how to ride a skeleton sled just to get on NBC\u2019s \u201cToday.\u201d\nThey told of his devotion to God and family, about the meandering Sunday conversations that invariably center on the grandchildren. And about their shock, as teenagers, to learn that \u201cthe dad that we liked to tease\u201d was so well respected at his venture capital firm, Bain Capital.\nMatt said it was a misconception that his father is stiff and formal. \u201cI can see how people might get that impression,\u201d he said in an interview. \u201cHe knows that people have that impression of him. We tell him to act differently, and he\u2019s like, \u2018Look, I\u2019m on a news program or I\u2019m at a debate. I\u2019m acting responsibly for that setting.\u2019 But if you get to see him in other settings like we get to see him, he\u2019s the most fun guy out there.\u201d\nAsked about the brothers\u2019 relative comfort speaking publicly for their father, he said it was largely a function of their earnestness.\n\u201cWe\u2019re all still kind of nervous talking about this stuff with folks. Having done it before helps a lot,\u201d Matt said. \u201cThe one thing that really helps is if you\u2019re sincere, and we are sincere about my dad and what he\u2019s done.\u201d\nRead more on PostPolitics.com\nOne day out, a mad dash in Iowa\nRepublicans make final push in Iowa\nWhat Rick Santorum and John Edwards have in common"}, {"name": "0a34d416-34ba-11e1-88f9-9084fc48c348", "body": "DES MOINES \u2014 Seeking to press their advantages and differentiate themselves, the Republican candidates for president flooded the Iowa airwaves Sunday and stepped up their ground games in the final push before decision day.\nSome went to church, others were on buses and at least one \u2014 Rep. Ron Paul \u2014 was somewhere else entirely, ringing in the new year back in his home state of Texas.\nRick Santorum, buoyed by a Des Moines Register poll that showed him among the top three contenders, sought to distinguish himself as the only \u201cfull spectrum conservative\u201d in the race; it was an effort to ding Mitt Romney and appeal to social conservatives, who could be the decisive voting bloc should they coalesce around a single candidate.\n\u201cMy surge is going to come on January 3 after the people of Iowa do what they do, which is actually analyze the candidates, figure out where their positions are, find out who\u2019s the right leader, who\u2019s got what it takes to defeat Barack Obama and to lead this country,\u201d the former U.S. senator from Pennsylvania said in an interview on \u201cMeet the Press.\u201d \u201cWe\u2019ve got a great grass-roots organization. .\u2009.\u2009. They are committed to making sure that this isn't a pyrrhic victory.\u201d\nSantorum sought to paint Romney, whose essential argument for support is his electability, as a moderate who can\u2019t be trusted to push a conservative agenda.\nBut Santorum had to answer questions about his 2008 endorsement of the former Massachusetts governor and about seeming to change his own views on abortion based on political calculus.\nSantorum, who signed a pledge opposing all types of abortion, including in cases of rape and incest, said passing that kind of legislation is politically difficult. \u201cToday I would support laws that would provide for those exceptions; but I\u2019m not for them,\u201d he said. \u201cYes, I support laws that provide those exceptions, because if we can get those passed, then we need to do that.\u201d\nRomney, on a bus tour in Atlantic, Iowa, reminded reporters of Santorum\u2019s 2008 endorsement and pressed his case that he was the best candidate to beat President Obama on the economy.\n\u201cLike Speaker Gingrich, Senator Santorum has spent his career in government, in Washington,\u201d Romney said. \u201cNothing wrong with that, but it\u2019s.\u201d\nWith\u2019s electability argument and rally around him.\nSantorum, in his ground campaign, has argued that he should be the candidate of social conservatives and that they should not just \u201csettle\u201d for Romney. And evangelicals, not yet sold on Romney, could decide to send a message Tuesday that they still matter and that the eventual nominee must take them seriously.\nFormer.\nAfter the service, Gingrich took a swipe at Romney, breaking sharply from his pledge.\nGingrich told reporters that Romney \u201cwould buy the election if he could\u201d and accused Romney of lying. \u201cSomeone who will lie to you to get to be president,\u201d Gingrich said, \u201cwill lie to you when they are president.\u201d The former speaker also signaled that he intended to go negative on Romney with new ads in New Hampshire.\nP.\nThe 12-term congressman, who is in a virtual tie with Santorum and Romney in Iowa, sat for three Sunday show interviews. He has largely ducked news media questions on the trail as he has rallied hundreds of supporters with an antiwar message.\nDogged by questions about racist and anti-Semitic newsletters that were published in his name, Paul admitted to one flaw, saying his management style is substandard.\nAsked to predict where he\u2019ll stand Tuesday after the votes are tallied, Paul was his usual anti-politician self.\n\u201cI have no idea what\u2019s going to happen. I may come in first, I may come in second,\u201d he said. \u201cI doubt I\u2019ll come in third or fourth.\u201d"}, {"name": "b9478026-34e1-11e1-ac55-e75ea321c80a", "body": "As he got dressed before the Washington Wizards hosted the Boston Celtics on Sunday, John Wall admitted he was \u201cnot enjoying myself playing basketball\u201d with the team playing poorly to start the season. But Wall vowed that he would stop \u201cthinking too much,\u201d get back to playing with his instincts and have fun again.\nCoach Flip Saunders, concerned with Wall\u2019s demeanor in a discouraging loss at Milwaukee two nights earlier, went further before Sunday\u2019s game: \u201cI told him, if he doesn\u2019t play hard and he doesn\u2019t have a smile on his face, I\u2019m going to take him out.\u201d\nIn the 94-86 loss to the Celtics at Verizon Center, Wall played with more passion and desire, encouraged his teammates, and finished with his best game of the season: 19 points, season highs of eight assists and seven rebounds and just one turnover. But the team\u2019s overall performance didn\u2019t give him much to smile about.\n\u201cMy coaches talked to me and told me what I have to do to be effective \u2014 just play, have fun and play my game. That\u2019s what I did. I think the thing is, just try to win,\u201d Wall said. \u201cIt ain\u2019t no fun\u201d losing.\nThe Wizards are the NBA\u2019s only winless team and have opened the season at 0-4 for the first time since 2008-09, when they lost their first five games and matched the franchise-worst record for an 82-game season at 19-63.\nThey couldn\u2019t shoot or defend early and discovered they could do both too late, and Wall had to watch his counterpart, Rajon Rondo, flaunt the benefits of being surrounded by a cast that features three future Hall of Famers.\nR.\n\u201cThat\u2019s what Rondo does,\u201d Saunders said. \u201cBut I thought that John, he had the best game he\u2019s had so far. I can just judge John by where he\u2019s at and how he\u2019s played so far. I thought he did a better job of running our team and getting that and we made progress.\u201d\nNick.\nThe Wizards broke out of their shooting slump in the second half, getting within 65-58 when Jordan Crawford made a three-pointer \u2014 his only field goal of the game \u2014 and reserve Ronny Turiaf kicked wildly in celebration. Turiaf was forced to leave the game shortly thereafter with a bruised left hand and is doubtful to play in the rematch Monday in Boston.\nThe.\n\u201cWe always get down by 10, 15 in the first half and always find a way to fight back, but you\u2019re taking a lot of energy from yourself,\u201d Wall said. \u201cI think down the fourth quarter, the last couple of minutes, we didn\u2019t have the kind of energy we needed to make a comeback.\u201d\nAndray Blatche was unable to completely get out of his \u201cfunk.\u201d He finished with just 10 points, converting 4 of 7 field goal attempts after shooting an abysmal 11 for 41 (26.8 percent) in the first three games. But he also had a team-high four turnovers and allowed Garnett to get into his head.\nBlatche\u2019s former teammate in Minnesota, shouted at Blatche during a timeout, encouraging him to get focused.\nThe.\n\u201cWe\u2019re staying positive. It\u2019s still 66 games in the season,\u201d said Roger Mason Jr., who was back in the lineup after being ruled ineligible for the previous game in Milwaukee because the Wizards submitted an incorrect roster. \u201cWe have goals on this team. but it\u2019s not going to just happen. You have to make it happen.\u201d"}, {"name": "28b0bbe8-34d9-11e1-81ef-eaf2bd09c8a2", "body": " PHILADELPHIA \n
https://gitlab.science.ru.nl/ghendriksen/information-retrieval/-/commit/9b5c4bf3a40e92b1fb9d1e6060289df4f74699a3.diff
CC-MAIN-2021-04
refinedweb
58,524
62.38
Details - Type: Improvement - Status: Closed (View Workflow) - Priority: Minor - Resolution: Fixed - Component/s: swarm-plugin - Labels:None - Similar Issues: - Released As:3.21 Description When using slave.jar, build nodes publish information about currently running builds via the Jenkins API. I'm not super well-versed in the API internals, but as far as I can tell, this involves publishing extra information for each executor. Otherwise, Jenkins replaces this with a PlaceholderTask, which doesn't contain any information about what is actually building, and the API consumer can only see if the executor is idle or not. Effectively, this means that API calls such as [{{get_running_builds}} in the python-jenkins API|] return an empty list, which is not terribly useful. Attachments Activity Failed to reproduce the issue with 3.21. First I started a Swarm client with java -jar swarm-client-3.21.jar -master ${JENKINS_URL} -name swarm-test. Then I created a Pipeline job as follows: pipeline { agent { label 'swarm-test' } stages { stage('Hello') { steps { sh 'sleep 99999' } } } } I started the pipeline and verified the job was building and sleep(1) was running on the Swarm agent. Next I exercised the get_running_builds() API from python-jenkins as was reported to be problematic: import jenkins server = jenkins.Jenkins('', username='myuser', password='mypassword') user = server.get_whoami() version = server.get_version() print('Hello %s from Jenkins %s' % (user['fullName'], version)) builds = server.get_running_builds() print(builds) According to the bug report, this would have returned an empty list. But it instead returned the running build, which is the correct behavior: Hello myuser from Jenkins 2.222.4 [{'name': 'test', 'number': 2, 'url': '${JENKINS_URL}/job/test/1/', 'node': 'swarm-test', 'executor': 6}] Hi – I'll try to reproduce this, but currently I can't update to Swarm Client 3.21 because of. As soon as that is fixed, I'll grab a JAR file and try with this release. Hey Nik Reiman, as far as I can tell this should be working. Can you please provide a more detailed set of steps to reproduce the issue?
https://issues.jenkins.io/browse/JENKINS-60835
CC-MAIN-2021-21
refinedweb
341
56.86
Hi all I’ve been trying to use a 20x4 HD44780 LCD display as part of my Arduino project. The HD44780 command set includes commands for moving the cursor left and right, however when using this I have noted some strange behavior. On each line the cursor moves as expected, however when it gets to the end of the line it does not go to the next line as expected but follows the sequence Line1 → Line3 → Line2 → Line4. Anyone come across this issue before? Thanks in anticipation. Code snippet below… #include <SoftwareSerial.h> #define txPin 12 SoftwareSerial LCD = SoftwareSerial(0, txPin); void setup() { LCD.begin(9600); // Clear display LCD.write(0xFE); LCD.write(0x01); delay(3); // This works as expected filling the screen with 'X's. Line sequence 1-2-3-4 for (int i = 1;i<=80;i++) { LCD.write("X"); delay(100); } // This doesn't work as expected. Line sequence 1-3-2-4. for(int i = 1;i <=80;i++) { LCD.write(0xFE); // Command to follow. LCD.write(0x14); // Move cursor to right. delay(100); } } void loop() { }
https://forum.arduino.cc/t/problem-with-hd44780-lcd-cursor-movement/118232
CC-MAIN-2021-43
refinedweb
180
70.5
Opened 9 years ago Closed 8 years ago #10966 closed (wontfix) Management module imports project_module, considered evil Description I think Django's core.management.setup_environ should stop trying to import the project dir as if it was a module. Currently lines 337-341 read: # Import the project module. We add the parent directory to PYTHONPATH to # avoid some of the path errors new users can have. sys.path.append(os.path.join(project_directory, os.pardir)) project_module = import_module(project_name) sys.path.pop() There is no explanation as to why it's useful to treat the project as a module. Also it assumes that: - there is no and will never be a python module using the same name in any of the current sys.pathdirectories; - the directory name is a valid python module I see no value in treating a mere container dir as a module. If there is one, it could be clarified in the comment, currently it just states what the code does while not really explaining why. I actually have projects where the dir only contains settings.py and an empty __init__.py just to keep Django from crashing. If you don't import apps using your project name as a prefix, the __init__.py file is useless and you should be free to use any directory name you want. If you do use the project prefix, Python will already happily parse the top-level __init__.py for you and I see no point in importing it earlier in core.management. Attachments (2) Change History (12) comment:1 Changed 9 years ago by Changed 9 years ago by Patch to make importing of top-level project conditional on presence of init.py comment:2 Changed 9 years ago by Changed 9 years ago by Patch to make importing of top-level project conditional on presence of init.py (w/o set_trace call :-) ) comment:3 Changed 9 years ago by comment:4 Changed 9 years ago by Another problem caused by treating project as a python module is that omitting the " project." prefix seems to work at first but leads unsuspecting users to traps like executing code twice. Example follows: Assume that the user has " project.app" in INSTALLED_APPS but in some other file uses: from app import models If project/app/models.py contains: print 'this will be executed twice' ...you will of course see two messages being printed as for python project.app.views and app.views are two different modules. Now imagine instead of printing stuff you had signal.foo.connect() in there - this can lead to serious data corruption due to all signals being fired twice. comment:5 Changed 9 years ago by chad@…: You do not need to explicitly import the project as a module. If your settings.py contains project prefix for at least one module ( URLS_CONF, one of the INSTALLED_APPS, etc.), python will already parse the top-level init.py for you. As "old" projects have the project prefix everywhere by default, dropping the explicit import is a backward-compatible change. It's just a matter of documenting the new behavior. comment:6 Changed 9 years ago by I'm open to that. Where would the documentation need to be changed? comment:7 Changed 9 years ago by comment:8 Changed 9 years ago by patrys, Actually, simply removing the __import__ call wouldn't be backwards compatible, because setup_environ has to add the parent directory to sys.path in order for __import__ to work. It then removes this path immediately. The options seem to be: - Add the path and leave it there, but don't __import__. - Don't add the path and don't __import__. - Add/ __import__/remove, but conditionally (per patch). #1: You end up with at least a wart (an extraneous path on sys.path), and at most a bug (if siblings directories of the project are accidentally imported). #2: This breaks the current behavior, forcing users to take the extra step of manually adding their project's parent directory to PYTHONPATH before using their project as a module. I think this is a no-go. #3: I think this is the safest way to go. It exactly preserves current behavior, unless the user takes an explicit step to disable that behavior. chad comment:9 Changed 9 years ago by BTW, until ever this is fixed, you can work around it by monkey-patching setup_environ: from django.core import management def setup_environ(settings_mod, original_settings_path=None): pass # copy/paste and customize management.setup_environ = setup_environ If you do that then execute_manager will call your customized setup_environ instead of the stock Django one. comment:10 Changed 8 years ago by Not sure I see the benefit. django-admin.py creates the project directory as a module. The proposed patch adds a bunch of complication to setup_environ, and the only real gain I can see is that it means you can use 'website.com' as the directory in which you keep your project code. Closing wontfix - please open a discussion on django-dev if you disagree. I agree. I would like to use a Django project directory as the top-level directory for a website on the filesystem, but on the other hand I like to use the domain name of a website as its directory name. Domain names are not valid Python identifiers, so I can't have it both ways without hacking Django. This behavior is also present on trunk.
https://code.djangoproject.com/ticket/10966
CC-MAIN-2018-17
refinedweb
907
65.83
Originally posted by Campbell Ritchie: [QB]Welcome to the Ranch. One of the more interesting questions I have seen recently. Part of your problem has to do with binary number formats. Get yourself a standard principles of computing book, eg Alan Clements the Principles of Computer Hardware [3/e] Oxford: Oxford University Press (2000) page 175-184 (there is a 4th edition which came out in 2006). So, -48 in a byte, and +208 in an int use the same bits. That is why you are converting -48 to 208, and if you try casting 208 (int) to a byte, (as far as I remember) you will get -48. I think you are correctly converting your int number to a byte[] array; you are converting it back into a different format. Not sure now how to convert the -48 which is 1101 0000 as a byte to what it should be as an int, ie this:- 1111 1111 1111 1111 1111 1111 1101 0000. Originally posted by Henry Wong: My questions is ... what is the purpose of this excercise? If it is to understand two's complement, or if it is a homework assignment, then by all means, what you are doing is perfectly fine. There is no better way to understand bits, than to do low level manipulation of them. However, if the goal is merely to extract the individual 4 bytes from an int, or to create an int from 4 bytes, as part of an actual program in production, this may be the long way to do it. Converting an int to a byte array, and back, doesn't take bit manipulation, and it is built into the core Java libraries (as of Java 1.4). import java.nio.ByteBuffer; public static byte[] int2bytearray(int i) { byte b[] = new byte[4]; ByteBuffer buf = ByteBuffer.wrap(b); buf.putInt(i); return b; } public static int bytearray2int(byte[] b) { ByteBuffer buf = ByteBuffer.wrap(b); return buf.getInt(); } Henry
http://www.coderanch.com/t/406929/java/java/Convert-negative-integer-byte
CC-MAIN-2014-52
refinedweb
329
69.82
06 February 2008 17:36 [Source: ICIS news] ORLANDO , ?xml:namespace> "Not only the EU industry, but the concept itself of biodiesel worldwide - except for the The EBB has long railed against US exports to the EU, which surged in 2007 to average more than 80,000 tonnes/month from April onward. That compares with a monthly average of less than 20,000 tonnes in 2006, according to figures presented by Ward. In December, the EBB said it had decided to lodge a joint anti-dumping and anti-subsidy complaint with the European Commission, possibly supported by the World Trade Organisation (WTO) at a later stage. "There will be an official complaint," Ward said. "It is in the process of being put together." Ward said the intent is not to protect the European industry or to shut off Mandated biofuels targets currently under negotiation will in practice create a target of 25m-28m tonnes of biodiesel in the EU market in 2020, he said. "The EU readily accepts that part of its target will be met with imports," Ward said. Bookmark Simon Robinson’s Big Biofuels Blog for some independent thinking on biofuels
http://www.icis.com/Articles/2008/02/06/9098908/us-exports-to-eu-threaten-global-biodiesel-ebb.html
CC-MAIN-2014-49
refinedweb
193
59.23
I say (mostly) because I'm sure someone can come up with a scheme to break this, but it should be flexible enough to cover 80% of cases, including PSR-0, and if you can come up with a way to store classes this can't handle you can write your own autoloader. Well, if this one is writable... This at the moment is a thought exercise. The factory of the autoloader is given the directory or directories to search for files. Using glob it slurps in all files matching a pattern, default *.php (though *.class.php or *.inc will likely be popular). Then, one file at a time, it uses regex to find the namespace declaration of the file, if any. If there are multiple namespaces (the programmer used the less often invoked namespace { } construction ) the file is divided into it's component namespaces. Again, using regex, we search for the pattern /class $ /. Each class is appended to the namespace it is found in and added to an array. If duplicate classes are found the autoloader fails with an error (this is one of the cases in the 20% I'm not touching) telling you which two files have identical classes.? Or would it be better to continue but to refuse to autoload either class ?? Or proceed, first class found only ?In all cases, an error E_USER_WARNING at least should be raised, if not an exception thrown or fatal error. Once all the classes are found, the array is passed to the actual autoloader. This object needs to be cachable to be effective, as no sane live system would be responsive with that much file scanning occurring each page load. Note that in the keys the class / namespace names will be passed stored as typed. When the autoloader compares it will make a case sensitive check first, but since PHP doesn't require class identifiers and namespaces to be case sensitive it will make a second case insensitive check. If it finds the class this way it will throw an E_STRICT ? would it be better to forego doing that and just store the class / namespace paths under strtolower() and make all the checks case insensitive? I have a working autoloader that mostly works this way - using a file system scan to find class files - but it doesn't analyze file contents and depends on the convention that namespace significant directories will have a .ns extension. The system above however is foolproof enough to deal with the poorly thought out PSR-0 standard and also load most class hives that don't follow the standard. (The reason I call out that standard as poorly thought out is there is no way to determine, from the file's position in the file structure, what the class name is going to be - yet changing a file's position in that structure forces you to edit the class' name. It's a double whammy of code inflexibility for no real gain). That sounds like a classmap autoloader. For example, EDIT: It looks like Composer can generate the classmap for you. The class name and the file name always match. It would force you to edit the class's namespace. In short, Namespace\ClassName === filepath/filename.php. I know of a couple people who find this kind of system restrictive. Though, personally, even if the autoloader didn't require this kind of correspondence, I would do it anyway. If classes can be logically grouped in a namespace, then why wouldn't I also logically group them in a directory? If I recall correctly, even PEAR worked this way, albeit with underscores as pseudo-namespace separators. To me a true match must be symetrical. If A = B then B = A, for all values A and B. This isn't true with PSR-0, and further there's the issue of case sensitivity in file systems but not in the language itself. This is why I level the accusation that it's an ill-thought out standard. First, most file systems are case sensitive. PHP class identifiers are not. Therefore to PHP \myNamespace\myClass and \MYNAMESPACE\MYCLASS are the same thing. On Unix systems /myNamespace/myClass.php and /MYNAMESPACE/MYCLASS.php are not the same files. That said, PHP's penchant for allowing such nonsense is a design flaw that can't be corrected due to massive BC breaks anyway, and the argument can be made that using multiple cap styles in code for the same class is bad practice because, well, it is. But that isn't the largest problem. The largest problem is the standard doesn't create a one to one mapping of file structure to class names. Given file structure /vendor/package/array/model/class Are we talking about \vendor\package\array\model\class\vendor\package\array\model_class\vendor\package\array_model_class Or even (unlikely) \vendor\package_array_model_class In PSR-0 it is impossible to determine the class name for a given file path. But you still have to modify a class' name if you move it in the file structure because the file path is significant to the class name and the PSR-0 compliant autoloader's ability to find it. No. I thought it was that way too until I read it more closely while trying to implement it. There's a huge issue of underscores in the class names as outlined above. True. That said, PSR-0 has you go to the trouble of implementing such a structure, then fails to reward you for it by making it impossible to determine what a class' name is from looking at it's position in the file hierarchy. Not sure what you're referring to here. The underscores? Technically this issue persists all the way back to PEAR standards. But in practice, it's never really been a problem. Probably because developers adhere to coding standards, which includes casing (e.g., StudlyCaps). I have to grant you this one. The underscore behavior was included for backward compatibility, so that classes such as Zend_Email_Smtp could still work. Though, mixing real namespaces with pseudo-namespaces is something I've only ever seen in hypothetical criticisms. I've never seen or heard of this causing any problems in practice. Nonetheless, a new PSR autoloader is being drafted that has dropped support for PEAR-style pseudo-namespaces. Why would you want to? Autoloaders start with a class name then try to find its file. Not the other way around. PSR-0 never intended nor claimed to provide this "feature." Well... yeah. The gist of PSR-0 is namespace == file path. It's popular because it's simple, and because it's what we would do anyway. If a class logically belongs in a namespace, then it logically belongs in a directory of the same name. Not true. There's more than a few autoloaders out there that scan the directory the classes should be found in, build an array map, then cache that map for later use so that each class load request doesn't require a disk scan. PSR-0 never intended nor claimed to provide this "feature." It is a legitimate approach to the problem beyond the scope of the short sighted PSR-0 standard. As such, it's a bad idea and a bad standard. I hope it doesn't infect the core, although if it does it will certainly won't be PHP's [worst [url=]mistake [url=]ever](). Those are classmap autoloaders... which PSR-0 isn't. It seems as though you're criticizing a non-classmap autoloader for not being a classmap autoloader. Your spec seems to say that a given class can only exist in location in the searched directory structure? If that is is the case then that puts me in the 20% group right away. I'll often have several layers where classes in the upper layer will override the classes in the lower layer. I control the order in which layers are searched by the autoloader so it works fine. Your spec calls for the use of gob to scan files. As a long time users of Solaris I can assure you that that gob is unreliable in many non-gnu unix systems. Your fix for the case sensitivity issue seems to introduce yet anothe files system issue. Again, 20% for me. Your systems seemed intrusive for regular development in that any change to a class mapping will require regenerating the autoload map. You would really have to produce an incredibly efficient cross-platform scanner that won't hinder the developer. The complexity of your regex processing would make it a show stopper for me. Contrast it with the 10 lines or so of code needed to make a minimal psr-0 based autoload implementation. Feel free to prove me wrong on this. Your spec clearly focuses on php classes which is fine. But psr-0 can be applied to other resources such as template files. You can get carried away with trying to take it to far but it actually works quite nicely. Many psr-0 based autoloaders currently exist and are very widely used. In fact I would estimate that their applicability rate is close to 95%. Someone would really have to produce some code based on your spec before it's advantages will be fully appreciated.
https://www.sitepoint.com/community/t/a-crazy-idea-for-a-mostly-universal-autoloader/34632
CC-MAIN-2017-09
refinedweb
1,562
72.56
Hi, I would like to ask you for help because I've read a dozen of similiar topics about c++ building problem and still can't figure it out. I am using Windows 7 x64 and have already installed, sublime text 2, MinGW, also set PATH for minGW in system variables, but it still does not work. As I am pretty newbie, I'm probably gonna pulling my hair out because every time I try to compile the simple "Hello World" program, get this : [Decode error - output not utf-8][cmd: [u'g++', u'C:\\Users\\Kompik\\Desktop\\skuska.cpp', u'-o', u'C:\\Users\\Kompik\\Desktop/skuska']] [dir: C:\Users\Kompik\Desktop] [path: C:\Program Files\Java\jdk1.7.0_05\bin; C:\MinGW\bin] [Finished] I am so clueless about this things, so please be patient. Thanks. Appreciate it. Creck In the console it says that there is a decoding error on your file: It should bring you to the next step. thanks for reply thekyz, but still got the same error however, here is the code which I am trying to run, hope it's written well... #include <iostream> using namespace std; int main(void){ cout << "Hello World" << endl; system("pause"); return 0; } This is far-fetched but I got a similar problem because mingw would use localized versions of the error & somehow the parser would fail on accentuated characters.Your original code displays an error when compiling because, well, "system" doest not exist in your scope: C:\dev\tests\main.cpp: In function 'int main()': C:\dev\tests\main.cpp:7:18: error: 'system' was not declared in this scope [Finished in 0.2s with exit code 1] Try compiling this instead: #include <iostream> using namespace std; int main(void){ cout << "Hello World" << endl; return 0; } Edit: If this works try adding/editing the environment variable LC_ALL to force english as a language for the compiler:LC_ALL = en_US.UTF-8 It worked for me!Thanks you so much!
https://forum.sublimetext.com/t/c-problem/6143/3
CC-MAIN-2016-40
refinedweb
331
59.64
)? I just did a brute force, and it took me 17 minutes. I got hung up on the pattern/regex part. Yours is prettier too. Oooo, the pain! I was expecting more than winner for some reason. December 12, 2007 at 11:50 pm Hmm, stupid markdown ate half my code. Trying again: class CarTalk def initialize @str = ‘123456789’ @winners = [] end def check_result( pattern, a, b, c, d ) formula = “#{a} #{pattern[/(.)../,1]} #{b} #{pattern[/.(.)./,1]} #{c} #{pattern[/..(.)/,1]} #{d}” result = 0 eval “result = #{formula}” puts formula + ‘ = ‘ + result.to_s @winners << formula if result == 100 end def run workstr = @str.dup for i1 in 0..(workstr.length-4) do slice0 = workstr.slice(0..i1) for i2 in (i1+1)..(workstr.length-3) do slice1 = workstr.slice(i1+1..i2) for i3 in (i2+1)..(workstr.length-2) do slice2 = workstr.slice(i2+1..i3) slice3 = workstr.slice(i3+1..workstr.length) check_result ‘+–‘, slice0, slice1, slice2, slice3 check_result ‘-+-‘, slice0, slice1, slice2, slice3 check_result ‘–+’, slice0, slice1, slice2, slice3 end end end @winners.each { |f| puts “#{f} = 100!” } end end CarTalk.new.run December 12, 2007 at 11:50 pm Here’s my entry, in JS. Requires prototype.js. String.prototype.insert = function(i,s) { return this.substring(0,i) + s + this.substring(i); } $R(1,8).each(function(m1) { $R(1,8).each(function(m2) { $R(1,8).each(function(p1) { var x = “123456789”.insert(m1,”-“).insert(m2+1,”-“).insert(p1+2,”+”); try {if (eval(x) == 100) alert(x);} catch(e) {} }); }); }); December 12, 2007 at 11:50 pm I guess you meant “I was expecting more than one winner.” Yeah, me too. Actually, the reason I say “puts “#{exp}=#{x}”“ even though x is always 100 is that I first ran it on all 168 combinations just to see. And I just fiddled with my code to find that there are only 2 duplicates (both negative): -355=["1-23+456-789", "12-345+67-89"] -610=["1+234-56-789", "12+34-567-89"] December 12, 2007 at 11:50 pm Here’s mine, brute force too. However, my algorithm does have the benefit of being able to work on any arbitrary set of numbers, of any size or in any order. a=[] i = 1 0.step(17,2) do |index| a[index] = i a[index+1] = ” i = i + 1 end combos = [['-','-','+'],['-','+','-'],['+','-','-']] combos.each do |combo| 1.step(16,2) do |index1| a[index1] = combo[0] (index1+2).step(16,2) do |index2| a[index2] = combo[1] (index2+2).step(16,2) do |index3| a[index3] = combo[2] expression = a.join(”) sum = eval(expression) p “#{expression} = #{sum}” if sum == 100 a[index3] = ” end a[index2] = ” end a[index1] = ” end end December 12, 2007 at 11:50 pm This was fun… December 12, 2007 at 11:50 pm I was going to parameterize this more, but it would have sacrificed readability, so I didn’t. I’m surprised nobody else tried inserting the operators and evaling the string. Came out nice and compact. December 12, 2007 at 11:50 pm Huh? All of us evaled the string, and Erik did an insert. (The rest of us did an append, which is arguably equivalent.) Looks like the insert method is more compact, and as readable, so I think you and Erik get the prize. Which is… nothing! Congratulations! December 12, 2007 at 11:50 pm Oh, oops. Good point. Well, it was really late when I did the challenge, and I didn’t read them to avoid prejudicing myself. :-) More what I meant to say was I was surprised more folks didn’t just manipulate the string directly, then eval that. But as you point out, that’s pretty much what Erik did. I will be happy to share my prize with him! December 12, 2007 at 11:50 pm …of course his is JavaScript, and this was supposed to be a Ruby challenge… He could at least have done it in rjs… ;-) December 12, 2007 at 11:50 pm Actually, Erik, me, you and Yogi all used an eval approach. Only Dav and Alex didn’t. I think this is a telling statement on how someone approaches a problem. I personally was never good at math, so I definitely went for the eval route. I’m all about the string manipulation, I guess it comes from writing too much REXX at IBM back in the day :) – Chad December 12, 2007 at 11:50 pm Oh yeah, I was supposed to do it in Ruby. Um, just pretend that it was all wrapped in <%=and %>:) I’m suprised that my JS implementation was shorter than any of the Ruby implementations. As much as I like JS (ducks), I find that Ruby code is usually shorter and clearer than JS code. (Perhaps I just took more shortcuts than the other contestants…) Since I didn’t follow the rules, I concede the prize to Ian. Ian, don’t ever say I never gave you nothing :) December 12, 2007 at 11:50 pm Here’s what I came up with in 10 minutes to get the answer…. Erik’s JS inspired me to write this 2 liner (not going over 80 cols) December 12, 2007 at 11:50 pm doh, just realized the i.succ and j.succ are unnecessary and would miss answers other than 100 by always keeping sign order the same. shameful exit December 12, 2007 at 11:50 pm Another 2 liner… that uses inject! December 12, 2007 at 11:50 pm This took much longer than the allotted 10 minutes – but its the distillation of my initial idea: permute the array of operators and merge it into the array of numbers. It gets ugly due to an eval failure when an operator is past the last digit. If we only had Array.permute(&block) then I think it could be much smaller… December 12, 2007 at 11:50 pm I just came across this somewhat randomly. I didn’t time how long it took, but I came up with almost an identical solution to Alex’s original. With a few renamed variables to make it consistent with Alex’s solution: (2..9).each do |plus| (2..9).each do |minus1| next if minus1 == plus ((minus1 + 1)..9).each do |minus2| next if minus2 == plus result = eval(expression = (1..9).inject([]) do |expr, digit| expr << ” + ” if digit == plus expr << ” – ” if digit == minus1 || digit == minus2 expr << digit end.join) puts “#{expression} = #{result}” if result == 100 end end end September 21, 2008 at 7:36 pm Here’s a different approach: begin s = ‘123456789’ 3.times { |n| s.insert(rand(s.size), %w(+ – -)[n]) } end until eval(s) == 100 puts s September 22, 2008 at 7:09 am Markdown took out the percent sign in front of my “w”…. September 22, 2008 at 7:13 am
http://pivotallabs.com/ruby-puzzler/
CC-MAIN-2015-14
refinedweb
1,139
75.5
Metallica Remains Silent 330 As you may already know, 30,000 Napster users have appealed to Napster on the basis that they feel they've done nothing wrong in the recent Metallica-inspired crackdown on accounts. Rap artist Dr. Dre has turned in his list to Napster, and we can only assume that there will be appeals there, too. Also, after numerous attempts and promises from Metallica's publicist, we still haven't gotten Metallica to answer the questions that our readers asked on May 4th. We have made several good-faith efforts to work with Metallica and their publicist, but it looks like they're never going to respond. On the lighter side, The Onion has posted the sad news about Kid Rock, and someone sent this image to us. [Updated 18 May 2000 7:40 GMT by timothy] Metallica's publicists have promised to try to get our questions answered "early next week," and that would be both more fun and more satisfying for all involved, I'm sure, than stony silence and accusations. Attn: Lars: The real debate is online :) Re:They should sue Micro$oft too (Score:3) The obvious answer... (Score:2) I'll grant you that freenet is still a work in progress, and that its anonymonity features may not be perfect... But,like cryptography, it doesn't have to be PERFECT. It just has to be good enough that breaking through becomes more trouble/expensive than it's worth. (very hypothetical example here...) After all, if it turns out that it takes the NSA a week on a Cray to break the crypto key and expose a raw IP; do you think for a second that the NSA considers it worth their computer time to help a bunch of burned out metalheads harass their "fans"??? john It already happened. (Score:1) The hurting, the hurting... Re:They're afraid. (Score:1) I know that hot grits down my pants would stop me from being rock hard... Oh, you said "hard rock". My mistake... Napster should be shut down (Score:1) How can a company be allowed to exist when it's sole purpose is violating copyright laws? This isn't about the freedom of information, it's about getting music people are too cheap to pay for. Instead of whining about how expensive and unfair CD prices are, why don't you let artists and record companies know you're willing to buy CDs at $5/CD instead of $15-18/CD? Hell, last night I bought 12 CDs for $126.xx. If you know where to shop, you can get them at much less than full price. (Although I'd much rather cut out the record companies and pay the artists directly.) "That car is too expensive, and that's unfair, I think I'll steal it!" This is no different. People need to grow up and start telling artists to find a better distribution model. If you downloaded an album, it could let you listen to it a few times, and then pop up with a dialog box, "Send $2 to the artist?" I know I'd be happy to pay 20% of what I normally spend on an album. 450 CDs in my collection and growing... Re: (Score:1) Re:md5 sums are a joke - easily gotton around (Score:1) Thinking about it, if Napster really wanted to try to show itself as being responsible, they should start incorporating the signatures into their software to make it easier for artists to opt themselves out of their "service". An artist could just call them up and say hi, i'm so and so and i'd like you to block all of my songs from being downloaded, except for these 3 specific ones, which i want to distribute on Napster. It's completely managable and feasible... Re:Did Mozart sue his fans? (Score:1) They're not making much cash at the moment as they are both still in school, taking A levels (UK exams at 18 years old), which takes a large amount of their time, but both could probably support themselves on the level of income they could get if they where gigging full time. This is without any distribution of recorded music, just on word of mouth and a few demo CD's that are sent around to tour promotions people. Re:Metallica needs to fire their lawyer... (Score:2) If I am wrongly accused of a normal crime, I have channels I can go through to see recompense. What recompense does DMCA allow? Any? Re:Don't forget Trent Reznor (Score:1) Lars's 1040 form? (Score:1) My 2 bits. - REv. Re:The damage has been done (Score:3) Technically, I have to concede this point. I do not, however, agree with them. Their efforts in this regard indicate such a lack of understanding of the current state of technology that i wonder if they're still using 4-tracks to record their work. i like their music too, but if i intentionally illegally copy their work then i must suffer the consequences. i don't like their music any more. your masochistic overtones indicate that you are a troll, whether you know it or not. fuck it, i'll bite. if i intentionally copy their work it will be solely as an act of civil disobedience to demonstrate the sheer stupidity of attempting to treat information as physicaly property given the ease of duplication. people argue over whether or not "information wants to be free." information already is free. there is no room for argument on this point. anyone trying to treat it any other way is living in the past, denying reality, and will be appropriately left behind as the revolution moves forward. </rant> Anthony Think MyMP3.com (Score:3) Yeah, kinda sounds like MyMP3.com [slashdot.org] doesn't it? You know, where they could determine that I actually had the CD before I could listen to the MP3? Of course, what sounds like a rational idea to 99% of humans ends up being shut down by RIAA [mp3.com]. The RIAA and their members aren't going to make anything available online until they figure a way to screw you at least as badly as when you buy a CD. Re:how does napster make money? (Score:3) I'm not sure who's "paying the bills" right now, but I'm sure the long term goal is to set up Napster as a web-based equivalent of a brick-and-mortar record label. More people certainly know about Napster than Gnutella, etc. They mention "proprietary MusicShare technology" that their client uses, so I'm sure they could try to parlay that into some kind of subscription-based service. Remember that all these software clients are just at the beta or preview stage, so once they are finally at the release stage, they could also sell the client software for profit. And, since they control the database of MP3's, they could easily make it so older/beta clients would no longer work. Re:30,000? (Score:2) That "notice" was propaganda, designed to frame the issue as Metallica vs Users, instead of Metallica vs Napster. Unfortunately for Metallica, and especially bad for the RIAA, the badly written DMCA appears to be firmly on Napster's side. They are complying with the law fully. When the RIAA wrote the DMCA and presented it to Congress to rubber stamp, the ISP provision was intended to protect themselves, and the rest of the members of the long-established good-old-boys media-conglomerate club. They never imagined that an outsider company like Napster would be able to use it to protect themselves against attack by the Entertainment Trust. Not their first mistake, and probably not their last. And Dr. Dre Said... (Score:3) Ok, now *I'm* violating copyright for quoting Eminem, right? Oops. Raptor The damage has been done (Score:3) The damage has been done; I can't say I feel sorry for them. Re:Did Mozart sue his fans? (Score:3) I can just see it now.... "Hush little baby don't say a word And never mind that noise you heard It's just the beast under your bed In your closet, in your head! Exxon Gas! You car'll go fast! Funnnncoland! And Disney're sponsoring our band!" I honestly shudder at the idea of corporate patronage being the trust behind advancement of the arts... :) I was just thinking about that (Score:2) When did Metallica turn into such wussies? (Score:2) Fucking cowards. If you were half the men you were back when you had to work for your "art", you'd have the guts to face your fans. On the off chance that anyone from Metallica or their management is reading this... you've just lost a fan who has been with you for 15 years. I will not buy the music of a bunch of cowardly has-beens who will lash out at their own fans through the long arm of the Authority Figures you so boldly pretend to stand against, but don't have the guts to speak to those same fans face to face and answer our honest questions. Has-beens. If you ever really were what you posed to be at all, and not just puppets on strings. -- even easier than that... (Score:4) - A.P. -- "One World, one Web, one Program" - Microsoft promotional ad Re:The damage has been done (Score:2) Dr Dre and Metallica: THIEVES (Score:2) Dr. Dre just hired the same outside contractor as Metallica to identify his on-line fans so he can have them banned from Napster. I doubt that this contractor did the work for free for either of them, yet Metallica and Dr. Dre want the courts to force Napster to do the identical work without compensation. They just want a free handout. The law clearly says that it is their responsibility to identify copyright infringement, yet they want to force Napster to do their work for them, and they don't want to pay for it. That makes them THIEVES. deluded (Score:2) I can't say that I agree. In fact, I think you're dead wrong. Many Metallica fans have stuck with them since the 80's and into the 90's and agree with them in their quest to stop the piracy of their music. I'm one of them. I hate to say it, but I hope we don't win. (Score:2) I fully support MP3.com, who has been honorable and actually provides original CDs. They have been sadly grouped with Napster mainly due to the fact that they both provide MP3s. Supporting Napster to me is like supporting Cable Descramblers. It's kind of neat, but I feel kind of funny (that funny feeling means it's WORKING!). On another note, as we have seen before, Metallica is a puppet, strings attached, and I think we are pestering the wrong target. Why don't we try to pull the weed up from the roots? Let's ask these questions to the recording industry! Hmmm... too much caffeine? -Effendi Re:The damage has been done (Score:2) Master of Puppets, the background song, is a Metallica song of the album titled Master of Puppets. And it probably was the actual song The sucking cock reference would be that their musical style changed quite quickly in the early 90s I believe, from very heavy to more mainstream. Personally I like both, but Metallica was labled as sellouts by many people for cutting their hair of all things. Bah. And thank you for watching A History of Metallica. Heh. Re:Naspter needs people sharing copyrighted materi (Score:2) Not their job. The DMCA makes it clear that it is the responsibility of the copyright holder to notify Napster of violations. That's what's so delicious about this. The law is malfunctioning exactly as designed. I'm sure the RIAA would be more than happy to provide them with a list of copyrighted songs. Song titles are not copyrightable. Next time you're in a record store, thumb through the Phonolog. Most song titles have multiple entries -- because songwriters tend to re-use the same song titles over and over again for different songs. Good move Dr. Dre (Score:2) Re:CDs are not overpriced (Score:2) BTW, the labels were accused of pricefixing and recently settled with the Justice dept. HellO? brain in there? Offering Metallica songs for Upload (Score:2) This man is a fool. Additionally, what's to stop the profusion of the warez naming convention arising? How long before m3t4771c4 or similar is de-rigeur? Metallica's punishing of enthusiasm... (Score:3) Surely such energy could've been harnessed for the betterment of everyone involved. Why not work with the fan community rather than against it? Funny Metallica Napster Spoof (Score:2) They don't have a legal leg to stand on.. (Score:2) haha, gnutella's revenge... (Score:2) -elmo Metallica is a bunch of whores. MTV is the pimp. (Score:2) I used to be one of Metallica's biggest fans. In 1989 I won a particularly grooling radio contest revolving around Metallica trivia which basically boiled down to me getting: It's kind of ironic. On the "Two of One" video, Lars makes some kind of rant about how MTV sucks and this is probably the only video they'll ever make. Of course, now every time Metallica comes out with a new CD, they are bending over for MTV and doing promos left and right. You see their videos all the time. They all got haircuts, and became good little MTV soldiers. When I met them, I could see the fame getting to Kirk first. He wanted nothing to do with the fans. He hid in his dressing room and only came out to get a fresh batch of women. Lars was just the opposite; the girls were on him, and he said "These other people are waiting patiently... have some consideration." The man who impressed me the most at the time was Jason; he and I split a hoagie and shot the bull about who knows what. He seemed real down to earth. Of course, he hadn't yet had a chance to let the concept of fame and fortune sink in. Fast forward 11 years. The fans mean nothing. MTV airtime and record sales are everything. Most of the people downloading Metallica MP3's (myself included) are likely to own legal copies of the music that they are downloading. In my case, it's faster to download than to rip it myself. If I'm on Metallica's Black List, let them come, I am legally covered. What I have gotten out of this is a real distaste for Metallica. Their attitudes about the establishment were apparently as big a draw as the music itself. Now that they are puppets of the establishment that they used to sing against, going after their own fans, the music has lost its appeal. I've got no interest in their music anymore. This reminds me very much of the big baseball strike of a few years back. I used to have season tickets behind first base for the Phillies... now I have zero interest in professional baseball. Instant assholes. Just add fame, fortune, then stir. Re:binaural beats (Score:2) Banned? Reinstate yourself! (Score:2) Napster hack [roms4all.com] Why should they? (Score:2) Perhaps they didn't like the obvious rudeness of some of the messages. After all, nobody likes to have insults hurled at them and questions couched in inflammatory language thrust in their direction. I think they chose not to answer because they didn't want people to find out the extent of their dealings with the industry in suppressing speech and information exchange. In short, they didn't want people to see them as hapless stooges with no real understanding of the issues. Metallica has a legitimate case: many people are illegally distributing their work. But the erosion of the right to free expression--a right that is fundamental to the nature of the Internet--is not the way to combat the problem. Re:Interview with LARS (Score:2) "In five years there will be software available to download movies." But can YOU survive Metallica's lawyers? (Score:2) As of now no one has personally been sued because of Napster, Scour Exchange, etc. That however, is going to change and programs like Gnutella are going to force that change. The scary reality is that Gnutella is going to force artists to go after the individual user who is pirating their music. It is true that Metallica has said they will not go after the individual person, but that doesn't mean the next artist won't. I think things will change severely if people themselves are dragged into court because of copyright violation. Gnutella and its clones are backing artists into a corner, and pretty soon they are going to come out swinging. It won't be pretty. Flash Animation about Metallica vs. Napster (Score:3) (And yes, I know you're likely to have to reboot or go to someone else's machine to view the animation, but trust me it's worth the effort). Mike md5 sums are a joke - easily gotton around (Score:3) easy way to get around it: append 1 second of near silence to the end of the song and voila; the md5sum is now different. rename the file slightly and its impossible to tell which song is a literal copy of a cd and which is 'almost the same'. music industry still doesn't get it. price the music realistically and the "crime" will go away. just like booze in the early part of this century. -- Also on the lighter side... (Score:2) What Happened? (Score:5) But as will all things, the rebels become conservative. Metallica isn't worried about changing the world, they just want their piece of the pie. They've become part of the status quo. It's the same with Dr. Dre. Wasn't he supposed to be a bad gansta from da hood? For anyone who didn't know it already, I think these debates have pretty much revealed him to be no different from any of the other so-called artists. Art is about art, not money. Ask the great painters and composers and sculptors who died poor and alone. Requests for further artist starvation campaigns (Score:2) Those of you using Napster, please target the following artists for starvation: I promise to make it worth your while. Thanks for all your help on Kid Rock. Keep hope alive! Maybe so... (Score:2) Profit is for here and now. Making something that is =good= requires something for the future. Just looking in the here & now will get you nowhere. I think Metallica's attitude to their music is commendable. I think they'd have done everyone a favour thinking more carefully about MP3's and Napster, though. BUT IT IS STILL THEIR MUSIC! They can release it under whatever licence they choose! Same as any Open Source programmer. To argue that Metallica should not restrict binary copies of their music is stupid. The GPL does it all the time! So what's your problem? Re:The damage has been done (Score:2) -- Heh. (Score:4) I have to shrug and cheer on the napster kiddies- even though they're being dumb- honestly, there's lots of good music out there _already_ being made by people who understand this stuff. The big record companies, the MTV bands, are just locked in a sick codependent relationship and it's dumb to support it at all. People are frothing at the mouth over the 'right' to download metallica for free but... why Metallica, exactly? What have they done, what has Dre done that's so great? Open your mind, listen to other music- there is SO MUCH music out there of all kinds and people still fixate on what they are fed, like Windows users. Still, whatever: never try and teach a pig to sing, etc. The last time I posted to an mp3 thread on Slashdot, someone or other pulled me aside (in ASCII) and said, basically, "Give it up- people don't want to listen to you because you AREN'T metallica, you're wasting your breath". And certainly I've seen some evidence of that. But I've also occasionally seen a person or two like what I have to say, or like the music I pointed them at. Turns out I had some decisions to make- am I doing it to beat Metallica, or am I doing it for me, because I make music like some slashdothackers write code? I chose the latter. So, I went quiet for a bit, rather than arguing loudly that I ought to be listened to seven times in every mp3 thread. And since the last time I posted, I cut an entire new album, "Cirrus" [mp3.com], which is the anti-metallica ;) it's ambient music, with more of an edge to it than your usual musak ambient stuff, done with a synthesizer I took apart and hacked with the electronics of. I finished up the "Dragons" [mp3.com] album, and made the CDs of both Cirrus and Dragons available (they're $5.99: a previous poster thought all CDs should be under $5. I'd do that in a heartbeat but $5.99 is as low as mp3.com will allow me to go- still beats $17, doesn't it?), and "anima" [mp3.com] is still there, and "Extended Play" [mp3.com] and "Hard Vacuum" [mp3.com] (I wish the confounded site would put anchor points in so I could have these links refer to the spots on the page where the songs are) and I even went back and put up 700x700 cover jpegs of all my covers. This lets you see what the CD will look like a little better- and can also be used if people want to just download the songs and the cover and burn the CD themselves (which I am happy to let people do- that's why I'm making it so easy to do). And, after about two days of rest, I'm going back into the studio to do yet another album. These days I prefer to just DO MUSIC rather than bitching about Metallica. If you think my music sucks, check again in a week and I'll have done something else. Check again in a month and God knows what I'll be up to. If you haven't checked in a week or a month, there's new stuff. It's like any form of art (or indeed the art of programming)... you learn by doing, not by arguing about it. These days I get really crappy page stats, the idea of 'push' marketing totally failed me. When I stopped pushing, people stopped showing up. So I'm giving up and going with 'pull' like I should have all along- just plain trying to do good music, lots of it, huge amounts of it with something in it for just about anybody. Every now and then I'll mention that somewhere (like I'm doing now) but don't expect a recurrence of the BUY MY ALBUM [mp3.com] stuff- that was fun but the time I spent doing it was time not spent doing more music. Sorry guys- not optimal. You may be on top of the heap now, you may be in a position to turn the screws on your fans and squeeze money out- I'm in no such position- but check back in ten years and we'll see who's better. You keep right on playing with lawyers and I'll keep on playing guitar and bass and programming synthesizers and stuff... and I can only say, in all honesty, I don't think I will ever, ever need or want to be as stupid and shortsighted as you are being. Get back to the music- or get pushed out of the way. It might take a while- that's OK, I and a legion of hipper mp3-oriented indie musicians have all the time in the world, and we're not tied up with perverted entertainment industry contracts like you guys are. Enjoy your glide back to the bottom, 'cause there's plenty of air beneath your wings but there's no power in your engines. (heh, thinking in aircraft metaphors- as it happens the next album I'm doing is on the theme of cool WWII aircraft :) ) Cheers, all the slashdotters who've checked out my music- and all the slashdotters who haven't and won't :) 'cause we're all in the same boat, really, aren't we? Re:how does napster make money? (Score:2) Another funny thing is when you watch what files the beta client is acessing you'll see that it reads your MS-aIEeeee! cookies, history and cache datafiles. Re:Can't make a new Napster username... (Score:2) -Spazimodo Fsck the millennium, we want it now. Re:Lars's 1040 form? (Score:2) ...phil Re:Not just Metallica happened... (Score:2) Microsoft, on the other hand, got a lot of bad press, when Bill Gates commented that they would NOT give ANY money to any charities any time soon. What are you talking about? Microsoft gives huge amounts of money to charity. Dr. Dre and "The Quote" (Score:3) "Dr. Dre has requested, however, that Napster simply delete his works from their directory rather than blocking users from using the service at all." I'm sure Dr. Dre is going to get raked over the coals for this. To be fair, it's possible that he meant to block at the directory level, rather than simply deleting users. Honestly, it's a little disingenuous for Napster to claim that they can't block individual music at the directory level. They certainly could look for all the Dr. Dre songs and block those individual titles. There's not going to be that many combinations. Yes, users can just rename the files, but it's a war of attrition that Napster will eventually win. Eventually, the renaming will get unrecognizable, and people won't be able to find the songs anyway. In any case, none of this is going to stop Gnutella anyway. But I predict that Napster is going to go down. -- Another funny picture (Score:2) Napster Hitting Mainstream Press (Score:3) No ethical imperative on the part of Napster (Score:2) I disagree. The enforcement of Metallica's copyrights is not the job of Napster. Napster has no legal or ethical obligation to perform copyright enforcement services on Metallica's behalf without compensation from Metallica. The DMCA says so. The RIAA, and all of the record companies paid a lot of money for the law, and they must abide by it. The law clearly places the responsibility for notification infringement on the copyright holder. Napster has complied completely with both the letter and spirit of the DMCA in every way. Whether the DMCA is an ethical law is another question. But to continue Microsoft includes a "Network Neighborhood" feature with Windows that allows two people to play MP3s from each other's computers. This creates no ethical imperative on the part of Microsoft to develop a "blacklist" of filenames that may not be shared in the Network Neighborhood. The FTP program can be used to transfer MP3s back and forth, but the various companies that provide network software have no ethical imperative to employ elaborate content checking on the part of third party copyright holders who do not pay them. In fact, Napster can be and is used for completely legitimate, authorized trading of copyrighted songs. Many bands, including Metallica, have authorized the free trading of concert recordings by their fans. Other bands have made studio recordings available freely as MP3s for promotional purposes -- just as the entrenched record industry uses promotional records and other materials for exactly the same purpose. The purpose of Napster is to facilitate legal activity, just like the purpose of the Network Neighborhood is to facilitate the legal activity of authorized data transfer and file sharing. The actions of Napsters' users no more reflect on Napster then the actions of someone who robs a bank and uses a Ford as a getaway car reflect on the Ford Motor Company. Napster knows there are copyright songs on there. It knows the law is being violated. They just don't care because they rely on users sharing copyrighted songs for the majority of their userbase. Well, that's your opinion on Napster's motivation. My opinion is that Napster is probably resisting demands to regulate content because the law says that once you start regulating content, you become responsible for that content. This seems more likely to me then your theory that their primary motivation is to facilitate criminal activity. Did I say song titles? I said SONGS. You even quoted me saying songs and not song titles. You're looking for a technical loophole, and that's dishonest. First of all, the majority of mp3s list the artist in the filename (for the exact reason you state above). Second, most people share multiple files from the same artist, so that could be a secondary check. Finally, a person could simply download the file and check it manually as a last resort. I'm not being dishonest. I'm simply one step ahead of your argument. It isn't a technical loophole. Your theory is fundamentally flawed. You can't identify a song without listening to it. MP3s are, as you said, identified by their filename -- presumably their song title, possibly including the name of the artist. For Metallica to demand that Napster ban a song title that they happened to use is Metallica claiming an intellectual property right that they simply do not have. Metallica simply has no legal authority to prohibit the distribution of songs containing the word "Metallica" in their titles. Also, Metallica has stated that they have absolutely no problem with people sharing MP3s of their live concert recordings. Banning the use of certain filenames would have the effect of stopping the distribution of live Metallica MP3s as well as studio recordings. Finally, for Napster to simply ban, for instance, songs with the word "Metallica" in them, would result in people deliberately misspelling song titles, like "Meta11ica." All this would accomplish would be to pollute the Napster namespace, with no benefit to Napster, Napster's users, or third party copyright holders. Also, the notion, advanced by others, that checksums can be used to identify copyright infringement is not useful. All that a checksum can verify is the integrity of a file transfer. Anyone who has ever ripped a CD knows that bit errors happen all the time. The odds are that if two people rip the same track, they will end up with at least one random bit error in the audio file, which will result in a different checksum. If Napster were to start examining checksums, the result would simply be that people would simply use a utility to change one or two bits before creating the MP3, which would result in a different checksum. And finally, for Napster to outlaw, for instance, the sharing of any file with the word "Metallica" in it would have the side effect of silencing criticism. If I were to write, perform, and record a song called "Metallica sucks" and put it on a Napster server, title-based censorship would effectively censor my song. Fact is, the only practical way to positively identify a Metallica song is to incur the bandwidth expense of actually downloading the song, and the expense of hiring a human to listen to it and decide what the file contains. The bandwidth and staff requirements of your proposal would be extremely expensive. What Metallica wants is for Napster to implement an expensive, labor and resource intensive program of proactive copyright enforcement services on their behalf. When Metallica went to an outside consultant to identify some 300,000+ users with files matching the names of Metallica songs, I doubt that the outside consultant did the work for free. I'm sure that they were compensated for their work. Why should Napster be required to perform essentially the same service on behalf of Metallica for free? You wouldn't have to get every single copyrighted song. Just make it a big enough pain in the ass to share copyrighted songs that people stop bothering. Your proposals constitute a technically workable method for a copyright holder to identify specific instances of probable copyright infringement, but nothing in the law requires Napster to do this work on behalf of any copyright holder. Remember, copyright is an entirely synthetic right. Copyright did not legally exist until it was invented, and the justification of copyright is not based on natural law, it is a Constitutional restriction on free speech, for the sole purpose of promoting the arts, that is based on statute and regulated by the copyright acts, the DMCA among them. Nothing in the law creates a legal imperative on the part of Napster to "make it a pain in the ass" for their own customers to use their product, and there is no moral imperative to do so either. The only moral imperative on the part of Napster is to follow the DMCA to the letter, which is exactly what they have done. Again, if Metallica wants Napster to proactively enforce Metallica's copyrights, which would be expensive and labor intensive, then Metallica should take the ethical approach and offer to compensate Napster for the work done on behalf of them and their record label, rather then take them to court to try and force Napster to perform ongoing, expensive work for them for free. I call that stealing. Re:What Happened? (Score:3) I think that's a very stereotypical way of looking at metal bands. I'm a metal fan (and I was a Metallica fan back when they played metal) and I never really saw them as "rebel", "hardcore", "antisocial", or "crazy". What set the good metal bands of the 80s apart from the mainstream was that they weren't crazy. They were reasonable. They were down to earth "regular guys" who didn't wear makeup and spandex or dresses. And they played damn fine, intelligent music. Metal is still like that, actually. When Iced Earth or Nevermore plays at a club in your town, you can meet them in the bar afterwards, maybe buy 'em a beer. (And they deserve it too!) So if you're gonna ask what happened, ask this: whatever happened to the guys who played from the heart instead of getting their ideas from the marketing department? Whatever happened to the guys who would never degrade themselves by making a video for MTV, thereby implicitly endorsing corporate entertainment? Whatever happened to real people, making music you can bang your head to? Yeah, Metallica, persecute the toolmakers instead of the people who are using it to copy your music. "Seeking no truth, winning is all, find it so grim, so true, so real." --- What's the Point? (Score:2) What are they doing with the money, besides buying fancier cars and bigger houses? These artists, in an effort to squeeze every last dime from their audiences, are letting down the facade. They're showing that they're not really artists, just some people out to make a quick buck. Fsck 'em if they can't take a joke, I say. Re:What Happened? (Score:2) -- Re:Not just Metallica happened... (Score:2) Grow up, Slashdotter. Re:What Happened? (Score:2) Eek, I think my head would explode if I actually heard Warren (is that his name?) singing live. "Seeking no truth, winning is all, find it so grim, so true, so real." Hetfield: Ouch! Lars: Ouch! Hammet: Ouch! Newstead: Ouch! Burton: Ouch! Ouch! Ouch! Re:Not just Metallica happened... (Score:2) Unilateral assertions regarding the moral and ethical responsibilities of other people aside, this is a shocking thing to say. You seem to concede that Metallica's rights have been abridged, but justify it on the basis of the fact that they've got money. Please explain to me how your assertion differs signifigantly from the following statement: "I agree that rich people have the rights to things they own, but they have a responsibility to let other people take it." Clearly, we do not live in the same world. I refer you to The Bill and Melinda Gates foundation [gatesfoundation.org], the largest charitable foundation in the world, which gave $57 million dollars this year to prevent the spread of AIDS in Africa [gatesfoundation.org]. Or to the official "Microsoft Giving" page [microsoft.com]. Perhaps you were thinking of Eric Raymond, who warned charitable organizations against hitting him up for money [slashdot.org]? While they're busy going after Napster... (Score:2) Exactly ." -- Robert A. Heinlein ("Life-Line") Music and all forms of artistic work are changing, as copyright is becoming harder to enforce or protect. The entertainment industry that depends on it might hold back the tide and keep a repressive status quo. They might not. We might have 1/10 the number of band's in 20 years. We might have 10x the number. Nobody knows the mid-term or long-term consequences of letting the clock tick. We DO know that the industry as it is now will be radically changed. But, we can make some guesses (with DMCA, UCITA, Sony Bono copyright act, or WIPO) as to what will happen if the clock gets stopped. The only people guarenteed to win are those who have a product that other people want and are willing to voluntarily pay for. Re:The damage has been done (Score:2) A local radio station plays 3 Metallica songs at 5 every day to entice some extra listeners. I was cool with it, until I heard about their actions. Now, if a Metallica song comes on, I turn the channel. Just so everyone knows, I don't have a single Metallica mp3 on my hard drive. Listening to their music feels pretty cheap now. Too bad, I was a big fan... oh well, I like folk better anyway. Re:What Happened? (Score:2) So unless an artist is willing to suffer a completely miserable and lonely existance, his art has no merit? I suppose Pablo Picasso wasn't an incredibly talented artist? The Beatles didn't contribute anything worthwhile to culture? I am an artist and a musician. I spend MY MONEY to pay for the website that I use to advertise my band. I don't earn money, I don't allow others to advertise on my site with banner ads or affiliate programs or anything. I'm supporting all this stuff by going to a job I dislike and working all day for a company that will never acknowledge my contribution, or care about what happens to me. I have to spend my free time (the time other people spend chasing women, or playing sports, or drinking beer) pursuing my art, which is the only really important thing IN my life. I would much prefer it if I could get to the point where my art was able to support me. As far as my personal beliefs are concerned, I think that people trading my mp3s around is a good thing. If I could get a million people to download my mp3s for free, I could probably get 50,000 - 100,000 to make a purchase... and I could sustain myself quite well off of such a fanbase. So I don't necessarily agree with Metallica's stance or their tactics, but I really hate to hear that artists OWE the world their art, and that if they don't feel like doing it for free, they ought to just quit. We don't expect doctors to cure us for free out of their love for healing. We don't expect movie actors to work day jobs and act only in their spare time (and if we did, the quality of their medical care & their movies would be negatively impacted) Let's face it. The WHOLE WORLD would be better off if there was no such thing as money, no such thing as power, no such thing as a rich or a poor man. If everybody worked for free and everyone recieved the same benefits and treatment, the world would be a wonderful place. But as long as our world ISN'T that beautiful dream, as long as people are required to work and earn and contribute just to get by.... why SHOULDN'T artists be compensated just like anyone else? I don't think that anyone would argue that a world without music or art or literature or movies would be a very dull place to live. Why do you expect artists to fulfill your preconcieved notions (poor, lonely, crazy)? Isn't it enough that they enrich your lives and give you choices as to what you can see and hear and feel? Isn't it fair that they be allowed to earn a living if they are capable of doing it? Should they be punished because their "wares" are easy to steal? I think not. -The Reverend Re:No ethical imperative on the part of Napster (Score:2) I like using Napster, I really do, but a more proper analogy would be Ford making a bulletproof, high-speed sports car with a stealth mode, and advertising it as being "perfect for those summer getaways, wink wink nudge nudge." Sure, it could be used for legitimate purposes, and probably would be by some. But with that particular combination of features, it becomes laughably obvious to anyone who looks at it for more than five seconds what it was really intended for. Sure, there are some MP3s out there that are meant to be legitimately swapped around. But the vast majority of MP3s available, and hence that are traded by Napster, are illegal. I've used Napster since shortly after it came out, and I can count all the "legit" MP3s I've seen in all that time on the fingers of both hands. There's just no way around that, and if anyone tries to tell a judge that Napster was meant for strictly legal purposes they'll be laughed right out of the court. Napster's creator had to know what people would use it for when he created it. He couldn't coin such an astoundingly killer application without having at least that many smarts. In fact, I seem to recall it having been created to facilitate trading MP3s of all kinds because all the websites for that purpose stank. Suppose someone started a dynamite or firearm factory and gave them out for free to anyone who wanted them? Could he get off the hook by claiming, "But I only made it to facilitate the legal purposes of clearing stumps or hunting. I'm not responsible for how other people use it"? -- Metallica needs to fire their lawyer... (Score:2) Of course they're silent (Score:2) Of course, it's possible that they learned from the live chat, which did little to improve public perception of Metallica's intentions. Now, the real question is, can Metallica be held responsible for mislabelling these users as "pirates"? -Jer how does napster make money? (Score:3) I mean, assuming they got venture capital to start with, they have to have some sort of business plan... But the client is free... And I have yet to see advertising on their website or within the client itself... (other than ads for themselves...) What's up? Who's paying their legal bills? Or am I missing something obvious? "You want to kiss the sky? Better learn how to kneel." - U2 Re:No ethical imperative on the part of Napster (Score:2) There's a guy down the hall playing an MP3 right now. Am I obligated to pick up the phone and call the RIAA? I go to the library, and I see someone photocopying an entire magazine. Am I supposed to call the police to have him arrested? I drive home from work, and notice that I'm the only one not speeding. Should I be on the phone to the police, reading off lists of license plates? If I see someone shoot someone else with a gun, I'll be right on the phone, but there's infringements of various laws going on every second of the day, and honestly, the ones that don't hurt anyone, I don't necessarily care about. Maybe you're different. Metallica is completely capable of detecting copyright infringement on Napster without any help from Napster. They proved it by doing exactly that. The law places the burden on the copyright holder to identify copyright infringement, and Metallica has done so. So what's the problem? Metallica has proved that they are fully capable of protecting their own self interests on Napster. Again, it isn't Napster's job to do Metallica's work for them. If Metallica wants Napster to perform a service for them, identifying copyright infringement, that the law clearly says is the responsibility of Metallica, then they should pay them for their services, just like Metallica paid the third party that identified the copyright infringement in the first place. If there is a filename called "Metallica - Fade to Black.mp3", you can assume that it's a Metallica song. That would be possible evidence of a copyright infringement, but proving that it was a copyright infringement would require downloading the song to make sure. I say that it's immoral to perform censorship based on assumptions. If the person denies it, Napster could simply check the file itself. I said this in my last post, which you pointly ignored. More dishonesty. Actually, I directly addressed this point. Yes, Napster could, if they wanted to, download every song. That would defeat the entire point of Napster. The point of Napster is to serve as an index. They don't have the bandwidth required to download millions and millions of MP3s, they don't have the personnel to listen to them and identify the copyrighted ones, and they shouldn't have to. Metallica identified over 300,000 users that they claimed had Metallica songs. What would be the bandwidth costs of downloading 300,000 servers x N files per server? How many staff members would be required just to sit there and play back the first few seconds of 300,000 x N MP3s to determine what they are? That's just one band out of thousands. How can you seriously claim that your proposal is realistic? Now, of course, we find why you are against this. You don't believe in copyrights. You completely misunderstand me. It isn't that I don't believe in copyright. The point that I was trying to make is that the only moral obligation with regard to copyright is to follow the law, and only to the limited general extent that following the law is moral. Copyright law in and of itself does not perform the moral purpose of protecting a natural right. If you maliciously wack someone over the head with a 2x4, then successfully find some twist of law to justify your actions, even though you are unpunishable under the law, you are morally in the wrong, because you have infringed upon that person's right to walk down the street without being assaulted, which most people would recognize as a natural right. The purpose of copyright is not to protect people's rights. The purpose of copyright, as explicitly spelled out in the constitution is: The authors of the constitution recognized that copyrights and patents were special -- that copyright was NOT a natural right, like life, liberty, and dispite your claim to the contrary, property. They felt it necessary to not only enumerate Congress' authority to pass copyright and patent laws, but also to justify the creation of them -- something that occurs nowhere else in the Constitution. Copyrights are a restriction of free speech. The only possible justification for patents and copyrights is their constitutional purpose -- to promote the creation of more inventions and more speech. Not to "benefit artists." Not to "benefit consumers." To promote the creation of more speech. Copyright has nothing to do with morals. It has nothing to do with ethics. It is a constitutional compromise, created for a specific purpose. It trades away part of the natural right of free speech -- the right to repeat and build upon other people's speech -- in exchange for what is hopefully a public benefit. I especially disagree with your statement that copyright law is "for the benefit of the consumer", which implies that copyright is only intended to benefit people who pay for copyrighted material. Copyright law is for the benefit of all persons, whether they are a paid consumer of the copyrighted material or not. That's what fair use is for -- to allow all persons to benefit from copyrighted materials, not just paid "consumers". Otherwise, one could argue that giving someone your newspaper after you're finished with it would be immoral. Letting your friend borrow your CD would be immoral. Founding a public library would be especially immoral, and a gross violation of thousands of authors rights, because all that a library does is make copyrighted materials available to the public without payment to the authors. How is it moral, and considered a highly upright act to found a public library, but immoral to do the same thing on your computer? I also said I never expected Napster to do what I said, because it's clear that they wouldn't have a userbase if they did. You dishonestly ignored that as well. I just didn't think that it was worth addressing. You said: The fact is that they don't want to stop these people because they know that very few people would bother using their service if they prevented people from sharing copyrighted material. You seem convinced that Napster was created for no other reason then to exist as an ongoing criminal enterprise. That's what the RIAA wants you to think, and apparently they have succeeded. If Napster was created for this reason, then why would they set themselves up as a huge, public target? Ok. I said this before, but again, if Napster were to start regulating content, it would legally become responsible for the content. Napster does not want to become legally responsible for content that they cannot control. Would you? If you had two choices of action, one of which would make you legally responsible for OTHER people's illegal activity, would you do it? Napster would probably LOVE it if people were to stop using it to trade major-label artists, and use it soley to trade songs by artists who approve of free digital distribution. That would get the record companies off their back. You seem to think that Napster has a moral obligation to destroy their service, and I disagree. There is a fundamental change occurring right now in the way young people find and choose their music. Up until now, most young people would pick and choose their music by listening to radio stations. Record companies were so anxious to get their songs on the radio that they even went so far as to illegally pay DJs to favor their songs, because radio play meant everything. Without radio, your records would not be heard, and if they were not heard, they would not sell. Now, more and more young people are turning to the net instead to pick and choose their music. If the record companies had been smart, they would have been on the ball -- creating web sites where fans could listen to their songs. Instead, they dug in their heels, refused to embrace digital music distribution, and now they are screaming bloody murder when new companies are doing exactly what they didn't do. I believe that as time goes on, more and more bands and record labels will discover that MP3 distribution improves their record sales, and authorize trading of their MP3s. At the same time, fewer and fewer bands and record labels will maintain a "no mp3" policy, once it becomes unprofitable, and as the amount of legally available material goes up, the amount of material legally hosted on Napster will also go up. The fact that online mp3 distribution is still in its infancy should not be held against Napster. Just because the record companies have successfully maintained a stranglehold monopoly on music distribution for nearly a century does not give them any intrinsic right to continue their monopoly in the face of changing conditions. Napster didn't create the rules, but they are following them. Actually, given that the DMCA was drafted by the RIAA, MPAA, and other corporate special interest groups, and rubber-stamped by congress, one could reasonably say that the record companies DID write the rules. However, now that this asinine law is in effect, they have to follow the law, and they have just realized that the law applies to them, and they don't like it. They want the law to just apply to other people. They want their companies to be protected from lawsuits by the burdensome notification/removal legal mechanism, but they don't want to have to be bothered with having to follow the law themselves. That's what this is about. Napster IS following the law, and they are not in the wrong. "And the light at the end of your tunnel ..." (Score:2) I thought I was the only one so consiquent in my disgust. I used to have a couple of Metallica CDs The one (count them, one) metallica mp3 I had (with the SF symphony, singing the exact same song I already had recorded on my VCR) has been deleted, with prejudice. In this respect, Metallica may have achieved its goal. However, the money this has netted them (exactly $0) doesn't even beigin to offset the money they've lost in future CD sales (including older Metallica stuff I used to have on my "to acquire" list). Oh, and I reused the videotape to record an episode of "Sliders." I am now, most happilly, metallica-free, and am surfing mp3.com and elsewhere for my music needs. The RIAA and their lackeys could have held on a few years longer, if they weren't actively pushing their erstwhile fans and customers toward vastly more palitable alternatives such as mp3.com [mp3.com]. Through their actions they have considerably shortened their window of oppurtinity to adapt and survive the coming changes, a situation which is entirely their loss (and the consumers' gain). Good riddence to Metallica and all those of their ilk. Charlie Rose (PBS) Metallica interview (Score:2) Earlier this week I caught a Charlie Rose interview with Lars Ulrich [pbs.org]. To tell you the truth he put up some pretty convincing arguments for banning MP3s on Napster. Lars pointed out that what they were objecting to was digital copies or their digitally recorded albums. He openly supports fans recording live performances. When the other guy in the interview accused him of being greedy he took the pragmatic stance by saying that though the record companies have a virtual monopoly, all Napster is trying to do is become the new monopolist (with no revenue going back to the artist). Lars also seemd to focus on the Artists right to coltroll the artistic work. I'm not sure that is a valid point. My personal feeling is that while the artist has the right to decide how to produce the art, it a general way it can't be called art unless the audience sees/hears it. The expression is controlled by the artitst, but the audience controls how they see/hear/interpret it. In this way I think it is valid to record performance and redistribute it since the recording itself becomes a new piece or art. Maybe Slashdot needs to interview Napster and really press them on their goals for generating revenue. Is their model based on finding the best online MP3 content and servicing it to the consumer, without the artist getting a cut? Is the software ging to eventually cost money? Will they start pushing ads down to Napster clients? At any rate I can respect someone for standing up for what they believe is right. If someone basically crapped over all my work and then flipped me the bird when I ask them not to steal my work, I reckon I'd get a little pissed myself. With regards to the image.... (Score:5) My personal thoughts all along have been that; a) Although it is in contradiction to the stance that the band has taken against commercialism. They do have a right, in our society, to be reimbursed for the work that they do. If they want to ban Napster users, who might or might not (depending if they own the albums), be stealing music, then they should be able to. b) This stance does them no good publically to appear so advesarial (SP?) to their listening public. What they should offer as a remedy is the ability to download MP3's from a Metallica controlled website. That would require some sort of registration with Metallica, that would also include proof of purchase for the albums that have been bought. Sort of like a fan club distribution. For those of you who never belonged to a band's fan club, the band usually sends out singles once a year to its members. If they were to distribute such singles off their website they would gain; direct contact with their fanbase; a distribution system that would eventually allow direct to consumer selling, they could double the normal price of a single, and the consumer would still be seeing a savings.... anyway, I'm rambling.. bottom line is Metallica is wrong to be attacking Napster, right to be asking Napster to ban fans, and wrong not to be offering those same fans the opportunity to purchase or recieve copies of those songs directly from Metallica.. anyway just my $0.02, (well 0.01 cents since I'm in Canada.) Sharing != Disbributing (Score:2) I know I'm picking a nit here, but, strictly speaking, when I offer a file for download, be it via FTP, http, or some other protocol (e.g. napster), I am not distributing anything. Users have to proactively come to me and take the aforementioned data. I am not shipping it to their machines, they are taking it from mine, by their own actions. Now, if I spammed a newsgroup, or sent out a bulk emailing, of Metallica music in, say, mp3 format, then I would be guilty of distribution. No doubt the courts will redefine distribution to include having something in a location others might be able to copy it from, just as they absurdly redefined the notion of a "person" to include corporate entities, and no doubt they can enforce such legal and linguistic absurdities with the use of force, but even with the collective gun of the RIAA and its lackey, the US Government, in my face, I will be no less correct in saying "you are full of shit, I didn't distribute a thing." Alas, being right won't stop the bullet from splattering one's greymatter all over the wall, so the victory, if such it is, is only moral, at best. Naspter needs people sharing copyrighted material (Score:2) That's why this is different than something like FTP. The vast majority of people use an FTP application for legitimate purposes. I suspect that it's probably harder to find non-copyrighted material on Napster than it is to find copyrighted material. Of course, I'm just bitter because people put "Anime" into their list but never have any anime songs shared. f. Re:Heh. (Score:2) Interesting stuff on the binaural beats! I am afraid I can't outright do music directly using this, as it is patented. However, some of my ambient stuff does similar things just by accident, so think of it as a milder version or something :) Hope you don't think it's all like Stratus- I think that's going to continue to be a problem as I keep doing different sorts of albums :) as long as you don't mind the eclecticness you should have fun downloading stuff. Mind your head now ;) I agree with you about the bind we are in. There's just too much information out there to sort through... the thing is, the MTV/Top 40 approach fails horribly when confronted with a wide range of people. You can try to force all people into one mold, but it never completely works, it's artificial. It's more natural for people to form different opinions about things. Re:Why should they? (Score:2) Re:md5sums (Score:2) Don't even have to do that. Different people will put different info in the ID3 tag, so my version of an MP3 will have a different MD5 signature than yours will of the same song. ...phil Interview with Lars on KROQ (Score:2) Anyway, his whole argument is that it is their music and they should be able to distribute it how they want to. They don't care about money, they are rich. They don't care about the fans, they make the music for themselves. That pretty much sums it up. Can it be? (Score:2) Metallica Remains Silent Phew. Thank you Napster! Re:Did Mozart sue his fans? (Score:2) This is a grotesque over-generalisation. There is a lot of cheesy rubbish out there, largely because that's what most people want. There's also a lot of quality not-so-mainstream music available. You are making a lot of gross over-generalisations here. However, amidst all of that volume, there's remarkably little musical production of quality comparable to that of even one of the least fine Mozart symphonies. Mozart was one of the best musicians of his century. The best musicians of our century also produce quality music. it's not Average Joe who chooses what gets played/sold/toured, it's the record company. What a load of hogwash. If the record company don't produce music that people want to listen to, they go out of business. The record company don't dictate what we want to listen to, and no one is forced to buy anything they don't want to hear. And as you yourself say in the next paragraph, practical and widespread micropayment technology might make it feasible for many bands to be "underwritten" by many people at once, each paying a trivial amount, Well if that's such a good idea, why aren't people doing it today ? Is it because the copyright model is in fact vastly superior ? Sure, such a scheme would certainly mean the ruin of most absurdly well-paid, hugely-followed mega-bands that account for today's music market. But it's nothing short of necessary. Sounds like neo-Marxist rhetoric to me. Kill the big evil landlords/bands and take all their money. Re:Did Mozart sue his fans? (Score:2) (1) Note: no rebuttal offered. (2) You're comparing hundreds of years of music history to today's music. Let's compare say a 40 year window of the Romantic period and see how it compares in richness and diversity to music of the last 40 years, from bebop to cool jazz to fusion to latin jazz to hip hop to metal, etc etc etc. As we speak, that choice is made by the marketroids in the big RIAA labels This is outright false. I have purchased several albums from small labels. I choose what I listen to. The record companies need to produce music that people want to listen to to stay in business. There is no "thought control" conspiracy here, the record companies try to produce music that people want to hear. This doesn't mean that everything is "mainstream" either. There are a lot of niche labels that cater to niche markets. What the original poster proposes is no more than a pay-by-worth system: one pays to support music one like. The problem is that most of us don't have the money to feed a band, so this calls for some kind of distributed payment system. As far as distributed payment systems go, copyright works better than anything else. Either way, by eliminating the middleman, the control over what we listen is put back into the hands of the listeners ... or at least those listeners who can afford to pay the salary of AN ENTIRE F*CKING BAND out of their disposable income. I guess under your system, I don't qualify, I can't afford to hire a band. I'd rather just buy a CD ! he way I see it, just about anything would be better than the current state of musical dictatorship. ou state your "dictatorship" conspiracy theory as though it's an irrefutable fact, when in fact it's merely a theory and a very dubious one at best ( moreover, one which I don't accept ). Re:What Happened? (Score:3) -- TheDude Smokedot [baked.net] Drug Info, Rights, Laws, and Discussion Re:CDs are not overpriced (Score:2) NKOB Continue War on Piracy (Score:5) continued the the record industry's war against Napster. The New Kids management gave a copy of 5 Napster users who had illeagally put NKOB songs on their virtual servers. "This probably doesn't even begin to touch the number of napster users pirating our art!" said former NKOB member Jordan Knight Thursday. "We have evidence that their may be as many as 9 people on napster with our songs!" New Kids on the Block joins Dr. Dre and Metallica in the ongoing war against music piracy. "I think we're the ones hit hardest" said Knight, "Metallica and Dr. Dre have sold millions of albums in the last few years; We've only sold 7 since napsters introduction and I think it's quite apparent piracy is to blame." Re:Dr. Dre and "The Quote" (Score:2) While lyrics and music may be copyrighted, song titles are not copyrightable, and are re-used all the time by different bands for different songs. The effect of such a title-based ban would be to block other bands' songs because they happened to have the same, or similar name to Dr Dre's songs. Re:What Happened? (Score:2) Art is about art, not money. Ask the great painters and composers and sculptors who died poor and alone. Well, let's be a little realistic here. Yes, some artists died poor and alone. But in the old days, I would say the majority were sponsored by upper class rich people, the church, or royalty. Much of the best art was commissioned work: The Last Supper, The Sistine Chapel, most of Michaelangelo's sculptures, etc. The Mona Lisa, on the other hand, was done purely by Da Vincy (sp? -- I'm having a brain fade) over 20 years for the sake of art. -- Gnutella will survive Metallica's lawyers (Score:5) Rather than a single application, gnutella is a public protocol with numerous independent implementations, and it is architected to survived both nuclear blasts and lawyers - there is no centralized server. There is some anonymonity, although it is far from perfect (I'd like to see both the downloads and searched done through encrypted channels) but because there is no central server, search engine or user registry there is no central point of control (or chokehold). There probably aren't as many titles available as through Napster, but that's mainly because it's not as well known. But if I run Gnutella now, let's see how many files there are available this afternoon... well I'm tired of waiting, it's over 3700 hosts, 413,000 files, and 7,700,000 MB. So even though there may be fewer files available than Napster, there's a lot out there. Mike Re:md5 sums are a joke - easily gotton around (Score:2) BUT, each mp3 encoder works slightly differently. how the hell can they track md5sums if I use lame (for example) and give it a different quality setting, or use a different min/man vbr setting? or, suppose I release a patch to lame or blade (etc) that changes just a few bits. imperceptible to the ear but will easily defeat their scans. all in all, this ia a pretty lame attempt at id-ing compressed songs digitally. -- more metalica/napster-related entertainment... (Score:2) ======== Voice of reason? (Score:2) It could have been worse... (Score:2) -- Re:The damage has been done (Score:2) I saw something a few days back when I flipped channels across a public access station. A low grade video had the text "napster narcs" superimposed on it, so I stopped to see what it was. The music was apparently Metallica (not sure; I don't do heavy metal), and the titles alternated between the above and something like "This is what Metallica sounded like before the started sucking cock". There was also a link to a web site, which I checked out but didn't bother bookmarking. It was just a single paragraph of rant against the band, basically addressed to Lars and telling him that one of the other band members (deceased?) was probably rolling over in his grave over the whole thing. One funny thing was that behind the video someone (Metallica?) was singing "Obey your master!", and no matter how carefully I listened, it always sounded like "Obey your Napster!" It sounded like too professional a recording to be a knock off, though. Any Metallica fans out there? Or ex fans who haven't nuked their CDs? If this as a Metallica song, give it a listen and see if it doesn't sound like "Napster" - maybe they were doing some unanticipated prophecy. At any rate, the point of this long rant is that it isn't on -- Did Mozart sue his fans? (Score:5) In their chatroom appearance recently, Metallica said that one of their goals was to educate fans. [The chat was a lame PR pitty-party which avoided any clued-in questions from the other participants.] More likely, they're receiving a crash course in techology. So I'm hardly surprised that they blew off Slashdot. Perhaps they're starting to realize that their "Let's fight for Good(tm) by suing pirates" crusade is hopelessly misdirected. Their industry is changing with technology--viewing these technological shifts as a simple piracy issue is hopelessly misguided. The current model only works because CDs are expensive to produce and distribute. But as music becomes trivially cheap to exchange, is that the end of professional music? Will the artists starve? Hardly. Painful though it is to use the names Mozart and Metallica in the same post, an even cursory look at history shows that artists have flourished for a very long time without expensive, monopolistic distribution schemes and lawsuit bullying. Musicians of the future will be supported in the same way Mozart and Beethoven were: Patronage. In the modern case, it may be corporate or governmental support, perhaps like auto-racing teams, in echange for logo or ad messages. Or think of it like an investment: companies put money into talent in the hope their tours will be profitable. (Isn't this what the record companies do now?) Comissioned works. Poets and sculptors are often hired to create works for the public. Increasingly, popular bands write ad jingles, for instance. It's easy to imagine a CD sponsored by a company. Performances. Of course, popular acts already make a good portion of their money from tours. The new technology kills the costs that necessitated the big companies: 1) access to fans via printing and advertising, and 2) manufacture and distribution of the music. Both are now effectively costless. Smart bands will figure out that CDs aren't just art, they're also ads for their band. They'll get their word out as far as possible with the Napsters and Gnutellas, then reap the rewards of name recognition and touring fees. Re:I was just thinking about that (Score:2) They promised us an interview. It was never presented to me (or anyone else, for that matter) as a 'possibility' thing. It was always talked as a definite, a 'when,' not an 'if.' --Emmett Not just Metallica happened... (Score:5) For the "Metallica has all the right in the world" advocates... I agree to this. Metallica does have all the right in the world. However, the wealthier you are, the more responsibility you have to share that wealth. Look at McDonald's, for example - they solved a lot of PR problems just by starting to donate to charities. Microsoft, on the other hand, got a lot of bad press, when Bill Gates commented that they would NOT give ANY money to any charities any time soon. There is also the other factor, that what you give to the world, you get back threefold. It really is good karma to give things away. Within limits, of course, (gotta maintain that self sustaining balance) but the better off you are, the more you're able to give. And it will only do you good in the long run. Of course, I am now actively boycotting anything that comes out of RIAA, and I'll be buying my CDs from non-RIAA organizations like mp3.com instead. Not because they are executing their "rights", but because they are being greedy, and are radiating bad karma. Re:Gnutella will survive Metallica's lawyers (Score:2) I'd like to see both the downloads and searched done through encrypted channels Well, you couldn't do the download through encrypted channels. It's unreliable enough as it is through a direct link; can you imagine what it would be like when it also has to travel through 1 or more other hosts? "All riiigghhtt... that 200 meg download is almost done... Doh! An intervening host must've disconnected!" -- Re:Did Mozart sue his fans? (Score:2) In the case of patronage (which, in our modern day and age, could well involve fairly binding contracts), a powerful entity (an individual, a corporation, a government) might be able to further the spread of propaganda favorable to them, using the artist(s) to do the dirty work. The average joe would be none the wiser. People who know how to read between the lines are few, and often in no position to speak effectively against lies and blatant manipulation of the public. Commissioned works summon the same specter, but on an individual, not necessarily extended-contract basis. This has already been done before; every major belligerent during the First and Second World Wars commissioned artists to create propaganda posters and films. I think the best route would be for performers to give live performances and sell (on a direct-to-customer basis, with as few middlemen as possible) copies of their works. But this is my personal opinion, and I could easily be wrong. Beware (Score:3) This post is protected under Copyright, DMCA, ASPCA, and has a patent pending. Master of Napster End of m-p-3, crumbling away I'm your source of implication Banks that pump with fear, sucking money clear Leading to corporate destruction Find them, Net-PD More is all we need We're dedicated to How I Free music, no way. Were R-I-A-A Loss of cash becoming clearer Sound monopoly, financial misery Chop our breakfast on a mirror Download you will see More is all we need We're dedicated to How we're suing you Napster, Napster, Where's the song that I've been after? Napster, Napster, You promised mp3's Laughter, Laughter, All I hear is corporate laughter Laughter, Laughter, laughing at my cries It's not worth all that, stupid little spat Just a rhyme without a reason Neverending ways, drift on jury days We don't even know the reason Download you will see More is all we need We're dedicated to How we Ha ha ha ha
http://slashdot.org/story/00/05/18/197226/metallica-remains-silent
CC-MAIN-2014-42
refinedweb
12,899
71.55
Code. Collaborate. Organize. No Limits. Try it Today. Junction Points are a little known NTFS v5+ feature roughly equivalent to UNIX symbolic links. They are supported in Windows 2000 and onwards but cannot be accessed without special tools. In particular the .NET libraries does not include any functionality for creating or querying properties of Junction Points. This article provides sample code for creating Junction Points, testing their existence, querying their target and deleting them. I hope you find it of value in your own projects. Junction Points are directories with a special attribute that indicates the target of the link. They is a special case of an NTFS feature known as a Reparse Point. A Reparse Point can roughly be thought of as a filter that is injected into the file system's name translation layer. The file system filter can transform how the name is parsed (hence the name) and redirect accesses to other resources. So Reparse Points can do much more than represent symbolic links but we're not going to worry about that today. Keep in mind this is an NTFS only feature. It will not work on other file systems. If your application relies on Junction Points in some way, you should be sure to provide alternate means of achieving the same end. Also, many applications are unaware of symbolic links. Usually that is okay but it can cause problems with tools that recursively copy or delete files because the Junction Point will simply appear to be a normal directory. For more background information about Junction Points or Reparse Points please consult the references at the end of this article. The source zip file includes two classes JunctionPoint and JunctionPointTest. The former is the one you probably care about most. The latter includes a series of tests written with the MbUnit library. These may be ported to NUnit easily by straightforward substitution of the namespace names. Incidentally, you'll probably want to rename the namespace to which JunctionPoint belongs before using it in your own code. The current name reflects that of an application I am currently working on. The code makes use of Platform Invoke (PInvoke) methods to call the appropriate Win32 APIs to do the heavy lifting. To use the library you do not need to understand how these work. However, be aware that PInvokes make a Native code access security permission demand. If your application does not run with Full Trust you will likely need to ensure it acquires the necessary permissions before it tries to manipulate Junction Points. JunctionPoint JunctionPointTest MbUnit NUnit Use the JunctionPoint.Create method like this: JunctionPoint.Create // Creates a Junction Point at // C:\Foo\JunctionPoint that points to the directory C:\Bar. // Fails if there is already a file, // directory or Junction Point with the specified path. JunctionPoint.Create(@"C:\Foo\JunctionPoint", @"C:\Bar", false /*don't overwrite*/) // Creates a Junction Point at C:\Foo\JunctionPoint that points to // the directory C:\Bar. // Replaces an existing Junction Point if found at the specified path. JunctionPoint.Create(@"C:\Foo\JunctionPoint", @"C:\Bar", true /*overwrite*/) Note: It is not possible to create Junction Points that refer to files. Use the JunctionPoint.Delete method like this: JunctionPoint. // Delete a Junction Point at C:\Foo\JunctionPoint if it exists. // Does nothing if there is no such Junction Point. // Fails if the specified path refers to an existing file or // directory rather than a Junction Point. JunctionPoint.Delete(@"C:\Foo\JunctionPoint") Use the JunctionPoint.Exists method like this: JunctionPoint.Exists // Returns true if there is a Junction Point at C:\Foo\JunctionPoint. // Returns false if the specified path refers to an existing file // or directory rather than a Junction Point // or if it refers to the vacuum of space. bool exists = JunctionPoint.Exists(@"C:\Foo\JunctionPoint") Use the JunctionPoint.GetTarget method like this: JunctionPoint.GetTarget // Create a Junction Point for demonstration purposes whose target is C:\Bar. JunctionPoint.Create(@"C:\Foo\JunctionPoint", @"C:\Bar", false) // Returns the full path of the target of the Junction Point at // C:\Foo\JunctionPoint. // Fails if the specified path does not refer to a Junction Point. string target = JunctionPoint.GetTarget(@"C:\Foo\JunctionPoint") // target will be C:\Bar I find it interesting that the .NET Framework's FileAttributes enumeration includes the value FileAttributes.ReparsePoint but there is no other built-in support for Reparse Points. Of course, you can delete Reparse Points as if they were ordinary directories. FileAttributes FileAttributes.ReparsePoint Junction Points make it possible to create cyclic references in the filesystem. So be careful with them. In particular, you should never try to recursively delete the target of a Junction Point! To avoid doing that ensure that the FileAttributes of each directory do not include the FileAttributes.ReparsePoint flag before attempting to recursively delete it. Also beware of recursive copying. This project would not have been possible without the assistance of others in the community. I consulted the following references while implementing this functionality in .NET: This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below. A list of licenses authors might use can be found here linkd using (SafeFileHandle handle = OpenReparsePoint(junctionPoint, EFileAccess.GenericWrite)) { byte[] targetDirBytes = Encoding.Unicode.GetBytes(NonInterpretedPathPrefix + Path.GetFullPath(targetDir)); using (SafeFileHandle handle = OpenReparsePoint(junctionPoint, EFileAccess.GenericWrite)) { string useThis = NonInterpretedPathPrefix.ToString() + targetDir.Replace(@"\\.\", ""); byte[] targetDirBytes = Encoding.Unicode.GetBytes(useThis); [DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] private static extern IntPtr CreateFile( General News Suggestion Question Bug Answer Joke Rant Admin Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.
http://www.codeproject.com/Articles/15633/Manipulating-NTFS-Junction-Points-in-NET?msg=2516225
CC-MAIN-2014-23
refinedweb
955
50.73
More like this - Dynamically insert or append a value to an admin option, e.g. list_display or list_filter by frankban 9 months, 1 week ago - jstree integration to django admin by pawnhearts 2 years, 4 months ago - Multilingual Models by Archatas 5 years, 2 months ago - Online boolean switch in the admin list by sasha 4 years, 8 months ago - Ajax ordering models on the change list page of the admin using drag and drop with jQuery UI by spoof 1 year, 11 months ago Nice idea. Doesn't seem to work in newforms-admin as all the tags are getting stripped out of the list display. Might be as a result of this: I am wondering whether this could be made generic and a lot of the logic moved into the javascript. i.e. when any model property is marked as 'ajax editable' (not sure best way to do this) then the list display for that property is dynamically replaced with an Ajax form field that passes property name, id and new value to a function that updates that property. Could even use existing validation code for the model or model_form? # Quick update on previous post. The problem with newforms-admin was down to me incorrectly setting my i_am_an_idiot property ;-) You do however have to use mark_safe() as well as allow_tags. i.e. from django.utils.safestring import mark_safe ... def order_helper(self): return mark_safe(u'''...etc...etc...''') Probably a nice idea to set the following two as well: # Should line 43 be something like: #
http://djangosnippets.org/snippets/568/
crawl-003
refinedweb
255
65.96
22 AnswersNew Answer 2/22/2021 1:06:22 PMMichael Gonzalez 22 AnswersNew Answer Try this code: def spell(txt): #your code goes here if txt=="": return txt else: print(txt[len(txt)-1]) return spell(txt[0:len(txt)-1]) txt = input() print(spell(txt)) You can that the reverse of it like you would with a normal list using the slice operator: list[start:stop:step] So to reverse: list[::-1] def reverse(text): if text: print(text[-1],end="") reverse(text[:-1]) # remove 'end' argument if you need each character on its own line ;) def spell(txt): print(txt[::-1]) txt = input() spell(txt) def spell(txt): for x in range(1,len(txt)+1): print(txt[-x]) txt = input() spell(txt) Username I may understand that you think using an external c++ code to call from python can (maybe) lead to higher performance, but the cost of writing, debugging and readability is really too high. Also, you are missing the part on how python can use that code... And it may be a little to advanced... If you mean the end of module project, mind that the task instruction asks us to use recursion. def spell(txt): #your code goes here c=str(txt) print (c[::-1]) txt = input() spell(txt) So "to output each letter of the strings" is a pure iterative task but not recursive. Please contact "Intermediate Python" author. def spell(txt): #your code goes here print(txt[::-1]) txt = input() spell(txt) I tried with Stack: def spell(txt): #your code goes here txt = list(txt) for l in range(len(txt)): print(txt.pop()) txt = input() spell(txt) Easy and understandable code..but a bit long. def spell(word, len): #your code goes here list = [] for i in word: list.append(i) while len>=1: print(list[len-1]) len-=1 word = input() len = len(word) spell(word,len) gIves the expected result txt=input() j=len(txt)-1 for i in txt: print(txt[j]) j=j-1 alguien que me envie el link del codigo porfa This also worked: word = input() def spell(txt): l=len(txt) for i in range(l,0,-1): print(txt[i-1]) spell(word) But I'm not sure it's a recursive function... 😆 maybe this could be a more simple one:. def spell(txt): #your code goes here for i in txt[::-1]: print (i) txt = input() spell(txt) def spell(txt): #your code goes here testo = [] for x in txt: testo.append(x) for y in testo[::-1]: print(y) txt = input() spell(txt) def spell(txt): #your code goes here length = len(txt) while length > 0: length -= 1 print(txt[length]) txt = input() spell(txt) This was my answer. I feel like I am cheating though since it calls for a recursive function but at the same time recursion feels a lot more complicated than something like my code. Is there a reason to use recursion in this example other than learning purposes? Sololearn Inc.4 Embarcadero Center, Suite 1455
https://www.sololearn.com/Discuss/2704130/spelling-backwards-in-python-project
CC-MAIN-2021-39
refinedweb
510
63.93
This page describes how Python is handled in Homebrew for users. See Python for Formula Authors for advice on writing formulae to install packages written in Python. Homebrew should work with any CPython and defaults to the macOS system Python. Homebrew provides formulae to brew a more up-to-date Python 2.7.x and 3.x. Important: If you choose to install a Python which isn’t either of these two (system Python or brewed Python), the Homebrew team can only provide limited support. Homebrew provides one formula for Python 2.7.x and another for Python 3.x. The executables are organized as follows so that Python 2 and Python 3 can both be installed without conflict: pythonpoints to the macOS system Python (with no manual PATH modification) python2points to Homebrew’s Python 2.7.x (if installed) python3points to Homebrew’s Python 3.x (if installed) pip2points to Homebrew’s Python 2.7.x’s pip (if installed) pip3points to Homebrew’s Python 3.x’s pip (if installed) (Wondering which one to choose?) The Python formulae install pip (as pip2 or pip3) and Setuptools. Setuptools can be updated via pip, without having to re-brew Python: python2 -m pip install --upgrade setuptools Similarly, pip can be used to upgrade itself via: python2 -m pip install --upgrade pip pip install --user The normal pip install --user is disabled for brewed Python. This is because of a bug in distutils, because Homebrew writes a distutils.cfg which sets the package prefix. A possible workaround (which puts executable scripts in ~/Library/Python/<X>.<Y>/bin) is: python2 -m pip install --user --install-option="--prefix=" <package-name> site-packages. Python 2.7 also searches for modules in: /Library/Python/2.7/site-packages ~/Library/Python/2.7/lib/python/site-packages Homebrew’s site-packages directory is first created if (1) any Homebrew formula with Python bindings are installed, or (2) upon brew install python. The reasoning for this location is to preserve your modules between (minor) upgrades or re-installations of Python. Additionally, Homebrew has a strict policy never to write stuff outside of the brew --prefix, so we don’t spam your system. Some formulae provide Python bindings. Sometimes a --with-python or --with-python3 option has to be passed to brew install in order to build the Python bindings. (Check with brew options <formula>.) Homebrew builds bindings against the first python (and python-config) in your PATH. (Check with which python). Warning! Python may crash (see Common Issues) if you import <module> from a brewed Python if you ran brew install <formula_with_python_bindings> against the system Python. If you decide to switch to the brewed Python, then reinstall all formulae with Python bindings (e.g. pyside, wxwidgets, pygtk, pygobject, opencv, vtk and boost-python). These should be installed via pip install <package>. To discover, you can use pip search or. (Note: System Python does not provide pip. Follow the instructions at to install it for your system Python if you would like it.) For brewed Python, modules installed with pip or python setup.py install will be installed to the $(brew --prefix)/lib/pythonX.Y/site-packages directory (explained above). Executable Python scripts will be in $(brew --prefix)/bin. The system Python may not know which compiler flags to set in order to build bindings for software installed in Homebrew so you may need to run: CFLAGS=-I$(brew --prefix)/include LDFLAGS=-L$(brew --prefix)/lib pip install <package> WARNING: When you brew install formulae that provide Python bindings, you should not be in an active virtual environment. Activate the virtualenv after you’ve brewed, or brew in a fresh Terminal window. Homebrew will still install Python modules into Homebrew’s site-packages and not into the virtual environment’s site-package. Virtualenv has a --system-site-packages switch to allow “global” (i.e. Homebrew’s) site-packages to be accessible from within the virtualenv. Formulae that depend on the special :python target are bottled against the Homebrew Python and require it to be installed. You can avoid installing Homebrew’s Python by building these formulae with --build-from-source. © 2009–present Homebrew contributors Licensed under the BSD 2-Clause License.
http://docs.w3cub.com/homebrew/homebrew-and-python/
CC-MAIN-2018-13
refinedweb
703
66.54
Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode. Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript). QtWebEngine Glad that it worked :) Please mark it as solved by editing the post title and prepend [solved]. No one has replied thanks. now is working Yes I was using a busy loop calling QApplication::processEvents(); once in a while To summarize: Yes you can run QtWebEngine headless/in console but it requires QApplication and won't work with QCoreApplicaion Much alike WebKit it requires quite frequently access to main event loop i.e. do not block it for extensive periods of time I'm not sure if toHtml() shows original/loaded Html or 'generated' Html (after some time javascript usually alters original Html) and which Blink engine version is used (it could be rather old) but it doesn't render google's results properly. I need to investigate... any pointers, documentation... i guess this the new design like all modern web-browsers have, when each tab is running a separate process. This is done for security and stability reasons. the QtWebEngine module is very limited - from a programmers point of view - yet. You can find the whole C++ API "here": Hi, You should rather ask this on the "qtwebengine": mailing list. You'll find there the modules developers/maintainers (this forum is more user oriented) Subscribe to the "Interest mailing list": and ask there. The Qt engineers can answer your question. Looking at the source "here":, it seems that it is still an experimental feature which means it will not be available currently in WebEngineView. To try out those features you can try importing experimental module @ import QtWebEngine.experimental 1.0 @ but note that these are still under development and the behavior may be erratic. To follow this development you can ask the question on "Interest Mailing List":, you might get an answer directly from the Qt developers. You will need to subscribe to the list first. Well, that does indeed look like roughly what I had in mind, though it seems to be in a very immature state. Still, I won't work on it myself, since I don't have much interest in web technology. Furthermore, I don't think this will ever yield satisfactory performance. Anyone ever solve this issue? I wound up using QML to take advantage of the onNavigationRequested event to hijack (and cancel) the navigation, which solves this immediate problem. However, this solution is not working for me as a whole since I cannot figure out how to run javascript in the WebEngineView when it is created in QML, which is my second requirement. :(. You should rather ask this question on the interest mailing list or the qtwebengine IRC channel. You'll find there Qt's developers/maintainers (this forum is more user oriented) Disabled Categories are greyed out Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.
https://forum.qt.io/category/54/qtwebengine?page=15
CC-MAIN-2019-04
refinedweb
515
62.07
Copyright © 2007 W3C® (MIT, ERCIMINRIA, Keio), All Rights Reserved. W3C liability, trademark, document trademarkuse and document use rules apply. in XML. Canonical XML 1.1 is applicable to XML 1.0 and defined in terms of the XPath 1.0 data model. It is not defined for XML 1.1.: xml:baseattributes [C14N-Issues] is performed or supplying a base URI through xml:base).descendants)., other than the xml:id attribute: and evaluating the following default expression:: Lexicographic comparison, which orders strings from least to greatest alphabetically, is based on the UCS codepoint values, which is equivalent to lexicographic ordering based on UTF-8.=""if and only if the following conditions are met:. xmlnsfor the text of the local name in place of the empty localexists (in name (in XPath, the default namespace node has an empty URI and local name). &, all open angle brackets (<) with <, all quotation mark some of the element's ancestors are omitted from the node-set. This is necessary because omitted nodes SHALL not break the inheritance rules of inheritable attributes [C14N-Issues] defined in the xml namespace. [Definition:] Simple inheritable attributes are attributes that have a value that requires at most a simple redeclaration. This redeclaration is done by supplying a new value in the child axis. The redeclaration of a simple inheritable attribute A contained in, remove any simple inheritable attributes that are already in E's attribute axis (whether or not they are in the node-set) are removed. node-set). ENOTE:'s attribute axis needs to be enhanced further. A "join URI" function is used for xml:base fix up, whichmeaning takes any URI (Base) from an ancestor and joins a relative URI of E (R) (in most cases after the last slash) of the former and then normalizes the result. We describe here a simple method for providing this functionality similar to that foundanywhere in sections 5.2.1, 5.2.2. and 5.2.4. of RFC 3986 with the following modifications: This function may also be called with the URI to be fixed up (R) being null (i.e. when no xml:base attributeNamespaces exists in E)XML or empty "" ( xml:base="").rules The basecannot URI (Base) may also be unknown in which case the Algorithm is performed with Base.scheme = null, Base.authority = null, Base.path = "" and Base.query = null. Given this "join URI" function for xml:base fix upso the processing of the attribute axis of an element E in theinput node-set will be enhanced further.for preserving The element nodes along E'scapture ancestor axis are now examined for all occurrencessemantics of xml:base, that have been omitted (i.e. they are not in the members node-set). Let E be an element inof the node setnode-set. The whose ancestor axis contains successive elements En...E1XML (in reverse document order) that are omitted and E=En+1 is included. ThenThe canonical fix-up is only performed if at leastform one of E1 ... En has an xml:baseXML attribute. In that case let X1 ... Xm be the values ofHowever, since the xml:basecanonical attributes on E1be ... En+1 (in document order, from outermost to innermost, mXML <=processing, most n+1).XPath The sequence of values is reduced in reverse document orderdesigned to produce a single value by first combining Xma with Xm-1,XML then the result with Xm-2,parsed entity. and so on by calling the "join URI" function described previously untilif the new value for E's xml:base attribute remains. The result may also be null or empty ( xml:base="") in which case xml:base MUST NOT be rendered. Then,form lexicographically merge this fixed up attribute with the nodes of E's attribute axisapplications that are in the node-set. The result of visiting the attribute axisXML canonicalization is computed by processingto the attribute nodes inform this merged attribute list.changes. Attributes in the XML namespace other than xml:base, xml:id, xml:lang, and xml:space MUST be processed as ordinary attributes.)..
http://www.w3.org/TR/2007/CR-xml-c14n11-20070621/CR-xml-c14n11-20070509-diff.htm
CC-MAIN-2016-22
refinedweb
674
56.76
Scapy is a very powerful packet manipulation program and library, written in Python. It allows you to: forge / decode packets of a wide number of protocols, send them on the wire, capture them, match requests and replies, etc. This tool can also perform tasks such as scanning, trace-routing, probing, unit tests, attacks, network discovery, and much more. (official website). Python 3. Scapy: Powerful Python-based Interactive Packet Manipulation Tool Scapy is a Python tool that enables you to send, sniff and dissect/forge network packets. Those capabilities allows tool construction that can probe, scan or attack networks. It can replace: hping, arpspoof, arp-sk, arping, p0f,even some parts of Nmap, tcpdump, and tshark. Scapy can also perform a huge number of other specific operations/tasks that most other tools can’t, such as: - sending invalid frames, - injecting your own 802.11 frames, - combining techniques (VLAN hopping + ARP cache poisoning, VOIP decoding on WEP encrypted channel, etc.), - … Supported platforms (cross-platfom) Scapy supports Python 2.7 and Python 3 (3.4 to 3.6): - Linux, OSX, * BSD, and Windows. Features: - Craft PacketsScapy enables the user to describe a packet or set of packets as layers that are stacked one upon another. Layer fields have useful default values that can be overloaded. It doesn’t oblige the user to use predetermined methods or templates. - Interpret many with single probeUnlike many tools, it provides a complete set of data/information (send/received responses). In case of a small dataset, user might try to dig desired data himself. In other cases when data set is simply too big, most tools process and discard all data not directly related to specific point of view. Scapy in comparement, provides the complete raw data, available for multiple/different types of analysis (viewpoints). - It decodes, doesn’t interpret, - It is also modular. Python module can be used to build specific network tools, - Can be easily extended to support new protocols, - You can build your own tools, - etc. Install Requirements: Python 2.7.xor 3.4+ Clone it from the github repository, and run as follows: $ git clone $ cd scapy $ ./run_scapy >>> To update scapy, just run: $ git pull $ sudo python setup.py install matplotlibor cryptography. If you decide not to install all optional packages, Scapy will make sure to inform you about impossibility of using certain features: INFO: Can't import python gnuplot wrapper . Won't be able to plot. INFO: Can't import PyX. Won't be able to use psdump() or pdfdump(). Debian/Ubuntu: To install cryptography , simply run: $ sudo apt-get install tcpdump graphviz imagemagick python-gnuplot python-cryptography python-pyx If you need the cryptography-related methods, install it with pip: # pip install cryptography Fedora (9): # yum install git python-devel # cd /tmp # git clone # cd scapy # python setup.py install To install optional packages, run: # yum install graphviz python-cryptography sox PyX gnuplot numpy # cd /tmp # wget # tar xvfz gnuplot-py-1.8.tar.gz # cd gnuplot-py-1.8 # python setup.py install Mac OS X: On Mac OS X, it doesn’t work natively. You need to install Python bindings to use libdnet and libpcap. To install using homebrew, first update it, then run python buildings: $ brew update $ brew install --with-python libdnet $ brew install $ sudo brew install --with-python libdnet $ sudo brew install For installation on other platforms (* BSD, Windows), check the official docu page. Basic Usage To start Scapy, you’ll need root privileges: $ sudo ./scapy from scapy.all import * To see detailed documentation with usage examples, click the documentation button bellow.
https://haxf4rall.com/2019/02/04/scapy-interactive-packet-manipulation-tool/
CC-MAIN-2019-51
refinedweb
594
57.27
getluid, setluid - Get or set the login UID (Enhanced Security) #include <prot.h> uid_t getluid( ); #include <prot.h> int setluid( uid ); Security Library - libsecurity.so An integer representing the user ID being requested. The getluid() function gets the login UID associated with the process. The login UID is recorded with most audit events generated by the process, and is sometimes referred to as the audit UID (AUID). If the login UID has not been set yet, getluid() returns an error. The setluid() function sets the login UID for a process and all its descendants. The getluid() function returns the actual UID on success and a -1 for failure. The setluid() function returns 0 for success and -1 for failure. Security getluid(3)
http://nixdoc.net/man-pages/Tru64/man3/getluid.3.html
CC-MAIN-2014-52
refinedweb
122
59.5
Coffeehouse Thread16 posts Learning C# Back to Forum: Coffeehouse Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know. I am mostly new to programming, however I have done a little PHP work (gasp!) in the past (I got up to objects). I am wondering what is the best way to go about learning C#? It seems most of the books, and tutorials are for Java programmers; I have never touched Java (hopefully I wont have to). Does anyone know of tutorials, books, or other good ways of learning C#? Thanks guys, Mark Just read the 'Art of Assembly' programming - it uses a language called HLA which is very close to C# - after you finish that book, C# will be a breeze. Books are a must, but I think you need to get your hands dirty. Also, realize that learning c# (grammer, syntax, etc) is perhaps 25% of what you need. What you also really need to know is what the Framework provides. To program well, you need to be able to make use of the Framework classes - while you can re-invent the wheel with c#, there is no need to do it. I would start with some small project you would like to complete - maybe some widget that is helpful to you. Start programming it. Use the book mentioned above to get rolling, but then just start using the docs as you run into problems. In our development group we have also taken up the mantra that "the Framework probably already does this". So, when you encounter a programming need, be sure and scour the API docs first before programming the solution from the ground up. That book looks cool . Maybe I'll get the 2005 version when it comes out. Does anyone know of any free online resources? Also, I have MSDN, is there stuff on that? Thanks! Mark mw5300, C# is only a first step. You kinda have to pick whether you'll be doing desktop programming or web site programming. In .net parlance, you'll be doing WinForms or WebForms programming. For WebForms, I really like "ASP.net Unleashed" by Walther for WinForms, I really, really like "Programming Microsoft Windows w/ C#" by Petzold Good luck. I learned C# from 'Applied Microsoft .NET Framework Programming' by Jeffrey Richter, and 'Programming Microsoft .NET' by Jeff Prosise. Having said that, I was already skilled in C and C++ by that point and had some small exposure to Java, so adding a new language in the same family wasn't really a problem. I will recommend "Microsoft.NET for Programmers" by Fergal Grimes from Manning Publications Co. (2002) P.S. I love his sample poker game program. I learned C# and .NET by this book with Notepad without Visual Studio. Applied Microsoft .NET Framework Programming is awesome, but before you pick up this must read .NET book, you have to read some kinda language books such as Lippman's C# Primer. Good Luck!!!! Sheva I wonder if Stephen Prata write a "C# Primer Plus," it would be more helpful for beginners. This is a nice site And it looks like they finnaly updated it with the rest of the videos. Manning Publications Co.'s Books are awesome too, I've read Erik Brown's Windows Forms Programming with C#, and the sample application in this book is splendid:pSheva Does any one know whether or not Anders Hejlsberg has ever written any book on C# and .NET? I think Anders is the best person who can explains complex ideas and concept in a simple and easy-to-comprehend way:p Sheva learning C# is not difficult, is pretty verbal language. not as verbal as VB or Foxpro Once you pickup the syntax with some basic programs like tic-tac-toe, (Did it in college), or a dice game. You must learn the .Net FrameWork, O'Reily has some excellent framework books. I have found MSDN libary sucks the big one when your trying to figure out where in the framework something is placed Example a Random number Function, I allso like the C# in a nutshell. Anoth benefiet with the .net Framework is Mono use the same namespaces "The C# Programming Language" by Anders Heljsberg, Scott Wiltamuth and Peter Golde. Published by Addison Wesley (Microsoft .Net Development Series). ISBN 0-321-15491-6 It "covers new C# 2.0 features" and is a hardback. Personally I was disappointed with it - it's very dry and a rather "academic" read. I must be one of the worst examples of a computer programmer after reading all these posts! I just used whatever I found on Google, I know, not good. Don't do what I did it leads to a limited knowledge, of little to no use. Angus Higgins There are lots of resources on MSDN about C#:
https://channel9.msdn.com/Forums/Coffeehouse/108162-Learning-C
CC-MAIN-2017-09
refinedweb
836
73.68
Was trying to set up a ranking score for my users depending on their like counts. I was able to get this to work for current_user.like.count but for some reason when I want it to be for user.like.count [so that its not the same one for everyone] my app crashes and gives me this error message: "Undefined method `likes' for nil:NilClass" I have put all my relevant code below as well as my github for this. Any help would be amazing. Github Url: _rankings.html.erb <% if current_user.likes.count >3 %> A Ranking <% elsif %> <% current_user.likes.count == 2%> B Ranking <% else %> C Ranking <% end %> class UsersController < ApplicationController before_action :authenticate_user! def index @users = User.all end def show @users = User.find(params[:id]) end end Rails.application.routes.draw do devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" } resources :users, :controllers => "users_controller.rb" resources :users do resource :ranking, module: :users end resources :posts do resource :like, module: :posts end root to: "posts#index" end <h1 class="page-header">Platform Users</h1> <% @users.each do |user| %> <strong><%= user.username %></strong> <div class="round-image-50"><%= image_tag(user.avatar.url(:thumb)) %></div> div <%= render partial: "rankings", locals: {user: @user} %> </div> <% end %> Moving comment to answer. Id just loop through and not use a partial probably. But im pretty sure you can just pass locals: {user: user} to use the variable from the loop and not the instance variable from your controller. checkout the docs on it for a bit more details
https://codedump.io/share/o077YaH02qDW/1/setting-up-a-like-counter-on-rails-from-scratch
CC-MAIN-2017-09
refinedweb
251
60.41
I have this code where I read in a file with a getline to get the originaly balance of a checkbook type document. After that, the .txt.file is set up to read the date, debit or credit transaction type, amount, description of credit/debit. I keep getting an error dealing with the 'Entry.' parts of my code. Not sure what the problem is. Can someone take a look and see if they know whats going on. Is something messed up with my code somewhere. There are one or two more minor errors something to do with the action == part of the code. Any help would be great. Thanks Code:#include <iostream> #include <iomanip> #include <string> #include <fstream> using namespace std; typedef struct Entry { string date, action; float amount; string descript; }Entry; int main() { string name; float balance; ifstream fin; ofstream fout; cout << "enter the name of the Checkbook filename: " << endl; cin >> name; fin.open(name); fin >> balance; while (!fin.eof()) { fin >> Entry.date >> Entry.action; fout << Entry.date << Entry.action; if (action == "credit") { fin >> Entry.amount; fout << Entry.amount; balance = balance + Entry.amount; } else if (action == "debit") { fin >> Entry.amount; fout << Entry.amount; balance = balance - Entry.amount; } getline(fin, descript); fout << descript; } fout << balance; }//end main
https://cboard.cprogramming.com/cplusplus-programming/73084-error-checking.html
CC-MAIN-2017-47
refinedweb
207
79.26
Depending on the project, Django and Djoser can go really well together. Django provides such an enormous feature set as a foundation, and such a modular platform, that tools like Djoser can provide enormous value while still staying out of the way of the rest of your application. At the same time, the whole solution (Django, Djoser, and any other reusable Django app I’ve ever seen), top to bottom, is Just Python™. That means you can almost always find the right place to hook in your own code, without having to take over responsibility for an entire solution. Djoser is a library that integrates nicely into a Django REST Framework project to provide API endpoints for things like user registration, login and logout, password resets, etc. It also integrates pretty seamlessly with Django-SimpleJWT to enable JWT support, and will expose JWT create, refresh, and verify endpoints if support is turned on. It’s pretty sweet. Well…. most of the time. The only real issues I’ve had with Djoser always root from one of two assumptions the project makes: - That you’re puritanical in your adherence to REST principles at every turn, and - That you’re building a Single Page Application (SPA) That first one is easily forgivable: if you’re going to be an opinionated solution, it’s best to be consistent, and strict. The minute you fall off of that wagon, everything starts to devolve into murkiness. It doesn’t seem like a big leap to say that a lot of developers prefer an API that is clear and consistent over one that is vague and inconsistent. As for the second assumption, it honestly doesn’t get in the way very often, but on a recent project, it bit me pretty hard. On this project, I had to leverage Djoser in my Django project’s user activation flow. User Registration and User Activation User activation happens as part of the user registration process in my case (and, I suspect, most cases). At a high level, the registration flow goes like this: - a POST is sent to the server requesting that a given username or email be given a user account, using the given password. - the server generates a token of some kind, uses that token to generate a verification link, and sends an account activation email containing the link. - the end user opens the email and clicks the link - magic - the user is activated, and may or may not get an email confirming that their account is ready to go All of this is straightforward until you get to step 4: ‘magic’. Big surprise, right? Also perhaps unsurprising is that this is where Djoser’s assumptions make life difficult if you’re not building a Single Page Application, and/or are not a REST purist. Djoser User Registration Before getting to activation, you have to register. For completeness, it’s worth pointing out that Djoser provides an endpoint that takes a POST request with the desired username, email, and password to kick things off. It integrates nicely with the rest of your application without any real work to do other than adding a urlpattern that’s given to you to your urls.py file. In my case, I’m using a custom user model and I changed the USERNAME_FIELD to ’email’, and as a result, Djoser accepts just the email and password fields by default, because it’s leaning on the base Django functionality for as much as possible, which is smart and makes everyones’ lives easier. When this POST request comes in, password validators and any other things you have set up to happen at user creation time will happen, including the creation of a user record. However, the is_active flag will be False for that record. Then it generates an encoded uid (from the record it created) and a verification token, uses them along with the value of ACTIVATION_URL to form a confirmation link, puts that in an email to the email address used to register, and sends it. And that leads us to… Djoser User Activation First, let’s have a look at the default value for Djoser’s ACTIVATION_URL setting. This setting determines the URL that will be emailed to the person who is trying to register a new account. The default value is ` '#/activate/{uid}/{token}'` This is a front end URL with placeholders for the uid and token values. It gets assembled into an account registration verification link that looks like this: Up to this point in my project, I was gleefully following along with what Djoser seems to be making easy for me. Then I clicked the above link and everything crashed. Why? Because Djoser does not have a back end view to handle the front end URL that is the default ACTIVATION_URL. Here’s the explanation from one of the project maintainers: I suppose you directly use an url to activation view which expects POST request. When you open a link to this view in browser it makes a GET request which is simply not working. Our assumption is that GET requests should not change the state of application. That’s why the activation view expects POST in order to affect user model. Moreover it’s REST API so if you open one of the endpoints in your browser it displays JSON response which is not something for regular user. If you’re working on single page application you need to create a new screen with separate url that generates POST request to your REST API. If you really want to have view that activates user on GET request then you need to implement your own view, but remember to provide reasonable html response. To boil this down, my understanding from this is that: - Djoser devs know that the ACTIVATION_URL is going to be used to create a link that is sent to someone via email. - Djoser devs know that, when you click a link in an email, the result is a GET request to the back end. - Djoser devs have provided a view for user activation that only supports POST requests in spite of this fact. This is immensely frustrating. Their implementation seems to sacrifice a product that actually works at all for the sake of REST purity and maybe an assumption that all developers are only creating SPAs. What’s more, searching around for solutions turns up lots of confused people. The solution that I found trending was one where you write your own view that does accept a GET request, and then, inside the view, in the back end code, make a POST request to run the code in Djoser’s UserActivationView! This all just felt way too… wrong for me. The back end should not make an HTTP request to itself. Perhaps what I did wasn’t 100% perfect either, but I’d be interested in a dialog that could shed more light on why things are the way they are, and how to properly and effectively deal with it. My Workaround First, if you’re just here for the code, here’s the view I created and the urlpattern that maps to it. from djoser.views import UserViewSet from rest_framework.response import Response class ActivateUser(UserViewSet): def get_serializer(self, *args, **kwargs): serializer_class = self.get_serializer_class() kwargs.setdefault('context', self.get_serializer_context()) # this line is the only change from the base implementation. kwargs['data'] = {"uid": self.kwargs['uid'], "token": self.kwargs['token']} return serializer_class(*args, **kwargs) def activation(self, request, uid, token, *args, **kwargs): super().activation(request, *args, **kwargs) return Response(status=status.HTTP_204_NO_CONTENT) My Djoser ACTIVATION_URL in settings.py is ` 'accounts/activate/{uid}/{token}' And then the urlpattern used to map requests to that url looks like this: path('accounts/activate/<uid>/<token>', ActivateUser.as_view({'get': 'activation'}), name='activation'), What’s Actually Happening In My Workaround Djoser leans on Django and Django Rest Framework for a lot of its functionality. In order to support a large number of URLs while duplicating the least amount of code, Djoser utilizes Django Rest Framework’s ‘ViewSet’ concept, which lets you map an ‘action’ to a method in a single class. So, instead of having separate views for “UserRegistration”, “UserActivation”, “UserPasswordChange”, and all of the other things that can happen to a user, Djoser just has one class called “UserViewSet” (at djoser.views.UserViewSet). UserViewSet.activation is a method that takes a POST request containing the UID and token values, validates them, and (assuming validation passes) sends a signal that, in my application, sets the is_active flag on the user to True and sends the new user an email letting them know their account is now active. “It’s all perfect except for the POST!” I thought. But I wasn’t happy with solutions that have code in the back end going back out to the internet to trigger other code on the back end. I wasn’t going to accept sending a POST request to trigger another view. So, step one was to create my own view, inheriting from UserViewSet, and then allowing that view to accept a GET request, because you’ll recall that our mission is to handle the user clicking the link in their email to activate their account. Aside from accepting a GET request, I don’t really want my code to do anything at all. Just call super().activation and get out of the way! Now, the base implementation forces POST-only by decorating it with an @action decorator. The first argument to the decorator is a list of HTTP methods supported, and only post is listed. Great! So just don’t decorate that method, map it to a GET in urls.py, and you’re all set! Sadly, it was not quite that easy. Since UserViewSet.activation only supports a POST request, it also assumes that what it needs is already in request.data. But when our GET request comes in, the uid and token values will be in kwargs. Making things more difficult, the request object here is Django Rest Framework’s Request object, and its data attribute is not settable (I think it’s a property defined with no setter, but don’t quote me). So, I can’t just overwrite request.data and move on. Now what? So, we need to find a way to get data into request.data so that when I call super().activation(), it can act on that data. In looking at the code for UserViewSet.activation I found this: @action(["post"], detail=False) def activation(self, request, *args, **kwargs): serializer = self.get_serializer(data=request.data) That’s not the whole method, but for the whole method, the only time request.data is referenced is on the very first line of the code. Since we already said I can’t just shim in a line and overwrite request.data, let’s instead have a look at this get_serializer method! def get_serializer(self, *args, **kwargs): """ Return the serializer instance that should be used for validating and deserializing input, and for serializing output. """ serializer_class = self.get_serializer_class() kwargs.setdefault('context', self.get_serializer_context()) return serializer_class(*args, **kwargs) Notice that it doesn’t explicitly have a data parameter defined in the method’s signature. That means any reference to data would have to be in kwargs. That means we can set kwargs['data'] inside of this method to whatever we want. The updated method to make that happen only adds a single line: def get_serializer(self, *args, **kwargs): serializer_class = self.get_serializer_class() kwargs.setdefault('context', self.get_serializer_context()) kwargs['data'] = {"uid": self.kwargs['uid'], "token": self.kwargs['token']} return serializer_class(*args, **kwargs) That’s it. You just effectively replaced request.data. One More Time This is a lot. Let’s review what happened. First, the mission: - Support a GET request that happens when the user clicks the account activation link in their email. Next, the problem: - There’s code to handle user activation, but it doesn’t support a GET request. Then, the workaround: - Create our own view that inherits from the Djoser UserViewSet to handle the incoming GET request. - Override the activationmethod to accept the uidand tokenparameters coming in on the URL and remove the @actiondecorator that only allowed HTTP POST. - Override the get_serializermethod to insert the uidand tokenvalues into its kwargs['data']. - Define a urlpattern that maps a get request to our ACTIVATION_URL to our newly-created view. - Profit If you don’t recall any of the above steps from the discussion, scroll back up to see my code in the My Workaround section. But Maybe I’m Wrong! I’m wrong a lot. Maybe you know better. I’d be happy to see a better alternative solution. I’d also love to have a better understanding of the logic Djoser is using, because I admittedly just don’t get that. As a developer, I’m far more comfortable moving from APIs back towards the operating system and infrastructure services than I am moving into front end frameworks (though I do have to do that sometimes). So, if you understand how a ‘front end url’ is sent via email and then expected to somehow be intercepted by a front end that then sends a POST to the back end, please point me to some docs!
http://protocolostomy.com/2021/05/06/user-activation-with-django-and-djoser/
CC-MAIN-2022-27
refinedweb
2,215
61.46
The QDawg class provides an implementation of a Directed Acyclic Word Graph. More... #include <qtopia/qdawg.h> List of all member functions. A DAWG provides very fast look-up of words in a word list. The word list is created using readFile(), read() or createFromWords(). A list of all the DAWG's words is returned by allWords(), and the total number of words is returned by countWords(). Use contains() to see if a particular word is in the DAWG. The root node is returned by root(). A global DAWG is maintained for the current locale. See the Global class for details. The structure of a DAWG is a graph of Nodes. There are no cycles in the graph (since there are no inifinitely repeating words). Each Node is a member of a list of Nodes called a child list. Each Node in the child list has a letter, an isWord flag, at most one jump arc, and at most one arc to the next child in the list. If you traverse the Nodes in a DAWG, starting from the root(), and you concatenate all the letters from the single child in each child list that you visit, at every Node which has the isWord flag set your concatenation will be a word in the list represented by the DAWG. For example, the DAWG below represents the word list: ban, band, can, cane, cans, pan, pane, pans. This structuring not only provides O(1) lookup of words in the word list, but also produces a smaller storage file than a plain text file word list. Replaces all the DAWG's words with words read from dev. See also write(). See also write(). Warning: QDawg memory maps DAWG files. The safe method for writing to DAWG files is to write the data to a new file and move the new file to the old file name. QDawgs using the old file will continue using that file. This file is part of the Qtopia platform, copyright © 1995-2005 Trolltech, all rights reserved.
http://doc.trolltech.com/qtopia2.2/html/qdawg.html
crawl-001
refinedweb
339
82.24
Hi Notmuch folks-- I'm working on Autocrypt integration for notmuch right now, and it occurs to me that it might be useful to know the time that any given message was first seen by notmuch. I'm trying to not get distracted by implementing such a feature, but I wanted to log this as a feature request, along with a few thoughts about it. My idea is that the first time notmuch indexes a message, it would add a property to the message like firstseen=2019-05-31T23:15:24Z. Some nuances spring to mind: * This should *not* be cleared and reset on reindexing, so it doesn't belong in the index.* property namespace. * What happens when you delete a message? Maybe we should keep that value around for "ghosts" too -- can ghost documents have properties? Or is it bad to remember that we've seen the message if someone deletes it? * When even the ghost goes away (e.g. full thread deletion), presumably this property would go away. So If you deleted the message from your message store, notmuch would forget about it, and then the next time you ingest it it would get a later "firstseen=" property. I'm ok with this. * i don't think we have a way to search properties by range (e.g. the way that we can search date ranges). i don't need that feature for my use case, but maybe someone will come up with a use case that wants it? is there a way to store the datestamp in a way that it can be scanned the way that "date" can? or do we already have this and i'm just unaware? * What is the cost in terms of database size? It doesn't look like it would be expensive to me, but i haven't profiled it. * if we make such a change, how should we deal with already-indexed messages? Anyone have any thoughts, suggestions, or objections to this? I'm happy to explain more about my use case if people are interested too. --dkg signature.asc Description: PGP signature _______________________________________________ notmuch mailing list notmuch@notmuchmail.org
https://www.mail-archive.com/notmuch@notmuchmail.org/msg48057.html
CC-MAIN-2019-26
refinedweb
360
81.22
Lift. Table of Contents Key Features - Log-based API for NATS - Replicated for fault-tolerance - Horizontally scalable - Wildcard subscription support - At-least-once delivery support - Message key-value support - Log compaction by key - Single static binary (~16MB) - Designed to be high-throughput (more on this to come) - Supremely simple What is Liftbridge?. Why was it created? Liftbridge was designed to bridge the gap between sophisticated log-based messaging systems like Apacha Kafka and Apache Pulsar and simpler, cloud-native systems. There is no ZooKeeper or other unwieldy dependencies, no JVM, no complicated API,. Why not NATS Streaming? NATS Streaming provides a similar log-based messaging solution. However, it is an entirely separate protocol built on top of NATS. NATS is simply the transport for NATS Streaming. This means there is no "cross-talk" between messages published to NATS and messages published to NATS Streaming. Liftbridge was built to augment NATS with durability rather than providing a completely separate system. NATS Streaming also provides a broader set of features such as durable subscriptions, queue groups, pluggable storage backends, and multiple fault-tolerance modes. Liftbridge aims to have a small API surface area. The key features that differentiate Liftbridge are the shared message namespace, wildcards, log compaction, and horizontal scalability. NATS Streaming replicates channels to the entire cluster through a single Raft group. Liftbridge allows replicating to a subset of the cluster, and each stream is replicated independently. This allows the cluster to scale horizontally. How does it scale? Liftbridge scales horizontally by adding more brokers to the cluster and creating more streams which are distributed among the cluster. In effect, this splits out message routing from storage and consumption, which allows Liftbridge to scale independently and eschew subject partitioning. Alternatively, streams can join a load-balance group, which effectively load balances a NATS subject among the streams in the group without affecting delivery to other streams. What about HA? High availability is achieved by replicating the streams. When a stream is created, the client specifies a replicationFactor , which determines the number of brokers to replicate the stream. Each stream has a leader who is responsible for handling reads and writes. Followers then replicate the log from the leader. If the leader fails, one of the followers can set up to replace it. The replication protocol closely resembles that of Kafka, so there is much more nuance to avoid data consistency problems. See the replication protocol documentation for more details. What about performance? Benchmarks soon to come... Is it production-ready? No, this project is early and still evolving. Installation $ go get github.com/liftbridge-io/liftbridge Quick Start Liftbridge currently relies on an externally running NATS server . By default, it will connect to a NATS server running on localhost. The --nats-servers flag allows configuring the NATS server(s) to connect to. Also note that Liftbridge is clustered by default and relies on Raft for coordination. This means a cluster of three or more servers is normally run for high availability, and Raft manages electing a leader. A single server is actually a cluster of size 1. For safety purposes, the server cannot elect itself as leader without using the --raft-bootstrap-seed flag, which will indicate to the server to elect itself as leader. This will start a single server that can begin handling requests. Use this flag with caution as it should only be set on one server when bootstrapping a cluster. $ liftbridge --raft-bootstrap-seed INFO[2019-06-28 01:12:45] Server ID: OoVo48CniWsjYzlgGtKLB6 INFO[2019-06-28 01:12:45] Namespace: liftbridge-default INFO[2019-06-28 01:12:45] Retention Policy: [Age: 1 week, Compact: false] INFO[2019-06-28 01:12:45] Starting server on :9292... INFO[2019-06-28 01:12:46] Server became metadata leader, performing leader promotion actions Once a leader has been elected, other servers will automatically join the cluster. We set the --data-dir and --port flags to avoid clobbering the first server. $ liftbridge --data-dir /tmp/liftbridge/server-2 --port=9293 INFO[2019-06-28 01:15:21] Server ID: zsQToZyzR8WZfAUBiHSFvX INFO[2019-06-28 01:15:21] Namespace: liftbridge-default INFO[2019-06-28 01:15:21] Retention Policy: [Age: 1 week, Compact: false] INFO[2019-06-28 01:15:21] Starting server on :9293... We can also bootstrap a cluster by providing the explicit cluster configuration. To do this, we provide the IDs of the participating peers in the cluster using the --raft-bootstrap-peers flag. Raft will then handle electing a leader. $ liftbridge --raft-bootstrap-peers server-2,server-3 Configuration In addition to the command-line flags, Liftbridge can be fully configured using a configuration file which is passed in using the --config flag. $ liftbridge --config liftbridge.conf An example configuration file is shown below. listen: localhost:9293 data.dir: /tmp/liftbridge/server-2 log.level: debug # Define NATS cluster to connect to. nats { servers: ["nats://localhost:4300", "nats://localhost:4301"] } # Specify message log settings. log { retention.max.age: "24h" } # Specify cluster settings. clustering { server.id: server-2 raft.logging: true raft.bootstrap.seed: true replica.max.lag.time: "20s" } See the configuration documentation for full details on server configuration. Client Libraries Currently, there is only a high-level Go client library available. However, Liftbridge uses gRPC for its client API, so client libraries can be generated quite easily using the Liftbridge protobuf definitions . Roadmap Acknowled. 查看原文: Liftbridge: Lightweight, fault-tolerant message streams
https://www.ctolib.com/topics-142077.html
CC-MAIN-2019-39
refinedweb
909
50.33
cmds - ceph metadata server daemon cmds -i name [ --rank rank ] [ --shadow rank ] cmds is the metadata server daemon for the Ceph distributed file system. One or more instances of cmds collectively manage the file system namespace, coordinating access to the shared OSD cluster. Each. --mds rank Start up as (or standby for) the given MDS rank. If not specified, a rank will be assigned by the monitor cluster. --shadow rank Shadow a the given MDS rank. The given MDS log will be replayed, checking for recovery errors. -D Debug mode: do not daemonize after startup (run in foreground) and send log output to stdout. -f do not daemonize after startup (run in foreground), but log to the usual location. Useful when run via crun(8). -c ceph.conf, --conf=ceph.conf Use ceph.conf configuration file instead of the default /etc/ceph/ceph.conf to determine monitor addresses during startup. -m monaddress[:port] Connect to specified monitor (instead of looking through ceph.conf). cmon is part of the Ceph distributed file system. Please refer to the Ceph wiki at for more information. ceph(8), cmon(8), cosd(8)
http://huge-man-linux.net/man8/cmds.html
CC-MAIN-2020-10
refinedweb
188
60.41
Jonas Genannt <jonas.genannt@capi2name.de> writes: >]. This looks mostly good. Just a few issues: * debian/copyright doesn't contain the URL of where you got the upstream source from. * debian/copyright's copyright statement should match the copyright statement in the module, but you have -2001 instead of -2003 from the POD of Log::Dispatch. Not a major issue, but worth fixing. * Just drop the "source diff" target in debian/rules; nothing cares any more. * You have: -./Build clean in debian/rules. I know that pretty much everyone does this, but a recent thread in debian-devel convinced me that this is the wrong approach to take because it may miss legitimate failures. I've started using: ifeq (Build,$(wildcard Build)) ./Build clean endif instead. I won't insist that you change this, but I think it's cleaner to do things this way. Let me know when you've fixed the above (except maybe the last) and I'll sponsor the package. -- Russ Allbery (rra@debian.org) <>
https://lists.debian.org/debian-mentors/2005/12/msg00040.html
CC-MAIN-2015-27
refinedweb
169
76.72
Are you sure? This the IBM logo. Java..ibm. product. indicating US registered or common law trademarks owned by IBM at the time this information was published. or both. the Adobe logo. in the United States. other countries. and ibm. or both. Microsoft. and the PostScript logo are either registered trademarks or trademarks of Adobe Systems Incorporated in the United States. other countries.Trademarks IBM. x IBM Cognos Business Intelligence V10.shtml The following terms are trademarks of the International Business Machines Corporation in the United States. other countries.com/legal/copytrade. Windows. These and other IBM trademarked terms are marked on their first occurrence in this information with the appropriate symbol (® or ™). Inc.com are trademarks or registered trademarks of International Business Machines Corporation in the United States.1 Handbook . and the Windows logo are trademarks of Microsoft Corporation in the United States. A current list of IBM trademarks is available on the Web at. and/or other countries. Other company. and all Java-based trademarks are trademarks of Sun Microsystems. or both. Such trademarks may also be registered or common law trademarks in other countries. other countries. or service names may be trademarks or service marks of others. standards. Brecht Desmeijter is a Proven Practice Advisor in Bedfont. His areas of expertise include the IBM Cognos infrastructure and the Software Development Kit. data integration and data modeling. He writes extensively about Cognos business solutions development life cycle and Business Analytics requirements. Dean worked as an IT infrastructure design and out-sourcing consultant.1. He also © Copyright IBM Corp. Rodrigo Frealdo Dumont is an IT Specialist at the IBM Brazil Global Delivery Center. and IT Architect. All rights reserved. Cognos Software team.S. Canada. The book is primarily focused on the roles of Advanced Business User. 2010. Business Analytics in Philadelphia. U. including reporting. He holds a degree in Computer Science from Hogeschool Gent. The team who wrote this book This book was produced by a team of specialists from around the world working in Ottawa. Currently he acts as a Cognos development lead of Business Analytics projects at the Business Analytics Center of Competency. xi .K. Dean Browne is a Product Manager for IBM Software. You can use this book to: Understand core features of IBM Cognos BI V10. U. Belgium. Dean is responsible for IT value related features in IBM Cognos products. Pennsylvania. He has 4 years of experience in the IBM Cognos Business Intelligence field. Administrator. Before joining IBM Software Group 7 years ago. He designed global telecommunications and server infrastructures.1 Realize the full potential of IBM Cognos BI Learn by example with practical scenarios This book uses a fictional business scenario to demonstrate the power of IBM Cognos BI. He has four years of experience in Business Analytics applications. and out-sourced support processes for global chemical and pharmaceutical corporations. and remotely. Professional Report Author. As part of the IBM Business Analytics.Preface IBM® Cognos® Business Intelligence (BI) helps organizations meet strategic objectives and provides real value for the business by delivering the information everyone needs while also reducing the burden on IT. Modeler. This IBM Redbooks® publication addresses IBM Cognos Business Intelligence V10. Ksenija Rusak is a Client Technical Professional in IBM Croatia. Author of the IBM Cognos System Management Methodology. working with local technical communities in providing technical sales support for major prospects and customers. He holds a degree in Communications and Psychology from The University of Ottawa and a diploma in Information Technology from ITI. Rodrigo holds a bachelor degree in Systems Analysis from Pontifícia Universidade Católica of Campinas. She is a member of the Community of Practice for Central and Eastern Europe responsible for the Cognos portfolio. In 2007. Rodrigo is an IBM Certified Designer for Cognos 8 BI Reports and IBM Certified Developer for Cognos 8 BI Metadata Models. technical writing. IBM InfoSphere™ Warehouse). he has focused on the technology and infrastructure organizations need to drive better business performance. Scott Masson is an IBM Cognos Senior Product Manager. implementation of business intelligence solutions. reporting tools such as Microsoft® Reporting Services and Crystal Reports and data warehousing implementations (Microsoft SQL Server DTS.acts as a technical lead and subject matter expert of IBM Cognos for the Information and Data Management Center of Competence of Application Services area in Brazil. and Tivoli®. and customer support. He has 9 years of experience working with IBM Cognos products with a focus on metadata modeling and report design. John Leahy is a Proven Practice Team Leader with the IBM Cognos Business Analytics iApps Team. His areas of expertise include course development. He has written extensively on IBM Cognos Framework Manager and IBM Cognos Report Studio. Armin Kamal is an IBM Cognos Proven Practice Advisor for Business Analytics in Canada. end-user education and large-scale projects. John is an IBM Cognos Planning Certified Expert and an IBM Cognos TM1® Certified Developer. he writes extensively around IBM Cognos products and how to optimize the administration of the Business Intelligence infrastructure. WebSphere®. With over 11 years in business intelligence and information management. She holds a degree in mathematical statistics and computer science. working in Ottawa. Canada. including technical sales. including AIX®. Her areas of expertise include the IBM Cognos portfolio. Shinsuke Yamamoto is an IT Specialist joining IBM Japan in 2001. consulting. He writes extensively about IBM Cognos Financial Performance Management products and has over 9 years experience working with IBM Cognos products in various roles. he moved to IBM Systems Engineering in Japan and has experience in handling DB2 projects as a subject matter expert and publishing xii IBM Cognos Business Intelligence V10.1 Handbook . John holds a bachelor’s degree in Business and Economics from Ursinus College. She has 9 years of IT experience. DB2®. He implemented various IBM products. IBM Cognos BI and PM Product Marketing. and ESB. Thanks to the following people for their contributions to this project: Daniel Wagemann Proven Practice Consultant. SOA. Rodrigo. Chris McPherson is Product Manager responsible for IBM Cognos Framework Manager and Metadata at the IBM Canada Ottawa Lab. Business Intelligence. Martin worked in the EMEA WebSphere Lab Services team in Hursley. Shinsuke. He also teaches IBM classes worldwide about WebSphere. He is currently the leader of the Cognos support team. Martin Keen is a Consulting IT Specialist at the ITSO.K. IBM Software Group Rebecca Hilary Smith Senior Manager. Before joining the ITSO. Martin holds a bachelor’s degree in Computer Studies from Southampton Institute of Higher Education. U. and Armin Special thanks to Chris McPherson for his written contributions to this book. Raleigh Center. focusing on Cognos architecture. IBM Business Analytics Andrew Popp IBM Cognos BI and PM Product Marketing and GTM Strategy. He holds a BA from the University of Western Ontario. He writes extensively about WebSphere products and service-oriented architecture (SOA). Ksenija. IBM Business Analytics Preface xiii . Martin. Business Analytics. design and administration. Scott.technical guides about DB2. Figure 1 Ottawa team (left-to-right): Dean. IBM Business Analytics Wassim Hassouneh Product Manager. IBM Cognos Software Rola Shaar Senior Product Manager. IBM Business Analytics Doug Catton Proven Practice Advisor.1 Handbook . IBM Ottawa Paul Glennon Product Manager. IBM Software Group Jennifer Hanniman Senior Product Manager. IBM Business Analytics Paul Young Proven Practice Advisor. IBM Business Analytics xiv IBM Cognos Business Intelligence V10. IBM Business Analytics James Melville Pre-Sales . IBM Ottawa Bill Brousseau Cognos Beta Management Team. IBM Business Analytics Ronnie Rich Product Manager. IBM Ottawa Robert Kinsman Product Manager. IBM Business Analytics Michael McGeein Senior Product Manager. IBM Business Analytic Stewart Winter Senior Software Developer.Andreas Coucopoulos IBM Cognos 8 Platform Product Marketing and GTM Strategy.Financial Consolidations. Cognos BI. IBM Business Analytics Mike Armstrong Senior Manager Cognos Platform Product Management. IBM Ottawa Douglas Wong Technical Solution Manager. IBM Business Analytics Greg McDonald Product Manager. IBM Ottawa Brett Johnson Information Development Infrastructure Lead. NY 12601-5400 Stay connected to IBM Redbooks Find us on Facebook:. and apply online at: ibm. HYTD Mail Station P099 2455 South Road Poughkeepsie. Your efforts will help to increase product acceptance and customer satisfaction.com Mail your comments to: IBM Corporation. as you expand your network of technical contacts and relationships.com/redbooks/residencies. Residencies run from two to six weeks in length.html Comments welcome Your comments are important to us! We want our books to be as helpful as possible.Now you can become a published author. Send us your comments about this book or other IBM Redbooks publications in one of the following ways: Use the online Contact us review Redbooks form found at: ibm.com/redbooks Send your comments in an email to: redbooks@us.com/ibmredbooks Preface xv . and you can participate either in person or as a remote resident working from your home base.facebook. International Technical Support Organization Dept. while honing your experience using leading-edge technologies. Find out more about the residency program.com/IBMRedbooks Follow us on Twitter:. browse the residency index. too! Here’s an opportunity to spotlight your skills. and become a published author—all at the same time! Join an ITSO residency project and help write a book in your area of expertise. grow your career.ibm. com/Redbooks.redbooks.redbooks.html xvi IBM Cognos Business Intelligence V10.Look for us on LinkedIn:. and workshops with the IBM Redbooks weekly newsletter: Explore new Redbooks publications.1 Handbook . residencies.ibm.nsf/subscribe?OpenForm Stay current on recent Redbooks publications with RSS Feeds:. 2010. 1 . All rights reserved.Part 1 Part 1 IBM Business Analytics © Copyright IBM Corp. 1 Handbook .2 IBM Cognos Business Intelligence V10. THIS PAGE INTENTIONALLY LEFT BLANK . shareholders or officers. can help achieve economic. the above is a paid promotion. © 2011 Cisco and/or it’s affiliates. and using real-time information and analytics. All rights reserved. . based on the network as the platform. it’s where access to new services. ibm management. nor does it reflect the opinion of ibm. ibm disclaims any and all warrantees for goods or services received through or promoted by the above company. social and environmental sustainability…together through Smart+Connected Communities changing a community. a country. the world. services or websites by ibm.sponsorship promotion THIS PAGE INTENTIONALLY LEFT BLANK transforming communitites it’s where the concept of community is reborn. it does not constitute an endorsement of any of the above company's products. all levels of an organization can receive information how. we introduce IBM Business Analytics and IBM Cognos BI and discuss the following topics: IBM Business Analytics Introduction to IBM Cognos BI © Copyright IBM Corp. All rights reserved. In addition. and where they need it to make faster and better aligned decisions. manage. In this chapter. 2010. when. Introduction to IBM Cognos Business Intelligence Organizations are pressured constantly to understand and react quickly to information. With a capable and efficient business intelligence solution. Many organizations often satisfy this complexity and these diverse demands with a number of point solutions. IT is simplified with fewer components to deploy.1 Chapter 1. and maintain. you can satisfy needs throughout the user community and ensure that everyone can work and collaborate from a consistent set of data. With IBM Cognos Business Intelligence (BI) solutions. 3 . network and collaborate. With IBM Cognos BI. users can: Easily view. taking advantage of mobile devices and real-time analytics Integrate and link analytics in everyday work to business workflow and process Organizations need to make the most of a workforce that is increasingly driven to multi-task. predictive or what-if analysis Collaborate to establish decision networks to share insights and drive toward a collective intelligence Provide transparency and accountability to drive alignment and consensus Communicate and coordinate tasks to engage the right people at the right time Access information and take action anywhere.1 Handbook . assemble and personalize information Explore all types of information from all angles to assess the current business situation Analyze facts and anticipate tactical and strategic implications by simply shifting from viewing to more advanced. 4 IBM Cognos Business Intelligence V10.2 Introduction to IBM Cognos BI IBM Cognos BI provides a unified workspace for business intelligence and analytics that the entire organization can use to answer key business questions and outperform the competition. IBM Cognos BI delivers analytics everyone can use to answer key business questions.1. IBM Cognos BI features allow business users to easily view. Introduction to IBM Cognos Business Intelligence 5 . and personalize information to follow a train of thought and to generate a unique perspective. assemble. build on the insights of others. it is difficult to incorporate statistical results with core business reporting. Understanding the scenarios that affect business enables the business user to make informed recommendations to the business and provides an increased competitive advantage. The ability to explore all types of information from all angles to assess the current business situation provides a deeper understanding of the patterns that exist in data. Chapter 1. and available tools might not provide the freedom to combine and explore information in the way they want. and incorporate data from a variety of sources.2. business users do not know how to get to the information that they need. IBM Cognos BI allows business users to consume fact-based statistical evidence to support key decisions directly in the IBM Cognos BI environment.2. 1. assemble.1 Easily view. and personalize information Often. Giving business users greater self-service control reduces demands on IT and business intelligence systems. These functions allow business users to deliver reports that include statistical insight and validation and to distribute these reports to the larger business community.2.1.2 Explore all types of information If a separate tool is required. users can personalize content.3 Analyze facts and anticipate tactical and strategic implications Business users need tools that let them accurately evaluate and identify the impact that different scenarios will have on the business and on the bottom line. 1. These capabilities ensure that more people are engaged in providing unique insights and delivering faster business decisions. Using a single place to quickly see a view of their business. IBM Cognos BI allows the business user to analyze facts and anticipate strategic implications by simply shifting from viewing data to performing more advanced predictive or what-if analysis. For information about using IBM Cognos Query Studio. You can view and open favorite dashboards and reports. Using IBM Cognos Report Studio. see the IBM Cognos Query Studio User Guide or the online Quick Tour. IBM Cognos Analysis Studio With IBM Cognos Analysis Studio. IBM Cognos Report Studio IBM Cognos Report Studio is a robust report design and authoring tool.2. For more information about using IBM Cognos Business Insight. You can also use comments and activities for collaborative decision making and use social software such as IBM Lotus® Connections for collaborative decision making. edit. professional reports created in IBM Cognos Report Studio. according to your specific information needs. refer to IBM Cognos Report Studio User Guide or the online Quick Tour. IBM Cognos Business Insight With IBM Cognos Business Insight. online analytical processing (OLAP). report authors can create. given the depth of features that IBM Cognos Report Studio provides.1.4 IBM Cognos BI user interfaces IBM Cognos BI includes web-based and Windows®-based user interfaces that provide a business intelligence experience that is focused upon the needs of different users. and distribute a wide range of professional reports. users can explore and analyze data from different dimensions of their business. Users can also compare data to spot trends or anomalies in performance. IBM Cognos Analysis Studio provides access to dimensional. IBM Cognos Query Studio Using IBM Cognos Query Studio. and save reports to meet reporting needs that are not covered by the standard. as well as external data sources such as TM1 Websheets and CubeViews.1 Handbook . This book does not cover use of IBM Cognos Report Studio. and dimensionally 6 IBM Cognos Business Intelligence V10. They can also define corporate-standard report templates for use in IBM Cognos Query Studio and edit and modify reports created in IBM Cognos Query Studio or IBM Cognos Analysis Studio. manipulate the content in the dashboards. For information about using IBM Cognos Report Studio. users with little or no training can quickly design. see the IBM Cognos Business Insight User Guide. you can create sophisticated interactive dashboards using IBM Cognos content. and email your dashboards. create. IBM Cognos Framework Manager IBM Cognos Framework Manager is the IBM Cognos BI modeling tool for creating and managing business related metadata for use in IBM Cognos BI analysis and reporting. Introduction to IBM Cognos Business Intelligence 7 . see the IBM Cognos Metric Studio User Guide for Authors. Users can monitor. integrated business view of any number of heterogeneous data sources. deliver alerts by email.modeled relational data sources. For example. Metadata is published for use by reporting tools as a package. sending an email to the appropriate people. IBM Cognos Event Studio In IBM Cognos Event Studio. you set up agents to monitor your data and perform tasks when business events or exceptional conditions occur in your data. When an event occurs. For information about using IBM Cognos Administration. It provides easy access to the overall management of the IBM Cognos environment and is accessible through IBM Cognos Connection. Agents can publish details to the portal. IBM Cognos Administration IBM Cognos Administration is a central management interface that contains the administrative tasks for IBM Cognos BI. For information about using IBM Cognos Event Studio. For information about using IBM Cognos Metric Studio. you can create and deliver a customized score carding environment for monitoring and analyzing metrics throughout your organization. see the IBM Cognos Analysis Studio User Guide or the online Quick Tour. IBM Cognos Metric Studio In IBM Cognos Metric Studio. people are alerted to take action. Chapter 1. Analyses created in IBM Cognos Analysis Studio can be opened in IBM Cognos Report Studio and used to build professional reports. analyze. providing a single. a support call from a key customer or the cancellation of a large order might trigger an event. For information about using IBM Cognos Analysis Studio. and monitor the status of events. and report on time-critical information by using scorecards based on cross-functional metrics. run and distribute reports based on events. see the IBM Cognos Administration and Security Guide. see the IBM Cognos Event Studio User Guide or the online Quick Tour. 1 Handbook . and levels are loaded at run time. hierarchies. IBM Cognos Framework Manager models the minimum amount of information needed to connect to a cube. Because cube metadata can change as a cube is developed.OLAP cubes are designed to contain sufficient metadata for business intelligence reporting and analysis. 8 IBM Cognos Business Intelligence V10. Cube dimensions. For information about using IBM Cognos Framework Manager. see the IBM Cognos Framework Manager User Guide. THIS PAGE INTENTIONALLY LEFT BLANK . . With dual-shore capabilities. Reduce risk with our proven experience and expertise in delivering quality solutions you can trust. NEC is a leading provider of innovative IT. BPM and SOA • Understanding your unique industry challenges WWW. SERVICES OR WEBSITES BY IBM. IBM DISCLAIMS ANY AND ALL WARRANTEES FOR GOODS OR SERVICES RECEIVED THROUGH OR PROMOTED BY THE ABOVE COMPANY. ECM. SPSS and InfoSphere solutions & services. All rights reserved. IT DOES NOT CONSTITUTE AN ENDORSEMENT OF ANY OF THE ABOVE COMPANY'S PRODUCTS. IBM MANAGEMENT. Commerce. you need a strategic partner that will help you achieve your business goals. Master Data Management.PERFICIENT. SHAREHOLDERS OR OFFICERS. One with market strength and global stability plus one that will empower you with strategies that will help your business thrive.prft_redbook_2012_Layout 1 10/4/11 9:25 AM Page 1 SPONSORSHIP PROMOTION Perficient is an award-winning Premier IBM solution provider. Now. more than ever. THE ABOVE IS A PAID PROMOTION. visit Elevate Performance™ with NEC. training and ongoing support • Delivering technology expertise in Business Analytics.com/performanceanalytics © 2011 NEC Corporation. TM1. For more information. Portal and Collaboration. network and communications solutions for businesses across multiple vertical industries. That partner is NEC. We solve business problems with technology solutions by: THIS PAGE INTENTIONALLY LEFT BLANK • Aligning business strategy with a technology roadmap • Providing proven implementation methodology. NOR DOES IT REFLECT THE OPINION OF IBM.necam. As a Premier IBM Partner we deliver award-winning IBM Cognos. IOD 2011 Platinum Partner – Booth P605. SmartPredict solutions and a highly successful delivery team NEC is your “one stop” partner for Business Analytics/Information Management. 2010. We discuss the various components that make up an IBM Cognos Platform deployment for business intelligence applications and how you can deploy them to meet application requirements. We discuss the following topics: Enterprise class SOA platform architecture Open access to all data sources Business intelligence for all Common integrated security model © Copyright IBM Corp. All rights reserved.2 Chapter 2. we introduce the IBM Cognos Business Intelligence (BI) architecture and the IBM Cognos Platform. 9 . Overview of the IBM Cognos Business Intelligence architecture In this chapter. creating and administering dashboards. Services in the application tier operate on a peer-to-peer basis. 10 IBM Cognos Business Intelligence V10. including relational data sources and online analytical processing (OLAP). availability. web-based administration that provides a complete view of system activity as well as system metrics and thresholds so that organizations can resolve potential issues before there is a business impact. enterprise-class platform. The IBM Cognos Platform provides optimized access to all data sources. scorecards.1 Enterprise class SOA platform architecture IBM Cognos BI delivers a broad range of business intelligence capabilities on an open. and events—are accessed through web interfaces. The IBM Cognos BI user interfaces are accessed through the web tier.1 Handbook . with a single query service. reports. Any service of the same type. on any machine in an IBM Cognos Platform configuration. can satisfy an incoming request. The IBM Cognos Platform is built on a web-based service-oriented-architecture (SOA) that is designed for scalability. and openness. In addition. native SQL. This n-tiered architecture is made up of three server tiers: The web tier The application tier The data tier The tiers are based on business function and can be separated by network firewalls. analysis. which results in complete fault tolerance. The dispatching (or routing) of requests is done in an optimal way. and native MDX to optimize data retrieval for all these different data providers. The IBM Cognos Platform delivers the capabilities to manage business intelligence applications with centralized. which means that no service is more important and that there are loose service linkages.2. All capabilities—including viewing. this query service understands and takes advantage of the data source strength by using a combination of open standards such as SQL99. Reliability and scalability were key considerations when designing the IBM Cognos Platform. with automatic load balancing built into the system. These server roles also define the tier within the architecture that an IBM Cognos BI server uses.1 IBM Cognos Platform server roles To ensure optimal performance. For high availability or scalability Chapter 2.1. The IBM Cognos components that fulfill this role are referred to as the IBM Cognos Gateway.. Overview of the IBM Cognos Business Intelligence architecture 11 .Figure 2-1 illustrates a typical tiered deployment of the IBM Cognos Platform. The IBM Cognos Gateway component manages all web communication. The workload on the IBM Cognos Gateway server requires minimal processing resources. you can deploy multiple redundant gateways along with an external HTTP load-balancing router. 12 IBM Cognos Business Intelligence V10. At startup. The IBM Cognos Dispatcher component is a lightweight Java servlet that manages (and provides communication between) application services..requirements. A low affinity request operates just as efficiently on any service. requests are load balanced across all available services using a configurable. You can tune the performance of IBM Cognos Platform by defining how IBM Cognos Dispatcher handles requests and manages services. During the normal operation of IBM Cognos BI services. Affinity relates to the report service process that handled the original user request when multiple interactions need to occur to satisfy the request.1 Handbook . each IBM Cognos Dispatcher registers locally available services with the IBM Cognos Content Manager. Low-affinity connections are used to process low-affinity requests. It can be processed on any service. IBM Cognos Dispatcher IBM Cognos Dispatcher performs the load balancing of requests at the application tier. A high affinity request is a transaction that can gain a performance benefit from a previously processed request by accessing cache. weighted round-robin algorithm to distribute requests.. High-affinity connections are used to process absolute and high-affinity requests from the report services. but resource consumption is minimized if the request is routed back to the report service process that was used to execute the original process. which is referred to as high and low affinity. Similarly.and low-affinity connections.You can manage the number of threads per IBM Cognos BI reporting service process through the IBM Cognos Platform administration console by setting the number of high. as well as the minimum number of processes that should be running at non-peak times. IBM Cognos Dispatcher starts IBM Cognos Report Server processes dynamically as needed to handle the request load. For more details. You can determine the optimal Java heap size using Java garbage collection statistics. given two servers with an equal number of processors. The number of processors in a server and their clock rates are the two primary factors to consider when planning for additional IBM Cognos Report Server hardware capacity. configure the server with a significantly faster processor clock rate to have more report and report-service processes. For example.. In general. This setting ensures that as much memory as possible is available to the IBM Cognos Report Service. you must set a Java heap size. Chapter 2. IBM Cognos BI reporting service performance is closely tied to processor clock speed and throughput capabilities. refer to the IBM Cognos BI Architecture and Deployment Guide IBM Cognos Report Server The main service that is responsible for application-tier processing is the report or query service (often referred to as the BIBus processes). Overview of the IBM Cognos Business Intelligence architecture 13 . When configuring the IBM Cognos Platform server environment. An administrator can specify the maximum number of processes that these services can start. you generally configure a server with four available processors to use more report service processes than a server with only two available processors. which is not Java. Configure the number of processes for IBM Cognos Report Server based on the available processor capacity. refer to the IBM Cognos BI Architecture and Deployment Guide. IBM Cognos Content Manager maintains information in a relational database that is referred to as the content store database. Relational data sources that are tuned to meet the access requirements of the business community naturally perform better than those that are not.1 Handbook . retrieve or store report specifications. A minimum of one IBM Cognos Content Manager service is required for each IBM Cognos Platform implementation. At the web tier. to meet a variety of business intelligence processing requirements. Use the IBM Cognos BI Installation and Configuration Guide for complete information about the installation and initial configuration process. IBM Cognos BI deployment options The first step to creating a proper IBM Cognos BI environment begins with a successful installation. An experienced database administrator should monitor and tune relational database-management systems (RDBMS) to achieve optimum database performance. either horizontally or vertically. including relational and OLAP sources. IBM Cognos BI data-source performance considerations Query performance is typically bound to the performance of the server that hosts the data source for IBM Cognos BI. You can also deploy 14 IBM Cognos Business Intelligence V10. handle scheduling information and manage the IBM Cognos security name space. the IBM Cognos Gateway system requirements are lightweight and can. Server components within all three tiers can scale easily. handle large user loads with fewer system resources than other server tiers in the IBM Cognos Platform architecture. therefore. Content Manager performance can benefit from the availability of high-speed RAM resources and typically requires one processor for every four processors that are allocated for IBM Cognos Report Server processing. IBM Cognos BI can access many data sources. For detailed information about IBM Cognos Platform architecture and server deployment options. the IBM Cognos Report Server. Overview of the IBM Cognos Business Intelligence architecture 15 . for example using a configuration in which the total number of processors that are allocated among the virtual guest servers instances for the IBM Cognos Platform exceed the number of physical CPUs that are available on the physical server or LPAR. You can deploy multiple IBM Cognos Content Manager instances. use 2 GB RAM per CPU with IBM Cognos Content Manager and IBM Cognos Report Server instances. You can deploy multiple IBM Cognos Report Server instances to meet the processing requirements of large applications and user populations. or other service level agreements (SLAs). with the exception of IBM System z® deployments that have sufficient available resources. decisions regarding the best methods for deploying IBM Cognos BI are driven by application complexity. IBM Cognos Report Server performance is tied to overall system performance and.multiple IBM Cognos Gateway instances to meet requirements for additional user load. IBM Cognos Content Manager server hardware can also scale vertically to provide increased throughput. both the IBM Cognos Report Server and IBM Cognos Content Manager components can scale to meet application-processing requirements. throughput requirements. and IBM Cognos Content Manager are implemented in one or more WebSphere Application Server profiles or JVM instances. One instance actively process requests while the other instances remain in standby mode to provide high availability. Do not over-subscribe CPU resources with IBM Cognos BI implementations. Generally. Configure one physical server or virtualization platform guest instance per IBM Cognos Platform application tier server instance. IBM Cognos Report Server performs the heavy lifting within an IBM Cognos BI server deployment. can be affected by processor clock speed and I/O performance. At the application tier. and OLAP data source. server availability. Use IBM Cognos Report Server with two BIBus processes per processor and five threads per process (four low affinity and one high affinity). Use separate servers for the RDBMS that is hosting the content store database. Deployment options and recommendations include: Use one server and operating system instance with a single or multiple IBM Cognos Platform instances. therefore. relational data sources. user concurrency. and systems management requirements such as availability and security. General guidelines In general. Chapter 2. Content manager cache service The cache service enhances the overall system performance and IBM Cognos Content Manager scalability by caching frequent query results in each dispatcher. It performs object manipulation functions such as add. The service determines which tasks to execute and forwards those tasks to the monitor service for execution. query. This service runs the conditions and creates and stores the generated event list. In addition to running agents. Content manager service The content manager service interacts with the content store.2 IBM Cognos BI services This section introduces the various services offered by IBM Cognos BI. It also handles the content store management functions.1. update. These comments persist throughout different versions of the report. 16 IBM Cognos Business Intelligence V10. Batch report service The batch report service manages background requests to run reports and provides output on behalf of the monitor service. move. Data movement tasks. Data movement service The data movement service manages the execution of data movement tasks in Cognos BI. such as import and export.2. are created in the IBM Cognos Data Manager Designer and are published to IBM Cognos BI. delete. such as Builds and Job Streams.1 Handbook . Agent service The agent service is responsible for running agents. the agent service also runs two other types of specialized tasks: Stored procedures using IBM Cognos Report Server Web service tasks Annotation service The annotation service enables the addition of commentary to reports using IBM Cognos Business Insight. and copy. including lists of aliases and examples. Index data service The index data service provides basic full-text functions for storage and retrieval of terms and indexed summary documents. SDK requests: All SDK requests coming into IBM Cognos BI start with the event management services. release. Chapter 2. news items. and report output that is written to the file system are examples of content that is handled by the delivery service. Email. A human task such as report approval can be assigned to individuals or groups on an ad hoc basis or by any of the other services.Delivery service As the name implies. Overview of the IBM Cognos Business Intelligence architecture 17 . For tasks that are already entered the queue. The information found as part of the Upcoming Activities task in the IBM Cognos administration console is also provided by the event management service. Part of this service is a persistent email queue that is in place to guarantee that the items are forwarded to the configured SMTP server. Event management service The event management service is the service that handles scheduling. or suspend are forwarded from the event management service to the monitor service. suspending. requests to cancel. Graphics can be generated in the following formats: Raster Vector Microsoft Excel XML Portable Document Format (PDF) Human task service The human task service enables the creation and management of human tasks. Graphics service The graphics service produces graphics on behalf of the report service. the delivery service delivers content. Part of the scheduling aspect is the control over cancelling. and releasing scheduled tasks. Index search service The index search services provides search and drill-through functions. they must first be prepared. Monitor service The monitor service handles all of the requests set to run in the background. Metadata service The metadata service provides support for data lineage information that is displayed in Cognos Viewer. Metric studio service The metric studio service provides the IBM Cognos Metric Studio user interface for the purposes of monitoring and entering performance information. delete. and IBM Cognos Analysis Studio. writing history information about the individual task executions is the responsibility of the monitor service. remote log server. The exceptions to this process are the history details for deployment and IBM 18 IBM Cognos Business Intelligence V10. the monitor service then forwards the task to the appropriate service for execution.1. IBM Cognos Query Studio. meaning that the steps of a job must be analyzed for issues such as circular dependencies in nested jobs and resolution for run options that are part of the jobs. The job service completes these tasks and then sends the job to the monitor service for execution. reports that are set to run and then email the results. Job service Before jobs can be executed. it also queues requests and waits for resources to become available for the required service. and so forth). When a service indicates that there is sufficient bandwidth. file. The log service is called regardless of which logging output is specified (for example database. Lineage information includes information such as data source and calculation expressions. IBM Cognos Report Studio. Migration service The migration service manages the migration from IBM Cognos Series 7 to IBM Cognos BI version 10. and jobs.1 Handbook . update.Index update service The index update service provides write. Because the monitor service can receive more requests than can be executed. Log service The log service creates log entries that are received from the dispatcher and other services. and administration functions. Because the monitor service handles all of the background tasks. including scheduled tasks. such as IBM Cognos Analysis for Excel. Another function of the presentation service is to send the saved content when a request to view saved output is made.2 Open access to all data sources Most organizations have data sitting in different systems and data sources. If a request to execute the report is made from inside of Cognos Viewer. and IBM Cognos Mobile. such as HTML or PDF. navigation. The information found as part of the Current Activities task in the administration console is also provided by the monitor service. IBM Cognos Office Connection. 2. which are written directly to the content store using the IBM Cognos Content Manager component. It also receives generic XML responses from other services and transforms them into output format. and administration capabilities in IBM Cognos Connection. Overview of the IBM Cognos Business Intelligence architecture 19 . Presentation service The presentation service provides the display.Cognos Search indexing tasks. Report data service The report data service manages the transfer of report data between IBM Cognos BI and applications that consume report data. which makes gaining access to all data difficult. The IBM Cognos Platform provides the ability to deliver all information from wherever it resides and isolates Chapter 2. methods to ensure that users get complete access to data can be expensive. Query service The query service manages Dynamic Query Mode requests and returns the result to the requesting batch or report service. System service The system service is used by the dispatcher to obtain application configuration parameters and provides methods for interfacing with locale strings that are supported by the application for support of multiple languages. the request is handled by the report service. In addition. Report service The report service manages interactive report requests to run reports and provides the output for a user in IBM Cognos Business Insight or in one of the IBM Cognos studios. 2.3 Business intelligence for all IBM Cognos BI provides users with many options to access information.1 Handbook . This process removes barriers to information and hides source complexity from metadata modelers.4 Common integrated security model The IBM Cognos Platform provides integration with enterprise authentication and single sign-on (SSO) solutions and a central place to control access and authorization for all IBM Cognos BI objects. Each option uses common functions and interfaces. IBM Cognos software ensures satisfaction and a successful business intelligence project that the organization will embrace and promote. We discuss further details about these features in subsequent chapters in this book. Information consumers and executives can access reports. In addition. and other business intelligence objects using dashboards from IBM Cognos Business Insight. Executives can take IBM Cognos Active reports offline to keep working while out of the office. With complete. The IBM Cognos Platform provides a single point to access all data sources. 20 IBM Cognos Business Intelligence V10. Business users can interact and view all the data they need to make the best possible decision. charts. capabilities. 2.the user from technological complexity. Users familiar with office productivity tools can use IBM Cognos Analysis for MS Excel to blend the power of IBM Cognos BI information with the personal workspace of Excel. and data. optimized access to all information. IBM Cognos BI also provides tools to enable equal access to business intelligence information for users with physical disabilities. all capabilities that are associated with IBM Cognos BI can access data as soon as any data source is made available to it. Users on the go can use IBM Cognos Mobile to stay connected to their IBM Cognos BI information. IBM Cognos Advanced Business Users and Professional Report Authors can use IBM Cognos Business Insight Advanced to create new IBM Cognos BI objects and to analyze information from any source and from new perspectives. Business scenario and personas used in this book This chapter describes the fictitious business scenario and personas that we use to demonstrate IBM Cognos Business Intelligence (BI) functions and use cases that we describe in this book. All rights reserved.3 Chapter 3. 2010. 21 . In this chapter. we discuss the following topics: Business scenario overview Personas used in the scenarios in this book © Copyright IBM Corp. For more information about how to install IBM Cognos samples. These samples are included with IBM Cognos software and install with the IBM Cognos samples database. which sells to retailers from Geneva. rather. refer to the IBM Cognos Installation and Configuration Guide. The Great Outdoors company includes the following subsidiaries: GO Americas GO Asia Pacific GO Central Europe GO Northern Europe GO Southern Europe GO Accessories Each of these subsidiaries sells camping equipment. It does not manufacture its own products. The company built its business by selling products to other vendors. outdoor protection. with the exception of GO Accessories. the Great Outdoors company expanded its business by creating a website to sell products directly to consumers. 22 IBM Cognos Business Intelligence V10. and IBM provided samples to describe business scenarios and product functionality. The Great Outdoors company executives need a clear view of where the pain points exist in the sales process. The fictional Great Outdoors company began in October 2004 as a business-to-business company.1 Business scenario overview Fictional company used for this scenario and samples: This book uses the fictional Great Outdoors company. the products are manufactured by a third party and are sold to third-party retailers. Each of these countries has one or more branches. The Great Outdoors organization is made up of six companies. Because the company has steadily grown into a worldwide operation over the last several years. These companies are primarily geographically-based. it has been difficult for managers of the Great Outdoors company to run their branches and monitor only performance indicators based on sales.1 Handbook . Recently. mountaineering equipment. Switzerland. GO Accessories sells only Personal Accessories. golf equipment. and personal accessories.3. In this book. employee. bundle sales.3.1. satisfaction (customer. gross profit. such as quantity.2 Information stored in the data warehouse of this company The information management team of the Great Outdoors company created a data warehouse with information about sales targets.1. marketing (promotions.1 Business questions to address Based on this scenario. we focus on the Sales perspective in order to translate the data warehouse data into meaningful insights about the Great Outdoors company.. and human resources to solve this information gap. gross margin. revenue. In our scenarios in this book. Business scenario and personas used in this book 23 . chapters within this book focus on creating a dashboard that provides insight to address the following questions. charges and shipping from its warehouses Metrics. distribution. we focus on the following dimensions: Organization Product Retailer Order method Sales staff Purchase. planned revenue. and retailer)..2. We describe scenarios are that meet the business needs of these users.1 Handbook . IBM Cognos BI addresses these business needs with a range of integrated tools. The six personas are as follows: Advanced Business User Professional Report Author Modeler Administrator Analyst Business User Each these personas has different needs and expectations that must be delivered by the Business Analytics platform. A user can take on the role of one or more personas (for example Advanced Business Users and Professional Report Author).2 Personas used in the scenarios in this book To demonstrate the samples and business scenarios.3. In this book. The Advanced Business User leads the interpretation of business requirements and creates reports to answer business questions. the Advanced Business User’s name is Lynn Cope. that represent people in a real Business Analytics deployment.1 Advanced Business User This persona has a deep understanding of the business needs and a good understanding of technology. this book refers to user roles. 3. such as IBM Cognos Business Insight and IBM Cognos Business Insight Advanced. called personas. IBM Cognos Metric Studio Align tactics with strategy and monitor performance with scorecards. perform interactive exploration and analysis. IBM Cognos Query Studio Easily create simple reports with relational and dimensional data models. filters. IBM Cognos Business Insight Advanced Easily create new reports. and sort and change the display type to discover meaningful details about the information and collaborate with insights about the business performance. using calculations. group data. and create additional objects to existent reports. groups. IBM Cognos Analysis for Microsoft Excel Perform flexible. slicing and dicing the information. interactive exploration and analysis of multidimensional data into Microsoft Excel. apply filters. add external data. add calculation and statistics. and advanced queries. Business scenario and personas used in this book 25 . and sorting. IBM Cognos Mobile Consume reports and dashboards from a friendly interface on mobile devices. apply filters. IBM Cognos Planning Insert and update plans and actual data. sort. multiple objects.Solutions that can help this persona The following solutions can help the Advanced Business User meet the business needs: IBM Cognos Business Insight Create and change dashboards in order to organize the information. such as prompts. IBM Cognos Analysis Studio Easily perform interactive exploration and analysis on dimensional data models. interactive exploration and analysis. IBM Cognos TM1 Insert and update plans and actual data Chapter 3. IBM Cognos Report Studio Create professional reports with advanced features. advanced queries. In this book. . HMTL. IBM Cognos Event Studio Create events to monitor business performance.2. the Professional Report Author’s name is Lynn Cope. 26 IBM Cognos Business Intelligence V10. and leading practices of data modeling to deliver the best data models to be used in IBM Cognos solutions. bursting. The Modeler has a deep understanding of technology. databases. multiple objects.2 Professional Report Author This persona has a deep understanding of Cognos tools and creating reports based on business requirements. In this book. IBM Cognos Report Studio Create professional reports with advanced features.3 Modeler This persona works closely with the Business Analyst to understand the business needs and to translate them in data models. the Modeler’s name is John Walker. conditional behaviors.2. Apply filters and sort and change the display type to display meaningful details about the information. such as prompts.3. 3. and multi-language support. Chapter 3. such as prompts. and Load data to the database data model. IBM Cognos Query Studio Create simple queries to check if the model is working as expected. IBM Cognos Administration Manage security of the packages and data sources. IBM Cognos TM1 Create dimensional cubes (in memory OLAP) for planning purposes. multiple objects. Business scenario and personas used in this book 27 . configure data multi-language support and security filters Transformer Create dimensional cubes with security filters to improve performance of the Business Analytics solution. Transform. IBM Cognos PowerPlay® Studio Perform interactive exploration and analysis on dimensional data models. IBM Cognos Planning Create dimensional cubes (OLAP) for planning purposes. IBM Cognos Connection Add data sources and connections to databases to be used with IBM Cognos Framework Manager and IBM Cognos Transformer. check the execution path of the queries. slicing and dicing the information to check if the model is working as expected. and advanced queries. define filters. IBM Cognos Data Manager Create jobs to Extract. IBM Cognos Report Studio Create professional reports with advanced features. 3. Remaining personas: The remaining personas are not advanced users.2. LDAP preferences and start the services to run IBM Cognos.2. 28 IBM Cognos Business Intelligence V10. ports.3. In this book. upgrades. and downtime Solutions that can help this persona The following solutions can help the Administrator meet the business needs: IBM Cognos Administration Monitor server resources. the Analyst is named Ben Hall.4 Administrator This persona is responsible for installing the overall IBM Cognos solution. Persona’s needs The Administrator has the following business needs: Application installation. content store database connection. portlets. distribution lists. configuration. In this book. and life cycle Manage complex environments Visibility into processes and activities Limit costly maintenance.1 Handbook . dispatchers. The Analyst also collaborates with colleagues to provide insight about Great Outdoors business performance. They are consumers of reports and dashboards that were created by an Advanced Business User or a Professional Report Author. and set search indexes. printers.5 Analyst This persona uses dashboards and reports when connected to the network (mobile computer or mobile phone) or when not able to access the network to provide consolidated. data sources. security. IBM Cognos Lifecycle Manager Manage and make the transition from prior versions of IBM Cognos to the latest version. the Administrator’s name is Sam Carter. configuring it. The personas described here might also perform ad-hoc analysis. IBM Cognos Configuration Set server URLs. styles. manage content. detailed reports and statistical analysis to support management decisions. and assuring that the IBM Cognos services running and performing properly. and sorting. interactive exploration and analysis of multidimensional data into Microsoft Excel. groups. using calculations. to apply filters. group data. Chapter 3. sort. IBM Cognos Business Insight Advanced Easily create new reports. add external data. Use the dashboards for interactive exploration and analysis. perform interactive exploration and analysis. Business scenario and personas used in this book 29 . Collaborate with insights. multiple objects and advanced queries. IBM Cognos Report Studio Create professional reports with advanced features. add calculation and statistics. and Testing and Statistical Process Control—to display the best insights about the business performance. filters. and create additional objects to existent reports. IBM Cognos Statistics Perform three different kinds of statistical calculations—Distribution of Data. IBM Cognos Analysis Studio Easily perform interactive exploration and analysis on dimensional data models. apply filters. and to sort and change the display type to discover meaningful details about the information. Data Analysis. IBM Cognos Query Studio Easily create simple reports with relational and dimensional data models. IBM Cognos Analysis for Microsoft Excel Perform flexible. slicing and dicing the information. such as prompts. 3.6 Business User This persona uses dashboards and reports that have been created specifically for this persona to understand aspects of the performance for this persona’s area of the Great Outdoors company. the Business User is named Betty Black. IBM Cognos Planning Insert and update plans and actual data.2. My Inbox of IBM Cognos Connection Store and open report views from previous executions of a report. IBM Cognos Connection Receive scheduled reports. IBM Cognos Planning Insert and update plans and actual data.1 Handbook . In this book. IBM Cognos TM1 Insert and update plans and actual data. IBM Cognos TM1 Insert and update plans and actual data 30 IBM Cognos Business Intelligence V10.IBM Cognos Mobile Consume reports and dashboards from a friendly interface on mobile devices.. Part 2 Part 2 IBM Cognos metadata modelling © Copyright IBM Corp. 2010. All rights reserved. 31 . 1 Handbook .32 IBM Cognos Business Intelligence V10. This chapter is not intended as a replacement for formal training on IBM Cognos Business Intelligence (BI) metadata modelling. 2010. The recommended training for IBM Cognos Framework Manager is IBM Cognos Framework Manager: Design Metadata Model. 33 . In this chapter. Because metadata modeling is the foundation of business intelligence reporting on relational data sources.4 Chapter 4. Create reporting packages with IBM Cognos Framework Manager This chapter provides an overview of IBM Cognos Framework Manager and illustrates several general modelling concepts through practical exercises. it is critical that the proper training and experience be gained to ensure a successful IBM Cognos BI project. All rights reserved.. This information familiarizes you with the IBM Cognos Framework Manager user interface (UI) and terminology. then using data warehouses or data marts that are refreshed at the required interval is a better choice. it is important for the modeler to understand the reporting requirements. known as a star schema data warehouse or data mart? How fresh does the data need to be? Will your reporting occur daily. if you require up-to-the-minute data in your reports. The modeler also needs to consider the following types of questions: Are those data sources appropriate for reporting? Is it a transactional system or the preferred reporting database structure.1 IBM Cognos Framework Manager overview IBM Cognos Framework Manager is the metadata model development environment for IBM Cognos BI. For example. followed by identifying which data sources contain the information that is required. This type of model is known as a Dimensionally Modeled Relational (DMR) model. metadata model design. however.4. 34 IBM Cognos Business Intelligence V10. by the hour day. Reviewing sample or mock reports that meet the business needs is a good start.1 Handbook . we discuss items that you need to consider before beginning metadata modeling projects.1 Reporting requirements and data access strategies Before creating an IBM Cognos Framework Manager project. This choice. You can also use it to add dimensional information to relational data sources that allow for OLAP-style queries. you can publish that metadata to IBM Cognos BI in the form of a package. or month for example. 4. then going with the transactional database might be the only option. and report package delivery to IBM Cognos BI. weekly. If the intervals of data freshness are greater.1. week. With IBM Cognos Framework Manager. because transactional systems are typically quite complex. It is a Windows-based client tool that you can use to create simplified business presentations of metadata that are derived from one or more data sources. or monthly? The answers to these types of questions can affect dramatically the data access strategy that you choose. This knowledge allows the modeler to make better decisions regarding data access strategies. In this section. can increase the metadata modeling work drastically. Give special attention to planning and scope before you embark on a business intelligence project to avoid rework down the road. it is better to push more processing to the data source. consider using some form of materialization in which views are created with pre-aggregated results. grouping. As a general rule.2 Metadata model Before we continue. Also ask the following questions before creating an IBM Cognos Framework Manager project: What type of business logic needs to be implemented? Are there specific calculations. filters. sorting. 4. A metadata model is a collection of metadata that is imported from a database. Chapter 4. OLAP sources provide the added bonus of dimensional analysis and reporting. This method can reduce response times dramatically as well. You can also use OLAP sources. and relationships in the database. and load (ETL) process that populates a warehouse to avoid that processing time when running reports. Create reporting packages with IBM Cognos Framework Manager 35 . such as filters. because vendor databases are typically optimized for those types of operations. and so on. which allow users to navigate through the data and to apply powerful dimensional functions. It describes the tables. In addition. because the data is already calculated and aggregated. it is better to off-load to the extract. we need to define a metadata model in the context of IBM Cognos BI. which can bypass the requirement for metadata modeling in IBM Cognos Framework Manager. or security requirements? These types of questions allow you to investigate what can be done at the data source level rather than in the IBM Cognos Framework Manager model.1.IBM Cognos bases its algorithms around industry-standard star schema designs that consist of fact tables and related dimension tables. transform. columns. For larger warehouses that have slower response times due to the sheer volume of data. 36 IBM Cognos Business Intelligence V10.. as shown in Figure 4-1. IBM Cognos BI Portal IBM Cognos BI Metadata Model Relational Files Cubes Other Figure 4-1 Metadata model workflow In most cases. and is used to generate appropriate SQL requests to the database when reports or analysis are run.1 Handbook . The overall goal of modeling the metadata is to create a model that provides predictable results and an easy-to-use view of the metadata for authors and analysts.This metadata is published as a package to the IBM Cognos BI portal. is on the left side of the window and provides an easy way to access all your project's objects in a tree format. configure. The three tabs in this pane (Explorer.3 The IBM Cognos Framework Manager UI Figure 4-2 shows the IBM Cognos Framework Manager UI. and Dimension Map) allow you to create.1. edit. The Project Info pane is the center pane and provides access to the project’s objects through various methods. Create reporting packages with IBM Cognos Framework Manager 37 .4. You use each of these tabs throughout this chapter. or delete objects. Figure 4-2 IBM Cognos Framework Manager user interface The user interface includes the following panes: The Project Viewer pane. by default. Diagram. Chapter 4. and Tools panes. Properties. This pane also provides a search utility (second tab) and an object dependencies utility (third tab). select the object or one of its children in the top panel and view the dependant objects in the bottom panel.1 Handbook . 38 IBM Cognos Business Intelligence V10. You can also detach and rearrange the Project Viewer. use the View menu or use the toggles on the toolbar. All panes can be hidden except the Project Info pane. This is very useful when you want to change an object and assess the impact that the change will have on other objects in the model. by default.The Properties pane. is located on the right side of the window and provides several useful tools. to view project statistics. To restore a pane. by default. which is the main work area. is located in the bottom middle of the window and allows you to configure various properties for any of the project's objects. The Tools pane. You can use it to switch the project language quickly. Simply drag an object (and its children if it has any) to the top panel. and to perform common tasks for selected objects. we examine the objects in the Properties pane. Figure 4-3 Model objects in the Project Viewer pane Chapter 4.4 Reporting objects In IBM Cognos Framework Manager.1. Create reporting packages with IBM Cognos Framework Manager 39 . with the exception of relationships.4. For simplicity. shown in Figure 4-3. there are several objects with which you interact in either the Project Viewer or the Project Info panes. shown in Figure 4-5. shown in Figure 4-4. These types of query subjects will be beyond the scope of this book.1 Handbook . A Query item. Figure 4-6 Query items 40 IBM Cognos Business Intelligence V10. Its icon appears the same as a Data Source query subject. This object is identifiable by the small database icon in the top-right corner. shown in Figure 4-6. maps to existing metadata in the model. is contained within a query subject and maps to a corresponding object in the data source. Figure 4-5 Model query subjects – A Stored Procedure executes a database stored procedure to retrieve or update the data. Figure 4-4 Data Source query subjects – A Model object.The Project Viewer pane includes the following reporting objects: The following types of query subjects: – A Data Source object. maps to a corresponding object in the data source and uses a modifiable SQL statement to retrieve the data. from the highest level of granularity to the lowest. contains descriptive and business key information and organizes the information in a hierarchy. allowing for OLAP-style queries. shown in Figure 4-8. Create reporting packages with IBM Cognos Framework Manager 41 . shown in Figure 4-9. is a collection of facts for OLAP-style queries. Figure 4-8 Measure Dimension A Shortcut object. Figure 4-7 Regular Dimension A Measure Dimension object. is a pointer to an underlying object that can act as an alias or reference. shown in Figure 4-7. Figure 4-9 Shortcuts Chapter 4.A Regular Dimension object. but we discuss those later. two different namespaces can both contain a shortcut called Products without causing a naming conflict in the model. For example. Figure 4-11 Folder Other objects are available. is an organizational container for various model objects. Figure 4-10 Namespaces A Folder object. shown in Figure 4-10.1 Handbook . is an organizational container that also uniquely identifies the objects that it contains. Query item folders are also available to organize items within a query subject. such as model filters and calculations. 42 IBM Cognos Business Intelligence V10. shown in Figure 4-11. which is useful for star schema groupings.A Namespace object. shown in Figure 4-13. shown in Figure 4-12. Figure 4-12 Relationship A scope relationship. exists between Measure Dimensions and Regular Dimensions to define the level at which the measures are available for reporting. Figure 4-13 Scope relationship Chapter 4. explains how the data in one query subject relates to the data in another. Create reporting packages with IBM Cognos Framework Manager 43 .The Project Info pane on the Diagram tab includes the following relationships: A relationship. time. John’s requirements are to create a reporting package for IBM Cognos BI that allows authors and analysts to query the data source for sales information by product. shown in Figure 4-15. The data sources are definitions containing the pertinent information the IBM Cognos BI requires to connect to the underlying data sources. Figure 4-15 The Parameter Maps folder The Packages folder. shown in Figure 4-16. The data sources are defined in IBM Cognos Connection.1 Handbook . These parameter maps are useful when trying to dynamically affect the way that the model behaves when reports are run. Figure 4-16 The Packages folder 4.2 Build a model with IBM Cognos Framework Manager In the modeling scenario for this chapter. shown in Figure 4-14. 44 IBM Cognos Business Intelligence V10. contains packages that are published to IBM Cognos BI to make model metadata available to authors. and order methods and to compare the sales figures to sales target values.You might also work with the following types of objects: The Data Sources folder. Figure 4-14 The Data Source folder The Parameter Maps folder. contains the data sources that we used in the project. John Walker is the company modeler who is creating a basic sales model based on the Great Outdoors data warehouse. contains parameter maps that allow for data or some other model value substitution at run time. and other authors. John will deliver the following packages.2. 1. To that end. and click Create a new project using Model Design Accelerator. Then.John has already looked at various report samples and interviewed users to better understand how he needs to present the data to the authors. Create reporting packages with IBM Cognos Framework Manager 45 .1 Import metadata using Model Design Accelerator The Model Design Accelerator is a graphical utility that is designed to guide both novice and experienced modelers through a simplified modeling process. The following steps describe how to import metadata using the Model Design Accelerator. see Figure 4-17. both based on the relational data source: A package for basic relational queries A package for OLAP-style queries We provide the final result model for this chapter as a reference in the additional material that is supplied with this book. particularly analysts. want the ability to navigate through the data to better understand how the business is doing and where it is being affected positively and negatively. Figure 4-17 IBM Cognos Framework Manager welcome panel Chapter 4. You can create multiple star schemas using the Model Design Accelerator several times. 4. You can add features to the model using standard IBM Cognos Framework Manager functionality. Some authors want to perform only basic relational queries against the data source. Open IBM Cognos Framework Manager. The Model Design Accelerator applies IBM Cognos leading practices to produce single star schemas quickly. you can link the results together. Enter an appropriate project name. in this example English. Figure 4-19 Metadata wizard: Select Data Source dialog box 46 IBM Cognos Business Intelligence V10. Select the GOSALESDW data source as shown in Figure 4-19. and specify the location for the project.2.1 Handbook . If the specified folder does not exist. Select the design language for the project. Figure 4-18 New Project dialog box 3. you are prompted with a message asking if you want to create one. which was already created by the IBM Cognos BI administrator. as shown in Figure 4-18. Click OK. and then click Next. 4. and then click OK. in this example GO Sales. 7. Refer to the IBM Cognos BI Administration and Security Guide for details about how to create a data source connection. In the list of objects. 5. Create reporting packages with IBM Cognos Framework Manager 47 . The IBM Cognos Framework Manager User Guide window opens. displaying information about the Model Design Accelerator. expand GOSALESDW Tables. Click Continue.Modeler permissions: If given appropriate permission. and then select the following tables: – – – – – – – GO_TIME_DIM SLS_ORDER_METHOD_DIM SLS_PRODUCT_DIM SLS_PRODUCT_LOOKUP SLS_PRODUCT_TYPE_LOOKUP SLS_PRODUCT_LINE_LOOKUP SLS_SALES_FACT 6. right-click the Fact Table query subject in the center of the pane. You can close this window. The information in this window explains the steps to create a model using the Model Design Accelerator. Chapter 4. In the Model Accelerator pane. modelers can also create their own data source connections either through the Metadata wizard by clicking the New button or directly in IBM Cognos Administration by selecting Configuration Data Source Connections. and click Rename. Type Sales Fact to rename the fact query subject. Figure 4-20 Model Accelerator pane 48 IBM Cognos Business Intelligence V10. and then press Enter. The result displays.8.1 Handbook . See Figure 4-20. and then drag those measure to the Sales Fact query subject shown in Figure 4-22 on page 50. select the measures that follow.9. as shown in Figure 4-21. In the Explorer tree pane. expand gosalesdw SLS_SALES_FACT. Create reporting packages with IBM Cognos Framework Manager 49 . Figure 4-21 Model Design Accelerator: Explorer Tree Chapter 4. and drag the PRODUCT_TYPE_EN data item into the Products query subject. and drag the PRODUCT_ NAME data item into the Products query subject.1 Handbook . 11.In the Explorer tree pane: a. Expand the SLS_PRODUCT_LINE_LOOKUP table.Figure 4-22 Model Design Accelerator with query items added to Sales Fact 10.Rename New Query Subject 1 to Products. c. Expand the SLS_PRODUCT_LOOKUP table. b. 50 IBM Cognos Business Intelligence V10. and drag the PRODUCT_LINE_EN data item into the Products query subject. Expand the SLS_PRODUCT_TYPE_LOOKUP table. Figure 4-23 Model Design Accelerator Relationship Editing dialog box This dialog box opens because IBM Cognos Framework Manager cannot determine the relationship between the SLS_PRODUCT_LOOKUP table and the SLS_SALES_FACT table. Chapter 4. You need to establish the relationship yourself. Create reporting packages with IBM Cognos Framework Manager 51 . See Figure 4-23.The Relationship Editing Mode for: Products dialog box opens. Ctrl-click SLS_PRODUCT_LOOKUP . you will eventually add a filter to filter out all non-English product names. PRODUCT_NUMBER and SLS_PRODUCT_DIM PRODUCT_NUMBER.12. and then click OK again to close the Relationship Editing Mode dialog box. See Figure 4-24. 13. After you generate the basic model. thus creating a one-to-many relationship. 52 IBM Cognos Business Intelligence V10.Click the Create a Model Relationship icon in the top-left corner of the dialog box. 14. The Modify the Relationship dialog box opens. which results in a many-to-many relationship with the PRODUCT table.1 Handbook .Click OK. Figure 4-24 Modify the Relationship dialog box The SLS_PRODUCT_ LOOKUP table has an entry for each product for each language. as shown in Figure 4-25. – – – – – – – – PRODUCT_KEY PRODUCT_LINE_CODE PRODUCT_TYPE_KEY PRODUTCT_TYPE_CODE PRODUCT_NUMBER PRODUCT_IMAGE INTRODUCTION_DATE DISCONTINUED_DATE Figure 4-25 New Relationship and added query items to the Products query subject Chapter 4.15.In the Explorer Tree. Create reporting packages with IBM Cognos Framework Manager 53 . expand SLS_PRODUCT_DIM. and add the following items to the Products query subject. Rename New Query Subject 2 to Time. and then drag the selected items to the Time query subject.1 Handbook .16. The results displays. Figure 4-26 New relationship and newly added query items to the Time query subject 54 IBM Cognos Business Intelligence V10. 17. expand the GO_TIME_DIM table.In the Explorer Tree pane. See Figure 4-26. click DAY_KEY and then Shift-click WEEKDAY_EN. Create reporting packages with IBM Cognos Framework Manager 55 .18. and add the following items to the Order Methods query subject. 19. expand the SLS_ORDER_METHOD_DIM table.Rename New Query Subject 3 to Order Methods. as shown in Figure 4-27: – ORDER_METHOD_KEY – ORDER_METHOD_CODE – ORDER_METHOD_EN Figure 4-27 New relationship and added items to the Order Methods query subject Chapter 4.In the Explorer tree pane. 2 Model organization For IBM Cognos BI. When complete. and then click Yes to the message. which represent the views. Business View.1 Handbook . The typical approach is to have three root namespaces: One for the data source objects One for model query subjects that are used to either model or consolidate metadata that is found in the data source query subjects One for the final presentation view.Click Generate Model. which represent each of the layers. 56 IBM Cognos Business Intelligence V10. Figure 4-28 IBM Cognos Framework Manager with newly created model from Model Design Accelerator 4.20. it is recommended to model in layers. or such as Foundation Objects Layer. Consolidation Layer. See Figure 4-28. the model is visible in the IBM Cognos Framework Manager UI. The Model Design Accelerator creates a model based on your selections. and Presentation View. You might see naming conventions such as Physical View. and Presentation Layer. which typically consists of shortcuts The namespace layers can use any naming convention that makes sense to you.2. This rule of thumb does not mean you cannot model in this layer. Figure 4-30 Physical View layer Chapter 4. as shown in Figure 4-29. shown in Figure 4-30. Create reporting packages with IBM Cognos Framework Manager 57 . you might have to make some exceptions. However. After data source query subjects are modified. It is best to leave these subjects as untouched as possible so that IBM Cognos BI has all the metadata that it requires to generate efficient queries at run time. you might choose to create a model query subject to act as an alias for a dimension table that relates back to a fact query subject. contains the data source query subjects as they were when imported from the data source. Figure 4-29 Project Viewer illustrating multiple layer approach Physical View The Physical View. extra calls to the database for metadata might be required at run time.The Model Design Accelerator follows the layered modeling approach and creates a three-layered model automatically of the model that we created in the previous section. For example. You can easily create separate packages for different reporting needs based on this layer. It might not always be the case. which are logical groupings of fact and related dimension query subject shortcuts. shown in Figure 4-31. and any other business logic that you might require. In our model. a dimension shortcut with the same name can exist in multiple namespaces. but as a general rule. Because namespaces provide uniqueness. you can remap the Business View to the correct items in the Physical View without affecting reports. This layer is the ideal location to implement filters. If the underlying data source changes. typically contains star schema groupings.1 Handbook . When more than one star schema grouping is involved.Business View The Business View. this is the layer to apply logic. calculations.. shown in Figure 4-32 on page 59. namespaces are used to contain the shortcuts because facts can share one or more dimensions. This layer also acts as an insulation layer for reports. The Model Design Accelerator uses the consolidation methodology. Figure 4-31 Business View layer Presentation View The Presentation View. allowing authors to query across multiple fact tables using a shared dimension. 58 IBM Cognos Business Intelligence V10. all query items in this layer are given user-friendly names for report authors and analysts. such as configuring the data format. should numeric values be displayed as currency. For example.2. and query item properties (shown in Figure 4-33 on page 60) let you edit the behavior of the query items. such as descriptions and screen tips.Figure 4-32 Presentation View layer 4.3 Verify query item properties and relationships After importing metadata into IBM Cognos Framework Manager. it is recommended that you verify and edit certain property settings and determine if the correct relationships are in place to meet the reporting requirements. percentage. Examine query item properties Object properties allow you to add additional information. Create reporting packages with IBM Cognos Framework Manager 59 . or a just a number with comma separators? Chapter 4. Examining this setting allows you to have relevant conversations with the database administrator. SALES_ORDER_KEY. date. but rather is a key. If this key is to be used in a relationship or filter.1 Handbook . datetime. This item is not a fact. was imported as an Int32 data type and had its Usage property set to Fact. or non-indexed columns are set as Facts Key. or any indexed columns are set as Identifiers Strings and BLOBs are set as Attributes The Regular Aggregate property for numeric facts (measures) describes how measures should be aggregated and defaults to SUM. This issue occurs because the item is not indexed in the database. Thus. The following rules explain how the Usage property is applied during import: Numeric. Sum is correct for most 60 IBM Cognos Business Intelligence V10. you expect to see the Usage property set to Identifier. it is better that the field is indexed in the database.Figure 4-33 Query items properties You need to examine two properties closely after import to ensure that they are set as expected: Usage property Regular Aggregate properties For example. index. as shown in Figure 4-33. time-interval. Maximum. Figure 4-34 Prompt Info properties You can specify the type of prompt that you want generated in the studios or the default prompt type for IBM Cognos Report Studio. The default is for the server to determine the prompt type based on data type.measures (such as SALE_TOTAL and QUANTITY). Chapter 4. Another set of important properties to take advantage of are the Prompt Info properties. and so on. The remaining properties are used to improve performance by causing automatic retrieval through indexes while still displaying user-friendly selection values. Minimum. however. you might want to set the property to Average. in some instances. as shown in Figure 4-34. Create reporting packages with IBM Cognos Framework Manager 61 . it defaults to the values that are returned by the query item to which it belongs. for example. to see a list of ORDER_METHOD_EN names when using ORDER_METHOD_CODE in a prompt. For example. set the Filter Item Reference property to ORDER_METHOD_CODE. Filter Item Reference identifies the value that an IBM Cognos generated prompt uses to filter a query. for Query Studio to display ORDER_METHOD_EN values but use ORDER_METHOD_CODE in the query’s filter. For example. Use Item Reference identifies the default value that a manually-created Report Studio prompt uses in the query’s filter. Figure 4-35 Filter Item Reference property 62 IBM Cognos Business Intelligence V10. for a Report Studio generated prompt on ORDER_METHOD_EN to display a list of ORDER_METHOD_EN names but retrieve data through the ORDER_METHOD_CODE. where the list of Product Type choices is restricted to those within a selected Product Line. as shown in Figure 4-35.Here is a brief description of the remaining properties: Cascade on Item Reference is for cascading prompts in Report Studio. set the Use Item Reference property in ORDER_METHOD_EN to ORDER_METHOD_CODE.1 Handbook . set the Display Item Reference property for ORDER_METHOD_CODE to ORDER_METHOD_EN. If this field is left blank. Display Item Reference identifies the default value that a manually-created Report Studio prompt displays for a particular query item. For example. Figure 4-36 Context Explorer Chapter 4. Create reporting packages with IBM Cognos Framework Manager 63 . shown in Figure 4-36.Examine relationships Relationships are maintained in the Object Diagram or Context Explorer. Context Explorer. As a quick side topic. is another useful UI element in IBM Cognos Framework Manager. and then clicking Launch Context Explorer.. is represented by a 1 as in 1...1 cardinalities attached. By identifying which query subjects are facts. this feature is useful when working with a subset of the model.. as shown in Figure 4-36 on page 63. For larger models.1.1 Handbook . and dimension query subjects have only 1. right-clicking one of the selected items. Optional cardinalities require more processing but might be needed to return the desired results. and you must decide if you require optional or mandatory cardinalities. You can edit items directly in this window. In short. 64 IBM Cognos Business Intelligence V10. in particular.1. When verifying relationships.. Now.n or 1. It is important to model as a star schema so that there is no ambiguity about the nature of a query subject. when querying from multiple fact tables through a shared dimension.. Cardinality is used by IBM Cognos BI to determine which query subjects are facts and which are dimensions in the context of a query. which generates an outer join in the SQL.n or 0.1 or 0.. fact query subjects have only 1. you must ensure that the appropriate relationships exist to meet your reporting needs.You can launch this window by selecting one or more query subjects. as in 0. IBM Cognos BI can aggregate the facts properly and not lose records from either fact table.n or 0.. Mandatory cardinality. Optional cardinality.n cardinalities attached. back to relationships. This determination is important. which generates an inner join in the SQL. is represented by a 0. with the exception of when dealing with snowflake dimensions. Figure 4-37 Snowflake dimension Chapter 4.Unpredictable results can occur when query subjects have a mix of cardinalities. Create reporting packages with IBM Cognos Framework Manager 65 . as shown in Figure 4-37. Snowflake dimensions are where the hierarchy for the dimension is split out into two or more tables. 1 Handbook . Refer to the IBM Cognos Framework Manager User Guide for more details about cardinality. 66 IBM Cognos Business Intelligence V10.The product hierarchy is split out into the following tables: Product line Product type Product In this case. there is a clear path from the highest level all the way down to the fact table. The hierarchy does not branch of at higher levels such as product type level or product line level. Figure 4-38 Relationship Definition dialog box Here.To edit a relationship. as shown in Figure 4-38. double-click the relationship line in the Diagram pane or the Context Explorer to open the Relationship Definition dialog box. you can change the cardinality on either end of the relationship. change the query items the join is based on. Create reporting packages with IBM Cognos Framework Manager 67 . Chapter 4. or create a compound definition with additional business logic by editing the expression located at the bottom of the dialog box. So. Figure 4-39 Run Metadata wizard 2. When a structure is imported into IBM Cognos Framework Manager.4. each SAP BW time hierarchy is depicted as an individual level. Time. in the Project Viewer. follow these steps: 1. therefore. Ensure that Data Sources is selected. Products and Time are both shared (conformed) dimensions for this fact table.2.1 Handbook . 68 IBM Cognos Business Intelligence V10. and then click Run Metadata Wizard as shown in Figure 4-39. Importing SAP BW metadata: Just as a quick side note for those who want to import SAP BW metadata. using the Model Design Accelerator does not make sense in this case. To import additional metadata manually. he will use the manual import process to bring in this additional table as metadata in the model. However. John Walker. IBM Cognos Report Studio users can use these structures to report on and compare levels that are valid for a specific time period. and click Next. right-click the gosalesdw namespace under the Physical View. In IBM Cognos Framework Manager. this model also requires sales target information.4 Import additional metadata Our modeler. and click Next. and Order Methods). time-dependant hierarchies now reflect hierarchy or structure changes automatically. has created a model that contains sales facts along with its related dimensions (Products. Select the GOSALESDW data source. 3. and select SLS_SALES_TARG_FACT as shown in Figure 4-40.4. Create reporting packages with IBM Cognos Framework Manager 69 . Figure 4-40 Metadata wizard: Select Objects dialog box Chapter 4. Locate and expand the Tables folder. Click Next. 1 Handbook . Select Between each imported query subject and all existing query subjects in the model as shown in Figure 4-41. In the second section. you can request to create relationships among either the objects being imported. the objects being imported and the existing objects in the model. you do not need to create the relationships manually after import. select the “Both” option in the wizard. Typically the database will have primary and foreign keys defined.5. or both. 70 IBM Cognos Business Intelligence V10. When importing several additional tables that have relationships to each other and to objects already in the model. in general. The other two options in this section are often used when importing from a different database. Figure 4-41 Metadata wizard: Generate Relationships dialog box Let us take a moment to discuss this dialog box. use the “Use primary and foreign keys” option for relational data from the same database. In the first section. By selecting this option. MONTH_KEY is not Chapter 4. by default. all relationships will be 1..1. and then click Finish. If this option is disabled. and it is not a primary key in the table. 7..In the third section. Click Import. Double-click the gosalesdw namespace. The same issue applies to the time dimension. Another option is to enable or disable fact detection. You can choose to generate outer joins if that meets your business needs. and to examine any relationships. In this case. or you can edit specific relationships after import to meet your needs.. and click the Diagram tab to view the new query subject in the diagram. Create reporting packages with IBM Cognos Framework Manager 71 . 6.1 to 1. Figure 4-42 New Sales Target query subject with no relationships defined Notice that no relationships were generated. shown in Figure 4-42. 8. select MONTH_KEY from GO_TIME_DIM. 9.a primary key. You can create the relationships manually in IBM Cognos Framework Manager. but the keys should be indexed in the database to improve performance. and select MONTH_KEY from SLS_SALES_TARG_FACT.1 Handbook . and it is not indexed in the database. Right-click over the selected items. and then click Relationship as shown in Figure 4-43. Figure 4-43 Create Relationship 72 IBM Cognos Business Intelligence V10. point to Create. In the Project Viewer. . Create reporting packages with IBM Cognos Framework Manager 73 . Click OK.n side.1 side.. Figure 4-44 Relationship Definition dialog box Chapter 4.The Relationship dialog box opens. The dimension is on the 1. as shown in Figure 4-44. The relationship is configured as desired. and the fact on the 1.10. Figure 4-45 New relationship in Diagram pane 74 IBM Cognos Business Intelligence V10.1 Handbook .The Diagram pane now shows the new relationship as shown in Figure 4-45. The Presentation View is organized to have separate namespaces for each fact shortcut and its related dimensions.A Query Subject Definition window for a new model query subject opens. right-click the Business View namespace.11. Chapter 4. point to Create. and click OK. 13. you need to update the Business View and Presentation View manually.In the Name box. and then click Query Subject. create a relationship between SLS_PRODUCT_DIM and SLS_SALES_TARG_FACT on PRODUCT_TYPE_KEY as shown in Figure 4-46.In the Project Viewer. 12.Using the same process. expand Physical View gosalesdw SLS_SALES_TARG_FACT. 14. Create reporting packages with IBM Cognos Framework Manager 75 . type Sales Target Fact. Under Available Model Objects. You can use the star schema groupings feature to create the grouping for the new Sales Target Fact query subject that will be created. Figure 4-46 New relationship in Diagram pane Now that the new sales target object is imported and relationships are created. Figure 4-48 Create Star Schema Grouping dialog box 76 IBM Cognos Business Intelligence V10. and click OK. Figure 4-47 Query Subject Definition window for new Sales Target Fact model query subject 16. Ctrl-click Products and Time (these are related dimensions). 17.15.1 Handbook . and then click OK. type Sales Target in the Namespace field. shown in Figure 4-48. right-click one of the selected items. shown in Figure 4-44.Drag SALES_TARGET to the Query Items and Calculations pane. and then click Create Star Schema Grouping.In the Create Star Schema Grouping dialog box.Click the new Sales Target Fact query subject in the Business View namespace. Create reporting packages with IBM Cognos Framework Manager 77 . examined query item properties and relationships. we used the Model Design Accelerator to create a one star schema grouping.Right-click the Presentation View namespace. and then click Namespace. and Order Methods shortcuts into the Sales namespace. and imported additional metadata which was then organized into an additional star schema for presentation purposes. point to Create. Figure 4-49 Presentation View with star schema groupings To this point. Chapter 4. Next. we describe using techniques to validate the model and the data itself.18.Name the namespace Sales.Drag the Sales Target namespace to the Presentation View. 20. Time. 19. Products. and then drag the Sales Fact. as shown in Figure 4-49. The Verify Model . Figure 4-50 Verify Model .4.5 Verify the model You can verify independent model objects and their children.1 Handbook . you can select the types of items that you want to include in the validation process. Right-click the root model namespace. we verify the entire model. In this example.Options dialog box opens as shown in Figure 4-50. To verify the model: 1. 78 IBM Cognos Business Intelligence V10.Options dialog box In this window. in this case called Model.2. and click Verify Selected Objects. or you can verify the entire model by verifying the model’s root namespace. Chapter 4. or open the items in the model to edit their definitions to resolve any issues. In other instances where issues are found.2. In this case. you can choose to repair the objects. the model is quite simple and presents no issues as shown in Figure 4-51. Create reporting packages with IBM Cognos Framework Manager 79 . Figure 4-51 Verify Model Results dialog box 3. Click Close. Click Verify Model. if applicable. use the following steps: 1. and you can also use Model Advisor. Figure 4-52 Model Advisor dialog box. we use gosalesdw. The Model Advisor dialog box opens. To assist you in understanding the nature of the highlighted issue and some possible actions. In this example.1 Handbook . Click Run Model Advisor. Right-click the namespace that you want to examine. To run the Model Advisor.You can verify the objects in the model. 80 IBM Cognos Business Intelligence V10. Options tab Here you can select or deselect items to be tested. as shown in Figure 4-52. which is an automated tool that applies rules based on current modeling guidelines and identifies areas of the model that you need to examine. you are provided with links to the appropriate sections of the documentation. 2. you can identify items that fit certain categories and click the icon under the Action column to view the object or objects in the Context Explorer. Click Analyze. Create reporting packages with IBM Cognos Framework Manager 81 .2. 4. The results display as shown in Figure 4-53. Figure 4-53 Model Advisor results In the results. Click Close. You can also click the more information links to read the documentation regarding specific modeling recommendations. 3.6 Verify the data It is also critical that you test each of your query subjects alone and in conjunction with other query subjects to ensure that authors will receive predictable results. Chapter 4. and select Sales Target (formerly SALES_TARGET) from Sales Target Fact. and examine the results. Right-click one of the selected items. which is to auto group and summarize in the studios. In the Project Viewer. 3. To verify the data: 1. Figure 4-54 Test Results dialog box 82 IBM Cognos Business Intelligence V10. and click Test. Then. in the Business View. John Walker renamed all the query items in the Business View to user-friendly names and organized them in a logical manner.1 Handbook . select Auto Sum to emulate the default IBM Cognos BI behavior. select Year (formerly CURRENT_YEAR). 2. select Month (formerly MONTH_EN) from the Time dimension.In this next scenario. as shown in Figure 4-54. our modeler John Walker tests Sales Targets against the Time dimension and tests the Products dimension against Sales to ensure that the numbers come back correctly. in the Test Results dialog box. Click Test Sample. The results display as shown in Figure 4-55. Chapter 4. Because there is a relationship on the Month Key.3. and click Test. select Auto Sum.368.205. We discuss this issue in the next section. in the Business View namespace. 4. these results are questionable. and select Revenue (formerly SALE_TOTAL) from Sales Target. yet the results show several results all adding up to well over four billion dollars. In the Test Results dialog box. determinants must be defined for the underlying query subject in the Physical View layer to ensure that this double counting does not occur. This issue is the result of double counting that occurs because the Month Key in the Time dimension repeats once for every day in the month. 4. Validate your data often and as new items are imported or modeled to ensure predictable results. Click Close. Validating the data is an important process. Create reporting packages with IBM Cognos Framework Manager 83 . 6.7. 7. In the Project Viewer. select Product Name (formerly PRODUCT_NAME) from Products. Figure 4-55 Test results dialog box Again. This issue is resolved by applying a filter in 4.2. Click Close. “Specify determinants” on page 84. and click Test Sample. select Product Line (formerly PRODUCT_LINE_EN).540 (over four billion). “Add business logic to the model” on page 89. Right-click one of the selected items. because overall summaries in the studios double count Revenue values once for each product language in the data source. 5.John Walker knows that the overall total for Sales Target for all time and products is 4. Determinants are a feature of IBM Cognos BI that are typically used to provide control over granularity when aggregating.1 Handbook . In this section.2. we discuss double counting. Determinants are required for dimensions that are connected to facts at levels of granularity that have repeating keys. To specify determinants to prevent double counting: 1. For more detailed information about determinants. and to improve performance on dimensionally modeled relational (DMR) metadata.7 Specify determinants As discussed in the previous section. see the IBM Cognos Framework Manager User Guide.4. double-click the GO_TIME_DIM query subject. double counting can occur in scenarios where a a relationship based on a key that is not unique and repeats in the data is used in a query. Specifying determinants resolves this issue. which is the most common of the issues. in the Physical View namespace. In the Project Viewer. for BLOB data types in the query subject. 84 IBM Cognos Business Intelligence V10. and then click the Determinants tab. as shown in Figure 4-56. You can also use them to prevent the distinct clause on unique keys. Determinants tab During import. type Day. To that end. type Year. However. there are other levels in this data. Right-click pk. 2. Create reporting packages with IBM Cognos Framework Manager 85 . Because this key is unique. Under the Determinants pane. and then press Enter. New Determinant displays below Day in the Determinants pane. we create the appropriate determinants for this query subject and apply the Group by setting.Figure 4-56 Query Subject Definition dialog box. click Rename. click Rename. only one determinant was detected based on the table’s primary key. and then press Enter. 4. all items in the query subject are an attribute of the determinant key. 3. that require a group by clause to prevent double counting of facts. such as the MONTH_KEY. Chapter 4. Right-click New Determinant. click Add. 11.With the focus still on Month.1 Handbook . When used in a report. Attributes are any items that are associated with the determinant key. 8. drag the following items into the Attributes box: – CURRENT_MONTH – MONTH_NUMBER – MONTH_EN 86 IBM Cognos Business Intelligence V10.5. 6. if CURRENT_MONTH is used in a report. with Key = MONTH_KEY. 9. with Key = QUARTER_KEY and select the Group By check box beside Quarter. 7. you find a Group By clause on the MONTH_KEY in the SQL. With the focus still on Quarter. the determinant configuration is implemented in the generated SQL.Repeat the steps again to create a Month determinant. drag CURRENT_YEAR to the Key pane. Click the Up Arrow key on the right to move Year above Day. drag CURRENT_QUARTER into the Attributes box. Select the Group By check box beside Year. With the focus still on Year. from the Available items pane. Repeat the steps to a create Quarter determinant. and select the Group By check box beside Month. For example. 10. select Auto Sum.In the Project Viewer. Chapter 4. select Year (formerly CURRENT_YEAR). select Month (formerly MONTH_EN) from the Time dimension. 13. click Test. Figure 4-57 Determinants tab with multiple determinants specified 12. and then in the Test Results dialog box. To test this change. conduct the same test from the previous section to see if the correct Sales Target values are returned. Create reporting packages with IBM Cognos Framework Manager 87 .Click OK. in the Business View. 14.Figure 4-57 shows the results.Right-click one of the selected items. and select Sales Target (formerly SALES_TARGET) from Sales Target Fact. Click Test Sample. 16.1 Handbook . shown in Figure 4-58.15. and examine the results. 88 IBM Cognos Business Intelligence V10. Figure 4-58 Test Results after determinants are specified The values now appear correctly and double counting is prevented.Click Close. Figure 4-59 Determinants specified for SLS_PRODUCT_DIM 4.This model also includes an SLS_PRODUCT_DIM dimension that has a relationship on PRODUCT_TYPE_KEY.3 Add business logic to the model Again. One example of this is the requirement we saw earlier to apply a filter on the SLS_PRODUCT_LOOKUP query subject. If you are feeling adventurous. Create reporting packages with IBM Cognos Framework Manager 89 . try applying determinants for the SLS_PRODUCT_DIM query subject. The results should display as shown in Figure 4-59. which had multiple Chapter 4. which is also a repeating non-unique key just like the MONTH_KEY is in the GO_TIME_DIM. there are instances where it makes sense to implement items in the Physical View where the cost of performance and maintenance is low. However. typically business logic such as filters and calculations are applied in the Business View layer. type Language Filter. does it make sense to apply a product name language filter when only querying Product Line? If the filter is place in the Products model query subject in the Business View. Although adding this filter goes against the general rule of thumb. then applying filters and calculations on these query subjects makes sense because they are not data source query subjects.3. Filters come in two forms in IBM Cognos Framework Manager: Embedded filters are created within query subjects and their scope is restricted to that query subject. 4. regardless of whether it was required. In the Available Components pane. 90 IBM Cognos Business Intelligence V10. They are appropriate when the filter is intended for just one query subject or dimension.1 Handbook . In the Project Viewer. the filter must be applied a level lower than the Business View layer because the filter is required only when Product Name is included in the report. double-click SLS_PRODUCT_LOOKUP. 3. For example. Stand-alone filters are filters available across the model. Click the Filters tab. If model query subjects are used to create these aliases or to consolidate multiple underlying query subjects. and then in the Name box.1 Add filters to the model The first filter John Walker applies is a filter on a data source query subject. 2. in the gosalesdw namespace under the Physical View. They are appropriate when required in multiple query subjects or dimensions or to make commonly used filters readily available for authors. In the following steps. we apply an embedded filter to the SLS_PRODUCT_LOOKUP data source query subject to filter on English values: 1. The performance hit of scanning an extra table unnecessarily in such cases is greater than the performance hit that can occur from an additional metadata call to the database. click Add. Another example might be the requirement to implement aliases in the Physical View to control query paths between objects. the filter would be applied in every instance an item from that query subject was used.rows for the same product to support multiple languages. Embedded filters can be converted to stand-alone filters after they are created. double-click PRODUCT_LANGUAGE. Create reporting packages with IBM Cognos Framework Manager 91 .4. and then type = ‘EN’. Figure 4-60 Filter Definition dialog box Chapter 4. The result displays as shown in Figure 4-60. Click in the Expression Definition pane at the end of the expression. and IBM Cognos Business Insight Advanced). (This option applies only to filters that use a prompt value or macro.) – Design Mode Only This option limits the amount of data that is retrieved when testing in IBM Cognos Framework Manager or at report design time (when authoring reports in IBM Cognos Query Studio. The results display as shown in Figure 4-61. – Optional The filter is not mandatory and users can choose to enter a filter value or leave it blank. IBM Cognos Report Studio. Figure 4-61 Embedded filter Notice the Usage column beside the Name column. 92 IBM Cognos Business Intelligence V10.5. Each filter has a Usage setting with the following options: – Always The filter is applied in all instances regardless of whether the filtered query item is in the query.1 Handbook . Click OK. in the Business View namespace. The results display as shown in Figure 4-62.6. Click OK. In the Project Viewer. We conduct the same test that we conducted in the previous section between Products and Sales Fact again in the Business View to ensure that the results are as expected. and select Revenue (formerly SALE_TOTAL) from Sales Target. select Product Line (formerly PRODUCT_LINE_EN). 8. select Product Name (formerly PRODUCT_NAME) from Products. Chapter 4. Figure 4-62 Test results with filter applied 7. and click Test Sample. Create reporting packages with IBM Cognos Framework Manager 93 . Click the Test tab. select Auto Sum.3. and then click Test Sample.3. and click Test. For example.1 Handbook . The results display as shown in Figure 4-63. and functions. you might want to include a product break even value as one of the measures in the Sales Fact query subject in the form of Quantity * Unit Cost. Calculations can use query items.Click Close.3. Right-click one of the selected items. “Make the model dynamic using macros” on page 97. parameters. 94 IBM Cognos Business Intelligence V10.9. Figure 4-63 Test results dialog box The overall summary totals in the studios for Product Name are now accurate and are not double counted for each product name language in the data source.2 Add calculations to the model You can create calculations to provide report authors with values that they regularly use. In the Test Results dialog box. We illustrate an example of a stand-alone filter in 4. 4. 10. This aggregation can be accomplished by changing the stand-alone calculations Regular Aggregate property to Calculated. However. and then double-click the multiplication operator (*).There are two types of calculations: If you want to create a calculation specifically for one query subject or dimension. Create a stand-alone calculation when you want to apply the calculation to more than one query subject or dimension. Create reporting packages with IBM Cognos Framework Manager 95 . and then double-click Quantity in the Available Components pane. double-click Sales Fact. Under Available Components. For query subjects. Stand-alone calculations are also valuable if you need to do aggregation before performing the calculation. 2. Click Add in the bottom-right corner. it is recommended that you apply calculations in model query subjects wherever possible. in the Business View. you can embed the calculation directly in that object. expand Operators. click the Functions tab. This allows for better maintenance and change management. this calculation can be done for either data source query subjects or model query subjects. type Break Even Point. To add an embedded calculation to a model query subject: 1. In the Name box. Chapter 4. 4. 3. In the Project Viewer. [Sales Fact].[Unit Cost] 6. Click Test Sample (the blue triangle button above the Name box) to verify that the calculation works. Under Available Components. 96 IBM Cognos Business Intelligence V10.[Sales Fact].1 Handbook . The following results display: [Business View].Notice there is a description of the function in the Tips pane as shown in Figure 4-64.[Quantity] * [Business View]. and then double-click Unit Cost. Figure 4-64 Calculation Definition dialog box 5. click the Model tab. Let us quickly examine each piece. Authors and analysts want to be able to see product names in their language based on their local settings. For the scope of this book. Macros are enclosed by the number sign (#) character. calculations. A session parameter returns session information at run time (for example. Chapter 4. This substitution is wrapped in a macro that also encloses the substitution value in single quotation marks because the filter expects a string value. we show one example that incorporates all three elements in an embedded filter. and so on. These items can be used to return data dynamically from specific columns or rows or even from specific data sources. Figure 4-65 Break Even Point calculation 4. such as EN for English or FR for French.3. The new calculated query item displays in the Sales Fact model query subject as shown in Figure 4-65. A macro is a fragment of code that you can insert within filters. we alter the filter that was created for the SLS_PRODUCT_LOOKUP query subject. mapping a set of keys (source) to a set of substitution values (target). and macros.UserName). properties.7. runLocale or account. In this example. and then click OK again. we import a parameter map. that are to be evaluated at run time. To alter the filter. parameter maps. The parameter map substitutes a user’s runLocale session parameter with a language code value found in the database. Click OK. A parameter map is a two-column table.3 Make the model dynamic using macros You can modify query subjects and other model properties to control dynamically the data that is returned using a combination of session parameters. Create reporting packages with IBM Cognos Framework Manager 97 . follow these steps: 1. You can type in the values if you support only a small set of languages. Navigate to <IBM Cognos BI install location>\webcontent\ samples\models. and then click Open. 98 IBM Cognos Business Intelligence V10. Click OK. Then. and then click Next. The values in the file are imported as shown in Figure 4-66.1 Handbook . and then click Parameter Map. we use a text file that has the mappings already entered. In the Name box. or you can import the values from a file. click Browse. The Create Parameter Map wizard opens. point to Create. right-click Parameter Maps. 2.To implement a macro to change a filter dynamically at run time.txt. 3. Figure 4-66 Parameter Map values Note that en-us (and all other English variants) map to EN. The same mapping applies for other languages and their locales. Click Import File. type Language_lookup. 4. Click Finish. click Language_lookup. You can also base the parameter map on query items within the model. For this exercise. next to the Filename box. 5. In the Project Viewer. Under Available Components. The value that the parameter map returns needs to be wrapped in single quotation marks. and then double-click runLocale to add it to the expression. In the Expression definition pane.. 7. Create reporting packages with IBM Cognos Framework Manager 99 . Under Available Components. Figure 4-67 Expression definition with macro Notice that the parameter map is enclosed in the macro tags (#) automatically. Click the Filters tab.Place the cursor right after the first macro tag (#)..[SLS_PRODUCT_LOOKUP]. and then expand Parameter Maps. click the Parameters tab. The Filter Definition window opens. You can also find this function in the Functions folder under Available Components.Double-click Language_lookup to add it to the expression as shown in Figure 4-67. 8.) in the Source column for the Language Filter. Chapter 4.6. In the gosalesdw namespace under the Physical View. 9. and then type sq(.[PRODUCT_LANGUAGE] #$Language_lookup{$runLocale}# = This syntax still shows that there is an error. expand Session Parameters. 11. Use the following syntax: [gosalesdw]. and place the cursor after the equal sign (=). the runLocale session parameter is passed to the parameter map. indicated by a red squiggly underline. which is the function for a single quotation mark. 12. and then click the ellipsis (. In this case. double-click the SLS_PRODUCT_LOOKUP query subject. 10. remove the EN portion of the expression. The macro now requires a value to pass to the parameter map for substitution. such as IBM Cognos Report Studio and IBM Cognos Business Insight Advanced. The final syntax displays as shown in Figure 4-68.1 Handbook . it is en. and then click Test Sample to ensure that all values come back in your local language. which is substituted for EN in the filter. Figure 4-68 Macro expression for Language Filter Notice the results in the Tip pane. 4. which allow for navigational functionality and access to dimensional functions in studios that support dimensional functions.Click OK. and then type ). A DMR refers to the dimensional information that a modeler supplies for a relational data source to allow for OLAP-style queries.13. 14. click the Test tab.Place the cursor just before the last macro tag (#).4 Create dimensional objects for OLAP-style reporting The IBM Cognos Framework Manager product allows you to create dimensionally modeled relational (DMR) models. 100 IBM Cognos Business Intelligence V10. In this case. This pane shows what the macro resolves to based on the current runLocale. Right-click Dimensional View. In the Project Viewer. 2. The following steps show one example of how to create a Regular Dimension.Dimensional information is defined through the following dimensions: Regular Dimensions Measure Dimensions Scope Relationships A dimensionally modeled layer can be applied to any metadata in star schema format. Create reporting packages with IBM Cognos Framework Manager 101 . These items are used to generate members in the studios data trees (where applicable) and retrieve the members at run time. 5. 4. In this case. 1. 3. create a new namespace under Model called Dimensional View. In the Available items pane.1 Create Regular Dimensions Regular Dimensions consist of one or more user-defined hierarchies. you can provide hierarchy information to dimensions and measure scope for each Regular Dimension created. and then click Rename. Type Time. point to Create. When your metadata is in star schema format. 4. Regular Dimensions require that each level have a key and caption specified. expand Business View Time. Each hierarchy consists of the following components: Levels Keys Captions Attributes Level information is used to roll up measures accurately when performing queries or analyses. and then click Regular Dimension. Right-click the top Year in the hierarchy column.4. and then drag Year (formerly CURRENT_YEAR) into the Hierarchies pane. The Dimension Definition window opens. Chapter 4. we model a Time dimension. and that the caption be a string data type. and then press Enter. therefore. In this case Year is an integer. The results display as shown in Figure 4-69. you need to create an item to cast Year into a string. a caption must be a string data type. rename CURRENT_YEAR to Year. Figure 4-69 Dimension Definition dialog box You need to assign a business key and member caption to each level. 102 IBM Cognos Business Intelligence V10. If needed. Remember.1 Handbook .6. Rename Year(All) to Time (All). click the Year level in the bottom pane. 11. 9. In the Hierarchies pane. and then click Close. expand Business View Time.Click OK. Click Close. Create reporting packages with IBM Cognos Framework Manager 103 . 10.7. Then. and then click Add in the bottom-right corner.[Time].) in the Role column. The Year level now has a business key and member caption assigned as shown in Figure 4-71.) for Role for the new Year Caption item. Figure 4-71 Year level roles Chapter 4... under Available Components.Edit the expression to display as follows: cast([Business View]. click the ellipsis (. click the ellipsis (.. Figure 4-70 Specify Roles dialog box for Regular Dimension 8. char(4)) This expression casts the integer value to a string. select _memberCaption. and then select _businessKey as shown in Figure 4-70.[Year].. and drag Year to the Expression definition pane. type Year Caption. In the Name box. rename it to Month.Rename the level to Quarter. and rename it to Day.1 Handbook . 17.) for the Source column for Day Caption to edit its definition. 20. then leave this check box clear.From the Available items pane. If they are. and then select the Unique Level check box. and then assign a Role of _businessKey to Quarter Key in the bottom pane.Assign the _memberCaption role to Quarter Caption. Notice that the _businessKey role is already assigned to Day Key in the bottom pane. and then rename it to Day Caption. 13. set it as the _memberCaption.[Day Date]..Drag Day Date to the bottom-right panel.12. and then click Unique Level as shown in Figure 4-72. because Day Key is an identifier as it is the primary key in the underlying table.[Quarter (numeric)]. and change the expression as follows: cast([Business View].Click the ellipsis (.[Time]. 14. char(10)) 104 IBM Cognos Business Intelligence V10. 16.Drag Day Key below the Month level in the Hierarchies pane. 19.Drag Month to the bottom-right pane. select _memberCaption as the role. The top level does not need this setting. and then assign the _businessKey role to Month Key in the bottom pane. char(1)) 15. Note that Quarter (numeric) was formerly CURRENT_QUARTER. cast([Business View]. 18.[Time]..Add a new item for this level called Quarter Caption with the following expression. because it has no parent keys. Figure 4-72 Unique Level check box The Unique Level check box indicates that the keys in the levels above the current level are not necessary to identify the members in a level. drag Quarter Key under the Year level in the Hierarchies pane.Drag Month Key below the Quarter level in the Hierarchies pane. you can use the Member Sort feature for Regular Dimensions to ensure the correct structure for you data. the order of the data must be correct and consistent.Click OK. or attributes are sortable so that there is a logical order to the data. If your business keys. ensure specific sorting of the data in all scenarios to take advantage of dimensional functions that navigate the data. you might want to use the Lag function. which allows you to view the current month and the previous month by lagging one month from the current month in a calculation. For example.21. captions. Create reporting packages with IBM Cognos Framework Manager 105 . For these types of functions to work. select Unique Level as shown in Figure 4-73. Chapter 4. such as the Time dimension. Figure 4-73 Time dimension hierarchy completed For some dimensions. Click the Member Sort tab.22. and Always (OLAP compatible) as shown in Figure 4-74. and then. Data. Figure 4-74 Dimension Definition. under Sorting Options. Member Sort tab 106 IBM Cognos Business Intelligence V10.1 Handbook . select Metadata. refer to the IBM Cognos Framework Manager User Guide. Figure 4-75 Dimension Definition. 24. the business keys for the levels are used. and then rename New Dimension to Time as shown in Figure 4-76. Member Sort tab For more information about the Member Sort feature. Figure 4-76 New Regular Dimension for Time Chapter 4. as shown in Figure 4-75.Click Detect to detect which item will be used in the Level Sort Properties pane to sort the data. In this case. Create reporting packages with IBM Cognos Framework Manager 107 . which is correct.Click OK.23. The new Time dimension is now complete and when expanded in the Project Viewer displays as shown in Figure 4-77. Figure 4-77 Time dimension expanded in Project Viewer 108 IBM Cognos Business Intelligence V10.1 Handbook . and Order Method as shown in Figure 4-79 on page 110. create a dimension for Products as shown in Figure 4-78. if you are feeling adventurous. Figure 4-78 Products dimension configuration Chapter 4. Create reporting packages with IBM Cognos Framework Manager 109 . We include the results in the model that we provide with this book.Again. Figure 4-79 Order Methods dimension configuration 4.1 Handbook . 2. point to Create.4. expand Business View Sales Fact. and then click Measure Dimension. To create Measure Dimensions: 1.2 Create Measure Dimensions A Measure Dimension is a logical collection of facts that enables OLAP-style analytical querying and is related to Regular Dimensions within scope. In the Model Objects pane. 110 IBM Cognos Business Intelligence V10. Right-click Dimensional View. Click Quantity. and then drag all the selected measures to the Measures pane as shown in Figure 4-80. and rename the new Measure Dimension to Sales Fact. Create reporting packages with IBM Cognos Framework Manager 111 .3. Figure 4-80 Sales Measure Dimension 4. Shift+click Break Even Point. Click OK. Chapter 4. you can use the Dimension Map in the Project Info pane.4. Repeat the steps to create a Measure Dimension called Sales Target Fact that is based on the Sales Target Fact data source query subject in the Business View.1 Handbook . 112 IBM Cognos Business Intelligence V10. The results display as shown in Figure 4-81. Select only the Sales Target measure. Figure 4-81 Sales Fact and Sales Target Fact Measure Dimensions expanded in the Project Viewer 4. underlying join relationships are still required to generate the SQL that is sent to the data source. To define the scope of a measure or group of measures. However.5.3 Define scope for measures Measure Dimensions are related to Regular Dimensions through scope relationships that define at what levels a measure is in scope. A scope relationship is created automatically between a dimension and a measure dimension whose underlying query subjects have a valid JOIN relationship defined and are required to achieve predictable roll ups. and delete Regular Dimensions and Measure Dimensions in this pane. Notice the scope relationships as shown in Figure 4-82. However. Chapter 4. Figure 4-82 Scope relationships You can double-click the relationships to edit scope.To define the scope for the Sales Fact and Sales Target Fact Measure Dimensions: 1. in our example. edit. You can also create. Double-click the Dimensional View namespace to give it focus. we use the Dimension Map because it is a central location to define scope easily for all measures. Create reporting packages with IBM Cognos Framework Manager 113 . Figure 4-83 Sales Fact scope All levels in all dimensions are highlighted indicating that they are all currently in scope. 3. Sales Fact is also not in scope at all for the Order Methods dimensions. and then click Set Scope on the toolbar. Figure 4-85 Remove Scope toolbar icon 114 IBM Cognos Business Intelligence V10. as shown in Figure 4-83. and then on the toolbar click the Set Scope icon as shown in Figure 4-84. We set the appropriate scope for the Sales Target measure. and then click Sales Fact in the Measures pane. Figure 4-84 Set Scope toolbar icon 4. In the middle pane. and then on the toolbar click the Remove Scope icon (shown in Figure 4-85). this is not the case for Sales Target Fact. Click Product Type in the Products dimension. click the Dimension Map tab. 5. Click Sales Target Fact. However.2. which is at the Month level for the Time dimension and Product Type level for the Products dimension. Click the Order Methods dimension. under Time click the Month level.1 Handbook . which is correct for the Sales Fact measures. As shown in Figure 4-86. Drag the Sales Target and Sales namespaces into the Query namespace. In the Project Viewer. The results display as shown in Figure 4-87. Now that the dimensional objects are created and scope is set. 7. Figure 4-86 Scope settings for Sales Target Fact 6. we create a presentation view for authors and analysts. point to Create. right-click Presentation View. the Day level for the Time dimension and the Product Name level for the Products dimension are no longer highlighted and are out of scope for Sales Target Fact. Figure 4-87 Presentation View organized Next. Create another namespace. Create reporting packages with IBM Cognos Framework Manager 115 . The Order Methods dimension is completely out of scope. Name the new namespace Query. Chapter 4. 9. and then click Namespace. These namespaces are used to organize the relational and dimensional presentation views. 8. create star schema groupings for the DMR objects and place them in the Analysis namespace. and name it Analysis. Figure 4-88 Create Star Schema Grouping dialog box The Measure Dimension and all related Regular Dimensions are selected automatically based on the scope relationships.10.1 Handbook . and then click Create Star Schema Grouping.In the Dimensional View. right-click Sales Fact. 11. 116 IBM Cognos Business Intelligence V10. and then repeat these steps to create a star schema grouping for Sales Target Fact. The result displays as shown in Figure 4-88.Click OK. Each report can contain information from a single package only. Chapter 4. Figure 4-89 Final Presentation view 4. and order methods. This modeling was done for both traditional relational reporting (query) and OLAP-style reporting (analysis) using DMR. we have imported. A package must contain all the information that a specific user or group of users needs to create reports. validated. and organized metadata to address the requirement to report and analyze sales and sales target information by products. modeled. Create reporting packages with IBM Cognos Framework Manager 117 . The next step is to publish packages to IBM Cognos Connection to make both the query package and analysis packages available to authors and analysts.12. to make metadata available to users. which are a subset of your model. The final Presentation View displays as shown in Figure 4-89. You create packages.Drag the two new star schema grouping namespaces to the Analysis namespace.5 Create and configure a package Up to this point. time. Click Next. and then choose the set of functions that you want to be available in the package. 6. and select Sales Target and Sales as shown in Figure 4-90. It allows you to keep multiple copies of a model on the server. 7. Clear the Model namespace. 8. By default. which can be useful if you want to publish a new version of the model but want existing reports to continue using an earlier copy. and then click Package. point to Create. When prompted to launch the Publish Package wizard and publish your package to the server. 2.1 Handbook . In the Project Viewer. and click Next. but you can browse to any location in IBM Cognos Connection to which you have write access. Clear Enable model versioning. expand Presentation View Query. Note that all new reports that you author always use the most recent version of a published model. all function sets are included unless you specify which function set is associated with a data source in the Project Function List dialog box located in the Project menu. right-click the Packages folder. 3. 118 IBM Cognos Business Intelligence V10. Define objects dialog box 4. type GO Sales DW (Query). 9. This option is checked by default. Click Next. In the name box. select a location where you want to publish your package. Click Finish. Opening an existing report in one of the studios will also cause the report to become associated with the latest version of the model. 5. We leave the default location of Public Folders.To create packages: 1. click Yes. In the Select Location Type dialog box. Figure 4-90 Create Package. 12. Informational warnings that might display indicate that items in the package reference other items in the model and that those items are included in the package as well but are hidden from authors. Click Publish. When this option is selected.Click Finish to close the Publish Wizard.To verify your package before publishing. Create reporting packages with IBM Cognos Framework Manager 119 .Click Close. Define objects dialog box Chapter 4. 11. ensure that the “Verify the package before publishing” option is selected.Specify who has access to the package. Figure 4-91 Create Package. We discuss security in more detail in 4.10. Use the Add and Remove buttons to specify which groups or roles will have access to the package. IBM Cognos Framework Manager performs a validation of your package and alerts you to any potential issues. click Next. When you have finished adding security. “Apply security in IBM Cognos Framework Manager” on page 124.Repeat these steps to create and publish a package called GO Sales DW (Analysis). 13. 14.6. Select only the Sales Target Fact and Sales Fact namespaces in the Analysis namespace as shown in Figure 4-91. and are ready for use by authors in one of the studios.1 Handbook . as shown in Figure 4-92. Figure 4-92 IBM Cognos Connection. Public Folders 120 IBM Cognos Business Intelligence V10.The packages are now available in IBM Cognos Connection. Figure 4-93 shows the GO Sales DW (Query) package in IBM Cognos Report Studio. Chapter 4. Figure 4-93 IBM Cognos Report Studio. Insertable Objects pane This package displays query subjects and query items for use in studios that support relational only packages. Create reporting packages with IBM Cognos Framework Manager 121 . Figure 4-94 shows the GO Sales DW (Analysis) package in IBM Cognos Report Studio. attributes. 4. levels. you can see how the changes that you make to a model will affect the package and any reports that use it. members. Changing the name of a query item in the model or 122 IBM Cognos Business Intelligence V10. This package allows for OLAP-style queries on a relational data source.1 Handbook . and measures.5. adding a new object to the model will not affect any existing reports. Reports that are authored using the package can be impacted by changes that you make to the model. Insertable Objects pane With this package. You can see details about each change that was made to the package and which reports are affected by a specific change. For example.1 Analyze publish impact Before you publish your package. Figure 4-94 IBM Cognos Report Studio. you can work with hierarchies. In the Project Viewer. it appears as a modified object in the analysis results. it also appears as a modified object in the analysis results. click a package that was published. If you change the model query subject. Create reporting packages with IBM Cognos Framework Manager 123 . 3. The report definition will not be valid because the query item that it references is not in the package definition. 2. Chapter 4. When you are finished. You can then take whatever action is necessary. For example. The analysis is done on objects that a package uses directly as well as the underlying objects. If you change the underlying data source query subject. It is important to note that changes to the model do not impact reports until the package is republished. and you can choose to search for dependant reports. you have a model query subject that references a data source query subject. The results of the analysis display. click Package Analyze Publish Impact. so your changes do not have any impact until the package is republished. click Close to close the Analyze Publish Impact dialog box. From the Actions menu.deleting a query item does affect a report. 4. Reports use the published package. The following types of objects are analyzed: Query subjects Query items Measures Regular dimensions Measure dimensions Hierarchies Levels Stand-alone filters Stand-alone calculations To analyze a publish impact: 1. or role directly to the object. security is a way of restricting access to metadata and data.6 Apply security in IBM Cognos Framework Manager This section discusses security at a high level. For example. ensure that security was set up correctly in IBM Cognos BI. 124 IBM Cognos Business Intelligence V10. all objects in the model are visible to everyone who has access to the package. After you set security for one object. groups. You might want an object to be visible only to one selected group or role. the denied access group or role membership will have priority. group. There are three different types of security in IBM Cognos Framework Manager: Object level security allows you to secure an object directly by allowing or denying users access to the object. When you add object-based security. you override the inherited setting. In cases of conflicting access. If a user is a member of multiple groups or roles and if one group is allowed access to an object and another is denied access. Before you add security in IBM Cognos Framework Manager. When you explicitly allow or deny access to an object. in your project you might have a Salary query subject. If you do not set object-based security. all of the child objects inherit the security settings. you choose to make the object visible to the select users or groups. or keeping it hidden from all users. you must set it for all objects. In IBM Cognos Framework Manager. the user will not have access to the secured object. This level of security controls the data that is shown to the users when they build and run their reports. We do not implement security in our model directly but discuss generic steps about how to apply security.4. Row level security allows you to create a security filter and apply it to a specific query subject. 4. Package level security allows you to apply security to a package and identify who has access to that package. The object inherits the security that was defined for its parent object.6. You might want this query subject visible to a Manager role but not visible to an Employee role.1 Object level security You can apply metadata security directly to objects in a model. you apply a specific user.1 Handbook . In doing so. and roles to define access. You can set security for all objects by setting security on the root namespace. When you apply security to a parent object. Each type of security relies on users.. 2. Chapter 4. sales managers at the Great Outdoors company want to ensure that Camping Equipment sales representatives see only orders that relate to the Camping Equipment product line. A security filter controls the data that is shown to users when they author their reports. groups. To remove object level security from the model: 1. or roles that you want to change. create and add members to a Sales Managers and Camping Equipment Reps groups. Remember that Deny takes priority over Allow. select Allow. In the Project Viewer. click Explorer.6. or role by completing one of the following steps: – To deny access to a user. or roles. 4. 3. Select any of the security objects that you want to remove from the model. Then apply a security filter to the Products query subject to restrict their access to camping equipment data. Click OK. You can also click Add to add new users. Select the users. 3. 4. – To grant access to a user. Specify security rights for each user. group. click Specify Object Security. groups. In the middle pane. and click Delete. Click the object that you want to secure. 2. and from the Actions menu. group or role. double-click the Packages folder to give it focus in the Explorer. group or role. For example. select Deny next to the name of the user. To accomplish this. group. Create reporting packages with IBM Cognos Framework Manager 125 .2 Row level security You can restrict the data that is returned by query subjects in a project by using security filters. Create. click the Based On column. click OK. Click the package that you want to edit.1 Handbook . You can also grant administrative access to packages for those users who might be required to republish a package. the security filters are joined together with ANDs. b. click OK to return to IBM Cognos Framework Manager. or roles. 2. and from the Action menu click Specify Data Security. 126 IBM Cognos Business Intelligence V10. These options allow you to either select an existing filter from your model to use or define the expression for a new filter. 4. in the Filter column. If you want to add a filter to a group. 4. Click Add Groups. You define package level security during the publish process the first time the package is published. After you modify the package access permissions. Users without these permissions are denied access. 4.6.3 Package level security Package access refers to the ability to use the package in one of the IBM Cognos BI studios or to run a report that uses the package from IBM Cognos Connection. groups. 3. c. and from the Actions menu click Package Edit Package Settings to invoke IBM Cognos Connection in a new window. although they can still view saved report outputs if they have access to the reports. add or remove groups or roles as required. add users. Click the query subject with which you want to work. To specify row level security: 1. In the Select Users and Groups window. click the Permissions tab. In the Select Users and Groups window. 2.Multiple groups or roles: If a user belongs to multiple groups or roles. If a group or role is based on another group or role. To modify access to your package after it has been published: 1. click either Create/Edit Embedded filter or Insert from Model. the security filter that is associated with these roles are joined together with ORs. 3. If you want to base the group on an existing group. To add new users: a. In IBM Cognos Connection. 4. You can also select the Response sub-tab in the Query Information tab to view the request and response sequence to and from the data source. In particular. This issue might be due to unsupported functions in the vendor database. Any warning or error messages generated are recorded here. you can verify query path and join conditions and determine if elements of the query are being processed locally by comparing the Cognos and Native SQL.7 Model troubleshooting tips This section provides some tips for troubleshooting your models. Items that appear in the Cognos SQL but are not replicated in the Native SQL indicate that additional processing of the data is required on the IBM Cognos servers. you can view the SQL that is generated for the query on the Query Information tab. Create reporting packages with IBM Cognos Framework Manager 127 .7.1 Examine the SQL When testing query objects in IBM Cognos Framework Manager. Viewing this information can be a useful way to verify expected results and can be a valuable troubleshooting technique to help you debug a model. Chapter 4. 4. Figure 4-95 Query Information tab 128 IBM Cognos Business Intelligence V10.1 Handbook . Right-click a query subject or multiple selected query items. and click Test. 2.To test a query and examine the generated SQL: 1. Test the results. and then click the Query Information tab to view the SQL generated for the query as shown in Figure 4-95. Create reporting packages with IBM Cognos Framework Manager 129 . click the Response tab. To show the object identifier for the dependent objects. In the Project Viewer. and any warning messages that were generated. The objects that depend on the selected object display under Dependent objects. click Show Object Dependencies.7.3. From the Tools menu. click an object. as shown in Figure 4-96. To view the request. 2. Chapter 4. Figure 4-96 Response tab 4. select Show Object ID. To determine object dependencies: 1. 3. the response.2 Object dependencies You can find objects easily that depend on other objects or show the dependencies of a child object. The objects that depend on the child object display under Dependent objects. such as the location. 5. 2.1 Handbook . Use the Analyze Publish Impact window by clicking the Show Dependencies icon under Actions in the row that contains the object. click Tools. 6. The search is not case sensitive.3 Search the model When working with a large project. You can use uppercase. select the single class of objects that you want to search. 5. lowercase. In the Search String field. or mixed case strings. Click the double down arrow button to show the search criteria boxes. or a property. use the equals condition. If you want to search using wildcard characters. If the selected object has children and you want to see the dependencies for a child object. select the part of the model hierarchy that you want to search. You can drag the Tools pane to the bottom of the IBM Cognos Framework Manager window and resize it to have a better view of the search results. click the Search tab. Click a child object under the parent object. If the Tools pane is not visible. select a condition to apply to the search string. 4. type the text that you want to find. To search the model: 1. 3. it can be difficult to locate the objects that you need to complete a task. a condition. The Condition box determines how the Search string value is matched with text in the model. It contains a list of possible search conditions. In the “Condition” list.7. In the “Search in” list. click the plus sign (+) beside the object that contains the child object. from the View menu. the class. 4. 130 IBM Cognos Business Intelligence V10. In the Tools pane. In the “Class” list. Use the Search tab to find objects quickly by applying different search criteria.4. Valid wildcard characters are an asterisk (*) and a question mark (?). You can also show object dependencies using the following methods: Use the Project Viewer by right-clicking an object and selecting Show Object Dependencies. Use the Context Explorer window by right-clicking an object and selecting Show Object Dependencies. but not the object name. 10. After you do one search. For the remainder of the book. The Text Properties property searches the set of properties that contain text strings. we use the sample models that ship with the product to demonstrate authoring business intelligence reports and analysis in IBM Cognos BI. Create reporting packages with IBM Cognos Framework Manager 131 . and click Locate in Diagram. The Object Name property restricts the search to the name of each object. right-click an object in the Search tab. The Subset option is cleared after each search. If you select Subset. The (All Properties) property searches all properties. click an object in the Search tab. it is a good idea to augment this knowledge with formal training to ensure the success of your IBM Cognos BI project. Chapter 4. the Subset check box becomes available. To see an object in the Project Viewer. 9. Click Search.To see an object in the diagram. Now that you have seen the basics of developing a simple IBM Cognos Framework Manager model.7. select the type of property that you want to search. The model that we describe in this chapter is just a small subset of the more robust sample models that ship with the product. The results are listed at the bottom of the Search tab. such as Description or Screen Tip. In the “Property” list. 8. the next search operates on the existing search results. 132 IBM Cognos Business Intelligence V10.1 Handbook . Part 3 Part 3 Business intelligence simplified © Copyright IBM Corp. All rights reserved. 133 . 2010. 1 Handbook .134 IBM Cognos Business Intelligence V10. It can be a challenge to transform all this data into complete.5 Chapter 5. which creates packages to include all that information that you need for reporting purposes. In this chapter. In addition. we discuss how to deliver this information to users to help them answer key business questions. Business users want to have freedom to combine and explore information. we discussed metadata modelling. we discuss the following topics in this chapter: Information delivery leading practices Enabling access for more people Business use case © Copyright IBM Corp. “Create reporting packages with IBM Cognos Framework Manager” on page 33. 135 . Companies today have various applications that produce large amount of data. and information from websites. 2010. to have a unique perspective on data. meaningful information therefore providing business intelligence. Business intelligence simplified: An overview In Chapter 4. and at the same time to collaborate with other members of the team. All rights reserved. they have access to information outside their companies. such as data about their competition. As an introduction to how to achieve a successful business intelligence solution. Change the default names of parts or components. A good practice is to change the default names to a name that is more meaningful to users. reports that are added to a dashboard are focused and summarized. With IBM Cognos Business Insight. For Lists. business users can use flexible dashboards and reports. Keep reports and report parts that are candidates to be included in IBM Cognos Business Insight workspace in a specific series of folders so that they can be found easily. or execute the report. because they can confuse the consumer.1 Information delivery leading practices The IBM Cognos Business Intelligence (BI) product provides a unified.5. consider the following recommended approaches: Use reports that focus on data that is of interest to the user. Each of the parts or components in a report has a default name. a dashboard needs to be an uncluttered display of relevant data. detailed reports with which the user does need to interact should not be included in an IBM Cognos Business Insight workspace. You can include any report in IBM Cognos Business Insight. you can use saved output as part of the workspace. When creating a new report for a dashboard. From the user perspective. if two lists are in the report List1 and List11. With IBM Cognos Business Insight. such as a list or chart. do not display in a Content unless you give them a name. so that a report contains one object. Use saved output or views. 136 IBM Cognos Business Intelligence V10. Turn off the headers and footers. interactive workspace for business users to create their view on data by combining all types of information and to personalize content to provide unique insights and to deliver faster business decisions. However. the default name is typically List1 or. users can change the version that they want to see. set the dashboard to open with the latest version. Prompts do not have a default name and.1 Handbook . which is typically static in nature. To achieve this goal. build reports at an atomic level. Therefore. If saved output is included in a dashboard. as such. that provides an at-a-glace view of business performance with a simple and visually compelling way of presenting data. The IBM Cognos Business Insight workspace is designed to allow a user to focus on an area for analysis. Business users can customize existing dashboards and change them in a way that answers their question or they can build completely new dashboards. Use atomic-level reports or purpose built parts. unlike production reporting. try using the URL and adding /m to the URL to get the mobile version (for example. Use the “Fit all Widgets to Window” option after you add all the widgets to the dashboard. do not make a widget bigger than it needs to be. After you save them.ibm. Avoid overlapping hidden widgets. add them to My Favorites. the other reports that have dates. Alternatively. you can use that prompt to apply a filter to that report only. When using a chart to represent the data. Business intelligence simplified: An overview 137 . so try not to overlap them. For that purpose. In the next sections. Use workarounds for the dashboard printing. if a report contains a date prompt. You can use one prompt to apply the same filter to more than one report on the workspace. avoid multi-color backgrounds or third-dimensions added to bars or lines unless these features provide meaningful information. or you can press Ctrl+P to use the web browser to print the information that is displayed on the screen. Chapter 5.Do not overwhelm users with charts. For quick access to the dashboards that you use on a regular basis. If you want to see multiple dashboards at the same time. Reuse prompts. For example. You can create several different types of reports and then use them in the dashboard. For example. you need to open IBM Cognos Business Insight in chrome mode (with the web browser showing toolbars and menus). Also. When using a web page in a workspace. However. You cannot print a dashboard directly from IBM Cognos Business Insight. Use My Favorites. you can save a report widget to a PDF file and then print the PDF file.com/m). as long as they share the same caption or dimension. can respond to a year selected from the first report. Use mobile support. Widgets can get “hidden” under other widgets. for example the year. and use appropriately-sized widgets. use the multi-tab option of the web browser. display only the data that is relevant for the users. Use multiple dashboards. we discuss each of these reports in detail. www. This option typically renders smaller results that fit better in a workspace. you can open the favorite dashboard or report from the Getting Started Page or the Content tab. 5. You can add any data that can be aggregated to the body of the crosstab as a measure.1 List reports A list report is a type of report that displays detailed information.1. or you can report on more than one measure.1. or as in Figure 5-2. return quantity. You can also group data in a list report by one or more columns. such as product orders or a customer list.1 Handbook . Figure 5-2 Crosstab report You can create a nested crosstab by adding more than one item to rows or columns. or include headers or footers to provide additional information. 5. Figure 5-2 shows a crosstab report. However. the values at the intersection points of rows and columns show summarized information rather than detailed information. quantity. Figure 5-1 shows an example of a simple list report. add summaries. Figure 5-1 Simple list report A list report shows data in rows and columns. Measures define that data is reported. crosstab reports (also called matrix reports) are reports that show data in rows and columns.2 Crosstabs Like list reports. 138 IBM Cognos Business Intelligence V10. such as revenue. where each column shows all the values for that item in the database. 5. Column and bar charts These charts show trends over time or compare discrete data. Business intelligence simplified: An overview 139 . and bar charts use horizontal objects. For example. This type of chart is useful when you want to see how individual values are ranked from highest to lowest level where sorted column or bar charts are best. Chapter 5. Column charts present data using vertical objects.. you can create a report that visually compares actual sales and planned sales or that shows the percentage share of product lines in the total revenue of the company. we discuss the various chart types and give suggestions about when to use each of them. These charts make it easy to compare individual values just by comparing the heights or lengths of two bars.1. They reveal trends and relationships between values that are not evident in lists or crosstab reports. Figure 5-3 shows a simple column chart. Figure 5-4 Stacked bar chart 140 IBM Cognos Business Intelligence V10. Figure 5-3 Simple column chart You can use more complex bar or column charts to display part-to-whole relationships as a stacked bar chart. as shown in Figure 5-4.1 Handbook . If you are interested only in a trend line but not individual values or when you are comparing many data series. area. Business intelligence simplified: An overview 141 . Figure 5-5 shows the distribution of gross profit over all the months in a year for different order methods. and point charts Line charts are similar to column charts. this chart is a good choice. For example.Line. but instead of using columns they plot data at regular points and connect them by lines. Figure 5-5 Line chart Chapter 5. Typically. Figure 5-6 Area chart As for column and bar charts.1 Handbook .You can accomplish the same result with the area chart where. areas below the lines are filled with colors or patterns. Figure 5-6 shows the line chart shown in Figure 5-6 as an area chart. it is best not to use stacked line charts because they are difficult to distinguish from unstacked line charts when there are multiple data series. 142 IBM Cognos Business Intelligence V10. instead of having lines. you can use complex area charts (stacked area charts) to show the relationship of parts to the whole. Another variation of a line chart is a point chart. Just the data points are shown. A point chart is similar to a line chart. but the points on the chart are not connected with lines. Figure 5-7 shows an example of a point chart. Business intelligence simplified: An overview 143 . Figure 5-7 Point chart Chapter 5. Combination charts Combination charts are a combination of the charts mentioned previously. They plot multiple data series using columns.1 Handbook . areas. or lines all within one chart. They are useful for highlighting relationships between the various data series. Figure 5-8 shows a combination chart that displays revenue and gross profit for marketing campaigns. Figure 5-8 Combination chart 144 IBM Cognos Business Intelligence V10. Chapter 5. Business intelligence simplified: An overview 145 .. Figure 5-9 shows the relationship between quantity sold and return quantity for each product line. indicating positive or negative correlation Randomness: Points arranged randomly. which indicates many product or product lines with a small number of items sold and a high number of returns Exceptions: Points stand out from the remaining pattern. bubble. For example. Their purpose is to show correlations between two sets of data (measures). and quadrant charts Scatter and bubble charts plot two measures along the same scale.Scatter. indicating anomalies. the Outdoor Protection product line has a higher number of returns than other product lines. indicating that there is no correlation between two measures Concentrations: Points appear in particular area of the chart. for example in upper-left corner. as in the previous chart example In this chart. You can use quadrant charts to present data that can be categorized into quadrants. The size of the bubbles shows the Gross Profit and the color of the bubbles shows whether the quantity is less than 1. You can create more complex bubble (or scatter) charts by adding a forth measure to the chart by specifying that the data point appears in different colors based on that measure.Bubble charts are similar to scatter charts but contain one additional piece of information—the size of the bubble represents the third measure.000 (yellow) or greater than 20. and current default charts use colored regions. Note that bubble charts are not supported for Microsoft Excel output.000. and threats (a SWOT) analysis. such as strengths.000 and 20. Figure 5-10 Bubble chart Quadrant charts are in fact bubble charts with a background that is divided into four equal sections.000 (green). Figure 5-10 shows an example of a chart with a correlation between Unit Sale Price and Unit Cost.1 Handbook . These charts are used usually for showing financial data. Legacy quadrant charts use baselines to create quadrants.000. opportunities.000.000 (red) between 1.000. You can change the size of the quadrants. weaknesses. 146 IBM Cognos Business Intelligence V10. Business intelligence simplified: An overview 147 .Figure 5-11 shows an example of the quadrant chart. Figure 5-11 Quadrant chart Chapter 5. Figure 5-12 shows a pie chart showing proportions of advertising costs.Pie and donut charts Pie and donut charts are used to show the relationship of parts to the whole by using segments of a circle. Also.1 Handbook . pie charts are not a good choice for a chart if you have measures that have zero or negative values. 148 IBM Cognos Business Intelligence V10. To show actual values. a stacked bar chart or a column chart (as shown in Figure 5-4 on page 140) provides a better option. Figure 5-12 Pie chart Note that reports in PDF format or HTML format show a maximum of 16 pie charts. Bullet charts Bullet charts are one variation of a bar charts. It also relates the compared measures against colored regions in the background that provide additional qualitative measurements. Business intelligence simplified: An overview 149 . Bullet charts shows a primary measure. in comparison to one or more other measures. satisfactory. you can add bullet charts to other report objects. Figure 5-13 Bullet chart Because they deliver compact information and do not need too much space on a dashboard. and poor. Figure 5-14 Combination of a bullet chart and a list report Chapter 5. such as list reports as shown in Figure 5-14. such as good. as in Figure 5-13. These charts are usually used to show the KPIs in executive dashboards.1 Handbook . Gauge charts are a better option than a bullet chart in the case where you need to compare more than two values (measures). Figure 5-15 shows how to compare three measures (product cost. and revenue) on the same gauge chart. planned revenue. Note that PDF output and HTML output of reports are limited to show up to 16 gauge charts. These charts are not available for Microsoft Excel output. Reading a value from a gauge chart is as easy as reading a value on a dial. Figure 5-15 Gauge chart 150 IBM Cognos Business Intelligence V10. and each value is compared to a colored data range.Gauge charts Gauge charts (also known as dial charts or speedometer charts) are similar to bullet charts in that they also compare multiple measures but use needles to show values. You can use these charts for quality control data. Business intelligence simplified: An overview 151 .. They include a cumulation line that shows the percentage of the accumulated total of all the columns or bars.Pareto charts Pareto charts rank categories from the most frequent to the least frequent. so that you can identify and reduce the primary cause of problems. Figure 5-16 shows an example of a Pareto chart showing the gross profit (in millions) for regions by product lines. 000.000.000.Progressive column charts Progressive charts (or waterfall charts) are a variation of column or stacked charts. These charts are not supported for Microsoft Excel output.. are useful for emphasizing the contribution of the individual segments to the whole.000 500.000 1. 2.000. Progressive charts. with each segment of a single tack displaced vertically from the next segment.500.000 Camping Equipment Positive Values Gross profit (in millions) 1.000. Figure 5-17 shows the contribution of each Product Line to Gross Profit (in millions).1 Handbook . Figure 5-18 shows the contribution of return quantity of returned items for product lines by order methods. Business intelligence simplified: An overview 153 . Individual segment height is a percentage of the respective column total value. Figure 5-18 Marimekko chart Chapter 5.Marimekko charts Marimekko charts are stacked charts in which the width of a column is proportional to the total of the column’s values. if necessary.Radar charts Radar charts compare several values along multiple axis that start at the center of the chart forming a radial figure. Figure 5-19 shows an example of a radar chart that compares revenue by product lines for different retailers. as shown in Figure 5-20. You can use these charts for visualizing the win-loss trends. This type of chart is also useful for spotting anomalies or outliers.1 Handbook . Figure 5-20 Win-loss chart 154 IBM Cognos Business Intelligence V10. These charts are useful if you want to compare a couple of variations against the same set of variables or to compare multiple measures. for example the months that have revenue over a certain threshold. Figure 5-19 Radar chart Win-loss charts Win-loss charts are microcharts that use the following measures: The default measure The win-loss measure The win-loss measure is the measure or calculation that you define. You can also define the default measure. Figure 5-21 shows the revenue and quantity for each product line. Figure 5-21 Polar chart Chapter 5. and the angle around the polar axis represents revenue. Business intelligence simplified: An overview 155 . The distance along the radial axis represents quantity.Polar charts Polar charts are circular charts that use values and angles to show information as polar coordinates. A trendline is typically a line or curve that connects or passes through two or more points in the series. displaying a trend. 156 IBM Cognos Business Intelligence V10. Baselines are horizontal or vertical lines that cut through a chart to indicate major divisions in the data. area. line.1 Handbook . Each baseline represents a value on an axis.. you can add a baseline to show a sales target (see Figure 5-22) or break-even point. You can add trendlines to bar. For example.Baselines and trendlines Baselines or trendlines provide additional details on a chart. bubble. and scatter charts. Figure 5-23 shows an example of adding a polynomial trendline to a chart displaying revenue by product lines over time to see the trend. Business intelligence simplified: An overview 157 . for data values that both increase and decrease (as in example in Figure 5-23) Logarithm. for data values that increase or decrease rapidly and then level out Moving average. for data values that fluctuate and you want to smooth out the exceptions to see trends Chapter 5. for data values that increase or decrease along a straight line at a constant rate (for example revenue that increases over time period) Polynomial. Figure 5-23 Example of a trendline added to a chart The following trendlines are available: Linear. It sells products from third-party manufacturers to resells.1 Handbook .5. refer to IBM Cognos Business Insight User Guide. “Business scenario and personas used in this book” on page 21 describes the fictitious Great Outdoors company scenario that we use throughout this book. WAI-ARIA ensures that people with limited vision can use screen-reader software along with a digital speech synthesizer to listen to displayed information. IBM Cognos Business Insight supports your system’s display settings. For a complete list of supported shortcut keys. IBM Cognos Business Insight uses Web Accessibility Initiative . Shortcut keys directly trigger an action. 5. such as a high-contrast display. In the following chapters. IBM Cognos Business Insight uses both Microsoft Windows navigation keys (such as F1 for online help or Ctrl+C and Ctrl+V for copy and paste) and application-specific shortcut keys. Major accessibility features in IBM Cognos Business Insight are: Use of command keys or shortcut keys to navigate through the workspace.Accessible Rich Internet Applications (WAI-ARIA).3 Business use case Chapter 3... such as restricted mobility or limited vision.2 Enabling access for more people IBM Cognos BI includes features to create reports that are more accessible to people with a physical disability. We need information about achieved revenue and profit.. Business intelligence simplified: An overview 159 . such as the internet. 160 IBM Cognos Business Intelligence V10.1 Handbook . All rights reserved. Individual and collaborative user experience In this chapter.6 Chapter 6. we introduce IBM Cognos Business Insight. 2010. we discuss the following topics: Dashboard overview Introduction to IBM Cognos Business Insight Interaction with the dashboard components Collaborative business intelligence © Copyright IBM Corp. In this chapter. interactive dashboards that provide insight and that facilitate collaborative decision making. the web-based interface that allows you to build sophisticated. 161 . images. Different users have different understandings of what a dashboard is and how it should look. they can interact with reports to sort or filter data. dashboards can contain non-business intelligence data. and to change list or crosstab reports to a chart or vice versa. Interactivity and personalization A dashboard is more than just a static set of reports. Pro activity and collaboration Business users can take action directly from within the dashboard using collaboration and workflow integration. Information is consolidated and arranged in a way that makes it easy to monitor. They can collaborate with team members to make decisions.1 Dashboard overview Dashboard is a term that is used commonly in the context of business analytics and that is a popular way of presenting important information. For business users. Nevertheless. Business users can use a free-form layout to add dashboard elements such as reports. In addition. It has to be intuitive and interactive to allow business users to personalize content to fit their needs. Visibility on non-business intelligence content In addition to a variety of reports. data warehouses. to add additional calculation. Assembling information from various different sources Dashboards combine data from various different data sources (enterprise resource planning systems.6. and so forth) to give users a complete view on business performance. or slider filters.1 Handbook . customer relationship management. 162 IBM Cognos Business Intelligence V10. such as websites or RSS feeds. textual objects. different data marts. a dashboard is the key to understanding trends or spotting anomalies in performance. RSS feeds. based on their business needs. properties that are in common for all dashboards can be summarized in following key features: At-a-glace view of business performance A dashboard is a visual display of the most important information about business performance. it opens in chrome mode. If a business user has permission to access a particular dashboard. No read-only dashboards: You cannot create a read-only version of a dashboard. it opens in chromeless mode. When you launch IBM Cognos Business Insight directly in a web browser by entering a URL.:. that user can also make changes to it.2 Introduction to IBM Cognos Business Insight IBM Cognos Business Insight is a web-based user interface that allows you to open or edit a dashboard or to create a dashboard. and chromeless mode does not these elements. If you use any of the other options to launch IBM Cognos Business Insight. Chapter 6.cgi?b_action=icd You can open an IBM Cognos Business Insight interface in two modes: Chrome mode Chromeless mode Chrome mode includes the toolbars and menus of a web browser. Individual and collaborative user experience 163 . . 2.6. change the layout.. If you do not want this page to display when you launch IBM Cognos Business Insight. In the following examples.2 Application bar The application bar displays the name of the current dashboard and contains the icons for different actions that you can perform in the dashboard layout area. open an existing dashboard. or search for content.2. Individual and collaborative user experience 165 . For example. send an email or collaboration. we demonstrate the features of some of these Chapter 6. 6. the page closes. disable it using the My Preferences menu option. create a dashboard. you can access the Action Menu.1 The Getting Started page Figure 6-2 shows the page that opens when you launch IBM Cognos Business Insight. 6.2.. For the complete list of available icons. HTML pages. and select value filters 166 IBM Cognos Business Intelligence V10. this view is unavailable The Toolbox tab includes the following types of widgets that are provided by IBM Cognos Business Insight: – Widgets that can add additional content to a business user’s workspace. crosstabs. HTML content. Within the Content tab.icons. or chart reports). non-BI content (text. In addition. such as images.1 Handbook . 6.3 Dashboard layout area The dashboard layout area is the workspace on which you can combine data from different sources to gain insight into your business. refer to IBM Cognos Business Insight User Guide. It is includes the following tabs: The Content tab displays IBM Cognos content in a hierarchy of folders and subfolders with dashboards that you can open and reports that you can add to a workspace. sliders. You can add various widgets with BI content (lists. and RSS feeds). images. list.2. or you can add filters to narrow the scope of the data (sliders or select value filters). you can enable or disable the display of information cards and refresh the display to get the current content. You can display content in thumbnail. otherwise. or tree view.4 Content pane The content pane contains all that objects that you can add to a workspace. This content is the same content as in IBM Cognos Connection with My Folders (personal content and dashboards) and Public Folders (content that is of interest for many business users). or RSS feeds – Widgets that allow you to filter already added content. summarized or detailed view. Individual and collaborative user experience 167 .000.6.5 Widgets Widgets are containers for all objects that you can add to the workspace. language.000 80. whether it is a report or a filter. Depending on the type and content of a widget. widgets allow the interaction and manipulation with the content that they contain. You can change the manner in which content displays in a widget.2. you can use the slider filter to filter the data dynamically in one or more report widgets.000 Figure 6-3 A widget with the on demand toolbar Widgets can communicate with other widgets. top-level location where the navigation begins. TrailChef Campaign Seeker Campaign Rising Star Campaign Revenue Gross profit Campaign name Outdoor Protection Campaign Hibernator Campaign Extreme Campaign EverGlow Campaign Course Pro Campaign Canyon Mule Campaign Big Rock Campaign 0 40. how the links in a widget are opened. if you have two report widgets that are created on the same dimensionally-modelled data source. Alternatively. You can specify the title. For example. a variety of toolbar options are available. as shown in Figure 6-3. For business users.000. Chapter 6. when the data in one report is changed. When you select a widget or it is in focus. and so forth. the second report is updated based on user interactions in the first report. an on demand toolbar displays. If IBM Cognos Metric Studio is installed and configured as part of your IBM Cognos BI environment. we discuss each of these widgets and when and how you can use them. Content widgets You can use content widgets when adding IBM Cognos content to the Content tab of a workspace. you can navigate to IBM Cognos Metric Studio content in the Content tab and add the following IBM Cognos Metric Studio content to a dashboard: Watch lists Scorecards Strategies Metric types Individual metrics When you add an individual metric to the dashboard. the content displays as a list of metrics for the selected item. If you add the entire report with several report parts to a dashboard. and navigation are supported. It is leading practice to use report parts whenever possible instead of entire reports to improve the layout and usability of dashboards. drill through. all report parts that include the header and the footer are added to a single widget. historical data for the metric displays in a form of a bar chart. or chart) to a workspace. Each 168 IBM Cognos Business Intelligence V10. crosstab. Reports parts are smaller and provide consolidated information for business users.There are two types of widgets inside IBM Cognos Business Insight: Content widgets Toolbox widgets In the following sections. Report widget Business users use the report widget to add reports or individual report parts (for example list.1 Handbook . A report widget includes the following reports: IBM Cognos Report Studio IBM Cognos Query Studio IBM Cognos Analysis Studio IBM Cognos Metric Studio Report views and saved report output versions Reports objects that contain prompts. which is not the best choice for a dashboard. This section describes the content widgets. For any other IBM Cognos Metric Studio content that you add. Widget-to-widget communication is also not supported. you can navigate to IBM Cognos PowerPlay Studio content in the Content tab and add IBM Cognos PowerPlay Studio reports to a dashboard using this widget. For example. PowerPlay widget If IBM Cognos PowerPlay Studio is installed and configured as part of your IBM Cognos BI environment. you can change the title of a widget. Support for reports in HTML format: IBM Cognos Business Insight supports only report versions that are saved in HTML format. You can change several properties of a report widget using the widget Actions Menu button. a IBM Cognos PowerPlay Studio report displays in HTML format. Users can choose to view the saved report output versions (by default. Individual and collaborative user experience 169 . If business users do not have a need for the most current data in some reports. the location. When added to a workspace. or the report specification.3. but you can also view the report in PDF format. “Work with report versions and watch rules” on page 207). For details about all properties that are available refer to the IBM Cognos Business Insight User Guide.metric in the list has a hyperlink that opens the individual metric in IBM Cognos Metric Studio. it is the latest saved output version) or the live version of the report. Users can also create watch rules based on specific conditions and thresholds for a given report version (see 6. We use some of these actions in examples later in this chapter. they can use report output versions in report widgets.6. the maximum number of rows per page. Communication note: IBM Cognos PowerPlay Studio report content does not interact with the slider filter and select value filter widgets. Chapter 6. 1 Handbook . TM1 Cube Viewer widgets listen to each other. By default. you can add applications that are developed in TM1 to a workspace. Communication note: TM1 widgets do not interact with the slider filter and select value filter widgets. objects are displayed in HTML format in a dedicated TM1 Viewer widget with TM1 toolbar buttons on top of the widget. Individual and collaborative user experience 171 . Figure 6-4 TM1 widget Chapter 6. as shown in Figure 6-4. which is Applications and Views. and the Applications folder has more sub-folders.1 Handbook . The Views folder contains original TM1 Cubes and TM1 Cube views objects. Figure 6-5 Example of TM1 Navigation Viewer You can add only the individual TM1 content objects to a workspace (that is. 172 IBM Cognos Business Intelligence V10. Cube Views. as shown in Figure 6-5.TM1 Navigation Viewer is incorporated in the Content pane and is not available as separate widget. not the entire folders. or TM1 Cube Views® objects. TM1 Websheets. Entire TM1 content is located in a folder in the Content pane with two main folder at the highest level of the tree. TM1 Websheet objects. or TM1 Contributors). The image can also be used as a link. Using the web page widget: You must add the web page URL to the trusted domain list as defined in the IBM Cognos Configuration tool. we describe the toolbox widgets. either to add additional information or to filter the content of existing widgets in the workspace. In this section. as shown in Figure 6-6. Image widget This widget displays the image on the dashboard. Individual and collaborative user experience 173 . Chapter 6. Figure 6-6 Navigator widget Toolbox widgets You can use toolbox widgets when adding non-Cognos content to a workspace. For example. you can configure the image widget to broadcast a specified URL in the web page widget or a new browser window when the image is clicked. The image must be a single file that is accessible by a URL. and reports.IBM Cognos Navigator The IBM Cognos Navigator is a navigation browser that displays IBM Cognos BI content such as folders. Using the image widget: You must add the image URL to the trusted domain list as defined in the IBM Cognos Configuration tool. Web page widget This widget displays HTML based content such as a Web page on a dashboard. packages. Text widget You can use this widget to display text on the dashboard. 174 IBM Cognos Business Intelligence V10. For example.1 Handbook . you can filter on the product line or region. You can specify how these links open in the web page widget or whether the web page widget listens to broadcasts from the RSS feed widget automatically. or customers. as shown in Figure 6-7. Select value filter widget You can use this widget to filter report data dynamically on the report widgets that you added to a workspace previously. RSS feed widget This widget displays the content of a Really Simple Syndication (RSS) or an Atom news feed that is specified by a URL address. because the valid RSS feed link opens an XML file. The RSS or Atom channel includes a list of links to specific web pages. subsidiaries. ad-hoc tasks. Figure 6-7 Select value filter widget Select value filter widgets are useful in a situation when you have several reports on a dashboard that show data by a variety of locations. The specified URL must point to a valid RSS or Atom feed and not a web page.My Inbox widget This widget displays an RSS feed of a user’s secure approval requests. not a web page. With these filters. which makes reports easier to read. and notification requests from My Inbox in IBM Cognos Connection. product lines. Using the RSS feed widget: You must add the RSS or Atom feed URL to the trusted domain list as defined in the IBM Cognos Configuration tool. you can narrow the scope of data. you can filter the chart by years. as shown in Figure 6-8. you can choose whether users can select single or multiple values in the filter widget. You must include the data item or items based on the items that you want to filter in the report query. Individual and collaborative user experience 175 . In addition. The report must be authored in a way that allows this type of filtering.When adding a select value filter. a bar chart shows returned quantity by product lines. for example just some specific product lines or years. and you must name the filter _BusinessInsight_. You can also filter the reports on data items that are not shown in the report. Therefore. For example. Selecting data for the filter: It is not possible to select one data item for more than one filter. additional data items must exist in the initial query (but do not have to display on the chart or crosstab) and in this separate query. because the report was authored in the manner that we described previously. you can select data items that you can filter with the corresponding report widget to which the items belong. Figure 6-8 Filter report based on data that is not displayed You can specify the list of values that you want in a select value filter. Chapter 6. However. These needs might include rearranging the layout. in the workspace that opens (either an empty dashboard or a dashboard that contains widgets). you can choose whether to open an existing dashboard or create a dashboard. they can also change it. In addition. this widget can filter single values or value range. such as revenue and quantity. you can view and interact with reports. to filter report data dynamically. you can also choose the data items on which to filter reports. so they can make use of the free-form layout and can rearrange reports or add new reports. Then. you can filter data based on values that are not displayed on report widgets.1 Personalize content When launching IBM Cognos Business Insight. Users have different needs for reports and data. or share information with the other members of the team.3.3 Interaction with the dashboard components Dashboards created with IBM Cognos Business Insight allow business users an integrated business intelligence experience together with collaborative decision making. 6. 6. Advanced business users or report authors can create reports and basic dashboards for a group of business users to include all information that is necessary for that group of users to work. business users can personalize the dashboards to fit specific needs. This type of filtering is especially useful when filtering on a data range (see Figure 6-9) or numeric items. which is similar to the select value filter. sorting data easily to see how 176 IBM Cognos Business Intelligence V10. if business users have permission to access a particular dashboard.1 Handbook . you can add and rearrange new widgets. sort data or perform additional calculations. Figure 6-9 Slider filter widget As with a select value filter. Regardless of your selection. For example.Slider filter widget You can use this widget. Depending on the settings of the slider filter. Thus. All dashboards are editable. Users can complete a wide variety of tasks quickly and easily. changing a pie chart to a bar chart. “Business scenario and personas used in this book” on page 21. and click GO Sales Initial Dashboard. Lynn Cope is an Advanced Business User in the Great Outdoors company. marketing data. Her role is to enable senior management to have access to all relevant information in a dashboard. Later. Our goal is to create a dashboard for Great Outdoors company executives and business users that combines all the relevant information that is needed to gain better insight into business performance of the company. and searching for an additional report and adding it to a workspace. Open the Business Insight folder. Chapter 6. Open the IBM Cognos Connection using the following URL: 2. but is missing in the current version of a dashboard. On this page. creates additional calculations. and external data. Individual and collaborative user experience 177 . She uses the IBM Cognos Business Insight interface to create and change dashboards. She begins by opening the current version of the GO Sales Dashboard.. and removing reports that are redundant. On the My Actions pane click Create my dashboards to open a Getting Started Page of IBM Cognos Business Insight. To begin this scenario: 1.measures are ranked from highest to lowest values. she interacts with the reports. you can create a new existing dashboard. and adds filters to allow users to narrow the scope of data. making some changes on the layout. including data that is relevant for the users. In this scenario. sales forecasting. as shown in Figure 6-10. 1 Handbook . The GO Sales Initial Dashboard opens. shown in Figure 6-11. Figure 6-11 GO Sales Initial Dashboard opens in Business Insight 178 IBM Cognos Business Intelligence V10. Click Open.Figure 6-10 Getting Started Page: Open an existing dashboard 3. In the Edit Dashboard Style window. select it. Then. Individual and collaborative user experience 179 . b. To move a widget. You can show or hide the titles of all widgets on a dashboard. click Show Titles as shown in Figure 6-12. and drag the widget to another Chapter 6. By default. Showing titles: It is not possible to show the titles of just selected widgets. Right-click. while hovering over the Application bar. you can rearrange the layout of a dashboard. and then click Edit Dashboard Style. On the Application bar. To show titles: a.4. Figure 6-12 Turning on the titles 5. turn on the titles on the widgets. the titles are hidden. you should see the cursor in a shape shown in Figure 6-13 on page 180. Change the places of the Gross profit by Region and Revenue Planned versus Actual widgets. click Layout and Style. To better understand the information shown in each report. You usually want titles hidden so they do not take much space on a dashboard. By taking a closer look at data in a report. Rearrange the widgets so that they do not overlap. Figure 6-13 Moving a widget 6. These lines provide a visual aid to assist you in aligning widgets. or resize widgets. remove the Return Quantity by Products and Order 180 IBM Cognos Business Intelligence V10.location on the dashboard.1 Handbook . Dotted guidelines display on the dashboard when you insert. move. 7. To make room for additional reports. Notice that you have reports that show almost the same data and that you need space on the dashboard for additional reports. and then click Remove from Dashboard. Click the widget. click Remove. click Widgets Action.Methods report. Individual and collaborative user experience 181 . When prompted. as shown in Figure 6-14. Figure 6-14 Deleting a widget Chapter 6. Right-click the widget. Using a column chart instead of a pie chart makes it easier to compare values for different product lines. change the display type for the Return Quantity by Product Lines report. and select Change Display Type Column Chart. Figure 6-15 Changing the display type 9.1 Handbook . 182 IBM Cognos Business Intelligence V10.8. Turn off the widget titles in the same way as described in Step 4 on page 179. Next. as shown in Figure 6-15. Clear the “Show titles” option. 2. you can add reports.3. This feature is a full-text search similar to popular search engines. TM1 objects.5. report parts. Chapter 6. Index note: IBM Cognos content must be indexed before you perform a search. Figure 6-16 Modified dashboard 6. “Widgets” on page 167. or in fact.The dashboard should now look as shown in Figure 6-16. You can use the IBM Cognos Business Insight enhanced search feature to find and add relevant content to the dashboard.2 Add new content to broaden the scope You can add new widgets to a dashboard by dragging them from the Content or Toolbox tabs. any object described in 6. Using the same method. metric lists or individual metrics. Individual and collaborative user experience 183 . and other key fields. if you enter camp. headings. 184 IBM Cognos Business Intelligence V10. keep in mind the following rules: Search results include only the entries for which you have permission to access at the time of the last index update. When using more than one word in a search. titles.When using the search capability. row names. results also include camps and camping.1 Handbook . the dashboard is included in the search results. the result includes entries that contain all of the search keywords and entries that contain only one of the search keywords. For example. Searches are not case-sensitive. For example. column names. Report returns the same result. use the following operators as you use them in other search engines: – A plus sign (+) – A minus sign (-) – Double quotation marks (“ ”) If a search term matches a specific item on a dashboard. Searches look for matching prompts. but the individual item is not included. To modify this type of search. searching for report and Searches include word variations automatically. you can search annotations and IBM Lotus Connections dashboard activities.When the search is complete. Chapter 6. the results are ranked according to the search term match relevance. Figure 6-17 Result of the search in IBM Cognos Business Insight Search note: In addition to the IBM Cognos content. Individual and collaborative user experience 185 . as shown in Figure 6-17. list.1 Handbook .After a search is complete you can refine search results using the following filters (see Figure 6-18): Result Type Part Date Owner Metadata Shows only report parts or hides report parts The type of IBM Cognos object. such as crosstab. reports. such as dashboards. or pie chart The year of creation The owner of the object The metadata or packages that were used for to create this object Figure 6-18 Refine search option 186 IBM Cognos Business Intelligence V10. or queries The type of report part. Figure 6-19 Search for objects containing “promotion revenue” 3. and it now looks as shown in Figure 6-16 on page 183. Locate the Search window in the upper-right corner of the IBM Cognos Business Insight user interface. back to our scenario. To add this report: 1. Refine the search by clicking Refine Search. click Search Results for “promotion revenue” All Content as you shown in Figure 6-20. Among the search results. Lynn Cope made changes to a dashboard. and click GO Data Warehouse (query) to narrow the result set. 4. Go to the Metadata section. as shown in Figure 6-19. and press Enter. 2. including gross profit information.Now. To close a search and return to the standard Content view. Figure 6-20 Closing a search Chapter 6. locate a Promotion Data (Revenue vs Gross Profit) report. 5. Individual and collaborative user experience 187 . type promotion revenue. She wants to add a report that contains marketing data for the Great Outdoors company promotions. and drag it onto a dashboard. A window opens next to the search results. To change the color palette of the report.6. as shown in Figure 6-21.1 Handbook . Figure 6-21 Changing the color palette of the widget 188 IBM Cognos Business Intelligence V10. click Change color palette Jazz on the widget toolbar. Chapter 6. Sorting is useful when you want to see. for example. Individual and collaborative user experience 189 . In addition. you can interact with report widgets and apply custom sorting. you can add basic calculations using data in the report. and charts.3 Sort and filter data and perform calculations Apart from changes in the visual display of data in reports. the ranking.The dashboard now looks as shown in Figure 6-22. based on an alphabetical or numeric value. and you can filter data. We describe these features in this section. crosstabs. You can sort on a column that lists revenue in descending order to view revenue data from the highest to the lowest. Sorting data Sorting organizes data in either ascending or descending order. Figure 6-22 Modified dashboard 6. In IBM Cognos Business Insight.3. you can sort lists. sorted information for crosstabs does not displays in the information bar in the report widget. IBM Cognos Business Insight Advanced. However.When sorting data. Lynn Cope wants to use the possibility to sort the data in the report on a dashboard. nested measures. or IBM Cognos Query Studio. the sorted information displays in the information bar in the report widget. In this scenario. Sorting by label is not available in crosstab reports for summary rows or columns. consider the following rules: For crosstab reports with sorting applied in IBM Cognos Report Studio. Sorting by value is not supported on the outer edges of a nested crosstab or in relational crosstabs. Figure 6-23 Information bar with current sorting status 190 IBM Cognos Business Intelligence V10.1 Handbook . To sort this data: 1. calculations. she sorts the Revenue column to display the regions with the highest revenue at the top of the report. with IBM Cognos Analysis Studio. Notice that the report is sorted in ascending order by the label Branch region. or rows and columns based on single dimensional members. click the information bar to see the current sorting on the report (as shown in Figure 6-23). On the Revenue and sales target by region report. For the Revenue and sales target by region report. This sorting makes it easier for senior management to identify the best performing regions. Individual and collaborative user experience 191 .2. Figure 6-24 Sorting column in a report The report now looks as shown in Figure 6-25. as shown in Figure 6-24. click Sort Descending on the toolbar. To sort the report on the Revenue column in descending order. Figure 6-25 Report with sorted column Chapter 6. Then. click the Revenue column. click Do More to open the report in IBM Cognos Business Insight Advanced. follow these steps: a. Next. Lynn Cope wants to modify the Promotion Data (Revenue vs Gross Profit) report to convert the report to a list report. On the widget toolbar. Click Calculate Gross Profit/Promotion Revenue. and to filter the report to obtain only the campaigns that are the most profitable. The results are always based on the current data in the data source. 192 IBM Cognos Business Intelligence V10. pressing the Ctrl key on keyboard. IBM Cognos Business Insight reruns the calculation each time the report is refreshed. Instead.1 Handbook . To modify the report: 1. and click Change Display Type List Table. to insert an additional column with a default name of Gross profit/Promotion revenue. 2. as shown in Figure 6-26. and clicking the “Gross Profit” column. you can perform basic calculations for list and crosstab reports using data from one or more report items (for example. Calculation results: The results of calculation are not stored in the underlying data source. First. to add one additional column (Gross Profit Margin=Gross Profit/Promotional Revenue). to divide the values from two columns). Go to the Promotion Data (Revenue vs Gross Profit) report. IBM Cognos Business Insight includes the following calculations: Sum (+) Difference (-) Multiplication (*) Division (/) Difference (%) Performing more complete calculations: If you need to perform more complex calculations. add a column by clicking the “Promotion revenue” column.Adding simple calculations In IBM Cognos Business Insight. convert the chart to a list report. right-click it. To move the newly created column to the last position in a list report. Enter Gross Profit Margin as the name. Individual and collaborative user experience 193 . right-click the column. and click Rename. and click Move Right on the menu.Figure 6-26 Perform simple calculation b. To rename a column. Chapter 6. The report now looks as shown in Figure 6-27. Figure 6-27 Report with added calculated column c. When the report content is reset. When you save a dashboard for the first time. Resize the report widget.1 Handbook . and click Save to save this version of the dashboard. only the data that meets the criteria of the filter displays. Click Actions Menu. The report now looks as shown in Figure 6-28. a copy of each report widget is created for the saved dashboard.41119418). Right-click the Gross Profit Margin for Extreme Campaign (value 0. Filtering Filtering is a way to narrow the scope of data in reports by removing unwanted data. but the original reports are not changed. Note that the changes that you made are saved with the dashboard when you save it. any changes that you made to the content are lost. Click Filter =0. use the Reset option on the widget Actions Menu button. 194 IBM Cognos Business Intelligence V10. After you open and change the report (for example. click Do More to open the report in IBM Cognos Business Insight Advanced. you apply a sort or add a calculation). You can only filter data by selecting values from a report. Using the Reset option: The Reset option is not available for saved output reports or for the reports where the original report was deleted or disabled. Figure 6-28 Promotion Data report after filtering 5. As shown in the previous example. 4. You cannot type the value manually.4).3. narrow the data in a report and display only the campaigns with the high Gross Profit Margin (for example >0. Applying more detailed filtering: To apply more detailed filtering to the report. If you want to revert to the original report.41119418. Next. the changes are saved in this copy. User can filter the data on reports using one of the following options: Prompt Filter in individual report widget using filter actions Slider or select value filter You receive prompts to select the parameter values before the report runs. for example the name of the campaign as shown in Figure 6-30 on page 196. the report is filtered. Figure 6-29 Information bar displaying applied filters Note that if you apply a filter or sort to data in a table report that is changed to a chart. you cannot filter on chart data in the report widget by using the filter actions from the report widget toolbar or context menu.You can find the information about all the filters that are applied to the report on the information bar. Chapter 6. you can use the Include or Exclude conditions. Individual and collaborative user experience 195 . the applied filters look as shown in Figure 6-29. You can filter the individual report widget using filter actions on numeric and non-numeric values. In the case of our previous example. All values are included in the condition. Based on the parameter values that you select. When filtering on values that are non-numeric in a list or in crosstab reports. the information bar displays the filter and sort information in the chart. You can select multiple non-numeric values (in list reports within the same column and in crosstabs in column or row headings) on which to filter. However. or you can use Between and Not Between if two values are selected (see Figure 6-31). >=. 196 IBM Cognos Business Intelligence V10. if all parts share the same query.1 Handbook . a filter applied to one report part is also applied to the other. If the query is not shared. the filter is applied only to the selected report part within the report widget. <.Figure 6-30 Filtering non-numeric data For numeric data you can use conditions (for example >. Figure 6-31 Filtering numeric data In case of compound reports that consist of more report parts. >=) if only one value is selected. Thus. When you select a value on a filter widget. Individual and collaborative user experience 197 . We discuss advanced filtering using slider filters and select value filters in the next section.4 Use advanced filtering Filtering data in the report widget using a slider widget or a select value filter widget filters data in all reports that communicate with that particular filter.If you want to remove a filter from a report widget on the information bar. 6. IBM Cognos Query Studio. as shown in Figure 6-32. or IBM Cognos Report Studio in this manner. click the delete icon next to the filter that you want to remove. data only on those reports that communicate with that filter. the report widget refreshes to display the filtered data items that you selected. it filters all reports that have regions as a data item. Also.3. Chapter 6. the following types of widgets are available: A source widget is a widget that is broadcasting information. Image and RSS feed widgets are also source widgets. two report widgets listen to each other. report widgets can interact with each other and with filter widgets. In our business scenario. Using filter widgets Filter widgets are especially useful if you have several reports on a dashboard that share the same data items. A target widget is a widget that is listening to other widgets. you must disable the communication in the target widget. widgets communicate with each other. For example. You can also choose to disable some widget events while leaving other widget events enabled. Lynn notices that the filter is impacting one report that she does not want to filter. Filter widgets broadcast the information (sending the data based on your input or selection). For example. For example. The results of actions in the source widgets are shown in the associated target widgets. After adding a select value filter.1 Handbook . Lynn Cope wants to add a select value filter for regions to make filtering easier for the users of the dashboard. you might want a widget to listen to filter events and to not listen to drill events from another widget. If they are based on the same dimensionally-modelled data source and if the report contains items from the same hierarchy. She needs to modify the communication between these widgets to change this behavior. If you do not want a target widget to receive information from any or all source widgets. drilling in one report widget affects a drill in the other report widget. an image widget can broadcast a specified URL in a web page widget when the image is clicked. 198 IBM Cognos Business Intelligence V10. Report widgets can be both source and target widgets. Based on the type of interaction. By default. By default. Individual and collaborative user experience 199 . Figure 6-33 Dashboard before adding filter widget Chapter 6.The Great Outdoor company Sales Dashboard currently looks as shown in Figure 6-33. The Properties . You can filter on the Region data item for reports Revenue Planned versus Actual and Gross Profit by Region.Select Value Filter window opens. Figure 6-34 Select Value Filter properties window 200 IBM Cognos Business Intelligence V10. and click OK. as shown in Figure 6-34.To modify the dashboard to change the communication between widgets: 1. Leave the default setting for the remainder of the options.1 Handbook . Select Region. Drag Select Value Filter from the Toolbox tab to the dashboard. Click Action. Note that the Revenue Planned versus Actual and Gross Profit by Region refresh and now display data just for the selected regions. and then click Listen to Widget Events. Figure 6-36 Dashboard with filter applied for the region 3. as shown in Figure 6-36. so you can remove filtering on that report widget. and Southern Europe. Select values for Central Europe. Northern Europe.The widget opens on the dashboard (see Figure 6-35). Individual and collaborative user experience 201 . Figure 6-35 Select a value filter widget by region 2. Chapter 6. You do not want to filter the data on the Revenue Planned versus Actual report. and click Apply. 4. and clear that option as shown in Figure 6-37. Figure 6-37 Listen for Widget Events window 202 IBM Cognos Business Intelligence V10. Scroll down to Select Value Filter.1 Handbook . Now. this widget will not communicate with the select value filter widget. Go to the filter widget. The Gross Profit by Region report is filtered again and now shows data for these two regions. However.5. Click Apply. the Revenue Planned versus Actual report remains the same. because it is not listening to the filter widget anymore (see Figure 6-38). and select Americas and Asia Pacific. Individual and collaborative user experience 203 . Figure 6-38 Filtering report after changes in Listening for Widget Events properties Chapter 6. and remove the filter as shown in Figure 6-39. Go to the information bar. You want the Revenue Planned versus Actual report to display data for all regions.1 Handbook . so you remove filtering that was applied previously with the select filter widget. Figure 6-39 Removing filter from a report widget 204 IBM Cognos Business Intelligence V10.6. enter the following URL:. you can add non-BI content. Figure 6-40 Modified dashboard 6. Individual and collaborative user experience 205 .ibm. To add non-BI content: 1.3. In our business scenario. shown in Figure 6-41.The dashboard now looks as shown in Figure 6-40. to a dashboard. 2. text. Chapter 6.wss?keyword=null&maxFeed=& feedType=RSS&topic=80 3.5 Add non-BI content to a dashboard In addition to IBM Cognos BI content.com in this case) is added to the trusted domain list that is defined in the IBM Cognos Configuration tool. Click OK. Assure that the Atom feed URL (*. such as images. web pages.com/press/us/en/rssfeed. In the Properties RSS Feed window. Lynn Cope wants to include stock exchange reports and news from various websites. Drag the RSS Feed widget from the Toolbox pane to the dashboard. or RSS feeds.ibm. Figure 6-42 RSS Feed widget 206 IBM Cognos Business Intelligence V10.Figure 6-41 Add RSS Feed to a dashboard The widget is added to a dashboard (see Figure 6-42).1 Handbook . reports are run directly against the underlying data source so that they reflect the latest data. you might want to see older data to compare monthly revenue for a region before and after features are added. For example. Chapter 6. However. as illustrated in Figure 6-43. For the output versions of the reports.3. you do not need reports that are executed multiple times during working hours on the same data set. Alternatively.6 Work with report versions and watch rules Usually. You can choose to view the saved report output versions (by default. Watch rules are based on event conditions that are evaluated when the report is saved. it is the latest saved output version) or to view the live version of the report. Individual and collaborative user experience 207 . Figure 6-43 Report version options Reports in HTML format: Only report versions saved in HTML format are supported in IBM Cognos Business Insight. if reports are running against a data warehouse that is refreshed once daily. reports can use older data for comparisons. In this types of scenarios. at time. The watch rule sends an alert when a specific condition in a saved report is satisfied.6. Report outputs are saved when the report runs in the background. you can define the watch rules to monitor events of interest. you can use the report output versions in report widgets. 208 IBM Cognos Business Intelligence V10. and inspect the options that are available. She noticed the negative Gross Profit in case of the Extreme Campaign for Outdoor Protection product lines. To add a watch rule: 1. To enable other users to monitor that result and to take measures if necessary. and add the Campaigns by product lines report to the dashboard. Click Actions Menu. select the Create New option. refer to IBM Cognos Connection User Guide. The next example shows how to use the watch rules in the business use case of the Great Outdoors company. Open IBM Cognos Business Insight.1 Handbook . Open the Business Insight Source Reports folder. click Versions. 2. For the details. and navigate to the folder where you imported the deployment archive that we provided with the additional materials accompanying this book. she wants to add a watch rule to that value. Lynn Cope created a list report with the campaigns by product lines and the gross profit. To add a watch rule to the negative Gross Profit value for Extreme Campaign.” Chapter 6. Leave the performance pattern as “High values are good.3. Select the “Send an alert based on a thresholds” option. Figure 6-44 Add new watch rule 4. right-click the intersection of Gross Profit and Outdoor Protection Extreme Campaign. A window opens where you can specify the rule. and click Alert Using New Watch Rule as shown in Figure 6-44. Individual and collaborative user experience 209 . Figure 6-45 Watch rule specification 6. A window opens where you can specify an alert type. Figure 6-46 Alert type specification 210 IBM Cognos Business Intelligence V10. average. You can set up a watch rule to send different alerts depending on the performance status of a condition (good. Set the alert to send an email in the case of average performance and to publish a news item in case of good performance. Enter the value 10000 in the first box and 0 in the second (see Figure 6-45). Make a selection as shown in Figure 6-46.5. Click Next.1 Handbook . and poor). 4 Collaborative business intelligence Collaboration plays an important role in decision making and resolving any business issues. Chapter 6. Individual and collaborative user experience 211 . Click Next.Click Finish. and you can view it if you click Watch New Versions on the report widget toolbar as shown in Figure 6-47. Figure 6-47 Watch new versions menu 6. 9. Define the headline and text of the news item by clicking Edit the options for Publish a news item. Creating reports and dashboards and analyzing data are tasks that are performed by individual users. when it comes to making business decisions based on that information. The watch rule is added. Define the list of users that you want to receive the email by clicking Edit the options for Send a notification. However. 8.7. a team of users typically creates reports and dashboards and analyzes data. Enter the following text as the name for a watch rule: Gross Profit for Outdoor Protection has met a threshold condition 10. This option opens Adobe® Reader with a PDF version of a report with full data and a preview of how that data will print. Send a URL in an instant message or put the URL in a document using the Copy Link to Clipboard option on the Actions Menu button. Otherwise. you can use Ctrl+P to use the web browser printing.Users can share a dashboard with other colleagues using various methods: Email a link to the dashboard using the Email Link option on the Actions Menu button.1 Create annotations Comments or annotations allow users to collaborate with other members of the team on the content of an individual report on the dashboard. such as low sales figures for a product that was recently released and has been on the market for a few months. they cannot access it. Recipient permissions: The recipients of the shared dashboard URL must have permission to view dashboards. providing additional information. You can achieve collaboration using one of the following methods: Annotations IBM Lotus Connections activities 6. Your email client opens with a message that is populated with the dashboard name in the subject line and the link to the dashboard in the message body. These comments are visible to other users who view the same report. you can collaborate with other users while creating reports or monitoring dashboards in IBM Cognos Business Insight. 212 IBM Cognos Business Intelligence V10. Print individual reports to PDF format using the Print as PDF option on the Actions Menu button of a report widget. These users can also add further comments about that report. Export individual reports to any of the following formats: – – – – – PDF Microsoft Excel 2007 Microsoft Excel 2002 CSV XML In addition. Note that you cannot print the entire dashboard. To print the entire dashboard. comments can be a reminder to investigate low sales results in a particular region or an explanation of some anomalies in data.4.1 Handbook . For example. users must have execute access for live reports and read and traverse access for saved output versions. when the report is refreshed with data and cell value changes (perhaps the percentage is significantly lower). Figure 6-48 Comments on individual cells in report Chapter 6. All users who can access the report can see comments that are added to it.. Individual and collaborative user experience 213 . You can comment live reports and saved output versions. In the example shown in Figure 6-48. not to the value.. Adding or editing comments: To add or edit comments. When printing a PDF version of a report or exporting a report to PDF or Excel output. share files. You can add. If you have another report that has the same cell (in the previous example. You cannot edit or delete the comments added by other users. the report does not include the comment added previously. IBM Lotus Connections is a collaboration service that allows users to interact in an online location where they can create and share ideas and resources.2 IBM Lotus Connections activities One step further from collaborating by using comments is setting up activities in a web-based collaboration tool. and create and assign to-do items. The original value stays in the comment after the report is refreshed.The cell value is added to the comment by default. Dashboard note: When the dashboard is closed. and the time the comment was written (see Figure 6-48). you can see the user’s name. it is no longer possible to edit or delete comments from that session. edit added comments.1 Handbook . For each comment. 214 IBM Cognos Business Intelligence V10. link to websites or their dashboards. Users can include stakeholders or other interested parties involved in the decision-making process. 6. Users can post messages. For example. users can use activities for collaborative decision-making in a single place. A comment is specific only to the cell in the current report. users can use activities to post a link to their IBM Cognos Business Insight dashboard so that other users can use it for future analysis or to track and audit decisions and initiatives. date. If there are multiple comments for the same cell or report widget. Because activities are integrated with IBM Cognos Business Insight. As shown in Figure 6-48.4. the value of a cell is added automatically. or delete comments during the current dashboard session. These reports are not linked and do not share the comments. the same cell is the Percentage of customers who returned a product with the reason listed as Wrong product shipped). they display in reverse chronological order. for example additional files or bookmarks Add to-do items and assign them to activity members Add comments Complete to-do items or mark an activity as complete In IBM Cognos Business Insight. the date and time of the update. a summary of the last three updates and the activity goal displays. Individual and collaborative user experience 215 .When you want to collaborate with other members of the team to resolve an issue or to perform an investigation. start a dashboard activity from the application bar (see Figure 6-49) to create an IBM Lotus Connections activity that is connected to that particular dashboard. For each activity. you can work with the activity in IBM Lotus Connections. If you expand an activity by clicking More. the name of the user who performed the last update. Chapter 6. After that. the activity opens in IBM Lotus Connections. Figure 6-49 Start a dashboard activity in Business Insight In IBM Lotus Connections you can complete the following activities: Add members to an activity and change the access to an activity Add entries to an activity. and the activity priority and due date are reported if they are set up. the activity title. you can view the list of activities that are started for that dashboard. When clicking an activity or specific entry within it. 1 Handbook .216 IBM Cognos Business Intelligence V10. 217 . 2010. In this chapter.7 Chapter 7. All rights reserved. based on fictitious business scenarios.. you can become familiar with IBM Cognos Business Insight Advanced and how it can address real business situations. Executing the step-by-step instructions that we include in this chapter. including statistics services and lineage and search features. Self service interface for business users This chapter provides an overview of the features of IBM Cognos Business Insight Advanced. This tool allows users to work with both relational and dimensional data sources.1 Explore the IBM Cognos Business Insight Advanced interface IBM Cognos Business Insight Advanced is a web-based tool that is used by advanced business users and professional report authors and analysts to create and analyze reports. This chapter does not include all the features. otherwise. The interactive and analysis features allow them to assemble and personalize the views to follow a train of thought and generate unique perspectives easily. and allows them to show their data in lists. refer to the IBM Cognos Business Insight Advanced User Guide. Its interface is intuitive to allow the minimum investment in training.1 Handbook . Objective of this chapter: The objective of this chapter is give an overview of the major features of IBM Cognos Business Insight Advanced. This tool also allows users to take advantage of the interactive exploration and analysis features while they build reports. it is important that you choose a reporting style that helps users make the most of their data and avoid mixing dimensional and relational concepts. and charts.. as well as external data. For more information. However.7. reports can display unpredictable results. crosstabs. you must recreate a new version of the reports in IBM Cognos Business Insight Advanced if you want to use this studio for those reports. Chapter 7.1 Page layers The Page layers area is used to create sections or page breaks in reports. 7. When you add a dimension level or dimension members in this area. notice that one block with the current selection of the hierarchy is created in your report. If you have reports that were created in these studios.1. Self service interface for business users 219 . to analyze the Gross Profit metric by region for separate pages for each year. as shown in Figure 7-2.For example. 220 IBM Cognos Business Intelligence V10. To change the section. Figure 7-2 Adding Page layers Page layers: The Page layers configuration is applied to the entire report. click the arrows in the page navigation. you must add the Time dimension on the Page layers area.1 Handbook . 1. If you need to apply the same Context filters for two or more objects. Self service interface for business users 221 . to analyze the Gross Profit metric by region but only for web sales. For example.2 Context filters The Context filters area is used to filter reports for separate contexts of information. When you add a hierarchy or members of a hierarchy in this area. you will notice that one block with the context selection is created in your report.7. you must select each object and then add the desired dimension member. you can add the order method web to the Context filter. as shown in Figure 7-3. Context filters: The Context filters configuration applies only to the selected object. Figure 7-3 Adding Context filters Chapter 7. this view displays measures folders. and dimensions. What you see in this tab depends on the selection that you made in the Insertable Objects Source toolbar.1. such as the Work.3 Insertable Objects pane The Insertable Objects pane contains the objects that you can add to the reports. IBM Cognos Business Insight Advanced removes the prior configuration automatically. Therefore. 222 IBM Cognos Business Intelligence V10. Exploring this data model. such as spreadsheets or comma-separated value (CSV) files. and create labels. the Page layers configuration is reset and the Quarter is placed in the Context filter section. measures. For example. Inside each dimension. Page layers. separate contents. the user can see live data (Figure 7-5) and use this data to create reports easily by dragging the items into one of the areas. because one configuration suppresses the other configuration.1 Handbook . Figure 7-4 Insertable Objects Source toolbar The Toolbox tab contains all the objects that you can add to your report to improve the readability. These objects are grouped in the following tabs: Source Toolbox The Source tab shows the data model. As shown in Figure 7-4. or Context filter areas. if you have Year in the Page layers section and you add Quarter to Context filters.Adding a dimension member: You cannot add the same dimension level or members of a dimension both in the Page layers and Context filter areas. you can find dimensional members and metrics or query subjects and their query items. when you add a dimension member from a hierarchy that is used in the other configuration. the toolbar contains shortcuts to set properties that impact the behavior of the report when you insert data from a dimensional model and allow users to add external data. View Members Tree For dimensional models or Dimensionally Modeled Relational (DMR) models. 7. Self service interface for business users 223 .. 1 Handbook . this view displays these items: Folders Namespaces Measure folders Measures Dimensions Hierarchies Levels Figure 7-6 Dimensional data source displayed on View Metadata Tree 224 IBM Cognos Business Intelligence V10.If you expand a dimensional data model (Figure 7-6). this view displays folders. query subjects. namespaces. Figure 7-7 Dimensional data source displayed on View Metadata Tree Chapter 7. Self service interface for business users 225 .If you expand a Relational model (Figure 7-7). and query items. 1 Handbook . such as the text items. and charts. scroll up. and hyperlinks (Figure 7-8). and go to the top and to the bottom of the report pages without having to run the report (Figure 7-9). blocks. such as lists. labels. create new columns with calculations. Figure 7-8 Toolbox objects 7.Toolbox tab This tab shows objects that allow users to display data.1. crosstabs.4 Page navigation The icons in this page navigation area become enabled if the report retrieves more than one page. Large reports: Do not include large reports in dashboards (IBM Cognos Business Insight workspace). These icons allow users to scroll down. images. Figure 7-9 Page navigation on first page of report 226 IBM Cognos Business Intelligence V10. and improve the layout. If the Page Preview in the View menu is enabled. such as lists.6 Properties pane This pane displays the formatting options that are available for a selected object in a report. crosstab. one of the following conditions was detected: An unknown currency A value with an unknown or questionable unit of measure.1. to change the background of the rows inside a crosstab.7. crosstabs. What to do if you see an asterisk (*) character: The following behavior can happen when you use IBM Cognos Transformer cubes or SAP Business Warehouse (BW) data sources. or chart. for example. Ancestor button The Properties pane has a icon called Ancestor.5 Work area This area contains all the objects that are dropped on the report.1. this area shows live data and the user can interact with it. such as separate currencies in the calculation or roll-up 7. charts. Chapter 7. Self service interface for business users 227 . this area does not show live data. which allows users to select any part of a selected object. If you see an asterisk character (*) in a list. and layout components. If Page Design is enabled. You typically use this icon for layout purposes. this feature is useful when you need to find an object inside another object. a crosstab inside a table. Figure 7-10 shows the display in the Ancestor properties if the user selects a crosstab cell. Figure 7-10 Ancestor properties Also. for example.When you select one object and then select the Ancestor icon. 228 IBM Cognos Business Intelligence V10.1 Handbook . all levels above the selected object displays. swap rows and columns. such as Insert Children. and delete commands View: Switch between Page Design and Page Preview. add headers and footers to reports. Microsoft Excel. Explore.Toolbar and menu The Business Insight Advanced interface shows a toolbar with shortcuts for commonly used features. and convert lists to pivots. enable and disable toolbars and visual aids. This interface also displays a menu at the top of the window that allows users to configure more advanced features. PDF configuration. create calculations. change summarization criteria. paste. Figure 7-11 Top toolbar menu The following list describes several of the options for each of the menu items: Blue bullet (upper-left corner): Create. suppress data. such as the interface behavior (Figure 7-11). and XML Tools: Allow Cognos to check the report’s specification. manage external data. Self service interface for business users 229 . show and copy the specification. CVS. and Drill options Style: Set styles and conditional formatting to objects Run: Allow users to run the report in various output types: HTML. and report properties Edit: Cut. copy. and save reports. and configure the number of rows that is displayed on the Work area when Page Preview is set Structure: Set group configuration. and configure advanced options of the interface behavior Chapter 7. PDF. Data: Set configurations to filter. and show dimensional analysis features. sort. open. To make this possible and easy. The reporting style determines how to insert. When choosing the reporting style. For more information about leading practices when using relational or dimensional reporting styles. refer to the Relational Reporting Style and Dimensional Reporting Style sections in the IBM Cognos Report Studio User Guide. Lynn knows that there is one chart inside the IBM Cognos workspace of the Great Outdoors company that already displays the return quantity by product lines. sort. Resource information: You can use the relational reporting style even when you create reports that are based on a dimensional data source. it is imperative that they choose the reporting style that they will adopt in working with data: relational or dimensional. Lynn decides to use this existing report as a base for her analysis. needs to analyze which product lines result in the greatest number of returns so that the GO Americas management can focus on these product lines to decrease the number of returns. use dimensional reporting style. an Advanced Business User of a GO Americas subsidiary. Do you think about your data as a number of dimensions intersecting at cells? If yes. the IBM Cognos interface provides a seamless integration between the IBM Cognos Business Insight and IBM Cognos Business Insight Advanced products.2 Choose a reporting style Before users start authoring reports.7.1 Handbook .3 Change existing reports Lynn Cope. Mixing both reporting styles in one report can cause unpredictable results. 230 IBM Cognos Business Intelligence V10. 7. users must answer the following questions: Do you think about your data as tables and columns? If yes. filter. and customize reports. use relational reporting style. So. Open the IBM Cognos workspace of Great Outdoors by clicking My Folders Business Insight GO Sales Dashboard_6. Lynn follows these steps: 1. Find the chart for which she is looking. Self service interface for business users 231 .Using this integrated approach. Chapter 7. and click Do more on the top of the report’s frame (Figure 7-12).4 on IBM Cognos Connection. the IBM Cognos Business Insight Advanced interface replaces the IBM Cognos Business Insight interface and shows the selected report. 2.3. Figure 7-12 Business Insight and Business Insight Advanced integration: Modifying an existing report After Lynn clicks Do more. To execute this task: 1.3.1 Sort data With the IBM Cognos Business Insight Advanced interface opens. Lynn makes improvements to the report to meet her needs.7. Click in the chart area to see the chart components (see Figure 7-13). Figure 7-13 Selecting the chart area 232 IBM Cognos Business Intelligence V10.1 Handbook . she changes the sorting configuration for the chart to allow her to see the product lines in the chart sorted by the return quantity of their products. First. ). Click Intersection (tuple). 5. Figure 7-14 Advanced Layout Sorting option: Set Sorting window Chapter 7. Click Product line in the Series area (Figure 7-14). as shown in Figure 7-14. In the Sort type section.. which opens a window that allows you to insert a tuple. Self service interface for business users 233 .2. click Sort. 3. and click the ellipsis (. 4. click Descending. On the top toolbar. and then click Edit Layout Sorting.. Click GO Data Warehouse (analysis) Sales and Marketing (analysis) Returned items Returned items (Figure 7-15).6. Figure 7-15 GO Data Warehouse package tree: Expanding Returned items folder 234 IBM Cognos Business Intelligence V10.1 Handbook . 9. Click the Return Quantity data item under the Returned items metrics folder. Click OK. The Set Sorting window opens again. Chapter 7. Figure 7-16 After the Return quantity member has been added 8. Self service interface for business users 235 .7. and drag it onto the Intersection members and measures area (Figure 7-16). Click OK to close the Set Sorting window. Lynn determines that Outdoors Protection is the product line that has the worst performance in terms of the return quantity of all Great Outdoors subsidiaries.1 Handbook .After executing these steps. Figure 7-17 Report after sorting has been performed 236 IBM Cognos Business Intelligence V10. as shown in Figure 7-17. Navigate to GO Data Warehouse (analysis) Sales and Marketing (analysis) Sales Organization (Figure 7-18). Self service interface for business users 237 . Using Context filters Because Lynn is working with a dimensional data model.2 Filter data To meet her business needs.7. Figure 7-18 Adding a Context filter Chapter 7.3. she can easily filter her data using the Context filter feature by following these steps: 1. Click GO Americas under the Organization dimension. Lynn needs to filter the report to display only GO Americas and 2007 (current year) totals. 2. and then drag it onto the Context filter area. To have the best insight about the return quantity for the current scenario. 2006. To achieve this result. 2. the performance of the Outdoors Protection product line and the performance of the Camping Equipment product line in terms of return quantity are extremely close. Lynn notices that. 2005. Navigate to GO Data Warehouse (analysis) Sales and Marketing (analysis) Sales.1 Handbook .After performing these steps. Drag 2007 under the Year dimension to the Context filter area. as shown in Figure 7-19. 238 IBM Cognos Business Intelligence V10. Lynn needs to filter the report to show only the data for the current year (2007). in fact. she follows the same steps to apply another Context filter for 2007 (Figure 7-20): 1. and 2007). Figure 7-19 Report after GO Americas Context filter is applied The current report shows the total of Return Items for all of the years (2004. the Camping Equipment product line. only one product line. Chapter 7. Self service interface for business users 239 . Lynn can determine that. has an extremely high number of returns. in fact.Figure 7-20 Report after 2007 Context filter is applied Now. 1 Handbook . Lynn can create this calculation easily by using the Query Calculation object in the Insert Objects pane. refer to the IBM Cognos Business Insight Advantage User Guide. a Product line with a high number of returns for its products does not necessarily mean a large percentage of returns based on the number of products sold for the product line. Click Query Calculation inside the Insert Objects pane. Drag this object to the same place as the Return quantity metric .7.3. type % of Items Return. Measures: To create this calculation. Click Calculated measure. Lynn needs to calculate the percentage of returns against the number of products sold.3 Perform calculations If we think about the business problem. as shown in the following steps: 1. 3. as shown in the Figure 7-21 on page 241. 2. For more information about how to use the Measure Dimension.Default measure (y-axis). use the following measures: One measure from the Sales folder One measure from the Returned Items folder Do not set the Measure Dimension. To find more meaningful information. 240 IBM Cognos Business Intelligence V10. In the Name field. Self service interface for business users 241 .Figure 7-21 Creating a query calculation Chapter 7. Open the Data Items tab. Figure 7-22 Inserting a member from the Data items tab into Expression Definition 242 IBM Cognos Business Intelligence V10. Drag the [Return quantity1] measure to the Expression Definition area (see Figure 7-22).1 Handbook .4. 5. Open the Function tab. and drag the forward slash character (/) into the Expression Definition area (Figure 7-23). Figure 7-23 Inserting operator into Expression Definition Chapter 7. expand the Operators folder. Self service interface for business users 243 . 1 Handbook . and navigate to Go Data Warehouse (analysis) Sales and Marketing (analysis) Sales Sales fact. Figure 7-24 Inserting [Quantity] item into Expression Definition 244 IBM Cognos Business Intelligence V10.6. 7. Drag [Quantity] to the Expression Definition (see Figure 7-24). Open the Source tab. click the Validate icon at the top of the window (see Figure 7-25 and Figure 7-26). Self service interface for business users 245 . Figure 7-25 Starting Expression Definition validation Chapter 7. To validate the expression.8. Figure 7-26 Validation results 246 IBM Cognos Business Intelligence V10.1 Handbook . . click the ellipsis (. click Return quantity. click the Sort icon. Self service interface for business users 247 .8% of its items returned (see Figure 7-27). Lynn realizes that the sorting is not working as expected. Click the left arrow. Figure 7-27 Report with the new percent of Returned items metric After performing these steps. 4. 6. On the top toolbar. 7. 2. Chapter 7. and then click Edit Set Sorting. To solve this issue.). Click Product line in the Series area. 5. she follows these steps: 1. Lynn determines that the Camping Equipment product line has 1. Under the Intersection (tuple). 3. In Intersection members and measures.. Click % of Returned items. Click the Calculate members and measures tab.After these changes. Click the right arrow (see Figure 7-28).1 Handbook .Click OK to close the Set Sorting window. 248 IBM Cognos Business Intelligence V10.8. Click OK to close the Members window. 10. Figure 7-28 Members window after the Return quantity member has been removed 9. Self service interface for business users 249 . Figure 7-29 Report after sorting change to percent of Returned items Chapter 7.After performing these steps. the chart shows the bars in the correct order (see Figure 7-29). 3.1 Handbook . To drill down into the data. Figure 7-30 Drill down on the product line 250 IBM Cognos Business Intelligence V10.4 Set the right level of detail for the analysis To complete her analysis. and the report is updated to show the product types (see Figure 7-30). now Lynn needs to discover which brands have the highest percentage of returned items. She uses the drill-down and drill-up features as follows: 1. double-click Camping Equipment.7. Lynn is satisfied with the results. Chapter 7. On the Set Sorting window. double-click again on the Lanterns product type (see Figure 7-31).2. On the top toolbar. Self service interface for business users 251 . b. e. d. click Descending. click the <#children(Lanterns)#> data expression. c. click the Sort icon. In the Series section. Click in the chart area. After this action. After this action. To fix the sorting (as shown in Figure 7-32 on page 252): a. Figure 7-31 Drill down on the product type 3. Click Edit Set Sorting. but she needs to fix the sorting of the report. Click Intersection (tuple). k. click the ellipsis (. Click the right arrow.). i. Click % of Returned items. Click OK to close the Members window.. Click OK to close the Set Sorting window. Figure 7-32 Set Sorting properties for percent of Returned items 252 IBM Cognos Business Intelligence V10. To the right of the Intersection (tuple) field. l.. Click the Calculated members and measures tab. g. j.f.1 Handbook . h. ordered by percent of Returned items 7. Chapter 7.After performing these steps. Figure 7-33 Report after drilling down. Lynn has a report that shows the products that have a higher percentage of returned items (Figure 7-33). Self service interface for business users 253 . needs to create two reports that answer the following questions: Are we selling the right products? How does this year’s performance compare with the prior year’s performance? Lynn inserts these reports in the Great Outdoors company workspace.4 Create content Now. an Advanced Business User of the GO Americas subsidiary. Lynn Cope. 4. 3. Navigate to Cognos Public Folders Samples Models.7. 2. To create this report. Lynn uses IBM Cognos Business Insight Advanced and follows these steps: 1. The Select a package window opens. Figure 7-34 Opening IBM Cognos Business Insight Advanced from IBM Cognos Connection 254 IBM Cognos Business Intelligence V10. In IBM Cognos Connection.1 Handbook . launch Business Insight Advanced (see Figure 7-34).1 Create a crosstab To answer the first question. Lynn decides to create a list that shows the bottom ten product sales by region. Click GO Data Warehouse (analysis) to create a report that is based on this package. Figure 7-35 Welcome window of IBM Cognos Business Insight Advanced Chapter 7. Self service interface for business users 255 .4. Click Create new to create a report (Figure 7-35). 1 Handbook . Crosstab.5. or Financial report type. 256 IBM Cognos Business Intelligence V10. Figure 7-36 Default report types on IBM Cognos Business Insight Advanced Flexibility: Even if a you initially selected a List. crosstabs. and lists on the report. you can include other charts. IBM Cognos Business Insight Advanced provides a flexible approach to develop reports. Chart. Click the Crosstab report type (Figure 7-36). First. Self service interface for business users 257 . double-click Double-click to edit text (Figure 7-37).6. Figure 7-37 Inserting a report name Chapter 7. To insert the text. rename the text header to Bottom 10 product sales by region. In the Insertable Objects pane.Drag the Product level to the Rows area. On the Insertable Objects pane.1 Handbook . navigate to Go Data Warehouse (analysis) Sales and Marketing (analysis) Sales Sales fact. Drag the Quantity metric under Sales Fact to the Columns area. 11. navigate to Go Data Warehouse (analysis) Sales and Marketing (analysis) Sales Products. 10.7. Figure 7-38 Switch to View Metadata Tree 8. On the Insertable Objects pane. 258 IBM Cognos Business Intelligence V10. 9. click View Metadata Tree to see the data model structure instead of live data (Figure 7-38). After performing these steps. Chapter 7. Lynn has a list of all products with their quantities (Figure 7-39). 13.Click any product in the rows. Self service interface for business users 259 .Click the Explore icon of the toolbar. Figure 7-39 Crosstab after adding columns and rows 12. Figure 7-40 Using Bottom 10 feature 260 IBM Cognos Business Intelligence V10.1 Handbook .Click Top or Bottom. and then click Bottom 10 based on Quantity (Figure 7-40).14. 6. To include accessibility features: 1. or metrics) area.After performing these steps. Figure 7-41 Report after Bottom 10 function has been applied Including accessibility features Now. Lynn is able to see the bottom 10 performing products (Figure 7-41). Click Crosstab. rows. Self service interface for business users 261 . Chapter 7. Lynn wants to insert a summary text item to be used by screen readers for the crosstab. she can add the text for objects using the Summary text property. Using the acessibility features of IBM Cognos Business Intelligence Advanced. 3.. 4.. Click anywhere in the crosstab (columns. 5.). Click Specified text. 2. Click the ellipsis (. Click the Ancestor icon. Click the Summary text property. 2 Create a chart Lynn needs too answer the second question asked earlier: How does the performance of this year compare with the prior year? She decides to create a chart that shows a line chart.7. and then insert the summary text for the chosen language (Figure 7-42): – Default text: Bottom 10 product sales by region – Spanish text: Los 10 productos menos vendidos por region Figure 7-42 Adding localized text for internationalization Now. 262 IBM Cognos Business Intelligence V10. launch Business Insight Advanced. To create this report. If you want to insert summarization text for multiple languages. Lynn can save this report to use it in the Great Outdoors company workspace in IBM Cognos Business Insight Advanced. click Add. Navigate to Cognos Public Folders Samples Models. 7. which compares historic information from the current year (2007) and the prior year (2006).4. select the language.1 Handbook . 2. insert the summarization text. In the Default text field. Lynn uses IBM Cognos Business Insight Advanced to access a relational data source of Great Outdoors data and follows these steps: 1. The Select a package window opens. In IBM Cognos Connection. Click GO Data Warehouse (query) to create a report that is based on this package. click Line. Figure 7-43 Creating a chart that is based on a list 9. Click the List report type. On the top toolbar. Drag the following items to the list: a. In the Insert Chart window. 8. Click in one column of the list. in the left pane. 6. Click Create New to create a report. Go Data Warehouse (query) Sales and Marketing (query) Sales Sales fact Revenue 7. 4. click Insert Chart (Figure 7-43). Chapter 7.3. 5. Go Data Warehouse (query) Sales and Marketing (query) Sales Time Month b. Self service interface for business users 263 . 11. 13.1 Handbook .10. Figure 7-44 Selecting a chart type 12. click Ancestor.Click OK. click Clustered Line with Circle Markers (Figure 7-44).On the top menu bar.In the right pane. navigate to Edit. Figure 7-45 Deleting option 264 IBM Cognos Business Intelligence V10. and in the Properties pane. and click Delete (Figure 7-45).Click in the list. Drag the Revenue metric from Default measure (y-axis) to Series (primary axis). Figure 7-46 Move Revenue metric from Default measure (y-axis) to Series (primary axis) Chapter 7.14. as shown on Figure 7-46. Self service interface for business users 265 . and click OK. 9. Sales target) metric 5.Numeric Range window. Click one of the values in the % (Revenue. as shown on Figure 7-65. 4. Chapter 7. Click Add in the lower-left corner of that window. Click Add. in the Name field. Lynn follows these steps: 1. Figure 7-65 Setting a new conditional style for % (Revenue. and then on the top menu. Sales target). click the Add icon. click Style Conditional Styles (Figure 7-65). 7. click % (Revenue. 8.To implement this conditional formatting. 3. type % target. Sales target) column. In the Conditional Styles window. Type 100%. Self service interface for business users 279 . Click New Conditional Style. 6. and click OK. 2. Type 90%. In the Conditional Style . In the New Conditional Style window. Type 120%.Click OK twice to exit the Conditional Styles windows. click the pencil icon on the right side of the style drop-down list box. as shown in Figure 7-66.Click Add. 11. To change the style. and click OK.1 Handbook .Change the values to the drop-down list box options that are displayed in the Style column. 280 IBM Cognos Business Intelligence V10.10. 12. Condition style options: Users can use the pre-built styles or create their own styles for a condition. Figure 7-66 Add intervals to a Conditional Style 13. After Lynn performs these steps. Figure 7-68 Changing the label of a column Chapter 7. type % of target. Lynn wants to change the label of the new percentage columns. Right-click the column and click Edit Data Item Label (Figure 7-68). Self service interface for business users 281 . the report displays. She follows these steps for the percent columns under the quarters and the total columns: 1. In the Data item name field. 2. as shown in Figure 7-67. Repeat these steps for the calculation under the 2007 column. Figure 7-67 Example of one Product line’s values after applying a conditional style To improve the readability of the report. To separate the information for each subsidiary. 282 IBM Cognos Business Intelligence V10. she drags the Organization member to the Page layers area.Now. Figure 7-69 Adding a member on the Page layers area Finally. Lynn needs to deliver this report to the six Great Outdoors subsidiaries with a clear separation between the performance of each region. she renames the report to Sales Revenue x Target.1 Handbook . as shown on Figure 7-69. After all these steps. Figure 7-70 Report to be delivered to GO Accessories subsidiaries Figure 7-71 Report to be delivered to GO Americas subsidiaries 7. Chapter 7. Lynn Cope. Self service interface for business users 283 .4 Analyze the execution query path The Lineage feature of IBM Cognos makes it easy for report authors and business analysts to examine the origin of the data that is used in the reports and their query paths. She uses the Lineage feature to help her identify what calculation was applied to create the metric and if there is a filter applied for it.4. an Advanced Business User. The Select a package window opens. Lineage feature: You can use the Lineage feature when executing a report on IBM Cognos Viewer. In IBM Cognos Connection. launch Business Insight Advanced. To analyze the execution query path: 1. Lynn can deliver reports comparing the current revenue and sales targets for 2007 for each subsidiary (Figure 7-70 and Figure 7-71). wants to understand how the Planned Revenue metric is calculated. 6. 4. Figure 7-72 Selecting the Lineage feature 284 IBM Cognos Business Intelligence V10. 3. and then click in List. In the Insertable Objects pane. Click Lineage (Figure 7-72). 5. Click GO Data Warehouse (analysis) to create a new report that is based on this dimensional package.2.1 Handbook . Navigate to Cognos Public Folders Samples Models. navigate to Go Data Warehouse (analysis) Sales and Marketing (analysis) Sales Sales fact. Click Create New to create a new report. and then right-click Planned Revenue. With this view. The Technical View tab shows detailed metadata of the data item. Chapter 7. Figure 7-74 Lineage: Technical View On the Technical View. users can click each item in the diagram to see its metadata and definition. Click the Technical View tab. Self service interface for business users 285 . In this view. Figure 7-73 Lineage: Business View window 7. you can see an overview of the data’s definition (Figure 7-73).The Business View window opens. advanced business users and professional report authors can analyze the filters and calculations that are applied to the data (see Figure 7-74). 286 IBM Cognos Business Intelligence V10. All of these formats are available in IBM Cognos Business Insight Advanced. an Analyst for the Great Outdoors company.4. Microsoft Excel 2002. PDF. Microsoft Excel 2007. such as HTML. Figure 7-75 Lineage: Planned revenue formula 7. and XML. Ben Hall.5 Render output in various formats and print content IBM Cognos supports various types of output formats. wants to export Microsoft Excel and PDF formats for the Sales Revenue x Target report that Lynn Cope created. delimited text (CSV).1 Handbook .Clicking the Planned revenue metric. Lynn notices that it is calculated based on the formula Unit price * Quantity (see Figure 7-75). Figure 7-77 Report rendered in Microsoft Excel: First page Chapter 7.Render in Microsoft Excel format To render the report in Microsoft Excel format. on the top menu. click Run Run Report . Self service interface for business users 287 .Excel 2007 (see Figure 7-76). Figure 7-76 Selecting Run option IBM Cognos generates a new Excel file. with the same name as the report and splits the content of the pages into tabs in Microsoft Excel (Figure 7-77 and Figure 7-78).. 288 IBM Cognos Business Intelligence V10.1 Handbook . such as IBM Rational® ClearCase®.Figure 7-78 Report rendered in Microsoft Excel: Second page Render in PDF format To render the report in PDF format. click Run Run Report . To enable (Local) Save As for IBM Cognos Business Insight Advanced. Select the “Allow local file access” option. Figure 7-80 Saving a report locally Feature requirements To save and open reports locally. 8. set your computer and the IBM Cognos Business Insight server as trusted sites. 5. Close and restart IBM Cognos Business Insight Advanced. 7. 6.dll file by typing the following command: regsvr32 LFA. 3. Register the LFA.dll on Microsoft Windows. The menu items (Local) Open and (Local) Save As displays in the File menu. and then click OK. In your browser. click the blue bullet on the top menu. Open a command prompt window to the location of the LFA. Click the Advanced tab.To save a report.dll file. follow these steps: 1. Obtain the LFA. In IBM Cognos Business Insight Advanced. Self service interface for business users 289 . and click (Local) Save As (see Figure 7-80). Chapter 7. 2.dll from your IBM Cognos Business Insight administrator. click Options. from the Tools menu. The dynamic link library (DLL) is located in the bin directory where IBM Cognos Business Insight is installed. users must register the LFA.dll 4. so she uses the Search option in IBM Cognos Business Insight Advanced to find them. and revenue figures for all Seeker products in their portfolio. product cost. The senior managers need this information for their meeting with the manufacturer of these products. Lynn Cope. Click Crosstab. perform a search on Product dimension to find the Seeker products. 7. you must enable ActiveX in your browser.1 Handbook . 290 IBM Cognos Business Intelligence V10. To use this feature. On the Source tab. To use the Search option to find meaningful information: 1.5 Search for meaningful information For dimensional data sources. open the GO Sales Cube package. and Revenue (press Ctrl to select all members). and then click OK. the Advanced Business User for the Great Outdoors company. Lynn is unsure to which product line these products belong. online analytical processing (OLAP) data sources.Internet Explorer: This feature is supported only for Internet Explorer. Now. and then select Quantity sold. Profit margin %. If you have problems running this feature. Launch Business Insight Advanced. you can perform a member search in IBM Cognos Business Insight Advanced to find the data that you need for your report quickly. 2. Drag the selected items to the Columns area of the crosstab. and then click Create New. 4. Product cost. check the ActiveX configuration for your browser. has to create a report for senior management that contains quantity. profit margin. because it is based on ActiveX technology. 3. and dimensionally modeled relational (DMR) data sources. navigate to GO Sales Cube Measures. Right-click the Products dimension. Self service interface for business users 291 .5. as shown in Figure 7-81. and click Search. Figure 7-81 Search option on a menu Chapter 7. 6. Figure 7-83 Results of the search You can browse the hierarchy to explore members at lower levels. In the Member Search window. but click Search all descendants to include searching on all levels of the Product dimension (see Figure 7-82). Figure 7-82 Search options 7. enter the keyword Seeker. 292 IBM Cognos Business Intelligence V10. Click Search. The new Search tab opens with the results of the search. or you can directly add members from the Search tab to a report. as shown in Figure 7-83. Leave the option Starts with any of these keywords selected.1 Handbook . as shown in Figure 7-84. Select all members (press Ctrl). you can search quickly and insert them from here. 7. despite it. Nonetheless. follow these steps: 1. You save time with this method. 2. Chapter 7.6 Summarize data and create calculations IBM Cognos Business Insight Advanced provides a range of summarization functions and calculations that can be applied to reports to help advanced business users get the best insight from their data. and drag them to the Rows area. Self service interface for business users 293 . To apply a summarization function.1 Summarization IBM Cognos Business Insight Advanced provides the following summarization functions to users: Total Count Average Minimum Maximum The first calculation applied depends on what is set on the data model.6. because instead of inserting all of the products into a report and adding a filter. users can create new summarized columns and rows using these functions if it makes sense to them. Click one member of a set or data item (depending on the type of data source that you use) to create a summarization column or row. On the top toolbar. click the Summarize icon.8. Figure 7-84 Report containing results of the search 7. The end report displays. Click the desired summarization function (Figure 7-85). Figure 7-86 Report after an Average summarization function is applied 294 IBM Cognos Business Intelligence V10.1 Handbook . a new column is created on the right side of the crosstab with the Average title (Figure 7-86).3. Figure 7-85 Inserting a summarization column After you follow these steps. Round. IBM Cognos Business Insight Advanced allows users to deal easily with strings and remove blank spaces (remove trailing spaces). Round up. Figure 7-87 Create Sets for Members option 7. Several of these calculations require a number value if the calculation involves one measure only. users can apply a range of calculations. Several of the calculations that are available for relational and dimensional data sources differ. Chapter 7. the summarization functions are applied to the nodes of the crosstabs.6.Create reports using a dimensional data source Reports that are based on a dimensional data source always apply summarization to sets. and division of a column. such as addition. percentage. charts. If the user does not turn on the Create Sets for Members option in the Insertable Objects pane (Figure 7-87). Calculations available for relational data sources When using a relational data source. the user is unable to insert additional summarization columns and rows. multiplication. Absolute. Last ? characters). and difference. and to the entire list. If the columns or rows are measure items. subtraction. In the case of relational data sources. Round down. Self service interface for business users 295 . The number can be provided when the user clicks the Custom option. as well as truncate blank spaces based on a number of characters (First ? characters.2 Calculation IBM Cognos Business Insight Advanced provides several calculations for users. which is an advantage for the dimensional approach. subtraction. percent. Several of these calculations need a number value. multiplication. Figure 7-88 List report showing truncate.Figure 7-88 and Figure 7-89 show examples of applied calculations. IBM Cognos Business Insight Advanced provides a capability to perform calculations across rows and columns. users can apply a range of calculations. percentage. If the columns or rows are a measure.1 Handbook . 296 IBM Cognos Business Intelligence V10. IBM Cognos Business Insight Advanced does not display the calculations for string. and division of a column. and difference. which is set when the user clicks the Custom option. Users can calculate the percent of the difference between the first product line in terms of revenue and all other product lines easily. When using dimensional data sources. such as addition. and round calculations Figure 7-89 Crosstab report showing addition calculation Calculations available for dimensional data sources When using dimensional data sources. Figure 7-92 Simple report Chapter 7. wants to make a quick comparison between the top product type in the Personal Accessories product line and the other product types in the same line using a dimensional data source. and subtraction calculations Example Lynn Cope. To create a percent of base calculation. Personal Accessories) calculation Figure 7-91 Percent difference (Planned revenue. Self service interface for business users 297 . Create a simple report that groups Revenue by Product types under the Personal Accessories product line using a crosstab (Figure 7-92). Revenue). division. an Advanced Business User of the Great Outdoors company.Figure 7-90 and Figure 7-91 show examples of how to work with the calculations. she follows these steps: 1. Figure 7-90 Revenue percent of Base (Revenue. 1 Handbook . 298 IBM Cognos Business Intelligence V10. Click the Revenue measure and press Ctrl. Click the Revenue measure.2. 4. On the top toolbar. 3. Figure 7-93 Sorting the Revenue column in descending order 5. click the Sort icon. Click Descending (Figure 7-93). right-click one of the selected items. Click the first member of the Rows area (Eyewear). refer to the IBM Cognos Business Insight Advanced User Guide. Lynn can see the percent of the Revenue of all product types against the Eyewear revenue (Figure 7-95). click Calculate. Self service interface for business users 299 . Eyewear). Figure 7-94 Creating a percent of Base calculation After performing these steps.6. Figure 7-95 Percent of Revenue of all types against Eyewear type Revenue Resource: For more information about how to work with calculations. Chapter 7. as shown in Figure 7-94. and then click % of Base (Revenue. and analysts must understand how to use filters. refer to the Focusing Relational Data and Focusing Dimensional Data sections of the IBM Cognos Report Studio Guide. To apply a filter before or after auto aggregation. provide accurate information. Resource: For more information about leading practices on filtering. and avoid unpredictable results. report authors.7. which is based on a relational data source. open the Edit Filters dialog box. Also. This section describes the behavior differences between the two data source types. 7. Figure 7-96 Creating a filter in a report that is based on a relational data source 300 IBM Cognos Business Intelligence V10.7.1 Handbook . Summary and detailed filters When creating a report. users can filter the data that is retrieved in the queries and apply the filter before or after auto aggregation. they must understand the differences when a filter is applied in a report that uses dimensional data sources as opposed to relational data sources.1 Filter reports for relational data sources Consider the following points when filtering reports for relational data sources. and make the appropriate selection in the Application section (see Figure 7-96). advanced business users.7 Add filters to refine data To create reports that meet clients’ expectations. as illustrated in Figure 7-97. For example. Include Null and Exclude Null: Include or exclude null values for the selected column. and select OR. and NOT expressions with parentheses. Self service interface for business users 301 . or exclude the selection from the results. y and Exclude x. Chapter 7. Filtering features You can use the Filter menu (shown in Figure 7-98 on page 302) to create filter expressions easily. or NOT. y: Focus on data that is based on the selection. the following list shows several commonly used filter expressions: Include x.Combined filters A complex filter is a combination of two or more filters creating AND or OR logic. Greater than (>). AND. or Greater than (>) or Equal (=) a specific value. OR. Greater and Lower: Retrieve data that is Lower than (<). Lower than (<) or Equal (=). click the expressions that you want to place inside the parentheses with the Shift key pressed. Between x and y and Not Between x and y: Retrieve data that is between or not between selected values. With this feature. advanced business users can create advanced filtering expressions easily. Figure 7-97 Complex filtering expression created using Combined Filter feature Expressions: To create AND. When working with dimensional data sources. which is based on a dimensional data source.7. Data is retrieved from the database only if it meets the filter criteria. you can filter only by members and measures.1 Handbook .Figure 7-98 Filter features menu 7. When creating a report. 302 IBM Cognos Business Intelligence V10.2 Filter reports for dimensional data sources Use filters to remove unwanted data from reports.. allowing the user to summarize and create calculations with the data. a new set is created for the selection of members. Chapter 7. Self service interface for business users 303 . View Member Tree option: Using the View Member Tree on the Insertable Objects pane toolbar is a quick option to focus the data that the users want to see. To specify a member. as shown in Figure 7-99. or chart). If the users know what they want to see and will always use the same set. they need to choose this option.Focus reports using members You can specify the members who you want to see in a report using the View Member Tree on the Insertable Objects pane toolbar. Figure 7-99 Inserting members in a crosstab Create Sets for Members option: If the Create Sets for Members option is enabled. crosstab. the user clicks one or more members of a dimension and drags them to the report object (list. you can select the kind of filter that you want to apply. In this window. which is not indexed data Intersection: Filter by an intersection of members and metrics (tuple) that you define 304 IBM Cognos Business Intelligence V10. which is indexed data Property: Filter by a descriptive data value. Figure 7-100 Applying a filter within a Set You have the following options for filtering: Caption: Filter by the member caption value.Applying filters to members within a set Filters on dimensional reports need to be applied to a Set of members. On the top toolbar. 3. 2. Figure 7-100 shows the Set Filter Condition window. click Explore.1 Handbook . Click the Set that you want to filter. Click Filter Set. Filtering the members in a Set is not the same as relational detail or summary filters. To apply filters in a Set: 1. It does not limit or change the items in the rows or columns. you drag Asia Pacific and web from the source tree to the Context filter section of the overview area. To change the context. Figure 7-101 Visualizing the Set Definition Context filters When working with dimensional data. A context filter does not remove members from a report. Self service interface for business users 305 . the following crosstab contains product lines in the rows. their values are filtered. members that do not meet the filter criteria are removed from the report. you can use context filters. Any summary values in the report are recomputed to reflect the results that are returned by the context filter.After applying a filter. to focus your report on a particular view of the data quickly. years in the columns. and you see blank cells. Chapter 7. Instead. For example. When you filter data. Context filters: Context filters differ from other filters. you can verify that the filter logic was applied or you can change the logic that was applied by clicking Explorer Edit Set (see Figure 7-101). and revenue as the measure. We want to filter the values to show us the revenue for only web orders from Asia Pacific. The members that are used as the context filter appear in the report header when you run the report. or slicer filters. Changing the context changes only the values that appear. The crosstab then shows the revenue for only Asia Pacific and web. Guideline: When creating context filters. Exclude and Include Member: Exclude members from current set or initial set Drill down and drill up: Display parents or children of the selected valued in the dimension hierarchy If the set definition has more than one level.1 Handbook . Explore features IBM Cognos Business Insight Advanced also provides several ways to filter dimensional data using the Explore button: Top or Bottom filters: Focus data on the items of greatest significance to your business question (for example. Figure 7-102 Crosstab with a Top 3 filter applied If you exclude a member from the initial set. and use only one member per hierarchy. consider a crosstab with a Top 3 filter applied (Figure 7-102). Figure 7-103 Exclude a member from the initial set 306 IBM Cognos Business Intelligence V10. the crosstab applies the Top 3 filter again and excludes the selected member (Figure 7-103). Top 5 Sales’ Performers or Bottom 10 Clients’ Revenue). for instance. use only members from hierarchies that are not already projected on an edge of the crosstab. If you exclude a member from the current set. To implement this logic. they can create customized expressions to filter members on reports. who is a Professional Report Author. Self service interface for business users 307 . Figure 7-105 Initial result for the report: Revenue by Product line for 2007 Chapter 7. the Top 3 filter is kept. Lynn Cope.000 (this condition hides Outdoor Protection from the results).000. and the crosstab shows only two values on the edge on which the Exclude logic was applied (Figure 7-104). For example. wants to filter a crosstab to show only the Product lines that have Revenue greater than USD5. Lynn must replace the default row or column with a new expression. Figure 7-105 shows the report. Figure 7-104 Exclude a member from the current set Using custom filters When report developers need to create complicated logic for filtering in a dimensional data source. Click OK. select Other expression. 3.Lynn follows these steps: 1.[Products]. Figure 7-106 Creating a filter expression 308 IBM Cognos Business Intelligence V10. type the following expression: filter([Sales (analysis)].[Product line]. In the Expression Definition section.1 Handbook . and then click OK. In the Insertable Objects pane. In the Name field. on the Toolbox tab. [Revenue] > 5000000) 4.[Products]. type Filtered Product line. as shown in Figure 7-106. 2. drag Query Calculation to the same place as Product line (Rows area). Chapter 7. Lynn notices that the Outdoor Protection product line is removed from the results (Figure 7-107).After performing these steps. the user notices that there are many rows with no values on the report.3 Suppress data When a user works with dimensional data sources and creates an analysis nesting dimensions (in a crosstab or chart). Self service interface for business users 309 . even if they do not have values for the metrics. When working with dimensional data sources.7. IBM Cognos returns all the members of the hierarchy. Figure 7-107 Final result for the report: Revenue by Product line for 2007 7. as shown in Figure 7-108 and Figure 7-109. Figure 7-108 Report without the Suppress data feature applied 310 IBM Cognos Business Intelligence V10. IBM Cognos Business Insight Advanced provides the Suppress data feature that hides all the rows or columns (or both) that do not have data for the intersections.To avoid this scenario.1 Handbook . and for GO Americas only. 7. 4.4 Example Lynn Cope. Self service interface for business users 311 . calculations are always performed before the suppression. Navigate to Cognos Public Folders Samples Models. 2. Suppress feature: When using the Suppress feature. Click GO Data Warehouse (analysis) to create a new report that is based on this package. launch Business Insight Advanced. Chapter 7. for 2007 and 2006.7. To create this report: 1.Figure 7-109 Report with the Suppress data feature applied The rows with all null values are removed. an Advanced Business User for the Great Outdoors company. The Select a package window opens. wants to create a report to show data for the Camping Equipment Product line. In IBM Cognos Connection. Click Create New to create a new report. 3. and then click the Crosstab icon. Drag Time under the Sales folder to the Columns area.1 Handbook . and click 2007. Drag Revenue under Sales fact to the Measures area (Figure 7-110). 10. click the Filters icon. 11. In the Insertable Objects pane. 6.Click Include 2006. 7. 2007 (Figure 7-111). press Ctrl. Click 2006. navigate to Go Data Warehouse (analysis) Sales and Marketing (analysis) Sales Products. Figure 7-111 Filtering a report based on a selection 312 IBM Cognos Business Intelligence V10.5. Figure 7-110 Initial report showing the Revenue for all Camping Equipment members by year 9. 8.On the top toolbar. Drag Camping Equipment under Products to the Rows area. Self service interface for business users 313 .After performing these steps. the report is displayed with the Revenue totals for 2006 and 2007 grouped by Camping Equipment product types (Figure 7-112). Figure 7-113 Final report filtered for GO Americas scenario Resource: For more information about how to work with multiple types of filters. 2006 and 2007 years only Lynn decides to slice the report for GO Americas. but Lynn wants to filter this report to show information for GO Americas only. refer to the IBM Cognos Business Insight User Guide or contact IBM Cognos Education services. as shown in Figure 7-113. Chapter 7. by creating a Context filter. Figure 7-112 Revenue by Camping Equipment product types. 314 IBM Cognos Business Intelligence V10. such as spreadsheets. If the user wants to merge external data with a dimensional data source. A user can import a maximum of one external data source file per package. Import your external data This step depends on the data source.000 rows.7. with a maximum of 20.. into their reports. the users cannot store the data on the server. users need to follow the workflow that is shown in Figure 7-114. a package with a new data model merging the data source of the report and the external data is created. the user can link the external data directly with the enterprise data source or to a list report. professional report authors.1 Handbook . and analysts must know their external data (the enterprise data to which they are trying to connect to make their analysis) and the objective of their analysis. If the user wants to merge external data with a relational data source. When users import external data using this feature. the user must create a list report and link the external data source to the content of the list report (Figure 7-128 on page 328 shows an example). The IBM Cognos modeler can override these governors in IBM Cognos Framework Manager. Maximums: The maximum file size that a user can import is 2.8 Add external data IBM Cognos Business Insight and IBM Cognos Report Studio allow users to integrate external data.5 MB. Only a link for the local data source is created. To be successful when creating reports using external data. and grouping and adding calculations. because you do not have to distribute your file to each person with whom you want to share a report. summarizing data. you must maintain the report to keep it current. such as creating crosstabs. Resource: For more information about working with the External Data feature. it is easier to share reports. Self service interface for business users 315 . She can easily create this report in IBM Cognos Business Insight Advanced using the External Data feature.8. the people who are to see the report need to obtain the file that is used by the external data source for their computers and have it located in the same location so that IBM Cognos BI can find the source file. 7.1 External Data feature example Lynn Cope. users can create their reports with the new data source in the same manner as with regular packages. lists. grouped by Product line and Product type. an Advanced Business User of the Great Outdoors company. and charts. because she knows it is not available in the data warehouse. With this second method. refer to the IBM Cognos Business Insight Advanced User Guide. Lynn has received a spreadsheet with the translation of the units to English and French. Determine whether to share the reports After you create a report using external data.Create reports with your external data file After IBM Cognos Business Insight Advanced creates the package. Chapter 7. If you want to share a report. you usually save the report in you My Folders folder. Another option is to place the source file on a shared drive that IBM Cognos BI can access and create the external data source based on that location. needs to create a catalog report with product sizes and quantity available in English and French units. applying sorting. She wants to use this information to build her report. If a you want to share the report. Users can create reports with their data and perform many operations. Save the report in the My Folders folder with the name Product information. she needs to create a list report with the data that she wants to be available in the external data package. 4. 6. To create the External Data package: 1. Click Create New to create a new report. launch Business Insight Advanced. and then click OK.Create the External Data package Because Lynn wants to merge external data with a dimensional data source. 3. Navigate to Cognos Public Folders Samples Models. In IBM Cognos Connection..1 Handbook . In the Insertable Objects pane. 2. click List. 5. 316 IBM Cognos Business Intelligence V10. Click GO Data Warehouse (analysis) to create a new report based on this dimensional package. click View Metadata Tree. If required. The Select a package window opens. csv) files XML (*.xml) files Here. Self service interface for business users 317 . you are prompted to select the external data file each time that you run the report.This location can be on the local machine or on a network share. By default. View Metadata Tree Manage External Data Figure 7-115 Simple list report with Product data and Quantity values 9. The users need to specify a namespace to use.xls) spreadsheet software files Tab-delimited text (. users can specify which data they want to include on their reports. Click Browse and choose the location of the external data (Figure 7-116 on page 318). Click the Manage External Data icon (Figure 7-115). Chapter 7. The namespace provides a unique name to associate with the data items that the users import. If you change the default name for the namespace. select the “Allow the server to automatically load the file” check box. The namespace appears in the data tree of the Source tab in the Insertable Objects window and is used to organize the data items.txt) files Comma-separated value (. To avoid this step. the namespace is the imported file name without the extension.8. The following extensions are supported: – – – – Microsoft Excel (. 11.1 Handbook .. click the ellipsis (.Browse to the My Folders folder. click Product size code. 13. and then click Open.In the External data list. 14. 15. click PRODUCT_SIZE_CODE..Click Next. 318 IBM Cognos Business Intelligence V10.Figure 7-116 Selecting an external data source 10.).In the Existing report list.Click the Product information report.In the Existing report section. 12. Chapter 7. product size code).Click Next twice.16. users do not need to create a report to link the data. Figure 7-117 Mapping the external data against an IBM Cognos data source Relational data source: When using the External Data feature with a relational data source.Click New Link (Figure 7-117). 17. make sure that the columns that will be linked match (for example. They can link the external data to the relational IBM Cognos package. Self service interface for business users 319 . Linking columns: Before you create the data mapping. In the Existing query subject items section.1 Handbook . Figure 7-118 Setting mapping options 320 IBM Cognos Business Intelligence V10.18. click Some values exist more than once (Figure 7-118). Set the location of the Package to My Folders.Click Finish. Figure 7-119 Manage External Data window Chapter 7. as shown in Figure 7-119.Click Save... 20. click the ellipsis (.On the Manage External Data window.19. and name it: Go Data Warehouse (analysis) External Data with Dimensional 22. Self service interface for business users 321 .). 21. A message displays with information about the new package that will be created (see Figure 7-120).1 Handbook .Click Publish.23. Figure 7-120 External data source information message 322 IBM Cognos Business Intelligence V10. After the package is created. Self service interface for business users 323 . – This new package consists of two subjects: – One subject accesses the external data The other subject accesses the dimensional data that is extracted from the Product information report.24. the package that is used for the current report is changed. and the new package appears in the Insertable Objects pane (see Figure 7-121). Figure 7-121 External Data package Chapter 7.Click OK. click the New icon..On the top toolbar.1 Handbook .25.Click No to saving the existing report because it is saved already. 26. 27.).28.From Go Data Warehouse (analysis) External Data product_size Product information. Self service interface for business users 325 . Figure 7-124 Including Quantity measures from the query subject created with the dimensional data Chapter 7. 30. Product.In the crosstab.On the top toolbar. Product type. 31.1 Handbook . PRODUCT_SIZE_EN. Figure 7-125 Grouping list columns 326 IBM Cognos Business Intelligence V10. click Product line. and PRODUCT_SIZE_FR. click the Group/Ungroup icon (Figure 7-125). Click Edit layout sorting (Figure 7-126). click Product line.On the top toolbar. 33.32. Self service interface for business users 327 . 34.In the crosstab. click the Sort icon. Figure 7-126 Edit Layout Sorting option Chapter 7. Drag each member from the Data items area to the Groups section. After performing these steps. ordered by Product line.35. Figure 7-127 Setting Grouping & Sorting configuration 36. Product type. and Product 328 IBM Cognos Business Intelligence V10.1 Handbook . and Product (Figure 7-128). Figure 7-128 Report showing external and enterprise data ordered by Product line. Product type. the report shows the information from both external data and enterprise data sources.Click OK. as shown in Figure 7-127. 9 Create a package with the Self Service Package wizard In Chapter 4. You must meet two prerequisites to perform this task: The user must have execute permissions for the Self Service Package wizard capability. it is a property of a data source in IBM Cognos Administration. you have to enable the option Allow personal packages (see Figure 7-129). we discussed metadata modeling and how to create a reporting package in IBM Cognos Framework Manager. and they will be listed in Public Folders or My Folders.7. Self service interface for business users 329 . Select IBM Cognos Administration and navigate to the Security tab. click Capabilities Capability Self Service Package Wizard. Then. You must enable the self-service package capability for a data source. On the Connection tab. For SAP Business Information Warehouse (SAP BW) and IBM Cognos PowerPlay Studio PowerCube data sources. Figure 7-129 Enabling self-service package capability for a data source Chapter 7. For certain online analytical processing (OLAP) sources. refer to IBM Cognos Administration and Security Guide. For details about setting the permission. you must create and publish a package from IBM Cognos Framework Manager. however. “Create reporting packages with IBM Cognos Framework Manager” on page 33. you can create packages in IBM Cognos Connection. 9. but you can change that here if you click Select another location.7. The default location for packages is My Folders. click the New Package icon. In our example. For our example. follow these steps: 1. Sales and Marketing Cube). Figure 7-130 Creating a new package from IBM Cognos Connection 2. Select the data source that you want to add from a list. the data source is a Sales and Marketing Cube that is part of the IBM Cognos samples. Click Next. Select a location for a package. Figure 7-131 Select a data source for a package 3. and then click OK.1 Handbook . 330 IBM Cognos Business Intelligence V10. and in the upper-right corner. you first must create a package.1 Create a package for Cognos PowerCubes If you have an IBM Cognos PowerPlay Studio PowerCube as a data source and if you want to use it in one of the IBM Cognos Studios for creating reports or analysis. Enter the name for the package (leave the default name. Open the IBM Cognos Connection. click Sales and Marketing Cube (see Figure 7-131). as shown in Figure 7-130. The data source must have the self-service package capability enabled to be listed as a data source in the Self Service Package wizard (see Figure 7-129 on page 329). To create a package for a PowerCube data source. Figure 7-132 Null suppression options for a Cognos PowerCube 5. as shown in Figure 7-132. A new package for a Cognos PowerCube is added to IBM Cognos Connection. such as zeros or missing values. 6. Figure 7-133 New package for a Cognos PowerCube Chapter 7. – Allow access to suppression options: Allows the studio user to choose which types of values will be suppressed. Self service interface for business users 331 . all options are checked. as shown in Figure 7-133. – Allow multi-edge suppression: Allows the studio user to suppress values on more than one edge. Click Finish. You can define null-suppression options here: – Allow null suppression: Enables suppression. By default.4. Any of the IBM Cognos Studios can use this package for reporting. 9. click the New Package icon in the upper-right corner. 5. but be aware that the longer an SAP BW import takes. 3. In IBM Cognos Connection. By default.7. Type the name for the package. Click Next. Select the languages to include in the package. refer to the IBM Cognos Administration and Security Guide. 4. 6. Select the objects that you want to include. If you want to use Dynamic Query Mode with the data source. A new package for an SAP BW will be added to IBM Cognos Connection. and click Next. 10.2 Create a package for SAP BW For SAP BW data sources. select Use Dynamic Query Mode. and click Next.1 Handbook . Click Finish. click Enhance the package for SAP BW organization of objects. To have objects in the model organized in the same way that they are organized in Business Explorer Query Designer. 2. To import SAP BW queries that contain dual structures and use the structures in IBM Cognos queries to control the amount and order of information that your users see. powered by IBM SPSS. 8. you can edit variable properties (click Edit the SAP BW variable properties for the package after closing this dialog) or click Close to finish creating the package. the prerequisites are the same. For details about how to set these parameters. You can change these settings. provides analysts with the ability to distribute reports with statistical insight to the larger business community.10 Create statistical calculations IBM Cognos Statistics. you can select a maximum of two cubes and five info queries. To add an SAP BW data source in a package.When the “Package successfully created” message appears. 7. but creating a package has additional SAP BW-specific steps. which might have an impact on its performance for other applications. click Enable SAP BW Dual Structures support. the more time the server spends processing the request. The number of objects that you can select is limited. Specify the object display name. further expanding the breadth of reporting capabilities provided by IBM Cognos 332 IBM Cognos Business Intelligence V10. 9. 7. follow these steps: 1. In this section. because it uses IBM Cognos Report Studio objects and provides a convenient wizard interface. analysts can assemble reports containing statistical information easily and distribute the information across the enterprise. The statistical capabilities that are provided by IBM Cognos Statistics are powered by the trusted market-leading IBM SPSS statistical engine. IBM Cognos Statistics is easy to use for existing IBM Cognos Report Studio authors. 7. you can show descriptive statistics along with more formal analyses. Now. For more information about any of these features. analysts no longer need to extract standardized trusted data from their business intelligence (BI) data warehouse into a separate tool to analyze and report on statistical information. we provide the functions of IBM Cognos Statistics and sample images that were created from the Great Outdoors sales company data.10. With these images. Descriptive Statistics Descriptive Statistics quantitatively summarize a data set. see the IBM Cognos Report Studio User Guide. enabling you to make the most of best-in-class analytics within your organization. Because IBM Cognos Statistics is seamlessly integrated into IBM Cognos Report Studio.1 IBM Cognos Statistics overview In this section. we describe the types of statistical objects in Descriptive Statistics. we introduce and provide a use case of IBM Cognos Statistics. Whether you are obtaining additional insight into key business variables or predicting future outcomes. Self service interface for business users 333 . In this section. IBM Cognos Statistics provides the necessary fact-based statistical evidence to support key organizational decisions. For an overall sense of the data being analyzed. we introduce each statistical function.software. Chapter 7. saving valuable time. or records. A measure of dispersion around the mean. Deviation N Median Minimum Maximum The arithmetic mean is the sum of samples divided by the number of cases. Half of the cases fall above the median. The largest value of a numeric variable. Figure 7-134 Summary descriptive statistics: One value Notes regarding Figure 7-134: Mean Std.147. The number of cases.18 and that the standard deviation is extremely high: 31189. 334 IBM Cognos Business Intelligence V10.664. The smallest value of a numeric variable. and half of the cases fall below the median. You can see that the average salary of this company is 49. we use the Salary to Analysis variable and the Employee to Case variable (see Figure 7-134).1 Handbook . observations.Basic Descriptive Statistics Descriptive tables describe the basic features of data in quantitative terms: Summary descriptive statistics: One value In this table. we use the Salary and Bonus value to Analysis variable and the Employee to Case variable. You can see that the standard deviation of Bonus value is lower than the standard deviation of Salary in this company. Figure 7-135 Summary descriptive statistics: Multiple values Descriptive statistics by grouping variable In the table in Figure 7-136. You can compare the salary of each country. Figure 7-136 Descriptive statistics by grouping variable Chapter 7. and Country to Grouping variable. Self service interface for business users 335 . we use the Salary to Analysis variable. Employee to Case variable.Summary descriptive statistics: Multiple values In the table in Figure 7-135. and Country to Grouping variable. Figure 7-137 uses the Unit price to Analysis variable. You can use a histogram to summarize the frequency of observations graphically.Histogram Histograms display the range of variable values in intervals of equal length. which is also known as a “box-and-whisker” chart. such as these types: Minimum and maximum values Upper and lower quartiles Median values Outlying and extreme values 336 IBM Cognos Business Intelligence V10. is a convenient way to show groups of numerical data. Unit price distribution regarding all the products of this company displays. Product to Case variable.1 Handbook . Figure 7-137 Histogram Boxplot A boxplot. Extreme value Outlying value Whisker 75th percentage Median 25th percentile Figure 7-138 Boxplot Chapter 7. You can see the Gross profit distribution of retailers of each region and that VIP Department Stores is an excellent retailer in the U. Retailer name to Case variable. Self service interface for business users 337 . and Region to Grouping variable.S.Figure 7-138 uses the Gross profit to Analysis variable. 338 IBM Cognos Business Intelligence V10. that is. You can see that several of the high-salaried and low-salaried employees are out of range in the normal distribution in this company.05 or less are typically considered significant. if the difference is due to something other than random chance. Figure 7-139 Q-Q Plot Means comparison You can compare the means of two or more groups to determine if the difference between the groups is statistically significant. Figure 7-139 uses the Salary to Analysis variable and Employee to Case variable. Probabilities of . including the normal distribution.1 Handbook . You can use two types of statistical objects in means comparison.Q-Q Plot You can create a quartile-quartile (Q-Q) plot to chart the quartiles of a variable’s distribution against a distribution of your choice. One-Sample t-Test The One-Sample t-Test tests the probability that the difference between the sample mean and a test value is due to chance. Probabilities of . we use the Revenue to Analysis variable. Product line to Grouping variables. that is. and Golf Equipment do not differ significantly compared to the Test value. One-Sample t-Test provides two types of results: one type is One-Sample Statistics (Figure 7-140) and the other type is One-Sample Test (Figure 7-141).05 or less are typically considered significant. that the variance within each of the groups is equal. ANOVA assumes that there is homogeneity of variance. Figure 7-140 One-Sample Statistics Figure 7-141 One-Sample Test One-Way ANOVA You can use One-Way ANOVA to assess whether groups of means differ significantly. Check the Sig. Self service interface for business users 339 . or significance values in the One-Sample Test.In this table. Product to Case variable. Personal Accessories. but Mountaineering Equipment and Outdoor Protection differ significantly. Chapter 7. and you can see that Camping Equipment. You can check for homogeneity of variance by using the Levene’s test. and 30000000 to Test value. Figure 7-144. Figure 7-143. and the Employee to Case variable.In this table.1 Handbook . the Branch region to Independent variable. this test provides these three tables and one chart (see Figure 7-142. For example. and Figure 7-145). we use Salary to Dependent variables. The Multiple Comparisons table shows the salary difference for each country. Figure 7-142 ANOVA Figure 7-143 Multiple Comparisons 340 IBM Cognos Business Intelligence V10. One-Way ANOVA provides various kinds of results. Figure 7-144 Homogeneous subsets Figure 7-145 Means Plots Chapter 7. Self service interface for business users 341 . Vacation days taken to count variable. Figure 7-146 Frequencies by Branch region Figure 7-147 Test Statistics 342 IBM Cognos Business Intelligence V10. we use the Branch region to Analysis variable. and Employee to Case variable. One-Way Chi-Square Test One-Way Chi-Square Tests. which are also known as chi-square goodness-of-fit tests. You can see Central Europe is the region whose employees take the most vacation. In this table.1 Handbook . You test for significant differences between observed frequencies and expected frequencies in data that does not have a normal distribution.Nonparametric tests You use nonparametric tests to compare frequencies in categorical data. The One-Way Chi-Square Test provides the types of results that are shown in Figure 7-146 and Figure 7-147. compare observed frequencies against expected frequencies using data from a single categorical variable. Figure 7-148 Case Processing Summary Figure 7-149 Crosstabulation Figure 7-150 Chi-Square Tests Chapter 7. Previous defaulted to Analysis variable2.5). Self service interface for business users 343 . we use Level of education to Analysis variable1. compare observed frequencies against expected frequencies using data from two categorical variables. The Two-Way Chi-Square Test provides various types of results (Figure 7-148. and Figure 7-150). which are also known as chi-square tests of independence. Figure 7-149.Two-Way Chi-Square Test Two-Way Chi-Square Tests. which means that there is a significant difference between the default rates of customers with differing levels of education. You can see Pearson Chi-Square is significant (<0. In this table. and the Customer ID to Case variable. The existence of a correlation does not imply causality. You can see that the Pearson Correlation is 0.1 Handbook . Figure 7-152. and the Product to Case variable. and Figure 7-153). Figure 7-151 Basic Correlation chart 344 IBM Cognos Business Intelligence V10. Basic Correlation provides these kinds of results (see Figure 7-151. Quantity to Analysis variable2. This table uses Unit price to Analysis variable1. which means that there is a positive relationship between Product cost and Gross profit. Basic Correlation Basic Correlation is a measure of association between two variables.904.Correlation and Regression Correlation and regression analysis let you examine relationships between variables. but simply helps you to understand the relationship. Self service interface for business users 345 . Linear Regression provides various types of results (see Figure 7-154.Figure 7-152 Basic Correlation Descriptive Statistics Figure 7-153 Basic Correlation correlations Linear Regression Linear Regression examines the relationship between one dependent variable and one or more independent variables. The regression equation is as follows: dependent variable = slope * independent variable + constant The slope is how steep the regression line is. The constant is where the regression line strikes the y-axis when the independent variable has a value of 0. Chapter 7. we use the Gross profit to Dependent variable. In this table. Product cost to Independent variable. Figure 7-156. based on a scatterplot. Figure 7-155. You can use Linear Regression to predict the dependent variable when the independent variables are known. Product cost 0. and Figure 7-157). The key statistic of interest in the coefficients table is the unstandardized regression coefficient.528. and Product to Case variable. the regression equation is the predicted value of Gross profit = 0. the slope is 0. and the constant is 2861822.528* Product cost + 2861822.528. Figure 7-154 Linear Regression Variables Entered/Removed Figure 7-155 Linear Regression Model Summary Figure 7-156 Linear Regression ANOVA 346 IBM Cognos Business Intelligence V10.972.1 Handbook . So.In this example.972. The aim of Curve Estimation is to find the best fit for your data. expressed as the correlation coefficient R square.Figure 7-157 Linear Regression Coefficients Curve Estimation You can use Curve Estimation to plot a curve through a set of points to examine the relationship between one independent variable and one or more dependent variables. Self service interface for business users 347 . You can choose one or more curve estimation regression models: Linear Logarithmic Inverse Quadratic Cubic Power Compound S Logistic Growth Exponential Chapter 7. Figure 7-158 Curve Estimation chart Figure 7-159 Curve Estimation Model Summary 348 IBM Cognos Business Intelligence V10. Curve Estimation provides these kinds of results (Figure 7-158.This table uses the Gross profit to Dependent variable. Product cost to Independent variable. and Product to Case variable with Linear model.1 Handbook . Figure 7-160. Figure 7-159. You can try using separate models with your data to help you find the model with the optimum fit. You can see differences between the estimated line and the actual value. and Figure 7-161). You use statistical process control (SPC) to monitor critical manufacturing and other business processes that must be within specified limits. Chapter 7.Figure 7-160 Curve Estimation ANOVA Figure 7-161 Curve Estimation Coefficients Control Charts All processes show variation. but excessive variation can produce undesirable or unpredictable results. Control Charts plot samples of your process output collected over time to show you whether a process is in control or out of control. Self service interface for business users 349 . Figure 7-163. Figure 7-162 X-Bar chart Figure 7-163 X-Bar Rule Violations 350 IBM Cognos Business Intelligence V10.1 Handbook .X-Bar Plot the average of each subgroup. and Figure 7-164). An X-Bar chart is often accompanied by either the R chart or S chart (Figure 7-162. The center line on the chart represents the mean of the ranges of all the subgroups (Figure 7-165).Figure 7-164 X-Bar Process Statistics R charts R charts plot range values by subtracting the smallest value in a subgroup from the largest value in the same subgroup. Figure 7-165 R chart Chapter 7. Self service interface for business users 351 . S charts S charts plot the standard deviations for each subgroup.1 Handbook . The center line on the chart represents the mean of the standard deviations of all the subgroups (Figure 7-166). Figure 7-166 S chart 352 IBM Cognos Business Intelligence V10. Self service interface for business users 353 . The center line on the chart represents the average change from one sample to another sample (Figure 7-167).Moving Range Moving Range charts plot the difference between each sample value and the preceding sample value. Figure 7-167 Moving Range Chapter 7. Individuals Individuals charts plot the measured value of each individual sample. Sample sizes do not need to be equal. The center line on the chart represents the average of all individual samples in the chart (Figure 7-168 and Figure 7-169).1 Handbook . Figure 7-168 Individuals chart Figure 7-169 Individuals Rule Violations p chart The p chart plots the percentage of defective units. They can vary between collection periods. such as the percent of automobiles with defects per shift. 354 IBM Cognos Business Intelligence V10. such as the number of defects per automobile per shift. 3. 7. and create a 1 x 2 table.10. Ben Hall is the Analyst. They can vary between collection periods. he wants to show which product is a “pain” point or poor seller. u chart The u chart plots the number of defects per unit.2 IBM Cognos Statistics use case: Create an IBM Cognos Statistics report Chapter 3. 2. To create the chart: 1. Self service interface for business users 355 . Sample sizes do not need to be equal. Sample sizes must be equal. Ben creates a statistics chart. Create a statistics chart First. In this scenario. “Business scenario and personas used in this book” on page 21 introduces the Great Outdoors company business scenario. Drag a Curve Estimation statistic object from the Insertable Objects pane to the left side of the table. Also. Click the Insert Table icon. such as the total number of defects per shift. such as the number of automobiles with defects per shift. Chapter 7. Launch IBM Cognos Report Studio with the Go Data Warehouse (query) package. He wants to create a sales summary report that shows the statistical relationship between the sales quantity and the inventory in the second quarter (2Q) of 2007 with IBM Cognos Statistics.np chart The np chart plots the number of defective units. Sample sizes must be equal. c chart The c chart plots the number of defects.. as shown in Figure 7-170. as shown in Figure 7-171: – Quantity to Dependent variable – Opening inventory to Independent variable – Product to Cases variable Figure 7-171 Insert measures and items 6. Figure 7-170 Select Statistic dialog box 5. In the Select Statistic dialog box.4. In the next window. Insert the following measures and items. Click OK.1 Handbook . Create an advanced filter with Year=2007 and Quarter=’Q2’. expand Correlation and Regression. click Cancel. and click Curve Estimation. 356 IBM Cognos Business Intelligence V10. If you want to identify the item name of the pain point. you can use the crosstab to identify them. Run a report. So. These points are much lower than the estimated line. which means that these items had too much inventory compared to their sales quantities. Self service interface for business users 357 . Figure 7-172 shows the result. there is no direct way to identify the pain points at this point. Figure 7-172 Curve Estimation chart Chapter 7.7. The red circles show the pain points. 1 Handbook . e. as shown in Figure 7-174. Insert Product in the Rows area. Click *(multiplication) in the operation. Delete the (Opening inventory * 0.533* Opening inventory + 17297. 358 IBM Cognos Business Intelligence V10. Drag a Crosstab object from the Insertable Objects pane to the correct table.Create crosstab to identify pain point Next. make a note about the following information in the statistical report (see Figure 7-173): – Slope: 0. b.533 – Constant: 17297. Create the same advanced filter for the crosstab that you created in the statistic report. Click the (Opening inventory * 0. and click OK. To create a crosstab: 1. Ben creates a crosstab. and add a custom calculation.533) column. you can recognize the following equation: predicted value of Quantity = 0.425 Figure 7-173 Coefficients 2.425 From this information. 3. and click OK. Create the estimated column: a. c. type slope value(0. Before creating a crosstab. type Constant value(17297. and add a custom calculation.425) in the Number field.533) in the Number field. Click Opening inventory. Insert Quantity and Opening inventory in the Columns area.533) column. 5. Click +(addition) in operation. d. Figure 7-174 Crosstab 4. Click the (Regression . 7. and add the calculation (Regression Quantity). Figure 7-175 Crosstab 6. and set the order as Descending (Figure 7-176). and rename it as “Regression” in the property pane (Figure 7-175). Chapter 7. Adjust the crosstab location appropriately. 8. Figure 7-176 Crosstab 9.Quantity) cell.Quantity) to the right edge of the crosstab. Click the Regression. Click the ((Opening inventory * 0. Quantity cell.425) cell. Self service interface for business users 359 .f. Move (Regression .533) + 17297. 1 Handbook . You can see that these item names are “Glacier Basic” and “Double Edge”. the crosstab shows the order of difference between the estimated line and the actual sales Quantity.10.Run the report. as shown in Figure 7-177. In this report. Figure 7-177 Statistic report 360 IBM Cognos Business Intelligence V10. You can identify the item name of the pain points with Quantity and Opening inventory values. 8 Chapter 8. when you need it. 361 . so that you can make the best decisions possible is best described as actionable analytics. Having access to the data that you. Actionable analytics everywhere IBM Cognos Business Intelligence (BI) offers various capabilities that allow more people to take advantage of business intelligence in more places. we introduce the actionable analytics that are available with IBM Cognos BI. 2010. This chapter includes the following topics: Accessibility and internationalization Disconnected report interaction Interact with IBM Business Analytics using mobile devices IBM Cognos Analysis for Microsoft Excel Business driven workflow © Copyright IBM Corp. All rights reserved. In this chapter. report consumers can do the following activities: Navigate without a mouse using arrow keys and function keys. you can do the following activities: Add alternative text for non-text objects. as shown in Figure 8-1.1 Enabling access for more people When creating reports using IBM Cognos Report Studio and IBM Cognos Business Insight Advanced. such as restricted mobility or limited vision. see the IBM Cognos Business Insight User Guide. when you set the operating system to high contrast. you can move to the first item or object with the Ctrl+Home key combination. Additionally.1. graphic icons are replaced with text icons for easier viewing. you can open and display the contents of a drop-down list with the Alt+Down arrow key combination. 8. For more information. For example. 362 IBM Cognos Business Intelligence V10. and tables Specify whether table cells are table headers When using IBM Cognos Business Insight or IBM Cognos for Microsoft Office. In this section. Use any combination of high contrast system settings and browser minimum font settings to control the display. lists.1 Accessibility and internationalization IBM Cognos BI includes features to help you create reports that are more accessible to people with a physical disability. For example. such as images and charts Add summary text for crosstabs.1 Handbook . we introduce functions that you can use to enhance accessibility and the support language of IBM Cognos BI.8. The accessibility features. Users can enable accessible output by report. The documentation includes alternate text for all graphics so that screen readers can interpret graphics. IBM Cognos BI provides the ability to enable accessible output at many levels. JAWS is supported only with the Mozilla FireFox browser for this release of IBM Cognos Business Insight. For more information. so that all reports for all IBM Cognos BI users have accessibility features enabled. see the IBM Cognos Connection User Guide and the IBM Cognos Administration and Security Guide. Administrators can control assessable output as a server-wide option. see the IBM Cognos Business Insight User Guide. including keyboard shortcuts. IBM Cognos Business Insight is accessibility enabled. Accessibility settings in the user preferences and report properties overwrite this setting. Actionable analytics everywhere 363 .Figure 8-1 Text icons for high contrast Use the Freedom Scientific JAWS screen reader. Switch from graphs to tables and control the palette settings to meet specific accessibility needs. Chapter 8. or they can choose to enable accessible output for all reports using a user preferences setting. are documented as well. For more information. and the indexed search functionality (see Figure 8-2). and Simplified Chinese New Group 1 language translations Traditional Chinese. and Italian Figure 8-2 Setting for supported language 364 IBM Cognos Business Intelligence V10. Spanish. the search functionality. Existing Group 1 language translations French.2 Providing internationalization IBM Cognos BI now expands language support for IBM Group 1 translations. Brazilian Portuguese. Korean.1. German.8. The following Group 1 languages are supported in the product user interface.1 Handbook . Japanese. 8. Users continue to benefit from the enterprise value of one version of the truth. You use active report controls to create the layout of an active report and to filter and sort data in the report.2 IBM Cognos Active Report features IBM Cognos Active Report produces reports that are an extension of existing IBM Cognos Report Studio values and the IBM Cognos Platform. IBM Cognos Active Report extends the reach of business intelligence and analytics to employees in the field and business partners. Actionable analytics everywhere 365 . IBM Cognos Active Report is a report output type that provides a highly interactive and easy-to-use managed report.8. such as a chart.. IBM Cognos Active Report can be consumed by users who are offline. Report authors build reports that are targeted at users’ needs. making this an ideal solution for remote users such as the sales force. You use IBM Cognos Report Studio to create active reports. and new interactive control types in IBM Cognos Report Studio serve as building blocks for creating active reports.2 Disconnected report interaction IBM Cognos BI offers a report function called IBM Cognos Active Report. keeping the user experience simple and engaging. Some users prefer viewing the numbers. and other users prefer viewing a visualization.2. Layout Users need data organized in a way that is easy to consume and understand.2.1 IBM Cognos Active Report overview IBM Cognos Active Report includes reports that are built for business users. Chapter 8. 8. allowing them to explore data and derive additional insight. To help report authors deliver content in the most consumable way possible. users can select one or more items in a list box.1 Handbook . In data list boxes. IBM Cognos Report Studio provides several filtering controls: List and drop-down list control (as shown in Figure 8-4) Use list boxes and data list boxes to provide a list of items that users can choose from. IBM Cognos Report Studio provides the following layout controls: Tab controls for grouping similar report items. To help report authors deliver the content in the most consumable way possible. as shown in Figure 8-3 Figure 8-3 Tab controls Decks of cards for layering report items You can use decks and data decks to show different objects and different data respectively based on a selection in another control. the lists are driven by a data item that you insert in the control. Figure 8-4 Drop-down list 366 IBM Cognos Business Intelligence V10. You can show or hide a column in a list or a column or row in a crosstab when the report is viewed. In reports. clicking a radio button in a radio button group control shows a list object and clicking a different radio button shows a chart object. By allowing report authors to add easy to-use controls to a report. For example. users can interact with the data and filter it to obtain additional insight. Filtering and sorting Users need to focus on the data in which they are most interested. Control data for hiding or showing list columns Users can control the data that displays using check boxes. In reports. Figure 8-6 Radio buttons Check boxes (as shown in Figure 8-7) Use check box groups and data check box groups to group a set of check boxes. In data check box groups. the radio buttons are driven by a data item that you insert in the control. the lists are driven by a data item that you insert in the control. In reports. Figure 8-8 Toggle buttons Chapter 8. In data list boxes. users can select one or more check boxes simultaneously.Interactions with charts (as shown in Figure 8-5) Use list boxes and data list boxes to provide a list of items from which users can choose. In reports. In data radio button groups. users can click one or more buttons simultaneously. Figure 8-7 Check boxes Toggle buttons (as shown in Figure 8-8) Use toggle button bars and data toggle button bars to add a group of buttons that change appearance when pressed. users can select one or more items in a list box. the buttons are driven by a data item that you insert in the control. the check boxes are driven by a data item that you insert in the control. Figure 8-5 List box Radio buttons (as shown in Figure 8-6) Use radio button groups and data radio button groups to group a set of buttons that have a common purpose. In data toggle button bars. In reports. users can click only one radio button at a time. Actionable analytics everywhere 367 . and you can schedule and burst these reports to users. users can click only one button at a time. In reports. the buttons are driven by a data item that you insert in the control.2. The business partner is not connected to the Great Outdoors company intranet or the IBM Cognos BI infrastructure. who is in the role of the Professional Report Author in this example. you can run active reports from IBM Cognos Connection.. “Business scenario and personas used in this book” on page 21. creates a sales summary report that shows the lowest sold products in 2007 3Q. we introduce the Great Outdoors company business scenario.1 Handbook . The report is divided by Product Line.3 IBM Cognos Active Report use case In Chapter 3. 8. Authors can upgrade existing reports to be interactive by adding the controls that we mentioned previously. providing users with an easy to consume interface. Similar to existing IBM Cognos reports.Push button controls (as shown in Figure 8-9) Use button bars and data button bars to add a group of push buttons. The generated report needs to be interactive and must show data without requiring a connection to the IBM Cognos Platform. In data button bars. 368 IBM Cognos Business Intelligence V10. Create IBM Cognos Active Report Lynn Cope. Create a list report. Actionable analytics everywhere 369 . 2. Launch IBM Cognos Report Studio and create a list with Product line. Product. Product type. Add a Context filter with Q3 2007.To allow users to use the Active Report feature: 1. and set the order to Ascending to Quantity and the grouping to Product line. Insert a Data Tab Control object from the Insertable Objects pane to the left side of the list table and insert the Product line to Drop Item here as shown in Figure 8-10. Add an Active Report Object. and Quantity of [GO Data Warehouse(analysis)]-[Sales and Marketing(analysis)]-[Sales]. 3. Figure 8-10 Insert Data Tab control Chapter 8. Convert the report to an active report by clicking File Convert to Active Report. 4. Then. Create a connection by clicking the Interactive Behavior icon. as shown in Figure 8-11.1 Handbook . Figure 8-11 Create a connection 370 IBM Cognos Business Intelligence V10. select Create New Variable and enter Product line Variable 1. see the IBM Cognos Report Studio User Guide. If your result data rows are more than 5.5. Figure 8-12 shows the result. Actionable analytics everywhere 371 . Figure 8-12 Active report For more information.000. change the limit setting within Active Report Properties. Save and run the report. Chapter 8. use Internet Explorer (V7 or higher) or Mozilla Firefox (with UnMHT) to open an active report. To download a report: 1.mht extension. She wants to download the Active Report as a local file and send it to a business partner. 2.mht file to the business partner by email. 372 IBM Cognos Business Intelligence V10. Figure 8-13 Downloaded Active Report file 2.Download IBM Cognos Active Report Lynn Cope is also an Advanced Business User. To analyze the report: 1. Send the . Click each Product Line button to find the lowest sales quantity of each product line as shown in Figure 8-14.1 Handbook .*\. Click the developed Active Report in IBM Cognos Connection and then select download to local storage. To open the active report file. delete the URL filter by selecting Tools IE Tab option Delete /^file:\/\/\/. (as shown in Figure 8-13). he can use the report that is attached to the email to analyze the data to determine the lowest sold product at each product line in 3Q 2007. The file has a . right-click the file. Using the active report When the business partner receives an email from Lynn Cope. Open the active report. and select appropriate browser (for example.(mht|mhtml)$/. If you use Mozilla Firefox. Actionable analytics everywhere 373 . This function provides decision makers with access to business critical information wherever they are and whenever they need it. we introduce supported devices and a use case for IBM Cognos Mobile. For more information. Chapter 8. 8. Mobile users want to take advantage of personal mobile devices while interacting with business intelligence on the device. see the IBM Cognos Report Studio User Guide.Figure 8-14 Disconnected active report IBM Cognos Active Report can provide a robust and interactive experience for disconnected analysis of business information. In this section.3 Interact with IBM Business Analytics using mobile devices IBM Cognos Mobile provides timely and convenient access to IBM Cognos BI information from a mobile device. Users can use familiar iPhone actions to access the same business intelligence content and IBM Cognos Mobile features that are available on other devices in previous releases. Improved prompting IBM Cognos Mobile offers improved prompting in the web application for the Apple iPhone. users can have dashboards that were created in IBM Cognos Business Insight delivered to their devices. Support for IBM Cognos Business Insight In addition to reports and analyses.1 devices. and make decisions with IBM Business Analytics on your mobile device as we describe in this section. 8. In addition.1 Handbook . Support for Apple iPhone. 374 IBM Cognos Business Intelligence V10.3.2 Simplified experience across all devices You can connect to. users can create a list of favorites and select one dashboard or report to display automatically on the Welcome window when they start IBM Cognos Mobile. Support for RIM BlackBerry Smartphones IBM Cognos Mobile now supports the enhanced BlackBerry user interface for BlackBerry OS 4. Prompting uses prompt identifiers and the surrounding text and formatting that desktop users see. Apple iPad. The new user interface is easier to navigate and provides an improved overall experience when accessing IBM Cognos BI content. and Apple iPod Touch IBM Cognos Mobile now supports Apple iPhone.3.1 Extended device support IBM Cognos Mobile now supports the mobile devices that we describe in this section.8.2 and higher. Apple iPad. and Apple iPod Touch devices. interact with.1 devices IBM Cognos Mobile continues support for Symbian S60 and Microsoft Windows Mobile 6. Support for Symbian S60 and Microsoft Windows Mobile 6. Users can run prompted reports intuitively by using prompting mechanisms that suit the mobile device. Users can see the fields within the IBM Cognos BI content on their devices on which they can drill up or drill down. and Zooming functions. It enables the following functions: Rapid mass deployment to enterprise mobile users Faster device support to sustain the speed at which new devices enter the marketplace Instantaneous software updates that occur at the server You do not need to update mobile client software. users can return to the original report where they began the drilling process. After drilling up or drilling down on one or more of those fields. Browsing improvements IBM Cognos Mobile offers Report Thumbnails. Panning. Actionable analytics everywhere 375 . which makes deployment transparent to users. These features allow users to gain additional insight into the information that they are consuming. Zero footprint IBM Cognos Mobile for the Apple iPhone and Apple iPod Touch is an HTML 5 web application. Chapter 8.Drill up and drill down IBM Cognos Mobile offers drill up and drill down capabilities. 8. as shown in Figure 8-15..1 Handbook . Figure 8-15 IBM Cognos Mobile welcome window on Apple iPhone 376 IBM Cognos Business Intelligence V10.3. Figure 8-16 shows the Favorites tab. Figure 8-16 Favorites tab Chapter 8. Actionable analytics everywhere 377 . Figure 8-17 Recently run reports 378 IBM Cognos Business Intelligence V10.1 Handbook . as shown in Figure 8-17.The third tab shows recently run reports by thumbnails. In this example. Lynn searches for Sales reports as shown in Figure 8-19.. 1 Handbook . Figure 8-21 Zooming function 8. Figure 8-20 Text prompt You can use the zooming function to show report detail as shown in Figure 8-21.You can use the text prompt as shown in Figure 8-20. copying and moving the data to a new worksheet. Chapter 8. Cell formatting Additional custom styles are available for formatting cells.1 Features of IBM Cognos Analysis for Microsoft Excel This section introduces the features of IBM Cognos Analysis for Microsoft Excel. we introduce the features and a use case for IBM Cognos Analysis for Microsoft Excel. Actionable analytics everywhere 381 . In this chapter.common business intelligence portal and can improve the user experience for financial analysts who work with a variety of data sources. You can save an exploration as a web report. You can use the calculation function without converting to formulas. You can modify attributes. and IBM Cognos Analysis Studio. you can rename column and row headings. such as IBM Cognos Analysis Studio. which enables you to create and maintain reports using advanced functions in an easy-to-use environment with drop zones. Calculation Calculations are now supported for explorations and lists. When you convert your exploration. such as totals and percentage change between years. through the Microsoft Excel function by clicking Style from the Format menu.4. 8. After items are placed in the cells of a worksheet. which enables Microsoft Excel users to author reports in Microsoft Excel and distribute them as secured web reports without the additional step of using a studio package. IBM Cognos Report Studio. and then save the changes to a template to use again. such as IBM Cognos . such as font and alignment. You can gain access to IBM Cognos Analysis Studio styles. You can open these Microsoft Excel reports using IBM Cognos Business Insight Advance. Publish Microsoft Excel reports You can publish explorations and lists directly to IBM Cognos Connection. In addition. and you can reorder items.Measure Summary. The IBM Cognos styles are listed along with default Microsoft Excel styles. You can add business calculations. you can convert an exploration to a formula. you have the option of converting data on the current worksheet. or specifying the location for the converted data.Calculated Row Name or IBM Cognos . column. 8. Time to column. Figure 8-22 Create an exploration 382 IBM Cognos Business Intelligence V10. Comments You can add and preserve user comments and values. You can create Microsoft Excel calculations for the entire row. First. create a crosstab report with IBM Cognos Analysis for Microsoft Excel. these comments and values are not deleted.2 IBM Cognos Analysis for Microsoft Excel use case Lynn Cope is an Advanced Business User who wants to create a sales summary report in Microsoft Excel. To allow users to use the IBM Cognos Analysis for Microsoft Excel feature: 1.User-defined rows and columns You can add user-defined rows and columns in the middle of explorations and lists to add calculations. and insert Product to row. You can also add blank rows and columns in the middle of explorations or lists to enhance readability.1 Handbook .4. Receiving the data as unformatted data can speeds processing time. create an exploration. You can change the format of data that is received from the IBM Cognos BI server to CSV. Create a sales report. Revenue to data in [GO Data Warehouse(analysis)]-[Sales and Marketing(analysis)]-[Sales] as shown in Figure 8-22. If you refresh the data in a Microsoft Excel sheet. Then. Performance A streaming data mode for list-oriented queries supports large volumes of data requests with speed. or block. Figure 8-24 Calculated column Chapter 8.2006 as shown in Figure 8-23. press Ctrl while you click the 2007. First. 2006 cell. click the calculation button.2. add a column to show the difference of revenue between 2006 and 2007. Figure 8-23 Add a calculation Figure 8-24 shows a new column that reports the difference between 2007 revenue and 2006 revenue. Actionable analytics everywhere 383 . Add a calculation. Then. and select 2007 . 3. Figure 8-25 Change name and order 384 IBM Cognos Business Intelligence V10. Change the new column name to Latest Difference. Then.1 Handbook . order the columns by right-clicking the year cell (for example 2004) and clicking IBM Cognos Analysis Reorder / Rename (see Figure 8-25). Figure 8-27 User-defined column Chapter 8. Figure 8-26 Cell formatting 4. and create formula. and changing cell attributes. Actionable analytics everywhere 385 . text. Add rows and columns by clicking the Insert User Row / Column icon. You can reflect the cell attribute to other cells by selecting the appropriate Style name in the Style window.You can change the cell format by clicking the Camping Equipment cell and clicking Format Style Modify as shown in Figure 8-26. shown in Figure 8-27. Figure 8-28 Add comment 6. Add comments to appropriate cells (see Figure 8-28).5. Figure 8-29 Publish 386 IBM Cognos Business Intelligence V10. Publish the Microsoft Excel report to IBM Cognos Connection as shown in Figure 8-29.1 Handbook . 5 Business driven workflow In this version. The enhanced event management features of this version permit event authors to configure tasks to be assigned to individual users or groups of users.Figure 8-30 shows the published Microsoft Excel report in IBM Cognos Connection. These tasks can include expectations around when work on a task must be started by and completed by. However. Figure 8-30 Published Microsoft Excel report in IBM Cognos Connection 8. or they can request that a user decide how the agent should proceed to execute configured tasks based upon the user's analysis of or reaction to the event condition or task contents. you cannot define how users are expected to respond to the event. user interaction with these events was provided only using email and IBM Cognos portal news items. In this section.1 Enhanced event management The IBM Cognos Platform includes a new service to support enhanced event management functionality called the Human Task Service. In addition. In previous versions. event authors could configure agents that detected events within a business intelligence data source and that took action based upon reconfigured criteria. we introduce WS-Human Tasks and features and provide a use case of IBM Cognos Event Studio and My Inbox.5. 8. IBM Cognos Platform introduces the ability to encompass user actions into business intelligence events and processes in a way that can be managed and audited. With email and news item posts. This service is based upon an open specification called WS-Human Tasks. IBM is leading the working Chapter 8. Tasks can request approval for actions to be taken based upon an event. you cannot capture what a user does with information that is provided by the event agent. Actionable analytics everywhere 387 . Ad-hoc task You can create an ad-hoc task to send a task to the task inbox of the recipients you specify. You can add deadlines to an ad-hoc task when you create it. see the IBM Cognos Administration and Security Guide.1 Handbook . You can include content.group to define the WS-Human Task standards along with participation from other web standards community members. in a notification request. The My Inbox area of IBM Cognos Connection (notification requests and ad-hoc tasks) A watch rule set up for a report (notification requests only) For more information. such as report output. Notification request task You can create a notification request task to an agent to send a secure notification about an event to the inbox of specified recipients in IBM Cognos BI. IBM Cognos BI includes the following types of human tasks that you can see in the task inbox: Approval requests Ad-hoc tasks Notification requests You can create tasks from the following components: IBM Cognos Event Studio (notification requests and approval requests) For more information. by updating the task from their task inbox. see the IBM Cognos Event Studio User Guide. My Inbox A task inbox contains the following human tasks: Notification task You can also create a notification request task in My Inbox. Alternatively. 388 IBM Cognos Business Intelligence V10. This task sends an approval request related to an event to the task inbox of specified recipients in IBM Cognos BI. potential owners or stakeholders can add deadlines at a later date. Features of IBM Cognos Event Studio You can create the following human tasks in IBM Cognos Event Studio: Approval request task You can create an approval request task to an agent when you want an event to occur only after approval. it must be approved by the Sam Carter. Actionable analytics everywhere 389 . To submit the report for approval. Lynn Cope is a Professional Report Author who wants to take a sales report definition and burst it into reports for the following countries: USA Japan Brazil Before the bursted report is sent. perform the following: 1. Approval Request scenario In this example. Figure 8-31 Task list Chapter 8. for a quality check. the Administrator. we provide two use cases that use the human task service. Launch the IBM Cognos Event Studio with Go Data Warehouse (analysis) package and add the Run a report task as shown in Figure 8-31.5.2 Human task service use case In this section.8. Figure 8-32 Burst report task 390 IBM Cognos Business Intelligence V10.1 Handbook .2. Select the burst report. and change settings as shown in Figure 8-32. Figure 8-33 Approval request task Chapter 8. Actionable analytics everywhere 391 . and attach the bursted reports as shown in Figure 8-33. and set Sam Carter as a potential owner.3. Enter a subject and body. Add Run an approval request. Priority.4.1 Handbook . Task Owner Action as shown in Figure 8-34. Icon. For more information. see the IBM Cognos Event Studio User Guide. Options (Send email or not on each phase). You can select Due Dates. Figure 8-34 Approval request task options 392 IBM Cognos Business Intelligence V10. Depending on the data source that you use. provides better query performance. This cache is data source and user specific and can be shared across report processes that are running on the same dispatcher. the Dynamic Query Mode offers different performance optimizations to improve the speed of data analysis. Table 9-1 lists these optimizations. These improvements benefit the query planning. such as metadata and data requests. 9. we provide a basic overview of the high performance in-memory query mode known as Dynamic Query Mode.1.1 Overview of Dynamic Query Mode In this section. This caching results in fewer request sent to the underlying data source and. 404 IBM Cognos Business Intelligence V10. thus.1 What is Dynamic Query Mode Dynamic Query Mode is an enhanced Java-based query execution mode that addresses increasing query complexity and data volumes through key query optimizations and in-memory caching. the Dynamic Query Mode caches the results. query execution. for future re-use. whether those results are metadata or data.. and results that are returned while maintaining the security context.9.1 Handbook . As these requests return. a cache is built. to be made to the data source. Running and building reports requires several requests. create a list report that contains an Order Method and link a crosstab inside this list to display detailed information in the context of this particular Order Method. In Compatible Query Mode. Enhanced null suppression Deeply nested reports generate large amounts of cells. Query visualizations To get the best performance possible from your IBM Cognos investment. the master query is pushed as a separate edge to the detail query. Chapter 9. With the Dynamic Query Mode. the underlying data source has to endure high work loads. there is a higher probability that null values can occur where the relationship between the nested edges returns no data. The higher the amount of cells. These issues can make reports large and difficult to read.4. resulting in only one query sent to the data source for all output formats. Optimized master-detail relationships A master-detail relationship links information and queries from the following types of data objects within a report: A master data object A detail data object Using a master-detail relationship. which can impact performance. Enterprise ready performance and scalability 405 . for example. refer to 9. Thus. these master-detail relationships generate a separate query for every element in the master result set. IBM Cognos Query Studio. IBM Cognos Business Insight Advance. it is important that you can troubleshoot unexpected results or slow run times easily. You can.Dynamic Query Mode cache: The Dynamic Query Mode cache is not maintained for packages that are based on IBM Cognos TM1 cubes. The Dynamic Query Analyzer allows for easy access and analysis of Dynamic Query Mode log files using a graphical user interface. the longer it takes for the report to evaluate which rows and columns contain only null values. because IBM Cognos TM1 implements its own caching. In addition. and IBM Cognos Report Studio include an enhanced suppression feature that can reduce the amount of cells that need to be evaluated to achieve the desired result. “Analyzing queries” on page 424. For more information about this tool. you can use a single report to display information that normally would take multiple reports. for example. The implementation of various caching containers allows report authors and analysis users to take advantage of another performance optimization. The cache allows for report authors to make minor modifications.1. Analysis users also benefit from caching but in a slightly different way. For Dynamic Query Mode.3 Technical overview To truly understand the nature of the features in Dynamic Query Mode. Thus. 9. Changing a reports output format from.2 Why use Dynamic Query Mode Using Dynamic Query Mode and its features offers some significant benefits to the IBM Cognos administrator. CSV to PDF format does not trigger a new query to the data source because all that data is already in the cache. we need to take a quick look at how the query mode is built. which results in faster executing queries. the 64-bit JVM is capable of addressing more virtual memory than its 32-bit variant. In case the added calculation is based on measures already present in the initial report. With the introduction of Dynamic Query Mode. to a report without this change resulting in another query to the underlying data source. Implementing the query mode in Java allows it to take advantage of a 64-bit enabled Java Virtual Machine (JVM). The query mode is also streamlined to take advantage of the metadata and query plan cache.1. Dynamic Query Mode is a Java-based query mode that addresses the increasing query complexity and data volumes.1 Handbook . This increase in 406 IBM Cognos Business Intelligence V10. the modification can be performed on the measures already in cache. running in a 64-bit JVM provides the advantage of an increased size of the address space. The nature of analyzing data requires a lot of metadata requests to present results to the user. which results in faster navigation and exploration of the hierarchy. more types of metadata results can be cached.9. such as adding a calculation. These requests can create a high load on the underlying data source. affecting both speed and performance.. The same is true for executing reports in different output formats. To improve performance and reduce interference with the dispatcher or content manager. the results are passed onto the report service to render the report. during the planning phase.addressable memory allows Dynamic Query Mode to maintain more of the metadata and data cache in memory as long as needed. the plan tree is transformed in to a run tree and is now ready for execution by the execution layer. Enterprise ready performance and scalability 407 . the results from the planning phase and execution phase are placed into the respective layer’s cache container. query transformations can be performed. it converts this request into a tree structure called a plan tree. Both layers have security-aware. It is these transformations that allow the query mode to generate customized and enhanced MDX that is specific to your OLAP source. When the planning iterations are complete. The execution layer executes and processes the result from the planning phase during the execution phase. After this conversion is complete. This process can take several iterations to finish. No Java heap memory space is shared with the content manager or dispatcher. which enables the Dynamic Query Mode cache to use as many resources as possible. Every time a query is executed. Dynamic Query mode is spawned in its own JVM instance as a child process of the dispatcher. After the execution layer completes its process. the tree can be passed on to the transformation layer so that the query planning can begin. Dynamic Query Mode consists of the following main components: The transformation layer The execution layer The transformation layer provides for a runtime environment where. These layers reuse data from the cache only if the data that is needed exists and if the users security profile matches. From a software architecture point of view. When Dynamic Query Mode receives a query request. The transformation layer then goes through every node on this tree and checks for nodes that qualify for transformation. Chapter 9. self learning caching facilities for improved performance. These transformations that implement the query planning logic are contained within separate transformation libraries and are called by the transformation layer to execute the node conversions. you need to make configuration changes. 4. 408 IBM Cognos Business Intelligence V10. IBM Cognos TM1. prior to a data source connection and before a package can be created. The connection can be used later when creating the IBM Cognos Framework Manager model and package. Choose IBM Cognos TM1 as the as data source type. that comes with the IBM Cognos Business Intelligence (BI) version 10 samples package.9.1 Handbook .1 Creating a connection in IBM Cognos Administration The first step in enabling Dynamic Query Mode connectivity. and click Next. we use the Great Outdoors sample database.2 Configuring Dynamic Query Mode For a package to use Dynamic Query Mode. In the Data Source Connections section. you need to install the appropriate database client software. Specify the data source name. click New Data Source. To create a connection: 1. you can also specify a description and tooltip for this entry. For the purpose of this example. is to create a data source connection to the OLAP database. Figure 9-1 Launch IBM Cognos Administration 2. Open IBM Cognos Administration by clicking Launch IBM Cognos Administration as shown in Figure 9-1. 3. As with Compatible Query Mode. 9. Click the Configuration tab. 5. Optionally.2. after installing the database client software. and click Next. 2. when using Dynamic Query Mode. Using multiple data sources: With IBM Cognos Framework Manager. the publish will not succeed. However. Creating an IBM Cognos Framework Manager project and package to use with Dynamic Query Mode is similar to creating those for Compatible Query Mode. all data sources that are referenced in the package must be supported by the query mode. and click OK. Return to the page where you entered the connection string details. Give the project a name. Open IBM Cognos Framework Manager. you can include and mix multiple data sources in a package. Otherwise. Chapter 9. Note that the result page now shows a successful state for both Compatible Query Mode and Dynamic Query Mode. 9. you can create an IBM Cognos Framework Manager model and import cubes to publish to IBM Cognos Connection as a package. and complete the required credentials. Enterprise ready performance and scalability 409 . At the end of the publishing wizard. To create a new project and publish the default package using the Dynamic Query Mode. and click Finish to end the wizard.2. Click Test the connection to verify the current configuration. as illustrated in Figure 9-2.2 Creating a package in IBM Cognos Framework Manager After you create the connection to the OLAP database server.6. you need to specify to use Dynamic Query Mode. such as Administration host and server name. Specify the IBM Cognos TM1 connection string details. Figure 9-2 Connection test 7. follow these steps: 1. and click the Create a new project link. 410 IBM Cognos Business Intelligence V10.1. “Creating a connection in IBM Cognos Administration” on page 408. Figure 9-3 Metadata source 4.3.2. Choose the data source that you created in 9. IBM Cognos Framework Manager presents a list of supported metadata sources from which you can choose.1 Handbook . Choose the plan_Report cube. and click Next to continue. 5. and click Next. Choose Data Sources. and click Next as shown in Figure 9-3. Chapter 9. and click Yes on the subsequent prompt to launch the package Publish wizard. as shown in Figure 9-4. Give the package a name. Verify that the “Create default a package” option is selected. IBM Cognos Framework Manager has detected that no additional modeling is required and suggests that a package is created for publishing. At this point. Figure 9-4 Create a default package 7. Enterprise ready performance and scalability 411 .Finish window. and click Finish. Continue until you reach the Metadata Wizard .6. If the package is published. Then. 10.8. select the “Use Dynamic Query Mode” option.1 Handbook . as shown in Figure 9-6. the final window of the publishing wizard displays. Figure 9-5 Use Dynamic Query Mode 9.After the package is published and available in IBM Cognos Connection. Click Finish. Click Next until you reach the Options page of the Publish wizard. click the package’s properties icon to verify that the query mode is in use. and click Publish as shown in Figure 9-5. Figure 9-6 Package properties 412 IBM Cognos Business Intelligence V10. based on Compatible Query Mode.9. With the introduction of Dynamic Query Mode. If you take these two features into consideration.2. You can enable IBM Cognos Lifecycle Manager the Dynamic Query Mode on either a global project level or on a individual package basis. An additional advantage to this approach is that you are not affecting any packages and reports that users currently access. onto Dynamic Query Mode. Enterprise ready performance and scalability 413 .3 Transitioning to Dynamic Query Mode using IBM Cognos Lifecycle Manager IBM Cognos Lifecycle Manager assists you and enables you to be successful in the critical process of verifying upgrades from IBM Cognos ReportNet®. Chapter 9. IBM Cognos Lifecycle Manager is also a great tool to identify any issues with the transition of your current IBM Cognos version 10 packages and reports. or IBM Cognos BI version 10 to IBM Cognos BI version 10. IBM Cognos Lifecycle Manager also provides the possibility to verify and compare reports using this query mode. previous versions of IBM Cognos 8. It provides a proven practice upgrade process where you execute and compare report results from two different IBM Cognos releases to let you identify upgrade issues quickly. 414 IBM Cognos Business Intelligence V10.To enable the use of the Dynamic Query Mode on all packages in an IBM Cognos Lifecycle Manager project.1 Handbook . The DQM Disabled option instructs IBM Cognos Lifecycle Manager to validate or execute all reports and packages in this project using Compatible Query Mode. one for the source environment and one for the target environment. and navigate to the Preferences tab as shown in Figure 9-7. click Settings Configure. Figure 9-7 IBM Cognos Lifecycle Manager project settings In the Dynamic Query Mode Options section. notice two drop-down lists where you can enable Dynamic Query Mode. You can now choose one of the following options: The Default option instructs IBM Cognos Lifecycle Manager to validate or execute reports and packages using the query mode that is specified on the individual package. Chapter 9. Figure 9-8 Specify query mode In the Options column.The DQM Enabled option instructs IBM Cognos Lifecycle Manager to validate or execute all reports and packages in this project using Dynamic Query Mode. By this we mean that knowing exactly what is going on in your system at any time and reacting to those events appropriately is essential for you to get the most out of your IBM Cognos investment. Testing note: Attempt testing against Dynamic Query Mode only if all data sources that are included in the package are supported by this query mode. Enterprise ready performance and scalability 415 . 9. the DQM in bold means that Dynamic Query Mode engine is enabled on this package. If you select the Default option. as shown in Figure 9-8. you can specify the query mode on the package views individually.3 Query Service Administration A vital part of running and maintaining a successful IBM Cognos implementation is administration. Double-clicking DQM disables the use of the new query mode and the DQM is no longer bold. Validating and executing packages that contain unsupported data sources will fail. 1 Handbook .3. all metrics record performance information. exposed as the Query Service in IBM Cognos Administration.IBM Cognos Administration allows for easy monitoring. but no thresholds are configured because acceptable threshold values depend on the IBM Cognos operating environment and need to be configured accordingly. a starting point of a new state. new metrics and tuning options are added. as shown in Figure 9-9. Figure 9-9 IBM Cognos Administration 9. in IBM Cognos Administration by opening the Metrics pane for the respective service. By default. With the addition of Dynamic Query Mode.1 Query Service metrics You can monitor and configure the Query Service status and its thresholds. and tuning of services that re available in the IBM Cognos instance. configuring. 416 IBM Cognos Business Intelligence V10. Enterprise ready performance and scalability 417 . Dynamic Query Mode includes a self-learning in-memory cache. 9.2 Manage the cache in IBM Cognos Administration To increase the performance of recurring reports and to minimize the load on underlying data sources. Sample agents that monitor the audit database for threshold violations and perform common actions when violations are detected are included in the audit samples package.3. The query mode can store the data cache in memory as long as needed. One side effect that stems from caching metadata and data request on an ever-changing data source is the possibility that the data that is contained in the Chapter 9. IBM Cognos Administration includes flexible cache maintenance features. After this task runs.cache has become old and stale. To help overcome this issue.. This issue leads to reports that do not display the most recent data. a new file is created in the . You can locate the first feature by clicking Configuration Query Service Caching as depicted in Figure 9-10.xml 418 IBM Cognos Business Intelligence V10. The file name adheres to the following template: SALDump_<datasource>_<catalog>_<cube>_<timestamp>. Figure 9-10 Query Service Caching This new entry in the IBM Cognos Administration tool allows the administrator to clear the cache and write cache statistics to file on a Server Group basis in a ad-hoc fashion.1 Handbook .xml Example 9-1 shows an example of this file. If you write the cache statistics disk. Example 9-1 Server group cache statistics file SALDUMP_all_all_all_1283781787890. all report servers in the selected server group that host a Query Service clear the cache or dump the statistics to a file./logs/XQE/ folder on all IBM Cognos servers in that particular server group that host an instance of the Query Service. This package is based of the GODB cube using the Essbase data source Essbase_DAN. Chapter 9.Figure 9-11 shown an example of the content of this file. Figure 9-11 Cache state This example illustrates a cache state that contains metrics for a package called DQM_GODB . notice that for this package. Under the Cache Metrics comment. Enterprise ready performance and scalability 419 .DAN. 285 query requests were issued with five requests not being fulfilled by the package cache. Figure 9-12 Query Service Administration task The cache maintenance tasks that you can create are the same as under the Query Service Caching section. catalog. Figure 9-13 Query Service Administration task options 420 IBM Cognos Business Intelligence V10.1 Handbook .Other than clearing the cache per Server Group. with the only difference being the granularity. You can locate these tasks by clicking Configuration Content Administration as shown in Figure 9-12. you can now also create or schedule Query Service Administration tasks. all report servers that host a Query Service clear the cache or dump the statistics to file. After this task runs. You can schedule these tasks to clear or to write statistics to file based on data source. and cube as shown in Figure 9-13. SALDump_<datasource>_<catalog>_<cube>_<timestamp>. a task that is clearing the cache will dump a a file according to the following template as shown in Example 9-2. Enterprise ready performance and scalability 421 . This dialog box allows you to modify logging information and connection time-out.xml 9.xml Example 9-2 Individual cache statistics file SALDUMP_Essbase_DAN_GODB_GODB_1283781787890. Figure 9-14 Query Service properties Chapter 9.3. there is another area in IBM Cognos Administration that deals with the administration of the Query Service. You can locate this dialog box by clicking Configuration Dispatchers and Services Query Service properties as illustrated in Figure 9-14. For example.3 Query Service settings In addition to the cache maintenance dialog boxes.You can determine the values that you need to enter here by examining Figure 9-11 on page 419. Figure 9-15 shows the Settings tab within this dialog box.1 Handbook . Query execution trace This switch toggles the recording of the run tree or also known as the query execution phase. Figure 9-15 Query Service settings The Settings tab allows you to modify the following settings: Audit Logging level Controls the amount of audit information that is recorded for this service. 422 IBM Cognos Business Intelligence V10. Query plan trace This switch toggles the recording of the plan tree or also known as the query planning phase. the more it degrades system performance. The higher you set the logging level. 3. Open IBM Cognos Configuration. Click the IBM Cognos services entry under the Environment section. Idle connection timeout This setting controls how long connections can be idle for before being terminated. Example 9-3 Model file GreatOutdoors. See Example 9-3.Write model to file This switch toggles the model information to be written to file for a given package when a report is run against it.txt and is typically requested by Customer Support as an aid in troubleshooting. The file will be saved in the .4 Disabling the Query Service The Query Service is spawned as a child process of the dispatcher JVM process and.txt Disable query plan cache This switch toggles the caching of the plan tree or also known as the query planning phase. 3. If for some reason you do not use the Query Service. as with other process. it takes up memory and resources. and set this to False. To disable the Query Service: 1.. 9. 2. Enterprise ready performance and scalability 423 . Chapter 9. 4./logs/XQE/model/ folder as <packagename>. Save and restart the IBM Cognos Service. disable this service so that the resources that might be used by the Query Service can be used by other components running on this instance. Find the Query Service enabled entry. rather than looking through text-based log files.Figure 9-16 shows where in IBM Cognos Configuration you can disable the Query Service to give those expensive resources back to the system. Modelers and professional report authors can use this tool to tune and improve the model and reports that they build.1 Handbook .4 Analyzing queries This section introduces Dynamic Query Analyzer. This feature allows for a better understanding when it comes to important query decisions. Figure 9-16 Disable the Query Service 9. 424 IBM Cognos Business Intelligence V10. 9.4.1 What is Dynamic Query Analyzer Dynamic Query Analyzer provides a graphical flow representation of the dynamic query run tree. 3.4. a new folder is created in the .. “Query Service settings” on page 421. shown in Example 9-4. you need to configure Dynamic Query Mode to log the run trees to a file for every query that it handles. The new folder is labeled according to the <date>_<time>_<reportname> template.9. Example 9-4 Query plan trace folder 20100901_16h56m243s_Quantity_Per_Year Chapter 9.2 Working with Dynamic Query Analyzer As a prerequisite. You can find more information about enabling this query execution trace in 9. After this setting is applied. and contains the trace files that can be interpreted with Dynamic Query Analyzer./logs/XQE/ folder for every report that is executed using this query mode. Enterprise ready performance and scalability 425 .3. 426 IBM Cognos Business Intelligence V10. you can also specify IBM Cognos version 10 server and authentication information. You can launch the Preferences dialog box by clicking Window Preferences. Figure 9-17 Dynamic Query Analyzer preferences Note that in case the remote location is secured. you can also specify credentials to use for authenticating to that remote location.. Other than the Remote Log Access.The tool can open these file types either from the local file system or remotely using the HTTP protocol. Supplying this information enables Dynamic Query Analyzer to browse the content manager and run reports from within the tool./logs/XQE folder. In the case of a web server. create a virtual directory pointing to the . and amend Dynamic Query Analyzer Remote Log Access preferences as shown in Figure 9-17.1 Handbook . Enterprise ready performance and scalability 427 .By default. Expand Navigation (Figure 9-18). 2. and double-click Content Store to add the view. Click Window Show View. You can add this view by opening the Show View dialog box: 1. the Content Store view does not display. Figure 9-18 Show View dialog box Chapter 9. 1 Handbook . the view displays the packages and reports that are available in the Content Store. This view is similar to the view shown in Figure 9-19.A new view is added to the Dynamic Query Analyzer interface. Figure 9-19 Content Store view 428 IBM Cognos Business Intelligence V10. If you entered the server information in the Preferences dialog box (Figure 9-17 on page 426) correctly. Enterprise ready performance and scalability 429 . Double-clicking the Runtree entry opens the trace (Figure 9-20) in the same way as when using File Open log.Expanding reports entries that have been run with the Query execution trace enabled will display the trace entries found in logs folder as shown in Figure 9-19 on page 428. Figure 9-20 Query run tree Chapter 9. which can be exported by clicking File Export Graph. The first view is the Graph Navigation view. which displays the same run tree in another graphical tree that is easily expanded or collapsed.Apart from the Tree Graph view. there two more views that can be of great interest when analyzing report queues. shown on the right side in Figure 9-21. shown on the left side in Figure 9-21. Figure 9-21 Graph Navigation and Query views The second view is the Query view.1 Handbook . which displays the data source specific query in a conveniently formatted syntax. 430 IBM Cognos Business Intelligence V10. All rights reserved.10 Chapter 10.1 from a previous release Using the administrative features Managing the environment Auditing © Copyright IBM Corp.1 release. The focus is broken into the following main topics: IBM Cognos Administration overview Moving to IBM Cognos BI version 10. we discuss new administration capabilities introduced as part of the IBM Cognos Business Intelligence (BI) version 10. IBM Cognos system administration In this chapter. 431 . 2010. 1. any way in which to reduce the time and effort to administer and maintain enterprise applications becomes a strategic gain. which means going beyond the fundamentals. networks) that must all work together to provide a positive user experience. IT publications often compare IT’s job and the managing of enterprise applications to conducting an orchestra. If this happens. IT has lost user buy-in and.1 Handbook . In this way. IT can be to your company what high-tech firms have been to the economy—a catalyst for change and an engine driving rapid growth. servers. Out of tune. or worse. Table 10-1 System administration capabilities Category Knowing the business intelligence system System administration capability Understand usage patterns. most likely. Why? Technology and information have become so important to how companies operate that even small changes can dramatically affect your ability to manage the performance of the business. As noted in The Performance Manager: Proven Strategies for Tuning Information into Higher Business Performance (ISBN-10: 0973012412). If IT spends all of its time and resources ensuring service commitments. Understand the business expectations.1 IBM Cognos Administration overview Meeting service commitments to the business and anticipating and responding to changing business requirements—all within tight budget constraints—are fundamental IT tasks. IT also has a strategic role to play. it can become an immediate distraction.1 IBM Cognos Administration capabilities IBM Cognos Administration provides capabilities for IT professionals to manage their business analytics systems proactively to prevent problems before they occur. 432 IBM Cognos Business Intelligence V10.10. These system administration capabilities (Table 10-1) let IT address the important considerations necessary to exceed commitments to the business while respecting budgetary and other resource constraints. Working in concert. Understand the IBM Cognos BI system environment. the application can become a critical part of the business. a critical failure. something deemed untrustworthy by users. 10. a portion of its return on investment. There are multiple moving parts (databases. it is impossible to initiate and support more strategic opportunities. Certain patterns are more obvious and better defined. certain metrics provide a good indication of how well the business intelligence solution is adapting to how people use it. managing a centrally located user community that distributes pre-generated reports over email is not the same as managing a group of users who are always on the road and who want to access all information with a mobile device. Number of processed requests This metric provides the number of requests received at a specific point in time. Looking at processed requests alone provides a sense of magnitude in terms of system usage. it does provide insight into how many people choose to use the system. They are unique to the cycle of how the organization gathers information. For example. Whereas this does not tell you how the business is using the system. Whereas no one metric provides a complete picture of the system. Others vary depending on the industry or the culture of how the organization communicates. reviews it. and how they use the solution. and distributes it. IBM Cognos system administration 433 . To gain a better understanding of usage patterns. where these users are located. quarter-end and year-end typically generate extra system activity for most departments. Understand usage patterns Understanding usage patterns is important for both troubleshooting immediate system issues and for performance-tuning activities over the life cycle across the many components of the business intelligence system. Understanding usage patterns means knowing the number of users that access a system at any given period of time. For example. Chapter 10. What are the peak periods versus the slower periods? How much are business intelligence applications being used? This is useful for determining optimal times to schedule batch reporting. these metric examples are a starting place for tracking usage patterns: Number of sessions This system-level metric provides the number of user sessions actively logged onto the system. There is no one simple approach to understanding usage patterns. how much time they spend using the solution. Track and evolve over time.Category Resolving and preventing issues System administration capability Determine what thresholds to address. A high number of queue requests might indicate a high volume of system activity at a particular point in time or an issue that needs to be addressed. As the solution expands. You might have decided to dedicate a particular server to running reports that are processing intensive or you might have allocated a local server for a geographic location without adequate network access. an IBM Cognos BI system administrator can determine whether this is regular activity or an anomaly that needs explanation and potential action. As the organization extends the IBM Cognos BI system.1 Handbook . If queue times increase over a short period. you might have initially deployed business intelligence in a centralized server environment with certain affinities in place to handle usage patterns for the initial deployment. it indicates more system activity and longer waits. The algorithm for this metric was devised to provide a real measure that is not impacted by periods of inactivity. With a more consistent and deeper understanding of usage patterns. it should monitor the initial deployment strategy to ensure that it still fits the current deployment landscape. For example. This metric is useful for determining and tracking server throughput. there might be a change to the usage patterns that requires further investigation. To better understand the overall health of the business intelligence system environment. If one dispatcher is handling a 434 IBM Cognos Business Intelligence V10. This is a useful metric to monitor for changes on a regular basis.Number of queue requests This metric provides the number of requests that have gone through the queue. consider the following metrics: Successful requests per minute This metric shows the average amount of successful requests relative to the amount of processing time it took to execute them. Longest time in queue The time in queue high watermark metric provides the longest time that a request has been in the queue. This flexible platform offers many deployment options based on the preferred IT infrastructure and enterprise architecture strategy. Understand IBM Cognos BI system environment IBM Cognos BI is built on a modern service-oriented architecture (SOA) platform. the assumptions driving the initial architecture infrastructure might change. You might need to revisit them to ensure optimal solution performance. As it increases. Number of processed requests per dispatcher The number of processed requests per dispatcher is a good indicator of load balance in the business intelligence system. if an organization is trying to reduce costs through process optimization. and lead to support calls. Is this a deliberate configuration choice based on the usage patterns. IT needs to keep the communication channels open with business owners and ensure that priorities align with organizational strategy. Thresholds make IT proactive. IBM Cognos system administration 435 . the thresholds to set. For example. Ensuring that critical call center information is readily available on demand will be at the top of the priority list. By contrast. or does it require further review? Percentage of failed requests This metric provides the percentage of failed requests based on the total number of requests handled. is important to effective system management. This metric gives you trending information over longer periods of time to understand how the business intelligence services are performing. users might wonder whether there is a system issue. Taking time to understand what metrics are vital for system management of your business intelligence solution is essential before setting any thresholds. There can be hundreds of system metrics. For example. IT is no different from the users it supports. but monitoring failure rates would be key to ensuring that they are delivered in time to enable a streamlined process. Business expectations set the agenda for what metrics to track. IT can flag issues before they affect users. These reports might not demand faster response times. a company’s strategy might center on customer service with an objective to improve call center performance. If queue and wait times increase. you need to understand why. Identifying thresholds for those metrics simplifies IT’s task (and communication with business owners) by giving the context to determine when to take action. if the longest time in queue starts increasing.heavier load. and how to prioritize follow-up actions. Determine what thresholds to address Setting metrics and gathering data on usage patterns and technology environments and understanding business expectations. it might require further investigation. IT would want to monitor and ensure system uptime and report response times related to the call centers. breach SLAs. Too much information makes taking the right course of action as difficult to determine as having no information at all. Having an agreed-upon threshold on this metric Chapter 10. Understand the business expectations Whereas formal service level agreements (SLAs) provide a structured approach to communicate and set system expectations. then weekly or monthly reports are critical to manage. analysis. and analyze usage patterns and key aspects of the business intelligence system environment. With this information. To accomplish this. Users would know the threshold and also know that their IT department is dealing with the issue. and alerts to deliver the correct information to drive improved decisions within the IT department. Task-oriented system monitoring gives administrators a new. Summary: Five steps to effective business intelligence system management To effectively manage their business intelligence solution. and improve service standards. IT needs business intelligence reporting on its system information. IT has the facility to adapt to changes in usage and new business needs. Metrics provide IT and business users with insight into changing usage patterns and technology environments over time. consolidated view 436 IBM Cognos Business Intelligence V10. The next consideration for system management is making system metrics work for IT and the business over the long term. IT professionals can use this data to initiate conversations with their business partners—bridging technology and information requirements—to stay in touch with user expectations and service commitments. Track and evolve over time After IT has identified key metrics and set thresholds. meet.1 Handbook . it can respond to current situations proactively to avoid business disruption. business intelligence administrators and IT professionals gain new facilities to manage the health of the business intelligence system. As described in The Performance Manager. IT managers need to understand their business intelligence solution: Usage patterns Business intelligence system environment User expectations It also means being able to resolve problems and take actions quickly to prevent issues from occurring. reports. set thresholds. IT needs to monitor metrics. IT can tune the business intelligence solution and adapt metrics and thresholds to maintain.would identify the point when IT needs to take further action to understand what is happening. Better IT decisions can affect everyone across the organization. and the roadmap to more effective performance management. To do this. This becomes the means to drive continuous improvement in the performance of your business intelligence solution. IT must use dashboards. scorecards. With IBM Cognos BI. proactively manage the system. IBM Cognos BI. IBM Cognos system administration 437 . IT can deliver on its fundamental tasks (that is. meeting service-level commitments and responding to changing business requirements within budgetary constraints) and have the capacity to drive strategic objectives. In this way. Proactive administration through detailed system metrics and the ability to set thresholds that can be monitored let IT professionals identify and correct anomalies. web-based administration console that provides administrators with the tools that are necessary to manage the IBM Cognos application. To launch the administration console. With these system management capabilities. IT can realize its full potential as leaders and change agents within organizations.2 The IBM Cognos Administration user interface IBM Cognos BI provides a centralized. 10. and respond to new requirements while meeting on-time service commitments.of all system activity. using the IBM Cognos Platform.1.. delivers broad system management for IT to confidently deploy business intelligence. called tasks.1 Handbook . Figure 10-3 Administration console tabs 438 IBM Cognos Business Intelligence V10. on the left side of the user interface. a summary graph displays all of the current objects and the state that they are in. which have executed in the past. or suspended state. In addition to the object execution details. and those that have been slated to execute in the future. IBM Cognos system administration 439 . waiting. 1. To change the display in the right part of the interface. the Status tab provides a health check of the overall IBM Cognos environment (Figure 10-4). Toggle between the background activities and interactive activities by selecting the appropriate radio button. The default view displays what is currently being handled through the background (batch) processes.Status tab The Status tab is designed to provide administrators with the visibility and insight into which objects are currently running both interactively and in the background (scheduled or batch). Looking at the top of the Current Activities interface. click Apply. Figure 10-4 Status tab and the associated tasks Current activities task The current activities task exposes all the objects in the environment (interactive or background) that are currently running in an executing. Locate the Filter frame in the lower-left side of the page. 3. 2. It is possible to toggle between background and interactive activities. Chapter 10. but it is not possible to view both simultaneously. pending. Keep in mind that the details that are shown might differ from task to task due to the nature of the task and the level of information available to the task. click the Show Details icon on the toolbar. 440 IBM Cognos Business Intelligence V10. Looking at an entry. This expands the list to include a second line of detail.1 Handbook . in addition to the summary chart. Conversely.Focusing first on the background activities. the Hide Details icon removes the additional line of detail.. all of the objects currently in the system display in a paginated list. To see more details about the object. import. and after the options have been determined. the current state that it is in. and the priority that has been assigned to the object.To help reduce the number of objects displaying or to quickly isolate and focus in on particular objects. agent. IBM Cognos system administration 441 . Clicking the Advanced options link allows for filtering by the owner of an object being executed. click Apply for the result set to be updated. report. Any single filter option or a combination of options can be selected. and scope (package or folder in which the object resides). a dispatcher (which provides administrators with the insight to identify which dispatcher is handling which objects). Figure 10-6 List of filters available to help reduce the results displayed in the list The default filter options allow the result set to be filtered by user running the object. a series of filter options are included in the Filter section in the lower-left frame (see Figure 10-6). Chapter 10. and so on). the type (job. Interactive requests do not record histories that can be displayed through this task. most of the level of detail that was available in the background activities view is still applicable. Either it is pending (queued) or is executing. Figure 10-7 Result list displaying past activities based on filter criteria The interface groups objects into three execution states: Succeeded Failed Cancelled The basic filter options permit filtering on predefined time periods or a user-defined custom period. this task displays objects that were executed in the past. As with the current activities task. with a couple of minor exceptions: The objects running interactively have fewer states.1 Handbook . The only default filter option available for the interactive view is the ability to filter by status. One important thing to note about this interface is that only the objects that were executed in the background will be recorded. the result set can be narrowed down to objects run by an individual user. you need to use the audit data (see Figure 10-7). For this type of information. The advanced options provide the ability to filter by dispatcher. Past Activities task As the name implies. 442 IBM Cognos Business Intelligence V10.Moving on to the interactive activities. An interactive chart was introduced to better represent the estimated pending load on the system. For more details regarding postponing scheduled executions.2. see 10.Upcoming activities task This task has gone through changes in the IBM Cognos release. it is possible to scroll between days by using the Next and Previous buttons beside the date at the top of the chart. This is accomplished by displaying an hourly breakdown of the amount of objects that have been scheduled to start in that particular hour timeslot (Figure 10-8). the currently applied filters are included above the list (Figure 10-9). Figure 10-8 Hourly breakdown of scheduled activities in the system In addition to the filter options on the left part of the interface. Chapter 10. This enables administrators to select a specific scheduled object and postpone the execution time. Beneath the chart is a filtered list of the individual activities that are scheduled to execute. Figure 10-9 List of scheduled objects based on the criteria set in the chart More information: Using the buttons to scroll the chart between days does not automatically change the filtered list. To provide visual context to the filtered list. Clicking a specific hour bar in the chart automatically filters the results in the list.4. “Reacting to bottlenecks due to unexpected events” on page 495. IBM Cognos system administration 443 . which can be at a later date. All other users have a default priority of 3 when defining a schedule. When the engine is ready to handle a new request it takes the oldest priority 1 request before it takes requests with a priority of 2 or higher. It means that the priority 1 request is executed first after the priority 5 request has completed executing. The System task interface is divided into three fragments: Scorecard: Left frame that displays a summary of the overall health of the components that make up the environment. Metrics: Upper-right frame that lists all of the metrics.1 Handbook .When creating a schedule. that pertains to the object in focus (from the scorecard fragment). Priority indicates in which order the dispatcher processes requests when items are queued. in the process of executing. privileged users can assign a priority of 1 (high) to 5 (low) for the object. Priority reports: Priority does not mean that a long-running priority 5 report execution. System task This task provides administrators with an overall glimpse of how the system is faring through the use of status indicators on a dashboard. is terminated when a priority 1 request is received. 444 IBM Cognos Business Intelligence V10. Settings: Lower-right frame that shows a read-only view of the configuration parameters that pertain to the object in focus. The default is to display the metrics for the overall system (environment). and their score. in a busy environment where report executions are submitted when the engine is at capacity. they will be placed into a queue and processed when the engine resources become available. That is. Besides the indicator lights that show the overall health of the object based on tolerance thresholds that can be applied to the metrics. as well as their corresponding metrics The comparative view. which allows administrators to navigate through the system topology to verify the health of the servers.The scorecard frame provides two views: The default standard view. dispatchers. the status of the object is also displayed. and services. Industry standard terms employed are: Partially available: Indicates that one or more of its children is unavailable Available: Indicates that the object is online Unavailable: Indicates that the object is offline or is not started Chapter 10. IBM Cognos system administration 445 . The sample shows that there are two servers that make up this particular environment.. Figure 10-11 Server dispatchers.In the previous example. Monitoring services side by side in the Scorecard view does not provide the ability to easily compare metrics across similar services in the environment. their overall health. The net effect is that the overall system status becomes partially available due to the fact that at least one child is unavailable. a comparative view that allows administrators to see certain predefined metrics as they pertain to related objects in one single view. There is. This maximizes the frame within the interface and provides a comparative view (Figure 10-12). server groups. and their current state. for example. and services. This drop-down menu allows for filtering of all servers. using the Change view button beside an entry allows the results to be filtered to obtain the desired view. the wottmassons server is online and available. each with a different status Besides the ability to drill up and down. provides a list of all report services. report service. Figure 10-12 Comparative view of services in the environment 446 IBM Cognos Business Intelligence V10.1 Handbook . however. The ability to perform metric comparisons is not be possible though unless you switch focus back and forth between report services. while the ca093489 server is partially available. which maintains the parent/child relationships. To access this view. Selecting a service. The underlying dispatchers and services can be viewed by drilling down on the server name. expand the scorecard frame by clicking Maximize. drilling down on the ca093489 server name reveals the dispatchers running on that server (Figure 10-11). as well as selecting individual services. For example. dispatchers. Figure 10-15 Detailed list of schedules in the system Chapter 10. The summary chart is grouped by status (Figure 10-14). who created the schedule. and the status and the priority assigned to the schedule (Figure 10-15).At first glance it is difficult to determine which dispatcher each of the report services belongs to. IBM Cognos system administration 447 . The parent dispatcher is visible by hovering over the service icon. Figure 10-14 Summary chart displaying the status of the schedules The result list shows the scheduled objects along with the last modified date. Figure 10-13 Tool tip on icon displays the dispatcher name Schedules task The schedules task displays all of the active (enabled or disabled) schedules in the environment and which user scheduled the object. which produces a tooltip with the parent’s name (Figure 10-13). created. and roles task This task allows administrators to create and manage application-specific groups and roles in the built-in Cognos namespace. are located on this tab. this task also provides the ability to create consistency checks and enhanced search index updates. not to be confused with security.Security tab The Security tab contains all of the tasks that are required for managing the namespaces and capabilities. In addition. or denied. and managed for the IBM Cognos BI solution. In addition to the content deployment objects. and then either execute or schedule them. The capabilities task is the tool that allows administrators to set the global capabilities that dictate which features and functionality are available to the users logging in to access the application. This helps to effectively distribute the administrative duties across users and groups. Items such as managing printers. The IBM Cognos BI release allows for a customizable approach to administration and responsibility so that various areas of responsibility can be delegated to more focused administrators. to the user community.1 Handbook . 448 IBM Cognos Business Intelligence V10. is a collection of features that can be granted. Printers task This task is where printer connections are defined. Data source connections task The data source connections task permits administrators to define and manage connections to data sources and the signon credentials associated with them. Users. and configuring parameters as they relate to the dispatchers and services that make up the IBM Cognos topology. Configuration tab The Configuration tab is a collection of administrative tasks pertaining to managing the content and the various aspects of the environment. Content administration task This task is the interface that allows for the creation and management of content import and export definitions. groups. data source connections. the external third-party security namespaces can be browsed and the contents of the users’ My Folders area can be viewed. Capabilities task Capabilities. This index provides search results to enhanced consumers when executing searches to answer key business questions.1 from a previous release Upgrading. see 10. Index Search tab The Index Search tab provides administrators with the settings and parameters required to create and manage the enhanced search index. Access can be granted or denied to each style in the list as required.2 Moving to IBM Cognos BI version 10..3. IBM Cognos system administration 449 . For more information regarding the Index Search tab. 10. Configuration parameters can be set at the highest level and pushed down to the individual dispatchers through acquired properties. and the management of business intelligence applications. 10. or they can be set individually on each dispatcher independent of the parent settings. is made easy with use of IBM Cognos Lifecycle Manager.1. “Enhanced search” on page 464. Denying access to a particular style for a user removes the ability to select that style as part of the user’s preferences. Portlets task The portlets task is the mechanism within the product that allows administrators to manage and control the access rights to the portlets that are part of the IBM Cognos BI solution. This testing is achieved by Chapter 10.1 Using IBM Cognos Lifecycle Manager to test the IBM Cognos environment IBM Cognos Lifecycle Manager is a utility that performs automated testing of IBM Cognos BI report content in multiple environments.Styles task This task allows administrators responsible for the IBM Cognos Connection portal to assign privileges to the various styles (skins) available to the user community.2. Figure 10-16 IBM Cognos Lifecycle Manager welcome panel 4. Click the new project link (Figure 10-16).ibm. You can find information about these practices at:. 3. the folder structures in both environments must be identical. Creating an IBM Cognos Lifecycle Manager project To do this: 1.com/developerworks/data/library/cognos/cognosproven practices. 2.x Business Intelligence source environment and upgrade the content to the IBM Cognos target environment following IBM Cognos documented upgrade practices. and then comparing report output to ensure that there are no deltas between versions when upgrading. executing. you must deploy content from an IBM Cognos 8.programatically validating.1 Handbook .html To successfully complete the report executions and comparisons. Launch the application by going to Windows Start All Programs IBM Cognos Lifecycle Manager IBM Cognos Lifecycle Manager URI. On the New Project dialog box. Before you can start testing. select the Create blank project radio button. there are options to open an existing project or to create a new project. 450 IBM Cognos Business Intelligence V10. From the IBM Cognos Lifecycle Manager interface. Start the IBM Cognos Lifecycle Manager process by going to Windows Start All Programs IBM Cognos Lifecycle Manager IBM Cognos Lifecycle Manager Startup. 9. Figure 10-17 Creating a new IBM Cognos Lifecycle Manager project 7. supply the following information for both the target and source environment: – Name – Gateway URI – Dispatcher URI – Version Chapter 10.5. Select Validation Project from the drop-down Project Type menu (Figure 10-17). Click Create. On the Basic tab. 6. where the configuration parameters for both the target and source environments can be supplied. IBM Cognos system administration 451 . Provide a name for the project. click Configure to launch the Configure dialog box. 8. Back in the IBM Cognos Lifecycle Manager interface. It is a good idea for the name to be indicative of the versions or content to be included. more connections will result in a shorter time to complete the report executions. Figure 10-18 Defining the servers to use for the project Information unknown note: If certain required information is unknown. 452 IBM Cognos Business Intelligence V10.– Maximum number of connections that IBM Cognos Lifecycle Manager will make to the individual environments The more connections specified. the more simultaneous requests will be made to each of the environments. In theory.1 Handbook . obtain the parameter values by launching the appropriate versions of IBM Cognos Configuration. but there are many influencing factors (Figure 10-18). and namespace ID that will be used to connect to each environment (Figure 10-19). Figure 10-19 Supply the required security credentials and ensure that they test successfully 11.Click Save. none of the default options are modified. which removes the need to supply the passwords every time that the project is opened. password. The Advanced tab contains various options that can be selected and customized. Chapter 10. the list of content to include in the project must be specified.10. IBM Cognos system administration 453 . and perform report comparisons between the target and source environments. The default PDF option is used for this example. The Preferences tab controls the various types of output and locales that will be generated for comparison.Click Test Connection to test the validity of the credentials. There is an option to save the passwords.On the Security tab. execute. but it is advisable that you do not use this option because of the persistence of the password on the file system. For this example. supply the username. 12. Generate report content to be validated For IBM Cognos Lifecycle Manager to validate. From the IBM Cognos Lifecycle Manager interface.To generate report content to be validated: 1. click Generate Report List. 454 IBM Cognos Business Intelligence V10. Figure 10-20 Selecting content to include in the validation project Click OK. Using the Select Search Paths dialog box. 2. select the desired collection of folders and the package to include by clicking the appropriate check boxes (Figure 10-20).1 Handbook . Figure 10-21 Out of scope content for an IBM Cognos Lifecycle Manager project After the content is loaded. you can exclude objects from the project by clicking their status and selecting Out of Scope (see Figure 10-21).2. only the target environment needs to be validated.Excluding objects: If there is content that is included as part of this process that you later determine is not required. Chapter 10. so the reports should be validated in the IBM Cognos BI target environment to ensure consistency.2 Validating the target environment Although there are both source and target environments. We assume that the collection of reports in the source environment is functional. it displays in the IBM Cognos Lifecycle Manager interface and is ready for the validation and execution steps (Figure 10-22). IBM Cognos system administration 455 . Figure 10-22 The IBM Cognos Lifecycle Manager project is now ready for comparative testing 10. 1 Handbook . Using the drop-down menu in the footer. 456 IBM Cognos Business Intelligence V10. Select the Target Validate task from the left side of the IBM Cognos Lifecycle Manager interface.Automatically generating prompt values One of the advantages of IBM Cognos BI reports is the ability to author a single report to satisfy different requests. you must supply the values for the prompts manually. The process of examining all of the selected content begins and verifies whether there are prompt values that need to be satisfied. such as a type in prompt control. Click the check box in the upper-right corner of the header to select all of the content. This is achieved by including prompts in the reports that can change the results returned based on the selected prompt values. 2. Figure 10-23 Automatically generate prompt values for missing report prompts 4. Click GO. or individually select the objects that have prompt values missing. If there are missing prompt values. as usage of report prompts is common. It is more than likely that there will be required prompts contained within the reporting environments. Value import note: If prompt values are defined and saved in IBM Cognos Connection. In certain cases. 3. To generate a prompt value automatically: 1. select Automatic Prompt Values Generation (Figure 10-23). which means that the prompt values must be supplied before IBM Cognos Lifecycle Manager can programatically execute the reports. they are imported automatically into the IBM Cognos Lifecycle Manager projects and used when the reports are executed. IBM Cognos Lifecycle Manager attempts to generate a prompt value automatically. Figure 10-25 Manually enter a prompt value Click OK. 4. Click the report name to change to the Properties page for that report. 2. 7. A Prompt dialog box opens. Verify that the status of that report is changed to New. Click the action for Manual Prompt Capture (Figure 10-24). 6. complete these steps: 1. 3.If there are prompt values that are still required after automatically generating them. IBM Cognos system administration 457 . Manually enter a prompt value that satisfies the prompt criteria (Figure 10-25). Click Back. Select the Prompt Values tab. Figure 10-24 Manual prompt generation for a report 5. Chapter 10. Navigate to a particular report with a Prompt Values Missing status. Click GO. or both). you need to execute reports in both the source and target systems. and compared incrementally. 5. select Execute reports. which ensures that the report output that is created for comparison contains the same parameters.Continue the process until all missing prompt values are defined.2. 2. 2. folders and packages are validated. 4. select Validate models/reports. Using the drop-down menu. Figure 10-26 Completing the validation process 10. Click the Source Execute task. based on the format and language options and the supplied prompt values. From the main IBM Cognos Lifecycle Manager interface. Typically. from both systems. Because report executions are submitted through the SDK and executed on the system (target.1 Handbook .3 Executing target and source content After the validation process has completed successfully. Click GO to start the validation process (Figure 10-26). or both. it generates all content. but the content is in different stages of validation. source. execute only report content that is required immediately to keep the amount of time to generate the output to a minimum. click Target Execute. the objects are marked as out of scope for the project. a project contains all of the necessary content. Repeat steps 2 through 4 for the target environment. it is advisable that you execute the reports incrementally in smaller batches. 3. executed. Initially. 458 IBM Cognos Business Intelligence V10. Instead. IBM Cognos Lifecycle Manager does not retrieve output from IBM Cognos Content Store. 6. follow these steps: 1. Then. Select the content to execute by clicking the appropriate check boxes. After the reports have finished executing. Based on priority. versus submitting all content for execution. To execute target and source content: 1. you need to validate and execute a report in both the source and target systems. IBM Cognos system administration 459 . 3. you do not need to be connected to the source and target systems to complete the compare task.4 Compare the output to ensure consistency If the report comparison indicates deltas. you need to complete further analysis to determine the nature of the difference and whether the difference is expected or acceptable. Before comparing output versions.Figure 10-27 shows the Source Execute window within IBM Cognos Lifecycle Manager. 2. Click the check boxes next to the reports that you want to compare. Click Output Compare to navigate to the Output Compare window. Figure 10-27 Performing the Source and Target Execute tasks (source shown) 10. Given that IBM Cognos Lifecycle Manager saves all data locally. and the other option does a PDF text comparison looking for changes to the contents. Use the drop-down menu to click Compare reports and click Go. There are two options for comparison. Chapter 10. The first option uses Adobe Flash as part of a visual comparison tool.2. To compare report output versions: 1. The page is separated into the following sections: Tasks Validate Run Compare Total (which is a list of every report in the project along with the report execution times in both the source and target systems) 460 IBM Cognos Business Intelligence V10. and there might be multiple people participating. Figure 10-28 Output Compare showing reports that have been compared with no differences The compare task executes.Figure 10-28 shows an example of the Output Compare window. IBM Cognos Lifecycle Manager provides content validators with the ability to annotate any content object. which can then be opened in most web browsers. For example. and the status of each report is updated to show the result of the compare task. Because validation projects can span multiple days or weeks.1 Handbook . As each step in the project completes.5 Analyzing the project status A summary of project status can be viewed at any time throughout the validation process by opening IBM Cognos Lifecycle Manager’s Task Summary view. and the difference is approved. The Task Summary view in IBM Cognos Lifecycle Manager has a print option and is also exportable to an Adobe Flash file. In addition to the commentary. 10. content validators can also approve or reject the comparisons based on the findings.2. the ability to comment on the status or progress is critical. the status of each task is updated and rolled up into the summary view. the approved status causes the status on the package to change to Completed. if one report in a package produced a delta. indicates that the object is valid – Invalid: Following validation. – Valid: Following validation.Figure 10-29 shows the IBM Cognos Lifecycle Manager Task Summary window. Each section shows the total number of objects that are in or have passed through each status within each project phase. Every IBM Cognos Lifecycle Manager project moves through five phases and various states within each phase: Validate source/validate target. indicates that the object is invalid – New: Indicates that the validation. execution. Figure 10-29 IBM Cognos Lifecycle Manager: Task Summary (status summary for a project) Clicking around the Task Summary interface provides a filtered view of the statuses of project tasks for each phase of an IBM Cognos Lifecycle Manager project. – Out of Scope: Informs IBM Cognos Lifecycle Manager to ignore this object during the validation. you must provide a prompt value for each one before you can execute the report. IBM Cognos system administration 461 . or output comparison operation has not been performed on the object – Prompts Missing: Indicates that certain reports in the package or folder require prompts. execution. When Chapter 10. and no prompt values are defined If a report has required prompts. or output comparison operation. or output compare. Compare – No Differences: Following output comparison. execution. and the XML reports are identical. you can apply it to all of the object's children by selecting the Apply to all actions target and source check box Execute source/execute target. indicates that differences were found – New – Prompts Missing – Out of Scope – In Progress – Partial Success – Visual: The output type that the report was executed in requires a visual compare using the compare tool – Approve: Following output comparison. execution.this value is specified.1 Handbook . indicates that the object failed the operation – New – Prompts Missing – Out of Scope – In Progress: Indicates that the validation. indicates that the object executed successfully – Fail: Following validation. indicates that differences found were approved – Reject: Following output comparison. you compare reports in XML and PDF formats. – Succeeded: Following execution. indicates that differences detected were rejected 462 IBM Cognos Business Intelligence V10. indicates that no differences were found – Differences: Following output comparison. or output comparison operation has not been performed on all children of an object or has failed for one or more children of an object – Partial Success: Indicates that the execution or output comparison operation was partially successful For example. but there are differences in the PDF output. When a note exists for a report within a project. Figure 10-30 shows an example of status icons for a single report in IBM Cognos Lifecycle Manager. an icon displays in the row for that report under the Notes column. IBM Cognos Lifecycle Manager allows a report administrator to provide commentary related to specific reports. A red dot on a report icon indicates that a phase failed or was rejected. Figure 10-31 shows an example of commentary added to an IBM Cognos Lifecycle Manager entry using the Note column. IBM Cognos system administration 463 . the bottom panel of the IBM Cognos Lifecycle Manager Task Summary window also provides a status icon displaying the status for each phase of the project: A green dot on a report icon indicates that a phase completed successfully. Hovering the mouse pointer over the note icon for a report provides a pop-up containing text-based commentary associated with the report. A missing icon indicates that phase has not yet been started. Hovering the mouse pointer over the status icons in the Progress column for a report provides a pop-up containing the status of each phase in text form. Figure 10-31 Notes associated with a rejected report in IBM Cognos Lifecycle Manager Chapter 10. Figure 10-30 Task status icons in IBM Cognos Lifecycle Manager Another element of the Task Summary window within IBM Cognos Lifecycle Manager is the Notes column. A black dot indicates that the status for that phase is new.For quick visual reference. Click GO. These steps are performed without any user interaction. 10. users might potentially execute many reports. licensed enhanced consumer users have the ability to search for keywords located in report names. or identify new trends. With IBM Cognos BI.1. After the comparison finishes.2. values in the 464 IBM Cognos Business Intelligence V10. The reports are sent to the target for execution and the output is returned to IBM Cognos Lifecycle Manager.1 Handbook . Select the new content to be compared by clicking the appropriate check boxes. the project is ready for analysis of any reported deltas.3 Using the administrative features This section highlights administrative features in IBM Cognos BI version 10. 10. To perform a one-click comparison: 1. Both versions of the output are compared. In the IBM Cognos Lifecycle Manager interface. modelled metadata. Change the drop-down menu to the Compare reports option. gain insight. 3.3. Comparison note: This method of comparing reports simultaneously submits requests to both the source system and the target system. report output. and spend large amounts of time browsing report output searching for desired results.1 Enhanced search When trying to answer critical business questions. Performing this type of comparison executes the following operations: The reports are sent to the source for execution and the output is returned to IBM Cognos Lifecycle Manager.10. click the Output Comparison task. 4. 2. there is a way to streamline the process.6 One-click comparison Now that the phases of the IBM Cognos Lifecycle Manager utility are understood. such as the Google search appliance. which is an excellent way to include content that is not IBM Cognos so that users are presented with more inputs to help answer their questions. The types of filters that are available are creation date. there can be multiple sections within the search results returned. When performing a search through IBM Cognos Connection. The Create and Explore section provides the user with a default query that is based on the search criteria on which to start building a report. Chapter 10. if there is a report template that should be used for financial reports. owner of the object. IBM Cognos system administration 465 . Based on the search criteria. profit. Users can use the default query and then customize to query to create a report that can be reused or shared with others. Results Center frame that displays the search results based on the search criteria and the refinements applied. and results returned from an external third-party search engine.. object type.reporting databases. results. The last section provides users with suggested content based on predefined suggestions that are defined on the Index Search tab.. or budget. and metadata. For example. such as the Google search appliance. After the first index has been created. 466 IBM Cognos Business Intelligence V10. incremental additions can be made to the index to expand the search results returned to business users. Administrators can influence the contents of an index by customizing the types of objects that are included as part of the build process.Figure 10-32 Enhanced search user interface Before users can use the new search capabilities with IBM Cognos. an enhanced search index must first be constructed. This type of index results in a shortened time to build the search index and allows users to perform searches for content immediately versus having to wait for a full index to be constructed. build an initial index that just includes IBM Cognos content.1 Handbook . Because creating an index can be a lengthy process. depending on the types of objects included and whether reporting data is being indexed. As the reporting environment evolves. Typically defined once and only changed when the business requires. the index will have to be refreshed to reflect the changes. Only entries that have changed Expand the index to include reporting data values. Table 10-2 Steps to building an effective enhanced search index Step Define indexable object types. Index scope Not applicable Proven practice Reduction of content types to index results in faster build times. IBM Cognos system administration 467 . Monitor usage and business requirements so that data values for popular reports and packages are incrementally added to the index. Initial index containing only IBM Cognos content to quickly enable search capabilities for enhanced consumer users. Build and schedule initial index. All entries Refresh the search index. Executed once when the initial reporting content is ready to be used. Reoccurring task that can be run nightly or weekly depending on the frequency of changes to the content.Table 10-2 provides steps for building an effective enhanced search index. Only entries that have changed Chapter. select the object types to be included in the initial search index. In the Indexable Types section. On the Index Search tab from within the administration console. Figure 10-33 Index Search General tab 2. After the desired object types have been selected.Define indexable object types Although the default parameter settings for enhanced search allow administrators to build an initial index. it is good practice to verify that all of the content types are required for a particular environment or to meet business requirements. click Save. select the Index task from the left frame and the General tab in the right frame (Figure 10-33). For the initial build. To modify the types of content included in the search index: 1. deselecting the output type eliminates the time required to crawl through the report output results stored in the IBM Cognos content store (Figure 10-34).1 Handbook . 468 IBM Cognos Business Intelligence V10. consult the “Managing Index Search” chapter in the IBM Cognos Administration and Security Guide. The setting is selected by default. This option consumes additional resources. In IBM Cognos Connection. the Content Manager security check is used. For more information regarding the index search options. the Content Manager security check is used. General must be selected. how to include third-party search engine content. Table 10-3 Index search security considerations Setting Index Access Control List Description Specifies whether the access control list for each object is retrieved from Content Manager during indexing. Also. General and in Storage. review the settings listed in Table 10-3. Chapter 10. click Index General. 2. Index Access Control List in Search. For more information.Securing the index and search results The index update service can retrieve the access control list from IBM Cognos Content Manager during indexing. or how to predefine suggested content for users. click Launch IBM Cognos Administration. If all three settings do not match. On the Index Search tab. see the IBM Cognos Installation and Configuration Guide. When deselected. All three index access control list settings are selected by default. the internal security check is used. When selected. Specifies whether the index access control list is updated when an incremental index is run. Update Policies These are the minimum considerations required to build the initial index. 3. in the upper-right corner. but is turned on by default because it speeds up searching. Under Security. To secure the index and search results: 1. IBM Cognos system administration 469 . Click Next. Navigate to the Content Administration task on the Configuration tab within the administration console. To build an initial index: 1. 3. Content can be selected for exclusion if desired. 470 IBM Cognos Business Intelligence V10. On the Select the content wizard page. all of the reporting content located in the Public Folders is included. index all Public Folder content unless there is absolutely content that should not be included. click Save only.Build an initial index Search results depend on the access permissions of the person who indexes the content and the user who searches the content. but. Build the search index with an account that has access to all content in the public folders so that all content is available to users. but for the initial index. if desired.1 Handbook . 4. which launches the New Index Update wizard. search results only show content to which the user performing the search has access. Specify a name of Initial Index for the new index update task on the Specify a name and description wizard page. By default. the other values can be supplied as well. Click Next. 5. User permissions note: Regardless of the user permissions that built the enhanced search index. Select the New Index Update icon from the toolbar. the content to be included in the search index can be specified. and then click Finish. Only the name is required. On the Select an action wizard page. 2. To help ensure that building the initial index has limited impact on users. but will not have executed the actual build process because the Save only option was selected (Figure 10-35). whether metadata and reporting data values are included. Chapter 10. Using the drop-down calendar control beside the date field. 4. select a month and day on which the task will execute. IBM Cognos system administration 471 .This results in an index update definition being created. 3. select Later. and the topology of the installed IBM Cognos components. 2. Because the initial index should just include the reporting content. the common practice is to schedule the index build process to not occur during periods of heavy reporting usage: 1. Modify the time that the task will run so that it does not coincide with heavy reporting periods. which launches the Run with Options dialog box. 5. ensure that only the Properties and metadata option is selected for the content options. Assuming that the task is to be run at a later time. depending on the options selected to index. Figure 10-35 Index update definition created and ready to be executed Building the initial index for enhanced search can be a lengthy. Click the Run with options icon in the Actions list. resource-intensive process. Figure 10-36 Scheduled initial index update task definition 472 IBM Cognos Business Intelligence V10. the All entries option would replace the older index with the index created as part of this task. The scope should be set to All entries. 7.6. If an index had previously been created. as this is the initial creation of an index. Click Run (Figure 10-36).1 Handbook . Chapter 10. or incomplete results because newer content is not highlighted. the easiest way to check the volume of change to the content for a given period of time is to execute a report against the audit database. you can use the Advanced options in the Filter section. it is essential to understand how long it takes to build the search index. If a lot of results are expected for the selected date range. After the frequency of change has been detected. “Auditing” on page 503.5. it is important to first determine how frequently the content is changing. In the administration console. the execution duration for that task must be used. Figure 10-37 Upcoming scheduled index update task Refresh the search index As the content of the IBM Cognos BI analytics solution evolves. 4. 3. IBM Cognos system administration 473 . administrators must ensure that the contents of the search index remain as accurate as the business demands. Neglecting to periodically update the search index results in search results returning links to reports that are no longer present. To avoid staleness of the search index. for more details regarding the audit facility within IBM Cognos BI. or click the Edit link to define a date range using calendar controls. that corresponds to the date and time when the index update task was started. 1. navigate to Status Past Activities. click the Advanced options link and select Type Index update. After the date is located.To verify that the index update task has been scheduled for the desired time. If the task was set to run at a much later date. navigate to the Upcoming Activities task on the Status tab and then use the graph Next control to scroll to the appropriate date. Because the only point of reference at this juncture is the initial index update task. Click Apply. Refer to 10. 2. To locate the history detail for the index update task. use either the Period drop-down menu in the Filter section to select one of the pre-generated periods. the index update task displays in the results list (Figure 10-37). If auditing is enabled. 1 Handbook . Because future index updates will not likely include all of the content that this task did. administrators are now provided with the maximum amount of time that should be required to update the index incrementally (Figure 10-39). you might expect there will no longer be any additional search index updates required. but the last dimension to providing users with a complete enhanced search index is the inclusion of data values from the underlying reporting databases. in case the duration spanned more than one day. there is still a factor missing from the equation. The previous sections covered creating the search index and populating it with both modeled metadata and object properties. Examining the upper portion of the “View run history details” dialog box reveals the start time. In the list of results on the right frame of Past Activities interface. 474 IBM Cognos Business Intelligence V10. Figure 10-38 Viewing the run history details of an index update task 6. However.5. and date. end time. Figure 10-39 Verifying time taken to execute the initial index update task Expand index to include reporting data values With an incremental index update strategy defined and in place. locate the index update in question and select Initial Index View run history details (Figure 10-38). As shown in Figure 10-36 on page 472. as well as access to functionality within the application. The scheduling capability controls access to the scheduling functionality for items that can be run. and data sources.3. Schedule by hour Users can schedule entries by the hour. such as reports. and schedules on the Status tab in IBM Cognos Administration to monitor the server activities and manage schedules (as long as they have been granted access). 10. Users can access current activities. or analyses After a strategy is devised for which content will have data included in the index.2 Restricting the scheduling options Administrators for IBM Cognos environments are able to control user access to object such as reports. and analyses that are included in the scope of the indexing task are indexed All data Specifies that all data encountered in the models that are within the scope of the indexing task are indexed. upcoming activities. modify the index update task to include one of the following types of data: Referenced data Specifies that only data referenced by the expressions encountered in reports. regardless of whether the metadata has been used in reports. The following secured features are associated with this function: Schedule by day Users can schedule entries daily. Chapter 10. past activities. IBM Cognos system administration 475 . To grant access to the scheduling functionality independently from the monitoring functionality. queries. create a new index update task with the appropriate settings and ensure that the scope is set to include only entries that have changed so that this new content is added to the index incrementally. To expand this data to include actual data values that are contained within the report and the reporting database. packages. only the object metadata and properties were included as part of the initial index. queries. use the scheduling capability. To simplify the addition of this capability for more users in the future. Schedule by month Users can schedule entries monthly. Sam now grants scheduling capabilities to the new self-serve scheduling role. 2. Click the Security tab. Because Lynn Cope is an Advanced Business User and Report Author at Great Outdoors company. 3. To grant access to scheduling capabilities within IBM Cognos BI: 1. Scheduling Priority Users can set up and change the processing priority of scheduled entries. by minute scheduling is also denied for other capabilities that allow by minute scheduling. Schedule by week Users can schedule entries weekly. Sam is busy and decides to delegate several of his more simple tasks so that he can pay more attention to other work. the schedule by month capability. Sam decides to grant her access to IBM Cognos scheduling capabilities.Schedule by minute Users can schedule entries by the minute. Sam creates a new role in the Cognos namespace called self-serve scheduling and adds Lynn Cope to that role. Schedule by year Users can schedule entries yearly. Sam decides to permit certain users at the Great Outdoors company to access the IBM Cognos scheduling features so that they can create and manage their own schedules. User denied access to schedule by minute: If a user is denied access to the schedule by minute capability. Sam Carter is the Administrator for the IBM Cognos environment at the Great Outdoors company. for example. Schedule by trigger Users can schedule entries based on a trigger. Click Capabilities. 476 IBM Cognos Business Intelligence V10.1 Handbook . Log on to IBM Cognos BI using credentials for a user with access to administrative features and open IBM Cognos Administration. Scheduling capabilities are controlled through a capability called Scheduling. If necessary. Figure 10-40 shows the Capabilities panel. Figure 10-40 The Capabilities panel within IBM Cognos Administration Chapter 10. This indicates that there are additional features associated with this capability that can be secured individually. Click Scheduling. you can display the scheduling capability by clicking the Next icon. IBM Cognos system administration 477 . 5. Note that the scheduling capability is highlighted as a live link. The default display settings for IBM Cognos BI only display 15 items per window.4. When the Set Properties window opens. Click Add and browse to the Cognos namespace by clicking Cognos.1 Handbook . Click the down arrow next to Schedule by hour. and then click Set Properties. Figure 10-41 Setting properties to grant access to schedule by hour capabilities 7. 8. Access to secured functions can be configured through the capability’s properties.6. Figure 10-41 shows the features that are available within the scheduling function. 478 IBM Cognos Business Intelligence V10. click Permissions. 9. IBM Cognos system administration 479 . Figure 10-42 shows the process of selecting the role that will be granted access to the schedule by hour capability. Figure 10-42 Selecting the custom self-serve scheduling role Chapter 10. click the add arrow. and then click OK. Select the role by selecting Self-serve Scheduling. Figure 10-43 Granting access rights 11. For example. Figure 10-43 shows an example of granting access to a capability for an IBM Cognos role.Members of the self-server scheduling custom-created role can now access scheduling functionality and schedule their own activities without administrator involvement. You can also use the process that we described previously to restrict access to scheduling capabilities. Click OK. one group of users can be granted full access to scheduling functionality. whereas another can be limited to only scheduling activities on a weekly basis. 480 IBM Cognos Business Intelligence V10.Grant self-serve scheduling execute and traverse rights for the schedule by hour capability by selecting Self-serve Scheduling and then selecting Execute and Traverse under the Grant column. Administrators can permit or deny users the right to schedule their own activities based on schedule frequency or by trigger.1 Handbook .10. 3 Intra-day scheduling window Administrators can further manage the distribution of system processing load through the use of intra-day scheduling features for IBM Cognos.m.10. managers could provide.m.3. and persist. Chapter 10. it can become challenging to manage user signons for large volumes of users across multiple data sources. This is essential when certain reports require a personalized view of the data instead of a generic result set. on Mondays. Activities within IBM Cognos can be scheduled to execute on a recurring basis within a window of time during a single day. a generic database credential is employed when running a summary call center report that compares the hourly breakdown comparison of incoming calls versus resolution rates.m. on Mondays 10. For example. If deeper personalized analysis was required. Figure 10-44 shows an example schedule frequency setting that uses the intra-day scheduling feature. such as managers looking to see their teams’ individual call closure rate.3. IBM Cognos system administration 481 . a job can be scheduled to run every 5 minutes between the hours of 6:00 a.m. their own unique database signon.4 Allowing users to persist personal database signons As an administrator. Figure 10-44 Schedule frequency set to run every 5 minutes between 6:00 a. For example. and 8:00 a. and 8:00 a. IBM Cognos allows administrators to empower selected users to manage their own database credentials. there are numerous namespaces. 6. administrators can search for specific accounts by selecting the Search link in the upper-right corner of the page. b. select it by clicking the corresponding check box. Remember to select Show users in the list if browsing for a user account. only groups and roles display. Click the Add link to add users. Launch the administration console by selecting either the Administer IBM Cognos content link from the Welcome menu or by clicking the IBM Cognos Administration link from the Launch menu within IBM Cognos Connection. or role by browsing the namespaces from the “Available entries” dialog box.1 Handbook . select the Capabilities task from the left frame. Navigate to a specific user.Empowering users to manage signons Administrators can provide users with the ability to manage signons by granting them access from within the administration console: 1. Click OK. or roles to the capability access control list. If the namespace is large. select Set Properties (Figure 10-45). 8. Then. ensure that the Override the access permissions acquired from the parent entry check box is selected. or role. or the location of the desired entry is unknown. Otherwise. 2. select the newly added entry by clicking the appropriate check box. Using the Actions drop-down menu for the manage own data source signons capability. On the Security tab. Figure 10-45 Setting the properties on the manage own data source capability 4. On the Permissions tab. groups. After you locate the appropriate user. click the green arrow button to the right of the dialog box to add the object to the “Selected entries” dialog box. From the access control list on the left. 482 IBM Cognos Business Intelligence V10. group. 5. group. 7. 3. a. Table 10-4 Order of preference for data source signons Signon type Defined and managed by IT Storage location Defined and stored under the data source connection name in the administration console (data source connections task). he is prompted to select one to use. Figure 10-46 Assigning execute and traverse actions Removing the IT burden of managing signons There are a few scenarios in which the management of data source signons should be managed by IT. There is an order of operation in effect when the query layer is determining which signon to use when the query is executed (Table 10-4). There cannot be more than one signon per data source connection. Personal Chapter 10. and the policy in the left frame updates automatically (Figure 10-46). Stored as part of the user profile and accessible through the My Preferences interface. and they cannot have any access to an existing defined signon. IBM Cognos system administration 483 .9. Created at the request of the user. the execute and traverse actions must be granted. Select the Grant check boxes for both of these actions. for example. in most cases. Click OK. However. when standard defined signons are required to ensure data consistency for all users executing reports. managed by IT. To enable this capability. they must be granted the ability execute and traverse on the manage own data source signons capability. Behavior If a user has access to multiple signons for the same data source. it is a good idea to empower users to manage their own signons. providing that the users are aware of the necessary credentials. For users to manage their signons.. Behavior When the prompt is presented. If corporate policy changes and IT needs to assume responsibility once again. while ignoring the existence of any saved personal credentials. IT always retains control of the data source authentication strategy. quickly converts the authentication strategy and shifts the responsibility to the user. 484 IBM Cognos Business Intelligence V10. the user is optionally able to persist that signon in their profile if he has access to the correct capability (Figure 10-47).1 Handbook . granting the user community access to at least one signon forces the usage of the defined signons. either deleting the signons or denying everyone access to the existing signons (the most advisable approach). a prompt is presented to execute the report. In an IBM Cognos environment that has been deployed with IT managing the data source signons. For example. Chapter 10. one week. IBM Cognos system administration 485 . and never return to a green status.10. With count metrics for failed and successful requests (NumberOfFailedRequests and NumberOfSuccessfulRequests)... and so on). The reason for this is that tolerance thresholds built on the percentage metrics are always relevant regardless of when the last reset occurred. thresholds are eventually reached after a period of time. FailedRequestPercent and SuccessfulRequestPercent This metric displays the percentage of failed/successful requests that have occurred. one month. if the threshold score is set to turn red after 50 failed requests. This averaged value maps to the latency metric in the administration console. after the threshold is exceeded (one day. 486 IBM Cognos Business Intelligence V10. Due to this. This value maps to the number of queue requests in the administration console. Using the previous example. either successful or failed. if the failed requests hit 50 after the first 50 requests. NumberOfProcessedRequests This specifies the amount of received requests that have been processed by the dispatcher. MillisecondsPerSuccessfulRequest This is the average amount of time spent processing a successful request. NumberOfFailedRequests Number of failed requests. QueueLengthHighWaterMark The value for this metric is an indication of what the highest amount of requests in the queue has been since the metric was last reset. NumberOfSuccessfulRequests Number of successful requests. no resetting of metrics ever needs to occur. NumberOfSessionsHighWaterMark This indicates the maximum amount of user sessions that were active in the environment at one time. NumberOfRequests This specifies the amount of requests that have passed through the queue since the last time that the metrics were reset. is a cumulative count of the number of successful requests that have occurred since the last reset. if only the percentage metrics are monitored through thresholds.the threshold score is always red until the service is restarted or the metrics are reset. thus moving the red score to yellow and then eventually green. if every request is successful. The percentage metrics change over time. not to be confused with the successful request percentage metric. NumberOfSessions This indicates the amount of user sessions that are currently active in the environment. ResponseTimeHighWaterMark The value for this metric shows the longest period of time spent processing a request. the value is 100% and more than likely results in a threshold score of red.1 Handbook . is a cumulative count of the number of failed requests that have occurred since the last reset. the metric value decreases. From that point forward. not to be confused with the failed request percentage metric. This metric is a great way to track server throughput. ServiceTimeFailedRequests This metric value is the total amount of processing time that was used for all failed requests. including both failed and successful. When looking at the metric after a minute. and so on. TimeInQueue This cumulative metric shows the total amount of time that has been spent by all objects in the queue. The formula is: (Number of successful requests * service time for successful requests) / 60 seconds For example. as the total time spent (30 * 1. 10 requests are executed successfully and the server has spent 30 seconds executing the requests. of successful requests per minute. the traditional definition would indicate the average is 10 requests per minute. but rather it is an indication of how many requests have been processed during the amount of time that the system has spent processing them. each with a queue time of 1.5) is 45 seconds. After the second minute. or perception. This value does not indicate an ongoing average from minute to minute. the value for the metric is 45. SuccessfulRequestsPerMinute The definition of this metric slightly differs from the traditional definition. This algorithm shows that what the average successful requests is based on is the amount of processing time that it took to execute them and not the actual time. if 30 requests have been in the queue at some point. For example. This particular metric value is the total amount of processing time that was used for all requests.ServiceTimeAllRequests The service time metrics show the amount of time that was spent processing the requests. TimeInQueueHighWaterMark This displays the longest amount of time that one object has spent in the queue. IBM Cognos system administration 487 . Chapter 10. the value would be 5. The actual use of this metric in IBM Cognos BI would be 20 after one minute and would still be 20 after 2 minutes. This is done to provide a real value that is not impacted by periods of inactivity.5 seconds. 1. This is an important fact when working with environments that are made up of multiple servers or dispatchers. The metrics are collected at the service level. dispatchers to the server. for example). Process These metrics display information regarding the amount of processes required by the product to function. For more information about the services that make up the IBM Cognos BI solution. Services The final dimension to the system metrics is how the individual metrics and metric groupings relate to the service to which they are associated.1 Handbook . Understanding what actions are performed by each of the services provides greater insight into the values that are being reported. metrics are then consolidated through the rest of the topology: services to dispatcher. requests to the individual services affect the metric values at the higher server and system levels. “IBM Cognos BI services” on page 16.2. and how much time requests have spent in the queue. the length. Several metrics in this group are the amount of requests that have been in the queue. and then the servers to the system level. When viewing the metrics scorecard that is 488 IBM Cognos Business Intelligence V10. The system task displays metrics at all of the levels of the topology.Metric groups The individual metrics are divided into three main metric groups: Request These metrics pertain to the specific requests that are handled by each component in the environment. Therefore. but the majority of the individual metrics are a part of the three metric groups. There are a few metrics located outside of the three main metric groups (JVM uptime and heap size information. see 2. Metrics such as the number of current processes and the maximum number of processes that were spawned are available. which is the lowest level in the topology. From the service level. Because the metrics are live. they are volatile and thus are reset every time that the service or server is restarted. That is. such as a server or the system. is executed. That said. In certain situations it might be desired to have the metrics reset without restarting the entire application. and red traffic light indicators reflect the most severe indication value in the hierarchy. there are a few manual refresh options available within the administration console: Fragment refresh This is the button located in the upper-right corner of the fragment that refreshes the values of the contents in the frame. IBM Cognos system administration 489 . As the metrics are dynamic and reside as part of the dispatcher. the green. all of the metrics that belong to the service in context are reset. For example. yellow. at a glance.available as part of the system task in the administration console. but does not change the contextual object or refresh any of the values in any of the other windows (Figure 10-49). This was done to provide administrators with the ability to visually see. Figure 10-49 Refresh button will retrieve the current values for the metrics Chapter 10. whether any key metrics are not performing as well as expected without having to drill down to lower levels of the hierarchy. based on the general feedback from administrators. When the Reset is clicked. the poorest indication rises to the top. is that there is no auto-refresh feature. This is possible by using the Reset button beside the metric grouping name in the Metrics dialog box. in the system task. The metric values are updated in real time and reside in an MBean within the dispatcher Java process. If a higher level is in context. either manual or programmatic. they are dynamic and are only reset when the IBM Cognos BI service or process is restarted or when an explicit request. all of the metrics that pertain to that object are also reset (Figure 10-48). Figure 10-48 Reset the request metrics as they pertain to the Content Manager service An important note regarding the metrics. that this limited the ability to thoroughly analyze a series of metrics if the values changed on a regular basis. It was a design decision. and the administration console in general. refreshing the metrics frame updates the metric values. after the refresh has occurred. Figure 10-51 Bottom of frame indicates when the values were generated and displayed 10. This action causes all context to be lost and. Figure 10-50 Button to refresh the entire page Browser refresh Using the browser refresh button to update the administration console causes all pages to be refreshed. With this in mind. the entire page being viewed is refreshed. and settings frames without losing context (Figure 10-50).Page refresh This button is available on the main IBM Cognos BI toolbar located at the top of the browser page. clicking this button when viewing the system task refreshes the scorecard. which can provide the basis for automated alerts through IBM Cognos Event Studio. there is a summary bar at the bottom of each frame that displays the last time that a refresh occurred (Figure 10-51). To provide a reference as to the timeliness of the information being viewed. metrics.1 Metric tolerance thresholds Whereas the ability to have real-time metrics displayed in the administration console provides valuable information when monitoring the environment. the default view allowed by your administrative capabilities displays. or by creating self-service personal alerts in IBM Cognos Viewer. 490 IBM Cognos Business Intelligence V10. When clicked.4. it is possible to manually set a tolerance threshold on the individual metrics. the value all but disappears when not actively in the console watching the metrics.1 Handbook . For example. The current metric values are displayed in the system task as green. which means that certain underlying service metrics have values that are nearing the acceptable norm and might warrant further investigation. an overall scorecard is possible (Figure 10-52). tolerance thresholds must first be defined on the key metrics: 1. 2. 4. When a series of thresholds is assigned to key indicators that pertain to the specific environment. Creating a threshold Before an overall scorecard can be established. IBM Cognos system administration 491 . Figure 10-52 System Scorecard showing all dispatchers A quick glance at the scorecard indicates that there is a dispatcher that has a yellow indicator. Launch the IBM Cognos administration console. Select the System task on the Status tab. Drill down again on an available dispatcher to reveal the underlying services. yellow. 5. drill down on an available server.These thresholds allow administrators to set ranges that provide them with a quick overall view into the system health. based on the range that the value resides. Chapter 10. and red traffic light indicators. 3. Click BatchReportService. In the scorecard frame. which displays metrics about the amount and duration of requests handled by the batch report service Take the following steps: 1. 492 IBM Cognos Business Intelligence V10. which provides metrics about the amount of configured and running batch report processes Request. select Low values are good. which specifies whether high. Locate the percentage of failed requests metric and click the pencil icon. Expand the Request metric grouping by clicking the plus sign (+). 3. or low values are good (a green traffic light indicator). The second section is where the actual threshold values or ranges that will drive the type of indicator are defined.Clicking the BatchReportService object changes the focus of the metrics frame on the upper-right side so that all of the relevant metrics for the batch report service are displayed (Figure 10-53). 4. The first section is the Performance pattern. Figure 10-53 Request metrics for the batch report service The metrics batchreportservice frame consists of two metric groupings: Process.1 Handbook . 2. This dialog box is divided into two sections. The “Set thresholds for metric . Because failed requests are undesirable.Request .Percentage of failed requests” dialog box opens. middle. 0%.0% remaining green. 6. Chapter 10. the indicator light changes to a red.0% moves the box down to the green threshold. which means that at 3% the indicator changes from green to yellow. IBM Cognos system administration 493 . Click OK to save the threshold. then it turns yellow. Figure 10-54 shows that the indicator light is green until the value for the particular metric hits 3%. Enter a value in both of the boxes to define the range. which results in 3. Clicking the down arrow beside 3.5. but anything higher changing the status to yellow. Figure 10-54 Defining a metric threshold Light indicator: The yellow indicator light value is 3. If the metric value continues to increase and a value of 5% is obtained. 1 Handbook . number of concurrent users. volume of reports being executed. This reporting is key in indicating peak periods of usage and keeping track of unexpected changes to usage patterns. it is impossible to provide defaults that would have any relevance in all environments. such as size of the user base. any threshold exceptions (changes to the indicator light color) are written to the COGIPF_THRESHOLD_VIOLATIONS table. server hardware.Returning to the metrics frame.1 environment. if auditing is enabled for the IBM Cognos BI version 10. Not only could setting metric thresholds be a timely exercise based on the volume of metrics available. The audit database entries also provide the information that is required to report on the volume and severity of the exceptions over time. and so on. Figure 10-55 Metrics frame with newly created metric performance pattern After you define metric thresholds. available memory. but what values should be used that make sense for the environment in question? Are the values being used based on the current 494 IBM Cognos Business Intelligence V10. the status indicator for the newly created metric threshold is displayed (Figure 10-55). Programatically setting thresholds One of the most common questions that is asked is why there are no default thresholds? The is because there are many factors that influence metric values. This table allows administrators to proactively create IBM Cognos Event Studio agents that monitor the audit table for exceptions and that notify the required administrators. 2. IBM Cognos system administration 495 . select Until. it is possible to gather metric exports for a period of time.settings? If so. set the threshold ranges based on the real-world usage statistics for a given environment. 6. to 2 p.4. Using a Great Outdoors company scenario.html 10. time slot on the chart by clicking the bar above 13 along the x-axis. receives a message indicating that there will be a 60-minute outage of the reporting database from 1 p.com/developerworks/data/library/cognos/page258. To ensure that any reports scheduled during this time do not fail. For example.m.2 Reacting to bottlenecks due to unexpected events System administrators are occasionally faced with unexpected environmental events or unforeseen changes to usage patterns. Select the 1 p. typically spanning a high reporting period when available.m. programatically through the SDK. 5. Sam Carter. the reports can be shifted to 3 p. use the Actions drop-down menu beside one of the selected items to choose the Suspend option or use the Suspend button from the toolbar menu. In the Suspend Activities dialog box. manually select the objects or use the Advanced options on the left to filter the results to display only the impacted objects and select all.m.ibm.m. Using the metric export capability. see the System Management Methodology located at:. Chapter 10. Launch the IBM Cognos administration console. Select the Upcoming Activities task on the status task.m. due to scheduled routine maintenance. 4. Reacting to these occurrences is critical to maintaining service level agreements and ensuring that the data in reports is accurate and not out of date. to 2 p. the IBM Cognos Administrator. After you select the objects. Sam must react to the situation by taking the following steps: 1. Select all of the entries by clicking the check box in the upper-left corner or the list. are these values indicative of a typical day? What about during peak periods? Won’t all of the metric thresholds turn red during peak period usage? There is help for this. to compensate for any additional minor delays. and change the calendar control to reflect a period when the reporting database is back online. which changes the list display at the bottom of the page. For more information about setting the metric thresholds. 3. or if only certain entries will be impacted by the database outage. and then using the metric exports. or using the toolbar menu.1 Handbook . Sam must now react differently to this unforeseen hurdle because there is no estimated time for the resolution. The Upcoming Activities chart updates to reflect the changes. Unfortunately. there is no new estimate as to when the database will be back online and available for reporting.m. 3. so it is a good practice for IBM Cognos administrators to proactively examine the upcoming load for the day and make changes were necessary. The ability to allocate scheduled objects throughout the day can help ensure system throughput. 6. select Indefinitely. Launch the IBM Cognos administration console. to 4 p. Click the bar above 15 along the x-axis to change the filtered list to the objects scheduled to run from 3 p. 496 IBM Cognos Business Intelligence V10. Select the Upcoming Activities task on the status task.7. Sam Carter receives word that there are complications with the database maintenance and that the outage will last longer than the previously anticipated 60 minutes. but the ability to suspend reports for a predefined period of time can also be used to help spread an unexpected scheduling load across other less active periods. 8. The scenario describes reacting to a planned database outage. In the Suspend Activities dialog box. Click OK. He must take the following steps: 1. Sam chooses to Suspend the selected items.m. Building on the previous scenario. 4. Select the objects that had been previously rescheduled. Using the Actions drop-down menu beside one of the selected items. 2. Click OK. 5. it is possible to quickly respond to unexpected changes in usage patterns.Contrary to when the schedules were postponed and a new time was defined in the first scenario. One such tool is IBM Tivoli Directory Integrator. This is a continual process of exporting and then loading the metrics so that the reports are always current. The other mechanism is to use a tool that is both capable of connecting to the Java environment directly and writing the values to the reporting database. The first mechanism uses product functionality to export the metrics to a text file and then using an extract. After they are loaded into the database. so there is no way to represent them on the chart. there is an entry in the chart legend called Suspended that indicates the number of suspended objects (Figure 10-56). which connects to the IBM Cognos Chapter 10. there is no defined time for their execution. transform. it becomes almost impossible to answer these questions without a mechanism to record the metric values. Because they were suspended indefinitely. There are a couple of ways to accomplish the recording of the metrics. and load (ETL) tool to load them into a reporting database. the rescheduled items do not appear in any specific time slot in the chart. IBM Cognos system administration 497 .. To identify that there are items that are suspended indefinitely.4. Figure 10-56 Upcoming activities chart with legend 10.3 System trending Through the combination of viewing the metrics available in the aDministration Console and proactively monitoring metric thresholds using IBM Cognos Event Studio alerts. reports can be created so that analysis of key metrics can be tracked. Before the metrics can be exposed to external sources. 498 IBM Cognos Business Intelligence V10.JVM.html 10. This process is automated and can be scheduled so that there is no manual intervention required.1 Handbook . MBeans. the Java MBean must first be made available for external access. To accomplish this. for tools such as IBM Tivoli Monitoring to connect to the IBM Cognos metrics. and then writes out the values to a relational database. How this translates to the IBM Cognos topology is that the dispatcher component stores the raw metrics in an MBean within the JVM running the IBM Cognos BI application. Java Management Extensions Java Management Extensions (JMX) is a Java technology that supplies tools for managing and monitoring applications and service-orientated networks.5 JDK package. For more information regarding system trending. a parameter must be added to one of files within the application server.ibm. and the metric values can be written to the database at almost any interval. These resources are represented by objects called MBeans.com/developerworks/data/library/cognos/page258.4 Consuming system metrics from external tools This section discusses Java Management Extensions and JConsole.4. represent a resource running in the Java Virtual Machine (JVM). see the System Management Methodology located at:. the metrics are accessible externally by using the industry-standard JMX. a JMX agent must be created to interface with the IBM Cognos MBean. which is available as part of the Java V1. Besides the administration console. Thus. Connecting to metrics using JConsole This section describes the steps required to view the metrics externally using the JConsole application. which stands for Managed Bean. reads the metrics from a customizable list of services. and then click the pencil icon. Click the value field of the External JMX credential property. Navigate to the <install_dir>\webapps\p2pd\WEB-INF directory and open the p2pd_deploy_defaults. IBM Cognos system administration 499 . but these policies do not apply when connecting externally. That is. It is important to note that there is no security associated with the JMX implementation. Uncomment the existing rmiregistryport line by removing the # symbol (and modify the port number if required) (Figure 10-57). complete the following steps: 1. Ensure that the port number specified is available for use and is not being occupied by another application. anybody can connect to the MBean if the proper connection string is known. Chapter 10. Save the file.Group Properties dialog box and type 9999 (to match the port number used for the rmiregistryport entry from a previous step).For a default Tomcat installation. Locate the External JMX Port property in the Environment . 2. 4.properties file in a text editor. In the explorer frame. select Environment. product access to the metrics can be locked down through the security policies in IBM Cognos Connection and the administration console. Open IBM Cognos Configuration. Port number note: The number specified in the added string pertains to a port number. Figure 10-57 Enabling the rmi registry port for JMX support 2. To enforce user name and password external access: 1. 3. so after the entry has been added to the file. 5. Locate the jconsole. Click OK. a restart is required if the IBM Cognos BI application is already running.External JMX credential” dialog box. On the “Value . Because this is a setting that is read when the application is started.useCodebaseOnly=true 500 IBM Cognos Business Intelligence V10.rmi.exe executable in the bin directory of the Java JDK and launch it. If there are spaces in the installation path and the non-default IBM JRE is being used. JMX implementation note: The JMX implementation does not allow for spaces in the install path when using a JRE other than the default IBM JRE provided with the IBM Cognos installation. Save the new configuration parameters. 7. specify the user ID and password that will be used to secure the IBM Cognos MBeans (see Figure 10-58). After you start or restart the application: 1.1 Handbook . Figure 10-58 Securing the IBM Cognos JMX interface 6.server. JConsole must be executed using the following command line: Jconsole -J-Djava. 4.2. Chapter 10. switch to the Advanced tab (see Figure 10-59). IBM Cognos system administration 501 . Supply the proper credentials if the External JMX credential value was supplied in IBM Cognos Configuration. 9. Expand the com. 5. Click the Metrics option beneath the dispatcher. Ensure that the MBeans tab is selected (if not selected by default). for example. This is the location of all of the metrics that reside in the administration console.cognos section of the tree. Click Connect to connect to the system metrics using JMX. 6. select one of them and expand the dispatcher name entry in quotation marks. When presented with the JConsole: Connect to Agent dialog box. report service. 8. View the metrics for a service. If more than one dispatcher is present in the environment. 3. 7. which displays all of the metric names and values in the right frame. by expanding the reportService entry to expose the objects beneath.. Open a web browser session. Keep drilling down until the ReportService entry is located. Figure 10-60 Report service metrics in IBM Cognos administration console Figure 10-61 Identical report service metrics in JConsole 502 IBM Cognos Business Intelligence V10. Drill into the same dispatcher as used in the JConsole interface. although there might be slight formatting differences (Figure 10-60 and Figure 10-61). 3. launch IBM Cognos BI.1 Handbook . the values displayed in the Metrics .ReportService frame are identical to the values displayed in JConsole.To compare the metrics displayed in the IBM Cognos administration console and JConsole: 1. 2. Click ReportService to filter the metrics in the upper-right frame. 4. Providing that no additional report service requests were made. and navigate to the System task within the administration console. expand Environment. viewing or reporting on the data is complicated and difficult to manage. errors. In fact.1 Configure the audit database For the usage data to be captured in a relational source. Open IBM Cognos Configuration. 2. a sample audit model is supplied that includes several sample reports to assist in providing immediate benefit from the audit data. Use the data contained in the default log files primarily for troubleshooting and not for tracking usage. and then click Resource Destination. 10. With the usage audit data stored in a relational data source. click the type of database target (DB2. 5. Even if the desired date range was still accessible. Although the information provides the ability to identify possible errors that have occurred in the environment.5 Auditing IBM Cognos Platform provides a complete auditing capability that permits administrators to report on and manage system usage. system messages. right-click Logging. SQL Server. Informix®. type the database name and.10. IBM Cognos system administration 503 . an audit destination must first be configured in IBM Cognos Configuration: 1. and so on). 3. Within the Explorer pane. file rollover parameter in IBM Cognos Configuration). IBM Cognos BI provides the ability to output usage information to a relational database. Chapter 10. Right-click the newly created Audit database and click New Resource Database. type a name (we used Audit in our example) and click Database as the type. the information is volatile because of the versioning mechanism (that is. The information logged by IBM Cognos Platform auditing can be used to support administrative requirements such as: Capacity planning Licensing conformance reporting Performance monitoring Identifying unused content By default. In the New Resource – Destination dialog box. and other product details are logged to flat files that reside in the <c8_install>/logs directory. using the drop-down menu. reporting then becomes possible.5. 4. In the New Resource – Database dialog box. 7. which prompts the application to create the necessary tables within the configured database. In the Explorer pane. into the fields in the Properties pane. During the start phase. Save the configuration by clicking Save on the IBM Cognos Configuration toolbar. 8.1 Handbook . Changes do not take effect until after the IBM Cognos BI services have been restarted. database login credentials. such as database host name and port number. and the database name. Test the audit database connectivity either by right-clicking the newly created database name in the Explorer pane and then clicking Test or by clicking the new database name and then clicking the Test icon from the IBM Cognos Configuration toolbar. Start (or restart if already running) the IBM Cognos BI services by clicking the Start icon (or the Restart icon) from the toolbar. click the newly created database name and type the necessary parameters. 9.6. 504 IBM Cognos Business Intelligence V10. the configuration change is identified. These steps define the JDBC connection that will be used to populate the audit database. but only 11 are used for auditing usage. The COGIPF_MIGRATION table is reserved for an upcoming migration application.5.10.2 Audit table definitions After an audit database has been added to the configuration parameters in IBM Cognos Configuration. the audit database schema is added to the database the next time that the application is started. The COGIPF_SYSPROPS table contains a single record that indicates logging version detail. 18 tables are added to the audit database. Figure 10-62 IBM Cognos Audit database tables Chapter 10. When the application starts. and the COGIPF_THRESHOLD_VIOLATIONS records metric threshold exception details that are derived from the IBM Cognos BI system metrics (Figure 10-62). IBM Cognos system administration 505 .. and at the end of the spectrum is full. the 506 IBM Cognos Business Intelligence V10. which should only be used for troubleshooting purposes under the guidance of customer support. The levels start at minimal.5..3 Audit levels The auditing facility within IBM Cognos BI provides five levels of detail. For collecting audit detail. for example.1 Handbook . which for the purposes of auditing means disabled. similar to the full level. if only login information is desired. 2.2. Click the Configuration tab. 10.5. see 2. and then click Dispatchers and Services. Table 10-6 shows IBM Cognos audit and logging levels. Chapter 10..5 Setting audit levels Setting the audit levels is done through the dispatchers and services task in the administration console in IBM Cognos Connection: 1. From within IBM Cognos Connection. click Launch IBM Cognos Administration to launch the IBM Cognos administration console.only choices are minimal (disabled) and basic (enabled). For more information about the IBM Cognos services. Each of these services has a configurable audit level.4 Audit and logging for IBM Cognos BI services The IBM Cognos BI architecture comprises various services.5. For example. under the guidance of IBM Customer Support. Understanding what functions are performed by each of the services provides greater insight into the audit detail that they record. “IBM Cognos BI services” on page 16. Only use trace.1. IBM Cognos system administration 507 . Assigning the correct level of audit detail to the appropriate service provides a customized view of usage data. the only service that needs to have auditing enabled is the Content Manager Service. Table 10-6 IBM Cognos audit and logging levels System activity type System and service startup and shutdown. Request provides essentially the same level of detail as basic. and parameters with an acquired value of No will no longer be acquired from the 508 IBM Cognos Business Intelligence V10. 7. audit settings made at the top level will be pushed down to all dispatchers and services that make up the environment. To configure customized settings on a dispatcher. click the Settings tab. other unique situations might require that settings differ from the dispatcher. 6. examine the properties shows that the value changed from Yes to No. Because of the inheritance model. Repeat the steps above to set the individual audit settings on the dispatcher. audit settings must be configured for each dispatcher individually. and then clicking Logging. This is the suggested way to set the audit settings. Filter the displayed settings to show only settings related to logging by clicking the Category drop-down menu. select the dispatcher by clicking the link with the dispatcher’s name. After the levels have been specified for the desired services. click OK to save the new parameter values. On the Configuration pane of the Dispatchers and Services window.3. This reveals the list of services that make up the dispatcher.1 Handbook . 5. click the Set properties . Figure 10-63 Selecting the Configuration Properties to set audit levels 4. set the auditing level for each of the services that make up the IBM Cognos BI environment. When presented with the Set Properties dialog box. Overriding the settings on a dispatcher breaks the inheritance model. Using the drop-down menus or check boxes.Configuration icon on the main toolbar (Figure 10-63). However. as typically all dispatchers should be recording the same level of detail. After you configure the customized settings for an individual dispatcher. and in those cases. Figure 10-64 Option to reset all dispatcher configuration settings to the parent values 10. IBM Cognos system administration 509 . Change the drop-down menu to Logging. To re-synchronize the parameters so that the values can be acquired: 1. Select the dispatcher that you want to configure by clicking the dispatcher’s link in the Configuration pane. which selects all of the logging configuration settings. IPF trace note: Implement IPF trace only with the guidance of IBM Support. Select this option. which resets the parameter values to the parent configuration and resets the acquired values to Yes. click the Settings tab. Click OK to save the changes. 3. 2. Click the Set Properties . Click the Settings tab. At the bottom of the dialog box. there is an option to delete the configuration settings of the children. the configuration settings can be reset from the top level and pushed down to the dispatchers in the environment. and then click OK to save the changes (see Figure 10-64).parent configuration. Click the check box in the upper-left corner. Chapter 10. One of the troubleshooting mechanisms with the IBM Cognos BI application is through the IPF component. This does not really delete them. 5. 7. Click the Reset to parent value link at the bottom-right corner of the window.6 Maintaining audit detail while troubleshooting Among applications.5. To do this: 1.configuration icon on the main page of the Dispatchers and Services panel. Alternatively. called IPF traces. 4. which filters the parameter list to only display the audit-related entries. 3. there is a periodic need for troubleshooting. Click the Set properties – dispatcher icon. 2. 6. it simply overwrites them with the current configuration settings from the global configuration. On the “Set properties – Dispatcher” dialog box. various levels of detail can be output to different sources. Example 10-1 highlights the fields that are important to ensuring that audit logging is not interrupted during IPF trace activities. the IPF client trace functions and audit records continue to be logged to the audit database.xml file.LogTCPSocketAppender"> <param name="remoteHost" value="127. 510 IBM Cognos Business Intelligence V10. ipfRSVPclientconfig.LogTypedLogger"> <level value="warn"/> <appender-ref </category> Example 10-1 highlights the TCP connection parameters and the important parameter for the audit level.xml file: Improper editing of the ipfclientconfig.xml file when troubleshooting might cause regular audit information to stop being recorded to the audit database.cognos. Take care when editing the ipfclientconfig. for example.indications. Each IBM Cognos software component provides a sample IPF Client Trace file to be used when instructed by IBM Support.LogLocalUDPAppender"> <param name="Port" value="9362"/> </appender> <category name="Audit" class="com.indications.cognos.1 Handbook . By default. Within that file.Enabling an IPF trace does not require a restart of the application and is enabled when a file called ipfclientconfig. As long as the TCP connectivity parameters are correct and the audit level is set to warn.1"/> <param name="Port" value="9362"/> <param name="LocationInfo" value="false"/> <param name="ReconnectionDelay" value="30000"/> </appender> <appender name="clientRemote" class="com. providing that server logging configuration settings are correctly entered into the ipfclientconfig.sample.0.0. the master template file called ipfclientconfig.xml is found in the <install_location>/configuration directory.xml template is configured to continue recording regular audit detail to the audit database. Example 10-1 Important fields to ensure uninterrupted audit logging <appender name="clientTCP" class="com.cognos.xml.indications. Change the remoteHost value and the Port value to match the log server host and port number in IBM Cognos Configuration. IBM Cognos BI can be used to create reports to show information from the audit database and provide insight into what is happening on the entire IBM Cognos Platform. then the clientRemote must be used. IBM Cognos system administration 511 .Change the appender reference within the <category name=”Audit”> section to match the Log Server Enable TCP value in IBM Cognos Configuration. we explore the table structures of the audit database and provide example queries to satisfy common audit requirements.7 Audit scenarios In discussing audit scenarios. IBM provides sample reports to be used for various auditing scenarios.5. the parameters within IBM Cognos Configuration need to be examined. we apply audit functionality and walk through common scenarios to provide an overview of how IBM Cognos audit data can be used to provide a complete view of system activity. More detailed examples Chapter 10. Given that the audit information for IBM Cognos BI is stored in a relational database. administrators can also use SQL queries to get a detailed view of system activities. Figure 10-65 Logging server port and TCP settings in IBM Cognos Configuration 10. The database used to record audit information for IBM Cognos BI can also be used as a reporting data source for system administrators. To verify whether clientRemote or clientTCP needs to be used as the appender-ref value. If the Enable TCP? parameter is set to False. To demonstrate possible uses for the information stored within the IBM Congos audit database. If the value is set to True. the clientTCP will be the require entry in the IPF file (Figure 10-65). Selecting the Logging entry beneath the Environment section displays the logging parameters in the right frame. For example. auditing is set to minimal for all services except the IBM Cognos Content Manager Service. COGIPF_NAMESPACE. and so on can be obtained by query interactions with the COGIPF_USERLOGON table using COGIPF_SESSIONID. John Walker (jwalker) logs into IBM Cognos Connection. COGIPF_USERNAME. In the following scenario. Details about user sessions. COGIPF_LOCALTIMESTAMP. 512 IBM Cognos Business Intelligence V10. reporting activity. Upon examining the COGIPF_USERLOGON table. Details about parameters used by IBM Cognos components can be obtained by query interactions with the COGIPF_PARAMETER table using COGIPF_REQUESTID. logons.html Tables within the IBM Cognos audit database can be joined to provide further information about user sessions. COGIPF_USERID. and so forth.ibm. Example 10-2 Sample SQL query to retrieve user logon information SELECT COGIPF_HOST_IPADDR.com/developerworks/data/library/cognos/cognosproven practices. COGIPF_LOGON_OPERATION. security events. jobs.1 Handbook . Logging into IBM Cognos Connection causes audit data to be written into two tables: COGIPF_USERLOGON COGIPF_ACTION The primary information related to the user logon (that is. user name and authenticating namespace) is contained in the COGIPF_USERLOGON table. Authentication Authentication is handled through the IBM Cognos Content Manager Service:. and secondary information such as group membership is recorded in the COGIPF_ACTION table. we see a single entry for the login process (Example 10-2). recording authentication-related detail requires auditing to be enabled for the IBM Cognos Content Manager Service. Detailed information about jobs and job steps can be obtained from the COGIPF_RUNJOB and COGIPF_RUNJOBSTEP tables using COGIPF_REQUESTID. Therefore. COGIPF_LOCALTIMESTAMP. COGIPF_LOGON_OPERATION. a single record is written to both the COGIPF_USERLOGON and COGIPF_ACTION tables. which shows logon operations and sessions expiring due to inactivity.COGIPF_STATUS FROM COGIPF_USERLOGON Figure 10-66 shows the results of the query. The namespace that the user belonged to is also included. To identify corresponding entries. the records must be matched on COGIPF_SESSIONID (Example 10-3). so it becomes possible to identify users from different business units if they are not part of the same security namespace.) When users log out of the application. COGIPF_STATUS FROM COGIPF_USERLOGON WHERE (COGIPF_SESSIONID LIKE 'F37A9BB97C040B4FF7CE95FDEEE51314F55B83B1') Chapter 10. IBM Cognos system administration 513 . User session expirations (the default passport timeout is 60 minutes of inactivity) are also indicated in the COGIPF_USERLOGON table. The same login operation also records two audit entries in the COGIPF_ACTION table. Figure 10-66 Results of a query showing the audit table row created for user John Walker’s logon As shown in Figure 10-66. COGIPF_USERID. the records are not consecutive and therefore are hard to correlate. COGIPF_NAMESPACE. Records are logged to the audit database. the user logging in and the time of the operation are recorded. COGIPF_USERNAME. The only record that is important from an audit standpoint is the record that queries the security namespace for the group membership of the user. The default inactivity timeout is 60 minutes. Example 10-3 SQL query using COGIPF_SESSIONID to select record for one session SELECT COGIPF_HOST_IPADDR. In a busy environment where many users are logging in. (The complete entry is truncated in Example 10-3 due to the length of the field.. Figure 10-68 shows a record from COGIPF_USERLOGON.</messageString></item> </messages> 514 IBM Cognos Business Intelligence V10.both failed and successful Example 10-4 shows the value for the COGIPF_ERRORDETAILS column for an invalid logon attempt.Whereas tracking user authentication is crucial for identifying usage patterns and license management. Figure 10-68 An audit entry for user logon attempts . Whenever an unsuccessful login attempt occurs. a record is written to the COGIPF_USERLOGON table (Figure 10-67)_REPORTPATH. Example 10-6 SQL query SELECT COGIPF_LOCALTIMESTAMP. Example 10-5 Error message <messages xsi: <item xsi: <messageString xsi:CAM-AAA-0055 User input is required. COGIPF_REQUESTID. auditing for the presentation service must be enabled. COGIPF_REPORTFORMAT FROM COGIPF_VIEWREPORT By joining the COGIPF_VIEWREPORT and COGIPF_PARAMETER tables on COGIPF_REQUESTID. COGIPF_TARGET_TYPE. the records are identical except for the error details (Example 10-5). IBM Cognos system administration 515 . such as the package used and the format in which the report was viewed. All of this information is also available as part of a single record in the Chapter 10. auditing is set to minimal for all services except the presentation service. In the following scenario.<_STATUS. This report was created to help identify unauthorized access to the IBM Cognos environment.</messageString></item> </messages> A sample report called security risk mitigation is available as part of the IBM Cognos System Management Methodology. Example 10-6 shows the SQL query. In the case of incorrect passwords. additional information can be obtained. Therefore. Viewing a saved report Serving up saved content is the responsibility of the presentation service. paying attention to the error details is important when trying to isolate unauthorized access to the application versus users incorrectly typing their passwords.Because the audit record only indicates a success or failure status. to just track saved report access. COGIPF_PACKAGE. b. COGIPF_REQUESTID. it becomes possible to tie the report view with the correct user (Example 10-7). COGIPF_PACKAGE FROM COGIPF_RUNREPORT 516 IBM Cognos Business Intelligence V10. If the COGIPF_USERLOGON table is joined with the COGIPF_VIEWREPORT table on COGIPF_SESSIONID. Because interactive reports are handled by the report service.COGIPF_USERNAME FROM COGIPF_VIEWREPORT AS a CROSS JOIN COGIPF_USERLOGON AS b WHERE (a. enabling auditing on the report service at a basic level records individual report executions (Example 10-8). The information that is missing is the ability to identify which user viewed the saved report output. Executing a simple report interactively There are various items of detail that might be required when tracking report executions.COGIPF_REPORTPATH. COGIPF_STATUS. versus a report actually being executed. Example 10-7 Linking the report view with the correct user SELECT a.COGIPF_SESSIONID LIKE b. The most basic requirement is tracking the fact that a report was executed. COGIPF_REPORTPATH. Logging audit data for the Content Manager service is done by setting the logging level for the Content Manager service to basic. Running the same report view query again with the additional auditing enabled reveals an entry in the COGIPF_USERLOGON table. Listed in the following section is a sample of all the types of report output formats.COGIPF_VIEWREPORT table.COGIPF_SESSIONID) Viewing different types of report output produces different entries in the COGIPF_REPORTFORMAT column. COGIPF_LOCALTIMESTAMP. COGIPF_TARGET_TYPE. it becomes possible to obtain that level of detail.1 Handbook . and using the operation type of VIEW indicates that saved content has been viewed. COGIPF_RUNTIME. Example 10-8 SQL query SELECT COGIPF_PROC_ID. By enabling auditing for the Content Manager service. You can also determine the internal storeID of the report that was viewed. the package that the report was executed against (COGIPF_PACKAGE). auditing must be enabled for the Content Manager Service (Example 10-9 and Example 10-10). but the package that was modified as part of the IBM System Management Methodology isolates each piece of information in its own query item. COGIPF_LOCALTIMESTAMP. COGIPF_LOGON_OPERATION. COGIPF_STATUS FROM COGIPF_USERLOGON Example 10-10 SQL query SELECT COGIPF_HOST_IPADDR. COGIPF_USERNAME. the amount of time it took to execute in milliseconds (COGIPF_RUNTIME). COGIPF_NAMESPACE. For example. it also becomes possible to correlate the report execution to the BIBUS process that handled the execution. and the time of the execution (COGIPF_LOCALTIMESTAMP). the type of object executed (report or analysis). fourrecords is written to the COGIPF_PARAMETER table. COGIPF_LOCALTIMESTAMP. and certain records indicate whether the action was from a series of steps involved in a prompted report. Example 10-9 SQL query SELECT COGIPF_HOST_IPADDR. Chapter 10.The SQL statement in Example 10-8 provides the necessary information to obtain details such as the report name and where the report was executed from (COGIPF_REPORTPATH). As part of the report execution audit detail. What is missing from this level of detail is the ability to determine who executed the report. By examining the COGIPF_PROC_ID column. The COGIPF_TARGET_TYPE contains various pieces of information that are all part of the same record. there are no useful parameter details for a report execution unless the internal object storeID is required. COGIPF_LOGON_OPERATION. COGIPF_USERNAME. For this to occur. COGIPF_USERID. From an information standpoint. the BIBUS process ID (PID) can be obtained. IBM Cognos system administration 517 . The sample audit package has all of this information contained in the same query item. the service that handled the request (report or batch report). In addition to these details. Example 10-12 Sample from COGIPF_REQUESTSTRING <thirdparty><![CDATA[select "COGIPF_THRESHOLD_VIOLATIONS". b.COGIPF_REPORTPATH.charinde x('service ='."COGIPF_LOCALTIMESTAMP". Examining a sample from COGIPF_REQUESTSTRING shows that the SQL statement being used in the query is contained within the record detail (Example 10-12).1)) else "COGIPF_THRESHOLD_VIOLATIONS".COGIPF_USERID."COGIPF_RESOURCE_TYPE" end from "dbo".1 Handbook .1."COGIPF_THRESHOLD_VIOLATIONS". 112). case when substring("COGIPF_THRESHOLD_VIOLATIONS". current_timestamp."COGIPF_THRESHOLD_VIOLATIONS" "COGIPF_THRESHOLD_VIOLATIONS" where "COGIPF_THRESHOLD_VIOLATIONS". By enabling an auditing parameter called audit the native query for report service.COGIPF_SESSIONID) One of the major differences between viewing saved report output is that running a report interactively executes queries at the database layer.LEN("COGIPF_THRESHOLD_VIOLATIONS". COGIPF_NAMESPACE."COGIPF_RESOURCE_TYPE") + 8. convert(datetime."COGIPF_THRESHOLD_VIOLATIONS". convert( char(8)."COGIPF_RESOURCE_TYPE"."COGIPF_METRIC_HEALTH" in ('poor'."COGIPF_RESOURCE_TYPE") -((charindex('service='. it becomes possible to isolate the queries being sent to the reporting database. COGIPF_STATUS FROM COGIPF_USERLOGON Joining the COGIPF_USERLOGON and COGIPF_RUNREPORT tables on COGIPF_SESSIONID provides a list of reports executed and the users who executed them (Example 10-11). 112 ). "COGIPF_THRESHOLD_VIOLATIONS". 'average')]]></thirdparty> 518 IBM Cognos Business Intelligence V10."COGIPF_RESOURCE_TYPE".10) = 'com."COGIPF_RESOURCE_ TYPE") + 8). Example 10-11 List of reports executed and the users who executed them SELECT a."COGIPF_METRIC_NAME".COGIPF_USERNAME FROM COGIPF_RUNREPORT AS a CROSS JOIN COGIPF_USERLOGON AS b WHERE (a.COGIPF_SESSIONID LIKE b.cognos' then substring("COGIPF_THRESHOLD_VIOLATIONS". when it was executed.COGIPF_REQUESTSTRING. COGIPF_JOBPATH. COGIPF_STATUS. and how long it took to run in milliseconds (COGIPF_RUNTIME) (Figure 10-69). COGIPF_RUNTIME FROM COGIPF_RUNJOB Examining the audit entry provides information such as the path to the executed job. various tables can be written to as a result of a job execution.To determine which user executed the SQL statement. Example 10-14 SQL query SELECT COGIPF_LOCALTIMESTAMP.COGIPF_USERNAME FROM COGIPF_NATIVEQUERY AS a CROSS JOIN COGIPF_USERLOGON AS b WHERE (a. COGIPF_TARGET_TYPE. b. This scenario details the audit entries that are recorded when a job is executed that contains two report steps.COGIPF_SESSIONID’) Executing reports through a job Depending on the steps contained within the job. Setting the audit level to basic for the job service provides a a sufficient amount of audit data pertaining to the job execution to complete this task. Example 10-13 Determining which user executed the SQL statement SELECT a. IBM Cognos system administration 519 . COGIPF_REQUESTID. COGIPF_SESSIONID. Executing the job produces a lone record in the COGIPF_RUNJOB table (Example 10-14). Figure 10-69 Query results showing records related to running jobs Chapter 10. join the COGIPF_NATIVEQUERY and COGIPF_USERLOGON tables on COGIPF_SESSIONID (Example 10-13).COGIPF_SESSIONID LIKE ‘b. There are two entries because there were two report steps contained within the job (Example 10-15). COGIPF_PACKAGE FROM COGIPF_RUNREPORT With auditing enabled at both the job service and batch report service levels. COGIPF_REPORTPATH. Therefore.1 Handbook . it is not the component responsible for executing the report steps. COGIPF_STATUS. the information is there to determine that one job and two reports were executed. COGIPF_RUNTIME. COGIPF_TARGET_TYPE. Executing the same job results in a single entry in the COGIPF_RUNJOB table and two entries in the COGIPF_RUNREPORT table. But further examination of the audit records indicates that there is no association between the job and reports. Example 10-15 SQL query SELECT COGIPF_LOCALTIMESTAMP. it does not record specifics regarding the report steps. Because the job service is responsible for executing jobs. logging for the batch report service must be set to Basic. COGIPF_REQUESTID.What is not provided are the details regarding the contents of the executed job. To capture that additional level of detail. Figure 10-70 Query results showing the two batch report service entries for the steps in our job 520 IBM Cognos Business Intelligence V10. and joining the tables on this field does not provide the necessary information (Figure 10-70). This is because the request IDs are different. Figure 10-71 Query results showing logon and logoff for job step execution 10. COGIPF_USERNAME. COGIPF_USERID. the IBM Cognos Framework Manager model can be modified to suit any particular need.The constant that ties these records together is the user that executed the job and reports. By enabling auditing at a basic level for the IBM Cognos Content Manager Service. Keep in mind that additional changes might cause the provided reports in the audit content package to fail when executed. COGIPF_NAMESPACE FROM COGIPF_USERLOGON The identifier of a user’s session is the session ID. Even if the job was scheduled to run during off hours. the user authentication action is recorded (Example 10-16). Although the metadata is designed to provide a head start to interpret and analyze the usage detail. the schedule object uses trusted credentials to authenticate the user. Figure 10-71 is based on the job execution with contents – by user report that is available as part of the System Management Methodology content package. IBM Cognos system administration 521 .8 Sample audit package This section introduces the IBM Cognos Framework Manager model and DS Servlet. Chapter 10. COGIPF_LOCALTIMESTAMP. COGIPF_LOGON_OPERATION. Example 10-16 SQL query SELECT COGIPF_SESSIONID. joining the three tables together on that column provides the necessary detail to see who executed the job and which reports were associated to that job.5. Therefore. IBM Cognos Framework Manager model IBM Cognos Framework Manager is a model that is based on the audit detail contained within the audit database. The fact that a report is never accessed means that it will never appear in the audit files. how to create data sources. there might be a desire to discover content that is not being used.ibm. This allows activities to be traced.DS Servlet Audit detail is captured as actions occur within the application. Sample audit reports The audit package provided as part of the IBM Cognos BI samples contains various reports that are intended as a head start to begin the analysis of the usage data contained within the audit database. see IBM developerWorks:. the login event is recorded along with the report execution details. The information is returned in an XML format that can be consumed as a data source and can therefore be reported on. Consult the IBM Cognos Administration and Security Guide documentation regarding the steps required to perform a content store backup.com/developerworks/data/library/cognos/page258. perform an entire backup of the content store. Additional information regarding the configuration and deployment of the audit reports can be found as part of the core product documentation. For more information about the DS Servlet. as well as the additional content that is part of the IBM Cognos System Management Methodology. To obtain this information.5. Before any deployments are executed. when a user logs in and runs a report.1 Handbook . 522 IBM Cognos Business Intelligence V10. For example. but what about the need to trace something that does not happen and therefore is not recorded? Specifically.9 Audit content package This section provides a summary of the default sample audit package that is provided with IBM Cognos BI.html 10. an SDK application is provided with IBM Cognos BI that queries the IBM Cognos Content Manager component and provides a list of content. and how to import content packages. Displays all of the reports that are executed as part of a job and the last that time the job was executed. This report lists all of the failed interactive report executions. add at least one valid email recipient. add at least one valid email recipient. The list is sectioned by namespace ID.by package Process IDs for active reports . Tracks the data source signons being used for each package and which users are using them. The email. Before running the agent. IBM Cognos system administration 523 . Daily job execution failures Daily report failures Data source signon usage . as certain conditions might affect logoff operations. The previous activities task in the administration console only tracks histories of objects run in the background. does not have any recipients specified. The prompted list report provides a date and package filter and is sectioned by package. thus providing inaccurate entries. by default. Table 10-7 Reports available with the System Management Methodology SSM report name Active user sessions Description Provides a list of active user sessions in the environment. login time. Useful for identifying potential unauthorized access attempts. Shows the reports along with the process ID associated with them for reports that do not have a termination status. The report is sectioned by dispatcher IP. Prompted report (date range) that tracks the failed login attempts. Before running the agent.by package Failed interactive report executions .by IP address Report content by job Security risk mitigation Chapter 10. and session ID. The email by default does not have any recipients specified. Agent that checks for daily report execution failures and sends out an email notification when failures are detected. There is a filter set to only show the current day's sessions. The report contents that are displayed are the reports that made up the last job execution. Agent that checks for daily job execution failures and sends out an email notification when failures are detected.Table 10-7 shows reports available with the System Management Methodology. Active means that users are currently logged in and using the product or sessions that are waiting for the inactivity timeout to be reached before they are logged out. which includes their user name. or role that is explicitly part of an object’s security policy.SSM report name Successful interactive report executions . The report shows a graphical representation of whether the action is granted or denied. severity.1 Handbook . group. Provides the list of all permissions for the EVERYONE role that is explicity part of an object’s security policy. The prompted list report provides a date and package filter and is sectioned by package. Threshold exceptions In addition to the reports that are based on the sample audit package. reports have been created based on the Audit Extension SDK application (Table 10-8). extract the files from the file located in the \SMM . and the services to which they pertain. The reports are located in the folder within the System Management Methodology folder.by package Description The previous activities task in the administration console only tracks histories of objects run in the background. Table 10-8 Audit extension reports Additional report name Object security policies Description Provides the list of all permissions for each user. Security Policy . This report lists all of the successful interactive report executions. The charts are filtered with a date range prompt. The report shows a graphical representation of whether the action is granted or denied. For more information about the Audit Extension application. The multiple chart report provides insight into threshold exceptions: frequency.EVERYONE 524 IBM Cognos Business Intelligence V10.Version 2\SDK Applications directory. Content audit An audit of all the objects that exist in the main content store.10 Audit extension The standard auditing features with IBM Cognos cover many aspects of operation. from Event Studio) Using a simple URL/web form call The results of each audit are logged to a database. Audits can be initiated in three ways: Using the management web interface Using a web services call (that is.html Chapter 10. Usage The application is managed through a web front end that allows the configuration of server and namespace information and can be used to turn on or off individual audit types for a given server. It currently covers the following areas: Account audit An audit of all the user accounts that are found in all configured namespaces and certain properties of those accounts (basic details. It logs the basic information (such as name.10. For each dispatcher registered in the target system.ibm. number of active processes. and so on) that it finds.5. see:. object permissions. reports. Status audit An audit of the current state of a server and related dispatchers. created and modified date) and certain details more specific to the item types (such as the specification XML of reports and queries. the configuration and activity is logged. and request duration. are not included. and an IBM Cognos Framework Manager model is provided to help report the data. search path. certain areas. This allows reporting on the IBM Cognos user base. saving information such as time taken to connect. and so on). any saved parameter values applied to saved reports. such as the auditing of users and capability assignments. queries. However. IBM Cognos system administration 525 .com/developerworks/data/library/cognos/page155. This audit processes through the content store tree and logs all the objects (folders. created and modified dates. The aim of the audit extension application is to provide additional auditing for these areas. portal pages. and the details of report output versions). For more information and to download the application. 526 IBM Cognos Business Intelligence V10.1 Handbook . All rights reserved.Part 5 Part 5 Complete IBM Business Analytics solution © Copyright IBM Corp. 2010. 527 . 1 Handbook .528 IBM Cognos Business Intelligence V10. All rights reserved.11 Chapter 11. metrics. 529 . 2010. actual data. In this chapter. and reports seamlessly.. budgeting. and forecasting are critical financial management processes in most organizations. greater accuracy in decision making. analysis. These functions exist within inter-connected models that are fed from as many planning participants as an organization needs to include in the planning process. and IBM Cognos Controller. In addition. and short-term or continuous forecasting. and to track the progress on achieving those plans and goals. multi-dimensional analytics needs of large-scale operations. 530 IBM Cognos Business Intelligence V10. thus.1. The OLAP 64-bit technology of IBM Cognos TM1 meets even the most complex. to create tactical plans. intermediate-range budgets. the web. and reporting needs with the following capabilities: Exceptionally fast analytics Data and user scalability Data integrity A multi-dimensional database and data tools Workflow A choice of interfaces. no matter how vast the data set might be. 11.1. including Microsoft Excel. you can view instant updates from streamed data and drill through to transaction systems for added context and. IBM Cognos Planning.11.1 Overview of IBM Cognos Business Analytics solutions This section provides an introduction to the IBM Cognos Financial Performance Management portfolio of products.2 IBM Cognos Planning Planning. and real-time reporting to high levels of detail with millions of items require the power of IBM Cognos TM1. IBM Cognos Planning provides the capabilities to create long-range strategic plans. analytics. and the IBM Cognos TM1 Contributor for managed participation 11. These processes are critical because they enable organizations to define strategic goals. So. you can query data when you need to.1 Handbook . It gives an overview on basic functionality and features of IBM Cognos TM1. IBM Cognos TM1 addresses all interrelated planning.1 IBM Cognos TM1 Complex planning. external data linking. commentary. and large amounts of plan data Increased plan accountability through visual workflow status indicators and full audit tracking capabilities Powerful user features. data validations. and forecasting. budgeting. such as Breakback (goal allocation). and forecasting. version control. Integrating IBM Cognos BI with IBM Cognos Business Analytics solutions 531 . It eliminates the problems of errors.IBM Cognos Planning allows you to maximize the accuracy and efficiency of the planning. analysis. and forecasting processes by providing the following capabilities: Aggregation and consolidation of planning data in a centralized location Scalability for large amounts of plan contributors. Users have the option to submit information simultaneously through a simple web or Microsoft Excel interface.. Using an intranet or secure Internet connection. budgeting. and timeliness that are characteristic of a planning system solely based on spreadsheets. budgeting.. IBM Cognos Planning Contributor IBM Cognos Planning Contributor streamlines data collection and workflow management. large and complex plan models. These models include the drivers and content that are required for planning. The models can then be distributed to managers using the web-based architecture of IBM Cognos Planning Contributor. users review only what they need to review and add data where they are authorized. versioning. Chapter 11. 1 Handbook . best-practice financial reporting and consolidation—all in one solution. and other regulatory requirements Standard reporting that provides information about financial performance for business stakeholders and managers Financial and management measures and metrics for scorecards.3 IBM Cognos Controller The ability of an organization to close its books. IBM Cognos Controller is a comprehensive.11. automatic report book generation and distribution Support for IAS. consolidate its accounts from all operations and partnerships. and compliant environment. and prepare accurate and auditable financial statements is critical to maintaining credibility with existing and potential investors and financial markets. controlled. local GAAPs.1. IBM Cognos Controller includes the following features: Web-based. To meet these requirements and to handle new governance and financial reporting standards. Basel II. FASB. fully scalable for any size organization Flexible processing of modifications to corporate and account structures and group histories Integrated scenario manager for simulation and modeling Real-time reconciliation of internal balances in data input Allocations that are automatically included in consolidation with status Extensive process monitoring and control Practical. Adding to that challenge is that many times an organization has disparate financial information systems within various operating divisions and geographies. finance organizations can prepare financial information and analyze and then investigate and understand it in a centralized. web-based solution that offers power and flexibility for streamlined. or market and generates an extensive audit trail to satisfy the needs of external and internal auditors. and Sarbanes-Oxley requirements and can handle any GAAP or regulatory environment—all from a single application. product. A key component of the IBM Cognos performance management platform. organizations can rely on IBM Cognos Controller. IBM Cognos Controller supports IFRS. IFRS. and analytics 532 IBM Cognos Business Intelligence V10. US GAAP. dashboards. It also enables individual segment reporting by customer. With IBM Cognos Controller. product costing. Professional Report Author: Lynn Cope (skills include report and dashboard authoring) Chapter 11. This information is valuable and must be presented to decision-makers on a timely basis along with the capability for the decision-maker to perform analysis and drill-down to details. We use the following roles in these sections: Modeler: John Walker (skills include IBM Cognos TM1 and IBM Cognos Business Intelligence Framework Manager). After reporting sources for each of the IBM Cognos Financial Performance Management applications are provided. Integrating IBM Cognos BI with IBM Cognos Business Analytics solutions 533 . and IBM Cognos Controller applications with IBM Cognos BI. IBM Cognos Planning. and other information. budgeting. we present a business scenario that integrates the IBM Cognos TM1. you can use the reporting techniques that we discuss in this book to create IBM Cognos BI content.11. IBM Cognos BI and the integration between the IBM Cognos Financial Performance Management applications provide these capabilities.2 Business scenarios and roles to take advantage of IBM Business Analytics In this section. In addition. depending on the models that are defined within the applications. workforce information. This scenario shows how to provide a reporting source for IBM Cognos BI professional authors and analysts. financial consolidations.. forecasting.. All rights reserved. 545 .Part 6 Part 6 Appendixes © Copyright IBM Corp. 1 Handbook .546 IBM Cognos Business Intelligence V10. © Copyright IBM Corp.ibm. you can go to the IBM Redbooks website at: ibm. All rights reserved. Locating the web material The web material that is associated with this book is available in softcopy on the Internet from the IBM Redbooks web server. 547 . Additional material This book refers to additional material that you can download from the Internet as we describe in this appendix.com/redbooks Select the Additional materials and open the directory that corresponds with the IBM Redbooks form number. 2010. How to use the web material Create a subdirectory (folder) on your workstation.redbooks. Point your web browser at:. SG247912.zip file into this folder.A Appendix A.com/redbooks/SG247912 Alternatively. and extract the contents of the web material . 1 Handbook .548 IBM Cognos Business Intelligence V10. 549 .. 1 Handbook .550 IBM Cognos Business Intelligence V10. 875”<->1.498” 460 <-> 788 pages .0” spine) 0.1 Handbook (1.IBM Cognos Business Intelligence V10. . . Customers and Partners from around the world create timely technical information based on realistic scenarios. and IT Architect. Administrator. Modeler.1 Handbook ® Understand core features of IBM Cognos BI V10.Back cover ® IBM Cognos Business Intelligence V10. Experts from IBM.1 Realize the full potential of IBM Cognos BI Learn by example with practical scenarios This book uses a fictional business scenario to demonstrate the power of IBM Cognos BI. For more information: ibm.com/redbooks SG24-7912-00 ISBN 0738434817 . The book is primarily focused on the roles of Advanced Business User. INTERNATIONAL TECHNICAL SUPPORT ORGANIZATION BUILDING TECHNICAL INFORMATION BASED ON PRACTICAL EXPERIENCE IBM Redbooks are developed by the IBM International Technical Support Organization. You can use this book to: Understand core features of IBM Cognos BI V10. This IBM Redbooks publication addresses IBM Cognos Business Intelligence V10. Professional Report Author.1.
https://www.scribd.com/doc/84348750/IBM-BI-Solution-Handbook
CC-MAIN-2017-39
refinedweb
80,837
60.21
I've been programming backend services for some years now, and have come up with a .NET base class that makes writing a Windows Service just like building an application. I've incorporated the classes into the Pegasus Library. You can download the code and sample from there. To build a service is not that hard since .NET came around. Let's setup a project in Visual Studio 2005. Service1 using Pegasus.ServiceProcess ServiceBase ServiceExcutable ServiceExecutable using System; using System.ServiceProcess; using Pegasus.ServiceProcess; namespace MyWindowsService { public partial class Service1 : ServiceExecutable { // Public Const Values public const string MYSERVICE_NAME = "MyWinSvc"; public const string MYSERVICE_DISPLAYNAME = "My Windows Service"; public const string MYSERVICE_DESCRIPTION = "This service is cool."; public Service1() : base( MYSERVICE_NAME ) { InitializeComponent(); } protected override void OnStart( string[] args ) { } protected override void OnStop() { } } } Main() RunService() public static void Main( string[] args ) { Service1 service = new Service1(); service.RunService( args ); } Now we have our Window Service. At this point, we have a service, but it doesn't do anything. As you design the rest of the functionality of a Windows Service, there are a few things you need to keep in mind. The constructor is called when the application's executable runs, not when the service runs. Windows may load the EXE into memory (and thus call the Main() method) but not start the service right away. When the services continue from a paused status, for example, the constructor is not called again because the Windows Service Control Manager (SCM) already holds the object in memory. If OnStop() releases resources allocated in the constructor rather than in OnStart(), the needed resources would not be created again the second time the service is called. OnStop() OnStart() Because of this, you should not use the constructor to perform startup processing, rather use the OnStart() method to handle all initialization of your service, and OnStop() to release any resources. An application owns all of the threads in the process, and a developer can pretty much do what they want. In a service, the main thread is owned by the SCM, and it's just loaned out to your service as needed (the SCM uses a thread pool to talk to services). In fact, it is possible to have the SCM create the service object, call the OnStart(), and call the OnStop() methods all on different threads. To avoid any conflict that this can cause, it's a good idea to spawn a thread in the OnStart() method and do the work of the service on your own thread. For our example, we add the following code to our service class. private Thread m_thread = null; private AutoResetEvent m_done = new AutoResetEvent( false ); protected override void OnStart( string[] args ) { m_done.Reset(); m_thread = new Thread( new ParameterizedThreadStart( args ) ); m_thread.Name = "MyWinSvc Working Thread"; m_thread.Start(); } protected override void OnStop() { m_done.Set(); if( !m_thread.Join( 2000 ) ) { RequestAdditionalTime( 5000 ); } m_thread = null; } private void DoWork( object parameters ) { while( !m_done.WaitOne( 0, false ) ) { // This is where the real work happens Thread.Sleep( 1000 ); } } For our example, the service will just sleep for 1 second and then check to see if the work is done. If not, it will sleep for another second and check again, etc., etc., etc... When the SCM calls the OnStart(), OnStop(), OnPause(), or OnContinue() method, you only have so long (60 sec or so) before you must return. If you do not return within this time, then the SCM will mark that service as not responding. After a while, it can out right kill the process you are running in. If you need more time to process things during these methods, you can call the RequestAdditionalTime() method and tell the SCM that things are talking a bit longer that it expects. (See the OnStop() method in the example above.) OnPause() OnContinue() RequestAdditionalTime() public void RequestAdditionalTime( int milliseconds ); For most services, the OnStart() and OnStop() methods will be enough for a service to startup and stop. However, some services may need to have the ability to pause and continue. To support this functionality, we must tell the SCM that the service supports the Pause and Continue methods. This is done by setting the CanPauseAndContinue property to true in the OnStart() method. CanPauseAndContinue true protected override void OnStart( string[] args ) { CanPauseAndContinue = true; ... } You can then override the OnPause() and OnContinue() methods to handle the proper functionality for each context. In our example, we will suspend our working thread when Pause is called, and resume the thread when Continue is called. (Yes, I know that Suspend and Resume are deprecated in .NET 2.0, but it's just an example.) protected override void OnPause() { m_thread.Suspend(); } protected override void OnContinue() { m_thread.Resume(); } There are three other sets of system event methods that you can use to tell what is happening on the system. Each of these has their own CanXXXX property that must be set to true for the SCM to call the event handler. CanXXXX public bool CanShutdown protected virtual void OnShutdown(); Called when the system is shutting down. This is different from a stop event. In this case, not only is the service being stopped, but the whole system is being shutdown. public bool CanHandlePowerEvent protected virtual bool OnPowerEvent( PowerBroadcastStatus powerStatus ) These are called when the power status of the system is changing. A service can know that there has been some type of power event, like a power outage, or the system is on batteries, or the batteries are low, etc... This method has a return value of type bool. The needs of your service determine what value to return. For example, if a QuerySuspend broadcast status is passed, you could cause your service to reject the query by returning false. bool QuerySuspend false public bool CanHandleSessionEvent protected virtual void OnSessionChange( SessionChangeDescription changeDescription ) These are called when a system session event occurs. Session events are caused when a new user logs in or out of the console or the terminal services. SessionChangedDescription is a structure that contains the reason for the event and the session ID the event occurred in. SessionChangedDescription Up to this point, we have not done anything Microsoft did not already provide in the ServiceBase class. But here is where the ServiceExecutable class comes into play. If you just create a .NET service project and select Debug | Start Debugging [F5], you will get the following error: Now if you follow the instruction, you have to register the service, start the service, and then attach the debugger to the running process; and you have to do this each time you want to debug the code. I found this to be a pain, and I'm a bit spoiled by Visual Studio's [F5] key to just compile and run an application in Debug mode. The ServiceExecutable class allows us to do just that. ServiceExecutable first checks to see if the process is running under a Debugger (Visual Studio, in our case). If so, the ServiceExecutable class then simulates the SCM and creates a window (for Debug/Trace messages) for the service, and calls the OnStart() method. So all you need to do now is press [F5] to compile and run the service, and you should see a window similar to this: To stop the service, just close the window, or select File | Exit from the menu. The OnStop() methods will be called just like the service was being stopped by the SCM. The ServiceExecutable class will register a listener interface to catch Trace/Debug messages. Pegasus also uses the Log4Net API and connects an adapter interface to catch any Log4Net messages as well. The File | Log4Net Configuration menu item brings up a dialog box that allows you to set/reconfigure the logging level at runtime. The menu also provides a menu option for testing/debugging the OnPause(), OnContinue(), and OnShutdown() methods of your service. OnShutdown() There are a couple of things that you need to be aware of when running in Debug mode this way. The Power and Session APIs do not work (even if you set the proper CanXXXX properties). To debug these, you have to debug the Microsoft way, register the service, start the service, and attach to the debugger. I will try to add these in a future version of the class. The other thing to look out for is security. When running in Debug mode, the service is running under your account's security context. As most developers run as an Administrator when developing code, you (and thus the service) have full access to system resources and services. But if you deploy under a different account, say Local Service, then the service may not have access to a resource at runtime that it did when you were debugging it. So just keep this in mind when designing your service. The last item on our list is how to deploy a service. This process again starts with the basic .NET installer classes. Add the following class (MyInstaller) to your service project. MyInstaller You must also add a reference to your project for the System.Configuration.Install assembly. I'm not going to discuss the ins and outs of the Installer classes in this article; if you want to understand them more, there are a couple of good articles on Microsoft's MSDN website and here on the CodeProject website. To help install a service, Microsoft wrote a little application called installutil.exe which looks for the install class (the one marked with the RunInstaller attribute), and then executes an install or uninstall depending on command line options. That's all fine and good, but they forgot one thing: to include it in the .NET 2.0 redistributable packages. Now, you can always copy this file around with your service, or you could write a MSI install application for your service, but that's just silly. RunInstaller The ServiceExecutable class provides several command line options if you run your service EXE from the command prompt: There is one thing we need to do to support this functionality, and that is to tell the ServiceExecutable class about our installer. To do this. we just need to add the following line of code to our Service class' constructor. Service public Service1(): base( MYSERVICE_NAME ) { InitializeComponent(); // Register the install class ServiceInstallerType = typeof( MyInstaller ); } This tells the ServiceExecutable class which installer to use to install or uninstall the service. Windows Services used to be difficult to write. With the ServiceExcutable class, developers now can create Windows Services easily to support a variety of backend services and business logic. Debugging can be done without having to launch the service and attach to the process; developers can debug the service like they do for.
https://www.codeproject.com/Articles/19370/Windows-Services-Made-Simple?msg=2859070
CC-MAIN-2017-47
refinedweb
1,778
62.78
Recall the following axiom from your CS101 class…? “To solve a problem, create abstractions. To attain efficiency, remove abstractions.” Such is the case with I/O in the Cloud (i.e. all Clouds). Efficiency requires designing for the underlying platform with specific considerations for storage account quotas, network constraints, and partitioning strategies across available resources. Regarding storage, the article published here is a good place to start with understanding capabilities and constraints.. First, a look at what we are to achieve herein… - Configure a file server (SMB protocol, port 445) with a persistent name (e.g. “myfileserver.cloudapp.net”). - Create a file share (e.g. “\\myfileserver\myshare”) accessible from other Windows Azure worker-role VMs (e.g. compute-nodes) with user authentication (we will use workstation-mode, NTLM, and not domain authentication). - Ensure that the file share is backed by blob storage. - Execute a compute job wherein the working directory path resolves to a UNC path (e.g. “\\myfileserver\myshare”). Note the following non-objectives (perhaps to be documented in subsequent posts or even superseded by future platform features). - Load-balance across multiple SMB file servers. - Optimize I/O (via partitioning) across multiple blob storage accounts. - Distribute the file structure namespace across multiple file shares (e.g. using mklink from the client perspective). - Leverage mountable read-only VHD files in order to gain wider distribution and staging of read-only data. - Utilize alternative file distribution utilities (e.g. ClusterCopyConsole) to stage job input data. - Address on-premises to file server VM connectivity (e.g. using Windows Azure Connect or Virtual Network). - Securely configure the service and file server VM instance. Effectively, for illustration purposes, our Virtual Machine hosted file server instance will be a single point of I/O for any number of compute-node server instances.. Configure the Compute Node Templates You may wish to familiarize yourself with the “burst to azure” capability of Windows HPC Server 2008 R2. Also, a previous article discusses how to utilize start-up scripts in connection with “Windows Azure Node Templates”. You can utilize a start-up script to configure your worker-role compute-nodes so that they can “see” \\MyFileServer\MyShare. Let’s illustrate how that’s accomplished… The following image illustrates a list of Compute Node Templates within the HPC Server Cluster Manager console.). Configure Your Job to Use the File Server and Share. Subsequent tasks, within your job context, will have access to the file server resources. For example, you can configure the Working Directory to utilize the file share for task input or output. References
https://blogs.msdn.microsoft.com/philpenn/2012/08/30/how-to-configure-a-windows-azure-virtual-machine-file-server-and-use-it-from-within-windows-hpc-server-compute-jobs/
CC-MAIN-2016-30
refinedweb
426
50.12
I. I. At first, I was using a simple tool to compute the MD5 hash of each image in my collection. That technique easily eliminated exact duplicates, but frequently, the same image was different enough to confound the tool. For example, if the original image had been scaled, re-rendered at a different JPEG quality, or converted from JPEG to PNG, the actual bits are different and the MD5 hashes differ, even though the image is nearly the same on my screen. So, a few days ago, I set out to write a program that could find similar images, not just identical images. My strategy is to reduce each image to a 4-by-4 grid of RGB values, yielding a 48-number vector of values from 0 to 255. Regardless of the re-rendering or resizing of the image (or even minor touchups), the vector should be identical (or close) for images with the same original source. After a few hours of experimentation and tweaking, the results of my work can be seen in Listing One, below. Lines 1 through 3 start nearly every program I write, turning on warnings, compiler restrictions, and disabling the buffering of STDOUT. Line 5 pulls in the move routine defined in the core File::Copy module. I’ll be using this to rename any corrupt images, an interesting outcome of having to scan them anyway. Line 7 pulls in the CPAN-located Image::Magick interface, also known as PerlMagick. I’m not sure why I have such a hard time installing and using image libraries, but Image::Magick is certainly a prime example of a finicky-to-install and vastly underdocumented image manipulation module. However, when you get it to work, it is indeed “Magick.” Line 8 pulls in the Cache::FileCache module, part of the Cache::Cache distribution found in the CPAN. Because the conversion of an image to its vector can take time, I cache the results. The cache key is computed as something that won’t change even if I rename the item on the disk, which makes it easy for me to move my images around or give them more meaningful names without losing the work done on the image. Line 10 predeclares the warnif() subroutine, used in the middle of the program, but not defined until the end, so that I can use it without parens. Lines 12 to 15 collect my “likely to change” constants. Line 13 defines the fuzz factor. If the average absolute difference between each of the corresponding 48 numbers in each of the vectors of the two images doesn’t exceed this value, it’s a match. I found 5 to be a nice compromise between too many false positives (two similar images being declared identical) and too many false negatives (not seeing a pair when the pair was there). If the value of $CORRUPT in line 14 is defined, then a directory by that name is created if necessary, and any corrupt image (according to Image::Magick) is renamed into the directory as they’re seen. If set to undef instead, then the image is merely ignored (with a warning). Lines 17 to 20 define a file-based cache, located below the invoker’s home directory. I use the glob operator to expand ~/.filecache to its full name. The glob is used in a literal slice to extract the first of what is hopefully only one response value. (There are about a dozen other ways of doing this, but this one worked the first time I tried it, and should hopefully be sufficiently portable.) Line 22 defines the array holding the “buckets.” Each bucket contains an arrayref. The first element of that referenced array is itself an arrayref of the 48-integer vector for all images in that bucket. The remaining elements are the filenames. The bucket strategy is a simple linear search: as each new file is examined, its vector is compared to the vectors of all previously computed buckets. If there’s a match, the name is added to the end of the list. If there’s no match, a new bucket is added to the end, with the unmatched vector and initially, the one filename for that vector. While I first imagined this to be hideously slow (it’s an O(N2) algorithm, I think), in practice I found that I could identify matching images of an 8,000-image test directory in about two or three CPU minutes on my laptop. That’s “fast enough,” as they say. Lines 25 to 85 form the main per-file loop. Because I had to pop out of nested loops, I gave this loop a label of FILE. It’s good to name loops based on the noun of the thing being processed, so the shorthand of next FILE reads nicely. The loop reads @ARGV for as long as it’s there, being peeled off one element at a time into $file in line 26. Lines 27 to 33 permit the list of names to include directories, which if found, are recursively processed. If a directory name is seen, then the directory is opened, and the contents are examined. Every file beginning with a dot is discarded, and the remaining elements have the directory name prepended to them. By unshifting the value back into @ARGV, we get a depth-first scan of the directories. While I probably could have used File::Find here, I decided to open-code the steps instead. I had already gotten the program to work for all of the files specified on the command line, but I wanted to test the program with even more files than are permitted on a command line. By adding the code to replace any directory with its contents, I could just use . as one of the entries instead, and it seemed to work as needed. Line 35 ensures that I process only plain files. I test against the magic underscore filehandle, which contains a cache of the information on the previous test (line 27) to avoid making redundant system calls for information. Line 37 to 39 compute the cache key for this file, a value that remains constant even if the file is renamed. The dev/ino pair of numbers uniquely define the specific Unix inode on the specific disk on which the file is located, which doesn’t change as long as the file is merely renamed. And the modification timestamp also remains constant if the file is renamed, but will change if the contents are somehow altered. Thus, the triple of dev/ino/mtime is a useful way to track a particular version of an item, even if it’s been renamed. Line 41 defines the array to hold the 48-element vector for the image, while line 43 provides a lable for tracing the operation. Lines 44 to 46 try to get the vector simply by looking at the cache. If that’s possible, then we don’t have any hard work to do for this particular image. Otherwise, starting in line 48, the vector is computed. First, an Image::Magick object is created (line 48) and then the file is read in as an image (line 49). If there’s an error, we decide if the file needs to be renamed (line 50). If the error string contains corrupt or unexpected end-of-file (the two cases I saw most frequently), then lines 51 to 53 move the file into the designated directory, keeping its original image name, but discarding the source directory. Yes, this would be a problem if I was scanning a large hierarchy, but then again, the image is already corrupt, so it’s probably no big deal. If there’s any other error, the file is merely skipped and noted (line 56). Once the image object is created, we show some statistics in line 62 about the image size. Lines 63 through 65 normalize the image (adjusting the brightness and contrast for maximum range), change the image to a 4×4 grid, and then set the “type” to rgb, which permits us to extract the RGB triples in line 66. ImageToBlob returns a 48-byte string that subsequently gets expanded by the unpack operation into a series of values from 0 to 255. Line 67 stores this vector into the cache for later extraction. Lines 71 to 82 implement the bucket matching algorithm described earlier. First, a linear scan is made of all the existing buckets using the loop starting in line 71. Line 72 defines the accumulated error as we look at pairs of values from the two vectors being compared. Line 74 walks an index value through the list of 0 through 47, so we can examine each pair. Line 75 increases the error sum by the new differences value. If the value exceeds the total permitted, according to the fuzz factor, then we bail and go on to the next bucket. Note that this means that for many vector comparisons, we can abort very early, as soon as the sum of the differences exceeds 240 units (5 times 48). Thus, if the upper left pixel of the new image is bright red, but the upper left pixel of the image being compared is black, the difference is already 255, and we abort after one comparison. I think this is the part that allows me to run the 8,000 images in reasonable time. If a given image matches “close enough” to a particular bucket, we end up at line 79. We add the filename to the end of the bucket list, and then report that this image has been identified as similar enough, giving a list of all previous matching names. Note that this is not necessarily the final list, because later images may also match this bucket. Also note that this set of comparisons isn’t quite right, because we use the vector of only the first image of a bucket for all remaining comparisons, even though there’s a slim possibility that a new image might have matched one of the other bucket members instead. Again, this is still close enough and fast enough for my purposes. If the bucket list is completely scanned, but we still haven’t found a match, we end up in line 76, which simply adds a new bucket with the current vector and filename. Lines 87 to 105 handle the interesting task of displaying the similar images, letting me choose which (if any) to delete. First, the bucket is turned into an array in line 88, and the vector is discarded in line 89. If there’s only one item in the bucket, we skip it in line 90. Lines 91 to 94 create a montage of the images. First, a container image is created, then loaded with all of the images using their names in line 92. Then a montage is created that scales each image to within a 400 by 400 thumbnail, annotated below by the image number (in brackets), the image file name, the width and height, and the number of bytes of the image file size (often an indication of differing JPEG quality). Lines 95 and 96 display this montage onto my currently selected X11 server. Usually, I just need to glance at the images, determine if they are the same, and if so, which one (or many) needs to be deleted by noting the image number in the brackets. I then press space to dismiss this image window, and am presented with a prompt in line 97. If I want to delete any of the values, I enter the integer value there, or just press return if I don’t want to delete anything. I can enter more than one value by using spaces or commas as a delimiter, because line 90 rips out any consecutive integer sequence as one of the values. The grep keeps the integers from being out of range (I once typed 0 and deleted the wrong image by mistake). Lines 100 to 104 take this list of integers and gets the corresponding filenames back from the image object. Note that I don’t use the original @names array, because I’m paranoid that maybe Image::Magick might have skipped over some files that have disappeared or become unreadable between the time that I scanned them and put them into the bucket and the time that I’m now displaying their montage. Line 102 provides a trace of the action, and line 103 does the deed, blowing away that redundant waste of disk space. And there you have it. Lots of stuff going on there, but simple in its design, and yet powerful and customizable. And now my disk is getting cleaner, because I can remove all of those redundant images. Until next time, enjoy! Listing One: A Perl script to find similar images 1 #!/usr/bin/perl -w 2 use strict; 3 $|++; 4 5 use File::Copy qw(move); 6 7 use Image::Magick; 8 use Cache::FileCache; 9 10 sub warnif; 11 12 ## config 13 my $FUZZ = 5; # permitted average deviation in the vector elements 14 my $CORRUPT = “CORRUPT”; # if defined, rename corrupt images into this dir 15 ## end config 16 17 my $cache = Cache::FileCache->new({ 18 namespace => ‘findimagedupes’, 19 cache_root => (glob(”~/.filecache”))[0], 20 }); 21 22 my @buckets; 23 24 FILE: 25 while (@ARGV) { 26 my $file = shift; 27 if (-d $file) { 28 opendir DIR, $file or next FILE; 29 unshift @ARGV, map { 30 /^./ ? () : “$file/$_”; 31 } sort readdir DIR; 32 next FILE; 33 } 34 35 next FILE unless -f _; 36 37 my (@stat) = stat(_) or die “should not happen: $!”; 38 39 my $key = “@stat[0, 1, 9]”; # dev/ino/mtime 40 41 my @vector; 42 43 print “$file “; 44 if (my $data = $cache->get($key)) { 45 print “… is cachedn”; 46 @vector = @$data; 47 } else { 48 my $image = Image::Magick->new; 49 if (my $x = $image->Read($file)) { 50 if (defined $CORRUPT and $x =~ /corrupt|unexpected end-of-file/i) { 51 print “… renaming into $CORRUPTn”; 52 -d $CORRUPT or mkdir $CORRUPT, 0755 or 53 die “Cannot mkdir $CORRUPT: $!”; 54 move $file, $CORRUPT or warn “Cannot rename: $!”; 55 } else { 56 print “… skipping ($x)n”; 57 } 58 59 next FILE; 60 } 61 62 print “is “, join(”x”,$image->Get(’width’, ‘height’)), “n”; 63 warnif $image->Normalize(); 64 warnif $image->Resize(geometry => ‘4×4!’); 65 warnif $image->Set(magick => ‘rgb’); 66 @vector = unpack “C*”, $image->ImageToBlob(); 67 $cache->set($key, [@vector]); 68 } 69 70 BUCKET: 71 for my $bucket (@buckets) { 72 my $error = 0; 73 INDEX: 74 for my $index (0..$#vector) { 75 $error += abs($bucket->[0][$index] - $vector[$index]); 76 next BUCKET if $error > $FUZZ * @vector; 77 } 78 79 push @$bucket, $file; 80 print “linked “, join(”, “, @$bucket[1..$#$bucket]), “n”; 81 next FILE; 82 } 83 84 push @buckets, [[@vector], $file]; 85 } 86 87 for my $bucket (@buckets) { 88 my @names = @$bucket; 89 shift @names; # first element is vector 90 next unless @names > 1; # skip unique images 91 my $images = Image::Magick->new; 92 $images->Read(@names); 93 my $montage = $images->Montage(geometry => ‘400×400′, 94 label => “[%p] %i %wx%h %b”); 95 print “processing…n”; 96 $montage->Display(); 97 print “Delete? [none] “; 98 99 my @dead = grep { $_ >= 1 and $_ <= @$images } <STDIN> =~ /(d+)/g; 100 for (@dead) { 101 my $dead_name = $images->[$_ - 1]-> Get(’base-filename’); 102 warn “rm $dead_namen”; 103 unlink $dead_name or warn “Cannot rm $dead_name: $!”; 104 } 105 } 106 107 use Carp qw(carp); 108 sub warnif { 109 my $value = shift; 110 carp $value if $value; 111 }
http://www.linux-mag.com/id/1437
crawl-002
refinedweb
2,611
66.27
Oh my ! I can't belive it I'm writting this article, this is my first contributtion ever made at any place on the web; (it was really hard for me, but an XBox it's really an incentive!). Before the race to linux was started (like 1 month before), i discovered this interesting tool, Grasshoper from MainSoft, trust me; very fine tool avaliable here:. I played with it for some time and then, whoa !; the race for linux was announced (i was very excited); I had the 1.60 version which caused me some troubles (that i hadn't noticed at first). I liked a lot the article from Mark Cafazzo for the Linux race, so i will follow his writting a little. Notes: The demo project file included here is pretended to be a self-contained package, ready to deploy on a tomcat server. But due to limitations of 2Mb file to the article the files had been ripped of the demo project zip (war) file. For this article you will need: To succesfuly port an ASP.NET app to Linux I know of two possible ways: re-code everything, or use a reimplementation of the .NET framework; (personally I think the second one is better and easier). Mono project aims to port the .Net framework so you can use it on other platforms; also Mainsoft has a similar way (they implement the .NET namespace components into java components so the can run in a java enabled environment). Mainsoft provides us with effective aproach, compiled MSIL assemblies are converted to their similar at java (java bytecode); perfomance is not affected due the fact that they are not recompiled or modified, only translated to that of java. Once our code is java-enabled bytecode, grasshoper will package it for us to deploy it via a WAR file (basically a zip renamed file which contains the files and assemblies needed for the app to run). So basically, while our java framework components are named equal to that of the .NET (System, System.Data and so on) we can produce the same app for a java environment. To port any app from ASP.NET to java i would recommend the following steps: Installing Linux (at any flavor) is out of the scope of this this article, however you may find it useful if you google for "Installing Linux" or vitis here: Installing Linux has been made easy by the Linux providers, almost any distro has a graphical interface and should not be very hard to complete the process. As an alternative you can try Linux inside Windows from Mainsoft, avaliable at "Linux Tools" at their download site; as well you may try a virtual machine environment as VMWare if you like. Virtual Machine environment also has the advantage that you can make a mistake and nothing fatal ocurrs, you just start from beggining. To install the tomcat server in your linux box depends on the distribution you have chosen, you can use YaST or RPMs which are the package managers for applications on your linux machine. For Suse you can open the YaST control center an select to install Which will enable you with the java required environment, if the manager complains about dependencies install them. After installing tomcat make sure to start the tomcat service, the most generic way is but also for Redhat/Fedora will do the job. If your environment does not support YaST but does RPM this url may also be useful: Once your tomcat is running you can test it on, if you see that funny cat you are up and running. Test also the samples given onthe welcome page. Your server-wide administrator for tomcat can be viewed at, be sure to edit the "tomcat-users.xml" file at the config directory and that the groups manager and admin exists. Your deployment web based tool is at, you can deploy your war file here or deploy a directoy based app. Once your war is deployed test it, voila !; your app is up and running in tomcat server. For the bravest ones one final step is required, make it run on apache with the mod_jk or mod_jk2 connectors to have a real world java based app. Additional installing instructions for other servers can be found here: Happy port.
http://www.codeproject.com/Articles/11845/ASP-NET-Report-Kit-Grasshoper-Race-to-Linux?fid=221198&df=90&mpp=10&noise=1&prof=True&sort=Position&view=Expanded&spc=None
CC-MAIN-2014-35
refinedweb
722
67.89
Introduction This is the second article on “Python for Security Professionals, ” and the first article can be found at which covers a simple directory buster, packet capturing and decoding. In this part we are going to discuss the below using python: - Port scanning - Parsing text files for regex - Creating a reverse TCP shell Followed by a scenario discussion and code enhancement. So, let’s start. Some prerequisites before baking the code When we have a network, checking every host manually for collecting information will not be a viable option, in such cases, network scans can make this task easy and fast. Network scans can be used to accomplish various purposes like: - Host discover and its status (alive/dead) - Check port status(open/closed) - Search vulnerabilities - Fingerprint OS Different scans use different approach depending on the result required. A TCP connect scan will try to open a TCP connection, and if the connection is successful, the port is opened else closed. What is regex? Regex or regular expressions are syntaxes or a small filter which can be used/applied to a set of data to filter it as per requirement. - \d à to look for integer - {4} à Look for 4 characters - ‘-‘ à The character ‘-‘ itself - “.” à[Matches anything in the given set] - [a-z] à Matches lower case alphabets - ^ à Matches anything apart from this, e.g. [^H5P] match anything apart from H or 5 or P Example: In case you are less familiar with regex, you can check the online regex interactive examples at Python module: re In the Python re module is being used to accomplish regular expression >>help(re) #code Methods present in the re module - Compile à Converts the pattern into regex engine understandable form - Search à Scans for pattern - Match à Only matches if the pattern is present at the beginning of the string - Findall à Returns all matched patterns in the string Shell and Reverse Shell A shell is something which allows us to execute commands on a system. A reverse shell is a shell connection initiated by the client to the server. The server can then execute commands in that client shell and can see the output on the server. Module name: subprocess In python subprocess module is used to handle subprograms or subprocesses. Further help regarding the module can be found out using Python itself. >>Import subprocess >>help(subprocess) Let’s code stuff Port scanning and Banner grabbing The code discussed below will scan a host and port range to check for the status of the port. The post can then be separately analyzed for the services running and vulnerabilities. We will be performing a TCP connect scan (Actively connecting to a port) for doing this. NOTE: TCP connect scan can be easily detected and blocked since we are trying to create a connection. Limit the no of ports to be scanned to avoid detection. Code and comments ”’ ********** USAGE ************** Copy and save the code with .py extension ex. Scanner.py Open the command window (where the script has been stored) and run the command: python scanner.py Rest of the code is user interactive. Make sure that the path where python has been installed is added to the environment variables. ”’ # importing the required packages import socket, sys # Creating a TCP socket connection connect = socket.socket(socket.AF_INET,socket.SOCK_STREAM) # Make the user enter the host address to be scanned host=input(“Enter the host to scan for open ports: “) print(“\n”) # The user can enter garbage value or fatfinger the hostname while typing, check if this gets resolved for a valid IP address try: IP=socket.gethostbyname(host) except: print(“%s –> Oops! Entered host cannot be resolved to an IP address” %host) exit() # Get the starting and ending of the ports to be scanned first_port=input(“Enter the starting/first port to be scanned for: “) last_port=input(“Enter the last port to be scanned for: “) # The ports entered by the user needs to be converted to an integer for feeding this to the range function else this will give an error. int_first_port=int(first_port) int_last_port=int(last_port) # Just print the information just in case the user wants to save the result to a text file print(“\n”) print(“The host address to be scanned is: %s” %host) print(“The IP address to be scanned is: %s” %IP) print(“The port range to be scanned is: %d to %d” %(int_first_port,int_last_port)) print(“================== SCANNING ===================”) # Loop through the port range and check if we are able to create a successful connection for port in range(int_first_port,int_last_port+1): try: connect.connect((IP,port)) print(“%s Port open” %port) connect.close() # If we are not able to connect the port is closed. except: print(“%s port closed” %port) exit() Usage and enhancements The code can be used when we need to check if a port is opened or not during a security testing. A website can be tested if port 80 is being opened, this can be a security risk as it is less secure. Let’s say that you have a list of websites which needs to be tested for some port/port range being open or closed. The code will not be of much help if the port range to be scanned is large. Thus, we have the scope of enhancement. The code can be enhanced to perform the following: - Take multiple hostnames from a text file and perform the scan. The user can start the scan and perform some other work or take a break for coffee. - Introduce timestamps: It will be useful if the timestamp of when the scan started and ended. This can also be used to calculate the duration of the scan, and this can be used as a parameter to speed up our tool as well. - Introduce threading: You will realize that the scan is fast when we have a small range of ports, but this becomes slow when the range is large. Make the code threaded so that the speed increase since multiple threads will be running in parallel. (HINT: Threading module in python will be of help) Regex Regex handling can be tricky at times due to some factors: - File or data not in correct format - Regex pattern is difficult to create and contains false positives However, once we have the regex pattern ready, it saves a lot of time and effort for parsing data. We will be taking a simple example in which we need to search for a phone number from the data present in a file. The data present in the file will be read into a buffer and then be filtered using the regex pattern for the presence of the pattern. The matched searches are then printed on the screen. Code and comments ”’******************* USAGE ******************* Copy and paste the code into an IDE and save it (regex.py) Command to run the code: python regex.py You will be asked to enter the file path where the data file which has to be parsed is saved Handling regex in python ”’ # importing the required modules, re module is required for working with regex import re,os # The use is asked to enter the path of the file from which the raw data is to be searched for regex. file_path=input(“Enter the file path which contains the raw data”) buffer = “Read buffer:\n” # The data from the file is stored in a buffer buffer += open(file_path, ‘rU’).read() # The below line is just to make sure that the data is getting stored in the buffer, can be commented as well print(“===================== BELOW DATA IS PRESENT IN THE FILE ========================”) print(buffer) print(“===================== PARSED OUTPUT BELOW========================”) # Compile function from re module can be used to provide the regex pattern we are searching for. # Below regex pattern is for searching the phone number; this can be changed as per your need. a = re.compile(‘\d{3}-\d{8}’) # Findall function from the re module can be used to find the pattern in the data. The data which has been found will be stored in the form of a list and can be printed using a loop. find = re.findall(a,buffer) for i in find: print(i) Data present in the text file is below: Output of the code Usage and enhancements The code can be of help when we have raw logs from various security tools. Let us consider the case that your organization has been flooded with spam emails and the only thing you have now id the dump of logs from the mail server. Will you be reading that to parse the critical data (may be source IP address of the attacker) or will you prefer to spend some time on the raw logs and identify the regex of what you are looking for? The choice is yours, but in the interest of time, scripting will be helpful. The points of enhancements can be: - Is there a need to print out the buffer? If not skip this since the buffer will usually be large. - It will be great if the output is piped into a text file for usage and ease of reading. This can be further used as an input to some other programs. The output can also be directed to a CSV file for further analysis (ex: filtering the legitimate IP addresses from which we expect the mails)(HINT: python module openpyxl can be helpful when dealing with excel files) Ethical Hacking Training – Resources (InfoSec) Reverse TCP shell A reverse TCP shell is handy when we are performing a penetration test. It can be used to execute commands on the client side and guess what? The client initiated it. This trick is a must in your toolkit if you are a penetration tester. There are 2 parts for this code. - Server-side code This will just listen for a connection on a port and will accept any connections on that. Whenever the client (victim) tries to initiate a connection, it will be accepted. - Client-side code This part of the code will have the IP and the port (of the server) coded in the script and will connect to the server to accept the commands. NOTE: The output of the command or the command will not be displayed on the screen on the client side. Code and comments NOTE: Use Python 2 for this code as we are using Kali as our server to accept connections from the clients. ”’ *********** USAGE *********** Copy and save the codes in two different files. Run the code like python TCP_server.py on the server machine and run the client file on another client machine on the same network. Run the client-side code on the client machine like python TCP_client.py. You can check the server screen and launch commands. ”’ A. TCP_Server code # Importing the required modules import socket # defining a server connect function def server_connect(): # creating a TCP socket s=socket.socket(socket.AF_INET,socket.SOCK_STREAM) ”’ Binding it to the IP address, run ifconfig command on your Linux machine and replace the below IP address with that IP”’ s.bind((‘192.168.0.103’, 9999)) s.listen(1) conn, addr = s.accept() # print client details print “Got a connection from –> “, addr # Starting an infinite loop while True: # Getting the input from the server side command =raw_input(“Reverse Shell – Enter command > “) # If command is exit(self defined), exit the script else send the command to the client and print the result if ‘exit’ in command: conn.send(‘Exiting the shell’) conn.close() break else: conn.send(command) print “==============================================================” print conn.recv(1024) print “==============================================================” server_connect() B. TCP_Client code # Import the required modules import socket,subprocess #define a client_connect function def client_connect(): # creating a TCP socket s=socket.socket(socket.AF_INET,socket.SOCK_STREAM) ”’ Client connects to the attacker IP and port, replace this with the same IP we have entered in the server side code”’ s.connect((‘192.168.0.103’, 9999)) # Infinite loop starts to receive the commands while True: command=s.recv(1024) # Command to close the connection from server side if ‘exit’ in command: s.close() break # Start a command prompt shell and send the output to the server end else: cmd=subprocess.Popen(command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE) s.send(cmd.stdout.read()) s.send(cmd.stderr.read()) client_connect() OUTPUT Enhancements This can further be enhanced to such an extent that it will become a powerful script. - Convert the client-side Python code into an executable or click the run file, trick the user to run the file. - Write down a code so that the attacker can get the files from the client side as well. What if the attacker finds a file with name “passwords.txt” in one of the folders? The code will be something like this: open that file in read-only mode and read the file into a buffer print the buffer on the server side create a file on the server side and save the contents into that. - The code will not accept commands when enter is pressed without a command. Hunt down the solution and apply it to the code. Conclusion Python is really powerful and has many modules written to handle various domains of security. Depending on the situation the scripts can be easily created which will be fast as they are created to perform a specific task. There are a lot of people, forums, git communities which are working towards making Python tools and modules. Many tools are built with a concept that the user can write their own scripts and integrate it with the tool; one such example is the Burp suite: users can write extensions in Python and use them along with the tool. The users can also check tools which are already available on the internet. The purpose of the article was to empower the reader to understand the Python programs. TIP: Try to understand the code available on the internet for freeware tools so that you can tweak that and use as per your requirement. This becomes extremely useful when developing exploits as you need to understand the code and then tweak it for payloads, shell codes, IP addresses, etc. Below are some tools classified as per domain to get you started.
https://resources.infosecinstitute.com/python-for-security-professionals-part-2/
CC-MAIN-2019-13
refinedweb
2,385
67.59
Photos Asset.get_image_data: Is there a memory leak? I have written a script that will move my photo assets from one, more, or all albums to an FTP server. Basically, it is functional. When I select an album (standard iOS albums), the files get moved to the FTP server in tact. The problem I am running into is when I select all the albums, read: a lot of assets (images and video) the process fails on asset.get_image_data. The error is: <class 'SystemError'>-<built-in method get_image_data of _photos2.Asset object at 0x112539fc0> returned a result with an error set. When I try to get any additional information from the io.BytesIO class, I get the same error as above (error set). Once this happens, the script breaks down and all kinds of other errors occur. After a number of errors occur Pythonista breaks and I am returned to the iOS home. As for quantity, the scripts tend to break down after 1400-ish files have moved successfully. It doesn't seem as if the actual image or video is corrupted as the same file copies without a problem during a smaller transfer. I have uploaded no code as it crosses a few files. It is actually very simple. - Get an album or list of albums - Create an FTP connection - For each album step through each "asset" in the album. - For each asset create a filename to be used on the FTP server - Get the asset.get_image_data buffer and use ftplib storbinary to send the asset to the FTP server. Like I said, this works for something under 1400 images/videos. Anyone else have similar issues and might be able to point me in a direction to solve the problem? Thanks in advance. Bill You might try to trend memory and o see if there is a leak. You might try a loop that just creates the asset, without otherwise using it, to see if the problem is with your code or the method. For instance if you are opening but not closing files, or are creating reference cycles. You might also try calling gc.collect inside your loop-- I have found that certain ObjCInstances create reference cycles to their instance methods, which cause issues when doing video processing, but that in some cases calling collect manually helps. I have uploaded no code as it crosses a few files. A GitHub repo deals well with a few files. This kind of workflow would benefit from asyncio like delivers. I am not sure if it will work in Pythonista but if so, it could really speed up the transfer of 1400 images / movies. I have the same problem. import photos from get_available_memory import get_free_mem import gc from PIL import Image photo_count = 500 photo_index = 0 all_assets = photos.get_assets() print('Start', get_free_mem()) #Start 814.9 MB while photo_index < photo_count: ass = all_assets[photo_index] img_data = ass.get_image_data() img_data.__del__() del img_data del ass gc.collect() photo_index += 1 del all_assets gc.collect() print('Done', get_free_mem()) #Done 165.4 MB This post is deleted!last edited by Yes, this does seem to leak, although sometimes the free memory can be misleading ( memory allocated might not be truly "freed"). I have an Objc version of this, which leaks somewhat more slowly, and it seems to give back much of the leak once the script ends. I suspect maybe there is a way to force an autorelease pool drain, i am a little fuzzy on where than happens (it seems to not happen while a script is running?) Ok, a workaround for the original code: First, make a copy of objc_util.py, and place in site packages, for instance as objc_util2 At around line 532, change the if ptr: to if ptr and not b'NSAutoreleasePool' in class_getName(object_getClass(ptr)): # Retain the ObjC object, so it doesn't get freed while a pointer to it exists: objc_instance.retain(restype=c_void_p, argtypes=[]) objc_instance._cached_methods = {} return objc_instance Now, in the photos code, you can wrap your loop in an autorelease pool to make sure objc memory is getting drained. while [...]: pool=ObjCClass('NSAutoreleasePool').new() # get image data, etc [...] pool.drain() This seems to have squashed the leak, as the memory usage never grows. JonB: First of all, excellent work! Thank you for your time and effort. I added the above fix in the manner you prescribed. It worked in both the pared down test (step through all photos/videos/etc, calling get_image_data for each asset) as well as the full on script where the problem initially occurred. The script used to die at asset #1440-ish each and every time (on my iPad). It now runs through a normal completion copying 1628 files across FTP (using local wifi connection to my home FTP server). Well done! Bill
https://forum.omz-software.com/topic/3844/photos-asset-get_image_data-is-there-a-memory-leak
CC-MAIN-2018-26
refinedweb
796
73.88
Welcome to the Ars OpenForum. Okay, I'm taking a Data Structure class and have never programmed in Java before even though the class is based on it. I'm learning about all this as we speak but I thought the Ars crowd would be better at explaining certain points that some books just don't drive home. Is there anyone out there who can answer a few of these questions (I knew some of the answers last semester but need a few pointers to refresh my memory):1) What are the main points of OOP? For example, how would the "Hello World" programs differ using OOP rather than functional programing (via LISP or something)? 2) What are constructors? To my belief, they create a new instance of something right? But how are they used in the program? How does constructors mix in with classes? What does it mean that a new instace of a class has been created? 3) What is this interface type? What purpose does it serve? 4) Are packages simply collections of classes? And in turn, are classes just collections of methods and definitions? And for example, if there is a private method bar in the class foo, does that mean foo.bar cannot access it since it is private? 5) What is an instance of a variable? I understand that variables are declared and created but what is an instance of it? 6) What is the signficance of foo and bar in programming? 7) What books do you guys recommend on data structures using java? Thanks in advance to anyone who can help. Quadmire 2) Learn the difference between Classes and Objects (this again will help with question 1). A class is a type of thing, an object is an instance of that thing. Each class must have a constructor, so when you create an instance of it, you call the constructor. It allows initialization of the object. In addition, you can define multiple constructors for the same class, and this allows you to pass different parameters into the class.Consider a StringBuffer - it can be created in many ways. Here are two examples: code:StringBuffer sb1 = new StringBuffer();StringBuffer sb2 = new StringBuffer("test"); StringBuffer sb1 = new StringBuffer();StringBuffer sb2 = new StringBuffer("test"); 3) An interface is a description of a class. It defines a list of the methods and fields that an implementing class must have. This is extremely useful: The description of a class is seperated from it's implementation. When writing code, you can code to the interface. This means that the implementing object can change, but the code which is calling it need not. 4) Packages provide a hierarchical naming scheme. Each level of a package may contain classes, but it is not necessary. The import statement at the top of a class imports the namespace. If I don't import the namespace, I have to use the Fully Qualified name to reference a Class - i.e. code:java.util.Hashtable ht = new java.util.Hashtable(); java.util.Hashtable ht = new java.util.Hashtable(); code:import java.util.*;// blather blather blatherHashtable ht = new Hashtable(); import java.util.*;// blather blather blatherHashtable ht = new Hashtable(); // blather blather blather Hashtable ht = new Hashtable(); 5) Do you mean instance variables? An instance variable is a variable contained within an object. 6) They are nonsense words to make code fun to read (as opposed to say ABC=XYZ). My understanding of it is from the word FUBAR, which stands for Fucked Up Beyond All Repair. Whether that is the origin of foobar though, I don't know... 7) Dunno really. Sorry. Couple of good resouces (if you don't already know).I highly recommend Sun's Java tutorials, they are excellent., especially the Hints and Tips., who do great things. some open source stuff and see how it works.. that was a bit useful. I believe that the obligatory read in this field is Knuth's algorithm book. I believe you can find it at Adison Wesley Longman. (Search for Donald E. Knuth) As a more general Java book, I would recomend Bruce Eckel's "Thinking in Java" (two editions). You can download them here. Hope it helps- Arna As a side note, I found Weiss to be fairly annoying. -Q Again, thanks for all the input, it was very helpful. Quadmire
http://arstechnica.com/civis/viewtopic.php?p=16962041
CC-MAIN-2013-20
refinedweb
726
76.52
Photo by Isaac Smith on Unsplash This article is about plotting different types of graphs such as line chart, bar chart, pie-chart, and scatter plot using Matplotlib, which is arguably the most popular graphing and data visualization library for Python. Graphs are mathematical structures that represent pairwise relationships between objects. Matplotlib Matplotlib is a Python 2D plotting library. The easiest way to install matplotlib is to use pip. Type following command in terminal: pip install matplotlib or, you can download it from here and install it manually. Steps involved in plotting a graph - pseudocode looks like this. import the library define the x-axis list define the y-axis list plot function(plt.plot(), plt.scatter(), plt.bar(), plt.pie(), plt.histi()) xlabel ylabel legend show function Plotting a line python program to plot lines The code seems self-explanatory. Following steps were followed: - output of the above code looks like this. line graph Plotting two or more lines on the same plot The following code plots the marks secured by three different students. Three lines will be plotted in this case. plot multiple lines - We differentiate between the lines by giving them a name(label) which is passed as an argument of .plot() function. - The small rectangular box giving information about the type of line and its color is called ?legend?. We can add a legend to our plot using .legend() function. This will take the label?s value. The output looks like this. multiple lines graph Scatter plot Scatter plots are used to plot data points on a horizontal and a vertical axis in the attempt to show how much one variable is affected by another. Each row in the data table is represented by a marker whose position depends on its values in the columns set on the X and Y axes. scatter() function is used to plot the scatter-plot graph. plt.scatter(x, y, label= “stars”, color= “green”, marker= “*”, s=30) - The label is the marker?s name on the legend. All the possible marker values can be found here. - ?s? is the size of the marker. The plotted graph looks like this. scatter plot Pie-chart A pie chart (or a circle chart) is a circular statistical graphic, which is divided into slices to illustrate numerical proportions. In a pie chart, the arc length of each slice (and consequently its central angle and area), is proportional to the quantity it represents. pie() function is used to plot the pie-chart graph. plt.pie(proprotions, labels = items, colors=colors, startangle=90, shadow = True, explode = (0, 0, 0.1, 0),radius = 1.2, autopct = ‘%1.1f%%’) These attributes can be explained easily with the following code. - explode : array-like, optional, default: None. I am setting an explode value to the first item and hence the slice corresponding to ?Samsung? gets a split-effect. If not None, is a len(x) array that specifies the fraction of the radius with which to offset each wedge. - labels : list, optional, default: None A sequence of strings providing the labels for each wedge - colors : array-like, optional, default: None A sequence of matplotlib color args through which the pie chart will cycle. If None, will use the colors in the currently active cycle. - autopct : None (default), string, or function, optional If not None, is a string or function used to label the wedges with their numeric value. The label will be placed inside the wedge. If it is a format string, the label will be fmt%pct. If it is a function, it will be called. - shadow : bool, optional, default: False Draw a shadow beneath the pie. - startangle : float, optional, default: None If not None, rotates the start of the pie chart by angle degrees counterclockwise from the x-axis. - radius : float, optional, default: None The radius of the pie, if the radius is None it will be set to 1. pie chart. The output of the bar chart looks like this. vertical bar graph - tick_label : string or array-like, optional. The tick labels of the bars. Default: None (Use default numeric labels.) - user plt.barh() function to draw horizontal graphs. horizontal bar chart Histogram A histogram is a graphical display of data using bars of different heights. In a histogram, each bar group numbers into ranges. Taller bars show that more data falls in that range. histogram.py histtype : {?bar?, ?barstacked?, ?step?, ?stepfilled?}, optional. The function uses the bar for default. bins: number of bars that we want in our graph. range: units on the x-axis. Specify this value according to the values you have in the list. histogram Customization of graphs Graphs can be customized by altering various properties such as color, line style, line width, marker, markerfacecolor, marker size, etc. example plt.plot(x, y, color=’green’, linestyle=’dashed’, linewidth = 3, marker=’o’, markerfacecolor=’blue’, markersize=12) various other properties can be found here. The below graph is a customized graph. customized graph References matplotlib.pyplot.plot – Matplotlib 3.3.1 documentation Plot y versus x as lines and/or markers. Call signatures: The coordinates of the points or line nodes are given by x? matplotlib.org Conclusion Hope this article is helpful. If you want to read more python articles check out the blog below. Happy coding!
https://911weknow.com/plotting-graphs-using-python-and-matplotlib
CC-MAIN-2021-04
refinedweb
883
66.94
I thought I applied the patch correctly. cp'd it to the LVM dir and did a 'cat filename | patch -p0' Anyway made the other change to liblvm.h and all tools compiled and worked :-) On Mon, 20 Mar 2000, Michael Marxmeier wrote: > > On Mon, 20 Mar 2000, Michael Marxmeier wrote: > > > > I have 0.8final compiled (w/ patch) into kernel, but am getting the > > > > following when I try to make the new tools. What's up? > > > > > > Known problem. > > > > > > You need to apply patch > > > patch-lvm_0.8final-2 - patch against LVM 0.8final user mode tools > > > > Cool! Patch applied correctly. Still getting a different err though (see > > below) > > ... > > In file included from /root/LVM/0.8final/tools/lvm_user.h:44, > > from e2fsadm.c:45: > > /root/LVM/0.8final/tools/lib/liblvm.h:50: gnu/types.h: No such file or > > Did you apply the patch correctly? > It should replace gnu/types.h with sys/types.h in lib/liblvm.h. > > I just check the patch and it looks correct. > > --- 0.8final/tools/lib/liblvm.h.orig Tue Feb 22 03:51:00 2000 > +++ 0.8final/tools/lib/liblvm.h Tue Feb 22 03:54:36 2000 > @@ -47,7 +47,7 @@ > # include <linux/version.h> > #endif > > -#include <gnu/types.h> > +#include <sys/types.h> > > #include <sys/stat.h> > > > Michael > > -- > Michael Marxmeier Marxmeier Software AG > E-Mail: mike msede com Besenbruchstrasse 9 > Phone : +49 202 2431440 42285 Wuppertal, Germany > Fax : +49 202 2431420 >
http://www.redhat.com/archives/linux-lvm/2000-March/msg00055.html
CC-MAIN-2015-22
refinedweb
240
71.61
Web Services-Not Always the Best Solution Exchanging Text Messages Last, but not least, here's a humanly readable TCP/IP-based protocol where the server and client exchange plain text messages. The client writes text characters to the server and gets back some characters that follow this format: name : street , city , postcode. You may notice that the preceding format is the same as the output of the AddressBean.toString method. In this example, when the server finds the AddressBean, it simply writes the characters resulting from the toString call back to the client. The client parses the string and re-assembles an AddressBean based on the data. public class TextSerAddressBookServer { public static final int SERVER_PORT = 8899; private AddressBook book; private ServerSocket srvSock; public TextSerAddressBookServer() throws IOException { book = new AddressBook(); srvSock = new ServerSocket( SERVER_PORT ); } public void startListening() { Socket s = null; while( true ) { try { s = srvSock.accept(); Thread t = new Thread( new WorkerThread(s) ); t.start(); } catch( IOException e ) { e.printStackTrace(); } } } public static void main(String[] args) { try { TextSerAddressBookServer server = new TextSerAddressBookServer(); server.startListening(); } catch( IOException e ) { e.printStackTrace(); } } class WorkerThread implements Runnable { private Socket s; private String name; public WorkerThread( Socket s ) { this.s = s; } public void run() { try { processRequest( s.getInputStream() ); AddressBean a = book.findFriend( name ); sendResponse( a, s.getOutputStream() ); } catch( Exception e ) { e.printStackTrace(); } finally { try { s.close(); } catch( IOException ioe ) { } } } protected void processRequest( InputStream s ) throws IOException { BufferedReader br = new BufferedReader( new InputStreamReader(s) ); name = br.readLine(); } protected void sendResponse(AddressBean a, OutputStream s) throws IOException { PrintWriter pw = new PrintWriter( s ); pw.println( a.toString() ); pw.flush(); } } } The client will have to parse the response from the server, as discussed before. The easiest way to do that is by using a regular expression like this: (w+)s*:s*([0-9a-zA-Zs]+)s*,s*(w+)s*,s*(.*) To do that, use the java.util.regex package, and precompile the regex in a static member in the client class: private static final Pattern p = Pattern.compile( "(\w+)\s*\:\s*([0-9a-zA-Z\s]+)\s*\,\s*(\w+)\s*\,\s*(.*)" ); With that in place, when the client receives a reply from the server, it just matches and retrieves the four matched groups, which it then assembles back into an AddressBean. The TextSerAddressBookClient's parseResponse method looks like this: protected AddressBean parseResponse( InputStream s ) throws IOException { BufferedReader br = new BufferedReader( new InputStreamReader(s) ); String line = br.readLine(); Matcher m = p.matcher( line ); if( m.matches() ) return new AddressBean( m.group(1), m.group(2), m.group(3), m.group(4) ); else return null; } Running this implementation renders the following: class text.TextSerAddressBookClient found Liv : Oxford Street , London , SW1 in 39,210,032 That is approximately about half the time taken by the approach using the in-build serialization mechanism, and you can imagine that the time saved is due to the fact that messages sent in between client and server are shorter and the structure of the messages is not that complex, therefore the parsing of these messages is much lighter. The time it takes is still significantly higher than the RMI version, but that is because we spend a lot of time in opening the socket to the server -- if you move the statement that intializes timeStart after the line that opens the socket: @Override public AddressBean findFriend(String name) { Socket s = null; try { s = new Socket( "localhost", TextSerAddressBookServer.SERVER_PORT ); timeStart = System.nanoTime(); sendRequest( name, s.getOutputStream() ); AddressBean a = parseResponse( s.getInputStream() ); return a; } catch( Exception e ) { e.printStackTrace(); return null; } finally { try { s.close(); } catch(Exception e){} timeEnd = System.nanoTime(); } } you will find out that the timing decreases dramatically: class text.TextSerAddressBookClient found Liv : Oxford Street , London , SW1 in 4,373,359 In other words it takes about 0.004 seconds -- compared to 0.003 in the case of RMI -- and that is due to the fact that we offloaded a lot more preparation work into the RMI client constructor. Comparing All Solutions As a recap, Table 1 shows the timings for all the solutions discussed here. So while web services, SOAP, and XML certainly have advantages for interconnecting components or applications regardless of platform or programming language used, they are not even close to the fastest method for communicating. As the timings show clearly, when you are purely interconnecting Java components, you might want to think twice before choosing SOAP as a communication mechanism. About the Author Liviu Tudor is a Java consultant living in the UK who has worked extensively with high-availability systems, mostly in the online media sector. Recently, he's come to realize that for performance, it's the "low level" core Java that makes an application deliver rather than a bloated middleware framework. While healing from injuries acquired playing rugby with his London team The Phantoms (), he writes articles on Java technology for developer.com. Page 6 of 6
http://www.developer.com/xml/article.php/10929_3822516_6/Web-Services151Not-Always-the-Best-Solution.htm
CC-MAIN-2015-22
refinedweb
807
55.95
Scenario:We have a situation, where one of our process download files every day. The process runs on schedule and download multiple files.Our requirement is to load the latest file to SQL server Table. We don't care about old files, we want to delete them. How would you do that in SSIS Package? Solution: There are multiple ways to handle this situation, we can delete the old file and leave the latest and then can use the foreach loop to load the latest file to SQL Server Table. In this post, I am going to do the first part. We will be using script task to delete all old files from a folder and leave the latest. To load file from a folder, you can take a look into Here. Step 1: Go ahead and create SSIS Package in your solution. Then create a variable called FolderPath as shown below. How to delete all files in a folder except latest file-Create Variable for Folder Path- SSIS Tutorial Step 2: Bring Script Task to Control Flow and Map the Variable FolderPath and choose the scripting language, I have selected C#. How to delete all the files in a folder by using Scrpt Task in SSIS Package - SSIS Tutorial Step 3: Add System.IO namespace under Namespaces Step 4: Add the below code under public void Main() { // TODO: Add your code here var directory = new DirectoryInfo(Dts.Variables["User::FolderPath"].Value.ToString()); FileInfo[] files = directory.GetFiles(); DateTime lastModified = DateTime.MinValue; string filename=""; //Get the lastest file name foreach (FileInfo file in files) { if (file.LastWriteTime > lastModified) { lastModified = file.LastWriteTime; filename = file.Name; //MessageBox.Show(filename); } } //Delete all old files except latest one. foreach (FileInfo file in files) { // MessageBox.Show(filename); if (file.Name !=filename) { file.Delete(); } } Save the script. You are all done. Go ahead and provide the folder path in Value of FolderPath variable. Execute SSIS Package.It should delete all filed except latest. Step 5: Follow the steps Here.to read the file and load to Table.
http://www.techbrothersit.com/2016/02/how-to-delete-all-files-in-folder.html
CC-MAIN-2016-50
refinedweb
340
68.87
(For more resources related to this topic, see here.) Installing Rake As Rake is a Ruby library, you should first install Ruby on the system if you don't have it installed already. The installation process is different for each operating system. However, we will see the installation example only for the Debian operating system family. Just open the terminal and write the following installation command: $ sudo apt-get install ruby If you have an operating system that doesn't contain the apt-get utility and if you have problems with the Ruby installation, please refer to the official instructions at. There are a lot of ways to install Ruby, so please choose your operating system from the list on this page and select your desired installation method. Rake is included in the Ruby core as Ruby 1.9, so you don't have to install it as a separate gem. However, if you still use Ruby 1.8 or an older version, you will have to install Rake as a gem. Use the following command to install the gem: $ gem install rake The Ruby release cycle is slower than that of Rake and sometimes, you need to install it as a gem to work around some special issues. So you can still install Rake as a gem and in some cases, this is a requirement even for Ruby Version 1.9 and higher. To check if you have installed it correctly, open your terminal and type the following command: $ rake --version This should return the installed Rake version. The next sign that Rake is installed and is working correctly is an error that you see after typing the rake command in the terminal: $ mkdir ~/test-rake $ cd ~/test-rake $ rake rake aborted! No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb) (See full trace by running task with --trace) Downloading the example code You can download the example code files for all Packt books you have purchased from your account at. If you purchased this book elsewhere, you can visit and register to have the files e-mailed directly to you. Introducing rake tasks From the previous error message, it's clear that first you need to have Rakefile. As you can see, there are four variants of its name: rakefile, Rakefile, rakefile.rb, and Rakefile.rb. The most popularly used variant is Rakefile. Rails also uses it. However, you can choose any variant for your project. There is no convention that prohibits the user from using any of the four suggested variants. Rakefile is a file that is required for any Rake-based project. Apart from the fact that its content usually contains DSL, it's also a general Ruby file. Also, you can write any Ruby code in it. Perform the following steps to get started: - Let's create a Rakefile in the current folder, which will just say Hello Rake, using the following commands: $ echo "puts 'Hello Rake'" > Rakefile $ cat Rakefile puts 'Hello Rake' Here, the first line creates a Rakefile with the content, puts 'Hello Rake', and the second line just shows us its content to make sure that we've done everything correctly. - Now, run rake as we tried it before, using the following command: $ rake Hello Rake rake aborted! Don't know how to build task 'default' (See full trace by running task with --trace) The message has changed and it says Hello Rake. Then, it gets aborted because of another error message. At this moment, we have made the first step in learning Rake. - Now, we have to define a default rake task that will be executed when you try to start Rake without any arguments. To do so, open your editor and change the created Rakefile with the following content: task :default do puts 'Hello Rake' end - Now, run rake again: $ rake Hello, Rake The output that says Hello, Rake demonstrates that the task works correctly. The command-line arguments The most commonly used rake command-line argument is -T. It shows us a list of available rake tasks that you have already defined. We have defined the default rake task, and if we try to show the list of all rake tasks, it should be there. However, take a look at what happens in real life using the following command: $ rake -T The list is empty. Why? The answer lies within Rake. Run the rake command with the -h option to get the whole list of arguments. Pay attention to the description of the -T option, as shown in the following command-line output: -T, --tasks [PATTERN] Display the tasks (matching optional PATTERN) with descriptions, then exit. You can get more information on Rake in the repository at the following GitHub link at. The word description is the cornerstone here. It's a new term that we should know. Additionally, there is also an optional description to name a rake task. However, it's recommended that you define it because you won't see the list of all the defined rake tasks that we've already seen. It will be inconvenient for you to read your Rakefile every time you try to run some rake task. Just accept it as a rule: always leave a description for the defined rake tasks. Now, add a description to your rake tasks with the desc method call, as shown in the following lines of code: desc "Says 'Hello, Rake'" task :default do puts 'Hello, Rake.' end As you see, it's rather easy. Run the rake -T command again and you will see an output as shown: $ rake -T rake default # Says 'Hello, Rake' If you want to list all the tasks even if they don't have descriptions, you can pass an -A option with the -T option to the rake command. The resulting command will look like this: rake -T -A. Using global Rakefiles to run tasks anywhere By default, Rake is looking for tasks that are placed in the current folder (that is, the folder where you run the rake command) in the Rakefile. Assume that we need to have a rake task that can be executed in any folder. For example, say that we have a rake task that cleans the Linux files ending with ~. The following Rakefile defines the rake task to remove them: desc 'Cleans backup files *~' task :default do files = Dir['*~'] rm(files) end Here, we get temporary files in the current folder and remove them with the rm method. This method is defined in the FileUtils module, which is included in Rake as well. When you are in the current folder, check this rake task using the Rakefile: $ rake rm Here, we see that the rm command was executed and Rake explicitly said this in the second line. If you don't want to see this verbose message, pass the -q option to the command. However, what would happen if we go to the folder one level up? When you try to type the rake command, you will have an error message that says that no Rakefile was found. We can get rid of this problem by passing the -f option with the path to the Rakefile as shown in the following lines of code: $ rake -f ~/my-rake-task/Rakefile rm This works well, but you may agree with me that it's too unhandy. Rake produces one useful feature to make this situation work the way we want. It's based on the method of finding the Rakefile. First, Rake tries to find the Rakefile in the current folder. If Rake can't find it there, the search continues till it reaches the user's home folder. If there is no Rakefile there, it finally raises an exception saying that the Rakefile was not found. We can apply this behavior to our issue. Just move the Rakefile to your home folder and mark the rake tasks defined in it as available for the current user everywhere. Open the terminal and type the following commands to achieve the expected output: $ mv ~/my-rake-task/Rakefile ~/ $ cd ~/my-rake-task $ rake (in /Users/andrey) rm As you can see, this works as expected, and there is one more new line, as follows: (in /Users/andrey) This command says that the Rakefile was found at the user home folder. You can disable showing this information by passing the -s option. There is another way to define global Rakefiles. You have an option to define them in the ~/.rake folder, and they can be executed from any folder with the help of the -g option. The following is the Rake output of the help command: -g, --system Using system wide (global) rakefiles (usually '~/.rake/*.rake'). So, let's define a global Rakefile in this way and check it in action. The following is an example of how to do it through the terminal: $ mkdir ~/.rake $ touch ~/.rake/hello.rake $ echo -e 'task "hello" do\n puts "Hello, Rake"\nend' > ~/.rake/ hello.rake $ rake -g hello Hello, Rake Defining custom rake tasks So far, we defined only one task named default. Rake allows you to define your custom tasks with any name. The common form of the custom rake task definition is passing a task name to the task method and a block as a second argument. The block defines some action and usually contains some Ruby code. The rake task might have an optional description, which is defined with the desc method. This method accepts a text for the description of the task. The following code snippet is an example of defining a custom rake task: desc 'Restart web server' task :restart do touch '~/restart.txt' end This is an example of a possible rake task to restart Passenger (this is a module for the Nginx web server, which works with the Rails applications). We name the task restart. To run this task, just pass its name as the second argument to the rake command as shown in the following line of code: $ rake restart If you have a lot of tasks, it's handy to enclose them to the named spaces, as shown in the following code snippet: namespace :server do desc 'Restart web server' task :restart do touch './tmp/restart.txt' end end You can also run the task in the command line using the following command: $ rake server:restart Actually, the task method accepts more arguments. Task dependencies – prerequisites Sometimes, you have to write tasks that depend on other tasks. For example, when I'm going to seed data in my project, I want to clean all the persisting data that can break my code. In this case, we can say that our seed data task depends on the clean seed data task. The following code example shows us a Rakefile for this case: task :clean do puts 'Cleaning data...' end task :seed => :clean do puts 'Seeding data...' end The preceding code executes the clean do task before running the seed task. The result of the execution of this task is shown below the following line of code: $ rake seed Cleaning data... Seeding data... It works as expected. If you have to run the task from another namespace, pass its whole name as a string, as shown in the following code snippet: namespace :db do task :clean do puts 'Cleaning data...' end end task :seed => 'db:clean' do puts 'Seeding data...' end However, if the dependent task is in the same namespace, you don't have to pass it as a string, as shown in the following code snippet: namespace :db do task :clean do puts 'Cleaning data...' end task :seed => :clean do puts 'Seeding data...' end end Earlier in this article, we defined the default rake task. To be honest, we did it just to understand what happens on running rake without arguments and to introduce Rake in a few steps giving as less information as possible in an interactive way. However, in the practical word, nobody defines the default rake task with an action. Setting dependencies is a convenient feature. It allows the default task to refer to some other task as many times as you want without regression. For example, today, the default task runs a doc:generate task but tomorrow, we decide to run a test:run task instead. In such a situation, we can just change the prerequisite and that's it. So, always define your default rake task with the following template: task :default => :some_task It's also possible to pass many prerequisites for a task. The following line of code is an example of how to do this: task :task1 => [:task2, :task3] Multiple tasks definitions A task might be specified more than once. Each specification adds its dependencies and implementation to the existing definition. This allows one part of a Rakefile to specify the actions and a different Rakefile (perhaps a separately generated one) to specify the dependencies. For example, take a look a Rakefile that contains the following code: task :name => [:prereq1, :prereq2] do # action end It can be rewritten as the following code: task :name task :name => [:prereq1] task :name => [:prereq2] task :name do # action end Passing arguments to the tasks Assume that you have a rake task that sets the title for our blog and you want to pass it from the command line; this should be optional. If you don't pass the title of the blog, the default title should be set. We have two solutions to solve this problem. The first solution is to pass parameters through the environment variable that is passed into the ENV variable in Ruby code (ENV is a hash-like accessor for environment variables, and it is available in any Ruby program). The second solution is using the built-in Rake syntax—you just pass variables to each task through square braces. The first use case doesn't allow you to pass variables for each task in isolation. The variables are shared among all the tasks in the Rakefile. So, the preferable style is the second choice. However, we are shown two alternatives, which will be discussed in the next sections. The first alternative The first alternative is a case where we pass variables using environment variables. The following code represents a Rakefile: task :set_title do title = ENV['TITLE'] || 'Blog' puts "Setting the title: #{title}" end The following code is a usage example: $ rake set_title TITLE='My Blog' Setting the title: My Blog $ rake set_title # default title should be set in this case Setting the title: Blog In the preceding example, the ENV variable approach can be used without any caution. The following code snippet represents the collision in sharing the variable between the tasks. Check the following Rakefile: task :task1 do puts "#{ENV['TITLE']} in task1" end task :task2 do puts "#{ENV['TITLE']} in task2" end The following code is an example of usage: $ rake task1 task2 TITLE='test' test in task1 test in task2 You can see that the TITLE variable is accessible in both the tasks and is the same. Sometimes, you don't want to get this behavior and you need to pass the variables to each task individually. A variable declared within a rake command will not persist in the environment. The following terminal output will confirm this statement: $ export TITLE='Default Title' $ rake set_title TITLE='My Blog' Setting the title: My Blog $ echo $TITLE Default Title The second variant The second variant has a built-in Rake feature. The following is the Rakefile code: task :set_title, [:title] do |t, args| args.with_defaults(:title => 'Blog') puts "Setting title: #{args.title}" end Look at args, which is a hash-like object of the Rake::TasksArguments class. It has a useful method that is used here, named with_defaults, to merge the given arguments from the command line and the default values. If you don't pass the variables through the command line, the default variable for the title will be set. The following code depicts how it may be used: $ rake "set_title[My Blog]" Setting title: My Blog $ rake set_title Setting title: Blog Here, to pass the argument as a string with space (My Blog), I have enclosed the rake task with the argument within quotes. It's not the only case where I have to enclose the task name within double quotes. There are some terminals that don't understand the squared parentheses in the command line and should escape them with \ at the end of the code line of the rake task that is enclosed within the double quotes. You are also able to pass multiple arguments to the rake task by separating them with a comma, as shown in the following line of command: $ rake "name[Andrey,Koleshko]" The task declaration for the preceding task is as follows: task :name, [:first_name, :last_name] do |t, args| puts "First name is #{args.first_name}" puts "Last name is #{args.last_name}" end Finally, you are able to pass variable-length parameters to the task with a comma, as we did in the previous example. In this case, you may use the extras method on the given args variable: task :email, [:message] do |t, args| puts "Message: #{args.message}" puts "Recipients: #{args.extras}" puts "All variables: #{args.to_a}" end In the following example, the first argument will be assigned to the message variable on the args variable and the remaining arguments will go to the extras method. If you want to have an array that passes all the variables including the one associated with the message variable, you can call the to_a method on the args variable, as demonstrated in the preceding Rakefile. $ rake "email[Hello Rake, ka8725@gmail.com, test@example.com]" Message: Hello Rake Recipients: ["ka8725@gmail.com", "test@example.com"] All variables: ["Hello Rake", "ka8725@gmail.com", "test@example.com"] The structure of a Rake project Apart from the necessary Rakefile, there is a technique that allows us to form a good structure of a Rake project. Say that you have a very complicated Rake project with a lot of tasks. It's a good idea to split them into separate files and include them in the Rakefile. Fortunately, Rake already has this feature and you shouldn't care about implementing this feature from the scratch. Just place your separated files to the rakelib folder (it can be changed to custom by passing the -R option), give these files a .rake extension, and that's it. You don't have to do anything additional. Files with the *.rake extensions are included in the Rakefile automatically for you. Nonstandard extension such as .rake for the files should not scare you. These are the usual Ruby files. There you can write any Ruby code, define their rake tasks, include the related libraries, and so on. So, take this feature as a good thing to refactor a Rake project. To approve the things said in this section, please open the terminal and check the following example: $ mkdir rakelib $ cat > rakelib/clean.rake task :clean do puts 'Cleaning...' end ^D $ cat > Rakefile task :default => :clean ^D $ rake Cleaning... In this example, ^D is a keyboard shortcut: Ctrl + D . The cat utility writes the standard output to the files here. Using the import method to load other Rakefiles It's possible to include other Ruby files or Rakefiles to describe a current Rakefile. It can be achieved by a standard require Ruby statement. However, what do we do when the including files depend on some method or variable defined in the describing Rakefile? To demonstrate the situation, create the following two files in a folder: - rakefile - dep.rb The rakefile has some tasks definition, a method definition, and a require statement, as shown in the following code snippet: require './dep.rb' def method_from_rakefile puts 'it is a rakefile method' end task :a do puts 'task a' end task :b do puts 'task b' end The dep.rb file just defines a new task that has both the prerequisites tasks, a and b. Also, it calls the defined method, method_from_rakefile(), for some reason, as shown in the following code snippet: method_from_rakefile() task :c => [:a, :b] do puts 'task c' end Trying to run a rake task defined in Rakefile will cause an exception that says that there is no defined method_from_rakefile while the dep.rb file is loading: $ rake c rake aborted! undefined method `method_from_rakefile' for main:Object ~/dep.rb:1:in `<top (required)>' ~/rakefile:1:in `<top (required)>' (See full trace by running task with --trace) The exception occurs when the dep.rb file is required by the Rakefile. The problem here is caused because the required file loaded even before the Rakefile could load. One of the possible solutions here is just to move the require statement to the last line of the Rakefile. As a result, the method and tasks required for the dep.rb file will be defined at the time of the dep.rb file being included in the Rakefile. To be honest, the solution seems like a hack; this is the Rake way. Fortunately, Rake provides us with a tool to resolve this issue—the import method. It does what we really want here; the import statement may be used in any line of the Rakefile, and this doesn't apply to the loading process at all. The imported files will be loaded after the whole Rakefile is loaded. Its usage looks similar to the require statement and is shown in the following line of code: import(filenames) Here, you are able to pass more than one file. There is one more feature of the import method. If you pass the filenames to the import task, they are evaluated first, and this allows us to generate the dependent files on the fly. Look at the following Rakefile: task 'dep.rb' do sh %Q{echo "puts 'Hello, from the dep.rb'" > dep.rb} end task :hello => 'dep.rb' import 'dep.rb' This example generates the dep.rb file on the file due to the import 'dep.rb' call that evaluates the 'dep.rb' task. The result of the hello task execution is shown as follows: $ rake hello echo "puts 'Hello, from the dep.rb'" > dep.rb Hello, from the dep.rb It is a really helpful feature that can not only help you in writing the Rake project, but also in a simple Ruby project. Running rake tasks from other tasks Sometimes, you will have to execute some defined task from your task manually. For this purpose, you have two methods of the Rake::Task class: execute and invoke. The difference between the two methods is that execute doesn't call dependent tasks, but the invoke method does. Both of these methods also accept arguments that can be passed to the tasks if you need them. Their usage is the same and is shown as follows. The following is the first code: Rake::Task['hello'].invoke The following is the second code: Rake::Task['hello'].execute With the Rake::Task['hello'] code, we got the hello rake task. It returns an instance of the Rake::Task class and then, we are able to run any method on this. In the preceding examples, we called invoke and execute. To get the namespaced task by name, like in the previous example, use a syntax or similar to the following line of code: Rake::Task['my:hello'] One more difference between these methods is that the invoke method can't be executed twice without some trick. If you need to run the task more than once with the invoke method, use the reenable method as shown in the following code snippet: Rake::Task['hello'].invoke Rake::Task['hello'].reenable Rake::Task['hello'].invoke These capabilities can be used when you need to run some other rake task after a current task has been executed. Look at the following example that depicts how to use it in task actions. It demonstrates the usage of the invoke and reenable methods: task :clean do puts 'cleaning data...' end task :process do puts 'processing some data...' Rake::Task['clean'].invoke end task :process_with_double_clean do puts 'processing some data...' Rake::Task['clean'].invoke Rake::Task['clean'].invoke end task :process_with_double_clean_and_reenable do puts 'processing some data...' Rake::Task['clean'].invoke Rake::Task['clean'].reenable Rake::Task['clean'].invoke end Try to paste this code in a Rakefile and run the process, process_with_double_clean, and process_with_double_clean_and_reenable tasks to find the difference between them. The following code is the output of the executions: $ rake -f rakefile22 process processing some data... cleaning data... $ rake -f rakefile22 process_with_double_clean processing some data... cleaning data... $ rake -f rakefile22 process_with_double_clean_and_reenable processing some data... cleaning data... cleaning data... The code conventions of Rake The words namespace, desc, task, touch, and so on in the Rakefile are general methods and, of course, you are able to pass parentheses when you pass the parameters there, as shown in the following code snippet: namespace(:server) do desc('Restart web server') task(:restart) do touch('./tmp/restart.txt') end end However, the code looks quite ugly now, so it's recommended that you avoid using styles such as the one used here. Rake has its own DSL, and if you follow it, the code will be more readable. The namespace and task methods are the basic methods that accept blocks that make the Rake code very expressive. For the task method, the block in the task definitions is optional, similar to what we saw in the Task dependencies – prerequisites section. The blocks can be specified with either a do/end pair or with curly braces in Ruby. To specify a Rakefile, it's strongly recommended that you define rake tasks only with do/end. Because the Rakefile idiom tends to leave off parentheses on the tasks definitions, unusual ambiguities can arise when using curly braces. Take a look at the following proposed Rakefile: def dependent_tasks [:task2, :task3] end task :task2 do puts 'In task2...' end task :task3 do puts 'In task3...' end task :task1 => dependent_tasks { puts 'In task1...' # We are expecting this code to be run but it's not } The following is the result of the execution of task1: $ rake task1 In task2... In task3... The defined action in task1 is not evaluated. It leads to unexpected behavior. Because curly braces have a higher precedence than do/end, the block is associated with the dependent_tasks method rather than the task method. A variant of passing the block after the dependent task name is not valid Ruby code at all, as shown: require 'rake' task :task1 => :task2 { } It might seem strange but unfortunately, this code doesn't work and gives a syntax error as shown: # => SyntaxError: syntax error, unexpected '{', expecting end-of-input The conclusion of this is that if you just follow the Rakefile convention, you won't have problems with Rake's unexpected behavior. Finally, the last tip for Rakefiles description: don't use the new style of a hash definition in the task prerequisites (in other words, don't describe tasks dependencies like this: task1: :task2). Often, only one prerequisite, defined at the first instance, transforms to the list of prerequisites and then you will have to translate the hash definition to the old style (in other words, the task1: :task2 code transforms to :task1 => [:task2, task3]). Usually, all the task definitions contain the hash rocket instead of the colon notation. The conclusion here is simple: use the old style of the creation of Ruby hashes in the rake tasks definitions. Summary This article introduced you to the basic usage of Rake and its command-line utilities. You learned what a rake task is and how to set dependencies between rake tasks, what a default rake task is, Rakefile, and the global Rakefile. This article also contained information about the Rake project structure and how to organize the code. Resources for Article: Further resources on this subject: - Find closest mashup plugin with Ruby on Rails [Article] - Redmine–Permissions and Security [Article] - Working with Rails – ActiveRecord, Migrations, Models, Scaffolding, and Database Completion [Article]
https://www.packtpub.com/books/content/software-task-management-tool-rake
CC-MAIN-2015-22
refinedweb
4,692
69.92
used to display the selected date. The format string is expressed as a .NET-style Date format string. The default value for this property is d, the culture-dependent short date pattern (e.g. 6/15/2020 in the US, 15/6/2020 in France, or 2020/6/15 in Japan). formatter function to customize dates in the drop-down calendar. The formatter function can add any content to any date. It allows complete customization of the appearance and behavior of the calendar. If specified, the function takes two parameters: For example, the code below shows weekends with a yellow background: inputDate prevents users from selecting dates that fall on weekends: inputDate.itemValidator = function(date) { var weekday = date.getDay(); return weekday != 0 && weekday != 6; } Gets or sets a mask to use while editing. The mask format is the same one that the wijmo.input.InputMask control uses. If specified, the mask must be compatible with the value of the format property. For example, the mask '99/99/9999' can be used for entering dates formatted as 'MM/dd/yyyy'. Gets or sets the latest date that the user can enter. The default value for this property is null, which means no latest date is defined. For details about using the min and max properties, please see the Using the min and max properties topic. Gets or sets the earliest date that the user can enter. The default value for this property is null, which means no earliest date is defined. For details about using the min and max properties, please see the Using the min and max properties topic. Gets or sets the string shown as a hint when the control is empty.. This property affects the behavior of the drop-down calendar, but not the format used to display dates. If you set selectionMode to 'Month', you should normally set the format property to 'MMM yyyy' or some format that does not include the day. For example: import { InputDate } from '@grapecity/wijmo.input'; var inputDate = new InputDate('#el, { selectionMode: 'Month', format: 'MMM yyyy' }); The default value for this property is DateSelectionMode.Day. Gets or sets a value that indicates whether the control should display a drop-down button. The default value for this property is true. Gets or sets a value that determines whether the drop-down calendar should display a list of years when the user clicks the header element on the year calendar. The default value for this property is true. Gets or sets the text shown on the control. Gets or sets the currentDate control allows users to type in dates using any format supported by the Globalize class, or to pick dates from a drop-down that contains a Calendar control. Use the min and max properties to restrict the range of values that the user can enter. For details about using the min and max properties, please see the Using the min and max properties topic. Use the value property to gets or set the currently selected date. The example below shows a Date value using an InputDate control. Example
https://www.grapecity.com/wijmo/api/classes/wijmo_input.inputdate.html
CC-MAIN-2019-47
refinedweb
516
66.54
import "github.com/letsencrypt/boulder/ocsp" Package ocsp implements an OCSP responder based on a generic storage backend. var ( // ErrNotFound indicates the request OCSP response was not found. It is used to // indicate that the responder should reply with unauthorizedErrorResponse. ErrNotFound = errors.New("Request OCSP Response not found") ) An InMemorySource is a map from serialNumber -> der(response) Response looks up an OCSP response to provide for a given request. InMemorySource looks up a response purely based on serial number, without regard to what issuer the request is asking for. A Responder object provides the HTTP logic to expose a Source of OCSP responses. func NewResponder(source Source, responseTypes *prometheus.CounterVec) *Responder NewResponder instantiates a Responder with the give Source. A Responder can process both GET and POST requests. The mapping from an OCSP request to an OCSP response is done by the Source; the Responder simply decodes the request, and passes back whatever response is provided by the source. Note: The caller must use http.StripPrefix to strip any path components (including '/') on GET requests. Do not use this responder in conjunction with http.NewServeMux, because the default handler will try to canonicalize path components by changing any strings of repeated '/' into a single '/', which will break the base64 encoding. Source represents the logical source of OCSP responses, i.e., the logic that actually chooses a response based on a request. In order to create an actual responder, wrap one of these in a Responder object and pass it to http.Handle. By default the Responder will set the headers Cache-Control to "max-age=(response.NextUpdate-now), public, no-transform, must-revalidate", Last-Modified to response.ThisUpdate, Expires to response.NextUpdate, ETag to the SHA256 hash of the response, and Content-Type to application/ocsp-response. If you want to override these headers, or set extra headers, your source should return a http.Header with the headers you wish to set. If you don't want to set any extra headers you may return nil instead. NewMemorySource returns an initialized InMemorySource NewMemorySourceFromFile reads the named file into an InMemorySource. The file read by this function must contain whitespace-separated OCSP responses. Each OCSP response must be in base64-encoded DER form (i.e., PEM without headers or whitespace). Invalid responses are ignored. This function pulls the entire file into an InMemorySource. Package ocsp imports 16 packages (graph) and is imported by 2 packages. Updated 2019-10-17. Refresh now. Tools for package owners.
https://godoc.org/github.com/letsencrypt/boulder/ocsp
CC-MAIN-2019-47
refinedweb
414
50.94
[update] Pluginpack updated to v0.92.76 - Kasper Graversen last edited by Get your copy today: there a few minor breaking changes. but mostly A LOT of new definitions for accessing new areas of notepad++ functionality. Cheers kasper Hello Kasper, Thank you for creating the new plugin pack. Unfortunately I am having some challenges in using it and I would welcome your comments on what I am doing wrong. First a minor observation on the installation notes. In the “README.md” file at section “Getting started” 2: When we copy the NppPlugin[version].zip file should we keep the version number in the file name or should we rename it to NppPlugin.zip? I just copied the file and kept the version number, that seemed to work. I created a new project using the template. It defaults to .NET 3.5.2 which is not on my computer, so I changed the project to target 4.6.1. Tried to build the project without making any changes and without adding any of the code of my plugin. Get two errors: 1>[[...]]\Main.cs(19,31,19,41): error CS0103: The name 'Properties' does not exist in the current context 1>[[...]]\Main.cs(20,37,20,47): error CS0103: The name 'Properties' does not exist in the current context against these two lines: static Bitmap tbBmp = Properties.Resources.star; static Bitmap tbBmp_tbTab = Properties.Resources.star_bmp; File “Main.cs” has the line “namespace Kbg.NppPluginNET” (for class Main). Comparing to the Demo project, file “Demo.cs” has the line “namespace Kbg.Demo.Namespace” and in the demo project file “Resources.Designer.cs” has the line “namespace Kbg.Demo.Namespace.Properties”. In my project I changed the namespace names in files “UnmanagedExports.cs” and “Resources.Designer.cs” to match my project. Also I added a “using Kbg.NppPluginNET;” to file “Main.cs” so that “frmMyDlg” in the line “static frmMyDlg frmMyDlg = null;” is available. It would be useful if the installation notes could give some guidance on which files and classes should use which namespaces. Building the solution gives the error: 1>[[...]]\PluginInfrastructure\DllExport\NppPlugin.DllExport.targets(8,5): error MSB4062: The "NppPlugin.DllExport.MSBuild.DllExportTask" task could not be loaded from the assembly [[...]]\PluginInfrastructure\DllExport\NppPlugin.DllExport.MSBuild.dll. Could not load file or assembly 'Microsoft. I find this message from Visual Studio very confusing. The text “UsingTask” does not seem to be in any of the files in the solution, nor can I find “Microsoft.Build.Utilities” or “ITask”. Next I installed .NET 3.5.2 and then the build does not report the above error. Now the build fail with the message: 1>AfterBuild: 1> Cannot find lib.exe in 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\\..\..\VC\bin'. There is no “lib.exe” in any of the sub-directories of “Microsoft Visual Studio 14.0” on my computer, but there are versions in the correct sub-directories of both “Microsoft Visual Studio 11.0” and “Microsoft Visual Studio 12.0”. I also tried building the demo project and it also fails to find “lib.exe”. Environment is Windows 10 with Microsoft Visual Studio Enterprise 2015 Version 14.0.25123.00 Update 2. Regards Adrian - Kasper Graversen last edited by Hi just got home from vacation. Any luck in my absence? Please feel frwe to add more notes to the readme. Just edit it. I have only tested the plugin pack on my own computer… but it looks like paths should ve adjusted after installation… or multiple versions should be made. If that we need to automate this with a script. If you have not lost hope of writing plugins do write again and we can dig into your issues you are facing. Just crospost your mail here as an issue on github so i know you are still around Cheers - DGutierrez3 last edited by DGutierrez3 Hello Kasper, I would like to ask you if you can tell me how to continue. I have been trying for some time to develop a Plugin for N++ but I cannot compile the project. Could you help my? Regards
https://community.notepad-plus-plus.org/topic/11992/update-pluginpack-updated-to-v0-92-76
CC-MAIN-2020-34
refinedweb
690
69.58
Is it ok to use to truncate floats? Yes. Why does the following code give me an int instead of float? You're printing @i. @i is an int. Thanks. I know there is something wrong with my reasoning but first of all, i/3.0 is an arithmetic expression between an integer i and a float 3.0. The compiler will convert int to float since float is a higher priority operand and the result should be a float. Secondly, even if the result of the dividing is still an int, using static_cast<float> will convert it to a float and equal the result to i. Where did I got wrong? 100 is an int @i is an int 3.0 is a double INT / DOUBLE yields a double static_cast<float>(DOUBLE) converts the double to a float INT = FLOAT converts the float to an int You can do any conversion you want to. If you store the result in an int, you'll loose precision. If INT = FLOAT converts a float to an int, will FLOAT = INT convert an int to a float? Yes. If you declare a variable to be of type X, anything you assign to that variable will be converted to an X. I saw a human development calculator here and I thought I'd give it a try. Is there anything I can improve on? main.cpp maths.cpp maths.h Hi Rai! * Initialize your variables with uniform initialization * @getLifeExpectancy, @getMeanEducationIndex and @getExpectedEducationIndex are equivalent except for the message. Don't repeat code. * @FractionalPart doesn't follow your naming convention * @FractionalPart is declared to return a double, but returns a bool and is used as if it returned a bool. * Use double literals when calculating with doubles. * Use @std::log and @std::cbrt instead of their non-namespaced counterparts. Remove the include to @<math.h> 1. Is it preferred to use uniform initialization? I find it harder to read and I get errors in my compiler when I use it 3. like this? 4. like this? Thanks for the help. 1. Yes. I prevents unnecessary copies an can be used everywhere. If you get errors, you're either using it wrong or using wrong types. Uniform initialization intentionally causes errors when you try to initialize a variable with the wrong type (whereas copy/direct initialization would perform an implicit cast, which is potentially unwanted). 3. Yes. It still violates your naming convention though. All your other functions start with a lower case letter. 4. Yes. @HumanDevelopmentIndex also has a capital leading letter. Line 3 is inconsistently formatted. Use the auto-formatting feature of your editor (a - b vs a-b). In the "C-style casts" paragraph, the 2 code examples look exactly the same: In standard C programming, casts are done via the () operator, with the name of the type to cast to inside. Is there a typo ? Give it another look got it, thanks! Hello Alex, I am kind of confused, as even after I use the type casting to my project, the value still returns 0 in the end, although I wish it to be a decimal in between 0 and 1. Is there anything I can do? the answer turns out to be this: What is the life expectancy of this country? 44 What is the mean years of schooling? 3 What is the expected years of schooling? 4 What is the GDP per capita of this country? 4 1The human development of this country is 0 and the human development stays as such no matter what I do :< Yes, you can actually call the functions you wrote to do the calculations. So you define a new variable called humanDevScore, which is uninitialized. Then you print the value of that uninitialized variable. Then you return that uninitialized value back to the OS. You probably meant to initialize humanDevScore with the return value from humanDevelopmentIndex(), but you never did. I know this is an old post but I have a question about line 14 and those similar to it. Is it really necessary to use the static cast when the parameters are already doubles to begin with? . My understanding is that the double lifeExpectancy would be converted to a double even though it's all ready a double. Am I right about this? It's not necessary to use static_cast to get floating point division in the case where one of the parameters is a non-integer. > My understanding is that the double lifeExpectancy would be converted to a double even though it's all ready a double. Am I right about this? Why c style cast is avoided? please explain it The C-style cast is dangerous because it can perform different kinds of casts depending on context (making it unclear what you're actually getting), and it doesn't make the programmer's intention very clear. C++ casts are clearer and safer. I have a question. lets say; char c='a'; now we apply static_cast<int>(c) to c so as to convert it into an integer type value. so, as now c is an integer. Can we apply arithmetic operations to it? if yes, then why doesn't this code worked? #include<iostream> #include<typeinfo> using namespace std; int main() { char c='a'; c=static_cast<int>(c); c*=2; cout<<c; } regards,aditya. c=static_cast(c); is redundant -- you're converting a char to an int, and then assigning it back to a char variable (undoing your conversion). c*=2 works just fine (it multiplies the variables value by 2), but you're still outputting a char. static_cast doesn't change the type of a variable -- it changes the type of a value. Ohkay, i get it now. Again, thank you for helping. 'a' and then when you do the static cast it appears as 97? Sorry if I'm wrong, I don't really know. Oh, I've just realized that 97 it's not a character because it doesn't have the ' '. Sorry for not seeing it before. I updated the example to use 'a' instead of 97 (even though they're identical), because I think it's more intuitive that way. Chars can only hold one character. When you assign a char integer value 97, you're assigning it the single character 'a', because character 'a' :-) Also fixed now. Thanks! In physics we often use 'variable' 'const g_gravity' and locks it back in so nothing else can touch it. That would be lovely for us physicists :) 'k' can be initiated with it? Is it to avoid this conversion altogether that we add the 'f' suffix? Since 'k' 'int' Save my name, email, and website in this browser for the next time I comment.
https://www.learncpp.com/cpp-tutorial/explicit-type-conversion-casting-and-static-cast/comment-page-1/
CC-MAIN-2021-04
refinedweb
1,127
66.33
Notifications app for (Andriod ,ios ,windows phone) so if possible can I ask you to advice me plz I try to build Notifications app for (Andriod ,ios ,windows phone) the functionality for my app is to receive the message from c++ program which work on server and so the my app must show the message recive from my server side for customer(as example) so can you advice me if QT power enough to do this task or what possible tools i need to do that because i do n't have enough experience in QT because i am confuse about the others platform like Windows phone and ios ,is it suitable those platform? for Windows phone there is a few documents so I'm worry about that , thanks very much for your advice , your time and consideration. Thanks a lot Best regards - p3c0 Moderators Hi @shadi, Did you check Qt Notifier example ? It is android specific. @p3c0 hi yes I checked it but i need also for ios and windows mobile ? i didn't find about the both ios and windows mobile I want to clarify some important details about the framework capabilities: What specific device functions are available? (a full list of supported features would be appreciated) Are push-notifications for iOS and windows mobile supported? Planned to be supported? Is it possible to save images and data on device's local storage between app launches (cache some data downloaded from Internet)? What API should I use for phone calls and SMS? the only thinf i found it is that Qt 5 can Push Notifications with V-Play’s Parse Push Plugin - p3c0 Moderators @shadi Don't know if it is planned yet. But some one has already raised it here QTBUG-44804. May be you should request for Windows too. Hi, you can use this Qt plugin for Push notifications. Here is some sample code: import QtQuick 2.1 import VPlayPlugins.parse 1.0 Parse { applicationId: "<PARSE-APP-ID>" clientKey: "<PARSE-CLIENT-ID>" onNotificationReceived: { console.debug("Received new notification") } } And here is a push notification example on Github: Cheers, Chris As feldifux suggest, It can be done by using ! I m now reading it to understand how it works! @feldifux Could you give us minimal information about how you implement it with Qt ?
https://forum.qt.io/topic/54153/notifications-app-for-andriod-ios-windows-phone
CC-MAIN-2018-05
refinedweb
386
61.26
Common utilities for the demo apps of several of my SwiftUI Shape packages. File -> Swift Packages -> Add Package Dependency and enter. You can add SwiftUIShapeDemoUtils as a package dependency in your Package.swift file: let package = Package( //... dependencies: [ .package(url: "", .exact("0.0.2")), ], //... ) From there, refer to SwiftUIShapeDemoUtils as a "target dependency" in any of your package's targets that need it. targets: [ .target( name: "YourLibrary", dependencies: [ "SwiftUIShapeDemoUtils", ], ... ), ... ] Then simply import SwiftUIShapeDemoUtils wherever you’d like to use it. Contributions to SwiftUIShapeDemoUtils are most welcome. Check out some of the issue templates for more info. Documentation is generated by Jazzy. Installation instructions can be found here, and as soon as you have it set up, docs can be generated simply by running jazzy from the command line. 📝 Note that this will only generate the docs folder for you to view locally. This folder is being ignored by git, as an action exists to automatically generate docs at the root level and serve them on the project's gh-pages branch. SwiftUIShapeDemoUtils is available under the MIT license. See the LICENSE file for more info. Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API
https://swiftpack.co/package/CypherPoet/SwiftUIShapeDemoUtils
CC-MAIN-2021-21
refinedweb
195
51.24
I like the idea of reservations. So in this sort of scheme, there would be separate handler pools and a (hopefully, dynamic) configuration to route requests to a specific pool? Or maybe a default configuration set by the site file as done today, but with a runtime facility for adding more handler pools? We'd keep the routing in a system table and cache it? In a Phoenix system, it would do stuff the user wouldn't have to worry about? Maybe at the same time we can make handler pools more like executors: there's a core set of threads at the ready and an additional amount that can be created on the fly if the core pool is fully occupied, to be terminated if unused for some amount of time afterward? Then it's not so painful if you set up a bunch of pools for a bunch of reservations, assuming all pools all the time won't be fully committed. Too radical to ever get back to branch-1 I wonder. Don't let this derail the conversation if so. On Fri, Apr 22, 2016 at 3:41 PM, rahul gidwani <rahul.gidwani@gmail.com> wrote: > Sure: > > For the first item. Yes that was implemented but there were a few issues. > > It is related to PHOENIX-938, but also had this desire back in the > days at Flurry, I recall us always wishing for a way that we could > reserve a group of handlers for specific users or tables. > > The other issue with the approach that PHOENIX-938 takes it has a > custom RpcScheduler implementation, which has a LimitedPrivate API, > thus only guaranteeing binary and source compatibility between source > versions. The API changed between hbase 1.1 and 1.2. That was one > issue the other was a custom RpcController is for the clients, which > is also bad because that is IA.Private. > > Additionally the client might know which handler pool it wants to go > to, but the current method of doing custom controller implementation > is the fact it isin't configurable. If I wanted to add a new group of > regionserver handlers, I would have to update all the client and > server jars to do this. In addition to that we have to infer what the > intent of the rpc call is by the time we get to the RpcController > instead of knowing if we did it at the Operation level. The > DelegatingPayloadCarryingRpcController doesn't know much about the > intent of the request either, you end up having to hard code static > maps for special tables in your custom controller implementation. > > For the exposing priority to the client I was thinking this work goes > into OperationWithAttributes or Operation we can add a setPriority() > and getPriority() and by default they are set to normal priority > unless explicitly overridden. For things like Meta table I am > assuming there will be some resolution system we come up with that > wont be exposed but documented. Maybe the logic can go into > Operation.getPriority() and then you would simply call > controller.setProperty(operation.getPriority). The batch operations > could do something like take the highest priority individual operation > and that become the priority at the entire batch level. > > Another option is to piggy back on Matteo's great work on Quotas and > we could add a reservation type system. Maybe similar functionality > and behavior as quotas but phase 1 is to only be able to reserve > handlers for (tables, users, namespaces) - If we go that route, no > need to expose priorities to the clients, they will just refer to some > reservation cache and route them to the appropriate group of handlers. > Because this information would probably be stored in the Quota table > and we need this prior to starting up handlers - this might require > discussions or a design discussion. > > I think going the reservation route might be more elegant (but I need > to hash out a few things before getting a design ready) but I would > love to hear what you guys think. > > Thanks for discussing this, > rahul > > > > > > On Apr 22, 2016, at 10:35 AM, Stack <stack@duboce.net> wrote: > > > > A few things: > > > > + Our Matteo reminded me of the HBASE-11048 "Support setting custom > > priority per client RPC"/PHOENIX-938 "Use higher priority queue for index > > updates to prevent deadlock" work which adds in a factory so clients can > do > > their rpccontroller. You'd build on this or controllers will always pass > > priority regardless of the rpccontroller implementation? How would your > > work and it relate? You'd surface priority on each method? > > + What are you thinking regards priority on meta? How to not preempt the > > internal workings of hbase itself? > > > > Answers to above can wait till design time, np. > > > > Is there an associated phoenix issue other than PHOENIX-938 that goes w/ > > this work? > > > > Thanks Rahul, > > St.Ack > > > > On Fri, Apr 22, 2016 at 9:53 AM, rahul gidwani <rahul.gidwani@gmail.com> > > wrote: > > > >> Sure sorry didn't provide a good example. > >> > >> There are two situations where I have thought this feature might be > >> useful. Maybe more... > >> > >> 1. For something like Phoenix, there are situations where you want > >> certain operations for tables / users to always have handlers > >> available to do work. For example any write to an index table should > >> never block. One way to almost guarantee this is to give it its own > >> special set of handlers and allow from a client call to denote that > >> this call is meant for this specific handler pool. > >> > >> 2. Suppose you have a large cluster with 1 really large table. You > >> can't really use regionserver groups and there are clients doing all > >> sorts of operations on this cluster. Map/Reduce jobs (long scans, > >> heavy reduces), processing pipeline, random reads, etc. There are > >> features already to de-prioritize long running scanners and there is > >> rpc throttling and we can split up the handlers into read, write. > >> Currently there is no easy way to say I want to reserve 10 handlers on > >> each regionserver for the processing pipeline and from the client you > >> can pass something along that would tell the server to use this > >> special handler pool. > >> > >> Also Stack, I saw your TODO and I believe we could get rid of the > >> AnnotatinoReadingPriorityFunction. > >> > >> We can talk about design if folks are interested. > >> > >> Thanks > >> rahul > >> > >> > >>>> On Apr 21, 2016, at 12:05 AM, Mikhail Antonov <olorinbant@gmail.com> > >>> wrote: > >>> > >>> This is interesting idea. Sorry if I missed some context - what's the > >>> primary incentive here? What's examples of those categorized thread > >> pools? > >>> > >>> Sounds intersecting a bit with HBASE-15136 > >>> <> (deadline > scheduling > >>> for RPC requests) in the area of rpc prioritizing. > >>> > >>> -Mikhail > >>> > >>>> On Wed, Apr 20, 2016 at 11:21 PM, Stack <stack@duboce.net> wrote: > >>>> > >>>> On Wed, Apr 20, 2016 at 1:47 PM, rahul gidwani < > rahul.gidwani@gmail.com > >>> > >>>> wrote: > >>>> > >>>>> I was wondering if people would be interested in allowing the client > to > >>>>> specify priorities? I really think we are good responsible adults > and > >>>> wont > >>>>> abuse this feature. :) > >>>>> > >>>>> This would not just be for one particular operation but all > operations. > >>>>> I'll make it feature complete. > >>>> Sounds sweet. > >>>> > >>>> RPC passes priority in the header already IIRC. > >>>> > >>>> We could then purge our ugly decompose of the request just to figure > >> what > >>>> it is so we can prioritize based off annotation. > >>>> > >>>> St.Ack > >>>> > >>>> > >>>> > >>>>> > >>> > >>> > >>> > >>> -- > >>> Thanks, > >>> Michael Antonov > >> > -- Best regards, - Andy Problems worthy of attack prove their worth by hitting back. - Piet Hein (via Tom White)
http://mail-archives.apache.org/mod_mbox/hbase-dev/201604.mbox/%3CCA+RK=_BG_o=q8HMptcP2WauAinmEsL+15f3YEJuz=qbpcya5-g@mail.gmail.com%3E
CC-MAIN-2021-43
refinedweb
1,240
62.27
I’m happy to announce that e(fx)clipse 2.1.0 has been released today and it has a heap of new features and bugfixes (in total 49 tickets have been resolved). The project Starting with this release I’d like to publicly document the amount of time we spend on the project. For this 2.1.0 we spend ~150 work hours and another ~60 private hours. So if you appreciate all this we certainly welcome all donations. In the next release cycle we’ll also setup bug bounties for often requested features like Min/Max support or detach through DnD. In case you miss something don’t be shy get in touch with us. Where do you get it - Tooling: - p2-Repository – - All-In-One Build – - Runtime: - p2 repository – and - R5 repository (eg for usage with bnd/bndtools) – - maven central (only parts of the runtime) under the group-id at.bestsolution.eclipse - Eclipse Platform - com.ibm.icu.base - org.eclipse.e4.core.di.annotations - org.eclipse.equinox.common - org.eclipse.jdt.annotation - e(fx)clipse - org.eclipse.text - org.eclipse.fx.core - org.eclipse.fx.ui.panes - org.eclipse.fx.ui.animation - org.eclipse.fx.ui.controls - org.eclipse.fx.core.di - org.eclipse.fx.text - org.eclipse.fx.text.ui - org.eclipse.fx.code.editor - org.eclipse.fx.code.editor.fx - go - dart - groovy - java - js - kotlin - php - python - rust - swift - xml - Defining source editors with a DSL - Developing a source code editor in JavaFX (without e4 and OSGi) - Developing a source code editor in JavaFX (on the Eclipse 4 Application Platform) - Access Dart Analysis Server from Java Core libraries published on maven central As many of our components don’t require to run in an OSGi-Environment and can be used in any application we started to publish them on maven-central. Smart Code editing If you follow this blog regularly it should not be a surprise that one of the main working areas has been to extract components from our research projects and make them available as loosely coupled components allowing one to implement code editors in a very simple way (nothing is bound to OSGi and e4!). We ship lexical highlighters you can use in your own applications for the following languages by default: In case you are interested in using the APIs there’s a series of blogs who introduce the APIs and the tooling who makes it very easy for you to develop an editor for your favorite language or DSL: and more blogs on this topic will follow soon. Finally it is important to understand that all the code editing APIs are declared as provisional because we need to get feedback from adopters and maybe adjust them here and there. New APIs There’s a bunch of new APIs available and I won’t describe all of them but the most interesting are: @Preference / Value While there’s a preference annotation in the e4 platform we ship our own one because the current implementation available from the platform is not working the way we expect you to develop components (hint: we expect you to write components without any dependency on OSGi and eclipse platform APIs). Usage is straight forward: import org.eclipse.fx.core.preferences.Preference; import org.eclipse.fx.core.preferences.Value; class MyComponent { @Inject @Preference(key="myStringPrefValue") Value<String> sValue; @Inject @Preference(key="myIntegerPrefValue") Value<Integer> iValue; } And because the the annotation can make use of the adapter services who are part of the core platform you can exchange Value through javafx.beans.property.Property<T>. Read more at the wiki. EventBus A similar problem you face with publishing preferences or context values is to publish informations on the IEventBroker who has a compile time dependency on the OSGi-Event-Interface. Starting with 2.1.0 we provide our own simple EventBus-API you can use instead of the IEventBroker when publishing events. In an e4 application we simply wrap the IEventBroker and none OSGi users we provide a default implementation org.eclipse.fx.core.event.SimpleEventBus. Usage is straight forward import static org.eclipse.fx.core.event.EventBus.data; class MyComponent { private final EventBus bus; @Inject public MyComponent(EventBus bus) { this.bus = bus; this.bus.subscribe( "my/app/config/changed", e -> { handleConfigChange(e.getData()) } ); // or for the cool kids this.bus.subscribe( "my/app/config/changed", data(this::handleConfigChange) ); } public void publishSelection(Person p) { bus.publish("my/app/person/changed", p, true); } public void handleConfigChange(Config c) { // ... } } Adornment Graphics Node While a similar API has been / is available as part of the e(fx)clipse e4 APIs we introduce in 2.1.0 a very similar on as part of our controls component so it can be used by none OSGi applications as well. For those who ask themselves what adornments are good for the following screenshot of the dart code editor might help The graphics shown in next to the bottom entry is not a single image but made up from Usage is straight forward: Image b = new Image(getClass().getResource("methpub_obj.png").toExternalForm()); Image p = new Image(getClass().getResource("property.png").toExternalForm()); AdornedGraphicNode node = new AdornedGraphicNode( b, Adornment.create(Location.LEFT_TOP, p) ); I really appreciate the work you guys put into this! Can you provide some insights into the publication on maven central? How do you convert the p2 repo to a maven repository? Is there a common effort inside the eclipse foundation to mutualize the effort? (for example I know that the EMF project jars are also published to a maven repository). I don’t know if there’s a common effort – our publishing is manual (we have custom pom.xml-Files and some bash scripts who upload the jars to maven central) There is a project for automating mavenization: Looks interesting but I more think about relying on p2 for meta information how to generate the pom.xml I have tried to use B3 to convert from the P2 to a maven repo… The use case is small (some jars comming from the mylyn.docs wikitext project). . I have opened this thread in the B3 Forum: And my example is hosted here: This works great (I have managed to publish something on Bintray), but the “GroupId” is wrong (by comparison of what is published in the SNAPSHOT repo) I think the “GroupId” is computed by the B3-Tool, but there should be a way to override it. This is the next thing I want to check. I have seen that you have published everything under the “at.bestsolution.eclipse”. Does it means are also interested in a custom GroupId feature? Just in case someone read this… As I wrote on the forum, I was able to convert a P2 Update Site into a maven repo using EclipseB3. I did not know about the mavenMappings possibility. You can do a lot of stuff with this tool. Pingback: Major improvements to @Preference in e(fx)clipse 2.1.0 | Tomsondev Blog
https://tomsondev.bestsolution.at/2015/09/04/efxclipse-2-1-0-released/
CC-MAIN-2021-21
refinedweb
1,166
52.7
In this tutorial, you will learn how to remove duplicate characters from the string. Java has provide several methods to examine the content of string, finding characters or substrings within a string, changing case etc. You can manipulate the string in various ways. Here we are going to remove duplicate characters from the string. For this, we have created a method removeDuplicates() that accepts the string and iterate through the for loop to find the duplicates from the string and append unique characters to StringBuilder. The method returns the string free from duplicate characters. Example: import java.util.*; class RemoveDuplicateCharatcersFromString { public static String removeDuplicates(String s) { StringBuilder build = new StringBuilder(); for (int i = 0; i < s.length(); i++) { String st = s.substring(i, i + 1); if (build.indexOf(st) == -1) { build.append(st); } } return build.toString(); } public static void main(String[] args) { String str="Hello World"; String newString=removeDuplicates(str); System.out.println(newString); } }+
http://roseindia.net/tutorial/java/core/removeDuplicatesFromString.html
CC-MAIN-2015-32
refinedweb
154
52.36
Firmware introduction Tips for writing Particle device firmware Getting started If you are using the Tracker One you may be able to use your device with no programming at all, as many features can be managed from the console. Install Particle Workbench. This is the preferred development environment for Particle device programming. Particle devices are programming using C/C++, specifically gcc C++11, C++14, or C++17 depending on the version of Device OS you are targeting. If it's been a while since you've programmed in C/C++, there is a language syntax overview. Of course there are countless books and tutorials on the Internet as well. The collection of calls to manage the features of the device including cloud features, hardware interfaces (serial, I2C, SPI), networking features, etc. are in the Device OS API. Device firmware Particle devices contain a base set of software: - Bootloader, which handles starting up the device. This is where DFU mode (blinking yellow) is implemented, as well as the code to load Device OS. - Device OS, which is the operating system of the device. This handles bringing up the base peripherals, networking interfaces, and makes sure that all of the required components are installed. If there are missing dependencies, the device will go into safe mode (breathing magenta) to upgrade the parts over-the-air. - User firmware, the part that you typically program. - Other parts depending on the device. Gen 3 devices include SoftDevice, which implements the nRF52 BLE radio stack. Argon and Tracker devices include NCP, the Wi-Fi network coprocessor image. Unlike a regular computer, Particle devices only run a single user application at a time. If your device needs to perform multiple functions you combine all of the necessary features into a single application. This application can be flashed over-the-air (cellular or Wi-Fi) or by USB. In many cases, you only need to flash the small user firmware and not all of Device OS, which speeds the update process and saves data when flashing over cellular. Devices are intended to boot quickly, often within a second or two. On some devices the cellular network connection can remain active across a reboot, which allows the device to be reprogrammed or just rebooted with minimal disruption. Tracker One and Tracker SoM devices typically include the Tracker Edge user firmware reference application which supports the additional peripherals on this device. You can expand this to include your own functionality. When you flash User application and Device OS in Particle Workbench, the bootloader and any other dependencies (SoftDevice, for example) are not flashed. You may need to upgrade these components OTA after flashing. A better option is to use Device Restore over USB to program the version you want first, to make sure all dependencies will be met. More bootloader trivia Program structure We recommend the following boilerplate for every user application: #include "Particle.h" SYSTEM_THREAD(ENABLED); SYSTEM_MODE(SEMI_AUTOMATIC); SerialLogHandler logHandler; void setup() { Particle.connect(); } void loop() { } Breaking this down: #include "Particle.h" This is necessary for all .cpp files, but optional for .ino files. We recommend always using .cpp files, even for the main application source file. See preprocessor for the specific differences between standard .cpp file and .ino files. SYSTEM_THREAD(ENABLED); Threaded mode should be used for all user applications. It tends to provide the most consistent behavior and all products created by Particle Studios use this mode. SYSTEM_MODE(SEMI_AUTOMATIC); You can a system mode of SEMI_AUTOMATIC or AUTOMATIC, but by using the combination of SEMI_AUTOMATIC and a call Particle.connect() in setup() you have a great deal of flexibility for managing the cloud connection. SerialLogHandler logHandler; Using the log handler is the recommended way of creating debugging output. void setup() { Particle.connect(); } When using SEMI_AUTOMATIC mode you need to add a call to Particle.connect(), typically in setup(). This provides flexibility: If you need to perform operations before connecting, you can put them before Particle.connect(). This is safer than using STARTUPblocks. On battery-powered cellular devices, you may want to check the battery charge and skip connecting when the battery is low. This is particularly useful for devices that also have a solar charger, to avoid completely discharging the battery or failing to connect due to insufficient power. void loop() { } The loop() function is where you put your code. You should try to return as quickly as possible from the loop function. Typically the loop function is called 1000 times per second. General tips Use Log calls instead of Serial.print In many older and Arduino examples, you you may see Serial.print(). It's better practice to use Log.info() instead. Log.info("analogvalue=%d", analogvalue); - Logging level for specific categories can be controlled at runtime. - Device OS itself uses logging and can be configured this way. - Allows redirection to other ports (such as a hardware UART), remote logging services (like Solarwinds Papertrail), SD cards, and many others. - Thread-safe, allowing logging safely from multiple threads. See Logging for more information. Memory fragmentation Be careful when allocating large memory blocks on the heap using new, malloc, strdup, etc.. It's safe if you allocate the blocks once from setup(), but of you periodically allocate large blocks, especially of varying size, with varying lifetimes, as this can lead to heap fragmentation. See Fragmentation in Code Size Tips for more information. Code size Gen 2 devices including the Photon, P1, Electron, and E Series have a 128 Kbyte (131,072 byte) flash memory sector for user code. Within the flash, there are a number of things including: - Your compiled code - String constants - Variables initialized to values other than 0 - C++ template expansions - Some overhead Gen 3 devices (including the Argon, Boron, B Series SoM, and Tracker) running Device OS 3.1 or later have 256 Kbyte user binaries (262,144 byte), double the space. Earlier versions of Device OS only supported 128K binaries like Gen 2. For more information, see 256K user binaries. See Code Size Tips for a great deal of information about code size. Stack size The stack on Particle devices is quite small: - Main loop thread: 6144 bytes - Software timer callbacks: 1024 bytes This means you should be careful with: - Allocating buffers on the stack - Deep recursion - Member variables in C++ classes that may be allocated on the stack void setup() { Serial.begin(); } void loop() { char buf[256]; // <- stack allocated // Using an uninitialized variable here, don't do this! Serial.printlnf("buf[0]=%d", buf[0]); delay(1000); } This is a stack allocated variable. It's small enough to be safe from loop. char buf[256]; // <- global static allocation void setup() { Serial.begin(); } void loop() { Serial.printlnf("buf[0]=%d", buf[0]); delay(1000); } This is a global memory allocation, done statically at compile time. This is the recommended way to handle buffers that are used periodically during execution. See Stack in Code Size Tips for more information. Avoid blocking loop You should avoid blocking loop. It's best to return from loop as often as possible instead of looping within loop() or using long delay calls. See Finite State Machines for one technique to make this more manageable. Watch out for Be sure to follow these rules carefully. If you are upgrading from older versions of Device OS (earlier than 1.4.0) and your code appeared to work correctly but does not when upgrading to newer versions of Device OS, one of these things could be the issue, as explained below. Failing to return a value Failing to return a value from a function that is not void must be avoided. int functionHandler(String cmd) { // Not returning a value will cause a compile error, or crash, depending on Device OS version } In recent versions of Device OS, this generates a compile error: src/TestApp.cpp: In function 'int functionHandler(String)': src/TestApp.cpp:5:1: error: no return statement in function returning non-void [-Werror=return-type] 5 | } | ^ In some older versions, it generates a warning, but if there are no other errors in the file, warnings are not displayed with the cloud compilers, so it's easy to miss. Unfortunately, it also causes the device to SOS fault at runtime. In very old versions of Device OS, it works, which can lead to the impression it's fine, and is a common reason code that worked with old versions of Device OS no longer works when upgraded. void sampleFunction() { // Is void, does not require a return value } Global object constructors class MyClass { public: MyClass() { // Constructor } }; MyClass myGlobalObject; // Global object void setup() { } void loop() { } You must be careful in the constructors of global objects. In the code above, the class instance myGlobalObject of class MyClass is a global object. The class constructor is called very early in initialization, and, most dangerously, the order of the objects are constructed is undefined, and may vary in surprising ways. Newer versions of the gcc compiler tend to run the user constructors earlier, and this can cause code that previously just happen to work because of luck to crash at boot instead. The only things you can do safely from the constructor are: - Initialize variables - Allocate memory - Initialize pin modes (if absolutely necessary) To do more complex initialization, you should to two-step initialization, which is also good practice when you are making objects that are possibly subclassed, anyway: SerialLogHandler logHandler; class MyClass { public: MyClass() { // Constructor } void setup() { Log.info("safe to do things here!"); } }; MyClass myGlobalObject; // Global object void setup() { myGlobalObject.setup(); } void loop() { } In this example, complex parts of setup are deferred until setup() instead of being done at object construction time. Another better alternative to global objects is often to use the singleton pattern. For more information see, Global object constructors. Mutex deadlock You must be very careful when using SINGLE_THREADED_BLOCK and you should avoid using it except to surround very small blocks of code that use only simple operations such as manipulating variables (such as queues), digitalWrite(), and delayMicroseconds(). The reason is that many resources in the system are protected by mutexes. This includes things like SPI, I2C, the cellular modem, and logging. This is necessary so only a single thread can access the resource at time, but code that does not need that resource can continue to execute normally, and threads can swap as needed. If you attempt to acquire a lock on a resource from inside a SINGLE_THREADED_BLOCK that is currently in use by another thread, the system will deadlock. Your thread will not proceed, because the resource is locked. However, since you have disabled thread switching because you used SINGLE_THREADED_BLOCK, the resource lock can never be freed, because the other thread cannot be swapped in. In old versions of Device OS, some resources like SPI were not protected. This caused failures when the system thread and user thread attempted to access SPI at the same time. The solution is use a mutex, but if you have code that previously used SPI from a SINGLE_THREADED_BLOCK, which does not actually solve the simultaneous access issue, it would fail with newer versions of Device OS by deadlocking. For more information about mutexes, see the threading explainer. SPI transactions You should always use SPI beginTransaction and endTransaction surrounding all operations on the SPI bus: - Transactions prevent multiple threads from trying to use the SPI bus at the same time - Transactions set the speed, byte order, and mode before each use allowing multiple devices on the same bus to have different settings safely - You should set the CS pin low after beginTransactionand restore it high before endTransaction Note that not all libraries that interact with SPI peripherals use transactions, but they should. If the library does not, it should be modified to use transactions. Prior to Ethernet on Gen 3 devices (Argon, Boron), the system thread never accessed SPI, so the lack of locking was less noticeable. You should still use locking, even if you are not using Ethernet. For more information, see beginTransaction in the Device OS firmware API reference. I2C locking Similar to SPI locking, you should use Wire.lock and Wire.unlock around groups of I2C operations. For example, it's common to write a command code by I2C, then read the results in a separate operation. The entire operation should be surrounded by a lock/unlock pair, to prevent another thread from jumping in between the command and result. This is especially important on the B Series SoM if the PMIC and fuel gauge are on Wire as these can be read by the system thread. For more information, see Wire.lock in the Device OS firmware API reference. Software timers Beware when using Software Timers. You should: - Avoid performing lengthy operations from a timer callback as all timers execute from a single thread and other timers will not fire while one is already executing. - When possible set a flag and perform complex operations from loop()instead. - Avoid blocking operations like Particle.publish()from timers. - Timers run from a thread with a small stack (1024 bytes). In many cases, it may be better to trigger periodic operations from the millis() counter instead of using software timers. Interrupt service routines Interrupt service routines (ISR) are bits of code that run in an interrupt context. They literally interrupt the execution of the current thread, which could be the application thread, system thread, timer thread, or worker thread. Because of this, you need to be very careful in ISRs there are strict limits of what you can safely call from an ISR: - No memory allocation ( new, malloc, strdup, etc.). - No Particle primitives like Particle.publish. - No Cellular, Wifi, TCPClient, TCPServer, UDP, etc.. - No mutex locks, including things that also lock like SPI transactions. - No queue calls except os_queue_putwhich is ISR safe - Basically assume that all Device OS functions are unsafe, unless specifically listed as safe. A few of the locations that are interrupt service routines: - attachInterrupt() handlers. - SPI onSelect() handlers. - system button handlers. - SparkIntervalTimer library timer callbacks. A few of the locations that are not ISRs: - Software timers but they run with a small stack (1024 bytes). - Function handlers are called from the loop thread. - Calculated variable handlers are called from the loop thread. - Subscription handlers are called from the loop thread, however you cannot Particle.publishfrom a subscription handler. - Serial events are called from the loop thread. - Application watchdog callback but the system is probably unstable when it is called. In old versions of Device OS, allocating memory from an ISR would proceed, except randomly corrupt memory, often causing the device to crash later for completely unrelated reasons. Newer versions of Device OS will panic immediately, which makes it seem like code that previously worked no longer works on newer versions of Device OS, but really this is an improvement over randomly failing later. For more information, see Interrupts in the Device OS firmware API reference. Out of memory handler When a heap allocation such as new, malloc, strdup, etc. fails, the out of memory handler is called, then the allocation returns null, as exceptions are not enabled on Particle devices. Using an out of memory handler, you can flag this situation, then from loop, you can reset the device. This is not the default behavior in Device OS, because in some cases you may want to continue execution, free some memory in an application-specific manner, or use other techniques to resolve the situation. See out of memory handler in Code Size Tips for more information.
https://docs.particle.io/firmware/best-practices/firmware-introduction/
CC-MAIN-2022-27
refinedweb
2,586
55.24
22 September 2008 By clicking Submit, you accept the Adobe Terms of Use. To benefit most from this article, it is best if you are familiar with Flex Builder and ActionScript 3.0. Beginning In Part 2 Part 1: the itemRenderers are recycled. Grabbing one breaks the Flex framework. With that rule in mind, here are things you can do with an itemRenderer: This series includes the following articles: Here is the MXML itemRenderer from the previous article used for a TileList. I) that lets the user give a range of prices; all items that fall outside of the range should fade out (the itemRenderers' alpha value should change). You need to tell all the itemRenderers. You've got two choices:, the owner is the MyTileList control—my extension of TileList. Casting the owner field to MyTileList allows the criteria to be fetched. Access to listData: <mx:HBox xmlns: setand getfunctions visible MyTileList. The bubbling approach doesn't associate the event ( bookBuy) with the list control ( MyTile. import events.BuyBookEvent; import mx.controls.TileList; [Event(name="buyBook",type="events.BuyBookEvent")] public class CatalogList extends TileList { public function dispatchBuyEvent( item:Object ) : void { var event:BuyBookEvent = new BuyBookEvent(); event.bookData = item; dispatchEvent( event ); } } of. This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License
http://www.adobe.com/devnet/flex/articles/itemrenderers_pt3.html
CC-MAIN-2016-50
refinedweb
218
58.89
The Minecraft Graphics Turtle allows you to use the Minecraft world as your drawing studio and unlike most graphics turtle's you aren't confined to 2d space, you can go up and down as well as left and right, and when your master piece is finished, you can walk around it! The MinecraftTurtle is really easy to install and use, you only need a single python module (minecraftturtle.py), which needs to be copied to the same folder as the minecraft python api (minecraft.py, connection.py, block.py, etc), so if your using a Pi, its usually ~/mcpi/api/python/mcpi. If you want to get started quickly through, I would download the complete code from my github, as it contains some examples and all the files you need to have go. Download Minecraft Turtle Code: sudo apt-get install git-core cd ~ git clone Try the 'squares' example: Startup Minecraft and load a game. cd ~/minecraft-turtle python example_squares.py Create your own turtle program: The turtle is really easy to program, Open IDLE (not IDLE3), create a new file and save it in the ~/minecraft-turtle directory. import minecraftturtle import minecraft import block #create connection to minecraft mc = minecraft.Minecraft.create() #get players position pos = mc.player.getPos() #create minecraft turtle at the players position and give it a name steve = minecraftturtle.MinecraftTurtle(mc, pos) #tell the turtle to go forward 15 blocks steve.forward(15) #tell the turtle to go right 90 degrees steve.right(90) #tell the turtle to go up by 45 degress steve.up(45) tell the turtle to go forward 25 blocks steve.forward(25) Run the program and you should see the turtle draw 2 lines, one straight ahead, the other at a 90 degree angle right and a 45 degree angle up. The turtle supports lots of other commands: #create the turtle # position is optional, without it gets created at 0,0,0 steve = minecraftturtle.MinecraftTurtle(mc, pos) #rotate right, left by a number of degrees steve.right(90) steve.left(90) #pitch up, down by a number of degress steve.up(45) steve.down(45) #go forward, backward by a number of blocks steve.forward(15) steve.backward(15) #get the turtles position turtlePos = steve.position print turtlePos.x print turtlePos.y print turtlePos.z #set the turtles position steve.setposition(0,0,0) steve.setx(0) steve.sety(0) steve.setz(0) #set the turtles headings (angle) steve.setheading(90) steve.setverticalheading(90) #put the pen up/down steve.penup() steve.pendown() #get if the pen is down print steve.isdown() #change the block the pen writes with steve.penblock(block.DIRT.id) #change the turtles speed (1 - slowest, 10 - fastest, 0 - no animation, it just draws the lines) steve.speed(10) #return the turtle to the position it started in steve.home() Have a look at the other examples and see what you can create. Cool stuff. By the way, the 'import minecraftturtle' statement is outside the code block. Thanks and fixed Awesome! Also, you forgot to share this on G+. I never would have seen it if I hadn't seen it on reddit/r/mcpi. Hi! Awesome stuff you got there! I'm a C# programmer that wants to learn Python with my kid. I'm so glad that I found your blog, packed with cool stuff to get my kids curiosity up. I just got one question. I noticed that you are in Windows with Minecraft 1.6.4 when you run your scripts. Are you going against MineCraftPi or is it possible to run the Python scripts against the PC version of Minecraft? Again, great work! Yes, you need to setup a bukkit server and use a plugin called "raspberryjuice" but its a pretty simple setup. Check out Ah, great! After some tinkering, connecting to the server, (NOT changing the port :) ) I think i got a connection to MC. But nothing happens. The script runs but I can't see anything. No errors ether. I'm I missing something? /kalle Never mind, I restarted the server and ran the script again and its working like a charm! In one hand this is so simple, but in the other so empowering and awesome. Thanks! Good news.:
http://www.stuffaboutcode.com/2014/05/minecraft-graphics-turtle.html
CC-MAIN-2015-35
refinedweb
713
76.32
DIY USB IR Receiver Introduction: DIY USB IR Receiver In this tutorial, I'm going to show you how to make a small, cheap (less than $5) USB IR receiver. The microcontroller used acts as a standard keyboard, so it should work on every computer. With this receiver you can use a remote control to control things on your computer. I made this instructables based on one of my previous instructables. The difference is that it's a lot smaller and it acts as a keyboard, so you don't need extra software on your PC. Let's get started! Step 1: Parts Step 2: Soldering the IR Receiver First you need to bend one leg (OUT) of the IR receiver so it goes into P2 and the other legs go into 5V and GND. After that you need to add a little piece of heat shrink (or tape) to the horizontal part of the IR receiver. Place the IR receiver back on the digispark and solder the three legs together. The only thing you need to do now is clip of the useless part of each leg. Now you're done with the hardware part. Step 3: Getting the Keycodes of the Remote In this part you need to see what code is "connected" to every button on the Remote control. We need to do this, because every remote uses other codes for every key. To do this, I used the setup and program of my previous instructables. I just opened the serial monitor to see which code was send. If you don't have an arduino for getting the codes, you can also use the part you just made. This is a little more difficult, but it gives you the same result. First you need to install the digiusb drivers. Goto this link and on the right click "download zip". After you've downloaded the zip extract all the folder "DigisparkExamplePrograms-master" to any directory you like. The goto "DigisparkExamplePrograms-master/C++/DigiUSB Windows Driver/" and click "installdriver". After you've done that, you need to follow these instructions to install the right boards in the arduino IDE. Now copy this code to a new arduino project and upload it to your digispark. /************************************* * This code is written by Laurens Wuyts * For questions: laurens.wuyts@gmail.com * * * Microcontroller: ATtiny85 * Dev board: Digispark * *************************************/ #include <DigiUSB) { attachInterrupt(0, IR_Read, FALLING); pinMode(1,OUTPUT); digitalWrite(1,LOW); DigiUSB.begin(); } void loop(void) { if(sended == 1) { DigiUSB.println(Data_back, DEC); sended = 0; } else { DigiUSB.delay(10); } }); } After you've done that, goto "DigisparkExamplePrograms-master/Python/DigiUSB/Windows/" and open "monitor.exe". In this window the keycode is printed when you press a button. Just note the button and then the code you see. You'll need them later on. Step 4: Digispark Sketch Ok now the "real" code for the Digispark. In this code you need to add the keycodes you got in the previous step. For example if the "mute" key has code 100 you change: #define mute 240to #define mute 100 !! Attention !! When you define a new key, you can't use spaces in the name. And for adding functions go into the loop function and add/change the key you like. When you have any question at all, feel free to ask! /************************************* * This code is written by Laurens Wuyts * For questions: laurens.wuyts@gmail.com * * * Microcontroller: ATtiny85 * Dev board: Digispark * *************************************/ /**** Define Remote control keys ****/ #define Power 64 #define key_1 32 #define key_2 160 #define key_3 96 #define key_4 16 #define key_5 144 #define key_6 80 #define key_7 48 #define key_8 176 #define key_9 112 #define key_0 136 #define vol_up 224 #define vol_down 208 #define ch_up 72 #define ch_down 8 #define mute 240 #define next 172 #define prev 164 #define up 6 #define down 134 #define left 166 #define right 70 #define playpause 156 #define key_stop 180 /************************************/ #include "TrinketHidCombo) { /* Use INT0(P2) on the Digispark */ attachInterrupt(0, IR_Read, FALLING); pinMode(1,OUTPUT); digitalWrite(1,LOW); TrinketHidCombo.begin(); } void loop(void) { if(sended == 1) { /* Assign functions to the buttons */ if(Data_back == vol_up) { TrinketHidCombo.pressMultimediaKey(MMKEY_VOL_UP); } else if(Data_back == vol_down) { TrinketHidCombo.pressMultimediaKey(MMKEY_VOL_DOWN); } else if(Data_back == next) { TrinketHidCombo.pressMultimediaKey(MMKEY_SCAN_NEXT_TRACK); } else if(Data_back == prev) { TrinketHidCombo.pressMultimediaKey(MMKEY_SCAN_PREV_TRACK); } else if(Data_back == key_stop) { TrinketHidCombo.pressMultimediaKey(MMKEY_STOP); } else if(Data_back == playpause) { TrinketHidCombo.pressMultimediaKey(MMKEY_PLAYPAUSE); } else if(Data_back == mute) { TrinketHidCombo.pressMultimediaKey(MMKEY_MUTE); } else if(Data_back == Power) { TrinketHidCombo.pressSystemCtrlKey(SYSCTRLKEY_SLEEP); } else if(Data_back == key_0) { TrinketHidCombo.pressKey(KEYCODE_MOD_LEFT_SHIFT, KEYCODE_0); TrinketHidCombo.pressKey(0, 0); } else if(Data_back == key_1) { TrinketHidCombo.pressKey(KEYCODE_MOD_LEFT_SHIFT, KEYCODE_1); TrinketHidCombo.pressKey(0, 0); } else if(Data_back == key_2) { TrinketHidCombo.pressKey(KEYCODE_MOD_LEFT_SHIFT, KEYCODE_2); TrinketHidCombo.pressKey(0, 0); } else if(Data_back == key_3) { TrinketHidCombo.pressKey(KEYCODE_MOD_LEFT_SHIFT, KEYCODE_3); TrinketHidCombo.pressKey(0, 0); } else if(Data_back == key_4) { TrinketHidCombo.pressKey(KEYCODE_MOD_LEFT_SHIFT, KEYCODE_4); TrinketHidCombo.pressKey(0, 0); } else if(Data_back == key_5) { TrinketHidCombo.pressKey(KEYCODE_MOD_LEFT_SHIFT, KEYCODE_5); TrinketHidCombo.pressKey(0, 0); } else if(Data_back == key_6) { TrinketHidCombo.pressKey(KEYCODE_MOD_LEFT_SHIFT, KEYCODE_6); TrinketHidCombo.pressKey(0, 0); } else if(Data_back == key_7) { TrinketHidCombo.pressKey(KEYCODE_MOD_LEFT_SHIFT, KEYCODE_7); TrinketHidCombo.pressKey(0, 0); } else if(Data_back == key_8) { TrinketHidCombo.pressKey(KEYCODE_MOD_LEFT_SHIFT, KEYCODE_8); TrinketHidCombo.pressKey(0, 0); } else if(Data_back == key_9) { TrinketHidCombo.pressKey(KEYCODE_MOD_LEFT_SHIFT, KEYCODE_9); TrinketHidCombo.pressKey(0, 0); } else if(Data_back == up) { TrinketHidCombo.pressKey(0, KEYCODE_ARROW_UP); TrinketHidCombo.pressKey(0, 0); } else if(Data_back == down) { TrinketHidCombo.pressKey(0, KEYCODE_ARROW_DOWN); TrinketHidCombo.pressKey(0, 0); } else if(Data_back == left) { TrinketHidCombo.pressKey(0, KEYCODE_ARROW_LEFT); TrinketHidCombo.pressKey(0, 0); } else if(Data_back == right) { TrinketHidCombo.pressKey(0, KEYCODE_ARROW_RIGHT); TrinketHidCombo.pressKey(0, 0); } sended = 0; } else { TrinketHidCombo.poll(); } } /* Read the IR code */); } Now upload the sketch to the digispark. Unplug and replug it into your computer, wait ~5sec and enjoy your remote control. Step 5: Resume In this tutorial, I showed how to make a low cost USB remote control. I hope you liked it, please add suggestions what you want to see next, questions or improvements below. Laurens Hi, Great instructable working like a charm. Having one problem. If I press a button to long it executes twice. Is there a way to increase a time out between button presses? Greetings Hi Laurens, I know it's been a while since you made this instructionable, but I'll try asking anyway. I'm trying to get my Harmony 525 to play nicely with this reciever, byt I can't for the life of me get the monitor to register events. I've tried by adding known NEC protocol devices to the Harmony, but no luck at all. I was thinking maybe you could point me in the right direction? Thanks for an exellent project! Nevermind, it's working now. Now I jest need to find a compatible remote with most of the functions I need. So far, Andersson R1 surround receiver has given me the most options on my Harmony 525. Thanks again! Hi, I build it but it works only if I press the key on the remote repeatedly very very very fast. What can it be? Hi, thanks for sharing this project, I followed instructions and found very easy. Now I got no experience with arduino but neeed to add some key , could someone point me in the right direction to find out how to remap and assign new key and functions? I got a programmable harmony remote and try to get it work with a raspberry Pi 3 with libreelec. Thanks.... I built this and its great, it is the only method i can get anything from. I tried writing something based on the pulsein code and I got nothing at all. Well done. I am having some issues though with ghost false positive signals every now and again, also the repeat function I had to switch it off to make it more usable. Do you have any ideas to improve error correction? My other observation is the first sketch could replaced by a simple if and variable to put it in to 'learn mode' with TrinketHidCombo.print(Data_back_,DEC) that way users could flash their digispark, re open the sketch and merely select your #define keys point their remote and press the button, then change the variable and use as expected. This is what i did and it worked well. What I want to do is do kind of a "fake" HDMI-cec with my HTPC. I want to be able to control Kodi on my htpc, just simple things linke up/down/left/right and the ok button. Right now my raspberry pi does that perfectly through HDMI-cec. I'm switching to an HTPC, which doesnt support cec. This DIY might (kinda) fix that for me. I'd want to use the remote of my Yamaha receiver, but how do I know which protocol it uses? I can't find if it uses NEC or RC5 or RC6. Hi! First of all, thanks a lot Laurens for sharing this code. I was struggling for days with the IRRemote library from Ken Sherrif, but it was impossible to use due to conflicts with all the USB-related libraries from Digispark - which made it impossible to do any kind of debugging, even basic ones as getting the remote codes. This solution is simple and just works. At first, I was having the same problem as the others who tried to use it - With the routine hardly catching any return code from the cheap chinese remote I have (which I knew it used the NEC protocol). After some debbuging, I realized that it was spacing the signals in the "situation 1" state a little bit longer than you put in your code - with TimeDeltas out of the 12000-14000 range , around 14100 in my case. So it was just a matter of raising this range as below (i chose 15000 to replace the upper limit): ... if (Time_old != 0) { TimeDelta = Time - Time_old; // Find the time interval between signals //DigiUSB.println(TimeDelta, DEC); // if ((TimeDelta > 12000)&&(TimeDelta < 14000)) { if ((TimeDelta > 12000)&&(TimeDelta < 15000)) { START = 1; x = 0; situation = 1; ... and the correct codes started to appear on the monitor without errors. I hope this can help others too, and again, thanks for sharing! Luis. Hi Luis, Thanks for the very helpful answer. I'm glad that you liked it and got it working. Laurens Can you please, Make IR Reciver for android device.: I hope someone can help me! The problem with the remote is, I think, that it uses the RC5 protocol and the code I wrote only works with the NEC protocol. What type of remote are you using? I tried compiling the code supplied again using the 1.6.12 version of the arduino software, and it ran just fine. And I can't see an obvious reason in your log file. Laurens Hey! Thank You for the fast answer! I have this remote control: Should I use another one? This remote uses the RC-6 protocol, which I didn't implement in the code. For the code to work, you'll need a remote which uses the NEC protocol. Laurens Hello there. I had an issue with this error message. Someone please help me. C:\Users\Acer\Documents\Arduino\sketch_sep30a\sketch_sep30a.ino:38:29: fatal error: TrinketHidCombo.h: No such file or directory #include "TrinketHidCombo.h" You have to install the TrinketHidCombo library from adafruit. Laurens which directory should I put it ? You should put the folder TrinketHidCombo in: C:/program files (x86)/arduino/libraries Laurens thank you for the help. I will PM you about other problem that I had after I have done this step in detail Thanks for making available. Works great with my Kenwood remote (NEC protocol), except for one minor detail: Repeat. Using EventGhost it looks like it repeats forever. "Fixed" by commenting out "Situation 2", effectivly disabling Repeat. I suspect that unless a "packet" of a type "Situation 3" arrives, repeat is not turned off? As a next evolution, it would be interesting adapt this to work with any remote control, by having it 'learn' the signals. At the moment I am playing around with the following tools (I have no vested interest in any of them): - Sender/receiver with Arduino Nano: - Open IR database: There are few other projects out there, but I didn't want to overload this response with too many links. Thanks for the response. I had a look at the links and I find it an interesting idea. I'll have a deeper look in it this summer. :) Laurens Hello can I use for this project ATTINY85 board with full size USB ?... Will the code change or can i use the one You provided ? Hello Yes, you can use that board, and you can use the exact same code I provided. Laurens Thank You for quick reply :) I just have 2 more questions. I want to use a Sony remote RM ED012... Do you know if it is NEC or RC5 ? Dose the RC5 remotes work with your solution as good as NEC ones ? I'm not sure about the remote and I don't think my code for RC-5 works really good. Laurens My first project with android. I followed the instructions and almost worked flawless ;o) I had to download the TrinketHidCombo library manually and install it. With 0 arduino history, i needed 5 mins to do it ;o)) After that, i connected the finished device to my usb, and my pc didn't understand what i want from it. Of course not, cause i did solder one leg accidantly to pin3, not to pin 2. A little smoke test was made for 10-15 secs, den i realised, it shouldn't be the normal way it needs to work ;o) Then resoldered the IR led to pin 2 ;o) After that, i was playing with the remote controlls, but for some reason, the digispark only reads few remotes. It nor really see my samsung remote. I did try to make an other digispark with other IR led withouth smoke test it, but same result. Finally it readed my old car hifi's remote and now it works nice ;o)) Sadly it only controlls the power, mute, vol+ and vol-. Youtube not care about the other multimedia buttons for some reason. It controlls VLC well. So, thank you for the instructions! I'm glad you liked it and it worked! I think it doesn't recognize the remotes because they use RC5 protocol. The program is written for NEC remotes. Youtube doesn't use the standard media keys. But when you are in the tab of youtube, you can use different keys to control the video: k > play/pause l > go back 10 secs m > go forward 10 secs ... Laurens I will try the RC5 code with my other remotes when i'll arrive home. The Youtube part not that important and it can't really be combined with the media keys, like when i push the play/pause button on the remote, it sends MMKEY_PLAYPAUSE + KEYCODE_K if i want to use it everywhere. Anyway, thank you! ;o) Thank you Laurens - this has been most useful! I managed to build this and get it working, but I am facing one issue. While using the remote to send SYSCTRLKEY_SLEEP puts the computer to sleep, I cannot seem to use a key to send SYSCTRLKEY_WAKE or similar to resume the computer. I have a USB keyboard and also a "PC Remote" (that is USB-IR), and these seem to wake the computer from sleep no problem. I can see the digistump still has power to it when the PC is asleep though... Any ideas? I'm glad it work for you! You can try and go to device managent, find the digispark in keyboards and select properties. In properties go to the last tab and check if it's able to wake up the computer. Laurens Hey Laurens! Yes I checked that option is there and it seems there is no Power Management tab for that device :( I also noticed something different about that device in the details tab: Under "Power Data" it only lists: PDCAP_WAKE_FROM_D0_SUPPORTED Whereas my normal USB keyboard has: PDCAP_WAKE_FROM_D0_SUPPORTED PDCAP_WAKE_FROM_D1_SUPPORTED PDCAP_WAKE_FROM_D2_SUPPORTED It seems I need the HID device to support D2 (which is S3 apparantly) Is there something I need to change in some code to add the power management support so that tab shows? Thank you so much for your help! Hello, I'm not sure why it doesn't work. I get more options. (see image) I'll see if I can get it to work (as I've never used wake up and sleep). And keep you posted. Laurens Thank you Laurens - much appreciated! It's possible my driver version is different (I had to use a newer DigiUSB driver because I am running Windows 10) I'm also running windows 10, but the keyboard driver is a standard windows driver. Laurens This is a kind of projects I love. as I know. you can t buy something like that. or I never seen it. anyway. i Would like to make this project, my only problem is that I don't have a digispark, therefor I have a bunch Attiny2313 here. i will try to build this with an attiny2313. may you could help if I get some errors on coding the attiny.i m good in soldiering, already, soldered led cubes and several projects. but I really suck at coding, expecting with atmega studio or Boscom. Very nice ? Thanks! Thanks for the interesting Instructible. For me it has potential as a device for functional testing of "dead" or unknown remotes. Great! I'm glad you like it! Laurens Great instructable, but I have one problem. When I use my old Philips remote (one of these: ) it's nearly impossible to read any code. In most cases it never shows up in serial monitor. Thanks, probably the philips remote is using the RC5 protocol and I'm using NEC protocol. I'll see if I can change the code later this day, so it supports RC5 too. Laurens Thanks! I added 2 files for using with a philips (RC5) remote. I couldn't test them, because I don't have a RC5 remote laying around, but they compile like they should. Laurens Great, thanks! Now it's working better, but it still print the code once per couple of tries and I get random codes. Anyway, thanks for trying to help me. I like to help where needed! Try using this file and post the output here. I just added some debug lines. P.S. I searched the whole house, but I couldn't find a RC5 remote :( Laurens Hi, sorry for keeping you waiting. That's output of your code: I'm having the same issue with the code. I'll look into it and let you know when I have a solution. Laurens Clever idea, and implementation. A great way to repurpose obsolete but still functioning IR remote control units. Thanks! The idea came from some remotes which where laying around on my desk.
http://www.instructables.com/id/DIY-USB-IR-receiver/
CC-MAIN-2017-39
refinedweb
3,168
66.74
In the previous post, we looked at the core building block of the emblem library: the TypeKey. In this post, we begin to explore the utility of the TypeKey using TypeKeyMaps. In the previous post in this series, we saw how emblem's TypeKeys can be used in much the same way as TypeTags. Unlike TypeTags, TypeKeys compare as equal (as in ==) for equivalent types. We saw how this allowed us to create sets of types, and use types as keys in a map. The map example we presented, however, was not very interesting, as the values stored were just Ints. What if we wanted to do something more interesting than that, where the types of the values actually depended on the types of the keys? Let's take a look at an example to see what I'm getting at. Suppose we are developing an application for a company that builds computers according to the customers' specifications. We want to model the different kinds of computer parts, and how they fit together to form a computer. We might come up with something like this: sealed trait ComputerPart case class Memory(gb: Int) extends ComputerPart case class CPU(mhz: Double) extends ComputerPart case class Display(resolution: Int) extends ComputerPart case class Computer(memory: Memory, cpu: CPU, display: Display) In the workshop where we build the computers, we have an inventory of computer parts that customers can select. We'll store each choice for Memory in a List[Memory], each available CPU in a List[CPU], and so on: val memoryList = Memory(2) :: Memory(4) :: Memory(8) :: Nil val cpuList = CPU(2.2) :: CPU(2.4) :: CPU(2.6) :: Nil val displayList = Display(720) :: Display(1080) :: Nil We anticipate adding more kinds of ComputerParts in the future, and we are not terribly comfortable with having individual Lists around for each kind of part. We really want to store the entire inventory in a single data structure. We settle on building a Map where the keys to the map are the type of computer part, and the values are the list of parts of that type. The keys have this type: TypeKey[_ <: ComputerPart] And the values have this type: List[_ <: ComputerPart] The standard way to bring TypeKey into your namespace is as follows: import emblem.imports._ We can construct our inventory using the hardcoded part lists we built above: val inventory = Map[TypeKey[_ <: ComputerPart], List[_ <: ComputerPart]]( typeKey[Memory] -> memoryList, typeKey[CPU] -> cpuList, typeKey[Display] -> displayList) We can pull up our inventory of CPUs like so: val cpus = inventory(typeKey[CPU]) But there is a problem. The type of the resulting value is not right. It is List[_ <: ComputerPart], when we are expecting List[CPU]. If we need to use it as a List[CPU], we will have to cast it to the right type. Consider what a method would look like that pulls a parts list out of the inventory by type. We want it to take in the type as parameter, and return a properly typed list. In other words, we want a method signature that looks something like this: def partList[P <: ComputerPart]: List[P] We would call this method like so: val cpus = partList[CPU] Since we need to look up the part list by TypeKey, we can add a TypeKey as an implicit parameter, like so: def partList[P <: ComputerPart : TypeKey]: List[P] Within the body of this method, we have to cast from List[_ <: ComputerPart] to List[P]: def partList[P <: ComputerPart : TypeKey]: List[P] = inventory(typeKey[P]).asInstanceOf[List[P]] And of course, there is nothing preventing this typecast from failing, as inventory may have been mistakenly initialized like so: val inventory = Map[TypeKey[_ <: ComputerPart], List[_ <: ComputerPart]]( typeKey[Memory] -> memoryList, typeKey[CPU] -> displayList, typeKey[Display] -> displayList) At this point, calling val cpus = partList[CPU] does fail, but not in the way you might think. Due to type erasure, the typecast is successful, and we end up with something with type List[CPU], and value List(Display(720), Display(1080))! The java.lang.ClassCastException does not occur until we actually access one of the elements of the list, say with cpus(0) or cpus.head. Let's sum up the problems we are having with this Map: - We are forced to typecast when accessing data in the map, and this makes us mildly nauseous. - Nothing is enforcing that the key and value in the map are working with the same kind of ComputerPart. I created TypeKeyMap for situations like these. They behave similarly to the Map above, but the types of the key and the value in any key-value pair are forced to agree. To build a TypeKeyMap, we have to specify two type parameters: TypeBound, which serves as an upper bound on the type parameters for the key and value types; And Val, which describes the type of the values in the map. In our example, we want to use ComputerPart for TypeBound, and List for Val. We initialize our new inventory as follows: val inventory = TypeKeyMap[ComputerPart, List]() + memoryList + cpuList + displayList There are a couple points of interest I'd like to mention here. First, notice that when we add a key-value pair to the map, we only need to mention the value, as the key can be inferred from the value. If you want to be explicit about the keys as well, the following code is equivalent: val inventory = TypeKeyMap[ComputerPart, List]() + (typeKey[Memory] -> memoryList) + (typeKey[CPU] -> cpuList) + (typeKey[Display] -> displayList) Second, in contrast to scala.collection.immutable.Map, there is no way to initialize the TypeKeyMap with a single varargs method invocation. This is because every key-value pair must be type-checked individually, to make sure the type bounds match. I have an idea about how I might overcome this problem, but it's not high priority for me at the moment, since using the + operator as above to construct the map seems elegant enough. Now, when we pull out a part list, it is well typed. In this example, we look up a value explicitly by key, just as we would with a normal Scala Map. No cast required: val memParts: List[Memory] = inventory(typeKey[Memory]) But that's a little verbose. Here's a more fluid way to look up a value by key: val memParts: List[Memory] = inventory[Memory] We can update the TypeKeyMap using the + operator. TypeKeyMaps are immutable, so this operation produces a new map: val moreMemory = Memory(16) :: memoryList val updatedInventory = inventory + moreMemory Once again, the TypeKey is resolved implicitly, but we can be explicit about it if we like: val updatedInventory = inventory + (typeKey[Memory] -> moreMemory) Of course, providing a mistyped key-value pair doesn't work. If we say: val updatedInventory = inventory + (typeKey[CPU] -> moreMemory) We get the following compile-time error: Cannot prove that List[CPU] <:< List[Memory]. val updatedInventory = inventory + (typeKey[CPU] -> moreMemory) We get the following compile-time error: Cannot prove that List[CPU] <:< List[Memory]. Ideally, the TypeKeyMap API would be contain analogs for everything in scala.collection.immutable.Map. And while I would really like to see that happen, so far I have only implemented the easy parts of the API, and the methods that I wanted to use myself. Here's a rough list of the methods I have implemented so far: +, ++, apply, contains, equals, foreach, get, getOrElse, hashCode, isEmpty, iterator, keys, mapValues, size, toString, values I've found reproducing some portions of the Map API to be a little bit tricky, and to require the introduction of supporting classes. For instance, consider foreach. In the Map API, the method has the following signature: def foreach(f: ((A, B)) ⇒ Unit): Unit A little thought shows this signature to be insufficient for a TypeKeyMap. In our example above, the function f passed to method foreach would have a signature like this: def f(pair: (TypeKey[_ <: ComputerPart], List[_ <: ComputerPart])): Unit But what we actually want is a TypeKey/ComputerPart pair where the type parameters match. In other words, we want to supply a function with a signature like this: def f[P <: ComputerPart](pair: (TypeKey[P], List[P]): Unit We run into a stumbling block at this point, because anonymous functions in Scala cannot yet have type parameters. So to make foreach happen, I had to introduce a supporting class, TypeBoundPair. I would really be thrilled if you were to start using this code, so if you find yourself wanting to use a part of the Map API that is not reflected here, please just let me know and I will do my best to add it in a timely manner. (Of course, I would be even more thrilled to see a pull request!) There's a lot more I could write about TypeKeyMap, but I figure this is a good introduction. If you want more TypeKeyMaps right away, I recommend starting with TypeKeyMapSpec.scala and TypeBoundMapSpec.scala. I am happy to write more on the subject, but for now, I'd rather continue on with my overview of the emblem library. TypeBoundMaps will be next. It's the same basic idea as a TypeKeyMap, except that the keys in a TypeBoundMap do not have to be TypeKeys. I'll get a post out on that as soon as I can.
http://scabl.blogspot.com/2015/07/emblem-2.html
CC-MAIN-2018-39
refinedweb
1,563
56.29
Beanstalkd can be defined as a work queue. It is used to manage workflow in web applications and increase speed. To initialize Beanstalkd, it needs to connect and listen on a port. This operation can be done using a command-line operation: beanstalkd -l 127.0.0.1 -p 20000 This command sets up Beanstalkd to listen at port 20000 on the host system. Next, Beanstalkd needs to be listening on this port in the program handling it as well: import beanstalkc # Connect beanstalk to thd correct ip address and port beanstalk = beanstalkc.Connection(host = 'localhost', port = 20000) This code snippet initializes a beanstalk client on localhost to listen on port 20000. Jobs can be inserted into the queue using the put function: beanstalk.put('job') As demonstrated in the example above, jobs need to be in string form to be inserted into the work queue. To retrieve a job, the reserve function can be used: job = beanstalk.reserve() After processing, jobs need to be deleted. If they are not deleted, they are re-inserted into the queue after a certain amount of time. job.delete() A complete serverside function might look like: import beanstalkc beanstalk = beanstalkc.Connection(host='localhost', port=20000) while True: job = beanstalk.reserve() #Job should be processed here or in another function job.delete() All code snippets, except the command-line script, were written in Python. RELATED TAGS View all Courses
https://www.educative.io/answers/what-is-beanstalkd
CC-MAIN-2022-33
refinedweb
235
75.4
How I set up a11y testing on this blog In order to learn more about accessiblity testing, I decided to set up Cypress testing with axe-core on this website. Setting this up was straight-forward and doesn't require too much overhead. I admit that cypress-axe cannot test every accessibility detail, for example focus management. However, with my static site, which at time of writing only has some blogposts, using cypress-axe's cy.checkA11y() has already helped me find hard to notice issues such as heading order. The tools at play - Cypress is an end-to-end testing framework which allows you to run tests in the browser, as if they were clicking through your app or website. - Axe-core brands itself as "an accessibility testing engine for websites and other HTML-based user interfaces". The engine can be accessed in several different ways including the VSCode Accessibility Linter, which will make suggestions as you write code, and the axe DevTools, which allows you to run audits of websites directly from your browser dev tools. - cypress-axe is the module which allows you to inject the axe-core runtime into the page you are testing in Cypress. Setting it up To avoid copy-pasting documentation which might change, I suggest you follow the documented installation steps for Cypress and then for cypress-axe. After installing, you will need to add the below line to cypress/support/index.js import 'cypress-axe' This hooks injectAxe() and checkA11y() to the cy object, so that you can call those functions in your tests. Writing your test Once installed, you can run the following functions in your test cy.visit('/') // or localhost:<portnumber> or whatever path you want to test cy.injectAxe() // injects axe-core so that audit can be run on page under test cy.checkA11y() Already checkA11y() allows you to audit and correct issues that might be on your page. As this my personal site is quite small, I only found two issues which were landmark-unique and heading order. However, the tool even allows you to check for unlabelled inputs, duplicate IDs and nested landmarks. See the available rules in the Axe documentation. For more interactive sites, you might want to interact with the page first, for example, clicking on buttons to reveal other content, before running cy.checkA11y(). Github actions To automate the process, I set up a Github action to check for every MR. You can learn how to set this up in the Cypress Documentation on Github actions. You can also check out the repo for this blog for my specific set-up, which is a static site running on 11ty. For now I've only written the test so it checks the latest blogpost, as I don't really want the CI to run for too long and to get progressively longer as I write more posts (even though it is admittedly very short already, being a simple site). Check out that test on my Github repo for this site. Further resources - Testing Accessibility with Marcy Sutton. A livestream from Jason Lengstorf's Learn with Jason series. Marcy is an expert in web a11y and I highly recommend her content on the subject. - The most common HTML mistake that I see, by Kevin Powell. This video is where I first learned that heading order is a very common issue in accessibility. Kevin audits a couple of sites, one good example and one bad example, and explains why this is an issue
https://www.lwkchan.com/posts/how-i-set-up-a11y-testing-on-this-blog/
CC-MAIN-2022-33
refinedweb
587
61.67
0 I am working on a little hobby project, it reads user input and then stores it in a pointer to char array. The problem is that the output is not correct. So i dont know if it is the output, or the storing that is wrong. I am used to using C++, but always used vector <string> in c++ to create my list. Here is my code: #include <stdio.h> #include <string.h> #include <stdlib.h> #include <stdbool.h> #define MAX_BUFFER_SIZE 512 int main(int argc, char *argv[]) { char input[MAX_BUFFER_SIZE]; char *commands[20]; char *token; int counter; bool _continue = true; while(_continue) { counter = 0; // Read user input. printf(">"); fgets(input, MAX_BUFFER_SIZE, stdin); // Split string. token = strtok(input, " "); while(token != NULL) { token = strtok(NULL, " "); if(counter > 20) { printf("\n<x>To many commands.\n"); break; } else { commands[counter] = token; } counter++; } for(int i = 0; i < counter; i++) printf("%s\n", commands[i]); } return 0; } It gives this output when I enter h h: h (null) I know that the (null) is a trailing character that i can just remove, but where is my second h?
https://www.daniweb.com/programming/software-development/threads/479787/problem-with-pointer-in-c
CC-MAIN-2017-04
refinedweb
186
75.61
What about the other Perl frameworks, Dancer and Mojolicious? How do they compare to Catalyst? Dancer’s big strength is making things quick and easy for smaller apps; you don’t have to think in terms of OO unless you want to and plugins generally shove a bunch of extra keywords into your namespace that are connected to global or per-request variables. Where Catalyst doesn’t have an exact opinion about a lot of the structure of your code but very definitely insists that you pick one and implement it, Dancer basically lets you do whatever you like and not really think too much about it. That really isn’t meant as a criticism: somewhere along the line I picked up a commit bit to Dancer as well and they’ve achieved some really good things – providing something that’s as little conceptual overhead as possible for smaller apps, and something where there’s a very direct mapping between the concepts involved and what’s actually going to happen in terms of request dispatch, whereas Catalyst abstracts things more thoroughly, so there’s a trade-off there. I mean, I was saying before that empty methods with route annotations almost always end up getting some code in them eventually.If you get to 1.0 and most of those methods are still empty, you might’ve been able to write a lot less code or at least do a lot less thinking that turned out not to have been necessary if you’d used Dancer instead. Equally, I’ve seen Dancer codebases that have got complicated enough to turn into a gnarly, tangled mess and the developers are looking and thinking, “You know, maybe I was wrong about Catalyst being overkill…” I love the accessibility of Dancer though, and the team are great guys. I’ve seen the catalyst community send people who’re clearly lost trying to scale the learning curve to use Dancer instead, and I’ve seen the Dancer community tell people they’re doing enough complicated things at once to go look at Catalyst instead and hey, we both run on top of PSGI/Plack so you can have /admin served by Dancer and everything else by Catalyst … or the other way around … or whatever. Meantime, Mojolicious is taking its trade-offs in a different dimension. Sebastian Riedel, the project founder, was also founder of Catalyst; he left the Catalyst project just before the start of, I think, the 5.70 release cycle, because we’d acquired a lot of users who’d bet the business on Catalyst’s stability at that point, and a lot of contributors who thought that was OK, and Sebastian got really, really frustrated at the effort involved in maintaining backwards compatibility. So he went away and rethought everything, and Mojo has ended up having its own implementations of a lot of things, focused on where they think people’s needs in web development are going over the next few years. A company heavily using Mojo open sourced a real-time IRC web client recently, doing a lot of clever stuff, and Mojolicious helped them with that substantially. But the price they end up paying is that when you step outside the ecosystem it’s quite jarring, because the standards and conventions aren’t quite the same as the rest of modern Perl. Mojolicious has a very well-documented staged back compatible breakage policy which they stick to religiously, and for “move fast and break stuff” style application development, I think they’ve got the policy pretty much spot on and they’re reaping a lot of advantages from it But for a system where you want to be able to ignore a section that users are happy with and then pick it up down the line when the state of the world changes and it needs extending (for example, for the people doing boring business systems where finding out 5 seconds sooner that somebody edited something would be nice to have) but what really matters is that the end result is correct, then I’m not sure I’m quite so fond of the approach. I think if you were going to talk about a typical backend for each framework, you could say that Dancer’s would be straight SQL talking to MySQL, Catalyst’s would be some sort of ORM talking to PostgreSQL, and that of Mojolicious would be a client library of some sort talking to MongoDB. Everybody’s going to see some criticism of the other two implicit in each of what I said, but take it as a compliment to their favourite: if they don’t, that’s because my metaphor failed rather than anything else I can’t recall a time when I’ve seen an app that was a reasonable example of its framework where I really thought that either of the other two would’ve worked out nearly as well for them... with the exception of a fairly small Catalyst app that, in spite of being, if anything, a bit small for Catalyst to make sense turned into a crawling horror when ported to Mojolicious – but then again, when I showed that to Sebastian and asked, “am I missing something here?”, the only reply I got was some incoherent screaming, the underlying meaning being, “WHAT HAVE THEY DONE TO MY POOR FRAMEWORK?! CANNOT UNSEE, CANNOT UNSEE!” So I think, as with Dancer, it’s a matter of there being more than one way to do it, and one or other of them is going to be more reasonable depending on the application. What are your thoughts on Perl 6 and given the opportunity, would you someday re-write Catalyst in it?. Catalyst Dancer Mojolicious All about Catalyst – interview of Matt S. Trout (Part 1 of 3) All about Catalyst – interview of Matt S. Trout (Part 2 of 3) All about Catalyst – interview of Matt S. Trout (Part 3 of 3). or email your comment to: comments@i-programmer.info
http://www.i-programmer.info/professional-programmer/i-programmer/6920.html?start=1
CC-MAIN-2018-17
refinedweb
1,007
54.8