Let $A$ be the $n$ square matrix with as entries the greatest common divisors of the respective indices: $(A)_{i,j}=\gcd(i,j)$, $$A=\begin{Bmatrix}\gcd(1,1) & \gcd(1,2) & ... & \gcd(1,n) \\ \gcd(2,1) & \gcd(2,2) & ... & \gcd(2,n) \\ \vdots & \vdots & \ddots & \vdots \\\gcd(n-1,1) & \gcd(n-1,2) & ... & \gcd(n-1,n)\\\gcd(n,1) & \gcd(n,2) & ... & \gcd(n,n)\end{Bmatrix}$$ ok so $\phi(n)$ denotes Euler's totient function, then $$\det(A)=\phi(1)\phi(2)...\phi(n)=\prod_{i=1}^n\phi(i)\quad\quad(1)$$ this can permit us to determine $\phi(n)$ if we know the values of $\phi$ for the numbers less than $n$ because $$\underbrace{\det(A) = \sum_{\sigma \in S_n} \mathrm{sgn}(\sigma) \prod_{i=1}^n a_{i,\sigma_i}}_{\text{Leibniz formula}}\to\dfrac{\det(A)}{\phi(1)...\phi(n-1)}=\dfrac{\sum_{\sigma \in S_n}  \mathrm{sgn}(\sigma) \prod_{i=1}^n a_{i,\sigma_i}}{\phi(1)...\phi(n-1)}=\phi(n)$$ but idk if this is useful        so (1) is a surprising result, but how to prove it?   are there similar examples where $(A)_{i,j}=f(i,j)$ and $$\det(A)=\prod_{i=1}^n g(i)?$$

Let $A=[a_{ij}]_{n×n}$ be the matrix defined by letting $a_{ij}$ be the rational number such that $$a_{ij}=\gcd(i,j ).$$ How prove that $A$ is invertible, and compute $\det(A)$? thanks in advance


Can we change the Text Effect(Video editing) font as of 2.79 version?  If not, how can a text created by Text Editor be pulled into the Video Timeline Editor?  Thanks, Anand

I find the default boring and wonder how to change it.


For various regression tree algorithms (e.g. GBM, Random Forest, Extra Trees), is there any sensible way to get predictions for new data when the independent variables for the new cases are much larger than anything seen in training AND there is a highly positive or negative relationship between the independent variables and the response?  For example, here's what I'd like to do:  x = [1, 2, 3]; y = [2.1, 3.9, 5.8]  # y is just about 2 times x model = random.forest(y ~ x)        # run the model predict(model, [98, 99, 100])       # predict y where x is much larger now # Results in something like : [5.1, 5.1, 5.1] # when I'd expect closer to : [196, 198, 200]   I understand that the prediction returned is just going to be something close to the mean value over a set of leaf nodes in the trees (so I'm not looking for an explanation on why this is happening), but this implies that regression tree algorithms are incapable of making good predictions for new feature data far outside the domain seen in training.    Is this true, or are there common ways to account for this and get more reliable out-of-sample predictions for these types of models?

Assume $Y$ is a linear function of a vector of variables $X$ (plus a noise term). The train data consists of ($X,Y$) such that $X \in ［0,1］$. Assume  one use gbdt to learn this linear model. And if the test data consists of ($X,Y$) such that $X \in ［4,5］$. Can the learned gbdt model correctly predict data in test set? The reason is that any node in any tree in gbdt has the form: $x_i > a $ and $x_i <=a$, $a$ is the splitting point of variable $x_i$, and the $X$ in test data has disjoint range with the one in train set, so the gbdt model will not be able to distinguish the $X\in ［0,1］$ in train set and $X \in ［4,5］$ in test set, more specifically, the $X\in ［4,5］$ will lie to the right side of the splitting point and then will predict the same value as the $X$ in the upper part of $［0,1］$, for example, in $［2/3,1］$. As the true model is linear, which means it wil not predict the same value for $X$ in train and test set, resulting that the gbdt will not correctly learn such a model. Is the above reasoning correct?


I have two DateTime vars, beginTime and endTime. I have gotten the difference of them by doing the following:  TimeSpan dateDifference = endTime.Subtract(beginTime);   How can I now return a string of this in hh hrs, mm mins, ss secs format using C#.  If the difference was 00:06:32.4458750  It should return this 00 hrs, 06 mins, 32 secs

What is the recommended way of formatting TimeSpan objects into  a string with a custom format?


At the end of "The Wolverine" Wolverine got his claws cut off, but the bone claws still remained along with his adamantium skeleton. Will his bone claws therefore get coated with adamantium as time passes?

We've discussed Wolverine regenerating his body after nuclear explosions, but his adamantium-laced skeleton was left in tact afterwards.  After Magneto ripped the adamantium from his body, Wolverine has had his bone claws broken and they grew back due to his healing factor.   In , Cyclops was able to break adamantium with his optic blasts.   Assuming his adamantium covered skeleton was broken by something other than  (which inflicts wounds which do not heal), would his body regenerate the adamantium covering as well?


I need to install libgl1-mesa-dev lib on Ubuntu 14.0.4, because  QT 5.5 depends on this lib. I run following command and gets error, How can i fix this error:  $ sudo apt-get install build-essential libgl1-mesa-dev Reading package lists... Done Building dependency tree        Reading state information... Done build-essential is already the newest version. You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies:  libcheese-dev : Depends: libcheese3 (= 3.4.1-0ubuntu2.1) but it is not installable                  Depends: gir1.2-cheese-3.0 (= 3.4.1-0ubuntu2.1) but it is not going to be installed                  Depends: libglib2.0-dev (>= 2.28.0) but it is not going to be installed                  Depends: libclutter-1.0-dev (>= 1.6.1) but it is not going to be installed                  Depends: libgstreamer0.10-dev (>= 0.10.32) but it is not going to be installed                  Depends: libgstreamer-plugins-base0.10-dev (>= 0.10.32) but it is not going to be installed                  Depends: libgdk-pixbuf2.0-dev but it is not going to be installed  libcheese-gtk-dev : Depends: libcheese-gtk21 (= 3.4.0-0ubuntu1) but 3.4.1-0ubuntu2 is to be installed                      Depends: libcheese-dev (= 3.4.0-0ubuntu1) but 3.4.1-0ubuntu2.1 is to be installed                      Depends: libglib2.0-dev (>= 2.28.0) but it is not going to be installed                      Depends: libgtk-3-dev (>= 2.99.4) but it is not going to be installed                      Depends: libgstreamer0.10-dev (>= 0.10.32) but it is not going to be installed                      Depends: libgstreamer-plugins-base0.10-dev (>= 0.10.32) but it is not going to be installed                      Depends: libclutter-gtk-1.0-dev (>= 0.91.8) but it is not going to be installed                      Depends: libcanberra-gtk3-dev (>= 0.26) but it is not going to be installed  libcheese-gtk21 : Depends: libcheese3 (>= 3.3.5) but it is not installable                    Depends: libcogl9 (>= 1.7.4) but it is not installable                    Depends: libmx-1.0-2 (>= 1.2.0) but it is not going to be installed                    Depends: cheese-common (= 3.4.1-0ubuntu2) but 3.10.2-0ubuntu2 is to be installed  libgl1-mesa-dev : Depends: mesa-common-dev (= 10.1.0-4ubuntu5) but 8.0.4-0ubuntu0.6 is to be installed                    Depends: libgl1-mesa-glx (= 10.1.0-4ubuntu5)                    Depends: libx11-xcb-dev but it is not going to be installed                    Depends: libxcb-dri3-dev but it is not going to be installed                    Depends: libxcb-present-dev but it is not going to be installed                    Depends: libxcb-sync-dev but it is not going to be installed                    Depends: libxshmfence-dev but it is not going to be installed                    Depends: libxcb-dri2-0-dev but it is not going to be installed                    Depends: libxcb-glx0-dev but it is not going to be installed                    Depends: libxdamage-dev but it is not going to be installed                    Depends: libxxf86vm-dev but it is not going to be installed                    Depends: x11proto-dri2-dev (>= 2.6) but it is not going to be installed                    Depends: x11proto-gl-dev (>= 1.4.14) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).   Regards, Davit

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


Good morning, What I need to do is, when the client click on a checkbox I need to revert that action in some scenarios but doing this.   $("#foo").attr('checked');  or  $("#foo").attr('checked', 'checked');  or  $("#foo").attr('checked', true);   And looking with the firebug indeed the checked is marked, but still visually does not change, and there´s no check on the component.  Any idea how to make it works

I'd like to do something like this to tick a checkbox using jQuery:  $(".myCheckBox").checked(true);   or  $(".myCheckBox").selected(true);   Does such a thing exist?


I have learnt how the gases of elements are able to absorb only certain wavelengths of EM radiation corresponding to the energy transitions between energy levels of orbitals. Furthermore, these excited electrons are able to fall back to lower energy orbitals to release certain wavelengths of radiation.    I have also learnt that perfect black bodies absorb all wavelengths of radiation and emits radiation and how hot, glowing solids and liquids can be modelled as black bodies. However I don't understand how black bodies are able to absorb all wavelengths of EM radiation.   For example, I can't understand how a piece of hot iron (which can be modelled as a black body) can absorb every single wavelength of EM radiation that falls upon it if only certain energy transitions are allowed by electrons. I understand that there are more transitions possible than just electronic transitions, such as vibrational and rotational transitions. However I don't believe that this is able to result in all wavelengths of EM radiation to be absorbed.  Further, for the same reason I am not sure how black bodies are able to produce a continuous spectrum (emit all wavelengths of light) if only certain energy transitions are allowed.  Note: I am aware a similiar question has already been asked: , however it didn't answer my question.

By conservation of energy, the solid is left in a lower energy state following emission of a photon.  Clearly absorption and emission balance at thermal equilibrium, however, thermodynamic equilibrium is a statement of the mean behaviour of the system, not a statement that the internal energy is constant on arbitrarily short timescales.  The energy has to come from somewhere during emission, and go somewhere during absorption.  Energy in a solid can be stored as kinetic and potential energy of electrons and nuclei, either individually or in collective modes such as phonons and plasmons.  In thermal equilibrium energy will be stored more or less in various forms depending on the temperature and material.  However, even if most of the thermal energy in a particular solid at temperature $T$ is stored in the form of phonons, it could be that phonons primarily interact with light indirectly via electrons, e.g. a phonon excites an electron in a phonon-electron interaction, which can interact with light via the EM field.  Given that light is an EM field, it makes sense to me that it is emitted and absorbed by charged particles.  The electron-photon interaction is probably dominant for visible and ultraviolet light, given that metals are opaque, while semiconductors and insulators are transparent to (visible and UV) light with energy lower than their bandgap. However, once you get into energies in the IR and below, or X-rays and above, other mechanisms apparently take over.  For example, on the high-energy end of the spectrum I've heard that gamma rays can interact directly with nuclear degrees of freedom, which is reasonable considering that gamma rays are emitted during a lot of nuclear reactions.  A review of  might give clues to important light-matter interactions over a broad range of wavelengths.  Whether all of the these processes are involved in blackbody emission is a somewhat different question.  What physical processes mediate energy transfer during blackbody emission, and in which energy ranges are the various processes dominant?


I need help remembering the name of a movie, I've only seen it twice. All I remember was there were US military men, and an invisible alien, I don't believe it was apart of the predator movies. I'm thinking its an old movie, and most the time they were in a forest like area.The alien also had a device to translate his language so the humans could understand him so they could help him find his ship and he could go home. Anyone know of the movie I'm talking about?

I remember a group of people (soldiers?) stuck in a jungle and attacked by two different sorts of aliens. One looked a lot like the Xenomorphs from the Alien movies, very bestial. The other was a humanoid armored creature  like in Predator films which I remember had a jetpack, and might have had a thrown weapon that looked like a fanged frisbee. I distinctly remember the jetpack bit happened on a bridge.  After that, my memory gets very fuzzy right up until the end credits which featured the aliens (both? Maybe just the Xenomorph ones) on a talk show. I vaguely remember TV Tropes mentioning this, and that vague memory suggests it was originally a Swedish movie.  I would have watched it on TV somewhere between 1994 and 1998, possibly on a premium cable channel as I think I watched it while at All State Choir, where they bunked us up in hotels and frequently forgot to shut down the premium channels.  I'm pretty sure that the English title had the word "Alien" in it, and I think it was just a two word title.  Trish Ling clued me in that the talk show bit is from a totally different movie than the first movie, which is the one I was really looking for, so I've struck out those bits.


So yesterday I made a push of my code to a Bitbucket repo. After realizing this was the incorrect repo to push to, I did a git reset --hard to remove the commit. However, after doing that, I noticed that my local files were deleted. Sadly, I did not create a backup of those recent files. Yes, I do have a much older copy of those files. I've explored the .git folder and see that the commit prior to my git reset --hard is there. However, I am not sure how to get to the files within that commit. The .git folder has all of the appropriate folders: hooks, info, logs, objects, refs, as well as the main directory files (ie. HEAD, description, etc). If I do a git fsck --full, I get a few errors: error: HEAD: invalid reflog entry a5564cddeffd7673cf418955f01bec5d4003f630 error: HEAD: invalid reflog entry a5564cddeffd7673cf418955f01bec5d4003f630 error: refs/heads/master: invalid reflog entry a5564cddeffd7673cf418955f01bec5d4    003f630 error: refs/heads/master: invalid reflog entry a5564cddeffd7673cf418955f01bec5d4    003f630 dangling commit 141d684c3fd2d0da2d6df9844bfeea9e976c9b32  I looked in .git/logs/refs/heads/master to identify the commit I need. The line with the one I want is this one: 452f1923ac02bfb1c0930ecfb39d7234db9b6f0f a5564cddeffd7673cf418955f01bec5d4003f630 [username] <email> 1594581184 -0500   commit: Initial commit  Is it even possible to get my files back? And if so, how can I do that? Thank you for any guidance you can provide! I normally back up my files, so this is uncharted territory for me.

Is it possible to undo the changes caused by the following command? If so, how?  git reset --hard HEAD~1


I am updating a reg key via GPO but it fails to update (Still Dont know why, though looking into it). Is there a way to do it via powershell ? I will include this in logon script.  FYI: HKCU\Control Panel\International > iFirstDayOfWeek > 0  Can someone post a script or cmdlt to do so ?  Too complex : "Get-ItemProperty -Path HKCU:\Software\xxxxx*.mydomain.com Uri | %{set-itemproperty -Path $.PSPath Uri -Value ( $.Uri -Replace ".mydomain.com/", ".mynewdomain.com/" )}"

I'm trying to update a set of registry keys, a set of properties need to be updated with a new value based on the old value.  I tried using the following:   Get-ItemProperty -Path HKCU:\Software\xxxxx\*.mydomain.com Uri        | set-itemproperty -Path { $_.PSPath } Uri -Value { $_.Value -Replace ".mydomain.com/", ".mynewdomain.com/" }   But that sets the value of the uri property to: { $_.Value -Replace ".mydomain.com/", ".mynewdomain.com/" }  I tried:   Get-ItemProperty -Path HKCU:\Software\xxxxx\*.mydomain.com Uri        | set-itemproperty -Path { $_.PSPath } Uri -Value ${ $_.Value -Replace ".mydomain.com/", ".mynewdomain.com/" }   And   Get-ItemProperty -Path HKCU:\Software\xxxxx\*.mydomain.com Uri        | set-itemproperty -Path { $_.PSPath } Uri -Value ( $_.Value -Replace ".mydomain.com/", ".mynewdomain.com/" )   But that clears the value.  I want to update multiple registry values in multiple keys with as few lines as possible. I already got it working by exporting the registry, use notepad to search and replace and then re-import the registry entries, but that felt like cheating. I really want to know how I can achieve this using Powershell.  Other things I've tried: $(...), (...), omitting the -Value option you name it :S.  I tried replacing $_.Value with $_.Uri and $_, didn't work either.


I`m having an issue with my ArcMap. Every time I open it the tool bar is really messy, so I always have to start re-organising the tool bar first. Does anyone have an idea of how can I keep it in order without rearranging it every single time I use it?

In ArcMap 9.3, we had issues with our toolbars always stacking up instead of remaining where they were placed.  This was mainly an issue on dual monitor workstations and we would occasionally see the issue on a single monitor workstation.  When we reported the issue to Esri, they said it was a known bug: NIM003161.  I won't have an opportunity to install ArcGIS 10 on a dual monitor workstation for a couple of months and I was wondering what the user experience is when opening saved MXDs on dual (or triple) monitor workstations.    Are toolbars staying put?  I looked up bug #NIM003161 and its status is on-hold and last modified on March 25, 2010 and the version fixed is still blank.  That part worries me a little, but I'm hoping Esri just hasn't gotten around to updating that bug.


Got a semi-small drywall project with several "joints" and just wondering what would happen if I didnt use the tape? (corners and "butt-joints")

Sorry if this is a stupid question, but it doesn't seem immediately obvious how a thin strip of paper tape actually helps the taping process in drywall installation except for perhaps reducing the amount of mud needed between panels. This, from eHow:  Embedded in a layer of drywall joint compound, drywall tape creates a physical bond between adjacent sheets of drywall. Although the bond does not significantly contribute to the structural support of the drywall sheets, the bond reduces the movement and cracking of the sheets.  Wouldn't simply mudding between the joints have the same strength without the tape, albeit requiring more mud?


Let $n$ be a positive integer. Show that the matrix  $$\begin{pmatrix} 1 & 1/2 & 1/3 & \cdots & 1/n \\ 1/2 & 1/3 & 1/4 & \cdots & 1/(n+1) \\ \vdots & \vdots &  \vdots & \ddots & \vdots\\ 1/n & 1/(n+1) & 1/(n+2) & \cdots & 1/(2n-1) \end{pmatrix}$$  is invertible and all the entries of its inverse are integers. This is an exercise in Hoffman and Kunze's linear algebra book. Any hints will be appreciated!

Let $A$ be the $n\times n$ matrix given by $$A_{ij}=\frac{1}{i + j - 1}$$ Show that $A$ is invertible and that the inverse has integer entries.  I was able to show that $A$ is invertible. How do I show that $A^{-1}$ has integer entries? This matrix is called the Hilbert matrix. The problem appears as exercise 12 in section 1.6 of Hoffman and Kunze's Linear Algebra (2nd edition).


I just rebuilt a computer, 512 Mbs of ram,180Gb,Intel Pentium 3,   should i install xubuntu? would it make it any faster?  i would like to use it for basic browsing,homework,All of that mostly online/In the cloud.  Thanks for your answers in advance.

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


I have translated a program from javascript to python 3.9 and I am only missing sorting the result, but I just can't get any further. The list consists of dicts that has an id "components", which is itself a list. recipe.components.sort((a, b) => (a.components ? 1 : 0) - (b.components ? 1 : 0))  If i understood the java code correctly, then all elements (a.components) that are an empty list should be at the beginning and all that have elements in their list should be at the end, but that's the small problem, because you can reverse it with .reverse() anyway. recipe.components = [{     "id": 123,     "components": [{"id": 1, "components": []}] }, {     "id": 124,     "components": [{"id": 2, "components": []}, {"id": 3, "components": []}] }, {     "id": 125,     "components": [] }, {     "id": 126,     "components": [{"id": 1, "components": []}] }]  Does anyone know how to write this most elegantly in Python? --- Edit --- I solved it like this: recipe["components"].sort(key=lambda a: 1 if a.get("components") else 0)

If Python does not have a ternary conditional operator, is it possible to simulate one using other language constructs?


I have to show that for $f: \mathbb{R} \rightarrow\ [0,\infty)$ a measurable function, the function $g: \mathbb{R} \rightarrow \ [0,\infty], \ g(r):=\lambda(\{f>r\})$ is measurable.  I noted that the function $g$ is strictly decreasing, but I don't know how to continue, any suggestions? Thanks!!

Could you guide me how to prove that any monotone function from $R\rightarrow R$ is Borel measurable? Since monotone functions are continuous away from countably many points, would that be helpful in proving the measurability?


by describing my issue, I refer to the following code:   #!/bin/bash #fileName: subMet.sh  cmd="$(ls -l | cat -n)"  echo $cmd   Then, in the script above I used double quotes to assign a value to cmd, because I've read that, in this way, it's possibile to preserve spacing and newline characters, in the output. Anyway it doesn't happen.   Can anyone tell me where I am wrong? More, can anyone tell me how to preserve the spacing and newlines?  I hope I have exposed my issue in a decent way, and I thank you in advance.

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


I have a 8 GB Sandisk USB flash drive. Recently it became write protected somehow. So I searched in Google and I tried to remove the write protection through almost all the methods I found. Unfortunately nothing worked.  So I decided to try some other ways. Some said that flashing the USB flash drive will solve the problem. But I don't know how. So how can it be done ? What I meant by flashing is to repair the USB flash drive by softwaring it again. Or, is there any way to do a factory reset to it ?

When I plug in my USB flash drive, it shows up on my computer as write-protected or read-only. I am unable to transfer data to it, nor can I modify or delete any files already stored on it. I also cannot repartition or reformat the drive using Windows Disk Management, DiskPart, GParted, or other tools. The drive does not have a write-protect switch.  Why did this happen and what can I do about it? Is there a way to remove the write protection?  (Note that this can happen with some memory cards, too, as they often use controllers similar to those used in flash drives. In some cases, the system may report that the drive or card was formatted successfully even though it was never actually formatted; the original data reappears when the device is reinserted.)     This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details.


Given an infinite-dimensional normed vector space M, there exists a linear functional $ f: M \rightarrow K $, where $K$ is the filed of scalars.   I am trying to prove it following the strategy of dealing with finite dimensional basis. Can somebody say how one should procede ?  Thanks.

I'm trying to find a discontinuous linear functional into $\mathbb{R}$ as a prep question for a test. I know that I need an infinite-dimensional Vector Space. Since $\ell_2$ is infinite-dimensional, there must exist a linear functional from $\ell_2$ into $\mathbb{R}$. However, I'm having trouble actually coming up with it.   I believe I'm supposed to find an unbounded function (although I'm not sure why an unbounded function is necessarily not continuous; some light in that regard would be appreciated too), so I thought of using the vectors $e^i$, which have all entries equal to zero, except for the $i$-th one. Then, you can define $f(e^i)=i$.  That'd be unbounded, but I'm not sure if it'd be linear, and even if it is, I'm not sure how to define it for all the other vectors in $\ell_2$.   A friend mentioned that at some point the question of whether the set $E=\{e^i:i\in\mathbb{Z}^+\}$ is a basis would come up, but I'm not sure what a basis has to do with continuity of $f$.   I'm just learning this topic for the first time, so bear with me please.   The space of sequences that are eventually zero (suggested by a few people) turned out to be exactly what I needed.  It also helped to cement the notions of Hamel basis, not continuous, etc.


I would like to make the content overflow, but not the whole page. My issue is that I can't figure out how to make the content height depend on footer (and potential other elements like header) without hard-code how much horizontal space these take. How do I make the content take up as much horizontal space as available, but nothing more, and then overflow the rest? My thinking is that I might be able to do it by simply locking the content height and use @media to create a couple of different heights given different resolutions. Below is a minimal example that I made, where I have the overflow on the whole page. This is not what I want. I would like to have the content to only take up the space that is left after every other element is on the page and then overflow its content (removing overflow on main). Please advice In the example.   body {margin: 0; padding: 0;      } main, footer {color: #ffffff;} main {     background: #000000; } .main {     max-height: 100%; } .content {     background: blue;     overflow-y: auto;     height: auto; } .footer {     background: #616161;      height: 100px;     width: 100%; } .boxes {       background-color: yellow;     width: 95%;     height: 250px;     margin: 5px; }     Main

1

2

3

         Footer

I am working on a web application where I want the content to fill the height of the entire screen.  The page has a header, which contains a logo, and account information. This could be an arbitrary height. I want the content div to fill the rest of the page to the bottom.  I have a header div and a content div. At the moment I am using a table for the layout like so:  CSS and HTML    #page {     height: 100%; width: 100% }  #tdcontent {     height: 100%; }  #content {     overflow: auto; /* or overflow: hidden; */ }

...

...

     The entire height of the page is filled, and no scrolling is required.  For anything inside the content div, setting top: 0; will put it right underneath the header. Sometimes the content will be a real table, with its height set to 100%. Putting header inside content will not allow this to work.  Is there a way to achieve the same effect without using the table?  Update:  Elements inside the content div will have heights set to percentages as well. So something at 100% inside the div will fill it to the bottom. As will two elements at 50%.  Update 2:  For instance, if the header takes up 20% of the screen's height, a table specified at 50% inside #content would take up 40% of the screen space. So far, wrapping the entire thing in a table is the only thing that works.


I am running Ubuntu 16.04 and have a problem with libxcursor1:amd64 which is causing everything to run really slow and not allow packages to be updated.  I have tried apt-get -f install to fix things and got this:  dpkg: error processing package libxcursor1:amd64 (--configure): package is in a very bad inconsistent state; you should reinstall it before attempting configuration Errors were encountered while processing: libxcursor1:amd64 E: Sub-process /usr/bin/dpkg returned an error code (1)   I have tried to force it to remove the package and reinstall it (failed). I have tried going into recovery mode and running it before everything loads, and this failed. Really stuck, as the laptop is unusable.  Thanks, Dom.

I can't update my system because it freezes while installing a third-party update (zramswap-enabler)! Sometimes I get the following message in Update manager:  Could not initialize the package information An unresolvable problem occurred while initializing the package information. Please report this bug against the 'update-manager' package and include the following error message: E:The package zramswap-enabler needs to be reinstalled, but I can't find an archive for it.  I tried to remove the zramswap-enabler, but it's impossible because I get the following message: dpkg: error processing zramswap-enabler (--remove):  Package is in a very bad inconsistent state - you should  reinstall it before attempting a removal. Errors were encountered while processing:  zramswap-enabler E: Sub-process /usr/bin/dpkg returned an error code (1)  Actually I would really reinstall that package, but it is unable to do it! If I remove this third-party PPA then the system is warning me about a very very serious problem. So why can I not install/reinstall/remove/update this package and why freezes the updater if I try to update?


I have recently installed Ubuntu 18.04.2 LTS on my Dell G3 3579 laptop alondside Windows 10. I have my Nvidia GTX 1050(Mobile) preinstalled in Windows 10, but in Ubuntu I only see the Intel UHD grphics. I want to install my GPU in Ubuntu too.

I just ordered the Nvidia GTX card. I have a dilemma, though. Should I keep using the driver which is available in "additional drivers" in Ubuntu, or should I install the driver from the Nvidia site?  So which driver is the best for me?


I would like to draw some iteration levels of the Sierpinski triangle. Lets say I'm ok for Iteration 0-4: line, triangle, first times devided triangle (triforce ;) ), ...  Is there a way to do it like the Koch snowflake?   \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.fractals} \begin{document} \begin{tikzpicture}[decoration=Koch snowflake]      \draw decorate{ decorate{ decorate{ decorate{ (0,0) -- (3,0) }}}}; \end{tikzpicture} \end{document}   I can't find any nice solution in the www.   Further I would like to print only a part of the next lvl. Lets say we have the basic triangle of step 1. In step 2 you will devide the whole triangle in 4 congruent triangles. I would like only to print the next step in the upper part.   (for each Step until 4)   The last mission I am facing: I want to add three curved lines, from each edge of the basic triangle to the right of the triangle and enter some Text. So they shall stop in a neighbourhood of the text. I guess, if I finished the previous step, this one might be pretty easy.   thank you all for reading and helping :)

I have been trying to recreate the following image in LaTeX    and for me personally it has to be done with pdflatex. Although answers using pst-fractals From Jake I got a good start which led to the following code  \documentclass{standalone} \usepackage{tikz} \def\level{5} \usetikzlibrary{lindenmayersystems}  \begin{document} \begin{tikzpicture}[l-system={step=5pt, order=\level, angle=120},rotate=180]     \pgfdeclarelindenmayersystem{Sierpinski triangle}{     \symbol{X}{\pgflsystemdrawforward}     \symbol{Y}{\pgflsystemdrawforward}     \rule{X -> X-Y+X+Y-X}     \rule{Y -> YY}     }     \draw [black] (3,2) l-system     [l-system={Sierpinski triangle, axiom=X, anchor=north east},fill=white]; \end{tikzpicture}  \end{document}   There are however two problems with the code.   I layer a black triangle behind the lindenmayersystem? How do I keep the size of the triangle consistent with different number of recursion levels.


I'm trying to find integer solutions to $$a^2+b^2=c^2+d^2$$  with values  $a> c > d > b>0$  Or in other words, two triangles with integer legs and equal hypotenuse lengths, not necessarily integer. Seems like a Diophantine equation to me, but I only learned how to solve Diophantine equations in the form of Pell's equations. I couldn't find anything on this equation when I checked Wikipedia. It is similar to a Pythagorean quadruple, although not quite, so that's not helpful either. How do I find integer solutions to this?

I was reasonably certain I've seen this before, but I was wondering how to solve the Diophantine equation  $$a^2+b^2=c^2+d^2$$  I tried a web search and found nothing on this one.  I'm trying to avoid another library trip to a less than local library (maybe I should have taken better notes on that chapter...).  I'm not quite sure how to handle this one.  The only thing I can figure out with this equation, if I remember correctly, is that the sum on either side may only contain prime factors of 2 or odd primes congruent to 1 mod 4.  And if I don't want a and b equal to c and d, the sum can't be prime as I believe a prime congruent to 1 mod 4 can be represented as the sum of 2 squares in exactly one way.  But that doesn't give me any insight into actually solving this problem.


I'm using Name based Virtual Hosts on ports 80 and 443.  Some of the virtual hosts only support port 80.  I don't have, and won't be getting certificates for these hostnames.  How can I configure apache to refuse a connection on port 443 to one of the host names?  Eg:  supportsboth.example.com  has a certificate, can listen on port 80 and port 443  httponly.example.org does not have a certificate, should be available via regular HTTP only.  The apache configuration has a virtualhost setting entry for supportsboth.example.com on port 443 only.  Trying to connect to httponly.example.com on port 443 makes Apache use the supportsboth.example.com virtual host's certificate and details.  This makes the browser report lots of certificate errors as the host names don't match, and if the user decides to proceed anyway, it still ends up at the wrong site.  What I'd ideally like is a redirect to the HTTP site, but I imagine that would rely on having a valid certificate.  My second preference is to simply refuse the connection.  Micheal's answer below of putting the SSL capable names on a separate IP is not available to me as both the domains have already been configured to use the same IP and I'm not in a position to change them.

I hope that title is clear.  How do I prevent HTTPS requests for non-ssl-enabled virtual hosts from going to the first ssl-enabled virtualhost (setup is Apache-SNI).  For example, using my abbreviated config below, requests for https://example.com (a non-ssl vhost) are being served by Apache at the ssl-enabled vhost https://example.org. I'd like to disable that behavior and possibly reply with the appropriate HTTP response code (unsure of what that is).  It may not even be possible, but I thought I'd ask.  # I actually have a SNI setup, but it's not demonstrated here. # I don't think it's relevant in this situation.  NameVirtualHost *:80 NameVirtualHost *:443  <VirtualHost *:80>     ServerName example.org </VirtualHost>  <VirtualHost *:443>     ServerName example.org </VirtualHost>  <VirtualHost *:80>     ServerName example.com </VirtualHost>   EDIT: Maybe a mod_rewrite rule in the first ssl-vhost?


First I installed fish and then I wanted to test zsh so I installed it. Actually I'm using zsh and it works perfect (at the moment): I can switch themes, enable plugins, etc...  But when I do:   echo $SHELL   it should return /bin/zsh, and by surprise it returns /usr/bin/fish  I'm using Kubuntu 14.04. Is it ok, or should I fix it?

I am using 'zsh' by default.  But when I am in my zsh shell, I enter 'bash' to switch to bash, why the $SHELL variable does not change?  Can I make screen to use whatever shell I right before execute the 'screen' command?  zsh % screen <the shell is zsh>  zsh % bash bash $ screen <the shell is still bash, can I make screen to automatically start bash here>


I'm new to C++ and working on a simple project. Basically where I'm encountering a problem is creating a file with a number (int) in the file name. As I see it,I have to first convert the int to a string (or char array) and then concatenate this new string with the rest of the file name.  Here is my code so far that fails to compile:  int n; //int to include in filename char buffer [33]; itoa(n, buffer, 10); string nStr = string(buffer);  ofstream resultsFile; resultsFile.open(string("File - ") + nStr + string(".txt"));   This gives a couple compilation errors (compiling in Linux):    itoa not declared in this scope  no matching function for call to ‘std::basic_ofstream char, std::char_traits char ::open(std::basic_string char, std::char_traits char , std::allocator char )’   I've tried the advice here:  and here:  with no luck.  If I using the to_string method, I end up with the error "to_string not a member of std".

I thought this would be really simple, but it's presenting some difficulties. If I have std::string name = "John"; int age = 21;  How do I combine them to get a single string "John21"?


I'm reading first year Physics and the Young & Freedman (13e) text describes how to find the vector (cross) product. Notably, the authors simplify the description of finding the product direction with the right hand rule which I've previously seen used to explain the direction of EM force from a wire with current flowing through it (I think?)   The decision here sounds almost arbitrary     There are always two directions perpendicular to a given plane, one on each side of the plane. We choose which of these the direction of ${\mathrm{\overrightarrow{A}}}$ ${\mathrm{\times}}$ ${\mathrm{\overrightarrow{B}}}$ as follows. Imagine rotating vector ${\mathrm{\overrightarrow{A}}}$ about the perpendicular line until it is aligned with ${\mathrm{\overrightarrow{B}}}$, choosing the smaller of the two possible possible angles between ${\mathrm{\overrightarrow{A}}}$ and ${\mathrm{\overrightarrow{B}}}$. Curl the fingers of your right hand around the perpendicular line so that the fingertips point in the direction of rotation; your thumb will then point in the direction of ${\mathrm{\overrightarrow{A}}}$ ${\mathrm{\times}}$ ${\mathrm{\overrightarrow{B}}}$.   Then on the next page,     We see that there are two kinds of coordinate systems, differing in the signs of the vector products of unit vectors. An axis system in which ${\mathcal{\hat{i}}}$ ${\mathrm{\times}}$ ${\mathcal{\hat{j}}}$ = ${\mathcal{\hat{k}}}$, as in [the example] is called a right-handed system. The usual practice is to use only right-handed systems, and we will follow that practice throughout this book.   Now I'm wondering what I'm not being told about and what the significance is? I understand that most of the students reading the book probably don't know enough linear algebra to understand complex derivations of this choice but it's also kind of frustrating not to know any more than the simplified version... Can anyone enlighten me?

$\mathbf{a}\times \mathbf{b}$ follows the right hand rule? Why not left hand rule? Why is it $a b \sin (x)$ times the perpendicular vector?  Why is $\sin (x)$ used with the vectors but $\cos(x)$ is a scalar product?   So why is cross product defined in the way that it is? I am mainly interested in the right hand rule defintion too as it is out of reach?


I want to count the time, how long all my task will work. But my variable timeElapsed is always 1. Why? Here is my code: public class Main {     public static void main(String[] args) {         long start = System.currentTimeMillis();         for(String arg : args){             new Thread(() -> {               /* ... */         }).start();         }         long finish = System.currentTimeMillis();         long timeElapsed = finish - start; //always is 1         System.out.println("Elapsed time: " + timeElapsed);       } }

Accuracy Vs. Precision  What I would like to know is whether I should use System.currentTimeMillis() or System.nanoTime() when updating my object's positions in my game?  Their change in movement is directly proportional to the elapsed time since the last call and I want to be as precise as possible.  I've read that there are some serious time-resolution issues between different operating systems (namely that Mac / Linux have an almost 1 ms resolution while Windows has a  50ms resolution??).  I'm primarly running my apps on windows and 50ms resolution seems pretty inaccurate.  Are there better options than the two I listed?  Any suggestions / comments?


This question is based off the end of the very first Star Trek Movie, so I will ask it in spoilers in the odd case that you haven't seen it yet.      At the end of the movie Kirk asked Bones and Spock if they had just witnessed the making/creation of a new species.  during the Movie they gathered that the Voyager Satellite/probe had possibly gone through a worm hole that took it to the other side of the universe and possibly through time.  So my thoughts are that the merged species disappeared possibly through time.     could this theoretically have been the beginning of the Q?

In the Star Trek Universe where did the Q come from? I mean before they were Q in the Q Continuum? In Star Trek Voyager you learn that the race is somewhat intolerant of individualism (in the episode of the Q Civil War) but Q also suggest they have always been Q. Is that statement true, have the Q always been the Q? or were they a race that evolved into omniscience?


I want to resize images to a fixed resolution (540x540 or 640x640). my source image sizes vary from 320x320 to 720x720. Can someone give a solution for resizing these images? I'm using PHP with GD  Thank you.

What's the most efficient way to resize large images in PHP?  I'm currently using the  function imagecopyresampled to take high resolution images, and cleanly resize them down to a size for web viewing (roughly 700 pixels wide by 700 pixels tall).  This works great on small (under 2 MB) photos and the entire resize operation takes less than a second on the server. However, the site will eventually service photographers who may be uploading images up to 10 MB in size (or images up to 5000x4000 pixels in size).  Doing this kind of resize operation with large images tends to increase the memory usage by a very large margin (larger images can spike the memory usage for the script past 80 MB). Is there any way to make this resize operation more efficient? Should I be using an alternate image library such as ?  Right now, the resize code looks something like this  function makeThumbnail($sourcefile, $endfile, $thumbwidth, $thumbheight, $quality) {     // Takes the sourcefile (path/to/image.jpg) and makes a thumbnail from it     // and places it at endfile (path/to/thumb.jpg).      // Load image and get image size.     $img = imagecreatefromjpeg($sourcefile);     $width = imagesx( $img );     $height = imagesy( $img );      if ($width > $height) {         $newwidth = $thumbwidth;         $divisor = $width / $thumbwidth;         $newheight = floor( $height / $divisor);     } else {         $newheight = $thumbheight;         $divisor = $height / $thumbheight;         $newwidth = floor( $width / $divisor );     }      // Create a new temporary image.     $tmpimg = imagecreatetruecolor( $newwidth, $newheight );      // Copy and resize old image into new image.     imagecopyresampled( $tmpimg, $img, 0, 0, 0, 0, $newwidth, $newheight, $width, $height );      // Save thumbnail into a file.     imagejpeg( $tmpimg, $endfile, $quality);      // release the memory     imagedestroy($tmpimg);     imagedestroy($img);


I know there are two cases here: $𝜙 ≥ 0.5$  and $𝜙 < 0.5$.  Please help. Thanks.

I'm doing some exercises on Apostol's calculus, on the floor function. Now, he doesn't give an explicit definition of $[x]$, so I'm going with this one:     DEFINITION Given  $x\in \Bbb R$, the integer part of $x$ is the unique $z\in \Bbb Z$ such that $$z\leq x < z+1$$ and we denote it by $[x]$.   Now he asks to prove some basic things about it, such as: if $n\in \Bbb Z$, then $[x+n]=[x]+n$  So I proved it like this: Let $z=[x+n]$ and $z'=[x]$. Then we have that  $$z\leq x+n<z+1$$  $$z'\leq x<z'+1$$  Then $$z'+n\leq x+n<z'+n+1$$  But since $z'$ is an integer, so is $z'+n$. Since $z$ is unique, it must be that $z'+n=z$.  However, this doesn't seem to get me anywhere to prove that  $$\left[ {2x} \right] = \left[ x \right] + \left[ {x + \frac{1}{2}} \right]$$  in and in general that   $$\left[ {nx} \right] = \sum\limits_{k = 0}^{n - 1} {\left[ {x + \frac{k}{n}} \right]} $$  Obviously one could do an informal proof thinking about "the carries", but that's not the idea, let alone how tedious it would be. Maybe there is some easier or clearer characterization of $[x]$ in terms of $x$ to work this out.  Another property is $$[-x]=\begin{cases}-[x]\text{ ; if }x\in \Bbb Z \cr-[x]-1 \text{ ; otherwise}\end{cases}$$  I argue: if $x\in\Bbb Z$, it is clear $[x]=x$. Then $-[x]=-x$, and $-[x]\in \Bbb Z$ so $[-[x]]=-[x]=[-x]$. For the other, I guess one could say:  $$n \leqslant x < n + 1 \Rightarrow  - n - 1 < x \leqslant -n$$  and since $x$ is not an integer, this should be the same as $$ - n - 1 \leqslant -x < -n$$  $$ - n - 1 \leqslant -x < (-n-1)+1$$  So $[-x]=-[x]-1$


Let $E$ - be a complex (or real) vector space. Is it always possible to find a Hausdorff locally convex topology $\mathcal{T}$ on $E$ such that $(E, \mathcal{T})$ is separable?  The motivation goes from this question . While answering on that I had to note that not all vector spaces possess a metric in which they are separable. Now I wonder if the same thing works without metrizability.  It seems to me that separability makes some constraint to the cardinality of $E$ or its algebraic basis (also called Hamel basis). I can prove that if $E$ possesses a metrizable topology such that $E$ is separable then $E$ is not larger than continuum. But for arbitrary topology there is an issue with the cardinality of local base of $E$. Also I can't imagine a general construction that gives a topology $\mathcal{T}$ if it is possible for all vector spaces.  Assume that such topology exists. If we consider a local base $U_\alpha$ where $\alpha \in I$ then there is an injective map from $E$ to $2^{S \times I}$ where $S$ is a dense set. This function maps $x \in E$ to a subset $\{(s,\alpha): x \in s + U_\alpha\} \subset S \times I\}$. It is injective since $S$ is dense and $E$ is Hausdorff. Then cardinality of $S \times I$ equals cardinality of $I$ since $S$ is supposed to be countable. Therefore $E$ is not greater then $2^I$. For simple case of metrizable spaces (for which I is countable) it gives that $E$ is not greater then continuum. But in general I don't know how to estimate cardinality of $I$.

It is just an idea (might be wrong) but, i think that if a Hausdorff space, say $X$, contains too many elements, then a countable subset cannot be dense in it.  Does there exist a cardinality that any space with that (or bigger) cardinality cannot have a countable dense subset?  Thanks.


I am trying to see the relationship between two variables (say A and B) in a plot in RStudio. Both are discrete and range from 1 to 10. However, I have 1000s of data points, so given that there are only 100 possible spaces in which there can be a point, almost every possible place on a graph has a point. How can I represent 1000s of points on a plot like this, whilst being able to see how many are at each point too?

What is an appropriate graph to illustrate the relationship between two ordinal variables?  A few options I can think of:   Scatter plot with added random jitter to stop points hiding each other. Apparently a standard graphic - Minitab calls this an "individual values plot". In my opinion it may be misleading as it visually encourages a kind of linear interpolation between ordinal levels, as if the data were from an interval scale. Scatter plot adapted so that size (area) of point represents frequency of that combination of levels, rather than drawing one point for each sampling unit. I have occasionally seen such plots in practice. They can be hard to read, but the points lie on a regularly-spaced lattice which somewhat overcomes the criticism of the jittered scatter plot that it visually "intervalises" the data. Particularly if one of the variables is treated as dependent, a box plot grouped by the levels of the independent variable. Likely to look terrible if the number of levels of the dependent variable is not sufficiently high (very "flat" with missing whiskers or even worse collapsed quartiles which makes visual identification of median impossible), but at least draws attention to median and quartiles which are relevant descriptive statistics for an ordinal variable. Table of values or blank grid of cells with heat map to indicate frequency. Visually different but conceptually similar to the scatter plot with point area showing frequency.   Are there other ideas, or thoughts on which plots are preferable? Are there any fields of research in which certain ordinal-vs-ordinal plots are regarded as standard? (I seem to recall frequency heatmap being widespread in genomics but suspect that is more often for nominal-vs-nominal.) Suggestions for a good standard reference would also be very welcome, I am guessing something from Agresti.  If anyone wants to illustrate with a plot, R code for bogus sample data follows.  "How important is exercise to you?" 1 = not at all important, 2 = somewhat unimportant, 3 = neither important nor unimportant, 4 = somewhat important, 5 = very important.  "How regularly do you take a run of 10 minutes or longer?" 1 = never, 2 = less than once per fortnight, 3 = once every one or two weeks, 4 = two or three times per week, 5 = four or more times per week.  If it  would be natural to treat "often" as a dependent variable and "importance" as an independent variable, if a plot distinguishes between the two.  importance <- rep(1:5, times = c(30, 42, 75, 93, 60)) often <- c(rep(1:5, times = c(15, 07, 04, 03, 01)), #n=30, importance 1            rep(1:5, times = c(10, 14, 12, 03, 03)), #n=42, importance 2            rep(1:5, times = c(12, 23, 20, 13, 07)), #n=75, importance 3            rep(1:5, times = c(16, 14, 20, 30, 13)), #n=93, importance 4            rep(1:5, times = c(12, 06, 11, 17, 14))) #n=60, importance 5 running.df <- data.frame(importance, often) cor.test(often, importance, method = "kendall") #positive concordance plot(running.df) #currently useless   A related question for continuous variables I found helpful, maybe a useful starting point:


I have been given that $(a,b)=1$. I need to prove that $(a+b,a^2-ab+b^2)=1$ or $3$. I am not able to reduce the expressions $a+b$ and $a^2-ab+b^2$ in a way that I could reach the proof of the given proposition. Any help would be appreciated.

If $\gcd(a, b) = 1$ then prove that $\gcd(a+b, a^2-ab+b^2) = 1$ or $3$?  I am shamelessly asking how to solve the problem? I have no idea how to start and solve. Please help.


I used the command wget to download chrome then used alien to install it. is there a way for me to uninstall it using either commands? the .deb file is ./google-chrome*.deb

I'm having a problem with Chrome and one of its extensions, so I want to completely uninstall everything. I've uninstalled Chrome through the Software Center, but when I reinstall it, all of my extensions and preferences are still there.   If I want to start over from scratch, what do I need to do?


My /var is full and need to extend its size. I tried different ways but could not succeed. Cent os 7 with two 1 TB HDD RAID 1 Configured. I have added 2 TB HDD to add space for /var.  **# output for fdisk -l**  Disk /dev/sda: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk label type: dos Disk identifier: 0x00023fda     Device Boot      Start         End      Blocks   Id  System /dev/sda1   *        2048     2101247     1049600   fd  Linux raid autodetect /dev/sda2         2101248   393244671   195571712   fd  Linux raid autodetect  Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes, 1953525168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk label type: dos Disk identifier: 0x0006cf87     Device Boot      Start         End      Blocks   Id  System /dev/sdc1   *        2048     2101247     1049600   fd  Linux raid autodetect /dev/sdc2         2101248   393244671   195571712   fd  Linux raid autodetect  Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes, 3907029168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes   Disk /dev/md127: 1074 MB, 1074724864 bytes, 2099072 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes   Disk /dev/md126: 200.1 GB, 200131215360 bytes, 390881280 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes   Disk /dev/mapper/centos-root: 200.1 GB, 200085078016 bytes, 390791168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes   Disk /dev/mapper/centos-swap: 41 MB, 41943040 bytes, 81920 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes  **# df -h** Filesystem               Size  Used Avail Use% Mounted on /dev/mapper/centos-root  184G  174G     0 100% / devtmpfs                 1.8G     0  1.8G   0% /dev tmpfs                    1.9G     0  1.9G   0% /dev/shm tmpfs                    1.9G  8.5M  1.8G   1% /run tmpfs                    1.9G     0  1.9G   0% /sys/fs/cgroup /dev/md127               976M  145M  764M  16% /boot tmpfs                    370M     0  370M   0% /run/user/0

I currently only have remote access to this CentOS box, I need to move /var form the primary RAID to a new set of disks that was installed with more space, My current thoughts on how to accomplish this is to temporarily mount the new RAID to /tmp/var. rsync everything from /var to /temp/var then modify the fstab to point /var at the new disks.  Here is my question. how do I delete the existing /var on the primary disks once I have the new disks mounted to that location (assuming this is even possible remotely)?


I just var_dump(false==0) it outputs bool(true)   Why false== 0 is true.I know true==1 is true Because  if i  echo true; It will output 1 so numeric value of true is 1,    But numeric value of false is not 0, because when i echo false;  It display nothing(empty), So how can false has same value as 0 AS we know == operator compares the values , if they same it will return true, and if their values is not same it will return false , so in the case of false==0  It should be false.  Any idea ?

What is the difference between == and ===?  How exactly does the loosely == comparison work? How exactly does the strict === comparison work?  What would be some useful examples?


What if I I get the visit visa to UAE and use my Indian passport to travel out of India and enter UAE. From  UAE I will use my Portuguese passport going out of UAE and entering UK. 1) will I be allowed to exit India and enter UAE after obtaining Portuguese passport as IWill have 2 passports in my hand? 2) will UAE immigration allow me to enter on Indian passport and use Portuguese passport which will not have entry stamp to go out of UAE?

I am a citizen of two different countries, and have two passports.  How should I use my passports when traveling?


We all know that the moon somehow triggers the effect to cause a transformation. On that note, what is it about the moon?  Is it the light?    If that's the case will a total lunar eclipse mess up the transformation since he (Lupin) is no longer receiving the correct dosage of energy as the moon goes through all its phases very fast? Totality lasts about 20 minutes when the moon goes to a blood red color (which is due to atmosphere saturation).

In most fiction I've read or encountered, the change occurs as a simple consequence of the lunar cycle. Though from what I know of Harry Potter, the change that takes place is due to sighting the full moon (as occurs in the third movie, Prisoner of Azkaban) where the gang, plus Lupin, Severus, Sirius and Pettigrew emerge from the Whomping Willow and upon sighting the full moon he begins to change.  Is this the trigger for werewolves in the Potterverse? If not, why did he (Lupin as an example, though for any werewolf in general) not change whilst in the shrieking shack that night?  Edit: This  addresses Lupin's change but I'm after more general information about werewolves.


I regularly have to delete a local and remote  branch. Therefore, I run the following commands:  $ git branch -d feature-branch $ git push --delete origin feature-branch   Since I mostly execute these two commands in a row, I would like to create an alias for them. Here is my approach:  alias gpdo='git branch -d $1 && git push --delete origin $1   However, this fails with the following error:     fatal: branch name required

For bash script, I can use "$@" to access arguments. What's the equivalent when I use an alias?


I implemented the Strauss model with the metalness, transparency and smoothness parameters, taking the formulas from the book "Programming vertex geometry and pixel shaders", this is how I implemented it:    float fresnel(float x) {     float Kf= 1.12;     float result= 1.0/pow(x-Kf,2.0) - 1.0/(Kf*Kf);     result/= 1.0/pow(1.0-Kf,2.0) - 1.0/(Kf*Kf);     return result; }  float shadow(float x) {     float Ks= 1.01;     float result= 1.0/pow(1.0-Ks,2.0) - 1.0/pow(x-Ks,2.0);     result/= 1.0/pow(1.0-Ks,2.0) - 1.0/(Ks*Ks);     return result; }  vec4 Strauss(vec3 L, vec3 N, vec3 V, float smoothness, float metalness, float transparency)  {     vec3 H= reflect(L,N);     float HdotV= max(dot(H,V),0.0);     float NdotL= max(dot(N,L),0.0);     float NdotV= max(dot(N,V),0.0);     float k=0.1;      // Diffuse component     vec3 diffuse= NdotL * (1.0 - metalness * smoothness) * (1.0 - pow(smoothness,3.0)) * (1.0 - transparency) * vec3(materialDiffuse);      // Specular component     float r= (1.0-transparency) - (1.0 - pow(smoothness,3.0)) * (1.0 - transparency);     float j= fresnel(NdotL) * shadow(NdotL) * shadow(NdotV);     float reflect= min(1.0,r+j * (r+k));     vec3 C1= vec3(1.0,1.0,1.0);     vec3 Cs= C1 + metalness * (1.0 - fresnel(NdotL)) * (vec3(materialSpecular) - C1);     vec3 specular= pow(-HdotV, 3.0/(1.0-smoothness)) * reflect * Cs;      return max(lightDiffuse * vec4(diffuse,1.0) ,0.0) + max(lightSpecular * vec4(specular,1.0), 0.0); }   The parameters metalness, smoothness and transparency are uniforms. I try to vary them, but I cannot get something similar to this result:      This is what I get with roughness 0.9, transparency 0.1 and metalness 0.1 :      It is practically equal to a lambert shader! I tried a lot of parameters combination, but I never get a shiny teapot like it should be. I also debugged the shader, and it seems like the specular component is zero in many parts of the teapot. I tried to add an if that makes look red all the areas where the specular component is zero, that's the result:      I checked many times the formulas and the implementation, and it seems like I've done all correctly. What's the problem?

I'm trying to implement the Ward shading model, the anisotropic, computationally efficient version:       This is how I made it:    float alphaX=0.5, alphaY=0.5; // asinotropic roughness float minFloat= 1.e-6;   vec4 Ward(vec3 L, vec3 N, vec3 V) {     vec3 H= normalize(L+V);     float NdotL= max(dot(N,L),0.0);     float NdotV= max(dot(N,V),0.0);      vec3 e= vec3(1.0,0.0,0.0);     vec3 T= normalize(cross(N,e));     vec3 B= normalize(cross(N,T));     float HdotT= max(dot(H,T),0.0);     float HdotB= max(dot(H,B),0.0);     float HdotN= max(dot(H,N),0.0);      float beta= -2.0 * ( pow(HdotN/alphaX, 2.0) + pow(HdotB/alphaY,2.0) ) / (1.0 + HdotN);     float den= max(minFloat, 4.0 * pi * alphaX * alphaY * sqrt(NdotL * NdotV) );     vec4 specular= Ps * 1.0/den * exp(beta);     return (Pd + specular) * NdotL; }   But I get a result similar to a lambertian surface or Oren-Nayar model, where the specular component is absent:


My DM is open to odd characters and is letting me play a true lycanthropy weretiger in DnD 5e. We went over the entry in the monster manual for  and decided what modifications should be made.  He told me to include the multiattack feature and I believe to ignore the specificity of weapons (though I'm sure exclusions should still apply to say 2 handed melee weapons and heavy weapons). He was fully aware that I would be playing the warlock class and taking the pact of the blade.  My question is, if I take the Eldritch invocation , will that stack with multiattack?     You can attack with your pact weapon twice, instead of once, whenever you take the Attack action on your turn.   If so, will I attack twice for both of those attacks giving me 4 physical attacks per turn at times?

Assume the character build Any Monk 5/Moon Druid 2, wildshaped into a Brown Bear:  On their turn, can they use their attack action twice to multiattack?


I read in a book (Fundamentals of Mechanics by IE Irodov) that  do not obey newton's third law. I am unable to imagine and get this in my mind. It states:     "Inertial forces are not caused by the interaction of bodies but by the properties of non inertial refrence frames themselves. Therefore inertial forces do not obey Newton's third law of motion."   Now I am having a hard time understanding and believing the sentence. Why is this true?

While reviewing Newton's laws of motion I came across the statement which says Newton's laws exist only in inertial reference frames except the third one. Why is it like that?


I'm a bit stumped as to why this isn't firing. It's supposed to work when a User Lookup field called ISR_Owner__c on a User record is updated it will try to find all Leads owner by that User. It will then assign the Leads ISR_Owner__c field to the User's ISR_Owner__c. It's currently just doing nothing, no errors just not working. Any insight into what could be going wrong here?  Trigger:      trigger MasterUserTrigger on User (   before insert, after insert,    before update, after update,    before delete, after delete,   after undelete) {    if (Trigger.isBefore) {     if (Trigger.isInsert) {       }      if (Trigger.isUpdate) {     isrLeadSync ISRToSync = new isrLeadSync(Trigger.new);         ISRToSync.syncISRs();             }     if (Trigger.isDelete) {      }   }    if (Trigger.IsAfter) {     if (Trigger.isInsert) {      }      if (Trigger.isUpdate) {      }     if (Trigger.isDelete) {      }     if (Trigger.isUndelete){        }   } }   Class:  public class isrLeadSync {      List<User> users;      public isrLeadSync(List<User> triggerUser){         users = triggerUser;     }      public void syncISRs(){         for (User u : users){         if(u.ISR_Owner__c != null && u.ISR_Owner__r.IsActive){             List<Lead> leadList = [SELECT Id, ISR_Owner__c                                       FROM Lead                                       WHERE OwnerId = : u.Id                                       AND ISR_Owner__c != : u.ISR_Owner__c];             for(Lead l : leadList){             l.ISR_Owner__c = u.ISR_Owner__c;         }          update leadList;         }          } } }

I need to access the value from a roll-up field on my Opportunities, from it's related Opportunity Product.  When I use oli.Opportunity.Software_Line_Item__c the value retrieved is always null.  So I've also tried oli.OpportunityId.Software_Line_Item__c which causes an error in the compiler     Invalid foreign key relationship: OpportunityLineItem.OpportunityId   & just to make sure that it's not the roll-up field calculation that's not working as expected, I've tested oli.Opportunity.Name which is also returning null.  I know this is basic but I don't have Eclipse installed so I can't check the correct reference to use. Could someone please let me know how I can navigate this relationship, to retrieve the value from the Software_Line_Item__c field?


I only know how to prove it use Fourier series. $$\ln(\sin{x})=-\ln2-\sum_{k=1}^{\infty}\frac{\cos(2kx)}{k}$$

I saw the two identities  $$ -\log(\sin(x))=\sum_{k=1}^\infty\frac{\cos(2kx)}{k}+\log(2) $$ and $$ -\log(\cos(x))=\sum_{k=1}^\infty(-1)^k\frac{\cos(2kx)}{k}+\log(2) $$ here: .  How can one prove these two identities?


when I try to apt-get update I'm getting the below error,  E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/lib/apt/lists/

I get this error when trying to use apt-get:  E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?     How can I fix this?


The development team will release new epic after 30 days, today is day 1 and they did not provide any deliverables.  What should a QA Engineer do to assure high quality?

If there is an Epic to be delivered in 30 days but the developers have not provided any deliverable and it's already day 1, how can testers ensure timely and high-quality delivery? What steps should testers take to ensure a timely and high quality delivery?


I have images taken in RAW on my Nikon D3400 and Photoshop CS 5.1 won't read them. I downloaded both the version of Adobe Camera RAW for Photoshop CS5 and the new updated version and also the DNG converter. It still won't open. When opening in Photoshop, it says the file is from a  camera model not supported by Camera RAW.

I am a beginner photographer with a Canon 7d and MacBook Pro. I'm not sure if Adobe camera Raw is compatible with either and really need advice on how to go about downloading the correct version.


I'm specifically talking about this question . A couple of people have said this should be closed because it:     Questions concerning problems with code you've written must describe   the specific problem — and include valid code to reproduce it   Now the question does not provide any useful code for this, but the fiddle does. Is an off site resource (like a fiddle) adequate enough to "describe the specific problem"? Or should the user be encouraged to put the code (or at least some of it) into the question?  My concern is that this won't be searchable going forward and will become un-useful to future users, but at the same time, questions that just dump code onto a page are generally a pain to answer.  So I'd prefer to answer this question but does it prove unhelpful to future visitors?

It's extremely common for people to ask and answer questions with no code other than a link to  or similar service. These of course are not appropriate. I have personally been unable to access jsfiddle for hours due to the site being down while browsing Stack Overflow.   In an effort to help educate people on why this is a bad idea and at the same time improve posts on SO, I suggest some measures be put in place to prevent it from happening.  For example, if the question or answer has:   A link to , , or any other site in a specified list (but let's be realisitic, the one that really matters the most is jsfiddle) No formatted code   ...prevent it from being posted, with a message or link explaining why. There may be edge cases where it does make sense, so perhaps we'd need to allow the user to click through the message and post anyways, but at least they will have been warned/educated.  If we need to discuss whether or not "link only, no code" posts are problematic and not appropriate, then so be it - but I think it's obvious and that topic has been well covered. Is there anything we can do to prevent them and encourage people to put their code in their post?  This issue is very specific to jsfiddle, I would like to see something that directly addresses that. If another site becomes the defacto code demo site, then we can cross that bridge when we get to it or look for more general solutions to this ever growing problem. I think that awareness of the issue is key to preventing it, and people don't read the FAQ nearly enough as it is - we need some direct intervention.  According to the owner/creator of jsfiddle, Stack Overflow makes up . That's a huge amount. Sure they aren't all "link only" posts, but I want to emphasize how much SO is using jsfiddle in particular to dump their code.  People aren't doing this to harm the site, the usually think they are helping out by making their post easier to read. They need to understand why this is actually a problem, and why relevant code must be posted on the site, not somewhere else. If more people understood, I think the problem would start to go away on it's own - but we'd still need something to deal with newer users who aren't familiar with the rules and goals of SO and Stack Exchange, don't hang out in meta, don't read the FAQ, etc. However, the less examples of jsfiddle-link-only posts there are, the less people will imitate them.  I honestly think that if people understood the problem more, it wouldn't be as much of an issue. This doesn't mean blocking jsfiddle, but preventing posts that rely on links to it. A lot of people are confused about that, and ask me "Since when is jsfiddle not allowed?". It's allowed, but your post should hold up without the link. People need to understand that - a warning message would probably be enough.  I do not feel that this specific issue is "status-completed". I think it's still a major problem that's bound to get worse as the months and years go by.  Here are some examples from the past few hours, as of 2012/10/17 6:45 PM EST:                   Here are some more from this morning, 7:30 AM 2012/10/18 (all questions, all within the last couple of hours). I could have easily found a lot more but it was getting boring:                   These were ridiculously easy to find (took me about 3-4 minutes). I don't think the recent change has done very much to help the situatuion. There are literally entire threads on SO that are just passing jsfiddle links back and forth, and it's been like that for a long time - and bound to continue unless something is done to address this specific issue.


I'm struggling using the APA citation style, and would like to see in text citations in the form (Author, Date) in the text, but I either get an error compiling or {labelyear}{labelmonth} after every citation in my console.   Here is the top matter in my latex document... am I missing something/using contradicting packages?  Here is the code snippet.  \documentclass[11pt]{report} % Use the report document class if you're looking to include chapters, otherwise article is fine \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage{csquotes} %packages allowing for images to be inserted  \usepackage{graphicx} \usepackage{floatrow} \graphicspath{ {thesisimages/} } %packages for formatting Figures  \usepackage[font=scriptsize]{caption} \usepackage{mwe} %packages pertaining to the bibliography  \usepackage[backend=biber,style=apa]{biblatex} \addbibresource{thesisbib.bib}  %packages pertaining to formatting \linespread{1.6} \usepackage[a4paper, total={6.5in,9in}]{geometry} %package for the degree symbol \usepackage{gensymb} %package for making subFigures(below) \usepackage{subfig} %package for including quotes (below) \usepackage{dirtytalk} \usepackage{tabularx} \usepackage{array} %package for changing the line spacing in bibliography \usepackage{lipsum} \usepackage{setspace} %package for including pdf packages \usepackage{pdfpages} %package for appendices? \usepackage[toc,page]{appendix}  \begin{document}  These people said explained some things \cite{Haralick1979} \cite{Hodges2003}.  \printbibliography \end{document}   Any help would be appreciated!

As in  I'm trying to use apa6e and biblatex-apa together and having problems.  Before I arrived at these problems, over the course of many hours of much reading, I first managed to get BibTeX working as expected in a simple input file (by modifying sample2e.tex). Then I managed to get apa6e working as expected based on the author's example in apa6e.pdf (which uses apacite). But when I try to get apa6e working with biblatex-apa, I end up with problems.  Here's my input file:  \documentclass{apa6e}  \usepackage[american]{babel} \usepackage{csquotes}  % biblatex \usepackage[style=apa]{biblatex} \bibliography{biblatex-apa-test-references}  \title{An Example Document} \shorttitle{Psychology: the end} \author{Silly Name}  \authornote{\dots} \abstract{\dots}  \begin{document}  \maketitle  This is an example input\cite{7.01:2} file.  Comparing it with the output it generates can show you\cite{7.01:3a} how to produce a simple document of your own.  \printbibliography  \end{document}   Attempting to typeset this in TeXShop by running LaTeX, then BiBTeX (which based on console messages, does seem to correctly call biblatex rather than BiBTeX), then LaTeX again, I get the following error message which I am having great difficulty (no doubt due to my lack of experience with TeX and co.) decoding.  (./test6.aux) (/usr/local/texlive/2011/texmf-dist/tex/latex/psnfss/ot1ptm.fd) *geometry* driver: auto-detecting *geometry* detected driver: pdftex (./test6.bbl) Underfull \hbox (badness 10000) in paragraph at lines 18--18  []\OT1/ptm/m/n/12 An Ex-am-ple Doc-u-ment   Underfull \hbox (badness 10000) in paragraph at lines 18--18  []\OT1/ptm/m/n/12 Silly Name   Underfull \hbox (badness 10000) in paragraph at lines 18--18  []\OT1/ptm/m/n/12 Author Note  [1{/usr/local/texlive/2011/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] Underfull \hbox (badness 10000) in paragraph at lines 18--18  []\OT1/ptm/m/n/12 Abstract  [2] Underfull \hbox (badness 10000) in paragraph at lines 18--18  []\OT1/ptm/m/n/12 An Ex-am-ple Doc-u-ment   Underfull \hbox (badness 10000) in paragraph at lines 25--25  []\OT1/ptm/b/n/12 References  ./test6.tex:25: Undefined control sequence. <argument> \mkbibdateapalongextra  (/usr/local/texlive/2011/texmf-dist/tex/latex/psnfss/ot1pcr.fd) (/usr/local/texlive/2011/texmf-dist/tex/latex/psnfss/ot1ztmcm.fd) (/usr/local/texlive/2011/texmf-dist/tex/latex/psnfss/omlztmcm.fd) (/usr/local/texlive/2011/texmf-dist/tex/latex/psnfss/omsztmcm.fd) (/usr/local/texlive/2011/texmf-dist/tex/latex/psnfss/omxztmcm.fd) Overfull \hbox (8.03372pt too wide) in paragraph at lines 25--25 [][]  \OT1/ptm/m/n/12 Gilbert, D. G., Mc-Cler-non, J. F., Ra-bi-novich, N. E.,  Sugai, C., Plath, L. C., As-gaard, G., ... Botros,  ./test6.tex:25: Undefined control sequence. <argument> \mkbibdateapalongextra                                    {year}{month}{day}\iffieldundef {endyear}{... l.25   I tried many different sources in several different *.bib files before eventually trying the .bib database shown above and included with biblatex-apa. All trials gave a similar error.  Can someone help? I'm impressed that the poster above was able to do anything with apa6e and biblatex-apa, and if I only had her problem of having the reference page title show up in bold, I'd be really happy.  If you need to know, my tools are from a fresh installation of MacTeX that I immediately updated using the TeX Live Utility. I've checked my versions for apa6e (v0.3) and biblatex-apa (v4.2), and I think these are current.


Ubuntu 18.04.3 LTS  sudo apt-get upgrade -f Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done Calculating upgrade... Done The following packages were automatically installed and are no longer required:   python3.7-distutils python3.7-lib2to3 Use 'sudo apt autoremove' to remove them. The following packages will be upgraded:   libpython3.7-stdlib snapd 2 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade. 1 not fully installed or removed. Need to get 13.7 MB/15.4 MB of archives. After this operation, 1,700 kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://ny-mirrors.evowise.com/ubuntu bionic-updates/main amd64 snapd amd64 2.42.1+18.04 [13.7 MB] Fetched 13.7 MB in 3s (4,641 kB/s) (Reading database ... 356632 files and directories currently installed.) Preparing to unpack .../libpython3.7-stdlib_3.7.5-2~18.04_amd64.deb ... Unpacking libpython3.7-stdlib:amd64 (3.7.5-2~18.04) over (3.7.4-1+xenial2) ... dpkg: error processing archive /var/cache/apt/archives/libpython3.7-stdlib_3.7.5-2~18.04_amd64.deb (--unpack):  trying to overwrite '/usr/lib/python3.7/distutils/__init__.py', which is also in package python3.7-distutils 3.7.4-1+xenial2 dpkg-deb: error: paste subprocess was killed by signal (Broken pipe) Preparing to unpack .../snapd_2.42.1+18.04_amd64.deb ... Unpacking snapd (2.42.1+18.04) over (2.40+18.04) ... Errors were encountered while processing:  /var/cache/apt/archives/libpython3.7-stdlib_3.7.5-2~18.04_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)  sudo apt --fix-broken install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required:   python3.7-distutils python3.7-lib2to3 Use 'sudo apt autoremove' to remove them. The following additional packages will be installed:   libpython3.7-stdlib The following packages will be upgraded:   libpython3.7-stdlib 1 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade. 2 not fully installed or removed. Need to get 0 B/1,745 kB of archives. After this operation, 94.2 kB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 356635 files and directories currently installed.) Preparing to unpack .../libpython3.7-stdlib_3.7.5-2~18.04_amd64.deb ... Unpacking libpython3.7-stdlib:amd64 (3.7.5-2~18.04) over (3.7.4-1+xenial2) ... dpkg: error processing archive /var/cache/apt/archives/libpython3.7-stdlib_3.7.5-2~18.04_amd64.deb (--unpack):  trying to overwrite '/usr/lib/python3.7/distutils/__init__.py', which is also in package python3.7-distutils 3.7.4-1+xenial2 dpkg-deb: error: paste subprocess was killed by signal (Broken pipe) Errors were encountered while processing:  /var/cache/apt/archives/libpython3.7-stdlib_3.7.5-2~18.04_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)  uname -a Linux user 4.15.0-70-generic #79-Ubuntu SMP Tue Nov 12 10:36:11 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

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


In my main method, when I create an empty SLList, and I call the addLast_iterative() method, if I try to create a reference to the null instance variable 'first' (within addLast_iterative()), then try to reference a new node with the corresponding value, it doesn't change the previous reference 'first' to reference the new IntNode object? I have gotten it to work, but am curious why this doesn't change 'first' to reference to newly created IntNode object. You can skip ahead to addLast_iterative(int x) if this is unclear. I commented out the part that doesn't work, the top "if" loop does work. In other words, "first" still will reference Null, if I use the 'if' statement I commented out. Thanks  public class SLList {      private static class IntNode {         public int item;         public IntNode next;          public IntNode(int i, IntNode n) {             this.item = i;             this.next = n;         }     }      private IntNode first;     private int size;       /* initialize empty SLList */     public SLList() {         this.first = null;         this.size = 0;     }      public SLList(int x) {         this.first = new IntNode(x, null);         this.size = 1;     }      public void addFirst(int x) {         this.first = new IntNode(x, this.first);         size += 1;     }      public int getFirst() {         return this.first.item;     }      /*************************************************************/     public void addLast_iterative(int x) {          this.size += 1;          if (this.first == null) {             this.first = new IntNode(x, null);             return;         }          IntNode p = this.first;          // why does this bottom 'if' statement not work, but the top          //does?         /*if (p == null) {             p = new IntNode(x, null);             return;         }*/          while(p.next != null) {             p = p.next;         }         p.next = new IntNode(x, null);     }      /*************************************************************/       /*************************************************************/     public int size() {         return size;     }     /*************************************************************/      public static void main(String[] args) {         SLList lst = new SLList();         lst.addLast_iterative(3);     } }

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


I have been trying to do Principal Component Analysis (PCA) via R.  The data set is available at   I tried to do PCA via 2 different methods -    prcomp princomp   I have used correlation matrix as all the variables are on different scales. Whilst, I can understand a slight difference, there appears to be a major difference between the two. I have illustrated the same below -     car <- read.csv("D:/Cars.csv")        car <- car[,c(2:7)]        pc <- princomp(car, score=TRUE, cor=TRUE)        pca <- prcomp(car, score=TRUE, cor=TRUE)        summary(pca); summary(pc)   The result of the above is -     We can see the summary of the prcomp method above and the princomp method below. As visible, both are extremely different : in the sdev as well as the proportion of variance. Further, their respective components are also vastly different, as is visible below -   prcomp is above and princomp is below in the pic, once again. Can somebody please explain as to why there is such a huge difference between the two ? Also, are these two methods the correct ones to perform PCA or should I go ahead with a different method (e.g. PCA() )  Thanks in advance :)


Given $\forall x,y>0$ Prove that $x^y+y^x\ge1$    I have tried weighted inequalities and Jensen's but unfortunately ended up no where. Please help me. (I know this is a basic inequality).

How can the following inequality be proven? $$x^y+y^x\gt1$$ for $(x\gt0,y\lt1)$


Due to my dissatisfaction with std iostream and stdio, I decided to create my own io library. And it is good for my education.  But I have a slight problem. Linux read(), when operating on a terminal file descriptor, won't return until new line. So if I ask it for 10 bytes, Even if I type 20 bytes it won't return. To make matters worse, those 10 extra bytes are not recorded in the buffer I pass it.  What happened to those 10 extra bytes? Does Linux have a buffer it uses for reads? Can I access this buffer instead of providing my own?

I can never remember how I do this because it comes up so infrequently for me. But in C or C++, what is the best way to read a character from standard input without waiting for a newline (press enter).  Also ideally it wouldn't echo the input character to the screen. I just want to capture keystrokes with out effecting the console screen.


$A$ is a symmetric matrix and $v$ is a vector. I wonder if there is a physical/geometric meaning to the transformation $Av$ due to the symmetry in $A$.

I need some visual intuition behind what exactly a symmetric matrix transformation does. In a $2 \times 2$ and $3 \times 3$ vector space, what are they generally?


I am building a beamer for a project, where i want some svg images. i have included 2 svg files and they work fine, but when i insert more they will not work.  \begin{frame}{Cooling demand}{Weight factor graph}     \begin{figure}        \centering        \includesvg[width=\linewidth,pretex=\relscale{0.6}]{AAUgraphics/Weightfactorgraf.svg}        \caption{weight factor graph for temperature gain from solar irradiation}        \label{fig:my_label}    \end{figure}  \end{frame}   this work fine for the first 2.  i use inkscape to convert into svg, and i have tried to convert into pdf_tex ass seen below:  \begin{figure} \centering \def\svgwidth{\columnwidth} \input{image.pdf_tex} \end{figure}    hope someone can help. Thanks

I'm trying to use the svg package for inserting svg images in my latex file, as suggested in other questions. But now I ran into a problem:  For example I have a image figure1.svg, if I write  \includesvg{figure1}   it will give an error says  ERROR: LaTeX Error: File `figure1.pdf_tex' not found.   But if I write  \includesvg{figure1.svg}   it will give another error says  ERROR: LaTeX Error: Unknown graphics extension: .svg.   How can I fix this problem? I'll prefer not having to convert all my svg files to pdf_tex files with some external program.    Update  My LaTeX environment is latest the TeXLive 2013 on Windows 7. A MWE code would be  \documentclass{article} \usepackage{svg}  \begin{document}  \begin{figure}[htbp]   \centering   \includesvg{figure1.svg}   \caption{svg image} \end{figure}  \end{document}


select * from A left join B on A.columnc=B.columnd   results returned by above SQL will include both columns of A and B.  And what if A and B have some columns with the same name?  How to retrieve the value from PHP?

I have two tables in my database:  NEWS table with columns:   id - the news id  user - the user id of the author)   USERS table with columns:   id - the user id   I want to execute this SQL:   SELECT * FROM news JOIN users ON news.user = user.id    When I get the results in PHP I would like to get associative array and get column names by $row['column-name']. How do I get the news ID and the user ID, having the same column name?


$$\large\int_{-2}^2 \sin\left(x^5\right)\, e^{(x^8)\sin(x^4)}\,dx$$  I think I should solve it by parts but I'm really confused. It seems as a hard question.

Okay I like have no idea how to do this. I tried integration by parts then everything came back uglier. I then put this in wolfram it says "No found in standard mathematical functions"   Is there a easy way to do this?   Maybe like FTOC II?


I'm trying to learn how to save an object to the file in c#. I'm trying to use Xml serialization and Memento pattern. The object that i want to save is of "caretaker" type. Here is how it looks like:  public class Memento {     public int prop1 { get;private set; }     public String prop2 { get;private set; }     public int SomeClassProp { get; private set; }     public Memento(int p1, String p2, SomeClass sc)     {         this.prop1 = p1; this.prop2 = p2; this.SomeClassProp = sc.SomeClassProp1;     }     } public class Caretaker {     private Memento _memento;      // Gets or sets memento     public Memento Memento     {         set { _memento = value; }         get { return _memento; }     } }   Serializer code (copied from stack overflow):    public void SerializeObject<T>(T serializableObject, string fileName)     {         if (serializableObject == null) { return; }          try         {             XmlDocument xmlDocument = new XmlDocument();             XmlSerializer serializer = new                  XmlSerializer(serializableObject.GetType());             using (MemoryStream stream = new MemoryStream())             {                 serializer.Serialize(stream, serializableObject);                 stream.Position = 0;                 xmlDocument.Load(stream);                 xmlDocument.Save(fileName);                 stream.Close();             }         }         catch (Exception ex)         {             //Log exception here         }     }       /// <summary>     /// Deserializes an xml file into an object list     /// </summary>     /// <typeparam name="T"></typeparam>     /// <param name="fileName"></param>     /// <returns></returns>     public T DeSerializeObject<T>(string fileName)     {         if (string.IsNullOrEmpty(fileName)) { return default(T); }          T objectOut = default(T);          try         {             XmlDocument xmlDocument = new XmlDocument();             xmlDocument.Load(fileName);             string xmlString = xmlDocument.OuterXml;              using (StringReader read = new StringReader(xmlString))             {                 Type outType = typeof(T);                  XmlSerializer serializer = new XmlSerializer(outType);                 using (XmlReader reader = new XmlTextReader(read))                 {                     objectOut = (T)serializer.Deserialize(reader);                     reader.Close();                 }                  read.Close();             }         }         catch (Exception ex)         {             //Log exception here         }          return objectOut;     }   The problem lies here:      XmlSerializer(serializableObject.GetType());   Here is where it throws the exception, and in result the file is not created. I'm guessing there is something wrong with the type of object that I want to save, right? Can you anyone help me somehow?    Edit: Serializer usage:  c.Memento = this.CreateMemento(); SerializeObject<Caretaker>(c, "savedObj");

I'm writing code to do Xml serialization. With below function.  public static string SerializeToXml(object obj) {     XmlSerializer serializer = new XmlSerializer(obj.GetType());     using (StringWriter writer = new StringWriter())     {         serializer.Serialize(writer, obj);         return writer.ToString();     } }   If the argument is a instance of class without parameterless constructor, it will throw a exception.     Unhandled Exception:   System.InvalidOperationException:   CSharpConsole.Foo cannot be serialized   because it does not have a   parameterless constructor.    at   System.Xml.Serialization.TypeDesc.CheckSupported()   at   System.Xml.Serialization.TypeScope.GetTypeDesc(Type   type, MemberInfo sourc e, Boolean   directReference, Boolean throwOnError)   at   System.Xml.Serialization.ModelScope.GetTypeModel(Type   type, Boolean direct Reference)    at   System.Xml.Serialization.XmlReflectionImporter.ImportTypeMapping(Type   type , XmlRootAttribute root, String   defaultNamespace)    at   System.Xml.Serialization.XmlSerializer..ctor(Type   type, String defaultName space)    at   System.Xml.Serialization.XmlSerializer..ctor(Type   type)   Why must there be a parameterless constructor in order to allow xml serialization to succeed?  EDIT: thanks for cfeduke's answer. The parameterless constructor can be private or internal.


I read a while ago that the Literature Stack Exchange website was closed and I read also the reasons. Moreover, I would want to know where could I ask questions like these ones, if there is a place:   What does the writer of X book mean by...? What is the message the writer wants to transmit in X poem?   I actually agree that questions with book recommendations should not be accepted, but...     Is there a place for these type of questions?

Is there any Stack Exchange site where the main topic is literature?  I have tried the English Language site, but it seems that it is not the appropriate site.  Perhaps the writers site would work? But, then again, the main point is different than the one I am searching for.


I'm trying to understand something about time dilation on orbiting bodies in General Relativity.  I was watching the Matt Parker video  and he seems to calculate the time dilation of the GPS satellite as ($r_s$ is the Schwartzchild Radius) : $t_0 = t_f*\sqrt {1-r_s/r}$ The article in Wikipedia  under Circular Orbit is: $t_0 = t_f*\sqrt {1-(3/2)*(r_s/r)}$ My logic says the orbiting satellite is in free-fall, so does not feel the effects of gravity $t_0 = t_f$

In the Wikipedia article on  I see two formulae for the gravitational time dilation. One contains $\sqrt{1 - r_0/r}$ but the other $\sqrt{1 - 1.5 r_0/r}$. What formula should I use to calculate the time dilation due to gravity inside a satellite? The speed induced time dilation is of course just special relativity.  With the first of these two formulas I can perfectly reproduce the graphs on time dilation as a function of $r$,  I find that the two contributions to time dilation cancel at 1.5 Earth radii, all numbers are OK... But why not the second formula?


Why do we refer to something related as  our sister_______?  For example:  Please visit our sister hotel You can find that on our sister site  Why don't we use brother? Is it wrong to use brother?

The term  is often  used figuratively  to refer, for instance,  to a “sister company” for a company  within the same group, or to a “sister  site” for  sites that belong to the same family. This connotation as explained by the   means:         belonging to a pair or group of similar and related things, such as businesses, usually owned or operated by the same person or organization:         our sister company in Australia.          also, from :        You can use sister to describe something that is of the same type or is connected in some way to another thing you have mentioned.    ⇒ ...the International Monetary Fund and its sister organisation, the World Bank.   ⇒ ...Voyager 2 and its sister ship, Voyager 1.       This usage appears to be common with things that are  regarded as feminine and are associated, as if by kinship,  with other similar things that belong to the same group. An early  usage example of this is the "sister" referred to  ships:         the US battleship Missouri and her sister ship, the Wisconsin.      In other instances,  the "feminine" issue is less explicit as in the case of internet sites, so I guess this usage has to do with the fact that English is less gender specific when it comes to things or abstract entities.   Questions:    Does “sister” apply to whatever entity that belongs to the same group irrespective of its real or perceived gender? or could "brother" be used instead?  Where does this usage come from?