knight666/blog

My view on game development

A Marketing Plan


SEO is important because search engines aren’t perfect. A slow update cycle, for example, can devalue an article on your site, this will help by increasing productivity. Search engines also sometimes miss the mark on a great idea when it comes to the backlinks. And I don’t just mean when it comes to the keywords but also the subject matter, great for customer support.

Raleigh SEO Agency | Search Engine Optimization Services | TheeDigital

The good news is SEO is still part of your marketing plan. However, you don’t want to spend too much time on it. It just takes too long and can be a bit repetitive.

The three ways that an SEO should rank better

Find keywords for your content.


Since you’re on a budget, you can probably get a lot more attention to your content if you use the right keywords. You can then pay attention to other articles that are ranking and make sure your site has all of the content you need to rank high, have a look at the best tools to run social media contests.

Find out your competitors content.


Although you’re better off spending your time working on creating your own content, your competitors are always on Google. You can find out what their articles are and how well they rank using some free tools. For example, Buzzsumo has a tool that allows you to review your competitor’s website and see if there are any missing words that could be added, be sure you learn how to manage your online reputation.

How to get started with SEO


Search engine optimization (SEO) will probably seem like a daunting task, but you don’t have to sweat it too much. For starters, let’s look at your goals for SEO. If you want to rank high in Google, you will be spending much more time on SEO than you think, just take a look at
https://start.victoriousseo.com/seo/ and get help from the real professionals.

Windows 10 Broke My Unit Test

I am the author and maintainer of utf8rewind, a low-level library written in C that aims to add support for UTF-8 encoded text. It has functions for converting to and from UTF-8, seeking in UTF-8 encoded text and case mapping UTF-8 encoded text. One of the core tenets of the library is safety. To ensure the safety of the library, I have added almost 3000 unit, integration, property and performance tests. And on Windows 10, this one was failing:

Screenshot229

These problems have been fixed with the release of utf8rewind 1.4.1, but I want to talk about what went wrong here.

Why I care about Azeri

The Azeri (or Azerbaijanis) language is spoken by a Turkic ethnic group living mainly in Iranian Azerbaijan and the independent Republic of Azerbaijan. I haven’t met any of them, but I hope they use my software! The Latin version of the language is named specifically in the Unicode Consortium’s SpecialCasing.txt, which I have blogged about before. The file specifies exceptions for specific languages when case mapping, including Turkish or Azeri text. Like Turkish, Azeri keeps the dot in the lowercase i when uppercasing (i → İ) and when lowercasing (İ → i).

Now, the way I check for whether we’re dealing with Azeri text is with the system locale. Unfortunately, there isn’t a single cross-platform solution for retrieving this information, but we can use “_get_current_locale()” on Windows and “setlocale(LC_ALL, 0)” on POSIX systems, which both return information about the locale and the current code page.

The POSIX implementation is simple, it only accepts two values if you want the Azeri (Latin) codec:

1
2
3
4
5
6
7
    EXPECT_STREQ("az_AZ", setlocale(LC_ALL, "az_AZ"));
    EXPECT_LOCALE_EQ(CASEMAPPING_LOCALE_TURKISH_OR_AZERI_LATIN, casemapping_locale());
    RESET_LOCALE();
 
    EXPECT_STREQ("az_AZ.utf8", setlocale(LC_ALL, "az_AZ.utf8"));
    EXPECT_LOCALE_EQ(CASEMAPPING_LOCALE_TURKISH_OR_AZERI_LATIN, casemapping_locale());
    RESET_LOCALE();

The Windows version accepts a lot more values:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
    EXPECT_STREQ("az", setlocale(LC_ALL, "az"));
    EXPECT_LOCALE_EQ(CASEMAPPING_LOCALE_TURKISH_OR_AZERI_LATIN, casemapping_locale());
    RESET_LOCALE();
 
    EXPECT_STREQ("az-Cyrl-AZ", setlocale(LC_ALL, "az-Cyrl-AZ"));
    EXPECT_LOCALE_EQ(CASEMAPPING_LOCALE_DEFAULT, casemapping_locale());
    RESET_LOCALE();
 
    EXPECT_STREQ("az-Latn-AZ", setlocale(LC_ALL, "az-Latn-AZ"));
    EXPECT_LOCALE_EQ(CASEMAPPING_LOCALE_TURKISH_OR_AZERI_LATIN, casemapping_locale());
    RESET_LOCALE();
 
    EXPECT_STREQ("Azeri_Azerbaijan.1254", setlocale(LC_ALL, "azeri"));
    EXPECT_LOCALE_EQ(CASEMAPPING_LOCALE_TURKISH_OR_AZERI_LATIN, casemapping_locale());
    RESET_LOCALE();
 
    EXPECT_STREQ("Azeri_Azerbaijan.1254", setlocale(LC_ALL, "Azeri_Azerbaijan.1254"));
    EXPECT_LOCALE_EQ(CASEMAPPING_LOCALE_TURKISH_OR_AZERI_LATIN, casemapping_locale());
    RESET_LOCALE();
 
    EXPECT_STREQ("Azeri_Azerbaijan.1254", setlocale(LC_ALL, "Azeri_Azerbaijan.ACP"));
    EXPECT_LOCALE_EQ(CASEMAPPING_LOCALE_TURKISH_OR_AZERI_LATIN, casemapping_locale());
    RESET_LOCALE();
 
    EXPECT_STREQ("Azeri_Azerbaijan.857", setlocale(LC_ALL, "Azeri_Azerbaijan.857"));
    EXPECT_LOCALE_EQ(CASEMAPPING_LOCALE_TURKISH_OR_AZERI_LATIN, casemapping_locale());
    RESET_LOCALE();
 
    EXPECT_STREQ("Azeri_Azerbaijan.857", setlocale(LC_ALL, "Azeri_Azerbaijan.OCP"));
    EXPECT_LOCALE_EQ(CASEMAPPING_LOCALE_TURKISH_OR_AZERI_LATIN, casemapping_locale());
    RESET_LOCALE();

These values come directly from the horse’s mouth, the strings are in the format “<Language>_<Country>.<CodePage>”, where the codepage can be an ANSI codepage (ACP) or OEM codepage (OCP). So far, so good. The problem was that the tests for this specific format were failing. Something was broken on Windows 10.

Finding the Culprit

To figure out what went wrong, we have to dive into the implementation of “setlocale”. Microsoft has been surprisingly generous in this regard, providing source that allows us to step into the function itself, up to the point where it starts calling CRT functions. It turns out the “setlocale” is actually a wrapper for “GetLocaleNameFromLangCountry”, which enumerates the installed locales using “EnumSystemLocalesEx”:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/***
*void GetLocaleNameFromLangCountry - get locale names from language and country strings
*
*Purpose:
*   Match the best locale names to the language and country string given.
*   After global variables are initialized, the LangCountryEnumProcEx
*   routine is registered as an EnumSystemLocalesEx callback to actually
*   perform the matching as the locale names are enumerated.
*
*Entry:
*   pchLanguage     - language string
*   bAbbrevLanguage - language string is a three-letter abbreviation
*   pchCountry      - country string
*   bAbbrevCountry  - country string ia a three-letter abbreviation
*   iPrimaryLen     - length of language string with primary name
*
*Exit:
*   localeName - locale name of given language and country
*
*Exceptions:
*
*******************************************************************************/
static void GetLocaleNameFromLangCountry (_psetloc_struct _psetloc_data)
{
    //  initialize static variables for callback use
    _psetloc_data->bAbbrevLanguage = wcslen(_psetloc_data->pchLanguage) == 3;
    _psetloc_data->bAbbrevCountry = wcslen(_psetloc_data->pchCountry) == 3;
 
    _psetloc_data->iPrimaryLen = _psetloc_data->bAbbrevLanguage ?
                             2 : GetPrimaryLen(_psetloc_data->pchLanguage);
 
    // Enumerate all locales that come with the operating system,
    // including replacement locales, but excluding alternate sorts.
    __crtEnumSystemLocalesEx(LangCountryEnumProcEx, LOCALE_WINDOWS | LOCALE_SUPPLEMENTAL, (LPARAM) NULL);
 
    //  locale value is invalid if the language was not installed or the language
    //  was not available for the country specified
    if (!(_psetloc_data->iLocState & __LOC_LANGUAGE) ||
        !(_psetloc_data->iLocState & __LOC_EXISTS) ||
        !(_psetloc_data->iLocState & (__LOC_FULL |
                                    __LOC_PRIMARY |
                                    __LOC_DEFAULT)))
        _psetloc_data->iLocState = 0;
}

Stepping over the callback, I found out what went wrong: Microsoft changed the locale name from “Azeri” to “Azerbaijani”.

Regardless of whether that was the right call to make on a cultural level, this breaks my code. Windows 10 does not transform “Azeri_Azerbaijan.1254” into “Azerbaijani_Azerbaijan.1254” when you call setlocale, the function will simply return NULL.

The Reality of an Imperfect World

Okay, fine, this isn’t the first platform-specific bug I have to work around and it definitely isn’t the last. The bug won’t affect users, because they should be using the string “az-Latn-AZ” anyway. But it does break a unit test, so let’s detect whether we’re running Windows 10 and use different strings on that platform.

The standard way of checking what Windows version you’re running is by calling GetVersionEx and checking the “dwMajorVersion” and “dwMinorVersion” members of the resulting struct. Unfortunately, this method has been deprecated, with good reason. The short of it is that well-intentioned, but naive, developers wrote code like this:

1
2
3
4
if (verMajor >= 5 && verMinor >= 1) {
    // oh, hello, you must be Windows XP or later
    // (clearly I didn’t test this code on Windows 6.0)
}

What happens when the major version is bumped to 10? This code will disable certain features of the application, because it thinks the Windows version is too old. As a result of this improper use of the API, GetVersionEx is now forever doomed to return “Windows 8.1”. Which puts me into a bit of a pickle, because I specifically want to test for Windows 10.

Luckily, there’s an alternative! There’s a “VersionsHelpers.h”, which provides this wonderful function:

1
2
3
4
5
VERSIONHELPERAPI
IsWindows10OrGreater()
{
    return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINTHRESHOLD), LOBYTE(_WIN32_WINNT_WINTHRESHOLD), 0);
}

It worked on my development machine, but it wouldn’t compile on my laptop. The function is part of the Windows SDK, which is not a dependency I want to include for a low-level system library. So I rolled my own:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
    bool CheckWindowsVersion(DWORD versionIdentifier)
    {
        DWORDLONG conditionMask = 
            ::VerSetConditionMask(
                ::VerSetConditionMask(
                    0, VER_MAJORVERSION, VER_GREATER_EQUAL),
                VER_MINORVERSION, VER_GREATER_EQUAL);
 
        ::OSVERSIONINFOEXW osvi = { 0 };
        osvi.dwOSVersionInfoSize = sizeof(osvi);
        osvi.dwMajorVersion = HIBYTE(versionIdentifier);
        osvi.dwMinorVersion = LOBYTE(versionIdentifier);
 
        return ::VerifyVersionInfoW(&osvi, VER_MAJORVERSION | VER_MINORVERSION, conditionMask) != FALSE;
    }

And it didn’t work.

Down the Rabbit Hole

When you call this function with “_WIN32_WINNT_WIN10”, it returns false, but calling it with “_WIN32_WINNT_WINBLUE” returns true. It looks like “VerifyVersionInfo” function has the same problem as “GetVersionEx”: it claims Windows 10 is actually Windows 8.1. What is going on here? Luckily, there’s a handy articled on MSDN titled “Targeting your application for Windows”, which helps explain the steps you need to take in order for VerifyVersionInfo to return the actual version of Windows.

All you have to do is create a manifest file which adds compatibility info for your executable, which is basically a form you have to sign that states “I hereby acknowledge the existence of Windows versions beyond 8.1.”

Then you have to add that manifest file to your linker settings and you’re good to go!

This is a pretty mind-boggling solution on several levels:

  • Deprecating GetVersionEx is fine and probably the right choice. But why then cripple the new function with the same problems of the old version?
  • Why is this in the manifest file? Couldn’t this be a checkbox in Visual Studio?
  • Better yet, why this isn’t this behavior a flag of the hypothetical “GetRealVersionEx” function?
  • How am I ever going to explain this to my users? Link to this blogpost?

Summary

Windows 10 broke my code, deprecated the ability to check for Windows versions, crippled the new way to check for versions and added several unnecessary hoops for me to jump to in order to work around its broken behavior.

I hope y’all are proud of yourselves.

The Curious Case of the Greek Final Sigma

For utf8rewind 1.2.0, one of my goals was to add Unicode case mapping to the library. For the most part I’ve succeeded; it’s now possible to convert any kind of UTF-8 encoded text to upper-, lower- and titlecase using functions in the library. But there were a couple of exceptions to the case mapping algorithm that I glossed over.

Implementing case mapping

When you’re looking to implement Unicode-compliant case mapping, the first resources you should grab are the ones from the Unicode Consortium itself. These are freely available from their FTP server. The most important resource is UnicodeData.txt, which is the database for every code point encoded by this version of the Unicode standard. The database is a pure ASCII-encoded text file where every line is a record and each record is split into fields with the ‘;’ character (U+003B SEMICOLON, to be exact). A record in the database looks like this:

1
0051;LATIN CAPITAL LETTER Q;Lu;0;L;;;;;N;;;;0071;

Each record has fifteen fields, but for case mapping we’re only interested in a couple of them:

  • The first field, which denotes the code point’s value (in this case U+0051).
  • The second field, which is the official name for the code point (LATIN CAPITAL LETTER Q)
  • The thirteenth field, which is the uppercase mapping (because it’s empty, the value is the same as the code point, so U+0051)
  • The fourteenth field, which is the lowercase mapping (U+0071 LATIN SMALL LETTER Q)
  • The fifteenth field, which is the titlecase mapping (U+0051 again)

Because Unicode is backwards-compatible with ASCII, the first 127 code points are exactly the same in both standards. This is how Unicode can get away with describing the first 127 characters of its standard, which it needs to describe to standard itself!

Case mapping has not posed much of a problem so far. Each code point may or may not have case mapping and the converted code point is always the same length as the source code point. Or is it?

The Eszett problem

When we go beyond Basic Latin and venture into the land of Latin-1, we encounter this peculiar fellow:

1
00DF;LATIN SMALL LETTER SHARP S;Ll;0;L;;;;;N;;;;;

You might think that this means that LATIN SMALL LETTER SHARP S does not have an uppercase version, but you’d be mistaken. You would end up disappointing a lot of German, Austrian, Danish and even Belgian users!

One of the limitations of the Unicode database is that it must be backwards-compatible with itself. An older versions of Unicode specified that this code point must be converted to U+1E9E LATIN CAPITAL LETTER SHARP when uppercasing. This was to ensure that each code point would only be converted to a single other code point when doing case conversion. Unfortunately, this is wrong according to German grammar rules. They state that the uppercase version of Eszett, as they call it, should be written as SS when uppercased. In effect, there is no uppercase version of the Eszett character, but Unicode did provide one! This discrepancy was corrected in a newer version of Unicode, but it meant the addition of a special text file, called SpecialCasing.txt.

Here, we find an updated record for the LATIN SMALL LETTER SHARP S code point:

1
2
3
4
# The German es-zed is special--the normal mapping is to SS.
# Note: the titlecase should never occur in practice. It is equal to titlecase(uppercase())
 
00DF; 00DF; 0053 0073; 0053 0053; # LATIN SMALL LETTER SHARP S

Combining this data with the record in the Unicode database gives us the complete story:

  • The value for the code point is U+00DF
  • Its official name is LATIN SMALL LETTER SHARP S
  • The lowercase mapping is U+00DF
  • The titlecase mapping is U+0053 U+0073 (Ss)
  • The uppercase mapping is U+0053 U+0053 (SS)

Good, we got that sorted. Most code points map to a single code point, but some don’t. These exceptions can be found in SpecialCasing.txt.

However, when we scroll down, we get to a section ominously titled “Conditional Mappings”.

Conditional mappings

While the code points specified by the Unicode standard are language- and locale-independent, some of their behavior, unfortunately, isn’t. This is where the conditional mappings come in. When I implemented case mapping for utf8rewind 1.2.0, I glossed over this section entirely. The language used was a bit too vague for my tastes and I would rather ship imperfect case mapping now than perfect case mapping later. There wasn’t an immediate backlash, but I did receive a pull request to fix my Turkish uppercase strings. This made me decide to take a closer look at these conditional mappings. Luckily, by now I had received my copy of Unicode Demystified, which explains the case mapping algorithm in greater detail.

The Sigma Exception

Which brings us to GREEK CAPITAL LETTER SIGMA. Here’s what the book has to say about this code point:

Here’s a classic example of the use of the special conditions:

1
2
03A3; 03C2; 03A3; 03A3; Final_Sigma; # GREEK CAPITAL LETTER SIGMA
# 03A3; 03C3; 03A3; 03A3; # GREEK CAPITAL LETTER SIGMA

These two entries are for the Greek capital letter sigma (Σ, U+03A3). This letter has two lowercase forms: one (ς, U+03C3) that appears only at the ends of words and another (σ, U+03C3) that appears at the beginning or in the middle of a word. The FINAL_SIGMA at the end of the first entry indicates that this mapping applies only at the end of a word (and when the letter isn’t the only letter in the word). The second entry, which maps to the initial/medial form of the lowercase sigma, is commented out (begins with a #) because this mapping is in the UnicodeData.txt file.

(Source: Richard Gillam, “Character Properties and the Unicode Character Database” in “Unicode Demystified: A Practical Programmer’s Guide to the Encoding Standard”, pp. 169.)

Now the mapping makes sense! Although the exception is relatively easy to program against, it is independent of the language used for the text. This means that if a text is in Dutch (and the system locale is set to Dutch), but it includes a capital letter sigma at the end of a word, it should still be lowercased to ς instead of σ! So now my lowercase implementation looks like this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
    while (state.src_size > 0)
    {
        size_t converted;
 
        if (!casemapping_readcodepoint(&state))
        {
            UTF8_SET_ERROR(INVALID_DATA);
 
            return bytes_written;
        }
 
        if (state.last_code_point == 0x03A3)
        {
            uint8_t should_convert;
 
            state.last_code_point_size = codepoint_read(
                state.src,
                state.src_size,
                &state.last_code_point);
 
            should_convert = state.last_code_point_size == 0;
 
            if (!should_convert)
            {
                state.last_general_category = database_queryproperty(
                    state.last_code_point,
                    UnicodeProperty_GeneralCategory);
 
                should_convert =
                    (state.last_general_category & GeneralCategory_Letter) == 0;
            }
 
            converted = codepoint_write(
                should_convert ? 0x03C2 : 0x03C3,
                &state.dst,
                &state.dst_size);
        }
        else
        {
            converted = casemapping_execute2(&state);
        }
        
        if (!converted)
        {
            UTF8_SET_ERROR(NOT_ENOUGH_SPACE);
 
            return bytes_written;
        }
 
        bytes_written += converted;
    }

And branch prediction algorithms in processors everywhere wept.

These changes are currently part of the local-independent-case-mapping branch of utf8rewind and won’t appear in a stable release until utf8rewind 1.3.0, the next minor version.

Day trading

Day trading is a fast-paced and exciting trading style that requires constant focus and lightning-fast reflexes . You place your trades just minutes after analyzing charts and underlying data. Latency is an important factor in the trading of stocks. Essentially, lower latency means that you trade faster, you can react quicker, and you will be able to place trades at opportune times, this is what people usually do with fx trade.
Currently, using cloud mining services (which mine cryptocurrency such as Bitcoin) to mine cryptocurrency can be a very expensive endeavor . Coin mining rigs need to be upgraded with faster technology to mine Bitcoin more efficiently , and as the currency becomes more difficult to mine, the costs to continue on will rapidly rise.


Even with these advantages, not everyone will want to mine their cryptocurrency and sell it. Others may not have the time or patience to start mining Bitcoin right away, or they may just lack the equipment, knowledge, and time to complete a large bitcoin mining project.
The short answer is that it depends . It depends on how much time you have to devote to daily bitcoin mining. How much effort you want to put into your equipment. Your personal priorities. The kind of experience you want to gain. And, Bitcoin’s price on any given day. Bitcoin mining requires time, commitment, and expense. The more Bitcoin you mine, the better chance you have of earning big profits . If you are able to start mining Bitcoin right away, you’ll also have the best chance to earn big profits sooner.


The first thing you need to do when day trading Bitcoin is pick an account type . After opening an account, you’ll then be able to decide which coin (also known as a cryptocurrency ) you want to trade. An account can help you start trading right away, or you can choose to purchase an account that already has Bitcoin coins. .


Cryptocurrency day trading is about making huge profits through buying and selling Bitcoin, Ethereum, Litecoin, Dogecoin, and more popular coins on exchanges. The exchange’s price may change multiple times an hour , and with each trade , you’ll make or lose money.
The advantages in trading Bitcoin are multiple . For one thing, Bitcoin is being traded on multiple platforms around the world, meaning that you’ll have more options to trade with . You’ll also have more data to study, which means more options to make profitable trades.


Initially, most people start trading Bitcoin by buying the cryptocurrency . They then sell it to make profits. Bitcoin exchanges are also more accessible than other cryptocurrencies.
To start, you can sign up on any of the following websites to start trading Bitcoin.
Then, you’ll need a trading account . With your account, you’ll

Data Protection

Compared to data protection that centers on information stored within a system, cybersecurity has a stronger focus on protecting a system itself. We have to prioritize and ensure that networks are secure against threats from both outside and inside the company/residence, and internally as well, we suggest visiting websites like Fortinet to start protecting your network. You can learn more about it here.
Insecurity may not be such a bad thing for the organization if it helps them grow and gain new revenue.

Creation of NHS data hubs raises the cyber security stakes


As the value of data continues to grow and the cost of services and the cost of attacking attackers increases, the cyber security side of the equation is going to be the leading way to differentiate companies over the next several years. As companies continue to adopt networked data centers and applications with many moving parts, it is inevitable that an increasing number of companies will suffer from data breaches. Amazon direct connect allows access to cloud for large businesses and a great aid from cyber security! That’s why it is really a necessity for companies to look for disaster recovery services to help them manage their data.


At HSN, we’re proud to be a leading provider of amazing services with an industry-leading offering in software, security, and training solutions that keep your organization safe and secure.
Stay tuned as this article continues to update as new information comes in.
Editor’s Note: This article was updated in mid-November to reflect the revisions to the EHR Billing Guidelines released by the Department of Health and Human Services (HHS) Office for Civil Rights on 8/20/15.

seo resell