How to remove any words containing two adjacent characters with different cases?

I have a list of permutations of ABCabc and I want to remove any permutations with two adjacent characters with different cases (uppercase and lowercase).

For example,

  • ABCcab is kept.
  • ABCacb must be removed because Ca contains two adjacent characters with different cases.
  • AbBcaC must be removed as well.

Attempt

Here is my attempt but without filtering.

Select[StringJoin /@ Permutations[Characters@"ABCabc"],....] 

Remove special characters in a URL

I need a help to prevent special characters in URL & it should redirect to 404 error page, if anyone specifically entered characters. I tried couple of ways through .htaccess but none of them worked.

Expected URL: http://www.abcd.com/ar/shop-listing/health-beauty/ but still I can see the page if I entered like http://www.abcd.com/ar/shop-listing/health-beauty~@/#$ &&&%%$ %3Cscript%3E/

Can anyone suggest a best solution to approach this issue?

Thanks in advance guys!

How to remove sublists whose difference of two elements is either 1 or 11?

I want to create a list of 3-element subsets of $ \{1,2,\cdots,12\}$ where no two elements in each subset can have difference of 1 or 11.

The following attempt fails because it returns just a list of all subsets without restriction.

Select[Subsets[Range[12], {3}]  , (Abs[#[[1]] - #[[2]]] != 1 || Abs[#[[1]] - #[[2]]] != 11) &&    (Abs[#[[1]] - #[[3]]] != 1 || Abs[#[[1]] - #[[3]]] != 11) &&    (Abs[#[[3]] - #[[2]]] != 1 || Abs[#[[3]] - #[[2]]] != 11) &] 

Edit

I just got the solution as follows, but can it be simplified?

Select[Subsets[Range[12], {3}]   , ! MemberQ[{1, 11}, Abs[#[[1]] - #[[2]]]] &&     ! MemberQ[{1, 11}, Abs[#[[1]] - #[[3]]]] &&     ! MemberQ[{1, 11}, Abs[#[[3]] - #[[2]]]] &] // Length 

Way to remove rc4 from Linux Cipher Suites

running this command resulted with the list of ciphers which supports rc4: /usr/bin/openssl ciphers -v | grep -i "rc4"

what’s the easiest way and how to remove specifically ciphers that supports rc4 that I need to execute or where is the configuration file in need to edit on Linux machines.

what’s the way to reverse the impact of this command? in case one of the server applications will stop working we will need to revert back to the previous Cipher Suites configuration.

Thanks!

Remove vertices

Given an undirected graph G(V,E), find the minimum number of vertices to remove so that the Edge Set of the graph becomes $ \phi$ .

In other words: If we remove one vertex we remove that vertex along with all edges connected to that vertex. Find the minimum number of vertices to remove so that there are no edges left in G after their removal.

How to remove extra white space above text

Hello I am trying to get this text "*SCRC Reading Room is closed for the Fall 2020 Semester" closer to "Bird Library: View Service desk hours" How would I do that given this code.

 <h3 class="hours-h3">Bird Library</h3> <script src="//api3.libcal.com/js/hours_grid.js?002"></script> <div id="s-lc-whw1503"></div> <script> $  (function(){ var week1503 = new $  .LibCalWeeklyGrid( $  ("#s-lc-whw1503"), { iid: 3186, lid: 1503,  weeks: 8 }); }); </script> *SCRC Reading Room is closed for the Fall...
Code (markup):

How to remove extra white space above text

Devising an algorithm to remove “complete” sets of numbers from a list of numbers

Suppose I have a list of numbers consisting of numbers 1 through 5, where some numbers repeat. Define a set of numbers to be "complete" if it consists of each of the numbers 1-5 exactly once. Now, I want to pull out as many possible complete, sorted (lowest to highest) sets from this list. How can I do this (efficiently)?

Here is the solution I have in mind so far. Traverse through the list, and place each number into a pile of numbers that is the same number. For example, place all the 1s into a pile, all the 2s into a pile, and so on. Then, go through all of the piles and determine the minimum number of elements in a pile. For example, if the pile of 2s has five 2s and all other piles have greater than or equal to five elements, then 5 is the minimum number of elements. This minimum, call it min, will give us the number of complete sets in the list. Finally, go through the piles in order and pull out the elements one by one until you form a complete set, and again to form another complete set, and so on until min number of complete sets. Tada! You now have pulled out as many possible complete, sorted sets from this list.

Here is an example:

Let’s say the list is 3 2 1 2 2 3 4 5 5 4 4 3 4 1 1 2 5. We traverse the list and put them into piles:

333 2222 111 4444 555

The minimum number of elements in a pile is 3, so we have 3 complete sets. Now just go through the piles in order and pick up elements one by one:

12345 12345 12345

And tada! We have pulled out as many complete, sorted sets as possible.

Where I am lacking in my solution is figuring out how to efficiently go through the piles in order or make an efficient way of ordering the piles so that I can easily go through them in order.

I’d love to hear any feedback, especially other algorithms you might devise or ways to go about ordering. Thanks!