I would like to add a "C" / Common wire hookup to my hvac system and get a fancy new thermostat. I've read  and still have some questions.  First of all, I have an Apollo Hydroheat system. Unusual system I gather. My house has two zones (upstairs and downstairs), both thermostats are connected the same way with four wires:  R - Red, G - Green, Y - Yellow, W - White  Luckily for me, the cable connecting the hvac to the thermostat has unused wires (orange, brown, blue, etc), so I shouldn't need to actually run any new cables.  I found an installation manual for an Apollo Hydronic air handler that has a wiring diagram. The PDF of the Apollo installation manual is  and the wiring diagram is on page 8.    Any thoughts as to whether or not it would be easy to add a live "C" wire? Do I need an external transformer? Can I literally just get a transformer, plug it into a wall outlet, and connect the "C" wire to that?

How do I identify the C terminal on an HVAC, furnace, or boiler? If the terminals don't have a screw labeled C what should I look for on the wiring diagram? What steps should I take if a wiring diagram cannot be found or if it indicates that a C terminal doesn't exist?  Note: This is an extension to  which asks about running the wires through the wall. This question is about where to connect the wire at the HVAC.


I found out that the Meta Stack Overflow magic link is not included in  nor . There are generic links that follow the pattern [<something>.se] -> [meta.<something>.se]. For example, [worldbuilding.se] -> [meta.worldbuilding.se]. However, sites with their own domain have their own type of links, for example, Stack Overflow is [so]. I expected the magic link to follow the first pattern but [meta.so] does not actually work. Through trial and error in the sandbox I found out that the the magic link that expands automatically is [metaso] by : [meta.so], [metaso], [meta.so.se], [meta.stackoverflow], [meta.stackoverflow.se], and [mso]. However, that leads to Meta Stack Exchange instead which seems to be . Was hoping to find magic links to the metas and to to update the list. I also checked:  Super User (base link: [su]). : [meta.su], [metasu], [meta.su.se], [meta.superuser], [meta.superuser.se], and [msu] Server Fault (base link: [sf]): : [meta.sf], [metasf], [meta.sf.se], [meta.serverfault], [meta.serverfault.se], and [msf]  None of these actually conjure up the link to the relevant meta. I can't even find any other documentation than the one I want to update. Are there magic links for the metas of Stack Overflow, Super User, and Server Fault? And if there are, what would they be?

In comments here on Meta SE I can use the magic link [so] to link to .  Consequently, I would have expected the magic link [meta.so] to link to  but that magic link does not seem to be available.  Can it be added, please?


While writing the following code I get problem at lines  in  It is in netbeans . Whether the array declaration is accepted . If accepted then why excepton of         Exception in thread "main" java.lang.RuntimeException: Uncompilable source code generic array creation             at mygenerics.Addition.<init>(MyGenerics.java:26) at mygenerics.MyGenerics.main(MyGenerics.java:16)     Java Result: 1   Program here   /* * To change this template, choose Tools | Templates * and open the template in the editor.  */ package mygenerics;  /**  *  * @author SUMIT  */  public class MyGenerics {  public static void main(String[] args) {     Addition<Integer> ints = new Addition<>(1,2,3);     ints.sum();     Addition<Double> dbls = new Addition<>(1.25,2.68,3.49);     dbls.sum();     System.out.println(ints.toString()); }  } class Addition<T extends Number> {     **T arr[]=new T[10];** public Addition(T... values) {    for(int j=0;j<values.length;j++)    {        int i=0;        arr[i]=values[j];        i++;    }    System.out.println(arr); } public <T extends Number> void sum() {     T sum;     System.out.print(arr);     for(int i = 0;i<arr.length;i++)     {       **sum = sum + this.arr[i];**     }  } }   I got Generics Array creation error

Due to the implementation of Java generics, you can't have code like this:   public class GenSet<E> {     private E a[];      public GenSet() {         a = new E[INITIAL_ARRAY_LENGTH]; // error: generic array creation     } }   How can I implement this while maintaining type safety?  I saw a solution on the Java forums that goes like this:  import java.lang.reflect.Array;  class Stack<T> {     public Stack(Class<T> clazz, int capacity) {         array = (T[])Array.newInstance(clazz, capacity);     }      private final T[] array; }   But I really don't get what's going on.


I have gfortran installed on my system and the file libgfortran.a can be found at /usr/lib/gcc/x86_64-linux-gnu/4.6/. Using nm I made sure that the function _gfortran_compare_string is defined in there:  $ nm /usr/lib/gcc/x86_64-linux-gnu/4.6/libgfortran.a | grep _gfortran_compare_string   Returns  0000000000000000 T _gfortran_compare_string 0000000000000000 T _gfortran_compare_string_char4   But, the linker of my CUDA-C program throws errors:  /usr/local/cuda-6.0/bin/nvcc --cudart static -L/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/home/chung/lapack-3.5.0 -link -o  "pQP"  ./src/pQP.o   -lgfortran -llapacke -llapack -lcublas -lblas -lcurand nvcc warning : The 'compute_10' and 'sm_10' architectures are deprecated, and may be removed in a future release. /home/chung/lapack-3.5.0/liblapack.a(ilaenv.o): In function `ilaenv_': ilaenv.f:(.text+0x81): undefined reference to `_gfortran_compare_string'   and later on another error, again related to libgfortran:  /home/chung/lapack-3.5.0/liblapack.a(xerbla.o): In function `xerbla_': xerbla.f:(.text+0x49): undefined reference to `_gfortran_st_write' xerbla.f:(.text+0x54): undefined reference to `_gfortran_string_len_trim' xerbla.f:(.text+0x66): undefined reference to `_gfortran_transfer_character_write' xerbla.f:(.text+0x76): undefined reference to `_gfortran_transfer_integer_write' xerbla.f:(.text+0x7e): undefined reference to `_gfortran_st_write_done' xerbla.f:(.text+0x87): undefined reference to `_gfortran_stop_string'   But, again using nm, I found that _gfortran_st_write, etc are defined in libgfortran.a.  Links:  and .  Note: Lapack makes use of libgfortran. I recently installed lapack and ran all the tests and they all passed.

Why does the order in which libraries are linked sometimes cause errors in GCC?


Prove for every positive integer n the identity $$\phi(1)\left\lfloor \frac{n}{1}\right\rfloor + \phi(2)\left\lfloor \frac{n}{2}\right\rfloor + \phi(3)\lfloor \frac{n}{3}\rfloor + \dots+ \phi(n)\left\lfloor \frac{n}{n}\right\rfloor = \frac{n(n+1)}{2}$$  I was able to prove the above identity using induction. I am curious to know if there is any better proof without induction.

Let $\varphi(n)$ be Euler's totient function, the number of positive integers less than or equal to $n$ and relatively prime to $n$.    Challenge: Prove  $$\sum_{k=1}^n \left\lfloor \frac{n}{k} \right\rfloor \varphi(k) = \frac{n(n+1)}{2}.$$   I have two proofs, one of which is partially combinatorial.    I'm posing this problem partly because I think some folks on this site would be interested in working on it and partly because I would like to see a purely combinatorial proof.  (But please post any proofs; I would be interested in noncombinatorial ones, too.  I've learned a lot on this site by reading alternative proofs of results I already know.)  I'll wait a few days to give others a chance to respond before posting my proofs.  EDIT: The two proofs in full are now given among the answers.


How can I prove this inequality  $$|\log(1+x^2)-\log(1+y^2)| \leq |x-y|$$  where  $x, y \in (0,+\infty)$. I'm trying but not getting any idea how to show.  Please someone help.

I need to show that $ \forall x,y \in \mathbb R, |\log(1 + x^2) - \log(1 + y^2)| \le |x-y|$  I tried using concavity of log function: $\log(1 + x^2) - \log(1 + y^2)=\log(\frac{1 + x^2}{1 + y^2})=\log(\frac{x^2y^2}{(1 + y^2)y^2}+\frac{1}{1 + y^2}) \ge \frac{2(\log(x)-\log(y))}{1+y^2}$  Also the middle value theorem: $0<\frac{\log(1 + x^2) - \log(1 + y^2)}{x^2-y^2} <1$  But both attempts has not led too far.


Given the below code, what do you call that kind of property?   public interface IValue<T> {     T Value { get; } }  public class BaseValue<T> : IValue<T> {     T IValue<T>.Value { get; } // What would you call this kind of property? }

What are the differences in implementing interfaces implicitly and explicitly in C#?  When should you use implicit and when should you use explicit?  Are there any pros and/or cons to one or the other?    Microsoft's official guidelines (from first edition ) states that using explicit implementations are not recommended, since it gives the code unexpected behaviour.  I think this guideline is very valid in a pre-IoC-time, when you don't pass things around as interfaces.  Could anyone touch on that aspect as well?


I have a problem with numbering landscape tables. The latex code below refers my table to as "Table 0.1". Could you please help me how can I get "Table 1"? Thank you!    \documentclass[preprint,12pt]{elsarticle}     \usepackage{natbib}     \usepackage{amsmath,amssymb}     \usepackage{graphicx}     \usepackage{rotating}     \usepackage[english]{babel}     \usepackage{booktabs,array,dcolumn}     \usepackage{setspace}     \usepackage{verbatim}     \usepackage{longtable}     \usepackage{courier}     \usepackage{color,xcolor}     \usepackage{lscape}     \usepackage{textcomp}      \usepackage{float}     \usepackage{etoolbox}       \begin{document}     \selectlanguage{english}     \subsection{sub}\label{sub1}      In Table~\ref{table:lstab}...      \clearpage     \begin{landscape}     \begin{table}[t]     \label{table:lstab}     \caption{Title}     \begin{tabular}{|c|c|c|c|c|c|c|c|c|c|}     \hline     \hline      A    & B & C & D & E & F  & G & H  & I     &  J     \\     \hline       \end{tabular}      \end{table}         \end{landscape}     \end{document}

\documentclass{article} \usepackage{algorithm}  \begin{document} \setcounter{section}{54} \section{A section with no label} \begin{algorithm} \label{myalg} \caption{An algorithm with the label `myalg'.} \end{algorithm} Reference to myalg: \ref{myalg}. \end{document}   With this code, the reference givens 55 (the section number); if I move the label after the caption command, I get the correct reference (1).  Why should this be the case? I find it confusing: when thinking about an algorithm as an environment, you expect to be able to label it right after you began it. At the very least I would expect some kind of error or "??" to appear, rather than the previous environment or reference-able entity being used.


I've been having some trouble aligning multiple figures. The problem is present with png figures and tikz figures, so I guess I am missing something.  tikz figures not properly aligned:   the particular bit of code:  \begin{figure}     \centering     \input{figs/grf_left_fb.tikz}     \input{figs/grf_fb.tikz}        \input{figs/phase_fb.tikz}     \input{figs/zap_fb.tikz}     \caption{......}     \label{fig:feedback} \end{figure}   and with png figures (both vertical and horizontal alignment needed):     \begin{figure}     \centering     \includegraphics[scale=0.25]{figs/s1.eps}     \includegraphics[scale=0.25]{figs/s2.eps}     \includegraphics[scale=0.25]{figs/s3.eps}     \includegraphics[scale=0.25]{figs/s11.eps}     \includegraphics[scale=0.25]{figs/s28.eps}     \caption{S..........}     \label{fig:data_good_bad} \end{figure}

I have several very similar images except some have some extra graphics that enlarge them slightly. This causes some pictures to be offset and not aligned visually when it's clear they should be.  How can I align several tikzpictures along the the same origin they were created and center vertically and horizontally properly?   First, I want to align the 3 large boxes regardless of the what the small boxes are doing Second, I want to be able to center them all without adding additional spaces the \begin{center} seems to do Third, I want to be able to reproduce the exact same results but everything in landscape mode without using the landscape package if possible. (as you can see, the problem is that TeX is putting one rectangle at a time which is not what I want) The methods should be easy and quick. I have many rectangles stacked and some need to be grouped arbitrarily. What these means is I want the methods to sort of be "smart" in that they can figure out themselves so I don't have to go change a lot of stuff each time I have to change the grouping. Basically I would like the first rectangle on the page to define the alignment location and the others on the same page to use it unless I tell them not to.   I've tried creating a custom bounding box as shown in  but it didn't do anything unless I make it too large which then causes other problems. (I can end up doing the alignment but it seems more complex than necessary)  \documentclass[10pt]{book} \usepackage{tikz}  \begin{document} \begin{tikzpicture}     \draw[line width=30pt] (0,0) -- (7,0); \end{tikzpicture}  \begin{tikzpicture}     \draw[line width=30pt] (0,0) -- (7,0);     \draw[line width=20pt] (-0.4, 0) -- (-0.1, 0); \end{tikzpicture}  \begin{tikzpicture}     \draw[line width=30pt] (0,0) -- (7,0);     \draw[line width=20pt] (-0.4, 0) -- (-0.1, 0);     \draw[line width=20pt] (-0.8, 0) -- (-0.5, 0); \end{tikzpicture}    \begin{center}% \begin{tikzpicture}%     \draw[line width=30pt] (0,0) -- (7,0); \end{tikzpicture}% \end{center}%  \begin{center}% \begin{tikzpicture}%     \draw[line width=30pt] (0,0) -- (7,0);     \draw[line width=20pt] (-0.4, 0) -- (-0.1, 0); \end{tikzpicture}% \end{center}%  \begin{center}% \begin{tikzpicture}%     \draw[line width=30pt] (0,0) -- (7,0);     \draw[line width=20pt] (-0.4, 0) -- (-0.1, 0);     \draw[line width=20pt] (-0.8, 0) -- (-0.5, 0); \end{tikzpicture}% \end{center}%     \begin{tikzpicture}%     \draw[line width=30pt] (0,0) -- (0,7); \end{tikzpicture}%   \begin{tikzpicture}%     \draw[line width=30pt] (0,0) -- (0,7);     \draw[line width=20pt] (0,-0.4) -- (0,-0.1); \end{tikzpicture}%  \begin{tikzpicture}%     \draw[line width=30pt] (0,0) -- (0,7);     \draw[line width=20pt] (0,-0.4) -- (0,-0.1);     \draw[line width=20pt] (0,-0.8) -- (0,-0.5); \end{tikzpicture}%    \begin{center}% \begin{tikzpicture}%     \draw[line width=30pt] (0,0) -- (0,7); \end{tikzpicture}% \end{center}   \begin{center}% \begin{tikzpicture}%     \draw[line width=30pt] (0,0) -- (0,7);     \draw[line width=20pt] (0,-0.4) -- (0,-0.1); \end{tikzpicture}% \end{center}%   \begin{center}% \begin{tikzpicture}%     \draw[line width=30pt] (0,0) -- (0,7);     \draw[line width=20pt] (0,-0.4) -- (0,-0.1);     \draw[line width=20pt] (0,-0.8) -- (0,-0.5); \end{tikzpicture}% \end{center}%   \end{document}


The description of the "not an answer" flag states:     This was posted as an answer, but it does not attempt to answer the   question. It should possibly be an edit, a comment, another question,   or deleted altogether.   If an answer was marked as accepted, that practically proves that the given answer did help the asker solve the problem.  So, should it even be possible to flag accepted answers as "not an answer"? If I'm wrong, please give me an example or a constructed scenario of a situation, where this is appropriate.

What is the "Not an Answer" flag and what is its purpose? When should I use this flag? When should I not use this flag? But I'm still not sure if I'm using the flag correctly... An answer is "Not an Answer", but the flag was declined or disputed!   See also:


This is trickier than it looks at first blush.  In Excel, columns have letter identifiers:    1st column is "A" 2nd is "B" ...  26th is "Z" 27th is "AA" 28th is "AB" ... "ZY" "ZZ" "AAA" ...   I am looking for the cleanest algorithm (i.e. the most readable) that can turn the column number into the column identifier.  I explicitely don't want a solution that works inside Excel. It needs to run standalone.  I have my solution, but am looking for other approaches.  Here are my (NUnit) test cases. They are correct, to the best of my knowledge.      [TestCase(1, "A")]     [TestCase(26, "Z")]     [TestCase(27, "AA")]     [TestCase(52, "AZ")]     [TestCase(53, "BA")]     [TestCase(702, "ZZ")]     [TestCase(703, "AAA")]     [TestCase(18278, "ZZZ")]     [TestCase(18279, "AAAA")]     [TestCase(475255, "AAAAA")]

How do you convert a numerical number to an Excel column name in C# without using automation getting the value directly from Excel.  Excel 2007 has a possible range of 1 to 16384, which is the number of columns that it supports. The resulting values should be in the form of excel column names, e.g. A, AA, AAA etc.


I have a single entry visa to visit Belgium in late October (2 nights). I applied for multiple entry through Belgium, but I only received a single entry.  I also have a ticket booked for a trip to France in mid-November (also 2 nights).  How can I obtain a visa for my France trip?  More info: I didn't know I cannot have a new visa while having unused Schengen visa, so now I have appointment to issue French visa too, for this Friday. What should be my course of action?

I am visiting a friend in Switzerland for ten days. I have already got visitor's visa for the same on my Indian passport. Particulars mentioned on my visa are:  1. 'Etats Schengen' , 2. Single entry 3. Dates of visit. & 4. Type of visa : C.  I understand that having already got ‘Etats Schengen' visa, I can travel to all Schengen countries.  I am also planning to visit Paris for a day during my stay in Switzerland. However, I never mentioned this in my visa application. I am planning to take a train from Geneva to Paris and book a hotel in Paris for one night. Can I possibly plan my Paris trip this way as I have Schengen visa, or I am not allowed to travel out of Switzerland as I never mentioned this in my visa application?   Also what does Single entry on my Schengen visa means: does it mean that I can enter and leave Switzerland only once or it means that I can enter and leave the Schengen region only once.


i would like to know if there is the possibility of install ubuntu in my laptop asus x550c. How should i proceed to install all the drivers correctly?  Thanks!

I would like to see a full how-to guide on how to install Ubuntu.


Relevant Fact We know that for all graphs $G = (V, E)$, if $G$ is a tree then $|E| = |V| - 1$.  Definitions A tree is a graph that is connected and has no cycles. A cycle is like a path, except it starts and ends at the same vertex.  Will soon update with what I have so far. For time being, feel free to add anything.  Would mention that this question is unique in that it does not assume the graph is connected. Thanks everyone!

Prove the following Theorem. If $G$ is a connected graph with $n$ vertices and $n - 1$ edges, then $G$ is a tree.   I am still new to proof methods and not sure if this is the correct use of induction.  Base case: $n = 1$. Here, $G$ has $0$ edges and is a tree.    Assume every connected graph with $k$ vertices and $k-1$ edges is a tree. Let $G$ be a connected graph with $k+1$ vertices that contains at least one cycle (no amount of edges are specified).    Let $m$ be the number of edges removed. Remove edges from each cycle to form a new graph $G'$.    $G'$ is a tree with $k-1$ edges and $k+1$ vertices. $G$ has $k-1+m$ edges.    If $m=0$ then $G' = G$ and $G$ is a tree.


None of answers that I've seen works for me, I have code like this  OLDVER=`readlink current` OLDDATA=`find ! -newer $OLDVER   And I want to get only third match from FIND statement, because I need this name file to my script.

How to make find command, that will show only first two matches and then end, something similiar to  just version for two records.


This was given us as a fact, but why is this true? The zeropolynomial is the polynomial where all the coefficients are equal to $0$ if $R(x)$ is a polynomial over $\mathbb{C}$ and every $x\in \mathbb{N}_0$ is a zeropoint then one can rewrite the polynomial $R(x)=x(x-1)(x-2)…(x-n)…$ but if we put an $x\in \mathbb{C}-\mathbb{N}_0$ in $R(x)$, how does one know that $R(x)=0$?

How can I prove, that a polynomial function $$f(x) = \sum_{0\le k \le n}a_k x^k\qquad n\in\mathbb N,\ a_k\in\mathbb C$$ is zero for at most $n$ different values of $x$, unless all $a_0,a_1,\ldots,a_n$ are zero?


I had wasted my 2 days but unable to find a way that how to modify or override the main page content block in drupal 7. Please help me.  I want to edit this main page content block.

I only want blocks on the homepage. Because I don't have any nodes, and I want to keep the homepage as /node I am getting a "No front page content has been created yet." message on my page.  How do I get around this?


What is the best casting method to use when casting int to uint32_t?  Should I use (uint32_t)num, or reinterpret_cast<uint32_t>(num), or static_cast<uint32_t>(num)? (Or something else)?  I know that there are many explanations out there regards the different casting types, but I want to ask specifically about primitive types.

What are the proper uses of:   static_cast dynamic_cast const_cast reinterpret_cast C-style cast (type)value Function-style cast type(value)   How does one decide which to use in which specific cases?


I am plotting a 3d diagram using cubes to represent the data. Works fine so far.  Basically, this is what I started with:   Now what I want to do, is not to use cubes, but bars instead. So I kinda want to stretch the cube along the z axis from 0 to its z-coordinate to create the bar look and I have no clue how to do this.  Didnt find anything useful online.   This is what I want to achive:    On page 81 of the pgfplots manual is says, that for each cube, the coordinates can be set using:   /pgfplots/cube/size x={dimension} /pgfplots/cube/size y={dimension} /pgfplots/cube/size z={dimension}   but I dont know how to use that information.

I have a simple 3d histogram    which I want to import into pgfplots, e.g. using matlab2tikz or by hand.  PGFplots does not offer 3d histograms.  Is there an easy way to do this?


Any advice on communities or forums where I can find play testers for a new tabletop role play game?  It's designed for casual players to game together virtually. So imagine pen & pen style RPG played over WhatsApp or Slack. Games usually take about an hour or two and there's a whole element designed for off the cuff role play between games.  A large part of the game is story creation mechanics that make games really quick to setup. This is the bit we're working on the most at the moment.  Rather than hand this over to someone else to run, like in , I'd like to have an involved discovery session with the players. Ideally looking to understand how the feel about the game as much as watch them play.  Any suggestions on where to look would be greatly appreciated!

I'm just putting the finishing touches on the 9th iteration of my self-designed RPG system (with its own setting), and though it was woefully rocky in its early days I think that it's really coming together well. I'm running a handful of pbp games in v8.3, and have collected some encouraging data, and v9.0 is really feeling close to my initial vision.  Now, however, I'd like to see the game tested from a GM's point of view. When 9.0 is fully written up I'd like to find a group to pick up and use the materials with my input being limited to observation, and question fielding.  Do groups exist who like to playtest different systems? I can't imagine it's the world's most attractive pitch to try someone's homebrew pet project, but I also think this one stands up. If so, how or where do I find them?  Again, I'm keen to hand off the entire system to another GM with his/her own players, observe, and be available in whatever capacity becomes necessary. I'd consider this the next step after GMing playtests myself. And I'd be looking specifically for an online venue, as being based in New Zealand doesn't lend itself to large-scale conventions or the like.


iMac i3 running 10.6.8   I've downloaded the 12.0.4 32-bit Intel ubuntu.iso and converted it to ubuntu.img and moved to root. The "USB for OS X" instructions say insert USB Flash media.   My flash media is FAT32.   But, if one were to use Disk Utility to Erase, what format is correct: FAT, ExFAT, Mac OS Extended (Case-sensitivity), or Mac OS Extended? Found the drive: /dev/disk1 and unmounted OK. Issued: sudo dd if=/ubuntu.img of=/dev/rdisk1 bs=1m The copy goes fine, BUT at the end I get a OS X message that The disk you inserted was not readable by this computer.   This is not in the Ubuntu instructions. So, I choose the Ignore option. Issued: diskutil eject /dev/disk1 and restart with Option held down.   No USB drive shows up to boot from. Eventually I get an "Unrecognized Disk" error. I'm not surprised because my memory is that to get a bootable drive for a Mac requires some version of the correct OS X to be on the disk.   Yet, the folks who wrote these instructions would certainly know this fact -- yet their instructions don't work.

If you select "USB" and "Mac" on , it gives a series of command line instructions to make a USB key which the MacBook will boot into Ubuntu from.  I've followed them to the letter two or three times on different USB keys, and it doesn't work. There's a very great deal of technical discussion about EFI etc. but this set of instructions seems to suggest it should just work, but it doesn't.  Help? I'm increasingly unhappy with the more locked-down approach Apple is taking, and I'd quite like to start using Linux with a view to transitioning over to using it as my main operating system, but booting from the CD takes forever, runs slowly and I'm really hoping to get it moving off USB.  Can anybody help me?


I'm reviewing a paper. In it the authors use a genetic distance metric to created a distance matrix between subjects, then they run classic MDS on this distance matrix.  Throughout the MS they call this a principal components analysis (PCA).  I was trained to call this principal coordinates analysis (PCoA) or classic Torgerson's multidimensional scaling.  Can anyone clarify which terms are correct, and if more than one, which is preferred?

How are PCA and classical MDS different? How about MDS versus nonmetric MDS? Is there a time when you would prefer one over the other? How do the interpretations differ?


I have been working on a document that called for both the Amsmath and Ellipsis packages. When I omit one of these packages, the 4-dot ellipsis is produced exactly as I want: \documentclass{article} \usepackage{ellipsis} %\usepackage{amsmath}  \begin{document} \Large Word\ldots. \end{document}  Giving  However, when I run the code using both packages together, I get  Notice the shortened space between the third and fourth dots. Does anyone know what is causing this and how I may correct it? Thank you.

The amsmath package changes the \dots command to have different vertical alignment depending on context (I'm not sure if it does anything else to it). The ellipsis package changes the \dots command to ensure correct spacing in certain textual contexts. However, it seems to undo the changes made by amsmath. Is there a way to make the features work simultaneously?  The following is an mwe:  \documentclass[a4paper]{book}  \usepackage{amsmath} \usepackage{ellipsis}  \begin{document}  a \dots{} b  a\dots{}b \[a + \dots + b\]  \end{document}   If the ellipsis package is used, the ellipsis in math is not vertically centered. If it is not used, there is an extra (thin?) space after the ellipsis in the text. The order of \usepackage's do not seem to matter.


My math teacher was explaining how to draw graphs of given functions. For $f(x)=x^x$ he put the domain as $(0,\infty)$. Why is this true (if it is)? For $x= -2$, $(-2)^{-2}$ is $1/4$, and so the function is defined at $x= -2$. Isn't it?

Consider the function $f(x) = x^x$.  Wolfram alpha tells me that this function's domain is $x : x>0$, $x \in \mathbb{R}$. I can't see why it cannot be defined for a number like $(-2)$. I mean $(-2)^{-2}=0.25$, the same Wolfram Alpha told me. I realize that fractional powers for negative numbers may cause problems, but it could be defined for integers. Thanks for any help.


The Ringwraiths were kings, sorcerers and other powerful sorts, according to Galadriel. Do we know who they used to be, what they ruled, and other details as to the nature of their former identities?

I recall reading somewhere of the history of the nine riders, but I cannot remember where it was. (It seems perhaps they were from northern kingdoms?)  The leader of the Nine was the Witch King of Angmar, but what were the names of the others, and where did they come from?


Modern cosmology relies heavily on the redshift scale-factor relation $$a=\frac{1}{1+z}$$ But what is the experimental evidence for it? It's derived in textbooks from General Relativity, but for all other predictions of GR there have been stringent tests.  The bending of light by stars, precession of the perihelion of Mercury, the equivalence principle, time dilation, etc... have all been subject to high precision tests.  Even if GR is correct, it's possible that the derivations misinterpret something... Have any tests been done, or are any planned, that that look for direct experimental evidence of the relation?  The question is different to this one  as it asks specifically about attempts to experimentally verify the redshift scale-factor relation.

What experiment would disprove  of cosmology?  As a layman, I have read a lot of articles and threads in specialized forums. I am probably wrong, but I developed an impression that that theory is circular, 99.9% self- referential. The only hard experimental datum seems to be the redshift, and then most other parameters, distance, luminosity, age, scale factor, expansion rate, etc. are model-dependent and therefore confirm the theory,  a) - what are the other hard facts at the bottom of the theory, if any?  If I am not wrong, the prerequisite of a scientific theory is that it can be disproved.  b) - how do you disprove that redshift is determined by stretching of space,   c) - how do you disprove that space can expand and that just a metric devised by a theorist can make it expand?     spacetime is not an object expanding like some rubber foam. It's a combination of a manifold and metric. The expansion means the metric is time dependant, and this is explained by the requirement that the metric be a solution to Einstein's equation.


Economies of selling such a lens would be my first guess to why a lens doesn't exist but I am more interested in the physical characteristics of a lens.  How do the characteristics of a lens affect its design?  manufacturing technique, physics, the sheer size of a lens?   What is the complexity in creating a wide range lens with large aperture? For example a 5-600mm f2 lens? Is it the physics of light? manufacturing technique? manufacturing tolerances? Sheer size of the lens when it is built? Lens bulk needed to make a shape?  My question is more on the physics of light and how a lens is designed to meet it. I listed a example with characteristics as a reference in case someone wants to do calculations to show the physical size of a lens compared to its characteristics.  Thanks for helping a noob.

I'm curious if the physics allow a company to build such a lens of course with good IQ, minimal color aberration, maximum sharpness, and little to none lens vignetting or edge softness


for categorical variables that are one-hot encoded, each level is now a feature' in my data. for example: "Married" is now "Married_Y" and "Married_N", so there is a chance that only "Married_Y" will be chosen in RFE. I imagine this is not a valid way for feature selection (if i'm wrong, please let me know how to interpret this type of situation). In this case, how do I go about doing RFE? My goal is to run RFE on a logistic regression model to understand which variables i should consider keeping or not.

After seeking clarification about linear model coefficients  I have a follow up question concerning non-signficant (high p value) for coefficients of factor levels.  Example: If my linear model includes a factor with 10 levels, and only 3 of those levels have significant p values associated with them, when using the model to predict Y can I choose to not include the coefficient term if the subject falls in one of the non-signficant level?  More drastically, would it be wrong to lump the 7 non-significant levels into one level and re-analyze?


So, I'm pretty new to JavaScript and I'm trying out some beginner projects on my own. I want to make a clock and add a 0 before single digit times. I have achieved this through multiple duplicate if-statements but when I try to translate that to a function I fail. I assume it is not working because I am trying to set a value to another value or I am comparing them by accident. I am in a bit of a mental knot at the moment.  function setTime() {     var today = new Date();     let hour = today.getHours();     let minute = today.getMinutes();     let seconds = today.getSeconds();     let period = '';      if (hour <= 11) {         period = 'AM';     } else if (hour >= 12) {         period = 'PM';         hour -= 12;     }      // function twoDigit(timeValue) {     //     if (timeValue.toString().length === 1){     //         timeValue = '0' + timeValue;     //     }     // }      // twoDigit(seconds);     // twoDigit(minute);     // twoDigit(hour);      if (hour.toString().length === 1){         hour = '0' + hour;     }     if (minute.toString().length === 1){         minute = '0' + minute;     }     if (seconds.toString().length === 1){         seconds = '0' + seconds;     }       const timeDiv = document.getElementById('time-display');     timeDiv.innerHTML = hour + ':' + minute + ':' + seconds + ' ' + period;     document.body.appendChild(timeDiv); }  setInterval(setTime, 1000);

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


I have the following:   A PNG or JPG of a random width and height, in pixels, that represents a partial map of the world (i.e. a rectangle of the United States). The four corners of this image are represented by real latitude and longitude values that if plotted, would represent 4 corner points of the United States (LatTop, LatBottom, LongLeft, LongRight). A coordinate that, if plotted, would represent a point somewhere inside of this "rectangle" (Latitude, Longitude).   My question is, what type of projection or formula would I use to calculate the X and Y coordinates (in pixels based off of the original PNG/JPG image) of the coordinate provided in #3 above?  Some example values would be:   ImageWidth = 1312 ImageHeight = 576 LatTop = 30.244381 LatBottom = 29.529928 LongLeft = -96.764958 LongRight = -94.404619 Coordinate Latitude = 30.100000 Coordinate Longitude = 95.100000   I found some information regarding Plate Carrée projections but I could not successfully apply it to this problem. Perhaps I am missing something.

I'm trying to find the concave hull of a lat, lon pointset but when I project my points on my map it doesn't look like expected. I've tried a lineare projection and a spherical projection. My data is about 10000-70000 lat lon pairs. How is this possible?  $mapWidth    = 2000; $mapHeight   = 2000; $mapLonDelta = $mapLonRight - $mapLonLeft; $mapLatDelta = $mapLatTop - $mapLatBottom;  $worldMapWidth=(($mapWidth/$mapLonDelta)*360)/(2*M_PI); $f=min(max(sin($mapLatBottom*(M_PI/180)),-0.9999),0.9999); $mapOffsetY=$worldMapWidth/2 * log((1+$f)/(1-$f)); $f=min(max(sin($mapLatTop*(M_PI/180)),-0.9999),0.9999); $mapOffsetTopY=$worldMapWidth/2 * log((1+$f)/(1-$f)); $mapHeightNew=$mapOffsetTopY-$mapOffsetY; $mapRatioH=$mapHeight/$mapHeightNew; $newWidth=$mapWidth*($mapHeightNew/$mapHeight); $mapRatioW=$mapWidth/$newWidth;  $tx = ($lon - $mapLonLeft) * ($newWidth/$mapLonDelta)*$mapRatioW; $f = sin($lat*M_PI/180); $ty = ($mapHeightNew-(($worldMapWidth/2 * log((1+$f)/(1-$f)))-$mapOffsetY));   This should look like Germany. What's wrong?:    Update: It seems to work. This is a map of Bonn(Germany):


Maybe I don't understand the definition of shallow copy... but i'm very confused:  from the docs:  Where "s" is a list (but same question applies to dictionaries respectively).     "s.copy() |   creates a shallow copy of s (same as s[:])"   Except I thought s[:] was a deep copy. For example, see  on how to copy a list (without it just pointing to the original version). And using list1.copy() seems to do a deep copy as well aka same behaviour as [:]  l1 = [1,2,3,4] l2 = l1[:] l3 = l1.copy()    l2.append(5) l3[0] = 99 print(l1) print(l2) print(l3) >> [1,2,3,4] >> [1,2,3,4,5] >> [99,2,3,4]   It would appear that l1,l2, and l3 are all separate objects. What am I missing?

What is the difference between a deep copy and a shallow copy?


I have created a C# program to perform input output operations in windows. I want that program to be invoked at specified time interval e.g. (9:30AM-11:00AM) everyday. How can we achive this?

Today we have built a console application for running the scheduled tasks for our ASP.NET website. But I think this approach is a bit error prone and difficult to maintain. How do you execute your scheduled task (in an windows/IIS/ASP.NET environment)  Update:   Examples of tasks:   Sending email from an email-queue in the database Removing outdated objects from the database Retrieving stats from Google AdWords and fill a table in the database.


I rendered a file and it is saved under a tmp file, but I can not find it on my computer. Is there any way to change the file location or another way to find it?

I'm using the Blender Video Editor. I finished, rendered it, and went to open the file, but I do not know where my file saved to!  I want it to be saved as a video file and I would like to know where it is, but I do not. I've already tried to look through all my folders, but I don't know if I'm checking the right place.


Let $f:[a,b]\rightarrow\mathbb{R}$ be a continuous function. Show that there exists $c\in[0,1]$ such that $$\int_0^1 x^2 \! f(x) \, \mathrm{d}x = \frac13f(c)$$  I am stuck with this one. $f$ is said to be continuous on $[a,b]$ so how can we conclude about $[0,1]$? Also can you please give me a clue about how to approach this problem? Integration by parts? Mean value theorem for integrals?

Suppose that a function $f:[0,1] \to \mathbb R$ is continuous in $[0,1]$. Prove that there is a point $c\in [0,1]$ such that $\int_0^1 x^2 f(x)\,dx = \frac{f(c)}{3}$.   Do I somehow use the mean value theorem or FTC?


I'm trying to show that the following is a Ring isomophism: $$ \mathbb{Z}[i] /\langle 3+3 i\rangle \cong \mathbb{F}_{3}[X] /\left\langle X^{2}+1\right\rangle \times \mathbb{F}_{2}. $$ I thought this was supposed to be one of those common standard Algebra questions that one can do with CRT, but I'm having more trouble than expected. Here is my attempt. $\mathbb{Z}[i] \cong \mathbb{Z}[X] /\langle X^2 + 1\rangle$, and using , we obtain $\mathbb{Z}[i] /\langle 3+3 i\rangle \cong \mathbb{Z}[X] /\langle X^2 + 1, 3 + 3X\rangle$. Now, I suppose $\mathbb{Z}[X] /\langle X^2 + 1, 3 + 3X\rangle \cong \left(\mathbb{Z}[X] /\langle 3 + 3X\rangle\right) / \langle X^2 + 1 \rangle $. So presumably, we need to prove $$\left(\mathbb{Z}[X] /\langle 3 + 3X\rangle\right) / \langle X^2 + 1 \rangle  \cong  \mathbb{F}_{3}[X] /\left\langle X^{2}+1\right\rangle \times \mathbb{F}_{2}.$$ This looks hopeful, but the problem is that I can't use the CRT, as $\langle 3 \rangle + \langle 1+x \rangle \neq \mathbb{Z}[X]$. So I'm stuck here. Would anyone know how to proceed? (Or maybe my solution attempt was incorrect from the start.)

The isomorphism $\mathbb{Z}[i]/(a+bi) \cong \Bbb Z/(a^2+b^2)\Bbb Z$ is , when the integers $a$ and $b$ are coprime. But what happens when they are not coprime, say $(a,b)=d>1$?      — For instance if $p$ is prime (which is not coprime with $0$) then $$\mathbb{Z}[i]/(p) \cong \mathbb{F}_p[X]/(X^2+1) \cong \begin{cases} \mathbb{F}_{p^2} &\text{if } p \equiv 3 \pmod 4\\ \mathbb{F}_{p} \times \mathbb{F}_{p} &\text{if } p \equiv 1 \pmod 4 \end{cases}$$ (because $-1$ is a square mod $p$ iff $(-1)^{(p-1)/2}=1$).  — More generally, if $n=p_1^{r_1} \cdots p_m^{r_m} \in \Bbb N$, then  each pair of integers $p_j^{r_j}$ are coprime, so that by CRT we get $$\mathbb{Z}[i]/(n) \cong \mathbb{Z}[i]/(p_1^{r_1}) \times \cdots \times \mathbb{Z}[i]/(p_m^{r_m})$$  I was not sure how to find the structure of $\mathbb{Z}[i]/(p^{r}) \cong (\Bbb Z/p^r \Bbb Z)[X] \,/\, (X^2+1)$ when $p$ is prime and $r>1$.  — Even more generally, in order to determine the structure of $\mathbb{Z}[i]/(a+bi)$ with $a+bi=d(x+iy)$ and $(x,y)=1$, we could try to use the CRT, provided that $d$ is coprime with $x+iy$ in $\Bbb Z[i]$. But this is not always true: for $d=13$ and $x+iy=2+3i$, we can't find Gauss integers $u$ and $v$ such that $du + (x+iy)v=1$, because this would mean that $(2+3i)[(2-3i)u+v]=1$, i.e. $2+3i$ is a unit in $\Bbb Z[i]$ which is not because its norm is $13 \neq ±1$.  — I was not able to go further. I recall that my general question is to known what $\mathbb{Z}[i]/(a+bi)$ is isomorphic to, when $a$ and $b$ are integers which are not coprime (for instance $a=p^r,b=0$ or $d=(a,b) = a^2+b^2>1$).  Thank you for your help!


I want to upload file and save it on a server with jquery ajax. I've tried it but it didn't work. It doesn't want to process it. This is what I do:  html code  <form action="" method="post" enctype="multipart/form-data">         <input type="file" name="submit_file" id="submit_file" required >         <input type="text" name="submit_message" id="submit_message">            </form>     validation and ajax       proc_intro.php file  <?php     $submit_file = $_REQUEST[submit_file];     $submit_message = $_REQUEST[submit_message];     $allowed_filetypes = array('.jpg','.gif','.bmp','.png');    $max_filesize = 524288;    $upload_path = './images/';    $filename = $_FILES[$submit_file]['name'];     $ext = substr($filename, strpos($filename,'.'), strlen($filename)-1);      if(!in_array($ext,$allowed_filetypes))       die('The file you attempted to upload is not allowed.');   if(filesize($_FILES['submit_file']['tmp_name']) > $max_filesize)       die('The file you attempted to upload is too large.');   if(!is_writable($upload_path))       die('You cannot upload to the specified directory, please CHMOD it to 777.');  if(move_uploaded_file($_FILES['submit_file']['tmp_name'],$upload_path . $filename))    {        echo '{"result":"success"}';    }else    {         echo '{"result":"fail"}';    } ?>   What can I do to get the file to be uploaded correctly using ajax? Do you have any idea? Thank you in advance.

I don't want to use jQuery, but I'd like to use Ajax to do file uploading. Is that possible?  If so, where can I find information/tutorial on it?


Looking for the name of an old book I read many years ago back in the early 90's.  The book was a slim(ish) novel as I recall, maybe 200 pages?  The book was in English and was probably written in the 1960's, maybe the 1950's.    The concept was about trying to become immortal, and the impact that this desire placed on the fictional society.  Immortality was via the use of clones that were given the memories of the original each time they died, rather than perpetual extension of a single life.    The amount of life one had been allotted was recorded by a (mechanical?) computer, and the idea was to extend it by becoming more renowned (there could of been multiple levels of life expectancy).  I remember that the main protagonist (male) was in a fairground with a lady, and they entered an amusement(?) but later she dies while they are sitting in a café.  The protagonist was trying to get into the ranks of the Immortals (as he had been one previously?), he tries some different jobs (hospital porter, assistant to a politician, maybe others) but eventually leaves for space.  The setting was not very defined but was set in a land/city set some time in the future of earth, after some global catastrophe.  Does anyone remember this story?  It has a kind of romantic feel to it in my memory

I seek some help identifying a short book I read in my childbook. It was a science fiction book about a society where due to scarcity of resources, you were allowed a certain life span depending on your achievements and contributions to society. If you exceed the amount before doing something that causes you to get promoted to a higher life span, you will be taken in the night by some sort of police and vanish.   For extraordinary achievements the highest status you could achieve was immortality (I seem to dimly remember the usage of the word amaranth for those people).   The protagonist of the novel was someone who had once been granted immortaility but then had it stripped away from him again due to some misdeed or mistake. Now he tries to get that status again (maybe under a fake identity?), but one of the immortal people is suspicious of him so he murders her. She gets revived later, because that's part of the immortality package.    It ends with him being apprehended, but society decides to invest heavily into space again so that hopefully in the future there is space for everyone to be immortal. The book ends with the protagonists being sent of an explorer into space alone.


Is there any difference between this command: apt-get purge firefox   and these 2 commands:  sudo apt-get remove firefox && sudo apt-get autoremove

Is there any difference between     sudo apt-get purge <package-name>   and    sudo apt-get remove <package-name>     ?  I often see people recommend one or the other.  In other words, what does apt-get purge remove that apt-get remove doesn't?


I have several times seen situations where there is a conversation in comments that is no longer necessary (e.g. "can you clarify x", "clarification", "you should ask x as a separate question", "okay, I've asked it separately and edited this question").  In this situation, is it appropriate to flag each of the comments as no longer necessary or should I only flag one and leave whoever is handling the flag to remove any others?  From looking around it seems that in some cases it might be appropriate to flag the question or answer and request that the comments be removed but is that still the case if there are valid comments among to out of date ones?

When multiple comments in a comment thread ought to be removed (especially if they're all for the same reason), should I flag each of them individually or flag the parent post for moderator attention?  I've usually adopted the former strategy - flagging each comment with the same flag reason, often a custom one copied and pasted. I had always assumed the following things that led me to follow this strategy:   Flagged comments were discretely marked as flagged in some way when the reviewer viewed the question (much like how I can see others' pending suggested edits now that I have editing privileges). By individually flagging all the comments that needed cleaning up, I was allowing the flag reviewer to see at a glance which comments needed removing, thereby providing them with useful additional information that wouldn't be available if I flagged the entire parent post. By flagging comments individually, rather than flagging the whole post, I was letting my flags be handled by anyone with 10k+ rep and access to the mod tools, rather than having to be handled by a diamond moderator.   However, I just read  (now deleted) by Shog9 that makes me suspect that approach is misguided, and question whether any of my assumptions about how comment flags work are actually true. Notably he says:     If you'd pinged me once for every comment in that thread you found noisy, I would probably be plotting my revenge instead - at very least, I would think you very rude for doing so. Yet, that's exactly what you're doing when you start flagging multiple comments in a single thread: instead of taking a few seconds to describe a problem, you're attempting to use a moderator as a tool to do your bidding, without any real effort to communicate.   He also said some more stuff on the topic - I think there was something about huge offensive boxes blotting out the UI when he views questions with multiple flags - but I now can't recover it any more because that question was deleted while I was in the process of writing this one, and it doesn't seem to be available in the Google cache.  Much of the flagging and review system is still a black box to me as a low/mid rep user, and it's difficult for me to figure out what flagging behaviors are appropriate and helpful when I have no idea what actually happens when I flag a comment. (The Privileges section doesn't mention comment flags anywhere that I can find. I don't even know who reviews them at the moment, and can't find a Meta question anywhere that addresses that.)  Could somebody provide some input on when (if ever) flagging lots of individual comments in a thread is appropriate, and when flagging the entire parent post is? A pretty screenshot of the UI of the relevant review/mod tools, demonstrating the effect of each approach, might also be helpful for understanding this, if that's not asking too much.


Take recvfrom as an example. This is explained in both these links:   I understand (2) is for sys calls and (3) is for libc functions, but their header #include <sys/socket.h> and function prototypes is the same in both pages. Are these pages referring to the same function? If so then why do we need 2 separate pages explaining it? one could link to the other. Second question I like to ask is; are all the C Wrappers defined under (2) functions of libc (or other libraries)? These aren't the actual sys calls or helper functions provided by the Kernel right? these are all just wrappers which make the sys calls behind the scenes by putting correct values in registers? If so they should have just made a link to the wrappers in section (3), this is so confusing.

$ apropos mkfifo mkfifo (1)           - make FIFOs (named pipes) mkfifo (1posix)      - make FIFO special files mkfifo (3)           - make a FIFO special file (a named pipe) mkfifo (3posix)      - make a FIFO special file mkfifoat (3)         - make a FIFO (named pipe) relative to a directory file ...   So I have man pages for Linux Programmer’s Manual and POSIX Programmer’s Manual. Which should I prefer and why? (I'm writing a Linux application, no plans to port it AIX, BSD etc)  Thanks.


I have a friend who says sentences like, "Santa Claus deserves booed".  I would say, "Santa Claus deserves to be booed". Are we both correct?  Leaving out the "to be" part of the sentence seems odd to me.  Thank you for your response.

I'm from Central Pennsylvania, and apparently, we have a strange language construct in this area. I was recently talking about how "my car needs washed" to a friend from NJ, and she told me that my sentence was grammatically incorrect.   I realize she's right, and I realize my options are "my car needs to be washed" or "my car needs washing". But I'm not clear on the precise rule being invoked.


This is how I do it at the moment. I try to open the file with the FileShare set to none. So I want exclusive accesss to the file. If I can't get that then its a good bet somebody else has the file locked.  There's got to be a better and faster way. Any ideas?              try             {                 using (FileStream fs = File.Open(GetLockFilename(), FileMode.Open, FileAccess.ReadWrite, FileShare.None))                 {                     fs.Close();                 }                 // The file is not locked             }             catch (Exception)             {                 // The file is locked             }

Is there any way to check whether a file is locked without using a try/catch block?    Right now, the only way I know of is to just open the file and catch any System.IO.IOException.


In Kill Bill (I think that is what the movie is called)**Hanzo breaks a 28 year old oath and makes the best in sword he's ever made for someone he doesn't even know just because she wants to kill Bill.  Why?*

During kill Bill, we learn that all the black mamba had to do to get Hanzo to build her a sword, was to mention Bill's name.  When black mamba meets Bill at the end, she tells him that all she did was mention his name. Bill responds with, "that'll do it!"  So what was it that Bill did to Hanzo to make him come out of retirement and make another weapon of death?


I would like to draw a shaded triangle by defining the 3 vertices and an RGB color at each of those vertices. The interior shaded color would vary linearly from one vertex to the other.  Here is what I have so far but the shading is not what I am needing.  \documentclass[tikz]{standalone}  \usetikzlibrary{calc,intersections}  \begin{document} \begin{tikzpicture}  % Specify the coordinates \coordinate (A1) at (0,0); \coordinate (A2) at (5,2); \coordinate (A3) at (10,-3);  \definecolor{c1}{RGB}{0,129,188} \definecolor{c2}{RGB}{252,177,49} \definecolor{c3}{RGB}{35,34,35}  % Draw the sides of the triangle \draw (A1) -- (A2) -- (A3) -- cycle;  \shade [left color=c1,right color=c2] (A1) -- (A2) -- (A3) -- cycle;  \end{tikzpicture} \end{document}   While this question is similar:   The answers are limited in the following ways   Several of the solutions are artistic approximations and not precise shading between the vertices. The solutions are presented for an equilateral triangle and not a general triangle. The solution method using pgfplots works the best but won't display in ShareLatex and is having difficulty printing so is limited.

How do I draw a triangle in tikz with "point colours" so that every point in the triangle is coloured according to the weighted (by distance) average colour of the corners.


I have just broken my dependency tree after doing :  sudo apt-get update sudo apt-get upgrade   Now when I try installing anything, I get the following error  Reading package lists... Done Building dependency tree        Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies:  ffmpeg : Depends: libavdevice57 (>= 7:3.4.4) but it is not going to be installed           Depends: libsdl2-2.0-0 (>= 2.0.8) but it is not going to be installed  libglx-mesa0 : Depends: libglapi-mesa (= 18.0.5-0ubuntu0~18.04.1) but 18.2.2-0ubuntu1~18.04.1 is to be installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).   When I try   sudo apt --fix-broken install   I get the following error  Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following additional packages will be installed:   libglx-mesa0 The following packages will be upgraded:   libglx-mesa0 1 upgraded, 0 newly installed, 0 to remove and 13 not upgraded. 37 not fully installed or removed. Need to get 0 B/134 kB of archives. After this operation, 9 216 B of additional disk space will be used. Do you want to continue? [Y/n] Y (Reading database ... 238586 files and directories currently installed.) Preparing to unpack .../libglx-mesa0_18.2.2-0ubuntu1~18.04.1_amd64.deb ... Unpacking libglx-mesa0:amd64 (18.2.2-0ubuntu1~18.04.1) over (18.0.5-0ubuntu0~18.04.1) ... dpkg: error processing archive /var/cache/apt/archives/libglx-mesa0_18.2.2-0ubuntu1~18.04.1_amd64.deb (--unpack):  trying to overwrite '/usr/lib/x86_64-linux-gnu/libGLX_indirect.so.0', which is also in package nvidia-396 396.44-0ubuntu1 Errors were encountered while processing:  /var/cache/apt/archives/libglx-mesa0_18.2.2-0ubuntu1~18.04.1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)   I tried to install libglx-mesa0 through  sudo apt-get install libglx-mesa0   But I get the following error  Reading package lists... Done Building dependency tree        Reading state information... Done The following packages will be upgraded:   libglx-mesa0 1 upgraded, 0 newly installed, 0 to remove and 13 not upgraded. 37 not fully installed or removed. Need to get 134 kB of archives. After this operation, 9 216 B of additional disk space will be used. Get:1 http://fr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 libglx-mesa0 amd64 18.2.2-0ubuntu1~18.04.1 [134 kB] Fetched 134 kB in 0s (895 kB/s)        (Reading database ... 238586 files and directories currently installed.) Preparing to unpack .../libglx-mesa0_18.2.2-0ubuntu1~18.04.1_amd64.deb ... Unpacking libglx-mesa0:amd64 (18.2.2-0ubuntu1~18.04.1) over (18.0.5-0ubuntu0~18.04.1) ... dpkg: error processing archive /var/cache/apt/archives/libglx-mesa0_18.2.2-0ubuntu1~18.04.1_amd64.deb (--unpack):  trying to overwrite '/usr/lib/x86_64-linux-gnu/libGLX_indirect.so.0', which is also in package nvidia-396 396.44-0ubuntu1 Errors were encountered while processing:  /var/cache/apt/archives/libglx-mesa0_18.2.2-0ubuntu1~18.04.1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)   Can you help me to repair it, please ?

For example:  $ sudo apt-get install curl Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: bsh : Depends: libjline-java but it is not going to be installed groovy : Depends: libjline-java but it is not going to be installed rhino : Depends: libjline-java but it is not going to be installed E: Unmet dependencies.   Try 'apt-get -f install' with no packages (or specify a solution).   I get the same or similar errors when I attempt to install clojure1.3, leiningen, and several other packages.   When I try the suggestion made in the error message, this is what happens:  $ sudo apt-get -f install  Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required:   diffstat linux-headers-3.2.0-26-generic linux-headers-3.2.0-26 dh-apparmor dkms html2text libmail-sendmail-perl libsys-hostname-long-perl Use 'apt-get autoremove' to remove them. The following extra packages will be installed:   libjline-java Suggested packages:   libjline-java-doc The following NEW packages will be installed:   libjline-java 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 23 not fully installed or removed. Need to get 0 B/72.0 kB of archives. After this operation, 129 kB of additional disk space will be used. Do you want to continue [Y/n]? Y (Reading database ... 226243 files and directories currently installed.) Unpacking libjline-java (from .../libjline-java_1.0-1_all.deb) ... dpkg: error processing /var/cache/apt/archives/libjline-java_1.0-1_all.deb (--unpack):  trying to overwrite '/usr/share/java/jline.jar', which is also in package scala 2.9.2-400 Errors were encountered while processing:  /var/cache/apt/archives/libjline-java_1.0-1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1)  $ sudo apt-get upgrade Reading package lists... Done Building dependency tree        Reading state information... Done You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies:  bsh : Depends: libjline-java but it is not installed  groovy : Depends: libjline-java but it is not installed  rhino : Depends: libjline-java but it is not installed E: Unmet dependencies. Try using -f.


Since our universe began as a singularity would that mean that everything in the universe is entangled with itself?  I am not sure that makes sense, but hopefully some one can figure out what I am trying to ask.

Is that true that the big bang caused the quantum entanglement of all the particles of the universe so every particle is entangled to each other particle of the universe?


I have a point shapefile on which I used the "Layer to KML" tool on ArcMap. This tool successfully converted the shapefile into a KML containing all the attributes embedded in the "Placemark Description" field in Google Earth which serves my purposes. However when I try to go the opposite direction, namely from KML back to layer or shapefile using "KML to Layer" tool in ArcMap, all the attributes are lost and I cannot see them in the resulting Shapefile.  Is there any way to somehow expose these embedded attributes?   Or maybe export the shapefile such that the attributes are not embedded in the description in the first place?   I have third parties who need to edit my shapefiles in Google Earth and send them back to me to convert back to shapefiles. The back and forth from Arc to GE is quite paramount to my situation.

I've converted a shapefile with attributes to a .kml for a client.  The .kml and attributes were then edited within google earth.  I received the updated .kml and now I need to get it back to .shp.  The problem is: all of my attributes are now in html format, which makes the popup info box in google earth.  When I try to convert back to .shp my attributes get lumped into a (google created) "Description" field.  And ALL of my attributes and information is lumped into a single cell.  Is there some way to extract the data from the "Description" field.  Even if I do that, is there an easy way to get rid of the html format and make it usable?   This is what I get using the "Fusion Table" method I found on some forums.  You can see the html in the left, it continues on further than it shows.    I am using ArcGIS Desktop 10.2.


Show $\log(1-x)=-\sum_{n=1}^{\infty}\frac{x^n}{n}\,\forall x\in(-1,1)$. Which value does $\sum_{n=1}^{\infty}\frac{(-1)^n}{n}$ take?    Now because I skipped forward in my (personal) textbook I know that I could tackle this using knowledge of the Maclaurin/Taylor series. However, it was not covered in the lecture (yet) and my mind is fixated on using Maclaurin/Taylor (which I'm not allowed to use)! Can anybody show me an alternate approach that I will probably feel very stupid for not seeing?

I am looking at the series   $$ \sum_{n=1}^\infty\frac{(-1)^n}{n}.$$  This series converges (conditionally) by the alternating series test.  How can I compute its limit, which is equal to -log(2)?  a) I considered $I_n = \int_{0}^1$ $\frac{x^n}{1+x} dx$ -- and showed that this goes to 0, as n goes to infinity (use dominated convergence theorem).  b) I computed [$I_k$ + $I_{k-1}$] (for k $\ge$ 1), and it equals $\frac{1}{k}$.  I should be using my results from a) and b) to compute the above limit, which is part c) of the question that I am working on.  So, I have $$ \sum_{n=1}^\infty\frac{(-1)^n}{n}  = \sum_{n=1}^\infty(-1)^n[I_n+I_{n-1}].$$    Now I'm stuck.  How should I proceed from here?    I checked, by computing explicitly, that $-I_0$ = -log(2).  But I don't know how to arrive at $-I_0$ from the summation that I'm currently at.  Thanks in advance,


In unix shell I use find command to find files if i need files for last certain days I use following command:  find . -type f -name "<filename>" -print  Now if I want files for last 10 days I use :   find . -type f -name "<filename>" -mtime -10 -print  Now suppose I want to find all files with file name and suppose a date how do I do that?

How do I use the UNIX command find to search for files created on a specific date?


$\text{Totally Ramified primes in cyclotomic fields:}$  Suppose we have  $$ \Bbb F_p[x]/\overline{\Phi(x)} \cong O_k/pO_K.$$ If $ \ \overline{\Phi(x)}=\bar x^{p-1}+\cdots+\bar x+1=\large \frac{\bar x^p-1}{\bar x-1}=(x-1)^{p}$, where $ \large \bar x \equiv x \ (\mod \ p)$,   then how it implies $$pO_K=(p,(1-\zeta_p)^{p-1}.$$

Let $p$ be an odd prime and $\zeta_p$ a primitive $p$th root of unity, that is a $p$th root of unity other than 1. I need to show that $p$ and $(1-\zeta_p)^{p-1}$ are associates in $\mathbb{Z}[\zeta_p]$.  I don't know what I can do about this. Should I try factorizing $p$ into polynomials in $\zeta_p$?


This is probably a stupid question, but here goes:  I was trying out some new ideas for a hub I'm building on a server. I summoned a named Ender Dragon and now I can't kill it with any sword (it doesn't seem to have a hitbox) or other physical means so I want to remove it with commands.  The command I used to summon it was /summon EnderDragon ~ ~ ~ {NoAI:1,CustomName:"Welcome to the Hub!",Silent:1} and despite all efforts with the /killall command I can't get rid of it...  The server is running Spigot 1.8.4 with Essentials, EssentialsSpawn, PermissionsEX, WorldEdit and Multiverse (Core, SignPortals and NetherPortals). Essentials and PEX are the correct versions made by the Spigot team to work on 1.8.*.  The world this is on is a Superflat normal world (/mvcreate Hub normal -t superflat if that helps).  Thanks in advance.

So I used the command /summon EnderDragon ~ ~ ~ {NoAI:1} so that I would have an Ender Dragon that would just sit there.    I then wanted to get rid of it, but doing /killall EnderDragon didn't work, neither did /killallnpc, and I can't seem to do any damage, even with a diamond sword and maximum strength using commands.    I'm not sure why I can't get rid of it; I think it's because the dragon has no AI, but I need to get rid of it somehow, any ideas?


related to  I think. I'm trying to understand the distinction between "shall" and ""shalt" but only in a specific case: In the final line of John Donne's Holy Sonnet, "Death be not proud" he writes,  And death shall be no more; Death, thou shalt die.  He uses both forms. I can guess at all sorts of possibilities, including biblical allusion, but all I have is guesses. Is there any difference in meaning between the two on a grammatical level, or should I be posting this on a literature board for poetic interpretation?

In Shakespeare's Macbeth, the Third Witch says to Banquo: "Thou shalt get kings, though thou be none" (1.3.65); if I want to quote that line and write it in the third person singular, how should I conjugate the verbs "shall" and "be" correctly?


I want my download folder to be ordered in the following way: Top left corner I want the last downloaded file and bottom right corner the oldest. Right now, I always have to right-click inside my download folder and do the following: Clean up by -> date created. This is annoying - how can I have my download folder sorted in such way by default?

Some directories make sense to be sorted by date modified, while others make more sense to be kept sorted alphabetically.   How can I make it so that finder will apply a specified sort by selection on a per-directory basis?   If no such feature exists (In which case I hope somebody at APPL is paying attention), I suppose using/remapping the keyboard shortcuts (Defaults being Cmd+Ctrl+5 for Modified and Cmd+Ctrl+1 for Alphabetical by Name) is the next best thing.


I've done a wp_query in a shortcode. So, in page xyz I've two wp queries, one is the main query, and other's mine. The SQL query that I got from the query doesn't fit my desired affect. So I need to filter the query clauses to inject my conditions (I think that's the only way I've now, even though it's my custom query). All the answers I've got are using pre_get_posts with a $this->is_main_query(), but that doesn't fit my case, I think.  How can I target that specific query using posts_clauses filter?  I've seen a random number in query_vars_hash like 281f08ffcd75c8.... Is that a unique identifier so that I can specifically target my specific query?

I was reading 's excellent answer to  regarding the use of WP_query(), query_posts() and pre_get_posts.  He says "pre_get_posts is a filter, for altering any query. It is most often used to alter only the 'main query'."  It is possible to use pre_get_posts to filter only a specific secondary query created with WP_Query? eg.  $my_secondary_loop = new WP_Query(...); if( $my_secondary_loop->have_posts() ):     while( $my_secondary_loop->have_posts() ): $my_secondary_loop->the_post();        //The secondary loop     endwhile; endif; wp_reset_postdata();   Any help much appreciated.


Refer to the given example:   Code:  var Person = function (name) {     this.name = name; } var john = new Person("John"); console.log(Person.prototype);//Object{}    console.log(john.prototype);  //undefined   Person is a function so its prototype would be derived from object so its understandable that it gives an Object in return (which further has Constructor & proto) as its properties.   Coming to second console statement. As, john is an instance of Person, therefore it must have the same prototype as Person has. Means, I should have got an object in return. How am I getting undefined? Can someone explain?

I'm not that into dynamic programming languages but I've written my fair share of JavaScript code. I never really got my head around this prototype-based programming, does any one know how this works? var obj = new Object(); obj.prototype.test = function() { alert('Hello?'); }; var obj2 = new obj(); obj2.test();  I remember a lot discussion I had with people a while back (I'm not exactly sure what I'm doing) but as I understand it, there's no concept of a class. It's just an object, and instances of those objects are clones of the original, right? But what is the exact purpose of this ".prototype" property in JavaScript? How does it relate to instantiating objects? Update: correct way var obj = new Object(); // not a functional object obj.prototype.test = function() { alert('Hello?'); }; // this is wrong!  function MyObject() {} // a first class functional object MyObject.prototype.test = function() { alert('OK'); } // OK  Also these  really helped a lot.


I assume Kirk (and his crew) have got to get some rest after a long day of investigating new planets and hassling other ships in space, so who is flying the Enterprise when Kirk and his crew are asleep?  Not concerned with what the crew does on duty, but rather what someone else does when Kirk's crew is off duty.

It's implied that the Enterprise bridge crew, in any of the TV series, spend long durations at their duty stations, either sitting or standing.  What exactly are they doing for hours on end while the Enterprise is en route between destinations? Is it me or does this seem like an incredibly tedious if not fatiguing job, sitting in a chair staring at the same view screen? Couldn't these tasks be automated?


Hope you can help me, 'cause this problem really made me sick already.  Hardware: Asus X555SJ (Dualcore Intel celeron 2166MHz, GeForce GT920 1GB, RAM 4GB) Systems: Windows 10 LTSB x64, Ubuntu 16.04.1 i386.  Here's the problem: when i try to reboot ubuntu, i see the ubuntu logo, then the screen gets black, and that's all that happens. The notebook still works and never turns off. When i'm shutting down ubuntu, i see the ubuntu logo on screen, but the screen doesn't fade out, i can observe the logo for hours and nothing happens either. In both cases I have to poweroff the notebook with a button. I've read couple of articles, tried to sudo shutdown, sudo reboot, but it didn't help. The problem still remains. Any ideas? Some people suggest to do sudo apt-get update, sudo apt-get upgrade, tried that too. Failed. All the updates/upgrades install correctly but it doesn't solve the problem. Any help will be useful!  ps. sorry if it's hard to read, may be mistakes, i'm not a native englishspeaker and writer =)

My Ubuntu 16.04 hangs on shutdown/restart requiring me to press and hold the power key to turn the machine off... I don't know how to report this as a bug and what commands to run to show the necessary hardware/sys log info? Any help would be hugely appreciated!


I am curious what justifies the use of shorthands or abbreviations for certain formulas in first order logic. In particular, I'm interested in building up some basic mathematical principles from the zfc axioms and there's many times when a new symbol is introduced which expresses some logical statement more succinctly. My question is how this is logically or syntactically justified. For example, in the Wikipedia article for  under the Axiom of Extensionality it is stated that $x=y$ can be taken to be shorthand for  $$ \forall z[ z \in x \Leftrightarrow z \in y] \land \forall w [ x \in w \Leftrightarrow y \in w] \hspace 1in (1) $$  The way I interpret that is anywhere we see the above expression we can delete it and "plug in" $x=y$.  My questions are as follows.  First, is there a way to notationally indicate that the expression $x=y$ and the expression in $(1)$ are related in such a way (logically equivalent?) that one can (without any intervening steps?) simply replace one by the other in any expression?  Second, which rules of logic allows us to create definitions like $x=y$ and which rules allow us to make the replacements indicated above?  As a slightly simpler example or a hint at what I feel might be the answer, suppose we have the two axioms  $$ B \Leftrightarrow C $$ $$ A \land B $$  Now in a few lines we could derive $A \land C$. However, it seems to me that if we have ANY formula involving $C$ we could in some number of lines derive the same expression but with $B$ replaced by $C$. This would especially be useful in very complicated expressions where $B$ might be embedded pretty deeply in the expression and it would be hard to get at $B$ to replace it with $C$ using the usual rules of deduction. Is there something that allows us to replace all instances of $B$ with $C$ if we have an expression like $B \Leftrightarrow C$.  I would appreciate someone pointing me towards the correct concepts I should be looking up and some proper notation for the concepts I am trying to express!  Also note: I don't really know the meaning of things like $\vdash$, $\vDash$, or the difference between $\leftrightarrow$, $\Leftrightarrow$, $=$, $\equiv$, which are sometimes brought up as having different meanings. Maybe these different meanings are key to my question.

What I am thinking about is how in a textbook/proof/theorem/discussion/definition one states that from now on a new notation will be used in the appropriate scope.   Example:      Let $V^*$ denote the dual of a vector space $V$   although the above is a widely accepted notation, we could always choose to redefine it (however ill-advised that is)     Let $G$ be a group with group operation $(x,y)\mapsto (x,y)+$   stating that i will be using a post-fix notation.  Also there is a function application notation $(f,x)\mapsto f(x)$, but we may override it, as is done when considering sequences $(a,n)\mapsto a_n$.  $\textbf{Question}$: How can this "introduction of new notation" be formalized?


I am working on a problem in which I have to use the table I want to update in a subquery. Can you help me find a solution? UPDATE employees_clients AS ec2 SET ec2.employee_id = (CASE WHEN ec2.client_id = ec2.employee_id  THEN (SELECT e.id  FROM clients AS c  JOIN employees_clients AS ec  ON ec.client_id = c.id  JOIN employees AS e  ON e.id = ec.employee_id  GROUP BY e.id  ORDER BY count(e.id),e.id  LIMIT 1)  END);  Error Code: 1093. You can't specify target table 'ec2' for update in FROM clause I found a solution to the problem I created a virtual table.     CREATE VIEW v_employee_with_min_clients AS     SELECT e.id     FROM clients AS c     JOIN employees_clients AS ec     ON ec.client_id = c.id     JOIN employees AS e     ON e.id = ec.employee_id     GROUP BY e.id     ORDER BY count(e.id),e.id     LIMIT 1;  SET SQL_SAFE_UPDATES = 0; UPDATE employees_clients AS ecl SET ecl.employee_id = (SELECT * FROM v_employee_with_min_clients) WHERE ecl.client_id = ecl.employee_id;

I have a table story_category in my database with corrupt entries. The next query returns the corrupt entries:  SELECT *  FROM  story_category  WHERE category_id NOT IN (     SELECT DISTINCT category.id      FROM category INNER JOIN         story_category ON category_id=category.id);   I tried to delete them executing:  DELETE FROM story_category  WHERE category_id NOT IN (     SELECT DISTINCT category.id      FROM category        INNER JOIN story_category ON category_id=category.id);   But I get the next error:      #1093 - You can't specify target table 'story_category' for update in FROM clause    How can I overcome this?


Let $G_1,\cdots, G_n, \cdots$ metrizable topological groups. Prove that $G= \prod_{n\in \mathbb N} G_n$ is also a topological group.   My book does not define the operations that we should have in $G$. So I will state them (as they naturally should be) and give an attempt to show that they are continuous.   Define $\mu: G\times G \rightarrow G$ given by $\{(a_i)_{i\in \mathbb N}, (b_i)_{i\in \mathbb N}\} \mapsto (a_i\cdot b_i)_{i\in \mathbb N}$ and $\phi: G\rightarrow G$ given by $(a_i)_{i\in \mathbb N} \mapsto (a_i^{-1})_{i\in \mathbb N}$.   I will only prove that $\mu$ is continuous (to the other function the argument is similar). It is then sufficient to show that for every $j\in \mathbb N$ the function $\mu_i = p_i \circ \mu$ is continuous. Hence, given $j$ we see that $\mu_j((a_i)_{i\in \mathbb N}, (b_i)_{i\in \mathbb N}) = a_j\cdot b_j = m(a_j,b_j)$, where $m: G_i \times G_j\rightarrow G_j$. Since $G_j$ is a topological group, we have (by definition) that $m$ is continuous, which shows that $\mu_j$ is also continuous. Hence comes the continuity of $\mu$.  Is this proof fine? Am i missing something?

Let $\mathcal G= \{G_\alpha: \alpha < \kappa\}$ be a family of topological groups. My question is this:     Is the topological product $\Pi \{G_\alpha: \alpha < \kappa\} $ a topological group?   Thanks ahead.


I am trying to add 7 days to the entire date object, but it does not work. I keep getting the same date plus the number I am trying to add at the end.     var d = new Date();     for(var i = 0; i < 5; i++) {       var dat = new Date(this.valueOf());       dat.setDate(dat.getDate() + i);       console.log(dat);     }

How to add days to current Date using JavaScript. Does JavaScript have a built in function like .Net's AddDay?


I have this code: #include <iostream>  class A { public:     virtual void foo() {         std::cout << "this is A" << std::endl;     } };  class B : public A { public:     void foo() {         std::cout << "this is B" << std::endl;     } };  int main() {     A obj = B();     obj.foo();     std::cin.get();     return 0; }  The desired output is this is B, but I am getting this is A. It works when obj is A*, but is there a way to get this is B while keeping obj A?

Someone mentioned it in the IRC as the slicing problem.


If $n$ is a positive and composite integer, can I prove that $n - 1$ does not divide $n$ for all $n$?  If not, can you give me a counter example?    I was trying to prove it by contradiction, but I was just running in a vicious circle.   Any hint or solution please?

Given: $a = qb + r$. Then it holds that $\gcd(a,b)=\gcd(b,r)$. That doesn't sound logical to me. Why is this so?    Addendum by LePressentiment on 11/29/2013: (in the interest of  and averting a duplicate)  What's the intuition behind this result? I only recognise the proof and examples solely due to algebraic properties and formal definitions; I'd like to apprehend the result naturally.


Here's my issue and someone can help me understand it so I can program it correctly.  I have a point(X,Y) on an Elliptical Curve E(a,b) where a=-3 and B is a large number that is in hexidecimal from -51BD.  To compress this point oficially in a program, we know that every X on  the curve has two Y's, one even and one odd.  Therefore, we only need to store whether the corresponding Y point we are storing is even or odd.  So to store the point (X,Y) now, we shift X ridding of it's most significant bit and add 1 if the Y point is odd.  Therefore, one can think of the compressed point  being 2*X+B(B is the bit we added if it was odd or even) since the multiplication by 2 is implied because of the shift.  I understand this completely, it's recovering the original point that has me confused.  Since a point on the curve is given by the equation y^2=x^3+ax+b, we can find square roots officially in GF(p).  The following is from my spec which confuses me  If p is prime and congruent to 3 mod 4, one of it's square roots is z^((p+1)/4) mod p and the other is p-z^((p+1)/4) mod p. How would I solve this?What is z?  For example, I know how to extract the x point so let's say I simplify the right side of the equation to be 7 and p is 11. Would I be trying to solve for the square root that's equal to 7 mod 11?  I tried to be very detailed to express my difficulty. Thanks for any help

I have a point $(X,Y)$ on an elliptical curve $E(a,b)$ where $a=-3$ and $B$ is a large number that is in hexadecimal from -51BD. To compress this point oficially in a program, we know that every $X$ on the curve has two $Y$'s, one even and one odd. Therefore, we only need to store whether the corresponding $Y$ point we are storing is even or odd. So to store the point $(X,Y)$ now, we shift $X$ ridding of its most significant bit and add $1$ if the $Y$ point is odd. Therefore, one can think of the compressed point being $2 \cdot X+B$ ($B$ is the bit we added to tell if $Y$ was odd or even) since the multiplication by $2$ is implied because of the shift. I understand this completely. It's recovering the original point that has me confused.  Since a point on the curve is given by the equation $y^2=x^3+ax+b$, we can find square roots officially in $\mathrm{GF}(p)$. The following from my spec is what confuses me.  If $p$ is prime and congruent to $3$ mod $4$, one of its square roots is $z^{(p+1)/4} \bmod p$ and the other is $p-z^{(p+1)/4} \bmod p$. How would I solve this? What is $z$?  For example, I know how to extract the $x$ point so let's say I simplify the right side of the equation to be $7$ and $p$ is $11$. Would I be trying to solve for the square root that's equal to $7$ mod $11$?


is it possible to tell network manager to run a script when network connection gets down (and it can't reconnect)?  e,g: I have A bug in my network card driver, and sometimes NM fails to connect,  a script can fix it` and I want it to be run each time network-manger can't connect, how do I do it?

I often mount a remote drive using sshfs. I would love to have this mount automatically. However, if I mount it in my .bashrc or startup scripts, the mount often fails because my wireless internet connection has not yet been made.  Does anybody know of an easy way to execute a bash scrip every time the connection is made, or to auto-mount an sshfs drive?


We have a 4 Node multi Subnet Availability Group. When i go to the Cluster Manager I could see the Current host server is the Node 4  whereas the AG Primary node is Node 1. Will the AG go down if Node 4 goes down ?  Please advice whether is this a normal behavior and will there be in any problem if i move all the cluster resources to the primary node during production.

I'm building up a SQL Server AlwaysOn AG and I'm on the step "failover", manual and automatic:  I noticed that in the Windows Server Failover Cluster a "Current Host Server" exists. My knowledge says that this is the "master" of the cluster that the cluster hosts. But now I noticed that the "Owner Node", which hosts the Availability Group(-role) a other node could be. (The owner node is also the primary instance of the AG, right?)  Now for me there exist two questions for the normal operating of an AlwaysOn AG:  Q1: Should the "Current Host Server" the same as the Owner Node of the AlwaysOn AG?  Q2: Imagine if I want to maintain a host. Shall I first failover the AG (via SSMS or with ALTER AVAILABILITY GROUP...) to the second node/another node and at second a failover of the WSFC-Current Host?  Maybe someone could help me with this questions and give me some advice.  Thanks


SSMS Version 17.9.1 It looks like the intellisense may not be working? Shouldn't it auto complete Select etc? Also, it looks like the intellisense is from SSMS itself (doesn't work that great)  I've checked the Intellisense setting and it's there just fine, also put the cache size on unlimited

This problem is really proving to be a tricky one (and quite annoying).  In SQL Server Management Studio 2008, up until a few days ago my IntelliSense was working great.  Then all of a sudden it stopped.  The icon as it as enabled on the toolbar menu, and under Tools -> Options -> Text Editor -> T-SQL -> IntelliSense it says it is enabled there.  I have tried refeshing the IntelliSense cache with Ctrl-Shft-R but that doesn't work either.  Any ideas what happened to my IntelliSense and what I need to do to get it back?


How can I convert a git hash to a byte array with length 20 in C#? At the moment I represent the git hash as a string:  string gitHash = "0x29932f3915935d773dc8d52c292cadd81c81071d";   I have tried this:  byte[] gitHashBytes = System.Text.Encoding.ASCII.GetBytes(gitHash); Array.Resize(ref gitHashBytes, 20);   But I actually want to convert the hex number to the byte array and not the string representation of it.  I need this to save the git hash in a smart contract where I am using bytes20 as data structure.  Why does the way I tried it above not work and just cut off the the hash after 20 digits? And what's the difference to the conversion in the proposed answer here:

Can we convert a hex string to a byte array using a built-in function in C# or do I have to make a custom method for this?


I have a very long LaTeX document with many tables, figures, etc.  When I have a long table on the following site (which means it doesn't fit on the current site) the elements (paragraphs, tables, figures...) on the current site are pulled apart, so that the first element is at the top of the page and last one at the bottom,with large white spaces inbetween each element.   Is it possible to change this, so that in such a case the elements would be as normal at the top with just aone large white space at the bottom of the page?

I'm writing my bachelor-thesis and have a couple of small sub-sub-sections explaining conversions, like in the following  \subsubsection*{Assignment}  This document only explains non-compound assignments. The other kind, i.e \texttt{a += b}, is supported by the language too, but is not yet implemented.   \begin{itemize} \item If the first is an \texttt{auto} variable, no conversion takes place when assigning       the right hand side to the variable designated by the left hand side.  \item Otherwise, an assignment conversion takes place converting the given value to the type       of the designated variable.  \item Assignment requires an lvalue as the left hand side, and yields an lvalue result.  \end{itemize}  \subsubsection*{Multiplication} % ...   But latex renders it quite ugly with much space in between the items. I think it does so to fit the whole page. How can I tell it not to do so? Is what I'm doing right at all?


I'm practicing proving that various sets are (or aren't) Dedekind cuts.  I am struggling with showing the property that there is no largest element.  For example, for a simple Dedekind cut:  $A=\{{a\in\mathbb{Q}:a^2<2}$ or ${a<0}\}$  what is a good general method for showing that: if ${a\in A}$, there is a ${b}$ in ${A}$ with ${a<b}$

First, my apologies if this has already been asked/answered.  I wasn't able to find this question via search.  My question comes from Rudin's "Principles of Mathematical Analysis," or "Baby Rudin," Ch 1, Example 1.1 on p. 2.  In the second version of the proof, showing that sets A and B do not have greatest or lowest elements respectively, he presents a seemingly arbitrary assignment of a number $q$ that satisfies equations (3) and (4), plus other conditions needed to show that $q$ is the right number for the proof.  As an exercise, I tried to derive his choice of $q$ so that I may learn more about the problem.  If we write equations (3) as $q = p - (p^2 - 2)x$, we can write (4) as   $$ q^2 - 2 = (p^2 - 2)[1 - 2px + (p^2 - 2)x^2]. $$  Here, we need a rational $x > 0$, chosen such that the expression in $[...]$ is positive.  Using the quadratic formula and the sign of $(p^2 - 2)$, it can be shown that we need   $$ x \in \left(0, \frac{1}{p + \sqrt{2}}\right) \mbox{ for } p \in A, $$  or, for $p \in B$, $x < 1/\left(p + \sqrt{2}\right)$ or $x > 1/\left(p - \sqrt{2}\right)$.  Notice that there are MANY solutions to these equations! The easiest to see, perhaps, is letting $x = 1/(p + n)$ for $n \geq 2$.  Notice that Rudin chooses $n = 2$ for his answer, but it checks out easily for other $n$.  The Question:  Why does Rudin choose $x = 1/(p + 2)$ specifically?  Is it just to make the expressions work out clearly algebraically?  Why doesn't he comment on his particular choice or the nature of the set of solutions that will work for the proof?  Is there a simpler derivation for the number $q$ that I am missing?


I have a Postgres database that was developed over time, adding tables and keys when needed. Now I'm using a tool (Enterprise Architect) to document it. The tool allows to create automatically the SQL needed to re-create the database. I want to know if the database that I create and the original one have the same structure (same tables, same primary keys, same foreign keys etc). I'm not interested on data contained in database, only in structure. Is there a way to check if two different databases have the same structure?

I occasionally download publicly available data sets in the form of Postgres dBs.   These datasets are updated/modified/expanded over time by the repository host.    Is there a Postgres command or tool (ideally FOSS) that can show the differences between an OLD and NEW Postgres database ?  (A working assumption is that 95% of the entries are unchanged and that the tables and relationships also do not change).


I have an array, and I want to compare elements between each other, but want to avoid comparing them more than once, so in other words, once I compare array[0] with array[1], I don't want to compare again array[1] with array[0], I will end up having this code:  for(var i:int = 0; i < array.lenght; i++){       var entity:Object = array[i];        for(var j:int = i; j < array.lenght; j++){            //do stuff        }    }   This is not O(N^2), maybe it is O(logN)?. What method do you use to calculate this?.

What is the Big-O time complexity of the following nested loops: for (int i = 0; i < N; i++) {     for (int j = i + 1; j < N; j++) {         System.out.println("i = " + i + " j = " + j);     } }  Would it be O(N^2) still?


This code snippet:  Math.pow(10,20)+20000 == Math.pow(10,20) + 10000   evaluates to true. Is this a JS bug?

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


How to insert bash variables in awk (for example i need to do in in some for loop - like this: in first iteration use awk to search string by first column, next by second column and so on with using diffent pattern from bash variables in awk)   or   find the simple way to make pattern at all (as string) and recieve it to awk as argument.     Trying to insert bash variables in awk -  I have some log -  $ cat > log test1 test2 ahaha hahah   i do  $ cat log | awk '$1~/test1|test2/ {print }' test1 test2   all ok  i need to paste bash variables in awk  $ a=test1 $ b=test2   then i try to insert  $ cat log | awk 'BEGIN{a;b} $1~/a|b/ {print }' ahaha hahah  $ cat log |  awk -v a=test1 -v b=test2 '$1~/a|b/ {print }' ahaha hahah     How to make all patern as string and recieve it to awk as argument -  $ p='$1~/test1|test2/ {print }'  $ cat log | awk p # get test1 # get test2

Having the following in one of my shell functions:  function _process () {   awk -v l="$line" '   BEGIN {p=0}   /'"$1"'/ {p=1}   END{ if(p) print l >> "outfile.txt" }   ' }   , so when called as _process $arg, $arg gets passed as $1, and used as a search pattern. It works this way, because shell expands $1 in place of awk pattern! Also l can be used inside awk program, being declared with -v l="$line". All fine.  Is it possible in same manner give pattern to search as a variable?  Following will not work,  awk -v l="$line" -v search="$pattern" '   BEGIN {p=0}   /search/ {p=1}   END{ if(p) print l >> "outfile.txt" }   '   ,as awk will not interpret /search/ as a variable, but instead literally.


How do I import an EXR image sequence? (assuming I'm doing it wrong). ie.Compositing tab-> Input> Image Sequence> Open etc? My .exrs are not displaying. I also tried in the Video Editing tab-> Add>Image Sequence & nothing displays. Trying to re-import my rendered OpenEXR. Float (Full).  FIXED: I used Renamer to add-in .exr to the end of all the files & it does import in fine.

First image is render setting. And second image is output file. That file should be png file but, it is not.


I need to install Windows 10 for some work but I already have Ubuntu 20.10 installed on my HDD. All the space on the HDD has been allocated so no free space. I read that it's better to install Windows first then Ubuntu. So my plan is to back up my entire Ubuntu OS to an external drive using Timeshift, then to install Windows and reinstall Ubuntu and once this is done restore the Ubuntu system using Timeshift. Will this work? My concern is that GRUB will be affected and also fstab with existing partitions assigned, as I think these will change after Windows/Ubuntu installation. Is there a better way to do this while retaining my entire Ubuntu OS? Output of lsblk:

I have Ubuntu on my laptop. Now I want install Windows 7 in a dual-boot. How can I do this? I can't lose my Ubuntu files, and I'm afraid that I might break . Go  for UEFI only!


Question: Let $B^n \subset \mathbb{R^n}$ be open ball in the Euclidean metric. Prove that the complement of $B^n$ in $\mathbb{R^n}$ has exactly one unbounded component (components of a set are class partitions defining largest connected sets...).   This is an exercise of the book 'C. Adam - Topology'. Obviously, it does not hold for $n=1$, since $\mathbb{R}-(-a,a)$ is disconnected and is made of TWO unbounded components. But for the case of $n=2,3$ it is easy to prove that the conjecture holds (each 'side' of the open balls is homeomorphic to $\mathbb{R^n}$ and has non-empty intersection with its neighbour-side...)  How to elevate the conjecture for the case of $n\ge 4$, since it is not possible by intuition?    Thank you.  EDIT - This is not dublicate, since my question is about complement of an open ball not a bounded set in general. I read  before I wrote my question; the answer doesn't prove $\mathbb{R^n}−B^n$ is connected, which I need to prove.

Let $B$ be a real Banach Space whose dimension is at least $2$, and let $S$ be a subset of $B$ that is an open ball. Is the complement of $S$ (with respect to $B$) always connected?  Idea One could then perhaps make use of the facts that every $2$-dimensional Banach space is homeomorphic to the Euclidean plane and that - for the Euclidean plane - my question has an obvious "YES" answer (since every open ball is the interior of a circle).


The professor I want to work with for my PhD has recently changed status to Professor Emeritus. Would it still, in principle, be possible to do my PhD under his supervision or this just not possible?  Could I just email him and ask whether he still supervises PhD dissertations?   Or this regarded rude? I am not sure what exactly it means to be Emeritus I am afraid. How would I go about this?

Recently, a graduate position, supervised by an emeritus faculty member has been offered to me. The aforementioned professor is one of the most famous contributors of his field on the planet for over 3 decades, but his age is over 75...  Some people just advise that the old faculty members would not capable of the active research and support of the graduate students and one better tries to inhibit cooperation with them.  The others asserts that the worthy and coherent experience and cumulative knowledge of such people shall be grabbed by graduate students by working with them!!!  I just struggled to contact with his current and former students to know his code of ethics, specifically, but they refrain from answering me.  Does someone have any experience to pass graduate studies under supervision of such aged emeritus faculty members?


In the following code :  magicnumber = 256 for n in range (500):     if n is magicnumber:         print ("the magic number is " , n)         break     else:         print(n)   The loop breaks at 256, but if you set magicnumber to 257, it doesn't. Why ?

My  has failed me.  In Python, are the following two tests for equality equivalent?  n = 5 # Test one. if n == 5:     print 'Yay!'  # Test two. if n is 5:     print 'Yay!'   Does this hold true for objects where you would be comparing instances (a list say)?  Okay, so this kind of answers my question:  L = [] L.append(1) if L == [1]:     print 'Yay!' # Holds true, but...  if L is [1]:     print 'Yay!' # Doesn't.   So == tests value where is tests to see if they are the same object?


I was looking at what files are on my hard disk, and saw that  C:\Users\<username>\AppData\Roaming has over 1 GB worth of files under it (found by a dir /s/a  command).  What is the purpose of this folder, and is it okay to delete the files and folders under it, or not?

I have a workstation running Windows Server 2008 that's logged into an  domain, and I have a dual boot with Ubuntu Linux. When running Linux, I'd like to be able to use the same Thunderbird profile I use under Windows, so I pointed Thunderbird to use a profile I found under:  \Users\(myname)\AppData\Local\Thunderbird\Profiles   It turns out it was not the correct profile -- it had the right configuration, but the Inbox was an old version. I eventually found out the correct path was:  \Users\(myname)\AppData\Roaming\Thunderbird\Profiles   What's the rationale behind those different places to store application data?


My family and I are traveling to Dubai via Istanbul from Abuja, Nigeria. The layover is 12 hours. We have 2 little children, 1 infant and a senior in our party, all on Nigerian passports. I want to know if we require a transit visa and whether the facilities in the transit area good enough to stay there 12 hours if we decide to. We are flying Turkish Airlines.

I have an Indian passport and am planning to visit Germany with a valid visa. To book a flight for Germany (Mumbai – Dusseldorf), I came across some connected flights that stop at Istanbul.  Do I need to have visa for Turkey?  This is the first time I am travelling outside my country, and any information on this will be helpful.


Any Ideas how to setup a IP4200with Ubuntu 12.04 64bit?  As far as I know, there is no official driver by canon.   oneiric is not working  Hope somebody can help me, thanks.

I tried to install the MP190 drivers, but appeared a message show me that requires to have libcupsys2. I understand that libcup2 is an update of libcupsys2.   How do I solve this? Are there proprietary drivers for my Canon printer or scanner?