How to stop Blogger overwriting your custom html?

Blogger overwrote my html!

Blogger replaces custom html with its own, default html, whenever a post is opened in ‘compose’ mode.

This means that, if you use the option to compose a post in ‘html’ mode, and then later go back and edit the page in ‘compose’ mode, Blogger overwrites your html with its own default html.

This not only means that it messes it up the way you have spaced/indented the code.

It appears to insert
breaks where there were none, and removed

blocks I had used as the main way of blocking my text elements.

If Blogger is going to offer people the option of doing their own html, shouldn’t it leave that html intact once they have done it?

Worse still, Blogger seems sometimes to open a post in ‘compose’ mode by default when you opt to edit a post that has already been published. So if you compose a post with your own html and then go back later to edit it, Blogger opens the page in ‘compose’ mode, and overwrites your own html.

How do you prevent Blogger from doing this?

Can’t call a Bidirectional LSTM layer on a custom model on Tensorflow 2.0

I am creating a custom model on Tensorflow 2.0 beta an I an trying to use Bidirectional LSTM as the first layer as in the code below.

class ProbabilityDistribution(tf.keras.Model):     def call(self, logits):         # sample a random categorical action from given logits         return tf.squeeze(tf.random.categorical(logits, 1), axis=-1)   class Model(tf.keras.Model):     def __init__(self, num_actions):         super().__init__('mlp_policy')          self.lstm1 = tf.keras.layers.Bidirectional(             tf.keras.layers.LSTM(1024, return_sequences=True)),         self.lstm2 = tf.keras.layers.Bidirectional(             tf.keras.layers.LSTM(1024)),         self.hidden1 = tf.keras.layers.Dense(128, activation='relu')         self.hidden2 = tf.keras.layers.Dense(128, activation='relu')         self.value = tf.keras.layers.Dense(1, name='value')         # logits are unnormalized log probabilities         self.logits = tf.keras.layers.Dense(num_actions, name='policy_logits')         self.dist = ProbabilityDistribution()      def call(self, inputs):         lstm1 = self.lstm1(inputs)         lstm2 = self.lstm2(lstm1)         hidden_logs = self.hidden1(lstm2)         hidden_vals = self.hidden2(lstm2)         return self.logits(hidden_logs), self.value(hidden_vals) 

When I try to predict it I get the following error:

lstm1 = self.lstm1(inputs)  TypeError: 'tuple' object is not callable 

How should I modified it to make it work?

Sharepoint Online – Custom CSS in Content Editor web part saves are overwritten

I’m fairly new to sharepoint customisation so have been struggling reading over some threads. I have looked at the following Posts by have been unable to figure out where / what needs to be edited to get this working.

I’m trying to add custom CSS to edit my home page where promoted links are stored in order to make them smaller (This is so that it scales better when viewing on an ipad).

I’m following this process but I can not seem to get my customisation to save after pressing the save button – It just reverts back to how it was.

  • Navigate to Home page
  • Press the Edit button
  • Add My promoted links web parts to the page
  • Save the page

At this stage the site is fine – I now want to make further customisation in order to resize the promoted links I have just added to the home page.

  • Press Edit to edit the home page
  • Add a Content Editor Webpart at the top of the page (Insert > Media and Content > Content Editor > Add
  • Click onto the Content editor web part I have just added
  • Click ‘Edit Source’
  • Add the code between the and Tags – (Link to the CSS I’m added is in the comment below)
  • Press ‘OK’ to save the source code I have entered
  • Looking at the site the Promoted links have now been resized to the size I want them

    • Press the Save button

    • After pressing save and viewing my home page the promoted links have gone back to the same size as they were before?

Does anyone know why this isn’t saving?

Please let me know if you need any further information or screenshots.

Kind regards Steven

Sharepoint Online – Custom CSS in Content Editor web part saves are overwritten

I’m fairly new to sharepoint customisation so have been struggling reading over some threads. I have looked at the following Posts by have been unable to figure out where / what needs to be edited to get this working.

I’m trying to add custom CSS to edit my home page where promoted links are stored in order to make them smaller (This is so that it scales better when viewing on an ipad).

I’m following this process but I can not seem to get my customisation to save after pressing the save button – It just reverts back to how it was.

  • Navigate to Home page
  • Press the Edit button
  • Add My promoted links web parts to the page
  • Save the page

At this stage the site is fine – I now want to make further customisation in order to resize the promoted links I have just added to the home page.

  • Press Edit to edit the home page
  • Add a Content Editor Webpart at the top of the page (Insert > Media and Content > Content Editor > Add
  • Click onto the Content editor web part I have just added
  • Click ‘Edit Source’
  • Add the code between the and Tags – (Link to the CSS I’m added is in the comment below)
  • Press ‘OK’ to save the source code I have entered
  • Looking at the site the Promoted links have now been resized to the size I want them

    • Press the Save button

    • After pressing save and viewing my home page the promoted links have gone back to the same size as they were before?

Does anyone know why this isn’t saving?

Please let me know if you need any further information or screenshots.

Kind regards Steven

Google Sheets Passing Range from separate sheet into custom function

I have the following custom function I’ve built to basically reproduce a needle haystack type of functionality

function ListBy (Range, Range2, needle) {   var holder = [];   if(typeof Range != 'object') {     throw "expected Range for input saw" + typeof Range;     return false;   } for(var i = 0; i < Range.length; i++) {     if(Range[i] == needle) {           holder.push(Range2[i]);     }   }    return holder; } 

This script works perfectly when executed on one sheet, for instance

=ListBy(A1:A5, B1:B5, "needle"); 

But if I try and pass in data from another sheet like so

=ListBy('sheet1'!A1:A10, 'sheet1'!A1:A10, "needle") 

I get a reference of range error. Why would this be the case?

How can I reference a cell in a custom function while setting up data validation in Google spreadsheets?

I made the following Google script to check whether a string is less than some length:

function isLengthLessThan(length, text) {   return (text.length < length) }; 

How can I set up data validation using this custom formula to check the length of cells? What can I put where the question mark is so that it will represent the value of the cell?

custom formula data validation screen

How can I reference a cell in a custom function while setting up data validation in Google spreadsheets?

I made the following Google script to check whether a string is less than some length:

function isLengthLessThan(length, text) {   return (text.length < length) }; 

How can I set up data validation using this custom formula to check the length of cells? What can I put where the question mark is so that it will represent the value of the cell?

custom formula data validation screen

Can I access an app’s data folder by installing a custom build of that app?

I want to access the data for two apps (Mozilla Firefox and Google Authenticator) on my non-rooted[1] Android 6.0.1 phone, to transfer it to a new phone.

Unfortunately, both of these apps have android:allowBackup and android:debuggable set to false in their manifests, which prevents backups using adb.

They store their data here:

/data/data/org.mozilla.firefox/ /data/data/com.google.android.apps.authenticator2/ 

Using the Android dev tools, can I just install a custom build or modified APK of these apps with the appropriate flags set? Or will that wipe the app data, or would the certificate mechanism prevent me from installing such an APK?

[1] Rooting using Towelroot is not possible due to a reasonably up-to-date kernel. “Kingroot” is perhaps possible but looks too fishy to me. I understood that unlocking the bootloader would wipe the device, losing my app’s data.

How to create custom administrator panel page/subpage?

I’m struggling with creating custom subpages in wordpress admin panel. I’m interested in creating any custom subpage, which is going to look like a default administrator screens with some modifications. At best I’m trying to achieve custom comments subpage, showing comments related only to my custom post type I’ve created, but any tips on how to interrupt default render of admin screens in wp admin panel would be appreciated.

I’m not sure what hooks to use, or where are the files responsible for rendering pages like comments, posts, settings ect.

I want to see how they are written so I could possibly copy-paste the code and after some changes – callback it with the function “add_submenu_page()” or:

add_comments_page( $ page_title, $ menu_title, $ capability, $ menu_slug, $ function);

Any tips where to look for hooks, files or information on how any page in panel admin is rendered would be very appreciated. Thanks in advance!