Sunday, July 26, 2015

Copying and pasting table contents into comments in social networks and discussion forums

There isn't much sense in posting whole contents of tables into a comment under a post in most social networks, because directly copied-and-pasted content becomes plaintext, data is misplaced and garbled, because the comment and display area are not wide enough, and the intended overview becomes non-sensical anyway.

One can also choose to copy and paste only the first two columns, by holding down the Ctrl key in Firefox and dragging the mouse cursor across the cells with actual data starting from the ranking.

The data should first and foremost be pasted into a text editor, all the unnecessary data removed, and then copied and pasted here:
Top 10 countries by PEV market share of total new car sales in 2014 and 2013
^ Copied and pasted separately
# Country 2013 2014
1 Norway 13.84% 6.10%
2 Netherlands 3.87% 5.55%
3 Iceland 2.71% 0.94%
4 Estonia 1.57% 0.73%
5 Sweden 1.53% 0.71%
6 Japan 1.06% 0.91%
7 Denmark 0.88% 0.29%
8 Switzerland 0.75% 0.44%
9 United States 0.72% 0.60%
Source:
https://en.wikipedia.org/wiki/Electric_car_use_by_country#Top_10_countries

The result looks much nicer, but is still relatively unwieldy, because of variable-width fonts used by most social networking sites.

Section anchors and other anchors in MediaWiki code

It's possible to link to specific article sections or other in-article items in Wikipedia and other projects that use MediaWiki software.
Hereonafter I'm going to use 'MediaWiki', because this is the software that Wikipedia and similar projects rely on, and functionality is not limited to just Wikipedia. Other projects that use MediaWiki code are at Wikia, such as Memory Alpha, a comprehensive Star Trek canon encyclopedia.
The simplest way to find the jump link is by clicking on a section name in the article table of contents — the browser then jumps to the section — and then copying the URL from the browser address bar, where the address is appended with anchor text when an anchor is jumped to.

An anchor in HTML and newer web page standards is an in-page point one can jump to if a link exists, or if the anchor is used in a web address (URL).

Each section title is also made into an anchor, and sections are the most prominent jumping points in MediaWiki-based projects, because the anchor is always there whenever there's a section.

In a web address, the anchor is known as part of the URL that starts with a hash # sign:

https://en.wikipedia.org/wiki/Electric_car_use_by_country#Global_outlook

This link takes to the Wikipedia article "Electric car use by country", but jumps the browser view into the "Global outlook" section, which may have more relevant information than the whole article.

One can thus link to an in-article position either by targeting a section via pre-existing section anchors, or by creating a separate anchor using the {{Anchor}} template (exists in Wikipedia and its sister projects), or by creating and adding in article code a specific easily-readable ID to almost any tag or object present in an article, such as a table, a <DIV> or <SPAN>:
{| class="wikitable" id="Top_10_countries"
|-
|Table in wikicode
|-
|}


<!-- or somewhere else: -->

<div id="Other_countries">Some content inside a block</div>
That way, the anchor is created to a table, and after saving, one can jump to it by using this link instead:

https://en.wikipedia.org/wiki/Electric_car_use_by_country#Top_10_countries

Article sections in MediaWiki-based projects may contain all UTF-8-encoded characters, and the characters are then transformed into UTF-8-encoded text parts acceptable in web addresses:

The highlighted anchor part of the below URL was converted from the Russian word 'Возможности' (Features) from the Russian-language article about Mozilla Firefox, wherein the Russian-language capital 'В' (V) was converted into .D0.92. in an anchor. This, of course, makes links in non-Latin scripts very long:

https://ru.wikipedia.org/wiki/Mozilla_Firefox#.D0.92.D0.BE.D0.B7.D0.BC.D0.BE.D0.B6.D0.BD.D0.BE.D1.81.D1.82.D0.B8

Friday, July 17, 2015

Vim tips on searching and replacing

This is not exhaustive or anything, just a memo.
's' means substitute. While it may also mean "search", the search command is usually a slash /, as in
/searchabletext
The simple of it:

s/whatimlookingfor/whatshouldreplaceit

The slash separates the command, the searchable item, the replaceable item, and additional parameters.

s/\&,/^M/g

This replaces commas with a newline (carriage return). Breakdown:

s/ — starts the substitute command
after slash, enter search string
\& — all occurrences of desired search string
, — comma is what one is looking for
/ — the next slash separates the search string from the replacement
^M — newline (carriage return). in gVIM (for Windows), it's highlighted, as it's actually entered as <Ctrl+V> <enter>
/g — replace till the end of line. Useful for if there's a huge amount of text in one line.

If one wants carriage returns after a comma, use this:

s/\&,/&^M/g
— where the usually coloured (and special) carriage return symbol ^M follows the ampersand &. The ampersand is used to to add text: stuff before it is added before the searchable string; stuff added after the ampersand means that instead of deleting, stuff is added after the searchable string.

Convenient.

s/\&&quot\;/"/g

Here it replaces all &quot; with normal quote characters "
\& — all occurrences of search string;
&quot\; note that the semicolon is escaped.

s/\&description="/&\t

\& — search all instances of
    description="
/
&\t — As stated above, the ampersand & is used to add stuff; in this instance, a tab \t is added after the searchable string.

Turn highlight off
Like this:nohlsearch
^ Given that all searchable strings found are highlighted. But then it turns annoying when going to edit text after things are done. Instructions from the Vim wikia.

Thursday, May 7, 2015

List of Nokia phones offered by Canadian mobile operators (end of April 2015)

This is an updated list of Nokia phones offered by Canadian mobile operators.
I decided to create an update, largely because there has been consistent interest towards the previous post. The research was made around 24./25.04.2015. It left it at that for a few weeks until today (07.05.2015).
* The list of operators herein is based on the
Canadian mobile phone companies Wikipedia navbox.
* Criteria for inclusion: That the phone not be a Windows Phone device, so operators and MVNOs with non-Windows-Phone Nokia phones are at the top of the list; Microsoft-branded Lumias don't count.
  • I added one LG F4NR, which, strangely, according to the Rogers website, features the Symbian operating system. Since it's an OS formerly managed by Nokia, then I have also included that model, which seems to be one of the more popular basic phone models available in Canada. LG F4NR a 3G flip phone (HSPA/HSPA+), and its specifications have it that the OS is REX.

    AFAIK, Nokia sold Symbian to Accenture.

    LG could earn well by selling affordable feature/function phones with the no-frills Symbian operating system, which on its own is very battery-friendly, and sufficiently feature-packed.
Canada is generally Blackberry country, and almost all operators offer Blackberry devices. For many things and in many ways, Blackberry devices are superb over most other smartphones.

My motivation, then, was to include mobile phones with European roots, so I've also included operators that offer Doro phones, given that Doro is a Swedish company.
For those not in the know, while Alcatel has originally been a French brand, then Alcatel cellphones fall under Alcatel Mobile Phones, which is managed by TCL Mobile Limited, which in turn operates under TCL Corporation, which is headquartered in China. This is something similar to Nokia devices and services division now owned by Microsoft, which is headquartered in the U.S. So Alcatel enjoys brand recognition inertia.

Jump to operators that offer:
Non-Windows-Phone Nokia phones Nokia Lumia & Doro phones Nokia Lumias LG F4N*

Operators that offer non-Windows-Phone Nokia phones

Only one non-MVNO operator offers non-Windows Phone Nokia phones as new.

ICE Wireless

Yukon, Northwest Territories, and Nunavut

Personal
* Nokia 208 (under Regular Phones)
· Nokia Lumia 530 (Windows Phone)

Chatr (MVNO)

Owned by Rogers, coverage limited to Wind Mobile and Mobilicity.
* Nokia C2-02

· Nokia Lumia 520
· Nokia Lumia 635

· Sony Ericsson txt pro

Petro-Canada (MVNO)

Uses the Rogers GSM network.
* Nokia C3

This section includes operators that normally include Nokia devices with Windows Phone, but also offer Doro phones (Doro is a Swedish company).

Cityfone (MVNO)

Owned by Rogers.
· Nokia Lumia 635

· Doro PhoneEasy 620

~ LG F4NR

Primus Canada

Chose Ontario.
· Nokia Lumia 635
· Doro PhoneEasy 620

~ LG F4NR

The following are all operators that offer at least Nokia Lumia phones. Apparently, the most popular devices are Nokia Lumia 635 and Nokia Lumia 830.

Rogers Wireless
Main page lists phones by operating system.
On ''All phones'' page, brands are positioned below operating systems, and Nokia is listed in brands:
Residential & (Small) Business
· Nokia Lumia 635
· Nokia Lumia 830
Interestingly, Symbian is featured in OS platforms, and that yielded
~ LG F4NR
Strange only, that the phone's standby time on the Rogers website was rated as 16 hours, while music playback is 21.5 hours. This is a mistake on the part of Rogers, because the standby time is up to 16 days. Nearly as much is confirmed on LG's own website for the phone, which lists standby time as 'up to 15 days and 17 hours'.
- Sony Ericsson is listed as a brand under the Business section, but only Sony Xperia phones are on offer.

Fido Solutions (MVNO)
MVNO, subsidiary of Rogers
· Nokia Lumia 635
· Nokia Lumia 830
Bell Mobility
General & Small business:
· Nokia Lumia 830 (under Windows)
_ In the General section at Phones > Devices, the Nokia brand is not listed.
_ Under Small Business (at mobilebusiness.bell.ca), Nokia is found under 'Filter devices'.


MTS Mobility (Manitoba Telecom Services)
Primary carrier in Manitoba;
Offered under all customer categories:
· Nokia Lumia 830 (under Devices)

Under Voice devices:
~ LG F4NR
SaskTel Mobility
Serves Saskatchewan.
Personal:
· Nokia Lumia 830

Under Other Devices > Cell Phones
~ LG F4NR
(?) also has LG F4N
Telus Mobility
As of 2014 has completed purchase of Public Mobile, an MVNO on Telus's 4G network. Telus has since 2008 also operated a Koodo Mobile MVNO.

Chose Ontario.
Nokia is listed.
Offered under all customer categories:
· Nokia Lumia 635 (under "Smartphones Lite" section)
· Nokia Lumia 830 (under one of "Smartphones" sections)
Tbaytel
(Formerly Thunder Bay Telephone)
Operates in Thunder Bay, ON, and the surrounding area.
Personal & business:
· Nokia Lumia 635
· Nokia Lumia 830

The following operators don't have any Nokia phones on offer, but they have LG F4NR and LG F4N phones, which might be running Symbian.
I haven't verified this information, so I don't have much to say about whether the phone actually runs this operating system.

Eastlink Wireless
Serves Nova Scotia and Prince Edward island; website requires region, so I chose Nova Scotia + Halifax.
[x] Apparently no Nokia phones.

Certified refreshed phones feature only
~ LG F4N, which has Symbian/REX

[x] Business: Site not very usable.
Vidéotron Mobile
Serves Quebec and the National Capital Region.
Residential & business:
 Base [phones] / classic devices
 ~ LG F4NR
Under small and medium business section, the refined criteria selection lists Nokia, but no Nokia phones are offered.

Wind Mobile
Nokia not listed.
~ LG F4NR
Wind Mobile specifies the phone's OS as 'LG Platform'.

Although the BREW Mobile Platform does not stem from Europe, the Huawei U2801 featurephone is offered as another device with an alternative operating system. Huawei is a Chinese company.

PC Mobile (MVNO)
Devices operate on Bell Mobility (prepaid), or Telus Mobility (postpaid) networks; branding and payment media with President's Choice supermarket store brand.

No Nokia phones listed as of 24.04.2015.

Wikipedia article on PC Telecom features Nokia Lumia 520, but that information is very likely outdated.
Prepaid phones
~ LG F4N
Virgin Mobile Canada (MVNO)
Used Bell Mobility CDMA network, after launch adopted HSPA+ and 4G LTE.

Website requires JavaScript to display any content.
Has good device filter.

Nokia not listed.
~ LG F4NR

Other Canadian MVNOs

The following are MVNOs that don't offer either Nokia phones or the said LG F4N* phones.

Koodo Mobile (MVNO)
Subsidiary of Telus

One of the few websites served in https, but wants to access a user's location via browser (Firefox normally prompts for these things).

No Nokia phones available.

Latitude Wireless or Northwestel
An incumbent local exchange carrier (ILEC), serves the very northern parts of Canada, which have the most adverse weather.

Bell authorized dealer. See Bell.


Public Mobile (MVNO)
Subsidiary of Telus.

Website requires JavaScript, only offers service, but no phones.


7-Eleven SpeakOut Wireless (MVNO)
Uses Rogers GSM network in Canada.

Sold Ottawa outlets to Quickie Convenience Stores, existing Ottawa SpeakOut subscribers could move their prepaid balances to Quickie's Good2Go programme.

No Nokia phones.


Inukshuk Wireless
Has a one-page site with only the company address.

Mobilicity
Serves Greater Toronto Area, Ottawa + Gatineau, Calgary, Edmonton, Greater Vancouver Area. No new cities served since 28.04.2011.

CityWest Mobility (MVNO)
Exited wireless services, existing customers were given to Telus.
Otherwise serves the following BC communities: Prince Rupert, Port Edward, Terrace/Thornhill, Kitimat, Hazelton, Smithers/Telkwa, Houston, Stewart.

Zoomer Wireless (MVNO)
Under Cityfone; no mobile service advertised.


Sunday, April 19, 2015

Social networks and avatars

This was a comment I wrote to someone in a social network where their avatar was somewhat direct in its presentation.

The first thing people will look at is another person's avatar (profile picture), which often reveals quite a bit about that person. For example, if an avatar only shows a face, then the picture says "here I am, this is me." — People who look for meaningful relationships tend to gravitate towards those profiles that only show a person's face.

On dating sites that are often used for short-term liaisons, photos of people are more direct with what they have to offer, because potential dates then look for something else than a face or a personality. — Yet such photos anywhere in a profile are not effective on sites where meaningful relationships are sought.

Tuesday, April 7, 2015

Convert percentage values formatted as numbers into percentages in LibreOffice

The Problem:


Suppose that percentage values have been entered in LibreOffice this way:

(the decimal separator is a comma)
42,63
27,78
14,72

and the objective is to make sure that 42,63 and other cells display as 42,63% and act like percentages instead of general numbers or normal text.

Only that the values are treated as normal (General) numbers. The problem is bigger, if lots of cells are formatted like that, and the dataset's percentage values use decimals, as in 25,5 and so on.

When AutoInput is active (in Tools menu > Cell contents), then entering text with a percentage sign, such as 25,5% — automatically formats the cell and cell contents as a percentage, in which actual cell content is 0.255. But this works when entering data manually.

Adding a percentage sign to data in existing cells may or may not work: in some cases, when adding a percentage sign to 42,63, it will instead become 0,43 or 4263,00%.

The solution:


Select these cells, format them as text.

Use Find & Replace (Ctrl+H) to add a percentage sign:
* You need regexp functionality, so check [\/] Regular expressions;
* Check [\/] 'Current selection' only;
* The 'Search in' drop-down box must have 'Values' selected;
* The 'Search for' field must contain a dollar sign $ to signify end of paragraph;
* The 'Replace with' field must contain an ampersand and a percentage sign: &%
* Click [Replace All].

You're not done yet, as that only adds a percentage sign to the end of each value, but does not put them into percentage format.

Select all these cells, and cut or copy them.

* Then paste cut/copied cells as unformatted text. This opens the Text Import window, where:
* values are (•) Separated by [\/] Tab;
* Check [\/] Detect special numbers
* (To make sure that cells are positioned properly, then don't merge delimiters.)
* Press OK.
Now, each value should be formatted as a percentage, and the percentage sign toolbar button must also be active for these cells.

I don't know if there's any difference when in the Text Import window 'Quoted field as text' is checked while pasting unformatted text.

To keep the original dataset intact, then experiment by using a copy of the file, or at least paste into a new file or new sheet in the same file.

This might also work with OpenOffice.org that supports the 'Detect special numbers' function.

Thursday, March 5, 2015

Tips on making a good YouTube video

In order of importance:

• Use a tripod or something that can hold your phone in place while you're filming;
• When filming with a modern mobile phone, always hold it sideways to avoid 'tall' vids;
• Make sure the aspect ratio matches the YouTube video box, which is 16:9;
• If video aspect ratio is different, then YouTube allows letterboxing;
• Avoid uploading videos in less than 360p; else they will look pixelated in the video box;

Audio

• Do not upload videos with low volume, because most other videos are louder, and so are video ads;
• Avoid excessive audio treble, otherwise 's' sounds are too loud, which might hurt ears;
• To minimize echo, set up an almost wall-height bookshelf full of books or stuff along at least one nearby wall. Keep it clean and dust-free.

Intro and end clips

• Intro clips should be short, at best up to 15 seconds (else boring);
• If intro has music, its volume should fade in from 0 or 25% to normal;
• End clips should always have lower volume than your video;

Text in video

• Do not use cursive fonts, they are hard to read;
• See if you can do without very thin fonts, as these can be hard to read on small displays or from a distance;
• Do not use too large text size, as that's hard to read, too. It's good only for a separate video thumbnail image;
• Try to avoid colouring each letter, because that is also hard to read;
• Consider text contours or text shadow or some translucent text background color if video content changes from light to dark at text position;

You

• You may look gorgeous, but if you have an important message, then keep your shirt on like Russ Marine (now Civilian) does, so that your listeners won't get distracted.

Other people

• Avoid publishing videos with your own or anyone else's children in them. They are not your dog or cat, and they need privacy, too, even if they don't yet understand what it means — Small children are unable to give consent, as they don't yet have the concept of public/private and what consent is.
• A child of school age can be taught these things, so they will eventually learn to understand, so they can make their own choices.
• There are times and places when publishing videos with children in them are necessary:
If you happen to document any kind of abuse with anyone anywhere, then be ready for the following: You need to have a device of insignificant cost, good recoding features, fast connection, and instant upload to a throwaway account for backup, because authorities are very keen on gatherng evidence.

Speech manners

• When talking,
avoid using words like "don't", "doesn't", "didn't", etc., because these can be misheard wrongly. Try instead "do not", "does not", "did not", and so on with 'could', 'should' and the like. Unless you want to be ambiguous on purpose.
• Do not confuse 'may', 'can', and 'might': Avoid "bad people may or can do something", as if you might be giving them permission, and use 'might' instead; whereas "really good people _can_ do something good."