I'm using MiKTeX on Windows, and I've found Imprint Shadow font which I'd like to use with lettrine for capitalization of first font of chapters (I'm experimenting a bit). I've extracted all the necessary files from .  I also have the .pbf font in place. Now I don't understand the next step I've found in the :   3.  Add +miih.map to the configuration files of dvips, pdftex and your     dvi previewer.  4.  Run texhash and updmap programs to update the conguration files and file names database   Where do I need to do this? :\ Do I need to just update formats and file names database in MiKTeX options?  EDIT: And even tho I've added everything as instructed (I unzipped everything in its right place) I cannot get the font to work :| Any help on this?


Automatically change Gmail signature by recipient

Is there a way to automatically change/adjust the Gmail Signature by the Emails recipient? I'm thinking of adjustable rules or a plugin for the Gmail Webclient.  For example:  I'm preparing a mail for adam@mail.com. Normally it would add my standard signature "Best, Devan", but because I created a rule for adam@mail.com Gmail sees that the Email is addressed at adam@mail.com and automatically changes the signature that is added to the Email Footer to "Sincerely, Devan Loper".  EDIT: I already know about the Gmail Lab named "canned responses" that does something similar but it doesn't automate by recipient. That's the problem.


Prove $\mathbb{Z}_3[x]/(x^2+1)$ and $\mathbb{Z}_3[x]/(x^2+x-1)$ are isomorphic.

Prove $\mathbb{Z}_3[x]/(x^2+1)$ and $\mathbb{Z}_3[x]/(x^2+x-1)$ are isomorphic by finding an explicit isomorphism. My question is how I can define the map. Here are what I tried:  $\mathbb{Z}_3[x]/(x^2+1)=\{ a+b\alpha \,|\, \alpha^2 + 1 = 0, \quad a,b\in\mathbb{Z} \}$  $\mathbb{Z}_3[x]/(x^2+x-1)=\{ a+b\beta \,|\, \beta^2 + \beta - 1 = 0, \quad a,b\in\mathbb{Z} \}$  Then I am looking for an isomorphism of the form $f(a+b\alpha) = a+bf(\alpha)$ for all $a,b\in\mathbb{Z}$ where $f(\alpha^2)+1=0$. Here I'm stuck.  My professor said $f(a+b\alpha) = a+b(1-\beta)$ so that the restriction of $f$ to $\mathbb{Z}_3$ is the identity morphism. I don't understand why we have $f(\alpha) = 1-\beta$.  He also gave another problem: $\mathbb{Z}_5[x]/(x^2+2)$ and $\mathbb{Z}_5[x]/(x^2-x+1)$, where $f(a+b\alpha) = a+b(2+\beta)$.  Could someone please explain to me why $f(\alpha) = 1-\beta\,$ in the first problem and $f(\alpha)=2+\beta\,$ in the second problem?  Thank you very much.


How to prove the closed form $\left(\frac {1}{1-x}\right)^2 = \sum_{n=0}^{\infty}(n+1)x^n$

Show for $x \in  \mathbb{R}$ with $|x|< 1 $  $$\left(\frac {1}{1-x}\right)^2 = \sum\limits_{n=0}^{\infty}(n+1)x^n$$  My idea is, to  use the Cauchy product, but i didn't gone very far..


Which 1970s UK fantasy kids TV show has an older brother die?

This is a tough one, it has eluded me for years!  It is a TV show which opens with two brothers, maybe in 17th or 18th century London. One is around 16, the other is 11 or so and he idolises his older brother. There is a fire, the older brother died but seems to return or summon the younger one to a magical land called something like "yanki-hola". They were transported to a village in, I think, medieval times. I think there were some adventures there against a local bad baron or duke.  I really just remember that it was sad and unsettling when the older brother died. Has anyone ever seen anything similar to this? I have tried for years to find an answer.


Are there any known Wizards who prefer a muggle life?

We know that some Wizards and Witches are familiar with the Muggle world, but are there some cases of people which start a life as a Muggle or "undercover wizard" in the Muggle community?


Java Beginner - Roman Numerals to Decimal WITHOUT switch

I'm taking an AP Computer Science course, and I'm having a problem with this code. We're to make a method that converts Roman Numeral Strings into decimal values.  So far, we've only gotten to if/else statements and while loops. I've seen a few answers here using switch, but our class hasn't gotten there yet. I need a way to do this without using switch. I've only written code assuming that the Roman Numerals are in non-ascending order, but whenever a string like "MM" is used, the method returns "0" as a value. Anyone know why this happens here?  Any tips on subtracting the numerals would also be appreciated.     public int decimalValue ( String roman ){      //given a Roman Numeral      int decimal =0;      int a = 0; // a and b used as to check each letter in String roman      int b = 1;       // Assuming in non-ascending order. Need to make for ascending      while ( (a <= (roman.length() - 1) ) && (b <= roman.length() ) ) {         if ( roman.substring(0,1) == "M") {            decimal = decimal + 1000;         }         else if ( roman.substring(0,1) == "D") {            decimal = decimal + 500;         }         else if ( roman.substring(0,1) == "C") {            decimal = decimal + 100;         }         else if ( roman.substring(0,1) == "L") {            decimal = decimal + 50;         }         else if ( roman.substring(0,1) == "X") {            decimal = decimal + 10;         }         else if (roman.substring(0,1) == "V") {            decimal = decimal + 5;         }         else if (roman.substring(0,1) == "I") {            decimal = decimal + 1;         }         a++;         b++;         }    return decimal;   }


I was looking at the gravitational inverse-square law: $$ F_G = G \frac{Mm}{r^2} $$  This law comes from some experimental data? Why it is an exact inverse-square law? Could it be $$ F_G = G \frac{Mm}{r^{2.00000000000000001}} $$ or there is a mathematical method to find exactly this law?


Is it true  $ABA=A  \Rightarrow  BAB=B$ ?  $A$ and $B$ are nonzero matrice.  If $A$ is invertible the statement is obvious. What if $A$ is singular?


How does one go about calculating the limit of the sequence $$a_n = \left(1 + \dfrac{1}{n^2} \right)^n.$$ I understand the cases of  $ b_n = \left(\alpha + \dfrac{\beta}{n}\right)^n, $ in terms of $e$, but I am missing the "trick" with regards to $a_n$.


What's the best approach to baking bread with whole grains?

I have a plethora of whole grains (barley, rye, wheat berries, kamut, spelt) sitting around my kitchen, and I'm getting bored with soups and salads.  Is it possible to use these in bread (yeast, preferably, but quick/tea breads are also okay)?    If so, what are the best approaches/ratios?  Should I cook them first?  Let them sprout?  Pointers to recipes would be greatly appreciated.


Website had been showing up in Google search for my popular keyword, but today it is not

One of my websites is listed in the Google index (1st page 4th position till yesterday) for the keyword "Mobile app development company".  Today I can't see my website in the first three pages of results (30 results) for the same keyword.  What may have happened? What is the reason behind it?


destructors of base and derived classes c++

I checked this code, and i saw that by the end of the function func()  the destructor of base class have been called twice. I dont understand why?? thank you..  class base  { public:     base(){cout << "ctor of base\n";}     ~base(){cout << "d-ctor of base\n";} }; class derived: public base  { public:     derived(){cout << "ctor of derived\n";}     ~derived(){cout << "d-ctor of derived\n";} }; void func(base ob) {     cout << "inside func\n"; } void main() {     derived ob;      func(ob);      system("pause"); }


I have installed Ask Ubuntu Lens on my 12.04 desktop some time back and I could see it in my installed applications from Ubuntu Software Center. But I cannot find it on the dash. How I can launch it ? I installed Alacarte hoping that I can see it there, but could not find it there either.  Note: I reviewed the question , but could not find answer to my specific question.


my machine already have cross compiler toolchain in a folder. how do I tell machine to compile using this cross compiler rather than the native compiler?


I have an ubuntu 14.04 box, Roku 3 and 50 inch TV and I want to cast my pc screen to the TV. The roku and pc are on the same network. Has anyone got a way to do this? Doesn't have to be a nice solution, just wondering if it's possible.


Let $f$ be entire in $\Bbb C$. If $Re(z)>0$ $\forall z \in \Bbb C$. Then prove that $f(z)$ is constant.  Please read below before marking duplicate.  If $Re(f(z))>M$ then taking $|\frac 1f|<\frac 1M$. Applying Liouville's theorem we are done. But if $Re(f)>0$ then can we conclude $|\frac 1f|<\infty$ & $\frac 1f$ is bounded so $f$ is constant. If it is so then comment otherwise give me some solution.


I am converting a high-dimensional model to a lower dimensional model by fitting a sliding window of it to a linear (parametric) model and looking at the evolution of parameter values over time.  I'm going from 6.3 million points to about 2500 values of 6 parameters.  Physics says the intercept should be a constant value, but when I use LM it moves around.  I think the motion is because of noise, and that it causes other parameter values not to indicate properly.  I would like to set it to a known constant value.  How do I make a linear model in R that has a prescribed intercept (not zero).  Current code:  for (i in 1:(n-k)){    fit <- lm(y ~ x1 + x2 + I(x3^2) + x4 + x5 + x6 , data=data[i:(i+k),])    #STORE PARAMETERS INTO VARIABLES ...  #truncated for brevity }   Code that doesn't do the job:    fit <- lm(y ~ I(9.81) + x1 + x2 + I(x3^2) + x4 + x5 + x6 , data=data[i:(i+k),])   fit <- lm(y ~ 9.81 + x1 + x2 + I(x3^2) + x4 + x5 + x6 , data=data[i:(i+k),])   Question:   How do I prescribe the constant? I tried searching for this both at google and CV - is there a vocabulary that I am missing? Can you comment on how something like AIC or R2 are impacted by this model? I prefer to use AIC or BIC and I think that, as model selection criteria they should account for parameters, but the R2 changes (I think) in a fundamental way between the two. I tried searching in CV for an answer to this question, but did not find it.  One alternate solution was suggested but its form is substantially different than what was requested.  It is about massaging the inputs, not about formatting the command without fundamentally altering the data. The answer that I liked (and found most useful) is about the form of the formula entered, not about creating new variables.    As usual, comments and suggestions are solicited.


I use Ubuntu Studio 20.04.2 LTS inside a 64 bit machine. I also use VirtualBox 6.1 which I used to create a Windows XP SP3 virtual machine. But, when I get in that virtual machine (WinXP), I cannot to read or write any from the Ubuntu mounted HDD partitions. I'm specially concern about the My documents folder (music, images, videos, etc.), because the WinXP virtual machine doesn't see that folder or HDD. What I did wrong? How can I get to read and write into the Ubuntu My documents folder when I am into the WinXP virtual machine?


I'm looking for some help with my Daily Work Log spreadsheet. I've search and read many different version of making a "TimeStamp" in Google spreadsheet. And it seems I don't have enough experience for it to work correctly. The time stamp script I am using updates every time my spreadsheet auto saves or something is changed.   Here's what I'm tring to do. I have work force of technicians.  Initials are AB, DD, RG, JW, RZ.   I want the spreadsheet to time stamp column N when they enter their initials in column M.    I know you can use the keyboard shortcut Ctrl + Shift + : to time stamp a cell. Is there a script I can use to do that action in column N when initials are entered in  column M?


I am trying to solve an exercise from Vakil's lecture notes on algebraic geometry, namely, I want to show that $\require{AMScd}$ \begin{CD}     X_1\times_Y X_2 @>>> X_1\times_Z X_2\\     @V V V @VV V\\     Y @>>> Y \times_Z Y \end{CD}  is a cartesian diagram. I think I've figured out where the maps come from: The lower map is the diagonal induced from the universal property of $Y \times_Z Y$, the upper map is coming from the universal property of $X_1\times_Z X_2$ (this is one of the previous exercises in Vakil's notes), the map on the right also comes from the universal property of $Y \times_Z Y$ since we have two maps from $X_1\times_Z X_2$ to $Y$ whose composition with $Y\rightarrow Z$ coincides, and finally the map on the left side is either composition $X_1\times_Y X_2 \rightarrow X_i \rightarrow Y$. At this point, I don't even see why this diagram should be commutative.  But even discarding the issue of commutativity, given some $T$ instead of $X_1\times_Y X_2$ making the above diagram commute, I have no clue how to obtain a canonical map $T \rightarrow X_1\times_Y X_2$.  I could solve all the other problems in this section of his notes, but this one eludes me. Any help or solution (preferably just using the universal properties that we're given) would be greatly appreciated.


Please see this question:   I've tried everything I can think of for the code to show up as normal.


I was trying to understand how matter falls into black holes, and I got confused by this thought experiment.   A small mass falls into a black hole (which negligibly effects the Schwarzschild radius) A sufficiently long time later (as measured by a distant observer) a large mass falls into the black hole The event horizon expands to engulf the smaller mass?   I realize this kind of reasoning is prone to misconceptions about simultaneity and the like, but I don't know how to think about it more rigorously. I also know that $g_{rr} \rightarrow \infty$ as $r \rightarrow r_s$ in the Schwarzschild metric.  In short: How does the event horizon grow when mass is added?


Auto.arima application in R with sub-daily data - No seasonality given

I'm working on a R code and my aim is to make forecasts with a model chosen by applying auto.arima function on my data. These are recorded every 6 minutes, so we're dealing with sub-daily data.   Time                  RMS    <dttm>              <dbl>  1 2020-05-01 00:00:00  5.2   2 2020-05-01 00:06:00  4.77  3 2020-05-01 00:12:00  4.99  4 2020-05-01 00:18:00  5.02  5 2020-05-01 00:24:00  4.57 # ... with 5,750 more rows  I have 10 measures per hour, so 240 observations per day. I converted this dataframe in both xts or ts object, with frequency = 240, since I would like to show a daily seasonality. When I use xts() and auto.arima, seasonality is not captured, and it returns this model instead: Series: new_series ARIMA(2,0,1) with non-zero mean   Coefficients:          ar1      ar2      ma1    mean       1.3250  -0.3340  -0.6808  4.5282 s.e.  0.0265   0.0258   0.0205  0.1678  sigma^2 estimated as 0.1305:  log likelihood=-2306.56 AIC=4623.11   AICc=4623.12   BIC=4656.41  While, when I use ts() with frequency 240 and auto.arima() it gives me this error: Error in polyroot(c(1, testvec)) : root finding code failed   Could this be related to the fact that ARIMA models do not work with sub-daily data and multiple seasonalities? Is there a way to extract daily and sub-daily seasonalities with auto.arima command? Thank you in advance.


SET ARITHABORT, .NET, and explanations inconsistency?

A few days ago I happen to have stumbled on a lot of cases in a new DB I've been given where ARITHABORT set to OFF literally devastate performances. Being my first time facing this specific problem I tried to read as much as possible about it, but I still have some hard time building a definitive picture.  The evidence:   ARITHABORT is one of the parameter that is officially documented by MS to be used in the choice of the plan to use Plans created with ARITHABORT set to ON and set to OFF are clearly different All versions of SQL Server ships with ARITHABORT set to ON Microsoft recommends to keep it always set to ON  .NET always set it to OFF, which can, and do, leads to some horrible performances    Aside from wondering why .NET always set it to OFF, the matter would look quite settled, and thus I'd proceed to explain it to my tech leader, and that we need to set it back to ON every time we open a connection to the server.  But then, it seems there are quite a few voices advocating the contrary, one especially is linked in the second answer to this question:    I've tried to go through the entire document, but he lost me quite quickly, especially in the part where he says that ARITHABORT is un-influent when compatibility lever is set at 80 or more, which is not clearly the case. And he lost me even more when, like many others, seems quite firm on stating that Microsoft documentation is wrong about the importance of the ARITHABORT parameter. On top of that, he suggests that if the SP is a lot slower when run from code and it's extremely faster when run from SSMS, the fault is in the SSMS and we should instead correct this one so that it set ARITHABORT to off.  Quite honestly...I'm a little lost. Is there some definitive evidence about the entire stuff?  Should we always force .Net to use ARITHABORT set to on, accordingly to with what the company who produce SQL Server says, or what?


Using a custom keyboard layout without being administrator in Windows

I am used to typing in the "Programmer Dvorak" keyboard layout. To be able to install it, you need administrative rights, making it impossible for me to use it at school. My school runs an XP-enterprise network so I thought that there should be a way to install the layout to my roaming profile, which should not require Administrative rights and would allow me to use this layout, however this has not been the case.  I tried to ask IT to install it for me, but they refused because they deemed it unnecessary software.  I can compile the source code into the dll, but I don't know if it is possible to tell windows to use it as a layout, and if so how. Does anyone know?


Get the selected label value for inputSelect

Is it possible to return the label value of the selected option using an inputSelect? <ui:inputSelect label="Staff Package: " class="dynamic" aura:id="staffPackageInputSelect" change="{!c.onStaffPackageSelect}"/> Controller: onStaffPackageSelect: function(component, event, helper) {     helper.getSelectedFilteredPicklistOption(component,event); }  Helper: getSelectedFilteredPicklistOption: function(component, event) {     var selectedItem = event.getSource().get("v.value");     component.set("v.selectedFieldValue", selectedItem); }  I've got the value, but I also need to get the selected label value.


Reduce spacing in bibliography using biblatex

How can you control (in my case reduce) the spacing of the bibliography in biblatex? I used to use   \begin{spacing}{0.9} \bibliographystyle{plain} \bibliography{refs} \end{spacing}   and  \setlength{\bibsep}{0.0pt}.  But how do you do the equivalent in biblatex?  EDIT: I should maybe have mentioned I am using   \begin{refsection}  \printbibliography[heading=subbibliography]  \end{refsection}  [..]   \begin{refsection}   to get multiple bibliographies and I would like to be able to control the spacing per bib.  \printbibliography[heading=subbibliography]  \end{refsection}


Can I boot Ubuntu Mobile OS without fully wiping my phone?

I really want the Ubuntu mobile OS but scared my mobile might not be able to handle it.  I have the HTC Desire 310 and it's on the Vodafone network (UK), is there way I can test run it on my phone without actually replacing my Android OS entirely and will it be able to connect via data transfer (so not WiFi)?


How to get local machine ip using python script

I try to get local machine ip using python script. And try to open a file from another machine using machine ip. how to get.


Is there a way to search for the cheapest flights regardless of date?

I find myself basing my trips on whenever there's a cheap flight, rather than setting a specific date to have a vacation.  However, it makes it hard for me to do this if I can't search for the cheapest flights regardless of date.  Is there a way to do this?    Edit :  I'm from Australia and Australia-specific or international suggestions will both work. However, for the sake of this question as a generic one, I would ask for you to leave any tools you know of regardless of origin, so it might help future viewers.


Get the latest added line of opened file

file = open('file.txt', 'r') say = file.readline()   can I get the last line added by another process to this file without close/reopen it ??


Can a spell storing ring give a whole party Greater steeds?

This came up in a game the other night, it seems broken but I can't find anything that says it's not allowed.  A party member has "Find Greater steed" and casts it into a spell storing ring. Another party member then attunes, casts from the ring, and has their own Pegasus.  Repeat for the whole party and now they all have their own Pegasus to ride, until they dismiss it/it dies.    Obviously this assumes they have time to repeatedly re-attune and regain spell slots, but still seems a little OP. Have I missed something?


Why are we not able to move at the speed of light again?

In many many answers here and papers everywhere, it's often stated that no object can move faster than light.  Why is that again?


When calculating the size of a float array it prints a size of 2 instead of 41 in C

I filled up my array with the following elements:  91.54 -96.58 -5.14 -78.25 15.33 89.34 -12.76 -92.56 38.21 36.11 -43.83 48.39 79.57 34.34 -26.07 -10.47 54.37 9.06 -67.17 53.83 -8.13 89.71 85.77 -68.44 -88.22 -86.24 -5.44 53.32 75.62 51.08 -80.42 91.94 33.5 -29.44 70.33 70.56 -66.75 10.41 92.84 -33.14 -0.34   The last element of my array is the sum of all of these float values.  And I want to print the number of elements with the sizeof technique.  #include <stdio.h> #include <stdlib.h>   int main(){      FILE *f = fopen("floats.txt", "r");     float *V, num, sum = 0;     int i = 0;     V = (float *)malloc(sizeof(float));      while(fscanf(f, "%f", &num) == 1){         i++;         V = (float *)realloc(V, i*sizeof(float));         V[(i-1)] = num;         sum += num;     }      i++;     V = (float *)realloc(V, i*sizeof(float));     V[(i-1)] = sum;      /*printf("%f\n", soma);     printf("%f\n", V[(i-1)]);     printf("%f\n", size);*/      printf("%ld\n", sizeof(V)/sizeof(V[0]));     printf("Sum = %f\n", V[sizeof(V)/sizeof(V[0]) -1]);     return 0;  }     The number of elements must be 41 but it is printing 2 and the Sum must be 375.779999 the last element stored in the array.  Why is this printing 2 instead of 41? That is my main question!


What is the easiest way to duplicate an activerecord record?

I want to make a copy of an ActiveRecord object, changing a single field in the process (in addition to the id).  What is the simplest way to accomplish this? I realize I could create a new record, and then iterate over each of the fields copying the data field-by-field - but I figured there must be an easier way to do this. Perhaps something like this:  new_record = Record.copy(:id)


Broadcom Wireless won't install at all! 12.04.3 Ubuntu Desktop

BroadCom BCM43227 802.11b/g/  ifconfig shows only eth0 and lo. No wlan0 shows.  I need this problem fixed soon, because I need to be able to take this laptop to do my work.  I tried all of the options on this:   I've installed kernel source, and tried reinstalling the b43, but none of it takes effect. I can't be sure, but I've probably tried it with turning my laptop on for wifi. It has a button to turn it on and off, but it should auto enable with "enable networking".  But, I still can't install any drivers, nor can I get access to my WiFi. My laptop is right next to the router by Verizon. It is fast enough and I have accessed wifi through my Windows OS. But I can't get it to work on this OS.  I'm sorry, I'm really confused about everything. I'm also pretty new to Linux.


Lenovo y40 will not allow me to install ubuntu

I have a Lenovo y40.   intel i7 8gb memory 250 ssd hardrive AMD Radeon R9 M275 grapchis card windows 8.1 upgraded to windows 10 (did a fresh install)   I've tried to install Ubuntu 14.04 from USB, setup on pendrive and I also tried rufus. I've read similar questions and have tried all the answers. turned of secure boot, tried legacy mode in bios, etc ... followed different guides to the T. I haven't disabled SRT, but there seems to be no option for it in the Lenovo BIOS.  Here is what happens: I boot up the usb,  I have the option to try or install. I've tried both with the same results. Ubuntu loading screen comes on, and then after 30 seconds or so, it gives me this error: (initramfs) Unable to find a medium containing a live file system.  I've tried it on another pc and it all works fine.


USB-C Dongles killing Wifi on 2016/2017 MacBooks – Who’s to blame?

I recently switched from my beloved MacBook Pro Retina (Late 2013) i5 2.6/16/512 to MacBook Pro (2017) Non-TB i5 2.3/16/512.  I purchased what from the build-quality looked like a good USB-C-to-DisplayPort cable with 4k/60Hz support, just to run into the very problem the Logicboard repair guru Louis Rossmann had described in : As soon as you plug in the USB-C dongle, the (2.4 GHz) Wifi stops working despite full antenna signal. Unplug the USB-C connector and you are immediately back in the game.  The big question I'm asking myself now: Who is to blame? Is this a design flaw in the current generation MacBooks with improper shielding or is it a design flaw in the various dongles?  I mean the fact that even Apple’s very own USB-C Digital AV Multiport Adapter is causing these WiFi issues (as you can learn from the many horrific ; but AFAIK have been fixed through a ), show that there’s something going horribly wrong.


Properly discontinuous actions and discrete groups in complete Riemannian manifolds.

I was reading the article "The Geometries of 3-manifolds" by Peter Scott and in the end of page 406 he states the following:     If $G$ acts properly discontinuously on a space $X$, then $G$ is a   discrete subset of the space of all continuous functions $X \to X$   with the compact-open topology. The converse is false, in general, but   is true if $X$ is a complete Riemannian manifold and $G$ is a group of   isometries of $X$.   How do I prove the last statement?     If $X$ is a complete Riemannian manifold and   $G$ is a group of isometries of $X$ acting properly discontinuously on $X$, then $G$ is discrete.    Observation: We say a group $G$ of homeomorphisms of $X$ acts properly discontinuously on $X$ if for every compact $K \subset X$ the set $$\{g \in G: gK \cap K \neq \emptyset\}$$ is finite.


Why is there a relationship between copied arrays?

I need some help understand why a relationship is created between arrays when I replicate an array by reference. Take the following example:  let a = [1,2,3]; let b = a; b.push(4); console.log(b); // [1,2,3,4] console.log(a); // [1,2,3,4] a === b; // true   For some reason, {a} changes when I modify {b}, when I expected them to be independant arrays.  This kind of relationship is not true for variables, it appears. Take the following example:  let a = 'test'; let b = a; b = 'test1'; console.log(b); // "test1" console.log(a); // "test" a === b; // false   Does anyone know the reasoning behind the behavior for arrays?


MySQL - please help fix a mistake in the query

I have three tables, many-to-many relation:   BOOKS          CREATE TABLE `books` (           `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,           `title` VARCHAR(100) NOT NULL,           `condition` ENUM('mint', 'new', 'medium', 'poor', 'needs replacement'),           `date_added` DATE          ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;  AUTHORS          CREATE TABLE `authors` (           `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,           `name` VARCHAR(50) NOT NULL,           `pseudonim` VARCHAR(50) NOT NULL,           `year_of_birth` INT(4) NOT NULL         ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;  AUTHORS_BOOKS table:         CREATE TABLE `authors_books` (           `author_id` INT(11) UNSIGNED NOT NULL,           `book_id` INT(11) UNSIGNED NOT NULL,         PRIMARY KEY (`author_id`, `book_id`),          CONSTRAINT `fk1_authors_authors_id` FOREIGN KEY (`author_id`) REFERENCES `authors` (`id`)          ON UPDATE CASCADE ON DELETE CASCADE,           CONSTRAINT `fk2_books_book_id` FOREIGN KEY (`book_id`) REFERENCES `books` (`id`)          ON UPDATE CASCADE ON DELETE CASCADE         ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;    What I am trying to make is to fetch data containing the following info:   book id book title,  author's name   My query does not return the relevant data, I probably have missed the correct join somewhere, but as I see, the biggest problem is in my understanding. I would appreciate if anyone could check the consequence of things to be done as I see it:   specify the exact columns I need in my view:   SELECT b.id, b.title, a.name FROM books as b    join the pivoting table on book_id:   INNER JOIN authors_books as ab on b.id = ab.book_id    Since I need the names of the authors, I am making one more join to bring into the game the authors table:   INNER JOIN authors AS a ON ab.authors_id = a.id   So in the end I have the following query  SELECT b.id, b.title, a.name FROM books as b INNER JOIN authors_books as ab on b.id = ab.book_id INNER JOIN authors AS a ON ab.authors_id = a.id   that returns me an incomplete list of books skipping most of them. I can't get how does it happen. Where is the mistake I am making, what concept am I missing?


Is there a way in Python3 to dynamically build function argument names?

I am searching for a tip/technique to dynamically build function argument names when calling a method:  I have a function which is using dynamic arguments that later are posted to a Webservice using http:  def create_case(**fields): ...   Currently, I call the function like this:  create_case(field54=first_name,             field_1003=last_name,             field_948=street)   Since I have multiple instances of the Webservices, which have different field ID's I try to put those argument names into a configuration file and build them dynamically. All my current tries were not successful and I ran out of ideas on how to approach this.  What I tried:  config.py:  FIELD_FIRST_NAME=54 FIELD_LAST_NAME=1003 FIELD_STREET=948   client.py:  create_case(field_+config.FIELD_FIRST_NAME=first_name,             field_+config.FIELD_LAST_NAME=last_name,             field_+config.FIELD_STREET=street)   It seems, it's not possible to just concat the arguments together. Does anyone have a suggestion on how I could go on this ?  Best regards


Schengen visa requirements for traveling on a European Disney Cruise?

Do I need a single entry or a multiple entry Schengen if I am travelling on a Disney cruise that starts in Barcelona and then calls on ports in France then Italy?


In my application, I need to generate excel files on the fly. I have an option of using Excel  library. But it is mandatory to have excel installed on the machine.  Is there any other .NET API to generate excel files at runtime which doesn't require excel.


Good way to obfuscate Javascript code in Gulp

This question knowing that obfuscation is by no means a strong way to protect code...  Using Gulp, I'm looking for a way to prevent my app's content to appear in a too obvious manner. Not manipulating sensitive data, but I'd still not want my minified code to look too obvious to modify.  Been trying gulp-minify and gulp-uglify, but either my use of them is wrong, either they don't fill my need.  Needs being: - function renaming - variable renaming - string obfuscation (at least prevent the string from being human readable at first glance) - not more than 2x the storage needs  What would be the suggested approaches, leads, plugins?  Thanks in advance,


What makes something qualify as a ground?

I'm curious to what makes something qualify as a ground? I do some electrical work on my car. And the way I understand it, is that the chassis of the car is used as ground because it's such a big metal piece that the chassis doesn't build up enough charges to be considered charged. Therefore it's a 'zero potential'.   But how big does the metal object have to be, compared to the (e.g.) battery it's connected to. In other words, what makes the metal object qualify as a ground?  The reason for asking this question is because in many instructions I am told to "connect the other wire to a ground", and I keep asking myself: Well, what is a ground, and what is not?


Ubuntu open to black screen with blinking underscore character after release upgrade

I upgraded my Ubuntu OS from 12.10 to 13.04 and after the process of upgrading it via Software Updater, it requested me to restart the computer. I rebooted and on boot I proceeded to a purple screen with Ubuntu text and 5 dots below it and continued to a blank black screen with a blinking underscore character (_).  I have all my files in there and I can't access them. I tried the grub boot menu edit that other questions pointed out, but it didn't seem to do anything.


Convergence of the fixed point iteration for sin(x)

Sin(x) converges at x=0 as can be seen with a graphical illustration. When attempting the fixed-point iteration for sin(x) on a computer, the number gets closer and closer to zero but it does not display zero. How can we explain this?  For n = 1000000 (10^6) iterations  sin(x) using Float: 0.0017321599  sin(x) using Double: 0.0017320423900648602  For n = 10000000 (10^7) iterations  sin(x) using Float: 5.589425E-4  sin(x) using Double: 5.477222534834344E-4


How to ask politely to a potential supervisor?

I have some initial conversations related to the scope of the research area with my potential supervisor. I took a course with him as well. He knows me well too. I asked him to supervise me in my first e-mail. He did not tell me his opinion though. However, I am not sure he will take me or not as thesis student. How can I ask him politely to know about his consent to supervise me? I appreciate your help!


Prove that if $x$ and $y$ are rational numbers and $y\ne 0$, then $x/y$ is a rational number

Prove that if $x$ and $y$ are rational numbers and $y\ne 0$, then $\frac{x}{y}$ is a rational number.   How do I prove this, and also which proving method would I use? I'm confused between that and also which definition to use in the proof.


I am new in latex and I need to express the following symbols:  &, &&, ^, | , || , <, <=, >, >= , == , != , %   When I write them in that way, nothing happens on the document. Please help.  best regards,


gnome-terminal hides ending characters of the current path's first row

I'm using Ubuntu-18.04.2's original ~/.bashrc file and I have done no changes in any original files. Do Ubuntu 18.04.2 users experience the problem I'm going to describe to you down below? Let me know, please. I've noticed weird behaviors by varying either the current path's length or the gnome-terminal's width. I'll give you an example (I use the character | to indicate the window's right border): username@hostname:/directory/directory/directory/dire  | ory/directory/directory/directory$                     |  As you can see, at the first row, Ubuntu terminal hides the string "ct" of the word "directory"; the other rows are fine. I said the string "ct" is hidden because, if I resize the window width, that reappears but other two characters are hidden. For example: username@hostname:/directory/directory/directory/di  | ctory/directory/directory/directory$                 |  This time the string "re" is hidden. The problem always occurs at the first row! I've done some experiments and noticed different "weird" behaviors by varying either the current path's length or the window width. I can identify five cases:  If the current path's length is short, I might resize the window width but every row would be still fine (no hidden characters at any rows);  if I increase the length of a little bit (for example adding a directory), the first row's last character is hidden;  If I use cd .. command to return untill the point 1 length and resize the window enough to make the path takes more than one row, five characters are hidden (same length but different behavior);  By varying the window width, part of the row is overwritten as in the following examples: ........ m$ rname@hostname:/directory/directory/directory/directory  | $ ername@hostname:/directory/directory/directory/directory |   In the first example, the substring "use" is deleted and the character 'm' appears out of nowhere! The second example occurs if I shorten the window width a little bit: as you can see the substring "us" is deleted. In both cases, gnome-terminal lets me write commands over that line which would be deleted as I type.  If I'm inside a directory with a short name such as /usr or /home, the problem doesn't occur because I can't shorten the window enough. However, If I create a long 1st-level directory (e.g. /directorydirectorydirectorydirectorydirectory), I get the following behaviors by resizing the window width: username@hostname:/directorydirectorydirectorydirectorydirector | m$ username@hostname:/directorydirectorydirectorydirectorydirecto | $ username@hostname:/directorydirectorydirectorydirectorydirect | $ y username@hostname:/directorydirectorydirectorydirectorydirec | {square box with 0010 inside}[[00m$ username@hostname:/directorydirectorydirectorydirectorydire | $ ory username@hostname:/directorydirectorydirectorydirectorydir | y$ ory username@hostname:/directorydirectorydirectorydirectorydi | ry$ or username@hostname:/directorydirectorydirectorydirectoryd | ory$ o username@hostname:/directorydirectorydirectorydirectory | tory$     $ grep PS1 ~/.bashrc PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"  $ printf '%q\n' "$PS1" \\\[\\e\]0\;\\u@\\h:\ \\w\\a\\\]\$\{debian_chroot:+\(\$debian_chroot\)\}\\\[\\033\[01\;32m\\\]\\u@\\h\\\[\\033\[00m\\\]:\\\[\\033\[01\;34m\\\]\\w\\\[\\033\[00m\\\]\\\$\   $ printf '%q\n' "$PROMPT_COMMAND" ''   $ locale LANG=it_IT.UTF-8 LANGUAGE=it:en_US:en LC_CTYPE="it_IT.UTF-8" LC_NUMERIC=it_IT.UTF-8 LC_TIME=it_IT.UTF-8 LC_COLLATE="it_IT.UTF-8" LC_MONETARY=it_IT.UTF-8 LC_MESSAGES="it_IT.UTF-8" LC_PAPER=it_IT.UTF-8 LC_NAME=it_IT.UTF-8 LC_ADDRESS=it_IT.UTF-8 LC_TELEPHONE=it_IT.UTF-8 LC_MEASUREMENT=it_IT.UTF-8 LC_IDENTIFICATION=it_IT.UTF-8 LC_ALL=


Perform PCA. Extract PCs. Can one then tell what the most important _original_ features were, from the PCs?

Suppose that you have 1000 features, and a data set made up of say, 50,000 points. Suppose then that we perform PCA, and we extract the top 5 PCs, since they explain 99.99 percent of the variance, and thats all we care about.  From those top 5 PCs, can we 'go backwards', and be able to decipher, what the most 'important' features were from the original 1000? For example, can we answers the question, "What combination of my original 1000 features were responsible for my top PC?"  Thank you.


I have a raco double two device gang box in one of my rooms. I found that a couple of those holes are stripped. Is it better to trying to tap it at 6/32 again, go to the next size which is 8/32 (tremendous difficulty finding 8/32 screws that are painted white or maybe i have to paint them) Or replace the box? What would you suggest?


When import OBJ the edge becomes 'strong'

when I import OBJ file. The edge becomes 'strong'. some edges are good, but most of them are like this in picture.


Analogy of Pearson correlation for 3 variables

I am interested in whether or not a "correlation" of three variables is something, and if what, what would this be?  Pearson product moment correlation coefficient  $$\frac{\mathrm{E}\{(X-\mu_X)(Y-\mu_Y)\}}{\sqrt{\mathrm{Var}(X)\mathrm{Var}(Y)}}$$  Now the question for 3 variables: Is    $$\frac{\mathrm{E}\{(X-\mu_X)(Y-\mu_Y)(Z-\mu_Z)\}} {\sqrt{\mathrm{Var}(X)\mathrm{Var}(Y)\mathrm{Var}(Z)}}$$  anything?  In R it seems like something interpretable:  > a <- rnorm(100); b <- rnorm(100); c <- rnorm(100) > mean((a-mean(a)) * (b-mean(b)) * (c-mean(c))) / (sd(a) * sd(b) * sd(c)) [1] -0.3476942   We normally look at the correlation between 2 variables given a fixed third variable's value. Could someone clarify?


I think it might be time to consider breaking up stackoverflow into several different sites. I just posted a JS question. I never even saw it on the first page. As soon as it's off the first page, the views just stop. There's simply way too much traffic. You guys really need to do something because honestly the site is basically useless to me. The quality of posts can only go down from here. If you just broke-out JavaScript alone that would cut the traffic in half.


When the sum of independent Markov chains is a Markov chain?

I try to find as much as possible cases, when the chain $Z(t) = |X_1(t)-X_2(t)|$ is Markov, where $X_1(t)$ and $X_2(t)$ are independent, discrete-time and space, preferably non-homogeneous Markov chains. I started to search for the sum of independent Markov chains and I found this statement in Stoyanov J. - Counterexamples in Probability (2ed., Wiley, 1997)(p.229, one can google it and find in google books):     ... the sum of two Markov processes need not be a Markov process. Note, however, that that the sum of two independent Markov processes preserves this property.   That seems very strange to me and I wish to find the proof or at least the statement elsewhere.    EDIT: The way of thinking how it may look like for a sum of two independent Markov chains (If I want to prove that the sum of two independent Markov chains is again a Markov chain):  Let $Y(n) = X_1(n)+X_2(n)$. Then  $P(Y(n+1) = i_{n+1} \ | \ Y(n) = i_n, ..., Y(0)=i_0) =$  $= P(X_1(n+1)+X_2(n+1)=i_{n+1}\ | \ X_1(n)+X_2(n)=i_n,...,X_1(0)+X_2(0)=i_0)=$  $=/ (?) / = \sum_{j+k=i_{n+1}}P(X_1(n+1)=j,X_2(n+1)=k \ | \ \cdot)=$  $=/\text{X's are independent}/ = \sum_{j+k=i_{n+1}}P(X_1(n+1)=j \ | \ \cdot)\cdot P(X_2(n+1)=k \ | \ \cdot) = $  $= /\text{Markov property + (??) } / =  \sum_{j+k=i_{n+1}}P(X_1(n+1)=j \ | \ X_1(n)+X_2(n)=i_n)\cdot P(X_2(n+1)=k \ | \ X_1(n)+X_2(n)=i_n)=$  $=P(X_1(n+1)+X_2(n+1)=i_{n+1} \ | \ X_1(n)+X_2(n)=i_n) = P(Y(n+1)=i_{n+1}\ | \ Y(n)=i_n)$.  Here I am uncertain about (?) and (??) steps.


Prove you can weigh any number between 1 and $\frac{3^{n+1} -1}{2}$ using $n+1$ weights - Discrete

You have $n+1$ weights, with each weighing $1,3,9, \dots, 3^n$  (one of each)  Prove that you can weigh with a traditional scale ( The one with two bowls) each integer weight between  $$1 ~~~~~\text{And }~~~~~\frac{3^{n+1} -1}{2}$$     My go: This was very confusing to me because I did not understand well how you can possibly weigh, let's say $4$ (Maybe it's just putting $1+3$ ?)    I tried proving using induction:     If $n=0$ then we have $1$ weight weighing 1, and so we can weigh $\frac{3^1 -1}{2} ~~~ \text{And} ~~~ 1 = 1$  which is obvious.   Assume you have $n+1$ weights and you can weigh each integer between $1$ and $\frac{3^{k+1} -1}{2}$  Now we prove for $n = k+1$ so: $1$ to $\frac{3^{k+2}-1}{2}$ using the fact we can weigh $\frac{3^{k+1} -1}{2}$ However I am stuck from here, I am clueless on how to use the fact we now have a weight of $1,3,9,\dots,3^k,3^{k+1}$      This seems like a known question, but I could not find anything on the web! Thank you!


I currently have Windows 7 on my computer and I want to install Ubuntu alongside Windows safely.  Could someone please provide clear instructions?


How do I add text to the beginning of a file in Bash?

Hi I want to prepend text to a file.  For example I want to add tasks to the beginning of a todo.txt file.  I am aware of echo 'task goes here' >> todo.txt but that adds the line to the end of the file (not what I want).


Word for “someone who makes a little go a long way”

I’m searching for a word (a noun, ideally) that means someone who manages to make a little go a long way, or who manages to do a remarkable job given very little resources.    Specifically, I am envisioning someone who is teetering on poverty but can still put together a feast on short notice, or who can make a fancy dress out of rags, etc.  If the word exists, it may actually be a loanword to English from immigrant and diaspora communities, but if so I’m not aware of it.  Sample sentence:     Camille was on a fixed income, and a small one at that, but she was a ????, and with a keen eye for things no one else wanted and an ingenuity for making the most of very little, she sewed herself stunning dresses and once a month managed to throw a banquet for her friends and neighbors.   (Not a great sentence, but conveys the sense of the word I’d want.)


What is the fundamental group of $RP^{2}$ # $\cdots$ # $RP^{2}$

I want to know about fundamental group of $RP^{2}$ # $\cdots$ # $RP^{2}$ by Seifert-Van Kampen theorem.   In my guessing, that is $\langle a_1, a_2 ,... a_n | a_1^{2}a_2^{2}\cdots a_n^{2}=1\rangle$.  Is this correct?


Is synchronized around private final Object instance a better way than synchronized class instance itself?

I was wondering, when designing a class which is safely accessed by multiple threads, is using synchronized around object instance itself, a good practice?  public class Foo {     public synchronized void fun() {             } }   One of the side effect is that, when caller uses the class instance in the following way, it will blocks other threads from accessing foo.fun()  Caller tries to use the class instance as thread monitor  Foo foo = new Foo(); // This will have side effect, which blocks other threads from accessing foo.fun() synchronized(foo) { }     I was wondering, is using a private final Object instance as internal thread monitor in Foo class, a safer & better way?  public class Foo {     public void fun() {                 synchronized (monitor) {         }     }     private final Object monitor = new Object(); }


I've lost my follower I told her to wait and forgot about her it said "Follower tired from waiting and left" I've checked the shrine of Azura where I found her, both my homes, the bannered mare, winking Skeever, and where I left her I still cant find her


How do I write a python program that takes my name as an input and gives the letters of my name as an output, each in a new line

I have somewhat written the program but still there are some issued while executing it, I'm in 7th standard and I don't know much about how to exactly make it work, please help. name = input('Enter your name: ') print(name[0]) print(name[1]) print(name[2]) print(name[3]) print(name[4]) print(name[5]) print(name[6]) print(name[7]) print(name[8]) print(name[9]) print(name[10]) print(name[11]) print(name[12]) print(name[12]) print(name[13])  The problem is that when I run this program and if the letters are less than 13 it gives an error, how can I prevent this?


Can I download and install Blender outside of Steam?

I currently have a falling out with Steam over a customer service issue. As a Blender subscriber (gold member), can I download and install outside of the Steam universe?


I never understood this asymmetry. You can up-vote all you want (well, up to some daily limit), but down-votes are discouraged by decreasing your rep.   If we're worried about down-vote abuse, then a daily limit would fix that most likely.  But why punish someone for rating a poorly written question as such? With this policy people are more likely to vote to close a question (it's free).


Merge without dissolve in ArcGIS for Desktop?

I am trying to merge several polygons in a feature dataset into one. Normally I would use a simple merge but the issue is that merge automatically dissolves. I on the other hand want to have them all represented by one single record, but maintain their existing boundaries.The top image is what happens. But the bottom image is what I want. As mentioned originally the left would represent by two separate selectable polygons and the right is the output being one record/one selectable polygon.


Am I considered in debt if I pay a mortgage?

75% of Americans are in debt. I'd like to know if I'm also considered in debt if I am paying my mortgage on a house.  I didn't think I was in debt if I own the house. I guess I pay 'rent' to a bank who sold the mortgage to me. If I stop paying, I lose the house I never 'owned'.  So what is the reality? Are people considered in debt if their only 'debt' is the mortgage/loan for their house, or are these people excluded from the statistic?


well in Terraria my nurse died but I don't know how to get her back and someone moved into her house! And I looked up stuff but they never talk about the nurse at all, and she died in a goblin army.


Mathematical books to become a successful mathematical physicists

My understanding of algebraic topology and Riemannian geometry come from Nakahara's Geometry, Topology, and Physics, which I do not think is sufficient. I am first year PhD student, and I want to do string theory at my university. Can you recommend me any other really nice books that I should read over the years.


What is the reason for having '//' in Python?

I saw this in someone's code: y = img_index // num_images  where img_index is a running index and num_images is 3. When I mess around with // in , it seems to act just like a division sign (i.e. one forward slash). I was just wondering if there is any reason for having double forward slashes?


Are there any Pre-Paid SIM cards available for Tourists in Brazil?

Are there any providers offering Pre-Paid SIM cards to tourists in Brazil?   Looking for a SIM (Micro actually) to use in an unlocked Quad-Band phone while travelling in Brazil. It would be best if it could be pre-paid cash as to not need a credit-card (so far my Canadian cards have all failed to work in Brazil), nor do I have one from Brazil.  It would be really good if the pre-paid plan also supported data, in addition to voice calls and SMS.  All providers I found require a Brazilian identify and I do not have one since I am not a resident there.


Why the JS var round a 17 digits number?

I don't understand why JS round me a 17 digits var.   var foo = 89383122683146257; console.log(foo); // result is 89383122683146260   same result with a .toString() That make me crazy. Please, help


Stop generating "possible duplicate" comments

When a question has pending close votes, the system now adds a banner indicating that the question might be a duplicate:    But the first user to vote still generates a possible duplicate comment:    Those comments were always a hack, just like editing the link into the top of the post. The banner eliminated the need for the latter; can we stop generating those comments too?


How can I hide my site information in Alexa? Will it be done by blocking the robot?

I try to hide my site information from Alexa or not show some country-specific information. How can I do this? Will this be done by blocking the Alexa robot or do I have to do something else?


When a star dies it explodes in a supernova. This happens when heavier elements like iron is fused in the core of the star. Then the star collapses under its own gravity. This leaves a black hole behind. Now in order to conserve momentum the star must spin. So does a black hole spin? If so at what speed does a black hole spin?


I picked up a pork sirloin roast yesterday, it's a little over three pounds.  I've never cooked one of these before and I am not sure what to do.  My seasoning plan is salt, pepper, thyme, and rosemary, and I might poke a couple holes for cloves of garlic as well.  My cooking plan is 8+ hours in the crock pot on low, with about an inch of water in there.  Will this turn out OK?  I'd like a tender and moist result, obviously.  Any tips would be greatly appreciated.


Names on ticket are in different order than on proof of ID - can I still get past airport security?

I will be traveling in 15 days on a domestic flight.  My name on the ticket is SECONDNAME FIRSTNAME LASTNAME but on my proof of ID it is like FIRSTNAME SECONDNAME LASTNAME.  Will the security allow me into the airport? Will there be any problem with the airline people?


Quantum entanglement links particles through time, according to this study that received some publicity last year:    at   S.J. Olson, T.C. Ralph, Extraction of timelike entanglement from the quantum vacuum,  S.J. Olson, T.C. Ralph, , Phys. Rev. Lett. 106, 110404 (2011)     Timelike entanglement may be regarded as a non-classical resource in a manner analogous to the spacelike entanglement that is often studied in the Minkowski vacuum, since any quantum information theoretic protocol may utilize conversion of timelike entanglement to spacelike entanglement as a step in the protocol.      I have read all the reviews in the popular press, most of the "time-travel-discovered" type, but I am looking for more sober comments, i.e. material written by physicists who have studied the paper. What does this result really mean? I would appreciate pointers to reviews, comments etc.


DNS how to dynamically bind subdomains to ip and port pairs

I'm using bind9  I have a zone file setup with a few subdomain A records. I'm wondering if I can create a subdomain record that points to an ip address on a specific port.  I'm currently updating the zonefile dynamically. I'd need some service with an API that can handle an infinite amount of subdomains. Also need to map udp and non http tcp ports.  I think I might need to use ip tables?


How to avoid "Exception in thread "main" java.util.ConcurrentModificationException" error in Java

I am trying to calculate Standerd Deviation,mean avarage etc. I am trying to write below code. but it thows exception  java.util.ConcurrentModificationException.I am tryng to fix it but faild.  My code:  package statistic;  import java.util.*;  public class StanderDeviation {      public static void main(String[] args) {          System.out.println("step 1:create a list of 10 numbers :");          List<Double> numbers = new ArrayList<Double>();         numbers.add(23.0);         numbers.add(92.0);         numbers.add(46.0);         numbers.add(55.0);         numbers.add(63.0);         numbers.add(94.0);         numbers.add(77.0);         numbers.add(38.0);         numbers.add(84.0);         numbers.add(26.0);         System.out.println("\n " +numbers);          System.out.println("step 2: average  of 10 numbers : ");          double sum = 0;         for(double number : numbers)         {             sum= sum +number;         }         double average = sum / numbers.size();         System.out.println(sum + " / " + numbers.size() + " = " + average);          System.out.println("\nstep 3: difference between each number numbers and average :");          List<Double>listOfDifferences = new ArrayList<Double>();         for(double number : numbers)         {             double difference = number - average ;             listOfDifferences.add(difference);             System.out.printf("%2.2f", difference);             System.out.printf(" ");          }            System.out.println("\n\nstep 4: Square of above calculate difference :");          List<Double> squares = new ArrayList<Double>();         for(double difference : listOfDifferences)         {             double square = difference * difference ;             listOfDifferences.add(difference);             squares.add(square);             System.out.printf("%4.2f", square);             System.out.printf(" ");          }         System.out.println("\nstep 5:sum of Square   calculate above :");          sum = 0;         for(double number : squares)         {             sum += number ;          }         System.out.println(sum);         System.out.println();          System.out.println("step 6: divide sum of Square by totle (numbers)-1 :");          double result = sum / (numbers.size()-1);         System.out.printf("%4.2f", result);         System.out.println();          System.out.println("\nstep 7: Stander Deviation is the Square root of obove result :");          double StanderDeviation = Math.sqrt(result);         System.out.printf("%4.2f", StanderDeviation);     } }   And here is the exeption error  Exception in thread "main" java.util.ConcurrentModificationException     at java.util.ArrayList$Itr.checkForComodification(Unknown Source)     at java.util.ArrayList$Itr.next(Unknown Source)     at statistic.StanderDeviation.main(StanderDeviation.java:50)   Thanks in advance.


I was recently making a standard deviation calculator for schoolwork in java, but I found a few problems with double. Because I wanted the answer as precise as possible, I used double instead of int or float, but the response was weird on few occasions. This is an example:  public class tryTest {     public static void main(String[] args)     {        double a = 0.1;        double b = 0.01;        double c = a-b;        System.out.println(c);      } }   The response should be .09, but it returns  0.09000000000000001   Why, and how should I fix this? Am I the only one with this problem?  Edit: I do realize Math.floor(c*100)/100 would work, but I'm just confused on why double does this.


How do we specify multiple ignore patterns for `tree` command?

I need to print the directory structure of our production system and I would like to remove some specific directories from the ?  How do we specify multiple ignore patterns for tree command?


I have a very simple problem.  Lets assume that I have a well shuffled deck of 52 cards. I start drawing the top card always and when the card matches its rank I lose. J=11 Q=12 K=13.  If there were only 13 cards I could easily use the $\ \frac{!n}{n!}$ for derangements in order to solve this. The problem is that there are 52 cards so when I pass 13 I start from 1 again so I don't know what is the probability to win. Example of the game     1st card: 4 - Continue   2nd Card: A - continue   3rd Card: K - Continue   4th Card: K - Continue   5th Card: 6 - Continue   6th Card: 9 - Continue   7th Card: 10 - Continue   8th Card: A - Continue   9th Card: J - Continue   10th Card: 3 - Continue   11th Card: 2 - Continue   12th Card: 8 - Continue   13th Card: A - Continue   1st card: 5 - Continue   2nd Card 2 LOSE   So actually I have to count from 1 to 13 4 times and if I draw all 52 cards then I win. What's the probability?


This is a layman's question. The only thing I know about quantum physics is from casual reading and documentaries. I can imagine electrons being probabilistic waves. Their position is an infinite number of weighted points and only upon observing the actual position do we know which of those points was its actual position.  I program in Haskell so I imagine the concept as laziness. Only upon actually needing the information, we get it.  But what does observing actually mean? In Haskell I can treat a lazy value as if it were already there and manipulate it as such. One way of starting the actual evaluation is by printing some value, this then causes all the values that are depended on to also evaluate, then all the ones those depended one and so on.  I figure the universe isn't that human centric and "observing" means something other than actually seeing something, but the quotes like "I like to imagine the Moon being there even when I'm not looking at it" make me wonder.


Should putting custom code in functions.php or created the plugins

function custom_post_type(){//example} function custom_taxonomy(){//example}  Should add code filter hook or action hook custom page, custom post type, custom taxonomy, etc.. in functions.php or create plugins.What is the better method? Is there the way better than this ways?


I want to make a rocket engine nozzle but I don't know how to curve a cone into its point and make it hollow. I thought about using a torus or cylinder but I wouldn't know how to recreate the shape. (Google Raptor Engine)


How do I install MSSQL Server and/or Tools for Linux on 16.04?

This post was created to try and be a 'catch all' canonical question/answer pair for 'How do I Install MSSQL Server' and 'How Do I Install MSSQL Server Tools' questions.   I am looking to set up MS SQL Server for Linux, and quite possibly its tools (on the server itself or other systems) so I can interact with SQL Server.  How can I go about doing this?


Image.h  #include <iostream> #include "Array.h"  using namespace math;  namespace imaging {     class Image: public Array     {         public:             Image();     }; }   Array.h  namespace math {      template <typename T>     class Array     {         protected:             T * buffer;             unsigned int width, height;         public:             Array(unsigned int w, unsigned int h);     }; }   and Array.cpp  #include <iostream> using namespace std;  namespace math {     Array::Array(unsigned int w, unsigned int h)     {         this->width = w;         this->height = h;     } }   I have these errors: Image.h:12:2: error: expected class-name before { token  {   ^ In file included from Image.cpp:1:0: Image.h:12:2: error: expected class-name before { token  {   ^ Array.cpp:8:2: error: invalid use of template-name math::Array without an argument list   Array::Array(unsigned int w, unsigned int h)  Any help for this??? Thnx


Proving at least 99 pairwise sums of the reals are non-negative

Suppose, one hundred real numbers are given and their sum is 0.Then how can I prove that at least 99 of the pairwise sums of these hundred numbers are non-negative?  I tried this: Let the real numbers be $a_i$,$1\leq i\leq100$. By the given condition, $a_1+a_2+\dots +a_{100}=0$.Suppose for the sake of contradiction, that at most 98 of the pairwise sums of these given reals are non-negative.I just tried to examine the case when exactly 98 of them are non-negative. I labelled the sums $S_1$,$S_2,\dots S_{4950}$,WLOG assume that sums $S_1,S_2,\dots S_{4852}$ are negative, the rest are non-negative. $$S_1+S_2+\dots +S_{4950}=99(\sum_{i=1}^na_i)=0$$ Case I: $S_{4853}+a_{4854}+\dots +a_{4950}=0$.That simply means that $S_1+S_2+\dots +S_{4852}=0$.But, by the given condition, $S_1+S_2+\dots +S_{4852}<0$,a contradiction.After that, I am not able to make any progress.  Can anyone please suggest a more efficient method to solve this problem.I feel this approach will involve enormous case work.


How do I wrap lines in a column in a table

I am making a table in a two-column document and one of the table columns is running out of the page. This is a sample of the table. I would like to wrap the last column in the table. How can I solve this?  \begin{table}[b]  \caption{} \label{snps.tab}% \begin{tabular*}{\columnwidth}{@{}lllll@{}} \toprule SNP & Chromosome & Gene & LOD score & Annotation \\ \colrule rs33321100 & chr17 & Srd5a2 & 3.79 & 3-oxo-5-alpha-steroid 4-dehydrogenase 2 \\ \botrule \end{tabular*}% \end{table}


How can I get Firefox to use Dolphin instead of Nautilus by default?

I installed Kubuntu, and want to use Dolphin when I try to save a file or open a new file, but firefox always use Nautilus, how can I change this?  I find this question, but it does not work for me:   I can neither download the kmozillahelper package, nor find the filepicker-variable in my firefox.   my Ubuntu: 12.10 my firefox: 16.0.2


How to deploy a parallel program in MATLAB which would be used in JAVA?

I have designed a parallel program in MATLAB, and I need to deploy it into a JAVA library, so that I can use this program in eclipse. While using the deployed library, there is a problem occured, here is the error information:  Error using initclient (line 37) Java exception occurred:  java.lang.NullPointerException     at java.util.logging.Logger.demandLogger(Logger.java:339)     at java.util.logging.Logger.getLogger(Logger.java:390)  Error in distcomp/schema (line 11)    Error in parallel_function (line 430)    Error in readingsaad (line 18)    Error in mainfunction (line 14)   Exception in thread "main" ... Matlab M-code Stack Trace ... file C:\Users\YANCIE~1\AppData\Local\Temp\Yancie Yang\mcrCache8.0\IM_5F20\toolbox\distcomp\initclient.m, name initclient, line 37. file C:\Users\YANCIE~1\AppData\Local\Temp\Yancie Yang\mcrCache8.0\IM_5F20\toolbox\distcomp\@distcomp\schema.m, name schema, line 11. file C:\Program Files\MATLAB\R2012b\toolbox\compiler\mcr\matlab\lang\parallel_function.m, name parallel_function, line 430. file C:\Users\YANCIE~1\AppData\Local\Temp\Yancie Yang\mcrCache8.0\IM_5F20\IM\readingsaad.m, name readingsaad, line 18. file C:\Users\YANCIE~1\AppData\Local\Temp\Yancie Yang\mcrCache8.0\IM_5F20\IM\mainfunction.m, name mainfunction, line 14. com.mathworks.toolbox.javabuilder.MWException: Java exception occurred:  java.lang.NullPointerException     at java.util.logging.Logger.demandLogger(Logger.java:339)     at java.util.logging.Logger.getLogger(Logger.java:390)      at com.mathworks.toolbox.javabuilder.internal.MWMCR.mclFeval(Native Method)     at com.mathworks.toolbox.javabuilder.internal.MWMCR.access$600(MWMCR.java:23)     at com.mathworks.toolbox.javabuilder.internal.MWMCR$6.mclFeval(MWMCR.java:833)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:606)     at com.mathworks.toolbox.javabuilder.internal.MWMCR$5.invoke(MWMCR.java:731)     at com.sun.proxy.$Proxy0.mclFeval(Unknown Source)     at com.mathworks.toolbox.javabuilder.internal.MWMCR.invoke(MWMCR.java:406)     at IM.IM.mainfunction(IM.java:213)     at com.yancie.main.IMTest.main(IMTest.java:17)   why is this? Please help me... thanks in advance.  Ps I'm sure that the problem occured while using the MATLAB--"parfor", and I have deployed a another program which didn't have this problem.


Infinite integral domain with finite characteristic.

$\mathbb{F}_p(X)=\Big \{\frac {f}{g} \:\Big|\: f,g \in \mathbb{F}_p[X], g\neq 0 \Big \}$  Where $p$ is prime, it is an infinite field with finite characteristic.  I need an example of an infinite integral domain which is not a field with finite characteristic.


Unit testing a method that calls another method

What is the best way to unit test a method that calls into multiple methods, for example:  modify(string value) {     if(value.Length > 5)  replaceit(value);      else changeit(value); }   This pseudo code has a modify method that (currently) calls either replaceit() or changeit(). I have already wrote tests for replaceit and changeit, so writing a new test for modify will be 99% the same set of code.  I need to test it thought because it may change in the future.    So do I copy paste the existing test code?  Move the test code to a common function?  Any other ideas?  I'm not sure of the best practice here.


Let $f,g$ $C^0$ functions from $[0, 1] \to \mathbb R$, and a sequence of $C^1$ functions $f_n : [0, 1] \to \mathbb R$. Show that if $f_n'$ converges uniformly to $g$ and $f_n$ converges pointwise to $f$, then $f$ is $C^1$ and $f'=g$. I tried to write with the definitions and using mean value theorem to involve the derivative in the $\delta,\epsilon$ expressions but it does not lead me anywhere. A hint was to integrate but I struggle to show the proposition using integrals. Can someone help me ?


Is it possible to access a 64-bit dll from a 32-bit application?

I have a Delphi application similar to  that includes a hook dll.  EDIT: This hook DLL communicates with the main app by sending windows messages.  I want to add support to XP and Vista x64 and my initial idea was to convert the dll to 64-bit (compiling it with FreePascal) but keep the application 32-bit for now (Delphi).  Is it possible for a 32-bit application to access a 64-bit dll?  EDIT2: I'm loading the dll via LoadLibrary so I guess I'm stuck since a 32-bit process won't be able to load a 64-bit dll, according with what I read on the link pointed by Lars Truijens on one of the answers below.


Move all my Authenticator credentials to a new phone

I have enabled 2 factor authentication, using Google Authenticator, for 6 services: LastPass, Dropbox, Evernote, Wordpress, Tumblr and Google. How can I transfer them all to my new phone?  I followed the instructions , but the result of that was only that my Google account authentication was moved to the new phone. So, now I can access one account using my new phone, and need my old one for the other 5.  Surely there is a way to do this in bulk? I don't really need to do something special with each service provider do I?  New phone is Motorola Moto G3, old is Moto G. Both working. Neither rooted.


Windows 7 - use [Win key] + Space for Switch Language

In windows 8, I love how I can switch to Japanese input by pressing [Win key] + [space bar].  Can I do this in Windows 7 without auto hotkey or special programs?


Where to close java PreparedStatements and ResultSets?

Consider the code:  PreparedStatement ps = null; ResultSet rs = null; try {   ps = conn.createStatement(myQueryString);   rs = ps.executeQuery();   // process the results... } catch (java.sql.SQLException e) {   log.error("an error!", e);   throw new MyAppException("I'm sorry. Your query did not work."); } finally {   ps.close();   rs.close(); }   The above does not compile, because both PreparedStatement.close() and ResultSet.close() throw a java.sql.SQLException.  So do I add a try/catch block to the finally clause?  Or move the close statements into the try clause?  Or just not bother calling close?


Unable to install missing video and audio plugins

When I try to install missing plugins on terminal, the following output appears:       arif@arif-HP-Pavilion-15-Notebook-PC:~$ sudo apt-get purge ubuntu-restricted-extras [sudo] password for arif:  Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package ubuntu-restricted-extras arif@arif-HP-Pavilion-15-Notebook-PC:~$ sudo apt-get install ubuntu-restricted-extras Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package ubuntu-restricted-extras arif@arif-HP-Pavilion-15-Notebook-PC:~$


How to determine equality for two JavaScript objects?

A strict equality operator will tell you if two object types are equal. However, is there a way to tell if two objects are equal, much like the hash code value in Java?  Stack Overflow question  is similar to this question, but requires a more academic answer. The scenario above demonstrates why it would be necessary to have one, and I'm wondering if there is any equivalent solution.


How to convert Date Difference value from float to int?

I'm trying to calculate date difference using JavaScript.  My Code:  function getELECurrentdifference($this1)   {     var CtrDate = new Date('');     if($this1.datepicker("getDate") != null)     {       var ELEcertCurrentDiff= $this1.datepicker("getDate") - CtrDate;           var result = ELEcertCurrentDiff / (1000 * 60 * 60 * 24) * +1;       //$("#ELEcertDiff").text(result);       document.getElementById("ELEcertCurrentDiff").value = result;     }   }   But I got a value in float.  Output:     25.39119292824074   How I can convert it to integer value like 25 only.  Any kind of help is welcome, thanks in advance.


Improper integral: $\int_0^\infty \frac{\sin^4x}{x^2}dx$

I have been trying to determine whether the following improper integral converges or diverges: $$\int_0^\infty \frac{\sin^4x}{x^2}dx$$  I have parted it into two terms. The first term: $$\int_1^\infty \frac{\sin^4x}{x^2}dx$$ converges (proven easily using the comparison test), but the second term: $$\int_0^1 \frac{\sin^4x}{x^2}dx$$ troubles me a lot. What could I do?


Can you create a new wpdb that connects to an SQL (not MYSQL) database?

I've been trying to do: $mydb = new wpdb(SQL Database info);  Is there a way to check whether the database connection was established? It doesn't seem to be working since $mydb->get_results(query) doesn't return anything, but I get no errors so I don't know what is wrong.


Will this kind of entanglement of tenses be acceptable?

All dictionaries I consulted say that "nog" is not an English word.   （self-made)   Will this kind of entanglement of tenses be acceptable for English? At first, I used past tense, then switched to present tense immediately. But I think it fits well into the reality,my action of consulting a dictionary has become the past, whereas the dictionaries themselves still remain the same, and say the same thing about that word.


Remove certain Unicode (garbage) JSON characters

I'm reading data from a file, and sometimes the file contains funky stuff, like: "ä‰ŒÄ€áœŠÂ»ç‰ç•‡ï¼ƒè¸²æœ€ä²’Bíœë¨¿ä„€å•²ï²ä‹¾é¥˜BéŒé“‡ä„€â²ä‹¾â¢"  I need to strip/replace these characters as JSON has no idea what to do with them. They aren't control characters (I think), so my current regex of Regex.Replace(value, @"\p{C}+", string.Empty); Isn't catching them. A lot of these strings read in are going to be long, upwards of256 characters, so I'd rather not loop through each char checking it. Is there a simple solution to this?  I'm thinking regular expressions would solve it, but I'm not sure.


if $f(x) \sim g(x)$ is $ \sum f(k) \sim \sum g(k)$

if $f(x) \sim g(x)$ as $x \to \infty$ then is $\sum_{k=1}^N f(k) \sim \sum_{k=1}^N g(k)$ as $N \to \infty$? Intuitively, i should think so because as $k$ gets larger $f$ and $g$ get closer so it should 'even out'?


Alternatives to ArcGIS Diagrammer for Reordering Fields with ArcGIS Desktop 10.3 or higher

I discovered that ArcGIS Diagrammer no longer supports ArcGIS Desktop beyond 10.3. This was the go-to tool for reordering fields for a feature class within a file geodatabase. I have subtypes applied, so I have to operate within the geodatabase environment.  Are there any suitable alternatives that would operate with ArcGIS Desktop (specifically ArcCatalog) 10.5 or higher?  While my question is similar to  and others, most of those fixes are several years out-of-date, and apply to older versions of ArcGIS.


Champions with ultimate that are not priority?

Except Udyr, are there champions whose R isn't a priority to be acquired at level 6 or level up at 11?


Word for a person who acts super nice to you to impress others, but he doesn't actually mean it?

What is the word for a person who acts super nice to you to impress others and build his image, but in real life, he doesn't actually mean it? For example, what would you call Cindrella's stepmom who treats her well in front of her dad, however, when he dies she makes Cindrella do chores? I need this word to describe a ruler who is just pretending to protect his people for the sake of his image and doesn't really care about whatever happens to them.


This one-liner removes duplicate lines from text input without pre-sorting.  For example:  $ cat >f q w e w r $ awk '!a[$0]++' <f q w e r $    The original code I have found on the internets read:  awk '!_[$0]++'  This was even more perplexing to me as I took _ to have a special meaning in awk, like in Perl, but it turned out to be just a name of an array.  Now, I understand the logic behind the one-liner:  each input line is used as a key in a hash array, thus, upon completion, the hash contains unique lines in the order of arrival.  What I would like to learn is how exactly this notation is interpreted by awk. E.g. what the bang sign (!) means and the other elements of this code snippet.  How does it work?


Some collection of students' theses or dissertations

I want to looking for information in graduating level. Is there any collection or library which provide students' theses or dissertations of many universities? Googling just find library for each university.


Can we say, "She teaches English IN a highschool in China" or "She teaches English AT a highschool in China"?

I tried searching for the answers and it says that when you say at it generally talks about the location. When we say in it talks about when you're inside that place. I just don't know which one is better. I hope you can help me.


Where should I put  tags in HTML markup?

When embedding JavaScript in an HTML document, where is the proper place to put the <script> tags and included JavaScript? I seem to recall that you are not supposed to place these in the <head> section, but placing at the beginning of the <body> section is bad, too, since the JavaScript will have to be parsed before the page is rendered completely (or something like that). This seems to leave the end of the <body> section as a logical place for <script> tags.  So, where is the right place to put the <script> tags?  (This question references , in which it was suggested that JavaScript function calls should be moved from <a> tags to <script> tags. I'm specifically using jQuery, but more general answers are also appropriate.)


Can VirtualBox run operating systems designed for ARM processors?

For example, can I run Android, which is mostly run on ARM processors, run on VirtualBox on x86 Intel processors?  I am aware of Android x86, however, that is not a viable solution.


Invoking Private Methods of an Abstract Class

I have a requirement in which I have to invoke a private method of an abstract class.   Let's say the abstract class looks like below:-  public abstract class Base {      protected abstract String getName();      private String getHi(String v) {         return "Hi " + v;     } }   Can some let me know is there a way I can call getHi (may be via Reflection or some other means) so that I can test it out? I am using Junit 4.12 and Java 8  I have gone through this  but here the methods are not private in the abstract class.  I have also gone through this  even this one does not talk about private method in abstract class.   I am not asking here whether we should test the private method or not or what is the best strategy for testing private methods. There are lot of resources available in the web regarding this. I am just trying to ask how should we invoke a private method of an abstract class in java.


Suppose a boy is trying to stand on a table. If the table can hold upto a particular force, the boy would fall on to earth. If he stands on the table and providing greater force than the table can yield.    Does the table give a reaction force to the boy by newton's third law?   If so, why did he fall down ?


Find the necessary and sufficient condition for $\mathbb{Q}(\sqrt{D_1})$ to be isomorphic to $\mathbb{Q}(\sqrt{D_2})$

Find the necessary and sufficient condition on integers $D_1,D_2$ for fields $\mathbb{Q}(\sqrt{D_1})$ to be isomorphic to $\mathbb{Q}(\sqrt{D_2})$  How should I start this problem?


How to access class of appended div using jquery

I am using jquery 3.5.1. I have a form as a <form id="formname"> </form>  I need to append a child div to this form by this method. html='<div  class="del" aria-hidden="true"  data-value="0">';   $("formname").append(html);  but when i try to access the appended class by using  $('.del').click(function (){ alert()  }  it is not working. How to access the appended div by jquery.I am doing this as a dynamic way.


What is a symmetric distribution symmetric about if it has zero skewness?

We know that a distribution with zero Skewness are symmetric. A quick Google search or looking up in textbooks says that      Symmetric distributions are distributions where the left side mirrors the right side.    In other words, they are symmetric about something. But what are they symmetric about? Their mean? Median? Mode? There probably would be no confusion if this was specified. But if someone talks about (or perhaps, if you're asked in an exam about) a symmetric distribution, what should we assume as the default?   Context: This MCQ in a test I gave --      A distribution has zero skewness if it is:      (a) Symmetrical about its mode      (b) Symmetrical about its mean      (c) Symmetrical about its median


Reconstructing command line arguments string

I have a string containing arguments e.g python program_name.py arg1 arg2. I want to add an argument in a certain index, e.g 2, so, as in array indexing, it should result like this: python program_name.py my_argument arg1 arg2.  In this case, there is no problem, I can just use:  s = "python program_name.py arg1 arg2" l = s.split() l.insert(2, "my_argument") print "My final result:", ' '.join(l)   BUT, what happens if one of the arguments includes spaces? say a string argument like this Wow, this is a long argument. When using it in the command like it obviously is wrapped with ", how can I, then, accomplish my mission?  Example string: python program_name.py "My long string argument" another_one and_another_one  how do I end up with python program_name.py my_argument "My long string argument" another_one and_another_one ?


Let $X$ $\subset$ $\mathbb{R}$ and $f,g:X\rightarrow\mathbb{R}$ two continuous bounded functions. Is the product $fg$ a uniformly continuous function? Prove or give a counterexample.  I would say it is false, since $x\sin(x)$ isn't uniformly continuous and it could be defined in $X$=[-1,1] and still not being uniformly continuous. But I couldn't prove it was not uniformly continuous, for if I take two sequences, $\pi n$ and $\pi n + \pi/ n$, they will not be defined in the domain.  On the other hand, if I take let's say $\sin(x)$ and $\arctan(x)$, using the same sequences I get that it's difference is $0$ as $n\rightarrow\infty$. I know it's easy to prove  that if the function were uniformly continuous, well that would be all (supposing they are bounded). But that isn't the case. Nor we can assume $X$ is compact, or the like. In summary I am stuck.


I am currently learning LaTeX from 'The Not So Short Introduction To LaTeX' and in that book many examples are displayed side by side:      $a^2$  'Left side of page' ---------------------------------                        'right side of page'                                                                a^2  I would like to do the same in the paper I am writing, but can not seem to find the command to this?


Snapping to vertex doesn't work for unknown reasons

Sometimes I try snapping vertices to the closest neighbour but it doesn't work as the object is always off. I think I'm missing something. I applied all transformations already and the origin is at center. What could it be?  In this gif I'm trying to snap the angled pole to the bottom pole's low right (then left) corner with vertex snap. But as you can see it is off in all cases, even when I try to snap to vertices of different objects.


Making a specific dot disappear in miniframes

I am using the beamer template miniframes with the following specifications:  \documentclass[xcolor=x11names,compress]{beamer} \useoutertheme[subsection=false,shadow]{miniframes} \useinnertheme[shadow=true]{rounded} \usefonttheme{serif}   One aspect is, there are dots at the top of the page in the header, one dot corresponding to  every frame. As I progress through this, the active dot keeps moving along (I'm sure most readers must have seen this template).   Is there any way to prevent one specific frame from appearing amongst the dots?  I.e. all others are as usual, just one specific frame doesn't show up there.  {frame}* doesn't seem to be working.   Any work-arounds?


Why is KL divergence non-negative?  From the perspective of information theory, I have such an intuitive understanding:  Say there are two ensembles $A$ and $B$ which are composed of the same set of elements labeled by $x$. $p(x)$ and $q(x)$ are different probability distributions over ensemble $A$ and $B$ respectively.   From the perspective of information theory, $\log_{2}(P(x))$ is the least amount of bits that required for recording an element $x$ for ensemble $A$. So that the expectation $$\sum_{x \in  ensemble}-p(x)\ln(p(x))$$ can be interpreted as at least how many bits that we need for recording an element in $A$ on average.   Since this formula puts a lower bound on the bits that we need on average, so that for a different ensemble $B$ which brings about a different probability distribution $q(x)$, the bound that it gives for each element $x$ will surely not bit that is given by $p(x)$, which means taking the expectation, $$\sum_{x\in ensemble}-p(x)\ln(q(x))$$ this average length will surely be greater than the former one, which leads to $$\sum_{x\in ensemble }p(x)\frac{\ln(p(x))}{\ln(q(x))} > 0$$  I don't put $\ge$ here since $p(x)$ and $q(x)$ are different.  This is my intuitive understanding, is there a purely mathematical way of proving KL divergence is non-negative? The problem can be stated as:  Given $p(x)$ and $q(x)$ are both positive over real line, and $\int_{-\infty}^{+\infty}p(x)dx = 1$, $\int_{-\infty}^{+\infty}q(x)dx = 1$.  Prove $$\int_{-\infty}^{+\infty}p(x)\ln\frac{p(x)}{q(x)}$$ is non-negative.  How can this be proved? Or can this be proved without extra conditions?


I overloaded a virtual function, but it didn't work

So far I have done the following work:  class Stamp{  public:     virtual std::string GetStampName() const { return "undefined"; } };   class FooStamp : public Stamp {  public:     std::string GetStampName() const override { return "foo-stamp"; } };   I use it like this:  FooStamp fooStamp; std::cout << "foo-stamp:" << fooStamp.GetStampName() << std::endl;  const Stamp stamp = fooStamp; std::cout << "stamp:" << stamp.GetStampName() << std::endl;   The actual output is as follows：  foo-stamp:foo-stamp stamp:undefined     // expected: foo-stamp   Types converted to base classes are not working. What did i do wrong.  Is there a way to make the override effective also ensure that the object is copied by value.


Google has started to warn me that I am almost out of space in my Gmail account. How can I sort my messages by size to identify any expendable large emails in my account?


Spoilers ahead! Plot points are revealed here, I'll put the deeper plot points in spoiler boxes.  Time travel features heavily in the plot of Endgame. Correct me if I'm wrong, but the MCU seems to subscribe to a multiverse of sorts. This makes any alterations to the past fine, and the "present" people making those changes return to the future they left from unaffected.  So, the plan is:      pop into the past to gather the Infinity Stones, wield them to perform a reverse snap, then pop them right back where you found them as if they'd never left at all.   This plan succeeds. However, as a result,      the pre-snap Thanos journeys into the future to protect the job he has yet to do, and is defeated in the process. This means that, although the Stones are placed back in their respective times (the Cap's last job before retiring), there's now a universe short of Thanos.   So, my question: is there now a universe out there in which the snap never occurred as well as several of the Avenger's adventures (anything after 2014, I think that's where Thanos travelled from), while at the same time there is a universe (the one we see in the films) in which all of the events of the MCU films transpired?  A further point, we're told that traveling back to kill a baby Thanos wouldn't work because they'd still be in the timeline they left from upon return (the snap one), while the other timeline would exist to no benefit of their own. This is why the mission was never about killing a pre-snap Thanos - your own past is unchangeable, the snap is locked in. Therefore, the Thanos that travelled to 2023 is forever locked in to travelling to that point and being defeated, meaning the time he came from must no longer have him.  This could also explain how the universe that we watch through the movies has a Gamora now. Because she came from a timeline in which Thanos never sacrifices her, she can be alive (remember, we're told that there's no way to reverse the sacrifice made to retrieve the Soul Stone - the only way she can be alive is if she's from a universe where she was never sacrificed (i.e. no Thanos after 2014)).


My laptop specs say :input 19V and 6.3A, That means (120W charger),   I hve recently bought a charger because my old charger broke up. So this new charger provides 19.5V with 6.5A (126W) ; That are higher than the laptop's specs. Should i look for another charger that is compatible with my laptop 100% or i should not worry about this problem. Thanks


Why is the hat leaderboard a little off?

I have seen the hat leaderboard, and here's how it looks like: 1. Alecxe, a member for 7 years, 7 months, 29 hats 1. eLRuLL, a member for 7 years, 5 months, 29 hats 3. Eran, a member for 6 years, 10 months, 28 hats  As you can see, Eran got 3rd, instead of 2nd place. Is there a logical reason for this?


Was the rebellion of the North really necessary?

I really can't get this. With such a strong feudalism, does kneeling down mean so much? I think there is not much difference between being 'King in the North' or 'Warden of the North'. The difference is only symbolic. Why did the North rebel when they are practically independent and why did the İron Throne go to war for territories that they don't actually dominate? I don't know if any tax regimes or any foreign threats for Westeros exist.


A second transit in U.S.A. under the Visa Waiver Program

I am a British citizen eligible for the Visa Waiver Program. At Christmas, I will be flying from London Heathrow to Bogota, Colombia with a connection through the US in Dallas. As I understand it, I do not need a visa for my connection flight in Dallas.  On the return flight from Bogota to London Heathrow, I also have a connecting flight in Miami. The time period will be within 90 days of my previous transit.  Can I use the VWP to re-enter the USA for my connection, or will I need to apply for a visa?


Instead of a list with some objects in it, I get [...] whenever I run my code. I'd like to know what it means, in order to debug my code.


Threshold Secret sharing - How to create a shared secret from pre existing secret parts?

In usual $(t, n)$ secret sharing schemes, a secret $S$ is split into $n$ parts so that any $t$ out of $n$ parts reconstruct the original secret. So, suppose that there is a group of $n$ participants each one has a secret $x_i$ ($x_i$ may be its private key). My question is, is it possible to create a secret $S$ using the prexisting secrets $x_i$ ($i=1...n$) so that with any $t$ out of $n$ from these secrets ($x_i$) we can find the secret $S$?


How to compute probabilities of normally distributed variables?

Let $X_1, X_2, \ldots, X_{16}$ be  independent with $N(3,4)$ distributions and $\bar{X}$ denote the sample mean. Find:   $P(-8 < 2 \bar{X} < -4)$. A number $K$ such that $P(-K < 2 \bar{X} < K) = 0.99$. $P(-10 < 3 X_1+X_7 < -8)$. A number $K$ such that $P(3 X_2+X_5 < K) = 0.3$.   If someone could give me some help or hints on where to start with (a) or any of the problems that would be really helpful and I'd really appreciate it.


Computing the UMVUE for Uniform$(0,\theta)$

I am having trouble understanding how to compute $\operatorname E[\bar{X}\mid X_{(n)}]$ related to the following premise.  Compute the UMVUE using the Rao–Blackwell Theorem for the following. $X_1,X_2, \ldots ,X_n$ i.i.d. to $\operatorname{Uniform}(0,\theta)$.  I am able to derive that $\hat{\theta}_\text{MM}=2\bar{X}$ and $\hat{\theta}_\text{MLE}=X_{(n)}$.  Since $\hat{\theta}_\text{MM}$ is unbiased and $X_{(n)}$ is a sufficient estimator, I know that $$\operatorname E[2\bar{X}\mid X_{(n)}]$$ must give us the UMVUE.  However, I have no idea how to proceed from here. I appreciate your help.


What is a clean, Pythonic way to have multiple constructors in Python?

I can't find a definitive answer for this. As far as I know, you can't have multiple __init__ functions in a Python class. So how do I solve this problem? Suppose I have a class called Cheese with the number_of_holes property. How can I have two ways of creating cheese objects...  One that takes a number of holes like this: parmesan = Cheese(num_holes = 15) And one that takes no arguments and just randomizes the number_of_holes property: gouda = Cheese()  I can think of only one way to do this, but this seems clunky: class Cheese():     def __init__(self, num_holes = 0):         if (num_holes == 0):             # Randomize number_of_holes         else:             number_of_holes = num_holes  What do you say? Is there another way?


Let's say, that I'm at a sleepover and got put in the corner with no direct way of getting to the door without disturbing other people. If I wake up, having to use the restroom or get a drink, I get extremely anxious and have to find some complicated way of getting around the other people without waking up, which can get so bad that I start sobbing. I have always had this problem ever since I was a kid and I would get really scared to wake my mom up if I threw up or she slept in too long. Is there a phobia-suffix word for this or a way to get over it?  Duplicate of


I want to send temperature value from a microcontroller using UART to C# interface and Display temperature on Label.Content. Here is my microcontroller code:  while(1) {    key_scan(); // get value of temp    if (Usart_Data_Ready())    {       while(temperature[i]!=0)       {          if(temperature[i]!=' ')          {             Usart_Write(temperature[i]);             Delay_ms(1000);          }          i = i + 1;       }       i =0;       Delay_ms(2000);    } }   and my C# code is:  private void serialPort1_DataReceived(object sender, System.IO.Ports.SerialDataReceivedEventArgs e) {    txt += serialPort1.ReadExisting().ToString();    textBox1.Text = txt.ToString(); }   but exception arises there "Cross-thread operation not valid: Control 'textBox1' accessed from a thread other than the thread it was created on" Please tell me how to get temperature string from my microcontroller and remove this Error!


Can someone post questions or answers in languages other than English on SO?

Are posts in other languages allowed in SO?  I came across one such question here:    Should I raise a flag against this?


Was Lelouch the person driving the cart in the last scene of Code Geass R2?

At the ending of Code Geass R2, the last scene showed someone whose face wasn't showed riding a horse-pulling-cart with CC. I believe that it is indeed Lelouch (who was previously stabbed by Suzaku wearing Zero's uniform as part of their Code Zero plan to free Elevens), and that he had gained immortality because of his frequent usage of his Geass.   Lelouch's Geass first leveled-up the episode when he accidentally ordered his sister Euphemia to kill all Elevens. Then, his father King Charles was beaten by him and I'm thinking that King Charles' immortality was transferred to him.   If that person was really Lelouch, then, has he already gained immortality by that time?


H is a subgroup of a finite group G, and if |G| = m|H|, adapt the proof of Lagrange's Theorem to show that g^m! ∈ H for all g ∈ G.

I'm finding this question particularly difficult to answer. Could someone help me, please?   Edit: I have seen the use of the notation ker which I know translates to kernel, in some solutions, but this notation is not used in my course on Group Theory. What is the alternative solution to this?  Armstrong question 11.11


Similar matrices over $\mathbb{C}$ and $\mathbb{R}$.

Let's assume that real $A,B$ are similar over $\mathbb{C}$. Is it true that $A, B$ are similar over $\mathbb{R}$?  The first step should look like this: $P=U+iV$, we have $PA=BP$, then $(U+iV)(A)=B(U+iV)$, $UA+iVA=BU+iBV$, according to the fact that $A, B, U, V$ are real, we state that $UA=BU, VA=BV$,  $A=U^{-1}BU, A=V^{-1}BV$.  Actually, the solution above doesn't work if $U, V$ are not invertible. According to the fact that $P$ is invertible and $P=U+iV$ --- how to prove that $U, V$ are also invertible?


$G_\delta$ singletons in compact Hausdorff and first countability

Given a compact Hausdorff space $X$, if $a \in X$ is a $G_\delta$ singleton (i.e., $\{ a \}$ is a $G_\delta$ set), then there is a countable local base at $a$.   The point $a$ can be written as countable intersection of open sets let's call $U_{n}$.  How can I use the compactness? What is the next step for proof? Could you give me hint please?


Is there any way to increase chances of a finishing move without commands or mods?

Is there is a way to increase the chances without mods or commands?


I need to find node voltage at A. This seems like a trivial question, but when I set up the resistive voltage divider equations they are not equal to each other. Am I doing something wrong?  My equations are \$V_A = V_1(R3/(R3+R1)) = V_2(R3/(R3+R2))\$      I tried solving this problem with an LTSpice simulation and with the superposition method, but my answers did not match (although very close to each other). Is this because the simulator uses an approximation? Can someone compare results?