Copying items in arrays while checking their indexes


Array P of length n contains permutations without repetition: 0, …, n-1.

Write a code, which would in O(n) create an array R of length n, so that if value x in array P is on a lower index than value y in array P, then R[x] < R[y].

x, y is from {0, …, n-1}

This is a algorithmization problem that’s recurring in the final’s test each year and I’m stuck with it for weeks. I know that I’m supposed to show my work before asking here, but I didn’t know how to start.

Could you at least point me to the right direction? What technique do I use, dynamic programming? Is this a problem for a specific algorithm? Thanks for any help

What magic items are there that help a Sorcerer summon or control undead?

I am trying to compile the short list of items that a Sorcerer can use to summon / control undead. Which magic items support this Sorcerer concept?

The character is currently a Divine Sorcerer, level 7.

The magic items need to be able to summon undead and / or buff undead. Buffing in this case means making them stronger or adding to their utility in some way.

I am using the animate dead spell. I do plan to get create undead also.

List view threshold – over 100,000 items in library

I have a query about the List view threshold on SharePoint 2013 where the limit is set to 5000 items in Central Administration.

We have a document library with 150,000+ items which means currently we have to set the item limit in CA to 200,000 which obviously is not helping the SQL side of things.

This document library has documents that people need to access on a daily basis and it could be any number of documents in there that are accessed.

I’ve read up on indexing columns and setting item limits in views however unsure how this would work in our scenario as we don’t want it to only return a listing of certain amount of documents in the list.

DOM añadir items a option tecleando

Sobre los items existentes, ¿de qué manera podría añadir alguno nuevo (valor nuevo, contenido nuevo y posición) introduciendo datos en estos campos y al hacer click sobre “nuevo item”? Solo he conseguido añadirlos al option “manualmente”, pero no de esta forma que se me pide (la función es la última, newItem())

introducir la descripción de la imagen aquí

/*****************************************************************************************************************************************************************************************************************************************************************************************************************************************/

 <!DOCTYPE html>     <html><head>     <meta charset=utf-8 />     <title>JS DOM - Eliminar elementos del DOM</title>     </head>     <body>      <form>     <select id="colorSelect">     <option value=”1”>Uno</option>     <option value=”2”>Dos</option>     <option value=”3”>Tres</option>     </select>     <a href="javascript:delItemSelected()">Elimina el item seleccionado</a>     <a href="javascript:delAllItems()">Vacía el desplegable</a>     <a href="javascript:resetItems()">Reset desplegable</a>     <hr>     Valor: <input type="text" name="valor_nuevo" value="">     Contenido: <input type="text" name="contenido_nuevo" value="">     Posición: <input type="text" name="posicion" value="">     <a href="javascript:newItem()">Nuevo item</a>     </form>      <script>      function delItemSelected(){         var seleccionado=document.getElementById("colorSelect");         seleccionado.remove(seleccionado.selectedIndex);     }      function delAllItems(){         var borrarTodos=document.getElementById("colorSelect");         var elementos=3;         for(var i=0;i<elementos;i++){             borrarTodos.remove(elementos.selectedIndex);         }     }      function resetItems(){         var borrarTodos=document.getElementById("colorSelect");         var elementos=3;         for(var i=0;i<elementos;i++){             borrarTodos.remove(borrarTodos.selectedIndex);         }          var arrayVacio=[];          for(var i=0;i<3;i++){             arrayVacio[i]=document.createElement("option");         }          for(var i=0;i<3;i++){             switch(i){                 case 0: arrayVacio[i].innerHTML="Uno";                 break;                 case 1: arrayVacio[i].innerHTML="Dos";                 break;                 case 2: arrayVacio[i].innerHTML="Tres";                 break;             }             borrarTodos.appendChild(arrayVacio[i]);         }     }      function newItem(){         var nuevo=document.createElement("option"); var option=document.createTextNode("Cuatro");     /*var option=document.getElementsByName("contenido_nuevo")[0].value;     document.getElementById("colorSelect").innerHTML=option;*/     nuevo.appendChild(option);     document.getElementById("colorSelect").appendChild(nuevo);      }       </script>      </body>     </html> 

How do I display a SharePoint Calendar with more than 5,000 items in Outlook?

We have SharePoint Online as part of Office365. We use a couple of SharePoint calendars for booking recording studio time, which are accessed via Outlook. Unfortunately each calendar hare more than 5,000 items in it.

There’s lots of information about how to handle lists larger than 5,000 items within the SharePoint environment but I don’t see any solutions when the list is being consumed by Outlook.

How to Sync more than 5000 items SharePoint Calendar to Outlook using Connect to Outlook Option

How to Sync more than 5000 items in SharePoint Calendar to Outlook using Connect to Outlook Option. Getting error that “HTTP 500. The server returned the following error message: The attempted operation is prohibited because it exceeds the list view threshold enforced by the administrator.”

Any Suggestion or Workaround will be appreciated.

Thanks in Advance.

Balancing homebrew magic items for my players

Warning for my players: Ayla, Lothar, Okazaki and Agmar: GTFO spoilers ahead!!

So I created some magic items and I want to know if I made them about equally, I’m aware these are probably broken, what I want to know is are the about the same in terms of power, practicality, thematic and fun over all. All of them require attunement.

For barbarian, totem warrior, basic brute who loves smashing I made Maul of conqueror: he absorbs enemy strength. If he gets killing blow he can use the slain enemy’s strength score instead of his own until he finishes long rest. If he kills a giant kin the strength becomes permanent. that’s the simplest one

next is the monk, open hand, loves to pick losing fights, he gets Grit of the underdog (fist weapon): this one evolves in stages

+1 to attack rolls and damage, you score critical hit on rolls 19-20. Additionally when you score a crit or your opponent score crit on you, you regain 1 ki point. If the number of ki points exceed your Monk level you lose all extra points after short or long rest

+2 you can spend 1 ki point to heal yourself. Spend 1 hit die and add your constitution modifier. you can use this even when unconscious.

+3 spent 5 ki points, for next minute you can add your opponent’s Strength bonus to your damage rolls

-Since he often saves ki points he rarely uses them and ends up not spending them.

for swashbuckler rouge, likes fancy stuff, plans to multiclass into fighter to get fighting style and riposte as battle maneuver. Basically Cabal’s ruin (I couldn’t think of cool armor that boosts riposte so I copied Matt T.T) but he +1/+2/+3 to AC to improve chances to riposte:

+1 Cabal’s Ruin has 4 charges, and regains 1d4 expended charges daily at dawn. When the wearer is targeted by an enemy’s spell, they can use their reaction to have the cloak swallow part of the spell. The cloak gains a number of charges equal to the spell level of the triggering spell. The wearer is still subject to whatever effects the spell would normally inflict on them. The ability cannot be used again until they finish a short or long rest. When the wearer hits with an attack, they can choose to expend any number of charges from the cloak, dealing an additional 1d6 lightning damage per charge expended, which is inflicted on the target of that attack. If the attack strikes multiple targets, the wearer must choose one target from the group to be subject to this damage.

+2 Cabal’s Ruin grants the wearer advantage on all saving throws against spells and other magical effects. The cloak’s maximum charges becomes 6, and it regains 1d4+2 charges daily at dawn. When using the cloak’s ability to swallow a spell, the wearer gains resistance to the damage of that spell.

+3 The cloak’s maximum charges becomes 10, and it regains 1d6+4 charges daily at dawn.

And lastly for Beast master ranger, she has a wolf and she kinda feels under powered. Her’s is most complicated and not 100% done. Link of the devourer, 2 piece item, collar and bracelet must be equiped by both companion and ranger:

Base form- when you cast a spell with a range of touch, your companion can deliver the spell as if it had cast the spell. Your companion must be within 100 feet of you, and it must use its reaction to deliver the spell when you cast it. If the spell requires an attack roll, you use your attack modifier for the roll.

Evolved form- the bond with companion evolves beyond natural. When either you or your companion take damage, you can chose which one of you takes the damage. Damage must be transfered whole and cannot be split betwen the two.

Ascended form- your link is complete, you are always aware how far your companion is away from you and in which general direction. While your companion is within 100 feet of you, you can communicate with it telepathically. Additionally, as an action, you can see through your companion’s eyes and hear what it hears until the start of your next turn, gaining the benefits of any special that the companion has. During this time, you are deaf and blind with regard to your own senses.

now for complicated part: based on what companion devours it gains traits of it’s prey, the traits also apply to you. you can switch unlocked forms during short rest.

Feral form: devour Beast to unlock. Use dire wolf stat block for companion, Ranger gets +10ft speed and temporary hit points equal to character level

Fey form: devour Fey to unlock. Use blink dog stat block for companion, Ranger gets +2 to Charisma, can cast invisibility without spending a spellslot once per short rest

Dragon form: Apply dragon template from monster manual to companion, Ranger gets +1 to AC, resistance to elemental damage based on dragon’s color and can add 1d6 of same elemental damage to damage rolls

Fiend form: not finished

Abberation form: not finished

Celestial form: not finished

So that is basically it. Any Ideas if some of them are more powerfull than the others, did they follow the theme and any ideas for 3 remaining forms forms??

Is it normal approch get all items after post new item?

Problem description:

Parent view displays a list of items. This view has button add a new item to list wich open modal for creating a new item.

Two approaches how to do that:

1) POST Request -> Insert from response body new list item to the parent view

2) POST Request -> Notify parent view that new item created -> Parent view will do GET request which returns the full list of items and view rerenders

The first approach is commonly used. But the second approach gives some feeling of overkill. The first approach uses one request to the server, but the second two request to the server.

It is ok after POST request notify parent view to create a GET request to get all items that update view after creating? If it is ok when is it ok to use?

User design for many items over a time frame

I would like to represent a sequence of user events (for ex. login events) under a graph. This would typically hold zero to infinite entries.

To represent users I intend to use small icons of, say, roughly 64×64. But how do I represent them with good UX over a timeline ? If for example I simply draw them over a line representing time, there may be blanks and overlaps. If i represent them in fixed space sequence, I loose the information of how much time elapses between events and may need to re-include that anyhow. I’m also concerned about efficiently using space screen, something a linear of small pictures don’t do.

What is the most elegant design for this ? I’m open to all and any suggestion, including fragmenting on several pages, having interactivity like sliders, on-click popups and so on. It’s important that all events time and user are accessible, and it’s important to be able to be able to browse efficiently the timeline in search for a particular time or icon.