November 07 2019, 01:00

Published another research on hybrismart – integration of Contentstack and SAP Commerce Cloud (hybris). Contentstack is a headless CMS, meaning it’s a content management system where everything is open via API, both content management and its delivery to the user. Historically, content management in SAP Commerce Cloud was quite constrained for years, and although the situation has improved now, the topic of external CMS is very relevant, with Contentstack frequently appearing in various tenders and discussions.

November 06 2019, 11:14

Excellent article about feminatives. Interestingly, with the wave of promoting feminatives by feminists, why does no one raise the question about masculatives for manicurists and pedicurists, maids and cooks, launderers and fortune tellers, caregivers, typists, nannies, seamstresses, matchmakers, embroiderers, and ballerinas.

November 04 2019, 16:38

Today, I was challenged with a very cool task (below), I found a solution, will you find one? They say there are multiple solutions, but I can’t see any others besides my own.

So, there is an 8×8 board scattered with stones randomly. Each cell can contain as many stones as it fits, from zero to whatever number fits. The host thinks of a cell. He calls it to character A. Character A, let’s call him Vasya, decides to either remove or add exactly one stone to any cell of his choice or to do nothing. Then he leaves. Next, a second character comes in, let’s call him Petya, looks at the board, thinks, and names the secret cell. Of course, Petya and Vasya had pre-arranged a strategy on what Vasya needs to do so that Petya can guess the cell correctly. The question is – what is this strategy?

UPDATE: Solution:

Essentially, two functions need to be written, encode (cell, origboard), which returns newboard and decode (newboard), which returns cell. The difference between newboard and origboard is one set bit.

static long encode(long board, int cell) {

int change = getHash(board) ^ cell;

return board ^ (1L << change);

}

static int decode(long board) {

return getHash(board);

}

static private int getHash(long board) {

int hash = 0;

for (int i = 0; i < 64; i++) {

if ((board & 0x1) != 0) {

hash ^= i;

}

board >>>= 1;

}

return hash;

}

November 04 2019, 00:44

Finished watching the first season and started the second. A good series, very much in King’s style. For the first time, after binge-watching the last three episodes, I was left with an aftertaste similar to finishing a book – full of details, some of which neatly converge while others create more questions than answers. However, there are no completely inexplicable inconsistencies, although it does blow your mind at times.

The series is not an adaptation, but an original work “on a King theme with King’s involvement.” Fans will find a lot of Easter eggs, while I simply enjoyed the cinematography and the unique script.

I recommend it, good cinema. Still watching the second season, it’s a whole different ball game