Let $k$ be a field and $m>n \in \mathbb{N}$. Then any morphism of schemes $\mathbb{P}^m_k \rightarrow \mathbb{P}^n_k$ is constant.  What I know is that every morphism from a scheme $X$ to $\mathbb{P}^n_k$ corresponds $1:1$ to isomorphism classes of invertible sheaves $\mathcal{L}$ on $X$ and generating sections $s_0,...,s_n \in \Gamma(X,\mathcal{L})$.  What I'm thinking is also that $\mathbb{P}^m_k$ cannot be generated by $n+1$ sections.

i'm currently working my way through  and stuck at Exercise 7.9 b)     Let $f: \mathbb{P}^n \to \mathbb{P}^m$ be a morphism Prove:   If $ n > m $ then $f$ must be constant   I found this old thread  and would like to proceed by showing that for an affine subset $\mathbb{A}^n \subset \mathbb{P}^n$ we know that the morphism $f$ restricted on the subset has the form $f(x) = (f_1(x),...,f_m(x))$ for homogeneous $f_i$. So i would like to show what was mentioned in the first commentar that the $V(f_1,...,f_m)\setminus \{ 0 \}$ is not empty and hopefully inside my affine subset. Would this be a possible solution for this exercise and how can i do it?


I requested a credit line increase with BOFA. I am self-employed, and they asked for my expected income. I got the credit line increase, and the rep said he was required to send the income information to the federal government. How long have they been doing this? This is the first time I have been told this, and I have many cards and excellent credit.

So I received an e-mail today from a bank from whom I have an existing credit card as follows:     To consider you for a future credit line increase, federal regulations   require us to have your current income.      Keeping your account info up to date is always a good idea. Plus, it   helps us meet federal regulations, which require us to collect updated   income info before reviewing your account for future credit line   increases. So please take a moment and update your income in about 60   seconds.   As far as I can tell, the email is legit because it includes security information in the e-mail that checks out. Of course, I still am not following any links in that e-mail just in case.  Does anyone here know what the backstory is on this? Was there recent regulation passed where card issuers need to know your income level?   Or maybe I'm wrong and this is just a phishing attempt?


So, I needed to figure out how "exec" works. However, doing man exec brings me to a 99% useless man page describing what bash builtins are. It of course also does this with many other man pages such as cd, chdir, etc..   How can I look up the manual page for the actual utility I'm interested in, not the builtins man page?  My OS is Mac OSX, but I've had this on other operating systems as well

Is there anywhere you can download a manpage for every builtin commands?  I know you can just use help or man bash and search to find info about it, but I want them separated, so I can just do man read and get the read manpage.


I keep hearing that  less megapixels = better ISO performance, because larger pixels capture more light  Suppose I shot something with a 4MP sensor and then downscale it to 1MP (4-to-1 pixel binning?). Would that give me the same noise performance of a 1MP sensor of same size and technology? Since noise would average out when downscaling. In other words, are high res sensors still better because they...  can capture more detail in good lighting conditions result in same quality shot in low-light (after downscaling)  PS: Of course, I would rather use a denoise algorithm over downscaling. I'm just trying to understand if the above argument is valid.

With the release of the Canon EOS R5/R6, there have been many saying that they prefer the 20MP R6 camera over the 45MP R5 camera, due to its lower price but also because of "better low-light performance." In camera comparison sites, I've also seen the sentiment that bigger pixels (lower resolution) = better low light performance. However, is this a myth? Here is my reasoning for this. Let's say that there are two full-frame sensors, one 20MP sensor and a 80MP sensor. According to many people, the 80MP sensor would be terrible for low-light photography since the pixels are smaller. However, each 2x2 block in the 80MP sensor could be mapped, and in post averaged to a 1x1 pixel, effectively making the image into a 20MP image. This could also be done in-camera as an option. Would this image have just the same amount of usable information as the image from the 20MP sensor? In other terms, since both sensors are 35mm sensors (i.e. equal area), the amount of light falling onto the sensor is the same. So, at the end of the day, there will be no difference between a 20MP image and a 20MP image that has been downsampled from 80MP, right? So their low-light performance would be the same. You even get an advantage from having the option to get 80MP photos if you wanted. Why do people say that a lower-resolution camera has better low-light performance, when it should theoretically be the same as one with higher resolution (all other factors equal)? Note: this question is about sensors with the same size but with different pixel density. Hence, it is different from  asking about different sensor sizes. I am aware that a full-frame camera will have better low-light signal due to its bigger area than an APS-C sensor, but what about the similarly sized sensors?


Inspired by . Why does Linux need both /dev/cdrom and /media/cdrom?  Why not just access files on the cdrom through /dev/cdrom?

I understand what mounting is in Linux, and I understand device files. However I do not understand WHY we need to mount.   For example, as explained in the , using this command:  mount /dev/cdrom /media/cdrom   we are mounting the CDROM device to /media/cdrom and eventually are able to access the files of CDROM with the following command  ls /media/cdrom   which will list the content of the CDROM.  Why not skip mounting altogether, and do the following?  ls /dev/cdrom   And have the content of the CDROM Listed. I expect one of the answers to be: "This is how Linux is designed". But if so, then why was it designed that way? Why not access the /dev/cdrom directory directly? What's the real purpose of mounting?


I'm studying the proof that path-connectedness implies connectedness. However there is one assertion that I don't understand. Let $f:[0,1] \rightarrow X$ be a continuous mapping where $X$ is a metric space. Let $U$ and $V$ be two disjoint subsets of X such that $X = U \cup V$. I don't understand why $f^{-1}(U) \cap f^{-1}(V) = \emptyset $. Is it because: $$ \emptyset = f^{-1}(\emptyset) = f^{-1}(U \cap V)=f^{-1}(U) \cap f^{-1}(V)$$ That makes sense but I thought the last equality $f^{-1}(U \cap V)=f^{-1}(U) \cap f^{-1}(V)$ only holds iif $f^{-1}$ is injective. Does that mean $f^{-1}$ is injective or am I missing something? Or is it because $f$ is continuous? For a reference to the proof:

Assume $f:A\to A'$ is a function, $B\subset A'$, $C\subset A'$, and $f^{-1}(B\cap C)=\emptyset$  How can we see that $f^{-1}(B)\cap f^{-1}(C)=\emptyset$?


Where is the mistake?  Statement: For $n\in \mathbb{N}_{0}$ is $2n=0$.  Bais: Show that the basis holds for $n=0$ : $2*0=0$.  Assumption: The statement is valid for all $k\leq n$ : $2*k=0$ for all $k \leq n$  Inductive Step: For $k = n+1$ is $k=a+b$ for two natural numbers $a,b \leq n$. It is $2(n+1) = 2a + 2b = 0+0=0$.  It is obviously wrong. I have a few ideas but I would like to be sure where the exact mistake is.  The first thing I noticed was that in this equoation $2(n+1) = 2a + 2b = 0+0=0$ the left side $2(n+1)$ is always positive but the right side isn't.  I cant find a mathematical mistake here so I thought the Assumption is wrong. I always thought the Assumption is valid for a specific n. It is is indeed freely selectable but specific. Is that right and is that the problem with this induction?   If it isn't - maybe it might be the fact that there aren't two natural numbers below 1 that $ a+ b =k$ and thet you cant use the assumption two times?

This is my last homework problem and I've been looking at it for a while. I cannot nail down what is wrong with this proof even though its obvious it is wrong based on its conclusion. Here it is:     Find the flaw in the following bogus proof by strong induction that   for all $n \in \Bbb N$, $7n = 0$.      Let $P(n)$ denote the statement that $7n = 0$.      Base case: Show $P(0)$ holds.      Since $7 \cdot 0 = 0$, $P(0)$ holds.      Inductive step: Assume $7·j = 0$ for all natural numbers $j$ where $0 \le j \le k$ (induction hypothesis). Show $P(k + 1)$: $7(k + 1) = 0$.      Write $k + 1 = i + j$, where $i$ and $j$ are natural numbers less than $k + 1$.  Then, using the induction hypothesis, we get $7(k + 1) = 7(i + j) = 7i + 7j = 0 + 0 = 0$. So $P(k + 1)$ holds.      Therefore by strong induction, $P(n)$ holds for all $n \in \Bbb N$.   So the base case is true and I would be surprised if that's where the issue is.  The inductive step is likely where the flaw is. I don't see anything wrong with the strong induction declaration and hypothesis though and the math adds up! I feel like its so obvious that I'm just jumping over it in my head.


I have the following piece of code, and I'm trying to use the input entered by the user in if/else statements later on:  String userGuess = JOptionPane.showInputDialog("The first card is "      + firstCard + ". Will the next card be higher, lower or equal?");   How can I use the word they input, i.e. "higher", "lower" or "equal" outside of the if/else statement that this code is in? The code I need their answer for is:  if (userGuess == "higher" && nextCard > firstCard) {     String userGuess = JOptionPane.showInputDialog(null, "Correct! The current card is a "                 + nextCard + ". Will the next card be higher, lower or equal?");     correctGuesses++; }   EDIT: Thank you for your help, I figured it out!

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


Prove the following statement using the contrapositive method. If $ n^2 $ is divisible by 3 then n is divisible by 3. I tried using contrapositive method by assuming if not b then not a, i.e., if n is not divisible by 3 then $ n^2$ is not divisible by 3. and prove it. Is this the correct way to do it or am I doing it wrong? If anyone could layout an explanation could be helpful. Thanks!

$n\in \Bbb N$ Prove that if $n^2$ is divided by 3, then also n can also be divided by 3.  I started solving this by induction, but I'm not sure that I'm going in the right direction, any suggestions?


Happy New Year all!  I was travelling in a public transport and saw the passenger notice. One of the statements on the notice has this information:     Passengers are advised to wear a surgical mask when having symptoms of   fever.   I am wondering why a singular object, i.e. a surgical mask is used. It sounds like to me that all passengers are advised to share the same surgical mask when aboard.  Could you explain it please?

"Separate students according to their academic performance(s)."   (For example, their test results.) Should I use singular or plural in this phrase?  I did some research, but the example  is quite different than mine.


I took the math subject test recently and conservatively speaking I think my score range is mid 60s-mid/high 70s percentile, although it is hard to say for sure. My biggest problem was running out of time towards the end; I'm usually not a fast test taker since I like to take my time and think through the problems (I know this is not recommended for a standardized test like the GRE, but old habits are hard to break). As a result I don't think I scored as well as I could have (or at least my score doesn't reflect my abilities accurately). I'm wondering if I should re-take the exam (the next testing date, and the only one before applications are due, is October 24th. This is before I will have received my test scores from September).  On the one hand, I think and hope that more practice will lead to a more desirable score. But on the other hand, I would rather spend my time (and not spend my money) on more interesting things like my classes and my honors thesis. I have also heard that taking the test twice may actually not be so great since if I don't score significantly better (or if I score worse) on the second try, it will reflect negatively on my application.  A bit about myself for context: My interests are in algebra/NT; however, I'd like to go to a school with a large grad program so I can be flexible in case I decide to change my research focus. I have a good deal of research experience (2 summers at REUs with results from one published, and the other in preparation for publication. Also I have done and am currently doing work with two professors from my undergraduate institution). I believe I have strong letters; my grades are good and I've been taking challenging courses (currently in some grad classes). The schools I've thought about applying to (but have not finalized on) are: BC (very small program but close to home and I like the faculty), BU, MIT, UCLA, UWisconsin-Madison.  My questions are:   Are the GRE scores important enough that I should re-take it? Or should I commit myself to other components of the application like grades/purpose letters? What are the range of schools that my (supposed) scores will be acceptable at (taking into consideration the other parts of my application as well)?   Any other advice or comments would be appreciated.

When applying to a PhD program in the US, how does the admissions process work? If an applicant is weak in a particular area, is it possible to offset that by being strong in a different area?  Note that this question originated from this . Please feel free to edit the question to improve it.


What is the difference between  I have seen people do it and I have seen people doing it?

Can anybody tell me the difference between the following two sentences:  He saw me talking to her. He saw me talk to her.  Please let me know if both the statements are valid and grammatically correct. If valid, please explain the meaning of both the statements and what is the difference between the two.


Can a Jedi manipulate electronics? For instance could they scramble the machine code running on a robot?   If they can't why not? They can manipulate physical objects so manipulating the insides of a computer shouldn't be a problem should it?

The Jedi can control objects with the mystical power called the Force without touching them.  In the movies you can see, that the Jedi or Sith are moving objects really fast and really well controlled from one place to another.  Now I'm wondering, why did Jedi or a Sith never use the Force to fight with a lightsaber, or with more lightsabers, or even to control other weapons like a laser gun without touching them? I imagine a Jedi or a Sith with 4 lightsabers around, all of them are floating in the air, controlled by him and the Force. Would this even be possible? What is the force really able to do?       Or, as mentioned in *Kid Dynamo", why don't they just yank the   supports out in a building and let that crush the people inside (or at   least force them to devote a lot of effort to keep from dying)?   Admittedly, Dooku did use something like that when he forced Yoda to   divert his attention to the pillar.


My linux(ubuntu 14.04) unexpectedly stopped working after reboot. I caught:  error: file '/boot/grub/i386-pc/boot.mod' not found.  Entering rescue mode ...    How to solve this? And what could be a reason for such problem? Ubuntu was loading updates when I initiated reboot.

error: file '/grub/i386-pc/normal.mod' not found. grub rescue>   What can I do? I just sit and stare at it.   I found my old netbook (Dell Inspiron 1010) which I have not used for about four years. I replaced Windows XP with Ubuntu 12.10. I used my bootable USB drive. I installed and rebooted. I got the message that normal.mod is not found.   What should I do? Type exit, reboot, or quit? Should I re-install?


Are there a distinct number of solutions to: $a^n-b^n=2^{100}$ If a, b and n are positive integers greater than 1 I have tried to solve it with code but it takes to long.  for ($a=3; $a -lt 5000; $a++) {     for ($b=2; $b -lt $a; $b++){         for ($n=2; $n -lt 200; $n++) {             $x=[bigint]::Pow($a,$n)-[bigint]::Pow($b,$n)             if ( [bigint]::Pow(2,100) -eq $x) {write-host $a,$b,$n}             }         }    }

How many triples $(x,y) \in \mathbb{N^+}^2$ and $n \gt 1$ are there such that $x^n - y^n = 2^{100}$        I dont know how to start. Any hint will be helpful.      I know the identity $x^n-y^n = (x-y)(x^{n-1} + x^{n-2}y + \cdots + xy^{n-2}+y^{n-1})$. I think from here we need some combinatorics to get the rest of answer.


The way cycles in permutations are written in my country's textbooks (Serbia) is with square brackets [ and ], but with only one horizontal line at the top to denote the beginning of the permutation, and only one horizontal line at the bottom at the end.  Is there a symbol in LaTeX for this?

I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?


I installed Ubuntu only in my drive. I didn't make any partition. I erased partition and installed Ubuntu. I want make partition to install Windows alongside. But I can't edit partition.

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!


I wanna   add  some numbers into linked list, but in my loop when i want to end adding and type "exit" there is an exception:   Exception in thread "main" java.lang.NumberFormatException: For input string: "exit"     at java.lang.NumberFormatException.forInputString(Unknown Source)     at java.lang.Integer.parseInt(Unknown Source)     at java.lang.Integer.parseInt(Unknown Source)     at Main.main(Main.java:16)     code  import java.util.LinkedList;     import java.util.List;     import java.util.Scanner;      public class Main {         public static final String EXIT = "exit";          public static void main(String[] args) {             // TODO Auto-generated method stub             List<Integer> list = new LinkedList<>();             Scanner input = new Scanner(System.in);             String temp;              System.out.println("Add number: ");             while((temp=input.nextLine()) != "exit"){                     int i = Integer.parseInt(temp);                     list.add(i);                     System.out.println("Add number:");             }             System.out.println("Completed. The summary is: ");             int suma = 0;             for(Integer skl : list){                 suma += skl;             }             System.out.println(suma);          }      }

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


Someone wants to give me a check over the internet to deposit into my account. If I have a checking and savings account, can they access both? or can they just get to one account?

Someone in another state asked me to be his personal assistant.  From the start I was suspicious.  He said he was doing a lot of projects in my state and needed my help.  Then he said he needed to transfer some money to my account (via mobile), but in order to do so he requires my full name, account number, username, and password.  I've never heard of this.  Please advise, as this sounds really weird and risky!


I can prove that there is no $C^2$ embedding of the real projective plane into $\mathbb{R}^3$. In fact, every closed $C^2$ surface of $\mathbb{R}^3$ is orientable (probably this is true for the $C^1$ category as well).      Is there a topological embedding of $\mathbb{R} \mathbb{P}^2$ into $\mathbb{R}^3$?   An answer in  tells to use the Alexander Duality Theorem, but I don't know how.

Can someone please remind me how this goes?  Here's the idea of proof I'm trying to recall: let $S$ be a closed surface (connected, compact, without boundary) embedded in $\mathbb{R}^3$. Then one can define the "outward-pointing normal unit vector" to $S$ at any point, and subsequently an orientation of the surface.  One would like to define this vector by saying that it points towards exterior points to $S$. So we need some kind of generalization of the Jordan curve theorem saying that the surface cuts $\mathbb{R}^3$ into two pieces (interior and exterior). What is this theorem exactly?  Also, I apologize if this is silly, but is there an obvious argument that a piece of the surface cuts a small tubular neighborhood of it into interior and exterior points (this seems necessary to define the outward normal vector properly)?  Is there a "cleaner" approach to prove this fact? Thanks in advance.


still doesn't have binaries for 19.10 The other option is to . I've downloaded the source of . Installed needed packages written . plus gettext said . so the needed packages was:    sudo apt install qtbase5-dev-tools qtbase5-dev libqt5opengl5-dev qtchooser libglu1-mesa-dev libpng-dev libjpeg-dev libtheora-dev liblua5.3-dev build-essential gettext   the INSTALL says how to build. while desktop of Ubuntu is gnome we need this instructions (maybe you need to do autoreconf --install before starting the first line.):  autoreconf -f ./configure --with-gnome    #says --with-INTERFACE make make install   the first line done successfully. but in configure step. we face the needed packages:  No package 'libgnomeui-2.0' found No package 'gtk+-2.0' found No package 'gtkglext-1.0' found   but I do not know how to install these packages. I can not find them. How can I install these packages and finalize installation of Celesta?

Like the title said, I want to install Celestia. I already downloaded the packages  and then, I tried all the things that I found on some posts (also, they're outdated, cause the last one is for Ubuntu 16.04) but nothing works.  How can I install it on Ubuntu 18.04.1?


I am going back to some old TeX code (huge project) and running into major bitrot. I am for the moment getting this error message:  ! Package tikz Error: Sorry, some package has redefined the meaning of the math -mode dollar sign. This is incompatible with tikz and its calc library and migh t cause unrecoverable errors.  See the tikz package documentation for explanation.   I am trying to find the explanation promised but can't find anything when searching for that error message in the:     Am I looking at the wrong place?

I'm using  semiverbatim with tikz in beamer. My following MWE throws error:     ! Package tikz Error: Sorry, some package has redefined the meaning of   the math-mode dollar sign. This is incompatible with tikz and its calc   library and might cause unrecoverable errors.   Any idea to resolve this issue. Thanks in advance.  \documentclass{beamer}  \usepackage{csed}  \usepackage{tikz} \usetikzlibrary{shapes}  \newif\ifshowanimation % The slides with animations take a long time to process. % They are omitted in handout mode. \showanimationfalse  \newenvironment<>{exercise}{\begin{block}#1{Exercise}}{\end{block}}  \newenvironment<>{notes}{\begin{alertblock}#1{Notes}}{\end{alertblock}}  \newcommand*{\menu}[1]{\textbf{#1}} \newcommand*{\menuitem}[1]{\,$\to$\,\textbf{#1}}  \definecolor{highlight1}{named}{yellow} \definecolor{highlight2}{named}{pink} \definecolor{highlight3}{named}{green} \definecolor{highlight4}{named}{orange} \definecolor{Red}{named}{red} \definecolor{Blue}{named}{blue}  \pgfdeclareimage[width=0.95\textwidth]{backdrop}{images/background.jpg} \pgfdeclareimage[width=1mm]{pointer}{images/pointer.png} \pgfdeclareimage[width=0.18\textwidth]{startmenu}{images/startMenu.jpg} \pgfdeclareimage[width=0.34\textwidth]{programsmenu}{images/programsMenu.jpg} \pgfdeclareimage[width=0.495\textwidth]{submenu}{images/subMenu.jpg} \pgfdeclareimage[width=0.608\textwidth]{latexmenu}{images/latexMenu.jpg} \pgfdeclareimage[width=0.591\textwidth]{latexmenu2}{images/latexMenu2.png} \pgfdeclareimage[width=0.591\textwidth]{cmd1}{images/cmd1.jpg} \pgfdeclareimage[width=0.591\textwidth]{cmd2}{images/cmd2.jpg} \foreach \x in {1,...,46} {   \pgfdeclareimage[width=0.84\textwidth]{tmkwin\x}{images/tmkwin-\x.jpg} } \pgfdeclareimage[width=0.75\textwidth]{saveAs1}{images/tex-28.jpg} \pgfdeclareimage[width=0.75\textwidth]{saveAs2}{images/tex-30.jpg} \pgfdeclareimage[width=0.75\textwidth]{saveAs3}{images/tex-32.jpg} \pgfdeclareimage[width=0.75\textwidth]{saveAs4}{images/tex-35.jpg} \pgfdeclareimage[width=0.75\textwidth]{saveAs5}{images/tex-36.jpg} \pgfdeclareimage[width=0.75\textwidth]{saveAs6}{images/tex-37.jpg}   \begin{document}  \begin{frame}[fragile]   \frametitle{A Simple Document}  \begin{example}     \begin{semiverbatim}         \textcolor<2>{Red}{\cs{documentclass}\annote<5-7>[offset=0.5in,voffset=1cm,pos=br,bg=highlight2]{[a4paper,12pt]}{Class options}\annote<4-7>[pos=br,bg=highlight1]{\marg{article}}{The class name.}}         \vspace{-2\baselineskip}\alt<7>{\colorbox{highlight4}{\rmfamily Preamble}}{\strut}         \textcolor<2>{Red}{\cs{begin}\marg{document}}         \textcolor<3>{Blue}{\% This is a comment}         \annote<6-7>[pos=cr,bg=highlight3,offset=0.4in]{\begin{tabular}{@{}l}         This is   a simple\\         document\cs{footnote}\marg{with a footnote}.\\         \\         This is a new paragraph.         \end{tabular}}{The document.}         \textcolor<2>{Red}{\cs{end}\marg{document}}     \end{semiverbatim} \end{example}  \end{frame}   \end{document}     Edited    csed can be obtained from .


In the user greeting session, I have 'ubuntu', 'lxde' and 'openbox'. I don't know why I have openbox, so can I remove it by typing:   sudo apt purge --autoremove openbox   Does this command affect my lxde desktop environment?

I recently added Cairo Dock to my GNOME Shell in 11.10. Cairo Dock is GREAT, but I'm left with one little problem that I'd like to fix: after installing Cairo Dock, LightDM includes two extraneous entries to non-working desktops.  (The entries to working desktops remain unaffected, so I guess I could just ignore the extraneous entries, but...)  So I'd like to remove/edit the extraneous entries in LightDM.  I've looked and looked for discussions on how to do so, but haven't had much luck.  Any suggestions on how to go about editing the login menu in 11.10?


Do the Euler equations (where $I_1,I_2,I_3$ are principal moments of inertia):  $$I_1\dot{\omega}_1+(I_3-I_2)\omega_2\omega_3=M_1$$ $$I_2\dot{\omega}_2+(I_1-I_3)\omega_3\omega_1=M_2$$ $$I_3\dot{\omega}_3+(I_2-I_1)\omega_1\omega_2=M_3$$  in their above general form have a Lagrangian? If not, does a specific case of $\omega_1=\omega_2=0$ (and so $M_1=M_2=0$) have a general Lagrangian? ($M_3$ is the torque coming from a central gravitational potential - a planet - keeping the body (a satellite) on an elliptic orbit.)

I would like to derive Euler's equations of rigid body motion from least action principle.   Suppose we are in free space so we have no gravity so Lagrangian is equal to kinetic energy.   $$ L = T = \int_M \rho(x)(x\cdot \Omega_B)^2 d^3x $$  where $\rho$ is density, $\Omega_B$ is angular velocity bivector in reference body frame and $M$ is the rigid body.  The action principle says(if I haven't messed up something) that   $$ 0 = \frac{d}{ds}\bigg|_{s=0}\int_0^T \int_M \rho(x)[x\cdot (\Omega_B(t)+s \delta \Omega(t))]^2 d^3x $$  for every $\delta \Omega$ with zero ends i.e. $\delta \Omega(0)=\delta \Omega(T) = 0$. I should get these equations:  $$ I(\Omega_B) - \Omega \times I(\Omega_B)=0 $$  where  $$ I(\Omega) = \int_M \rho(x) (x\wedge (x\cdot \Omega)) d^3x. $$  But I can't see where I would get the time derivative of $\Omega_B$ from the action principle. Can someone tell me what I'm doing wrong? I guess there is some trouble with that $\delta \Omega$ can't be completely arbitrary.


I have a directory with the following subdirectories, i.e. If I run $ tree -L 1  . ├── 2007-06-20_to_2008-10-01 ├── 2008-07-21_to_2008_08_12-Nokia 2mp ├── 2009-11-01_to_2011-01-10 - All iphone Pics ├── 2011-01-01 palliser-pics ├── 2011-03-10_to_2011-04-12-few iphone pics b4 switch to HTC └── 2011-03-31-to-2013-05-01 ALL HTC pics-backup-prior-to-factory-reset   I would like to see the amount of diskspace those 2 directories and all their contents take up. e.g. desired output, something like  2.7G  2007-06-20_to_2008-10-01 200MB 2008-07-21_to_2008_08_12-Nokia 2mp 1.3G  2009-11-01_to_2011-01-10 - All iphone Pics 667MB 2011-01-01 palliser-pics 2.3G  2011-03-10_to_2011-04-12-few iphone pics b4 switch to HTC 123MB 2011-03-31-to-2013-05-01 ALL HTC pics-backup-prior-to-factory-reset   So I have been trying:  find .  -maxdepth 1 -type d | xargs du -h    but because some of the directory names contain spaces  each line from the find output is producing many WORD's before being passed to xargs, is it possible to fix this?  I know the root cause of the problem is caused by the spaces in the files, and I will use rename to fix if I cant find a way to get disksize with du, find and xargs

Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it?


I've got quite a few subsections in one section and they stretch the right half of the header. Hoping to split them up into 2+ columns.  Minimal example:   Some research indicates that this will involve \setbeamertemplate{headline} () and probably modifying \insertsubsectionnavigation, but I don't know enough LaTeX to do this. I'd appreciate a hand!  Code:  \documentclass{beamer} \mode<presentation> { \usetheme{Warsaw} \usecolortheme{default} }  \title{Sample title} \author{Sample author}  \begin{document}  \section{A} \subsection{i} \begin{frame} \end{frame} \subsection{ii} \begin{frame} \end{frame} \subsection{iii} \begin{frame} \end{frame} \subsection{iv} \begin{frame} \end{frame} \subsection{v} \begin{frame} \end{frame} \subsection{vi} \begin{frame} \end{frame} \subsection{vii} \begin{frame} \end{frame} \subsection{viii} \begin{frame} \end{frame}  \end{document}

I am using Beamer with the Warsaw theme to make a presentation.  I quite like having a mini-outline of the TOC at the start of each slide.  However, I have found that it tends to take up quite a bit of vertical space.  Hence, I am wondering if it is possible for the per-slide TOC (\sections and \subsections) to be split over two columns so:  A B C D   to  A B  or  A C C D      B D   I am aware of the compress option which forces list of sections and subsections to be on a single line but this is a bit too extreme.  I have also seen a couple of questions relating to splitting the global table of contents over two columns -- however I am interested in the mini-TOC which appears at the start of every frame (with the Warsaw theme at least).


I'm completely new to linux. If someone could make out from the  whats wrong it would be really helpful. Also I'm getting that red icon on the top panel.  I tried running these code :-  sudo apt-get clean cd /var/lib/apt sudo mv lists lists.old sudo mkdir -p lists/partial sudo apt-get clean sudo apt-get update   The above code made that red icon go away after I rebooted but when I used the sudo apt-get upgrade after using sudo apt-get update command it popped up back again.  sudo apt-get -f install gives me  output error  Also I have referred to this thread (How do I resolve unmet dependencies after adding a PPA?) but to no avail.  After running the sudo dpkg -- configure -a it gives me following error.  instincts@Instincts:~$ sudo dpkg --configure -a [sudo] password for instincts:  dpkg: dependency problems prevent configuration of ppa-purge: ppa-purge depends on aptitude.  dpkg: error processing package ppa-purge (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of aptitude:i386: aptitude:i386 depends on libapt-pkg4.12 (>= 0.8.16~exp12ubuntu6). aptitude:i386 depends on libboost-iostreams1.46.1 (>= 1.46.1-1). aptitude:i386 depends on libc6 (>= 2.4). aptitude:i386 depends on libcwidget3. aptitude:i386 depends on libept1.4.12. aptitude:i386 depends on libgcc1 (>= 1:4.1.1). aptitude:i386 depends on libncursesw5 (>= 5.6+20070908). aptitude:i386 depends on libsigc++-2.0-0c2a (>= 2.0.2). aptitude:i386 depends on libsqlite3-0 (>= 3.6.5). aptitude:i386 depends on libstdc++6 (>= 4.6). aptitude:i386 depends on libtinfo5. aptitude:i386 depends on libxapian22.  dpkg: error processing package aptitude:i386 (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: ppa-purge aptitude:i386   Any help would be appreciated. Thank you.

Occasionally, when I'm installing stuff, I get an error like the following:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


How do I check for open and close german quote? It simple does not work:  -- coding: utf-8 --  problem: match of „  import re  test = u" „Hallo Welt“ "  if re.match(r"“", test):     print("close quote")  if re.match(r"„", test):     print("open quote")  The idle shell prints NOTHING.

What is the difference between the search() and match() functions in the ?  I've read the  (), but I never seem to remember it.  I keep having to look it up and re-learn it.  I'm hoping that someone will answer it clearly with examples so that (perhaps) it will stick in my head.  Or at least I'll have a better place to return with my question and it will take less time to re-learn it.


Refer to following question-   In context of the solution by Florain, I have some doubts.  By uniqueness and existence theorem, we can say that for $y'=f(x,y)$, an initial value problem on the region where $f(x,y)$ is continuous, we will have a unique solution. But what is asked in the question is that solution exist, uniqueness is not required. Does this means that a solution is not valid only because it is not unique? Consider the interval $(-1,2)\cup (4,\infty)$ for the same solution. It seems to me that it satisfies the equation at all points in the interval. Is this solution not valid in this interval only because it is not unique?  Please correct me if any of my statement is incorrect.

I understand a domain is the set of input elements a function is defined for (and can have breaks in it e.g. union of 2 sets) and a interval is a continuous range of real numbers. Why do we speak of the solution to a differential equation over an interval instead of an domain? If the solution to an ODE is just a function, and we normally speak of functions as having a domain, then why wouldn't we use domain?


I just came across a user who used this picture    of fascist dictator Mussolini for his avatar.  Is that legit, or well, not?

There are already at least a couple of questions (, ) about how to handle potentially inappropriate profile pictures, but the answer given in both cases (and other duplicates of those) essentially comes down to "flag it and let the moderators deal with it." Well, as a moderator, how exactly am I supposed to deal with it? As far as I can tell, Stack Exchange does not have a clear policy about what sorts of images are inappropriate. The closest thing is this clause in :  Subscriber represents, warrants and agrees that it will not contribute any Subscriber Content that [...] (d) is libelous, defamatory, abusive, threatening, harassing, hateful, offensive or otherwise violates any law or right of any third party....  but people do not always agree on what constitutes hateful or offensive content, or even on what constitutes libel or defamation (considering the prevalence of lawsuits). I don't think it's reasonable that my own opinions on the topic should be the basis for judging whether a picture is acceptable or not, simply because I'm the one tasked with handling (or not handling) the flag. I'd like to establish a more specific policy to guide moderators tasked with handling potentially inappropriate profile pictures. Certainly I'm not suggesting we set up an exhaustive list of inappropriate profile pictures, but something more than what is in the ToS would be useful. For example: "X, Y, and Z are always inappropriate; for anything else, defer to the community team," with specific details about what X, Y, and Z are. I have my own ideas, but I'll omit them to avoid influencing the responses.


I know, the group names that contains spaces has to be enclosed by quotes and they are, still this does not want to work out as I would expect it:  export instdesk="xterm java-1.8.0-openjdk xrdp tigervnc-server" export grpdesk=(Desktop "Desktop Platform" "General Purpose Desktop" "X Window System" "Legacy X Window System compatibility" Fonts) yumdesk() { for ginstdesk in "${grpdesk[@]}"; do     yum -y groupinstall $ginstdesk done }   Have tried simply just yum -y groupinstall ${grpdesk[*]} still won't work.


I would like to get the parent user after a sudo command in Python For example, from the shell I can do:  # Shows root; *undesired* output $ sudo whoami root  # Shows parent user sjcipher, desired output $ sudo who am i sjcipher   How do I do this in Python without using an external program?

How do you call an external command (as if I'd typed it at the Unix shell or Windows command prompt) from within a Python script?


I know that something similar it's been asked before but I'd like to know if is possible, during the boot, to redirect the output (messages) also to a file.  I mean, I know that I can find that informations spread between /var/log/messages (or /var/log/syslog on some systems) and dmesg, but is there a way to "register" all boot messages exactly the way they are printed on screen?

I have raspbian running on my raspberry PI. When I switch it on, boot messages crawl on the screen. I believe it would be beneficial to read them in order to get an idea about how the system starts. Hence I would like to know whether it is possible (and how) to redirect them to a file in order to read them thoroughly afterwards. Do I have to make a script that runs at startup?


after writing the app when i ran it iam getting following error  Unable to start activity ComponentInfo java.lang.NullPointerException: Attempt to invoke virtual method 'void android.support.v7.widget.RecyclerView.setAdapter(android.support.v7.widget.RecyclerView$Adapter)' on a null object reference   here is my mainactivity.java class  public class MainActivity extends AppCompatActivity {      ArrayList<Contact> contacts;      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);          RecyclerView rvContacts = findViewById(R.id.rvContacts);          // Initialize contacts         contacts = Contact.createContactsList(20);         // Create adapter passing in the sample user data         ContactsAdapter adapter = new ContactsAdapter();         // Attach the adapter to the recyclerview to populate items         rvContacts.setAdapter(adapter);         // Set layout manager to position the items         rvContacts.setLayoutManager(new LinearLayoutManager(this));         // That's all!     } }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


Does software update application in ubuntu 14.04 like sudo apt-get update command?

I am wondering what sudo apt-get update does?  What does it update?


I found interesting task: Calculate $$\sum_{k=1}^n (-1)^{k+1} \binom{n}{k}\frac{1}{k}$$ I have calculated some first values and I see that it is $H_n$. I found  tip that it can be solved by induction or by "integral" trick by considering $\sum_{k=1}^n(-1)^k{n\choose k}x^{k-1}$ I don't know what is that trick so I decided to solve it by induction.  Let $S_n = \sum_{k=1}^n (-1)^{k+1} \binom{n}{k}\frac{1}{k} $ $$ S_1 = 1 = H_1 \text{ ok.} $$ $$S_{n+1} =  \sum_{k=1}^{n+1} (-1)^{k+1} \binom{n+1}{k}\frac{1}{k}  = \\ -\sum_{k=0}^{n} (-1)^{k+1} \binom{n+1}{k+1}\frac{1}{k+1}$$ but I have problem with use induction assumption. $$-\sum_{k=0}^{n} (-1)^{k+1} \binom{n}{k}\frac{n+1}{(k+1)^2} = \\ -(n+1)\sum_{k=0}^{n} (-1)^{k+1} \binom{n}{k}\frac{1}{(k+1)^2}$$ but know I have $\frac{1}{(k+1)^2} $ instead of something like $\frac{1}{k}$

How to establish the following identities without the help of calculus:  For positive integer $n, $ $$\sum_{1\le r\le n}\frac{(-1)^{r-1}\binom nr}r=\sum_{1\le r\le n}\frac1r $$  and  $$\sum_{0\le r\le n}\frac{(-1)^r\binom nr}{4r+1}=\frac{4^n\cdot  n!}{1\cdot5\cdot9\cdots(4n+1)}$$


I have lost Lydia, I lost her when starting the companions quest The Silver Hand because she was dismissed, after the quest I looked for her at my house in Falkreath (I have the Hearthfire DLC) and could not find her, I looked in Dragonsreach with the same results, I had a wedding at the temple of mara and she appeared at the wedding but left and I could not get to her. I also checked at Jorrvaskr to see if she stayed there but I did not find her, I even looked in the hall of the dead to see if she died but no luck. Is this a bug, I play on the Xbox 360 by the way. Let me clarify that the last time I saw her was at the wedding.

I had parked my follower at an inn with a bunch of valuable items that I didn't want to carry. I guess I have been out a bit too long as this message appears:      Your follower tires of waiting and leaves.    There have been other situations where my follower has mysteriously disappeared as well.  How can I find my follower when they get up and leave or disappear into thin air?


So I recently tried to install Ubuntu 16.10 , and as i went through the installation wizard I was told that it was detected that another operating system was install (Windows 10 x64) in "BIOS compatibility mode" (Pretty sure it means legacy mode) , and that force installing in UEFI mode is not recommended , that's why I came here.  After some doodling in the BIOS I found that I can switch to UEFI mode, if I will do that will my windows 10 still boot? and will I be able to install Ubuntu peacefully ?

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


I have a class (Say A) with many subclasses and 4 level inheritance. I have wrote function type in Base class to determine the type of class as below:     const string A::type() const {     int status;     const char *  realName;     string name;     const std::type_info &ti = typeid(*this);     realName = abi::__cxa_demangle(ti.name(), 0, 0, &status);      name= realName;     int index =name.find_last_of(':');     name = name.substr(index+1, name.length()-index-1);     free((void *) realName);     return name; }   This is working with this code:   B tmp("temp");     cout<<tmp.type() // Prints "B"   But not with this code:   A  tmp = B("temp");     cout<<tmp.type() // Prints "A"   I have a vector<A> which can take any subclass. Is there a way to force A to return back the type of the derived class?

Someone mentioned it in the IRC as the slicing problem.


I am calibrating the focus on my 35mm film scanner, to do this I am rescanning the same photo repeatedly with different focus configurations and comparing the results to choose the configuration which produced the most in focus scan.  However, it occurred to me that software could probably determine the most in focus of the scans better than I could.  Is there any software which can tell me which scan is the most in focus?

I was wondering if there was any photo management software out there that could auto detect and "rate" images on how in focus they are. This comes up for me quite commonly when i am looking through a large series of macro images of the same subject. In a perfect world, Light Room (or whatever program) could highlight in focus and out of focus areas the same way that it detects burned out areas of an image. Also the algorithm I am hoping exists would be smart and would not be distracted by blurred backgrounds and only seeks that some sufficient area is in enough focus. Anything like that out there?  As another thought for people talking about pictures being in focus on the wrong spot, and that camera focus models already look into this. Another large factor for a lack of clarity in a macro image is blur from camera movement.  This damages all points on an image, and is not something the camera accounted for when focusing.


Sometimes an accepted answer is actually incorrect.   In this case, it is better to have a functionality to let any user to submit the question to the board to be reviewed by users with higher reputation with expertise on the topic and then rejudge it.  This is extremely important since some "correct" answers are not correct at all.  Thanks. Just throw some thinking.

The accepted answer is factually incorrect; one can simply call  row.Table.Columns.Contains(name);   What should be done?


I love stack exchange and its mobile app however I feel it is missing the ability to use the chat in the mobile app. Everytime I want to chat I have to go to my mobile browser and sign in again and even still the chat is a little buggy.  Why can't you chat in the mobile app? Is it not possible or is there a reason it is not included?

Currently, the app notifies users when they're mentioned in chat. However, when we tap on the notification, we got redirected out of the app to Safari.   Is there a chance we can get some chat capabilities in the app, so that we don't have to login again in Safari to quickly reply to the messages?    App version: 0.1.19 09/19/2014


I have a spring based workflow system where the java plugins are uploaded and kept in jar format, they are referred and used by the jar file. However, I have seen that jar file is very easy to decompile and it is a security risk.  I tried obfuscation as well. I want to run exe so that it is run at byte code so it is very very hard to reverse engineer.

Is there a way to deploy a Java program in a format that is not reverse-engineerable?   I know how to convert my application into an executable JAR file, but I want to make sure that the code cannot be reverse engineered, or at least, not easily.   Obfuscation of the source code doesn't count... it makes it harder to understand the code, but does not hide it.  A related question is     Once I've completed the program, I would still have access to the original source, so maintaining the application would not be the problem. If the application is distributed, I would not want any of the users to be able to decompile it. Obfuscation does not achieve this as the users would still be able to decompile it, and while they would have difficulty following the action flows, they would be able to see the code, and potentially take information out of it.  What I'm concerned about is if there is any information in the code relating to remote access. There is a host to which the application connects using a user-id and password provided by the user. Is there a way to hide the host's address from the user, if that address is located inside the source code?


Lets say you have an equation with the following form. $$(a+ib)^{c+id}$$  How do you go about doing it? I am very familiar with De Moivre's Theorem where d is zero and have that all set. I am unfamiliar with d being real not equal to zero.  Any additional information would be very helpful.

How do I calculate the outcome of taking one complex number to the power of another, ie  $\displaystyle {(a + bi)}^{(c + di)}$?


I am given a function $f:\mathbb{R}\rightarrow\mathbb{R}$ that has the property that $f(u+v)=f(u)+f(v)$ for all $u,v\in\mathbb{R}$. Then we define $m=f(1)$ and I am asked to prove that $f(x)=mx$ for all rational numbers $x$.  This should be pretty straightforward but I can't quite seem to nug this one out.  What I wrote out so far is as follows: $$f(x)=f(\frac{p}{q})=f(\frac{1_1}{q}+...+\frac{1_p}{q})=f(\frac{1_1}{q})+...+f(\frac{1_p}{q})=pf(\frac{1}{q}).$$ This is where I am stuck.

For $f:\mathbb{R}^n \to \mathbb{R}^m$, if $f(x + y) = f(x) + f(y)$ for then for rational $c$, how would you show that $f(cx) = cf(x)$ holds?  I tried that for $c = \frac{a}{b}$, $a,b \in \mathbb{Z}$ clearly  $$ f\left(\frac{a}{b}x\right) = f\left(\frac{x}{b}+\dots+\frac{x}{b}\right) = af\left(\frac{x}{b}\right) $$ but I can't seem to finish it, any help?


$A$ is a $3\times 3$ matrix with integer  entries  such that  $\det(A)=1.$  So  what  is  the  maximum  possible  number  of  entries  of  $A$  that are  even $?$   So, I thought about  the  $3\times 3$  Identity  matrix  and  wrote  the  answer $6$$($ Since $0$  is  ***even***$)$  Was it by any chance correct $?$ Or  was  it  wrong $?$  How  to prove that $?$  Thanks.

Let $A \in M_3(\mathbb Z)$ be such that $\det(A)=1$ ; then what is the maximum possible number of entries of $A$ that are even ?


Let $P = \{(x,y)\in \mathbb{R}^2:xy\ge3, x,y\ge0\}$, show $P$ is convex. We have done this kind of problem for hyperplanes, not hyperbolas.  I tried to show it algebraically, by showing that for any convex combination of two points $p_1,p_2\in P$ $$\lambda p_1+(1-\lambda p_2)=(\lambda x_1+(1-\lambda)x_2, \lambda y_1+(1-\lambda)y_2)$$ $$(\lambda x_1+(1-\lambda)x_2)(\lambda y_1+(1-\lambda)y_2)\ge3$$ which would imply that the convex combination is again in $P$. However, I end up with an enormous sum where nothing cancels elegantly. Is this even the best approach? If it is, where could I tidy it up?

This is so called a hyperbolic set  $$\{(x_1, x_2) \in \mathbb{R}^2_{+} \mid x_1 x_2 \geq 1\}$$  We proceed to prove that it is convex by showing that a convex combination of points (a line segment) will lie in the set  Suppose $x = (x_1, x_2)$, $y = (y_1, y_2)$ and $x \geq y$ in the elementwise sense  Then set: $z = \theta(x_1,x_2) + (1-\theta)(y_1, y_2)$  $z = (y_1,y_2) + \theta(x_1 - y_1, x_2 - y_2)$  Clearly, any $z_1,z_2 \in z$ lies in the hyperbolic set (i.e. $z_1z_2 \geq 1$)  How do we proceed to prove the case when $x \not \geq y$ in the elementwise sense?


I am using Ubuntu 14.04. How to manage startup applications from terminal?  I have refered   I would like to know CLI method. I am not asking to create .desktop file.

I have a shell script. I want to configure my script to run automatically during startup. I know how to do this from GUI. But I wanted to do this from terminal. How can I do this?  On a primary research I found that the file needs to be moved to /etc/int.d/ directory. But this operation needs sudo permission. I wanted to do this without super user permissions.   I also found that there are files under ~/.config/autostart/ which are having some settings regarding the startup applications. But I don't know how to edit them to achieve this.   Can someone tell me the exact procedure to achieve this?


A family member yesterday asked me to look at their work laptop (they're self-employed) since the memory usage is almost at 100% after an hour of it not being used (6GB RAM on idle shouldn't be at 100% utilization after an hour!).  I found:   A duplicate java.exe is running (I uninstalled Java  when I noticed this, still runs even on reboot) with the memory usage increasing by around 50MB each minute. A RAVBg64.exe was running in the background with a memory usage of ~500MB (suspected virus disguised as Realtek Control Panel) Virus scan via Parted Magic's ClamAV revealed two -infected HP printer driver installation packages (removed easily via Parted Magic's file manager) Virus disabled internet access via any wi-fi adapters (Windows claims that it can't see any wi-fi networks [verified adapter is enabled], but my own netbook finds the networks fine), but connecting via LAN works... An Ag_.exe runs in the background with a CPU usage of around 70% (could be a botnet bitcoin miner?), no luck in tracking this file down since Task Manager doesn't let me open the file location of the process and any searches of the hard drive fail to find it.   This laptop has caught a bad infection (probably the root cause is the Trojan.Bifrose), and I haven't had any luck in removing anything (apart from the Trojan.Bifrose detection and RAVBg64.exe).  Unfortunately the Trojan.Bifrose apparently has the ability to attach itself to Windows' core files (registry, and various executables inside System32), so it's probably likely that the infection is still present.  Rather than attempt to remove the infection, is it best to back-up the important business files (there isn't many, most of the files are on their PC, of which has no such issues), and then wipe & reinstall Windows?  I see no better way; I could be spending hours removing the infection whilst it continues duplicating itself..  Any input in this is appreciated.

What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.


I have the dictionary  d = {'a':3, 'b':7, 'c':8}   I was wondering how could i reverse the order of the dictionary in order to make it look like this:  d = {3:'a', 7:'b', 8:'c'}   I would like to do this without just writing it like this. Is there a way i can use the first dict in order to obtain the new result?

Given a dictionary like so:  my_map = {'a': 1, 'b': 2}   How can one invert this map to get:  inv_map = {1: 'a', 2: 'b'}


Often times a user will ask a series of questions that get closed, one right after the other. They will often ask these over the course of the same day, sometimes they'll even ask all 6 of their daily allotment of questions, only to have them closed, one right after the other.   Right now, other than a moderator flag there is little notification that this behavior is ongoing.  Question closure like this is often transparent to a novice user and there is little indication that they need to slow down and stop. Sometimes, the first notice that they receive that something is wrong is a moderator comment, other times it might be a moderator message accompanied by a week long suspension (I've had at least two cases on a site I moderate where this happened).  Users need a more effective braking system that will help them slow down and think about what they are doing.  I propose modifying the existing rate limits on questions/day or questions/month to slow or stop people who ask multiple closed questions in short order.  This solution will ease moderator load by helping the folks who ask these questions to self diagnose what is wrong with them (or get help), and it may overall limit the number of folks who run into question bans on larger sites by slowing the number of questions they can ask and helping them focus on fewer, better questions.  At the very least, it might slow the influx of cruft into larger sites by more quickly limiting the number of questions a user who is having trouble catching on to the system may ask.

When you think of Q&A sites, you think of a place where you come to get answers to your questions. But, where do those answers come from? What doesn't immediately stand out for many folks is that it's not our software that's giving them answers, it's other people that are taking the time to share what they know. Our engine is a vehicle that you use to arrive at an answer to your question, and vehicles are things that takes a bit of time to learn how to use.  If you have a driver's license, you probably went through some kind of program where someone else taught you how to operate a car properly. It was most likely a special kind of car, where the instructor had a brake pedal just in case someone had to slam on the brakes and you weren't doing it. After all, things go bad when you don't hit the brakes in time, especially when you're going too fast.    A while back, we  when it comes to asking questions. The single most common mistake that folks were making was in fact going way too fast; some would ask three or even five questions initially and none of them did well. The system didn't have that extra brake pedal and many users sped, you guessed it, .  We did what we always do, research:    Turns out, slowing folks down just a little when it looks like they're getting off on the wrong foot is the most effective way to help potentially great users become great users. We don't go from 100 km/h straight into a wall any longer, . Additional just-in-time help (triggered while writing a question) is in the works.   New users who aren't doing so well initially will be shown the additional guidance and will be asked to wait anywhere from one to seven days before asking their next question, depending on how they've done recently.   The system is also pretty smart, and takes the following things into consideration:   How many substantive edits you've made to your own posts recently How many good answers you've written recently How long you tend to wait between asking questions   The more acclimated you become, the sooner the system will get out of your way entirely. Yes, it is still possible to encounter a much longer-term block on some larger sites, but you'd need to ignore a lot of help before hitting it.  Testing on Stack Overflow and several other large sites has gone very well, so we've enabled this throughout the network. Most users on smaller sites probably won't see these kick in, and that's fine - but they're in place for those that can really benefit from them, just like those brave souls that teach folks how to drive.  This feature came out of the SE Quality Project ( | ) and is one of several initiatives we're putting in place to help maintain the overall quality of our sites while providing new users with a better experience.


I am not sure whether this is the correct sub stackexchange to ask my question but I ll have a try.  I ve tried to solve this problem in so many ways but still didn't manage to do it...    What would be the correct way to solve it please?  This arm of this mechanism has a length of 0,2m. The piston has an angular velocity of 2000 tours/min. What would be the velocity of point D for an angle theta of 60 degrees?  I think that what I am missing is the angle formed by the arm and the line, which is 50mm long. Example like here (different  exercise):    I am trying to look for this angle beta which could help me solve the problem  expected answer:2,88m/s  EDIT: This is what I have so far: imgur.com/ADEp1bE

I ve tried to solve this problem in so many ways but still didn't manage to do it...    What would be the correct way to solve it please?  This arm of this mechanism has a length of 0,2m. The piston has an angular velocity of 2000 tours/min clockwise. What would be the velocity of point D for an angle theta of 60 degrees?  I think that what I am missing is the angle formed by the arm and the line, which is 50mm long. Example like here (different  exercise):    I am trying to look for this angle beta which could help me solve the problem. A little bit more than just a formula as a hint would be great!  I am new to mechanics so a manner to solve this problem, which is similar to the example given (gemetrically), would be nice.  expected answer:2,88m/s


The equation is : $$     -x^3-2x^2-4x-5.4+K=0 $$ and I want my solutions in terms of $K$. How do I simplify this polynomial?

Cubic equations of the form $ax^3+bx^2+cx+d$ can be solved in various ways. Some are easy to easy to factor in a pair, for some the roots can be found out by trial-and-error, some are one-of-a-kind, some can be reduced to a quadratic equation. A compilation of all possible ways to solve cubic equations would be very helpful for students and learners.


As you see. What can be the reason? I added it to communities list about a week or two ago.

is in the list of SE sites of the new top-bar included. But since  it should be in my top 5 sites to be consistent.  BTW I don't get notified about new rep on Area51 as well.


I have to write a newenvironment, which plots a grey box around the text.   I can't decide which package I should be use. I am writing a dissertation and I want that some text sections have a grey box around the text.   Which package should I use for my newenvironment{greyBox}?  So you see down newenvironment it produces grey box around my text, but I want use this one  \vspace{5mm} \begingroup \leftskip4em \rightskip\leftskip\textit{``text here.''} \vspace{5mm} \endgroup   in my newenvironment, but i can't integrate into it. The text in newenvironment should to intend right and left.   \documentclass{book} \usepackage[ngerman]{babel}  \usepackage{xcolor} \usepackage{mdframed}  \newenvironment{bla}%   {\begin{mdframed}[backgroundcolor=lightgray]}%   {\end{mdframed}}    %%%%%%%%%%%%%%%%%%%  \begin{document}  \begin{bla}  \begin{itemize}   \item Beccari   \item Gregorio   \item Blue    \end{itemize} \end{bla}  \end{document}   I want exactly, that text + box are centered.   I want like this picture   Only the red part should be have a grey box, but I don't find still yet a solution.

In the below link        the author highlights anything which is important using a greyish color background. For example, if you see Equation 1.5.3 (which on page 22 of the book) it is highlighted in grey. I would like to know the TeX commands for producing similar output.


Which book (free or otherwise) was the most useful to you when you started learning LaTeX?  I am frequently asked this question by friends who want to learn LaTeX, and I recommend the book which got me started, , but I feel that there might be better options around.  Also see .


In The Burrow there is a clock with the members of the Weasley family on,it shows where the family members are at all times, if one of the Weasleys get married do their partners/any possible children get added to the clock.We know that there was originally 9 hands each representing each member of the Weasley family. Does this ever change for example when (SPOILER ALERT) Fred dies or when a new family member is born.

The Weasleys have a magical clock in their home, The Burrow. It doesn't tell the time, but rather tells where and how the Weasley family members are.     Mrs Weasley glanced at the grandfather clock in the corner. Harry liked this clock. It was completely useless if you wanted to know the time, but otherwise very informative. It had nine golden hands, and each of them was engraved with one of the Weasley family's names. There were no numerals around the face, but descriptions of where each family member might be. 'Home', 'school' and 'work' were there, but there was also 'lost', 'hospital', 'prison' and, in the position where the number twelve would be on a normal clock, 'mortal peril'.      — Harry Potter and the Goblet of Fire, Chapter 10: "Mayhem at the Ministry", by J.K. Rowling   Are spouses represented on the clock as well? In the main 7 books, we see the marriage of Fleur Delacour to Bill Weasley and are informed of the marriages of Hermione Granger to Ron Weasley and of Harry Potter to Ginny Weasley.  Not only that, but Molly and  Arthur have grandchildren as well. Victoire, Dominique, and Louis through Bill and Fleur, Molly and Lucy through Percy and Audrey, Fred and Roxanne through George and Angelina, Rose and Hugo through Ron and Hermione, and James, Albus, and Lily through Ginny and Harry. Are they all represented on the clock as well?  It seems that family members' hands aren't removed from the clock after they move out, since Bill and Charley were still represented even though they no longer lived at The Burrow.  So what are the criteria for inclusion on the clock?


I have a good CPU i7 4.4ghz 16 GB ram and 6GB 1060 Graphics card. Also, I have an old i5 laptop. Is there any way for the laptop to run using my CPU resources simultaneously? I am short on funds and my girlfriend needs to work on my PC but we both have work. My CPU is always underutilized. So wondering is it possible to work on my laptop but use my CPU resources such as processing speed and graphics card

I know that every operating system worth using supports multiple independent users; this makes it easy for several people to share a single computer, with their own documents and everything. However, there is one small problem: the sharing can't occur simultaneously.  Remote Desktop or other similar software allows people to connect to a computer from somewhere else and log-in as any user, without disturbing other users. However I wonder, isn't is possible for multiple people with different user accounts to use a computer at the same time, locally, via multiple monitors and input devices? I tried plugging in a second keyboard, mouse and monitor, however, Windows will mirror or extend the display to the second monitor and the second set of input devices become pretty much like... well... I can't think of anything useless enough to compare them to.  How would I share a single computer with different people? Assume I have a keyboard, mouse and monitor for everyone, connected to multiple video cards (either multiple outputs on a single video card or one monitor/card).


Is there any way to print in the console with colored text?  >>> from colorama import Fore  >>> print(Fore.BLUE + "Hello World")   But in the console I got this:  >>> [34mHello World   I also tried other methods, but none of them help.

How can I output colored text to the terminal in Python?


Imagine a high speed rocket, traveling past a star. In the rocket's reference frame, the star's length is contracted. This is a lot a mass in a thin line, so it the rocket's reference frame, could it become a black hole? If not, what am I missing?

I'm a big fan of the podcast Astronomy Cast and a while back I was listening to a Q&A episode they did. A listener sent in a question that I found fascinating and have been wondering about ever since.   From the show :      Arunus Gidgowdusk from Lithuania asks: "If you took a one kilogram mass and accelerated it close to the speed of light would it form into a black hole? Would it stay a black hole if you then decreased the speed?"   Dr. Gay, an astrophysicist and one of the hosts, explained that she'd asked a number of her colleagues and that none of them could provide a satisfactory answer. I asked her more recently on Facebook if anyone had come forward with one and she said they had not.  So I thought maybe this would be a good place to ask.


Why we can't see other than visual light??

While explaining to my nephew about the physics of light, I told him we cannot see infrared color, and he kicked back with a very simple question: why can't we see it? I could not tell him. Is the human eye unable to sense such light or can it indeed but the brain can't understand the signal? any other reason?


I am running Ubuntu 16.04.2 and I installed Virtualbox as follows  sudo apt-get install virtualbox sudo apt-get install virtualbox-ext-pack sudo adduser newbie vboxusers   I then installed XP/SP3 and it booted ok, mouse and tty function ok when I connect a USB2-stick to my host it shows up in the host when I start Oracle VM Virtualbox Manager the stick does not show up in Settings>XPSP3>USB.   I have Enable USB Controoler and USB 2.0 (EHCI) Controller switched on. Since two years I am also running Ubuntu 14.04 with Sun VM and an XPSP3 virtualmachine and there the USB works fine. I have read all similar questions tagged virtualbox and usb but found no solution

I'm using Ubuntu Maverick and Virtual Box 3+. I have Windows 7 Ultimate. The problem is that it doesn't detect USB drives in Windows 7, but USB peripherals (mouse + keybord) are working.  I followed , but I can't find the user group vboxusers. How can I continue? I would also like to upgrade to the latest version without any risk (without losing my virtual hard disk drive).


Sorry if this has been asked before, but I have a query about the notion that the decimal expansion of $\pi$ contains every possible string of numbers (please note that I am only a "casual" maths enthusiast). If it does, then would the expansion not contain $\pi$ itself? (I.e. 3.1415926...31415926...) That would make $\pi$ a repeating decimal which could, in theory, be represented as an exact fraction. If we constrict the argument to say that $\pi$ only contains every finite sequence of numbers, then wouldn't that be contradictory (we would see 3, 31, 314, 3141, 31415... so why not all the way? We could always add another digit to create a longer finite string ad infinitum)?  Thank you in advance.

I came across the :    Which states:     $\pi$ Pi      Pi is an infinite, nonrepeating $($sic$)$ decimal - meaning that   every possible number combination exists somewhere in pi.  Converted   into ASCII text, somewhere in that infinite string of digits is the   name of every person you will ever love, the date, time and manner    of your death, and the answers to all the great questions of    the universe.   Is this true? Does it make any sense ?


I am trying to change the noisetexture.png to black screen but it still flashes a purple screen while logging in .  I changed this   #lockDialogGroup {    background: #2c001e url(resource:///org/gnome/shell/theme/noise-texture.png);    background-repeat: repeat;  }   to  #lockDialogGroup {    background: #00000 url(file:///home/sk/image.png);    background-repeat: no-repeat;     background-size: cover;    background-position: center;}   How to solve this issue?

I changed both the desktop and login screen background photos. However,only desktop photo is changed. The one on the login screen is still the purple Ubuntu one. Is this a bug?


In my blade view, I have rows of fields for each value in backend and at the end an empty text field. @php $x = 1; @endphp @foreach ($base_urls as $base_url)

{{ $x }}
         <input type="text" class="form-control" placeholder="Insert url or leave empty to delete" aria-label="Edit or remove url" name="base_url_{{ $base_url->ID }}" value="{{ $base_url->url }}" />
     @php $x++; @endphp @endforeach

{{ $x }}
     <input type="text" class="form-control" placeholder="Add url" aria-label="Insert url" name="base_url_" />
  When the user inputs something to the last empty field, I want another empty field to be generated, and so on. So I made a JS script called admin_panel.js that looks like this $('#base_urls_body form div.input-group:last-of-type input').change(function(e){     last_input_group = $('#base_urls_body form div.input-group:last-of-type');      if( $(e.target).val() != '' ){         last_input_group.after('

'+field_count+'
<input type="text" class="form-control" placeholder="Add url" aria-label="Insert url" name="base_url_" />
');     }  });   The field is being generated correctly, but the selector form div.input-group:last-of-type input is only detecting the input that was generated on page load, not the one generated with javascript  This is how I include my JS file in Laravel blade view. Its pushed to a stack in app.blade.php, the stack is called at the bottom of the body close tag. @push('admin_panel')      @endpush  Maybe since admin_panel.js is loaded after everything else it doesn't detect new changes? If I remove defer attr from the script tag, I can't use jQuery in my .js file. How can I fix this?

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


How do you change what the camera sees in blender cycles. For example how do you make the camera make the scene look fuzzy like an old television. Here is an example image for fuzzy old television camera effect:

I thought it would be interesting to create a .blend that filters any regular video or image with vintage television look.   Edit: Although this question initially arose from my desire to create a vintage look, it has since been pointed out in a comment that all displays use arrays of RGB emitters, so it's not really an issue of vintage or not. How vintage it will end up looking is probably more a matter of the shape, size, and density of the emitters.  Reference images:       Upon examining the structure of screens, the most common seems to be rows of vertical RGB bars:    Here is another type which I believe is common in computer displays - circular dots in a hexagonal grid:    I have been thinking about how to make a screen in Blender that takes its input from an image or image sequence and for each frame converts the RGB value for a pixel (or region) and uses that to illuminate the red green and blue phosphors in the correct ratios so that when viewed from a distance an image is distinguishable.  Do you think this will require python scripting? I made some initial attempts modeling an array of phosphors then using a Light Path node and a Separate RGB node in Cycles but I haven't gotten very far. I would love to hear what you all can suggest.  Thanks!


From ls --help, dir --help, vdir --help I notice there's no difference at all except for program names (the 'Usage: ' line and a few lines at the bottom). However vdir seems to be some kind of an alias of ls -l, while dir seems like making no difference. Can anyone tell me what are the exact differences among them?

I have compared the man pages of dir and ls and they seem to be exactly the same. Both are part of GNU coreutils and "list directory contents".   The only difference I've seen so far is that dir doesn't colorize the output.  So why do two commands exist? Is there a difference I missed? Why would one prefer dir over ls?


I wanted to make a House for my Art class and used the brick texture node with some extras to make a brick shader for the walls. Because the bricks didn't align correctly with the first object (House1) I added a Mapping and Texture coordinate node to adjust it. Now that i need to do the other side of the house the shader of the bricks is not aligned correctly and weirdly stretched. I thought that I could fix it by unwrapping the objects and then set the texture coordinate to UV, but it made it made it worse. Thanks in advance. Here's the Blend file:

I've been experimenting with node-based procedural materials in Cycles lately, and after spending a few hours working out a brick material that works pretty well along walls, I noticed that it has a few issues. Here's my initial setup:    It's not perfect, since it switches the different orientations in an all-or-nothing way, but for my purposes, it looks good enough.  So I went ahead and used this throughout my test scene. But then I turned the camera around and looked at the other side, and... there's something wrong with the side of the cube facing away on the X axis!    This isn't a huge issue, because I don't plan to render my objects from that angle, but I'm concerned about the way it will affect reflections, light bounces, etc. so I started looking around for other solutions. I happened on this thread at Stack Exchange:   Particularly, Rich Sedman's answer seemed promising (since I'm trying to avoid using UV mapping). Following what he posted, I created this:    This new setup works great for the cube - on every side - but you can see pretty plainly that the cylinder, strangely, has problems. By the way, there is a part of the node setup that I omitted from the screenshot that isn't really relevant here - it checks the Z value of the geometry surface and subs in the default vectors for the texture coordinates if Z is over a certain amount, for sides that face upward.  I've been experimenting with this for a few more hours now, but I'm afraid I've reached my limits in terms of vector math.  Is there anything obvious I'm missing here that might help fix this, and make this setup work for both the cube and cylinder?


I'm doing some homework and cant seem to get my head around this inductive proof.   So far I have got:  Atom case: $4^1 -1 = 3$, so proved for basic case.  Closure:  Assume $4^k - 1$ is divisible by $3$, Show that $4^{k+1} -1$ is divisible by $3$.  So: $4^k-1 = 4^k\cdot4 -1$ but this is where I get stuck, unsure where to go from here.  Any help much appreciated!  Thanks

I did some mathematical induction problems on divisibility   $9^n$ $-$ $2^n$ is divisible by 7. $4^n$ $-$ $1$ is divisible by 3. $9^n$ $-$ $4^n$ is divisible by 5.   Can these be generalized as $a^n$ $-$ $b^n$$ = (a-b)N$, where N is an integer? But why is $a^n$ $-$ $b^n$$ = (a-b)N$ ?  I also see that $6^n$ $- 5n + 4$ is divisible by $5$ which is $6-5+4$ and $7^n$$+3n + 8$ is divisible by $9$ which is $7+3+8=18=9\cdot2$.  Are they just a coincidence or is there a theory behind?  Is it about modular arithmetic?


I recently tried to visit a person's profile from chat room.  I clicked the link to his profile(points to area51) and the link is dead.    The link points to discuss.area51.stackexchange.com and the link should be area51.meta.stackexchange.com (as pointed by Shadow Wizard in Tavern on meta).  This link points to an HTTPS error page       I am able to reproduce this issue only for users with main profile in area51.   And I think someone missed it in the recent meta url changes from meta.x.se to x.meta.se

When viewing a user who has their parent user on chat set to area51, it still links to discuss.area51, instead of the new URL, area51.meta. See:      So can we update these links?


When can we say two networks are different from each other? Is it when they have different subnet masks or when they use different policies? Will it be right to say that a router is needed to connect two 'different' networks?

This is a  about IPv4 Subnets.      Related:               How does Subnetting Work, and How do you do it by hand or in your head?  Can someone explain both conceptually and with several examples? Server Fault gets lots of subnetting homework questions, so we could use an answer to point them to on Server Fault itself.   If I have a network, how do I figure out how to split it up? If I am given a netmask, how do I know what the network Range is for it? Sometimes there is a slash followed by a number, what is that number? Sometimes there is a subnet mask, but also a wildcard mask, they seem like the same thing but they are different? Someone mentioned something about knowing binary for this?


please be patient, I'm disabled (run down by Postal truck on my motorcycle) so I can only Google search things for so long before sitting feels like I got hit by a sledgehammer. Also, I'm on a budget so I can't just solve everything with "buy a new one", disability doesn't pay very well (-;/. I have an HP Win 7 Desktop and I got a blue screen followed by a "hard disk failure is imminent", but I want to verify it's real before I act. It came up 6 weeks ago and I'm still using my PC normally except for 2 things, loading everything is slow (in windows and the web) and my tower is always quiet (the fans are both running but never change speeds as they normally would). I've run check disk and other tests and not gotten any warnings, tests all "negative". 1) Is it possible it's just a virus? I surf many nefarious sites (Pirate Bay downloading movies etc) and 2) Is there a test that will determine if the HDD is actually toast? Thanks my new friends. Oh, and the HDD is not laboring, it's whisper quiet...

I have an 1 TB data disk and the bios and Windows are reporting a "Smart" error. At least, I get a Smart event but it doesn't indicate how serious the failure could be. My system is about 6 months old, including the disk so the warranty will cover the damage. Unfortunately, I lack a second disk of 1 TB in size which I can use to make a full backup. The most important data on this disk is safe, but there's a lot of work data which can be regenerated but this would cost a lot of time.  So I ordered an USB disk of 1 TB which will arrive in three days. By then I can make a full backup of the data and afterwards, it can crash.  But will the disk live that long? (Well, I won't use the PC as long as I can't make a backup.) How serious is such a Smart event? I know it's serious enough to have it replaced, but will it live for another week or could it die any moment?Update: I purchased an 1 TB external disk and spent most of the day making a backup of the 1 TB disk. It survived that. I then received a new disk, since it was still under warranty and replaced the hard disk. Then I had to spend most of a day again to put back the backup. I need to send back the faulty disk and now have an additional external disk, which could always be practical. :-)  The Smart Error report did not cause any failures on the original disk. I won't advise to ignore these warnings, but the disk still has enough life in it to last a few more days. (Just make sure you have a good back-up.)  And oh, the horror of having to make a complete backup such a huge disk. :-) If your data is important, make sure you have something that supports incremental backups and lots of space. (In my case, the data wasn't very important, just practical to have on-disk together.)


I'm developing a web-app and I'm always getting this problem: often I have to generate some HTML code via Javascript (for example a user selects the number "6" in a select and I generate 6 fields via JS). The problem is that I can't understand how to link jQuery (or Javascript) functions to those Javascript-generated fields because all the classical methods don't seem to work. In this case I want that my user will only be allowed to type the numbers 0-9 and the backspace, so I wrote this simple jQuery function:  $(document).ready(function() {             $("#ciao1").keydown(function(e) {                 if ((e.keyCode == 8) || (e.keyCode >= 96 && e.keyCode <= 105) || (e.keyCode >= 48 && e.keyCode <= 57)) {                     return;                 }                 else {                     e.preventDefault();                 }             });         });   If I create a text field directly inside the HTML code it works perfectly, but with my js-generated fields it won't work! please help!  function addPreparations (nos, pietanze) {             var numeroTotale = nos.value;             var box = document.getElementById("box_righe");             if (numeroTotale == '') {                 box.innerHTML = '';             }             else {                 var righe = "
";                 righe += "Pietanza	U. di Misura	Quantità	Cuoco	Data di Preparazione	";                 for (i = 1; i <= numeroTotale; i++) {                     righe = righe + "
<select name='pietanza"+i+"' class='form-control' onchange='showMU(this.value, \"p\", "+i+");'>";                     righe = righe + "<option value=''>Selezionare la pietanza "+i+"</option>";                     for (j=0; j<pietanze.length; j++) {                         righe = righe + "<option value='"+pietanze[j]+"'>"+pietanze[j]+"</option>";                     }                     righe = righe + "</select>	";                     righe = righe + "
- - -
	";                     righe = righe + "<input type='number' placeholder='Inserire la quantità' name='quantita"+i+"' class='form-control'/>	";                     righe = righe + "<input type='text' placeholder='Inserire il cuoco' name='cuoco"+i+"' class='form-control'/>	";                     righe = righe + "<input type='text' placeholder='GG-MM-AAAA' id='ciao"+i+"' class='form-control' name='data"+i+"'/>
";                 }                 righe = righe + "
";                  righe = righe + "<input type='submit' name='storageConfirm' value='Conferma' class='btn btn-success'/>&nbsp&nbsp";                 righe = righe + "<input type='reset' value='Reimposta' class='btn btn-danger'/>";                  box.innerHTML = righe;             }         }   For example: how to link the jQuery to the first element that will have as id="ciao1"?


If I want to draw something in the Preview app, then for example odd lines become straight or something that resembles a circle becomes a circle. How can I turn this feature off?

When I try to draw a line on an image using Preview's annotation tools, it doesn't remain as I drew it but instead the line is drawn linear. How can I set it to be preset as nonlinear?  So looking to the images, I don't want it to be set like this:    Instead I want it to be preset in this way, instead of clicking the actual function everytime to make it nonlinear.


I need to create GET parameters containing '&'s without creating new parameters for each '&'s.  For instance the following URL :  http://example.com/?action=redirect&url=http://web.com/home.aspx?action=add&ref=aaa   will give me :   action = 'redirect' url = 'url=http://web.com/home.aspx?action=add' ref = 'aaa'   But I want :  action = 'redirect' url = 'url=http://web.com/home.aspx?action=add&ref=aaa'   It's in the context of a c#.net application and i'd rather not use POST parameters.  Is it even possible ?  Thanks

I need to redirect to a url passing a parameter as a query string.  This can include an Ampersand in the value. such as  string value = "This & That"; Response.Redirect("http://www.example.com/?Value=" + Server.UrlEncode(value));   This however returns   What should I be using to encode this string?  EDIT: Thanks Luke for pointing out the obvious, the code does indeed work correctly. I Apologise, my question was not a valid question after all!  The page I was going to had a lot of old legacy code which is apparently doing some kinda of encoding and decoding itself making it appear as if my urlencode was not working.  My solution unfortunately is to completely drop use of an & until the code in question can be re-written. Don't you just hate old code!


I want to change all my elements in this specific div's vertical position, so that they are aligned in the middle, top to bottom.   "vertical-align: top" worked for my button, but not for my other two text elements  "margin: 0px" doesnt seem to work    .FirstRetailer {   clear: both;   background-color: #07213F;   padding: 10px;   height: 62px;   line-height: 62px;   color: #FFFFFF;   vertical-align: top; }  .RetailerRight1 {   float: right;   float: top;   height: 42px;   vertical-align: text-bottom; }  .RetailerPrice1 {   padding: 0px 10px;   height: 22px; }   .btnGoToProduct {   background-color: #A60000;   border: none;   color: white;   padding: 0px 10px;   text-align: center;   text-decoration: none;   display: inline-block;   font-size: 16px;   height: 42px;   line-height: 42px;   vertical-align: top; }

             Product name                           $100.00              Go to product

     Example of my problem (Link to image)   I would like the "Product name" and the "$100.00" to be centered inline with the button.  Many thanks in advance

I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other. One of the images needs to be absolute positioned within the div. What is the CSS needed for this to work on all common browsers?

testing...


$$\sum_{n=1}^\infty\frac{e^nn!}{n^n}$$ we cant use the ratio test nor the root test, because the limit will be 1.  the main question was to determine whether or not the series $$\sum_{n=1}^\infty\frac{a^nn!}{n^n}$$ converge, for every $a\in\mathbb R$. I found that for every $-e < a < e$ the series absoulutly converges. For every $a>e$ or $a<-e$ the series does not converge (also not conditional convergence) so now I have to determine if for $a=e$ or $a=-e$ the series will converge. (hopefully it will converge for $a=e$ and therefor also for $a=-e$. other wise i'll have to find out also for $a=-e$) thanks. by the way, im not familier with tools like Rabbe's test or Sterling's formula, so solutions using other ideas will be great. thanks

I want to find the convergence interval of the infinite series $\sum\limits_{n=0}^\infty \dfrac{n!x^n}{n^n}$. I will use the ratio test: if I call $u_n = \dfrac{n!x^n}{n^n}$, the ratio test says that, if the following is true for some values of $x$, the series will be convergent for these values of $x$: $$\lim_{n\to+\infty}\left|\frac{u_{n+1}}{u_n}\right|<1$$ So, I will first calculate the value of $\left|\dfrac{u_{n+1}}{u_n}\right|$: $$\left|\dfrac{\dfrac{(n+1)!x^{n+1}}{(n+1)^{n+1}}}{\dfrac{n!x^n}{n^n}}\right|=\dfrac{(n+1)!|x|^{n+1}}{(n+1)^{n+1}}\times\dfrac{n^n}{n!|x|^n}=\frac{(n+1)n^n|x|}{(n+1)^{n+1}}=|x|\left(\frac{n}{n+1}\right)^n$$ So, $\lim\limits_{n\to+\infty}\left|\dfrac{u_{n+1}}{u_n}\right|$ becomes: $$\lim_{n\to+\infty}\left|\frac{u_{n+1}}{u_n}\right|=\lim_{n\to+\infty}|x|\left(\frac{n}{n+1}\right)^n=|x|\lim_{n\to+\infty}\left(\frac{n}{n+1}\right)^n$$ Now I must evaluate the value of $\lim\limits_{n\to+\infty}\left(\dfrac{n}{n+1}\right)^n$. For this, let $y = \left(\dfrac{n}{n+1}\right)^n$; so, instead of calculating $\lim\limits_{n\to+\infty}y$, I will first calculate $\lim\limits_{n\to+\infty}\ln y$: $$\lim_{n\to+\infty}\ln y=\lim_{n\to+\infty}\ln \left(\dfrac{n}{n+1}\right)^n=\lim_{n\to+\infty}n\ln\left(\frac{n}{n+1}\right) =\lim_{n\to+\infty}\frac{\ln\left(\frac{n}{n+1}\right)}{\frac{1}{n}}$$ Applying L'Hôpital's rule: $$\lim_{n\to+\infty}\frac{\ln\left(\frac{n}{n+1}\right)}{\frac{1}{n}} =\lim_{n\to+\infty}\frac{\frac{1}{n(n+1)}}{-\frac{1}{n^2}} =\lim_{n\to+\infty}\left(-\frac{n}{n+1}\right)=-1$$ Now, since we know that $\lim\limits_{n\to+\infty}\ln y = -1$, we have that: $$\lim_{n\to+\infty}y=\lim_{n\to+\infty}e^{\ln y} = e^{-1} = \frac{1}{e}$$. Substituting this back into the expression $\lim\limits_{n\to+\infty}\left|\frac{u_{n+1}}{u_n}\right| = |x|\lim\limits_{n\to+\infty}\left(\frac{n}{n+1}\right)^n$, we have that the limit of $\left|\dfrac{u_{n+1}}{u_n}\right|$ as $n\to+\infty$ is: $$\lim_{n\to+\infty}\left|\frac{u_{n+1}}{u_n}\right|=\frac{|x|}{e}$$ Therefore, the series will certainly be convergent for the values of $x$ for which $\dfrac{|x|}{e}<1$, that is, $|x|<e$. So, I know that the series is convergent for $-e < x < e$, but I have to test whether the series is convergent at $x = e$ or $x = -e$. That is, I have to test whether $\sum\limits_{n=0}^{\infty} \dfrac{n!e^n}{n^n}$ and $\sum\limits_{n=0}^{\infty} \dfrac{(-1)^nn!e^n}{n^n}$ are convergent. Since these limits don't approach zero, I know they are both divergent, but I'm not sure how to find the limits, because of the factorial function. Also, I can't use integral test here, because of the factorial. Probably I should use comparison test, but I haven't found any divergent series to which to compare it. Any hints? Thank you in advance.  Edit: Using the suggestion by Ragib Zaman in the answer below, since the Taylor polynomial $P_n(x)$ of $e^x$ at $a=0$ is $$e^x = 1 + x + \dfrac{x^2}{2!} + \cdots + \dfrac{x^n}{n!}+\cdots,$$ if we substitute $n$ for $x$ we see that $e^n>\dfrac{n^n}{n!}$; therefore, $\dfrac{n!e^n}{n^n} > 1$, and, thus, we show that $\sum\limits_{n=0}^{\infty} \dfrac{n!e^n}{n^n}$ is divergent, because its term doesn't approach zero. $\sum\limits_{n=0}^{\infty} \dfrac{(-1)^nn!e^n}{n^n}$ is also divergent, because, although the absolute value of the ratio between two successive terms, $|e|\left(\frac{n}{n+1}\right)^n$, approaches 1 as $n\to\infty$, it approaches 1 from values bigger than 1; therefore, the absolute value of a term is always greater than the absolute value of the previous term.


I wrote a simple python script that outputs a bunch of linux commands for a custom image manipulation command-line tool. As an example, here is what the python script creates: img_dae_create /d /t /19 "file1.jpg" -output "heavy" -t /mnt/img/output/ img_dae_create /d /t /7 "file2.jpg" -output "light" -t /mnt/img/output/ img_dae_create /d /t /8 "file3.jpg" -output "ex" -t /mnt/img/output/  Normally, I just copy and paste them to my Ubuntu command line and run one by one. Each command can take from 1 minute to 15+ minutes to execute. But sometimes, the python script will generate 100s of these, and it is very tedious to copy and paste each one. So I was wondering what would be the best command line operator to use in this case? Would ; be better than && given that:  The time it takes for each command to run could be between 1 and 15 minutes.  The outcome of the command does not matter, if it fails, then the command line tool records that in a log file and can be dealt with later.   Thanks!

In Windows I can write a file containing commands for cmd (usually .cmd or .bat files).  When I click on those files it will open cmd.exe and run them commands the file contains.  How would I do this in Ubuntu?         I'm sure this is a duplicate, but I can't find my answer. Its similar to these questions, but they don't answer the question:


I'm trying to add a SharePoint group to a specific list that exists on all the sites in a collection. I would think this would be easier but I'm having difficulties. Inheritance is already broken on the list.   Below is my code and then the error I'm getting.  $siteNumbers = "2210" $listsOnSite = "QWERTY"  Foreach($wnl in $siteNumbers)     {     $rootWeb = (Get-SPWeb ("http://url/to/site/" + $wnl))       Foreach($lst in $listsOnSite)       {     $list = $rootWeb.Lists[$lst]     $group = $rootWeb.Groups["Global Read-Only QWERTY"]     $role = $rootWeb.RoleDefinitions["Read"]      $roleAssignment = New-Object Microsoft.SharePoint.SPRoleAssignment($group)     $RoleAssignment.RoleDefinitionBindings.Add($role)     $rootWeb.RoleAssignments.Add($RoleAssignment)     $list.RoleAssignments.Add($roleAssignment)     $list.Update()     }     $rootWeb.Update()     }      New-Object : Constructor not found. Cannot find an appropriate   constructor for type Microsoft.SharePoint.SPRoleAssignment. At line:9   char:33   +     $roleAssignment = New-Object <<<<  Microsoft.SharePoint.SPRoleAssignment( $group)       + CategoryInfo          : ObjectNotFound: (:) [New-Object], PSArgumentExce    ption       + FullyQualifiedErrorId : CannotFindAppropriateCtor,Microsoft.PowerShell.C   ommands.NewObjectCommand      Exception calling "Add" with "1" argument(s): "The permission level   specified i s already added to the collection." At line:10 char:47   +     $RoleAssignment.RoleDefinitionBindings.Add <<<< ($role)       + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException       + FullyQualifiedErrorId : DotNetMethodException      You cannot call a method on a null-valued expression. At line:12   char:30   +     $list.RoleAssignments.Add <<<< ($roleAssignment)       + CategoryInfo          : InvalidOperation: (Add:String) [], RuntimeExcept    ion       + FullyQualifiedErrorId : InvokeMethodOnNull      You cannot call a method on a null-valued expression. At line:13   char:17   +     $list.Update <<<< ()       + CategoryInfo          : InvalidOperation: (Update:String) [], RuntimeExc    eption       + FullyQualifiedErrorId : InvokeMethodOnNull

I am trying to add read-only-permissions to a specific group called "Students" for a list I have created called "Quiz". I have to use PowerShell CSOM, and in every other tutorial I've been through, .NET server types have been used.  Code:  $ListName = "Quiz" $PermissionLevel = "Read Only" $web = $ctx.Web          $lists = $web.Lists $ctx.Load($lists) $ctx.ExecuteQuery() foreach($list in $lists) {     if($list.Title -eq $ListName)     {         $listId = $list.Id     } } $list = $lists.GetById($listId) $ctx.Load($list); $ctx.ExecuteQuery();  Write-Host "List:" $List.Title -foregroundcolor Green if ($list -ne $null) {     $groups = $web.SiteGroups     $ctx.Load($groups)     $ctx.ExecuteQuery()     foreach ($SiteGroup in $groups) {                             if ($SiteGroup.Title -match "Students")         {             write-host "Group:" $SiteGroup.Title -foregroundcolor Green             $GroupName = $SiteGroup.Title              $builtInRole = $ctx.Web.RoleDefinitions.GetByName($PermissionLevel)              $roleAssignment = new-object Microsoft.SharePoint.Client.RoleAssignment($SiteGroup)             $roleAssignment.Add($builtInRole)              $list.BreakRoleInheritance($True, $False)             $list.RoleAssignments.Add($roleAssignment)             $list.Update();             Write-Host "Successfully added <$GroupName> to the <$ListName> list in <$site>. " -foregroundcolor Green         }                         else         {                 Write-Host "No Students groups exist." -foregroundcolor Red         }     } }   My error is in   $roleAssignment = new-object Microsoft.SharePoint.Client.RoleAssignment($SiteGroup)   , where I'm recieving the error  Cannot find an overload for "RoleAssignment" and the argument coun t: "1".   Most tutorials use   $roleAssignment = new-object Microsoft.SharePoint.SPRoleAssignment($SiteGroup)   which I CAN NOT USE.  How can I complete my code?  P.S. I know my code is a bit messy, but I've been spending too much time trying to find a solution, and my code has greatly reduced in quality over the past hours. Sorry for that.