Command Line loop to run command on all files in a directory (plus sub directories, if possible

I'm assuming this is fairly easy to do, but I have zero experience with Windows's command line utilities. Basically, I need to iterate over all files in a directory (great if it can do sub-directories, but I can run it on each of the 5 directories if need be), get the name as a variable, and have it run   "C:\Program Files\ImageMagick-6.7.6-Q16\convert.exe" -compress LZW     -colorspace Gray -colors 32 file_var file_var   I saw . Would I be able to use that (swapping the SET... with the above command)? The space on the computer in question is beyond limited so I can't perform a backup prior to running this at this stage (bad, I know).


If $A.M$ and $G.M$ are Arithmetic Mean And Geometric Mean respectively then prove that $A.M \ge G.M$.  My Attempt :  Let $a$ and $b$ are any two real positive numbers.  Then: $$A.M=\frac{a+b}{2}$$  $$G.M =\sqrt{ab} $$  Now how can we show that $A.M.\ge G.M.$ ? Please help me..


Overlapping periods of several Schengen visa

I am a Bangladeshi citizen and came on April 18th, 2017 to watch a football match in Spain. My spanish Schengen visa expires (today) on April, 21th 2017 and I am currently travelling to Germany from Spain by car, but I am still in Spain now. My German Schengen visa starts from April 22th, 2017 and is valid for a year, but I want to go back to Bangladesh on April 30th, 2017.  So do I need to leave the Schengen area today and come back tomorrow to Germany or does the German visa allows me to remain in the Schengen area?


Stylesheet comment header: Which header names are mandatory?

I've always used the same comment header names in my style.css document. Theme Name, Theme URI, Author etc. For example:  /* Theme Name: Example Theme URI: http://example.com Author: John Doe Author URI: http://example.org Description: An example. Version: 1.0.0 Tags: tags */   Which of these lines are mandatory?


We all know we have 4 fundamental forces, and among them we can combine 3 forces but not gravity as in Standard model and some other. But force is something we can measure, as Einstein told us in general relativity so gravity in reality doesn't count as force, so why we tried to combine it with other forces because in reality it's just property of space?


How to project a new vector onto the PC space using kernel PCA?

Let $X_{N \times d}$ be the data matrix, where $N$ is the number of samples and $d$ the size of the features space.  Using kernel PCA (kPCA), one first computes a kernel matrix $K_{N \times N}$, and then, after its eigenvectors $E_{N \times N}$ have been computed, it is possible to project the data onto the first $c \leq N$ components as: $$X_\mathrm{projected} = KE_c,$$ where $E_c$ denotes first $c$ columns of $E$. Equivalently, in Matlab notation:  Projected_data = K*E(:,1:c);   The new projected data have now size ${N \times c} $.  I would like to know if it is possible to project an unseen data vector $x_{1 \times d} $ onto the previously computed principal components $E$. If it is possible, what is the correct procedure?


How to show $\frac {\partial a^{T}X^{-1}b}{\partial X} = -\left( X^{-1}\right) ^{T}ab^{T}\left( X^{-1}\right) ^{T}$?

I am struggling with this proof where $X$ is $m \times n$ matrix, $a$ is $m$ vector, $b$ is $n$ vector.  $$\frac {\partial a^{T}X^{-1}b}{\partial X} = -\left( X^{-1}\right) ^{T}ab^{T}\left( X^{-1}\right) ^{T}$$  I know $$\frac {\partial }{\partial X}f\left( X\right) ^{-1}=-f\left( X\right) ^{-1}\dfrac {\partial f\left( X\right) }{\partial x}f\left( X\right) ^{-1}$$  and am guessing to use this fact, I also know $\dfrac {\partial a^{T}Xb}{\partial X} = ab^{T}$.  When I use the chain rule I don't seem to get the form with the transposes.  I believe the result should be $\in \mathbb{R} ^{1\times \left( m\times n\right) }$


Can I set a new file's owner (user) based on the folder as I can for group with `chmod g+s`?

I've recently learned about an amazing usage of chmod: chmod g+s /path/to/dir which makes every new file in that directory be put into the group that the directory itself is owned by.  Is there a way to have this behaviour, but for user? That is, if a public_html folder was owned by user/group "someuser", setting g+s on the folder means new files created as root are owned by user "root" and group "someuser". What I'd like to set up is new files created by root are owned by user "someuser" and group "someuser".  It looks like chmod u+s should do this, except that appears to only modify who can execute executable files. :/


I am running ubuntu 16.04 in a dual-boot with Windows 10.  The windows 10 boots without problem, so it's not a hardware issue.  I did the update of ubuntu and rebooted my machine as requested.  Now -every- time I get to the login screen the machine freezes. My machine is a Dell Inspiron 15 3000 Series.  .   The solutions I have tried so far are:   booting in recovery mode and running the file system check tool booting in recovery mode and booting in failsafegraphics mode. booting from an earlier kernel  (also repeating #1 and #2) using an earlier kernel. I tried booting using (upstart) but the screen just goes black and never boots.   This could very easily be a graphic driver problem, but I have no idea how to fix it.  Any ideas would be greatly appreciated... thanks.  UPDATE:  My computer is definitely affected by the c-state bug.  However, my machine hangs before I can boot and open a terminal to fix the bug.  I tried the temporary edit to grub to pass a the kernel boot parameter, but it simply doesn't work.    Can someone give me instructions on how to use an ubuntu livecd  to access my machines grub file so that I can make edits ? btw, I use an encrypted home folder... Thanks


Prove $\{u_n\}$ converges to $\sqrt[3]{u_2^2 u_1}$ without using subsequences.

Prove that the sequence $\{u_n\}$ is defined by $0\lt u_1\lt u_2 \;\text {and} \;u_{n+2}=\sqrt {u_{n+1}u_n}\; \text{for}\; n\ge 1$, converges to $\sqrt[3]{u_1{u_2}^2}$.   I did this using subsequences, I posted below. This kind of problems are usually done by monotonicity and boundedness. So, I suspect if their is a solution to this problem using this method.  I answered this in this method .


I have an old laptop with 2GB of RAM and an old Intel processor running 2 versions of Vista, one of which won't load and says it requires the repair CD and the other has a partition called Recovery (C:) I don't know much about computers, but I'm trying to install Ubuntu 13.10 on that laptop. Ubuntu launches and I can run it from a live CD. After doing a scan it says there are no bad files on the CD, but when I try to install Ubuntu it shows the loading bit after I've chosen my network (wifi), but seems to make no progress. Are the things I said at the start the problem?


My and my fiancé are wanting to elope in Denmark, he's English and I'm Filipino.  In order to get there I need to get a Schengen visa but I'm uncertain about my eligibility.  I'm currently unemployed, not in education and have little savings. My fiancé has about £3000 in savings, to support the trip. Additionally I don't have a referee within the schengen area.  I'm worried about getting rejected as I don't want to waste any money or have flags against my name.  Based on this information is there anyway that I'd be able to be granted a visa, or is it not worth the time/money? Thanks for taking the time to read.


Composition of two functions - Bijection

I keep going around in circles with this problem:  Given the functions $f:X\to Y$ and $g:Y\to Z$, if $g\circ f:X\to Z$ is bijective, then prove $f$ must be one-to-one and $g$ must be onto. I was able to prove this without difficulty. However the second part of the problem has me stumped:  a) Find functions $f,g$ where $g\circ f$ is bijective but $f$ fails to be onto.  b) Find functions $f,g$ where $g\circ f$ is bijective but $g$ fails to be one-to-one.  My attempt for (a): Let $f:\mathbb{R}\to \mathbb{R}^+$ be defined by $f(x)=e^x$ and $g:\mathbb{R}^+\to \mathbb{R}$ be defined by $g(x)=\ln(x)$. Then $g\circ f(x)=g(f(x))=g(e^x)=\ln(e^x)=x$ which is bijective, $g$ is onto and $f$ fails to be onto... or so I thought. Upon closer inspection $f$ $\underline{is}$ onto for the given codomain $\mathbb{R}^+$.  And now I'm stuck in a rut. Anyone out there have any hints?


How to write State Spaces above, and left of Markov matrix?

When we write Markov chain/stochastic matrix, we write the state-spaces above the columns of the matrix and on left hand side of the rows. Can anyone help me with it specially with the case in an equation. We write P = {the transition probability matrix with the state spaces}. TIA


Finding all positive integer solutions to $(x!)(y!) = x!+y!+z!$

The equation is $(x!)(y!) = x!+y!+z! $  where $x,y,z$ are natural numbers.  How to find out them all?


Why do electric field lines point in the direction of decreasing electric potential?  I came across this sentence in my school book but am trying to understand this ever since.  I know that dV=-E.dr  But how do I get to the above conclusion from this?


The InnoDB log sequence number is in the future

Our site was getting intermittent database errors and I asked my webhost to check what's happening. After some inspection they found that the database has few issues and tried repairing it. Finally I got following message from them-      I have attempted every repair on the InnoDB database and we are still   getting  the InnoDB log sequence number is in the future. At this   point to get the  ibdata and the iblogfile to match up once again we   will need to restore the  MySQL directory (which includes databases)   from the backup we have on the  server. The process should not take to   long but there will be some downtime  associated with a restore like   this. If this is not the best time to restore  the MySQL directory I   can schedule this for a different time. Please let me  know how you   would like to proceed with this.   Can someone tell me what'd be the best way to address this issue. I really don't want to lose out on any data and want the dB to be repaired.   PS: If you need more information, please let me know and I'll get it from our web hosts.   Would really appreciate your help.


JQuery add and remove element dynamically not function

I have this in JQuery:  $(function() {  $(".dup").on("click", function(e) {       var panel = $(this).closest(".panel");       var tab = $(this).closest("tr").find("a.collapsed").text();     var cc = 0;     $(".panel").each(function() {         var text = $(this).find("a.collapsed").text();         if (text === tab)             cc++;     });      if (cc < 4)         $(panel).clone().insertAfter(panel);     e.preventDefault();  }); $(".rem").on("click", function(e) {     e.preventDefault();      if ($(".panel").length > 1)         $(this).closest(".panel").remove(); }); });   I have so two link that if you click them add and remove an element with some limits. Ok this function partially because the elements, that are added dinamically by click, when press on their link of add or remove not function! The page is reloaded and come back the initial situation!  So the problem are the element add dinamically that are unbinded with click event! I have seen other question that recommend to use .on instead of .click but the result is the same for both. Can you help me?


What exactly happened to Harry Potter's magical family that they could not keep or support him?

Story wise and in terms of character, it's understood why Harry Potter, the protagonist of the titular series, is an orphan raised with his muggle (non-magical human) family. However, a recent question I asked here brought to light that not only is Harry a descendant of one of the legendary Peverell brothers, but that the Potters are a family with an extensive line, largely located around Godric's Hallow. An excerpt explains thus:  Henry’s son was called Fleamont Potter. ... It was Fleamont who took the family gold and quadrupled it, by creating magical Sleekeazy’s Hair Potion (‘two drops tames even the most bothersome barnet’). He sold the company at a vast profit when he retired, but no amount of riches could compensate him or his wife Euphemia for their childlessness. They had quite given up hope of a son or daughter when, to their shock and surprise, Euphemia found that she was pregnant and their beloved boy, James, was born.   Fleamont and Euphemia lived long enough to see James marry a Muggle-born girl called Lily Evans, but not to meet their grandson, Harry. Dragon pox carried them off within days of each other, due to their advanced age, and James Potter then inherited Ignotus Peverell’s Invisibility Cloak.  So it's understood that Harry's Paternal Grandparents died prior to his birth, but "Several generations" existed prior to them. It would be logical that James would have known his grandparents, and thus also some cousins or extended family. This is likely also because in the Fantastic Beasts sister series, it is shown that Wizarding families tend to know each other, and stick together, much like the Weasley's and even the Blacks did. This raises 3 questions:  Plot reasons aside, why is the no mention of any Second Cousins, Great Aunts or Uncles or other family related to James who may have been able to take Harry, or at least check on him?  Considering Harry's fame as "the boy who lived" from the very first book, and James being a good wizard of some regard, why were more precautions not taken (on an official level, say by the Ministry of Magic) to protect the child after his parents deaths?  Did or does Harry ever learn of his family's link to the Peverells, or are they (as a clan) no longer in existence?   Is there any canon information which addresses any of these issues? NOTE: I am aware that the story is structured as it is to give Harry a "heroes journey", and thus many of these obstacles sort of "had" to be in place. What I'm more asking here if there was ever any attempt to address these issues in story, i.e.  a mention that all extended Potter clan was killed by Voldemort or hunted by Death Eaters, or that the existing Peverells simply "didn't know" of their family ties to the Potters after several generations lost touch. It could just be that these are minor details that JK Rowling didn't touch upon, but considering her usual attention to detail in universe building, I'm open to a possible "Throw away" explanation being given.


Trying to understand prescaling voltage for ADC with least error

I'm teaching myself EE while designing a 12V DC battery monitor. I'm using a pair of Hall-effect sensors to track charge & load current and looking for the best way to measure the voltage. [An ATmega32u4 will take successive reads with the ADC, compute a 1-second average, and pass that up over USB for logging and analysis.]  The issue of error with ADC really has me spooked. It is essential that I produce meaningful data. There's so many error sources—both in my circuit and in the ADC—that it feels like playing wack-a-mole in the dark. I'm reading lots about calibrating the ADC's reference, but the first step is to pick a method for scaling the input.  My voltage window is 10-15V, specifically a range from 10.5V to 14.4V (3.9V). I came up with two approaches that (hopefully) do what I want:   A 10V Zener diode on the inverting input of a differential op-amp. Rejecting 10V, my range becomes 0.5V to 4.4V (3.9V) and uses nearly the whole range of my ADC.  A 20k : 10k voltage divider. Scaled down 3x, my range becomes 3.5V to 4.8V (1.3V)   I wanted to prove to myself which method would render the best granularity. Since I can also obtain 12-bit accuracy by adding four reads and shifting the result, I compared four possibilities: (assuming ADC ref is 5.0V)   method 1, 0.5-4.4V @10-bit is 800 steps: 4.88mV/step [#3] method 1, 0.5-4.4V @12-bit is 3606 steps: 1.22mV/step [#1] method 2, 3.5-4.8V @10-bit is 266 steps: 14.65mV/step [#4] method 2, 3.5-4.8V @12-bit is 1065 steps: 3.66mV/step [#2]   My question is, do my mV/step figures tell the whole story, or is there some kind of downside to #2 that I'm not seeing?


I can't reach variable inside the parentclass from subclass

I want to use variable inside the parentclass from all of my subclasses. Like there's a x variable in parentclass and I want to reach it from my theYclass and theZclass subclasses.   i tried using .  i tried using : i tried using protected: i tried using -> i tried using    this i tried using #define   i am taking LNK2001 and LNK1120 error which means undefined reference/unresolved external symbol error      class world     {     private:     public:      static int a;     };      class atmosphere : public world {     private:     public:      static void humon() {           world::a = 5;         };      };   I want to use a on every subclasses.(my first inheritance experiment btw)


Suppose $z_1,z_2,z_3$ are three vertices of a parallelogram. Find vertex $z_4$, which is opposite of $z_2$. Where all $z_i$ are complex numbers.

Here is my approach:  Suppose the parallelogram is in the first quadrant.  Then, we can say that $z_1=x_1+iy_1$, $z_2=x_2+iy_2$, and $z_3=x_3+iy_3$.  Let $z_1$ be in bottom left, $z_2$ be in top left, $z_3$ be in top right.  We know that opposite sides of a parallelogram are parallel and congruent.  Then, $z_4=[x_1+|x_3-x_2|]+iy_1$. Now, to continue, I would consider a parallelogram that is totally contained in each quadrant, then start looking at the cases where the parallelogram is partly contained in quadrant..... this seems like a lot of cases.  I was wondering if there would be an elementary way that I could generalize this problem down to a few cases, or even just a single case.  Thank you.


I think this is a very recent design change, because I've not seen it before:    Where before a small box with the bounty value dislocated the title a couple of characters to the right, now the additional text saying how long until it expires dislocates the title by about a quarter of the width of the column.  I find that this makes it much harder to read the title, and is counterproductive to the goal of attracting attention.


Having $X$ and $Y$ discrete random variables above finite set. Z is defined as $Z=X+Y$ when does the following happen:  $$H(Z)=H(X)+H(Y)$$


I saw , but the answer doesn't help me.  I have a case where I want to measure the distance between a given lat/long and "My Object's" Site's geolocation coordinate. The code is like:  String myId = ...; String lat = ...; String lon = ...;  List<MyObject__c> myObjects = (List<MyObject__c>) Database.query(     'SELECT Id, Name, DISTANCE(Site__r.Coordinates__c, ' +         'GEOLOCATION(:lat, :lon), \'km\') dist FROM MyObject__c ' +         'WHERE Id = :myId');   This query works, but even when the related Site object has valid coordinates, and the lat/lon values are valid, getting the value from the MyObject__c instance:  System.debug(myObjects[0].getPopulatedFieldsAsMap().get('dist'));   Log:     11:21:48.41 (124442138)|USER_DEBUG|[14]|DEBUG|null   It is always null.  If the "Coordinates__c" are directly on MyObject__c the above query works. It is something to do with the fact that the coordinates originate from a related object.  Anyone know how to get this query to work with this object structure? (I am working around this by getting the coordinates back and performing an explicit distance calculation in Apex but would rather not.)


How to display an icon when a new post is published and then remove it when a specific time past?

Every time i publish a new post i want to display an icon like a badge (NEW) and after a specific time it will disappear.  Lets say i publish a new post and i want to display that it is a new post. So i want to insert an icon that for example a star, in each new post in the blog list view into the metadata of the posts. Also i want to be removed after a specific time will pass. Lets say in one day or 24 hours the icon should be removed automatically.  How can i do this?


Hyperref: Both Bibliography and Index entries in ToC are linked to Bibliography

Problem Statement  I use BibTeX for the Bibliography, makeindex for the Index and hyperref to create the hyperlinks.  In the .pdf file that I get after compiling, all hyperlinks (e.g., ToC entries, page references in the Index, citations of Bibliography entries,...) work, except for the Index entry in the ToC, which instead points to the Bibliography (the Bibliography ToC entry also links to the Bibliography).  How to reproduce the problem  Here is my example.tex file, reduced to a MWE:  \documentclass[a4paper]{book}  \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[italian]{babel} \usepackage{lipsum} \usepackage{makeidx} \usepackage[nottoc,numbib]{tocbibind} \usepackage{hyperref}  \makeindex  \begin{document}  \bibliographystyle{unsrt} %\nocite{*}  \frontmatter  \title{Title} \author{Author} \date{} \maketitle  \tableofcontents  \mainmatter  \chapter{First chapter} \section{First section\index{section}} \lipsum[1-2] \section{Second section} \lipsum[1-2]  Cite-example\cite{ref1}  \backmatter  \bibliography{biblio.bib}  \printindex  \end{document}   and my biblio.bib file:  @book{ref1,   author = "Author",   title  = "Title",   year   = 1490 }   Finally, here is the routine I use in compiling (I am running TeXLive in GNU/Linux Fedora20):  pdflatex example.tex makeindex example.idx bibtex example.aux pdflatex example.tex pdflatex example.tex   What am I doing wrong?


I am trying to derive ELM going through the basics , please help me out here :   $$f = x^Tx$$ $$g = Ax-b $$   The constraint is $Ax-b = 0$  I calculated $J' = f'+\lambda^T g'$ which is $2x+(\lambda^T A)^T = 0 $ and $Ax-b=0$ . I dont know what to do next please help me out .


How to create multiple file in fstream with loop

I am new in coding and in this community I want to save multiple student info in multiple file in ".txt" file like "student1.txt", "student2.txt", "student3.txt" etc. See my code then I hope you will understand my problem.   #include <fstream> #include <iostream> #include <string>  using namespace std;  int main() {     for(int i = 1; i < 30; i++) {         string name, roll, gpa;          cout << "Enter student info";         cout << "name :";         cin >> name;         cout << "\nEnter Roll :";         cin >> roll;         cout << "\nEnter gpa :";         cin >> gpa;          ofstream file;         /* Problem part :I know this part of code will never work */         file.open("Student  <<i<<".txt");         /* what should I do */         file << name << endl << roll << endl << gpa;         file.close();     } }


Logic Definitions/Axioms (Are they iff statements?)

Are all definitions or axioms in logic biconditional (iff) statements? It would make sense to me that they would be. A lot of times I will read a definition though and it won't be written as an iff. Just curious as to why they are or aren't.


how to use bitmap as source for image in wpf

In my application i want to drawing a rectangle on image box using bitmap called myBitmap. and the problem is how to use System.Drawing.bitMap as source for image in C# Wpf .     private void MyRectangle(System.Drawing.Point p1, System.Drawing.Point p2)     {         int var1,var2;         var1 = Convert.ToInt16(image1.Width);         var2 = Convert.ToInt16(image1.Height);          System.Drawing.Bitmap myBitmap = new System.Drawing.Bitmap(var1,var2);          using (Graphics g = Graphics.FromImage(myBitmap))         {             g.Clear(Color.LightBlue);             g.DrawRectangle(new Pen(Brushes.Red),p1.X, p1.Y, p2.X - p1.X, p2.Y - p1.Y);         }         // this.image1.Source = myBitmap;      }


Is it designed so that same badge have different shapes?

I just got a new badge today on academia site, but the shape of the badge appear in different shapes when I am on different sites. If viewed from Mathematica site, it is triangular shaped  however, if viewed from LaTeX site, it is circular shaped  but it is the very same badge. Is this by design or not?


How to change the display name on the Terminal?

When I open the terminal, a name is displayed before I type any command as follows: administrator@administrator:~$  What specific steps do I take to change the display name?


Was it a crime in the Republic to be a Sith?

If the Jedi Order had arrested Palpatine, would the court have declared Palpatine guilty quickly based on proof that he was a Sith? Is there any rule stating that?  Notes:   The word quickly is important because finding proof of his political crimes would be difficult and time-consuming (it could take decades). I am assuming that the Jedi can prove that Palpatine is a Sith (e.g., using a security hologram of his conversation with Anakin, in which Palpatine declares that he is one). For this question, I am also removing all of Palpatine’s murders of Jedi from the equation.   Update: This is a generic question about any Sith, not just Palpatine. In other words, could a Sith introduce himself to the Republic to have a peaceful life demanding protection from the Jedi if the case arises?


Are $\mathbb{Q}$ and $\mathbb{Z}$ homeomorphic?

How can I check whether $\mathbb{Q}$ and $\mathbb{Z}$, with their usual topologies inherited from $\mathbb{R}$, are homeomorphic?


Meridian convergence. True north, magnetic north and grid north

I'm having difficulty wrapping my mind around meridian convergence, the horizontal angular distance between true north and grid north.   Say I want to determine if a feature lies to the east or west of the central meridian (CM) by using true north and grid north designations on a topo map.   I realize grid north is parallel to the CM, while true north points to the poles, and magnetic north is the direction a compass points and constantly changing.   Looking at the figure below, I see grid north points to the east of true north. So does this fact alone mean everything on the grid is to the east of the true north, and therefore the CM? Does this simple fact mean that features in this grid lie to the east of the CM, or am I missing something.   Also, I realize I can just look at the tick marks and and see that this this grid in particular covers -80°22’ to -80°15, and the CM for zone 17R lies at 81°. But had I not known that and wanted to use the north arrows. Please explain.


Install Oracle Java 11 and setting up JAVA_HOME

Unable to install Oracle Java 11 on ubuntu 19.04.


Are the commas here correct? "...a vaccine was finally discovered by an American scientist, Jonas Salk, in 1955..."

Before a vaccine was finally discovered by an American scientist, Jonas Salk, in 1955, more than 80 percent of polio patients received help from the foundation.   Why is "Jonas Salk" set off by commas in this sentence? I think of it as of an essential clause and thus believe no commas should be inserted.


Don't require a click to switch between sites, inbox, and Achievements on the new topbar

Simple request, when I click on the Inbox, for example, and move my mouse to the right, I'd like the Achievements to open automatically instead of needing a reclick.


Testing siblings DNA to determine full siblings?

I have done a sibling DNA test to determine if my children are full siblings or not. There was a possibility that my eldest daughter could have been her father's brother’s and not actually his.  I tested the sibling DNA including myself and the two children.  The result came back 52 percent chance they are full siblings but then said at the bottom they favour that they have the same father.    I really don't have a clue what this means because I thought that if they were full siblings then it would come back more like 90 percent than 52.  Should I conclude that they are full siblings?


Where did I go wrong in this putnam question?

I won't be writing each step explicitly because it takes me forever to write this up in math format.  $$ \int_2^4 \frac{\sqrt{\ln{(9-x)}}}{{\sqrt{\ln{(9-x)}}}+{\sqrt{\ln{(x+3)}}}}\,dx $$  My solving of it went as follows: $$ \int_2^4 \frac{\sqrt{\ln{(9-x)}}}{{\sqrt{\ln{(9-x)}}}+{\sqrt{\ln{(x+3)}}}}  \frac{\sqrt{\ln{(9-x)}}}{\sqrt{\ln{(9-x)}}}\,dx= $$ $$ =\int_2^4 \frac{{\ln{(9-x)}}}{{{\ln{(9-x)}}}+{\sqrt{\ln{(9-x)}\ln{(x+3)}}}}\,dx  $$  It has at this point been an hour and I won't waste more time to make the equations look pretty. $$ =\int_2^4\frac{\ln(9-x)}{(\ln(9-x) + \ln(9-x)^{\ln(x+3)/2}}\,dx $$  Factor out ln(9-x) and cancel and you get  $$ \int_2^4\frac{1}{1+\ln(9-x)^{(\ln(x+3)-2)/2}}\,dx $$ After a bit more simplifying (bringing down the exponent and multiplying, then moving the 2 out of the integral, then simplifying the remaining $\ln$'s) you get $$ 2\int_2^4\frac{1}{2+\ln\frac{x+3}{9-x}}\,dx $$ And this is an easy integral because it is directly derived from arctan. I get the antiderivative is $$ \frac{1}{\sqrt2}\arctan\left(\frac{1}{\sqrt2}\sqrt{\ln\frac{x+3}{9-x}}\right). $$ But when I try to use that for the definite integral, I get a negative under the square root, so it must be wrong. Can someone explain where I must've gone wrong? I hope I gave enough information so that you know what I did.


Application uses AES in CBC mode with 128 bit key. In this implementation key is always same and is equal to IV. Can attacker get the key or decrypt data? If he knows:   First and second blocks of plaintexts; All blocks of ciphertexts.   The software mentioned above is malicious program, it encrypts all office files on user's computer. And I now attempt to help user get his data back. Reverse engineering of this program shows that key is unknown, but is always same and is equal to IV.


Can I get a direct download link for the Stack Exchange Android app?

I am Persian, and as some of you know, Google Play denies service to Iran. It became a common practice here to download .apk files and install them later on.    Can Stack Exchange give a direct link to the Android application? This way we are getting our software right from the source. Yes, it is possible to use a third-party services such as Aptoide, but it spams its users.


Awaiting ME decision and reviewers selection

I submitted a manuscript through ScholarOne two months ago. During the first week they asked me a few doubts and once they were answered, the manuscript status appeared as "awaiting reviewer selection". Then they change the status to "awaiting ME decision" and stayed this way until a week ago, when they changed iy back to "awaiting reviewer selection" I'm a bit confused. Can anyone give me an explanation? Thanks


How to check what causes iPhone battery to drain out?

Last night before I went to sleep my iphone battery was at 30% and the active usage was about 6 hours ( since last full charge). However this morning when I woke up I found that my battery went flat. Upon some checking I discovered that it was on active usage for 12 hours. Which means that when I was sleeping either   Someone played with my iphone for 6 hours, or Some rogue apps that ran in the background were silently draining my battery even though they shouldn't   Possibility 1 is very remote. So I would like to investigate on possibility 2. How to know what causes the iphone battery to drain out even when it is not in use?  Edit: I switched 3G and WIFI off when I was sleeping.


How to write braces inside \sqrt[ in here ]{sth}?

This is what I want to write:    Apparently, the following doesn't work  \sqrt[ \sqrt[\log n]{n} ]{x}  The error is that the argument of \sqrt has an extra }. This seems like a bug to me. Is there a way to write this symbol?


How to wire up a 3-wire load cell/strain gauge and an amplifier?

I have a 3-wire  that looks like this:    I'm trying to wire it up to my Arduino to detect changes in weight. From what I understand, the changes in voltage are so small that the Arduino can't detect the changes without amplifying the voltage. So I bought an  at  that looks something this:    I found  that shows how to wire everything up. However, I can't figure out the schematic and why they are using two load sensors instead of just one. They also mention resistors but I'm not sure why they are using them (and why the sizes they chose), or where in the circuit to put them.  Can someone please help me figure out how to wire this thing up to detect changes in voltage? Also, is there a way to do this by using only one of these sensors? This is what I've done so far:    The amp also has some pins that I don't understand: Offset null, NC. What are these pins for? Should I be using them?  Update: Now I am working with an Instrumentation Amplifier (). I also now have a 4-wire load sensor that I am playing with. Still can't get it to work, but I thought I would try to understand that before moving to the 3-wire load sensor.


What is the difference between primary partition and logical partition in Linux?

What is the difference between the primary partition and logical partition in a Linux system?


Split text at the right time in javascript

I have a text in a variable, for example: "Lancer Square super / CIT" and I would like to divide the text into 2 variables after the mark, namely: "Square super" and "CIT"


Show that $f_n(x) = \frac{x^2}{n}$ for $x \in \mathbb{R}$ does not converge uniformly towards $0$ for $n \rightarrow \infty$

Consider the sequence of functions  $$ f_n(x) = \frac{x^2}{n} $$ for $x \in \mathbb{R}$  I have shown that $f_n(x)$ converges pointwise towards $0$ for $n \rightarrow \infty$ but I am not sure whether my attempt for showing that it does not converge uniformly towards $0$ for $n \rightarrow \infty$ is correct. Do you mind verifying?   By negation we have that $f_n(x)$ does not converge towards $0$ for $n \rightarrow \infty$ if   $$\exists \epsilon > 0 \forall n \in \mathbb{N} \exists x \in \mathbb{R} \exists n \in \mathbb{N}: n \geq N \Rightarrow |\frac{x^2}{n}| \geq \epsilon$$  Let $\epsilon = 1$. Then for all $n \in \mathbb{N}$ we can find a $x \in \mathbb{R}$ such that for $n \geq N$ that $|x^2/n| \geq 1$. Can I then just pick $x = n^{1/2}$ so we have that $$ |x^2/n| = |(n^{1/2})^2/n| = |n/n| = 1 \geq 1 $$ which means that $f_n(x)$ does not converge uniformly towards $0$ for $n \rightarrow \infty$. Is this ok?


I am setting up new Ubunut machine. Stuck on setting up Java environment variable. I have tried all possible way and whatever solution I found here. None of them worked. It is still giving me blank line (see the code first line). Can anyone help me to set the variable.    me@me-ubuntu:~|⇒  echo "$JAVA_HOME"  me@me-ubuntu:~|⇒  java -version java version "1.8.0_40" Java(TM) SE Runtime Environment (build 1.8.0_40-b25) Java HotSpot(TM) 64-Bit Server VM (build 25.40-b25, mixed mode) me@me-ubuntu:~|⇒   me@me-ubuntu:~|⇒  which java /usr/bin/java me@me-ubuntu:~|⇒  ls -l /usr/lib/jvm total 8 lrwxrwxrwx 1 root root   24 Mar 22  2014 default-java -> java-1.7.0-openjdk-amd64 lrwxrwxrwx 1 root root   20 Jan 27 09:22 java-1.7.0-openjdk-amd64 -> java-7-openjdk-amd64 drwxr-xr-x 7 root root 4096 Mar 31 10:26 java-7-openjdk-amd64 drwxr-xr-x 8 root root 4096 Mar 31 10:43 java-8-oracle me@me-ubuntu:~|⇒     I tried to set it in ~/.bashrc as well as in environment file but nothing work  export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-amd64 export PATH=$PATH:$JAVA_HOME/bin


Help with $\int \frac 1{\sqrt{a^2 - x^2}} \mathrm dx$

$$\int \frac 1{\sqrt{a^2 - x^2}} \,dx$$    In the second passage it become   $$\int \frac 1{a\sqrt{1 - \left(\frac xa\right)^2}}\,dx$$  So can someone explain me what kind operation is done at denominator?


Typography: First line indent in the first paragraph?

A colleague explained to me that it is a typographical rule to not set an indent for the first line of the very first paragraph of a text, the one that starts right after the headline. Instead, the indentation should start with the second paragraph. However, I am finding examples in various publications where the indentation starts right with the first paragraph. Then again, others do it the way it was told me.  Is there a "right" way to do it, and if so, why? If not, what are the advantages/disadvantages of either method?


I am a lvl 6 moon Druid at the moment. I was disguised as a cat when my party ran into a fight. When it seemed like my party needed my help I decided to jump in (literally) and help.  The question I have is: do I first need to change back into my elfen form before I can change into another shape OR can I instantly change to a new form ( while leaping at the enemy for example).   In the end my DM decided that I was able to change instantly but I would like to know if there is an official rule for this, for future reference.   I have not found anything on this in the player handbook.


Adding the numerator and denominator separately in a fraction.

We all know how to add two completely differently fractions, say we have fractions: -  $\frac{a}{b}$ and $\frac{c}{d}$  We know that: -   $$\frac{a}{b} + \frac{c}{d} = \frac{ad + cb}{bd} $$  Suppose (hypothetically) we add the aforementioned fractions in a completely different way, say: -  $$\frac{a}{b} + \frac{c}{d} = \frac{a + c}{b + d} $$  We get a unique fraction $\frac{a + c}{b + d} $ whose value will always be in between the fractions $\frac{a}{b}$ and $\frac{c}{d}$.  My question is: -  Can someone give me the proof (mathematically) that the statement given below will be always true: -  $$\frac{a}{b} < \frac{a + c}{b + d} < \frac{c}{d}$$   (where we assume that $\frac{a}{b} < \frac{c}{d}$)


I would like to know what it really does with following scripts used with sed command.  sed -e 's:<F0_M>:<o,f0,male>:' \           -e 's:<F0_F>:<o,f0,female>:' \           -e 's:([0-9])::g' \           -e 's:<sil>::g' \           -e 's:([^ ]*)$::' | \   First and second scripts looks like we are transforming text of type <F0_F> to <o,f0,female>. But what about the last three where it involves '::','g' and '$' sign. In most of the documentations they have used '\' and '/' in most of scripts. But here they have used ':' instead of slashes. Can some one explain above three scripts?


Interpretation of the energy-time uncertainty

From the uncertainty relation it follows that:  $$\Delta E \ \Delta t = \hbar$$  $\Delta E$ is the energy uncertainty of a state, $\Delta t$ should be the  uncertainty of the lifetime $\tau_b$ of the state. I don't understand why $\Delta t$ is usually confounded with the lifetime itself, $\tau_b$ and the relation written as  $$\Delta E \ \tau_b = \hbar$$


Simulate repeated rolls of a 7-sided die with a 6-sided die

What is the most efficient way to simulate a 7-sided die with a 6-sided die? I've put some thought into it but I'm not sure I get somewhere specifically.  To create a 7-sided die we can use a rejection technique. 3-bits give uniform 1-8 and we need uniform 1-7 which means that we have to reject 1/8 i.e. 12.5% rejection probability.  To create $n * 7$-sided die rolls we need $\lceil log_2(  7^n ) \rceil$ bits. This means that our rejection probability is $p_r(n)=1-\frac{7^n}{2^{\lceil log_2(  7^n ) \rceil}}$.  It turns out that the rejection probability varies wildly but for $n=26$ we get $p_r(26) = 1 - \frac{7^{26}}{2^{\lceil log_2(7^{26}) \rceil}} = 1-\frac{7^{26}}{2^{73}} \approx 0.6\%$ rejection probability which is quite good. This means that we can generate with good odds 26 7-die rolls out of 73 bits.  Similarly, if we throw a fair die $n$ times we get number from $0...(6^n-1)$ which gives us $\lfloor log_2(6^{n}) \rfloor$ bits by rejecting everything which is above $2^{\lfloor log_2(6^{n}) \rfloor}$. Consequently the rejection probability is $p_r(n)=1-\frac{2^{\lfloor log_2(  6^{n} ) \rfloor}}{6^n}$.  Again this varies wildly but for $n = 53$, we get $p_r(53) = 1-\frac{2^{137}}{6^{53}} \approx 0.2\%$ which is excellent. As a result, we can roll the 6-face die 53 times and get ~137 bits.  This means that we get about $\frac{137}{53} * \frac{26}{73} = 0.9207$ 7-face die rolls out of 6-face die rolls which is close to the optimum $\frac{log 7}{log6} = 0.9208$.  Is there a way to get the optimum? Is there an way to find those $n$ numbers as above that minimize errors? Is there relevant theory I could have a look at?  P.S. Relevant python expressions:  min([ (i, round(1000*(1-(  7**i )  /  (2**ceil(log(7**i,2)))) )/10)  for i in xrange(1,100)], key=lambda x: x[1]) min([ (i, round(1000*(1- ((2**floor(log(6**i,2))) / (  6**i ))   )    )/10)  for i in xrange(1,100)], key=lambda x: x[1])   P.S.2 Thanks to @Erick Wong for helping me get the question right with his great comments.  Related question:


Case specific null pointer exception problem - java

I have a strange problem regarding null pointer exception. I'm posting the problematic code piece below :  public static void main(String[] args) {  BetHistory testObject = new BetHistory(6);  testObject.addResponse(2, 1, 0); //  ERROR HERE  ...  }  public class PlayerResponses {      public List<Integer> response;      public PlayerResponses() {         super();         response = new LinkedList<Integer>();     }  ...  }  public class BetHistory {      PlayerResponses [][] responses;      int nPlayer;      public BetHistory(int totalPlayers) {         super();         responses = new PlayerResponses[4][totalPlayers];         nPlayer = totalPlayers;          }     public void addResponse(int response, int playerNo, int roundNo)     {         responses[roundNo][playerNo].response.add(response); // DUE TO HERE     }  ...  }   Thanks in advance for your time.


Javascript Remoting - sending sObject as argument

This question appears to have been answered several times on here, but none of the solutions are working for me.  I have an Apex function defined like so:  @RemoteAction global static ActivityWrapper createActivity(Activity__c activity)   And when I call this Javascript function:  Controller.createActivity(     {ForWeek__c: "2014-04-21T08:00:00.000Z",      Notes__c: "sdfsdf",      Type__c: "Referral",      Id: null,      sObjectType: "Activity__c"}, callback);   I always get back this error message:  Visualforce Remoting Exception: Unexpected type for Controller.createActivity(Activity__c)   As far as I know this is all that is required, but I can't get past this.


GParted made some of my HDD capacity dissapear!

My HDD size was 1TB (dynamic) and there were already 4 partitions in it. One with the Windows C drive (450GB), another recovery (20GB), another with some tools from the laptop manufacturer (about 200MB) and another with my files in it (Drive T: 450GB).  So, I boot the CD, tried installing Ubuntu 13.10 and tried to partition my drive to dual-boot with Windows 7.   When I came to the point to select which partition I should split/create etc, I chose the one with my files (Drive T) and edited the size to about 350GB.   Then an error message came up saying that Parted cannot change dynamic disks and now when I open Windows the 100GB that were supposed to exist as unallocated size do not exist and partition T capacity has dropped to 365GB!!!  As you can see in the  , weird things happen in Windows, as the drive shows up with two different capacities in the disk management application. (Note: when I open my computer the disk shows up as 365GB)  Has anyone faced a similar problem? What should I do?


I've just moved to the States and a family member kindly passed on an old AT&T iPhone 5. The trouble is that it's stuck in a reset loop. When I go into recovery mode and try to restore the phone, iTunes tells me that it can't restore the phone, and gives error 2001.  The background on the phone, as far as I can tell, is this: it started spontaneously shutting down, first every few hours, then progressively more, until it ended up like it is now. They took it to an AT&T store where the representative said it was because the phone's hard drive was full, but I am skeptical that's the real cause.  Is there anything I can do to wipe and restore this iPhone?


Often, there are only one or two items in the First Posts and Late Answers review queues. I open one queue, go through both items, and then go to the other queue. I am then confronted with the same answer I just reviewed. Is this intentional, or not often enough to matter, or a bug?


I have a problem with my If statement. The code runs without any problems, but it does not show the outputs for my if statements. It runs through all my JOptionboxes all the way to the end. Until it goes through my if statements.   import javax.swing.JOptionPane;  public class CurrencyConversion {  public static void main(String[] args) {  int x = 0; double result,result1, result2; String THAI = "THAI", EURO ="EURO", JPY = "JPY";  String name = JOptionPane.showInputDialog("What is your name: "); String message = String.format("Welcome %s, to the Currency Exchange Program ", name); /*inputs name in %s*/  JOptionPane.showMessageDialog(null,  message); //displays the String format message String currency = JOptionPane.showInputDialog("Which currency do you wish to exchange: "+THAI+ ", "+EURO+ ", "+JPY); x = Integer.parseInt (JOptionPane.showInputDialog("Insert US Dollar Amount: ")); result = x * 32.57; //US TO THAI result1 = x * .86; //US TO EURO result2 = x * 117.50; //US TO JPY   if (currency == "THAI"){     JOptionPane.showMessageDialog(null,"US Dollar Amount of "+x+ " dollars to be converted to "+THAI+" is: ");     JOptionPane.showMessageDialog(null,result+ " BAHT"); }if (currency == "EURO"){         JOptionPane.showMessageDialog(null,"The Amount of "+x+ " dollars to be converted to "+EURO+" is: ");         JOptionPane.showMessageDialog(null,result1+ " EURO"); }if (currency == "JPY"){             JOptionPane.showMessageDialog(null,"The Amount of "+x+ " dollars to be converted to "+JPY+" is: ");             JOptionPane.showMessageDialog(null,result2+ " JPY"); }//end THAI if   }//end main


How can i take a given dict and return a new one with multiple values for one key?

I'm new to python and struggling with this question - Create a function which works as follows: d={1:"x",2:"y",3:"x",4:"z"}  invert_d(d) {"x":(1,3),"y":(2),"z":(4)}  So invert_d gives a new dict with the values of multiple keys as lists. I have to say, that I never worked with dicts and started python 1 week ago...so I'm a total newb. I am new to python.... and I'm struggling with this question: Edit: I read wrong and fixed the Dict. Sorry guys :( Also we cant import in the exam


Is it incorrect to say, 'Give me it' ?  I am told that it is and one should always say, 'Give it me'?


Prove that if $\sum_{n=1}^\infty a_{2n}$ and $\sum_{n=1}^\infty a_{2n-1}$ converge then $\sum_{n=1}^\infty a_n$ converges.

I want to prove that if $\sum_{n=1}^\infty a_{2n}$ and $\sum_{n=1}^\infty a_{2n-1}$ converge then $\sum_{n=1}^\infty a_n$ converges as well.  Can I prove this like this: $\sum_{n=1}^\infty a_{2n-1}+\sum_{n=1}^\infty a_{2n}=\sum_{n=1}^\infty a_{2n-1}+a_{2n}=\sum_{n=1}^\infty a_n$  The first equality can be done because they both converge, but I'm not sure about the second one.


JButton change OTHER buttons colors excluding the button clicked

I am trying to change the color of every button EXCEPT the button clicked. This code works if I change it to only the button clicked changing its color. However, when I change the to the desired result I get a java.lang.NullPointerException error. New To Java not sure how to tackle these errors. Thanks. public class Hw2 {      static JButton buttons[] = new JButton[8];     static Random rand = new Random();     public static void main(String[] args) {         //deleted non useful code                  for(JButton button: buttons) {             button = new JButton("Click Me");             button.setBounds(0,0,50,50); //initialize and set bounds                          button.setOpaque(true); //show color and randomly pick             button.setBackground(new Color(rand.nextInt(256),                                            rand.nextInt(256),                                             rand.nextInt(256)));             button.setBorderPainted(false);                          AnotherHandler bh =new AnotherHandler(button); // add event listener             button.addActionListener(bh);                          panel.add(button);         }              }          static class AnotherHandler implements ActionListener{         JButton button;         AnotherHandler(JButton buttonP){             button=buttonP;         }         @Override         public void actionPerformed(ActionEvent e) {             for (JButton but : buttons) {                 but.setBackground(new Color(rand.nextInt(256),                                             rand.nextInt(256),                                              rand.nextInt(256)));             }         }     } }


Generating points along perimeter of circular feature in ArcMap?

How do I generate equally spaced points on the circumference of a circular feature in ArcMap?   I am currently working on a project where I need 36 equally spaced UTM coordinates that form a silo.


I am currently studying ring theory, and with that ideals.   A typical occurrence in my textbook might be something like   Let $R$ be a ring, and $\mathfrak{a}\subset R$ an ideal in $R$, with $a\in\mathfrak{a}$, etc..  My question is, how do I write this by hand (on paper)? How do you guys manage to write the "ideal" a ($\mathfrak{a}$) different from the element $a$? Mine always seems to end up looking the same..


While solving some linear equation I Stopped on the following: How to rearrange coefficients and constants to find integer solutions for: $2xy+3x+3y=106$. If we take $x$ as a common factor from the first two terms then we get: $x(2y+3)+3y=106$. Any suggestion how to go farther..


Study the convergence or divergence of $\sum\limits_{n=1}^{\infty}\frac{1}{n\sin n}$.

Is $$\sum_{n=1}^{\infty}\frac{1}{n\sin n}$$ convergent or not?


Is this a correct use of a participial adjective?

I write this question intrigued by  topic.  The best and accepted answer states that "functioning relationship" means "a relationship that is working properly".  I did some research. The English corpus clearly shows that using "functioning" as an adjective is acceptable. But it is seldom used in the phrase "functioning relationship", and more often used, understandably, in phrases "functioning machine", "functioning computer"...  Anyway to get to the point, can someone explain to me why/how "functioning relationship" means "a relationship that is wroking properly", and not "a relationship that is causing function" - which would be a logical conclusion of its meaning by observing other participial adjectives (boring homework, annoying noise, thrilling experience)  (Not a duplicate because in the other topic my question is not explained. It is just stated as a fact "2+3=5".)


Is it mandatory to have published papers while applying for PhD?

I've heard from people saying that while applying for PhD, you need to have past experience in researching something and should have international publications. I was like more concentrated towards practical experience and have't had any publications. If I am aspiring to do PhD and want to apply, it would be impossible if such a criteria exists!


Which variables determines the champion select position?

When I play duo ranked, my partner always gets first pick, and I'm last pick.  Sometimes I do duo queue with another person, and that person goes third, and I'm second.  The position is determined by which variables? elo? playing behaviour? wins/loses? league points?


When I type in sudo apt-get update, I get this error:  $ sudo apt-get update N: Ignoring file 'getdeb.list.bck' in directory '/etc/apt/sources.list.d/' as it has an invalid filename extension E: Type '' is not known on line 3 in source list /etc/apt/sources.list.d/libdvdcss.list E: The list of sources could not be read.


Since a shapefile can only contain a single geometry type (e.g. point, polygon, etc), how could I persist both?   If I must create a shapefile for each geometry type, how can I pass them to a colleague to load?  In kml I can just pass the single kml to load.  Is there a shapefile manifest equivalent that I am missing?


How can parallel Bash process be killed?

I need a way to kill all the processes used in the script below. I removed all the unnecessary code and made it as simple as I can, without ruining the structure.  I made the kill_other function for that, which when called (after CTRL + C is pressed) is suppose to kill everything.  Right now if I kill the script, functionOne and adb logcat continue running.  How can I kill them?  Also, since I'm fairly new to the trap function I have to ask have I positioned it correctly in the code?  EDIT : I am running this script on Ubuntu 19.04 and my target is an Android phone, if someone needs the info.  #!/bin/sh  kill_other(){     ## Insert code here to kill all other functions     exit }  trap 'kill_other' SIGINT  main(){      functionOne &      adb logcat > log_test.log &      while true         do             echo "==================================================================="             memPrint             sleep 10         done }  functionOne(){     while true         do             sleep 20             echo "==================================================================="             echo "Starting app 1"             echo "==================================================================="             functionTwo              sleep 20             echo "==================================================================="             echo "Starting app 2"             echo "==================================================================="             functionThree         done }  functionTwo(){     adb shell monkey -p com.google.android.youtube -c android.intent.category.LAUNCHER 1 }  functionThree(){     adb shell monkey -p tv.twitch.android.app -c android.intent.category.LAUNCHER 1 }  memPrint(){     adb shell dumpsys meminfo | grep -A 10 "Total PSS by process\|Foreground\|Perceptible\|Total RAM\|Home" }  ## Start main


How do I use the Chromatic Aberration correction tools in Lightroom?

When I upgraded from a 1000D to a 550D, my 18-55mm started to show more significant . This is probably due to the 8mpx difference between the two cameras.  Due to this, I've started playing with the CA controls of Lightroom and can't get it. I don't know really how it works, and no matter how much Red/Cyan or Blue/Yellow corrections I set, the image still shows CA.  Do you have any advice with this function?  Also, what does "Defringe" tool do?


I’m sorry to ask such a vague question as I’m not able to put into words a certain question that I have in mind. I will do my best to describe this question. If I was to create a vacuum inside a box making it devoid of any form of matter or radiation , what will the resulting space inside the box consist of? More specifically, how is this space different from a computer simulated 3 dimensional space?


Why is there a difference between additive and subtractive trichromatic color theories?

Helmholtz distinguished between  and  trichromatic color theories.   Additive theories concern optical combinations of colored light sources and are usually modelled on RGB while subtractive theories model pigment mixing and are usually modelled on RYB or CMY.  What is the physical basis of this distinction?


I have searched for how feature importance in random forest works, but I could not understand. Can anyone explain how it works?.  How random forest selects feature importance by Gini?


Is the "Roman alphabet" what we use for English?

I understand that the alphabet for the English language is not strictly English as languages such as French, Dutch and many more use the same alphabet, with few additions in other languages. Is Roman alphabet the common term to refer to this set of symbols for writing texts?


Upgrade from 20.10 to 21.04: No new release found

I would like to upgrade from 20.10 to 21.04. But do-release-upgrade returns "no new release found". /etc/update-manager/release-upgrades: Prompt=normal $cat /etc/lsb-release  DISTRIB_ID=Ubuntu DISTRIB_RELEASE=20.10 DISTRIB_CODENAME=groovy DISTRIB_DESCRIPTION="Ubuntu 20.10"  I executed following steps:  sudo apt update sudo apt upgrade sudo apt dist-upgrade sudo apt autoremove sudo do-release-upgrade  but last steps returns "no new release found". Do you have any hints what to check next?


Why are some journal articles so expensive?

Why are some journal articles so expensive, such as  that costs more than $12.55 per page to purchase?


Add a section in the mod help center about redactions

The  is helpful, especially for new moderators. It contains information that mods need (and a warning not to copy stuff out).  One of the most commonly asked things in the TL is how to redact posts.    . It's not intuitive at all. So, what could be a better thing to put in the mod help center than something that lots of mods have trouble with?


I have a really hard time learning math when I can't find any justifications for the existence of infinity (in this case actual infinity).  Are there any justifications for the Axiom of Infinity?   Thank you very much.


Do I need to put copper pieces on the eyes to cast the Gentle Repose spell if I have a spellcasting focus?

The material components of the  spell are:  a pinch of salt and one copper piece placed on each of the corpse's eyes, which must remain there for the duration  The rules for  (PHB p. 203) state:  A character can use a component pouch or spellcasting focus in place of the components specified for a spell. But if a cost is indicated for a component, a character must have that specific component before he or she can cast the spell. If a spell states that a material component is consumed by the spell, the caster must provide this component for each casting of the spell.  The material component is not explicitly consumed by gentle repose, although the spell does specify with unusual detail how the components are to be used and how the components must remain with the body for the spell to function. This is different to the normal scenario where you just wave the component about then put it back into your pocket. The component is expected to actually do something. While the material component is a thing with monetary value (because it is money), it does not explicitly specify a cost. Based on  on detect thoughts (which also has a copper piece as a material component), I assume that the copper pieces do not count as having an indicated 'cost' for the purposes of being a material component. If I have a spellcasting focus I can use, can I avoid the need to place copper pieces on each of the corpse's eyes? Or must I still put copper pieces on the eyes even if I have a spellcasting focus?  Due to repeated confusion, I thought I would say this outright. This question is not a duplicate of  That question was concerned with the value of the copper pieces. However, this question is concerned with what you must do with the copper pieces. Detect thoughts does not specify what must be done with the copper pieces. Gentle repose specifies that something specific must be done with the copper pieces for the spell to work. Does the clause on what must be done with the material component, irrespective of its cost, void your ability to use a spellcasting focus?


Why does my bibtex entry only show part of the author field?

Why does my .bib entry only show part of the author field? The entry: @misc{pdal_contributors_2018_2556738,   author = {PDAL Contributors},   title = {PDAL Point Data Abstraction Library},   month = nov,   year = 2018,   doi = {10.5281/zenodo.2556738},   url = {https://doi.org/10.5281/zenodo.2556738} }  And use it like: \parencites[]{pingel}[]{pdal_contributors_2018_2556738}  And it shows as:  (Pingel, Clarke ja Mcbride 2013; Contributors 2018),  When it should be:  (Pingel, Clarke ja Mcbride 2013; PDAL Contributors 2018),


Why can't we use conservation of mechanical energy here?

Consider a particle of mass $\text{m}$ fired from below into a bob of mass $\text{M}$ of a long, simple pendulum. The particle remains inside the bob and the bob rises through a height of $1.8\text{ m}$. What was the speed of the particle just before striking the bob?  I took the bob, the particle and the earth to be in a system and reasoned that their total mechanical energy must be conserved, since no external forces act on the system and all internal forces are (I think) conservative. Then, I set my reference line for measuring potential energy to be at the level of the bob before the collision. The kinetic energy of the system just before the collision must be equal to the gravitational potential energy at the highest point of the bob's motion. $$\begin{align}\frac{1}{2}mv^2&=(M+m)gh \\ v &= \sqrt{\frac{2(M+m)gh}{m}} \end{align}$$ However, my textbook uses the principle of conservation of linear momentum and the laws of kinematics:  If $\text{V}$ is the velocity of the combined mass after the collision, $(M+m)V=mv$. This gives: $$V=\frac{mv} {M+m}$$ As the string becomes loose and the bob goes up with a deceleration of $\text{g}$, coming to rest at a height $\text{h}$, we can use the equation $v^2=u^2+2ax$. $$h=\frac{V^2}{2g}=\frac{m^2v^2}{2g(M+m)^2}$$ $$v=\frac{M+m}{m}\sqrt{2gh}$$  Why did we get a larger answer this time? My intuition is that be conserving the mechanical energy of the system in the first method, I ignored possible energy losses in the deformation of the bob. Is my intuition correct?


Rigor in showing limit of $\frac{\cos(\Delta x)-1}{\Delta x}=0$

The standard derivation for $\frac{\mathrm{d}}{\mathrm{d}x}\sin(x)$ involves using the fact that  $$\lim_{\Delta x \to 0}\frac{\cos(\Delta x)-1}{\Delta x}=0$$  It's trivial to show that  $$\lim_{\theta\to 0} \cos(\theta)-1= 0$$  but the first limit doesn't follow directly from the second without a bit more work to handle the division.  How can we make this more rigorous?


I recently booted up an old PC Tower of mine (like from 2003) because I wanted a PC to use for writing. It has XP on it, but it is stuffed to the gills with old programs and files, so much so that I thought it would be easiest to just start clean with Ubuntu.  I followed the directions for a bootable USB, and was able to get to the installation stage, but it always freezes when it comes to the screen that asks if I want to install over XP. The only thing I can do is cancel it, and then it says there was an unrecoverable internal error. I thought perhaps XP was just being a booger and tried to wipe it from the hard drive, but (Newbie) I was having trouble with that using the Command Prompt.   I guess my question is what should I do? Could my PC just be too old? Is the problem that I don't have internet connected when I'm trying to install? Is it XP?  Any suggestions would really help, because I'm stumped!   Thanks!  Edit: Trying to install 12.04


I don't understand why the sieve of eratosthenes doesn't prove an infinite number of primes.  For example the number 2 eliminates 1/2 of an infinite number of numbers.  The next prime, 3, eliminates 1/3 of the remainder, not 1/3 of all the numbers and so on.  5 would eliminate 1/5 of the remaining numbers. Why doesn't that prove an infinite number of primes? Thanks


When motion begins, do objects go through an infinite number of position derivatives?

This might be a very vague and unclear question, but let me explain. When an object at rest moves, or moves from point $A$ to point $B$, we know the object must have had some velocity (1st derivative of position) during that trip. It's also true that the object had to have accelerated to gain that velocity (2nd derivative)... if we extend this argument, is it logical to say that the object must have experienced jerk (3rd deriv.) to gain that acceleration? And so on and so forth... 3rd, 4th, 5th position derivatives? Or is my logic flawed somewhere?


Space which is path connected but not locally path connected

Can you give an example of a topological space which is path connected but not locally path connected, besides the graph of $\sin(1/x)$?


Installing Xubuntu on old HP with Windows XP

I am interested in installing Xubuntu on an old HP running Windows XP (2003 Home Edition). The BIOS does not allow the alternative of booting from USB, nor do I have a CD/DVD-writer. I read in another thread that you can mount the iso-file (with Xubuntu) as a virtual disc of sorts (using e.g. VirtualClone I think it was), but my question is: is it possible to install Xubuntu from a virtual CD or do I need to either burn a CD/DVD or re-write the BIOS, allowing USB-booting? All assistance is much appreciated, I am a beginner at this.


32 people were invited at a party and started exchanging handshakes. Because of the confusion, each of them shook hands with each other multiple times: at least twice and up to X times. However, every two people exchanged different number of handshakes from every other two. What is the minimum possible number X, so that the above condition is met?


Acroread can't edit annotations: Commenting Not Allowed

I started annotating a pdf on a windows machine but then I wanted to make some changes on my Linux machine later. I have the native Linux acroread 9 installed which can do comments but there's a 50% chance a given document is locked or in some way broken and in File->Properties->Security, Commenting: Not Allowed (for that matter this might happen with the latest versions too, not sure). I also run into huge performance issues when viewing comments (extreme, and I mean extreme, lag on a decent PC).  So I thought I'd try a newer version of Adobe reader under wine. This did not work out at all (as of July 2014) with the installer failing to create any files or crashing at launch when copying from a windows install.  How can I reliably add/edit annotations to PDFs on linux, yet allow all those non-techie people who use the windows and Adobe reader to see and interact with them?


Direct sum of finitely-many non-abelian groups

Consider two non-necessary-abelian groups $(A,\circ)$ and $(B,\circ)$.  It seems that the notion of direct sum $(A,\circ) \oplus (B,\circ)$ is only used in the case that both groups are abelian, and in that case the direct sum coincides with the direct product.  However, the direct sum of permutations is a common notion. More generally, the direct sum of matrices is well-defined, and thus one might define the direct sum of matrix groups.  What is the problem with direct sums of non-abelian groups? What can we do when restricting to finite direct sums, perhaps of merely finite groups?  EDIT: Considering the answer by MarcPaul and Qiaochu Yuan, I presume that the notion of direct sum of finitely many groups can be used, though it is not necessary natural to do so.  Let $G_1$ and $G_2$ be groups, let $G = G_1 \oplus G_2 := G_1 \times G_2$ be the supposed direct sum. We want this two satisfy the universal property as described by MarcPaul. We note that   $(g_1,g_2) = (g_1,e_2) (e_1,g_2)$   for any $(g_1,g_2) \in G_1 \times G_2$. Let $H$ be any group, and let $f : G \rightarrow H$ be a group homomorphism. Then we set  $f_1 : G_1 \rightarrow H, \quad g_1 \mapsto (g_1,e_2)$ $f_2 : G_2 \rightarrow H, \quad g_2 \mapsto (e_1,g_2)$  and with that  $f(g_1,g_2) = f(g_1,e_2) f(e_1,g_2) = f_1(g_1) f_2(g_2)$.  In conclusion, if we are given $f : G \rightarrow H$ we can construct $f_i : G_i \rightarrow H$, if we are given $f_i : G_i \rightarrow H$ we can construct $f : G \rightarrow H$, and those constructions are inverse to each other. The natural property holds.


On the ''smallness'' assumption in the Freyd-Mitchell's Embedding Theorem

The Freyd-Mitchell's embedding theorem asserts that if $\mathcal{C}$ is a small abelian category, then there exists a ring $R$ and a fully faithful, exact functor $F$ from $\mathcal{C}$ to the category of left modules over $R$.  My question here is that: Do we really need $\mathcal{C}$ to be a small category? I am a little bit confused since the  includes smallness in the statement of the theorem, while Ravi Vakil, in his Foundations of Algebraic Geometry  (section 1.6.4), only requires $\mathcal{C}$ to be a locally small abelian category.


Edit:    From another question I provided an answer that has links to a lot of questions/answers about singletons:   So I have read the thread  And the argument still rages.  I see Singletons as a Design Pattern (good and bad). The problem with Singleton is not the Pattern but rather the users (sorry everybody). Everybody and their father thinks they can implement one correctly (and from the many interviews I have done, most people can't). Also because everybody thinks they can implement a correct Singleton they abuse the Pattern and use it in situations that are not appropriate (replacing global variables with Singletons!).  So the main questions that need to be answered are:   When should you use a Singleton How do you implement a Singleton correctly   My hope for this article is that we can collect together in a single place (rather than having to google and search multiple sites) an authoritative source of when (and then how) to use a Singleton correctly. Also appropriate would be a list of Anti-Usages and common bad implementations explaining why they fail to work and for good implementations their weaknesses.  So get the ball rolling: I will hold my hand up and say this is what I use but probably has problems. I like "Scott Myers" handling of the subject in his books "Effective C++"     Good Situations to use Singletons (not many):         Logging frameworks   Thread recycling pools      /*  * C++ Singleton  * Limitation: Single Threaded Design  * See: http://www.aristeia.com/Papers/DDJ_Jul_Aug_2004_revised.pdf  *      For problems associated with locking in multi threaded applications  *  * Limitation:  * If you use this Singleton (A) within a destructor of another Singleton (B)  * This Singleton (A) must be fully constructed before the constructor of (B)  * is called.  */ class MySingleton {     private:         // Private Constructor         MySingleton();         // Stop the compiler generating methods of copy the object         MySingleton(MySingleton const& copy);            // Not Implemented         MySingleton& operator=(MySingleton const& copy); // Not Implemented      public:         static MySingleton& getInstance()         {             // The only instance             // Guaranteed to be lazy initialized             // Guaranteed that it will be destroyed correctly             static MySingleton instance;             return instance;         } };   OK. Lets get some criticism and other implementations together. :-)


If |G/H|=4 then G is union of three proper subgroups

If |G/H|=4 and G/H  is not cyclic then G is union of three proper subgroups. I understand that there are three subgroups of order two in the G/H group. Consequently, in the group G there are three subgroups A, B, C of index two which in them pass under the homomorphism. But how to prove that G is a union of the subgroups A, B, and C


I'm trying to make a double divion with this code:  int a = 5; int b = 5; double result = (a + b) / 4;   How to get a 2.5 as a result and not 2, please?  Thanks in advance!


I've heard some advanced photographers talk about using back-button autofocus.  As I understand it, this involves changing one of the camera's custom setting to engage the AF when a button on the rear of the camera is pressed (as opposed to half-pressing the shutter button).  What is the advantage to back-button autofocus?  Any suggestions on why one would want to switch to this method?


Why toilet paper is softer in moist air?

After a hot shower,the air from the bathroom is full of water steam,right?  How does the air affect the texture of the toilet paper?I mean,the toilet paper it seems to be softer,but why?  Can someone explain me,please?


Is *race* a synonym of *species* or is just a common mistake?

It's very common -- specially in fantasy and science-fiction -- to use race instead of species. For example:  “In Middle Earth (...) Aragorn (race: men) (...) Bilbo (race: hobbit)”  “Tarkin's motivation was the enslavement of the Wookiee race for use as manual (...)” “The human race has only one really effective weapon and that is laughter.”  Shouldn't be used species instead? From the Oxford dictionary:  . Biology. a group of living organisms consisting of similar individuals capable of exchanging genes or interbreeding. The species is the principal natural taxonomic unit, ranking below a genus and denoted by a Latin binomial, e.g. Homo sapiens. 2. each of the major divisions of humankind, having distinct physical characteristics: people of all races, colours, and creeds.


I'm trying to create a basic database and insert three users, but it doesn't work.   This is a class that creates the database  package com.example.matadoor.db1;  import android.content.Context; import android.database.DatabaseErrorHandler; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteOpenHelper;  /** * Created by matadoor on 06/08/2016. */ public class dbcreat extends SQLiteOpenHelper {      public final String tbname="t1";     public final String cid="id";     public static String cid2="test";     public final String user="username";      public final String creat="CREATE TABLE "+cid2+"("+cid+"INTEGER primery key AUTO_INCREMENT , "+user+" TEXT); ";      public dbcreat(Context context) {         super(context,cid2,null, 1);     }      public dbcreat(Context context, String name, SQLiteDatabase.CursorFactory factory, int version, DatabaseErrorHandler errorHandler) {         super(context, name, factory, version, errorHandler);     }      @Override     public void onCreate(SQLiteDatabase db) {         db.execSQL(creat);     }      @Override     public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)     {  }   And it's the other class which handles the database - opens it, closes it, and inserts into it     package com.example.matadoor.db1;  import android.content.ContentValues; import android.content.Context; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase;  /** * Created by matadoor on 08/08/2016. */ public class dbhandler {      private dbcreat dbc;     private SQLiteDatabase sdb;      public  dbhandler(Context context)     {         dbc=new dbcreat(context);     }      public void open()     {         sdb=dbc.getWritableDatabase();     }      public void close(){         dbc.close();     }      public String display(int row)     {         Cursor cu=sdb.query(dbc.tbname,null,null,null,null,null,null);         cu.moveToPosition(row);         String user=cu.getString(1);         return user;     }       public void insert(String user)     {         ContentValues cn=new ContentValues();         cn.put(dbc.user,user);     } }   And the main class which has one Button for inserting a user into the db  package com.example.matadoor.db1;  import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button;  public class Main extends AppCompatActivity {      Button btn;     dbhandler db;      dbcreat dbc;     @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.main);          btn=(Button)findViewById(R.id.ins);         // dbc.getWritableDatabase();         db.open();          db=new dbhandler(this);         btn.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 String [] user={"ali","reza","ahmed"};                  for(int i=0;i<user.length;i++)                 {                     db.insert(user[i]);                 }             }         });       } }


Encouraging users to flag off-topic posts before making a comment that it is off-topic to avoid cross-posting

I have seen many examples on SO and other websites where users tell the OP that it is off-topic and it belongs to X website. It leads to cross-posting by the OP because they don't know about migration.  Specifically many people tell that this belongs to codereview for reviews. But due to people not flagging the question is cross-posted. A simple comment explaining that it has been flagged for migration would be very helpful.  How to make people on SO and other sites aware that they should flag for moderator attention before making such comments so such cross-posting is avoided? Is there a way? Like a community news page or something?


What does ~$ stand for? For example:  user@ubuntu:~$   So far I know that the $ sign is a symbol for a regular user. If I'm not mistaken root have # at the end.   I also found a lot of commands in the forums that begin with $:  $ sudo apt-get update    So for what does $ actually stand for?  EDIT (28.01.2014) :  Today I came across this video that totally answers my question from 8 months ago and decided to share it here :)  BASH Basics -


enumerate with Arabic numbers and right parentheses

Cannot really figure out how to create such a list:  1) List item  2) List item  3) List item  Here's what I have to use so far:  \begin{enumerate}     \item[1)] List item     \item[2)] List item     \item[3)] List item \end{enumerate}   Without these [1)]..[3)] dots appear instead of parentheses.


What is the best fit data structure to work with Sets in C#

Assume I need to compare multiple sets and find which are equals or not.  In the end, I need to compare multiple sets and create a final set, with unique data taken from each set. Also I need to handle all items  which are repeating in different sets.


There was an add-on called Power Commands (Now productivity power tools) in visual studio to format the code on save.   I was so used to see my code format on save that I cannot change that habit. Is there a way to do that in Eclipse?  I can only assign one thing to Ctrl+S otherwise because if I assign Save & Format Code to the same keys, once I press the shortcut it will do neither but propose me what I want to do with the shortcut. Is there an add-on or a way to do it?


Windows 7 update will only install Windows 10

I went to update my computer yesterday which currently is running Windows 7 professional.  Every time i go into the Control Panel and to updates though it only shows update to Windows 10 even though it has a list of Windows 7 updates that i wan't to actually install instead of the "upgrade".  I was wondering if there was any way to stop this from coming up?


Bringing out text within an Image Texture

I've only been using blender a few days and I'd love to be pointed in the right direction on to how to alter the text I have within my image textures   I want to make the text on the labels stand out by maybe making them glossy like the lids whilst still keeping the rest of the label glossy and with the shaders I already have set. Can I edit this from the image texture or could i maybe add a seperate text layer from the image texture and add on top?? (I haven't explored anything like text yet and I'm pretty lost on what I can do!)  Thanks any advice is greatly appreciated!


Error while trying to install software update

sudo apt-get upgrade Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 5 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable Setting up tzdata (2020f-0ubuntu0.20.04.1) ... debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable dpkg: error processing package tzdata (--configure):  installed tzdata package post-installation script subprocess returned error exit status 1 Setting up linux-modules-nvidia-450-5.8.0-38-generic (5.8.0-38.43~20.04.1) ... debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable dpkg: error processing package linux-modules-nvidia-450-5.8.0-38-generic (--configure):  installed linux-modules-nvidia-450-5.8.0-38-generic package post-installation script subprocess returned error exit status 1 Setting up hddtemp (0.3-beta15-53) ... debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable dpkg: error processing package hddtemp (--configure):  installed hddtemp package post-installation script subprocess returned error exit status 1 dpkg: dependency problems prevent configuration of linux-modules-nvidia-450-generic-hwe-20.04:  linux-modules-nvidia-450-generic-hwe-20.04 depends on linux-modules-nvidia-450-5.8.0-38-generic (= 5.8.0-38.43~20.04.1); however:   Package linux-modules-nvidia-450-5.8.0-38-generic is not configured yet.  dpkg: error processing package linux-modules-nvidia-450-generic-hwe-20.04 (--configure):  dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of linux-modules-nvidia-440-generic-hwe-20.04:  linux-modules-nvidia-440-generic-hwe-20.04 depends on linux-modules-nvidia-450-generic-hwe-20.04; however:   Package linux-modules-nvidia-450-generic-hwe-20.04 is not configured yet.  No apport report written because MaxReports is reached already                                                               No apport report written because MaxReports is reached already                                            dpkg: error processing package linux-modules-nvidia-440-generic-hwe-20.04 (--configure):  dependency problems - leaving unconfigured Errors were encountered while processing:  tzdata  linux-modules-nvidia-450-5.8.0-38-generic  hddtemp  linux-modules-nvidia-450-generic-hwe-20.04  linux-modules-nvidia-440-generic-hwe-20.04 E: Sub-process /usr/bin/dpkg returned an error code (1)


I can not increase or decrease the brightness of my screen on UBUNTU 15.10

just wondering if anybody knows what's the problem. I use the brightness bar control with my keyboard or in options, the computer shows me the brightness bar increasing or decreasing but the screen is still at max brightness.  My computer is: Gateway NV51M  CPU: Intel Pentium processor T4500  Graphic Card: Intel GM45 Express Chipset  OS: Ubuntu 15.10 64 bit    Please if anybody can help me, I'm frustrated :(


Is it possible to make zcat output text even if it's uncompressed?

The problem is I have some database dumps which are either compressed or in plain text. There is no difference in file extension etc. Using zcat on uncompressed files produces an error instead of the output.  Is there maybe another cat sort of tool that is smart enough to detect what type of input it gets?


How to temporarily disable sleep and hibernate from the command line

It seems like there are many ways in which a Ubuntu's settings can be permanently manipulated to sleep when desired as long as predetermined conditions are met.  However, these are more permanent solutions that don't take into account rare tasks that may want to temporarily fore go standard policy.  The problem that I am running into is that I have a very long running script to do some backups and I don't want the computer to sleep or hibernate while that particular process is running which usually take 30-50 minutes.  Therefore, is there a command that I could include into my backup script that would prevent the system from hibernating/sleeping while the backup script is running and is there also a command to restore the normal default power policy after the backup has finished?  something like  #!/usr/bin/bash #disable normal powerpolicy disable-power-policies backup /dev/sda /dev/sdb /dev/fioa /dev/fiob #enable power policies. enable-power-policies


Do functions with composition form a ring?

Functions with composition form a monoid, and injective functions with composition form a group. Is there in some sense a natural or useful definition for "addition" that would enable formation of a ring? If not, is there a sensible subset of functions where this is possible?


Find an orthonormal basis in which $E$ is represented by matrix

Let $W$ be the subspace of $R^2$ spanned by the vector $(3, 4)$. Using the standard inner product, let $E$ be the orthogonal projection of $R^2$ onto $W$.  Find   (a) a formula for $E(x_1, x_2)$ ;  (b) the matrix of $E$ in the standard ordered basis;   (c) $W^\bot$;  (d) an orthonormal basis in which $E$ is represented by matrix  \begin{bmatrix}1 & 0 \\ 0 & 0\end{bmatrix}  Attempt: $$E(x_1,x_2)=\frac{((x_1,x_2)|(3,4))}{25}(3,4)= \left( \frac{9x_1+12x_2}{25},\frac{ 12x_1+16x_2}{25} \right) $$   So in the standard basis the matrix is $$\frac{1}{25}\begin{bmatrix}9 & 12 \\ 12 & 16\end{bmatrix}.$$  The set $W^\bot$ is $\{ (x,y) \in R^2 ; ((x,y)|(x',y'))=0 \;\; \forall (x',y') \in W \} =$ $\{ (x,y) \in R^2 ; x = - \frac{4}{3} y \} $.  now I can not find a basis such that the matrix of E in this is \begin{bmatrix}1 & 0 \\ 0 & 0\end{bmatrix} Apparently the system  $E(a,b)=(1,0);E(c,d)=(0,0) $  has no solution, if I'm doing it right. Any suggestion?


As a beginner, I'm really confused about size_t. I can use int, float or other types. Why still declare size_t type. I don't feel its advantages. I've viewed some , but I still can't understand it.


Why you can't connect two power supplies of different voltage and/or current ratings in parallel nor series?

Or if you can under some conditions, why is is a bad practice?


How to turn off animation in Lenovo A6000 Plus

I am using Lenovo A6000 Plus smartphone.  I want to turn off all the animations. But in  Developer options there are only few options. The animation option is missing. I searched but I didn't find anything.   Screenshot (click to enlarge)


Is there a combinatorial way to see the link between the beta and gamma functions?

The  gives a simple formula for it in terms of the gamma function.  Using that and the fact that $\Gamma(n+1)=n!$, I can prove the following formula: $$ \begin{eqnarray*} \frac{a!b!}{(a+b+1)!} & = & \frac{\Gamma(a+1)\Gamma(b+1)}{\Gamma(a+1+b+1)}\\  & = & B(a+1,b+1)\\  & = & \int_{0}^{1}t^{a}(1-t)^{b}dt\\  & = & \int_{0}^{1}t^{a}\sum_{i=0}^{b}\binom{b}{i}(-t)^{i}dt\\  & = & \int_{0}^{1}\sum_{i=0}^{b}\binom{b}{i}(-1)^{i}t^{a+i}dt\\  & = & \sum_{i=0}^{b}\binom{b}{i}(-1)^{i}\int_{0}^{1}t^{a+i}dt\\  & = & \sum_{i=0}^{b}\binom{b}{i}(-1)^{i}\left[\frac{t^{a+i+1}}{a+i+1}\right]_{t=0}^{1}\\  & = & \sum_{i=0}^{b}\binom{b}{i}(-1)^{i}\frac{1}{a+i+1}\\ b! & = & \sum_{i=0}^{b}\binom{b}{i}(-1)^{i}\frac{(a+b+1)!}{a!(a+i+1)} \end{eqnarray*} $$ This last formula involves only natural numbers and operations familiar in combinatorics, and it feels very much as if there should be a combinatoric proof, but I've been trying for a while and can't see it. I can prove it in the case $a=0$: $$ \begin{eqnarray*}  &  & \sum_{i=0}^{b}\binom{b}{i}(-1)^{i}\frac{(b+1)!}{0!(i+1)}\\  & = & \sum_{i=0}^{b}(-1)^{i}\frac{b!(b+1)!}{i!(b-i)!(i+1)}\\  & = & b!\sum_{i=0}^{b}(-1)^{i}\frac{(b+1)!}{(i+1)!(b-i)!}\\  & = & b!\sum_{i=0}^{b}(-1)^{i}\binom{b+\text{1}}{i+1}\\  & = & b!\left(1-\sum_{i=0}^{b+1}(-1)^{i}\binom{b+\text{1}}{i}\right)\\  & = & b! \end{eqnarray*} $$ Can anyone see how to prove it for arbitrary $a$? Thanks!


Is it possible to fix Xbox 360 slim red ring?

When I turn my Xbox on, the fan spins and the green light comes on, but after 10 seconds the green light goes red. I have got it working before but now its stopped, I can't get it to work anymore.  I have got an Xbox 360 slim 250gb. Is this possible to fix?


How can I implement a JavaScript that submit this form according to the clicket button?

I have the following problem that I can't solve:  I have this form into an HTML table:  <th width = "8.33%">     <form id="actionButton" action="salwf.do?serv=1" method="post">         <button name="accept" value="Accept" type="submit" class="acceptButton">ACCEPT ICON BUTTON</button>         <button name="cancel" value="Cancel" type="submit" class="cancelButton">CANCEL ICON BUTTON</button>         <button name="sap" value="SAP" type="submit" class="sapButton">SAP ICON BUTTON</button>         <input id="testId" name="test" type="hidden">     </form> </th>   As you can see this form contain 3 JQuery button element and an hidden input tag.  I need to create a Javascript that do the following operations: when the user click on one of the previous 3 buttons it take the value of the clicked button (Accept or Cancel or SAP) and submit it (in a POST request).   Can I do something like this using JavaScript? How can I implement it?


I posted a security-related answer  on Stack Overflow, and I'd like to know if someone edits any part of it, not just the code. How can I do that? Is it even possible? I looked at both pages of the , but didn't see a solution. The most relevant thing was , which seems to imply that it's not possible to get notifications for every edit:   Add the ability to unfollow one's own question or answer.


How to dual boot on Dell Inspiron 3521 laptop preinstalled with Windows 8?

I recently bought a Dell Inspiron 3521 (15”, Intel i3 processor, 4GB RAM, 500GB hard drive, A07 BIOS from InsydeH2O) with Windows 8 pre-installed. I expected to be able to install Ubuntu 12.04.2 from CD and dual-boot, as I do with my other main laptop (which has Windows 7). 95% of my work is done under Ubuntu, but I want to preserve access to Windows for a few things that require it.  This turned out to be MUCH harder than I expected. Forums provided conflicting and misleading info. No BIOS manual is available and Dell technical support didn’t officially want to help me as they said Ubuntu was unsupported (though some of the techss were nice to me and gave me some suggestions, unfortunately useless).  Questions: Can you boot from a CD under UEFI? Will the installation work if I boot Ubuntu in legacy mode? Should I have Secure Boot enabled or disabled? Why doesn’t the Ubuntu installer see the Windows system? If I repartition the drive manually, how should I do it? But mostly, what is the overall strategy for getting Ubuntu installed alongside Windows on this machine?  I’m an experienced user, but I don’t normally have to deal with technical boot issues or partitioning.  If I can’t figure it out, will it work to just trash the Windows installation and install Ubuntu on the whole drive?  Here is my Boot-Repair info:    1. Legacy mode or UEFI?  The BIOS offers the option to switch between Legacy mode and UEFI.  Booting from the Ubuntu CD in legacy mode is no problem. But if I do that and install Ubuntu, won’t it be a problem that Ubuntu was installed as legacy and Windows as UEFI?  I thought it was better to install Ubuntu from a CD booted under UEFI, and imagined I would be able to boot from the CD under UEFI by changing the BIOS settings to allow booting from CD. There is a tab in the UEFI section of the BIOS called “Add Boot Option” which on the face of it seems to offer a way to do this. If I select “Add Boot Option,” it asks for a name for the new boot option and then you can choose a file system and file path. But the only two file systems presented as options appear to be two partitions of the hard drive (they have very long names starting with Acpi). And there is no info anywhere on what to put in as the file path.  Interestingly, when I made recovery disks for the Windows system and tried to boot from them under UEFI, it recognized them, and then briefly presents the CD under the following file system name in the UEFI menu: Acpi(PNP0A03,0)/Pci(1FI2)/Sata(2,0,0)/CDROM(Entry 1).  2. If I use UEFI, should I have SecureBoot enabled?  Also, should have the Legacy OPROM on and what does that mean anyway? Should I have SecureBoot in Standard or Custom mode? Note that I already disabled fast startup in the Windows 8 settings.  3. Why doesn’t the Ubuntu installer see Windows 8?  When I boot the Ubuntu CD in legacy mode, and start the process of installing Ubuntu, it doesn’t see the Windows 8 OS. It just gives me two options: “Erase the disk and install Ubuntu” and “Do something else.” It doesn’t give me the “Install Ubuntu alongside other operating systems” option.  4. How can I edit the partition table to give Ubuntu space on the HD?  If I then click on “Do something else,” the partition table comes up with 6 partitions all of which are being used by Windows. Can I edit and rearrange the partitions to get Ubuntu to work? If so, how?    UPDATE  After much trial and error I figured out the reason for my problem. I was using an Ubuntu 12.04.2 image which had no EFI folder or other EFI boot information. (This despite the assurances everywhere that Ubuntu 12.04.2 is UEFI compatible. Admittedly, I downloaded the image from a mirror rather than from the official Ubuntu website).  Without an EFI folder, EFI boot managers (whether the built-in Dell one or rEFInd) do not recognize the Ubuntu image as bootable.  I downloaded another Ubuntu image and presto, it was recognized, and I was able to install it correctly. (Although I did have to shrink the Windows partitions and create partitions for Ubuntu manually.)


What requests do browsers' "F5" and "Ctrl + F5" refreshes generate?

Is there a standard for what actions F5 and Ctrl + F5 trigger in web browsers?  I once did experiment in IE6 and Firefox 2.x. The F5  refresh would trigger a HTTP request sent to the server with an If-Modified-Since header, while Ctrl + F5 would not have such a header. In my understanding, F5  will try to utilize cached content as much as possible, while Ctrl + F5  is intended to abandon all cached content and just retrieve all content from the servers again.   But today, I noticed that in some of the latest browsers (Chrome, IE8) it doesn't work in this way anymore. Both F5 and Ctrl + F5 send the If-Modified-Since header.   So how is this supposed to work, or (if there is no standard) how do the major browsers differ in how they implement these refresh features?


TV series about a young boy looking for glowing and spiky crystals

I am looking for a TV series that I watched around 2000 - 2005-ish. It was a sci-fi/ fantasy about a young boy traveling with his companions to some places, like caves or maybe other planets, and he was looking for some big glowing and spiky crystals. They were being chased by a dude in a robotic-like armor and helmet, so his face wasn't seen and the color may have been brown, I think. I remember that the dude eventually turned up good and they were betrayed by one of their own. The boy's group also had a creature companion, but I don't remember much about it, only that it was small. I also remember the end of the series - it ended that the boy like woke up or something and appeared in school with his school-mates being those companions.


What damage can a thief do with a scanned image of a passport?

My daughter, who lives and works in Hong Kong, applied on line for a visa to visit Vietnam. She scanned her passport, paid about $200 using a credit card and received a fake visa. She cancelled her credit card. I am concerned about what kind of identity theft she may be exposed to.  Fortunately, she did not provide her social security # or drivers license number and she physically has possession of her passport. However, the thieves have her picture, passport # and date of birth. Appreciate all advice.


How to make a bootable windows USB in Kali Linux

When I tried to boot my PC into Windows 10 I got a screen with a sad face saying unmountable_boot_volume.  After searching it said I needed a Windows 10 USB or CD which I do not have.  I still have access to Kali Linux on my PC by booting up with my SSD.  How can I make a bootable Windows USB with a ISO in Kali Linux OS?


Node.js: How to create an array from a string and another array?

Can someone explain to me if it is possible to create a new array from an array and a string? Example: I have this array: let array = ['value1', 'value2']  And this string: let testString = 'value3';  and I want to create an array from these two, which should look like this: ['value1', 'value2', 'value3']  How do I get this result? Is there a direct method for this or do I have to solve this with a loop?


Need help regarding String Derangements using Inclusion/Exclusion

I have this question that states:  Using Inclusion/exclusion, find the number of derangements of each of the following strings.  A) aabcd  B) aabbcc  I understand inclusion/exclusion I just don't understand how it applies to this type of question.  I would appreciate the help and some clarification on how to go about solving these types of problems.


How to prove that for Brownian motion in $(a, b)$ $\mathbb{E}^x[\min(H_a, H_b)] = (x-a)(b-x)$?

i'm wondering if anyone can help me with proving the fact that for BM in the interval $(a,b)$ and with $$H_y = \inf\{t>0: X_t = y\},$$ the following is true: $$\mathbb{E}^x[\min(H_a, H_b)] = (x-a)(b-x).$$   And the second question here is how to deduce that the speed measure for BM is actually the Lebesgue measure?  Thanks, Anna


Apache can't access folders in my home directory

I have changed the configuration of Apache to point towards a folder in my home directory:  <VirtualHost *:80>     ServerAdmin webmaster@localhost      DocumentRoot /home/dbugger/html      <Directory />         Options FollowSymLinks         AllowOverride None     </Directory>     <Directory /home/dbugger/html/>         Options Indexes FollowSymLinks MultiViews         AllowOverride None         Order allow,deny         allow from all     </Directory>      ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/     <Directory "/usr/lib/cgi-bin">         AllowOverride None         Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch         Order allow,deny         Allow from all     </Directory>      ErrorLog ${APACHE_LOG_DIR}/error.log      # Possible values include: debug, info, notice, warn, error, crit,     # alert, emerg.     LogLevel warn      CustomLog ${APACHE_LOG_DIR}/access.log combined      Alias /doc/ "/usr/share/doc/"     <Directory "/usr/share/doc/">         Options Indexes MultiViews FollowSymLinks         AllowOverride None         Order deny,allow         Deny from all         Allow from 127.0.0.0/255.0.0.0 ::1/128     </Directory>  </VirtualHost>   I have even given my /home/dbugger/html permission 777. But I still keep getting the same error message at http://localhost: "403 Forbidden"  What is it that I am missing?


Indian English: What usage is allowed for "doubt" (meaning "question")?

I have a doubt about having a doubt. I learned from  that in Indian English the word doubt is used to mean question, that is, as a countable noun. If my understanding is correct, the following is grammatical in InE:     I have two doubts about SQL. 1. Can I type in lower-case? 2. Does null equal null?   I’m curious about what other usages this has. Can you ask a doubt?      ? I captured a spy and asked him many doubts.   Is it a verb?     ? I captured a spy and doubted him for hours.   Are there other uses that are possible or things you’d think should be possible but in fact are not possible?