Hreflang tags working for some pages but not other

Hi

We have our site set up with multiple country subdirectories. We have hreflang tags on all of the sites. It is mostly working OK but in some regions, the UK or .com pages are displaying instead of the local Canada/Ireland versions. We know it is all set up correctly as it's working for 80% of the pages. Our website agency has also confirmed it is all correctly set up.

Does anyone know why the wrong pages might be displaying for some of our keywords? It is only happening for a few…

Hreflang tags working for some pages but not other

Problem with mp3 tags using youtube-dl and id3v2

In short: I ran:

sudo apt install youtube-dl ffmpeg id3v2 -y echo "youtube-dl version:" youtube-dl --version echo "id3v2 version:" id3v2 --version youtube-dl --extract-audio --audio-format mp3 "https://youtu.be/Sqk3B2041uk" --output test.mp3 id3v2 -t "cooltitle" -a "coolartist" test.mp3 

The output was normal:

*normal output of apt install* youtube-dl version: 2019.01.17 id3v2 version: id3v2 0.1.12 Uses id3lib-3.8.3  This program adds/modifies/removes/views id3v2 tags,  and can convert from id3v1 tags [youtube] Sqk3B2041uk: Downloading webpage [youtube] Sqk3B2041uk: Downloading video info webpage [download] test.mp3 has already been downloaded [download] 100% of 2.07MiB [ffmpeg] Post-process file test.mp3 exists, skipping 

In theory this script should download a mp3-file and set it’s title to “cooltitle” and its artist to “coolartist”. But when I opened the file test.mp3 using rythmbox it does not show the correct title and artist.

Does anyone know why this does not work or how to fix it?

Como limitar a inserção de tags com React Select

Estou utilizando o React Select para trabalhar com input tags. Ao inserir algo no input e pressionar enter, a tag é inserida… O ponto é que não consegui achar nada referente a limitações de tags na documentação ou internet. Gostaria de limitar em no máximo umas 10 tags. Tentei usar o YUP para sanar esse problema, mas sem sucesso. Estou usando o Creatable do React Select (https://react-select.com/creatable). Se houvesse algo na documentação pré pronta seria muito melhor. Uma ideia que estava em minha mente, era verificar as tags que tem no estado da aplicação, e então fazer uma condição para saber se há 10 tags ou não. Sugestões sobre essa possível solução são muito úteis.

Trecho de código que estou utilizando:

<CreatableSelect     styles={customStyles}     inputValue={inputValue}     components={components}     isClearable     isMulti     menuIsOpen={false}     onChange={this.handleChange}     onInputChange={this.handleInputChange}     onKeyDown={this.handleKeyDown}     placeholder="Aperte enter para inserir a tag"     value={value} /> 

Security in NFC tags

I’m new to the world of NFC. Nowadays, what is the most secure NFC tag against:

  • Cloning
  • Interception Attacks
  • Data Corruption and Manipulation

I read that MIFARE NFC is not secure because of its vulnerabilities.

More about my project:

I have an Android application that will use a NFC tag like a user id and it needs to be secure as possible.

Find and insert tags using regex

I am converting a book from PDF to epub in calibre. But the titles are not inside header tags, hence trying a python function using regex to replace it.

example text:

<p class="calibre1"><a id="p1"></a>Chapter 370: Slamming straight on</p> <p class="softbreak"> </p> <p class="calibre1">Hearing Yan Zhaoge’s suggestion, the Jade Sea City martial practitioners here were all stunned.</p> <p class="calibre1"><a id="p7"></a>Chapter 372: Yan Zhaoge’s plan</p> <p class="softbreak"> </p> <p class="calibre1">Yan Zhaoge and Ah Hu sat on Pan-Pan’s back, black water swirling about Pan-Pan’s entire body, keeping away the seawater as he shot forward at lightning speed.</p> 

i tried using regex with

def replace(match, number, file_name, metadata, dictionaries, data, functions, *args, **kwargs):      pattern = r"</a>(?i)chapter [0-9]+: [\w\s]+(.*)<br>"     list = re.findall(pattern, match.group())      for x in list:         x = "</a>(?i)chapter [0-9]+: [\w\s]+(.?)<br>"         x = s.split("</a>", 1)[0] + '</a><h2>' + s.split("a>",1)[1]         x = s.split("<br>", 1)[0] + '</h2><br>' + s.split("<br>",1)[1]     return match.group() 

and

 def replace(match, number, file_name, metadata, dictionaries, data, functions, *args, **kwargs):     pattern = r"</a>(?i)chapter [0-9]+: [\w\s]+(.*)<br>"     s.replace(re.match(pattern, s), r'<h2>$  0') 

But still not getting expected result. what i want is…

Input

</a>Chapter 370: Slamming straight on</p>

Output

</a><h2>Chapter 370: Slamming straight on</h2></p>

h2 tag is to be added in all similar instances

Strip HTML tags from Field Collections in Services Views

I’m trying to strip the HTML tags from a JSON response I generated using Services Views, but I’m not having any luck so far. I have a content type with a Field Collections field in it that is outputting HTML tags no matter what I do. I’ve tried the following:

  • Check Strip HTML tags in the field settings in the view
  • Set customize field HTML to ‘None’
  • Set Customize field and label wrapper HTML to ‘None’
  • All combinations of the above
  • Making sure to turn of all ‘Provide default field wrapper elements’ options

Am I missing anything? My output still looks like this in my json:

"Animals": [             "<div class=\"entity entity-field-collection-item field-collection-item-field-product-animals clearfix\">\n  <div class=\"content\">\n    <div class=\"field field-name-field-product-animal field-type-taxonomy-term-reference field-label-above\"><div class=\"field-label\">Animal:&nbsp;</div><div class=\"field-items\"><div class=\"field-item even\">Big</div></div></div><div class=\"field field-name-field-product-withdrawal-time field-type-text field-label-above\"><div class=\"field-label\">Withdrawal time:&nbsp;</div><div class=\"field-items\"><div class=\"field-item even\">25 dg</div></div></div>  </div>\n</div>\n",             "<div class=\"entity entity-field-collection-item field-collection-item-field-product-animals clearfix\">\n  <div class=\"content\">\n    <div class=\"field field-name-field-product-animal field-type-taxonomy-term-reference field-label-above\"><div class=\"field-label\">Animal:&nbsp;</div><div class=\"field-items\"><div class=\"field-item even\">Rund vlees</div></div></div><div class=\"field field-name-field-product-withdrawal-time field-type-text field-label-above\"><div class=\"field-label\">Withdrawal time:&nbsp;</div><div class=\"field-items\"><div class=\"field-item even\">21 dg</div></div></div>  </div>\n</div>\n",             "<div class=\"entity entity-field-collection-item field-collection-item-field-product-animals clearfix\">\n  <div class=\"content\">\n    <div class=\"field field-name-field-product-animal field-type-taxonomy-term-reference field-label-above\"><div class=\"field-label\">Animal:&nbsp;</div><div class=\"field-items\"><div class=\"field-item even\">Pluimvee ei</div></div></div><div class=\"field field-name-field-product-withdrawal-time field-type-text field-label-above\"><div class=\"field-label\">Withdrawal time:&nbsp;</div><div class=\"field-items\"><div class=\"field-item even\">6 dg</div></div></div>  </div>\n</div>\n" 

Any help on this is greatly appreciated.

Use tags or branches for CI release builds? Or both?

Currently we use a branch “stable” from which our CI takes (by default) the last commit when building a new release.

However I also keep seeing people suggest using tags for this, and just use “master” branch instead. – Currently “master” is used for nightly builds and other in house use.

The advantage of using branches is that (to me) it was easy to split stable and nightly: every once in a while master is merged into the stable branch.

However someone else rightly stated that using tags allows for better control, and easier to go “back” to an always working version. While keeping the git repository in a clear linear state.

So now I’m wondering: should we just use a single “master” for releases, and just use tags (with special names) to denote “stable”? Or use branches? – Or even both?

Do HTML5 browsers have to be able to properly process HTML4 tags when the tags appear in HTML5 pages?

According to the post here, the HTML5 specification requires HTML5 browsers to be able to properly process HTML4 tags when they are in HTML5 pages.

Unfortunately, the post doesn’t very well substantiate this claim. Can someone answer this StackExchange question, and if the answer is ‘yes’, can they also please substantiate their claim with reference to specific sections of the HTML5 specification in a precise way?