Longest Even Length Palindromic Substring (with unique adjacent characters except for the center 2 letters)

You are given a string S containing lowercase English characters. You need to find the length of the largest subsequence of S that satisfies the following pattern: X1,X2,X3…Xn,Xn,…X3,X2,X1 where Xi is some character of S. The only constraint is that no adjacent character should be the same except Xn, that is Xi != X(i+1) for all 1<=i< n.

Input: The string: S

Output: The integer: 2n

Constraint: 1<=|S|<=10^3

Sample input 1: “acdbdea”

Sample output 1: 4

Explanation: “adda” is the longest subsequence following the given pattern.

Sample input 2: “abbacdeedc”

Sample output 2: 6

Explanation: “cdeedc” is the longest subsequence following the given pattern.

Sample input 3: “taker”

Sample output 3: 0

Explanation: No subsequence follows the given pattern.

This question was asked in a coding interview and I didn’t know how to solve it. I understood how to find longest palindromic sub sequence but don’t know how to implement the unique adjacent character part. Please help. pseudo code is fine

What is the security justification for blocking all outbound ports/protocols except HTTP over 80/443? [duplicate]

This question already has an answer here:

  • Is there any meaning in only allowing port 80 and 443 today? 4 answers

My companies IT blocks all outbound traffic except HTTP, preventing me from getting work done at the office (I often need to work on Azure SQL databases which require TCP over port 1433). I can get around the firewall by connecting to my iphone “hotspot”. What is the IT security justification for blocking all outbound network traffic except for HTTP over ports 80/443? They say they will allow one single IP at a time by request but the Azure SQL Databases are not assigned to static IP’s.

Removing a user from the “Everyone Except External User” group in SharePoint Online

I have a new account in Office 365, but I need to remove its access to the tenant’s SharePoint Online sites. I have already removed the SharePoint Online (Plan 1) feature from the license associated with the account, but this hasn’t succeeded in removing the account’s access.

A handful of the sites have the “Everyone Except External Users” group listed with some level of permission. That new account is able to access those sites from this group’s access permissions, even though that account is no longer licensed for SharePoint Online. I’m wondering if there is a way to remove this account from the “Everyone Except External Users” group?

How to configure .htaccess to rewrite all requests into a folder, except a list of exceptions

I have an established website with some legacy folders I would like to keep.

  • https://example.com/.well-known/
  • https://example.com/Music/
  • https://example.com/Rutabagas/

I’ve also installed WordPress. Because there’s an automated update/backup system, I chose to put WordPress into a folder. This way, the WordPress management system won’t see my legacy folders as part of WordPress and wipe them out next time there’s an upgrade.

  • https://example.com/WordPress/

I would like for when anyone visits https://example.com/ to see the WordPress site, without the /WordPress/ part of the URL. No problem, Google has several results on how to do this, except, I still want my list of legacy folders to keep working and the answers I can find only work to redirect everything.

Is there a way to configure .htaccess to rewrite everything into the WordPress folder including /, but not my three or four legacy folders and everything inside, which I want the server to continue handling as normal?

SharePoint 2013 Pages library “Most popular items” returning zero count (except homepage)

I’m new to SharePoint and have been unable to find an answer to this problem.

When selecting “Most Popular Items” on the Pages library the homepage is returning a count for “Recent” and “Ever”, but all other pages are returning a zero count. The homepage has a different content type and page layout from the other pages.

Videos library is returning zero count for all videos.

Documents library is recording as expected.

I’m not sure is this is related but sorting by Recent/Ever is broken on all libraries.

Disabling “Create Site” in SharePoint Online except admins

In SharePoint Online, there is a “+ Create Site” button that allows users to create sites, in our case configured to create them under /sites.

We don’t want end users being able to create sites at this time, only administrators.

In the SharePoint Admin Center, it has a setting “Subsite Creation” with options:

  • Hide the subsite menu command
  • Show the subsite menu command to users who have permission to create sites

1) If I hide this button, it is hidden for EVERYONE, including administrators. How do admins create sites under /sites when this is hidden?

2) When it says “users who have permission to create sites”, where or how is this permission given or taken away? Is this tied to O365 Group creation?