When exactly can a caster stop concentrating on a spell?

From Basic Rules

Concentration Some spells require you to maintain concentration in order to keep their magic active. If you lose concentration, such a spell ends.

If a spell must be maintained with concentration, that fact appears in its Duration entry, and the spell specifies how long you can concentrate on it. You can end concentration at any time (no action required).

The rule is very short and only says “at any time (no action required)”. How this “any time” is defined?

An example scenario:

I cast levitate on an enemy to remove them from the battle. Later at his turn, it turns out that he brings a crossbow. The DM declares the attack, but then I interrupt him and say that I end my concentration, so he will fall down and become prone.

Another example scenario:

I cast levitate on myself and fly 30 ft. The enemy then flies and spends all his movement to fly to me to attack me in melee. After he reaches me, I declare ending my concentration, so I can fall back to the ground, preventing him to attack me.

Is this allowed? Can I end concentration conveniently any time, interrupting any currently declared action/event?

What exactly does nfs4_disable_idmapping parameter do?

I’ve been experimenting with user/group ID mapping (translation) in NFSv4. What I want to achieve is name based ID translation, that is independent of the actual UID/GID on the server and clients.

Many guides and articles mention that to have ID mapping working you have to set nfs4_disable_idmapping parameter to 0 (aka N) in the nfs module on client, and nfsd module on the server. However, I didn’t find any information or documentation about what exactly this parameter does.

As an experiment, I configured NFSv4 server and client (with sec=krb5) and I deliberately left these parameters at their default value (mapping disabled). I can verify that the mapping is disabled on server:

$   cat /sys/module/nfsd/parameters/nfs4_disable_idmapping  Y 

and on the client:

$   cat /sys/module/nfs/parameters/nfs4_disable_idmapping  Y 

I created users bob(uid=1002) and sam(uid=1001) on the server, and users bob(uid=1003) and sam(uid=1004) on the client. As you can see, the UIDs do not match, however, the users are still mapped correctly. File created by the bob user on the is seen as owned by bob on the server, and vice versa.

Moreover, if I look at the logs on the client:

nfsidmap[1874]: key: 0x322c739a type: uid value: bob@home.lan timeout 600                                             nfsidmap[1874]: nfs4_name_to_uid: calling nsswitch->name_to_uid                                                       nfsidmap[1874]: nss_getpwnam: name 'bob@home.lan' domain 'home.lan': resulting localname 'bob'                        nfsidmap[1874]: nfs4_name_to_uid: nsswitch->name_to_uid returned 0                                                    nfsidmap[1874]: nfs4_name_to_uid: final return value is 0        

and on the server:

rpc.idmapd[1717]: nfsdcb: authbuf=gss/krb5p authtype=user                                                                                                                    rpc.idmapd[1717]: nfs4_uid_to_name: calling nsswitch->uid_to_name                                                                                                            rpc.idmapd[1717]: nfs4_uid_to_name: nsswitch->uid_to_name returned 0                                                                                                         rpc.idmapd[1717]: nfs4_uid_to_name: final return value is 0                                                                                                                  rpc.idmapd[1717]: Server : (user) id "1002" -> name "bob@home.lan"   

they both suggest that ID mapping is indeed working “by name” rather then “by id”.

So my question is: what is nfs4_disable_idmapping parameter for then, if it seems not to have any observable effect on the ID mapping?

“Custom Scripts” setting inside our tenant, who it works exactly

I spent many days reading about how “Custom scripts” work for sharepoint online, but i can not fully understand it. for example we have this case.

  1. inside SP admin center >> Settings >> we have custom scripts disabled as follow:-

enter image description here 2. now using the office 365 admin (who is also a sharepoint admin), i created 2 sites (modern communication site + classic team site). 3. so now i got these “custom script” setting for the site collections:-

  • our build-in root site collection (which is a classic team site)–> custom scripts is Disabled.
  • the modern site collection –> custom scripts is Disabled.
  • the classic team site which i created –> custom scripts is Enabled!!

so i have the following questions:-

  1. since we have prevent custom scripts inside the “SharePoint admin center”, then how custom script was enabled inside the classic team site i have created?

  2. if we allow custom scripts from the “SharePoint admin center”, then i assume this will affect future site collections, but will it also affect all our current 3 site collections?

  3. if i want to enable custom scripts for our modern communication site collection ONLY. so can i do so? or as a first step i will need to enable custom scripts from “SharePoint admin center” ?

  4. if i want to add a script to a classic page. can i Temporary enable custom script on the intended site >> add the custom script >> disable custom script inside the site collection? will the script keep working as-is even if we disable custom script on the site?

  5. final question inside the “SharePoint admin center” >> “Custom Script”, they use the word “Prevent users” & “Allow users”.. so what do users represent? does it cover office 365 & sharepoint admins? or users refer to non-admin users?

Thanks in advance for any help.

setup any wordpress theme exactly like its demo. for $5

I specialize in WordPress Theme Installation, I can provide theme customization to the exact look and feel as the theme’s demo website, if so desired. My Services Include:WordPress Installation Theme InstallationTheme Demo Setup Plugins Installation SEO Plugins Installation & Configuration Installation of: Any wordpress themesElegant themesWoo themes Mojo themesGenesis themes and many more!

Created: —
Category: WordPress
Viewed: 137

How exactly do “domains of dread” function?

So I’ve never played Curse of Strahd or anything the Ravenloft campaign setting – but I’m working on my own campaign world and I was reading through some texts and found out about domains of dread – they definitely sound like a concept I’d want to implement but I’m not quite sure I understand them? From what I read, it looks like (in Ravenloft) there are a bunch of different “domains” that are all separate from one another kind of like countries are separated?

Are domains of dread separate from the Prime Material Plane? How does one get to it from the aforementioned plane? Is it even possible? If not, is it possible to “summon” the creature who owns the domain into your plane, thus bringing their domain with them?

I know with worldbuilding, pretty much anything goes but I just want to have a bit of a baseline to work from.

A function that is differentiable at exactly two points

As homework we were given 2 questions:

  1. Find a function that is continuous at exactly one point and not differentiable there.

  2. Find a function that is differentiable at exactly two points.

The answer to the first one was somewhat simple – $ f(x) = x*D(x) $ , wherein $ D(x) $ stands for Dirichlet function.

I’ve been thinking about the second question for a while, and someone suggested me the following: $ g(x) = x^2*D(x) $

$ f(x) = (x-1)^2 * g(x) $

Claiming that $ f(x)$ is only differentiable in $ x = 0, x = 1 $ . Why is that?

Where exactly does my code not adhere to the specification of the key and value type?

Task Description

interval_map<K,V> is a data structure that efficiently associates intervals of keys of type K with values of type V. Your task is to implement the assign member function of this data structure, which is outlined below.

interval_map<K, V> is implemented on top of std::map. In case you are not entirely sure which functions std::map provides, what they do and which guarantees they provide, we provide an excerpt of the C++ standard here. (at the end)

Each key-value-pair (k,v) in the std::map means that the value v is associated with the interval from k (including) to the next key (excluding) in the std::map.

Example: the std::map (0,'A'), (3,'B'), (5,'A') represents the mapping

  • 0 -> ‘A’
  • 1 -> ‘A’
  • 2 -> ‘A’
  • 3 -> ‘B’
  • 4 -> ‘B’
  • 5 -> ‘A’
  • 6 -> ‘A’
  • 7 -> ‘A’

… all the way to numeric_limits<int>::max()

The representation in the std::map must be canonical, that is, consecutive map entries must not have the same value: ..., (0,'A'), (3,'A'), ... is not allowed. Initially, the whole range of K is associated with a given initial value, passed to the constructor of the interval_map data structure.

#include <map> #include <limits>  template<typename K, typename V> class interval_map {     std::map<K,V> m_map;  public:   // constructor associates whole range of K with val by inserting (K_min, val)   // into the map   interval_map( V const& val) {       m_map.insert(m_map.end(),std::make_pair(std::numeric_limits<K>::lowest(),val));   }    // Assign value val to interval [keyBegin, keyEnd).   // Overwrite previous values in this interval.   // Conforming to the C++ Standard Library conventions, the interval   // includes keyBegin, but excludes keyEnd.   // If !( keyBegin < keyEnd ), this designates an empty interval,   // and assign must do nothing.   void assign( K const& keyBegin, K const& keyEnd, V const& val ) {          if (!(keyBegin < keyEnd)) return;          std::pair<K,V> beginExtra;         std::pair<K,V> endExtra;         bool beginHasExtra = false;         bool endHasExtra = false;          typename std::map<K,V>::iterator itBegin;         itBegin = m_map.lower_bound(keyBegin);         if ( itBegin!=m_map.end() && keyBegin < itBegin->first ) {             if (itBegin != m_map.begin()) {                 beginHasExtra = true;                 --itBegin;                 beginExtra = std::make_pair(itBegin->first, itBegin->second);             }             // openRange for erase is prevIterator             // insert (prevIterator->first, prevIterator->second) as well!         }          typename std::map<K,V>::iterator itEnd;         itEnd = m_map.lower_bound(keyEnd);         if ( itEnd!=m_map.end() && keyEnd < itEnd->first ) {             endHasExtra = true;             typename std::map<K,V>::iterator extraIt = itEnd;             --extraIt;             endExtra = std::make_pair(keyEnd, extraIt->second);             // closeRange for erase is this iterator             // insert (keyEnd, prevIterator->second) as well!         }          // 4 canonical conflicts:         //   beginExtra w/ mid         //   before-mid w/ mid (beginHasExtra==false)         //   mid w/ endExtra         //   mid w/ after-mid (endHasExtra==false)          bool insertMid = true;         if (beginHasExtra) {             if (beginExtra.second == val)                 insertMid = false;         } else {             if (itBegin != m_map.begin()) {                 typename std::map<K,V>::iterator beforeMid = itBegin;                 --beforeMid;                 if (beforeMid->second == val)                     insertMid = false;             }         }           if (endHasExtra) {             if ( (insertMid && endExtra.second == val) || (!insertMid && endExtra.second == beginExtra.second) )                 endHasExtra = false;         } else {             if ( (insertMid && itEnd!=m_map.end() && itEnd->second == val) || (!insertMid && itEnd!=m_map.end() && itEnd->second == beginExtra.second) )                 itEnd = m_map.erase(itEnd);         }          itBegin = m_map.erase(itBegin, itEnd);         if (beginHasExtra)             itBegin = m_map.insert(itBegin, beginExtra);         if (insertMid)             itBegin = m_map.insert(itBegin, std::make_pair(keyBegin, val));         if (endHasExtra)             m_map.insert(itBegin, endExtra);   }    // look-up of the value associated with key   V const& operator[]( K const& key ) const {       return ( --m_map.upper_bound(key) )->second;   } }; 

Key type


  • besides being copyable and assignable, is less-than comparable via operator<
  • is bounded below, with the lowest value being std::numeric_limits::lowest()
  • does not implement any other operations, in particular no equality comparison or arithmetic operators

Value type


  • besides being copyable and assignable, is equality-comparable via operator==
  • does not implement any other operations


After submitting the code I got You must adhere to the specification of the key and value type given above. Can anyone tell me what I did wrong? I know I should’ve used const_iterator for my iterators but the error is talking about K, V.


The following paragraphs from the final draft of the C++1x ISO standard describe the available  operations on a std::map container, their effects and their complexity.  23.2.1 General container requirements   §1 Containers are objects that store other objects. They control allocation and deallocation of  these objects through constructors, destructors, insert and erase operations.  §6 begin() returns an iterator referring to the first element in the container. end() returns  an iterator which is the past-the-end value for the container. If the container is empty,  then begin() == end();  24.2.1 General Iterator Requirements  §1 Iterators are a generalization of pointers that allow a C++ program to work with different  data structures.  §2 Since iterators are an abstraction of pointers, their semantics is a generalization of most  of the semantics of pointers in C++. This ensures that every function template that takes  iterators works as well with regular pointers.  §5 Just as a regular pointer to an array guarantees that there is a pointer value pointing past  the last element of the array, so for any iterator type there is an iterator value that points  past the last element of a corresponding sequence. These values are called past-the-end values.  Values of an iterator i for which the expression *i is defined are called dereferenceable.  The library never assumes that past-the-end values are dereferenceable. Iterators can also have  singular values that are not associated with any sequence. [ Example: After the declaration of  an uninitialized pointer x (as with int* x;), x  must always be assumed to have a singular  value of a pointer. -end example ] Results of most expressions are undefined for singular  values; the only exceptions are destroying an iterator that holds a singular value, the  assignment of a non-singular value to an iterator that holds a singular value, and, for  iterators that satisfy the DefaultConstructible requirements, using a value-initialized  iterator as the source of a copy or move operation.  §10 An invalid iterator is an iterator that may be singular. (This definition applies to  pointers, since pointers are iterators. The effect of dereferencing an iterator that has been  invalidated is undefined.)  23.2.4 Associative containers  §1 Associative containers provide fast retrieval of data based on keys. The library provides  four basic kinds of associative containers: set, multiset, map and multimap.  §4 An associative container supports unique keys if it may contain at most one element for each  key. Otherwise, it supports equivalent keys. The set and map classes support unique keys; the  multiset and multimap classes support equivalent keys.  §5 For map and multimap the value type is equal to std::pair<const Key, T>. Keys in an  associative container are immutable.  §6 iterator of an associative container is of the bidirectional iterator category. (i.e., an iterator i can be incremented and decremented: ++i; --i;)  §9 The insert member functions (see below) shall not affect the validity of iterators and  references to the container, and the erase members shall invalidate only iterators and  references to the erased elements.  §10 The fundamental property of iterators of associative containers is that they iterate  through the containers in the non-descending order of keys where non-descending is defined by  the comparison that was used to construct them.  Associative container requirements (in addition to general container requirements):  std::pair<iterator, bool> insert(std::pair<const key_type, T> const" t) Effects: Inserts t if and only if there is no element in the container with key equivalent to  the key of t. The bool component of the returned pair is true if and only if the insertion  takes place, and the iterator component of the pair points to the element with key equivalent  to the key of t. Complexity: logarithmic  iterator insert(const_iterator p, std::pair<const key_type, T> const" t) Effects: Inserts t if and only if there is no element with key equivalent to the key of t in  containers with unique keys. Always returns the iterator pointing to the element with key  equivalent to the key of t.  Complexity: logarithmic in general, but amortized constant if t is inserted right before p.  size_type erase(key_type const" k)   Effects: Erases all elements in the container with key equivalent to k. Returns the number of  erased elements. Complexity: log(size of container) + number of elements with key k  iterator erase(const_iterator q)  Effects: Erases the element pointed to by q. Returns an iterator pointing to the element  immediately following q prior to the element being erased. If no such element exists, returns  end(). Complexity: Amortized constant  iterator erase(const_iterator q1, const_iterator q2) Effects: Erases all the elements in the left-inclusive and right-exclusive range [q1,q2).  Returns q2. Complexity: Amortized O(N) where N has the value distance(q1, q2).  void clear()  Effects: erase(begin(), end()) Post-Condition: empty() returns true Complexity: linear in size().  iterator find(key_type const" k); Effects: Returns an iterator pointing to an element with the key equivalent to k, or end() if  such an element is not found. Complexity: logarithmic  size_type count(key_type constquot;& k)  Effects: Returns the number of elements with key equivalent to k Complexity: log(size of map) + number of elements with key equivalent to k  iterator lower_bound(key_type const" k) Effects: Returns an iterator pointing to the first element with key not less than k, or end()  if such an element is not found. Complexity: logarithmic  iterator upper_bound(key_type const" k) Effects: Returns an iterator pointing to the first element with key greater than k, or end()  if such an element is not found. Complexity: logarithmic  23.4.1 Class template map  §1 A map is an associative container that supports unique keys (contains at most one of each  key value) and provides for fast retrieval of values of another type T based on the keys. The  map class supports bidirectional iterators. map element access  T" operator[](const key_type" x); Effects: If there is no key equivalent to x in the map, inserts value_type(x, T()) into the map.  Returns: A reference to the mapped_type corresponding to x in *this. Complexity: logarithmic.  T" at(const key_type" x); const T" at(const key_type" x) const; Returns: A reference to the element whose key is equivalent to x. Throws: An exception object of type out_of_range if no such element is present. Complexity: logarithmic. 

How does the recovery strategy of PostgreSQL exactly work?

I’m testing and trying to figure out how the backup and recovery strategy in PostgreSQL 11 works but it does not work as expected. When I recover the backup, I don’t get the correct state. I get any state after a given timestamp. In detail:

I have this setup in database:

wal_level = replica  max_wal_senders = 10 archive_mode = on 

I have executed the following commands:

postgres=# select pg_create_physical_replication_slot('slot1'); pg_basebackup -D /media/extern/postgresql_basebackup/ pg_receivewal -D /media/extern/postgresql_archive -S slot1 -v 

pg_receivewal is writing into postgresql_archive, this seems to work.

  • then I insert something into the database, let’s say at 16:21.
  • I wait some minutes, let’s say until 16:27 and delete all the insert.

Then I want to recover the inserts by doing…

service postgresql stop 

(do I need to stop pg_receivewal as well)?

# mv main main.before_recovery # cp -rp /media/extern/postgresql_basebackup main  nano /var/lib/postgresql/11/main/recovery.conf 

I add the following content

restore_command = 'cp -r /media/extern/postgresql_archive/%f %p' recovery_target_time='2018-01-06 16:22:00' 

Then I execute

# chown postgres:postgres recovery.conf  # chmod 700 recovery.conf   service postgresql start 

After startup, the file changes to recovery.done, but the state in database is wrong. It didn’t restore the data. The database is still empty, so the PITR didn’t work, why?

What should I do In case if everything was successful. I’m unsure about these questions:

  • Creating a new slot2 by executing pg_create_physical_replication_slot(‘slot1’); and streaming from this slot by pg_receivewal -D /media/extern/postgresql_archive -S slot2 -v?
  • Doing a pg_receivewal -D /media/extern/postgresql_archive -S slot1 -v again?
  • Do I have to delete anywhen any data in postgresql_archive? (-> Probably not)
  • When do I have to create another base backup?
  • Do I have to take care about anything else while this process?
  • Do I have to execute select pg_switch_wal(); after recovery?
  • How do I start a new ‘timeline’ after recovery?

How exactly do I use RawDigger to evaluate signal-to-noise?

I have a trial copy of RawDigger installed, and I understand that for my purposes I should shoot the same subject at different apertures to see if the SNR decreases at faster settings. But how exactly do I read the screen in RawDigger to evaluate the results? I see various acronyms and numeric values in the attached screenshot, but they are meaningless to me. (Note, the photo is just an example; I know it’s not the right kind of image to use for this.) Sample RawDigger display