What is the difference between these using statements of interop in c#

I need to generate reports in Word from my c# application. Therefore I am exploring the Interop.Word library. I am now starting to test out how it works and such. But the first thing that I was wondering about was what the difference is between the following two using statments.   The first one is just how I figured I had to include the libraries and I have seen in many examples online:   using Microsoft.Office.Interop.Word;   The other one I have found on the MDSN , which is the following statement:   using Word = Microsoft.Office.Interop.Word;   Can anyone explain the difference and which one should I use (since they both seem to have the same result).


Show that $7\mid(3^{2n+1}+2^{n+2})$ for all $n\in\mathbb{N}$

Prove that the following is true for every $n∈ℕ$: $$7\mid(3^{2n+1}+2^{n+2}).$$  I've noticed $$3^{2n+1}+2^{n+2} =3^{2n} \cdot 3+2^{n} \cdot 4.$$ Any suggestions how to continue from there to get something like $7k$ for $k\in\mathbb{N}$. Thank you in advance!


Multivariate multiple regression validation

In R, I'm running a linear model of the form:  fit <- lm(cbind(Y1,Y2,Y2) ~ X1 + X2 + X3, data=regression_table);   Then I'm using predict to generate predictions;  predicted_vals <- predict(fit, test_data);   Does any one have suggestions on how I should go about evaluating the training error of this multivariate model? I understand the notion of cross validation for univariate multiple models, though I'm not sure how to go about go about doing something similar for a multivariate model.


How to call child component controller function/helper from Parent Component Controller

I have requirement to call a child controller function from parent controller whenever the event occurs in parent side.  for e.g  ABC is parent component and DCE is child component, this child component has Span of Text tag and X symbol. when I click on x it is clearing the value using child controller. ABC parent component has Form element and child component is one one of in form.  My requirement is to clear the this child component value when parent component button is clicked.  here is the below sample code of what am trying because i cannot post actual code here  ParentComponent.cmp     <aura:registerEvent name="clrValues" type="c:ClearValues"/>     <div>          <c:ChildComponent textValue="test"/>          <ui:button label="Save"/>          <ui:button label="Clear" press="{!c.clear}"/>           </div>  </aura:component>   ParentController.js  ({     clear : function(component, event, helper) {         var evtFire = component.getEvent("clrValues");          evtFire.fire();     } })   ClearValues.evt  <aura:event type="APPLICATION" description="Event template" />   ChildComponent.cmp  <aura:component >     <aura:handler name="setValues" event="c:ClearValues" action="{!c.clear}"/>     <aura:attribute name="textValue" type="String" default="test"/>     <div >     <ui:inputText label="Expense Name" value="{!v.textValue}" aura:id="input1"/>     </div>  </aura:component>   ChildController.js  ({     clear : function(component, event, helper) {         helper.clearValues(component,event);     } })


What are other ways of saying "to keep moving forward in times of hardship?"

I'm looking for another way to describe the act of forcing yourself through a s*** week


How does electricity travel near the speed of light if electrons drift at a snail pace?

I was in a reddit argument with someone who said electrons didn't flow at the speed of light in a circuit. Then he linked the Wikipedia page for drift velocity and defeated me in one fell swoop. Now, my entire understanding of electricity and electrons has been thrown upside down. I thought that electron flow in a circuit was essentially like pushing a chain of balls that each bounce off each other, and since electrons travel near the speed of light, this was why electricity was nearly instantaneous in a circuit. But, it seems that the electrons simply carry the electromagnetic wave coming from the power source by use of their own electrical field. Since electromagnetic waves can travel at the speed of light, is this how the effects of electricity travel independently of the electron drift velocity?


I have the following user who keeps running very complex analytics queries, that usually take 1m each query:  Id  User    Host            db  Command Time    State                 Info 97  tvs0XXX ec2...com:47703 ax  Query   55      Creating sort index   SELECT...   Is there a way to set a SELECT timeout for the tvs0000 user above to 5 seconds? How would I do this?


Does the fundamental group detect the unlink?

It is known that the unknot is the only knot whose complement has fundamental group $\mathbb{Z}$.  Does this fact generalize to links?  That is, suppose that $\ell= \ell_1 \cup \dots \cup \ell_n$ is an $n$-component link in $\mathbb{R}^3$ such that $\pi_1(\mathbb{R}^3-\ell)$ is a free group on $n$-generators. Is $\ell$ the unlink on $n$-components?


Can a runner play events during the run? Timing structure of a run says that paid abilities could be played. What about events?


Rephrase Neural Network : Find the Fittest Word for Given Meaning/Explanation

I am a sophomore student who's interested in deep learning and its method layering up some linear/non-linear operations and constructs up the complex function through the network.  I'd like to comprise a network that finds the word upon the given explanations :  e.g.1 input: a spherically shaped fruit which tastes sour and sweet and gets red when matured well output: apple  e.g.2, input: to make up the boundary between multiple options for the base of one's behavior or decision output: determine.  So basically it's a classification problem but the class might be more than 20,000.  I'd like to name this task "rephrase neural network".  Any good reference or starting point, or, any network recommendation for comprising this neural network?


Commuting matrix exponentials: necessary condition.

In related questions (,  and ), it was shown that if $A$ and $B$ commute, then $e^A$ and $e^B$ also commute (and incidentally $e^A e^B = e^{(A+B)}$). Here, the commutative property of A and B is a sufficient condition.  Is it also a necessary condition? If no, is there another necessary condition for $e^A$ and $e^B$ to commute?


Minecraft item right/left click detection

Is it possible to create an item in Minecraft so that, when the player right's click on a certain block with it, their position (x,y,z) becomes (x,y,z) + (n0,n1,n2)? I know something like this is possible, after seeing  with command blocks, but I'm not sure as to the solution. I am running Minecraft version 1.8.7/1.8.x. Example Create a stick named YELLOW so that when the player right-clicks on yellow wool they will be teleported n units to the south. (I am trying to create a maze with 4 different wool colours that will move you to a different square on a respective maze.)


Let $G$ be a group in which $a^2=e$ for all elements of $a$ of $G$.   Show that $G$ is Abelian.  I need help on this problem.  Appreciated!


Linear diophantine equation $100x - 23y = -19$

I need help with this equation: $$100x - 23y = -19.$$  When I plug this into Wolfram|Alpha, one of the integer solutions is $x = 23n + 12$ where $n$ is a subset of all the integers, but I can't seem to figure out how they got to that answer.


How the sequence $S_n=\frac{1}{2}({S_{n-1}+S_{n-2}}), \forall n>2,$ converge?

If $S_n=\frac{1}{2}({S_{n-1}+S_{n-2}}), \forall n>2,$ then show that ${S_n}$ converges.    I have proved that sequence converges and I understood all the steps except the last one. First, I assumed that the $S_1<S_2$ which leads to a sequence such that it has two subsequences. One of even order and another of odd order. The odd ordered subsequence is increasing and bounded above by $S_2$ and hence it is convergent and similarly the even ordered subsequence also converges. Also, both subsequence converge to the same limit. We can check this by simple substitution of two different expression in the above sequence and then both expression will turn out to be same.   I understood all the steps of the book but then the following expression,I couldn't understand:  $S_{k}+ \frac {1}{2}S_{k-1}=\frac{1}{2}(S_1+2S_2).$  I couldn't not understand,how the book came to the above mentioned step. Any help or hint would be great. Thanks in advance


cp - Does not recognizning accent characters

I have written a simple script, to copy some files, and change there name:    #!/bin/bash for directory in ./../old_files/*; do     DIR_NAME=$(basename $directory)     for file in $directory/*; do         filename=$(basename -- "$file")         cp -- $file "./${DIR_NAME}_m*${filename}" 1>/dev/null     done done   And it's working great with one problem. If file has an accent or name is escaped with slash, it returns: cp: target 'xxx.pdf' is not a directory  Any ideas how to solve this?


Given $f$ a real differentiable function, $2 \pi$ periodic such that $\int_{0}^{2 \pi} f(t) dt=0$ show that:  $\int_{0}^{2 \pi} (f(t))^2 dt \le \int_{0}^{2 \pi} (f'(t))^2 dt$. When does equality hold?


Compute the limit $$ \lim_{n \to \infty} \frac{\sqrt[n]{(n+1)(n+2)\cdots(2n)}}n $$  How can this be done? The best I could do was rewrite the limit as $$ \lim_{n \to \infty} \left(\frac{n+1}n \right)^{\frac 1n}\left(\frac{n+2}n \right)^{\frac 1n}\cdots\left(\frac{2n}n \right)^{\frac 1n}  $$  Following that log suggestion in the comments below: \begin{align} &\ln \left(\lim_{n \to \infty} \left(\frac{n+1}n \right)^{\frac 1n}\left(\frac{n+2}n \right)^{\frac 1n}\cdots\left(\frac{2n}n \right)^{\frac 1n} \right) \\ &= \lim_{n \to \infty} \ln \left( \left(\frac{n+1}n \right)^{\frac 1n}\left(\frac{n+2}n \right)^{\frac 1n}\cdots\left(\frac{2n}n \right)^{\frac 1n} \right) \\ &= \lim_{n \to \infty} \left(\ln \left(\frac{n+1}n \right)^{\frac 1n} + \ln\left(\frac{n+2}n \right)^{\frac 1n} + \cdots + \ln\left(\frac{n+n}n \right)^{\frac 1n} \right) \\ &= \lim_{n \to \infty} \sum_{i=1}^n \ln \left(\frac{n+i}n \right)^{\frac 1n} \\ &= \lim_{n \to \infty} \frac 1n \sum_{i=1}^n \ln \left(1 + \frac in \right) \\ &= \int_1^2 \ln x \, dx \\ &= (x \ln x - x)\vert_1^2 \\ &= (2 \ln 2 - 2)-(1 \ln 1-1) \\ &= (\ln 4-2)-(0-1) \\ &= \ln 4-1 \\ &= \ln 4 - \ln e \\ &= \ln \left( \frac 4e \right) \end{align}  but I read from somewhere that the answer should be $\frac 4e$.


rtcwake: command not found | ubuntu 14.10

when i use rtcwake command:  rtcwake: command not found   Searching yields nothing:  $ sudo apt-cache search rtcwake $ sudo apt-get install rtcwake Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package rtcwake   apt-cache policy util-linux:  util-linux:   Installed: 2.25.1-3ubuntu4   Candidate: 2.25.1-3ubuntu4   Version table:  *** 2.25.1-3ubuntu4 0         500 http://mirror.rol.ru/ubuntu/ utopic/main amd64 Packages         100 /var/lib/dpkg/status


Why is 'this' undefined inside class method when using promises?

I have a javascript class, and each method returns a Q promise. I want to know why this is undefined in method2 and method3. Is there a more correct way to write this code?  function MyClass(opts){   this.options = opts;    return this.method1()     .then(this.method2)     .then(this.method3); }  MyClass.prototype.method1 = function(){   // ...q stuff...    console.log(this.options); // logs "opts" object    return deferred.promise; };  MyClass.prototype.method2 = function(method1resolve){   // ...q stuff...    console.log(this); // logs undefined    return deferred.promise; };  MyClass.prototype.method3 = function(method2resolve){   // ...q stuff...    console.log(this); // logs undefined    return deferred.promise; };   I can fix this by using bind:  function MyClass(opts){   this.options = opts;    return this.method1()     .then(this.method2.bind(this))     .then(this.method3.bind(this)); }   But not entirely sure why bind is necessary; is .then() killing this off?


What capture card recording software is available?

I'm trying to find good game capture software to use my climax digital vcap 303 with, the disc it came with didn't work (ArcSoft Showbiz)after downloading wine.   I have downloaded TVtime television Viewer but I can't seem to get it to work. The answers in  didn't help.


How to give names/labels to topics in LDA

I want to give labels to different topics created using LDA. I don't want to do it manually. I saw some papers on automatic labeling but I am still confused.   How can I use the information produced by LDA to automatically generate names to the topics generated?


click() and on("click") don't work when pressed on element (jQuery)

I use function to show dialog with custom headline and text in it. (jQuery)  function callDialog(headline, text_in) {         $("#spinner-wrapper").after("

" + headline + "

" + text_in + "

<button style='float: right;' id='Dialog_Button' class='btn btn-primary'>Okay</button>

");     }   (Dialog shows exactly how I want) And I use function to hide it, but this function don't work for some reasons. I tried using click() and on("click", function() {}); etc...  $('.darker-background').on('click', function(){         alert("Clicked");         $('#Custom_Dialog').fadeOut(500);     });


Ubuntu 16.04.2 on Intel NUC7i3, Bluetooth not working

Some days ago i bought a NUC7i3BNK and installed Ubuntu 16.04.02 with Kernel 4.8. Bluetooth does not work.  My knowledge is not so deep, but I would say the driver is missing. Does anyone have a solution?  dmesg | grep Blue  [    3.000117] Bluetooth: Core ver 2.21 [    3.000130] Bluetooth: HCI device and connection manager initialized [    3.000132] Bluetooth: HCI socket layer initialized [    3.000134] Bluetooth: L2CAP socket layer initialized [    3.000139] Bluetooth: SCO socket layer initialized [    3.013961] Bluetooth: HCI UART driver ver 2.3 [    3.013962] Bluetooth: HCI UART protocol H4 registered [    3.013963] Bluetooth: HCI UART protocol BCSP registered [    3.013964] Bluetooth: HCI UART protocol LL registered [    3.013964] Bluetooth: HCI UART protocol ATH3K registered [    3.013965] Bluetooth: HCI UART protocol Three-wire (H5) registered [    3.013990] Bluetooth: HCI UART protocol Intel registered [    3.014001] Bluetooth: HCI UART protocol BCM registered [    3.014002] Bluetooth: HCI UART protocol QCA registered [    3.014002] Bluetooth: HCI UART protocol AG6XX registered [    3.061238] Bluetooth: hci0: Bootloader revision 0.0 build 26 week 38 2015 [    3.077988] Bluetooth: hci0: Device revision is 16 [    3.077990] Bluetooth: hci0: Secure boot is enabled [    3.077990] Bluetooth: hci0: OTP lock is enabled [    3.077991] Bluetooth: hci0: API lock is enabled [    3.077992] Bluetooth: hci0: Debug lock is disabled [    3.077993] Bluetooth: hci0: Minimum firmware build 1 week 10 2014 [    3.078594] Bluetooth: hci0: Failed to load Intel firmware file (-2) [    3.357259] Bluetooth: hci0: Bootloader revision 0.0 build 26 week 38 2015 [    3.358365] Bluetooth: hci0: Device revision is 16 [    3.358366] Bluetooth: hci0: Secure boot is enabled [    3.358367] Bluetooth: hci0: OTP lock is enabled [    3.358368] Bluetooth: hci0: API lock is enabled [    3.358368] Bluetooth: hci0: Debug lock is disabled [    3.358370] Bluetooth: hci0: Minimum firmware build 1 week 10 2014 [    3.358394] Bluetooth: hci0: Failed to load Intel firmware file (-2) [    3.486934] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [    3.486935] Bluetooth: BNEP filters: protocol multicast [    3.486939] Bluetooth: BNEP socket layer initialized  lsusb  Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 8087:0a2b Intel Corp.  Bus 001 Device 004: ID 045e:0745 Microsoft Corp. Nano Transceiver v1.0 for Bluetooth Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub   The Nano Tranceiver is  for my wireless keyboard and mouse. It makes no difference if I use another wireless keyboard:  Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 8087:0a2b Intel Corp.  Bus 001 Device 006: ID 24ae:2010   Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


How do I convert a Notepad++ Scintilla Regular Expression that matches a newline to Python re?

I have the text below from a file.  I have also tried it from within the program as a string (using '''mytext''').  RECORD1  Sed similique nostrum quibusdam minus. Rerum repudiandae et ipsum numquam commodi repellendus. Aut minima ratione vel  beatae minima reprehenderit provident neque. Earum quam temporibus repudiandae quidem officiis RECORD2 Sed similique nostrum quibusdam minus. Rerum repudiandae et ipsum numquam commodi repellendus. Aut minima ratione vel  beatae minima reprehenderit provident neque. Earum quam temporibus repudiandae quidem officiis RECORD3   It is a long established fact that a reader will be distracted by the readable content of a page when looking at its  layout.  RECORD4    If I use Notepad++'s find with,  (RECORD.*?\s).*?(?=(RECORD.*?\s)) (and I check newline)  I can match from RECORDx to just before the next RECORDx. In other words, I get this below because of my look ahead.  RECORD1  Sed similique nostrum quibusdam minus. Rerum repudiandae et ipsum numquam commodi repellendus. Aut minima ratione vel  beatae minima reprehenderit provident neque. Earum quam temporibus repudiandae quidem officiis   So I only get the Record which is what I need.  It does this with the positive look ahead (?=(RECORD.*?\s)) and "match newline" in Notepad++.  This does not seem to work in Python, and I do not know how to format it correctly.  How do I do a look ahead in Python like I did in Notepad++?  I have looked at this,   But I am not sure what to do.  This is my Python and it returns to the prompt with nothing.  I know re is working because I can do things like .* and it works fine, or even (RECORD.*?\s) to return just the literal word RECORD.  import re regex = r"(RECORD.*?\s).*?(?=(RECORD.*?\s))" filepath = 'test.txt' with open(filepath) as fp:     data = fp.read() matches = re.finditer(regex, data) for matchNum, match in enumerate(matches):     matchNum = matchNum + 1      print ("Match {matchNum} was found at {start}-{end}: {match}".format(matchNum = matchNum, start = match.start(), end = match.end(), match = match.group()))      for groupNum in range(0, len(match.groups())):         groupNum = groupNum + 1          print ("Group {groupNum} found at {start}-{end}: {group}".format(groupNum = groupNum, start = match.start(groupNum), end = match.end(groupNum), group = match.group(groupNum)))   (I did the actual regex and the readfile, but most of the rest is generated from )  Among other places, I have looked here, , and I have tried various pattern combinations in Python and Notepad++.


When a magus uses spellstrike, can they decide the order for resolving the weapon damage and spell effect?

When a  makes a successful hit with spellstrike, it is ambiguous whether the weapon damage resolves before or after the effects of the spell.     If successful, this melee attack deals its normal damage as well as the effects of the spell   A  asks whether the order is specified by the rules, which it is not, and the accepted answer recommends that the GM arbitrate. I am asking whether the magus can, at the same time they make the spellstrike, choose this order.  There are scenarios where it would be advantageous to resolve the weapon damage before the spell, and vice versa:    Example 1: Alice the magus uses spellstrike to deliver  against Bob, who is at low HP.  Depending on how much HP Bob has left, Alice would regain some temporary HP from the vampiric touch effect:     You can’t gain more than the subject’s current hit points + the subject’s Constitution score (which is enough to kill the subject).   If the weapon damage resolved first, Bob would have less HP remaining before the vampiric touch resolves, and Alice would get less temporary HP. Whereas if the vampiric touch resolves first, Alice could get a lot of temporary HP, and then the weapon damage would resolve.  So in this case, Alice wants the spell effect to resolve before the weapon damage.    Example 2: Alice's scimitar is both  and , and she wants to use spellstrike to deliver some spell that involves a saving throw.  If the weapon damage resolved first, Bob might be shaken, and take a -2 penalty to that saving throw, which means Bob is more likely to fail against the spell. So in this case, Alice wants the weapon damage to resolve before the spell.    Can the magus choose which one resolves first? Or does this power lie with the GM? Or is there some errata or FAQ that I have overlooked?


Create a callable object with arguments already supplied in Python

Essentially I am trying to pass arguments to a function but defer the execution that function until later. I don't want to delay by some amount of time or I would just sleep. Here's the usage I'm going for  import requests  def test_for_active_server(server_address):     response = requests.get(server_address)  try_n_times(func, expected_error, n_iterations):     for i in range(n_iterations):         try:             func()             break         except expected_error:             continue     else:         return False     return True  try_n_times(     create_callable(test_for_active_server("http://localhost/"),       requests.ConnectionError, 10)   The problem here of course is that when I call test_for_active_server("http://localhost/") it will just run right away so the argument to create_callable will just be None. I believe I could do this with something like  def create_callable(func, func_args: List[str], func_kwargs: Dict[str, str], *args):     def func_runner():         func(*args, *func_args, **func_kwargs)     return func_runner   and then use it as  create_callable(test_for_active_server, "http://localhost")   But this is rather awkward. Is there a better way to do this?


I am trying to add biber to QuickBuild in Kile and I tried following the instructions in  post. However, seems like the instructions are for a different version of Kile. Could someone help me understand what to include for in the blank spaces of the screenshots I've attached. Thank you!


What if the boss or the profiteur connect to the gold?

I have this situation: The boss has flipped the gold card with a path card. The path there was blocked by both a green and a blue card. We had one profiteur, a blue dwarf, a green dwarf, a sabotuer and a boss. Who wins and how much gold? I found  with an answer to a different question by the creator of the game, where it states that the boss would get 4 points but I am still confused, I can't find it anywhere on the rules how the boss would get 4 points from this situation. More than that, what if the profiteer flips the gold card, what happens then? EDIT : I'm still confused. Rules say that if ONLY ONE dwarf wins, he wins 5 gold, if 2 dwarves win, then it's 4 gold each. Why does he win 4 gold? Does the profiteer also win if he is the one flipping the gold card? How much? Do they both get 4 gold each? 5 gold to boss and 3 to profiteer or what? EDIT2 : So if I have a blue dwarf, a boss and a profiteer in the game, there's just 1 dwarf counted as winner, that's 5 gold for him, 4 for boss and 3 for profiteer. But if I have just a boss and a profiteer, if any of them flip the gold card, then it's 2 winners and they get 3 - boss and 2 - profiteer? In conclusion when there's no dwarves to get to the gold, boss and profiteer are both counted as winning dwarves regardless, but when there are colored dwarves, then these two are not included as winners? I don't even want to include geologists in these situation.. My opinion is that you can interpret these rules as you want and that's a huge slip from the creator. I for one, agree that if neither saboteurs or colored dwarves get to the gold, then noone gets anything (except geologists where it's clear what they get). This messy slip up can REALLY ruin friendships...


How can get my site out of maintenance mode?

I moved my site from one server to another in the same way I moved another site. But it won't get out of maintenance mode.  I can access phpMyAdmin and I can access the server files easily.  I've tried /user and /q=user.  Any suggestions?


The question about the GeForce RTX2070 Super (8Gb) video card: I want to ask - why is it on the render in a blender with CUDA enabled, GPU enabled in Cycles render tabs, Featura support set - gives out only 10-40 percent of power (40% - at the time of launch, through 3 seconds falls less than 10% (I look at the loading of the video card in the task manager))? Is it possible to give her a load close to 100%? My system: Windows 10 Enterprise LTSC, up-to-date graphics card driver, blender 2.92


How to let the review rating appear in Google Search as follows?


search and replace 1 or more spaces after a period of a files to 2 spaces

Q: What command would you give to print (display on the screen) the corrected text of userNotes.txt with all sentence endings having required two blanks before the start of the next sentence?  here is my code  sed 's/.\s/.\s\s/'    but this also changed the line where it ended with dot and 2 spaces to dot and 3 spaces.


Limit elements from a list in python 2.7

I have a python list of 300+ elements. I am trying to limit the print of the elements from the list, in order to show only 10 at a time.  Here is an example with only 5 elements inside a list, and I want to show just 2:  items = ["one", "two", "three", "four", "five"]  max_num = 2  for item in items:  # here I am not sure how I restrict the number elements from items   # do something


Today Xampp suddenly stopped working.  When I try to start xampp, then mysql is not running:    After browsing for this issue, I found that     sudo service mysql start   should solve it. However, this casuses the error mentioned in the subject line:     Failed to start mysql.service: Unit mysql.service not found.   What happend and how to fix it? I tried to restart my device but the problem remains.


Poisson or Gamma distribution for density or encounter rate data?

I am unsure whether turning count data into density still makes Poisson as the appropriate distribution for modelling.  If a given response data are, for example, counts of animals, then such data are best modelled using a Poisson (or quasi-Poisson) distribution.  If the response data are continuous (but bound by zero), then the gamma distribution is likely appropriate.  But what happens when data from counts are turned into density (number of animals per unit area) or encounter rate (number of animals per unit of effort)? Is Poisson distribution still appropriate? Or would one need to use a gamma (or some other) distribution?  I assume it should still be Poisson (or quasi-Poisson, in case of overdispersion).


SQL Server Standard 2016 Service Pack and Cumulative Update

We are currently using SQL Server 2016 Standard Edition with ALWAYS-ON High Availability. We have two different clusters of SQL servers. We need to update it to the latest version of SQL (As per my research Cumulative Update package 13 (CU13) for SQL Server 2016 SP)  Cluster 1 - Currently on Microsoft SQL Server 2016 (SP2-CU4) (KB4464106) - 13.0.5233.0 (X64)   Cluster 2 - Currently on Microsoft SQL Server 2016 (SP1-CU12) (KB4464343) - 13.0.4541.0 (X64)  Query 1 - Can we update SP1-CU12 to directly SP2-CU13  Query 2 - Can we update SP2-CU4 to directly SP2-CU13  Query 3 - What steps should be taken before and after upgrading  Query 4 - What should be the roll-back plan, incase of failure  Any other word of advice or caution for someone doing for the first time will be appreciated.


Derivation of pressure gradient stellar equation

I am trying to understand how to derive the following formula:  $\frac{dP(r)}{dr}=-\frac{GM(r_<)\rho(r)}{r^2}$  The notes are as follow:  Consider a star with COM and a shell:  $P_1 - P_2 = -{\large\frac{dP}{dr}}\,dr$  ${\large\frac{dP}{dr}} + g\rho = 0$ ( My main issue with the derivation is unsure where this comes from.)  Then if we take $g = {\large\frac{Gm}{r^2}}$ and substitute into the above equation, we get the expected result.  If anyone could explain this derivation to me or an alternative one, it would be much appreciated.


How do I get the position at time $t$, if acceleration depends on position?

In my visit to more realistic particle motion animation, $F=\frac{kq_1q_2}{d^2}$, $F=ma$, so: $$a=\frac{kq_1q_2}{md^2}$$ My velocity, integrating the above (from a site because I forgot how to do it), is $v=-kq_1q_2md+v_0$. Curiously, the integral of that, which should give displacement (!), is $d=d_0+(v_0d)-(kq_1q_2/m)(ln|d|)$. Does that work? If so, what do I do to get $v$, $d$ or $a$ at a certain time t? (I thought of getting $W=F\cdot d$ and trying to connect work to time thru another equation, maybe power?, etc., but now $F$ varies and also depends on $d$ (duh...) and I kinda stopped knowing what to do. Most (practically all?) stuff I saw deals with either varying acceleration in terms of time, or circular motion. Thanks in advance :)   ADDENDUM: This looks suspiciously close to gravity related questions, but in my case I have ions or charged particles in mind, where both masses matter, as well as the movements of both bodies. What brought up the issue was the question "were ions hard balls, when they 'collide' is the ricochet a fact, or is the attraction so great that it is already generating a -v higher than v of the conservation of momentum ricochet resulting from the collision? If there is a 'bounce', What is it like? etc.". (My initial model has only an Li+ and a F- 6000 picometers apart in a 1 cubic meter 'universe', in case you wonder what I am doing.)


Corrupted hard drive - how can I rescue my files?

Lets get things straight: I'm a bit of a noob.  My Ubuntu System was not working well, so I went on the live CD and checked the system, everything went smoothly. So rebooted it without the Live CD and once again it would not work. So i repeated said process, but the system check was taking a long time, so i cancelled it midway through, despite the warning that it could corrupt the drive (I know, I'm stupid). So now it gets to the Ubuntu purple screen, with 5 dots that normally light on and off as it loads, and it just freezes there.   What can I do to retrieve the system with my data? I have got everything backed up by Ubuntu One, and saved to a USB now it is being discontinued, but have one VERY important document that for some reason Ubuntu One wasnt synced to save.  Thanks in advance


How did a user receive Tumbleweed after years of inactivity?

A user received the  badge ,  asked more than 2 years ago. How is this possible?


Why is my sprite displayed offset from its Box2D body?

I found out about this using a debug renderer. When the game starts, everything is in order. But when a collision happens, the sprite's rotation is way larger than its body. The sprite and body match when the body is completely horizontal.    The sprite's rotation origin seems far distant from where it should be. Here's my code:  Sprite sprite = data.sprite; position = body.getPosition(); sprite.setPosition(     position.x - sprite.getWidth()  / 2,     position.y - sprite.getHeight() / 2 ); sprite.setOrigin(position.x, position.y); sprite.setRotation(MathUtils.radiansToDegrees * body.getAngle());   As you can see, I am even trying to set center of its rotation with setOrigin without success. How can I fix this?


Downloading all my questions with the answerer names

I am writing several papers in which I use answers which I received in various StackExchange websites. Naturally I would like to acknowlege and thank the SE members that gave the useful answers. But there are many such answers, and each answer is relevant to a different paper.   So, I would like to download all the questions that I asked in the various SE websites, including the answerer names, to an Excel worksheet in which I can organize the questions by subject.  Is this possible?


Pagination for search results of custom post type

I'm trying to display numbered pagination for search results of a custom post type. Basically a search form allows users to search a custom post type by 2 different taxonomies and then the results are displayed on a page template. I want to display 10 posts per page.  I've managed to get the pagination to work, but only if I hard code the  tag and I can't seem to figure out how to get it to automatically add in the links depending on how many pages of results there are.  Pastebin of page template code -


How to use WCF Service between 2 projects in C#

I am trying to build a tool that sends data to another tool via some mediator between the 2 tools.  Suggestions are welcome to use something else, however for those that know how to use the WCF, can you walk me through how it is done ?  I watched some videos online, but they seem to use the web. Both applications are used on the desktop, and both are windows forms application tools.  Here is where I am at.  I created a toolX, and toolY. Both different projects. Here is what I want.  I want to use toolX to start toolY, and send it data. toolY will receive the data, start processing it. Once finish, I need toolY to trigger that it is finished go back to toolX so it can process other data to toolY.  I created a WCF service, but I am not sure what to do with it, where to implement my code so it starts toolY and send it the data. I did not include anycode because it is pointless since it is an empty service class with [Service Contract] section, and [Data Contract] Section. Any help, examples, tutorials, websites are much appreciated


I'd like to show that the class of all limit ordinals, LIM, is cofinal in the class of all ordinals ON.  I thought that I could do this by contradiction and assume that it wasn't cofinal in ON. Then there is an $\alpha \in$ ON such that for all $\beta \in $ LIM: $\beta < \alpha$, i.e. $\beta \in \alpha$ and hence LIM $\subset \alpha$.  This means that LIM is a set so we can consider $\bigcup$ LIM. Then we have $\beta < \bigcup$ LIM for all $\beta \in$ LIM by definition of $\bigcup$ LIM. So LIM $\subseteq \bigcup$ LIM.   $\bigcup$ LIM is either a limit or a successor ordinal.  If it is a limit ordinal then $\bigcup$ LIM $\in$ LIM and by transitivity of ON, $\bigcup$ LIM $\subseteq$ LIM, so $LIM = \bigcup$ LIM in this case which would mean that $\bigcup$ LIM $\in$ LIM $= \bigcup$ LIM which would be a contradiction because sets cannot contain themselves. Hence $\bigcup$ LIM cannot be a limit ordinal.  If $\bigcup$ LIM is a successor ordinal then $\bigcup$ LIM = $\beta \cup \{ \beta \}$ for some $\beta \in $ ON.  Now I'm not sure how to proceed from here. I'm also not sure about whether I'm on the right track with this proof because I think there should be a shorter way  to prove this.  Thanks for your help.


How to add a span before my menu title link

This is the default Drupal menu:

0.0 Bla

0.1 Bla

     1. Bla

1. Bla

2. Bla

3. Bla

           4. Bla

4-1. Bla

4-2. Bla

4-3. Bla

   How to add a span after my menu link  For example

 0.0 Bla

 0.1 Bla

 1. Bla

 1. Bla

 2. Bla

 3. Bla

           4. Bla

 4-1. Bla

 4-2. Bla

 4-3. Bla


Verify is tautology by using logical equivalence:  $$((p ∨ q) ∧ (p → r) ∧ (∼ r)) → q$$  by showing what laws are using, step by step explanation needed.  Logical equivalence: de morgan's laws, commutativity, associativity, double negative, distribution, idempotent, absorption, identity, universal bound, negation  Rules of inference: modus ponens, modus tollens, generalisation, specialisation, conjunction, ellimination, transivity, proof by division into cases, contradiction  What I got so far:  I need to prove   $$((p ∨ q) ∧ (p → r) ∧ (∼ r)) → q ≡ \text{tautology}$$ Since $p → r$ same as $∼ p ∨ r$: $$((p ∨ q) ∧ (p → r) ∧ (∼ r)) → q ≡ ((p ∨ q) ∧ (∼ p ∨ r ) ∧ (∼ r)) → q$$  I am stuck here


How does the whole universe agree on the laws of physics?

How is it possible that the every particle in the universe agrees on the laws of physics? What enforces those laws? Might the laws change slightly across the universe in the same way the  (CMBR) does?


On passing a DateTime? variable to a method, compiler says it cannot covert a null value to a DateTime

I have a TextBox control, which is supposed to store a date. As long as the date is not a required field in my page (I'm using Web Forms), I am passing a DateTime? (nullable), not a DateTime variable to a method that connects to the database and inserts the appropriate value. It looks something like this.  public void DatabaseMethod(DateTime? myDate) { // Insert the appropriate value into the database }  // I'm calling the above method like this: DatabaseMethod(String.IsNullOrWhiteSpace(txtContractMyDate.Text) ? null : Convert.ToDateTime(txtContractMyDate.Text));   I am getting a message from the compiler that goes like "Type of conditional statement cannot be determined because there is no implicit conversion between 'null' and 'System.DateTime'".  I can just do the following:  DateTime? myDate = null;  if (!String.IsNullOrWhiteSpace(txtContractMyDate.Text)) {     myDate = Convert.ToDateTime(txtContractStornoDate.Text); }   And then call the method like:  DatabaseMethod(myDate);   And of course, that is okay, but I just can't figure out why I'm getting the stated message from the compiler ("Type of conditional statement cannot be determined because there is no implicit conversion between 'null' and 'System.DateTime'").


How to show that $P_n(x)$ have n distinct roots

Let $P_n : \mathbb R \to \mathbb R $ , $n\in \mathbb N$ be defined by $P_n(x)=\frac{\displaystyle1}{\displaystyle2^n n!}\frac{\displaystyle d^n}{\displaystyle dx^n}[(x^2-1)^n]$ I need to show that $P_n(x)$ has exactly $n$ distinct roots in $(-1,1)$ I think it is important to use induction and Rolle's theorem. To use induction, $P_1(x)=x$ and it is trivial that the root is $x=0$ in $(-1,1)$ , but the inductivity is problem. I assumed that $P_n(x)$ has $n$ distinct roots, and yet I can't advance further.


I tagged favorites on my PC and want to have a look at them on my phone...  I don't want to search them again!


$1\cdot 3 + 2\cdot 4 + 3\cdot 5 + \cdots + n(n+2) = n(n+1)(2n+7)/6$ by mathematical induction

I am doing mathematical induction. I am stuck with the question below. The left hand side is not getting equal to the right hand side. Please guide me how to do it further.     $1\cdot 3 + 2\cdot 4 + 3\cdot 5 + \cdots + n(n+2) = \frac{1}{6}n(n+1)(2n+7)$.   Sol:  $P(n):\ 1\cdot 3 + 2\cdot 4 + 3\cdot 5 + \cdots + n(n+2) = \frac{1}{6}n(n+1)(2n+7)$.  $P(1):\ \frac{1}{6}(2)(9) = \frac{1}{2}(2)(3)$.  $P(1): 3$.  Hence it is true for $n=n_0 = 1$.  Let it be true for $n=k$.  $P(k):\ 1\cdot 3 + 2\cdot 4 + \cdots + k(k+2) = \frac{1}{6}k(k+1)(2k+7)$.  We have to prove  $P(k+1):\ 1\cdot 3 + 2\cdot 4 + \cdots + (k+1)(k+3)= \frac{1}{6}(k+1)(k+2)(2k+9)$.  Taking LHS: $$\begin{align*} 1\cdot 3 + 2\cdot 4+\cdots + (k+1)(k+2) &= 1\cdot 3 + 2\cdot 4 + \cdots + k(k+2) + (k+1)(k+3)\\ &= \frac{1}{6}(k+1)(k+2)(2k+9) + (k+1)(k+3)\\ &= \frac{1}{6}(k+1)\left[(k+2)(2k+9) + 6k+18\right]\\ &= \frac{1}{6}(k+1)\left[2k^2 + 13k + 18 + 6k + 18\right]\\ &= \frac{1}{6}(k+1)\left[2k^2 + 19k + 36\right]. \end{align*}$$


Grace period edits will still lock in votes

The usual rule is if I vote, it's locked in after 5 minutes or something, unless the question is edited. However, it seems if the edit takes place in a grace period of posting a question or the last edit, my vote is still locked in. This seems buggy.


So far, gyms in my area flip so frequently that I haven't been able to hold more than one gym at a time when collecting my rewards. I know the reward for a single gym is 500 stardust and 10 coins.   Does this reward scale linearly with multiple gyms, or does it follow a different progression? I've also heard there might be some kind of bonus for holding a gym for more than a day, but haven't managed to do it. Is there a bonus for that (or any other kinds of bonuses)?


If I use WUBI to install Ubuntu, can I use Windows Control panel to uninstall it if I don't like it?

Dell Vostro 200 Windows XP service pack 3, 32 bit Intel Core 2 duo CPU @ 2.4 Ghz RAM 2037 MB


How to make a post request to some other server from apex controller

Can anyone explain how can i make a post request to some other server from apex controller and get the response back?  For example server url is - HTTP://xxx.xom/charge  I have to send a post request on above URL from apex controller and need the response back.  Thanks in advance


Elegant proofs that similar matrices have the same characteristic polynomial?

It's a simple exercise to show that two similar matrices has the same eigenvalues and eigenvectors (my favorite way is noting that they represent the same linear transformation in different bases).   However, to show that two matrices has the same characteristic polynomial it does not suffice to show that they have the same eigenvalues and eigenvectors - one needs to say something smart about the algebraic multiplicities of the eigenvalues. Moreover, we might be working over a field which is not algebraically closed and hence simply "don't have" all the eigenvalues. This can be overcome, of course, by working in the algebraic closure of the field, but it complicates the explanation.  I'm looking for a proof that is simple and stand-alone as much as possible (the goal is writing an expository article about the subject, so clarity is the most important thing, not efficiency).


In Java, given a java.net.URL or a String in the form of http://www.example.com/some/path/to/a/file.xml , what is the easiest way to get the file name, minus the extension? So, in this example, I'm looking for something that returns "file".   I can think of several ways to do this, but I'm looking for something that's easy to read and short.


Java: Is there a method to convert ArrayList to boolean[] (primitive array)?

I know it can be done by iterating through the elements, but is there a predefined method or a way to use map?


Storing a nice bike outside cheaply in the city during winter (weather/security)

I'm no longer able to store bicycles in my flat, as my current place is less than 20m² in size; Is there any way to store a bicycle outside in a way which will significantly minimize weather- and crime-related damage/loss?  The said (two) bikes are nice enough to sell for a decent amount of money, and so they're not throw-away "supermarket trip" bikes and they are rather pretty (i.e. they stick out to thieves). Selling them (for a decent price) will take quite some time, but time is not on my side:   Eventually, someone will either steal them or try to steal them (damaging them in the process), regardless of how massive the lock on them is The weather will eventually damage them, anyway: Where I am, we can get to -10° C/14° F and have a wonderful amount of snow-plus-rain-turned-ice-turned-muddy-slush. E.g. a  is not an option: I cannot (i.e. am not allowed to) build or buy any kind of free-standing things to put them under, and I assume that a  will get stolen or at least torn quite quickly (I've already had one stolen in the space of a few years).


I have tried the .tex file in WinEdt in Windows too. I want to run it using the KILE editor. The problem I got is showing below as log file.  This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian) (format=pdflatex 2014.1.17)  20 JAN 2014 16:01 entering extended mode  %&-line parsing enabled. **"Thesis-Jan 20 -2013.tex" (./Thesis-Jan 20 -2013.tex LaTeX2e <2009/09/24> Babel <v3.8l> and hyphenation patterns for english, usenglishmax, dumylang, noh yphenation, farsi, arabic, croatian, bulgarian, ukrainian, russian, czech, slov ak, danish, dutch, finnish, french, basque, ngerman, german, german-x-2009-06-1 9, ngerman-x-2009-06-19, ibycus, monogreek, greek, ancientgreek, hungarian, san skrit, italian, latin, latvian, lithuanian, mongolian2a, mongolian, bokmal, nyn orsk, romanian, irish, coptic, serbian, turkish, welsh, esperanto, uppersorbian , estonian, indonesian, interlingua, icelandic, kurmanji, slovenian, polish, po rtuguese, spanish, galician, catalan, swedish, ukenglish, pinyin, loaded.  ! LaTeX Error: File `thesis.cls' not found.  Type X to quit or <RETURN> to proceed, or enter new name. (Default extension: cls)  Enter file name:  ! Emergency stop. <read *>   l.2 \usepackage                {amsmath,mathtools}\usepackage{amssymb}^^M *** (cannot \read from terminal in nonstop modes)   Here is how much of TeX's memory you used:  10 strings out of 493848  236 string characters out of 1152823  47808 words of memory out of 3000000  3384 multiletter control sequences out of 15000+50000  3640 words of font info for 14 fonts, out of 3000000 for 9000  714 hyphenation exceptions out of 8191  10i,0n,7p,94b,8s stack positions out of 5000i,500n,10000p,200000b,50000s !  ==> Fatal error occurred, no output PDF file produced!   How can I run the .tex file in KILE ?


About $\lim_{n \rightarrow \infty} \prod_{1 \leq i \leq n}\left( 1-\frac{1}{p_i} \right)$ where $p_i$ is the ith prime

I am doing some tutorials on programming, and I am on the classic "write a program that returns true if and only if the input is a prime number". The solution is straightforward: for every number $d$ between $2$ and $N-1$ test if $d$ is a divisor of $N$. The first optimization is to reduce the testing interval to $[2, \sqrt{N}]$. The next optimization is to reduce the testing interval by eliminating the even numbers in it (plus a particular test for 2). Now becomes the next optimizations: what if I eliminate the multiples of 3 too? With the due adjustings, it reduces the interval to 1/3 of its original size. (It is just Inclusion-Exclusion from Combinatorics.) We can do this further for the next primes. Summing up, after $k$ interactions the set is reduced to $\prod_{1 \leq i \leq k}\left( 1-\frac{1}{p_i} \right)$ of its original size. Therefore, my question is: What is the  $\lim_{n \rightarrow \infty} \prod_{1 \leq i \leq n}\left( 1-\frac{1}{p_i} \right)$? Probably the limit has no known "closed form", but it would be cool to know it to at least some decimal places. After all, it can be useful to establish a point when the optimization efforts supersede the gains.


Why don't I get an email when my question is put on hold?

I get email notifications when someone answers or comments on one of my questions, but not when one of my questions is put on hold.  That's an event I'd like to know about!  Why am I not notified?


What does spearman being higher than tau imply?

If Kendall's tau is lower than Spearman, what does it mean?


I've never seen any information about the distribution of biomes in a generated world.   First, are all types of biomes, guaranteed to exist in a world? Will I always find snow somewhere, and desert somewhere? I've got one world that doesn't seem to have cactus (so I guess the sand is beaches, no actual desert).  Second, is there any kind of pattern or relation to biomes? Is snow to the North, and desert South, for example?  Third, how about density of biomes? If all types do exist, would I find them all within distance X of my spawnpoint, or have to travel for weeks to find a given type?


Why must identical lightbulbs in series have identical voltage drops?

When I connect two identical lightbulbs in series, how come they have equal brightness?  Why can't one lightbulb have a larger voltage drop than the other?  (i.e. the first lightbulb "uses up all the energy" and the second lightbulb is barely lit because "there isn't much energy left"?


$f(x)=0$ a.e. on $[a,b]$ implies $f(x)=0$ everywhere on $[a,b]$

If $f(x)$ is a real continuous function that is zero almost everywhere on the interval $[a,b]$, how can I prove that it is zero everywhere in that interval?  My apologies for the probably silly question.


Do you have to restart apache to make re-write rules in the .htaccess take effect?

I have pushed my .htaccess files to the production severs, but they don't work. Would a restart be the next step, or should I check something else.


Can I transfer through Vancouver airport without Canada visa? Air Canada and Turkish Citizen

I'm a Turkish citizen living in USA (temporary resident on a H-1B) and I just bought a flight that transfers through Vancouver Airport.  The  itinerary is as follows:  Air Canada 8090 -> Seattle, USA to Vancouver, Canada     10:57am arrival and 12:00pm departure    -     1 hour 3 minutes layover Air Canada 63 -> Vancouver, Canada to Seoul, South Korea  Air Canada 64 -> Seoul to Vancouver     10:35am arrival and 1:45pm departure     -     3 hour 10 minutes layover Air Canada 8095 -> Vancouver to Seattle   I have my legal travelling required documents ready for both South Korea and USA. However I do not possess a Canadian Tourist Visa or any sort of transit visa.   Is there a connection area in Vancouver airport that would allow me to take these flights?  Vancouver airport told me that I need a visa, CBSA told me that I need a visa but many people online say that I don't. I only have a carry-on and will not have any luggage checked in.


How to connect several monitors to one computer, and all display the same thing

I have an interesting problem.  I need to have one computer that drives around 30 (Thirty) monitors.  I have a very large room, and need each monitor to have the same thing on them.  I'm open to the idea of wireless since latency isn't a big issue.  Graphics quality doesn't have to be amazing either.  This will mostly be used for powerpoint, excel, word, Maybe some youtube videos at some point.  No sound is needed either.   The basic end goal is to have one computer on a projector that I am driving, and people who are sitting all around the room have monitors they can look at, and they all have the same thing on them.  Any advice on hardware is appreciated.


Is it possible to set a CNAME record at the top of a domain? (i.e. @ CNAME www, @ CNAME foobar.com., etc.)  My ISP says that it's only possible to use CNAME's for subdomains but I've read somewhere else that is should be possible even if not recommended.


How to get overlay to position on an image?

I am making a document in a grid format and when I hover over the image I want to have an overlay, it randomly goes underneath it.  How would I bring this effect higher up on the document. (The first image in the only one with the effect currently). HTML won't display in a code block here for some reason so I attached my codepen, thank you everyone!  .flex {   display: grid;   grid-gap: 2rem;   grid-template-columns: repeat(3, 1fr);   margin: 0% 5% 5% 5%; } .resize {   max-width: 100%; } .overlay {   position: absolute;   bottom: 0;   left: 0;   right: 0;   background-color: cyan;   overflow: hidden;   width: 28%;   height: 0;   transition: .5s ease;   opacity: 0.3;    margin: 0% 0% 0% 5%; }  .contained1:hover .overlay {   height: 35%;   width: 28%;   margin: 0% 0% 0% 5%; }  .text {   color: white;   font-size: 20px;   position: absolute;   top: 90%;   left: 50%;   transform: translate(-50%, -50%);   text-align: center;   font-family: 'karla'; }   CODE PEN:


What are these parallel lines on my exit stamp?

Can anyone please tell me what these two parallel lines on my exit stamp mean?     And will it impact my further application & travel to the Schengen area? It happened when I was denied entry to Croatia due to single entry Schengen visa and therefore I have no valid visa to enter Croatia. The Croatian border guard didn't stamp anything on my passport nor gave me any letter, she just kindly told us we can apply for a visa in Ljubljana. The Slovenian guard just drew two parallel lines on our exit stamp and when we left the Schengen area via Switzerland the country which issued my visa the guard just stamped me out without a single question.


How do I copy files across/outside symbolic links? (dest)

Suppose I have a file system like this:  /home/me/dir1/dir2/dir3/dir4/dir5/dir6/file1  Then in /home/me/dir1, I create a symbolic link:  $ cd /home/me/dir1 $ ln -s /home/me/dir1/dir2/dir3/dir4/dir5/dir6 linkdir6   I am trying to copy file1 to my home directory (this is my simplified example, it's more complicated than this - "/home/me/" is actually a much more complicated directory structure, so "~/" is not a solution).  $ cd linkdir6 $ cp file1 ../ $ cd .. $ ls dir2 linkdir6   I don't see file1.  Searching for it, I find it in /home/me/dir1/dir2/dir3/dir4/dir5/file1  It seemed cp didn't realize it was inside a symbolic directory.  How do I cp out of a symbolic folder?  Or, how do I make cp understand that ../ should be dereferenced (where dest in the man page is deferenced)?  Am I missing something?  Is this even possible?  Thanks!  (final note - the actual use case is in a deep directory structure, inside one symlink directory, trying to copy a file ../another-symlink-directory/ without typing complete paths - that's one of the points of symbolic links as far as I'm concerned)


Confusion with Grounded Conductor: bringing in a point from infinity

Suppose, for sake of argument, we have a spherical grounded conductor at the origin. Additionally, let our reference voltage be at infinity. Now, I view the potential of a point in space as being the work that I personally would have to do to move a unit charge from the reference to the point in question. Thus, I interpret this grounded conductor as points in space at which I could bring in a unit charge from infinity and end up doing no work. However, that interpretation certainly cannot be true in this case. Suppose the charge that I am bringing in is unit positive. The entire time I bring that charge towards the conductor there will be a larger and larger negative charge build-up, so I will have to exert a larger and larger force in the opposite direction the entire time I bring it in. The net work that I do in moving this charge towards the conductor will clearly be negative, not zero as the potential value would seem to suggest.   Can someone resolve these conflicting interpretations? Much appreciated.


I have a few very simple bash scripts that I cobbled together for things that I do regularly. One of them is to run duplicity to do my backup tasks. Nothing clever just a bunch of if .. then statements really. As this needs to be run as sudo would it be best practice to put my script in /usr/bin ( or other location in PATH ) , chown to root.root and chmod to 700 ?


Double Slit Experiment: How do scientists ensure that there's only one photon?

Many documentaries regarding the double slit experiment state that they only send a single photon through the slit. How is that achieved and can it really be ensured that it is a single photon?


I have the problem in url path settings?

I have  some basic pages in my site, it has url paths.  When i pass the url its works properly.   Eg:  www.mysite.com/about-us it opens perfectly. But my problem is if i pass url as  www.mysite.com/about-us/sgajfsaff(something rondomly) it will also opens the about-us page not goto 404 page.  Is there any solution to redirect it 404 page?  Thanks in advance.


I can't get anything to scale, no matter what object I click select and hit S -- nothing scales in my scene anymore. Did I inadvertently hit something and lock everything in place? ?


How to change the command prompt color in BASH?

I'd like to customize the color of just the command prompt of a BASH shell, while leaving the rest of the terminal using the default color scheme.  In example, I'm using one of the default color schemes that come with Konsole, "green on black", which, surprisingly enough, displays a green text over a black background.  Given the following example:  user@host:~> some command output of some command output of some command output of some command output of some command output of some command output of some command output of some command output of some command user@host:~>   what should I do to make the terminal display only user@host:~> some command (or even just user@host:~> ) with a different color, let's say a light blue?  All of this in order to stand out more when the output occupies many lines, to make it more visible where the output starts and ends.


How was Fuhrer King Bradley able to grow old?

According to the FMA:B series, the homunculi aren't supposed to grow old. Moreover, all of the homunculi other than Wrath (King Bradley) could regenerate themselves. This even includes Greed, who's also a human-based homunculus. We also see in the series that during Bradley's death, his body degenerated. If he was able to grow normally then there shouldn't be such things happening to his body.


Solar system with both grid tie-in and backup power without battery?

My wife and I have been talking for a few years now about getting some solar panels installed on our roof.  We even went so far as to have a sales rep for an installer come out and talk through our options.  He told us that we could:   Have a system that ties into the grid and sells electricity back to the power company.  This sounds like a great idea, and seems cost-effective as well. Have batteries that store surplus power to provide our home with backup power in case of a blackout.  Again this sounds like a great idea, but it also sounds like the cost would be prohibitively expensive for us. Have a battery-less system that provides power to our house when the power goes out, but only when the sun is shining.   .... but that we could not have both (1) and (3) without (2).  He insisted that if we are connected to the grid, there is no way to switch our system to directly powering our house in the event of a blackout; if we wanted to be connected to the grid and have emergency power, a battery backup system is the only way.  This makes no sense to me, and he was unable to explain why (other than "it's just a different kind of system").  I suspect he was just trying to upsell me to a battery backup system. But since I don't really understand the technology I thought I would ask here.  Can someone explain to me what, if anything, are the issues here?  Please be gentle, as this stuff is well beyond my zone of competence.


Simulate menu button in older app (Android 2.x) on Android 4.x tablet

I've got a new Android 4.1 tablet. I am trying to run an old app which was created for Android 2.1 and relies on the menu button.  Can somebody points me to a ready-made application which returns the new menu button? Any idea?


Did the Sith die out with Sidious' death?

It's evident that Sidious was confident in that he would be an eternal emperor and that there was no need for a successor but when his death came, did the Sith die out? I don't think Snoke and Kylo are actual Sith, Kylo fits the description of a Dark Jedi and Snoke seems to be something else.


Revtex 4.1 bibliography style in other classes

I'd like to know if someone ported the bibliography styles used in revtex 4.1 (like apsrev4-1.bst) so they can be used in other classes, like book.  Thanks in advance!


What is the best way to remove texture from a scanned textured photo paper? details

One of the answers to this question :  says to use ImageJ.    I have tried this on the sample photo and it doesn't work. I'm not familiar with ImageJ, so I'm obviously leaving something out. When I try to do inverse fft, it gives me the message: Frequency domain image required.   What am I missing? Thanks!


GPU Rendering on an Intel Iris Pro (Apple Macbook Pro)

I was wondering if there now (as of Blender 2.78c) a way to use GPU rendering on an Intel Iris Pro Graphics Card. I tried to get it to work, and successfully got the GPU to show up in the System User preferences, and in the render tab, but when I try to actually render something, the message at the top says LOADING RENDER KERNELS (MAY TAKE A FEW MINUTES THE FIRST TIME). However, it seems to take more than a few minutes. This message never goes away and I need to force quit blender to stop it. Any way to properly do it?


It it ok for a 15 months old to fill her mouth with food?

Is it unusual for a 15 months old to fill her mouth with food? She does this fairly often, especially with food she likes, then she realizes her mouth is too full and spits.  We tell her to chew and to take a piece at a time, or to bite off chunks, but it doesn't work every time.  I don't know if this is relevant, but she has always been a fast eater, she was breastfed and it took her about 10 minutes for a full meal


Random variable with finite exponential first moment, infinite exponential variance

Could you provide an example of a random variable $X$ such that $\mathbb{E}(e^X)<\infty$ but $\text{Var}(e^X)=\infty$? Related:  Motivated by .


How would you do Karnaugh's maps in LaTeX or ConTeXt?

In a document, I have to include those simple diagrams to show the procedure of reducing logical circuits.  What do you think is the best way to do them?


Include external subtitles while converting video with FFmpeg

Is it possible to use subtitles from an external file while converting a video with FFmpeg? The file extension of the subtitles is .stl or .vob.


I was trying to install readline as a dependence for octave 4.0.0.  Then the problem with apt-get install and the hint to execute   sudo apt-get -f install.   The following is what I receive:  xxxx@xxxx-MS-7577:~$ sudo apt-get -f install [sudo] password for xxxx:  Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following extra packages will be installed:   libc6-dev-i386 The following NEW packages will be installed:   libc6-dev-i386 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 30 not fully installed or removed. Need to get 0 B/1.205 kB of archives. After this operation, 6.560 kB of additional disk space will be used. Do you want to continue? [Y/n]  (Reading database ... 234980 files and directories currently installed.) Preparing to unpack .../libc6-dev-i386_2.21-0ubuntu4_amd64.deb ... Unpacking libc6-dev-i386 (2.21-0ubuntu4) ... dpkg: error processing archive /var/cache/apt/archives/libc6-dev-i386_2.21-0ubuntu4_amd64.deb (--unpack):  trying to overwrite '/usr/include/fpu_control.h', which is also in package libc6-dev-amd64:i386 2.21-0ubuntu4 Errors were encountered while processing:  /var/cache/apt/archives/libc6-dev-i386_2.21-0ubuntu4_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)   How do I can recover from this?  $ cat /etc/*release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=15.10 DISTRIB_CODENAME=wily DISTRIB_DESCRIPTION="Ubuntu 15.10" NAME="Ubuntu" VERSION="15.10 (Wily Werewolf)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 15.10" VERSION_ID="15.10" HOME_URL="http://www.ubuntu.com/" SUPPORT_URL="http://help.ubuntu.com/" BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"  ~$ uname -a  Linux xxxx-MS-7577 4.2.0-18-generic #22-Ubuntu SMP Fri Nov 6 18:25:50 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux   Update:  Thanks. If I run this command I receive the following:  sudo apt-get remove libc6-amd64:i386 libc6-dev-amd64:i386 [sudo] password for xxxx:  Reading package lists... Done Building dependency tree        Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies:  gcc-5-multilib : Depends: libc6-dev-i386 (>= 2.11) but it is not going to be installed  lib32readline6-dev : Depends: libc6-dev-i386 but it is not going to be installed  lib32tinfo-dev : Depends: lib32c-dev  lib64readline6:i386 : Depends: libc6-amd64:i386 (>= 2.15) but it is not going to be installed  lib64readline6-dev:i386 : Depends: libc6-dev-amd64:i386 but it is not going to be installed  lib64tinfo5:i386 : Depends: libc6-amd64:i386 (>= 2.16) but it is not going to be installed  libc6-dev-x32 : Depends: libc6-dev-i386 (= 2.21-0ubuntu4) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).   The problem now is I can't upgrade the system. I am locked in this error. Trying to execute sudo apt-get -f install is useless because I enter in the previous error condition.


Why can rolled up capacitors be modelled as flat parallel plates?

If you have two parallel plates of opposite charge with a dielectric in between, then Capacitance $$ C = \dfrac{A \epsilon_{0}}{d} K$$ Where $ K $ is the dielectric constant. This is used to calculate the capacitance of a capacitor. However, a real capacitor is actually two of those plates rolled up many times. Wouldn't the electric field $ \vec{E} $ be different? So why is the equation for the capacitance still valid?


i want to execute youtube-dl command in python. So that i can save my favorite videos.  Something like that:    import os   youtube-dl any_link


I tried to install skype using this tutorial   But I got troubles at the first step  sudo dpkg --add-architecture i386   When I wrote this, I got this message  $ sudo dpkg --add-architecture i386  dpkg: error: unknown option --add-architecture Type dpkg --help for help about installing and deinstalling packages [*]; Use `dselect' or `aptitude' for user-friendly package management; Type dpkg -Dhelp for a list of dpkg debug flag values;  Type dpkg--force-help for a list of forcing options;  Type dpkg-deb --help for help about manipulating *.deb files; Options marked [*] produce a lot of output - pipe it through `less' or`more' !   What should I do ?  I will be very thankful if you will explain all this step by step, because I never had Ubuntu before.


What's the best order to add ingredients to a Stir Fry?

I make nice stir-fry with bell peppers, mushrooms, onion, sugar-snaps, jalapenos and bean sprouts (and anything else that might be handy and in danger of being unused before it expires)  I tend to chuck everything in together on a really hot wok, but is there a better way?    Will adding the ingredients at different times make a difference? If so, what's the best way to do this?    Thanks


I have a question. Do I need drivers for my graphic card Radeon R9 270X? If yes how can i install it?


Are the PUT, DELETE, HEAD, etc methods available in most web browsers?

I've seen a couple questions around here like , which mentions:     Unfortunately that same browser won't allow me to test HTTP PUT, DELETE, and to a certain degree even HTTP POST.   I've also heard that browsers support only GET and POST, from some other sources like:        However, a few quick tests in Firefox show that sending PUT and DELETE requests works as expected -- the XMLHttpRequest completes successfully, and the request shows up in the server logs with the right method. Is there some aspect to this I'm missing, such as cross-browser compatibility or non-obvious limitations?


handle 'strategic downvotes' more 'gently'

In  I asked for a practical reason to lock votes after 5 minutes and Bill the Lizard and Arjan were very nice to explain the mystery.    Well, vote locking seems to deal with strategic downvotes fine, yet vote locking isn't a useful feature in itself. If it was the code, I would call it 'ugly hack', in a sense that it deals with a problem by creating another problem. It deals with few 'reputation optimizers' by annoying the whole community.    There's probably no need to illustrate my previous point: I've provided an example in the linked post, and there're many more complaints about it in the meta. Sure, in 99% cases you have no urge to change your vote, yet the remaining 1% is very annoying.  So, how can we adjust vote locking to reduce collateral damage? I see two options right off the bat   Simple tweak. Lock downvotes only for the users who have answers in this question. Radical. Allow no downvotes in the question where user has posted answer himself. As Kyle Cronin , This has some drawbacks, but can you really trust someone who posted their own reply to be objective about judging the other peoples' replies?.   Any ideas?


$z^n=(z+1)^n=1$, show that $n$ is divisible by $6$.

we are given $z^n=(z+1)^n=1$, $z$ complex number. we want to prove that $n$ is divisible by $6$. I showed that $|z|=|z+1|=1$. Hence $z$ is on the intersection of two unit circles, one centered at $(0,0)$ and the other one centered at $(-1,0)$. Then $z$ can take two values $z=\operatorname{cis}(2 \pi /3)$ or $z=\operatorname{cis}(4 \pi/3)$. Then from $z^n=1=\operatorname{cis}(2 \pi k)$, $k$ integer I showed that $n$ should be divisible by $3$. I am left to show that $n$ should be divisible by $2$. I think if I figure out a way to show that $\operatorname{arg}(z+1)=\pi/3$ or $-\pi/3$ then I would be done, by using $(z+1)^n=\operatorname{cis}(2\pi k)$. but how can I do this? Any ideas are welcome! Thanks in advance!


Insert file/attachment using new Salesforce Files?

I noticed in Winter '16 it looks like there is a new "Files" tab available.  I added this as a related list to one of my page layouts on a custom object.  Can someone provide code showing how to insert an attachment via apex to this new files related list or point me to somewhere online that illustrates how to leverage this relatively new functionality?  I know how to create an attachment via apex, but I believe this is more linked to chatter and it's not clear how to insert a new record programmatically.


Would this qualify as "racism" or would it be called something else?

I was listening to an Aboriginal women speak about indigenous rights and the government. She made a few references juxtaposing Christianity and their beliefs. For example, it is perverse and uneducated to think Adam and Eve (and their children) could populate all of man. Immediately after she went on to talk about Turtle Island which is the belief that North America is on the back of a living turtle (I know  says it's just an Aboriginal name for North America, but the speaker definitely stated her people believe it to be more than that).   What world would be used to describe the speakers attitude or speech towards Christianity? At first I thought it would be racist but then I realized religion has got nothing to do with race. Also she did not necessarily say it's inferior to another. Is my understanding correct: that by definition for something to be considered racist it must make a generalization about a race (usually based on skin colour) and say it's inferior to another? What would a better term be used to describe the way Christianity was disused?


Critical temperature of Bose-Einstein condensation

It is known (see, e.g. Wikipedia) that the transition to Bose-Einstein condensate occurs below critical temperature: $$  T_c \approx 3.3125 \, \frac{\hbar^2 n^{2/3}}{m k_B} $$ where $n$ is the particle density in the system.   It is obvious that higher particle densities $n$ correspond to higher critical temperature $T_c$.  Nevertheless, it is always stressed that Bose-Einstein condensation has been achieved with ultra low density quantum gases (1/100000 of the density of normal air).   So my question is: Why? Which is the obstacle that prevents experimentalists from trying to Bose-Condense denser gases?


Can numbers with similar stopping times in the Collatz Conjecture be functionally described?

We slightly refine the Collatz sequence as follows:  $$f(n) =  \begin{cases}        \text{Od}(n) & \text{if } n \equiv 0 \pmod 2\\       3n + 1 & \text{if } n \equiv 1 \pmod 2\\    \end{cases} $$  Where Od(n) is the  of n. And   $$a_i(n) =  \begin{cases}        n & \text{for } i = 0\\       f(a_{i-1}(n)) & \text{for } i > 0\\  \end{cases} $$  We wish to classify numbers by their refined Collatz stopping times, $C(n) = s$.  $$C(n) = s \iff a_s = 1$$  And we wish to describe sets of natural numbers grouped by stopping time class: $$C_s = \{n\in\mathbb{N} \big| C(n) = s\}$$  Note: \begin{align} C_0 &= \{1\}\\ C_1 &= \{n,a \in \mathbb{N} | n = 2^a\}\\ C_2 &= \bigg\{n,a \in \mathbb{N}, a>1 \bigg|n = \frac{4^a - 1}{3}\bigg\}\\ C_3 &= \{n\in\mathbb{N}, c_1\in C_1, c_2\in C_2\bigg|n=c_1 \times c_2\}\\ C_4 &= \bigg\{n\in \mathbb{N},a_1,a_2 \in \mathbb{Z}^*, r_1\in \{1,2\}, 3a_1+r_1\geq2\bigg|n=\frac{1}{3}\bigg(2^{3 - r_1}\times4^{a_2}\times\frac{4^{3a_1 + r_1} - 1}{3} - 1\bigg)\bigg\}\\ C_5 &= \{n\in\mathbb{N}, c_1\in C_1, c_4\in C_4\bigg|n=c_1 \times c_4\} \end{align}  This seems to be quickly getting out hand. What is $C_6$? What texts might have similar analysis?


Error Message System.QueryException: List has no rows for assignment to SObject :Stack Trace Class.CloneContractCtrlr.: line 18, column 1

HI friends i need little help to resolve this error  public CloneContractCtrlr(ApexPages.StandardController controller) {         //objCntrct= new Contract();       objCntrct= new Contract();      String recId = ApexPages.currentPage().getParameters().get('conid');       objCntrct = [Select Id, Name, Opportunity__c,Forecast_Date__c,Capital_Business_Owner__c,OwnerId  FROM Contract where id =:recId limit 1];                system.debug('objCntrct--ct--'+objCntrct);      objCntrct.Capital_Business_Owner__c = objCntrct.OwnerId;                           //system.debug('objCntrct123----'+objCntrct.Capital_Business_Owner__c);   }


I did a clean install of 19.10 on my HP desktop.  After running software updater and rebooting it goes to the login screen.  I type in the password and it won't login, just shows the login screen again. Tried it a couple times with the same result.  Any suggestions?


Does the BatchNorm scale the distribution of whole layer (all neurons) or each neuron?

I am confused at a very trivial point about the BatchNorm. For illustrations it is a widely used graphics that BatchNorm corrects the distribution of incoming values. To calculate mean, does it average through a batch for each neurons separately or does it average both in 2 dimensions (batch & layer width)?  For example, if I zero some of the neurons after BatchNorm, does this spoil the output distribution or doesn't it since each neuron has its own zero-centered distribution already? (Assuming trainable weight and scale parameter is not used.)   In other words, are the mean and variance unique to a layer, or do we calculate mean & variance for each single neuron in a layer?


Select distinct rows by values of other columns

I have the following table:     source_id bands duration     24 L BAND 0.215447   24 L BAND 0.00017   24 S BAND 0.00017   88 L BAND 0.215447   88 L BAND 0.00017   72 L BAND 0.00017     For every combination of "source_id" and "bands" values, I would like to output the entry with the longest duration, such that the output would be:     source_id bands duration     24 L BAND 0.215447   24 S BAND 0.00017   88 L BAND 0.215447   72 L BAND 0.00017     What would be the easiest and/or best way to achieve this?


Sorting files according to size recursively

I need to find the largest files in a folder.  How do I scan a folder recursively and sort the contents by size?  I have tried using ls -R -S, but this lists the directories as well.  I also tried using find.


How can I get the same SSID for multiple access points?

I need to upgrade my existing wireless infrastructure and this time I want 2 access points to cover my house, since I get blind spots no matter what with a single AP. I have physical cabling to my central network available for both access points.  I would really like these two to interoperate seamlessly as a single SSID. How do I do this? What are the features that the new access points I'm buying would need to support?


Red icons appears in all drives Windows 7

Today, in all my drives in Windows 7 appeared a red icon. I try to delete the IconCache.db but doesn't work.


Installation failure on AMD Ryzen 3900X and Gigabyte Auros Master X570 motherboard

I am trying to install Ubuntu 19.04 (or any other Linux distro) on a new HW consisting of Ryzen 3900X CPU, Gigabyte Auros Master X570 motherboard and AMD Radeon Vega 64 GPU. On installation startup from a bootable USB drive, it shows "Ubuntu" with 5-6 dots underneath representing installation progress. However, it is perpetually stuck in that mode. When I press ESC, it shows dozens of lines of failure messages.  I searched internet for a clue as to what is causing this and to fix it with no avail. Some suggest Gigabyte motherboard is not fully compatible with Linux. I have tried the same with Manjaro but again similar failures. I have tried changing IOMMU to "enabled" but did not work either.  Can anyone help? Although I have used Ubuntu, my technical knowledge is very limited in attempting to resolve the issue.   If other ditro will work, I am willing to use it. But Ubuntu is my preference.


Using the law of large numbers to show that $M_n=\prod_{k=1}^n (1+X_k)$ converges almost surely for $X_i$ i.i.d.

Good day,  I have the problem of an old exam without solutions. It is the following:    Let $X_1,X_2,...$ be i.i.d. (independent and identically distributed) random variables on the same probability space such stat $$P\left(X_1=-\frac{1}{4}\right)=P\left(X_1=\frac{1}{4}\right)=\frac{1}{2}$$ For all $n\in \mathbb{N}$ define $M_n:=\prod_{k=1}^n (1+X_k)$.   Show that $(M_n)_{n\in\mathbb{N}} $ is a martingale w.r.t. a suitably chosen filtation (This was no problem for me) Use the law of large numbers to show that $(M_n)_{n\in\mathbb{N}}$ converges almost surely and determine the limit. (Here is the problem for me.)     This is the strong law of large numbers (SLLN) we had in the lecture:  Let $X_i$ be uncorrelated random variables, $E(X_i)=\mu, E(X_i^2)<\infty$, $\exists C$ such that $\text{Var}(X_i)\leq C$ for all $i$ and define $S_n=\sum_{i=1}^n X_i$. Then $$\frac{S_n}{n} \to \mu \text{ almost surely.}$$    Therefore I have to get this $M_n$ into the form of $\frac{S_n}{n}$. I had a problems in the class where I had $$ A_n:=\left( \prod_{i=1}^n X_i \right)^{1/n}.$$ This was pretty elegant since we get the wished form via $$\log A_n = \frac{1}{n} \sum_{i=1}^n \log(X_i)=:\frac{1}{n} \sum_{i=1}^n Y_i.$$  I wanted to use this here:   $$\log M_n = \sum_{k=1}^n \log(1+X_k) = \frac{1}{n} \sum_{k} \log(1+X_k)^n $$  But now this "new" random variable $Y_{n,k}:=\log(1+X_k)^n$ is dependent of $n$. I don't know if this is a problem (now I think this is a huge problem, see below.) Let's try and use the SLLN for this: We would get $\log M_n \to E(Y_{n,k})$ if the assumptions are fulfilled but the limit should not be dependent on $n$. $$E(Y_{n,k})=E(\log(1+X_k)^n)=\frac{1}{2} \left( \log(5/4)^n +\log(3/4)^n \right) = \frac{1}{2} \log (15/16)^n \to -\infty$$  I don't know what to do. I think I could use the Martingale Convergence Theorem to get that $M_n$ converges a.s. but via this method I don't get the limit. Further the exam states that I have to use the SLLN explicitly.  I am thankful for every help/hint.


Find the limit $\lim_{n\to\infty} \bigl(1+\frac{1}{n}\bigr)^{n^2}\cdot\frac{1}{e^n}$

Find $\displaystyle\lim_{n\to\infty} \Bigl(1+\dfrac{1}{n}\Bigr)^{n^2}\cdot\dfrac{1}{e^n}$   We have: $$ \lim_{n\to\infty} \Bigl(1+\dfrac{1}{n}\Bigr)^{n^2}\cdot\dfrac{1}{e^n}= \lim_{n\to\infty}\dfrac{e^{n^2\ln\bigl(1+\frac{1}{n}\bigr)}}{e^n}= \lim_{n\to\infty} e^{n^2\ln\bigl(1+\frac{1}{n}\bigr)-n} $$  Then I have no idea. Can anyone help me please?


Value of $ \int\frac{\sec x}{\sqrt{3+\tan x}}dx$

Finding value of  $\displaystyle \int\frac{\sec x}{\sqrt{3+\tan x}}dx$   Try: Let $\displaystyle I = \int \frac{\sec x}{\sqrt{3+\tan x}}dx,$ Put $3+\tan x = t^2$  and $\sec^2 xdx =2tdt$  So $\displaystyle I = 2\int \frac{1}{\sqrt{t^4-6t^2+10}}dt$  could some help me how to solve it, Thanks


Why did Dumbledore appoint Hagrid as professor of Care of Magical Creatures?

Concerning magical creatures Hagrid's expertise is evident, but his judgement is impaired. He also has a quick temper and when angered, can assault people, which makes him less than perfect teacher material. So why Dumbledore who knows him well trusts him not only with the Order's secrets but also with the lives of his students?   Just a few examples: In the first book he is angered by Vernon Dursley's and attacks Dudley, trying to transform him into a pig (the spell fails, but Dudley grows a piggitail) then there's the case of Norbert the dragon when he and the first years he involved broke a few school rules. in the second book he sends Harry and Ron to Aragog, an acromantula he raised in Hogwarts in his third year. Aragog and family attack the kids. In the third book he brings a Hypogriff to his first lesson and a student gets injured. In the fourth book he introduces the blast ended skrewts. In the same year he attacks Karkaroff in front of Dumbledore.      Karkaroff spat onto the ground at Dumbledore’s feet. In one swift   movement, Hagrid seized the front of Karkaroff’s furs, lifted him into   the air, and slammed him against a nearby tree. “Apologize!” Hagrid   snarled as Karkaroff gasped for breath, Hagrid’s massive fist at his   throat, his feet dangling in midair. “Hagrid, no!” Dumbledore shouted,   his eyes flashing. (GoF)   It's apparent in fifth year when he introduces the Thestrals that the students are apprehensive of his lessons and don't trust Hagrid a bit, even the Gryffindors:      Now, what we’re studyin’ today is pretty rare, I reckon I’m probably the   on’y person in Britain who’s managed ter train ’em —” “And you’re sure   they’re trained, are you?” said Malfoy, the panic in his voice even   more pronounced now. “Only it wouldn’t be the first time you’d brought   wild stuff to class, would it?” The Slytherins murmured agreement and   a few Gryffindors looked as though they thought Malfoy had a fair   point too. (OotP)   So why had Dumbledore, who said:     “Please do not suggest that I do not take the safety of my students   seriously, Harry.” (OotP)   Appointed him? It's not as if he had no alternative as was sometimes a case with DADA teachers. Prof. Grubby-Plank expressed readiness to work as a teacher full time at Hogwarts, and apparently students enjoyed her lessons more than Hagrid's.  It's one thing for Dumbledore to trust Hagrid with his own life, and with specific missions like bringing infant Harry to the Dursleys or sending him as an emissary to the giants. But trusting him with magical creatures around students, when it's evident he considers even the deadliest ones fluffy and harmless? How's that a wise appointment? And seeing how he wasn't a popular teacher - even the students who liked him the most and were the most active in his lessons weren't interested in taking up his subject after it ceased to be mandatory preferring Divination(!) - And if he was unwilling to sack Hagrid, why haven't Dumbledore at least hired Grubby-Plank too, providing an alternative?  Edit: it's not a question about necessary professional qualifications or about having a clean criminal record, as the question   more about student safety and Dumbledore’s opinion on Hagrid as a teacher.


Is transferring to another university an option for an unhappy PhD student?

I've heard of people transferring between graduate schools because of their advisor moving to another school and taking their students with them.   Do students ever transfer for other reasons? If a student isn't happy at the school they choose, could transferring be an option? Presumably they would frame it as something positive such as "turns out I really want to work with Professor X" rather than "I hate my school", but does this ever happen? Is there a certain timeframe in which this is possible? (Assume it's a 5 year PhD program.)  If the answer varies by subject please mention the subject in your answer.  (Context: many friends have told me that if it turns out I'm not happy with my choice, I can always transfer. My impression is that this is actually difficult since many schools don't accept transfer students and in any case not being able to stick with a program looks bad -- but I don't have evidence either way so wanted to ask people who are in academia. Of course the ideal would be to pick a school one is happy with in the first place!)


How do I grep for multiple patterns with pattern having a pipe character?

I want to find all lines in several files that match one of two patterns. I tried to find the patterns I'm looking for by typing   grep (foo|bar) *.txt   but the shell interprets the | as a pipe and complains when bar isn't an executable.  How can I grep for multiple patterns in the same set of files?


Does it give higher quality to shoot in low-res mode in-camera, or to downsize high-res photos later?

Suppose you want to store your photos at some lower resolution, let's say about ~1 MB large.  You own a camera able to make photos at 5 MPix and more.  And, you want to have the maximum quality at the smaller size.  Would it be better to make a photo at highest resolution and then resize it with PC software (with a good filter of course), or to directly set the camera to make photos at 2 MPix only?


I have a fairly simple scene - large ground plane, five uv spheres, Pro-Lighting envmap - that's consistently and almost instantaneously crashing Blender on render.  From my tests, it seems to be a result of a very high subdivision on my primary ground plane (which is approx. 2.8x7 blender units with around 54k verts), combined with a high subsurf level (for microdisplacement). It handles a Level 3 Level 4 subsurf fine; crashes almost immediately at Level 5.   I've done a number of large scenes with millions of verts on this machine before (scene + 20k object particles, with randomly between 1500 and 17k verts each) and while it takes forever and an age to build, eventually it cranks through and renders just fine. I've had a few slow almost to a complete standstill for a while, but I've never had one crash outright.  I know someone is going to quote the subsurf exponent table to me, and I acknowledge that it's almost ridiculously high, but I do legitimately see a difference in the scene at that level.   Given that it crashes almost instantly, as soon as it attempts to synchronize that mesh object, is there a mathematical limit that it's hitting before memory even comes into play (this is a 16GB system)?  Is there some internal limitation to the number of vertices a scene can trigger via rendertime subsurf?


If a sequence of polynomials converges uniformly to a continuous function on the real line, then this function is a polynomial

I'm trying to prove that if $f\colon\mathbb{R}\to\mathbb{R}$ is continuous function and there is a sequence of polynomials $p_n$ that converges uniformly to $f$ on $\mathbb{R}$, then $f$ is a polynomial itself.  It smells like somewhat near the Weierstrass approximation with polynomials, but I have no idea how to use uniform convergence on the entire real line, since this statement is wrong on any bounded interval.  Any hint or solution will be appreciated.


Are there any free software packages like Photoshop that can be used to edit and add effects to photos? I want to create a professional look to my photos.


What is the Indefinite Integral of $f(x)=x^x$?

A very simple question, but I cannot seem to find the answer. I know that $f(x)=x^x$ simply isn't integrable, but that doesn't mean the indefinite integral doesn't exist, right? Is there anything that you could put in place of the "$?$" that could satisfy the indefinite integral? $$\int x^x dx =?$$


In the following experiment for seebeck effect    After a certain temperature, the thermo-emf begins to fall. Why does this happen? What is happening microscopically at this level to cause such an effect ?


I'm attempting to bind a DependancyProperty in one of my usercontrols to the Width property of a Column in a Grid.   I have code similar to this:  <Grid x:Name="MyGridName">     <Grid.ColumnDefinitions>         <ColumnDefinition x:Name="TitleSection" Width="100" />         <ColumnDefinition Width="*" />     </Grid.ColumnDefinitions>      <Grid.RowDefinitions>...</Grid.RowDefinitions>      <GridSplitter x:Name="MyGridSplitter" Grid.Row="0" Grid.Column="0" ... /> </Grid>   In a separate Usercontrol I have the followingDependancyProperty defined.  public static readonly DependencyProperty TitleWidthProperty = DependencyProperty.Register("TitleWidth", typeof(int), typeof(MyUserControl));  public int TitleWidth {     get { return (int)base.GetValue(TitleWidthProperty); }     set { base.SetValue(TitleWidthProperty, value); } }   I am creating instances of the Usercontrol in code, hence I have a binding statement similar to this :  MyUserControl Cntrl = new MyUserControl(/* Construction Params */); BindingOperations.SetBinding(Cntrl , MyUserControl.AnotherProperty, new Binding { ElementName = "objZoomSlider", Path = new PropertyPath("Value"), Mode = BindingMode.OneWay }); BindingOperations.SetBinding(Cntrl , MyUserControl.TitleWidthProperty, new Binding { ElementName = "TitleSection", Path = new PropertyPath("ActualWidth"), Mode = BindingMode.OneWay }); /* Other operations on Cntrl */   The first binding defined works fantastically, although that is binding to an actual UIElement (in this case a Slider), but the Binding to "TitleSection" (which is the ColumnDefinition defined in the Grid) fails. Putting a breakpoint in the code and doing a watch on "TitleSection" returns the expected object.   I am beginning to suspect that a x:Name'd ColumnDefinition can't be bound to. Can anyone suggest how I might be able to bind to the changing width of the first column in my grid?  EDIT #1 - To answer comments  The databinding 'fails' in the sense that with a breakpoint set on the setter for the TitleWidth property, and using the GridSplitter control to resize the first column, the breakpoint is never hit. Additionally, code I would expect to be fired when the DependancyProperty TitleWidth changes does not get executed.  The usercontrol is being created and added to a Stackpanel within the Grid in the Window_Loaded function. I would expect that the Grid has been rendered by the time the Usercontrols are being constructed. Certainly the x:Name'd Element TitleSection is watchable and has a value of 100 when they are being constructed / before the binding is happening.  EDIT #2 - Possibly something to do with this?  I've been having a sniff round the MSDN pages for the Grid ColumnDefinition documentation and have come across  but I can't get my head around how I can use this in a binding expression. I cannot use the associated GridLengthConverter as a converter in the binding code as it does not derive from IValueConverter.   I am leaning towards somehow binding to the ActualWidth property of one of the cells in the Grid object. It doesn't seem as clean as binding to the column definition, but at the moment I cannot get that to work.


Programatically setting default Geodatabase and Workspaces for map document?

I have a QC process that has a bunch of models that need to be sequentially run, and then the results manually inspected between each model.    I know how to manually set the default GDB for the Map Document (File-->Map Document Properties-->Default Geodatabase).  I also know how to manually set the default Geoprocessing Workspaces (Geoprocessing-->Environments-->Workspace).  I already have a "setup script" that generate a GDB, Feature Datasets, define the spatial reference, etc, and I would like to be able to integrate these steps into the setup procedure as well.  Can these settings be automatically set?  For example, I have tried arcpy.env.workspace, but that only appears to work within a script, not setting it at the "application" level.  Is this possible?    I know it seems like a small thing, but I have many "areas of interest" that we have to look at, and each one gets placed in its own MXD and GDB (so yes, I could do it by hand... over & over again).


It is possible to 'fill' an array in Python like so:  > [0] * 10 [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]   I wanted to use this sample principle to quickly create a list of similar objects:  > a = [{'key': 'value'}] * 3 > a [{'key': 'value'}, {'key': 'value'}, {'key': 'value'}]   But it appears these objects are linked with one another:  > a[0]['key'] = 'another value' > a [{'key': 'another value'}, {'key': 'another value'}, {'key': 'another value'}]   Given that Python does not have a clone() method (it was the first thing I looked for), how would I create unique objects without the need of declaring a for loop and calling append() to add them?  Thanks!


Whether there is a continuous bijection from $(0,1)$ to closed interval $[0,1]$.

Is there a continuous bijection from open interval $(0,1)$ to $[0,1]$. The answer is not. How to prove?   I think it may proceed by contradiction and apply open mapping theorem. However, $(0,1)$ is not complete. I get stuck.


From Pride and Prejudice:     “My dear Mr. Bennet,” replied his wife, “how can you be so tiresome! You must know that I am thinking of his marrying one of them.”   What is the function of "his" in this sentence, is it possessive or just a Victorian way of "him."


Prove that, for all positive integers $x$ and $y$, $\sqrt{ xy} \leq \frac{x + y}{2}$

Help I'm really stuck on a proof question:  Prove that, for all positive integers for $x$ and $y$, $\sqrt{ xy} \leq \frac{x + y}{2}$   Thanks!


I've recently dug out an old iPhone to sell.  It has activation lock on it which is pretty normal. However, it's linked to an Apple account which has had its password changed since then. I've also removed it from the iCloud interface.  It now refuses to unlock with either my current password or the password I used then... :(  Is there anyway to reset this iphone without having to go through tech support?


How to include multimedia files in beamer

A quick survey of the unanswered  questions suggestions that about 20% of them are about problems with including multimedia files, such as videos or sound files. Many of them are about either using the wrong method for their file type (or the wrong file kind for their method) or use an unsuitable pdf viewer. Maybe this question can help to organise the information a bit. There are different ways to include multimedia files in , which one work and which ones do not highly depends on the pdf viewer you use and the operating system you are on. This questions tries to summarize the main information about the different packages which can be used, one answer per package.  Packages covered in this Q&A:       Tools/Viewers covered in this Q&A:       Useful Q&As on this site:


How wrong are the classical Maxwell's equations (as compared to QED)?

Now, I don't really mean to say that Maxwell's equations are wrong. I know Maxwell's equations are very accurate when it comes to predicting physical phenomena, but going through high school and now in college, Maxwell's equations are seen as the equations of electricity and magnetism. Now, it's common knowledge among students that, while Newton's laws are generally accurate when applied to everyday experiences, they are also replaced at high velocities by special relativity (and general relativity for very large gravitational fields).  But this is less so the case with Maxwell's equations. I have read that Maxwell's equations are replaced with quantum electrodynamics (which to me has all the effect of mere buzzwords, since I don't know what quantum electrodynamics is) as a more accurate way of describing electromagnetic waves, but what are the limitations of Maxwell's equations?  Or let me phrase this differently. I'm currently an electrical engineering major. I know NASA scientists and engineers can still get away with using Newtonian physics for their calculations, because it's that accurate. I also know, however, that relativity does have to come into play with GPS. So, in what situation as an electrical engineer would Maxwell's equations ever fail me? When (assuming I'm working on such a sufficiently advanced project) would I have to resort to more accurate ways to describe electromagnetic waves?


I am trying to refer a "Box" object to another "Box" object via a method declared inside the "Box" class

I am trying to write a method where a reference to an object will refer to another object.  Here I created two "Box" objects, now if I want box and box2 both to refer to box2, I could have written box=box2, but I want to do the same thing via a method which I wrote as "public void change(Box b) {}", but it isn't working.  As far I know Java passes argument to parameters as "call by reference". But when I write "box2.change(box);" the "box" object still refers to original "box" instead of "box2"  public class Main {     public static void main(String[] args) {         Box box = new Box(50, 50);         box.show();          Box box2 = new Box(100, 100);         box2.show();          box2.change(box);         // After applying method         box.show();     } }   class Box {     int height;     int width;      Box(int h, int w) {         this.height = h;         this.width = w;     }      public void change(Box b) {         b = this;     }      public void show() {         System.out.println("H: " + this.height + " " + "W: " + this.width);     } }


SSH key-based auth asks for password on first login

I have a fresh Ubuntu 16.04.1 LTS system and have noticed that key-based SSH authentication asks for the account's password the first time I login to the machine and subsequent SSH attempts work without prompting for a password.  So far, the behavior can be reproduced by rebooting the machine.  There may be a timeout as well, but I'm in the process of setting up the machine and haven't encountered it yet.  In general this is pretty neat as it mitigates a compromised SSH key, though it has a drawback for automated processes; in my case config management with Ansible.  Where is the SSH server behavior configured?  Specifically, to ask for password authentication even if a key-based auth succeeds, but only the first time the key is used to open a session.  I'd like to keep this "two-factor"ish behavior for interactive sessions, but disable it (i.e. do not prompt for password) for certain accounts (e.g. a dedicated ansible user).  Thanks!


What are the main ressources HAProxy needs handling millions of requests per hour? What hardware is recommended (CPU, Cored, Ram...)?


Summing series for $e^x$ with an asymptotically decreasing term

Say we want to prove that   $$ \left(1 + \frac{x}{n} + o(1/n) \right)^{1/n} \xrightarrow{n \to \infty} e^x \,\,\text{ for fixed }x \geq 0.$$  The case for   $$ \left(1 + \frac{x}{n} \right)^{1/n} \to e^x $$  can use monotone convergence theorem, because the columns of the below array are non-decreasing. But if we put the $o(1/n)$ in there, we don't know anymore.  $$\begin{matrix} 1 & x & 0 && \dotsb \\ 1 & x & \frac{2 \cdot 1}{2^2}\frac{x^2}{2!} & 0 & \dotsb \\ 1 & x & \frac{3 \cdot 2}{3^2}\frac{x^2}{2!} & \frac{3 \cdot 2 \cdot 1}{3^3}\frac{x^3}{3!} & \dotsb \\ 1 & x & \frac{4 \cdot 3}{4^2}\frac{x^2}{2!} & \frac{4 \cdot 3 \cdot 2}{4^3}\frac{x^3}{3!} & \dotsb \end{matrix}$$  When we include the $o(1/n)$, and we don't know whether $o(1/n)$ is monotone or not, would the usual way be to prove convergence first, by taking a bound for $no(1/n)$, then use dominated convergence theorem, using that it's dominated by $e^{x + \text{bound for }n(o(1/n))}$?  Or is there a smoother, more generalizable path? Maybe some clever use of Taylor expansion or something?