Since  is heavily downvoted, I'm not sure if the moderators will delete it before I can post my answer.  Here's my attempt: Following JG's remarks, we have $$ x^5 + 1 = \frac14(x+1)(2x^2 + x(\sqrt5 - 1) + 2)(2x^2 - x(\sqrt5 - 1) + 2) $$ Then by , we have $$ \dfrac1{x^5 + 1} = \dfrac4{(x+1)(2x^2 + x(\sqrt5 - 1) + 2)(2x^2 - x(\sqrt5 - 1) + 2)} $$ is equal to $$ \dfrac2{5+\sqrt5} \cdot \dfrac1{x+1} -\dfrac{4\sqrt5}{(\sqrt5 - 1)(5+\sqrt5)} \cdot \dfrac x{2x^2 - x(\sqrt5 - 1) + 2} + \dfrac4{(\sqrt5-1)(5+\sqrt5)} \cdot \dfrac{x + \sqrt5 + 1}{2x^2 + x(\sqrt5 - 1) + 2}$$ What's left is to apply $ \int \dfrac1{x^2+a^2} \, dx = \frac1a \tan^{-1} (\frac xa) + C$ and $ \int \dfrac{1}{x^2-a^2}\, dx = -\frac 1a \tanh^{-1} (\frac xa) + C$.  Obviously all the calculations above are fairly tedious. Is there a(another) way to evaluate this indefinite integral? To clarify, I'm not interested to see ANY roots of unity ($\omega $) in the final result. Naturally, I'm also interested if there's other approach is applicable for the indefinite integral of $\frac1{x^n + 1}$ for all positive integers $n$.

I was wondering on how to evaluate the following indefinite integral for all $n\in\mathbb R$.  $$\int\frac1{1+x^n}dx$$  It seems to be peculiar in that we have  $$\begin{align} \int\frac1{1+x^{-1}}dx&=x-\ln(x+1)+c\\ \int\frac1{1+x^0}dx&=\frac12x+c\\ \int\frac1{1+x^{1/2}}dx&=2\sqrt x-2\ln(1+\sqrt x)+c\\ \int\frac1{1+x^1}dx&=\ln(x+1)+c\\ \int\frac1{1+x^2}dx&=\arctan(x)+c\\ \int\frac1{1+x^3}dx&=\frac13\ln(1+x)-\frac2{3\sqrt3}\arctan\left(\sqrt{\frac43}\left(x-\frac12\right)\right)+c \end{align}$$  Naturally, there appears to be some combination of $\ln$ and $\arctan$, though no simple formula arises to solve the general case.  It is, however, easy to see that  $$\int\frac1{1+x^{-n}}dx=\int1-\frac1{1+x^n}dx$$  So there is an easy enough connection between positive and negative $n$.  Also, it is easy enough to find the series expansion, taking advantage of the above connection we just made to circumvent problems concerning convergence.  $$\frac1{1+x^n}=1-x^n+x^{2n}-x^{3n}+\dots\forall\ |x|<1$$  $$\int\frac1{1+x^n}dx=c+x-\frac1{n+1}x^{n+1}+\frac1{2n+1}x^{2n+1}-\dots$$  $$=c+\sum_{k=0}^\infty\frac{(-1)^k}{kn+1}x^{kn+1}\ \forall\ |x|<1$$  Though this isn't very much along the lines of closed form.  For $n=\frac ab$, where $a$ and $b$ are whole numbers, we can use the substitution $x=u^b$ to get  $$\int\frac1{1+x^n}dx=\int\frac{bu^{b-1}}{1+u^a}du$$  though I'm unsure where that could lead.  This reduces the integral down to  $$\int\frac1{1+x^n}dx=b\int P(u)+\frac{u^{b-1-ak}}{1+u^a}du,\quad k\in\mathbb N$$  for some polynomial $P(u)$.  Though I'm still clueless as to how this can be advanced.     How can I evaluate $\int\frac1{1+x^n}dx\ \forall\ n\in\mathbb R$ in closed form?  Can someone prove there at least exists some closed form solution for all $n\in\mathbb Q$ if the above is not possible?  If possible, use real numbers.


The .item click function works, but when I click the refresh button it does not work. Please help me. I tried to move the code in the head tag and at the end of the body but it does not work.  <button id="button" type="submit">Refresh</button>

     item 1

     item 2

     item 3

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 have been trying to create a grouped overlay bar chart in latex using pgfplots, much like this one (not actually mine, found randomly on Google):    What I'm trying to achieve is not a stacked bar chart, but an overlay bar chart where all bars start at 0, such that taller bars appear "behind" smaller bars. With pgfplots, it seems quite easy to create bar charts, and to group bars together, but creating grouped overlay bar charts seems to be much more difficult.  Is there a way to create such charts in latex? (not necessarily using pgfplots)

So, i'm trying to make a nice ybar plot using pgfplot, but i have some issues i want to solve, hope you can help me.  1) the ybar are not centered on the x value as they should, i mean, the bar for x = 1 start at x=1, so it's centered at x=1.5 which looks a bit odd to me. how do i changed that such that the bar is centered around the values?   (that was the easy question i guess)  2) i have a legend "issue", why do i have this kind of double bar instead of one single bar as it should?  3) the real question: there is 2 tests in my dataset. sometimes the value of test 1 is larger than test 2, sometimes the other way around. I don't want stack bar in this kind of setup, that would look strange. What i want to do, is to overlay the 2 bar but the "top" bar (let's say) is not always the same. How do i say to tikz that it should always put the bar with the high value in the "background" and the bar with the small value in the foreground?  Thanks for you help, i enclosed the output figure I get and a MWE.   \documentclass{article}  \usepackage{tikz} \usetikzlibrary{plotmarks} \usepackage{pgfplotstable} \usepackage{pgfplots}  \usepackage[active,tightpage]{preview}  %generates a tightly fitting border around the work \PreviewEnvironment{tikzpicture}  \begin{document}  \begin{tikzpicture} \begin{axis}[     x tick label style={         /pgf/number format/1000 sep=},     ylabel=ylabelé,     xlabel=xlabel,     enlarge x limits=0.01,     ybar,     bar width=10pt,     xmin = 1,     xmax = 16,     width=8cm,height=7cm,     ytick pos=left,     xtick pos=left,     bar shift = 0pt,     ymode=log, ]  \addplot[fill=red, ybar interval] coordinates{     (1,222898.050000000)     (2,235072.800000000)     (3,241192.450000000)     (4,156585.700000000)     (5,44232.0500000000)     (6,7846.75000000000)     (7,1653.35000000000)};  \addplot[fill=blue, ybar interval]     coordinates{     (1, 455097.750000000)     (2, 101759.350000000)     (3, 67777.1500000000)     (4, 62902.1500000000)     (5, 55631.1500000000)     (6, 39789.6500000000)     (7, 34237.2500000000)     (8, 27603.8000000000)     (9, 23348.3000000000)     (10, 8781.80000000000)     (11, 7717.65000000000)     (12, 3644.70000000000)     (13, 1536.20000000000)     (14, 1440.400000000000)     (15, 1748.95000000000)     (16, 252.150000000000)};  \legend{test1, test2} \end{axis} \end{tikzpicture}     \end{document}


How to delete previous year June files from the list  #!/bin/bash echo "hi" path="/home/alert/VideoApplicationAPI.v1/logs" dayDiff=365  DATE=`date +%Y-%m-%d` for filename in $path/*.*; do     modDate=$(stat -c %y "$filename")      modDate=${modDate%% *}      echo $filename:$modDate     echo "( `date -d $DATE +%s` - `date -d $modDate +%s`) / (24*3600)" | bc -l done echo $DATE

#!/bin/bash echo "hi" path="/home/alert/VideoApplicationAPI.v1/logs" dayDiff=365  DATE=`date +%Y-%m-%d` for filename in $path/*.*; do     modDate=$(stat -c %y  "$filename")      #modDate=$(date -r   "$filename"+%s)      modDate=${modDate%%  *}     echo $filename:$modDate      #lastUpdate=$(stat -c %y "$filename")     now="$(date +%s)"     diff="${now}-${lastUpdate}" done  echo $DATE


I was messing around in blender when I noticed that my view was snapped to an object. When I moved it so did my view.    What is this feature and how can I enable/disable it?

I am starting to learn using blender, and at some point I managed to do something to the 3D view camera.  Usually the camera orbits around an object, but now the rotation seems to happen (atleast very close to) around the "camera's origin". Neither the input setting in "User Preferences", the pivot point selection nor Ctrl-Alt-Shift-C (as suggested on some forum) do anything to the issue.


I'm a new user of ubuntu. It's been working fairly well so far. Today I've tried doing 'sudo apt-get update' and it's freezing after fetching data. This is the output:   sudo apt-get update  Hit:1 http://archive.canonical.com/ubuntu xenial InRelease Hit:2 http://ppa.launchpad.net/webupd8team/sublime-text-3/ubuntu xenial InRelease Get:3 http://security.ubuntu.com/ubuntu xenial-security InRelease [94.5 kB]     Hit:4 http://us.archive.ubuntu.com/ubuntu xenial InRelease                      Hit:5 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease Get:6 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [92.2 kB] Fetched 187 kB in 0s (225 kB/s)     Using sudo apt-get clean and then sudo apt-get update, I get the following issue:   E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/lib/apt/lists/   Using sudo rm -rf /var/lib/apt/lists/lock and then sudo apt-get update I get a new issue:   ** (appstreamcli:3466): WARNING **: Exception: Unable to get write lock on /var/cache/app-info/xapian/default: already locked     sudo fuser /var/cache/app-info/xapian/default    shows nothing.   file /var/cache/app-info/xapian/default    shows   /var/cache/app-info/xapian/default: directory

I tried to install crossover and after downloading the .deb from their website, I followed the steps as indicated when opening it with Ubuntu Software Centre:     On 64-bit flavors of Debian and some Ubuntu variants, first open a   terminal and run sudo dpkg --add-architecture i386 ; sudo apt-get update   Since I have Ubuntu 16.04 LTS 64 bit I perform the command.  But when copying and pasting that command into my terminal, it stopped at Fetched 535kb in 7sec and stalled there for about 20 minutes. I ended up  closing it and tried to run both commands separately but after doing the sudo apt-get update command it also stalls again after "Fetched XXKb in XXsec."  I restarted my computer and decided to run the software updater and it stays stuck at roughly 75% for hours.


I want to prove the following statement:  Suppose that $\displaystyle\sum_{k=1}^{\infty}a_k$ converges, where $(a_k)_{k\in\mathbb{N}}\subseteq\mathbb{R}$ is monotone. Then $\displaystyle\lim_{k\to\infty}ka_k=0$.  I believe we have several cases.  For example, if $(a_k)_{k\in\mathbb{N}}$ is monotone increasing and there exists $k$ such that $a_k>0$, then obviously $\displaystyle\sum_{k=1}^{\infty}a_k$ is not convergent.   Then, we could conclude that if some $a_k>0$ then we can suppose that $(a_k)_{k\in\mathbb{N}}$ is monotone decreasing. By the same argument, we can conclude that if some $a_k<0$ then $(a_k)_{k\in\mathbb{N}}$ must be monotone increasing.  So, I believe we only need to take care of the case where $a_k\ge 0$ for each $k\in\mathbb{N}$ and $(a_k)_{k\in\mathbb{N}}$ is monotone decreasing (the other case would be symmetric). Any hint to prove this? I have been thinking a lot ot time...  Thanks.

I need a little hint in a proof on convergence of a sequence. The problem I have is: Suppose $(x_n)$ is a monotone decreasing sequence of real numbers such that $\sum x_n$ converges, prove that:  $$\lim_{n \to \infty} nx_n=0$$  My idea is: proving this fact aims to prove that given $\epsilon >0$ there's some natural $n_0 \in \mathbb{N}$ such that if $n >n_0$ we have $|nx_n|<\epsilon$.  Now, I know that $\sum x_n$ converges, so that given $\epsilon'>0$ there's some $k_0 \in \mathbb{N}$ such that if $k > k_0$ we have:  $$\left|\sum_{i=1}^{k}x_i - S\right|<\epsilon'$$  Where $S = \sum x_n$. Now, since $(x_n)$ is monotone decreasing we know that we must have $x_1 > \cdots > x_k$ so that the sum of all $x_i$ should be less or equal to $k x_k$. So I know that I have:  $$\left|\sum_{i=1}^{k}x_i - S\right|\leq\left|\sum_{i=1}^{k}x_i\right|+|S|\leq|kx_k|+|S|$$  I feel that the proof will come from this, however I'm stuck at this point. Can someone give just a little hint on how to proceed from here?  Thanks very much in advance for your help.


Would doing so go against the declaration many journals require that the author has not submitted the work anywhere else?

I've read  about how some publishers (e.g., Springer) allows authors to submit to arXiv before journal submission, but they make authors wait for a year after acceptance to submit to arXiv.   My question is: Is it okay to submit to arXiv during the time when the paper is under consideration by the journal, for example after it has been "revised and resubmitted" but before final decision?


I have two objects such as:  { Count: 1,   Items:    [ { foo: [Object],        name: [Object],        bar: [Object],        baz: [Object],        qux: [Object] } ] }   and  { Count: 0, Items: [] }   I need to combine them and return one JSON object.  However, when I try this, I get  "[object Object][object Object]"   code:  function returnResponse(obj1, obj2) {             res.statusCode = 200;             res.setHeader('Content-Type', 'text/plain; charset=UTF-8');             var returnResult = obj1 + obj2             res.send(JSON.stringify(returnResult, undefined, 2));             res.end();         }   How do I get all the objects to appear correctly in the browser?

I need to be able to merge two (very simple) JavaScript objects at runtime.  For example I'd like to:  var obj1 = { food: 'pizza', car: 'ford' } var obj2 = { animal: 'dog' }  obj1.merge(obj2);  //obj1 now has three properties: food, car, and animal   Does anyone have a script for this or know of a built in way to do this?  I do not need recursion, and I do not need to merge functions, just methods on flat objects.


I have an Excel document that has 4 tabs in it.  How do I formulate cells in each of the tab spreadsheets to generate the same if I change the information on one.  Example:  Each tab spreadsheet has a cell that I input the employee's drivers license number.  if I update on one of the tab spreadsheet, I want it to update then on the other three tab spreadsheets.

I have 2 cells containing the same picklist values on separate sheets. I want the cells to mirror each other so that whenever I choose a new value in either sheet 1 or sheet 2, the value on the other sheet is updated to match the newly selected value. Is this possible?  UPDATE   Worksheet 1:   Worksheet Name: 'Live Forecast Tool' Cell containing picklist: C3:D3 (merged) Picklist values within range: ='SF MRF'!H5:Y5  Worksheet 2:   Worksheet Name: 'AH' Cell containing picklist: C3:D3 (merged) Picklist values within range: ='SF MRF'!H5:Y5    Cell C3:D3 needs to update to show the value that has been changed on the other sheet.


public class HelloWorld {      public static void main(String[] args) {         float amt = Float.valueOf("21111111.00");         System.out.printf("%f\n", amt);      } }   Output is: 21111112.000000  Why is the float value being incremented by 1 automatically?

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


I want to change format of x or y number in green box of below graph .


I installed Ubuntu 20.04 and I installed g++ using sudo apt install g++  sudo apt install build-essential  but when I want to check the version using this command g++ --version  it showed me and also for gcc same the situation Command 'g++' not found, but can be installed with:  sudo apt install g++  Is there any way to check whether the g++ installed or not?

There are now errors when updating and I cannot install most software due to a corrupted  /etc/apt/sources.list   file. Is there a copy I can download to replace it?  The file would be for Ubuntu 12.04 (Final Beta) in the United States.


I have bought a biological (as per the label) maple syrup that states:  Limited shelf life in the refrigerator after opening.  The bottle itself is 250mls and says that the portion size is 10ml and the number of services is 25. My question is: does that mean that it can be consumed within 25 days? I don't really understand what the limited shelf life means in this case. What should I watch out for to throw it away?

Is there any reason to store maple syrup in the refrigerator? It tastes better when it's a little warmer.


I am having a problem with foreign keys between two tables. I am trying to model a relationship between members of a club and their relatives. This is a straightforward many-to-one relationship, with many relatives related to one member. However, one and just one of this relatives must be the main contact. Also, many members can have the same relative as main contact (siblings to their father as an example).  EDIT: Members are kids, and relatives must be adults, so relatives can't be members, and members can't be main contact of another member.  A FK on member table refering the PK of relatives would work, but this will leave me with a circular reference and a "chicken-or-egg" problem.  What is the right approach to this kind of problems? Maybe I am just thinking it too much.  Schema is more or less like this:   +--------------+    +-------------+ | member       |    | relatives   | +--------------+    +-------------+ |id            |<-+ |id           |<-+ |name          |  +-|*member_id   |  | |address       |    |name         |  | |phone         |    |relationship |  | |...           |    |phone        |  | |*main_contact |-+  |...          |  | +--------------+ |  +-------------+  |                  +-------------------+

I want to have a one-to-many relationship in which for each parent, one or zero of the children is marked as a “favorite.” However, not every parent will have a child. (Think of the parents as questions on this site, children as answers, and favorite as the accepted answer.) For example,  TableA     Id            INT PRIMARY KEY  TableB     Id            INT PRIMARY KEY     Parent        INT NOT NULL FOREIGN KEY REFERENCES TableA.Id   The way I see it, I can either add the following column to TableA:      FavoriteChild INT NULL FOREIGN KEY REFERENCES TableB.Id   or the following column to TableB:      IsFavorite    BIT NOT NULL   The problem with the first approach is that it introduces a nullable foreign key, which, I understand, is not in normalized form. The problem with the second approach is that more work needs to be done to ensure that at most one child is the favorite.  What sort of criteria should I use to determine which approach to use? Or, are there other approaches I am not considering?  I am using SQL Server 2012.


Assume a set that has no elements, we consider it an empty set. Logical Questions  Is an empty set a subset of an empty set ? If yes, does it mean the cardinality or size of the set is 0 or 1 ?

I have only recently been exposed to sets. According to , as seen on the first bullet mark of the link, $ \forall A: \emptyset \subseteq A$  Does this mean that $\emptyset$ is an element of all sets? (This is False, thank you those that answered)  Is the empty set also a set itself?  Assuming these statements are true, then the empty set therefore an element of the empty set. This does not sound right, please clarify for me. Thank you.


Suppose $S$ is a subset of cardinality $c$. Given two elements $x,y \in S$, prove that there exist two disjoint subsets $S_1$ and $S_2$ of $S$ each of cardinality $c$ such that $x \in S_1, y \in S_2$. For two sets $S$ and $T$, prove that $|S| ≤ |T|$ implies $|\mathcal{P(S)}|≤|\mathcal{P(T)}|$. Let $\mathcal{P_0}(S)$ denote the collection of all countable subsets of $S$. Given that $|S| = |T| = c$, show that $|\mathcal{P_0}(S)| = |\mathcal{P_0}(T)|$.   Can someone please prove this for me? I'm really having a tough time with cardinality and don't know where to begin with. I'm assuming everyone is familiar with the $\mathcal{P}$ notation for the power set.

The question says: $S$ is a set of cardinality $c$. Given two distinct elements $x, y ∈ S$, prove that there exist two disjoint subsets $S_1$ and $S_2$ of $S$ and each of cardinality $c$ such that $x ∈ S_1$ and $y ∈ S_2$.  Here is what I am done so far:  Since we know that $|[0,1]|=|\mathbb{R}|=c$. Let $S=[0,1]$, then pick $x=1/2, y=7/10$. Define $S_1=[0,1/2]$ and $S_2=[3/5,1]$, where $x∈S_1$, $ S_1 \subset S$ and  $y∈S_2$, $ S_2 \subset S$.  Since $|[0,1/2]|=c$ and $|[3/5,1]|=c$; therefore, we can conclude that there exist two disjoint subsets $S_1$ and $S_2$ of $S$ and each of cardinality $c$ such that $x ∈ S_1$ and $y ∈ S_2$.  Can someone give me some suggestions on my proof? Thanks!


Normally the privilege of protecting questions comes at 15000 points, but in the econ.SE, :        The problem is I cannot seem to be able to find the tool for protecting eligible questions. Where can I find it, or do I still need 15000 points despite what the help section for our beta says?

Questions can be protected (i.e. marked "highly active").   What does it mean for a question to be protected? Why are some questions protected? Who can protect and unprotect questions? Who can answer a protected question? How are protected questions displayed? When should I protect or unprotect a question? When does the Community user protect a question?


I am proposing that there be a new type of badge: Sapphire. The description could read something like this  Sapphire badges are for the insanely dedicated users of the Stack Exchange. These are near impossible to receive.  You would know that if you saw one of these on a person's profile, they mean business. This would also give those users that seem to have every badge a new chance to prove themselves.  Here is a possible list of badges. Under the "New" category, I put down badges that aren't similar to any previous badges Question Badges  Need a Name - Question favorited by 300 users Remarkable Question - Question score of 300 or more Rock Star Question - Asked a question with 30,000 views  New  Confused - Be on the top 10 question list of a tag for 1 year   Answer Badges  Remarkable Answer - Answer score of 300 or more Merry go Round - Provided answer of +30 score to a question of -7 score Underdog - Zero score accepted answers: more than 50 and 50% of total  New  Clean Sweep - 90% Accepted Answer ratio for a month, with at least 50 Answers Know it all - Be on the top 10 answer list of a tag for 1 year   Tag Badges  Sapphire Badge Total score of 3000 in at least 400 non-community wiki answers.   Moderation Badges  Bailiff - Completed at least 3,000 review tasks. This badge is awarded once per review type Master - Raised 1000 helpful flags Clean Freak - 12,000 edits (number so high to accommodate for tiny 1 letter changes) Constituent - Voted on 1800 posts and 25% or more of total votes are on questions   Other  Need a Name - Shared a link to a question that was visited by 3000 unique IP addresses Dedicated - Gained 200 rep on 300 days  New  Supernatural - Gained 300 rep on one day Ungodly - Gained 300 rep on 10 days Hacker - Responsibly disclosed a security flaw in Stack Exchange Lawmaker - Had been a moderator  Note 1: The badge names are just an example, along with the requirements. I just wrote it up quick to give an example. Note 2: There is no correlation to the number 3. It is just a random number.  It has been brought up that  is quite similar. However it is  Quite old A discussion question Not specific  However these reasons alone aren't enough to prevent duplicate closing. This question was referring to rewarding people with new badges for something they don't really have control over, such as views and upvotes. Many of these new badges require a lot of work from the person hoping to achieve them.  It has been brought up that these requirements would be near impossible for all sites besides stack overflow. These aren't supposed to be too easy. Even though there is the joy of knowing you helped someone, it also adds to your reliability as an answerer. A solution would be to make them harder to obtain on Stack Overflow, because the community is so big. None of the sites will ever be as big as SO, so I think that is a valid solution.

Should there be a new level of badges added above gold, ie Platinum badges?  My reasoning is that two questions on SO (the programmer  and  questions) have greater than 100k views, and several others are well above the 10k view requirement for the "Famous Question" badge.  Maybe SO should implement platinum badges, say for 250k views, getting 1k favorites or upvotes, things that are extremely rare but will happen eventually.  Since gold badges are so common now, I think it's fair to have some achievements that are extremely difficult to achieve.  What are your thoughts?  Edit:  Maybe the things like view-counts and stuff aren't the best example for achieving platinum badges.  Maybe it would be best to reward extremely stellar contributions, but I just like the idea of having some super-rare achievements.


My .txt file contains these kind of content :  The Law and Lawyers of Pickwick, by Frank Lockwood                 21214 Frankenstein, by Mary Wollstonecraft                               20   The first string is book name,second is author and the last one is book number. I want to print the whole line when someone search with the author name.I tried using grep.  #!/bin/bash BOOKFILE="/home/sk/GUTINDEX.ALL" author=$1 if [[ -z "$author" ]]; then  echo -n "Author name : " read author fi grep $author $BOOKFILE   If I run this and search for Frank Lockwood it prints both the lines.But I want to print the line when the entire input string match(both the first name and last name)

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?


(This is probably a duplicate, but I couldn't find what I was looking for through search.)  Say for example you have the sentence:     He is referring to himself.   You can replace "he" with "they" (singular), but you can't replace "himself" with "themself" because it isn't considered a real word.  So, would it be "themselves"? Can "themselves" be singular? If not, what would you use instead?     They are referring to __________.   (Singular "they")

We have  to a question about gender-neutral pronouns, in which he points to the "singular they" and its long history of use in English. (Note that he also advises against using it.) Example:     If someone wants to watch TV tonight, they'll have to do the dishes.   This avoids having to say "he or she" in mixed-gender situations. Okay, fine. I'm not going to get my panties in a bunch if people want to talk this way.  But it occurrs to me that "singular they"—infelicitous at the best of times—really falls apart when extended into the realm of reflexive pronouns:     If someone wants to watch TV tonight, they'll have to do the dishes all by themselves. [?]   That feels very wrong. The only alternative, if one paints oneself into that corner, is to flip it back to singular:     If someone wants to watch TV tonight, they'll have to do the dishes all by themself. [???]   That feels worse.  If I'm to state this as a question, I guess I would put it thus: How can use of a "singular they" truly be reconciled? Is it really as much of a linguistic dead end as it feels to me?


I have received the refusal latter today apparently the ECO has refused the visa citing reasons due to economic circumstances. They mentioned that the salary payments were not sourced by the debits to my employers account and gave example for a month; per them the amount deposited into my account on a certain date was not reflected in my employers account debits.  When I checked this after getting home, all the check numbers were reflecting in company’s bank statement - every single one!  Second reason they stated regarding payments being irregular in amount but that could have been easily verified through the pay slips that I had submitted; the variance details for extra payments were mentioned such as overtime, leave encashment OPD payment etc.  I strongly believe they have overlooked these details and made a hasty decision probably it being a "priority visa application"  Is there a way I can make them realize they made a mistake and if they could revisit this decision?

Many of the UK visa refusals we see here share a common pattern and the prevailing reasons refer to V 4.2 (a) and (c).    I do understand that, while the applicants may describe very different individual circumstances, there's a consistent pattern and, broadly, fall into specific categories:    Credibility (lifestyle, lack of ties, visit history, lies & omissions) Funding (insufficient funds, provenance of funds, funds parking) Sponsorship (family, friends, employer)   Question: What most commonly triggers a UK visa refusal where V 4.2 (a) and (c) are given as the grounds?  Secondarily: Given that there is a clear pattern, to what extent are these refusals predictable? Does sponsorship make a difference? Is there a set of personal circumstances, however abstract, where a refusal is all but guaranteed? For example, why do those we see here on TSE who sought entry for the PLAB or British Army appear to be refused with a common theme? Is there a uniform shortcoming or is it just discrimination?   PLAB: What is about applications for a visa, for the purpose of sitting the Professional and Linguistic Assessments Board (PLAB) exam, that seem to invite refusals. After all, the test is given so that international medical graduates can show that they qualify to practise medicine in the UK. The first part, PLAB 1, can be taken in centres outside of the UK. However, PLAB 2 can be taken only in the UK. Why can't you can't get a visa just to sit the exam, promising that you'll leave immediately after?    British Army: Since Commonwealth citizens are eligible to apply online to join, even those who don't reside in the UK, why is it so difficult to get a visa just to attend an interview to see whether you are suitable? Even with an invitation from the Army, such visa applications seem to be unsuccessful. Isn't a career in the British Army a valid reason?     Lastly:  After such a refusal, what approaches would increase the chance of a successful application?


my html file: <!DOCTYPE html>      <meta charset="utf-8">   <title>Using Web Font</title>   <link rel="stylesheet" type="text/css" href="style.css">
Making the Web Beautiful!
     my css file: html, body {   font-size: 40px;   text-align: center;   padding-top: 3.5em; }  @font-face {   font-family: 'Dancing Script';   font-style: normal;   font-weight: 500;   font-display: swap;   src: url(https://fonts.gstatic.com/s/dancingscript/v15/If2cXTr6YS-zF4S-kcSWSVi_sxjsohD9F50Ruu7BAyo3Sup8.woff2) format('woff2'); }  .paragraph {   font-family: 'Dancing Script';   font-style: normal;   font-weight: 500;   font-display: swap;   border-width: thick;   border-style: dashed solid;   border-color: red rgba(170, 50, 220, .6) green;   display: inline-block;   width: 9em;   margin:0 auto;   height: 10em;   vertical-align: middle; }  Result:  As the height of .paragraph increases, the text won't change its position to be vertically centered again. Is there a way to make the text vertically centered as the height changes? I'm new to coding so I am really not sure... It would be great if I can get some help! Thanks

I want to center a div vertically with CSS. I don't want tables or JavaScript, but only pure CSS. I found some solutions, but all of them are missing Internet Explorer 6 support.
Div to be aligned vertically
   How can I center a div vertically in all major browsers, including Internet Explorer 6?


My cube object is appearing pink. I want to paint on it but blender is saying that texture files are missing.  How do I correct it?   Is there anything I need to import?

I made a character, and its one of my first times texturing, and I saved my character into a new folder, and when I came back to the model ALL the textures were pink, I used to know what to do, but I stopped texturing, how do I bring my textures back?


The following comes from Baby Rudin:        Is there any special reason as to why Rudin makes $1\neq 0$ a requirement? I've seen he uses this fact in a few elementary proofs below, the only consequence of this is excluding the $\{0\}$ field, right?

The title pretty much says it all.  Of course, one answer (IMO unsatisfactory) to such questions goes something like "a definition is a definition, period."  In my experience, mathematical definitions are rarely completely arbitrary.  Therefore I figure there must be a good reason for insisting that a field be a non-trivial ring (among other things), but it's not obvious to me.  I realize that a trivial ring would make for a very boring field, but it is also a rather boring ring, and yet it is not disallowed as such.  EDIT: I found a hint of a rationale in the statement that "the zero ring ... does not behave like a finite field," but I could not find in the  for this assertion exactly how the zero ring fails to behave like a finite field.


I recently installed LTS 16.04 as a dual boot with my windows 7. Post installation i am unable to connect to my home wifi. The broadcom driver is installed and working. The wifi connection works as expected on the Windows OS and on the ubuntu i am able to connect to the same home wifi if i tether it via my mobile phone. Also i am able to see my neighbours wifi in the list and a whole bunch of other networks except my home's network .Has anyone faced this issue.. any help would be great.  $ sudo lshw -C network *-network                       description: Network controller        product: BCM4313 802.11bgn Wireless Network Adapter        vendor: Broadcom Corporation        physical id: 0        bus info: pci@0000:03:00.0        version: 01        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress bus_master cap_list        configuration: driver=bcma-pci-bridge latency=0        resources: irq:17 memory:f3500000-f3503fff   *-network        description: Ethernet interface        product: AR8162 Fast Ethernet        vendor: Qualcomm Atheros        physical id: 0        bus info: pci@0000:04:00.0        logical name: enp4s0        version: 10        serial: f0:de:f1:f4:95:d7        capacity: 100Mbit/s        width: 64 bits        clock: 33MHz        capabilities: pm pciexpress msi msix bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd autonegotiation        configuration: autonegotiation=on broadcast=yes driver=alx latency=0 link=no multicast=yes port=twisted pair        resources: irq:31 memory:f3400000-f343ffff ioport:2000(size=128)   *-network        description: Wireless interface        physical id: 3        logical name: wlp3s0b1        serial: 08:ed:b9:96:ef:1b        capabilities: ethernet physical wireless        configuration: broadcast=yes driver=brcmsmac driverversion=4.4.0-21-generic firmware=610.812 ip=192.168.43.121 link=yes multicast=yes wireless=IEEE 802.11bgn

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


I just installed a fresh 18.04 xubuntu on my new laptop. The F keys has some utility buttons for volume, screen brightness adjustments etc.  The original function keys only work with fn button pressed - the function keys override the F keys  How do I revert the keys back so these function keys only work with with fn key presses?

My laptop has a function key which turns F keys into keys which change volume or brightness. I would like to swap a number of them so that they perform that function under normal operation and are an Fx key while the function key is being held.  I assumed that the function keys were just normal keys codes with the set of keys being large enough to include all the possible speical keys. I tried to so as this tutorial suggests () and use xev to obtain the key codes and then would use xmodmap to swap their value.  This does not seem to work though. The F12 key gives the xev output:  KeyPress event, serial 41, synthetic NO, window 0x4a00001,     root 0xb1, subw 0x0, time 468005, (23,-15), root:(89,37),     state 0x10, keycode 96 (keysym 0xffc9, F12), same_screen YES,     XLookupString gives 0 bytes:      XmbLookupString gives 0 bytes:      XFilterEvent returns: False   Which I think is to be expected. However, the Increase Volume button give this response:  KeymapNotify event, serial 41, synthetic NO, window 0x0,     keys:  65  0   0   0   0   0   0   0   0   0   0   0   0   0   0   0               0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0    And so does the Decrease Volume key. How can I perform the swapping of the keys that I would like?  Thank you


I've heard the equivalent of root is the "SYSTEM" account. But I used a tool called "RunAsSystem" to open a shell as SYSTEM, and I'm still getting "access denied" errors even though I know the files in question aren't in use. How can I get a shell from which I can perform any action on any file regardless of whatever permissions are set?  EDIT: This is not a duplicate of . That one is asking why a standard administrator account doesn't have certain permissions; I'm asking if there's an account that has full permissions for everything.  EDIT2: It's not a duplicate of  either. That question is asking how to get a command prompt as the SYSTEM user. In my question I've clearly stated that I was able to do so, so I'm certainly not asking how to do that.  Also, I haven't chosen an accepted answer yet because I haven't decided yet--I didn't forget, if you were wondering.

My user account on Windows 7 is part of the Administrators group which has a full control permissions on C:\inetpub\wwwroot:    However, when I try to create a folder in it, I get the "access denied" error. This is fixed by adding my specific user account to the list but that shouldn't be necessary should it?


I am joining an entrepreneurship program in SG and traveling on 10th July. I applied for EntrePass Visa on 12 june but i think it'll still take some time to get IPA letter so i can't enter in SG as of now. What is my best bet to enter in Singapore till I get EntrePass Visa? A work pass/tourist visa?    I'm from India.

I am flying to Singapore at the end of this month for attending a conference and am in the process of applying for the visa.    Do conferences fall under Business or Tourism?  What should I enter as the purpose of visit (I have currently entered "Conference ()")   I ask this because Business and Tourist Visas have difference document requirements.      Documents Required       For Business Visit (attending business negotiation/discussion)         Completed Form 14A (original) .     One recent passport-sized   colour photograph (to be pasted on the top right-hand corner of (Form   14A) which meets the following requirements:           Image must be taken within the last 3 months .   Photograph should be in colour, must be taken against a white                   background with a matt or semi-matt finish .   Image must show the full face and without headgear (headgear worn in                   accordance with religious or racial customs is acceptable but must not hide                    the facial features) .      Photocopy of the applicant's passport biodata page. Please ensure   that the passport is valid for at least 6 months from the date of   entry .    Completed Form V39A (Letter of Introduction for Visa   Application)¹ . 5) Computer printout of the Singapore registered   business entity’s detailed business profile (showing the names of all   the directors / shareholders) from the Instant Information Service,   Accounting and Corporate Regulatory Authority (ACRA) and printed   within the last 3 months.         ¹ Letter of Introduction (LOI) may be issued by a local contact in   Singapore. For visa applicants attending business negotiation /   discussion in Singapore, the local contact must be a Singapore   registered business entity . The person acting on behalf of the   business entity must be a Singapore Citizen / Singapore Permanent   Resident who is at least 21 years old . If you are not able to furnish   a LOI from a local contact, you may approach your Embassy to issue a   LOI to support your visa application.       For Social Visit (visiting families, friends, relatives and for tourism)         Completed Form 14A (original) .     One recent passport-sized   colour photograph (to be pasted on the top right-hand corner of (Form   14A) which meets the following requirements:         Image must be taken within the last 3 months .   Photograph should be in colour, must be taken against a white                   background with a matt or semi-matt finish.   Image must show the full face and without headgear (headgear worn in                   accordance with religious or racial customs is acceptable but must not hide                    the facial features).       Photocopy of the applicant's passport biodata page. Please ensure that the passport is   valid for at least 6 months from the date of entry.     Completed   Form V39A (Letter of Introduction for Visa Application)².     Local   contact's Singapore Identity Card (original and photocopy).         ² Letter of Introduction (LOI) may be issued by a local contact in   Singapore. Any Singapore Citizen or Singapore Permanent Resident who   is at least 21 years old can act as a local contact. If you are not   able to furnish a LOI from a local contact, you may approach your   Embassy to issue a LOI to support your visa application.


So I have a website and I am looking for a way to redirect a user to another webpage when they press the Esc key.

How can I redirect the user from one page to another using jQuery or pure JavaScript?


I've got Windows 7, two applications and one wide-screen monitor.   The applications can work only in full-screen mode. But I need to vertically split the monitor so I can watch both applications at the same time.  What is the best solution?  Edit:  It is not a duplicate because other users want to Maximize their windows, and the software in other answers can't organize full-screen mode applications.   Example: How to run to two instances of Internet Explorer (or other browser) in full-screen mode (F11) on the same monitor?

Is there such a thing?  I don't want multiple separate desktops, what I'd like to be able to do is split my main desktop into two areas so that an application in one when maximized won't take up the "Full" physical screen, but its portion of it.  I would like to be able to keep some apps maximized, but still view others off to the side with a single monitor.  Ideas?


Take for example the , where the description is      Earned at least 100 total score for at least 20 answers in the linq   tag   How is total score calculated? is it based on the sum of upvotes and downvotes, and not the actual points you received based on questions/answers tagged with these badges?

My question is specifically for badges in a particular tag. I've heard that the rules have been changed.  How and when can one get bronze, silver and gold badges for a specific tag, say ? What are the new rules governing these badges?


Is this grammatically correct?     Thanks Bob, I am happy to talk more tomorrow.    Or is it better to say:     Thanks Bob, I will be happy to talk more tomorrow.   Does present and future tense matter? What is the correct way of wording this?

Here's an example of a short conversation between me and a native speaker via text messages:  A: I'm so exited for this app B: Yeah, me too A: We start tomorrow B: OK   Shouldn't it be "We are starting tomorrow"?!


I'm using the GUI version of Emacs installed using Homebrew-Cask. I launch it by searching into Spotlight, which as I understand is equivalent to opening it from the Applications directory.  App launches fine, but the window (or "frame", in Emacs lingo) always opens up on the upper left corner of the screen. I personally prefer everything to be right in the centre of the screen. Hence, every time I open Emacs, I have to manually drag the window to the center.  Is there a way to set the default position of the window to the centre of the screen so that I don't have to drag it every time I open Emacs?

Whenever I start an application like Terminal or Preview, they are always opened as a small window on the top left corner of the screen. Is there any way to set them to open in the center of the screen? Preferably maximized too?


I want to generate some spatial data where the points/location in the space form a multivariate gaussian distribution. I want these points to have certain autocorrelation given by the variogram model like spherical with spill 0.025 and range 15. I then want to generate some sample for this   How can I do it?  I then want to plot the empirical variogram and again fit a model variogram to check if they come out to be similar. How can I do it?

It is a straightforward approach having a set of coordinates (e.g., in 2D as {x,y}) and at least an associated variable (e.g., v) to calculate a variogram as a descriptor of the spatial dependency of the variable v through the field being studied.       The question appeared to me is: how to generate a realization of a dataset having a variogram? (inverse move!) That is, there is at least one variogram available but neither dataset nor other description is available and the goal is to generate a realization of original (unknown) dataset that could have such a variogram. What is the probability of having such a realization?  Updates / Comments: From variogram in the above context I mean empirical variogram. I suppose that fitting a variogram model is not an issue at least for this question.  Also variogram is available as pairs (h, gamma).


I know that "The records that fire the after trigger are read-only." as given in apex developer guide. But why the records are read only.

I am writing a trigger to get all the Opportunity competitors into a field on Opportunity, however, getting an error while testing it.  Error: updateCompetitors: execution of AfterUpdate caused by: System.FinalException: Record is read-only: Trigger.updateCompetitors: line 24  Can you please check the below code and suggest me what's wrong with this?  trigger updateCompetitors on Opportunity(after insert, after update){    List<Opportunity> OppIds = new List<Opportunity>();     for (Opportunity opp: trigger.new){         OppIds.add(opp);     }  List<OpportunityCompetitor> oppComps = new List<OpportunityCompetitor>();  oppComps= [select id, CompetitorName, Strengths, Weaknesses from OpportunityCompetitor where OpportunityId in: Trigger.newMap.keySet()];  List<Opportunity> OppstoUpdate = new List<Opportunity>();   for (Opportunity opp: OppIds){     String allcomps = null;      if( oppComps.size()>0 ) {       for (integer i = 0; i < oppComps.size(); i++){          allcomps = allcomps + oppComps[i].CompetitorName+',';       }     }    opp.OpportunityCompetitors__c = allcomps;    OppstoUpdate.add(opp);  }    update OppstoUpdate; }


The program is meant to convert a USD($) quantity inputted by the user (from $0 to $10 max) and output it in quantities of quarters, dimes, nickles, and pennies. I am currently using:  Linux ParrotOS with Geany 1.37.1 G++ Compile commands: g++ -std=c++20 -Wall -c "%f"   #include <iostream>  const double QUARTER {0.25}; const double DIME {0.10}; const double NICKLE {0.05}; const double PENNY {0.01};  void dollarToCoin(double cash, unsigned short& quarters, unsigned short& dimes, unsigned short& nickles, unsigned short& pennies){          double cashRemainder = cash;     quarters = cashRemainder / QUARTER;     cashRemainder -= QUARTER * quarters;     dimes = cashRemainder / DIME;     cashRemainder -= DIME * dimes;     nickles = cashRemainder / NICKLE;     cashRemainder -= NICKLE * nickles;     pennies = cashRemainder / PENNY;     cashRemainder -= PENNY * pennies;     std::cout << "Remaining cash: " << cashRemainder << '\n';  }  int main(){          double cash{0};     unsigned short quarters{0};     unsigned short dimes{0};     unsigned short nickles{0};     unsigned short pennies{0};          std::cout << "Input your cash ($0 - $10 max): ";     std::cin >> cash;     dollarToCoin(cash, quarters, dimes, nickles, pennies);          std::cout << "Total quarters: " << quarters <<     '\n' << "Total dimes: " << dimes <<     '\n' << "Total nickles: " << nickles <<      '\n' << "Total pennies: " << pennies << '\n';           return 0; }  The offending line is nickles = cashRemainder / NICKLE; in the dollarToCoin() function. here is the pseudocode:  Starting the program, I input 1.2 as an example In the dollarToCoin() we copy the cash (1.2 dollars) into the cashRemainder We calculate quarters by dividing cashRemainder (1.2) / QUARTER (0.25) = 4.8 we save only the integer and lose the .8 (now we have 4 quarters = $1.00) We substract those 4 quarters to the cashRemainder (1.2) giving out 0.2 This is my confusion part: we calculate total of times dimes = cashRemainder(0.2) / DIME (0.1) if I debug this part, it output 1 instead of 2.  If I, however, replace dimes = cashRemaindder / DIME by using --> dimes = 0.2 / DIME this actually outputs 2. At the end of the program it should convert the input (1.2) into: Quarters: 4, Dimes: 2, Nickles: 0, Pennies: 0 I still haven't optimized the code nor used any libraries (by which I know there are easier ways) I'm just confused as why this happening.

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


My caption is not centered under the two subfigures. Compile able code and data file is attached. Kindly help  \documentclass[conference]{IEEEtran} \ifCLASSINFOpdf \else \fi \hyphenation{op-tical net-works semi-conduc-tor} \usepackage[pdftex]{graphics} \usepackage{pgfplots} \usepackage{subcaption} \usepackage{pgfplotstable} \usepackage[justification=centering]{caption} \usepgfplotslibrary{patchplots} \pgfplotsset{compat=1.7} \begin{document} \begin{center} \begin{figure} \centering     \begin{subfigure}{.1\linewidth} \begin{tikzpicture} \begin{axis}[     ylabel=Satisfied Requests,     xlabel=Requests,     height=5cm, width=8cm,     y label style={at={(axis description cs:-0.2,0.5)},anchor=north},     legend cell align=left, legend columns=-1, legend style={inner xsep=2pt, inner ysep=2pt,at={(0.365,0.216)},anchor=east,font=\tiny},     label style={font=\small},     legend columns=1,     xticklabel style={anchor=near xticklabel},     ymin=0.2, ymax=0.6, ytick={0.1,0.2,0.3,0.4,0.5,0.6},     xmin=0, xmax=1, xtick={0,0.2,0.4,0.6,0.8,1.0}, ] \addplot [thick,mark size=1.8pt,mark=square,red] table[x=x, y=y]{a.txt}; \legend{Proactive high load, Proactive low load, Reactive low load, Reactive high load} \end{axis} \end{tikzpicture} \end{subfigure} \hfill \hspace{5.8cm}  \begin{subfigure}{.1\linewidth} \begin{tikzpicture} \begin{axis}[     ylabel=Satisfied Requests,     xlabel=Cache size,     height=5cm, width=8cm,     y label style={at={(axis description cs:-0.2,0.5)},anchor=north},     legend cell align=left, legend columns=-1, legend style={inner xsep=2pt, inner ysep=2pt,at={(0.996,0.21)},anchor=east,font=\tiny},     label style={font=\small},     legend columns=1,     xticklabel style={anchor=near xticklabel},     ymin=0, ymax=1, ytick={0,0.2,0.4,0.6,0.8,1.0},     xmin=0, xmax=1, xtick={0,0.2,0.4,0.6,0.8,1.0}, ] \addplot [thick,mark size=1.8pt,mark=square,red] table[x=x, y=y]{a.txt}; \end{axis} \end{tikzpicture} \end{subfigure} \vspace{0.3cm} \caption{Simulation results for Proactive vs. Reactive caching with low and high load.} \label{LQI-timex} \end{figure} \end{center} \end{document}      x   y 0.1 0.53896 0.2 0.52122 0.3 0.50326 0.4 0.48145 0.5 0.45054 0.6 0.42319 0.7 0.40357 0.8 0.38396 0.9 0.36315 1   0.34668

Figures are plotted vertically but i want to set them horizontally. Kindly guide me the possible options.  \documentclass[conference]{IEEEtran} \ifCLASSINFOpdf \else \fi \hyphenation{op-tical net-works semi-conduc-tor} \usepackage[pdftex]{graphics} \usepackage{algorithm} \usepackage{algorithmic} \usepackage{pgfplots} \usepackage{subcaption} \usepackage{pgfplotstable} \usepackage{amsmath} \usepgfplotslibrary{dateplot} \usepackage{cite} \usepackage{url} \usepackage{amsbsy} \usepgfplotslibrary{patchplots} \pgfplotsset{compat=1.7}  \hyphenation{op-tical net-works semi-conduc-tor} \begin{document}  \begin{figure} \centering \hspace{-2.15cm}     \begin{subfigure}{.45\linewidth} \begin{tikzpicture} \begin{axis}[     ylabel=Satisfied Requests,     xlabel=Requests,     height=5cm, width=8cm,     legend cell align=left, legend columns=-1, legend style={inner xsep=2pt, inner ysep=2pt,at={(0.365,0.216)},anchor=east,font=\tiny},     label style={font=\small},     legend columns=1,     xticklabel style={anchor=near xticklabel},     ymin=0.2, ymax=0.6, ytick={0.1,0.2,0.3,0.4,0.5,0.6},     xmin=0, xmax=1.1, xtick={0,0.2,0.4,0.6,0.8,1.0}, ] \addplot [thick,mark size=1.8pt,mark=square,red] table[x=x, y=y]   {a.txt}; %\addplot [thick,mark size=1.8pt,mark=asterisk,blue] table[x=x, y=y]  {Request vs. satisfied requests-2.txt}; %\addplot [thick,mark size=2.3pt,mark=diamond,black] table[x=x, y=y] {Request vs. satisfied requests-3.txt}; %\addplot [thick,mark size=1.8pt,mark=o,brown] table[x=x, y=y] {Request vs. satisfied requests-4.txt}; %\legend{Proactive high load, Proactive low load, Reactive low load, Reactive high load} \end{axis} \end{tikzpicture} \subcaption{} \end{subfigure}  \hspace{-2.05cm}  \begin{subfigure}{.45\linewidth} \begin{tikzpicture} \begin{axis}[     ylabel=Satisfied Requests,     xlabel=Cache size,     height=5cm, width=8cm,     legend cell align=left, legend columns=-1, legend style={inner xsep=2pt, inner ysep=2pt,at={(0.996,0.21)},anchor=east,font=\tiny},     label style={font=\small},     legend columns=1,     xticklabel style={anchor=near xticklabel},     ymin=0, ymax=1.1, ytick={0,0.2,0.4,0.6,0.8,1.0},     xmin=0, xmax=1.1, xtick={0,0.2,0.4,0.6,0.8,1.0}, ] \addplot [thick,mark size=1.8pt,mark=square,red] table[x=x, y=y]   {a.txt}; %\addplot [thick,mark size=1.8pt,mark=asterisk,blue] table[x=x, y=y]  {Cache vs. satisfied requests-2.txt}; %\addplot [thick,mark size=2.3pt,mark=diamond,black] table[x=x, y=y] {Cache vs. satisfied requests-3.txt}; %\addplot [thick,mark size=1.8pt,mark=o,brown] table[x=x, y=y] {Cache vs. satisfied requests-4.txt}; %\legend{Proactive high load, Proactive low load, Reactive low load, Reactive high load} \end{axis} \end{tikzpicture} \subcaption{} \end{subfigure}  \vspace{-0.08cm} \caption{Simulation results for Proactive vs. Reactive caching with low and high load. (a) Hit radio vs. Number of requests (b) Hit radio vs. cache size} \label{LQI-timex} \end{figure}  \end{document}      data file  x   y 0.1 0.53896 0.2 0.52122 0.3 0.50326 0.4 0.48145 0.5 0.45054 0.6 0.42319 0.7 0.40357 0.8 0.38396 0.9 0.36315 1   0.34668


I am having trouble solving this problem:     Determine all integers x and y such that  $|2^x − 3^y| =1$   I would think that the only solutions to it is $x = y = 1$.  How can I show that there is no other solutions?  If there are other solutions, how can I find all the solutions?

As we know $3^1-2^1 = 1$ and of course $3^2-2^3 = 1$. The question is that whether set $$ \{\ (m,n)\in \mathbb{N}\quad |\quad |3^m-2^n| = 1 \} $$  is finite or infinite.


the $R^2$ is the amount of variation of the dependend variable $Y$ explained by linear regression. It can take values between 0 and 1.  If I use the adjusted $R^2$ instead, what is the interpretation of this value?

If adjusted R squared is superior to R squared, then why do statistical software continue to report the latter? Is there any kind of situation when a researcher may prefer to use R squared instead of adjusted R squared?


Evaluate $\int_0^{\frac{\pi}{2}}\cos^nx\cos nxdx$ where $n$ is a positive integer. The choices are  a.$\frac{\pi}{2^{n-1}}$  b.$\frac{\pi}{2^{n+1}}$  c.$\frac{\pi}{2^{n}}$  d.$\frac{3\pi}{2^{n}}$  e. None of these  My approach:   $$e^{inx}=\cos nx+i\sin nx$$  $\int_0^{\frac{\pi}{2}}\cos^nx\cos nx\,dx$ = Real part of $\int_0^{\frac{\pi}{2}}\cos^nxe^{inx}\,dx=\int_0^{\frac{\pi}{2}}(\cos xe^{ix})^n\,dx$   After this step I am not able to approach.

Compute the definite integral      $$ \int^{\pi/2}_{0}\cos^{n}(x)\cos (nx)\,dx $$      where $n\in \mathbb{N}$.   My Attempt:  Using $\cos (x) = \frac{e^{ix}+e^{-ix}}{2}$, we get  $$ \begin{align} \int^{\pi/2}_{0}\cos^{n}(x)\cos (nx)\,dx&=\int_{0}^{\pi/2} \left(\frac{e^{ix}+e^{-ix}}{2}\right)^n\left(\frac{e^{inx}+e^{-inx}}{2}\right)\,dx\\ &= \frac{1}{2^n}\mathrm{Re}\left\{\int_{0}^{\pi/2} \left(e^{ix}+e^{-ix}\right)^n\cdot e^{inx}\,dx\right\}\\ &=\frac{1}{2^n}\mathrm{Re}\left\{\int_{0}^{\pi/2}\left(e^{2ix}+1\right)^n\,dx\right\} \end{align} $$  Letting $z=e^{4ix}$ gives us  $$ \begin{align} e^{4ix}dx &= \frac{1}{4i}dz\\ dx &= \frac{dz}{4iz} \end{align} $$  So the integral becomes  $$\frac{1}{4\cdot 2^n}\mathrm{Re}\left\{\int_{C}\left(\sqrt{z}+1\right)\cdot \frac{dz}{iz}\right\}$$  How can I complete the solution from here?


Define $$L(w,u)=\frac{1}{2}\|w-u\|^2+\beta \left\|\frac{w}{x}\right\|,~w,u\in \Bbb{R}^n$$ where $$\frac{w}{x}=\left(\frac{w_1}{x_1},\ldots, \frac{w_n}{x_n}\right)$$ $$\|x\|=\sqrt{x_1^2+\cdots+x_n^2}$$ Given $u$, $x$ and $\beta$, how to get $$\arg\min_{w\in \Bbb{R}^n}L(w,u)$$


I have 20k reputation on Puzzling. This answer does not meet the standards of our site, and I wanted to vote to delete. Why can't I?

What circumstances can cause a question or answer to be deleted, and what does that actually mean?    How can a post be deleted? When can't I delete my own post? Can I still see my post even after it's deleted? Can I see a list of my deleted posts? How can I undelete one of my posts? What does deletion mean for a post? How do votes to delete work? What are the criteria for deletion? What else should I know about deleted posts? If I flag my question with a request to delete it, what will happen?       For more information, see the articles about  and  in the .


Does anyone know of a way to dynamically set the relay host when sending mail through Postfix? At what point does Postfix set the relay host? Is there some way that I can tell Postfix to use a relay host for a particular email (that is outside of global settings)?  Basically, when an email is to be sent to an outbound email address (Gmail, Outlook.com, etc.) I want to be able to choose which relay host to use based on which one has the best deliverability rating. And this could possibly change within seconds so it can't be a "global" postfix setting.  I've thought about creating a content filter which would lookup the "To", find the right relay host and then send the email using another application. However, that seems very awkward to do since we are already in Postfix.  Any help would be greatly appreciated!  Thanks.

In our application, we send different kind of mails. On a broad view we can generalize it in two category,   Mails which monitor the health of the app. Mails which we send to end user.   Is there any way(Setting some header/configuring some parameter in postfix), such that for the same sender address, we can use different relay host?


I need to import Google Maps into ArcGIS for Desktop and apparently I need to activate a Google Maps extension. I'm working on ArcGIS 10.0 and there are no such extension. Do I have to install a new extension?

Can I use Google Maps as a layer in ArcMap?  Is it possible?


Recently, to deal with newly revealed SSL bugs I upgraded my pure Debian distribution. OpenSSL reports a version number of 1.0.1e which is not the latest, however, I am told that it is ok, because the reported build time produced by:     openssl version -b   is June 4, 2014. So, even though the "version" is older, I am assured that Debian somehow "patched" the vulnerabilities, so I don't actually need 1.0.1h as security posts claim, because my 1.0.1e is patched.  I guess I don't understand this. Can anybody explain what the heck is going on? How am I supposed to know that the vulnerabilities are patched if it says 1.0.1e, not 1.0.1h as it should? Why doesn't Debian just freaking put 1.0.1h in the distribution? I do not get this.

I am running Debian Wheezy. I have just upgraded my system and should have the latest version of openssl (1.0.1g which fixes a ), but it does not appear to be being used.  I have run:  apt-get update apt-get upgrade   dpkg -s openssl shows: Version: 1.0.1e-2+deb7u5  openssl version shows: OpenSSL 1.0.1e 11 Feb 2013  I have rebooted my system since upgrading. What do I need to do to get openssl using the updated version?


In an Nginx configuration with an upstream definition it is possible to define the parameters max_fails and fail_timeout as arguments to the server directive, such as:  upstream dynamic {     server backend2.example.com:8080 fail_timeout=3 max_fails=3; }   But in our configuration we're proxying to backends by dynamically generating the backend names based on the request, so we don't have upstream definitions:  proxy_pass http://${org}-http.hosted-service.svc.cluster.local:3000;   Is there a way how we can set the fail_timeout and max_fails globally without having to define an upstream for each possible value of ${org}?  Our Nginx version is 1.13.7

All of the examples I've seen of using upstream (for load balancing) in nginx look like this:  upstream  backend  {   server   backend1.example.com:8080          max_fails=3  fail_timeout=30s;   server   backend2.example.com:8080          max_fails=3  fail_timeout=30s;   server   backend3.example.com:8080          max_fails=3  fail_timeout=30s; }   It seems repetitive to re-set max_fails and fail_timeout for each backend, when typically they are always the same. Is it possible to set max_fails and fail_timeout for all of the backend servers at once?


Right now, I am analyzing the prediction quality of a dynamic model that has variables with different units (e.g. $x_{1,t}$ is in meters, $x_{2,t}$ is in kilograms etc.). I have discovered a great tool called : $$ \frac{1}{n}\sum_{t=1}^n\left( \frac{\left| \hat x_{t,i} - x_{t,i} \right|}{\frac{1}{n-1}\sum_{\tau=2}^n \left| x_{\tau,i}-x_{\tau-1,i}\right|} \right) $$ where $i$ is index of variable.  The MASE is denoted as scale-free. I would be curious how to say that the error is large or small. My experience is that $MASE=3$ is not bad, but I would appreciate some more rigorous answer or reference.

Mean absolute scaled error (MASE) is a measure of forecast accuracy proposed by .  $$MASE=\frac{MAE}{MAE_{in-sample, \, naive}}$$  where $MAE$ is the mean absolute error produced by the actual forecast;  while $MAE_{in-sample, \, naive}$ is the mean absolute error produced by a naive forecast (e.g. no-change forecast for an integrated $I(1)$ time series), calculated on the in-sample data.  (Check out the  paper for a precise definition and formula.)  $MASE>1$ implies that the actual forecast does worse out of sample than a naive forecast did in sample, in terms of mean absolute error. Thus if mean absolute error is the relevant measure of forecast accuracy (which depends on the problem at hand), $MASE>1$ suggests that the actual forecast should be discarded in favour of a naive forecast if we expect the out-of-sample data to be quite like the in-sample data (because we only know how well a naive forecast performed in sample, not out of sample).  Question:  $MASE=1.38$ was used as a benchmark in a forecasting competition proposed in this . Shouldn't an obvious benchmark have been $MASE=1$?  Of course, this question is not specific to the particular forecasting competition. I would like some help on understanding this in a more general context.  My guess:  The only sensible explanation I see is that a naive forecast was expected to do quite worse out of sample than it did in sample, e.g. due to a structural change. Then $MASE<1$ might have been too challenging to achieve.  References:   Hyndman, Rob J., and Anne B. Koehler. "" International journal of forecasting 22.4 (2006): 679-688. .


How can I seperate two huge images into two pages? I tried \newline but no success.  \documentclass[12pt]{book}  \usepackage{subfig} \usepackage{caption} \usepackage{graphicx}  \begin{document}  \begin{figure} %\ContinuedFloat \centering \subfloat{     \centering     \includegraphics[width=435pt]{img-molmicros2.png} } \newline \subfloat{     \centering     \includegraphics[width=451pt]{img-molmicros3.png} } \caption{sdfsdfsdf} \label{fgdfg} \end{figure}  \end{document}

I have the following code for a Figure with 4 subfigures:  \documentclass{article} \usepackage{graphicx} \usepackage{caption} \usepackage{subcaption}  \begin{document}  \begin{figure}[b]     \centering     \begin{subfigure}[b]{\textwidth}         \includegraphics[width=\textwidth]{./plots/arm1.pdf}         \subcaption{$Q^{*}$ values for arm 1}         \label{fig:arm1}     \end{subfigure}     ~     \begin{subfigure}[b]{\textwidth}         \includegraphics[width=\textwidth]{./plots/arm2.pdf}         \subcaption{$Q^{*}$ values for arm 2}         \label{fig:arm2}     \end{subfigure}      ~     \begin{subfigure}[b]{\textwidth}         \includegraphics[width=\textwidth]{./plots/arm3.pdf}         \subcaption{$Q^{*}$ values for arm 3}         \label{fig:arm3}     \end{subfigure}      ~     \begin{subfigure}[b]{\textwidth}         \includegraphics[width=\textwidth]{./plots/arm4.pdf}         \subcaption{$Q^{*}$ values for arm 4}         \label{fig:arm4}     \end{subfigure}      \caption{$Q^{*}$ values for different arms}     \label{fig:arms} \end{figure}  \end{document}   This results in   But this way, the 4 subfigures are too large to fit on 1 page. I would like to split this over 2 pages, keeping the subcaptions a, b, ... How can I do this?


Could someone please advise me on the below.  This method only currently returns false, except for when I send fixed to it.  if I pass it rand or flood it still returns false. I would normally pass rand30 or 10flood for example.   I have printed to screen and I cant see any issues. Maybe I am missing something.  Please could you advise me on this?  public boolean validateTrtype(String trType){                     if(trType=="fixed")                         return true;                     else if(!(trType=="fixed")){                     String trName = trType.substring(0, Math.min(trType.length(), 4));                     String trName1 = trType.substring(Math.max(0, trType.length() - 5));                     String[] trTypeSplit = trType.split("(rand)|(floo)");                     i = trTypeSplit[0];                     System.out.println(i);                     j = trTypeSplit[1];                     System.out.println(j);                     this.str = trName;                     this.str1 = trName1;                     System.out.println(str);                     System.out.println(str1);                     }                     if((str=="rand") && (isInt(j)==true) && !(Integer.parseInt(j)<0)){                         return true;                     }                     if((str1=="flood") && (isInt(i)==true) && !(Integer.parseInt(i)<0)){                         return true;                     }                     else                     return false;                  }

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 am a 4th-year undergraduate student and I have fully read R. Shankar's book on Quantum Mechanics and Griffiths book Quantum Mechanics. I have also done a bit of the Application of QM on multielectron systems,molecules, etc.  Not going ahead in the application part, I want to focus on the foundations of QM part which I find really interesting. But I have very limited knowledge of mathematics. I have read Curtis "An introduction to Linear Algebra", Gallian "Group Theory"(1-10 chapters only) and have a little bit of knowledge on differential geometry.  With this as my Mathematical background, which would be the best book (a bit mathematical) for introduction to Quantum Mechanics which includes an introduction to Hilbert Space and functional analysis?  PS: My question is specifically for the ones who have limited mathematical knowledge in contrast to answers which assumes you have done graduate level mathematics.

I'm interested in quantum mechanics book that uses high level mathematics (not only the usual functional analysis and the theory of generalised functions but the theory of pseudodifferential operators etc, certainly the modern mathematics). If there isn't something similar please give me a reference to the book that is strictly supported by mathematics (given a set of mathematically descripted axioms author develops the theory using mathematics as a main tool).


when I try  to access to a folder using the terminal I got this message : "no such file or directory" this image will  this image explain every things    I try  to renamed by command "mv ",the same problem   think for helps

I'm completely new and lost in Ubuntu 12.04, I'm having trouble navigating to my Sublime folder which I know is in my /opt folder. Yet I've tried to no avail to navigate into it via Terminal window. The directory is colored in blue, no idea what this means...but I am able to access the folder using the GUI explorer...?  k@k-Ubuntu:~$ cd /opt k@k-Ubuntu:/opt$ ls Sublime Text 2 k@k-Ubuntu:/opt$ cd Sublime Text 2 bash: cd: Sublime: No such file or directory k@k-Ubuntu:/opt$ cd /Sublime Text 2 bash: cd: /Sublime: No such file or directory


I'm a bit confused with the correct answer in this phrase:     In Florida, you can explore the Everglades or the beaches, _______   are relaxing places.   Is it "which are relaxing places" or "that are relaxing places"? Thanks for the help!

When is it appropriate to use that as opposed to which with relative clauses?


When I use the garamondx package, latex no longer typesets double quotes correctly (see code below). Instead, double quote left is replaced with a superscript v symbol, and double quote right is replaced with a subscript 1. I have also tried using the csquotes package to include double quotes, but the problem persists. Any help would be greatly appreciated.  \documentclass [twoside,12pt,letterpaper]{report}  \usepackage[T1]{fontenc} \usepackage[osfI]{garamondx} \usepackage[garamondx, cmbraces]{newtxmath} \usepackage{csquotes}  \begin {document}  Test of ``quotes.''  Test of \enquote{quotes.}  \end{document}

I have been using the garamondx font package with pdflatex to typeset my CV for years without any problems. During my latest round of keeping it up to date, suddenly ligatures no longer want to typeset. MWE:  \documentclass[11pt]{article}  \usepackage{garamondx}  \begin{document} Sufficiently pacific \end{document}   Result (copied from the resulting PDF):  Su`ciently paci∏c   I would argue that this is clearly incorrect. I have tried looking at the documentation, which suggests the addition of \usepackage[full]{textcomp} before loading, but that doesn't have any effect. I've tried using fontenc to change the font encoding, but always get the same result. I also tried uninstalling and reinstalling the package, but to no avail.  Every other font I've tried gets the ligatures correct. I've also tried the ebgaramond and garamond packages, but these versions of Garamond are too heavy for my taste.  Has anyone else observed this behavior? I'm using MikTeX on Windows 7    When I add \listfiles to beginning of the MWE above, the log file contains the following garmondx-related lines:  ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\garamondx\garamondx.sty" Package: garamondx 2014/10/08 v1.092  `garamondx' v1.092. 2014/10/08 GaramondNo8 with expert features (Michael Sharpe )  ...  LaTeX Font Info:    Try loading font information for T1+zgmx on input line 7.  ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\garamondx\t1zgmx.fd" File: t1zgmx.fd 2012/10/29 Fontinst v1.933 font definitions for T1/zgmx. ) ("C:\Users\craigim\Documents\My Dropbox\LaTeX\Projects\GaramondMWE.aux") LaTeX Font Info:    Checking defaults for OML/cmm/m/it on input line 7. LaTeX Font Info:    ... okay on input line 7. LaTeX Font Info:    Checking defaults for T1/cmr/m/n on input line 7. LaTeX Font Info:    ... okay on input line 7. LaTeX Font Info:    Checking defaults for OT1/cmr/m/n on input line 7. LaTeX Font Info:    ... okay on input line 7. LaTeX Font Info:    Checking defaults for OMS/cmsy/m/n on input line 7. LaTeX Font Info:    ... okay on input line 7. LaTeX Font Info:    Checking defaults for OMX/cmex/m/n on input line 7. LaTeX Font Info:    ... okay on input line 7. LaTeX Font Info:    Checking defaults for U/cmr/m/n on input line 7. LaTeX Font Info:    ... okay on input line 7. LaTeX Font Info:    Checking defaults for TS1/cmr/m/n on input line 7. LaTeX Font Info:    Try loading font information for TS1+cmr on input line 7.  ("C:\Program Files (x86)\MiKTeX 2.9\tex\latex\base\ts1cmr.fd" File: ts1cmr.fd 2014/09/29 v2.5h Standard LaTeX font definitions ) LaTeX Font Info:    ... okay on input line 7.  ("C:\Program Files (x86)\MiKTeX 2.9\tex\context\base\supp-pdf.mkii"


After having installed cuda drivers on Ubuntu 16.04, the program told me to make sure to have /usr/local/cuda-8.0 in the PATH variable and /usr/local/cuda-8.0/lib64 in the LD_LIBRARY_PATH variable.  I read, each time the terminal is started it reads the .bashrc file in order to establish its environment variables and environmennt variables should be put into this file. So I checked with   grep PATH .bashrc    and  grep LD_LIBRARY_pATH .bashrc    where in this file the variables are declared to append both paths, but in terror I realized, that there is no such thing as PATH or LD_LIBRARY_PATH inside the .bashrc. And I asked myself: "How are the envirnoment variables declared then?", but no annswer was given. So I went here to ask you Why and How?

Is ~/.bashrc  the only place to specify user specific environment variables, aliases, modifications to PATH variable, etc?  I ask because it seems that ~/.bashrc seems to be bash-only, but other shells exist too…


The scene is:  Wizards have gathered for a once a year forging of a ring of power. The ring is struck only once each year. There are required to be mythical beasts (don't remember which one) in the room when the forging takes place.  The wizards have to feed these beasts all year long for this one event. Complaints are made if the ring will ever return the resources required to forge it.  The main character, a young student, is in attendance at this forging.  I can't remember if this is a scene from a Deryni novel or some other novel from the 70s or 80s.

I am looking for a fantasy book:  What I vaguely recall is:  A boy is sick with the root cause being magic within himself. He is semi-cured by someone and is told he needs to train with the wizards in the towers throughout the land. He finally decides to leave his family and train at the towers. I am pretty sure each tower in the land held different responsibilities, and someone or something was tearing down the towers in the lands.  The book was in English. I was thinking it was written in the 80's or 90's. This book was picked from old books people donated to the military (so it certainly wasn't "new"). This was a full book, not a short story, and I recall that it was part of a series: at least three books, probably more. The cover had some orange tint to it, and pictured a castle/tower in the background to the left side, while in the foreground there was a person riding a horse along a winding trail to the tower/castle.  Any help would be appreciated. This is not the Seventh Tower Series.


Boy have been asking a bunch of questions on here lately, I have always been curious about this other driver called the CPU Microcode driver, I have an intel i3 Core Processor. I understand that this will increase your CPU performance with Ubuntu pretty well, but I'm not sure if I should install it.

I have recently noticed that there is an additional driver called Unknown: Unknown here which was not there before:    I have already read , and understand why it is there, but my question is, should I activate it? Will this make a difference? Or should I just leave it as it is as it sounds rather useful?    OS Information:  Description:    Ubuntu 15.04 Release:    15.04


Testing with Python 2.7 and 3.5  for i in range(0, 1000000000):     pass   When I'm running this code with python3 everything is fine (less than 3MB memory usage)  But by python2 memory usage is 32GB (my server has only 32GB of ram)  How to fix this for Python 2.7?

Apparently xrange is faster but I have no idea why it's faster (and no proof besides the anecdotal so far that it is faster) or what besides that is different about  for i in range(0, 20): for i in xrange(0, 20):


When i track my points (Black dots on white paper) it looks pretty good yet my solve error comes out to about 12.5. Please help me out

Whenever I do camera tracking in Blender the reconstruction is always zooming out or not on the axis. I have a great quality camera, but the end results of the camera tracking always has the model sliding. If you have a solution please tell me.


I have a 146GB HDD in one of my servers that I want to replace with a 120GB SSD. Can I just clone the drive with dd and have it boot just fine?  Are there any repurcussions to cloning to a smaller drive?  (The drive is nowhere near full so there shouldn't be much at the end of the disk). The server itself only had whatever partitions Proxmox sets up when it installs.

I have a 500GB drive which is about 50GB full. I got a 80GB SSD, which has 74.5GB of available space. I want to clone the system drive onto the SSD.   DriveImage XML will not let me copy a larger drive to a smaller one.


I need to create an int array of a specific size. The array should be initialized with a specific, non-0 value (all elements should be 1).  int[] array = createArray(12, 1);   Of course I could simply initialize the array and for-loop over it, setting all values to 1.  int[] createArray(int size, int defaultValue){    int[] arr = new int[size];    for(int i = 0; i < size; i++) {        arr[i] = defaultValue;    }    return arr; }   But I wonder, if there are better alternatives (i.e. Java out-of-the box utilities) to this in terms of speed or compactness of source code so I could potentially inline it instead of having a dedicated method for that?

I know how to do it normally, but I could swear that you could fill out out like a[0] = {0,0,0,0}; How do you do it that way? I did try Google, but I didn't get anything helpful.


I have the following problem:  I use a template page for a specific application, and for the login through "steam" there is a button. The button refers to a php file, and in the php file you can find the following line of code:
   What does the "?login" exactly mean, I know it stands for a file but I cant find a file named like that, can anyone help me out?

I am new to PHP. In the path of learning PHP language, I notice that, some website would this kind of URL:  www.website.com/profile.php?user=roa3&...  My questions:   What is the "?" symbol used for?  If I were develop a php website, must I use it in my URL? For example, after a user(roa3) successful logged in, I will redirect to "www.website.com/profile.php?user=roa3" instead of "www.website.com/profile.php" What are the advantages and disadvantages of using it?


I use Debian 7 and have installed a virtual host with address sub.domain.com following this tutorial:   I have enabled it, rebooted the PC but still the subdomain opens /var/www  Here is the file contents of the file named "sub.domain.com", located at /etc/apache2/sites-available/ :  <VirtualHost *>     ServerName sub.domain.com     DocumentRoot /usr/share/destfolder     ServerAdmin info@domain.com     ErrorLog /var/log/apache2/sub.domain.com-error_log     CustomLog /var/log/apache2/sub.domain.com-access_log common </VirtualHost>   By the way when I reload apache's configuration, I get: NameVirtualHost *:80 has no VirtualHosts  Any suggestions?


What is the best way to punctuate a range of hyphenated numbers, e.g., sections 12-3 through 12-7?  EDIT: Just to reply to those who marked this as a duplicate, I really fail to see how the post that this question purportedly duplicates is responsive my question. I'm not expressing a misunderstanding of en-dashes and hyphens, but rather asking a question about preferred usage. In fact, the top answer (which I think is correct) suggests not using a dash or a hyphen at all.

I generally know how to use a hyphen, but when should I use an en-dash (–) instead of an em-dash, or when should I use a hyphen (-) instead of an em-dash (—)?


My main problem is that I cannot use sudo. My root account is locked using sudo passwd -dl root.  I have two users on my machine. root and admin, admin does not have su permission. When I try to use sudo on admin user, it says that admin is not in the sudoers file.  When I try to use su while logged in admin user  su: Authentication failure   and when I try to use sudo  admin is not in the sudoers file.  This incident will be reported.   can I unlock my root user back?

I had enabled root login before and tried to change its password using this . But after successfully changing the password and locking it via sudo passwd -dl root. I cannot login back to SSH, it says Access is denied.  I have two users on my machine. root and admin, admin does not have su permission. When I try to use sudo on admin user, it says that admin is not in the sudoers file. That is why i need my su user back.


I'm trying to send a file for a label as a PDF and the text is white. Is there a way that I can make the art board transparent so that she can see it without me saving it for web?

Is there a way to export my artwork as PDF so that it has a transparent background? Something like exporting objects only... whenever I try to save my .ai as pdf, it always comes with a full white background. If I try to save as eps, I get a chunky white background (where it has white rectangles behind the artwork only where the artwork exists, so there are transparent chunks).  If I export as png, I get an image like what I'm looking for. Is there any way to do that in a vector format?


Today, I was searching for an answer to  at Stack Overflow. As you see, question exists, but it doesn't have any proper answers. So I offered a bounty, to possess attention. Could I ask the same question rather?

Suppose you had a question, and you really want a good answer that would solve your problem, but noticed it was already asked by someone else. However, no one has posted any answers. The question is technically considered "unanswered", but a lot of users who would otherwise bother to give a correct answer probably skip the question completely for some reason.  What should I do in this case?  One idea is to ask a new, completely identical question, in the hope users will notice the new question and post an answer there. But would that go against SE policy?     Note: This is adapted from , but that doesn't cover the case where the original question is unanswered. Also, it is not a duplicate of , as that question asks about getting attention for one's own questions, while this one and the one linked above ask about getting an answer if someone else has already posted the same thing.


I am trying to evaluate $$\int_0^\infty \frac{\arctan(x)\log(x^2+1)}{x(x^2+1)}$$ I have tried differentiating under the integral sign, with different parameters, as well as contour integration, but I have not succeeded with neither of them. Wolfram Alpha gives a numerical value $\approx 0.754694$, but I suspect that there is a more exact answer.  I would be very glad to get some hints on how to solve it.

$$\small\int^\infty_0 \int^\infty_0 \int^\infty_0 \frac{\sin(x)\sin(y)\sin(z)}{xyz(x+y+z)}(\sin(x)\cos(y)\cos(z) + \sin(y)\cos(z)\cos(x) + \sin(z)\cos(x)\cos(y))\,dx\,dy\,dz$$  I saw this integral $I$ posted on a page on Facebook . The author claims that there is a closed form for it.     My Attempt  This can be rewritten as   $$3\small\int^\infty_0 \int^\infty_0 \int^\infty_0 \frac{\sin^2(x)\sin(y)\cos(y)\sin(z)\cos(z)}{xyz(x+y+z)}\,dx\,dy\,dz$$  Now consider   $$F(a) = 3\int^\infty_0 \int^\infty_0 \int^\infty_0\frac{\sin^2(x)\sin(y)\cos(y)\sin(z)\cos(z) e^{-a(x+y+z)}}{xyz(x+y+z)}\,dx\,dy\,dz$$  Taking the derivative   $$F'(a) = -3\int^\infty_0 \int^\infty_0 \int^\infty_0\frac{\sin^2(x)\sin(y)\cos(y)\sin(z)\cos(z) e^{-a(x+y+z)}}{xyz}\,dx\,dy\,dz$$  By symmetry we have  $$F'(a) = -3\left(\int^\infty_0 \frac{\sin^2(x)e^{-ax}}{x}\,dx \right)\left( \int^\infty_0 \frac{\sin(x)\cos(x)e^{-ax}}{x}\,dx\right)^2$$  Using W|A I got   $$F'(a) = -\frac{3}{16} \log\left(\frac{4}{a^2}+1 \right)\arctan^2\left(\frac{2}{a}\right)$$  By integeration we have   $$F(0) = \frac{3}{16} \int^\infty_0\log\left(\frac{4}{a^2}+1 \right)\arctan^2\left(\frac{2}{a}\right)\,da$$  Let $x = 2/a$  $$\tag{1}I = \frac{3}{8} \int^\infty_0\frac{\log\left(x^2+1 \right)\arctan^2\left(x\right)}{x^2}\,dx$$  Question  I seem not be able to verify (1) is correct nor find a closed form for it, any ideas ?


Most of the functions that I have seen have their discontinuities on rationals and continuities on irrationals!  I am wondering if there is any exampe of some function whose continuities are rationals? Or is other words      The set of continuities of a function $f:\mathbb{R}\to\mathbb{R}$ can be $\mathbb{Q}$?

I have a question about subsets $$ A \subseteq \mathbb R $$ for which there exists a function $$f : \mathbb R \to \mathbb R$$ such that the set of continuity points of $f$ is $A$. Can I characterize this kind of sets? In a topological,measurable or in some way? For example, does there exist a function continuous on $\mathbb Q$ and discontinuous on the irrationals?


When i take a photo it looks bright, sharp and vibrant colours, but when it is transferred to my computer it looks so bad. Very dull and dark with weak colours. I have to brighten and increase contrast plus give it lots of colour saturation to get it close to the picture on the camera screen.

I have been taking some photos with my new camera, and have found that once I import them to my laptop, the colors look washed out, and not as nice and vivid as on the camera LCD display.  It's a Sony HX60, and I am importing them into an HP dm4, running Fedora.  I've read about color profiles, and made sure that the calibration on my monitor was set.  The thing is that the issue arises with just importing them from the camera iteself (using Shotwell) and diplaying them with the standard Image Viewer, it's not even an issue with Gimp or an image editor with a color profile not set.  I am wondering if my camera is using some of color profile that is being lost when imported, or is it that the display on my camera is much better than the one my laptop?  I can then open the image in Gimp, and then use some enhancements to make the image look better, but I just want them to look the same as on my camera.  Any ideas?  Update:  Here is an example image I took:   And here is a photo of the comparison of how the Sony HX60 & the HP dm4 render the output. This photo was taken with a cheap Lumix, but still clearly shows the difference:


How  I  can have a multiple users Remote Desktop Connection to a Windows Server in the same time ?

Recently we bought dedicated server with Windows Server 2012 Standard.It's allowing 2 people at a time.So I want to allow more people at a time.  How can I do this?


In JavaScript everything is object like String literal, numbers, Object... And properties can be added to objects dynamically also, but I am adding property to object which refer to string then it seems it is not working Following is JS code which I am running var aVar = "some string"; console.log(aVar); aVar.name = 'raj'; console.log(aVar.name);  Output... hi some string undefined

I'm pulling items out of the DOM with jQuery and want to set a property on an object using the id of the DOM element.   Example  const obj = {}  jQuery(itemsFromDom).each(function() {   const element = jQuery(this)   const name = element.attr('id')   const value = element.attr('value')    // Here is the problem   obj.name = value })   If itemsFromDom includes an element with an id of "myId", I want obj to have a property named "myId". The above gives me name.  How do I name a property of an object using a variable using JavaScript?


This is a snippet of my MainActivity.java. @Override                 public void onClick(View v) {                     EditText textField = findViewById(R.id.messageField);                     if (!(textField.getText().toString() != "")){                          FirebaseDatabase.getInstance().getReference().push().setValue(                             new Message(FirebaseAuth.getInstance().getCurrentUser().getEmail(), textField.getText().toString()));                     textField.setText(""); }         }

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?


Is there a way to install Ubuntu server 18.04 without network? Looks like Ubuntu live server 18-04 does not install without network; if I select a network connection and then disconnect it before install starts, it errors out when it tries to download the current kernel; apparently Ubuntu server 18.04 refuses to install if it can't download the current kernel and grub/efi from the network; I didn't see any checkbox for offline install. On the positive side, it correctly partitions a new disk and installs the efi partition correctly and it is actually bootable;

The latest version of Ubuntu server (18.04) seems to demand network configuration and refuse to boot without it. I have no desire to connect the server in question to the internet for anything, and have installed previous versions of Ubuntu server without network no questions asked.  Is a network connection an absolute requirement for the latest version of Ubuntu server? Or is there something I'm missing?  The installation cannot proceed past the network configuration page unless an ethernet connection is active, by my current estimates. I have no ethernet network within range of the machine so can't test it on an internet-less network. I only have WiFi within immediate range (which does have internet access) but it won't recognise the device and it should be simpler to get the installation to happen without any updates than to go to the effort of finding the drivers to support the WiFi adapter.  Note that this is NOT a duplicate of  since the new installer seems to be the real problem here.


A user has asked  which did not receive much attention, and thus the user deleted the post. After some time, the user asked the  (with just slight changes to the title and a tag change), so that it could receive a bit more attention. The strange thing is that the question was not downvoted or poorly written, and yet the user deleted the original post. Now, since the original question was deleted, I could not mark the new one as a duplicate (it threw an error). My question is, how do we handle such questions? Just let them be as such or let the user know about it or is there another way to handle such situations?

I got  question in review. First sentence is:     I know there is a  question, but no answers.   And indeed the two questions are virtually identical. I started to flag as duplicate - but the original question had no answer at the time, so it wouldn't be correct and apparently . (I didn't go so far as to try to submit the flag).  What is the proper action here? How do we want such a question to be handled? Should both (or more) questions stay open indefinitely until either is answered and somebody gets the good idea to do the duplicate linking?   As the new question is essentially a bump to the front page (perhaps with re-tagging), especially in the case where the OP knows that a previous question exist, perhaps something should be done to enable bumping re-emphasizing without writing the new question.  As I wrote this,  actually got an answer. So the old one should now be closed as a duplicate of the new - but my question remains for the case where all known/found duplicate questions have no answer?  Ironically, just before asking this, the "Questions that may already have your answer" gave me ... (Although the suggestion has no answer). So it has been asked before - the comment there even suggest the ability to re-emphasize.


Is the Kaiser rule (choosing only PCs with eigenvalues >1) a suitable method to select the best principal components?

Is the Kaiser rule (choosing only PCs with eigenvalues >1, ) a reasonable method to select the number of principal components to retain? What are its pros and cons?


please, someone, solve this recurrence relation $$T(n)=T(n-1)+2n+3T(n-3)$$ if $$(T0=1,T1=2,T2=3)$$

I am not able to solve the above recurrence relation which involves $n$. The initial conditions $a_0 = 1, a_1 = 2, a_2 = 3$, for $n \geq 0$. Please try to give closed form in terms of arbitrary $a_i \geq 1 $ for $i \geq 0$


The title is a bit general but I'll give all the details in the post.   My problem is that I can't unwrap the part of the conveyor belt "straight" shown in this pic.     Can I really do it or I should stick to these UVs and find another way for just the texture?  Tried about everything I could find and nothing really worked.  The reason I want them straight is because the texture is going to be animated.

Showing the actual 3D model of a curving ramp.  Shows the UVs of that model that blender did automatically. Shows the UV image that I need.   I am going put a road texture on it., but round faces are not helping me at all. All I need is straight belt kind of UV.


If I need a figure for a document I usually use TikZ or PSTricks. Sometimes I would like to promote it to other people who usually use only GUI programs for such kind of stuff. But then I restrain myself and don't promote anything because I have the feeling that I don't have good objective arguments which the other person can understand.   For me it is    I have the feeling to have complete control over everything when using TikZ/PSTricks over any GUI tool. I can create commands which take parameters as argument and return a figure depending on the argument. It gives me a consistend look in a LaTeX document (same fonts, fontsizes,...). There is a very friendly, active community out there (TeX.SX) where I can get help on most of my questions. :-) It's just fun.   However I feel this is not convincing enough for a typical GUI user and I feel that one can get those things also using GUI programs (though I don't know how).   So are there better or clearer objective reasons to prefer TikZ or PSTricks over any GUI driven program. Do you have some good examples which illustrates the basic advantages of those command line driven tools in some way dramatically?

I was looking at recent questions here and was surprized that people were drawing diagrams in LaTeX, when it can be done in SmartDraw, OpenOffice or other programs. Is there any benefit to using LaTeX for diagrams (at least for normal diagrams like a layered architecture)?


I have a very lengthy ArrayList comprised of objects some of them however, are undoubtedly duplicates.  What is the best way of finding and removing these duplicates.  Note:  I have written a boolean-returning compareObjects() method.

I have an ArrayList<String>, and I want to remove repeated strings from it. How can I do this?


I have the following char*  char* config = "username 12345 google.com 225";   While trying to split it by space, I expect the result be a vector<string> of words contained in the string, BUT I instead get only the first word and nothing more.  Here is the code I use:  istringstream iss_str(config); string token; // storage for splitted config data vector<string> tokens;  // port number is an integer value, hence it should // be type-cast back to integer int config_int_port = 0;  while( getline(iss_str, token, ' ') ) // I also have replaced space with \000 but to no avail {     tokens.push_back(token); }   The result I get is a vector with size 1 which only contains the first word, username  I also have used the following method, but the result is the same as previous one:  copy(istream_iterator<string>(iss_str),      istream_iterator<string>(),      back_inserter(tokens));   UPDATE I use the following function to execute the above code:  void __cmd_conf(char* __config)   And it is called:  __cmd_conf(optarg);   optarg is linux's global variable for the next option's arguments.

I'm trying to iterate over the words of a string.  The string can be assumed to be composed of words separated by whitespace.  Note that I'm not interested in C string functions or that kind of character manipulation/access. Also, please give precedence to elegance over efficiency in your answer.  The best solution I have right now is:  #include <iostream> #include <sstream> #include <string>  using namespace std;  int main() {     string s = "Somewhere down the road";     istringstream iss(s);      do     {         string subs;         iss >> subs;         cout << "Substring: " << subs << endl;     } while (iss); }   Is there a more elegant way to do this?