I need to upload a file which is about a GB to an online server to get to a friend. Now there seems to be a problem with my internet connection because if I try to upload a file more than 20MB then it just stops uploading and won't start again for some reason.  So I would like an application or script(s) (there may be the need for two, one which makes the files, and one which reconstructs them) which can do the following:   Split the file up into smaller files, where the max size for each file can be set by the user so that this can be used for other cases Is able to reconstruct the file at the other end and verify integrity by checking its SHA512SUM   I would prefer it not to compress anything. I am running Ubuntu GNOME 16.04.1 with GNOME 3.20. Is there a way of doing this?

How do I split a 7GB (movie) file into smaller files of (say) 1GB, and then (in another Ubuntu computer) integrate them to get the original file (using just bash commands)?


Suppose a random variable  X  can take any value in the interval  [−1,2]  and a random variable  Y  can take any value in the interval  [−2,3] .  I know that X + Y is [-3, 5] (-1 - 2 = -3; 2+3 = 5) and X - Y is [-4, 4] (-1 - 3 = -4 ; 2 - (-2) = 4) . But where can I find more about the rules of these operations? Like X*Y or X/Y ? And why is this? I thought was something like this:

I have instances of data that are composed of 6 attributes. Each attribute takes values between 1-10. Any instance has a utility calculated by some utility function:  Example: {1,1,2,5,5,2} , utility = 0.89  In some readings for these attribute values, undefined values may appear in the instance, I mark them as question mark '?'  Example: {1,1,?,5,?,2}  These question marks represents uncertainty in the instance.  How can I model this uncertainty in a statistical or mathematical way ?   Thanks


If we have a function $f: \mathbb R^3\rightarrow \mathbb R$ of the form:  $$f(x)=(a_1x_1^2+a_2x_2^2+a_3x_3^2)e^{-x_1^2-x_2^2-x_3^2}$$  where $a_1>a_2>a_3>0$.   We can find the critical points by:  $$\frac{\partial f}{\partial x_1} =2x_1e^{-x_1^2-x_2^2-x_3^2}(a_1-a_1x_1^2-a_2x_2^2-a_3x_3^2)=0$$  And solving symmetrically for $x_2$ and $x_3$. We get critical points: $(0,0,0) , (\pm 1,0,0) , (0,\pm 1, 0) , (0,0,\pm 1)$   We could determine the nature of them by looking at the eigenvalues of the Hessian, but is there a way to just analyse it directly? Obviously $(0,0,0)$ is a strict global minimum, but I can't quite see that the other points are. Any pointers/hints would be appreciated.


Let $f(x)$  be a continuous function    on $[a,b]$.       Show that $F(t) = \displaystyle \min_{a\leq x\leq t}f(x)$ is also continuous on $[a,b]$.   Statement seems obvious for me, especially  when I try to draw some special cases of this problem, but I fail to derive a rigorous proof.

I'm working on this problem from Elementary Analysis by Ross which is intuitive when sketched but keeps stymieing me when I try to write it out.  Let $f$ be a continuous function on $[a,b] \subset \mathbb{R}$. Define $f^\star (x)$ as:  $$ f^\star(x) = \sup \{f(y)\mid a \leq y \leq x \} $$ Prove that $f^\star$ is a continuous increasing function on $[a,b]$.  Things I've figured out: (these are mostly trivial)   $f$ is uniformly continuous on $[a,b]$. Since $[a,b]$ is closed and bounded there exists some $c \in [a,b]$ such that $f(c) \geq f(x)\ \forall x \in [a,b]$. (In words: the supremum is actually attained.) If $c \in [a,b]$ is as above, then $f^\star$ is constant (and hence continuous) on $[c,b]$ (which is possibly a singleton).   This seems completely obvious when you actually draw a continuous function but translating that to a formal proof eludes me...


If $f$ is an entire function, I have to show that $g(z):= \overline{f(\overline {z})}$ is also an entire function. How can I proof this if $g:\mathbb{C}\to\mathbb{C}$?

I came across this question whilst doing some research into complex analysis, and I just can't see what to do!  Let $f(z)$ be a holomorphic function on $\mathbb{C}$. Show that $\overline{f(\overline{z})}$ is holomorphic, whilst $f(\overline{z})$ is holomorphic if and only if $f(z)$ is constant.  I know that holomorphic means that the function is differentiable everywhere, and I need to apply the Cauchy-Riemann equations somehow, but I'm not sure how to approach this.


Is there a way to run one command before any terminal command gets executed?   For example:   > ls -ltr > "Hello you ran ls -ltr" //this is what I would like to achieve > ..output of ls -ltr will be here   Is it possible to run make sure an echo runs before any command is executed?  Thanks

I would like to configure bash to execute clear command every time I type some command in the terminal (before executing my command). How can I do that?  I'm using Debian Linux.


I have button and a select box. i want to open the dropdown by click on the button.  <button id="showDropdown"></button> <select id="selectME">   <option>Select</option>   <option value="1">1</option>   <option value="2">2</option>   <option value="3">3</option> </select>   I have tried this js script:  $("#showDropdown").click(function(){   $("#selectME").click();  });   This is not working for me. Please help.

For this dropdownlist in HTML:  <select id="countries"> <option value="1">Country</option> </select>   I would like to open the list (the same as left-clicking on it). Is this possible using JavaScript (or more specifically jQuery)?


I'm on Xubuntu 11.10 and currently trying to use emblems in Thunar to mark which videos in a folder I've already watched.  The problem is I can't find any terminal command to do so and neither can I change the properties of multiple files in Thunar as the context menu item 'properties' is greyed out as soon as I select more than one file.  The command 'gvfs-set-attribute' which works with Nautilus doesn't do anything in Thunar. I guess Thunar stores the meta-data in some other way.  Can anyone tell me how to either set the emblems with a custom command (better solution) or change multiple file properties in Thunar?

I would like to add emblems to a file in Thunar using a script, but I can't find any documentation on this.  Is it possible to do this? And if so, how?  The same question was asked , but they mention a ~/.cache/Thunar/metafile.tdb file which does not exist on my system. I think that question and the answer are outdated.


I have a list_sorter class which gets a T type list and makes it sorted. There is my problem: it is working in one cpp file. When I try to decompose it to header file and another cpp file, I get undefined reference to `list_sorter::list_sorter(std::__cxx11::list >)'.  I've read many examples, but cannot solve this.   Could somebody help me, what am I doing wrong? What should I change? Please see my files and codes lower:  listsort.h:  #ifndef listsort #define listsort #include<list>  template <typename T> class list_sorter{       private:     std::list<T> adat;      public:     list_sorter(std::list<T> be);     void add(std::list<T> uj);     void print(); }; #endif   list_sorter.cpp:  #include<list> #include"listsort.h" template <typename T> class list_sorter{       private:     std::list<T> adat;      public:     list_sorter(std::list<T> be): adat(be) { adat.sort();}     void add(std::list<T> uj){         for(auto a:uj) adat.push_back(a);         adat.sort();     }     void print(){for(auto a:adat) cout<<a<<" ";} };   try.cpp:  #include"listsort.h" #include<iostream> #include<list>  using namespace std;  int main(){     list<int> tombocske;      tombocske.push_back(70);     tombocske.push_back(7);     tombocske.push_back(2);     tombocske.push_back(12);       list_sorter<int> rendezo(tombocske);      rendezo.print(); cout<<endl<<endl;      list<int> tili;     tili.push_back(45);     tili.push_back(1);     tili.push_back(32);     tili.push_back(7);      rendezo.add(tili);     rendezo.print();      list<string> tali;     tali.push_back("gyozo");     tali.push_back("kave");     tali.push_back("alma");     tali.push_back("pipa");      list_sorter<string> rendezo2(tali);      rendezo2.print();  }

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


I submitted a question on Stackoverflow:   Googling last night, I came across this post:   1) Why is my question on another site  2) Did I sign up for my information (even though it is only a question) to be shared with other forum communities on sites?  I might be missing the point here..

of Stack Overflow, all content posted on Stack Exchange sites by their users (i.e. you wonderful people) has been provided to the whole universe under . For my fellow non-lawyers, that license basically means:   Anyone can use any Stack Exchange posts at any time without having to ask for permission Making money off of the copied content is permitted You don't even have to copy stuff from here verbatim; you can just use it as a starting point and make whatever edits you want There are just two rules you have to follow:   You have to provide . Simple links to the original post and author info are just fine. You have to  and allow other people to use your content, as long as they follow these very same rules. How meta!    (If you ever forget any of that, and want to refresh your memory, the license info is linked to in the footer of every page.)  There are, in fact, a lot of people who republish varying amounts of our content for assorted reasons. Unfortunately, there are some Stack Content Republishers Attributing Poorly and/or Excelling at Ranking (SCRAPERs, for short).  In this context, "attributing poorly" means any use that doesn't follow our attribution rules or make any other reasonable attempt at give credit. This can get pretty egregious; I've seen SCRAPERs that not only don't link back to SE originals, but also use fake author info and post dates to make it harder to find originals. By "excelling at ranking," I'm referring to copycat sites that end up higher in Google results than the original SE sites do for the same content. That's not necessarily wrong, but in some cases, it indicates inappropriate SEO hackery.  So, the question is: what can you do if you spot a SCRAPER?


As I understand the Fifth Edition rules, my player character may only have one spell that requires concentration active and in place at a time.   , , and  all require concentration.   So, preparing before that big final battle, my wizard may only have one of those spells active at a time, regardless of whether he is the target for all or for none.      You can’t concentrate on two spells at once.    Am I misreading the rules? Or is there a way my wizard can cast invisibility on the party rogue, magic weapon on the spear of the party fighter, and levitate on himself, and have all three active before they attack the Big Bad Opponent?

Are there any ways to maintain concentration on more than one spell at a time, or to interrupt and later resume concentration on a spell?  I do know the general rules says it can't be done, but the general rules also state that a specific rule beats a general rule.


Show that $\mathbb{Z}[\sqrt{2}]$ is a commutative ring  Do I just need to prove that it commutes for addition and multiplication?  Also, how would I find the units of this ring?

How can I show that the units $u$ of $R=\mathbb Z[\sqrt{2}]$ with $u>1$ are $(1+ \sqrt{2})^{n}$ ?   I have proved that the right ones are units because their module is one, and it is said to me to do it by induction on $b$ and multiplication by $-1+\sqrt{2}$. I have already shown that the units of this ring has norm $1$ and all the numbers with norm $1$ are units, this may help.


I am extremely sorry I couldnot type as it requires much time to do MathJax. This problem Question 8 was asked in an entrance examination at the 10+2 level. My approqch for part (a) was  to use differentiation and find Q'(x) but it is not so ....helping me to arrive at the result. Any hints or help is appreciable. Thank you

$$Q(x) = x^k + a_1x^{k+1}+ ... + a_nx^{k+n}$$ where $k,n$ are positive integers is a polynomial with real coefficients. I have to show that $Q(x)/x^k$ is strictly positive for all real x satisfying $$0<|x|<1/(1+\sum_{i=0}^n |a_i|)$$  Now the polynomial formed after division(which is legal since $x$ is non-zero) is the general $n$ degree polynomial $1+a_1x+...+a_nx^n.$ This approaches $1$ as $x$ approaches $0$. But how can I obtain the right hand part of the inequality? Furthermore, I tried substituting $x=1$ to obtain the right hand denominator but the it doesn't give the sum of the absolute values.


Is there a better way to plot a graph and shade a particular area? I've pieced what follows below from other answers, but when I try to extend the axes beyond the plot itself, the whole circle becomes shaded.  \documentclass[15pt]{article} \usepackage{amsmath} \usepackage{amssymb} \usepackage[left=2cm,right=2cm,top=2cm,bottom=2cm]{geometry} \usepackage{pgfplots} \usepgfplotslibrary{fillbetween} \pgfplotsset{compat=newest} \pgfplotsset{width=10cm,compat=1.16} \makeatletter \renewcommand*\env@matrix[1][*\c@MaxMatrixCols c]{%   \hskip -\arraycolsep   \let\@ifnextchar\new@ifnextchar   \array{#1}} \makeatother \begin{document}     \begin{center}         \begin{tikzpicture}             \begin{axis}[                 data cs=polar,                 smooth,         axis lines = center,         xlabel = $x$,         ylabel = {$y$},]         \addplot [name path=f, domain=0:360]   {3};         \path[name path=axis] (axis cs:-3,0) -- (axis cs:3,0);     \addplot [             thick,             color=red,             fill=red,              fill opacity=0.5         ]         fill between[             of=f and axis,             soft clip={domain=-3:3},         ];      \end{axis}         \end{tikzpicture}      \end{center}  \end{document}   Thanks!

I know that my effort below can be improved upon considerably.  In particular, there must be a way of shading the region in a single scope, as opposed to subdividing as I have done (thus necessitating a hidden gray boundary).  Neither am I fond of sample points, but this is where my research has led me.  Your constructive criticism is appreciated.    \documentclass{article} \usepackage{tikz} \begin{document}  \begin{tikzpicture} %graph \draw[draw=gray!50!white,fill=gray!50!white]      plot[smooth,samples=100,domain=0:1] (\x,{0}) --      plot[smooth,samples=100,domain=1:0] (\x,{1}); \draw[fill=gray!50!white] plot[smooth,samples=100,domain=1:2.71828] (\x,{ln(\x)}) --      plot[smooth,samples=100,domain=2.71828:1] (\x,{1}); \draw[domain=0:4] plot (\x,{1}); \draw[samples=100,domain=.25:4] plot (\x,{ln(\x)}) node[above left]{$y=\ln x$}; %coordinate grid \draw (-.5,0)--(4.5,0) node[right]{$x$}; \draw (0,-1.5)--(0,2.5) node[above]{$y$}; \foreach \x in {1,2,3,4}     \draw (\x,2pt)--(\x,-2pt) node[below] {$\x$}; \foreach \y/\ytext in {1,2}     \draw (2pt,\y)--(-2pt,\y) node[left] {$\y$};     %labels  \node at (.75,.5) {$\mathcal{D}$}; \end{tikzpicture}  \end{document}


I just started studying Topology this week so bear with me if the answer is trivial...      Given a topology $(X, \tau)$, where $X$ is an infinite set. Show that if all the infinite subsets of $X$ are closed, then $(X, \tau)$ is the discrete topology.    My approach is the following. Suppose that $S \subset X$. Then either $S$ is finite or infinite.   If $S$ is finite, then $X \setminus S$ is infinite (because $X$ infinite), and because $X \setminus S$ is closed, $S$ is open.   If $S$ is infinite, then I run into troubles. You see, take the natural numbers $X = \mathbb N$. Then $S  = \mathbb N \setminus \{1 \}$ is infinite and its complement is finite. So there is no guarantee that $X \setminus S$ is infinite right? Do I miss something here?

I am solving question $8$ of exercises in section 1.1. of chapter 1 in "Topology without tears". The question reads as follows.     Let $X$ be an infinite set and $\tau$ be a topology on $X$. If every infinite subset of $X$ is in $\tau$, prove that $\tau$ is the discrete topology   My idea was to show that every singleton set is in the topology and thereby the topology is discrete.  Choose an infinite set $A$ from $X$ such that $A^c$ is also infinite. $A$ and $A^c$ belong to $\tau$ since they are infinite sets. Now consider any $x \in X$. Note that $A \cup \{x\}$ and $A^c \cup \{x\}$ belong to $\tau$ since they are infinite sets. Hence, their intersection which is nothing but $\{x\} \in \tau$ for every $x \in X$.  The problem I have is I don't know how to prove the first sentence in the previous paragraph. These are my line of thoughts to prove them.   If $X$ is a countably infinite set, then I can list the elements are let the odd numbered elements fall into $A$. This guarantees $A$ and $A^c$ are both infinite. If $X$ is uncountable, then I can choose a countably infinite subset and call it $A$.   Are the above arguments rigorous? I am not especially happy with my second argument of choosing a countably infinite subset from an uncountable set since I do not give an explicit procedure of constructing the set $A$.  Also, is there any other simpler way of answering the original question?


In Calculus by Spivak (1994), the author states in Chapter 18 p. 341 that  $$\exp(x+y) = \exp(x)\exp(y)$$ implies  $$\exp(x) = [\exp(1)]^x$$  He refers to the discussion in the beginning of the chapter where we define a function $f(x + y) = f(x)f(y)$; with $f(1) = 10$, it follows that $f(x) = [f(1)]^x$. But I don't get this either. Can anyone please explain this? Many thanks!

This is part of a homework assignment for a real analysis course taught out of "Baby Rudin."  Just looking for a push in the right direction, not a full-blown solution.  We are to suppose that $f(x)f(y)=f(x+y)$ for all real x and y, and that f is continuous and not zero.  The first part of this question let me assume differentiability as well, and I was able to compose it with the natural log and take the derivative to prove that $f(x)=e^{cx}$ where c is a real constant.  I'm having a little more trouble only assuming continuity; I'm currently trying to prove that f is differentiable at zero, and hence all real numbers.  Is this an approach worth taking?


I made this script that watches one folder and copies any file added to that folder to another destination. It works as expected when the directories have no spaces. With spaces "~/Untitled Folder" becomes ~/Untitled and ~/Folder resulting in a "no such directory error". please help! How do I get the variable to work properly later in the script? #!/bin/bash clear echo "Drag folder you want me to watch into this window, then press enter."   read WatchFolder  echo $WatchFolder echo echo "Drag backup destination into this window, then press enter" read BUfolder echo touch "$BUfolder"/CopiedList.txt  cd $WatchFolder lastCount=0          LoopCount=0 while true     do         LoopCount=$(expr $LoopCount + 1) ; echo $LoopCount #increment Loop count by one. Loopcount is echoed as progress feedback         Copied=($(cat "$BUfolder"/CopiedList.txt))         if [[ $(ls $WatchFolder | wc -l | sed 's/ //g') -gt 0 ]] && [[ $lastCount != $(ls $WatchFolder | wc -l | sed 's/ //g') ]] ## if watchfolder has more than zero files and the current count "$LoopCount" is greater than               then        ## previous count "$lastCount"                 for i in $WatchFolder/* ## This loop copies every file in the watch folder not listed in CopiedList.txt                      do                       if [[ ! ${Copied[@]} =~ $i ]]                       then                       cp  -n -R "$i" "$BUfolder"/ ; echo "Copying $i" ; echo $i >> "$BUfolder"/CopiedList.txt ## -n Stops cp from overwriting file. -R copies entire sub-tree of $BUfolder                       sleep .1  ## just a little pause to limit how much memory the script eats up                     fi                 done               fi               lastCount=$(ls $WatchFolder | wc -l | sed 's/ //g')  ##pass new file count to variable $lastCount               sleep 1 ## pause 1 second to save memory/cpu  done

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'm new to blender and i need to makee a small 3d platform level for school. I followed a tutorial and built my level inside an UV Sphere so it would get a background image. in my case, to simulate the Space. The problem is, i've done one level already and its all good. But in this second one, whenever i try to switch to camera view, theres this gray circle and i cannot render the texture of the sphere. Whats goin on ?  EDIT: Heres the image:    EDIT2 : I already changed the clipping end parameter. Still nothing.  EDIT3:

When I go to camera perspective, there are parts of my object that I can't see. I tried adding and deleting my camera a lot of times and positioning it so that the objects I would like to see on my camera view will be seen but to no avail, I still get the same problem.    What could be wrong with my camera set-up?


I'm facing an issue with ArcGIS 10.3. When I try to use symbology type "category" the program crashes. It seems that is not a matter of data because I used the data before and nothing happened. The problem started yesterday after a windows 10 update so I consider something relate do this update (may 10).   I tried the complete uninstall and reinstall and didn't solve the problem.  I tried also save the MXD with another name in other location.   So my question is related to the possibility of a problem caused by an windows update.   Any ideas?

I'm a complete novice to GIS and just began an Introductory course. I am having an issue when I try to access the Symbology tab on a layer. Specifically, when I click on the 'Categories' field and 'Unique Values' subfield, ArcMap crashes and comes up with a report window to send to ESRI. The message is      ArcGIS for Desktop has encountered a serious application error and is   unable to continue.   What could be the problem?


I'm having a devil of a time trying to get Windows 8.x into safe mode.  From what I've read it seems nigh impossible to do this without doing a jig and catching a leprechaun first.  The shift-(mash)F8 just doesn't do the trick.  I've tried this on about 10 computers so far ranging from various 8 and 8.1 editions with no joy.  Is there a sure fire mechanism to trigger safe mode now?  I'm even open to the idea of some CD/ISO that is set up to trigger this by modifying the boot.ini or such if you know of a tool like this.  There are way too many situations where I'm needing safe mode to keep going on like this otherwise.

I would like to know what the best way to get a computer running Windows 8 or 8.1 into the light blue Advanced Startup Options menu is.  Also list the ways to get into Safe Mode if different from the ways above.  If possible, account for the fact that something is wrong with the computer and they cannot log in. Also, while I realize that SHIFT+F8 is a good way to get into the menu, most computers nowadays are "too fast" to see it.  My video drivers are broken, so it's kind of hard to open a command prompt. I'm not even sure if I am logged in or not.


I'm trying to install Ubuntu 12.04 on my laptop. I downloaded the .iso file and burned it to DVD, then I restart the system and select boot from DVD.  Now, there is just a black screen that a prompter is above the screen at the left side and I cannot write anything. After about 15 minutes my system automatically shut down.  How can I solve this?

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


Who is the oldest character in the trilogy, what is his role, race and powers?

The Hobbit, The Lord of the Rings, The Silmarillion, The Histories of Middle Earth, all lore related to this universe is acceptable fodder. Regardless of their power, susceptibility to The One Ring, amount of appearances, or any other constraint, who or what is the oldest?   Since Eru is the "easy" answer, then who or what is second? Any canon source, including letters, is acceptable.  I am asking this as more defined version of  which was put on hold.  And if it matters, the criteria would be oldest at the end of LotR or whatever place he left off in his tales whether the being was alive or not at that point. Example: if being 1 was 999 years old at point A and died, and being 2 was 998 at point B (years after point A) and died, being 1 was oldest in the lore.   (I am not well-read in the Histories and letters and such. If he continued the tale much past the end of LotR, then that is the cut-off point. Oldest sentient being, alive or dead, at the end of canon.)  If you have a question about if some source counts, ask yourself: Did it come from JRR or Christopher working from his father's notes? If the answer is Yes, then it counts. If it does not come from the family, then no. I can trust scholars, but would like the trail to be only one degree of separation. If your case is compelling enough, a pass may be granted.   EDIT  If it's not bad form, can I extend the question to the oldest four? Eru is too obvious and as Kevin comments, "Eru was clearly first, he created the ainur second, and it's generally indicated that Tom Bombadil is tied to Middle-Earth and so third." The "generally indicated" thing is not decisive, but, if this is indeed accurate, I'm curious to know just a little bit more. Please either play along with me, or slap my hand for grabbing too many cookies. It's a fascinating and complicated history I know too little about. (I do plan to remedy this someday.)  NEWER EDIT  I just noticed this question still gets viewed and was active a few months ago. Let me further clarify. I am after the oldest entity AT ANY POINT in the canon. If a creature lived to be 99 years (I'm using low numbers to keep it simple) and then died, and another lived to be 98 at the close of the canon, the dead one wins. Living, dead, doesn't matter. Age at end of canon is all that counts.


Consider a system of differential equations can be written on the form $$ i\frac{\partial}{\partial t}\mathcal{A}(t)=\mu(t) \mathcal{A}(t) $$ where $\mu(t)$ is the coefficient matrix and is time dependent. Can we say that the solution of the considered system is equal to: $$ \mathcal{A}(t)=\mathcal{A}(0)\exp\left[ -i\int_0^t \mu(\tau) d\tau \right]. $$ ? Please help me.

I am sorry but I haven't learn any method to solve this kind of problem if the given matrix is non-constant.  $$\begin{pmatrix}x\\y\end{pmatrix}^\prime=\begin{pmatrix} 1&-\cos t \\ \cos t & 1\end{pmatrix}\begin{pmatrix}x\\y\end{pmatrix}$$  Thanks


Prove that $ \frac{n(n-1)(n-k+1)}{k(k-1)\cdots1} = \frac{n!}{(n-k)!k!}$.  $= \frac{n(n-1)...(n-k+1)(n-k)!}{(n-k)!(k(k-1)...1)(3 \times 2 \times 1)}$  $= \frac{(n(n-1)(n-2)...(n-k+1)}{(k(k-1)....1)}$  $= \frac{n(n-1)..(n-k+1)}{k!}$  My question is how is it that $(n-k)!$ is able to appear in the numerator and denominator on the right side of the equation? This is not obvious to me. What is (n-k)! in expanded form?

Prove that $ \frac{n(n-1)(n-k+1)}{k(k-1)\cdots1} = \frac{n!}{(n-1)!k!}$.   Proof:  This is what I have tried:  $\frac{n!}{k!(n-k)!} \times (n-k)!  = \frac{n(n-1)\cdots(n-k+1)(n-k)!}{k(k-1)\cdots1(n-k)!}$  $\frac{n!}{k!} = \frac{n(n-1)(n-2)\cdots(n-k+1)}{k(k-1)\cdots1}$  This is where my attempt ends.   Are my steps correct? If not how can I improve them?  New Questions:  How is it that n-k magically appears on the right side? I get that n-k and 3 times times 2 times 1 cancels out in the numerator and the denominator which leaves   $\frac{n(n-1)(n-2)...(n-k+1)}{k(k-1)....1}$ which is equivalent to ${n \choose k}$ or \frac{n!}{(n-k)!k!}....is that correct?


I would like to do x^(2n), however, when I try to do it, it shows up as (x^2) * n, which is not what I want.  How do I do it the correct way?

How can I write e^(3j) in LaTeX?  I have tried many syntax, like $e^(3j)$ or $e^*{3j}$  Any help will be very well received.


Sorry for unclear question, but the Simple Deform modifier has been one of the most difficult ones to use consistenly. It sometimes does what I intend it to:    while other times this happens:    Transforms are applied, everything else seems to be fine, and the two objects have basically the same topology, so what causes this difference? Also tried using an empty for the Axis Origin of the 2nd result, but to no avail. If anyone could give me a quick rundown of why this happens and how to use the Simple Deform modofier properly, it would be greatly appreciated. At the moment whether it works as intended or not feels like a gamble.

I want to bend my plane in y-axis but it's not happening. I have been facing this problem from many days


On my textbook, I was given the following conditions for when a continuous mapping is a homeomorphism: "Let(X,τ) and (Y,τ′) be topological spaces and f a function from X into Y. Then f is a homeomorphism if and only if (i)f is continuous, (ii)f is one-to-one and onto; that is, the inverse function f^−1:Y→X exists, and (iii)f^−1 is continuous" I was wondering whether the third criteria is even needed. If a mapping satisfies the first two, shouldn't the inverse mapping automatically be continuous?

A homeomorphism is a continuous function between topological spaces that has a continuous inverse function.  Can someone provide examples of a continuous function between topological spaces that does not have a continuous inverse function?   It would help me grasp the intuition for what a homeomorphism is.  Feel free to use different topological spaces for your examples (but at least one with $\mathbb{R}$ would be nice)!


I need to represent binary modulo 2 long division in my tex document. Notation needed is same as    under Austria, Germany, etc.  I know about longdiv package, but it doesn't seem to support this.  Is there any package to achieve this? If not, how can I manually do this.  Thanks in advance

I used some of the solution proposed in this post:    and my code is as follows:  \documentclass{standalone} \begin{document}  \begin{tabular}{c*{11}{@{\,}c}}       2&:&7&=&0&,&$\overline{2}$&$\overline{8}$&$\overline{5}$&$\overline{7}$& $\overline{1}$&$\overline{4}$       \\       {\color{red} 2} &{\color{red} 0 } & &&&&&&&&& \\       1 & 4 &&&&&&&&&&  \\  \cline{1-2}        & 6& 0 &&&&&&&&&  \\        & 5 & 6 &&&&&&&&  \\   \cline{2-3}        &  & 4 & 0 &&&&&&&  \\        &  & 3 & 5 &&&&&&&  \\  \cline{3-4}        &  &      & 5 & 0 &&&&&& \\        &  &      & 4 & 9 &&&&&&  \\  \cline{4-5}        &  &      &   & 1 & 0 &&&&& \\        &  &      &   &   & 7 &&&&& \\ \cline{5-6}        &  &      &   &   & 3 & 0 &&&& \\        &  &      &   &   & 2 & 8 &&&& \\  \cline{6-7}        &  &      &   &   &   & { \color{red} 2} &{\color{red} 0} &&&     \end{tabular} \end{document}   The goal is to show the repeating decimal part with overline over the repeating decimals. The code does that, but each decimal is overlined in isolation, but I want a continuous overline!  But that does seem to infer with the mechanics of tabular ...


I have a DELL R710 with ESXI 5.0. I've created a VM with 100GB thin provision. I deleted most of the data. Is it possible to shrink the VM folder on the ESXI? thanks! Dotan.

EHLO everyone! My first post on the StackOverflow network :)  We're running some ESXi 5.0/vCenter infrastructure to host mainly Debian 6/amd64 guest systems with ext3 partitions and open-vm-tools compiled from source per .  Got an issue that is seen being raised all around the internet, but without a conclusive answer given anywhere.  When trying to shrink a thin-provisioned disk in independent-persistent mode, with no snapshots, parents, clones whatsoever, I consistently get the following error:  root@linux64:~# vmware-toolbox-cmd disk list Shrink disk is disabled for this virtual machine.  Shrinking is disabled for linked clones, parents of linked clones, pre-allocated disks, snapshots, or due to other factors. See the User's manual for more information.   (By the way, what are the "other factors", and which of the ton of white papers and technical manuals is the User's manual?:)  I know that I can stuff the partitions with zeros (in fact, I do use shred -fuzn0 when deleting large files) then shut down the guest in question and use various methods like vmkfstools, cloning or vMotioning disks around in thin-provision mode, etc, but all of them either incur the downtime penalty for the guest being shirnked, or result in an unwarranted moving of data between datastores and/or hosts.    And the answer is: No shrinking under ESX/ESXi (as of version 5).   The  reads:  IMPORTANT Shrinking disks is not allowed under the following circumstances:   The virtual machine is hosted on an ESX/ESXi server. ESX/ESXi Server can shrink the size of a virtual disk only when a virtual machine is exported. The space occupied by the virtual disk on the ESX/ESXi server, however, does not change. The virtual machine has a Mac guest operating system. You preallocated all the disk space to the virtual disk when you created it. The virtual machine contains a snapshot. The virtual machine is a linked clone or the parent of a linked clone. The virtual disk is an independent disk in nonpersistent mode. The file system is a journaling file system, such as an ext4, xfs, or jfs file system.   No wonder there is an option to shrink in VMWare Workstation but not in vSphere client connected to an ESXi or vCenter instance.


I am a citizen of Pakistan and I was recently granted a long term visa "type D" National Visa of Poland.  I was wondering can I transit through Denmark or Germany en-route to my host country or do I need a transit/tourist visa from those countries?  With the flights I am looking at it seems like I will have to pass through border control in order to catch a 'domestic' flight to Warsaw either from CPG or Frankfurt.

I’m going to Germany for a semester exchange and I have a long-stay visa from Germany. Can I travel to the other Schengen states during this period with this visa or do I have to apply for a separate short stay Schengen visa?  My visa is German national visa type D. It is for a duration of 4 months, i.e., longer than 90 days. It says on the visa that the long stay visa is valid in Deutschland, which is different from my earlier visa, which I had when I visited Germany earlier; that one was a short stay visa and said it was valid in Schengen Staten.  Perhaps my current visa means that I can stay in Germany for a period of longer that 90 days can visit the other Schengen states if I don’t exceed the 90 day period.


Good day,  I am trying to create a program that obtains orientation data from Sensors then uses that in a PID control algorithm to create corresponding PWM signals. I would like to be able to stop the program by pressing enter. I tried using opencv's waitKey(); however it does not accept my keyboard inputs. I also tried cin.get(); but it pauses my loop which creates a problem. My pwm would not get refreshed once the quadcopter changes orientation. I tried researching other methods however I could not get them to work. Here is a sample of my code using the two methods mentioned above.  Using cin.get():  using namespace std;  int main(void){      while(1){         /* get orientation data */      /* output corresponding pwm */      //Press enter to stop loop         if(cin.get() == '\n'){             /* Stop Pwm */              break;         }     }     return 0; }   Using waitKey();  using namespace std; using namespace cv;  int main(void){      while(1){         /* get orientation data */          /* output corresponding pwm */          //Press ESC to stop loop         int key = waitKey(33){         if(key == 27){             /* Stop Pwm */              break;         }     }     return 0; }

I'm trying to write a program in C (on Linux) that loops until the user presses a key, but shouldn't require a keypress to continue each loop.  Is there a simple way to do this? I figure I could possibly do it with select() but that seems like a lot of work.  Alternatively, is there a way to catch a ctrl-c keypress to do cleanup before the program closes instead of non-blocking io?


If my level 7 druid casts  (choosing the Primal Beast form) on himself and then proceeds to use , do the effects of the spell carry over to the Wild Shape?

Assume you cast Barkskin in humanoid form:     You touch a willing creature. Until the spell ends, the target’s skin has a rough, bark-like appearance, and the target’s AC can’t be less than 16, regardless of what kind of arm or it is wearing.   It is clear that under the rules of Wild Shape "transforming doesn’t break your concentration on a spell you’ve already cast", but does the effect of the spell carry over to your new skin?


I want to have the bibliographies at end of each chapter and still have the cross-reference on the reference list stating "Cited on pages:" using natbib and chapterbib packages.  To compile the document I am using a .bat file as postprocessor as instructed here:  Please also use the referred process or  pdflatex Sample.tex bibtex Sample.tex bibtex chp01 bibtex chp02 [...] pdflatex Sample.tex pdflatex Sample.tex   to compile the PDF.  Please see the example files below.  Sample.tex  \documentclass[a4paper,12pt,twoside,openright]{scrreprt} \usepackage{filecontents} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{filecontents}{chp01.tex}     \blinddocument      \cite{lamport94}     \cite{knuth84}      \begingroup     \let\chapter\section     \cleardoublepage     \phantomsection     \addcontentsline{toc}{section}{References}     \bibliographystyle{unsrt}     \bibliography{sample}     \endgroup \end{filecontents} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{filecontents}{chp02.tex}     \blinddocument      \cite{knuth84}      \begingroup     \let\chapter\section     \cleardoublepage     \phantomsection     \addcontentsline{toc}{section}{References}      \bibliographystyle{unsrt}     \bibliography{sample}     \endgroup \end{filecontents} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \begin{filecontents}{sample.bib}     @book{knuth84,         author    = {{D}onald {E}. {K}nuth},         title     = {{T}he \TeX book},         year      = {1984},         series    = {{C}omputers and typesetting},         volume    = {A},         publisher = {{A}ddison-{W}esley}     }      @book{lamport94,         author    = {{L}eslie {L}amport},         title     = {\LaTeX\ -- {A} {D}ocument {P}reparation {S}ystem},         year      = {1994},         publisher = {{A}ddison-{W}esley},         edition   = {{S}econd}     } \end{filecontents} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage[T1]{fontenc} \usepackage[latin1]{inputenc}  \usepackage[square,comma,numbers,sort,sectionbib]{natbib} \usepackage[sectionbib]{chapterbib}  \usepackage[english]{babel} \usepackage{blindtext}  \usepackage[hyperindex,pagebackref=true,pdfusetitle,pdfa=true]{hyperref} \hypersetup{plainpages=false,colorlinks,breaklinks,linktocpage,hypertexnames=true,naturalnames=false} \hypersetup{linkcolor=red,citecolor=blue,filecolor=blue,urlcolor=blue}   %%%%%%% Backref \renewcommand*{\backrefsep}{, } \renewcommand*{\backreflastsep}{ and~} \renewcommand*{\backreftwosep}{ and~} \renewcommand*{\backref}[1]{}   % empty definition for \backrefalt to be used, i.e. disable standard  \renewcommand*{\backrefalt}[4]{%  \vspace{-1.0mm}     \scriptsize\itshape\mbox{         \ifnum#1=1 %          \\(Cited on page~%         \else             \\(Cited on pages~%         \fi         #2)         }}  \begin{document}     \include{chp01}     \include{chp02} \end{document}   The file is beeing compiled, but the reference page links of "Cited on pages:" are missing (see the figure below).  Is it possible a patch or workaround to fix that?

I'm using LaTeX + BibTeX to write my dissertation. I have one separate .tex file for each chapter. And I'll generate one bibliography for each chapter. But all the references are from the same file (main.bib).   So, there are many situations in which different chapters will cite the same reference. Thus, one reference can appear more than once in the bibliographies of the whole dissertation (but in different chapters). I'd like to use back references from the . I'm just wondering whether it would be possible to do so?  % chapter 1 Bibliography [1]. A and B, Nature, 1991. 15, 20. ...  % chapter 2 Bibliography ... [3]. A and B, Nature, 1991. 55, 67. ...


When I was a kid I had this large (coffee table-ish) hard cover illustrated book, which was basically a travel-companion guide for people going on this intergalactic cruise.  The whole thing was spun (basically) as a brochure for all these different exotic destinations that the cruise would visit.  It was (as I recall) incredibly well crafted, with a lot of very clever detail and gorgeous art.

I remember reading a sci-fi story where astronauts visit a planet, which is covered in stationary aliens with mile long necks that filter feed from the atmosphere.  It was published between 1960 and 2000.    It was in English and involved a pair of astronauts that went from planet to planet on a tour or something, though I don't know details of any other planets they visited.


If I buy a piece of cold Salmon in a supermarket, and it doesn't say anything about being  or having been deep-frozen at X degrees for Y time - how can I know whether it's safe to eat raw?  Note: I live in the Netherlands, in case the answer varies by location.

Is it safe to consume raw fish purchased at the fish counter of a typical suburban grocery store? If not, do you have any tips for finding sushi grade fish. Also, are there requirements for safe sushi/sashimi beyond the use of safe fish?


I am using jquery 1.8 and have to display popup when user clicks some area with class dropdown-toggle. I have attached the events using on while the page loads for the first time.   Here is it  $('.dropdown-toggle').on("click", function (e) { console.log("dropdown toggle called"); $(this).next('.dropdown').toggle(); }); $(document).on("click", function (e) { var target = e.target; console.log("click toggle called"); if (!$(target).is('.dropdown-toggle') && !$(target).parents().is('.dropdown-toggle')) { $('.dropdown').hide(); } });   What i found that second event applies to elements added in future but the first one does not i.e. for a drop down menu added later, only "click toggle called" gets printed in console but for those elements added during start both "click toggle called" and "dropdown toggle called" gets printed.   What is problem here? Does on applies only to document for future element or can it be applied to class or other elements too so that they apply to future elements? If not what is the solution?

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.


I would like to make note paper, such as this   in LaTeX. I know that you can achieve this with TikZ. I wanted to ask if there exist dedicated packages for this purpose. Or do you have other hints?

I would like to print a document with text on lined paper like a notebook like   However, I would like to be able to edit the line colours.  I would like to put the header/title in the blank white space. Is there a way to do the document above without using the background jpg?  The document is also multiple pages.   I have looked at this question too and would like to have lines only and not a grid.   Thanks!


Obviously this is a Javascript problem. As javascript are already loaded to the server, I was wondering if there is way to check whether there is active internet connection or not.

How to detect the Internet connection is offline in JavaScript?


I understand that @Override annotation in java simply tells the compiler to check and see if it's actually overriding a method in the super class during compile time.   From the article that I read: .   @Override annotation definition is simply the following:  @Target(ElementType.METHOD) @Retention(RetentionPolicy.SOURCE) public @interface Override { }   This annotation definition has no logic on telling the compiler to look for the same method signature in the super class.   Is the logic to check it's super class for the same method signature define in the java compiler?

What are the best practices for using Java's @Override annotation and why?     It seems like it would be overkill to mark every single overridden method with the @Override annotation.   Are there certain programming situations that call for using the @Override and others that should never use the @Override?


I decided to spray paint my desk matte black and glossy red. I spray painted the top and it was fine but I sprayed the sides and I got drips. I woke up the next morning to find the drips dry and I don't know how to get them off.  Please help its my main pc desk.

I purchased . However, I did not like the color. So I sprayed painted it semi-gloss black with . Suffice to say, I'm not very handy. It ended up un-smooth on the curved edges because of paint drips.  How should I go about smoothing it out?


I used the Tikz to draw a directed graph. But the problem is the orientations are the end of edges. I need something like the following picture:    But my graph is in the following picture.


Let $S_k$ be a set with $k$ elements. Then $S_k$ has $2^k$ subsets. So the formula $2^{n+1}-1 = \sum_{k=0}^n 2^k$ can be translated to $$\text{number of *nonempty* subsets of $S_{n+1}$} = \sum_{k=0}^n\text{number of subsets of $S_{k}$}.$$ Is there a combinatorial way of seeing that this formula must hold?     (I'm not looking for non-combinatorial proofs like $(2-1)\sum_{k=0}^n 2^k = 2^{n+1}-1$)

I know that the sum of power of $2$ is $2^{n+1}-1$, and I know the mathematical induction proof. But does anyone know how $2^{n+1}-1$ comes up in the first place.  For example, sum of n numbers is $\frac{n(n+1)}{2}$. The idea is that we replicate the set and put it in a rectangle, hence we can do the trick. What is the logic behind the sum of power of $2$ formula?


I wanted to find out in options.bldata if firstLaunch= was written, for this I wrote the following code: File file = new File("options.bldata");     Scanner scanner = new Scanner(file);     while (scanner.hasNextLine()) {                  String line = scanner.nextLine();         if (line == "firstLaunch=") {                          System.out.println("123");                      }              }  when it finds a line with firstLaunch= it should print 123, but I don't know why it doesn't print 123 even if firstLaunch= is in the file.

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?


I have a sentence that says "Simon and Shirli are friends" When I want to ask about the subject, how should I ask:  Who are friends?  or  Who is friends?  Thanks!!

Is it correct to ask      Who is Lisa friends with?   or should it be      Who are Lisa friends with?


Between the return of Lord Voldemort at the end of book 4, Goblet of Fire, and the end of the series, how was Snape useful for the Order of the Phoenix in fighting against Voldemort?

OK, first of all, my Harry Potter knowledge is a bit rusty so I may be forgetting something.    In The Half-Blood Prince Dumbledore made Snape kill him (I know he was going to die anyway) so he could gain Voldemort's trust. In The Deathly Hallows, his portrait instructs Snape to provide Voldemort with the correct date on which Harry was to be moved, again, to gain Voldemort's trust.   Why did Dumbledore want a spy in Voldemort's inner circle so badly?   Would anything have been different if Snape had not been in Voldemort's inner circle?


If you start a background program in the terminal with the & option. Will it stop when you close the terminal?

How do I run a program in the background of a shell, with the ability to close the shell while leaving the program running? Lets say my UI is having problems or for some reason, I need to boot up a program from the terminal window, say, nm-applet:  nm-applet   When it's started, it occupies the foreground of the terminal window.  Is there any simple way to run the program in the background without needing to leave the terminal open or have it occupy the whole terminal?  On that note, I did find a way to run programs from the terminal and have it allow for other inputs, by appending an ampersand (&) to the command as such:  nm-applet &   But this isn't much use as any processes started in the terminal are killed once the terminal is closed.


Looking at the Community user profile, the activity tab shows it reviewing posts. How is this possible?

Why does the Community user sometimes approve or reject edits? How does a machine know if my edit is valid? What does it mean if my edit was rejected by Community?     See also:


I have a strange issue here and I'm hoping that someone can shed some light on this for me. I'm looking for why this behavior occurs and how I can overcome it with PHP.  I have a directory with names of people and some of those names use ASCII characters. The one that I'm having an issue with is the e-acute é. I am using scandir to get the contents of the directory. One of the names containing the e-acute fails, while others using the same character do not fail. I've copied the characters into my IDE and the character that scandir fails on, reports that it is a regular e, although that not what I'm visually looking at; these characters look identical to me.  These are the characters that succeed and fail:  é This one shows as a regular 'e' and fails with scandir é This one shows as e-acute and succeeds with scandir   Can someone tell me why this is? Also, is there a way to do a conversion on these types of characters so that I can be sure that scandir will not fail?  I should mention that I am already using a UTF8 header at the top of the script.

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I'm puzzled by this in Oracle  select case when 'hello' <> '' then 1 else 2 end from dual;   returns 2  select case when 'hello' <> 'hello' then 1 else 2 end from dual;   returns 2  however on SQL*Server this works as expected.

I know that it does consider ' ' as NULL, but that doesn't do much to tell me why this is the case.  As I understand the SQL specifications, ' ' is not the same as NULL -- one is a valid datum, and the other is indicating the absence of that same information.  Feel free to speculate, but please indicate if that's the case.  If there's anyone from Oracle who can comment on it, that'd be fantastic!


I’ll finish the work in the next few days. You can pay me then.  Although you can visit these places, you’re welcome to stay in the hotel if you are tired.  You can buy a ticket from the Tourist Information Center.   Can I use "may" in place of "can" in (1), (2) and (3)?

A friend of mine always texts me asking me to call him. While it's simple and informal to just text "can you call me?" or something similar, he insists on being fancy and texts "may you please call me?" Is this use of the word may correct?


Why does it look bigger when we see something in the water?

A friend of mine has a homework question and we're having some trouble figuring out what physical mechanisms come into play for this.     An underwater swimmer sees a spherical air bubble that appears to have a diameter $d=$ 1.5 cm. What is its actual diameter?   We are having trouble, specifically, thinking of physical mechanisms that would change the apparent sizes of objects when seen underwater. Is it caused by refraction at the curved surface of the bubble?


I am using ubuntu 10.10 version and want to upgrade to a new version but my update manager said it is not possible what should I do? please help me. I  had tried many times to upgrade it but it always give error about Internet connection.

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


I an having trouble trying to understand time as a physical entity. We can demonstrate the existence of air, the source of infection, electromagnetism, voltage, amperage, among many other physical entities. We can measure, weigh or see these items but when it gets to time my brain stops.   Does time have a physical manifestation, is it a particle or simply time is a mathematical expression. A constant pushed into formulas?

If you ask any person about time, she/he will give you some answer.  I suspect that it is extremely difficult, (if not impossible) to define time. Is there a definition of what it is in physics? Is it an "axiom" that has to be taken as it is, without explanations? I also noticed that the tag "time" has no pop-ups with comments/definition/explanations.


I just switched over from using HTML to C, and in HTML it's really easy to use unicode. So I was wondering if there was a way to use unicode in C? Are there any code libraries?

What prerequisites are needed to do strict Unicode programming?  Does this imply that my code should not use char types anywhere and that functions need to be used that can deal with wint_t and wchar_t?  And what is the role played by multibyte character sequences in this scenario?


TexStudio underlines in red an excerpt in which there are some double quotation marks, giving the error above.  I use   \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc}

This is my code, I searched on the internet but can not find any solution. While compiling this error message shows up:      Package inputenc Error: Unicode char ﬁ (U+FB01)(inputenc) not set up   for use with LaTeX. ...would achieve the highest second law efﬁ      \documentclass[a4paper,11pt]{report}     \usepackage[utf8]{inputenc}     \usepackage{amsmath}     \usepackage{siunitx}     \usepackage{gensymb}     \usepackage{textcomp}     \usepackage[scaled]{helvet}     \renewcommand\familydefault{\sfdefault}      \usepackage[T1]{fontenc}      \usepackage{geometry}     \geometry{         a4paper,         total={170mm,257mm},         left=20mm,         top=20mm,     }     \begin{document}     Organic rankine cycle has been a topic of highest interest in recent years. Different types of working fluid and design parameters are considered for the augmentation of performance from an ORC based cycle [9–18] . Out of these numerical and experimental analysis, some recent findings are discussed in this section of literature. Meng Zhao et. al. [19] studied the effects of the ORC Operating Conditions on the Engine Performance for an Engine-ORC Combined System. From the conclusion of this study it was found that engine backpressure increases with the decrease of the pump speed and the expander speed. The maximum engine power output increment at the engine speed of 1500 r$/$min and 2100 r$/$min is 5.47 kW and 7.07 kW respectively. The backpressure increment of the engine with ORC system increases with the increasing of cooling water inlet temperature. From the study of Wenqiang Sun et. al. [20] we can see the exergy efficiency analysis of ORC (Organic Rankine Cycle) and ORC-based combined cycles driven by low-temperature waste heat From the conclusion of his study, the exergy efficiency of both systems decreases with the increase of the evaporation temperature of the ORC. The net power output, the refrigerating capacity and the resultant exergy efficiency of the uncoupled ORC-ARC are all higher than those of the ORC-ERC for the evaporation temperature of the basic ORC $>\SI{153}{\degreeCelsius}$, in the investigated application. Li et. al. [21] showed in his study of a cascade organic Rankine cycle power generation system using hybrid solar energy and liquefied natural gas that an equivalent efficiency of 5.99 $\%$ is achieved with isopentane$/$R125 and ETC and the hybrid system has a faster return on solar power investment than a solar ORC. Landelle et. al. [22] explained based on his experimental database report of ORC design and performance comparison, the closed heat source (e.g. thermal solar) case would achieve the highest second law efﬁciency using a subcritical regenerative ORC with R245fa as working ﬂuid, while the open source case would achieve the highest exergetic recovery efﬁciency using a transcritical ORC with R404a. Desai et. al. [23] showed in the study of Thermo-economic comparisons between solar steam Rankine and organic Rankine cycles that the optimum regions of the selection diagrams remain almost unchanged with the change in working ﬂuid, solar collector ﬁeld cost, cycle efﬁciency, power block cost, and location of the plant. However, the cost of energy for a linear Fresnel reﬂector based plant with steam Rankine cycle ($\sim$ 0.422 $\$$\textbackslash kW h) is much higher than parabolic trough collector ~ based plant with steam Rankine cycle ($\sim$ 0.353 $ \$ $\textbackslash kW h).     \end{document}   Can anyone help ?  Thanks in Advance :)


this question is indeed trivial, but I haven't found any answer to it online. I'm for the first time using the Beamer environment to make a presentation. I'm using the Cambridge US theme, but I want to change the color of the theme to structure, as seen in this . I found quite a lot of information on how to change the color of specific elements within the Beamer environment, but I simply want to change the color of the entire theme.  The reason for this is I don't like the combination of the red general theme and the blue graphics for itemize.  \documentclass{beamer} \usetheme{CambridgeUS} \setbeamercolor{structure}{}  \begin{document}   \begin{frame}  \frametitle{Introduction}  Blablabla  \end{frame}  \end{document}   Thanks!

When I search the Internet, I can find many pieces of code including \usecolortheme[named=XXX]{structure}. If I add it to my presentation, I can see maybe there are some changes. I would like to know when I choose a theme such as Rochester, the color of the structural elements (though I do not know the detail issues) is to be set to some type. Do the structural elements depend upon which theme (such as Rochester) is chosen? Would you please tell me what are included in the structural elements?        \documentclass{beamer}       \usetheme{CambridgeUS}         \title{Title1}       \author{Author}       \institute{Institute}       \date{Date}         \begin{document}        \frame{         \titlepage         }        \section[Outline]{}       \frame{\tableofcontents}        \section{Header1}       \subsection{Header2}       \frame{\frametitle{Topic1}            HTML color codes are the \textbf{hexadecimal triplets} representing the colors red, green, and blue.       \vspace{0.25cm}          These color codes can be used to change the color of the background, text, and tables on a web page.        }          \begin{frame}           testQ         \end{frame}       \end{document}   Above is a piece of craft code .For this theme CambridgeUS ,if I add \usecolortheme[named=XXX]{structure} ,the headline color does not change,I notice some innertheme elements' colors are changed,while I change it to the theme Rochester,I add the \usecolortheme[named=XXX]{structure} ,the headline color also changed.Then my question comes out.


There are 2 methods will callout and insert.I wrote 2 batches to invoke my method. I use the one invoke the other one to avoid System.CalloutException,and it's useful when i run them.  global void finish(Database.BatchableContext BC) {         Database.executeBatch(new TrelloChangeTaskBatch()); }   But when i create MockHttpCallout class and use Test.startTest() and stopTest() in my test class to run the batches.          Test.startTest();         Test.setMock(HttpCalloutMock.class, new MockTrelloHttpResponseGenerator());         Database.executeBatch(new TrelloBatch());         Test.stopTest();   it's still happened.     System.CalloutException: You have uncommitted work pending. Please   commit or rollback before calling out in test class   I tried to delete startTest() and stopTest() but  it's invalid.More than that i can't use @feature. Somebody told my isRunningTest() maybe useful, but i don't know how to use it in my case because there are no example in document.   Anybody know how to solve this problem in unit test? Thanks a lot!

I'm trying to write test code for a Batchable class that AllowsCallouts.  I've written a lot of other test code that uses HttpCalloutMock classes, and planned to do so for this class as well.  And, per best practices, I'm setting up my test data before calling Test.startTest().  Even so, I get a CalloutException:     System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out   This somewhat makes sense, because my start() method passes a SOQL query to Database.getQueryLocator() and my execute() method makes the web callouts.  I'm guessing that when my test method calls test.stopTest(), both start() and execute() run in the same context.  In regular batch operation, they happen in separate contexts so there isn't any uncommitted work.  I intend to work around this by calling the methods directly, possibly even calling start() before Test.startTest(), and then using the returned Database.QueryLocator to get the list of records I'll pass into execute().  I don't like the fact that I'm not testing the batch size used by the static method that kicks off the batch with Database.executeBatch(), so I'll probably have that use a constant that I can reference from my test code to ensure it's using the same batch size.  Salesforce kind of addresses this in the "Asynchronous Apex and Mock Callouts" section of the , but they don't make reference to Batchable classes with Callouts.  They only talk about making callouts and testing Batchable classes in the same test method.  So, my question is whether there is a better way to write this test.  I'm also throwing this out so others searching the site can learn about possible workarounds.


I have changed my touchpad configurations to:  xinput set-prop "13" "Synaptics Finger" 50 50 255 xinput set-prop "13" "Synaptics Noise Cancellation" 20 20 true   How can I save those configurations? Every time I reboot, they are set to default again.

I successfully followed  to set different sensitivities for my touchpad and my USB mouse. Only problem is, once you unplug and replug the device or shutdown, restart etc., the settings reset.


I try to create a regex for nr. of decimal of a number and the number of decimal will be pass from variable.  (Ex:  123.4545)-> 4decimals  const regex = 4; const decimalValidation = helpers.regex('decimalValidation',/^\d*(\.\d{1,4})?$/);  //Insted of 4 ,I have to replace with regex const.

I would like to create a String.replaceAll() method in JavaScript and I'm thinking that using a regex would be most terse way to do it.  However, I can't figure out how to pass a variable in to a regex.  I can do this already which will replace all the instances of "B" with "A".  "ABABAB".replace(/B/g, "A");   But I want to do something like this:  String.prototype.replaceAll = function(replaceThis, withThis) {     this.replace(/replaceThis/g, withThis); };   But obviously this will only replace the text "replaceThis"...so how do I pass this variable in to my regex string?


I am trying to print the incremented values up to the given number by (0.1). I am getting two inputs x and y and then I am trying to print the values from x to y incremented by 0.1, but i am facing the problem. Below is my code. Thanks in advance.  #include<stdio.h> int main() { float x,y,i; scanf("%f %f\n",&x,&y); for(i=x;i<=y;)  {   printf("%.1f ",i);   i=i+0.1;  }   Input:  9.4 10.2  Output:     9.4 9.5 9.6 9.7 9.8 9.9 10.0 10.1   Expected Output:     9.4 9.5 9.6 9.7 9.8 9.9 10.0 10.1 10.2

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


Why is gamma function defined such that $\Gamma (n)=(n-1)!$ rather then $\Gamma(n)=n!$, The latter ssems far more logical.

As a physics student, I have occasionally run across the gamma function  $$\Gamma(n) \equiv \int_0^{\infty}t^{n-1}e^{-t} \textrm{d}t = (n-1)!$$  when we want to generalize the concept of a factorial.  Why not define the gamma function so that   $$\Gamma(n) = n!$$  instead?  I realize either definition is equally good, but if someone were going to ask me to choose one, I would choose the second option.  Are there some areas of mathematics where the accepted definition looks more natural?  Are there some formulas that work out more cleanly with the accepted definition?


I'm new here- looking for a community of folks to learn from. My love for photography was sparked on my honeymoon in Iceland last year. Now I can't get enough. My question to you is- what's the trade off for zoom lenses with longer focal ranges?   For instance, why not just go but a lens that zooms from 18-300? There must be a trade off / compromise?  Ty! Kat.flanagan

Being a beginner, I can't see why I must choose an 80-200 over an 18-200. Are there scenarios where an 80-200 would be preferable over an 18-200?  I will be buying a D7000 soon and am looking at these:       but similar considerations would apply to other brands as well.


I have a list of items with a property code and I want to group by eventId and create a table representation where code values are transformed to columns. Every triple (event, code,amount) is unique.  I want to transform this  eventId code  amount     1      A     100   1      B     101   1      C     102   2      A     103   2      C     104   3      B     105   ....   to this   eventId  A    B   C  1      100  101 102  2      103   0  104  3       0   105  0  ...    var table=from x in list     group x by x.eventId into gr     select new            {               eventId=gr.Key,               ....            }


Whenever I use sudo, I get this:  sudo: unable to resolve host dave00-G31M-ES2L   Here is my /etc/hosts:  dave00@dave00-G31M-ES2L:~$ cat /etc/hosts 127.0.0.1   localhost 127.0.1.1   dave00-G31M-ES2  # The following lines are desirable for IPv6 capable hosts ::1     ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters   I logged out/in already. How can I solve this?

When I run sudo the terminal is stuck for a few seconds and then outputs an error message. My terminal looks like this:  ubuntu@(none):~$ sudo true sudo: unable to resolve host (none)   What can I do to solve it?


I am very much new to ubuntu and this communtiy and i recently installed Ubuntu 14.04 (alongside windows 10) on my newly purchased laptop(hp pavilion 15-ab032tx).  There's some serious issues with the wifi connections in ubuntu.   If I am sitting very close(1 -2 feet) to my router it diplays the connection but gives a very low connection speed.  If I go to a distance more than say 5 feet, it shows the connection to be out of range. I followed some previous threads regarding this issue but i haven't been able to solve the problem.  I also made some changes to the power management of my wireless card( as instructed in another thread) but it also didn't work.  (NOTE: WiFi works perfectly fine on windows 10)  here's some information regarding my wireless card:-    ***-network        description: Wireless interface        product: RTL8723BE PCIe Wireless Network Adapter        vendor: Realtek Semiconductor Co., Ltd.        physical id: 0        bus info: pci@0000:08:00.0        logical name: wlan0        version: 00        serial: 70:77:81:12:70:59        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless        configuration: broadcast=yes driver=rtl8723be driverversion=3.16.0-45-generic firmware=N/A ip=192.168.1.12 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn        resources: irq:18 ioport:5000(size=256) memory:c6100000-c6103fff   *-network        description: Ethernet interface        product: RTL8101E/RTL8102E PCI Express Fast Ethernet controller        vendor: Realtek Semiconductor Co., Ltd.        physical id: 0        bus info: pci@0000:09:00.0        logical name: eth0        version: 0a        serial: 3c:a8:2a:ae:32:43        size: 100Mbit/s        capacity: 100Mbit/s        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation        configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full ip=192.168.1.13 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s        resources: irq:64 ioport:4000(size=256) memory:c6004000-c6004fff memory:c6000000-c6003fff**

I have installed Ubuntu 15.04 on my laptop with RTL8723BE Wi-fi card. But it is always disconnecting from network. I have tried echo "options rtl8723be fwlps=N ips=N" | sudo tee /etc/modprobe.d/rtl8723be.conf but that didn't helped. What can I do to prevent the wifi from disconnecting? If I upgrade to kernel 4.X, will it help?  ~$ lspci -knn | grep Net -A2  09:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter [10ec:b723]     Subsystem: Hewlett-Packard Company Device [103c:2231]     Kernel driver in use: rtl8723be   ~$ rfkill list 0: hci0: Bluetooth     Soft blocked: yes     Hard blocked: no 1: phy0: Wireless LAN     Soft blocked: no     Hard blocked: no   ~$ ifconfig && iwconfig && route -n && ping -c 1 google.com eth0      Link encap:Ethernet  HWaddr 38:63:bb:cd:4a:7e             UP BROADCAST MULTICAST  MTU:1500  Metric:1           RX packets:3 errors:0 dropped:0 overruns:0 frame:0           TX packets:53 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:752 (752.0 B)  TX bytes:8445 (8.4 KB)  lo        Link encap:Local Loopback             inet addr:127.0.0.1  Mask:255.0.0.0           inet6 addr: ::1/128 Scope:Host           UP LOOPBACK RUNNING  MTU:65536  Metric:1           RX packets:3870 errors:0 dropped:0 overruns:0 frame:0           TX packets:3870 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:0            RX bytes:314613 (314.6 KB)  TX bytes:314613 (314.6 KB)  wlan0     Link encap:Ethernet  HWaddr c0:38:96:6d:c4:83             inet addr:192.168.1.205  Bcast:192.168.1.255  Mask:255.255.255.0           inet6 addr: fe80::c238:96ff:fe6d:c483/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:15240 errors:0 dropped:0 overruns:0 frame:0           TX packets:14627 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:14410285 (14.4 MB)  TX bytes:2192744 (2.1 MB)  eth0      no wireless extensions.  wlan0     IEEE 802.11bgn  ESSID:"DIR-615"             Mode:Managed  Frequency:2.437 GHz  Access Point: 00:90:4C:08:00:0D              Bit Rate=150 Mb/s   Tx-Power=20 dBm              Retry short limit:7   RTS thr=2347 B   Fragment thr:off           Power Management:off           Link Quality=70/70  Signal level=-22 dBm             Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0           Tx excessive retries:0  Invalid misc:186   Missed beacon:0  lo        no wireless extensions.  Kernel IP routing table Destination     Gateway         Genmask         Flags Metric Ref    Use Iface 0.0.0.0         192.168.1.1     0.0.0.0         UG    400    0        0 wlan0 169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 wlan0 192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 wlan0 PING google.com.Dlink (172.26.136.19) 56(84) bytes of data. 64 bytes from 19.136.26.172.in-addr.arpa (172.26.136.19): icmp_seq=1 ttl=249 time=102 ms  --- google.com.Dlink ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 102.547/102.547/102.547/0.000 ms


I have a lot of low current devices in need of 5V or 12V power. So far I have been using cable connectors like this:  The problem is that by "a lot" I am talking about 15-20 devices consuming only a few milliamperes. As you can imagine this is starting to take a lot (too much) space when using those cable connectors. I am now planning to use an empty PCB breakout like this:  and solder a GPIO header onto it. Then I am going to solder all the pins of the GPIO header together using a thick naked copper strand thus providing me a lot of connection points to take power from. Now my question is, what are those GPIO headers normally rated for? The pin pair that I will be using to supply the power/ground will ultimately have to handle the sum of all devices. The power source is not intended to supply much more than 3A and has built-in overcurrent protection that should trigger at around 3.3A. Since the raspberry pi can also be powered from the GPIO 5V pin which is using the same type of connector I am assuming 3A should probably not exceed the rating, however "assuming" is never good. I was not really successful in finding anything official for those headers since whatever I am searching just shows information about either arduino or r-pi ratings. Maybe important: I am not using the typical GPIO 26 AWG cables to supply the power, its 18 AWG cables. Just for completeness what I mean by GPIO header:

I'm curious how much current it is safe to pass through a 0.1" pitch pin header. I'm sure it will depend on the gauge and stranding of the wire attached to it as well, but assuming that is not the limiting factor how much could be safely passed?


When removing a not yet selected tag from the tag list, by selecting the word and pressing backspace, instead of the selected text being removed, it simply untags the previous tag and removes the selection of the text. See:  Steps to reproduce:  Add one or more tags. Start typing after the tags. Select the typed text. Press backspace to delete text.

This is something I found across all S.E. communities.  Whenever I add a tag, and if I find out that the tag doesn't exist on the community yet, deleting this tag is a bit annoying.  See in the following screen capture what happens: when I select the tag to erase it, then press the ⌫ key on my computer, it doesn't delete the tag but instead keeps it and combines its text with the previously entered, validated tag without removing any characters from either of them.   So I have to forward delete at this point, and press Space to re-validate the previously entered tag.  I assume that BkSp/⌫ should delete what is selected, and not mess with the previous tag that was validated.    Mac OS X 10.10, Safari 8.0.8


Given $T = 0-$dimensional (i.e, T has a basis of sets which are both open and closed), Lindelof Hausdorff space, with closed subsets $A$ and $B$ such that $A\cap B = \emptyset$. Prove that $\exists$ a closed and open set (clopen) set $D$ with $A\subset D$ and $B\cap D =\emptyset$.  I have thought of this problem for a while, but haven't been able to make any good progress. Can someone please give some detailed help, if possible, on this tricky problem?

I want to prove the following:     Let $X$ be second countable zero-dimensional space.  If $A,B \subseteq X$ are disjoint closed sets, there exist is a clopen set $C$ such that $A\subseteq C$ and $B\cap C = \emptyset $.   (A topological space $X$ is zero-dimensional if it is Hausdorff and has basis consisting of clopen sets.)


At the end of Avengers: Age of Ultron, Thor says:     The Mind Stone is the fourth of the Infinity   Stones to show up in the last few years.   It's not a coincidence.   Although all these Marvel-films are intertwined somehow, how did Thor know about what happened in Guardians of the Galaxy?

Sorry for the cryptic title, but I realise the film has only just been released in the UK and Europe and is yet to be released in the US.  I'll hide all substantial parts of my question, just in case. I don't want to spoil anything.     At the end of Age of Ultron, Thor states that 4 infinity stones have now shown up in the last few years.   So,     By my count we have the Tesseract, from several of the first few films. The Aether, from Thor 2. The Chitauri Scepter, again from several films. And finally, we have The Orb, from Guardians.    Now, to my knowledge     Thor, and indeed none of the Avengers, should know about The Orb. I don't remember Thor visiting the Collector between GoTG and the AoU. So, how did Thor know that The Orb had appeared? Or is he referencing a different infinity stone?   I'm looking for an in universe answer, ideally.


before anything else, please note that I am a complete newbie with Ubuntu. I can open a terminal and thats pretty much it.  After updating kubuntu version, my notebook crashed. I am at a health resort and will not return home for next three weeks. The wifi here is without password, after connecting you use a voucher code to unlock browsing.  Using a bootable flash drive (my friend sent it to me in mail) I installed a fresh ubuntu 14.04 lts. The thing is, the internet is deadly slow or does not work at all. I can access internet from my phone.   I have hp pavilion dm1. How can I run something to give you details about my hw?  I have been searching internet and trying everything for the past theee days. Nothing worked. I'm desperate. Please help.  lspci command output  02:00.0 Network controller [0280]: Broadcom Corporation BCM4313 802.11bgn Wireless Network Adapter [14e4:4727] (rev 01)      Subsystem: Hewlett-Packard Company Device [103c:1795]      Kernel driver in use: bcma-pci-bridge

I have installed Ubuntu alongside Windows 8.1. But the wifi is not working in Ubuntu (perhaps the drivers are not present), which worked fine in windows. Also I cant connect with Ethernet since my laptop does not have an Ethernet port. So is there any way for me to connect to the internet in ubuntu? Edit: Output of the terminal command  lspci -knn | grep Net -A2:  vikram@vikram-Inspiron-11-3148:~$ lspci -knn | grep Net -A2 01:00.0 Network controller [0280]: Broadcom Corporation BCM43142 802.11b/g/n [14e4:4365] (rev 01)     Subsystem: Dell Device [1028:0018]     Kernel driver in use: bcma-pci-bridge vikram@vikram-Inspiron-11-3148:~$    I did what Pilot6 suggested. Here is the output:    vikram@vikram-Inspiron-11-3148:~$ sudo dpkg -i *.deb [sudo] password for vikram:  Selecting previously unselected package bcmwl-kernel-source. (Reading database ... 163804 files and directories currently installed.) Preparing to unpack bcmwl-kernel-source_6.30.223.141+bdcom-0ubuntu2_amd64.deb ... Unpacking bcmwl-kernel-source (6.30.223.141+bdcom-0ubuntu2) ... Selecting previously unselected package dkms. Preparing to unpack dkms_2.2.0.3-1.1ubuntu5.14.04_all.deb ... Unpacking dkms (2.2.0.3-1.1ubuntu5.14.04) ... Setting up dkms (2.2.0.3-1.1ubuntu5.14.04) ... Setting up bcmwl-kernel-source (6.30.223.141+bdcom-0ubuntu2) ... Loading new bcmwl-6.30.223.141+bdcom DKMS files... First Installation: checking all kernels... Building only for 3.16.0-30-generic Building for architecture x86_64 Building initial module for 3.16.0-30-generic ERROR (dkms apport): kernel package linux-headers-3.16.0-30-generic is not supported Error! Bad return status for module build on kernel: 3.16.0-30-generic (x86_64) Consult /var/lib/dkms/bcmwl/6.30.223.141+bdcom/build/make.log for more information. modprobe: FATAL: Module wl not found. update-initramfs: deferring update (trigger activated) Processing triggers for man-db (2.6.7.1-1ubuntu1) ... Processing triggers for initramfs-tools (0.103ubuntu4.2) ... update-initramfs: Generating /boot/initrd.img-3.16.0-30-generic vikram@vikram-Inspiron-11-3148:~$


It's simply like this:  Input: "abcdefgh"  Output: ["ab","cd","ef","gh"]  Is there any more practical way or method for this? Or do I have to use if conditionals?

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


Each player is a different colour (Red, Blue, Green, Yellow) and I want a small part of each piece of armour to be tinted to the player colour.  Is this possible without using a second armour sprite that overlays?  I'm hoping for something along the lines of reserving a certain portion of colours (say various shades of magenta) to convert back to a player colour while drawing.

I've been trying to work on a game with the look of an 8-bit game using XNA, specifically using the NES as a guide.  The NES has a very specific palette and each sprite can use up to 4 colors from that palette. How could I emulate this? The current way I accomplish this is I have a texture with defined values which act as indexes to an array of colors I pass to the GPU. I imagine there must be a better way than this, but maybe this is the best way?  I don't want to simply make sure I draw every sprite with the right colors because I want to be able to dynamically alter the palette. I'd also prefer not to alter the texture directly using the CPU.


Referring to the following:  class A { ... };  class B  {     static A a; // this fails     ...     static A& getA() { static A a; return a; } // this works     ... }; ... B b; b.a  <-- gives error: undefined reference to B::a   Why can I not have a static A in class B, but it is fine to return it from a method?  [edit] Just something curious:  struct C {     static const int x = 5; };  int main() {     int k = +C::x;     std::cout << "k = " << k << "\n";     return 0; }  output: k = 5   C::x is not defined in implementation-scope, neither is there an instance of C, and yet, with the unary + C::x is accessible ... !?

Can anyone explain why following code won't compile? At least on g++ 4.2.4.  And more interesting, why it will compile when I cast MEMBER to int?  #include <vector>  class Foo {   public:       static const int MEMBER = 1;   };  int main(){       vector<int> v;       v.push_back( Foo::MEMBER );       // undefined reference to `Foo::MEMBER'     v.push_back( (int) Foo::MEMBER ); // OK       return 0; }


The question I am trying to solve is from the book Building Java Programs and is formatted as follows:     Write a method called coinFlip that accepts a Scanner representing an input file of coin flips that are head (H) or tail (T). Consider each line to be a separate set of coin flips and output the number and percentage of heads in that line. If it is more than 50%, print "You Win!".   Consider the following file: H T H H T T t    t T h  H    For the input above, your method should produce the following output:    3 heads (60.0%) You Win! 2 heads (33.3%)  When I run the code it only outputs: "0 heads (0.0)". So i'm assuming it never enters the second while loop for some reason or I am using the "next" methods wrong.  import java.io.*; import java.util.*; public class CoinFlip {     public static void main(String[] args) throws FileNotFoundException{           Scanner input = new Scanner("Series1.txt");           PrintStream output = new PrintStream("Output.txt");           coinFlip(input, output);     }     public static void coinFlip(Scanner input, PrintStream output) {         while(input.hasNextLine()) {             Scanner linesc = new Scanner(input.nextLine());             int headCount = 0;             int totalNums = 0;             while(linesc.hasNext()) {                 String letter = linesc.next();                 if(letter.equalsIgnoreCase("H")) {                    headCount++;                 }             totalNums++;             }              double percent = findPercentage(headCount, totalNums);             output.println(headCount + " heads " + "(" + percent +")");             if(percent > 50.00) {                 output.println("You win!");             }          }     }     public static double findPercentage(int num1, int num2 ) {        double percentage = (double)num1/num2 * 100;        return percentage;     } }

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?


I have a such array   <?php      array(          'CHILDRENS' =>  array(         array(              'CHILDRENS' =>  array(                 array(                      'CHILDRENS' =>  array(                         array(                              'CHILDRENS' =>  array(                             )                         )                     )                )            )         )     ),     array(          'CHILDRENS' =>  array(             array(                  'CHILDRENS' =>  array(                 )             )         )     ),     array(          'CHILDRENS' =>  array(             array(                  'CHILDRENS' =>  array(                     array(                          'CHILDRENS' =>  array(                             array(                                  'CHILDRENS' =>  array(                                     array(                                          'CHILDRENS' =>  array(                                             array(                                                  'CHILDRENS' =>  array(                                                     array(                                                          'CHILDRENS' =>  array(                                                         )                                                     )                                                 )                                             )                                         )                                     )                                 )                             )                         )                     )                 )             )         )     ) )   I would like to know how to get the maxium deep of this array.  I tried this :     and    It that last case, it return only first array depth  Thanks for help.

A PHP array can have arrays for its elements. And those arrays can have arrays and so on and so forth. Is there a way to find out the maximum nesting that exists in a PHP array? An example would be a function that returns 1 if the initial array does not have arrays as elements, 2 if at least one element is an array, and so on.


I am using TEXShop working at a MAC and I don't really know what I am doing, I am just trying to fill a template. But I want to add something that the template does not offer; align a section to the far right. So I have the following:  \chapter{Introduction}  % I need the following to be aligned at the far right \begin{quote}  \hfil ``Lorem ipsum dol, \\ \hfil consecteture adipisicing elit.'' \\[1ex] \hfil John Doe, Lorem\\[1ex] \end{quote} % Until here  % And here the normal paragraph begins  Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt                Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt   But it doesn't really work. Any ideas?

I recall seeing a package to make quotes like that of the following image at the start of a chapter, but I can't seem to find it again.    (This image is from the book Combinatorics and Graph Theory by Harris, Hirst, and Mossinghoff)


In this program, this user will have the opportunity to generate their own word search. In the beginning of the program, the user will be shown a menu of instructions in which they can choose between these options: 1.  Create a word search 2.  Print the word search 3.  View solutions to the word search 4.  Exit the program  When choosing to create a word search, the user is asked to enter words of their choice, line by line. These words will be stored in a 1-D array.   The user will have to enter a minimum of 20 words, maximum at 260. At every batch of 20 words, the user will be asked if they want to add more words. If the user chooses to add more words, the program will prompt him/her to enter more words until they have reached the max number of words.   If they choose to stop adding more words, the program will jump right into converting the 1-D array to an Array List, and then create the word search, which is where I am having a little problem at.   if (choice == 1) {      System.out.println("Enter words of your choice line-by-line. You can enter a maximum of 260 words (i.e., 10 words per letter)");          System.out.println("");      String[] wordList = new String[260];      // This for loop will loop around with it`s body the user decides they have added enough words and wish to proceed      for (int i = 0; i < wordList.length; i++) {          wordList[i] = input.nextLine();            if (wordList[i] == wordList[19] || wordList[i] == wordList[39] || wordList[i] == wordList[59] || wordList[i] == wordList[79] || wordList[i] == wordList[99] || wordList[i] == wordList[119]|| wordList[i] == wordList[139]) {           System.out.print("Do you want to keep adding words? Enter Y/N: ");                   String answer = input.next().toUpperCase();                 if (answer == "Y") {                      wordList[i] = input.nextLine();                 } if (answer == "N") {                      break;                   }//end of inner if                 }//end of outer if              }//end of for loop          List<String> words = Arrays.asList(wordList);          createWordSearch(words);   When the user types in "N," the program is supposed to end the for loop and jump right into the part after }//end of for loop. Ive added 'break;' in order to stop the loop, but instead Im pretty sure it is stopping the entire program from proceeding. When I remove the 'break;' the program keeps prompting me to add more words (basically until there are 260 words added in total).   EDIT  So, I have fixed the problem up there thanks to the advice Ive received here. The program is doing what I want now, but I am getting aNullPointerExceptionfrom my for-each loop in thecreateWordSearch(words)` method.  public static WordArray createWordSearch(List<String> words){     WordArray wordArr = new WordArray();         // Have numAttempts set to 0 because the while loop below will add one every time we create a new word search            int numAttempts = 0;             while (++numAttempts < 100) { // There will be 100 attempts to generate our word array/grid              Collections.shuffle(words); // The words will be shuffled/randomized                     int messageLength = placeMessage(wordArr, "Word Search Puzzle");                     int target = arraySize - messageLength;                  int cellsFilled = 0;                     for (String word : words) { // For each word in the array list 'words'...                            cellsFilled += placeWord(wordArr, word); // NULL POINTER EXCEPTION!!! 'word' is not initialized I`m pretty sure

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?


I am new to LaTex. I am writing a paper on a number theory topic. What I know so far is that I need to construct a preamble for my paper. I don't know what packages I need for my paper. What packages should I include? keep in mind this is an undergrad paper I am writing.

I'm getting the impression from reading the answers written by some of the real experts here that there are quite a few little packages that just tweak LaTeX2e's default behaviour a little to make it more sensible here and there.  Rather than try to pick these up one by one as I read answers to questions (and thus risk missing them), I thought I'd ask up front what LaTeX2e packages people load by default in (almost) every document.  As this is a "big list" question, I'm making it CW.  I don't know if there are standard rules across all SE/SO sites for such questions, but on MathOverflow the rule is generally: one thing (in this case, package) per answer.  I guess that if a couple of packages really do go together then it would be fine to group them.  This is perhaps a little subjective and a little close to the line, so I'll not be offended if it gets closed or voted down!  (But please explain why in the comments.)  Also see our community poll question:


In a math textbook I found a statement that every empty set is equal. There are such sets that it is impossible for them not to be empty:  set of all natural numbers between 10 and 11. There are such sets that it is possible for them not to be empty:  all the people from the Earth, who are on the Mars now. In future it can be possible. Quesstion: can sets mentioned in 2 be equal to sets mentioned in 3. If yes, why not to take in account the difference examples above?

so I'm HUGE noob in math so please be patient.  I have a question about set definition. They thought us in class that there are two ways to define a set of elements:   Extensional:  Basically just write the elements of the set. For example:   $$A= \{ 1,\ 2,\ 3,\ 4, \ 5\}$$ Intensional:   Defines a set by stating the unique property which characterizes  the ones and only elements of the collection, without ambiguity, like:   $$A = \{x\ | \ x\in\ \mathbb{N} \quad \land\quad 1\le x \le 5\}$$   Now, this works fine for set of elements where the elements are numbers, but how can I intensionally define a set like this:  $$TV= \{ fox,\ cnn,\ sky,\ msnbc\}$$  The professor gave us this exercise in class and some students gave answers like  $$TV= \{x\ | \ x\in \text {TV_CHANNELS} \quad \land\quad \text{daily_views}\ge100k\}$$  But it looks wrong to me, I mean if one day msnbc daily_views are $\le100k$ then $\ msnbc\  \notin TV$ which means I have a different set...   So my question is how do I intensionally describe a set of things, different from numbers, without ambiguity?


I am an undergrad student and i have been through a first easy course on electrodynamics and i have used the book of Griffiths which let me satisfied.But the next two courses I will be taking are notoriously hard mathematics-wise so i want a step-up from Griffiths. I want a mathematically rigorous and comprehensive book that also builds up intuition (because physics is not only maths).    I have looked at Purcell's book and found it very pedagogic, it impressed me but I do not know if it is as difficult as I want.    Do you suggest that I buy Purcell's book or do you have anything else in mind?

What books are recommended for an advanced undergraduate course in electrodynamics?


This is a simple function for finding occurrences of a specific letter.    1:  int count_x(char *p, char a) 2:  { 3:      int count = 0; 4:      while(*p != '\0') 5:      { 6:        if (*p == a) 7:            count++; 8:        p++; 9:      } 10:      return count; 11:  }   We can get access to a specific element by using p[n], or we can dereference it *p and get a first element of that array as an example, and all of that stuff we usually do. The strange thing to me is located at the line number 8. When we write p++, we are getting the array we passed -1 symbol from the beginning. So if it was hello, world then it would be ello, world. We are somehow iterating throuhg the indices but i don't really understand how.    Can i have an explanation of how all of that stuff works?

Does anyone have any good articles or explanations (blogs, examples) for pointer arithmetic?  Figure the audience is a bunch of Java programmers learning C and C++.


Prove every natural number greater than $13$ can be express as sum of $3$ and $8$ (regardless of order)

Can you please help me and tell, how should I move on?  Can this be proved by induction?     Every natural number $n\geq 8$ can be represented as $n=3k + 5\ell$.   Thank you in advance


How is$$\ \lim_{x\to \infty} \log \log x \prod_{i< \log x} \frac{p_i -1}{p_i}= \\ \lim_{x\to \infty} \log \log x \prod_{p < \log x}_{p prime} \frac{p-1}{p}$$?

I'm less than a novice in analysis, I don't even know how to approach this. Thanks in advance.