Disable Edit WebPart and/or Snippet link in a Script Editor Web Part on SharePoint Page?

I know it can be done with client side coding, but maybe there is a built in way to do this in SharePoint 2013. I have a web part I share with other sites, but do not want site administrators seeing or editing the web part contents through the normal sharepoint page edit UI > Edit Web Part > Edit Snippet.

Might it there be a switch in the webpart xml to disable that?
Possible to create a new or change the web part type that does not have the Edit Snippet feature?

this is the Web Part XML source of a very simple web part anybody with site admin rights on the site can edit via the UI.

enter image description here

enter image description here

    <webParts>   <webPart xmlns="http://schemas.microsoft.com/WebPart/v3" Gr="Test">     <metaData>       <type name="Microsoft.SharePoint.WebPartPages.ScriptEditorWebPart, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />       <importErrorMessage>Cannot import this Web Part.</importErrorMessage>     </metaData>     <data>       <properties>         <property name="ExportMode" type="exportmode">None</property>         <property name="HelpUrl" type="string" />         <property name="Hidden" type="bool">False</property>         <property name="Description" type="string">JCP 68 TEST</property>         <property name="Content" type="string">         &lt;H1&gt;HELLO THIS IS A TEST&lt;/H1&gt;         </property>         <property name="CatalogIconImageUrl" type="string">/_layouts/images/wp_pers.gif</property>         <property name="Title" type="string">JCP 68 </property>         <property name="AllowHide" type="bool">False</property>         <property name="AllowMinimize" type="bool">False</property>         <property name="AllowZoneChange" type="bool">True</property>         <property name="TitleUrl" type="string" />         <property name="ChromeType" type="chrometype">None</property>         <property name="AllowConnect" type="bool">True</property>         <property name="Width" type="unit" />         <property name="Height" type="unit" />         <property name="HelpMode" type="helpmode">Navigate</property>         <property name="AllowEdit" type="bool">False</property>         <property name="TitleIconImageUrl" type="string" />         <property name="Direction" type="direction">NotSet</property>         <property name="AllowClose" type="bool">False</property>         <property name="ChromeState" type="chromestate">Normal</property>       </properties>     </data>   </webPart> </webParts> 

Lots of Java applications deployed with different 3rd Party jars and/or versions thereof

I’m trying to centralize a repository on multiple deployment servers for all our Java applications. What I am looking for is a way to use a single POM file or similar to allow direct communication with a Nexus server which stores all the jars. The reason behind this is that our backups are becoming huge, having to store the jars from each server as opposed to a single centralized file.

Unity baked lighting – blotchy shadows, bleeding and/or stiching

I have spent days trying to get baked lighting to look good. I use a simple low-poly style. No matter what I do, I get this type of effect (blotchy shadows and odd dark lines):

enter image description here

Here are my settings:

enter image description here

enter image description here

enter image description here

Baking a scene already takes around 4 hours, not sure I can increase the resolution any more without Unity crashing during the bake. Am I doing something wrong? Feel like Ive tried everything.

Should product scopes and/or project scopes be considered for small internal development work

tl;dr: I work at a small company with a development team of 5-10 people, lately we have been asked to present “scope documents” for effectively all of our work before we carry out the actual work, with seemingly no regard given for the magnitude of work required.

I worry that I am often spending more time writing scope documents about small enhancements than I am actually performing the enhancement.


Before I explain my question better, let me establish a few baseline viewpoints on the situation.

I understand creating these documents can be considered training exercises for when the team grows larger and the current members take on lead roles. I am not against this and I think it’s a valuable training experience. I just feel that the documents aren’t always necessary which may lead to wasted time, being a small company it feels we are already pressed for time and resources.

I understand a product and/or project scope is absolutely necessary when beginning an endeavor on an entirely new product, I can also recognize the importance of the documents in maintaining order in a structured and distributed development team (many team members + project leader). And of course scopes are absolutely mandatory when dealing with 3rd party customers wishing to contract our development work.

I understand the need to ensure that a developer fully understands the request before engaging in work, however I am left asking myself whether or not these small enhancements, even if misunderstood, could end up taking more time than it takes to write, review, revise, and signoff the respective scope documents.


With the above understanding in mind, excuse the length of this post, but to describe my issues:

My questions come about in situations where our development team is applying relatively small enhancements to our own internal software. Small enhancements such as adding a single new button to a web UI that performs a simple operation, or adding a new action handler (basically 1 function) to a backend system.

These small enhancements may indirectly bring in revenue as they increase the value of our product, but we aren’t directly selling these new enhancements independently. This leaves little room for any sort of scope regarding cost vs return.

All that is left is a scope detailing the expected outcome, why we’re doing it, and the expected hourly work breakdown (which is often hugely over-estimated). These documents will sometimes go back and forth with discussion over small issues which could often have been applied to the enhancement after it was completed anyway, revisions will be made to the documents to reflect the decisions made in this process.

I can’t help but feel like we are wasting a lot of valuable developer time writing these documents, where the minor enhancement could go through a first iteration of development in the same amount of time it takes to write the initial document. Then the time spent reviewing the document could instead be spent reviewing the code, and instead of revising the document time could be spent revising and finalizing the code — the end result in this situation (to me) is a enhancement which took almost exactly as long as the scope/documentation phase would have taken.

My main questions being: (In the context of a small development team)

Are we taking the right approach to scoping/planning and developing?

Is there any rules of thumb that we should be following with regards to these processes?

Is there any red flags in anything above which indicates I should be looking to adjust my viewpoint on the situation?

Is there any way I can improve the situation while keeping everybody happy?

All insight would be greatly appreciated.

Automator and/or AppleScript to automatically Command-F2 to enter Target Display Mode

I’m trying to use Automator with AppleScript to automatically hit Command + F2 to enter Target Display Mode. The script runs but I just get a beep/tone with no action. I don’t know if there’s an error in the script or if it’s not capable of hitting a function key.

on run {input, parameters}      tell application "System Events"         key down {command}         keystroke "120"         key up {command}     end tell return input end run 

Once I get this working I’ll need to somehow schedule this to run on startup or maybe on a schedule. I’ve seen some threads on this but never an actual solution. I’m using a 2011 iMac as a secondary monitor and hate hitting Command + F2 every day.

Are tabs and/or steps in a wizard displayed as separate boxes in a sitemap diagram?

I’m creating a sitemap for an enterprise application.

For one section in the application, there is an edit calendar feature. Once clicked on, there are three sections/or different types of calendars to set up.

  1. Start/end dates for the entire project
  2. Blocked-out dates (holidays and nonworking days, etc.)
  3. Start/end dates for specific tasks within the project

We currently use a step wizard to edit the calendar so the user has to set up the dates in that order.

In my sitemap, do I draw out each step as a separate box, or would that go in a separate user flow diagram?

Sitemap sketch

Mismatched entity and/or field definitions – 8.7.1

I have updated the Drupal core from 8.6.4 to 8.7.1 using pantheon.

Once I updated the core, Mismatched entity and/or field definitions errors are showing in status report. (Refer the screenshot)

I know that the command drush entity-updates is depreciated.

I tried to achieve this using uninstallFieldStorageDefinition , refer the below code

$ entity_update_manager = \Drupal::entityDefinitionUpdateManager(); $ storage_definition = $ entity_update_manager->getFieldStorageDefinition(‘field_application_instructions’, ‘node’); $ entity_update_manager->uninstallFieldStorageDefinition($ storage_definition);

It works fine. But while I try to remove “Field_title” such as

$ entity_update_manager = \Drupal::entityDefinitionUpdateManager(); $ storage_definition = $ entity_update_manager->getFieldStorageDefinition(‘field_title’, ‘node’); $ entity_update_manager->uninstallFieldStorageDefinition($ storage_definition);

it throws the error Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘pantheon.node__field_title’ doesn’t exist: UPDATE {node__field_title} SET deleted=:db_update_placeholder_0; Array ( [:db_update_placeholder_0] => 1 ) in Drupal\Core\Entity\Sql\SqlContentEntityStorage->onFieldStorageDefinitionDelete() (line 1579 of /srv/bindings/24fbf084eb71499c9a87f6c5fa2136e2/code/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php).

I tried using the module devel_entity_updates, but the same issue occurs.

Someone please assist. Thanks in advance

enter image description here

How to create a Python class that is a subclass of another class, but fails issubclass and/or isinstance tests?

I know this is probably bad design, but I’ve run into a case where I need to create a subclass Derived of a class Base on-the-fly, and make instances of Derived fail the issubclass(Derived, Base) or isinstance(derived_obj, Base) checks (i.e. return False).

I’ve tried a number of approaches, but none succeeded:

  • Creating a property named __class__ in Derived (https://stackoverflow.com/a/42958013/4909228). This can only be used to make the checks return True.
  • Overriding the __instancecheck__ and __subclasscheck__ methods of Base. This doesn’t work because CPython only calls these methods when conventional checks return False.
  • Assigning the __class__ attribute during __init__. This is no longer allowed in Python 3.6+.
  • Making Derived subclass object and assigning all its attributes and methods (including special methods) to that of Base. This doesn’t work because certain methods (e.g. __init__) cannot be called on an instance that is not a subclass of Base.

Can this possibly be done in Python? The approach could be interpreter specific (code is only run in CPython), and only needs to target Python versions 3.6+.


To illustrate a potential usage of this requirement, consider the following function:

def map_structure(fn, obj):     if isinstance(obj, list):         return [map_structure(fn, x) for x in obj]     if isinstance(obj, dict):         return {k: map_structure(fn, v) for k, v in obj.items()}     # check whether `obj` is some other collection type     ...     # `obj` must be a singleton object, apply `fn` on it     return fn(obj) 

This method generalizes map to work on arbitrarily nested structures. However, in some cases we don’t want to traverse a certain nested structure, for instance:

# `struct` is user-provided structure, we create a list for each element struct_list = map_structure(lambda x: [x], struct) # somehow add stuff into the lists ... # now we want to know how many elements are in each list, so we want to # prevent `map_structure` from traversing the inner-most lists struct_len = map_structure(len, struct_list) 

If the said functionality can be implemented, then the above could be changed to:

pseudo_list = create_fake_subclass(list) struct_list = map_structure(lambda x: pseudo_list([x]), struct) # ... and the rest of code should work