Sql Server 2012 can a subscriber be a publisher at same time

I want to setup a topology for replication. The scenario is such that a subscriber is subscribed to transaction replication based publisher(distributor running on publisher). I want this subscriber to be a publisher to another subscriber. I want the distributor to be on publisher instance(push). can some body help me out. Regards

Solving time dependent boundary conditions heat PDE

I am attempting to solve the heat equation $ \frac{\partial T}{\partial t}=\nabla^2T$ , where $ T=T(x,y,z,t)$ , subject to the following boundary conditions:

$ \frac{\partial T}{\partial x}|_{x=10}=\frac{\partial T}{\partial x}|_{x=-10}=0$

$ \frac{\partial T}{\partial y}|_{y=10}=0$

$ T(0,0,z_{crit}(t),t)=f(t)$ where $ z_{crit}(t)=t$ and $ f(t)=e^{-t}$

$ \frac{\partial T}{\partial y}|_{y=0}=\frac{\partial T}{\partial z}|_{z=0}=0$

But my attempted code has not worked properly and I encounter frequently many different errors.

Is there any way to fix this issue?

Thanks in advance.

How can I improve combat so my players don’t always use the strategy of focusing fire on one enemy at a time until it’s dead?

I’m DMing a campaign on 5e with a group of four players. We’re all experienced in RPG in general but not specifically on 5e.

Players are Level 4. Wizard, Fighter, Rogue and Druid, Circle of the Moon.

My players have come to the conclusion that, given the mechanics of the game, is much more effective to focus all the fire power on a creature at a time and avoid spreading damage. Their logic is it really doesn’t matter if a creature has 1 or 80 HP left, as longs a it has over 0, he has all capacity to do damage. In effect, creatures are binary, they are either alive and therefore have full capacity to act, or death, in which case they don’t.

Unfortunately I agree with this assessment but I feel it makes the game less fun. Not because I’m looking for super realistic combat but because it limits the combat strategy to “drop them one at a time”.

As such, they tend to not distribute their efforts or engage separately but, instead, swarm into a single enemy, concentrate all the attacks and then move to the next. This feels to me like the more effective tactic but also the least “fun” and role playing way of doing combat.

Is my players interpretation wrong or am I handling the combat in the wrong way? What am I missing?

Time Complexity for Nearest Neighbor Searches in kd-trees

Nearest neighbor searches in kd-trees run in logarithmic time, as shown by Friedman et al. However, I have some difficulty to fully understand the proof.

In order to calculate the average number of buckets examined by the k-d tree searching algorithm described above, it is necessary to calculate the average number of buckets overlapped by the region $ S_m(X_q)$ .

$ S_m(X_q)$ is the smallest ball centered at $ X_q$ that exactly contains the $ m$ points closest to $ X_q$ .

I don’t get why only the regions overlapping $ S_m(X_q)$ are examined. Consider the following example, where we want to compute the black point that is closest to the orange point $ X_q$ . $ S_m(X_q)$ is the green circle in this case, so according to the proof the algorithm should only search both lower buckets.

enter image description here

However, the searching algorithm will find as first candidate solution the black point in the lower right region. Then, it will also search regions that intersect the blue circle, in particular the upper right region.

So, isn’t it too restricted to compute only the buckets that intersect the green circle?

Weighted Activity Selection Problem with allowing shifting starting time

I have some activities with weights, and I would like to select non overlapping activities by maximizing the total weight. This is known problem and solution exists.

In my case, I am allowed to shift the start time of activities in some extend while duration remains same. This will give me some flexibility and I might increase my utilization.

Example scenario is something like the following:

(start, end, profit) a1: 10 12 120 a2: 10 13 100 a3: 14 18 150 a4: 14 20 100 

Without shifting flexibility, I would choose (a1, a3) and thats it. On the other hand I might shift the intervals by 5 units (In real case even 1000x greater than original task duration) to the left/right. In that case I might come up this schedule and all tasks can be selected.

a1: 8 10 120 (shifted -2 to left) a2: 10 13 100 a3: 14 18 150 a4: 18 23 100 (shifted +4 to right) 

Are there any feasible solution to this problem?

How to determine time complexity with a simple way?

I’m learning about time complexity but all the cases we did in class were rather simple. Now I’m working on my home work and the cases our techer let us have was: f(n) = 4n(n + 2 log^2 n2) + (e^−n) + 8 * sin(2πn/256)

Is there a simple way how a I can determine which one of this is the true one? Because this look much more complicated then the ones we did in our class.

i) f(n) =o(nlog2*n)

ii) f(n) =o(2^n)

iii) f(n) =o(n^4)

iv) f(n) =O(n*log2 n^n)

v) f(n) =O(2n + 1)

Time Complexity of Subset Problem

The Subset Exercise taken from LeetCode:

Example: For Input nums = [1,2,3] Return Output:     [       [3],       [1],       [2],       [1,2,3],       [1,3],       [2,3],       [1,2],       []     ] 

has as backtrack solution:

public List<List<Integer>> subsets(int[] nums) {     List<List<Integer>> list = new ArrayList<>();     Arrays.sort(nums);     backtrack(list, new ArrayList<>(), nums, 0);     return list; }  private void backtrack(List<List<Integer>> list , List<Integer> tempList, int [] nums, int start){     list.add(new ArrayList<>(tempList));     for(int i = start; i < nums.length; i++){         tempList.add(nums[i]);         backtrack(list, tempList, nums, i + 1);         tempList.remove(tempList.size() - 1);     } } 

The solution has been taken here. I would like to know what the time and space complexities of this solution are. Apparently, the time complexity is O(N * 2^n). The N come from the tempList.add() operation, I have a problem understanding where the 2^N come from.