Showing posts with label Internet. Show all posts
Showing posts with label Internet. Show all posts

Personal Cloud Storage in Canada

I recently started using Sync.com [1] as my personal cloud storage. I decided to avoid the big names mainly because they can scan and read your files. Sync encrypts your files locally prior to the upload to the cloud; all the while your private encryption keys remain only accessible to you: the user. You can read more details in their privacy whitepaper.

Sync servers are located in Canada and as such Canadian privacy compliance is built-in (in addition to that of the United States, the European Union and the United Kingdom).

I signed up for the trial version which provides 5GB of free storage with the purpose of evaluating the PC and iPhone apps. Shortly after, I bought the cheapest personal plan that provides 500GB of storage for $49 CAD (plus tax) per year.  For more pricing alternatives read this. 

For the last two days I have been uploading the files; so far so good. I blame my ISP for the slow upload!

It is early to tell; but so far I don’t have any complaints. Plus I still have 30 days and I can get my money back if get any nasty surprises.

Should you decide to give it a try, I’d appreciate if you use my referral link [1]. Both you and I will get an extra GB of storage after a successful referral. 

Finally, I’ll update this post after my 30-days-money-back-period is expired. I will let you know whether I decided to keep using Sync or if I bailed.

[1] Yanniel's Sync Referral link: https://www.sync.com/?_sync_refer=11e8cf2e0

Fetching a web page with Delphi

This function fetches the HTML content of a given web page. It takes the page's URL as parameter and returns the corresponding HTML text. The name CURL comes from the PHP Client URL Library that can be used (among other things) for the same purpose.
.................
implementation

uses
  IdHTTP;

function Curl(aURL: string): string;
const
  cUSER_AGENT = 'Mozilla/4.0 (MSIE 6.0; Windows NT 5.1)';
var
  IdHTTP: TIdHTTP;
  Stream: TStringStream;
begin
  Result := '';
  IdHTTP := TIdHTTP.Create(nil);
  Stream := TStringStream.Create;
  try
    IdHTTP.Request.UserAgent := cUSER_AGENT;
    try
      IdHTTP.Get(aURL, Stream);
      Result := Stream.DataString;
    except
      Result := '';
    end;
  finally
    Stream.Free;
    IdHTTP.Free;
  end;
end;
.................

You can modify this routine to have the web page saved to a file instead. For that, you only need to use the TStringStream.SaveToFile method in substitution of TStringStream.DataString.

One final observation: you may change the cUSER_AGENT constant to whatever value you decide. If you don’t specify a user agent, then a default value will be provided.

Ah! Don’t forget to add IdHTTP to the uses clause!

How to implement a tag cloud. Learn by example

A tag cloud [1] is a list of terms in which each item has a corresponding weight. The weight represents the importance or popularity of each term.

Tag clouds usually have a visual representation, and the weight can be translated into a different font size, color, style, text orientation and others. Changing the appearance of each tag in the cloud allows the readers to perform a quick scan and detect the most ranked terms in the cloud.

One final consideration is that tags are generally linked to some related content. This can be achieved for example, by means of a hypertext link (...a href=...) anchored to the affine content.

There are several algorithms to implement a tag cloud; however, right now I'm going to use a fairly simple one: it just changes the font size of the tag depending on the number of occurrences per tag. The general formula (taken from Wikipedia and adjusted by me) is:

Si = |Fmax*(Ti - Tmin)/ (Tmax - Tmin)|

for |Fmax*(Ti - Tmin)/ (Tmax - Tmin)| > 90%;

else Si =90%.

Where:
  • i: is an index ranging from 1 to the total number of tags in the cloud.
  • Si: is the display font size of tag i. You need to calculate Si for each tag in the cloud.
  • Fmax: is the maximum font size value to display. This value is chosen by the user.
  • Ti: is the number of occurrences of tag i.
  • Tmin: is the minimum of all Ti values.
  • Tmax: is the maximum of all Ti values.
Too difficult to understand? Patience, you'll get there:

Consider the following list of twenty tags. The number of occurrences is shown inside red square brackets "[...]":

linda evangelista [9]
toaster [12]
brad richards [7]
max talbot [13]
fireworks [10]
library of congress [12]
bohemian grove [15]
declaration of independence [2]
17 day diet [16]
independence day [10]
white sox [5]
blaise pascal [4]
ewan mcgregor [10]
kate moss [6]
princess diana [10]
traffic [1]
janet jackson [11]
canada day [8]
scott pilgrim vs. the world [10]
paul newman [18]

For the list of tags above, the corresponding Ti values are: T1=9; T2=12; T3=7; T4=13; T5=10; T6=12; T7=15; T8=2; T9=16; T10=10; T11=5; T12=4; T13=10; T14=6; T15=10; T16=1; T17=11; T18=8; T19=10; T20=18.

Now, it's easy to see that Tmax=T20=18 and Tmin=T16=1. Finally, let's set Fmax=300% [2] and let's calculate each Si:

S1 = |300% * (9 -1) /(18-1)| = 141.17% = 141%

S2 = |300% * (12 -1) /(18-1)| = 194.11% = 194%

S3 = |300% * (7 -1) /(18-1)| = 105.88% = 106%

S4 = |300% * (13 -1) /(18-1)| = 211.76% = 212%

S5 = |300% * (10 -1) /(18-1)| = 158.82% = 159%

S6 = |300% * (12 -1) /(18-1)| = 194.11% = 194%

S7 = |300% * (15 -1) /(18-1)| = 247.05% = 247%

S8 = |300% * (2 -1) /(18-1)| = 17.64% = 18%;
as S8 = 18% < 90%, then S8 = 90%.

S9 = |300% * (16 -1) /(18-1)| = 264.70% = 265%

S10 = |300% * (10 -1) /(18-1)| = 158.82% = 159%

S11 = |300% * (5 -1) /(18-1)| = 70.58% = 71%;
as S11 = 71% < 90%, then S11 = 90%.

S12 = |300% * (4 -1) /(18-1)| = 52.94% = 53%;
as S12 = 53% < 90%, then S12 = 90%.

S13 = |300% * (10 -1) /(18-1)| = 158.82% = 159%

S14 = |300% * (6 -1) /(18-1)| = 88.23% = 88%;
as S14 = 88% < 90%, then S14 = 90%.

S15 = |300% * (10 -1) /(18-1)| = 158.82% = 159%

S16 = |300% * (1 -1) /(18-1)| = 0% = 0%;
as S16 = 0% < 90%, then S16 = 90%.

S17 = |300% * (11 -1) /(18-1)| = 176.47% = 176%

S18 = |300% * (8 -1) /(18-1)| = 123.52% = 124%

S19 = |300% * (10 -1) /(18-1)| = 158.82% = 159%

S20 = |300% * (18 -1) /(18-1)| = 300% = 300%

Using the information above we can generate HTML code like this (the line feeds were added just for readability purposes):

<a href="http://www.yanniel.info/search?q=linda+evangelista" rel="tag" style="font-size: 141%;">linda evangelista</a>

<a href="http://www.yanniel.info/search?q=toaster" rel="tag" style="font-size: 194%;">toaster</a>

<a href="http://www.yanniel.info/search?q=brad+richards" rel="tag" style="font-size: 106%;">brad richards</a>

<a href="http://www.yanniel.info/search?q=max+talbot" rel="tag" style="font-size: 212%;">max talbot</a>

<a href="http://www.yanniel.info/search?q=fireworks" rel="tag" style="font-size: 159%;">fireworks</a>

<a href="http://www.yanniel.info/search?q=library+of+congress" rel="tag" style="font-size: 194%;">library of congress</a>

<a href="http://www.yanniel.info/search?q=bohemian+grove" rel="tag" style="font-size: 247%;">bohemian grove</a>

<a href="http://www.yanniel.info/search?q=declaration+of+independence" rel="tag" style="font-size: 90%;">declaration of independence</a>

<a href="http://www.yanniel.info/search?q=17+day+diet" rel="tag" style="font-size: 265%;">17 day diet</a>

<a href="http://www.yanniel.info/search?q=independence+day" rel="tag" style="font-size: 159%;">independence day</a>

<a href="http://www.yanniel.info/search?q=white+sox" rel="tag" style="font-size: 90%;">white sox</a>

<a href="http://www.yanniel.info/search?q=blaise+pascal" rel="tag" style="font-size: 90%;">blaise pascal</a>

<a href="http://www.yanniel.info/search?q=ewan+mcgregor" rel="tag" style="font-size: 159%;">ewan mcgregor</a>

<a href="http://www.yanniel.info/search?q=kate+moss" rel="tag" style="font-size: 90%;">kate moss</a>

<a href="http://www.yanniel.info/search?q=princess+diana" rel="tag" style="font-size: 159%;">princess diana</a>

<a href="http://www.yanniel.info/search?q=traffic" rel="tag" style="font-size: 90%;">traffic</a>

<a href="http://www.yanniel.info/search?q=janet+jackson" rel="tag" style="font-size: 176%;">janet jackson</a>

<a href="http://www.yanniel.info/search?q=canada+day" rel="tag" style="font-size: 124%;">canada day</a>

<a href="http://www.yanniel.info/search?q=scott+pilgrim+vs.+the+world" rel="tag" style="font-size: 159%;">scott pilgrim vs. the world</a>

<a href="http://www.yanniel.info/search?q=paul+newman" rel="tag" style="font-size: 300%;">paul newman</a>

That HTML code renders a tag cloud like the one below:


Notice that if you click on a tag it will search any related content withing my blog. Try it!

Notes:
[1] A tag cloud is also referred as a word cloud or weighted list. In this context, tag is a synonym of term; sometimes even a synonym of word. Nevertheless, I don't like the latest assumption, because the practical experience shows that a tag can be formed using two words or more.
[2] You can chose whatever value you want for this parameter. However, depending on what you set, the appearance of the tags in the cloud might vary.

Configuring a Dynadot's domain for a Blogger's blog

In the very beginning, this blog was published on blogspot.com. The original Blog*Spot Address was something like this: subdomain.blogspot.com. At some point, I decided to publish this blog on my own domain and so I registered www.yanniel.info at Dynadot.

After registering my domain, I needed to configure both my Blogger and Dynadot (DNS) settings. This is how:

Configuring Dynadot settings:
  1. Log into your  Dynadot account using your username and password.
  2. Click the DOMAINS tab in the main menu. The main menu looks like this: SUMMARY | DOMAINS | SEARCH | WEB HOSTING | SSL | MY INFO| MESSAGES| MARKET PLACES| FORUMS.
  3. Mark the checkbox next to your domain name (in my case yanniel.info) and then click the "Set Name Servers" button in the the "Domain settings" section.
  4. In the new page, make sure you are located in the DNS tab menu. The menu looks like this: NAME SERVERS | PARKING | FORWARDING | STEALTH FORWARDING | DYNADOT HOSTING | DNS | FREE HOSTING | EMAIL FORWARDING.
  5. In the "Domain Record" section: select "Forward" in the "Record Type" combobox and write http://www.yourdomainname.ext (in my case http://www.yanniel.info) as your "IP Address or Target Host".
  6. In the "Subdomain Records" section: write www as your first "subdomain"; select "CNAME" in the "Record Type" combobox and write ghs.google.com as your first "IP Address or Target Host". This CNAME record value (ghs.google.com) is  particular to Blogger...so, if your are NOT using Blogger your should use the corresponding CNAME record. 
  7. Finally, click "Use Dynadot DNS" button.
Your setting should correspond to something like this:
Configuring a Dynadot's domain for a Blogger's blog

After your Dynadot settings are set, expect a delay of one to three days, before all the DNS servers have been updated. I suggest that you wait this time before proceeding to configure the Blogger settings.

Configuring Blogger settings:
  1. Tell blogger to use your custom domain. For that go to: Dashboard-> Settings -> Publishing ---> Custom domain ---> Switch to advanced settings.
  2. Enter "Your Domain" name (in my case www.yanniel.info) and the captcha "Word Verification".
  3. Finally, click the "Save Settings" button.
 This is how it looks:
    Configure a custom domain in Blogger

      Well, this is all there is! Is your blog now alive in your custom domain? If it is, then I 'am happy ;-)

      For a more general guideline to configure a custom domain in Blogger refer to How do I use a custom domain name on my blog?

      A SEO advice for Blogger: Remove the blog title from the post title

      This topic has been covered many times on the Internet, but bloggers don't to pay much attention to it. So, in this article, I am bringing some light to this matter (AGAIN), even if my post is labeled by Google as “duplicate content”.

      If you create a new blog in Blogger,  this is what you should expect for the pages of your baby blog:
      1. Blog Home Page Title: corresponds to your blog title. For example: the home page title of this blog is “Yanniel's notes”.
      2. Post Page Title:  is formed by concatenating your blog title, a colon-space (“: ”) and your current post title. For example: the page title for this post would have been by default “Yanniel's notes: A SEO advice for Blogger: Remove the blog title from the post title”.
      The pattern followed in point number 2 is really bad from the SEO point of view. The page title is one of the most (if not the most)  important aspects for Search Engine Optimization; which is why, replicating the blog title on each post title is not wise.

      That  behavior leads Google, Yahoo, Bing and other major search engines to depreciate your post entries, because they find “duplicate content” in all the titles of your blog pages.

      I really don't see any benefit in prefixing each post title with the blog title.

      A way to change this situation is to remove the blog title from the title of each post. To achieve this follow the steps below:
      1. Open your Blog Template HTML editor, available thought Menu->Template -> Edit HTML.
      2. Find the string <title><data:blog.pageTitle/></title>
      3. Replace it with:
            <b:if cond='data:blog.pageType == "index"
        '>
              <title><data:blog.title/></title>
            <b:else/>
              <title><data:blog.pageName/></title>
            </b:if>
      4. Click the Save Template button. Done!
      Notice that my post title is no longer: “Yanniel's notes: A SEO advice for Blogger: Remove the blog title from the post title".

      The strikethrough part was removed!

      Hope this helps!

        Listing my blog on Technorati and TopOfBlogs

        Note from the blog owner: This article is outdated; it is kept here for historical reasons.

        Yanniel's notes is now alive in Technorati and TopOfBlogs. Both sites give authentic backlinks to your blog, as they don't implement the rel=”nofollow” attribute in the HTML <a ... tag.

        Technorati is a blog search engine and directory, which in my humble opinion is very professional and well established. In fact, I prefer to use Technorati rather than Google Blog Search to browse and search the blogosphere. The bad thing about Technorati is that it only allows blogs in English.

        TopOfBlogs is a blog directory that has gained strong popularity lately. It ranks the blogs according to several variables, which converge in a general rank value for each blog. TopOfBlogs is far from been as professional as Technorati, but it covers all languages and cultures.

        Both sites perform a manual revision of each blog you claim (submit). The purpose is to fight spam and to allow only authentic content to be listed. Of course, spammers are quite smart these days and the battle cannot be won just by the initial moderators' revision.

        There's much more about  Technorati and TopOfBlogs. I intend to talk about them in further posts.

        I just registered a new domain for my blog at Dynadot

        I decided to move away from Blogger's free hosting service and get me a custom domain. Although you can register a domain from within Blogger, I decided to use a different domain name registrar: Dynadot.

        ”Dynadot is an ICANN accredited domain name registrar ” which I have used in the past with no complaints. It has a bunch of cool features like:
        • Domain search (extended to premium domain search if desired).
        • Domain suggestion (great if you haven't decided the name of your domain yet )
        • Domain privacy (this is what you need if you intend to high your identity as owner of the domain)
        • Lots of payment methods (Credit Cards, PayPal, MoneyBookers and more...)
        I wanted a generic domain name for my blog (not a .cu, .ca, .us domain). So, my initial ideas were yanniel.net, yanniel.com, yanniel.org and yanniel.info.

        After a quick search, I decided to buy yanniel.info because it was cheaper and at the end, this blog is all about me. So, yanniel.info (standing for Yanniel's information) is pretty much what I wanted.

        One observation, the domains bought at Dynadot are cheaper than the ones you buy directly from within Blogger. Blogger charges you with $10 (USD) annually, and a I got my domain just for $5.75 (USD).

        In the picture below you can see the Dynadot domain search interface:

        Domain's search at Dynadot

        Once you have added your domains to cart, you are prompted to log-in (or register) as a Dynadot's user. This is indispensable to configure your domains later. I expect to replace my current blogspot.com sub-domain with  www.yanniel.info ASAP. I guess at that point I will write a new post to explain how to set up a Blogger 's blog using a Dynadot registered domain.