cmake error: undefined reference to `Array::Array(unsigned long)'

I've below Array definition in file templates.hpp #include <cstddef> #include <iostream> using namespace std;  template <typename T> class Array { private:   T* elements;   size_t count;  public:   Array(size_t size);   Array(const Array& other);   Array(Array&& other);   virtual ~Array();   T& operator[](size_t index);   const T& operator[](size_t index) const;   Array& operator=(const Array& other);   Array&& operator=(Array&& other);   size_t size() { return count; } };   Below is my templates.cpp file #include "templates.hpp" #include <iostream> #include <cstddef> using namespace std;   template <typename T> Array<T>::Array(size_t arraySize)   try: elements { new T[arraySize]}, count {arraySize} {     cout<< "sucessfully created the array" << endl;        }   catch(const exception& e){     cerr << " Memory Allocation failure in Array Constructor." << endl;   }    template <typename T>   inline Array<T>::Array(const Array &other) try : elements {     new T[other.size()]}, count { other.size }      {         cout<< "sucessfully created the array" << endl;    } catch(const exception& e ) {     }   I'm using catch2 library to test my code. Below is my templates_test.cpp file. #include <iostream> #include <memory> #define CATCH_CONFIG_MAIN #include "catch.hpp" #include "templates.hpp" #include <cstddef> using namespace std;  TEST_CASE("initialize the array", "Array init") {    Array<int> data {(size_t)5};  }   I'm using cmake to build this project and test. My CMakeLists.txt file is - cmake_minimum_required(VERSION 3.20 FATAL_ERROR)  project(chapter-01 LANGUAGES CXX)  set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_EXTENSIONS OFF) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)  add_library(templates templates.hpp templates.cpp)  add_executable(templates_test templates_test.cpp catch.hpp) target_link_libraries(templates_test templates)  enable_testing()  add_test(NAME catch_template_test COMMAND $<TARGET_FILE:templates_test> --success)   I created build directory and running cmake commands inside build directory. cmake .. is working fine. I ran cmake --build . commands failed. Below is the error trace.  cmake --build .                                                                     18:09:50 Consolidate compiler generated dependencies of target templates [ 50%] Built target templates Consolidate compiler generated dependencies of target templates_test [ 75%] Building CXX object CMakeFiles/templates_test.dir/templates_test.cpp.o [100%] Linking CXX executable templates_test /usr/bin/ld: CMakeFiles/templates_test.dir/templates_test.cpp.o: in function ____C_A_T_C_H____T_E_S_T____0()': templates_test.cpp:(.text+0x19eee): undefined reference to Array::Array(unsigned long)' /usr/bin/ld: templates_test.cpp:(.text+0x19f52): undefined reference to Array<int>::~Array()' /usr/bin/ld: templates_test.cpp:(.text+0x19f92): undefined reference to Array::~Array()' collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/templates_test.dir/build.make:98: templates_test] Error 1 make: *** [CMakeFiles/Makefile2:85: CMakeFiles/templates_test.dir/all] Error 2 make: *** [Makefile:101: all] Error 2  I check this  post and its original post. I'm using cmake where those post author used gcc to compile directly. Also, I've added both files templates.hpp templates.cpp in the add_library too. How can I fix this issue?


Rename a file and add a part of the file as the suffix of the file


Show that $A$ is connected given that $A\cup B$ and $A\cap B$ are connected

Can anyone help in proving this statement. I have thought and tried but can't seem to do it. Let $(X,T)$ be a topological space and let $A$, $B$ be two closed subsets of $X$. If $A\cup B$ & $A\cap B$ are connected, then show that $A$ is also connected.


Install CentOS alongside Ubuntu on the same hard disk on which Ubuntu is installed

Can I install CentOS on the same hard disk on which Ubuntu is already installed without overwriting Ubuntu?  Will grub give me the choice to select between OSs at boot time? P.S.: i have 500GB on the hard disk and Ubuntu only locate 8%*


Why Wouldn't I Buy A Diode With The Highest Reverse Voltage?

I'm only just beginning to read about diodes. I'm looking at the 1N400x series, where all specs are the same except the reverse voltage (link:  for example). The reverse voltage increases as x increases, all else is the same (even price).  From what I understand, the reverse voltage is the maximum voltage drop the diode can have (in reverse) before it fails. My question is, is there a reason I shouldn't just buy the highest reverse voltage I can find? Is the N4001 not the same in every way as the N4003 except that the N4003 can work with higher voltages without failing?


Question:     I want to scale a tikzcd diagram, but it doesn't seem to be working. It always compiles in a small scale. How does one scale a tikzcd diagram to, say, large scale?   Attempt:   I tried to set the option scale but it doesn't do anyhting.   \documentclass{article}  \usepackage{tikz} \usepackage{tizk-cd}  \begin{document} \begin{tikzcd}[scale=2.7em]  X \arrow{d}[swap]{\mathcal Q} \arrow{r}{f}  &Z \\   Y \arrow{ru}[swap]{\bar f} &{} \end{tikzcd} \end{document}    I've also read the manual  but I don't understand how to use the command /tikz/commutative diagrams/ row step=\langle size \rangle or its variances. I believe I'm using the latest version of tikz-cd and pgf files.   Note: I'm not interested in tikzpicture or similar environments, I'm working with tikzcd.


I've been spending some time looking at Phil Haack's article on  very interesting stuff.  At the moment I'm trying to figure out if it would be possible to use the same ideas to create a plug-in/modular architecture for a project I'm working on.  So my question is: Is it possible to have the Areas in Phil's article split across multiple projects?  I can see that the name spaces will work themselves out, but I'm concerned about the views ending up in the right place. Is it something that can be sorted out with build rules?  Assuming that the above is possible with multiple projects in a single solution, does anyone have any ideas about the best way to make it possible with a separate solution and coding to a predefined set of interfaces? Moving from an Area to a plug-in.  I have some experiences with plug-in architecture but not masses so any guidance in this area would be useful.


That may be a stupid question but is there a way to keep the indent while using the parskip package? I use parskip to keep spacing between my paragraphs while leaving the table of contents and lists intacts but I would like to keep the indents in my text.  Code 1 :  \usepackage{parskip}  \tableofcontents  \section{Section 1} \subsection{Sub 1}  Paragraph 1  Paragraph 2   Code 2  \setlength{\parskip}{10pt}  \tableofcontents  \section{Section 1} \subsection{Sub 1}  Paragraph 1  Paragraph 2   Basically I want the aspect of the table of contents (and possible lists) from the code 1 while keeping the indent like in the code 2. The package parskip works great but I just don't like that it deletes the indents and I'd like to find a way to prevent it from doing that.   Thank you.


Windows command that returns external IP

Is there a command by which I can find my external IP of my router or my NAT\DSL Router, etc., eliminating the need to visit whatsmyip.net or similar.


I have: a = {'name':'alfred','class':'2'} b = {'year':'1990','town':'NY'}  And I want to merge a and b to get: {'name':'alfred','class':'2', 'year':'1990','town':'NY'}  So far I created a new dict and iterate through both to set key values pairs.


Why does Java Sript give me back the same results for (97**13)%77 and (104**13)%77?

I have a Math problem in Java Script. Java Sript says that (104**13)%77 == (97**13)%77. But i don´t know why, when i copy and paste it in Python it doens´t say they are equal. Python says: (97**13)%77 = 69 and (104**13)%77 = 48.


How to perform dimensionality reduction with PCA in R

I have a big dataset and I want to perform a dimensionality reduction.   Now everywhere I read that I can use PCA for this. However, I still don't seem to get what to do after calculating/performing the PCA. In R this is easily done with the command princomp.  But what to do after calculating the PCA? If I decided I want to use the first $100$ principal components, how do I reduce my dataset exactly?


Subgroup of order 2 of a group of order 56

I was given the following question: Does every group of order 56 contain a subgroup of order 2. I know that the Sylow theorems guarantee the existence of an order 8 subgroup. Is there a general technique to prove the existence or the non-existence of subgroups of lower prime powers? Thank you for your help.


How to align a whole content to up of page

How can I align a whole page content to beginning of page? I would like to prevent such situations, where there are huge distances between elements like lists or paragraphs (evenly distributed elements) because the next item didn't fit on this page:


i have xubuntu 14.04 LTS and i wan't to ask one question.I'am tried many pages ,but nowherewas this.Please help me i wan't to make my Xubuntu look like normal ubuntu(i have old laptop and the normal ubuntu is laging) and one thing is missing ,the overlay scrollbar please help me.


How to remove chromium-browser settings from Ubuntu 14.04?

I have already gone through   and I'm really not getting why the solutions given there are not working for me.  What I'm doing is:   sudo apt-get purge chromium-browser   rm -rf ~/.config/chromium     Then reinstalling by running the following command:   sudo apt-get install chromium-browser    This must remove the settings of chromium-browser and do a fresh installation. The browser is uninstalling, but after being installed it is containing the previous settings, moreover it's not signing me out of even Gmail!


In formal writing, if I have 2 examples to depict what I said earlier, can I start writing a sentence using 'for another example' form after explaining my first example using 'for example'? More clearly:  for example, bla bla bla.... . for another example, bla bla bla ... .  is this construction suitable in formal writing?


In C, what is the size of a long for a 32-bit machine and for a 64-bit machine?

Is it correct that a long in C has a size of 4 bytes for a 32-bit platform and 8 bytes for a 64-bit platform?


How can we prove that the number $142857$ is the only six digit number with the property that if I put the last digit before the first digit we get $5$ times our number so:  $$\frac{714285}{142857}=5$$  So my question is:  Proof that $142857$ is the only six digit number for which I can put it's last digit before the first digit and get a number that is an integer times my chosen number (5 in this case)


Why can I get two different results when calculating $\int \ln(z) \,dz$?

When I take as a branch cut $]\!\,-\!\infty,0]$ for the complex logarithm, I get: $$\int_{\lvert z\rvert<1}\ln(z)\,dz=\int_{-\pi}^{\pi}\ln(e^{i\theta})\,i\theta \,d\theta=-2i\pi$$ whereas, when I take  $[0,+\infty[$ as a branch cut, I get:  $$\int_{\lvert z\rvert<1}\ln(z)dz=\int_{0}^{2\pi}\ln(e^{i\theta})\,i\theta \,d\theta=2i\pi$$ Does the integral of $\ln(z)$ depend on the branch cut we choose?


How can I indent the paragraphs which follow a heading?

I am trying to write a text where the first line of each paragraph has an indent(tab). But for some reason, in a chapter or a section or subsection, except the first paragraph, the rest of the paragraphs have an indent(tab). Is there any way to add an indent to the first paragraph in a chapter or section or subsection?


Chapter cross reference not capitalized with \autoref

When I use \autoref{}, from the hyperref package, to cross reference a \chapter{}, the cross-reference in the text is not capitalized. How can I change this?  \documentclass{report}  \usepackage{hyperref}  \begin{document}  \chapter{Intro}\label{int} HE First \autoref{int} \chapter{Next One}  \end{document}


My Email Strightly goes to gmail spam/just folder ( DKIM,SPF,DMARC is okay )

( it's not duplicate , its related to rDNS , please don't flag it as duplicate or give me the link of related one )  i have a problem, my emails from my mydomain.com straightly goes to spam folder in gmail, other service providers are okay.  i have setup DKIM , SPF and DMARC and test them with verifier.port25.com and the result are:  SPF check:          pass DomainKeys check:   neutral DKIM check:         pass Sender-ID check:    pass SpamAssassin check: ham  i send my emails from WordPress that using (PHPmailer function), I'm suspicious that my rDNS config is wrong, my current value of rDNS is xx.544654-5454.eu and gmail says that the xx.544654-5454.eu not encrypt your message , should i change my rDNS to mydomain.com ?


How to Send Html Emails in Google Spreadsheet

Here's an example of a Google Docs Spreadsheet script that sends emails using Google spreadsheets. I want the email Sent in HTML not plain text. Can someone help me out?  function sendEmails() {   var sheet = SpreadsheetApp.getActiveSheet();   var startRow = 2;  // First row of data to process   var numRows = 2;   // Number of rows to process   // Fetch the range of cells A2:B3   var dataRange = sheet.getRange(startRow, 1, numRows, 2)   // Fetch values for each row in the Range.   var data = dataRange.getValues();   for (i in data) {     var row = data[i];     var emailAddress = row[0];  // First column     var message = row[1];       // Second column     var subject = "Sending emails from a Spreadsheet";     MailApp.sendEmail(emailAddress, subject, message);   } }


Let's say you have two tasks $T1$ and $T2$. Each task has $2$ sub-tasks. Task $T1$ has $2$ sub-tasks, $T1_1$ and $T1_2$. $T2$: has $T2_1$, $T2_2$.  How may ways to execute these tasks if sub tasks have to be executed in their order within a task, e.g. $T2_2$ cannot be executed before $T2_1$?  Note, even the sub tasks within the task have to be in order, there are no order between the tasks. E.g. $T1_1$ could be executed and $T2_1$, $T1_2$, $T2_2$.  Imagine you have a cpu with $2$ cores which can execute simultaneously two functions, but within the function statements go in order.


I have User class with field like login, password etc.  In method i tryed to  get acces to field:  preparedStmt.setString(1, User.getid());   but is the error  non static method cannot be referenced from a static context


Suppose $f(z)$ is analytic in the open region $D$, and $C$ is a simple closed curve in $D$. For any $z_0\in D\setminus C$, prove:   $$\oint_C\frac{f'(z)}{z-z_0}\mathrm{d}z=\oint_C\frac{f(z)}{(z-z_0)^2}\mathrm{d}z.$$   It is a homework problem immediately after the introduction of complex integral and Cauchy's integral theorem.  When the region $S$ surrounded by $C$ is contained in $D$, the value of the above integral is either both $2\pi i f'(z_0)$ (when $z_0\in S$) or both $0$ (when $z_0\notin S$). But in the case when $S\not\subset D$, which means $C$ encircles some holes or singular point of $D$, I don't know how to handle it.  Any idea or hint will be appreciated, thank you!


The sources.list repository file simply doesn't exist because of an installation issue, causing all sorts of problems because all the commands like .deb and stuff return command not found. What is the easiest way to fix this?  note: I'm not trying to re-write a corrupted sources.list, but rather to create one. If I was trying to re-write, it would let me use some commands that have been suggested in other posts, but because the current condition of the sources.list is "nonexistant," the other commands return "sources.list was not found and thus cannot be rewritten."


Given the ideal $J^\prime=\langle xy,xz-yz\rangle$, find it's radical.   I know that the ideal $\langle xy,yz,zx\rangle$ is radical ideal but that's not the case. How can I compute the radical here?


Rich Snippets not working (and working at the same time?)

We have an eCommerce site, and we have had rich snippets implemented (in JSON-LD) since January/February this year (2015). I have read multiple sources (including the Google documentation) and there seem to be three possibilities why they are not showing:   Not enough time has passed (4-12 weeks seems to be the common time quoted) The markup is wrong Google have decided not to show the data   I can rule out the first given the amount of time. The second I am fairly confident is not the case as I have used multiple testing tools. As for the third … well that's anyone's guess (although the study  suggests that MOST shops should be successful).  A strange note is that the rich snippets do not show on a regular search for our ranking keywords (we rank #1 for a few and page 1 for the majority). However the rich snippets DO show when we search for a ranking keyword + site:www.fridgefreezerdirect.co.uk as show here:    I have done this in an incognito window in the browser and using a VPN with the same results.  Can anyone suggest anything we can do or reasons this may be?


Preventing 304 NOT MODIFIED response in Tomcat

If a resource (index.html) is already cached in the client, for example using response header:    "Cache-Control": "max-age=0, must-revalidate, proxy-revalidate"   How can I prevent tomcat to respond with a 304 Not Modifiedin the next request to the server? I would like to force the server to respond with 200 instead of 304 no matter what.  I tried to set   httpResp.setHeader("Cache-Control", "no-cache, no-store, must-revalidate, proxy-revalidate"); httpResp.setHeader("Pragma", "no-cache"); httpResp.setHeader("Expires", "0");   but it only works in the SECOND request. The first request still gets 304. I tried to override the if-modified-since header using HttpServletRequestWrapper with values in the past such as Mon, 06 Dec 2010 01:34:46 GMT with no luck - client still gets 304 responses although the file was modified in 2015. Is there any way I can prevent 304 responses? maybe via tomcat configuration?


Does a Multiclassed spell slot higher than your choosable spells enable you to use a Spell Scroll without making an ability check?

I am aware that, to use a Spell Scroll, you must have the related spell on (at least one of) your spell list(s). Then, if you have the spell slot to cast it, you succeed automatically; else, you must make an ability check in order to cast it (failure resulting in the scroll being wasted).  Consider this example : A Cleric 5 / Wizard 4 finds a Raise Dead Spell Scroll. The spell is on the Cleric List, but is a fifth level spell. Considering that the cleric-wizard has fifth level slots, but can only pick up to third level cleric spells, would he have to make the ability check to successfully cast the Raise Dead in the Spell Scroll, or would he succeed automatically ?


In a group $G$, if for all $a,b,c\in G$, $ab=ca\Rightarrow b=c$, then $G$ is abelian

Let $G$ be a group. If for all $a,b,c\in G$, $ab=ca\Rightarrow b=c$, then phow can I prove that  $G$ is abelian?


I have my own routing server that uses OSRM as an routing engine. (I used .)  I want to be able to add my own data (roads) and include that data in the routing.  So in the beginning I thought to add my data in the OSM format (node, way, relation) with an id that doesn't exist in the xml file to the osm.xml file that the OSRM uses to route. But that will mess up the id's coming from the OSM server in case of updating the data (diff).  So now I'm wordering if there is any way to use OSRM with my own data.


The doctrine I believed "to be" or "is" or "was" right

It is the doctrine I believed to be right .      It is the doctrine I believed was right.      It is the doctrine I believe is right.   What is the difference between "to be right," "was right," and "is right" used in this sentence? And why using "was right" and "is right" possible? Is it because it is used the same way as "doctrine which I think was right"?  Also, is it possible to change this question     What would you predict the mass of rocket to be?   to this     what would you predict the mass of rocket is?    since the answer would usually be "I predict that the mass of rocket is...", not this: "I predict the mass of rocket to be." Is it possible? Thank you!


Set<Long> set = new HashSet(); set.add(123455678l); set.add(124561233l);   How to convert the above Set into List of type String ? Without Iteration


Multiple Domains and Subdomains Using Multisite Installation

I have the following domains/subdomains. They are all related to each other, yet they must be on different domains/subdomains  example.com  www.example.com (redirects to example.com)  sub1.example.com  sub2.example.com  example.net  www.example.net (redirects to example.net)  sub1.example.net  sub2.example.net   I would like to have a single WordPress installation for all the above (i.e., end up with a single DB). I do understand that I can setup a multisite installation if I have a single domain with subdomains. But for the above, this would mean I end up with TWO multisite installations (one for example.com, and another for example.net).   Is it possible to setup a single multisite installation with a single database allowing more than one main domain as shown above? If so, how?  Thanks.


I have to create an equals method that return true if the Politicians' titles are the same. How do I compare the strings?  This is how I've tried to write it so far:  public class Politician implements Priority{ private String name, title; private int a; public Politician(String n, String t, int p){     name=n;     title=t;     a=p; } public boolean equals(Politician a){     if(title.equals(a.title))         return true;     return false; }   However, it just always return false. Even when I test:  Priority t4= new Politician("Arnie", "Governor", 4);     Politician t5= new Politician("Bill", "Governor", 10);     System.out.println(t5.equals(t4));      System.out.println(t4.equals(t5));   I've written equals() before and I don't know why it's not working anymore


Are there bonus spells for prime ability scores?

In previous versions, spell casters were given bonuses to available spells based on their casting ability score. I don't remember exact stats but to make an example, A wizard would be able to memorize extra spells:  Int 14 = 1 extra lvl 1 Int 15 = 2 extra LVL 1 Int 16 = 2 extra lvl 1 and 1 extra lvl 2 Int 17 = 2 extra lvl 1, 2 extra lvl 2 and is required for casting lvl 8 spells Int 18 = 2 extra lvl 1, 2 extra lvl 2, 1 extra lvl 3, and is required for casting lvl 9 spells.  I can't seem to find mention of this bonus in D&D 5th Edition. Does it apply to prepared spell limit, spell slots, or has it been obsoleted?  Note: I also can't seem to find mention of a prepared spell limit, or feats.


Second law of Newton for variable mass systems

Frequently I see the expression  $$F = \frac{dp}{dt} = \frac{d}{dt}(mv) = \frac{dm}{dt}v + ma,$$ which can be applied to variable mass systems.  But I'm wondering if this derivation is correct, because the second law of Newton is formulated for point masses.   Furthermore if i change the inertial frame of reference, only $v$ on the right side of the formula $F = \frac{dm}{dt}v+ma$ will change, meaning that $F$ would be dependent of the frame of reference, which (according to me) can't be true.   I realize there exists a formula for varying mass systems, that looks quite familiar to this one, but isn't exactly the same, because the $v$ on the right side is there the relative velocity of mass expulsed/accreted. The derivation of that formula is also rather different from this one.   So my question is: is this formula, that I frequently encounter in syllabi and books, correct? Where lies my mistake.


System message breaks mobile site layout

When a site has a "system message" shown (such as the message shown on recently launched beta sites, like ), the mobile layout suffers:         Compare the above with how the mobile navigation bar normally looks:        Worse yet, a selected tab on the navigation bar is shown in white on white:         Observed in mobile Opera 27 on Android, and also in desktop Chrome 41 on Chrome OS, from where the screenshots are taken.   The problem is that  <div class="system-message-container"> is positioned where the navigation bar is supposed to be; if it is  deleted, the normality is restored.


How to prove that $\frac{1}{9}= \sum_{i = 1}^{ \infty } \frac{1}{10^i}$

I am new here and I am eager to find out how to prove this: $\frac{1}{9}= \sum_{i = 1}^{ \infty } \frac{1}{10^i}$ Is induction a method in order to prove that? Even though, to my knowledge, induction only works for finite numbers. I really want to know the answer. Thanks a lot.


If $a^3 =a$ for all $a$ in a ring $R$, then $R$ is commutative.

Let $R$ be a ring, where $a^{3} = a$ for all $a\in R$. Prove that $R$ must be a commutative ring.


I'm trying to prove that if $z,w$ are non non-zero complex numbers then $|z+w|=|z|+|w|$ iff there exists a positive real $c$ st $z=cw$.  Now I've proved the leftward implication but I'm having difficulties with the rightward one, so I'd appreciate any hint.  NOTE: I can't use the exponential or polar representation of complex numbers nor the notion of scalar product but only the basic algebraic properties of complex numbers.


Sampling distribution of sum of two or more sample means

Let's say I have 3 sample means: $\bar{x}$, $\bar{y}$, $\bar{z}$ with sample sizes $n_1 = n_2 = n_3$ and standard deviation $s_1$, $s_2$, $s_3$. I know how to find the distribution of the difference in sample means: $E(\mu_{\bar{x}} - \mu_{\bar{y}}) = \mu_x - \mu_y$ with standard error $\sqrt{\frac{s_1^2}{n_1} + \frac{s_2^2}{n_2}}$. Would the distribution of the sum in sample means have the same distribution, except that $E(\mu_{\bar{x}} + \mu_{\bar{y}}) = \mu_x + \mu_y$? Also, I'm interested in obtaining the distribution of the sum of three sample means. I assume the mean would be $E(\mu_{\bar{x}} + \mu_{\bar{y}} + \mu_{\bar{z}}) = \mu_x + \mu_y + \mu_z$, but what about the standard error? Sorry if this doesn't make sense. I'm trying to apply some stats to my work and not sure how to go about. Thank you!


Macbook (12' 2015) keyboard and trackpad

I'm running Ubuntu 16.04 LTS on a Macbook 2015 (not Pro). Laptop keyboard and trackpad are not working (except power button). I have installed   from GitHub, but it still do not work.  I have no idea what else to try or commands to run to to make changes.  Hope someone managed to make Ubuntu (or an alternative distro work on a Macbook).  EDIT  Here is print of cat /etc/initramfs-tools/modules  # List of modules that you want to include in your initramfs. # They will be loaded at boot time in the order below. # # Syntax:  module_name [args ...] # # You must run update-initramfs(8) to effect this change. # # Examples: # # raid1 # sd_mod  # applespi applespi spi_pxa2xx_platform spi_pxa2xx_pci  # applespi applespi spi_pxa2xx_platform intel_lpss_pci   I think there are two groups of applespi, because I tried both installations methods listed in on GitHub for the macbook12-spi-driver (link above).


I had installed VirtualBox but it started giving me problems. So I uninstalled it using:-  sudo apt-get remove virtualbox-\* sudo apt-get purge virtualbox-\*   But when I reinstalled VirtualBox it again resumed to previous settings and started giving same problems. How can i completely remove VirtualBox from my laptop and then reinstall it such that it wont give same problem again?


How can I explain that $A\cup(B\cap C) = (A\cup B)\cap(A\cup C)$ is true?


Getting 'permission denied error' with Wget

I installed the  on my Ubuntu 11.04 (Natty Narwhal) with   sudo apt-get install lamp-server^   Now I navigate to /var/www and use   wget http://ftp.drupal.org/files/projects/drupal-7.x-dev.tar.gz   I get the following error.   --2011-08-03 13:59:00--   http://ftp.drupal.org/files/projects/drupal-7.x-dev.tar.gz Resolving  ftp.drupal.org... 64.50.233.100, 64.50.236.52 Connecting to  ftp.drupal.org|64.50.233.100|:80... connected. HTTP request sent,  awaiting response... 200 OK Length: 2757101 (2.6M)  [application/x-gzip] drupal-7.x-dev.tar.gz: Permission denied   Cannot write to `drupal-7.x-dev.tar.gz' (Permission denied).   How do I resolve this error?  I tried to download the same file in the downloads folder, and it went on without an issue. So it seems to be some permission error, but I'm not sure about that or how to solve it.


How to stop people from downloading an online video for offline playback?

I have a problem, something I'm sure a lot of video sharing companies might have. I want to start a small business by offering online video-based training courses on Microsoft Office and other office software in my town on my native language. The problem is, I'm planning to start offering cheap suscriptions for all-access to all the videos, maybe $for 5 dollars a month to get more people interested...however, I know my target audience, and I'm sure they will quickly resort to wanting to download the videos to stop paying, and who knows, maybe even share them on some site and make them public ruining my business...  My question is, is there a video format, or a way to embed, I don't know, a video file so that it cannot be downloaded for offline playback? Maybe using flash files in some remote server? I don't know...I just need a way to play videos on a web browser, that won't allow any form of downloading for offline playback and distribution. Please help guys, I'm kid of struggling to make enough money to pay for college already.  [edit] Thanks for all the information everyone...It seems there is no right answer for this, so let me rephrase the problem.   I'm going to be dealing with people with little to no knowledge of advanced computer usage. My target audience consists of 18-23 year old college students that only use their computers for Facebook, playing candy crush, watching youtube videos and doing their homework. I know most of them are now aware of how to download videos from the internet, but their knowledge is very limited (and by that, I mean sites like KEEPVID.COM or youtube-mp3.org). Most don't even know screen capture software exists, or how to get it, so I'm hoping to use that "naive" characteristic to some use.   So ok. I CAN'T stop my videos from being downloaded, but is there a way to, as I said, make it harder, say...stop sites that download the actual video file hosted/embedded? I don't mind if you can still download the video with some tricks, I just wan't my target audience to have a hard time figuring it out. Right answer goes to the most useful answer, since there is no right answer.


I have some commands in my .profile that I want to invoke from my crontab.   For example, if I have,   alias notify-me="~/bin/notify.pl -u user1" alias notify-team="~/bin/notify.pl -u user1 user2 user3 user4 ...."   I'd like to just invoke the alias  0 11 * * * notify-team   so if the list in my .profile is updated, I don't have to update the crontab, too. However, I don't seem to be able to use aliases in my crontab. Is there a work around?  I tried the suggestions  to set up the environment (e.g. /bin/bash -lc and the script-wrapper script). It seems like that works for scripts but not aliases.  Any ideas?


Under what condition we can interchange order of a limit and a summation?

Suppose f(m,n) is a double sequence in $\mathbb R$. Under what condition do we have $\lim\limits_{n\to\infty}\sum\limits_{m=1}^\infty f(m,n)=\sum\limits_{m=1}^\infty \lim\limits_{n\to\infty} f(m,n)$? Thanks!


What does it mean when a PostgreSQL process is "idle in transaction"?

What does it mean when a  process is "idle in transaction"?  On a server that I'm looking at, the output of "ps ax | grep postgres" I see 9 PostgreSQL processes that look like the following:  postgres: user db 127.0.0.1(55658) idle in transaction   Does this mean that some of the processes are hung, waiting for a transaction to be committed?  Any pointers to relevant documentation are appreciated.


How do I split an inline-math parenthesized list?

I have some paragraph of text, within which I want to say something like $( foo, bar, baz, and, so, on)$. This overfills the line and doesn't break where (I believe) it should.  Questions:   Why doesn't my formula break even though I don't have an \left(-\right) pair, nor a group? What can I do to make it break reasonably without manually specifying where exactly it should break?   Example:  \documentclass{minimal} \begin{document} Hello world. $( number 1, number 2, number 3, number 4,  number 5, number 6, number 7, number 8,  number 9, number 10, number 11, number 12,  number 13, number 14, number 15, number 16,  number 17)$. The quick brown fox jumped over the lazy dog. \end{document}   which results in:


5 hour international layover in Tokyo Narita?

I have a 5 hour layover in Tokyo, between Hong Kong and Boston. Is that enough time to leave the airport and see the city? If not, is there anything I can do in the airport?


Automatic insertion of current date when rows are entered via Zapier

Unfortunately, as a new user I am not allowed to comment. This is why I need to do a new post regarding to this topic:   This is my code in Google Sheets Script:  function onEdit(e) {   if (e.range.getSheet().getSheetName() == 'Tabellenblatt1' && e.range.getColumn() == 1) {     e.range.offset(0,1).setValue(new Date());   } }   It works perfectly when I enter data in cell 1 manually, but when data is added via API (in this case when data is added via Zapier) it does not work. Anybody can give me a hint why?


How to constrain many-to-many to mark a single record as a "default"?

Suppose I have the following entities:  customer(id, name)  template(id, name)  With a junction table:  customer_template(id, customerId, templateId, is_default)  A customer may have any number of templates but only one is allowed to be the default.  How do I constrain the junction table so that there is one and only one default template assigned?


Can a Wizard write spells in something other than a spellbook?

So basically I have a bard that I am about to multiclass into a wizard. I’d like to know if it’s possible to not need a grimoire specifically, but be able to say write my spells by writing them on or carving them into my characters lute? Obviously the space on the instrument used to write spells on and challenges of carving the spells would be limiting/possibly difficult, which is a whole other bag of issues I’m not worrying about just yet.  I just want to know if this is at all possible. I’ve read the PHB and it doesn’t seem to say anywhere that you must use a spell book to write your spells in, nor that there’s much difference from writing in a spell book vs say, a piece of wood you carry with you.  However, I could have possibly missed somewhere where it says you cannot. Either way any help or insight given is much appreciated, thank you.


Proving either $T(v)=0$ or $T(x)=v$ has a solution for every $v$ in $V$?

If $T:V\longrightarrow V$ is a linear transformation where $V$ is finite dimensional, then either:  a) $T(v)=0$, for some $v≠0$ in $V$.  b) $T(x)=v$ has a solution $x\in V$ for every $v\in V$.  --  I don't think I properly understand the question. Please help me


How to compile c11 iso standard code with g++ compiler

System Details:  $ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=12.04 DISTRIB_CODENAME=precise DISTRIB_DESCRIPTION="Ubuntu 12.04.2 LTS"   $ g++ --version g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions.  There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


How to install Python 2.5.4 in Ubuntu 11.10?

I've been reading through some posts on how to install Python 2.5.4 in Ubuntu but I can not manage to find a solution to my problem. The version of Ubuntu I have is the 11.10 and the one of Python I intend to install is 2.5.4. It must be that one and not any of the updates since I am following a course which  uses specifically 2.5.4. I have already tried executing in the terminal commands proposed in other posts but I always get a mistake.   I'd be really thankful I some could explain detailed and concisely how I can do it.  As said, thank you in advance,  Dionisio.


Why can't the JVM ensure garbage collection

This is not a duplicate as the thread mentioned as duplicate only tells you why to not use System.gc(), while I do know that, that's not my question.  Using System.gc() or Runtime.getRuntime().gc() won't always execute garbage collection, it just requests it and it can even be ignored by the JVM.   Is there a reason behind this? Is it "random"? Since I don't think random even exists in programming, I'm curious why it sometimes doesn't collect it, and sometimes does and also at different times.


Showing that the limit of $\sin (n) $ as $n $ approaches infinity doesn't exist

In order to do that I want to find two subsequences $a_n$ and $b_n$ of $\sin (n) $ such that $\lim_{n \to +\infty} a_n $ and $\lim_{n \to +\infty} b_n$ are not the same number.  Hints?


how to install ubuntu 14.0.1 inside/alongside windows 8.1 preinstalled laptop?

I have purchased a new laptop with windows 8.1 preinstalled. I want to use ubuntu 14.0.1 on my laptop without uninstalling windows. I have created bootable usb stick for installing ubuntu. But when i open wubi.exe install inside windows option is not there. Is there something like you can't install ubuntu 14.0.1 inside windows?  If not, then how do i accomplish this task?


Why is pronunciation of rough and though different?

Why is "ough" pronounced so differently in rough and though and thought?


How to typeset asymmetrical confidence level limits / uncertainties with amsmath?

Below is an example of an asymmetrical limit (or uncertainty)  How can I typeset this in a \LaTeX equation? Such pair of numbers should be vertically stacked while being vertically center-aligned with rest of the equation.


Is getting a random integer even possible?

On googling I got     Random numbers are numbers that occur in a sequence such that two conditions are met: (1) the values are uniformly distributed over a defined interval or set, and (2) it is impossible to predict future values based on past or present ones. Random numbers are important in statistical analysis and probability theory.   What if I want to pick a random integer from the number line ? The number line consists of infinitely many integers. My favorable event is to get a number (random) and the number of events possible is the complete number line i.e. infinity. I won't be considering any limits here as our number line doesn't tend to infinity but does contain infinitely many elements.  Now the probability of getting a random number  P(E) = 1 / ∞ = 0   So I won't be able to get a random number, ever. This implies, never would I ever be able to get a random number.  That's absurd as many of our science topics do depends on things being random.


Do search engines read image metadata like copyright and author?  Is adding metadata to site's images valuable for SEO?


I am trying to upgrade my kernel, but I would like to avoid updating all of the packages that a sudo apt-get dist-upgrade causes.  I am running Ubuntu 14.04, if that matters.  Is there a way to only upgrade the kernel?


How to write/align the text in the given format?

Theorem: When a quadrilateral is inscribed in a cycle i.e. the vertices of the quadrilateral lie on the           circumference of a circle; the quadrilateral is called a cyclic quadrilateral.  lala: xxxx lala lala       yyyy   Question: How to have yyyy below xxxx?


How do I export templated classes from a dll without explicit specification?

I have a dll that contains a templated class. Is there a way to export it without explicit specification?


How to get a web page's source code from Java

I just want to retrieve any web page's source code from Java. I found lots of solutions so far, but I couldn't find any code that works for all the links below:          The main problem for me is that some codes retrieve web page source code, but with missing ones. For example the code below does not work for the first link.  InputStream is = fURL.openStream(); //fURL can be one of the links above BufferedReader buffer = null; buffer = new BufferedReader(new InputStreamReader(is, "iso-8859-9"));  int byteRead; while ((byteRead = buffer.read()) != -1) {     builder.append((char) byteRead); } buffer.close(); System.out.println(builder.toString());


I have a complicated formula field that calculates the months between a start / end date on an OpportunityProduct. This formula takes into account many edge cases, and is subsequently used in our calculation of UnitPrice.  no_of_Months__c =  (  (Year_End_Date__c * 12) /* Calculate years as Number of Months */  + Month_End_Date__c /* Add Number of Months */  + (  DAY(End_Date__c) /* Add Day of Month / Number of Days in Month. Returns month percentage as a Decimal */  / DAY(DATE(  IF(Month_End_Date__c = 12, Year_End_Date__c + 1, Year_End_Date__c),  /* Can't create a date with 13 months so need to add a year if in December */  IF(Month_End_Date__c = 12, 1, Month_End_Date__c+1),  1) -1) /* Need to find number of Days in Month by taking the Day from the 1st of next month - 1 day */  )  )  - (  (Year_Start_Date__c * 12)  + Month_Start_Date__c  + (IF(DAY(Start_Date__c) = 1, 0, (  DAY(Start_Date__c) - 1) /* Slight Difference here to subtract a day. We want to go from Start of day on StartDate to End of Day on EndDate*/  / DAY(DATE(  IF(Month_Start_Date__c = 12, Year_Start_Date__c + 1, Year_Start_Date__c),  IF(Month_Start_Date__c = 12, 1, Month_Start_Date__c+1),  1) -1)  )    When a new OpportunityProduct is being created on the fly, I am unable to reference this formula field for obvious reasons (the record doesn't exist yet), so I have to manually calculate the number of months and use that in the UnitPrice calculation. Is there a way to copy this formula logic into my apex class easily, or do I have to rewrite this calculation using entirely new syntax? I am not the original author of the formula, so I would like to avoid the latter if possible.


I am interested in using/learning RoR in a project where I have to use a .NET dll. Is Ruby capable of importing a .NET dll?


Can i access and modify any software code working on linux?

So there's a bug in a certain software and i thought maybe i could look at the software code, since it's all open source, and try to fix it. Is it possible? are all software accessible by any user, and if so is it a possible to overwrite the code or is it a read-only kind of document?  Thanks for answering.


When TeX shrinks an equation, it only uses the shrink component of glue "at the outer level".  For instance, numerator/denominator of fractions are not shrunk, as shown by the example below: first I put the output of the code then the desired output (obtained by scaling \thinmuskip, \medmuskip, \thickmuskip by 0.8, it turns out).  \shipout\vbox{\hsize=140pt\relax   $${1+2+3\over 2-1}=1+2+3={1+2+3}$$} \bye     Is it possible in LuaTeX to make TeX shrink such glue that is in a sublist when necessary?  (I don't think it is possible in other TeX engines unless one takes over control of the full math typesetting, like in breqn.)  (This question is inspired by  where it was asked whether TeX could combine boxes in parallel.)


Why can't I see any string fields in graduated renderer?

After the join I can see all my data in the attributes of the layer but when I want to select statistics in the graduated style to categorize, I don't see them. I see that the real type variables and not those of type string. Are there any parameters to be changed?    original:  après avoir fait la jointure je vois bien l'ensemble de mes données dans les attributs de la carte mais quand je veux sélectionner les statistiques dans l'onglet style pour catégoriser, je ne les vois pas. Je ne vois que les variables de type real et pas celles de type string. Y a t-il un paramètre à modifier?


Why anova has different result on the same dataframe?

The code is like the following:  > d <- data.frame(a=c(1,1,1,1,2,2,2,2), b=c(1,1,2,2,1,1,2,2),v=1:8) > anova(lm(v~a*b, data=d)) Analysis of Variance Table  Response: v           Df Sum Sq Mean Sq F value   Pr(>F)    a          1     32    32.0      64 0.001324 ** b          1      8     8.0      16 0.016130 *  a:b        1      0     0.0       0 1.000000    Residuals  4      2     0.5                     --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1 > anova(lm(v~a, data=d)) Analysis of Variance Table  Response: v           Df Sum Sq Mean Sq F value   Pr(>F)    a          1     32  32.000    19.2 0.004659 ** Residuals  6     10   1.667                     --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1   My question is why "a" has different value of F and Pr between lm(v~ab) and lm(v~a)?  As far as I think anova(v~ab) will test avona(v~a), anova(v~b) and anova for a and b together.


How do I divide a circle into equal parts like a pie chart with Adobe Illustrator?

Is there a fairly simple way to divide a circle into equal parts using Adobe Illustrator CC?


The function to be mocked is of class ContactsProductionService.java  @Override public ContactsProductionDto getContactsProduction(long id) {      Site       site    = siteDao.find(id);      ContactsProductionDto contactsProductionDto = new ContactsProductionDto();          List<Entite> entities = entiteDao.findEntitesByType(Type.CP);         for (Entite entite : entities) {             ProductionCenterDto productionCenter = new ProductionCenterDto();             productionCenter.setId(entite.getId());             productionCenter.setCode(entite.getCode());             productionCenter.setNumber(entite.getNumero());             productionCenter.setName(entite.getDescription());             contactsProductionDto.getProductionCenters().add(productionCenter);         }return contactsProductionDto;   And this is the test:  @Test public void testGetContactsProduction(){     Mockito.when(siteDao.find(id)).thenReturn(new Site());     List<Entite> entities = null;     Mockito.when(entiteDao.findEntitesByType(Type.CP)).thenReturn(entities);     ContactsProductionDto contact=contactsProductionService.getContactsProduction(id);     Assert.assertNotNull(contact); }   I'm getting NullPointerException on running this test. The cause is that inside the for loop value of Entite is null!! Any help please :(


I have just encountered an issue with a model I have created. When I scrub through the timeline parts of the model seem to explode away from each other. To my knowledge I have not added any modifiers to it and do not want this to happen! Here are a couple of images which illustrate the problem:  At Frame 0   At Frame 10   Here is a link to the blend file:   Any help would be much appreciated!


Calculation of $2^{XXXX} + 3^{XXXX}\pmod{11}$

I've a question: How do I calculate $2^{2020} + 3^{2020}\pmod{11}$?  Is there a theorem or any trick to do it? I need to show all the steps I used to calculate the Rest but I've no clue how to even start with the calculation...  Does anyone have any tips and could show me how to calculate it?   Greetings!!!


Drupal site moved from development to live - IE won't load stylesheets anymore

Before you ask ... I have looked everywhere for a solution, even drupal.org but nothing so far seems to work.  I developed a Drupal site (custom child theme for Zen) and on the development server everything looks fine in all browsers.  I did a test migration to another server before the launch. This move went well and everything looks fine in all browsers.  Then I moved the site to its live server where everything looks fine in all browsers except Internet Explorer which is not loading the stylesheets.  I know Drupal is known for generating many stylesheets and Internet Explorer will not load them if there are more than 31 (I believe) of them, but I did set the "Aggregate and compress CSS files" feature and clear the cache. This did not seem to help.  Could the answer be in one of the two following things?   The development site and backup site are both with one hosting provider. The live site is with a different hosting provider. The development site and backup site are in subfolders of two different portfolio sites ... ie www.portfoliosite.com/Newsite. The live site is a subdomain of the parent site ... ie www.newsite.parentsite.com.   I have run out of ideas so if anyone has a possible solution or direction to look, please let me know. Thanks


Due to an upcoming exam I came across the following past exam question which at first seemed easy. The question is as follows.   Let $f(y_i) = (\frac{k}{y_i})^2$ be the density function of the (random) income of agent A where $k$ denotes the minimum amount. As such the income follows a pareto distribution with support $[k, \infty)$. Determine the expected income.   At first, my thoughts were pretty routine: Apply the definition $\mathbb{E}[y_i] = \int\limits_{k}^{\infty} f(y_i)y_i dy_i$ and integrate. The result is the expected income. But after doing that I got the integral $\int\limits_{k}^{\infty} \frac{1}{y_i} dy_i$ which of course does not converge. Hence, the expected income would be infinite which is not sensible - not economically nor in the exam situation. But what do I miss here?


What creatures were dragons made in mockery of?

I've been wondering about this for years.  It seems like a pretty obvious question, so I'm surprised not to have found it addressed among the other Tolkien minutiae on this site.  Hopefully I haven't missed it, but anyway, here goes...  In Tolkien's Middle-Earth writings, Evil cannot create things, only twist and warp what already exists.  Thus, Orcs are twisted Elves, Trolls are twisted Ents, etc.  So then, what's the original source for Dragons?  They look pretty original to me!  The only template that seems even remotely possible is the Eagles, as they're both powerful fliers, but the connection seems very remote indeed.  Also, as twisted copies Orcs and Trolls are markedly inferior to Elves and Ents respectively, but I'm not aware of any text describing Dragons as inferior to Eagles.


$\lim\limits_{n \rightarrow \infty} \sqrt{n^2+n} -n$?

Calculate   $\displaystyle\lim_{n \to \infty} \left(\,{\sqrt{\,{n^{2} + n}\,} - n}\,\right)$.   $\displaystyle\lim_{n \to \infty}\left(\,{\sqrt{\,{n^{2} + n}\,} - n}\,\right) = \infty - \infty$ We have an indeterminate form   So I proceeded to factorize $$\sqrt{n^2+n} -n = \sqrt{ \frac{n^2(n+1)}{n}}-n =n \left[ \sqrt{\frac{n+1}{n}}-1   \right]$$  taking the limit: $$\lim\limits_{n \rightarrow \infty} n \left[ \sqrt{\frac{n+1}{n}}-1   \right]= \infty \cdot 0$$  indeterminate again  What am i missing? How is the way forward to proceed? Much appreciated


I want to deal with the command line input in Ruby:  > cat input.txt | myprog.rb > myprog.rb < input.txt > myprog.rb arg1 arg2 arg3 ...   What is the best way to do it? In particular I want to deal with blank STDIN, and I hope for an elegant solution.  #!/usr/bin/env ruby  STDIN.read.split("\n").each do |a|    puts a end  ARGV.each do |b|     puts b end


Compilation errors depends on Matrix entries

I have a problem while inserting a Matrix. I did it a couple of times and i had no error before. Here is the code:  $$ \left[ \begin{array}{cc} [RGA]_{11} & [RGA]_{12} \\  [RGA]_{21} & [RGA]_{22} \end{array}  \right]  \text{  becomes  } \left[ \begin{array}{cc} [RGA]_{11} & 1-[RGA]_{11} \\  1-[RGA]_{11} & [RGA]_{11} \end{array}  \right] $$   This doesn't compile, getting errors on line 5, while if I write:  $\left[ \begin{array}{cc} [RGA]_{11} & [RGA]_{12} \\  a [RGA]_{21} & [RGA]_{22} \end{array}  \right]  \text{  becomes  } \left[ \begin{array}{cc} [RGA]_{11} & 1-[RGA]_{11} \\  1-[RGA]_{11} & [RGA]_{11} \end{array}  \right] $   As a stupid example, it compiles!  Any idea of what is wrong?


I've not been able to find any solutions to this other than "monitor responses and match for patterns of fraud".  Let's say I make a client-side HTML/JS skill game, moving a butterfly net left and right to catch falling stars.  At the end of the game, the JS sends a request to the server, something like  {     "stars_collected":30,     "user_id":38194723,     "session_id":'dDhw83hDEknd83y727dhd' }   This is sent to   Nothing's stopping the client from just sending a fraudulent http request written by the end-user  {     "stars_collected":9999999999999,     "user_id":38194723,     "session_id":'dDhw83hDEknd83y727dhd' }   Now, obviously, the server side can mitigate some things such as always have a maximum obtainable number of stars etc.  My question is, can the data in the request be encoded/signed in some way so that the end-user can never actually see how the level_complete request is formulated?


Stuck in "grub rescue" after partial uninstall of Ubuntu

I have a Windows 8 laptop that I installed an Ubuntu partition on. I am going to donate this laptop and so was trying to uninstall Ubuntu.  In the middle of it the laptop rebooted and now it starts up with grub rescue.  I have tried many commands, but because all but one partition (zero size) is gone it won't take any of the commands.  Any advice?  I've got a Windows 8 rescue disk so I could try to fix the boot order, but the laptop will not boot from it.  Is there a grub command to boot from the CD?


Is there something like rc.local in systemd?

Back with system V init there was a script called rc.local where you could stuff commands that needed to be run during bootup, which would not fit to one particular service. Does systemd have a similar mechanism?


Split a video having millisecond time accuracy with FFmpeg

I'm trying to extract a part of a video with quite accurate time values. I tried following methods which were not a success.  ffmpeg -y -i <input_mp4> -ss 0.570 -f lavfi -i aevalsrc=0 -t 6.690000 -strict -2 -c:v libx264 -preset faster -crf 28 -acodec aac -map_metadata -1 -movflags faststart <output_mp4> ffmpeg -y -ss 0 -i <input_mp4> -ss 0.570 -f lavfi -i aevalsrc=0 -t 6.690000 -strict -2 -c:v libx264 -preset faster -crf 28 -acodec aac -map_metadata -1 -movflags faststart <output_mp4> ffmpeg -y -ss 0 -accurate_seek -i <input_mp4> -ss 0.570 -f lavfi -i aevalsrc=0 -t 6.690000 -strict -2 -c:v libx264 -preset faster -crf 28 -acodec aac -map_metadata -1 -movflags faststart <output_mp4>   In all of those commands I wanted to extract a video with duration of 6.690000 seconds, but actual resulted video was 6.712000 seconds long.  is the uncut FFmpeg output.  Following is the FFprobe command I used to get the duration of the output video.  ffprobe -i <extracted_video> -show_entries format=duration -v quiet -of csv="p=0"   I was referring to  document for FFmpeg. Is there anything wrong with above commands or is there any alternative way to extract the video with accurate time duration?   Input video framerate: 60 fps Input video bitrate: 25380 kbps


Better to buy an older high-level camera or newer entry-level camera?

What are the pros and cons of buying an older higher-level camera if the price is about the same as a new entry-level one?


How does "elemental" damage on weapons work with elemental skills?

I have a weapon that adds Holy damage.  How does this work with my skills that say "Does X% of weapon damage as INSERT ELEMENT damage and things of that nature"?  Example: My wand does 8-14 damage at 1.40 Attacks Per Second.  It has +1-2 Holy Damage for a total DPS rating of 15.4.  Ray of Frost deals 215% weapon damage as Cold damage.  How does this interact with the Holy damage?  What if the two elements are the same?


Possible Duplicate:             What's a proper but simple one-word description of a person to whom a question is being asked?


Why is $|\Psi|^2$ the probability density?

I am starting with Quantum Mechanics, learning online. I can't seem to find the reason for $|\Psi|^2$ being the probability density of finding an electron. They've just taken it for granted everywhere. I am learning all this math but I am not able to fully grasp the intuitive idea behind all of it. If anyone could explain this with proper reasoning, I would be grateful.


What is the original version of these two popular idioms?

When I was but a young lad, I often heard the following saying;  If “ifs”and “ands” were pots and pans, we would never do the dishes.  There is also another similar saying;  If ‘ifs” and “buts” were candy and nuts, we would all have a Merry Christmas!  Which idiom came first?


How to check ssh secret and public key validability in local command line

I have a secret key id_rsa and a public key authorized_keys that should be pair. But I have a problem to ssh by using these keys.  I want to check the validability of these key pair by a command in local environment. Because I prefer to ignore a error caused by network. (Even though I already confirmed there is no problem when password is used.)  Is there a command that is possible?


I have Lenovo M30-70 i3-4005U 4GB RAM HD4400 120GB Patriot SSD I want to install Ubuntu 16.04.1 How to partition my SSD(Swap,root...)? Thanks


Proving a theorem about sup norm using integrals and limits

I am trying to prove:  Suppose $f$ is bounded and continuous on $[0, 1]$. For any $n \in \mathbb{Z}^+$, define $$||f||_n = \left(\int_0^1|f(x)|^n \, dx\, \right)^{1/n}$$ Then, $\lim_{n \to \infty} ||f||_n \ge \max\{|f(x)|:x \in [0, 1]\}$.  I found the following proof:  Let $\epsilon>0$ and $\max\{|f(x)|:x \in [0, 1]\}$. Then, $M-\epsilon<M$ which means that there exits a $a \in [0, 1]$ such that $|f(a)| \ge M-\epsilon$. Since $f$ is uniformaly continuous on $[0, 1], \exists \delta>0$ such that for all $x \in (a-\delta, a+\delta)$, we have $|f(x)|> M-\epsilon$. Now, let $\delta_1=\{\delta, 1/2\}$ which implies that $2\delta_1 \ge 1$. Hence,  $$\int_0^1|f(x)|^n \, dx = \int_0^{a-\delta_1}|f(x)|^n \, dx+ \int_{a-\delta_1}^{a+\delta_1}|f(x)|^n \, dx+\int_{a+\delta_1}^1|f(x)|^n \, dx \ge \int_{a-\delta_1}^{a+\delta_1}|f(x)|^n \, dx\ge \int_{a-\delta_1}^{a+\delta_1}(M-\epsilon)^n\, dx$$ Thus, $$\int_0^1|f(x)|^n \, dx \ge |M-\epsilon|^n \cdot 2 \delta_1 \ge M-\epsilon^n$$ and the rest of the proof is rather trivial. Now, I am highly skeptical of this proof. For instance, the above proof seems to erroneously assume that $M-\epsilon \ge 0$. Also, how does the definition of uniform continuity imply that $|f(x)|> M-\epsilon$? Is there a way to fix this proof? Can someone please suggest how this can be proven (without using any concepts from measure theory)? If someone can show how $|f(x)| \ge M$, I can complete the rest of the proof from there.


Calculating Friction due to rotation from ball bounce?

In this question asked by , The rotation will depend upon:  upon impact, on:   Initial Speed of the ball hitting the surface (magnitude of ball velocity vector) Friction co-efficient of ball & surface (constants for simulation) Angle between ball impact velocity vector and the surface normal    Everything is fine except for second point. How the friction coefficient of ball and surface should be taken into account?    EDIT: The problem with my approach is i donot know the impact time of the collision. If say the time of impact is dt, Vn1 is the final velocity parallel to the surface then  mass*(Vn1-Vn0)/dt X r = torque   Then i can calculate the angular velocity produced by this torque if it acts for dt time.  also   Vn1= Vn0 + accelaration* dt   where   accelaration+angular_accelaration*r   Please correct me if i am wrong. Also how do i calculate dt?


How to construct a hash function that maps any binary string into a multiplicative group element?

Pairing based cryptography schemes such as identity-based encryption or different attribute-based encryption schemes (CP-ABE, KP-ABE etc.) often make use of a hash function defined as  $H_1:\{0,1\}^* \rightarrow \mathbb{G}_1$. Where, $\mathbb{G}_1$ is a multiplicative group of some large prime order $p$. Then, the function $e:\mathbb{G}_1 \times \mathbb{G}_2 \rightarrow \mathbb{G}_T$ is called a bilinear pairing if it has bilinearity, non-degeneracy and computability properties. Here, $\mathbb{G}_2$ and $\mathbb{G}_T$ are also groups. Now, my question is, how such a hash function $H_1$ is constructed?


For which values of reals $ a$ and $ x$ this:${x}^{x^{x^{x^...}}}=a$ could be work?

What happens to the W-Function in the expression ${x}^{x^{x^{x^...}}}=a$ and what values for $a$ and $x$ they take ? it seems there is a maximum value for $a$ that can take and which? Really I can't solved it using W-Function  Note We may avoid triviality case $x=a=1 $


I have a server S that I need to connect to.  I'm connecting to S as user asdf with control master and after that I perform some stuff:  ssh -N -f -M -o ControlPath=$SSHSOCKET ${USER}@${IP} -p ${PORT} -i id_rsa ssh -to ControlPath=$SSHSOCKET ${USER}@${IP} -p ${PORT} "su -c whoami && hostname && exit"   It works as expected, but second line asks me  for password.  I am trying such fix:  echo 'qwerty' | ssh -t -to ControlPath=$SSHSOCKET ${K3_USER}@${IP} -p ${PORT} "su -c whoami && hostname && exit"   but it gets even worse:  muxserver_accept_control: tcgetattr: Inappropriate ioctl for device tcgetattr: Inappropriate ioctl for device Password:   For me, it's mandatory to ssh as asdf first. I also can't make any other ssh control master connections. I also can't modify any config on the target machine.  I just need to switch to root via ssh somehow. Any ideas ?


Here is my excerpt code.  // Generate custom excerpt length function wpbx_excerpt_length($length) {     return 300; } add_filter('excerpt_length', 'wpbx_excerpt_length');   How do I allow html like <a> <b> <i> <br>


My code is throwing a NullPointerException in Java

I dont know why my code is throwing this error. I have a generic array that can hold maxCapacity = 100,  and if this number is reached with currentSize, the maxCapacity is doubled. When I perform the following test, it throws a NullPointerException. Why? NOTE: I START AT INDEX 1 (NOT 0) ON PURPOSE!!!!  Test:  for(int i=1; i <= 1100; i++)     list.addLast(i);            System.out.println("Should print 1 .. i");    for(int x : list)    System.out.print(x + " "); System.out.println("\n");   Here's my code:      private E[] list;     private int maxCapacity, currentSize;       public ArrayLinearList(){             currentSize = 0;              maxCapacity = DEFAULT_MAX_CAPACITY;             list = (E[]) new Object[maxCapacity];             //list[0] = null;             }      public void addLast(E obj){             if(isFull()) //check if maxCap has been reached first                 doubleArraySize();             System.out.println("Method called");             if(currentSize == maxCapacity - 1)                 doubleArraySize();              list[++currentSize] = obj;             }      ....      private boolean isFull(){                 if(currentSize == maxCapacity)                     return true;                 return false;                 }  private void doubleArraySize(){     maxCapacity *= 2;     System.out.println("doubling");     E[] valuesHolder = (E[]) new Object[maxCapacity];      for(int i = 1; i <= currentSize; i++)         list[i] = valuesHolder[i];          list = valuesHolder;         }


When I am trying to load video from multiple site i get the notice "A plug-in (shockwave flash) isn't responding". I have looked up solutions on multiple forums and sites and nothing has worked for me. I have tried doing a browser refresh (I'm using Google Chrome although it does not work in IE either), uninstalling the program the reinstalling it, and refreshing my computer. Please help me be able to watch videos again. I can also not use Pandora or any program using Shockwave.


Evaluate  $$I=  \int_1^2\int_1^2 \int_1^2 \int_1^2  \frac{x_1+x_2+x_3-x_4}{x_1+x_2+x_3+x_4}dx_1dx_2dx_3dx_4$$    Answer Options:   $1$ $\frac{1}{2}$ $\frac{1}{3}$ $\frac{1}{4}$   I need some suggestion here. I tried to evaluate one by one but it becomes messy. I think there some trick involved here.


How do I set the desktop background to a single color, instead of an image?

How can I get a monochrome desktop background? The context menu on the desktop background contains "Change background..." accessing the Settings section "Background". I can select one of multiple images as background, and can also add additional pictures. But I would like to make the background show a single solid color. Ideally I would like to be able to select this color. How to set the background color of the desktop? I do not see UI to do that, and also no UI elements to discover the option in other places of the UI. (It irritates me, because it is a feature that suggests itself.) See  on how to do it manually.


Allow converting comments to answers, so they can become accepted answers.  I asked a question. Someone commented on it, and it was an awesome comment that fully answered the question. As the original questioner, I would like to convert that comment to an answer in order to accept it.  Or, if you prefer, I would be okay with being able to simply mark the comment as accepted.


Is the electronic structure of an atom with two or more electrons solvable analytically?

I'm thinking about this through the lens of the $n$-body problem in classical mechanics, which was of course proven to be non-analytic for $n\ge3$ by Poincare. Does this same proof extend to a quantum mechanical $n$-body problem, or is there some way to write the hamiltonian that allows us to find an analytic solution for a particular $n>2$?


Cross products/avoiding using your hand for the right hand rule in E and M

I am currently learning electromagnetism and I am getting really annoyed using a physical hand to accomplish the right hand rule. I get it, i've seen diagrams, and i've solved problems with it but still somehow I mess up because I bend a finger or twist my wrist a strange way. I am tired of using my hand.  So my question is can I find an entirely mathematical basis for this?  Lets say for any given diagram I define the positive $x$ axis as going to the right, the positive $y$ axis as going up and the positive $z$ axis as going into the page. Then I just did unit vectors for everything to determine the missing component?  As I understand it $\vec{F} = q (\vec{V}\times\vec{B})$ and with that definition I am confident I could find out the direction of the electric field given the velocity of a particle of charge and the magnetic field but how can I re-arrange this so I can solve for other variables? For example what does $\vec{B}$ equal in terms of a cross product involving $\vec{V}$ and $\vec{F}$?


What would happen if, beneath the event horizon, a photon was emitted outwards along the radius of the black hole? It's speed can't change to any observer in any reference frame, but it surely cannot escape the black hole either! Is there a flaw in my second assumption?


Are there any spells or features that give another player an additional bonus action?   I am trying to find any way to get an additional bonus action during a round of combat above the standard one bonus action allotted due to having two features I want to use in conjunction with one another that both require a bonus action.


$\mathbb{Z}^n/R$ where $R$ is subgroup generated by rows of $n\times n$ integer matrix $M$.

Let $R$ be the subgroup of $\mathbb{Z}^n$ generated by the rows of integer matrix $M$.  I want to show that $det M=0$ implies $\mathbb{Z}^n/R$ is infinite, and also that $det M\neq 0$ implies $|\mathbb{Z}^n/R|=|det M|$.  I know I must use the Smith normal form in some way, as that is what we have been studying.


Change files with Editor that need sudo permissions

I want to change files with KomodoEdit that need sudo permissions. I can't start KomodoEdit with sudo, though (for whatever reason). Can I somehow grant Komodo permission to edit those files (in particular I am talking about apache2 files and /etc/hosts)?


Is there any possibility to find my father's lost iPhone?

My father has lost his iPhone 6 which was not signed in using an iCloud account. Is there any possibility it can be found?


How long will my battery last and how to calculate it?

I have a 12V 18Ah battery I wish to run through a boost converter at 40v and 2.5A to power a 100w led.  Could someone figure out how long my battery would power my led and show the calculatins/formulas.  Thanks


I have recently installed ubuntu 14.04 (and before that I had the same problem with 12.04) on a Dell inspiron 9400 Intel Core 2 Duo T7200. But when I am trying to type something the keys do sometimes not respond at all or the letter is repeated a lot in one short keystroke. for example: when typing "Hello" this can happen: " Hlllllllllllllo" The E in hello did not show up, and the second l repeated a couple of times. This didn't happen when I used a live usb boot. Does somebody have the solution for my  problem, because it makes the computer almost unusable. Thanks in advance


How can I copy the text by click the div?

How can I copy the text by click the div in the render function?  in the bellow you can see the div, I want to click it, then the clipboard can copy the text of it.    my code of render function is bellow:        h(          'div',          {slot:"content"},          [            h(             'ul',              params.row.ipv4s.map((item, index) => {                return h('li', [h('span', {}, index + 1 + '. ' + item.ip)])               })            )          ]        )   how can I realize my requirement?


remove lines that is newer than the given date in a file

I'm stuck on how I can go about deleting lines that are newer than given date. Here is a snippet of contents of a file.  buildsave.txt  647919 2013/11/30 647946 2013/11/30 647955 2013/12/01 648266 2013/12/03 648267 2013/12/03 648674 2013/12/04   I would like to remove the lines that are newer than 2013/12/03 leaving only  647919 2013/11/30 647946 2013/11/30 647955 2013/12/01   How can this be done through bash?


If photons have no mass, how can they have momentum?

As an explanation of why a large gravitational field (such as a black hole) can bend light, I have heard that light has momentum. This is given as a solution to the problem of only massive objects being affected by gravity. However, momentum is the product of mass and velocity, so, by this definition, massless photons cannot have momentum.  How can photons have momentum?   How is this momentum defined (equations)?


Javascript call function - Dynamic variable name

I am trying to call a function using a variable with it's name.  Here's the code:  var selectedFunc = 'func2';  var myModule = {      func1: function() {        //something here       },      func1: function() {        //something here      }  };  myModule.selectedFunc();   I would normally do this:  myModule.func1();   which will work but I'm trying to use the variable to define it's name, which is not working.  How can I fix this issue?


How does Stack Exchange determine 'Today's Featured Site'?

I wonder how SE reports the "Today's Featured Site" on the right side of its homepage. How does it consider a site as "featured"? is it the site with max number of views? or maybe max number of hot questions? what is it?


How does Ubuntu know what file type a file without extension is?

As the question goes, how does Ubuntu know what file type a file without extension is?  When I save a file as "Untitled Document" without any extension, how does it know? Same thing for video and music formats...


how to find out whether a point is surrounded by other points

I want to find out if a point $(x, y)$ is surrounded by a set of points.  To understand my problem a short explanation:  I am a programmer and I have a function for the user to select objects by drawing around the object with his/her finger. When the user is finished, I get a list of points with the user's touch-points. basically i want to find out if a point is surround by a polygon   Hope you can help me.  Pic:


Savings vs. checking account -- when to prefer savings if interest is the same?

Let's say I'm opening a new checking or savings account, assuming:  I already have another checking account All accounts offer the same interest rates  Why would I ever choose to open a savings account? I know that savings accounts are limited in terms of the number of transfers you can do, so that's one reason to prefer a checking account. But why would I prefer a savings account? (Note: I'm just asking about the general case. Clearly, if one of them offers a $100 bonus and the other doesn't, then I would take the first one. Obviously, that completely misses the point of the question, so assume there are no special circumstances surrounding them.)


App Store update issue? "We could not complete your purchase. cancelled"

For the past couple of weeks, every so often (every few days perhaps) I get this popup, from 'nowhere', ie, I don't have the App Store app open. I normally see it after I've been away for a while, or overnight it greets me as I wake the screen, so I've never seen or initiated any event myself that could cause it. Presumably this is an auto-update of something, but it doesn't say what. It's also not a general issue, other apps seem to be auto-updating as & when they like.  Any suggestions as to how to track it down? I'm signed in correctly. (Messages & Facetime are also absolutely fine.) Other apps update correctly, including one just today. If I go to the Store menu > View my account it goes straight to it, no issues, no further sign in required. As far as I'm aware I have no apps on this Mac that were purchased by any other account. Mojave 10.14.6 on an old Mac Pro 5,1 (last available macOS for this model without needing dosdude)


I'm following as tutorial and once I inserted a Landscape object a whole lot of settings for the landscape came up on the left side of my screen.  I've somehow lost these setting and I can't find it. I may of accidentally pressed a button or something.


Why is my PNG texture messed up after I import it?

I made a leaf texture in photoshop and exported it as png and I hope to use it in a tree model I'm making in blender. However after I import it using the add-on "Import Images as Planes", this is the result. Does anyone know why this is happening?


How can I set sliders to values outside the limits allowed by their slider?

How can I allow value sliders to be set higher than certain values? For example, I can't slide the subsurf slider past 6. This might seem like a bit of a silly question, but it always bugged me when watching a tutorial or something and somebody said something like      blender can't do more than 6 subdivisions, so add two modifiers   It just seems clunky to add another modifier.  How can I set a value slider such as the subserf setting higher than it normally goes?


Proof that the harmonic series diverges (without improper integrals)

Show that $$\sum\limits_{k=1}^n \frac{1}{k} \geq \log(n)$$ Use this to deduce that the series $$\sum\limits_{k=1}^\infty \frac{1}{k}$$ diverges.   Hint: Use the estimate $$\frac{1}{k} \geq \int_k^{k+1} \frac{1}{x}\,\mathrm{d}x$$   Note that all instances of "$\log$" mean the natural logarithm, the inverse of the exponential. After doing the integration, I've concluded that $\frac{1}{k} \geq \log(1+\frac{1}{k})>-\log(k)$  I suspect I'm supposed to use the hint to arrive at the first inequality, and then since $\log(n)$ can become arbitrarily large as $n$ increases, so must the harmonic series (essentially the comparison test).  I'm having trouble making this jump. Hints are appreciated, but please no solutions.


How do I programatically attach fields to a node defined in hook_node_info()

I've got a module which defines a node type. I also need to attach a few fields to this node.   I'm defining the node in hook_node_info(), and I'm creating fields in hook_install(). However, isn't this going to create the fields before the node? Isn't hook_install() executed before hook_node_info(), meaning that I'll be attempting to attach the fields to a non-existing node type at that point?  How do I define a node type programatically, and also attach fields to the node type programatically upon module installation?


Tag Tally Discrepancy between Web and Mobile Client

Mobile App: Stack Exchange iOS App version 1.6.6.2  Does anyone else have a discrepancy between their Tag Tallies when looking in the web (my  profile):    as compared to my dba.se profile in the mobile app:    In particular, I'm looking at the 389 vs 486 for the sql-server tag (as well as the other sql-server-20XX tags) and also the total count being reflected of 186 vs 166.  I'm not worried about the numbers so much as the fact that they just don't match.  Upon further digging this looks like this is site agnostic as my Stack Overflow profile shows similar discrepancies matching the calculation breakdowns as identified by  in the answers below.  Stack Overflow Web site:    Stack Overflow Profile in Mobile Client:


How to check if given server is DNS server or Not?

Is their a command or trick to check if given server is a DNS Server or not .


I am making a project using at89c51. I used my mobile charger (output: 5V, 1A)  as the power supply. Will my IC get damaged due to the high current?  I asked cause, without loading the program I connected the pin40(Vcc) and pin20(gnd) just to check whether all the port pins except port0 give output 1 or not, which is as I believe by default. And I got haphazard values which changed everytime I turned the supply off and on.  I also couldn't find the supply current range in the datasheet so got more confused.  Please advise.


What are the different internet connection types used by ifconfig and ipconfig?

Typing ifconfig on the command line gives me listings for several devices. I've seen at least the following ones:    lo0 gif0 stf0 en0 en1 en2 en3 p2p0 awdl0 bridge0   What specifically do each of them refer to? I know en0 is a wireless connection, en3 is a connection using a Thunderbolt-to-ethernet adapter, and en1 is an ordinary ethernet connection. What about the rest?


I'm trying to convert Shapefiles from the  website into a GeoJSON file for use with Google Maps API. I'm using QGIS to facilitate but I can't get the projection/coordinates right. So far I've tried Google Mercator (EPSG:900913) and WGS 84 (EPSG:4326) with no luck. I'm using the OpenLayers to verify results and it keeps placing Texas near the  Gulf of Guinea (0 lat, 0 lng).


Why doesn't this simple piping with awk work?

I'm trying to follow  answer but I can't make it work.  I simplified it down as much as I could to try work out what's going on  (just running this at the terminal for now):  rsync --progress -iav /my/dir1 /my/dir2 | awk '{ print($0) }'   But it only prints messages likersync: failed to set times on [file].  What am I doing wrong?  Edit: On further investigation it seems like awk is doing some sort of buffering. This:  for i in 10 20 30; do echo $i; sleep 1; done | awk '{print $0}'   Demonstrates a problem where no output is seen until 3 seconds have passed.  So I guess the question is how do I get awk to flush its buffer? I tried:  for i in 10 20 30; do echo $i; sleep 1; done | awk '{print($0); fflush()}'   Which had the same problem.


Safest driving route from Dunedin to Queenstown, NZ

I'm flying down to NZ's first Bitcoin conference on Friday, 31st October and will rent a car from Dunedin airport. I'm planning to either drive direct on Friday night or set off very early Saturday morning, while it's still dark.  Which of these 3 routes offers the least amount of windy mountain roads / other perceived hazards?    I'll be flying out of Queenstown for the return, so only concerned about the one-way journey.


Moving legend items up and down with arcpy

How can I move a layer up/down in the legend using arcpy? I work with ArcMap 10.2.2


Mistakenly moved the server files to a directory and the server wont work now

I screwed up my AWS instance.   I created a new directory demo inside my /var/www/html  Then in navigated to the html directory and ran this command:  sudo mv /* demo  And all the files and folders from the server root appeared in the demo directory.   How do I move it back?  Also, my intention was to move all the files/folders inside the html directory to the demo folder.


How to export font information for a specific PSD file for use in writing CSS

I'm doing front-end dev, so this question comes from that perspective.  When I receive a .psd I manually go through each font in the design, click on it, then use the character panel to get the font, color, size, kerning, etc.  Sometimes, I get a design that uses several different fonts (4+) with many variations of the same font (size, color, weight, etc.).  This is pretty tedious work... Is there anyway that Photoshop can export a list of all the used fonts and their variations? For example, a list like:     Arial bold 16px black    Arial regular 14px black    Arial regular 14px blue   Oswald 32px rgb(13,74,56) ...   Any suggestions for this?  Further, if there is a plugin of sorts that will just lay this information over the elements that would be fantastic!  Thanks.


If an attack alerts someone to your presence, can their initiative save them from being surprised in time?

In D&D 5e "" is a condition that can affect a creature during the first round of combat, only until the end of their turn:  [... T]he GM compares the Dexterity (Stealth) checks of anyone Hiding with the passive Wisdom (Perception) score of each creature on the opposing side. Any character or monster that doesn’t notice a threat is surprised at the start of the encounter. If you’re surprised, you can’t move or take an action on your first turn of the combat, and you can’t take a reaction until that turn ends. A member of a group can be surprised even if the other members aren’t. - PHB 189  Does the action that causes the surprise count as part of the round, though? Say Renee, a rogue, achieves a stealth check of 22, easily beating an orc sentry's passive perception. She sneaks directly behind him and stabs him in the back. Surely the orc isn't surprised at all until the dagger hits him (or if Renee misses, she fumbles around behind him or something). What I think it really boils down to in the end is: when is initiative rolled? If (in our example) initiative is rolled before Renee's attack hits (or misses) how can we justify the orc recovering from his surprise before the action that triggered said surprise even occurs, should he roll better than Renee on his initiative? I'd like to go with initiative is rolled immediately following whatever event began the encounter (which could be an attack, but is likely to often be something else wherever surprise isn't intended), but I can't find any documentation to support this stance.  Why Does Anyone Care? There are many reasons you might want someone to be surprised while you're attacking - in this example if Renee is over L3 (and took the Assassin archetype) she'll get 'Assassinate' if the orc is surprised, and 'Death Strike' if she's over L17. That's a lot of potential extra damage!  that if the orc is surprised, Renee will be able to retreat and hide, without having to take the disengage action as her bonus action to avoid an attack of opportunity. Of course, there's no way for her to know whether the orc is surprised or not at that stage, so trying this would be a bit of a gamble...


I have a shapefile with table with area code (field areacode).  How can I export with ArcPy each unique area code so I get a SHP file for each one?  It takes too long to select the layer and query each area code and then export manually to SHP file.


Deleted questions (maybe answers too) are visible in the suggested edit review queue for all users

When reviewing the suggested edits on AU, I noticed that question is deleted but still had a pending suggested edit, then I tried to see if this post is visible for me as I'm >10K or not and surprisingly when I open the review task in "incognito mode" I can see the deleted question but when I click title of the question there it redirects me to a deleted post page. I doubt if this a bug and should not be visible to all users at least, except for >10K rep users. link to task:   timeline of the question:


Friendly robot is stalking me and won't leave

Take a look on this friendly robot:   Looks innocent, right? Well, he is not.  I just went over the list of question on a , the home of that robot and tried to upvote a question I liked:        The robot appeared and explained to me I actually can't vote. Trying my luck, I clicked again. The dialog re-appeared as expected.  Time to give up, I wanted to read the other questions. I clicked the "cancel" in the dialog. Nothing happens. I clicked outside the dialog. Nothing happened. The robot is there to stay, and won't leave until I reload the page!  I know, I misbehaved by clicking twice, but still... do I deserve such extreme punishment? Can it please be closed when clicking "cancel" even if I clicked more than once?


When to know if it's valid to hyphenate the words?

I remember when I was in high school, and we were told to write an essay of something. When our mentor was done checking our papers, a friend of mine raised his concern on why did our teacher put a big red X mark on the phrase porcelain-like skin. Our instructor explained that the used of hyphen was invalid.   Question is, when to know if it's valid to use hyphen of two or more words.


How to find $\lim\limits_{n\to\infty} n·(\sqrt[n]{a}-1)$?

How to compute the following limit?  $\lim\limits_{n\to\infty} n·(\sqrt[n]{a}-1)$  We know that it's got something to do with $\ln$ or $\exp$.  We know that $\lim\limits_{n\to\infty} \sqrt[n]{a} = 1$ but it seems to not to be true that therefore $\lim\limits_{n\to\infty} n·(\sqrt[n]{a}-1) = \lim\limits_{n\to\infty} n·(1-1) = 0$.  What we know is  $\lim\limits_{n\to\infty} (1-\frac{1}{n})^n = \lim\limits_{n\to\infty} (1 + \frac{1}{n})^n \lim\limits_{n\to\infty} (1-\frac{1}{n})^{n+1} = e$  and  $\lim\limits_{n\to\infty} (1+\frac{x}{n})^n = \exp(x)$


Issue with a CanPlaceOn object for trade

I have this command /summon villager -179 64 95 {VillagerData:{profession:farmer,level:2,type:plains},Invulnerable:1,NoAI:1,CustomName:"\"Gardener\"",Offers:{Recipes:[{buy:{id:gold_nugget,Count:3},sell:{id:wheat_seeds,Count:3,CanPlaceOn:["farmland"]},rewardExp:0b,maxUses:9999999},{buy:{id:wheat,Count:1},sell:{id:gold_nugget,Count:3},rewardExp:0b,maxUses:9999999}]}} it works well, but in line 3-4 those wheat seeds are not place able on farmland. I checked around this website for an answer but no real answers. anybody know what I did?


Evaluate $\int_0^{\infty} \frac{\ln{\left(x^4+1\right)}}{x^2+1} \; \mathrm{d}x$

Evaluate $$\int_0^{\infty} \frac{\ln{\left(x^4+1\right)}}{x^2+1} \; \mathrm{d}x$$ I tried $x=\tan{t}$, $t=\frac{1}{x}$, factoring $x^4+1$ and split the log, and more.  This didnt go anywhere though.  Ideas?  Maybe complex analysis would be best here?


How to add a missing database to an AlwaysOn Availability Group

Setup: Microsoft SQL Server 2012, and we have 3 production servers(prod1, prod2, prod3) with AlwaysOn.  We recently added a new database and the new database was added to our Availability Group(named SQG01) on servers prod1, prod3.  For whatever reason the new database was not added on prod2.  All other existing databases on prod1,2,3 are all setup and running correctly.  Before adding the new database to the AG on prod2, should I do a restore to "catch up" the new database on prod2 so that it's at least close to the other 2.  We do nightly backups of our production(for restoring to dev/qa environments), so I would use the previous night and it shouldn't miss too many records.  Or should I just add it in and let AlwaysOn sync it up.  I'm not too familiar with AlwaysOn.


How to make sure the lines don't start with some space?

I am formatting a document in LaTeX.  I have the following code:  \documentclass[10pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amssymb} \usepackage[margin=0.5in]{geometry} \begin{document} Hello\\ This is a Latex Document\\ \begin{flushleft} How to write without a space in the beginning \end{flushleft}  Please help    \end{document}   I am giving the PDF generated from the below code:    Two problems:   Whenever I start the document there is a space with which the document starts And when I start with \begin{flushleft} and end with \end{flushleft} the next line again starts with space.   What I want is: using some package/some commands so that all my text is aligned to the left. Is it possible? I don't want any space to begin with in a line.


Prove that :$\tan 70 - \tan 20 = 2\tan 40 + 4\tan 10$


def hexdump(text, encoding='utf-8'):     text_bytes = text.encode(encoding)     for i in range(0, len(text_bytes), 16):         chunk = text_bytes[i:i + 16]  What is text_bytes[i:i + 16] exactly doing?


Encryption function for all files in same directory as program

I currently am using the following program for encrypting files using AES:  #include <openssl/aes.h>  void encrypt(FILE *ifp, FILE *ofp){   int bytes_read, bytes_written;   unsigned char indata[AES_BLOCK_SIZE];   unsigned char outdata[AES_BLOCK_SIZE];    /* ckey and ivec are the two 128-bits keys necesary to      en- and recrypt your data. Note that ckey can be      192 or 256 bits as well */   unsigned char ckey[] =  "thiskeyisverybad";   unsigned char ivec[] = "dontusethisinput";    /* data structure that contains the key itself */   AES_KEY key;    /* set the encryption key */   AES_set_encrypt_key(ckey, 128, &key);    /* set where on the 128 bit encrypted block to begin encryption*/   int num = 0;    while (1) {     bytes_read = fread(indata, 1, AES_BLOCK_SIZE, ifp);      AES_cfb128_encrypt(indata, outdata, bytes_read, &key, ivec, &num,            AES_ENCRYPT);      bytes_written = fwrite(outdata, 1, bytes_read, ofp);     if (bytes_read < AES_BLOCK_SIZE)   break;   } }   However, how can I make this program encrypt all the files in the same folder as the running program itself, instead of taking a file as input?


When does light act as a particle and when as a wave?

Can you compare this bizzare property of light to some situation so that I can understand it better?


does anybody know what's the meaning of that icon ?  I have a new oneplus one since several days and today this icon appeared in my status bar.


How to pipe a text file containing mongod arguments to mongod command

So usually I start a mongod process with 2 arguments like this  ~$ mongod --dbpath /media/nhuyvan1106/0CB6-189A/linux/mongodb/data --logpath /media/nhuyvan1106/0CB6-189A/linux/mongodb.  But I don't want to specify the arguments every time, so I saved them to a text file called mongo.txt with this following content.  --dbpath /media/nhuyvan1106/0CB6-189A/linux/mongodb/data --logpath /media/nhuyvan1106/0CB6-189A/linux/mongodb  Then I cat that file and pipe it through mongod like this  ~$ cat mongod.txt | mongod  But it does not work, mongod still uses the default value /data/db for the argument --dbpath and same for the other argument. Does any know how I can achieve this?


I have a 401k from a company I no longer work at. It's worth about 70k.  What should I do with it?  Is there any way I can roll it into something that I can use as part of a down payment for a house in 1 year?  If not, what is the best option right now?


Show that the order of $a\times b$ is equal to $nm$ if gcd(n,m)=1

$(G,*)$ is an abelian group and $a,b$ are elements of G. Let $n=ord(a)$ and $m=ord(b)$ in $G$. Show that the order of $a*b$ is equal to $nm$ if $gcd(n,m)=1$.  I have already proved that $ord(a*b)|nm$. But the other part is a problem.  Thanks


Combining 3 AT&T U-verse modems to form 1 Aggregate Connection?

I need a faster internet connection. I am thinking about getting 3 AT&T U-verse modems, each providing me 18x1mbps. Is there an effective way to combine all 3 modems to form 1 aggregated connection, 54x3mbps? I have 6 computers and I would like to have 4-5 of them connected directly to the connection via wired connection and the other 1-2 connected via wireless. Is this possible? How do I do this?


"I don't think I understand" vs. "I don't understand"

An ELL post () says     I don't think I understand what kind of buttonholes they're talking about.   I found "I don't understand" is commonly used to express the unawareness of something.     So, what is the difference between "I don't think I understand" and "I don't understand"? Is the latter more formal than the former, therefor no published book uses the former?  Could someone please give a hint? Thanks in advance.  On Google, "I'm not sure I understand" got 17,300,000 hits, "I don't think I understand" got 48,500,000 hits, "I don't understand" got 162,000,000 hits.


Should i use DNS or Proxy for server resolution?

We have a custom java web app. We are setting it up in instances in different vps (different providers, different locations).Each instance is independent and self contained. We have several docens of this instances and will continue to add them.   For example:  Instance 1: http://server1/app1 Instance 2: http://server1/app2 Instance 3: http://server2/app3   Currently, we are  mapping the subdomain using A records in the DNS of myapp. Then the server uses apache reverse proxy to map it to the app.   client1.myapp.com  > server1 >> http://server1/app1 client2.myapp.com  > server1 >> http://server1/app2 client3.myapp.com  > server2 >> http://server2/app3 clientN.myapp.com  > servern >> http://anyserver/appN   What is the difference or benefit of using a reverse proxy server?  For example:  client1.myapp.com  > proxyserver >> http://server1/app1 client2.myapp.com  > proxyserver >> http://server1/app2 client3.myapp.com  > proxyserver >> http://server2/app3 clientN.myapp.com  > proxyserver >> http://anyserver/appN   Are there any perfomance issues of using the proxy instead of the DNS records? As i see it all the request would go to the proxy server instead of going drectly to the server  thanks for your time


Let $X \sim \text{Uniform} ( -1,3)$.  Find the PDF of $Y= X^2$.   Solution: The  density of $X$ is $$f_x(x)  = \begin{cases}    \frac {1}{ 4} &  \text{if }  -1< x  < 3  \\ 0 & \text{otherwise} \end{cases} $$   $Y$ can only take values in $(0,9)$. Consider two cases: (i) $0 < y < 1$ and (ii) $1 < y < 9$. For case (i), $A_{y1} = [-\sqrt{y}, \sqrt{y}]$.  For case (ii) $A_{y2} = [-1,\sqrt{y}] $  $$F_Y(y) = \int _{A_{y1}} f_X(x)dx  =  (1/2)\sqrt {y} $$  $$F_Y(y) =  \int_{A_{y2}} f_X(x)dx   = (1/2)(\sqrt {y} + 1)$$  Differentiating $F$ we get    $$f_Y(y) =   \begin{cases}  \frac {1}{ \sqrt y } & \text{ if } 0 < y < 1  \\   \frac {1}{8 \sqrt y }  & \text{ if } 1 < y < 9 \\ 0 & \text{otherwise } \end{cases}$$   I don't get how the two cases were considered and then from those two cases limit of integrals $A_{y1} $ and $A_{y2} $ were calculated?


When casting Faerie Fire from Ring of Shooting Stars, do you need to maintain concentration?

Ring of Shooting Stars says  Faerie Fire: You can expend 1 charge as an action to cast Faerie Fire from the ring.  Since it says you cast the spell from the ring, I wonder if you need to maintain concentration on the resulting spell. Moreover, is that something particular to Ring of Shooting Stars, or is that how it usually goes with casting spells via items?


Topology on $\mathbb{R}$ strictly coarser (resp. finer) than the usual one which is still Hausdorff (resp. connected)

The following are simple observations.  Suppose $\mathcal{T}_1,\mathcal{T}_2$ are two topologies on a set $X$ such that $\mathcal{T}_1$ is finer than $\mathcal{T}_2$.  If $( X ,\mathcal{T}_2 )$ is Hausdorff, then so is $( X ,\mathcal{T}_1 )$. If $( X ,\mathcal{T}_1 )$ is connected,  then so is $( X ,\mathcal{T}_2 )$.   The real numbers with the usual topology is both Hausdorff and connected, which leads to the following two questions.  Is there a topology on the real numbers strictly coarser than the usual one, which makes it still Hausdorff?  Is there a topology on the real numbers strictly finer than the usual one, which makes it still a connected space?


Can I tap a creature with summoning sickness to pay "tap an untapped creature you control" costs?

I have a  on the battlefield and I played a vampire earlier this turn. Can I tap both to transform Chosen of Markov even though I just played the vampire?  Extra Example: I play  to put two 1/1 white bird tokens into play. Can I now tap a both of them and another creature I control to pay Battle Screech's flashback cost of tapping three white creatures?   Obviously these creatures couldn't use any tap abilities until my next turn, but since the tapping is coming from a different source, I figured the situation might be different.


Book about a space war between humans and an invader previously prisoner of a Dyson sphere

It had:   An AI that got its own planet An interplanetary train system, with portals on every planet An elf-like species that could travel through weird portals called "the paths" or something like it no ships, towards the end of the story an invader species that has smart immobile units and dumber mobile units the artificial intelligence made "restricted intelligence" as a gift to humans A nova bomb is made and used towards the end People have many implants that make them better at things   Does anyone know the title and author of the book?


So today, I asked a question on  and received the following  about this being a legal issue and not being allowed on UX. Why wasn't this post migrated to the Legal Stack Exchange? How do you migrate and why isn't it done more?


How can I get an lower-case "L" with a hooked tail

I'm marking up some text that includes "l" as a vector, so I'd like to be able to use a bold font. \mathbf{l} gives a straight up-and-down kind of l which looks like a 1 (one) or an I (capital "i"):    I don't want to use \ell because I don't want the loop and for some reason my system won't make the corresponding glyph bold for me.  What I'd like looks more like this:    What are my options?