null terminated character

http://stackoverflow.com/questions/270708/string-array-with-garbage-character-at-end

u have to end the string with a character. That’s why they are called zero terminated strings.

It is also wise to allocate 1 extra char to hold the ”. (0 without single quotes also works )

object relational mapping

  • Object-relational mapping (ORM, O/RM, and O/R mapping) in computer software is a programming technique for converting data between incompatible type systems in object-oriented programming languages. This creates, in effect, a “virtual object database” that can be used from within the programming language. ( DB data map to object, object map to DB)
  • active record: ORM for rails
  • Data management tasks in object-oriented (OO) programming are typically implemented by manipulating objects that are almost always non-scalar values. For example, consider an address book entry that represents a single person along with zero or more phone numbers and zero or more addresses. This could be modeled in an object-oriented implementation by a “Person object” with attributes/fields to hold each data item that the entry comprises: the person’s name, a list of phone numbers, and a list of addresses. The list of phone numbers would itself contain “PhoneNumber objects” and so on. The address book entry is treated as a single object by the programming language (it can be referenced by a single variable containing a pointer to the object, for instance). Various methods can be associated with the object, such as a method to return the preferred phone number, the home address, and so on.However, many popular database products such as structured query language database management systems (SQL DBMS) can only store and manipulate scalar values such as integers and strings organized within tables. The programmer must either convert the object values into groups of simpler values for storage in the database (and convert them back upon retrieval), or only use simple scalar values within the program. Object-relational mapping is used to implement the first approach
  • Another solution is to use an object-oriented database management system (OODBMS) or document-oriented databases such as native XML databases. OODBMSs are databases designed specifically for working with object-oriented values. Using an OODBMS eliminates the need for converting data to and from its SQL form, as the data is stored in its original object representation and relationships are directly represented, rather than requiring join tables/operations.

difference between uri and url

a URI identifies, a URL identifies and locates # meaning URI is a bigger set than URL, url belongs to uri
Consider a specific edition of Shakespeare’s play Romeo and Juliet, of which you have a digital copy on your home network.You could identify the text as urn:isbn:0-486-27557-4.
That would be a URI, but more specifically a URN because it names the text.You could also identify the text as file://hostname/sharename/RomeoAndJuliet.pdf.
That would also be a URI, but more specifically a URL because it locates the text.

A URI can be further classified as a locator, a name, or both. The term “Uniform Resource Locator” (URL) refers to the subset of URIs that, in addition to identifying a resource, provide a means of locating the resource by describing its primary access mechanism (e.g., its network “location”). The term “Uniform Resource Name” (URN) has been used historically to refer to both URIs under the “urn” scheme [RFC2141], which are required to remain globally unique and persistent even when the resource ceases to exist or becomes unavailable, and to any other URI with the properties of a name.

So any URL is a URI, but some URIs aren’t URLs, they’re URNs instead. Except the ones which are both URNs and URLs.

http://stackoverflow.com/questions/176264/whats-the-difference-between-a-uri-and-a-url

QR code

  • QR code (abbreviated from Quick Response Code) is the trademark for a type of matrix barcode (or two-dimensional bar code) first designed for the automotive industry in Japan
  • A QR code is read by an imaging device, such as a camera, and formatted algorithmically by underlying software using Reed-Solomon error correction until the image can be appropriately interpreted. Data is then extracted from patterns present in both horizontal and vertical components of the image.
  • Originally designed for industrial uses, QR codes have become common in consumer advertising. Smartphone users can install an app with a QR-code scanner that can read a displayed code and convert it to a URL directing the smartphone’s browser to the website of a company, store, or product associated with that code providing specific information.
  • application: Mobile operating systems, URLs, virtual store, card payment, website login

source: http://en.wikipedia.org/wiki/QR_Code

 

Lightroom 5 Beta Now Available!

http://blogs.adobe.com/lightroomjournal/2013/04/lightroom-5-beta-now-available.html

Lightroom 5 beta Enhancements

Advanced Healing Brush
Lightroom 2 added the ability to quickly remove spots and imperfections from your images.  Photographers could only heal circular areas, but many unwanted elements in photographs have irregular shapes. In Lightroom 5 beta we’ve overhauled the Spot Removal algorithm.

With the Advanced Healing Brush, photographers can now adjust the size of the brush and move it in precise paths, so unwanted objects and flaws—even those with irregular shapes like threads—just disappear. Lightroom 5 even let’s portrait photographers achieve subtle, natural looking results when they smooth wrinkles or fix blemishes on their subjects.

Advanced Healing Brush

Upright

There are many things that can come between a photographer and the perfect photo. Not holding a camera straight, or taking a picture from an odd perspective or with the wrong lens, can cause a subject to appear tilted or askew when imported into the Lightroom catalog and viewed on a computer screen. Correcting such images often requires a number of separate adjustments. A photographer might rotate an image, adjust it vertically and horizontally, and change its aspect and perspective. Finding the optimal combination of these settings often relies on a time-consuming trial and error approach.

Lightroom 5 extends the range of image enhancements available to photographers with Upright. The new Upright tool gives photographers four easy methods to straighten tilted images with a single click. Upright analyzes images and detects skewed horizontal and vertical lines, even straightening shots where the horizon is hidden.

Upright

Radial Filter

Busy backgrounds or bright colors can distract viewers from the focal point of an image. Photographers may try to reduce the distraction by cropping an image, but this can result in the loss of interesting detail and balance. Another approach to focusing the viewer’s attention is to create a vignette effect, but this only works if a subject is in the center of an image.

The Radial Gradient tool in Lightroom 5 now offers photographers more flexibility and control in how they guide a viewer’s eye to emphasize the important parts of an image. Using this tool, photographers can create off-center vignette effects or multiple vignette areas in a single image. This local adjustment control lets photographers minimize distractions and focus a viewer’s attention exactly where it should be.

Radial Filter

Smart Previews

Photographers need flexibility, and new solid state drives and ultra-light laptops let them work from anywhere. However, the limited storage capacity of these devices restricts access to complete image libraries and original raw files, which are often stored on detachable storage devices or desktop computers. Inability to access to the files they need impacts their ability to edit and share high-quality images while on the go.

New Smart Previews in Lightroom 5 let photographers easily work with images without bringing their entire library with them. They just generate smaller, stand-in files called Smart Previews and leave the originals back at the studio. Photographers can make adjustments or metadata additions to Smart Previews and apply their changes to the fullsize originals later when they reconnect to the device holding the original files, all nondestructively, of course.

For many photographers, generating Smart Previews as they import their images gives them the freedom to disconnect from their storage device at any time, leave the originals at home or in the studio, and edit the Smart Previews from wherever they are. Building Smart Previews while importing is easy, just check the Build Smart Previews checkbox within the File Handling panel in the Import dialog box.

Improved Photo Book Creation

In Lightroom 4, Adobe introduced a robust Photo Book creation workflow. The Book Module makes it easy for photographers to create beautiful, custom books for clients, friends, or for their own personal enjoyment. The Book module provides everything photographers need to create a Photo Book and export it to a PDF for online viewing or directly upload it to the online printing site, Blurb.

Now Lightroom 5 lets photographers customize Photo Books more than ever, with a variety of easy-to-use book templates that you can now edit to create a customized look. Photographers can add page numbers, individual photo captions, and page captions.

Slideshows with Videos and Still Images

Lightroom 4 provided photographers tools to do more with video clips—from organizing, viewing, and making adjustments and edits to playing and trimming clips and extracting still images from video footage. With Lightroom 5 photographers can now easily combine still images, video clips, and music in creative HD video slideshows that can be viewed on almost any computer or device.

Lightroom 5 Additional Features and JDIs

  • PNG file support
  • True Full Screen Mode
  • Configurable grid overlays
  • Additional search criteria for filters and smart collections
  • Lock zoom position preference settings
  • Direction field in EXIF metadata panel
  • “Set as Target Collection” checkbox in Create Collections dialogue
  • Integrity verification of DNG files
  • LAB color readout
  • Aspect slider added to the Manual tab in the Lens Correction panel
  • Persistent clipping indicators between Lightroom sessions
  • Crop overlay aspect ratios
  • Visual indicator of Favorite book pages
  • Transparent buttons for improved Text creation in Books

symbol vs. string

symbol vs. string

http://stackoverflow.com/questions/8189416/why-use-symbols-as-hash-keys-in-ruby

as hash keys, string as keys is duped and  frozen so it cannot be modified. Keys to be frozen is good, but dup may be expensive.

hash.store(key, value) → value

Element Assignment—Associates the value given by value with the key given by key. key should not have its value changed while it is in use as a key (a String passed as a key will be duplicated and frozen).

http://stackoverflow.com/questions/13044839/why-is-a-string-key-for-a-hash-frozen