version control – IBM clearcase – Undo checkouts on main branch & for only our own files

I have to undo checkout the files in main branch which failed to merge from task branch, Let consider from TaskBranch I am trying to merge a file to main branch and unfortunately I got a merge error, but for few files merge done successfully, To perform merge operation again from scratch I need to revert back the updated changes, so that I can get list of checkedout files from main branch ,and I have to validate it is the file belongs to me? ( To avoid the change of someone else file) I can do uncheckout of my own, how we can do that? << My idea is I can take a list of files from main branch and also I can take list of files in task branch I can write a script to compare both >> Expecting for a simple idea I mean better than mine.. And any forums or group links welcomed related to IBM rational clearcase. Thanks In Advance

backup – How do you handle “undo” in databases in general, and PostgreSQL specifically?

I have a complex PostgreSQL-based system which I made myself from the ground up. It contains tons of invaluable (to me) data which I don’t want to lose or get corrupted.

I’m always paranoid about potential bugs which may, for example, UPDATE every single record in a table instead of a specific one, or other things like that. Any mistake which I would notice shortly after making it, basically. (Not to mention the ones I wouldn’t notice until much later… but that’s a different question.)

Luckily, that has not yet really happened, but that’s the keyword: luckily. It seems like it could happen at any time, by making a small mistake, just once.

If it did happen, I would first panic. Then I’d shut down the system ASAP so it’s no longer “live” and messing with the PostgreSQL database, while I think through what to do next. Next, I’d probably try to restore a recent backup. I do keep those. But, inevitably, I would lose at least about a day’s updates to the database. And it would be very scary and tedious to restore the database, something which I want to do as infrequently as possible.

I’ve spent countless hours of my life trying to achieve a more “robust” backup mechanism, where it continuously makes small updates to it, but every time I try to achieve that, I’m overwhelmed and confused by the documentation and online guides to the point where I shamefully go back to my “full dump about once a day” method which I at least am familiar with and which works.

Frequently, I wish there were some way to have an “undo” button which could actually restore the database to how it was just a minute ago, after I make a mistake. Perhaps even on a per-table basis, if that makes logical sense.

You’re gonna say something about “transactions”, but, well… I don’t see how you can notice the error before the change has been “committed”. Therein lays the main issue. And PostgreSQL (the only database I use and know anything about) doesn’t appear to have a built-in “undo” feature or the ability to revert back to a recent state without fiddling with backups.

Is there something important which I’ve missed?

Browser Undo Breaks With Custom Event Handler

Vanilla Javascript…

Hopefully pretty easy. I have a Text Area that I use a custom Event Handler in to modify the pasted content.

function doPasteThang(e){
e.preventDefault();
SEMrush

//… some code here

myTextArea.value = modifedString;
}

So that all works. However, once something has been pasted, I can no longer use a Browsers CTRL + Z to Undo the last thing entered. I am missing something, and not really sure what I am missing. Like a mutation? new CustomEvent?

Can anyone suggest what I am missing?

 

keyboard – Changing system shortcuts like Undo without side effects

On german keyboards the system shortcut for Undo is the same as on an english keyboard: command + z.

The problem: On a german keyboard layout the z key is switched with the y and as such very inconvenient to reach with left hand only. (On english keyboard it would be the same as pressing command + y)

Using System Preferences > Keyboard > Shortcuts and adding a custom App Shortcut does not seem to work as command + y collides with other application shortcuts (e.g. Redo in Sublime).

So what are my options to remap the undo shortcut system-wide so that pressing command + y triggers it, without side effects?

Preferably I would not like to use third party solutions.

parse – Gutenberg Block manipulation: Undo parse_blocks() with serialize_blocks() results in unicode issues

I would like to manipulate Gutenberg Blocks with PHP.
Therefore I need to parse post_content into an array and the same way back after manipulation. But I don’t get that far, because already the parsing back and forth doesn’t work.

function change_post_data_before_save( $data, $postarr ) {
    $post_data = $data('post_content'); //post_content seems to be json encoded 
    //stripping slashes otherwise $blocks(0)('attrs') would be NULL
    $post_data = str_replace('\"', '"', $post_data);
    //trying to replace double slash in unicodes but it seems not to work
    $post_data = str_replace('\u', 'u', $post_data);
    $blocks = parse_blocks($post_data); //there are still some issues with schema and other array parts

    //manipulation of $blocks if needed

    $post_content = serialize_blocks( $blocks ); //seems to work correct
    $data('post_content') = $post_content;

    return $data;
}
add_filter( 'wp_insert_post_data', 'change_post_data_before_save', 10, 2 );

Any ideas how to json decode $data(‘post_data’) without destroying parts in $blocks(0)(‘attrs’) which need to be json encoded? I tried replacement but it seems not to work for unicodes and serialize_blocks() destroyes it in the end.

Example Code:

//expected result - saved in database without wp_insert_post_data (see above)
<!-- wp:uagb/faq {"block_id":"f1ad85bc","enableSchemaSupport":true,"schema":"{u0022@contextu0022:u0022https://schema.orgu0022,u0022@typeu0022:u0022FAQPageu0022,u0022@idu0022:u0022http://localhost/specials/gutenberg/u0022,u0022mainEntityu0022:({u0022@typeu0022:u0022Questionu0022,u0022nameu0022:u0022Headline with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)u0022,u0022acceptedAnsweru0022:{u0022@typeu0022:u0022Answeru0022,u0022textu0022:u0022This is a test with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)u0022}})}"} -->
<div class="wp-block-uagb-faq uagb-faq__outer-wrap uagb-block-f1ad85bc uagb-faq-icon-row uagb-faq-layout-accordion uagb-faq-expand-first-false uagb-faq-inactive-other-true uagb-faq-equal-height" data-faqtoggle="true" role="tablist"><script type="application/ld+json">{"@context":"https://schema.org","@type":"FAQPage","@id":"http://localhost/specials/gutenberg/","mainEntity":({"@type":"Question","name":"Headline with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)","acceptedAnswer":{"@type":"Answer","text":"This is a test with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)"}})}</script><div class="uagb-faq__wrap uagb-buttons-layout-wrap"><!-- wp:uagb/faq-child {"block_id":"61cac9b0","question":"Headline with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)","answer":"This is a test with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)"} -->
<div class="wp-block-uagb-faq-child uagb-faq-child__outer-wrap uagb-block-61cac9b0"><div class="uagb-faq-child__wrapper"><div class="uagb-faq-item" role="tab" tabindex="0"><div class="uagb-faq-questions-button uagb-faq-questions"><span class="uagb-icon uagb-faq-icon-wrap"><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 448 512"><path d="M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"></path></svg></span><span class="uagb-icon-active uagb-faq-icon-wrap"><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 448 512"><path d="M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"></path></svg></span><span class="uagb-question">Headline with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)</span></div><div class="uagb-faq-content"><span><p>This is a test with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)</p></span></div></div></div></div>
<!-- /wp:uagb/faq-child --></div></div>
<!-- /wp:uagb/faq -->

<!-- wp:kadence/iconlist {"items":({"icon":"fe_alertCircle","link":"","target":"_self","size":20,"width":2,"text":"This is a test with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)","color":"","background":"","border":"","borderRadius":0,"padding":5,"borderWidth":1,"style":"default"}),"uniqueID":"_a79c18-e7"} -->
<div class="wp-block-kadence-iconlist kt-svg-icon-list-items kt-svg-icon-list-items_a79c18-e7 kt-svg-icon-list-columns-1 alignnone"><ul class="kt-svg-icon-list"><li class="kt-svg-icon-list-style-default kt-svg-icon-list-item-wrap kt-svg-icon-list-item-0"><div style="display:inline-flex;justify-content:center;align-items:center" class="kt-svg-icon-list-single kt-svg-icon-list-single-fe_alertCircle"><svg style="display:inline-block;vertical-align:middle" viewbox="0 0 24 24" height="20" width="20" fill="none" stroke="currentColor" xmlns="http://www.w3.org/2000/svg" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line></svg></div><span class="kt-svg-icon-list-text">This is a test with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)</span></li></ul></div>
<!-- /wp:kadence/iconlist -->

Debugging:

//result of $data('post_content')
<!-- wp:uagb/faq {\"block_id\":\"f1ad85bc\",\"enableSchemaSupport\":true,\"schema\":\"{\\u0022@context\\u0022:\\u0022https://schema.org\\u0022,\\u0022@type\\u0022:\\u0022FAQPage\\u0022,\\u0022@id\\u0022:\\u0022http://localhost/specials/gutenberg/\\u0022,\\u0022mainEntity\\u0022:({\\u0022@type\\u0022:\\u0022Question\\u0022,\\u0022name\\u0022:\\u0022Headline with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)\\u0022,\\u0022acceptedAnswer\\u0022:{\\u0022@type\\u0022:\\u0022Answer\\u0022,\\u0022text\\u0022:\\u0022This is a test with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)\\u0022}})}\"} -->
<div class=\"wp-block-uagb-faq uagb-faq__outer-wrap uagb-block-f1ad85bc uagb-faq-icon-row uagb-faq-layout-accordion uagb-faq-expand-first-false uagb-faq-inactive-other-true uagb-faq-equal-height\" data-faqtoggle=\"true\" role=\"tablist\"><script type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"FAQPage\",\"@id\":\"http://localhost/specials/gutenberg/\",\"mainEntity\":({\"@type\":\"Question\",\"name\":\"Headline with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)\",\"acceptedAnswer\":{\"@type\":\"Answer\",\"text\":\"This is a test with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)\"}})}</script><div class=\"uagb-faq__wrap uagb-buttons-layout-wrap\"><!-- wp:uagb/faq-child {\"block_id\":\"61cac9b0\",\"question\":\"Headline with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)\",\"answer\":\"This is a test with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)\"} -->
<div class=\"wp-block-uagb-faq-child uagb-faq-child__outer-wrap uagb-block-61cac9b0\"><div class=\"uagb-faq-child__wrapper\"><div class=\"uagb-faq-item\" role=\"tab\" tabindex=\"0\"><div class=\"uagb-faq-questions-button uagb-faq-questions\"><span class=\"uagb-icon uagb-faq-icon-wrap\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewbox=\"0 0 448 512\"><path d=\"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z\"></path></svg></span><span class=\"uagb-icon-active uagb-faq-icon-wrap\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewbox=\"0 0 448 512\"><path d=\"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z\"></path></svg></span><span class=\"uagb-question\">Headline with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)</span></div><div class=\"uagb-faq-content\"><span><p>This is a test with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)</p></span></div></div></div></div>
<!-- /wp:uagb/faq-child --></div></div>
<!-- /wp:uagb/faq -->

<!-- wp:kadence/iconlist {\"items\":({\"icon\":\"fe_alertCircle\",\"link\":\"\",\"target\":\"_self\",\"size\":20,\"width\":2,\"text\":\"This is a test with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)\",\"color\":\"\",\"background\":\"\",\"border\":\"\",\"borderRadius\":0,\"padding\":5,\"borderWidth\":1,\"style\":\"default\"}),\"uniqueID\":\"_a79c18-e7\"} -->
<div class=\"wp-block-kadence-iconlist kt-svg-icon-list-items kt-svg-icon-list-items_a79c18-e7 kt-svg-icon-list-columns-1 alignnone\"><ul class=\"kt-svg-icon-list\"><li class=\"kt-svg-icon-list-style-default kt-svg-icon-list-item-wrap kt-svg-icon-list-item-0\"><div style=\"display:inline-flex;justify-content:center;align-items:center\" class=\"kt-svg-icon-list-single kt-svg-icon-list-single-fe_alertCircle\"><svg style=\"display:inline-block;vertical-align:middle\" viewbox=\"0 0 24 24\" height=\"20\" width=\"20\" fill=\"none\" stroke=\"currentColor\" xmlns=\"http://www.w3.org/2000/svg\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"></circle><line x1=\"12\" y1=\"8\" x2=\"12\" y2=\"12\"></line><line x1=\"12\" y1=\"16\" x2=\"12\" y2=\"16\"></line></svg></div><span class=\"kt-svg-icon-list-text\">This is a test with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)</span></li></ul></div>
<!-- /wp:kadence/iconlist -->
//result of $post_data
<!-- wp:uagb/faq {"block_id":"f1ad85bc","enableSchemaSupport":true,"schema":"{\u0022@context\u0022:\u0022https://schema.org\u0022,\u0022@type\u0022:\u0022FAQPage\u0022,\u0022@id\u0022:\u0022http://localhost/specials/gutenberg/\u0022,\u0022mainEntity\u0022:({\u0022@type\u0022:\u0022Question\u0022,\u0022name\u0022:\u0022Headline with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)\u0022,\u0022acceptedAnswer\u0022:{\u0022@type\u0022:\u0022Answer\u0022,\u0022text\u0022:\u0022This is a test with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)\u0022}})}"} -->
<div class="wp-block-uagb-faq uagb-faq__outer-wrap uagb-block-f1ad85bc uagb-faq-icon-row uagb-faq-layout-accordion uagb-faq-expand-first-false uagb-faq-inactive-other-true uagb-faq-equal-height" data-faqtoggle="true" role="tablist"><script type="application/ld+json">{"@context":"https://schema.org","@type":"FAQPage","@id":"http://localhost/specials/gutenberg/","mainEntity":({"@type":"Question","name":"Headline with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)","acceptedAnswer":{"@type":"Answer","text":"This is a test with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)"}})}</script><div class="uagb-faq__wrap uagb-buttons-layout-wrap"><!-- wp:uagb/faq-child {"block_id":"61cac9b0","question":"Headline with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)","answer":"This is a test with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)"} -->
<div class="wp-block-uagb-faq-child uagb-faq-child__outer-wrap uagb-block-61cac9b0"><div class="uagb-faq-child__wrapper"><div class="uagb-faq-item" role="tab" tabindex="0"><div class="uagb-faq-questions-button uagb-faq-questions"><span class="uagb-icon uagb-faq-icon-wrap"><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 448 512"><path d="M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"></path></svg></span><span class="uagb-icon-active uagb-faq-icon-wrap"><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 448 512"><path d="M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"></path></svg></span><span class="uagb-question">Headline with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)</span></div><div class="uagb-faq-content"><span><p>This is a test with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)</p></span></div></div></div></div>
<!-- /wp:uagb/faq-child --></div></div>
<!-- /wp:uagb/faq -->

<!-- wp:kadence/iconlist {"items":({"icon":"fe_alertCircle","link":"","target":"_self","size":20,"width":2,"text":"This is a test with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)","color":"","background":"","border":"","borderRadius":0,"padding":5,"borderWidth":1,"style":"default"}),"uniqueID":"_a79c18-e7"} -->
<div class="wp-block-kadence-iconlist kt-svg-icon-list-items kt-svg-icon-list-items_a79c18-e7 kt-svg-icon-list-columns-1 alignnone"><ul class="kt-svg-icon-list"><li class="kt-svg-icon-list-style-default kt-svg-icon-list-item-wrap kt-svg-icon-list-item-0"><div style="display:inline-flex;justify-content:center;align-items:center" class="kt-svg-icon-list-single kt-svg-icon-list-single-fe_alertCircle"><svg style="display:inline-block;vertical-align:middle" viewbox="0 0 24 24" height="20" width="20" fill="none" stroke="currentColor" xmlns="http://www.w3.org/2000/svg" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line></svg></div><span class="kt-svg-icon-list-text">This is a test with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)</span></li></ul></div>
<!-- /wp:kadence/iconlist -->
//result of $blocks
array (
  0 => 
  array (
    'blockName' => 'uagb/faq',
    'attrs' => 
    array (
      'block_id' => 'f1ad85bc',
      'enableSchemaSupport' => true,
      'schema' => '{"@context":"https://schema.org","@type":"FAQPage","@id":"http://localhost/specials/gutenberg/","mainEntity":({"@type":"Question","name":"Headline with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)","acceptedAnswer":{"@type":"Answer","text":"This is a test with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)"}})}',
    ),
    'innerBlocks' => 
    array (
      0 => 
      array (
        'blockName' => 'uagb/faq-child',
        'attrs' => 
        array (
          'block_id' => '61cac9b0',
          'question' => 'Headline with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)',
          'answer' => 'This is a test with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)',
        ),
        'innerBlocks' => 
        array (
        ),
        'innerHTML' => '
<div class="wp-block-uagb-faq-child uagb-faq-child__outer-wrap uagb-block-61cac9b0"><div class="uagb-faq-child__wrapper"><div class="uagb-faq-item" role="tab" tabindex="0"><div class="uagb-faq-questions-button uagb-faq-questions"><span class="uagb-icon uagb-faq-icon-wrap"><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 448 512"><path d="M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"></path></svg></span><span class="uagb-icon-active uagb-faq-icon-wrap"><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 448 512"><path d="M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"></path></svg></span><span class="uagb-question">Headline with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)</span></div><div class="uagb-faq-content"><span><p>This is a test with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)</p></span></div></div></div></div>
',
        'innerContent' => 
        array (
          0 => '
<div class="wp-block-uagb-faq-child uagb-faq-child__outer-wrap uagb-block-61cac9b0"><div class="uagb-faq-child__wrapper"><div class="uagb-faq-item" role="tab" tabindex="0"><div class="uagb-faq-questions-button uagb-faq-questions"><span class="uagb-icon uagb-faq-icon-wrap"><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 448 512"><path d="M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"></path></svg></span><span class="uagb-icon-active uagb-faq-icon-wrap"><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 448 512"><path d="M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"></path></svg></span><span class="uagb-question">Headline with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)</span></div><div class="uagb-faq-content"><span><p>This is a test with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)</p></span></div></div></div></div>
',
        ),
      ),
    ),
    'innerHTML' => '
<div class="wp-block-uagb-faq uagb-faq__outer-wrap uagb-block-f1ad85bc uagb-faq-icon-row uagb-faq-layout-accordion uagb-faq-expand-first-false uagb-faq-inactive-other-true uagb-faq-equal-height" data-faqtoggle="true" role="tablist"><script type="application/ld+json">{"@context":"https://schema.org","@type":"FAQPage","@id":"http://localhost/specials/gutenberg/","mainEntity":({"@type":"Question","name":"Headline with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)","acceptedAnswer":{"@type":"Answer","text":"This is a test with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)"}})}</script><div class="uagb-faq__wrap uagb-buttons-layout-wrap"></div></div>
',
    'innerContent' => 
    array (
      0 => '
<div class="wp-block-uagb-faq uagb-faq__outer-wrap uagb-block-f1ad85bc uagb-faq-icon-row uagb-faq-layout-accordion uagb-faq-expand-first-false uagb-faq-inactive-other-true uagb-faq-equal-height" data-faqtoggle="true" role="tablist"><script type="application/ld+json">{"@context":"https://schema.org","@type":"FAQPage","@id":"http://localhost/specials/gutenberg/","mainEntity":({"@type":"Question","name":"Headline with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)","acceptedAnswer":{"@type":"Answer","text":"This is a test with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)"}})}</script><div class="uagb-faq__wrap uagb-buttons-layout-wrap">',
      1 => NULL,
      2 => '</div></div>
',
    ),
  ),
  1 => 
  array (
    'blockName' => NULL,
    'attrs' => 
    array (
    ),
    'innerBlocks' => 
    array (
    ),
    'innerHTML' => '

',
    'innerContent' => 
    array (
      0 => '

',
    ),
  ),
  2 => 
  array (
    'blockName' => 'kadence/iconlist',
    'attrs' => 
    array (
      'items' => 
      array (
        0 => 
        array (
          'icon' => 'fe_alertCircle',
          'link' => '',
          'target' => '_self',
          'size' => 20,
          'width' => 2,
          'text' => 'This is a test with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)',
          'color' => '',
          'background' => '',
          'border' => '',
          'borderRadius' => 0,
          'padding' => 5,
          'borderWidth' => 1,
          'style' => 'default',
        ),
      ),
      'uniqueID' => '_a79c18-e7',
    ),
    'innerBlocks' => 
    array (
    ),
    'innerHTML' => '
<div class="wp-block-kadence-iconlist kt-svg-icon-list-items kt-svg-icon-list-items_a79c18-e7 kt-svg-icon-list-columns-1 alignnone"><ul class="kt-svg-icon-list"><li class="kt-svg-icon-list-style-default kt-svg-icon-list-item-wrap kt-svg-icon-list-item-0"><div style="display:inline-flex;justify-content:center;align-items:center" class="kt-svg-icon-list-single kt-svg-icon-list-single-fe_alertCircle"><svg style="display:inline-block;vertical-align:middle" viewbox="0 0 24 24" height="20" width="20" fill="none" stroke="currentColor" xmlns="http://www.w3.org/2000/svg" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line></svg></div><span class="kt-svg-icon-list-text">This is a test with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)</span></li></ul></div>
',
    'innerContent' => 
    array (
      0 => '
<div class="wp-block-kadence-iconlist kt-svg-icon-list-items kt-svg-icon-list-items_a79c18-e7 kt-svg-icon-list-columns-1 alignnone"><ul class="kt-svg-icon-list"><li class="kt-svg-icon-list-style-default kt-svg-icon-list-item-wrap kt-svg-icon-list-item-0"><div style="display:inline-flex;justify-content:center;align-items:center" class="kt-svg-icon-list-single kt-svg-icon-list-single-fe_alertCircle"><svg style="display:inline-block;vertical-align:middle" viewbox="0 0 24 24" height="20" width="20" fill="none" stroke="currentColor" xmlns="http://www.w3.org/2000/svg" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line></svg></div><span class="kt-svg-icon-list-text">This is a test with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)</span></li></ul></div>
',
    ),
  ),
)

Final result after serialize_blocks():

//result of $post_content (can not be shown in Gutenberg UI "This block contains unexpected or invalid content.")
<!-- wp:uagb/faq {"block_id":"f1ad85bc","enableSchemaSupport":true,"schema":"{\u0022@context\u0022:\u0022https:\/\/schema.org\u0022,\u0022@type\u0022:\u0022FAQPage\u0022,\u0022@id\u0022:\u0022http:\/\/localhost\/specials\/gutenberg\/\u0022,\u0022mainEntity\u0022:({\u0022@type\u0022:\u0022Question\u0022,\u0022name\u0022:\u0022Headline with special characters: (\u00b0C, \u00e4, \u00f6, \u00fc, \u00df, \u00d6, \u00c4, \u00dc)\u0022,\u0022acceptedAnswer\u0022:{\u0022@type\u0022:\u0022Answer\u0022,\u0022text\u0022:\u0022This is a test with special characters: (\u00b0C, \u00e4, \u00f6, \u00fc, \u00df, \u00d6, \u00c4, \u00dc)\u0022}})}"} -->
<div class="wp-block-uagb-faq uagb-faq__outer-wrap uagb-block-f1ad85bc uagb-faq-icon-row uagb-faq-layout-accordion uagb-faq-expand-first-false uagb-faq-inactive-other-true uagb-faq-equal-height" data-faqtoggle="true" role="tablist"><script type="application/ld+json">{"@context":"https://schema.org","@type":"FAQPage","@id":"http://localhost/specials/gutenberg/","mainEntity":({"@type":"Question","name":"Headline with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)","acceptedAnswer":{"@type":"Answer","text":"This is a test with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)"}})}</script><div class="uagb-faq__wrap uagb-buttons-layout-wrap"><!-- wp:uagb/faq-child {"block_id":"61cac9b0","question":"Headline with special characters: (\u00b0C, \u00e4, \u00f6, \u00fc, \u00df, \u00d6, \u00c4, \u00dc)","answer":"This is a test with special characters: (\u00b0C, \u00e4, \u00f6, \u00fc, \u00df, \u00d6, \u00c4, \u00dc)"} -->
<div class="wp-block-uagb-faq-child uagb-faq-child__outer-wrap uagb-block-61cac9b0"><div class="uagb-faq-child__wrapper"><div class="uagb-faq-item" role="tab" tabindex="0"><div class="uagb-faq-questions-button uagb-faq-questions"><span class="uagb-icon uagb-faq-icon-wrap"><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 448 512"><path d="M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"></path></svg></span><span class="uagb-icon-active uagb-faq-icon-wrap"><svg xmlns="http://www.w3.org/2000/svg" viewbox="0 0 448 512"><path d="M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"></path></svg></span><span class="uagb-question">Headline with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)</span></div><div class="uagb-faq-content"><span><p>This is a test with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)</p></span></div></div></div></div>
<!-- /wp:uagb/faq-child --></div></div>
<!-- /wp:uagb/faq -->

<!-- wp:kadence/iconlist {"items":({"icon":"fe_alertCircle","link":"","target":"_self","size":20,"width":2,"text":"This is a test with special characters: (\u00b0C, \u00e4, \u00f6, \u00fc, \u00df, \u00d6, \u00c4, \u00dc)","color":"","background":"","border":"","borderRadius":0,"padding":5,"borderWidth":1,"style":"default"}),"uniqueID":"_a79c18-e7"} -->
<div class="wp-block-kadence-iconlist kt-svg-icon-list-items kt-svg-icon-list-items_a79c18-e7 kt-svg-icon-list-columns-1 alignnone"><ul class="kt-svg-icon-list"><li class="kt-svg-icon-list-style-default kt-svg-icon-list-item-wrap kt-svg-icon-list-item-0"><div style="display:inline-flex;justify-content:center;align-items:center" class="kt-svg-icon-list-single kt-svg-icon-list-single-fe_alertCircle"><svg style="display:inline-block;vertical-align:middle" viewbox="0 0 24 24" height="20" width="20" fill="none" stroke="currentColor" xmlns="http://www.w3.org/2000/svg" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12" y2="16"></line></svg></div><span class="kt-svg-icon-list-text">This is a test with special characters: (°C, ä, ö, ü, ß, Ö, Ä, Ü)</span></li></ul></div>
<!-- /wp:kadence/iconlist -->

Related Topic: serialize_blocks breaking html tags in content

evince – Can’t undo text insertions in Document Viewer text annotations

When I’m inserting text in a Document Viewer (Evince?) text annotation, I’m unable to “undo” text insertions (using Ctrl+Z like in many text editors).
I looked in Keyboard Shortcuts and in Help, but didn’t find anything.
I swear I could do that on my old computer…

Document Viewer 3.36.10 on Ubuntu 20.04.2 with Gnome 3.36.8.

spellcheck – Is there a shortcut to undo MacOS’s spell check correction without completely disabling it?

spellcheck – Is there a shortcut to undo MacOS’s spell check correction without completely disabling it? – Ask Different

Undo and Redo word by word in Rich Text Box in Winforms C#

I’ve been trying to get undo and redo working in my text editor for about 3 days now. It’s doing my head in.

I have a text box (named richTextBoxPrintCtrl1), which I would like to be able to undo and *redo *(word by word).

So if I click the undo button, it undoes the last word. And if I then clicked the redo button, it redoes the last word.

Could somebody help me get this working?

richTextBoxPrintCtrl1.Undo(); doesn’t work very well. It deletes everything typed in the text box.
and if you type too much this error will appear

Thanks in advance for your help.

I know this question has been asked many times before, but I can’t get it working using the information from the questions I’ve browsed here on SO. if it helps here my code

private string() temp = new string(100);
private int index;
private int currentpostion;

public Undo()
{
    index = 0;
    currentpostion = 0;
}

public void Set_Text(string s)
{
    temp(index) = s;
    currentpostion = index;
    ++index;
}

public string UndoCons()
{
    if (currentpostion > 0)
    {
        return temp(--currentpostion);
    }
    return null;
}

public string RedoCosns()
{
    if (currentpostion < index)
    {
        return temp(++currentpostion);
    }
    return null;
}

clipboard – How can I undo a single keystroke in a textarea/contenteditable in Chrome?

Chrome, and other web-browsers, seem to coalesce user-made edits (not just insertions!) in HTML’s <textarea> or contenteditable elements into fewer-but-larger undo steps – this is a problem for me because when I type or paste-in a lot of text, and then make a few tiny destructive changes, and then want to undo a single tiny destructive change I press Ctrl+Z but Chrome will revert the to how it was before I typed or pasted anything instead of undoing the last keyboard, the result is that I’ve just lost my work.

(This is an issue I face almost daily when posting to StackExchange network sites)

It’s also very inconsistent – if I work more slowly then Chrome seems to magically add a save point, but if I’m typing-away at my full wpm including clipboard operations then Chrome’s undo feature is useless to me.

I had a look around chrome://flags to see if there were any options for controlling Undo behavior, but no such luck.

Is there a way to force Chrome to not coalesce edits and/or to allow for per-keystroke undo/redo?

DreamProxies - Cheapest USA Elite Private Proxies 100 Cheapest USA Private Proxies Buy 200 Cheap USA Private Proxies 400 Best Private Proxies Cheap 1000 USA Private Proxies 2000 USA Private Proxies 5000 Cheap USA Private Proxies ExtraProxies.com - Buy Cheap Private Proxies Buy 50 Private Proxies Buy 100 Private Proxies Buy 200 Private Proxies Buy 500 Private Proxies Buy 1000 Private Proxies Buy 2000 Private Proxies ProxiesLive.com Proxies-free.com New Proxy Lists Every Day Proxies123.com Proxyti.com Buy Quality Private Proxies