An integral$\frac{1}{2\pi}\int_0^{2\pi}\log|\exp(i\theta)-a|\text{d}\theta=0$ which I can calculate but can't understand it.

I have encountered this integral:$$\frac{1}{2\pi}\int_0^{2\pi}\log|\exp(i\theta)-a|\text{d}\theta=0$$ where $|a|<1$ in proving Jensen's formula. because I am stupid, I don't know why it is equal $0$, I can't work it out. After a moment,I find a smart way in Stein's book. After the change of variable $\theta \mapsto -\theta$,the above integral becomes:$$\frac{1}{2\pi}\int_0^{2\pi}\log|1-a\exp(i\theta)|\text{d}\theta$$ and use Cauchy's integral formulas to $F(z)=1-az$ in $\Omega \supset \overline{\Bbb{D}}=\{z\in\Bbb{C}:|z|\leq 1\}$:$$\log F(0)=\frac{1}{2\pi i}\int_{\partial \Bbb{D} }\frac{\log F(\zeta)}{\zeta}\text{d}\zeta$$ we get $$0=\log|F(0)|=\frac{1}{2\pi}\int_0^{2\pi}\log(1-a\exp(i\theta))\text{d}\theta$$  But I still feel uncomfortable. I think the reason maybe :  I can't calculate it directly  I don't know why it equal 0 (or I can't see it apparently)  Please help me, thanks very much.


If I close the Epic Launcher during a download, will the download fail?

I am downloading Fortnite; I want to exit the launcher, but I dont want to lose the progress on my download. If I exit the launcher, will the download fail? Currently, it is paused. Is it possible for me to shutdown my PC and then resume the download later?


$-3^2 = -9$  I found this problem while doing an algebra refresher in the book The Complete Idiot's Guide to Algebra.  I asked my engineer brother this problem and he got it wrong.  A search on Google for why is a negative number squared negative I get conflicting results.   Google presents an excerpt from a site that says the converse. "This is because to square a number just means to multiply it by itself. For example, $(-2)$ squared is $(-2)(-2) = 4$. Note that this is positive because when you multiply two negative numbers you get a positive result." - This, of course, is the exact opposite of what was asked, but it's the given response.  The third item on Google's search results offered up a math forum where the moderator, one Doctor Rick, states that whether it is interpreted as -3^2 or -(3)^2 is a difference of opinion.  It's math.  How can it be a matter of opinion?  If an equation is being used for calculating a space craft landing, or the engineering of a bridge design, a difference of opinion on how to calulate this could prove catastrophic.  The high school math teacher that authored The Complete Idiot's Guide to Algebra presented this question as "be careful, this one is tricky" specifically to teach this situation, but since there seems to some confusion as to which is the right way to calculate this.    My scientific calculator tells me it is 9.  Another question here on SE regarding calculators with this same issue, the accepted answer was that adding parentheses fixed the "issue", but doesn't address whether the calculator is getting it "wrong" because it's not actually wrong.    What is the correct answer, and why?  Thanks!


I have been taught that it's grammatically proper to use the before countries like "Sudan and Yemen" but I was never given a reason (if there exists any, of course) when I asked why, except for "it is one of those ambiguous parts of English language that we – as non-native speakers – should just accept without trying to look for a reason". Now, I'd like to know if there is any answer to this "why" or I should keep on believing that there are no hard and fast rules when it comes to questions like these.


How can I find a list of files that have some specific permissions?  I want to find files owned by root user that have rwx permission for the owner.   Is there any way to find a list of such files? I am using Ubuntu 16.04.


What does the last digit of an Ubuntu version indicate. E.g. 16.04.4 vs. 16.04.7

I am trying to learn Linux by creating a CTF as a hobby project, and I see that an enthusiast before me have been using Ubuntu server 16.04.4 (that i have been using to analyze and get ideas from) and i am only having Ubuntu server 16.04.7 available from my office desk. What does typically this last digit indicate? And if you have time to explain the whole "release-tree"-structure to me i would be very grateful! Thank you for for attention, Best regards, Tom


An easy way to turn MySQL data to PHP object/assoc array?

Is there an easy way to query MySQL data and convert the data into a PHP data-only object or a PHP assoc array? Are there already exisiting frameworks/libraries that do so?   Before everyone jumps to the answer, I have to clarify - NO, I am not talking about MySQLi's fetch_object or fetch_assoc, or anything similar like those.   I am talking about querying multiple tables and having the data stored in objects/assoc arrays in a hierarchical way.   For example, if I have MySQL tables like the followings:  Table `Person` id | name 1  | John 2  | Mary 3  | Sue 4  | Peter 5  | David  Table `IsMarriedTo` personId1 | personId2 1         | 2 2         | 1 3         | 5 5         | 3  Table `HasChild` personId1 | personId2 1         | 3 2         | 3 2         | 4   Well, let's say I want to query about John and all his related family members. Ultimately, I would like to have a PHP assoc array like this:  $person = array(   'id' => 1,   'name' => 'John',   'IsMarriedTo' => array(     array(       'id' => 2,       'name' => 'Mary',       'HasChild' => array(         array(           'id' => 3,           'name' => 'Sue',           'IsMarriedTo' => array(             array(               array(                 'id' => 5,                 'name' => 'David',                 'IsMarriedTo' => array(),                 'HasChild' => array()               )             )           ),           'HasChild' => array()         ),         array(           'id' => 4,           'name' => 'Peter',           'IsMarriedTo' => array(),           'HasChild' => array()         )       )     )   ),   'HasChild' => array(     array(       'id' => 3,       'name' => 'Sue',       'IsMarriedTo' => array(         array(           array(             'id' => 5,             'name' => 'David',             'IsMarriedTo' => array(),             'HasChild' => array()           )         )       ),       'HasChild' => array()     )   ) );   If you ask me to write SQL queries for this example, hmmm...yes, I konw how to write them. But I just want to know if there is an easier/non-manual way to query for the data and convert the data into a PHP data-only object or a PHP assoc array. It would be better if there are already exisiting frameworks/libraries that do so.   In real world applications, table relationships are not so simple like the example above. Well, database schemas may not be necessarily very complex either, but sometiems, querying for one simple thing will involve too many tables, and manually rebuilding the data object or array in PHP from database data is very repetitive and error-prone.   Even if there may not be simple non-manual alternative methods out there for the example above, but sometimes I wonder: do anyone feel and agree that getting database data and rebuilding the PHP objects/arrays is just a repetitive chore? Tens, if not hundreds, of new queries are written everyday. They may be different from one another but their pattern are more or less the same. With PHP and MySQL being such mature technologies for so long, surely there must be some kind of frameworks/libraries that do these kind of repetitive things already. Don't your think so?  EDIT  Some people has flagged this as duplicate. I am not sure if this question is really a duplicate. May be it is, but still... if you think it is, can you at least be kind and provide some links to other similar questions with answers?   Please note that I am not just talking about a problem easily solved by ORMs here though. I am talking about hierarchical data structure on PHP built from multiple database tables.... and there may be access loops involved if not carefully handled. Can ORMs easily tackle this? If so, please show me some light and show me links of other similar questions that have been answered.   I am not an expert in ORMs but I really doubt if they can easily handle such.


Power connectors for intel S5520UR motherboard confusion

I'm looking into using the Intel S5520UR motherboard for a hobby computer project. On the manual, it says it uses three power cables: a 24-pin connector, an 8-pin connector, and a 5-pin connector. The pinouts for the 24- and 8-pin seem standard, so I'm not worried about them. I've never seen a five-pin connector, however.  It mentions this about its purpose, but I don't know what it means:     One SSI-compliant 1x5 pin connector (J1K2), which provides I^2C   monitoring of the power supply.   More specifics about the exact specifications:     3.7.3 P3 – Power Signal Connector       Connector housing: 5-pin Molex* 50-57-9705 or equivalent      Contact: Molex 16-02-0087 or equivalent   Pinout:    (Pinout from page 93 of )  My questions:   What is this connector for? Is it normally found on PSUs? Do I need this connector? (I.e., will a standard PSU with only a 24-pin and 8-pin molex connector be able to power this motherboard?) What does "I^2C monitoring of the power supply" mean?


Functions satisfying $f(x)+f(\frac{1}{1-x})=x$ with $x\in\mathbb{R}\setminus\{0,1\}.$

I have used this identity: if $g(x)=1/(1-x),$ then $$g^{-1}(x)=1-\frac{1}{x},$$  to get all functions satisfying: $f(x)+f(\frac{1}{1-x})=x$ with $x\in\mathbb{R}\setminus\{0,1\},$ but I didn't get a general form of its solution. My question here is:     Is there any simple method to solve the titled functional equation?


A polynomial with integer coefficients is an expression of the form: $$f(x)=a_nx^n+a_{n−1}x^{n−1}+\cdots+a_1x+a_0,$$ where $a_n, a_{n−1},\ldots,a_1,a_0$ are integers and $a_n\ne 0$.  A zero of the polynomial is a $c\in\Bbb R$ such that $f(c)=0$.  A real number is said to be algebraic if it is a zero of some polynomial with integer coefficients  1) Show that every rational number is algebraic.  2) Show that if $a$, $b$ and $k$ are positive integers, then the $k$th root of $a/b$ is algebraic.  I have no idea what to do, this is an advanced problem, I'm just curious to the solution.


Assuming for a second that there were a pocket of anti matter somewhere sufficiently large to form all the type of object we can see forming from normal matter - then one of these objects would be a black hole.  Question is, would there be a difference between an anti matter black hole and a normal matter black hole - in terms of how would the matter/anti-matter make the black hole different, or would they be the same?  I would expect the answer to be that the black hole formed from anti matter would retain the anti-matter properties in such a way that if it was to merge with a black hole at same size formed from normal matter that they would annihilate  each other con convert into pure energy - Would that be a correct understanding?


Add a moderator ability to watch troublemakers

Community moderators already have an ability to mark potential users as troublemakers via annotations, but that ability isn't very useful in itself.  It would be nice if mods could mark users as potential troublemakers and then could see a page with a summary of all the latest activity by these marked users. The ability to remove the mark would also be appropriate in this case, if the users changed their ways after receiving a few comments / e-mails / death threats.  A basic use-case: a user's only two answers contain a link to her own website, but they appear in relevant questions. This isn't spam and is fine by me, but I would like to keep that user under the spotlight for a few days to watch if she continues to do this further, and maybe leak into questions which aren't as relevant - this has recently happened on Gaming.  Alternatively, if adding a new specialized page for this isn't considered beneficial, maybe we should have the low-post-quality detector add "bad points" to posts by these users, so that it's more likely low-quality posts from these users would float to the top of the problematic-posts list.


During the orientation programme conducted for the resource persons in English in Hyderabad,one of the professors wrote a sentence on the board and it is given below     The board writes well.      She asked us to say whether the verb write is transitive or intransitive. We could not satisfactorily answer the question.because It did not look like either transitive. or intransitive she explained something which I forgot so I need explanation from the scholars  Another example  is        He walks the dog everyday   I found the sentence in a text for Tenth class students  The sentences are indifferent from the sentences like he writes well and the dog walks.   I would like to know the function of the verb and the subject in the sentences above,  I know that the two verbs are different   I would like to know whether the topic comes under semantics.  EDIT This is not a duplicate of the question  because I am not asking whether the sentences mentioned above are grammatically correct, my question is focused on their syntax and semantics.


Why doesn't my Minecraft launch when I press play on the Minecraft launcher?

I have spent what seems like 1 month of researching. So when I try to play Minecraft a few months ago, it works completely fine. Last week, I tried to play Minecraft and it doesn't want to launch. I press the play button on the launcher, it closes the launcher but after a few seconds, it doesn't launch Minecraft, it just goes back to the launcher and says Minecraft has crashed.   Can anyone help me to fix this? Also, the Minecraft screen doesn't show up, it just goes back to the launcher.  Edit: I have found the crash folder, anyone who knows coding and stuff please help me  java.lang.IllegalStateException: GLFW error 65542: WGL: The driver does not appear to support OpenGL     at cuo.b(SourceFile:199)     at org.lwjgl.glfw.GLFWErrorCallbackI.callback(GLFWErrorCallbackI.java:36)     at org.lwjgl.system.JNI.invokePPPP(Native Method)     at org.lwjgl.glfw.GLFW.nglfwCreateWindow(GLFW.java:1714)     at org.lwjgl.glfw.GLFW.glfwCreateWindow(GLFW.java:1897)     at cuo.<init>(SourceFile:81)     at dnr.a(SourceFile:19)     at cyc.au(SourceFile:464)     at cyc.b(SourceFile:394)     at net.minecraft.client.main.Main.main(SourceFile:155)


CSOM Powershell get the files of a specific folder in a document library

I am wanting to get the list of files that are in a specific folder in that document library using powershell CSOM     Tried this but it didnt work saying it didnt recognise getfolder  $folder = $list.ParentWeb.GetFolder($web.Url + "/" + $list.RootFolder.Url + "/" + $foldername) foreach ($item in $folder.Files) {    Write-Host $item.Name }


I am using MacTex 2016 on a Mac (El Captain 10.11.2). My text editor is TexStudio 2.11.0 and all my packages have been updated (TeX live Utility 1.24).  Since I updated MacTex from version 2015 to version 2016, I constantly get the same error when compiling : in a file containing references, when I compile with XeLateX the first time, I get an error about exceeded capacity right where I have an \textcite or \autocite command (the following lines are just warnings) :  TeX capacity exceeded, sorry [parameter stack size=10000]. This book \autocite{adams} 'firstinits' option is deprecated, use 'giveninits' instead. inputenc package ignored with utf8 based engines. Patching footnotes failed. Conflicting options. Add \usepackage{fontspec} to the(frenchb.ldf) preamble of your document,  This file.tex would work just fine before I updated MacTex, I would compile with XeLateX, then bibtex, then XeLatex twice. But before trying to desinstall 2016 and come back to 2015 (if I am ever able to download it somewhere...), I would like to understand what I am doing wrong, and obviously I'm doing something VERY wrong.  \documentclass{book} \title{Chapitre2} \makeindex \date{} \usepackage{amsthm} \usepackage{amssymb} \usepackage{times} \usepackage{tipa} \usepackage{chngcntr} \usepackage[backend=bibtex, citestyle=authoryear-comp, maxcitenames=2, firstinits=true]{biblatex} \addbibresource{/Users/MyName/Documents/Latex/biblio.bib} \usepackage[utf8]{inputenc} \usepackage{csquotes} \usepackage[french]{babel} \usepackage[T1]{fontenc} \usepackage{array} \usepackage{longtable} \usepackage{tabulary} \usepackage{multirow} \usepackage{lscape} \usepackage{colortbl} \usepackage{graphicx} \usepackage{xcolor} \usepackage{enumerate} \usepackage{arydshln} \usepackage{todonotes} \usepackage{fancyhdr} \usepackage{titlesec} \usepackage{caption} \usepackage{phonrule} \usepackage{tikz-qtree-compat} \usetikzlibrary{decorations.markings, calc, shapes.misc, decorations.pathreplacing} \usepackage{xr} \usepackage{float} \usepackage{gb4e} \usepackage{hyperref}  \begin{document}  bla bla  This book \autocite{adams} is awesome.  Another awesome book : \textcite{arnason}.  \printbibliography \end{document}   I know there are a lot of packages, but since some of them are incompatible, maybe that could be the problem. And here are the two references I'm refering to from my bib file :  @Book{adams,   title =     {Faroese: a language course for beginners},   publisher = {Stiðin},   year =      {2014},   author =    {Adams, Jonathan and Petersen, Hjalmar P.},   address =   {T\'{o}rshavn},   type =      {Book} }  @Book{arnason,   title =     {The phonology of Icelandic and Faroese},   publisher = {Oxford University Press},   year =      {2011},   author =    {\'{A}rnason, Kristj\'{a}n},   address =   {Oxford; New York},   type =      {Book} }   If I forgot something important, please ask.  Thank you in advance!


Trying to execute ModelBuilder through C#?

I have a problem when trying to execute a model builder through C# the application throws:     an error has occurred error hresult e_fail has been returned from a   call to a COM component   Note : ArcGIS 10.1 and .NET 2010  CODE :    using System; using ESRI.ArcGIS.esriSystem; using ESRI.ArcGIS.Geoprocessing;  namespace GeoprocessingInDotNet2008 {     class Program     {         private static LicenseInitializer m_AOLicenseInitializer = new GeoprocessingInDotNet2008.LicenseInitializer();      [STAThread()]     static void Main(string[] args)     {         // Load the product code and version to the version manager         ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Desktop);          //ESRI License Initializer generated code.         //m_AOLicenseInitializer.InitializeApplication(new esriLicenseProductCode[] { esriLicenseProductCode.esriLicenseProductCodeArcInfo },         //new esriLicenseExtensionCode[] { });          // Create geoprocessor. Overwrite true will replace existing output         IGeoProcessor2 gp = new GeoProcessorClass();         gp.OverwriteOutput = true;          // Get the workspace from the user         string wks = @"C:\Users\AmineMed\Documents\ArcGIS\LYDEC\DataBases";          // set the workspace to the value user entered         gp.SetEnvironmentValue("workspace", wks + "\\" + "Temp.mdb");          // Add the custom toolbox to geoprocessor         gp.AddToolbox(@"C:\Users\AmineMed\Documents\ArcGIS\LYDEC\ConverterTool.tbx");          // Create a variant - data are in the workspace         IVariantArray parameters = new VarArrayClass();         parameters.Add(@"C:\Users\AmineMed\Desktop\mise à jour\El Mejjatya\Plan topo Al Wiam\Plan topo Al WiamT15071c.dwg");         object sev = null;         try         {             gp.Execute("Creation", parameters,null);             Console.WriteLine(gp.GetMessages(ref sev));         }         catch (Exception ex)         {             Console.WriteLine(ex.Message);             string errorMsgs = gp.GetMessages(ref sev);             Console.WriteLine(errorMsgs);         }         finally         {             Console.WriteLine("Hit Enter to quit");             Console.ReadLine(); // pause the console to see messages         }          //ESRI License Initializer generated code.         //Do not make any call to ArcObjects after ShutDownApplication()         m_AOLicenseInitializer.ShutdownApplication();     }


Why are $(\,f_1,...,f_n)$ linearly independent if $\|\,f_k-e_k\|_2<\dfrac{1}{\sqrt n}$, where $(e_k)$ is an orthonormal basis?

Let $(e_1,...,e_n)$ be an orthonomal basis and  $(\,f_1,...,f_n)$ vectors such that $\|f_k-e_k\|_2<\dfrac{1}{\sqrt n}\,\forall k\,$. I'd like to show that $(\,f_1,...,f_n)$ are linearly independent.  I don't know where to start: I tried to see what happens for $n=2$ but, because $(\,f_1,f_2)$ are two different vectors, they are linearly independent, and it does not help to see what happens in higher dimension.  It's easy to see that the $f_i$ are distinct because they are in separated balls.  I also tried to elevate to the square the relation but I found nothing.


Is there a log file that logs information when the values set in /etc/security/limits.conf are exceeded?  If not is there a way to make it log when the values are exceeded?


How to prove $\det(AB)=\det(A)\det(B)$ using group theory? $A,B\in GL(n,R)$

I know $\det(AB)=\det(A)\det(B)$. How can i prove using group theory if $A,B$ square matrices and I know $A, B\in GL(n,R)$. If the matrices were not square, it would be correct to say that it is valid?


How does Log shipping knows to keep track

I have set up log shipping between 2 SQL Servers (SQL Server 2008 and SQL Server 2012),  At first i took a full backup of the first one and restored it on the other one and than i set up the log shipping,  The databases first backup-restore took a few hours and i wish to know:    how does the log shipping process knows from when to start the logs it is shipping? does it start from when the last backup-restore process happened or from the moment the log shipping itself is set ?  Can i be sure that no information was lost in these few hours ?   Thanks


Why $R/(a+bi)$ is a finite field with characteristic $p$ where $a^2+b^2=p$

Suppose $R=\mathbb{Z}[i]$ is Gaussian domain , and $a^2+b^2=p$ is prime. Denote $\alpha=a+bi$ and $I=(\alpha)$. Prove $R/I$ is a finite field with characteristic p.  My attempts: First prove $\alpha $ is irreducible, hence $I$ is a maximal ideal and it follows $R/I$ is a field. And $R=\mathbb{Z}[i]$ is an Euclidean  domain. Hence for $x\in \mathbb{Z}[i],x=q\alpha+r$ where $N(r)\lt N(\alpha)$ , so there are finite elements in $R/I$. Thus $R/I$ is a finite filed. But I can't figure out why the characteristic is $p$.     Thanks for your hints.


I am writing my dissertation (the document class is report if that makes any difference) and would like to repeat two conjectures which I state in the introduction in a later chapter. The conjecture environment I currently have is:  \newtheorem{conjecture}[theorem]{Conjecture}   and my conjecture looks like this:  \begin{conjecture}\label{r paths} At most $r$ disjoint monochromatic paths are needed to cover the vertices of any r-edge-coloured $K_n$. \end{conjecture}   Edit: Sorry for not being clearer, I would like the conjecture to have the same number both times in my document.


I am trying to solve this excercise for induction:     Prove that for every positive integer $n > 1$,  $n! < n^n$.   The first thing that I did is to prove $P(2)$: $$ P(2):\  2 × 1 <2^2, $$ And this is true because $2 < 4$.  Assuming that $P(k)$ is true for some $k$ in general, I do not know how to prove it for $k + 1$.  Can you help me please?


MySQL: Updating a column referenced by two foreign keys in the same table leads to foreign key constraint failure

MySQL 5.5  I have a simple InnoDB table:  CREATE TABLE `T` (   `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,   `deleted` bigint(20) unsigned NOT NULL DEFAULT '0',   `other` varchar(32) DEFAULT NULL,   PRIMARY KEY (`id`,`deleted`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;   And another table that encodes relationships among entries from the first table:  CREATE TABLE `T_T` (   `id1` bigint(20) unsigned NOT NULL,   `deleted1` bigint(20) unsigned NOT NULL,   `id2` bigint(20) unsigned NOT NULL,   `deleted2` bigint(20) unsigned NOT NULL,   PRIMARY KEY (`id1`,`deleted1`,`id2`,`deleted2`),   KEY `fk_T_T_2_idx` (`id2`,`deleted2`),   CONSTRAINT `fk_T_T_2` FOREIGN KEY (`id2`, `deleted2`) REFERENCES `T` (`id`, `deleted`) ON DELETE CASCADE ON UPDATE CASCADE,   CONSTRAINT `fk_T_T_1` FOREIGN KEY (`id1`, `deleted1`) REFERENCES `T` (`id`, `deleted`) ON DELETE CASCADE ON UPDATE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=latin1;   Creation of tables and population works perfectly fine.  INSERT INTO T (id, deleted, other) VALUES (1, 0, 'whatever'); INSERT INTO T_T (id1, deleted1, id2, deleted2) VALUES (1, 0, 1, 0);   Updating an entry in T, however,  with something like this:  UPDATE T SET deleted = 1 WHERE id = 1;   leads to the following error:  ERROR 1452: 1452: Cannot add or update a child row: a foreign key constraint fails    (`test`.`T_T`, CONSTRAINT `fk_T_T_1` FOREIGN KEY (`id1`, `deleted1`) REFERENCES `T` (`id`, `deleted`) ON DELETE CASCADE ON UPDATE CASCADE)   As noted by others, this works if the entries in T_T don't refer to self (id1 != id2).  But an UPDATE will fail when a row in T_T refers with both ids to the same row in T.  Is there a problem in MySQL with foreign keys that refer to another table's column(s) twice? Is there a work around for something like this?


proving if $a \le b$ then $\sup(A) \le \inf(B)$

Let $A$ and $B$ be bounded sets of real numbers such that $a\le b$ for all $a \in A$ and for all $b \in B$. Show that $\sup(A) \le \inf(B)$  Pf: Assume A and B are bounded sets. This means they have a least upper bound and a greatest lower bound.   let $x \le \sup(A)$ for some $x \in A$ and $\inf(B) \le y $ for some $y \in B$  Since we know that $a \le b $ for $\forall a\in A $ and for $\forall b \in B$, $x \le y$  Therefore, $x \le \sup(A) \le \inf(B) \le y$  Thus proving that $\sup(A) \le \inf(B)$


Architecture design in "buff-heavy" game?

I've been trying to wrap my head around this architectural design problem. Think of a game that has lots of spells and buffs (World of Warcraft, Diablo II etc), i.e. spells may cause buffs on characters. Each buff may affect one or several properties. For example a frost bolt normally slows down the target it hits, but if it does a critical hit, it will freeze the target for a moment. The frost bolt will also cause cold damage. A shadow bolt might cause some kind of "black" damage and cause confusion (i.e. invert controls, randomize spell target etc).  I tried to map out the architecture for this kind of spell-buff system, but I'm having trouble connecting the dots. First I thought of entity-component system where each character would have a list of components (health, mana, input...), and each buff would "affect" all these components. The components would then choose whether or not the buff affects it. For example, a "damage-over-time" buff should affect the health component, but not the mana component. The aforementioned shadow bolt would affect both health and input components. However, this feels a bit iffy to do if there's tens or hundreds of buffs and components.  Any ideas on how to approach such a design?


Using Zorn's lemma show that $\mathbb R^+$ is the disjoint union of two sets closed under addition.

Let $\Bbb R^+$ be the set of positive real numbers. Use Zorn's Lemma to show that $\Bbb R^+$ is the union of two disjoint, non-empty subsets, each closed under addition.


Use iphone to connect to Wi-Fi and share connection to USB

How to share Wifi connection from iphone to mac?  I would like to know if an Iphone can share its Wi-Fi internet connection over its USB connection.(IE Use the phone as a wifi card for a mac)


I have need to connect to mySql server 5.5 and create database using command line. Ideally it would be using a UI utility but I don't have it.  Here is an issue:  alex@ubuntu:~$ sudo mysql -u root ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)   However I definitely set password while I was installing MySql server.  What should I do to solve it?


The preimage of a normal subgroup under a group homomorphism is normal

Let $\phi:G\to G'$ be a group homomorphism, and let $N'$ be a normal subgroup of $G'$. Show that $\phi^{-1}[N']$ is a normal subset of $G'$.  My attempt: $\phi^{-1}[N']=\{g\in G:\phi(n)\in N'\}$ $$g' n' (g')^{-1}\in N'$$ $$\Rightarrow\phi^{-1}(g' n' (g')^{-1})=\phi^{-1}(g')\phi^{-1}(n')\phi^{-1}(g'^{-1})$$ Thus $\phi^{-1}[N']$ is normal. Is this thinking correct? I feel like I am missing something.


How to select all content between two tags in jQuery

I have a document with headings and unordered lists. How can I use JQuery to select a given heading (by its unique class name) AND all content between that heading and the next heading? Update: Your suggestions are great, but aren't what I'm looking for. In the below code, for example, I would like to access only the "h1" with id of "heading2" and everything up to, but not including the "h1" with id of "heading3". The jQuery examples provided above will access everyting after the first "h" tag that is not an "h" tag. ... or, correct me if I'm wrong :)
...

...

...

...

...

...

...

...

...

...

...

...

...

...

...


What is null geodesic equation for the static and spherically symmetric line element in $$ds^{2}=-K^{2}dt^{2}+\frac{dr^{2}}{K^{2}}+r^{2}(d\theta^{2}+\sin^{2}\theta{d\phi^{2}})$$ where $$K^{2}=1-\frac{2M}{r}-\Lambda r^{2}+2 a r$$ Does anyone know how to derive the null geodesic equation for the above metric? The result was given  without derivation as $$\frac{d^{2}u}{d\phi^{2}}+u=3M u^{2}-a$$ where $$u=\frac{1}{r}$$ I am trying to derive the above equation. First I started by setting $ds^{2}=0$, because null geodesic. Then I divided by $d\phi^{2}$. This is the equation I got $$\frac{dr}{d\phi}=\sqrt{K^{2}r^{2}\sin^{2}\theta}$$ Assuming that $\frac{dt}{d\phi}=\frac{d\theta}{d\phi}=0$, is this a correct assumption? Now Assuming that My calculation is correct so far does anyone know how to get the equation $$\frac{d^{2}u}{d\phi^{2}}+u=3M u^{2}-a$$


Black frames at beginning of video file when file cut

I use ffmpeg to cut a video file. The format i use is this:  ffmpeg -i input.avi -ss 00:06:30 -to 00:07:15 -c copy output.avi   Unfortunately this leaves some black frames in the beginning of my output video, so i lose certain parts of the video. In one video i tried, this went on for one second, in another, the black frames lasted 4 seconds.  The funny thing is that when i used the same command, exactly the same amount of black frame exists for the same video. Meaning, no matter how many times i did this for my second video, in all outputs, the output video will be blank for the first 4 seconds!  The sound works great though!  Here are some other command formats i tried and did NOT work:  ffmpeg -ss 00:01:00 -i video.mp4 -to 00:02:00 -c copy cut.mp4 ffmpeg -ss 00:01:00 -i video.mp4 -to 00:02:00 -c copy -copyts cut.mp4   I thout i found my solution with the command i used, but then this problem occured  EDIT: I figured out that if i don't use the -c copy  flag, then i do not have the black frames:  ffmpeg -i input.avi -ss 00:06:30 -to 00:07:15 output.avi   However, with this method, the quality of my output video is significantly lower than the input video, or the output video from the previous methods. So i am back at square one.


How to log source file name and line number in Python

Is it possible to decorate/extend the python standard logging system, so that when a logging method is invoked it also logs the file and the line number where it was invoked or maybe the method that invoked it?


Show that $(1+\frac{x}{n})^n e^{-x} \rightarrow 1$ converges uniformly.

This is my attempt at a proof:  $\forall x \in \mathbb{R}, \lim_{n \to \infty}(1+\frac{x}{n})^n=\lim_{m \to 0}\frac{log(1+mx)}{m}=\lim_{m \to 0} \frac{x}{1+mx}=x \iff (1+\frac{x}{n})^n \rightarrow e^x$ uniformly.   It follows that $(1+\frac{x}{n})^n e^{-x} \rightarrow 1$ uniformly.   Is this sufficient?


Can we paint $\mathbb{R}^2$ with two colors (say, black and white) so that any horizontal line pass through countable black points and any vertical line pass through countable white points?    Update. I was amazed that this is a classical problem! Actually what I wanted to do is using set theory to prove that there exist incomparable Turing degrees.


How to bulk update text filter format on fields in drupal 7

I have multiple fields across my site, and multiple text filters. I need to delete one of the filters, but I know that it will result in users getting that whacky permission denied error when they try to edit the field.  Is there a way to bulk update all fields input filters? I started looking at  in the field CRUD api, but I'm at a loss.


I have a line in an Android app which reads as follows:  Intent intent = new Intent(this,MyView.class);   Unfortunately, it appears that on occasions this crashes, however I haven't been able to reproduce the crash, possibly because I don't understand in what circumstances this would fail. The crash is a java.lang.NullPointerException as you may have already guessed.  From reading other solutions, I see that I can replace this with getApplicationContext(), but that still doesn't help as I want to understand:   In what circumstances this might happen Why this doesn't work correctly   I am of course assuming this is the problem - I'm assuming that MyView.class would never be null, which I think is correct?  For completeness, I should explain that this is written within a callback. Here is the complete code for the function:   @Override     public void didReceiveLoginResponse(boolean status) {         if(status) {             Intent intent = new Intent(this,MyView.class);             startActivity(intent);         }      }   Many thanks for any helpful ideas!  Edit: To be clear, I am not asking what a nullPointerException is. I am asking in what circumstances would this line contain a nullPointerException. If the view no longer exists, how can the function even run (surely the null bit would be the view/function, not a specific line within it?)


"One in six people": plural or singular?

One in six people struggles to read.  OR  One in six people struggle to read.  "One in six" is singular, naturally, but "one in six people" clearly amounts to a huge number. Should the verb thus be singular or plural, please?   As a corollary, I could imagine the sentence being qualified thus:  One in six people (11 million in the UK alone) struggle to read.  Certainly, to my ear at least, the latter would thus "sound" more natural.  Thanks in advance.


I have this command:  /summon FallingSand ~1 ~ ~ {TileID:54,Time:0.9,TileEntityData:{Items:[{id:stained_glass,Slot:1,Count:1}]}}   I want to add this item command in replace of the stained_glass:  /give @a minecraft:stained_glass 4 {CanPlaceOn:["minecraft:iron_block"]}   So, in the chest there will be stained glass color yellow, that can only be placed on an iron block in Adventure mode. How can I do this?


Does the state of curl of the $E$-Field at a point adjust itself instantaneously as soon as $B$ begins changing at a fixed rate, or is there delay?

Faraday’s Law () states that a time-changing magnetic field vector induces a curl of the Electric field around that point. However it does not specify how quickly the necessary spatial gradient is developed in the Electric Field to satisfy that curl. Of course, the Electric Field vectors around that point cannot just jump to the required values instantaneously in accompaniment as soon as the magnetic field starts changing at a fixed rate, since it is required that the Electric Field has a sensible rate of change to in turn induce a curl of the magnetic Field and continue the propagation of the wave. It would seem the exact rates at which the Electric and Magnetic Fields are changing is critical in the mechanism of an EM wave’s propagation. How would I then calculate the rate of change of E somewhere along the wave given I know the rate of change of the B vector that began it, and given the wave is restricted to one dimension for simplicity? There should after all be some delay in how the EM wave moves from point to point in space, seeing as it moves at the finite speed of causality (3*10^8 m/s), as shown in the first image:    Some of my ideas so far have been that perhaps the rate of change of E is determined such that it exactly cancels the growth of the time-changing E vector that gave rise to a curl of B before, which developed at such a rate to induce a curl of E, which demands this rate of change of E which I am talking about now. In this way the wave might level out the growth of the fields in its wake and spread the change further outwards, in the same way smoothening out a crease spreads it elsewhere. However I am stuck on how to show this rigorously.  I am open to any difficulty of maths, so long as the answer provides the explanation. Below are some diagrams to help visualize what I am talking about:    Faraday's Law requires that a curl of E is developed, which under these restrictions requires a spatial gradient of E to appear across that point. Since the field across that point was previously in some other state, it is required that the Electric Field vectors that are infinitesimally close to that point undergo a rate of change through time to achieve the desired state of curl. The question is, how quickly is this desired state of curl achieved?


General relativity: is curvature of spacetime really required or just a convenient representation?

I'm not really far into the  but already have an important question: are there formulations that can do without spacetime curvature and describe the general theory of relativity/all associated gravitational effects in global ? Idea: Einstein chose spacetime curvature so that one had not to build gravitational effects into the rest of physics equations like Maxwell's equations. I assume that spacetime curvature provides a convenient way to apply physics laws not related to gravity unmodified locally because .  Please correct me everywhere I am wrong.


Opinions on closing an older question as a duplicate of a newer question

What's everyone's opinion on closing an older question as a duplicate of a newer one, if the newer one is clearly the better resource? I'm looking at a special case right now, where the two were posted by the same person; the  was migrated to SU before a commenter pointed out it was a . Is it considered good practice to close the older as a duplicate of the newer?  More generally, is it ok to do that for separate questions posted by different people, if the older question went unanswered but the newer has a good answer?  (I should probably mention I saw , but I think this is separate)


In  (ignoring Hawking radiation), why is a  black? Why nothing, not even light, can escape from inside a black hole? To make the question simpler, say, why is a  black hole black?


Can you use "where" to require an attribute in c#?

I want to make a generic class that accepts only serializable classes, can it be done with the where constraint?  The concept I'm looking for is this:  public class MyClass<T> where T : //[is serializable/has the serializable attribute]


Can I target an indestructible creature with a 'destroy target creature' spell?

Of course the spell won't resolve, but is the indestructible creature a legal target for a spell with the effect "destroy target creature"?  For example, can I target , animated by its second ability, with ?


High p-values for logistic regression variable that perfectly separates?

I'm using R to run some logistic regression. My variables were continuous, but I used cut to bucket the data. Some particular buckets for these variables always result in dependent variable being equal to 1. As expcted, the coefficient estimate for this bucket is very high, but the p-value is also high. There are about ~90 observations in either these buckets, and around 800 total observations, so I don't think it's a problem of sample size. Also, this variable should not be related to other variables, which would naturally reduce their p-values.  Are there any other plausible explanations for the high p-value?  Example:  myData <- read.csv("application.csv", header = TRUE) myData$FICO <- cut(myData$FICO, c(0, 660, 680, 700, 720, 740, 780, Inf), right = FALSE) myData$CLTV <- cut(myData$CLTV, c(0, 70, 80, 90, 95, 100, 125, Inf), right = FALSE) fit <- glm(Denied ~ CLTV + FICO, data = myData, family=binomial())   Results are something like this:  Deviance Residuals:       Min        1Q    Median        3Q       Max   -1.53831  -0.77944  -0.62487   0.00027   2.09771    Coefficients:                 Estimate Std. Error z value Pr(>|z|)     (Intercept)     -1.33630    0.23250  -5.747 9.06e-09 *** CLTV(70,80]     -0.54961    0.34864  -1.576 0.114930     CLTV(80,90]     -0.51413    0.31230  -1.646 0.099715 .   CLTV(90,95]     -0.74648    0.37221  -2.006 0.044904 *   CLTV(95,100]     0.38370    0.37709   1.018 0.308906     CLTV(100,125]   -0.01554    0.25187  -0.062 0.950792     CLTV(125,Inf]   18.49557  443.55550   0.042 0.966739     FICO[0,660)     19.64884 3956.18034   0.005 0.996037     FICO[660,680)    1.77008    0.47653   3.715 0.000204 *** FICO[680,700)    0.98575    0.30859   3.194 0.001402 **  FICO[700,720)    1.31767    0.27166   4.850 1.23e-06 *** FICO[720,740)    0.62720    0.29819   2.103 0.035434 *   FICO[740,780)    0.31605    0.23369   1.352 0.176236     --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  (Dispersion parameter for binomial family taken to be 1)      Null deviance: 1037.43  on 810  degrees of freedom Residual deviance:  803.88  on 798  degrees of freedom AIC: 829.88  Number of Fisher Scoring iterations: 16   FICO in the range [0, 660) and CLTV in the range (125, Inf] indeed always results in Denial = 1, so their coefficients are very large, but why are they also "insignificant"?


Do Iraqi citizens holding green card need a visa to re enter USA from Iraq?

Im Iraqi citizen  holding a green card ,living in USA now. I want to visit my relatives in Iraq and stay there for a month. Do I need a visa to re-enter the USA when coming back from Iraq please?!


Are there any patterns to observe in choosing the correct negative prefix to use?

Are there any patterns to observe in choosing the correct negative prefix to use, as in unbelievable, disproportionate, asymmetric, and intolerable? (There are other negative prefixes as well, but these are the ones I usually mix up.)  Un- and in- are probably the ones I most frequently mix up, as in *untolerable/intolerable, *unedible/inedible, *unexact/inexact, *unappropriate/inappropriate, ... I realize these are all in-, but why? Is there anything to look for there?


Does the order of keywords matter in a page title?

Stack Overflow has made a change to their page titles such that the most popular tag for a question appears at the start of the title.  The change is being deployed across the network, so check out the page title for this question.    Compare the question title and the page title for :  Question title:     Is it safe to use ASP.NET MVC3 RC?   Page title:     asp.net mvc - Is it safe to use ASP.NET MVC3 RC? - Stack Overflow   I understand the change to try and stop  on Google.  Adding the most popular tag to the page title seems like a good idea.  However, a side effect that I'm noticing is that with a lot of tabs open, now the only part of the title that I can see is the tag.  Would moving this keyword to later in the page title harm these efforts to improve SEO?  Possible title:     Is it safe to use ASP.NET MVC3 RC? - asp.net mvc - Stack Overflow


When developing a page object model, the whole intention is generally to abstract the page into methods that keeps code reusable and increase readability.  Something I often get stuck on how high of a level do I abstract something? So for example something like a login form (or really most forms for example).  I generally will code out something such as (This is in Cypress fwiw, but pretend it's in whatever automation framework of your choice. Code below is JavaScript):    setEmail(value) {     const field = cy.get('.form-control[name="username"]');     field.clear();     field.type(value);      return this;   }    setPassword(value) {     const field = cy.get('.form-control[name="password"]');     field.clear();     field.type(value);      return this;   }   Generally at this point is where I wonder "Hmmm should I go ahead and wrap this forms n inputs into a larger method such as":   login(email, password) {     this.setEmail(email);     this.setPassword(password);     this.submit();   }   Which at that point I question: "Why even bother writing the independent input methods".  So how do I decide when it's worth writing a large method that encompasses multiple other private methods...and if I write a larger "public" method should I even bother writing smaller private methods?  I read somewhere with PoM that we should:      Model user behaviour not user interfaces   When I think about that statement, especially when it comes to forms it feels like one "larger" method makes sense. The only real advantage I see to splitting them up is in case I need to test negative cases (Such as not all inputs are filled out for instance). Which can technically be conditionally added to a larger form (But can also be a pain when there are multiple inputs).  What is the best practice here?


I was reading about black holes and I've found part saying that black hole is a point and anther saying that black hole can rotate. However the points are dimensionless, so they can't rotate - How can black hole rotate then? Can non rotating black hole start rotating? I rather don't know too much about physic so even basic explanation would be great to me.


Is it obvious that $\mathbb Q(\sqrt 3+\sqrt 5)=\mathbb Q(\sqrt 3,\sqrt 5)$?

Is it obvious that $\mathbb Q(\sqrt 3+\sqrt 5)=\mathbb Q(\sqrt 3,\sqrt 5)$ ? If not how can I show it ?


I know that if $a$ and $b$ have a highest common factor $h$ then you can write $h=ax+by$ for some $x,y \in \mathbb{Z}$ but how about if you can write $h=ax+by$ for some $x,y \in \mathbb{Z}$ then can you write $h=\gcd(a,b)$?  I.e. Is $h=\gcd(a,b) \iff h=ax+by,~ x,y \in \mathbb{Z}$


Intersection of Common Chords of Three Circles

Three circles intersect pairwise but let's assume there is no point   shared by all three of them. There are three pairs of circles. Two   circles in any pair share a chord. The problem is to prove that the   three chords meet at a point.   This  gives a solution:     Consider each circle as the equator of a sphere. Let the plane of the   circles be horizontal. It cuts the spheres in two (of course   symmetric) halves so that a circle is the projection of the   corresponding sphere onto the horizontal plane. Any two spheres   intersect at a circle. The chords at hand are the projections of three   such (vertical) circles. However, the three spheres share two points   which are symmetric with respect to the plane. Those points belong to   all three pairwise intersections of the spheres - vertical circles.   Therefore, projections of the three vertical circles - our chords -   share a point which is the projection of the common points of the   spheres.   The part(in bold type) I don’t understand is why it is certain that the three vertical circles(pairwise intersection of the spheres) intersect at a common vertical line. Isn’t it possible that these three vertical circles only intersect pairwise but don’t have common intersection by all three?


dmidecode: Configured Memory Speed half of Speed

This is related but not completely similar to    I have a PC where the BIOS reports that the RAM runs at 3200MHz (after enabling the XMP profile), thus I am sure that at boot, that's the 'configured speed'. However, in dmidecode, it says that the Configured Memory Speed (1600MT/s) is only half of the "Speed" (3200MT/s). "lshw" also reports 3200 MHz. Where is this difference coming from? I would expect that it it would say: configured 3200 MT/s considering that the XMP profile was enabled upon booting. Or is it maybe because DIMM0 is empty (only DIMM1) populated? Below the output of dmidecode: Handle 0x0029, DMI type 17, 40 bytes Memory Device     Array Handle: 0x0010     Error Information Handle: 0x0028     Total Width: 64 bits     Data Width: 64 bits     Size: 32 GB     Form Factor: DIMM     Set: None     Locator: DIMM 1     Bank Locator: P0 CHANNEL D     Type: DDR4     Type Detail: Synchronous Unbuffered (Unregistered)     Speed: 3200 MT/s     Manufacturer: Kingston     Serial Number: 505AEE84     Asset Tag: Not Specified     Part Number: KHX3200C16D4/32GX        Rank: 2     Configured Memory Speed: 1600 MT/s     Minimum Voltage: 1.2 V     Maximum Voltage: 1.2 V     Configured Voltage: 1.2 V  and of lshw:  *-bank:6       description: 3200 MHz (0,3 ns) [empty]       product: Unknown       vendor: Unknown       physical id: 6       serial: Unknown       slot: DIMM 0       clock: 3200MHz (0.3ns)  *-bank:7       description: DIMM DDR4 Synchronous Unbuffered (Unregistered) 3200 MHz (0,3 ns)       product: KHX3200C16D4/32GX       vendor: Kingston       physical id: 7       serial: 505AEE84       slot: DIMM 1       size: 32GiB       width: 64 bits       clock: 3200MHz (0.3ns)  Thanks for the help!


Commenting out multiple lines of code, specified by line numbers, using vi or vim

I have learned from  that it is possible to use vi/vim to comment out a specified range of line numbers.  For example, suppose I have the following bash script:  #!/bin/bash  This is my very very great script   Now suppose that I want to comment out line numbers 6 through 8 (which contain the words very, very, and great) using the # comment character.  In vi/vim, I can simply type :6,8s/^/# to obtain the following:  #!/bin/bash  This is my #very #very #great script   which comments out lines 6 through 8.  My question is, is it possible to type a similar one liner that will remove the # comment character from lines 6 through 8 (but not any other commented lines in the file)?  Having said this, I realize that there is some debate about whether I am actually using vi or vim.  In practice, I open a file script.sh with the command vi script.sh.  Also, when I type the command which vi, I obtain /usr/bin/vi.  Nevertheless, when I simply type vi and press Enter, I obtain this:  ~                              VIM - Vi IMproved ~ ~                               version 7.2.330 ~                           by Bram Moolenaar et al. ~                 Vim is open source and freely distributable ~ ~                           Sponsor Vim development! ~                type  :help sponsor<Enter>    for information ~ ~                type  :q<Enter>               to exit ~                type  :help<Enter>  or  <F1>  for on-line help ~                type  :help version7<Enter>   for version info   which seems to suggest that I'm actually using vim.  I am accessing a remote Ubuntu Linux cluster using SSH from my PC.  I am not using a Ubuntu Linux GUI.


I see the following statement: "BELLINGHAM, Wash. — Jan. 19, 2021 — eXp World Holdings, Inc. (Nasdaq: EXPI), today announced that its Board of Directors has approved a 2-for-1 stock split in the form of a stock dividend to make stock ownership more accessible to employees and investors. Each stockholder of record on Jan. 29, 2021 will receive one additional share of common stock for each then-held share, which will be distributed after the close of trading on Feb. 12, 2021. eXp World Holdings common stock will begin trading on a stock split-adjusted basis on Feb. 16, 2021." If I buy the stock today, what will happen? Will I get another share after Feb. 12th? Or, the value of my share will be slashed to half after Feb. 12th?


Lower bound for the Hardy-Littlewood maximal function implies it is not integrable

I am working on the following problem from Stein and Shakarchi:  Let $f$ be an integral function on $\mathbb{R}^d$ such that $\|f\|_{L^1} = 1$ and let $f^*$ by the Hardy-Littlewood maximal function corresponding of $f$.     Prove that if $f$ is integrable on $\mathbb{R}^d$, and $f$ is not identically zero, then $f^*(x) \geq c/|x|^d $ for some $c > 0$ and all $|x| > 1$.   Conclude that $f^*$ is not integrable on $\mathbb{R}^d$.   Then, show that the weak type estimate $m(\{x:f^*(x) > \alpha \}) \geq c/\alpha$ for all $\alpha > 0$ whenever $\int|f| = 1$, is best possible in the following sense: if $f$ is supported in the unit ball with $\int|f| = 1$, then $m(\{x:f^*(x) > \alpha \}) \geq c'/\alpha$ for some $c' > 0$ and all sufficiently small $\alpha$.     [Hint: For the first part, use the fact that $\int_B|f| > 0$ for some ball $B$.]  I am not really sure where to begin with this.  Any help would be greatly appreciated.


the RMS (root mean square) value of $f(x)$ is defined as: $$f(x)_{rms}=\sqrt{\frac{\int^b_a (f(x))^2dx}{b-a}}$$ Why do we do this very specific thing of taking the square, the mean, and then the square root of the function? For an AC circuit, why does this tell us the power consumption and not something like the expression below? $$\frac{\int^b_a|f(x)|dx}{b-a}$$


What is the best and fastest way to make money in Runescape?

I know you can take vials and fill them to be vials of water, and add feathers to arrow shafts, but is there anything faster and more effective?


Is it more space efficient to use one partition?

Question really says it all. How to add partitions during install of Ubuntu? Is there a limit to the partitions that you can create, or is it more space-efficient to use one partition? Also, is it possible to 'merge' two partitions into one?


Should I use "the tag (tag-name)" or "the (tag-name) tag"?

Here in Stack Exchange network (probably mostly in meta discussions and in chat) we often discuss about tags.   I wonder which of these two forms is the correct one: "the tag (tag-name)" or "the (tag-name) tag". What I mean is which of these two sentences is correct? (Or are they both correct?)   This question should have the tag . This question should have the  tag.    Just by comparing what other people commonly use, it seems that that latter is more frequent. If I search in the posts on meta.SE, I get for these two possibilities:   2 results for , 2 results for , 6 results for ; 32 results for , 11 results for , 47 results for .   (I wanted to try at least some tags which I guessed appear quite frequently in posts.)


What is the subject in the following sentence?     Who hit the ball through Mr. Brown's window?     How can we tell what the subject is in a sentence like this in terms of the grammar?


Disable operations outside user's home directory with chroot jail?

I'm trying to restrict a user to a specific directory called gclegal using a chroot jail. I've uncommented the line in the /etc/vsftpd.conf file  chroot_local_user=YES   Created a new user called kg:  $ sudo groupadd xenomai $ sudo useradd -d /var/www/html/gclegal -g xenomai kg $ sudo passwd kg    With this configuration I'm able to login through vsftpd with kg user but I'm also able to browse back to parent directories and modify them until /var/www/html.  How can I disable all operations outside the home of the user (/var/www/html/gclegal)?


I am using Texmaker for my paper and I encounter a problem here and hope somebody can help me.    As you can see here, the titles are some in Italics and some are not. What cause this anyway? I don't use cite btw, only footnote.  \begin{thebibliography}{99}  \bibitem[Monopolkommision (1988)]{monopol1988} Monopolkommision (1988): \em{Siebentes Hauptgutachten der Monopolkommission 1986/1987}, In: Deutscher Bundestag Online, 19.07.1988 (http://dipbt.bundestag.de/doc/btd/11/026/1102677.pdf vom 16.08.2016). \bibitem[Monopolkommision (1992)]{monopol1992} Monopolkommision (1992): \em{Neuntes Hauptgutachten der Monopolkommission 1990/1991} (http://dipbt.bundestag.de/doc/btd/12/030/1203031.pdf vom 16.08.2016). \bibitem[Monopolkommision (2016)]{monopol2016} Monopolkommision (2016): \em{Wettbewerb 2016: Einundzwanzigstes Hauptgutachten der Monopolkommission gemäß § 44 Abs. 1 Satz 1 GWB} (http://www.monopolkommission.de/index.php/de/gutachten/hauptgutachten/liste-hauptgutachten vom 21.09.2016).  \end{thebibliography}   what is wrong here? these are the packages i used.  \documentclass[oneside,12pt,german , a4paper]{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[backend=biber,style=authoryear]{biblatex} \usepackage{geometry} \usepackage[graphicx]{realboxes} \usepackage{lmodern} \usepackage{setspace} \usepackage{caption} \usepackage{eurosym} \usepackage{import} \usepackage{float} \usepackage{biblatex} \usepackage{pdflscape} \usepackage{multirow} \usepackage{pbox} \usepackage{filecontents} %\usepackage{acro} \usepackage[printonlyused]{acronym} \usepackage[bottom]{footmisc} \geometry{  a4paper,  total={210mm,297mm},  left=45mm,  right=15mm,  top=25mm,  bottom=15mm,  }  \graphicspath{ {images/} } \onehalfspacing \captionsetup{justification=raggedright,singlelinecheck=false} \nocite{*}   I did have some renewcommand, but I think this is not the cause.  \makeatletter %\renewcommand{\bibname}{Literaturen} \renewcommand{\contentsname}{Inhalt} %\renewcommand{\acronymname}{Abkürzungsverzeichnis} \renewcommand{\figurename}{\textbf{Abbildung}} \renewcommand\listfigurename{Abbildungsverzeichnis} \renewcommand\listtablename{Tabellenverzeichnis} \renewcommand\@biblabel[1]{} \renewcommand\footnotesize{%    \@setfontsize\footnotesize\@ixpt{10}%    \abovedisplayskip 8\p@ \@plus2\p@ \@minus4\p@    \abovedisplayshortskip \z@ \@plus\p@    \belowdisplayshortskip 4\p@ \@plus2\p@ \@minus2\p@    \def\@listi{\leftmargin\leftmargini                \topsep 4\p@ \@plus2\p@ \@minus2\p@                \parsep 2\p@ \@plus\p@ \@minus\p@                \itemsep \parsep}%    \belowdisplayskip \abovedisplayskip } \makeatother   I think I post in the wrong website since nobody answer me on Stackoverflow. Anyway thank you for the help.


Prove that it is impossible to find any positive integers a, b, c such that $(2a+b)(2b+a) = 2^c$.  This problem has been driving me crazy. Thanks for helping.


How do I modify the boot menu for Windows 7?

I'd like to add an entry to the Windows 7 boot menu, but it seems that it is not as simple as editing the boot.ini file.  How to I add a new entry? I'm trying to install  using the instructions .


Normally Distributed and Covariance is zero

Let $X \sim N(0,1)$, and let $P(Y=1)=P(Y=-1)=\frac{1}{2}$. Assume $X$ and $Y$ are independent, and let $Z = XY$. Prove that $Z \sim N(0,1)$ and $Cov(X,Z)=0$ For proving $Z$ is a standard normal variable, I thought using MGF would be a good idea, but could not relate that to $Z = XY$ and given conditions for variable $Y$.


How to copy a file to a remote server in Python using SCP or SSH?

I have a text file on my local machine that is generated by a daily Python script run in cron.   I would like to add a bit of code to have that file sent securely to my server over SSH.


Is Google indexing pages that has no connection with other pages?

I am working on a web project that has nearly 100 thousand instant users and there is a webpage that we are using for test cases. There are no links pointing to it from other pages. It shouldn't be indexed by Google or any other search engines.  "" can be used in this situation, I know but I wonder if Google (or any others) indexes this page, if I don't do anything to prevent it.


How to render a cycles scene in luxrender?

I'm doing a project in cycles and I want to render it but its too slow on my CPU. So I want to render the scene in luxrender but without starting the project all over again.


I have a FreeBSD host with multiple IP interfaces. I would like to have snmpd listen on a single private IP interface, but I am getting the following error when trying to start the service.   Error opening specified endpoint "192.168.200.50"  in my configuration file I have the following line  agentaddress  192.168.200.50   If I remove this line, snmpd starts up fine, but is listening on all interfaces, which I would like to avoid.   I have generated the configuration file with snmpconf, and it fails when I specify the IP address to listen on via the script.   Any thoughts on how to correct this?  This is on FreeBSD 8.3-STABLE and net-snmp 5.7.1  Thanks


Write a function that takes two parameters, an array of numbers and a single number and returns true or false if the number is in the array

I'm pretty new to JavaScript and I'm not quite sure what I'm doing wrong, any help would be much appreciated.  var array = [3, 5, 6, 10, 20];  function array (arr, num) {     for (var i=0 ;  i < array.length; i++);     return true; } else {     return false; } }  arr(10);


Supporting information self-plagiarism problem?

I just started my research career, and I may have made a mistake in the Supporting Information part of one of my papers. Any advice would be greatly appreciated. Long story short: I published two papers, and they are all about mathematical modeling. For the first paper, I put the detailed model setup and parameters in the supporting information. For the second paper, I basically used the same model but expanded model capabilities, and I still listed the model setup and parameters in the SI part. The model setup and configurations for these two papers are basically the same, such as tables, equations, languages, etc. I sort of copy-pasted the key tables and equations from my first paper to my second paper, but they are all in the SI part, and I cited that the model setup and parameters are from the first paper. So I wonder if what I did in my two papers in the SI part represents a plagiarism problem? If yes, are there any ways to make it correct? Please advise me.


Temporary file, single instance lock, and process kill (Java)

I'm currently using a temp folder for my Java application to create a lock so that only one instance can be running at a time. This lock file MUST be deleted when the program exits.   This is fine, except for the case when the process is killed (not allowed to shutdown normally, e.g. from Windows Task Manager). If that happens, the user will never be able to run the program again... eek  Anyone have a suggestion? Is there a way to make the OS delete a folder on reboot or something similar? Should I find another way to have a "single instance lock?"  Also, the solution should be cross-platform if possible...


Let $n$ and $k$ be positive integers. Show that $\gcd(n, nk + 1) = 1$

This is what I've begun with: So lets say $x=n,y=nk+1,x,y,n\in\Bbb Z$ Lets say we have a integer, d that divides both x and y. So, $d\vert x$ and $d\vert y$ so if there is a gcd, then d must also divide y-x. $d\vert(y-x)$ but we said $x=n,y=nk+1$. Then, $d\vert(nk+1-n)$=$d\vert (n(k-1)+1)$. But I have no idea if I'm heading in the right direction? Any tips?


how to get camera exactly like in the z perspective view

I'm making a text animation,in which in the end i want the camera to look exactly like when i look through the Z perspective view(numpad 7), so that the text seems 2d in the end. how do i make the camera do this?


Application of Argument Principle to Determine number of zeros

Show that there is exactly $1$ real solution in the unit disk $D = \{ z : |z| < 1 \}$ to the equation $ze^{\lambda - z} = 1$, where $\lambda \in \mathbb{R} : \lambda > 1$. The fact that there is one real solution in the unit disk follows from the intermediate value theorem. That is $f(x) = xe^{\lambda -x} - 1$ is a continuous real valued function and $f(-1) = -e^{\lambda+1} -1 < 0$ and $f(1) = e^{\lambda - 1} - 1 > 0$. I am trying to consider the change in argument along the curve $\gamma = \{ e^{it} : t \in [0,2\pi] \}$ and show that the change in argument of $f(z)$ is $2\pi$, but I am not sure how argue that. I know $f(e^{it}) = e^{it} e^{\lambda - \cos(t)} e^{-i\sin(t)} - 1$. I want to say that the $e^{it} e^{\lambda - \cos(t)} e^{-i\sin(t)}$ dominates (as its modulus is greater than $1$), but I don't know how to prove it formally.


Compiler error - exe does not contain a static 'Main' method suitable for an entry point

I have the compiler error shown in the image and am not able to resolve it - "Consults.exe does not contain a static 'Main' method suitable for an entry point". My program does contain a Main method.    public static int Main(string[] args)  {      Program s = new Program();      s.name();      string d = Console.ReadLine();      return 0;  }


How to plot violin plot from a box plot in LaTeX?

I have a box plot using tikz in LaTeX, as in the following:       \begin{tikzpicture}[scale=1]      \begin{axis}        [width=\linewidth, height=4cm,        ytick={1,2},        yticklabels={A, B},        xlabel=A, or B        ] coordinates {};        \addplot+[fill, draw=black,        boxplot]         table[row sep=\\,y index=0] {         data\\          2\\2\\0\\0\\0\\0\\0\\0\\0\\0\\1\\2\\0\\0\\0\\2\\         };        \addplot+[fill, draw=black,        boxplot]         table[row sep=\\,y index=0] {         data\\         1\\5\\15\\15\\3\\3\\2\\5\\4\\1\\14\\2\\4\\1\\0\\2\\          };      \end{axis} \end{tikzpicture}   Is there a way to draw the violin plot for the same data and how in LaTeX? Thank you for any suggestion!


Trying to read a file with various but known input types and getting an InputMismatchException

I am trying to read a file that looks exactly like this  C   8230123345450 Simons      Jenny    R  0     12  C   3873472785863 Cartman     Eric     N  750   18  C   4834324308675 McCormick   Kenny    R  0     20   O   1384349045225 Broflovski  Kyle     -  6 //possible problem start  O   5627238253456 Marsh       Stan     T  3  To clarify: C = OnCampusStudents O = OnlineStudents  The code should determine whether the student is on campus or online then use the appropriate method and the read the code accordingly. It is crashing in my readOnlineStudent method on what i believe is the credits variable.   Throws an InputMismatchException.  I'm not sure what to try because everything looks right to me (obviously I'm missing something).  Here is the relative code:  private ArrayList<Student>readFile() throws FileNotFoundException {     ArrayList<Student> studentList;     studentList = new ArrayList<>();     Scanner in = new Scanner(new      File("C:\\Users\\KYLE\\Documents\\burger-cse205-      p02\\test\\input\\p02-students.txt"));      while(in.hasNext() == true){         String studentType = in.next();         if(studentType == "C"){             studentList.add(readOnCampusStudent(in));         }         else{             studentList.add(readOnlineStudent(in));         }     }     in.close();     return studentList; }  private OnCampusStudent readOnCampusStudent(Scanner pIn){     String id = pIn.next();     String lname = pIn.next();     String fname = pIn.next();     OnCampusStudent student = new OnCampusStudent(id, fname, lname);     String res = pIn.next();     double fee = pIn.nextDouble();     int credits = pIn.nextInt();     if(res.equals("R")){         student.setResidency(OnCampusStudent.RESIDENT);     }     else{         student.setResidency(OnCampusStudent.NON_RESIDENT);     }     student.setProgramFee(fee);     student.setCredits(credits);     return student; }  private OnlineStudent readOnlineStudent(Scanner pIn){     String id = pIn.next();     String lname = pIn.next();     String fname = pIn.next();     OnlineStudent student = new OnlineStudent(id, fname, lname);     String fee = pIn.next();     int credits = pIn.nextInt(); //this is the line that throws the error     if(fee.equals("T")){         student.setTechFee(true);     }     else{         student.setTechFee(false);     }     student.setCredits(credits);     return student; }   What can be done to fix this?  Thanks


I can already scroll left and right with two-finger swiping, however, in Windows I can use the same gestures to go forward and back in browsers and such. Is this possible in Ubuntu?


CAST throwing error when run in stored procedure but not when run as raw query

Something very odd is happening here.   I have a query that looks like this.  SELECT CAST(FT.DOP AS SMALLINT) FROM TRACKING_DATA WHERE date > @mydate and identifier = 0000000000   When run as a raw query it returns data just fine.  When i place it in a stored procedure that alters the where clause it throws this error.  Msg 244, Level 16, State 2, Procedure myprocedure, Line 107 [Batch Start Line 2] The conversion of the varchar value '58629' overflowed an INT2 column. Use a larger integer column.   So here is the oddity. I go through all the possible data for that where clause with a query like this.  SELECT DISTINCT DOP FROM TRACKING_DATA where identifier = 000000000000   and  SELECT DISTINCT CAST(DOP AS smallint) FROM TRACKING_DATA where identifier = 000000000000   And this is what i get back.  17 12 9 19 8 14 6 16 11 13 7 10 0 18 5 15 4   Nowhere does it have anything remotely too large for a SMALLINT. So i thought, ok maybe its a non-printable ASCII character. But i can't find any.  I'm a little perplexed at the moment. It runs find as a raw query, explodes as a procedure and all possible data based on the where is valid. My only suspicion is that the query plan is doing something odd with filtering or maybe runs with different validation when run as a procedure.


Can I use chapter specific characters in a custom space marine chapter?

I have made my custom space marine chapter, currently I have only a generic apothecary and captain as my HQ. What I wanted to know is if I could use specific HQ units like the imperial fists Captain Lysander or the Whites Scars Kor'sarro Khan in my custom chapter.


For some reason installing Dropbox via software center does not work.  I get a message that sends me to Dropbox website where I follow the instructions. But at the end it says it says:     Next, run the Dropbox daemon from the newly created .dropbox-dist folder.   I am not able to do this. Running the command ~/.dropbox-dist/dropboxd fails for me.  Running Ubuntu on Windows 7 Home Edition.


What extra protection did Voldemort gain using Harry's blood

When Lily gave her life for Harry she protected Harry and this is why Voldemort couldn't kill him. But what extra protection came about when Voldemort used Harry's blood to regain a body, and what protection still would have remained if any, if Voldemort had not used Harry's blood?


I often flag comments as obsolete after i.e. the suggestion has been added to the question/answer -- or for any reason that fits into 'obsolete'.  Sometimes I revisit a question from days ago and I can't flag the comments I've up voted. Which forces me to hop on my laptop and do it from the desktop site (you can flag up voted comments on the desktop site) -- that is if I'm feeling really persistent about it.  Can this functionality be added to the iOS app?


How to work with value and key in associative array


Intuitively, why is $\sum_{r=0}^n r^3 =\bigg(\sum_{r=0}^n r \bigg)^2$?

A duplicate question probably exists, but I couldn't find one. Please let me know if one is found and I'll delete this.    We know that:  $$\sum_{r=0}^n r=\frac12n(n+1)$$ and that: $$\sum_{r=0}^n r^3 =\frac14 n^2(n+1)^2$$ and these are easily proven by induction: $$\frac{n(n+1)}{2}+(n+1)=\frac{n^2+n+2n+2}{2}=\frac{n^2+3n+2}{2}=\frac12(n+1)(n+2)$$ and: $$\frac{n^2(n+1)^2}{4}+(n+1)^3=\frac{n^2(n+1)^2+4(n+1)^3}{4}$$ $$= \frac{(n+1)^2(n^2+4n+4)}{4}=\frac 14(n+1)^2(n+2)^2$$  We can see that, from the results obtained, $$\sum_{r=0}^n r^3 =\bigg(\sum_{r=0}^n r\bigg)^2$$  What I am curious to know is, is there a reason why this is the case, other than the numbers just showing this?  Thanks in advance.


I want to make "god rays" in my nature scene

I am now busy with my first nature scene ever in cycles but I can't seem to get the hang of god rays for my scene, in a very simple scene with just a window I got it to work but it doesn't work out for this scene, I watched every tutorial I could find but still then it doesn't work, so you guys are sort of my last resort :), see the images for my settings and scene    And my goal is to get god rays through the trees. Thanks in advance!


How to find other nontrivial solutions of $a!b!=c!$?

I know only one nontrivial solution of this equation: $6!\cdot 7!=10!$. There is also a series of trivial solutions: $n!(n!-1)!=(n!)!,\ \forall n\in\mathbb{N}$. So my question is how to find any other solutions of the equation  $$a!b!=c!,\ a, b, c\in\mathbb{N}\quad(1)$$  I'm also interested in the solutions of more complex equations:  $$\prod\limits_{a\in A}a!=b!,\ A\subset\mathbb{N}\quad(2)$$  $$\prod\limits_{a\in A}a!=\prod\limits_{b\in B}b!,\ A,B\subset\mathbb{N},\ A\cap B=\varnothing\quad(3)$$  Update: as it is noted in comments both (1) and (2) equations have already appeared here. So the main question now is whether anything is known about equation (3).


Short question, I am sending ajax request after pressing a button. A string might contain & and if it does, everything after & is treated as a name of second parameter. I tried to use encodeURI(string) but it did not work. How to handle this properly?  My code without experiments:      <input class="refreshButton" type="button" value="refresh" onclick="$('#container').load('/some/path', {string: $('#string').val()});"/></td>   Cheers


I looked everywhere for my bin folder (even in the trash) but I can't seem to find it anywhere. I looked at some other answer people said to do but that didn't work either please help me. I am using a mac so maybe someone who might know where my bin folder is at please help. thanks


How to access favorite questions from Android app

The question was clearly worded in title. Is there any opportunity to access my favorites from Android? I found out the way to bookmark the question, but cannot find the way to access it afterwards.


Install Ubuntu on USB Flash Drive or USB powered external HDD?

I was thinking of installing Ubuntu on a couple of VMs. Would it be better to store each VM on a 8GB thumbdrive or store all the VMs on a 320GB USB-powered external HDD?  Which one would be faster?


Does the command pwd in a shell script output the directory the shell script is in?


Intuitive understanding of the derivatives of $\sin x$ and $\cos x$

One of the first things ever taught in a differential calculus class:   The derivative of $\sin x$ is $\cos x$. The derivative of $\cos x$ is $-\sin x$.   This leads to a rather neat (and convenient?) chain of derivatives:   sin(x) cos(x) -sin(x) -cos(x) sin(x) ...   An analysis of the shape of their graphs confirms some points; for example, when $\sin x$ is at a maximum, $\cos x$ is zero and moving downwards; when $\cos x$  is at a maximum, $\sin x$ is zero and moving upwards.  But these "matching points" only work for multiples of $\pi/4$.  Let us move back towards the original definition(s) of sine and cosine:  At the most basic level, $\sin x$ is defined as -- for a right triangle with internal angle $x$ -- the length of the side opposite of the angle divided by the hypotenuse of the triangle.  To generalize this to the domain of all real numbers, $\sin x$ was then defined as the Y-coordinate of a point on the unit circle that is an angle $x$ from the positive X-axis.  The definition of $\cos x$ was then made the same way, but with adj/hyp and the X-coordinate, as we all know.  Is there anything about this basic definition that allows someone to look at these definitions, alone, and think, "Hey, the derivative of the sine function with respect to angle is the cosine function!"  That is, from the unit circle definition alone.  Or, even more amazingly, the right triangle definition alone.  Ignoring graphical analysis of their plot.  In essence, I am asking, essentially, "Intuitively why is the derivative of the sine the cosine?"


Adjust the brightness level of touch bar

I can't find anyway to adjust brightness level of touch bar on my mbp 2017 with macOS High Sierra. Perhaps it can be changed by adjusting values in SMC? I have a different hardware model and macOS version so I asked another question. Please tell me if this is a duplicate question with .


I was listening a song called To The Left from Beyonce. There is a part that she sings:  “Because you was untrue Rolling her around in the car that I bought you Baby you dropped them keys Hurry up before your taxi leaves”.  Could you guys explain me what does she mean? If she was talking about the car keys, it shouldn’t be “you dropped its keys”


Is it is possible to press the keyboard key by javascript code???? For Example I have a button and I want when a user press it some key automatically pressed of keyboard which I require.


Blender 2.8 dosen't recognizing my graphics card

I have GeForce GT610. I saw the settings of Nvdia control panel and add Blender for CUDA support but Blender 2.8 is not recognized my graphics card.


What are the theorems that I supposed use it to prove that :     If $\mathcal f $  is entire and $\mathcal f(2z)=2f(z)$ then $ \exists $ $\lambda $ such that $\mathcal f(z)=\lambda\mathcal z $.


Let $G$ be a group and $G'=\langle [x,y] : x , y \in G\rangle $, where $[x,y]=x^{-1}y^{-1}xy$.  I am trying to prove that $G/G'$ is an abelian group.  What I've done: $$X\in G/G' \Rightarrow X=xG' ; x\in G$$ $$Y\in G/G' \Rightarrow Y=yG' ; y\in G$$ $$XY=(xG')(yG')=xyG'$$ $$YX=(yG')(xG')=yxG'$$  Now, I have to prove that $XY=YX$, but I don't know how to do that :( Any help would be appreciated.


Implement ```-style (fenced) Markdown code blocks

Currently, Stack Exchange’s Markdown parser only allows four-space indents to represent code blocks:      // some code     // another line of code    and other Markdown implementations allow for an alternative syntax, that doesn’t require indenting each code line:  ``` // some code // another line of code ```   This is much more convenient to type out. It would be super useful if Stack Exchange could support this syntax.    By extension, this syntax also allow you to specify the source language right after the opening ```:  ```js // some code // another line of code ```   …which would then enable syntax highlighting for that specific language. Although it’s interesting metadata, I don’t think this feature is needed on Stack Overflow, as the syntax highlighting library works pretty well for various languages.  So, even if you would allow this syntax but ignore the ```language, this would greatly improve my productivity on Stack Exchange.  What do you think?  The moderators are currently collecting feedback regarding this feature, so please post a comment with your thoughts. Good idea? Bad idea? Don’t really care? What do you think are the benefits/drawbacks? Experiences? Let them know! Thanks!


I need to know when the "Caps Lock " key is turned on/off

I need to know when the "Caps Lock " key is turned on.   Does Ubuntu has a visual indicator to show me when the key "Caps Lock" is on?


(I don't know how to compare strings) Writing to a file with a while loop

my intent for this program was to create a simple program that takes input from the terminal line by line, and stores it into a file in the same fashion, ending when the user inputs "end".  I'm confused about why... 1) the while loop does not end when the user inputs "end" 2) the data is not written to the file (I've checked, it doesn't for whatever reason)  Edit: the answer has been found already! For those just arriving, my while condition should have been !temp.equals("end")  public static void main(String[] args) throws IOException{      Scanner in = new Scanner(System.in);      System.out.println("Type in data and it will be written to a file");     System.out.println("filename = blah.txt");      String temp, filename="blah.txt";      PrintWriter outfile = new PrintWriter(new FileWriter(filename));      System.out.println("enter next line... \"end\" to exit");     temp=in.nextLine();     while(temp!="end"){         outfile.println(temp);         System.out.println("enter next line... \"end\" to exit");         temp=in.nextLine();     }      outfile.close(); }


Edit 3. Fixed question to be more clear and include current solution Problem Two players player 1 and player 2 plays a game of fair coin flipping. Player 1 starts with $A$ coins and Player 2 with $B$ coins. Let $P_n$ defines the probability of player 1 winning all coins in a game when player 1 has $n$ coins. Find the recurrence relation of $P_n$ and then find its closed formula. This formula can then be used to know the probability of player 1 winning if he has, i.e. twice the coins player 2 has. Solution? I know that $P_0 = 0$, because if she has $0$ coins, then she can't win, what about $P_{A+B}?$ $$P_n = 0.5P_{n+1} + 0.5P_{n-1}$$ Which gives the characteristic equation: $$x^2-2x+1 = (x-1)^2=0 \implies x=1\ (double\ root)$$ This can then be put into the general solution for linear homogenous recurrence relations: $P_{hn} = C_1+nC_2$ and here I'm stuck once again. To find these two values I'd need two boundary points


What is the basic difference between "made of" and "made from." Both expressions are used in English. For instance, "This chair is made of wood," and "Cream is made from milk." Though the question is quite simple, I often confuse the two expressions. How do we differentiate them and what is the rule or logic behind their use?


I heard an interesting question recently:     What is the minimum number of people required to make it more likely than not that all 365 possible birthdays are covered?   Monte Carlo simulation suggests 2287 ($\pm 1$, I think).  More generally, with $p$ people, what is the probability that for each of the 365 days of the year, there is at least one person in the group with that birthday?  (Yes, ignoring the leap-day.)


A phrase for "repeatedly shaking one's leg up and down when idle"

My friend likes to repeatedly shake his leg up and down when idle. In Chinese, there is a specific term for this action that, if loosely translated, would be "vibrating leg."   Is there a more general or commonly accepted term in English for this specific habit? This habit is quite common and as a child I would do it, too. But I was reprimanded by my mother for doing so and that is why I know the Chinese term and now I am wondering what the English term is.


How To quickly do derivatives with respect to matrices

Whats a quick way to work the below (and problems similar) out?   For me to take this derivative it involves a lot of time and boring calculation, there has to be a better way.    This is taken from the solutions to Chris Bishop's Pattern Recognition and Machine learning:


PuTTY Network Error: Software caused connection abort

I have a strange problem: When I'm using PuTTY with SSH connecting to a Linux server hosted in  on my local Windows 7, I often get the error saying "Network error: Software caused connection abort" and then the PuTTY SSH window is inactive. Usually I can login in the server with PuTTY and do something, but after a random time (about one or two minutes) I get that error. And sometimes I even can't login, getting an error saying timeout.   I guess there's something wrong with my VMware Player, because I have another Ubuntu desktop hosted in VMware as a code repository server, and it more often than not has a timeout error when I do an SVN update/commit. However, I also guess Windows 7 has some quirk because the same Ubuntu server hosted in VMware as a code repository works very well when on Windows Vista! It seems all the bad things happen after I moved from Windows XP to Windows Vista and then Windows 7!  What could be the reason for this problem and how can it be fixed?  Supplement:  I did a Google search and applied all methods to help, including:   Enable sshd TCPKeepAlive Set sshd ClientAliveInterval to 900 and ClientAliveCountMax to 3 Set the PuTTY connection setting 'seconds between keepalives' to 5.    But these all don't work! And the SSH session in PuTTY still breaks after sometime!  I turned off both the Linux server firewall and Windows 7 client firewall, but login still times out! It is really annoying!  It seems sometimes I can log in, but sometimes login times out! I really don't know why. It drives me crazy!  One thing I have to mention is that when I'm using PuTTY SSH connecting to a remote server, and it's all OK!  When I failed to log in, ping failed too! But, how can that happen? I use VMware player to host the Linux server on my local machine!


how to compare a decimal value with a integer in shell scripting?

How to compare a decimal value with a integer in shell scripting?  Example:  i=1 j=1.2  if [$j -gt $i];then   echo "growth" else   echo "None of the condition met" fi   Im getting output as None of the condition met  But i need output as growth,As 1.2 is greater than 1.


For loop repeating counter when adding threads

Hope someone can spot what is going on here, I've spent hours looking and I think it is impossible.  I have 2 for loops and this passes the counters to a thread for more processing. when I use more than one thread or do not add a wait in the for loop the threads are passed the same counters.  my code   public static List<Thread> TPool = new List<Thread>(); for (int i = 1; i <= 10; i++) {   for (int m = 2; m <= 10; m++) {     waitingThreadPooling(new ThreadStart(() => run_test(i, m)), 3);     //wait(10);   } } private static void run_test(int the_i, int the_m) {   string Test = "i:" + the_i + ", m:" + the_m;   // more code   Console.WriteLine(Test); } public static void waitingThreadPooling(ThreadStart start, int MaxThreads = 50) {   Pool_Threads_Remove_Dead(ref TPool);   while (true)   {     if (TPool.Count < MaxThreads)     {       Thread _thread = new Thread(start);       _thread.Start();       TPool.Add(_thread);       break;     }     else     {        Pool_Threads_Remove_Dead(ref TPool);     }     Wait(10);   } }   this outputs  i:1, m:4  <<< i:1, m:4  <<< whats going on here??? i:1, m:3 i:1, m:5 i:1, m:6 i:1, m:8 i:1, m:7


How do I set an environment variable from within Kotlin code?

While writing tests, some of the target code behaves differently depending on the value of a certain environment variable. In order to test its functionality, I need to change the variable and execute the code being tested. Unfortunately, there seems to be no sensible way to do it from within our Spek tests. The map that System.getenv() gives me is read-only.


I am new to accounting and trying to learn a few things as my accounts get more and more complicated.  I currently use GnuCash to record simple income/expenses/assets/liabilities and have had a new situation I don't know how to record.  I am currently billing some expenses for work and for my kayak club to my personal credit card.  Under normal circumstances I would do the following (my +/- may be backwards):  Expense +$100 Credit Card -$100  and then when the credit card bill comes I would pay it off  Credit Card +$100 Chequing Account -$100  For expenses that I get reimbursements for I would like to be able to note that I paid for the expense with my credit card and that I paid off my credit card with my chequing account.  At the same time, I would like to be able to create another parent account (maybe "claimable expenses") that shows that I purchased the item, and was then reimbursed so that an individual expense for work or my club has a zero balance.  I tried to look this up in previous threads but didn't quite understand how to apply this to my situation Any advice would be appreciated.


Why is wine made 'from' grapes, but tables are made 'of' wood?

(1) Wine is an alcoholic beverage made from fermented grapes or other fruits. (Wikipedia) (2) Tables were made of marble or wood and metal (typically bronze or silver alloys), sometimes with richly ornate legs. (Wikipedia)  Why is 'from' used in (1), whereas 'of' is used  in (2)? Is it a stylistic choice whether to use 'of' or 'from'? Or, in case of chemical changing, differently from changing in shape only, 'from' is preferable?


I have the following piece of code:  private String toString(List<DrugStrength> aDrugStrengthList) {     StringBuilder str = new StringBuilder();         for (DrugStrength aDrugStrength : aDrugStrengthList) {             if (!aDrugStrength.isValidDrugDescription()) {                 aDrugStrengthList.remove(aDrugStrength);             }         }         str.append(aDrugStrengthList);         if (str.indexOf("]") != -1) {             str.insert(str.lastIndexOf("]"), "\n          " );         }     return str.toString(); }   When I try to run it, I get ConcurrentModificationException, can anyone explain why it happens, even if the code is running in same thread? And how could I avoid it?


Might a planet perform figure-8 orbits around two stars?  I'm thinking that if the two stars were equal mass (and not orbiting each other) then a planet that were to go right between them would continue in a straight line, with no preference for either star. But since the two stars would in fact be orbiting each other, the system would be rotating and thus there would be a Coriolis preference for one of the stars. Might that preference be made to alternate stars?  Another possibility would be if each star were in turn orbited closely by another planet, which would perform three orbits for each orbit of our planet of interest. Then things could be timed where on one pass star A's inner planet were aligned right to pull the planet of interest into an orbit, and on another pass star B's inner planet would be aligned right to pull the planet of interest into an orbit. So we have a system of five bodies, two massive (stars) each orbited by a minor, and one minor performing figure-8s.  Is this at least plausible if contrived?


Getting off at an international hidden city with checked bags?

Let's say I am currently in City A, having flown here from City C through City B (all in different countries). I have a return ticket back that goes A-->B-->C, and I want to get off in B. I've contacted the airline (Air France w/ Delta) and they've said the only way to do that would be to just buy a whole different ticket one way from A-->B. Ideally, I'd like to move the B-->C section of the trip back a week or two, because I do need to eventually end up in C. Many answers on this site have suggested that if I just get off in B, it would be okay and I would be able to book a pretty cheap flight back B-->C. The only issue is that I will have checked baggage, that if they don't let me short-check it, would potentially be stuck on the flight to C, require me to pay large fees to get access to, or at least tip them off to my flight-skipping plans.   Is there a way to:  1) make sure I can get off in B and not be charged a lot of money/sued  2) retrieve my luggage at B or even be able to have someone pick it up at C for me, and   3) ideally just move the second leg of my trip back so I don't have to pay tons of money.  I realize I should have booked the trips differently from the get-go, but travel plans change and I'm finding myself stuck or facing >$1500 fees and charges if I go forth with my current situation.  I've been searching around on this site and finding answers that are kind of what I'm looking for but nothing exactly, so if anyone could help that would be amazing.  Edit - this is different than the duplicate flag because I am also looking for information and advice about changing my flight/rebooking it, not just about retrieving bags midway.


I have a system with dual boot for Windows 7 and Ubuntu 12.04. The system uses Grub as its boot loader. But, today by mistake, i shrank the Windows Volume and created a new Volume and all worked fine, except when i restarted to discover that boot-loader has gone wrong. It displays:    error: no such partition   grub rescue>     I ran through google and several forums to finally discover many things. Such as:    grub rescue> ls (hd0) (hd0,msdos5) (hd0,msdos4) (hd0,msdos3) (hd0,msdos1)     Now, i can load back to grub-menu and boot into Ubuntu as well as Windows normally, but by fighting with grub-rescue as:    grub rescue> set root=(hd0,3)/boot/grub   grub rescue> set prefix=(hd0,3)/boot/grub   grub rescue> insmod normal   grub rescue> normal     Although, this takes to Grub-menu for choosing OS, but i want to get away with this. How, can i fix the Grub to get back the screen as earlier? Probably, it requires some resetting in grub, which i can't figure out. Please provide any method. PS: try to suggest a method, that uses normal user account, as i have to go more for getting sudo password. Thanks.


What is this icon on top right corner of screen?

I have an android phone which shows a peculiar icon on top right corner of the screen (notification area):  I believe: Icon number 1 is for signal Icon number 3 is for wifi Icon number 4 is for battery.  What does icon number 2 indicate? I could not find it on searching the net. Thanks for your help.


I'm looking to add a "Download this File" function below every video on one of my sites. I need to force the user to download the file, instead of just linking to it, since that begins playing a file in the browser sometimes. The problem is, the video files are stored on a separate server.   Any way I can force the download in PHP?


Different arrows in set theory: $\rightarrow$ and $\mapsto$

Can someone explain the difference between symbols:   $\rightarrow$ and $\mapsto$  Thanks.


I have an old Logitech USB camera that was working in 18.04 but after an installation of 20.04 it does not work. Here is what I can say after googling around. /dev/video seems OK: ls -la /dev/video* crw-rw----+ 1 root video 81, 0 set 13 12:05 /dev/video0  my user belongs to video group. I tried with lsusb and the webcam is there: lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID 046d:c505 Logitech, Inc. Cordless Mouse+Keyboard Receiver Bus 001 Device 003: ID 046d:c077 Logitech, Inc. M105 Optical Mouse Bus 001 Device 002: ID 046d:08d7 Logitech, Inc. QuickCam Communicate STX Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub  But running cheese I get a black window with °No device found° message. And here is the output on console: ** Message: 13:05:27.575: cheese-application.vala:214: Error during camera setup: No device found   (cheese:3860): cheese-CRITICAL **: 13:05:27.582: cheese_camera_device_get_name: assertion 'CHEESE_IS_CAMERA_DEVICE (device)' failed  (cheese:3860): GLib-CRITICAL **: 13:05:27.582: g_variant_new_string: assertion 'string != NULL' failed  (cheese:3860): GLib-CRITICAL **: 13:05:27.582: g_variant_ref_sink: assertion 'value != NULL' failed  (cheese:3860): GLib-GIO-CRITICAL **: 13:05:27.582: g_settings_schema_key_type_check: assertion 'value != NULL' failed  (cheese:3860): GLib-CRITICAL **: 13:05:27.582: g_variant_get_type_string: assertion 'value != NULL' failed  (cheese:3860): GLib-GIO-CRITICAL **: 13:05:27.582: g_settings_set_value: key 'camera' in 'org.gnome.Cheese' expects type 's', but a GVariant of type '(null)' was given  (cheese:3860): GLib-CRITICAL **: 13:05:27.582: g_variant_unref: assertion 'value != NULL' failed  ** (cheese:3860): CRITICAL **: 13:05:27.582: cheese_preferences_dialog_setup_resolutions_for_device: assertion 'device != NULL' failed  I removed cheese and installed guvcview and with it I can see my webcam working. Now, I need to make it working with Skype. Any idea? Cheers, Gianni


It seems wrong to find the mass using weight alone when using chemical compounds

The difference between  and  is pretty straightforward so then how can we WEIGH a substance then ask how many Daltons (atomic MASS units) are in that substance without a conversion in there for gravity? Or vice versa. For example:  Question: How many moles of potassium are in 156.4 grams?  Answer: Atomic mass of potassium, K = 39.1          Amount of potassium is 156.4g, sample = 156.4/39.1 = 4.00mol.           There are 4 moles of potassium in 156.4 grams of potassium.    Nowhere is there any sort of conversion for earth's gravity even though we are weighing out a substance that is obviously high enough to deserve one. I am assuming the amu of all elements is the same in the universe.


I have this little piece of code and it gives me the concurrent modification exception. I cannot understand why I keep getting it, even though I do not see any concurrent modifications being carried out.  import java.util.*;  public class SomeClass {     public static void main(String[] args) {         List<String> s = new ArrayList<>();         ListIterator<String> it = s.listIterator();          for (String a : args)             s.add(a);          if (it.hasNext())             String item = it.next();          System.out.println(s);     } }


Is it unethical to enroll in a low-ranked institution with the intention of switching to a better one if possible?

I am an international student who has been admitted at a low ranked institute in the US. I also have an offer from an institute in my own country to do a Masters'. I ultimately want to get admitted at a prestigious program in the US.   I was recently advised to join the low ranked US institute, do my course work well, establish contacts with professors at more prestigious schools, and then switch to a better school for a PhD. It sounds immoral to me. But I was told it is not immoral in practice as the institute receives thousands of offers to fill up the seat you will be vacating.   Is doing the above seriously unethical?


How can it be possible Creating instance of interface in Java?

I'm trying to understand the following code and a little bit confused. After some Googling, I found Anonymus Classes In OOP. But can't understand why in this code they declared Sorting object and calling an instance of MergeSort with sorting = new MergeSort(); ? Can someone explain to me?  interface Sorting {    List sort(List list); } class MergeSort implements Sorting {     public List sort(List list) { // sort implementation         return list;     } } class QuickSort implements Sorting {     public List sort(List list) { // sort implementation         return list;     } } class DynamicDataSet {     Sorting sorting;     public DynamicDataSet() {         sorting = new MergeSort();     } // DynamicDataSet implementation } class SnapshotDataSet {     Sorting sorting;     public SnapshotDataSet() {         sorting = new QuickSort();     } // SnapshotDataSet implementation }


Removal of a countable collection of pairwise disjoint closed balls from the plane,and path connectedness

Its well known that the removal of countably many points from the euclidean plane doesn't affect path-connectedness.I am interested to know that if I remove a countable collection of pairwise disjoint closed balls from the plane,will it remain path connected or not.Any help would be highly appreciated,thanks in advance!