Url structure for specific years in blog

I have an url like this one for an article with a good traffic. Now I want to update the content to 2020.

website.com/best-x-for-2019

What is my best option:

a] Just change the url and text from website.com/best-x-for-2019 to website.com/best-x-for-2020

b] keep the website.com/best-x-for-2019 and add link to a new url website.com/best-x-for-2020 and have two indexed pages

c] Other?

python – Running pipenv with specific conda env?

I have a conda environment, cenv. While activated, I’ve installed pipenv via:

(cenv) % conda install -c conda-forge pipenv

I created a pipenv env in a repo by installing a package I’ll need, in this case the GDAL bindings, gdal:

(cenv) % pipenv install gdal

All good so far. Now when I want to launch the pipenv shell to see if my installation worked in python, I run:

(cenv) % pipenv shell

And I get:

Launching subshell in virtual environment…
 . /home/<user>/.venvs/cenv-<scramble>/bin/activate
(base) %  . /home/<user>/.venvs/cenv-<scramble>/bin/activate
(modis_lst) (base) % 

So I get kicked out of the (cenv) conda env and put in the system conda env, (base), which is not set up how I need. I can deactivate the (base) env, and activate the (cenv) env, but I’m looking for a better solution. Because I’m not sure I could use pipenv run in this way.

How can I start a pipenv shell or run pipenv while choosing the conda env I want to use? Thanks 🙂

Why is this specific video on Youtube not playing on my Macbook?

Why isn’t this video playing with sound on Youtube on my Macbook?

Ya’ll are downvoting this post for no reason.

sharepoint online – How to calculate the modified date for a specific column

I have a list in SharePoint where people will change the status to “closed” when complete. I want to have a column that populates the date this column was changed to “closed”

Sometimes entry is changed after being closed, so I can’t always rely on the “last modified” view

development – Download a specific file from SharePoint (CSOM) using C#

I’m developing a C# based application that requires to download, checkout, upload, check in on a specific file from/to Sharepoint with CSOM. So I have two questions here:

Firstly, on download, is there others way to download a specific named file under folder “Document” instead of searching through GetItemByID(). Please refer to code below:

string siteUrl = @"http://test.com/sites/company/";

ClientContext ctx = new ClientContext(siteUrl);
ctx.Credentials = new NetworkCredential("username", "password" , "domain");            
ctx.AuthenticationMode = ClientAuthenticationMode.Default;

var list = ctx.Web.Lists.GetByTitle("Document");
var listItem = list.GetItemById();

ctx.Load(list);
ctx.Load(listItem, i => i.File);
ctx.ExecuteQuery();

var fileRef = listItem.File.ServerRelativeUrl;
var fileInfo = Microsoft.SharePoint.Client.File.OpenBinaryDirect(ctx, fileRef);
var fileName = Path.Combine("C:\", (string)listItem.File.Name);

using (var fileStream = System.IO.File.Create(fileName))
{
    fileInfo.Stream.CopyTo(fileStream);
}

Secondly, in regards to the workflow (download, modify, check out, upload, check in), is this feasible of doing?

Thanks in advance.

oracle – How to connect to specific session id & serial# ? Blocked sessions

I have blocked sessions and see which session is blocking them, having session_id and serial#. Is it possible to connect to such session? How?

Background: using V$SESSION_BLOCKERS I see sessions are blocked by each other by INSERT statements to one of two tables: _REQUEST and _RESPONSE

Blocked sessions wait event: enq: TX - row lock contention

Query 1:

insert into _REQUEST (creation_date, IS_PROCESSED, name, packet, PARENT_SKID, BATCH_SKID, retry_delay, revision, SERVICE_NAME, ttl, type, REQUEST_SKID)
values (:1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 , :11 , :12 )

Query 2a (from DB trigger, :B1 is a payload):

SELECT COALESCE(ERROR_DETAILS, ERROR_MESSAGE, FAULT_REASON, SOAP_ERROR) AS ERROR_MESSAGE, ERROR_CODE 
FROM XMLTABLE( '//*:DataHandlerWebServiceException | //*:Fault | //*:PLMDataHandlerError' 
     PASSING XMLTYPE(:B1 )
     COLUMNS ERROR_DETAILS VARCHAR2(256) PATH '*:errorDetails'
            ,ERROR_MESSAGE VARCHAR2(256) PATH '*:errorMessage'
            ,ERROR_CODE VARCHAR2(8) PATH '*:errorCode'
            ,FAULT_REASON VARCHAR2(256) PATH '*:Reason/*:Text'
            ,SOAP_ERROR VARCHAR2(256) PATH '*:COMMON_LOG_MESSAGE/*:LOG_MESSAGE' )

Query 2b (we already know APPEND is ignored here, see Note 1):

INSERT /*+ append */ INTO _response( RESPONSE_SKID, REQUEST_SKID, HAS_FAILED, WAS_TIMEOUT, IS_PROCESSED, SOAP_REQUEST_TIMESTAMP, SOAP_RESPONSE_TIMESTAMP, RESPONSE_HTTP_STATUS, ERROR_MESSAGE, RESPONSE_BODY )
values ( :1 , :2 , :3 , :4 , :5 , :6 , :7 , :8 , :9 , :10 )

How is it possible that INSERTs, to different tables, are blocking the sessions? I was looking into V$ACTIVE_SESSION_HISTORY but don’t find anything yet (I’m not a DBA yet)

Note 1: APPEND hint ignored

page attributes – Remove Header and style.css from Specific Post template

You have to do a couple of things here…

First, you have to create a duplicate of header.php and we’ll name it header-custom-app.php. Now modify the duplicated file and remove the HTML elements you don’t want.

In your template, instead of using get_header(); you would use this:

<?php
/*
 * Template Name: Custom App
 * Template Post Type: post, page, product
 */

 ?>
 <?php get_header( 'custom-app' ); ?>

Having multiple headers, footers and sidebars is acceptable. You can use this exact same method for both get_footer(); and get_sidebar(); if your template needs these or customized versions of these.

Now, for the style.css not being used, I can’t really provide a concrete example because you haven’t provided the code that shows how you currently enqueue it, so what I’m posting here operates on a few assumptions.

Assuming you’re only excluding the style.css from this one template, you could do this:

if( !is_page_template( 'template-custom-app.php' ) ) {
    wp_enqueue_style( 'yourtheme-style', get_stylesheet_uri(), array(), 'x.x' );
}

Obviously change the template-custom-app.php to whatever the name of your template is, change the yourtheme-style and update the x.x to your version number… But what this does is it basically wraps the enqueuing of your style.css in a condition that says ‘if NOT the custom app template, load style.css’.

Alternatively, if your custom app has it’s own CSS stylesheet that it needs you could use:

if( is_page_template( 'template-custom-app.php' ) ) {
    wp_enqueue_style( 'customapp-style', get_stylesheet_directory_uri() . '/css/custom-app.css, array(), 'x.x' );
} else {
    wp_enqueue_style( 'yourtheme-style', get_stylesheet_uri(), array(), 'x.x' );
}

This last snippet assumes you have a css directory in your main theme directory to store secondary CSS files, if it’s just in the root directory then remove the /css from /css/custom-app.css.

game design – Names for specific regions on earth for global RTS

I am developing a global real-time strategy game that uses Google Maps to represent the earth. I am cutting up the globe into 32 squares with each square exactly 45 degrees latitude and longitude. The squares are also aligned to the grid starting from 0,0.

I would like to give each square a nice name that meets the following criteria (in order of priority):

  • Every square name must be unique
  • Best representation of the land and water contained in the square. Any name is acceptable (country, continent, significant geology, significant body of water) but it must be the most prominent thing in that square
  • A combination of names is acceptable if there are 2 or more prominent / recognisable elements in the square
  • As short as possible so it can be easy to remember / type
  • Exacting precision is not important – this is a game, so the names should be major things in those squares that most lay people on earth would immediately recognise or at least be familiar with
  • If possible, the least offensive / non-contested / most globally accepted name of the main region in the square

I have come up with the following, but I would like to know if there is a system already out there that better meets my needs (note that I’ve accidentally swapped my lat/lngs – sorry!). Alternatively, if anyone has much more knowledge of geology/geography than I do, please suggest a better naming convention and names as some of the names are too long and many contain more country names than I’m happy with (I’d prefer neutral region names):

Suggested table of names

user behavior – Recommending specific tasks vs showing all tasks to do

We have a safety training app that shows “x To Do” items on the dashboard and we are trying to drive user engagement on specific components frequently ignored.

Do you think users would be more likely to work on completing tasks if there was a randomly chosen “next on the to-do list” in addition to the currently existing “x surveys to do, x policies to review”.

The thought is by making the decision of what to do next for the user they will complete more, and the worry is we are just adding more noise of things to do for the user.

Example dashboard:enter image description here

Magento2: How to set minimum order amount for specific group

I have created some customers group.

How to set minimum order amount only for specific group?