Thursday, June 1, 2017

How to tweet the URL of a web page successfully with a “Large Image Summary Card”

Example of a “Large Image Summary Card for an HTML document featuring Meeks Creek Falls, a waterfall in California's Desolation Wilderness

On Twitter users tweet short text—microposts.

You want to enhance your tweet with an image? Post it along with your tweet (see Posting photos or GIFs on Twitter).

You want to enhance your tweet with an URL of an exciting web page plus an illustrating image?  Use Twitter Cards.

Frequently, I design an image page (photo page): a web page (HTML document) that contains an image annotated with some informative text. I like to include such pages in Twitter posts by presenting the targeted image with descriptive text—microannotation. This stirs up reader's curiosity and invites them to click through. To achieve this, I employ Twitter's “Large Image Summary Card” technology (see Summary Card with Large Image).

Here, I'll demonstrate how it works (how it worked for me, anyway).  Follow these straightforward steps:

1. Add specific HTML meta tags to your web page.
2. Run the URL of the page through Twitter's card validator tool.
3. Tweet the URL

As an example page, I am using my Meeks Creek Falls picture and page. I inserted the following metadata lines into the head section of the respective HTML document:

<meta name="twitter:card" content="summary_large_image"/>
<meta name="twitter:site" content="@TravelingAhead" />
<meta name="twitter:creator" content="@TravelingAhead" />
<meta name="twitter:title" content="Meeks Creek Falls" />
<meta name="twitter:description" content="White water tumbling, splashing and spraying downcreek between naturally sculptured rocks" />
<meta name="twitter:image" content="http://www.axeleratio.com/pic/waterfall/meekscreek/img/Meeks_Creek_Falls.jpg">
<meta name="twitter:image:alt" content="Meeks Creek Falls next to Tahoe-Yosemite Trail">

Then, the document was tested with the Card validator at https://cards-dev.twitter.com/validator. After pressing the Preview Card button, I got the following preview display including an info log indicating successful card mark-up:



I submitted the following message with link and hashtags via @TravelingAhead:

#TYT Refresh yourself on a Tahoe-Yosemite Trail outing http://www.axeleratio.com/pic/waterfall/meekscreek/meeks_creek_falls.htm #MeeksCreekFalls #DesolationWilderness #Waterfall
 
The tweet showed up in the feed (https://twitter.com/TravelingAhead/status/869294403973660672) as shown at the top of this post.

Keywords: microblogging, microdata, meta tags, image collecting, annotated image.

Saturday, March 4, 2017

How can I edit the PATH variable under Windows 10?

The PATH variable is an environment variable of an operating system. The value of this variable is a list of folder (directory) paths. These specified folders are the names of installation paths—also called system paths—of executable programs.

Here, we are interested in the accessibility of programs installed in Windows 10. The list of folder names is searched when a program is called from the Run dialog box, a Command Prompt or Powershell command line and also when requested by a running process. Thus, inclusion of a program's directory path in the PATH list enables a program launch by program name without typing or providing the complete path.

Updated Windows 10 versions now contain a PATH editor that facilitates modification, addition and deletion of path names. Using this editor infrequently, I am finding it difficult to memorize the step sequence to access it. In the following, I am sharing how to tab down to the PATH editing dialog:

  1. Right-click the Windows icon (Start button) and, from the pop-up menu, select System to open the System window.
  2. From the menu items on the left side of the basic computer information, click Advanced system settings to open the System Properties window.
  3. Click the Environment Variables... button to open the Environment Variables window containing a scrollable System variables pane.
  4. In the pane, double-click the line with the system variable Path to open the PATH Editor (with the heading Edit environment variable). 
In the editor, select a line with a given installation path. Click the Edit button to modify the path or the Delete button to remove the path. To add a new path, click the Browse... button to open a dialog that assists you in finding the folder path you want to add. No typing required! Leave the editor by clicking the OK button to save your changes.

Sunday, September 25, 2016

A hands-on OpenOffice™ Base introduction by example using some mineral data

A contribution by Axel Drefahl, axeleratio.com, September 25, 2016.

Apache OpenOffice™ is an open-source office suite including word processing, spreadsheet, presentation, graphics and database software [1]. Its database tool is called OpenOffice™ Base, shorter ooBase or simply Base. OpenOffice started out as an open-sourced version of  StarOffice (1985-1999) [2]. Later, the suite development fractured into the Apache OpenOffice project and the LibreOffice project.

Today, two separate office suites, which were built on the same original code, exist [3]. Both, OpenOffice and LibreOffice can be downloaded for free for Windows, Linux and Mac. The two projects share most of their code. Interfaces and feature are similar. Without going into any further detail of difference, we will here get started with OpenOffice to get a hands-on experience for a desk top database management system that save your data and metadata in a single file. If you are using Microsoft Access, you will find many similarities. Otherwise, learning ooBase provides the basic skills to continue with Access later—if you want to or need to. Data can be imported/exported both ways.  

You are going to learn how to handle the followings tasks:
  1. Table design  (table layout),
  2. Table creation (data entry),
  3. Relationship between tables,
  4. Building queries in design view,
  5. Export of data table via OpenOffice Calc.
The provided examples use data from mineralogy [4]. Here are the lessons:
  1. Exploring OpenOffice Base: an example involving rare-earth mineral data  
  2. Structuring rare-earth mineral data in an OpenOffice Base table
  3. Modifying the column layout of an existing OpenOffice Base table  
  4. Defining and creating relationships between OpenOffice Base tables  
  5. Creating a query in OpenOffice Base
  6. Combinatorial querying-with OpenOffice Base  
  7. Exporting an Openoffice Base table into a file with Comma Separated Values (CSV) format
Apache OpenOffice 4.1.1 was used on Window 10 to test the examples and create the sample files RareEarthMinerals_2tables.odb and RareEarthMinerals_query.odb.

It should go without saying that these lessons provide a quick start, but cover only a few selected features and capabilities of ooBase.


References and more to learn
[1] Apache OpenOffice™: Why should I use Apache OpenOffice? [www.openoffice.org/why/index.html].
[2] Wikipedia: OpenOffice.org [en.wikipedia.org/wiki/OpenOffice.org],
[3] How-To Geeks: OpenOffice vs. LibreOffice: What's the Difference and Which Should You Use?  [www.howtogeek.com/187663/openoffice-vs.-libreoffice-whats-the-difference-and-which-should-you-use/].
[4] Appendix of the contribution “Mineralogy of the Rare-Earth Elements” by F. P. Cesborn in: P. Möller, P. Černý and F. Saupé. Lanthanides, Tantalum and Niobium. Springer-Verlag, Berlin Heidelberg, Germany, 1989.

Saturday, September 24, 2016

Exporting an OpenOffice™ Base table into a file with Comma Separated Values (CSV) format

A contribution by Axel Drefahl, axeleratio.com, September 24, 2016.

This post continues my preceding OpenOffice™ Base (ooBase) lessons:
  1. Exploring OpenOffice Base: an example involving rare-earth mineral data  
  2. Structuring rare-earth mineral data in an OpenOffice Base table
  3. Modifying the column layout of an existing OpenOffice Base table  
  4. Defining and creating relationships between OpenOffice Base tables  
  5. Creating a query in OpenOffice Base
  6. Combinatorial querying-with OpenOffice Base 
A common database task is to export data into a plain-text file and adhering to a well-defined format such that the data can automatically be imported and resourced by other applications. In the following exercise we export our CesbronList into a CSV file:
  1. Open RareEarthMinerals_query.odb and click Tables in the Database pane bring the Tables pane in view.
  2. From the menu, select File > New > Spreadsheet to open an empty Calc sheet..
  3. In the Base window, right-click CesbronList and choose Copy from the context menu.
  4. In the Calc window, click cell A1 and Edit > Paste. The Base field names will show up as column headings in row 1 (cells A1 to U1) and the data will populate the cells of the rectangle with the diagonal-lined corners A2 and U168.
  5. In the Base window select File > Close to close RareEarthMinerals_query.odb.
  6. Continue with Calc. Select File > Save from the menu to save the imported data as CesbronList.ods (temporarily or longer,;you are the database administrator).
  7. Then, select File > Save As to open the dialog for outsourcing from OpenOffice™.
  8. Click the drop-down menu next to “Save as type” to view the export options. Select Text CSV (.csv)(*.csv) .
  9. Name the export file CesbronList.csv.
  10. Click Save to finalize the export.
CesbronList table exported into an OpenOffice Calc sheet

CesbronList table exported into a CSV file

As you certainly have noticed, the drop-down menu of the “Save as type” text field displayed a list of various export options, some of which you also may want to try. Have fun!

Friday, September 23, 2016

Combinatorial querying with OpenOffice™ Base

A contribution by Axel Drefahl, axeleratio.com, September 23, 2016.

This post continues my preceding OpenOffice™ Base (ooBase) lessons:
  1. Exploring OpenOffice Base: an example involving rare-earth mineral data  
  2. Structuring rare-earth mineral data in an OpenOffice Base table
  3. Modifying the column layout of an existing OpenOffice Base table  
  4. Defining and creating relationships between OpenOffice Base tables  
  5. Creating a query in OpenOffice Base
Now let's check out how we can customize ooBase queries. By combining query criteria you can filter database records in many ways to fit your specific interest. Continuing with the just designed query, we explore how to find minerals that contain a desired combination of rare-earth minerals (REEs):
  1. In the Queries pane right-click QueryByREE and then select Edit from the context menu to open the Query Design window showing your current design from the last lesson.
  2. Click into the empty cell next to the hasY cell in the Field row. From the selection list select CesbronList.hasLa.
  3. Repeat step 2 for all other fields that you want to include in the query: CesbronList.hasCe to CesbronList.hasLu.
  4. All cells of the Visible row show a check mark for field visibility in the Table Data View, which you may want to switch into when done with the query design. If you only expect to see the ID, mineral name and mineral formula, set the visibility to “No” by “clicking the check mark off.” 
  5. At this point, the only set Criterion you see is TRUE for hasY. Delete the TRUE value. To see the minerals that contain cerium (Ce) and neodymium (Nd), enter TRUE into the respective Criterion cells. 
  6. Click the Run Query Icon: the resulting table shows ten records with the minerals satisfying the query; including minerals that contain other REEs besides Ce and Nd (first picture below).
  7. To see only those minerals that contain Ce and Nd, but no other REEs, enter FALSE into all other REE Criterion cells.
  8. Again, click the Run Query Icon to see the four minerals satisfying the modified query (second picture below). 

Query result with records of minerals containing Ce, Nd and other REEs
Query result with records of minerals containing Ce, Nd and other REEs

Query result with records of minerals containing Ce and Nd and no other REEs
Query result with records of minerals containing Ce and Nd and no other REEs

This example illustrated how to filter minerals of a desired REE combination. By leaving individual hasREE criterion cells empty or entering TRUE or FALSE, you can combinatorial filter minerals whether they certainly contain, certainly do not contain or may or may not contain a particular REE.

The ooBase file we have built up to now over six lessons is available as RareEarthMinerals_query.odb for testing and experimenting.

Thursday, September 22, 2016

Creating a query in OpenOffice™ Base

A contribution by Axel Drefahl, axeleratio.com, September 22, 2016.

This post continues my preceding OpenOffice™ Base (ooBase) lessons:
  1. Exploring OpenOffice Base: an example involving rare-earth mineral data  
  2. Structuring rare-earth mineral data in an OpenOffice Base table
  3. Modifying the column layout of an existing OpenOffice Base table  
  4. Defining and creating relationships between OpenOffice Base tables 
A query can answer specific questions about data stored in an ooBase application. Queries support you in maintaining and updating the database. You will consider using a query to review, filter and modify data as well as performing tasks such as calculations and report generation.

Running a query results in a table. Before running it, we need to create it. In the following example we use the ooBase Design View tool to create a query that selects all minerals from CesbronList that contain yttrium (Y):

  1. Open RareEarthMinerals_2tables.odb. If not yet done, create the relationship as shown in the previous lesson.
  2. Click Queries in the Database pane.
  3. In the Tasks pane, select Create Query in Design View... to open the Query Design window with the pop-up Add Table or Query dialog.
  4. Add CesbronList and Close the Add Table or Query dialog.
  5. From the appearing CesbronList field list, drag the names of those fields you want to include in your query into the cells of the Field row of the table in the lower section of the Query Design window: drag ID, MinName, MinFormula and hasY into the first, second, third and fourth Field cell, respectively. Notice that the first four Table cells indicate the source table, CesbronList, and the first four Visible cells include the Yes check mark.  
  6. To select all minerals with hasY set to Yes, click into the hasY cell of the Criterion row and enter TRUE.
  7. Click the Run Query Icon (or press F5 key). A table (view) with 74 records representing exactly those minerals that contain yttrium appears between the menu bar and the query design table.
  8. Open the Save As dialog by selecting File > Save from the menu in the Query Design window and enter QueryByREE as Query name, then press the OK button. Close the Query Design window.   
  9. In the Queries pane, double-click QueryByREE to open and review the Table Data View window with the mineral data for the Y-containing minerals.

OpenOffice Base Query Design window
Query Design window after running the query by pressing the Run Query Icon (fourth icon from right in the upper menu bar in the above cut-out section

You can come back to your query at any time to reset the query critera and to include not-yet-selected fields into your query. In the next lesson we are going to extend QueryByRee such that we are enabled to filter minerals by any desired combination of rare-earth elements. 

Saturday, September 17, 2016

Defining and creating relationships between OpenOffice™ Base tables

A contribution by Axel Drefahl, axeleratio.com, September 17, 2016.

This post continues my preceding OpenOffice™ Base (ooBase) lessons:
  1. Exploring OpenOffice™ Base: an example involving rare-earth mineral data  
  2. Structuring rare-earth mineral data in an OpenOffice™ Base table
  3. Modifying the column layout of an existing OpenOffice™ Base table 
We already defined a one-to-many relationship (one mineral class contains many minerals) by including a secondary key with field name MinClassID in the CesbronList table. This key points to a specific mineral class in the MineralClasses table. So far, this relationship exists in our (mental) blueprint. To create the relationship, we need to implement it into our ooBase application. This is achieved as follows:
  1. If not yet done, open RareEarthMinerals_2tables.odb and go to ToolsRelationships... to open the Add Tables dialog.
  2. Add both tables, MineralClasses and CesbronList, into the empty space of the Relation Design window; then Close AddTables
  3. Put your mouse pointer on the MineralClasses.ID field, keep the left mouse button down, move the pointer over to CesbronList.MinClassID and release the mouse button. You should now see a 1-to-n line connecting the selected fields.
  4. Go to File > Save to conclude the relationship creation before closing the Relation Design window.
one-to-many relation between two OpenOffice Base tables
1-to-n connection between two tables

From now on you cannot put a value into a CesbronList.MinClassID cell which does not already appear in the MineralClasses.ID column: each mineral belongs to exactly one given class (within our design). If you enter a wrong value, you will receive a message stating an “Integrity constraint violation” error. Therefore, some experts recommend to implement relationships before starting to enter any data into the tables. But it is completely up to you in which order you proceed.