In the gravitational redshift, the frequency of photons radiated from some source is reduced. As the energy of a photon is given by $\hbar\omega$, if the frequency is reduced where is the lost energy?

I think the title says it. Did expansion of the universe steal the energy somehow?


I am trying to find the php.ini file on Ubuntu server with the command:   sudo vim /etc/php5   However, this tells me that the file does not exist. How can I find and edit the php.ini file?

I am currently trying to locate the correct php.ini file to edit it and restart apache so the changes will take place and I'm stumped.  I have found three different php.ini files (no idea why there are three)  this is how I found the files  $ sudo find / -name php.ini /etc/php5/cli/php.ini /etc/php5/apache2/php.ini /etc/php5/cgi/php.ini   I also did....  $ sudo php -i | grep 'Configuration File' Configuration File (php.ini) Path => /etc/php5/cli Loaded Configuration File => /etc/php5/cli/php.ini   I changed all of them (just to be sure) to the settings I wanted.  I restarted apache using  sudo service apache2 restart   The results...  * Restarting web server apache2   I reloaded the page and it showed that the php.ini file was not updated.  I know this because I used  echo ini_get('post_max_size');   Which was supposed to be changed to 20M but was still only 2M  I tried rebooting my computer thinking maybe that would stop the apache server and reload the php.ini file with the correct setting, but alas that attempt also failed.  Is there any chance there could be another php.ini file that could be interfering?


I have an iPhone 6 running iOS 9.3.1.  I just made a synchronization with its host MacBook Pro with no problem and which might not be related in any way to the problem I witness.  Upon opening Music on this iPhone, I just get this  image:   , with apparently not any function visible on the screen or hidden anywhere.  I tried to click within the usual corners where hidden functions are placed but didn't get any reaction.  I can close the application, reopen it.  Same dead end.  My iPhone isn't connected to any network outside of my phone provider. I don't have any Internet connection (on phone, on Bluetooth or on Wi-Fi).  I never used iCloud to stay on basic problems (there are already enough problems thus far). Here are my Settings > Music:   I did not try to shutdown the iPhone since I would like to understand what is this problem and its origin before trying to fix or kill it.    Among the technical details:   I am not using Apple Music (I don't even know how to). I am not using Siri. I am not using iCloud.   Any very similar question which involve any of these three functions might be a false duplicate.  Apple doesn't aknowledge if this is a bug but seems already aware that there is a real problem with the Music software since the number of  users reporting the exact same problem is regularly growing. Their actual receipe is just "restart it" which I dont consider a professionnal answer.    If you encountered the same problem, do you have any hint of which operation or configuration error might lead to it?  What may help to analyze this problem?

I synced all of the music in my iTunes Library to my iPhone (like it was an iPod).  I've been listening to the music in my Jeep for weeks by plugging into the USB port and choosing songs and playlists from the in-car radio's touchscreen.  (So I know the music is on the iPhone.)  Today, I want to listen to my music with headphones.  Thought I'd try Siri ... I told Siri to "Play Accept Yourself by The Smiths", and sure enough she played it!  (I thought it was pretty cool that worked, actually.)  When the song ended, I thought I'd chose something manually.  On the iPhone I touched the "Music" app/button on the home screen, it took me to a photo of a girl wearing headphones and the "Apple Music" logo.  No lists of songs, no other options.  I went to the "Settings" app, and selected "Music" and I noticed that "Show Apple Music" was switched to ON.  So I turned it OFF.  Went back to the "Music" app, and there's still nothing but the photo of the girl and the "Apple Music" logo.  What am I doing wrong?  How can I see the songs that are my iPhone?  Thanks!


I am learning about limits and there is something that I cant quite understand:  If we have the function:     $$ f(x) =\frac{x^2-1}{x-1} $$   Let's say that we want to see which value for y (image) the function approaches as x (domain) gets closer to 1. On a nutshell, we have to take this following limit:     $$ \lim_{x\to1}\frac{x^2-1}{x-1} $$   As soon as we look to this function, we realize that the function is not continuous at x = 1 (By the way, can I say that?).   I know the algorithm to figure out the solution of the limit:  First, there is the need of eliminating the function discontinuity. Usually, it is just a matter of factorizing the function into a new function which the exactly same image as the one before with one crucial difference: The function is continuous for all real numbers   My doubts:Is my way to think about it correct? Can I think like that?  Take the example above:       $$ f(x) = \frac{x^2-1}{x-1} $$   After factorizing, we get:  $$ f(x) = {x+1} $$  If we plot both functions, they are the same, although the second one has its continuity all along the real numbers domain  Thanks in advance

I've done some research, and I'm hoping someone can check me. My question was this:  Assume I have the function $f(x) = \frac{(x-3)(x+2)}{(x-3)}$, so it has removable discontinuity at $x = 3$. We remove that discontinuity with algebra: $f(x) = \frac{(x-3)(x+2)}{(x-3)} = (x+2)$. BUT, the graph of the first function has a hole at $x = 3$, and the graph of the second function is continuous everywhere. How can they be "equal" if one has a hole and the other does not?  I think that this is the answer:   Because the original function is undefined at the point $x = 3$, we have to restrict the domain to $\mathbb{R} \setminus 3$. And when we manipulate that function with algebra, the final result, $f(x) = (x + 2)$ is still using this restricted domain. So even though the function $f(x) = (x+2)$ would not have a hole if the domain were all of $\mathbb{R}$, we are sort of "imposing" a hole at $x = 3$ by continuing to throw that point out of the domain.   And then just to close the loop: Removing the removable discontinuity is useful because it allows us to "pretend" that we're working with a function that is everywhere continuous, which helps us easily find the limit. But the reality is that the function $f(x) = (x +2)$ is actually NOT continuous everywhere when we restrict the domain by throwing out the point 3. Or am I now taking things too far?   Thanks in advance!  EDIT: For anyone coming across this in the future, in addition to the excellent answers below, I also found this other question about the  helpful.


I copied this problem straight out of the textbook , and it won't compile. Compiler is gcc 5.4.0. this is the my program:  #include<iostream> #include<fstream> #include<string> using namespace std;  int main()  {     string fileName;     char ch;     fstream file;      cout << "enter a filename: ";     cin >> fileName;      file.open(fileName, ios::in);      if(file)     {         file.get(ch);          while(file)         {             cout << ch;              file.get(ch);         }         file.close();     }      else          cout << fileName << " could not be opened.\n";     return 0; }   Again, I copied this straight out of the text. In fact it fails immediately after this point:  #include<iostream> #include<fstream> #include<string> using namespace std;  int main()  {     string fileName;     char ch;     fstream file;      cout << "enter a filename: ";     cin >> fileName;      file.open(filename, ios::in);      // comment everything else out and compile still fails      return 0; }   this is the errors spit in the console:  chp12chal.cpp: In function ‘int main()’: chp12chal.cpp:15:32: error: no matching function for call to ‘std::basic_fstream<char>::open(std:: __cxx11::string&, const openmode&)’      file.open(filename, ios::in);                            ^ In file included from chp12chal.cpp:2:0: /usr/include/c++/5/fstream:1001:7: note: candidate: void std::basic_fstream<_CharT, _Traits>::open (const char*, std::ios_base::openmode) [with _CharT = char; _Traits = std::char_traits<char>; std: :ios_base::openmode = std::_Ios_Openmode]               open(const char* __s,        ^ /usr/include/c++/5/fstream:1001:7: note: no known conversion for argument 1 from ‘std::__cxx11:: string {aka std::__cxx11::basic_string<char>}’ to ‘const char*’   So I'm not sure what all of that means. Though I only started having this problem once I started taking user input as a variable for the input stream.   When I simply code in the path of the file to open it works fine.   Also, I know fileName and filename are not spelled the same, but that's the way it is done throughout the book in numerous examples so I'm leaving that as so.   Could this be a compiler specific issue?  addendum:  I did also try:  string fileName; fileName = "chp12txt.txt"; char ch; fstream file;  file.open(fileName, ios::in);   To rule that out and still get same errors.

This should be a fairly trivial problem. I'm trying to open an ofstream using a std::string (or std::wstring) and having problems getting this to work without a messy conversion.  std::string path = ".../file.txt";  ofstream output;  output.open(path);   Ideally I don't want to have to convert this by hand or involve c-style char pointers if there's a nicer way of doing this?


Does it become easier to accumulate reputation on this site the more reputation that you have? Is that somehow exponential?

It's not that I feel bitter when somebody else's answer is upvoted above my own, but it's when a user with a high rep answers a question and their answer seems to attract an immediate barrage of upvotes.  Now I'm not saying that these votes are always unwarranted, but by simply observing this behavior, I think the system seems flawed.    The concept of reputation (or at least one of the concepts) is to give users a sense of trust in the reputed user's answers.  But this should be trust, not blind faith.  I know that this problem doesn't exist for every question asked on SO, but it's definitely present.  I'm sure this is a contentious question, as it might seem overly critical, but does anybody else agree with me and, if so, does anybody have any thoughts on how this problem could be alleviated? It's a great shame when a new or less active user's answer is stifled by the reputation-rich user's answer.


For the sentence, "I am going on a two month cruise", would "two month" be considered an adjective since it means two months long. Also, is the correct wording "two months" or is "two month" also correct. I have heard it used both ways (months/month).

Why are year, pound and mile in the singular form in the phrases below?   five-year-old children  20 pound note 10 mile run   Is that because they're acting as adjectives, which are always invariable in English?  Is it incorrect to say...   five-years-old children? 20 pounds note? 10 miles run?


I am running some logistic regressions in R. I need some help with interpreting coefficients.   So, if my DV is 1 = yes and 0 = no, and I have five groups (a, b, c, d, e) and I make a the reference group (dummy coding), and the coefficient for b is significant and positive:   does this mean the odds of b saying yes compared to the odds of a saying yes is greater?  Or is there a greater odds of saying yes for group a compared to b?

I'm working on a multiple logistic regression in R using glm. The predictor variables are continuous and categorical. An extract of the summary of the model shows the following:  Coefficients:                Estimate Std. Error z value Pr(>|z|) (Intercept)   2.451e+00  2.439e+00   1.005   0.3150 Age           5.747e-02  3.466e-02   1.658   0.0973 . BMI          -7.750e-02  7.090e-02  -1.093   0.2743 ... --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1   Confidence intervals:                    2.5 %       97.5 % (Intercept)  0.10969506 1.863217e+03 Age          0.99565783 1.142627e+00 BMI          0.80089276 1.064256e+00 ...   Odd ratios:                   Estimate Std. Error   z value Pr(>|z|) (Intercept)  1.159642e+01  11.464683 2.7310435 1.370327 Age          1.059155e+00   1.035269 5.2491658 1.102195 B            9.254228e-01   1.073477 0.3351730 1.315670 ...   The first output shows that $Age$ is significant. However, the confidence interval for $Age$ includes the value 1 and the odds ratio for $Age$ is very close to 1. What does the significant p-value from the first output mean? Is $Age$ a predictor of the outcome or not?


I would like to know if there is any command in Linux (Ubuntu, Linux Mint, etc) that is equivalent to the Windows full format option.

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


I try to prove that theorem.     Let $a,b\in\mathbb N$, $\gcd(a,b)=1$. Then there exist isomorphism between the rings $\mathbb Z_{a} \times \mathbb Z_{b}$ and $\mathbb Z_{ab}$.    My proof:  Let $f:\mathbb Z_{ab} \to \mathbb Z_{a} \times \mathbb Z_{b}$, $x\to (x \bmod a; x \bmod b)$. Then $f$ is a bijection because of Chinese theorem. Prove that $f$ is homomorphism: $f(x)$+$f(y)$=(x mod a; x mod b) + (y mod a; y mod b)=(x+y mod a; x+y mod b)= $f$(x+y mod ab) for x,y elements $\mathbb Z_{ab}$. So $f$ is homomorphism because of definition of homomorphism between rings so finally $\mathbb Z_{ab} $, $ \mathbb Z_{a} \times \mathbb Z_{b}$  are isomorphic.  Do you think it is correct ?

How to show that $\mathbb Z_{mn}$ is isomorphic to $\mathbb Z_m \times\mathbb Z_n$ when $m$ and $n$ are coprime? It is easy to show that the natural map from $\mathbb Z_{mn}$ to $\mathbb Z_m \times\mathbb Z_n$ is a ring homomorphism. How to show that it is bijective?


I am confused about Uniform Distribution  why does $$P(v < 2b1)$$  equal 2b1 ?

In an Auction , two players are  bidding. Their bids will be a unknown fraction of their valuations. The valuations come from a uniform distribution $$[0,1] $$  If Player 2 bids $$ v/2 $$  and Player 1 bids $$b1<1/2$$   What is the probability player 1 wins ? Clearly for player 1 to win,players 2 bid has to be less than player 1 bids. $$P(v/2 < b1)$$  $$P(v < 2b1)$$ I follow the question up to this stage. Now it says since its uniformly distributed the probability player 1 wins is $$2b1$$ Im confused how can you just get 2b1 from the inequality ?  Thanks in advance


I'm unclear as to why  re.compile("h").match("ohs")   Returns None, but it works if I remove the "o".

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


When you compose a new message in Gmail on a computer, the bottom of the compose window looks like this:    When you put your mouse over the + button, it looks like this (with the mouse being on the icon with the tooltip)    I'm not understanding the rationale for hiding these five additional buttons until the user hovers over the + button. There is enough real estate that this would not be necessary and it seems to me that there are downsides, notably the lack of immediate visibility making these features less discoverable (not to mention that it's not obvious what the + button is for). Indeed, I would think that they ought to always be visible. I haven't seen this sort of interface before and I'd like to think that Google had a good reason to do this. Could someone please let me know what it is?

Why does Gmail website hide options like "links", "smileys" etc. under a '+' sign when there is clearly enough room along the footer? Am I missing something, or is google really pushing google+?  Example:    When you put your mouse over the + button, it looks like this (with the mouse being on the icon with the tooltip)


I have a public subnet (10.10.1.0/24) and private subnet(10.10.2.0/24) in my VPC. I've setup a nat instance in my public subnet to provide outbound web access to all private instances.  I have a load balancer for 2 IIS server instances which are in my public subnet. but they need outbound internet access. I can't seem to get it working with adding the NAT instance IP as a 2nd gateway to them. whats the best practice on this one in AWS??

I am attempting to set up a web server (nginx) that needs access to the internet while also being hooked up to an ELB but I am having trouble getting this solution working.  Details:   3 public subnets   a b c  3 private subnets   a b c  1 ELB   This has the three public subnets included in its default pool  1 NAT instance in public subnet   The various guides I have found useful for getting the public subnets hooked up to the ELB by pointing the subnets to the IGW.  These set ups do not take in to consideration the need for internet access.  When I change the route table for the single NIC from the IGW to the nat instance I get internet access but I lose the ability to connect to the ELB and visa versa, when I update the route table to use the IGW I lose the ability to connect to the internet.  I can allocate an EIP and give it access that way but was hoping to avoid exposing this server the internet via a public address if possible.  What I am thinking is that I can either 1) add a second NIC to the web servers that need internet access so they have a leg out via a NAT instance and also have a leg in the public subnet to connect to the load balancer or 2) I can use the nat instance as the gateway for my network.  Has anybody set something similar to this up?


trying to configure my VisualStudio code to handle Java 8 with APEX and I keep getting this Java Runtime could not be located.   I have a file path for my Java application, and it is not Java 12, it is Java 8.    Where am I supposed to save this file path?  What is the syntax?

I am getting the below error on visual studio code      The salesforcedx-vscode-apex.java.home setting defined in VS Code   settings points to a missing folder. For information on how to setup   the Salesforce Apex extension, see Set Your Java Version.   my setting in vs code is   "salesforcedx-vscode-apex.java.home":"C:\\Program Files\\Java\\jdk-12.0.1"  and this path is correct in my local file system.


I've ran into a weird issue here. I have a dataframe df like below:  In [1561]: df Out[1561]:        A     B 0  16.3  1.10 1  23.2  1.33 2  10.7 -0.43 3   5.7 -2.01 4   5.4 -1.86 5  23.5  3.14   I'm comparing every two adjacent rows of column A and storing the difference in a new column:  In [1562]: df['new_diff'] = (df.A - df.A.shift(-1)).fillna(0) In [1563]: df Out[1563]:        A     B  new_diff 0  16.3  1.10      -6.9 1  23.2  1.33      12.5 2  10.7 -0.43       5.0 3   5.7 -2.01       0.3 4   5.4 -1.86     -18.1 5  23.5  3.14       0.0   When I do a check to find out rows where new_diff is 5.0, I get an empty dataframe. But, it works fine when I do a check on < 5.0 or > 5.0. See below:  In [1567]: df[df['new_diff'] == 5.0] Out[1567]:  Empty DataFrame Columns: [A, B, new_diff] Index: []  In [1568]: df[df['new_diff'] > 5.0] Out[1568]:        A     B  new_diff  1  23.2  1.33      12.5    In [1569]: df[df['new_diff'] < 5.0] Out[1569]:        A     B  new_diff 0  16.3  1.10      -6.9 2  10.7 -0.43       5.0 3   5.7 -2.01       0.3 4   5.4 -1.86     -18.1 5  23.5  3.14       0.0   Please let me know what am I missing here?

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


Why is Facebook as an OpenID provider missing from ?

StackExchange Data Explorer allows login with about a dozen open IDs, but, unlike every other Stack Exchange site (in my understanding), Facebook isn't offered as one of the options.    Is there a reason for this?


Pretty straightforward question. When should one edit someone else's answer vs. Adding your own? Editing as in adding additional information to the answer, not correct something you think is wrong, not grammatical errors, etc.

So I went to a question I had an answer for and noticed that the op had already voted an answer as being correct. The particular answer had a list of links.   So I thought to myself, wouldn't it be better to have a more complete correct answer instead of having more smaller answers? In other words, instead of adding a new answer I edited the correct one and added the link there.  I find it better for two main reasons: a) the correct answer would be more complete and b) I am not looking for votes, any votes will go to the guy with the correct answer.  In case it matters, the question was:


Say that after modifying some stuff in the gnome shell i want to restart the gnome desktop. What I'd do normally is press Alt+F2 to restart it, but i want to automate it in a script that installs stuff and then  reloads the desktop. I've found that the equivalent is gnome-shell -r but whenever I run it my desktop crashes and I'm forced to log out. Alt+F2 runs with no problems. What's going on and is it correct that the command stated above is the equivalent to Alt+F2? If so why is it not working propery, when alt+f2 does never cause a crash?

Is there a way to restart GNOME Shell other than by using Alt + F2, R + Enter? With respect to the question, I have gone through , but I didn't get what I was looking for. I am looking for a command which exactly does what Alt + F2, r + Enter do. Please note that I am not willing to do the gnome-shell -- replace command... I did check both the things Alt + F2,r Enter and gnome-shell --replace... There is a lot of difference, I found...


I am attempting to run a smaller instance of my regression panel data , because it is a pretty huge regression (fixed effect, Heckman selection) and it takes 4 hours to run every time.  I am interested to estimate the robust standard error of my model. However, I don't want to recreate my dataset to the same size.   If I run a bootstrap on panel data, do I re-sample the rows or the individuals? Can I construct a smaller sample in bootstrap? Traditionally in textbooks, a bootstrap of size N always requires a re-sample of size N.

I want to use bootstrapping to estimate confidence intervals for estimated parameters from a panel dataset with N=250 firms and T=50 month. The estimation of parameters is computationally expensive (few days of computation) due to use of Kalman filtering and complex nonlinear estimation. Therefore drawing (with replacement) B (in hundreds or more) samples of M=N=250 firms from original sample and estimating the parameters B times is computationally infeasible, even though this is the basic method for bootstrapping.   So I am considering using smaller M (e.g. 10) for bootstrap samples (rather than the full size of N=250), drawn randomly with replacement from original firms, and then scale the bootstrap-estimated covariance matrix of model parameters with $\frac{1}{\frac{N}{M}}$ (in example above by 1/25) to calculate the covariance matrix for the model parameters estimated on the full sample.   Desired confidence intervals can then be approximated based on normality assumption, or empirical ones for smaller sample scaled using a similar procedure (e.g. scaled down by a factor of $\frac{1}{\sqrt{\frac{N}{M}}}$.   Does this workaround make sense? Are there theoretical results to justify this? Any alternatives to tackle this challenge?


I'm trying to calculate the probability of   $ax^2+bx+c$ root being a real number when the variables $a,$ $b,$ and $c$ values are all randomized by throwing a standard die.   I got to the point where I can get the probability by calculating the chance of $b^2-4ac>0$, but I'm not sure how I can conveniently carry on from here and my attempts at doing it by hand (finding every possible real occurrence and calculating them by the total outcomes) have failed me.   In other words, the values of $a$, $b$ and $c$ are within $\{1,2,3,4,5,6\}$ and each of the three variables is randomly picked from that list with no special weighting (so $\frac 16$  chance to get any of the $6$ values).

I really need help with this question.     The coefficients $a,b,c$ of the quadratic equation $ax^2+bx+c=0$ are determined by throwing $3$ dice and reading off the value shown on the uppermost face of each die, so that the first die gives $a$, the second $b$ and and third $c$. Find the probabilities that the roots the equations are real, complex and equal.   I was thinking about using the fundamental formula but i'm not sure how to go about doing it. Help would be greatly appreciated.


I'm solving an old qualifier problem which asks me to show that a continuous function $f:[a,b]\rightarrow\mathbb R$ (and so uniformly continuous) maps measurable sets to measurable sets if and only if it maps null sets to null sets. I've proved the 'if' direction using the fact that any measurable set is the union of a null set and a $F_\sigma$ set and using preservation of compactness under continuity. How do I show the other direction? I can't seem to solve it despite my efforts. I would really appreciate some help on this. Thank you.  Of course, I'm talking of the Lebesgue measure above.

Let $X$ be a (Lebesgue-)measurable set of $\mathbb{R}^n$ and $f:X \to \mathbb{R}^n$ continuous function that preserves measurability ($A$ meausurable $\implies f(A)$ measurable).  Prove: for all $A \subset X$,$\space$$\lambda(A)=0 \implies \lambda(f(A)) = 0$ .  I'm totally stuck. Initially I made some progress but now I'm at a point where it feels like the statement shouldn't be true at all.  Additionally i'd like to know if the statement works for general topological measure spaces (or even just metric measure spaces). That is:   Let $X$ be a (Lebesgue-)measurable set of $Y$, Topological (or metric) measure space and $f:X \to Y$ continuous function that preserves measurability etc...


I made a space themed world background for my blender eevee scene. The only problem is that space is dark so the rest of my scene isn't lit up well. The way my scene is set up, it seems like the best course of action is to change my space background, but I would like to keep it. Is there any way I can have the space world background as well as another world background to give the scene light without compromising the space background?

I am making a skydome and I have a texture hooked up with an emission shader for it, however, since the dome is blue it only emits blue light. Is there a way that I can have the whole sky illuminated and have the light reaching the rest of my scene be a different colour?


If desert eagle 7g bullet can accelerate the velocity to 560m/s (In Average) And baseball 149g can only be accelerate to the velocity of 45m/s (In History)

The force that propels a bullet should at least be similar in intensity to the force experienced as recoil and the force exerted on the target. But these forces seem really low (the equivalent of a shove).  If all it takes to make a small object achieve bullet speed is the equivalent of a shove, why can't humans throw objects at these speeds?


Show that: The continuous functions $f_{n,k}(x):=(\cos(k!\pi x))^{2n},0\leq x \leq 1$ satisfy the relation $\lim_{k\to \infty}(\lim_{n\to \infty}f_{n,k}(x))=\begin{cases} 1, & \textit{if x is rational}\\0,&\textit{if x is irrational}\end{cases}$ on the interval $[0,1]$.  Usually I start doing this type of problem by plotting $f$ for some $n$ and $k$ but I can't seem to see a correlation between the plots and the limit of the function. Anyways, here were my general ideas: I was thinking that it is $1$ only if the argument of the cosine is an even multiple of $\pi$, meaning that, let's say $x=\frac{a}{b}$ for the rational case, then I was thinking that if $k$ is large enough a number in $k!$ cancels with $b$ leaving only $j!\pi a$ in the argument (where $j!$ is $k!$ without the $b$). Similarly I was thinking that when $x$ is irrational then it wouldn't cancel with a number in $k!$, right? Meaning that the argument of the cosine is uneven, meaning not $1$. And since all of it is to the power of $2n$, that would mean that for $\cos(k!\pi x)\neq 1$ the limit of $n\to \infty$ would be $0$, right? Now, even if my argumentation were correct I don't know how to write it down mathematically correct. Could anyone help me out here?

I stumbled upon this "relation" (is the name correct?):  $$ \lim_{m \to \infty} \lim_{n \to \infty} \cos^{2n}(m! \pi x) = \begin{cases} 1,&x\text{ is rational}\\ 0,&x\text{ is irrational}\end{cases} $$  How is it called and why is it so? I'm really not asking for a proof since I fear it would be too complicated for me to understand, but rather for an "intuition".


For some reason the LiveUSB I got over here seems to be laughing at me and it won't let me install Ubuntu, so is there a way to install it straight from Windows to an external hard drive?

How do I make an Bootable Ubuntu USB containing the the latest version of Ubuntu?  For completeness, how would I be able to do this on Ubuntu, Windows, OS X or another Linux distro?


I know that this code will be triggered when you closing tab AND when you refresh the tab.  window.onbeforeunload = closingCode;     function closingCode(e) {         var evtobj = window.event ? event : e;          var callDateUTC = { callDateUTC: new Date().toUTCString() };          if (evtobj == e) {             //firefox             if (!evtobj.clientY) {                 that._apiGateway                     .post(that._apiGateway.ApiPaths.RefreshToken, callDateUTC)                     .subscribe((loginResponse: LoginResponse) => {                     });             }         }         else {             //IE             if (evtobj.clientY < 0) {                 that._apiGateway                     .post(that._apiGateway.ApiPaths.RefreshToken, callDateUTC)                     .subscribe((loginResponse: LoginResponse) => {                     });             }         }          return null;     }   But I want to know which of those two event was triggered...  if (tabWasRefreshed){     //code } else if(tabWasClosed){     //code }

When we refresh the page (F5, or icon in browser), it will first trigger ONUNLOAD event. When we close the browser (X on right top icon),It will trigger ONUNLOAD event. Now when ONUNLOAD event is triggered, there is no way to distinguish between refresh the page or close the browser.   If you have any solution then give me.


I have added a component i.e my profile so it shows that its not supported by any data so how can i add the data over here?

I added the User Profile component to content in Experience Cloud and checked the Properties per Salesforce Help. I get an error "This component has no data. We can't load the User Profile component because it's not supported by any data. Once you add data, reload Experience Builder to see your component." As the System Administrator and builder/member of the site, I would expect to see my data as the running user. Why can't Experience Builder detect it? User Id in Properties is {!recordId}. What else am I missing?


I've always been interested in anti-gravity and how you could do it. I know that it would make space travel easier because less fuel would be required, but is it possible?

I want to know if there is any  material. I am thinking of making flying vehicles which are made up of anti-gravity material so that they will not experience any gravity on them and can easily take off and be more fuel efficient. Is there any such thing? Or any workaround?


I am trying to locate my grandfather’s war records I have his service number his division & discharge papers. He was a POW in Algiers 1944. But I want  more information about where he was posted throughout WWII. Is there a database I can use to find this information?

Where can I find information on German soldiers from World War I and World War II?   I am curious to find out about my ancestors' role in the wars, i.e. what rank they had, where they where fighting, with whom and anything else.


@Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main);      gridView = findViewById(R.id.grid_view);      MainAdapter adapter = new MainAdapter(MainActivity.this,numberWord,numberImage);     gridView.setAdapter(adapter); //Error showing to this line  //Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.GridView.setAdapter(android.widget.ListAdapter)' on a null object reference I used in build.gradle(:app) implementation 'androidx.gridlayout:gridlayout:1.0.0'  My MainAdapter.java code are as follows: public class MainAdapter extends BaseAdapter { private Context context; private LayoutInflater inflater; private String[] numberWord; private int[] numberImage;  public MainAdapter(Context c,String[] numberWord,int[] numberImage) {     context = c;     this.numberWord = numberWord;     this.numberImage = numberImage;  }  @Override public int getCount() {      return numberWord.length; }  @Override public Object getItem(int position) {      return null; }  @Override public long getItemId(int position) {      return 0; }  @Override public View getView(int position, View convertView, ViewGroup parent) {     if (inflater == null) {         inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);     }     if (convertView == null) {         convertView = inflater.inflate(R.layout.row_item,null);     }      ImageView imageView = convertView.findViewById(R.id.image_view);     TextView textView = convertView.findViewById(R.id.text_view);      imageView.setImageResource(numberImage[position]);     textView.setText(numberWord[position]);     return convertView; }  } And row_item.xml is : <?xml version="1.0" encoding="utf-8"?> <LinearLayout     xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent"     android:layout_height="wrap_content"     android:orientation="vertical"     android:padding="20dp"     android:gravity="center">          <ImageView         android:layout_width="100dp"         android:layout_height="100dp"         android:id="@+id/image_view"/>     <TextView         android:layout_width="wrap_content"         android:layout_height="wrap_content"         android:id="@+id/text_view"         android:text="Numbers"         android:textSize="25sp"         android:layout_marginTop="5dp"/> </LinearLayout>

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


I have a background that changes every 12seconds.  In Chrome, Firefox and Opera the background change is works fine, but in Safari the browser always loads the image again and that is noticed by a flickering on every image change on the first cycle. Any ideas on how can I solve this problem.  This is how I'm handling the background change:  var img2 = new Image(); var img3 = new Image(); img2.src="/img/bg2.png"; img3.src="/img/bg3.png"; Meteor.setInterval(function(){     let elem = $(".header-2");     if(elem.hasClass("bg1")){         elem.removeClass("bg1");         elem.addClass("bg2");         let src = 'url('+img2.src.replace(location.origin,'')+')';         elem.css("background-image", src);     }     else if(elem.hasClass("bg2")){         elem.removeClass("bg2");         elem.addClass("bg3");         let src = 'url('+img3.src.replace(location.origin,'')+')';         elem.css("background-image", src);     }     else{         elem.removeClass("bg3");         elem.addClass("bg1");     } }, 12*1000)   The css classes:  .header-2.bg1 {     background-image: url('/img/bg1.png'); } .header-2.bg2 {  } .header-2.bg3 {  }

I'm looking for a quick and easy way to preload images with JavaScript. I'm using jQuery if that's important.  I saw this here ():  function complexLoad(config, fileNames) {   for (var x = 0; x < fileNames.length; x++) {     $("<img>").attr({       id: fileNames[x],       src: config.imgDir + fileNames[x] + config.imgFormat,       title: "The " + fileNames[x] + " nebula"     }).appendTo("#" + config.imgContainer).css({ display: "none" });   } };   But, it looks a bit over-the-top for what I want!  I know there are jQuery plugins out there that do this but they all seem a bit big (in size); I just need a quick, easy and short way of preloading images!


The question I was solving was to find the derivative of $y = \arcsin(2x\sqrt{1-x^2}), -\frac{1}{\sqrt{2} } <x< \frac{1}{\sqrt{2}}$ Substituting $x = \cos\theta \Rightarrow \theta = \arccos (x)$, I got $y = \arcsin(\sin2\theta) = 2\theta$ Differentiating, I got $\frac{-2}{\sqrt{1-x^2}}$ However, substituting $x=\sin\theta$, simplifying and then differentiating, I got $y' = \frac{2}{\sqrt{1-x^2}}$, which is the negative of what I'd gotten earlier. Also, this is the correct answer according to my textbook. Both substitutions lead to $2x\sqrt{1-x^2}$ turning into $\sin2\theta$, so why is the substitution $x = \sin\theta $ more valid than the substitution $x = \cos\theta$?

In a problem, we have to differentiate : $$ y = \arcsin (2 x \sqrt{1 - x^2}),$$ given: $$-{1/(\sqrt2)} < x <{1/(\sqrt2)}$$.   My approach :  Put $x = \cos (p)$, so y reduces to:- $y = 2p = 2 \arccos (x)  \implies$ ${dy}/{dx}$ $ = -{2}/{\sqrt{1-x^2}}$   But the solution given is without the minus sign, so I am doing something wrong here but don't know what.  So please tell me what I am doing wrong and how to correct it.


I would like to display the flags as button using GUI. however, my code is not working, the expected output should look something like this  the images of the flag are saved in the same file with file names being "USA.png", "Spain.png" etc. this is the code i have now import java.util.*; import java.lang.*; import java.awt.*; import java.awt.event.*; import javax.swing.*;  class Olympic  {     private int NO;     private String country;     private double[] score;     private int rank;          public Olympic(String country)     {         this.country = country;     }          public Olympic (Olympic oly)     {         this(oly.country);     }          public int getRank()     {         return rank;     }          public String getName()     {         return country;     } }  class OlympicFrame extends JFrame {     private JButton[] jbArray = new JButton[12];          private final String[] countryArray = {"USA", "Spain", "China", "Japan", "Italy", "Germany",      "France", "Brazil", "Netherland", "Poland", "Russia", "Ukraine"};          private ArrayList<Olympic> alist = new ArrayList <Olympic> ();          //private JLabel rank = new JLabel();               public OlympicFrame()     {         super ("Olympic 2020");         setLayout (new GridLayout (4, 3));                  constructAList();                            for (int i = 0; i<jbArray.length; i++)         {             getContentPane().add(jbArray[i]);         }                   jbArray = new JButton [countryArray.length];                  for (int i = 0; i<jbArray.length; i++)         {             jbArray[i] = new JButton(alist.get(i).getName());             ImageIcon ic = new ImageIcon (alist.get(i).getName() +".png");                          jbArray[i].setIcon(ic);          }      }          private void constructAList()     {         for (int i = 0; i<countryArray.length; i++)         {             alist.add(new Olympic(countryArray[i]));         }     }       }  class aaa {     public static void main (String [] args)     {         OlympicFrame of = new OlympicFrame();         of.setSize (300, 100);         of.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);         of.setVisible (true);     } }  i have been receiving this error message Exception in thread "main" java.lang.NullPointerException         at java.awt.Container.addImpl(Container.java:1095)         at java.awt.Container.add(Container.java:419)         at OlympicFrame.<init>(ask.java:58)         at aaa.main(ask.java:90)


let $A = \{m + n \sqrt{2}\}$ where $m,n$ are integers, then  $a.$ $A$ is dense in $R$.  $b$. $A$ has no limit point in $R$.  $c$. $A$ has only countably many limit points in $R$.  $d$. only irrational numbers can be limit point of $A$  Set $A$ is similar to the set $N \times N$, so all points are isolated in $A$. therefore option $b$ should be correct. In answer key, option $a$ is marked as correct. Please suggest if I am doing something wrong.

I am having trouble proving the statement:     Let $$S = \{m + n\sqrt 2 : m, n \in\mathbb Z\}$$ Prove that for every $\epsilon > 0$, the intersection of $S$ and $(0, \epsilon)$ is nonempty.


So I'm using a JSON editor to create my crafting recipe and at the moment I can't seem to figure out how to name my result item. Any help?  Code:    {      "type": "minecraft:crafting_shaped",     "pattern": [         "#W#",         "DED",         "L L"     ],     "key": {         "#": {             "item": "minecraft:lapis_block"         },         "W": {             "item": "minecraft:water_bucket"         },         "D": {             "item": "minecraft:diamond_block"         },         "E": {             "item": "minecraft:diamond_leggings"         },         "L": {             "item": "minecraft:lily_pad"         }     },     "result": {         "item": "minecraft:diamond_leggings",         "count": 1     },     "group": "Armour" }

I have a small question: does Minecraft 1.14.4 allow NBT tags in crafting recipes? Because I'm making a map in 1.14.3 and some part of the map need custom NBT tags crafting and I need to use custom crafting chest to make it


I am learning Scripting, I came across this script   #!/bin/bash  A=`awk '{print $2}' /etc/fstab | grep -i "^/" | egrep -v '/etc/fstab|proc|sys|shm|pts'`  for i in $A; do grep "$i" /proc/mounts > /dev/null     if [ $? -eq 0 ]; then         echo $i "TRUE"     else         echo $i "FALSE"     fi done   Is there way to send  an email with the list of mounts which are Not mounted. Like if False, send an email   Thank you

Is there a possibility to add multiple e-mails to a single variable so that when the shell script is run, it sends a mail to all the specified emails?


If I pick two numbers in the interval (0,1), what is the expected value of the larger number? Please help. I know that the expected value of one number is 0.5 but I'm not sure how to find the expected vlaue of the larger number here.

Could anybody help me with solving such problem:  You are given two independent random variables $X$ and $Y$ with continuous uniform distribution. You are to find expected value $E$ of random variable $Z = \max(X,Y)$.


When trying to flag a post (question, in this case; I haven't tried with answers, but I suspect that it works much the same so may have the same problem) which is being edited, it seems like the page internal state can end up being inconsistent, leading to an incorrect error message displayed to the user.  Steps to reproduce:   Open the page for a question, any question, any question at all. Open the same question in an additional tab, or coordinate with an additional user to do so. In the second tab, make an edit to the question. In the first tab, note that the "an edit has been made" bar appears at the top. Do not dismiss this. In the first tab, click the "flag" action link below the question text. Expected result: Flag dialog should open. Observed behavior: The question text is refreshed with the edit, but the flag dialog does not open. In the first tab, immediately click the "flag" action link again. Observed behavior: An error message appears that you can only open the flag dialog once every three seconds.   The workaround is easy: just wait those few seconds and try again.  I'm suggesting that instead of as observed in step 5 above, the text should be refreshed and a message should be displayed to the user encouraging them to reconsider the flag in light of the edit now visible, but that this does not count as actually opening the flag dialog.

Because of , clicking the "close" link on a question that's been edited (for me usually the edit comes in a half-second before, as I'm reaching for the link) reloads the question instead of opening the Close dialog. Clicking it again to actually open the close dialog says     You may only open the Close dialog every three seconds   I didn't open it, I refreshed the post.  And yes, there are lots of times when the post edit is so trivial it's obvious in less than a second that it doesn't affect the need to close the question.


I call a function in a class named Preco2, as shown in the code.  Function:  $(function() {   $('.Preco2').maskMoney({ decimal: '.', thousands: ' ', precision: 2 }); })   Input:  <input type="text" class="form-control Preco2" name="Preco2[]" id="Preco2" value="0.00">	   It works perfectly. But when I call the asynchronous request it no longer works. How can I solve?  Asynchronous request:  success: function(result)     {      $('#employee_ta22').dataTable().fnDestroy();     $.ajax({        url: './atualizarencomendaaprovada',        type: 'get',        dataType: 'json',        success: function(data){             if(!data){             $("#employee_ta22 tbody").empty();          }else{          var linha = ``;           for(let item of data){           linha += `
                    <input type="text" rows="4" name="teste2[]" id="teste2" value=${ item.Id }>	           ${ item.DataAprovacao }	           ${ item.Identificacao }	             <input type="text" name="teste3[]" id="teste3" value=${ item.IdProduto }>		           ${ item.Produto }	          <input type="text" name="teste4[]" id="teste4" value=${ item.Quantidade }>	           ${ item.Quantidade }	           <input min='0' oninput='this.value = Math.abs(this.value)' type="number" id="Unid" name="Unid[]">	           ${ item.Requerente }	           <input type="text" name="vale[]" value=${ item.IdDestino }>	          ${ item.Destino }	           ${ item.Fornecedor }	           <select class="form-control" name="EstadoFinal2[]"><option></option>             <?php                     $sql = "SELECT * FROM raddb.Status WHERE Id IN ('5', '6') ORDER BY Estado DESC";             $qr = mysqli_query($conn, $sql);             while($ln = mysqli_fetch_assoc($qr)){             echo '<option value="'.$ln['Id'].'">'.$ln['Estado'].'</option>';             }             ?>                   </select>	             <input type="text" class="form-control Preco2" name="Preco2[]" id="Preco2" value="0.00">	             <textarea type="text" class="form-control" name="Apontamentos[]" rows="2"></textarea>	             <input type="text" class="form-control" name="Fatura[]">
`;          }           $("#employee_ta22 tbody").html(linha);      $('#employee_ta22').dataTable({      "pagingType": "full_numbers",     "iDisplayLength": 5,                              "oLanguage": { "sProcessing": "Aguarde enquanto os dados são carregados ...", "sLengthMenu": "Mostrar _MENU_ registos por página", "sZeroRecords": "Nenhum registo correspondente ao criterio encontrado", "sInfoEmtpy": "Exibindo 0 a 0 de 0 registos", "sInfo": "Exibindo de _START_ a _END_ de _TOTAL_ registos", "sInfoFiltered": "", "sSearch": "", "oPaginate": {    "sFirst":    "",    "sPrevious": "",    "sNext":     "",    "sLast":     ""   }  }  });                }  }  });  }

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


I am trying to add zeroes to a date if the day/month is less than 10.  For example, if 2/12/200 is entered, convert it to 02/12/2000.  userDate = input("What is the date? Please enter in MM/DD/YYYY format")  newDate = '' newDate = userDate[3:5]+ "."+userDate[0:2]+"."+ userDate[6:] print (newDate)

What is a Pythonic way to pad a numeric string with zeroes to the left, i.e. so the numeric string has a specific length?


For any post I can obtain list of linked questions by using https://meta.stackexchange.com/questions/linked/id here id is the number of question. The advantage of this version, compared to the version in the sidebar, is that I see also preview of the body, not only the title of each question in the list.  Examples:    This post has many linked questions:  The post I just made does not have any linked questions at the moment:       Is there something similar for related questions   Of course, I have tried simply to replace the word linked by the word related in the url, but that does not work (, ).

When viewing a question, there is a list on the right that displays related questions. However, I suspect they do not display the full list of related questions since the size of the list seems to be fixed at 10.  Sometimes, I would like to have a more exhaustive list of related questions. Could that feature be added? For example, a whole new page with a list of questions related to a particular question.


Do any methods exist whereby a "hash" can be embedded in the "document" it hashes?  What I mean is this. Say I have a given plaintext T. I wonder if there is a method to craft (i.e. not discover as a fluke) a "document" D being some combination  (e.g. a concatenation) of T and a hashvalue h, where h is H(D), H being some hash function.  Perhaps a simpler way of phrasing this is: Is there any way to make a document contain its own hash, under the constraint that the document must, apart from its own hash, contain a given plaintext?  Is this possible in theory? In practice?   This question is somewhat different from , in that I am assuming a given plaintext T, whereas that question asks if any T can be crafted (or found).

After saw the xkcd comic , I wonder if it is theoretically possible to construct a self-descriptive string that contains its own hash value?  Let's say the string's MD5 value is 663ef7d3f38cf900574cd4d9f83eb1b7, the string would be something like:  ... The md5sum value of this file is 663ef7d3f38cf900574cd4d9f83eb1b7 ...


I'm having trouble showing that if 𝑎 and 𝑏 are positive integers with 𝑎|𝑏, then 𝑔𝑐𝑑(𝑎, 𝑏) = a. I'm aware that the greatest common divisor of two numbers is the largest number that is a divisor of both numbers. Ex) $\gcd(4,2) = 2 $. But in this case $a=4$ and $b=2$ so the expression above would not work. I suppose what I'm asking is if variable $a$ is always the smallest of the two numbers given. Note  I now realize that I should have given the problem some more thought before posting on here. I had been overlooking the 𝑎|𝑏 portion of the expression. Thank you for the help!

I am having trouble completing the proof if $a \mid b$ then $\gcd(a,b) = |a|$. My attempt: If $a\mid b$ there is a $k \in \mathbb{Z}$ such that $b = ak$. Let $d = \gcd(a,b)$. Then $d \mid a$ and $d\mid b$ so by hypothesis we have $d\mid a$ and $d\mid ak$. Hence, $d \leq \gcd(a,ak)$. We can easily see that the largest common denominator of $a$ and $ak$ is $|a|$, thus $d \leq\gcd(a,ak) = |a|$ so $\gcd(a,b) \leq |a|$. I am stuck and not sure how to show the reverse inequality $|a| \leq \gcd(a,b)$ to complete the proof.


One thing that puzzled me a lot is when I add shadow catcher to the ground floor, and render it, Blender will treat that transparent area as opaque one and render it as well, this causes extra render time waste, especially in the situation when batch rendering.   Here is the image demo:    Does any one know how to avoid that extra render?  Or is this a Blender bug?

If I wanted to create an animation, each frame would have several seconds of rendering a completely transparent part, which adds up obviously. Is there a way to eliminate this waste of time?


Yesterday this Question asked by Interviewer what is the output for that line.  public class StringTest {    public static void main(String[] args) {       String s1 = "abc";       String s2 = "abc";       String s3 = s1+s2;       String s4 = s1+s2;        //check s1 == s2       System.out.println(s1==s2);        //check s3 == s4       System.out.println(s3==s4);   } }   when i looked at this question then thinking how the easy question asked by interviewer. I told him output s1==s2 and s3==s4 will return true and trueand i was very confident. Suddenly he said no thats the wrong output then i thinking he might be joking or trying to loosing my confidence, but till the end he said its wrong. When i checked the output was true and false . I also thinking how it is possible please solve my confusion by giving a appropriate answer. thanks in advance.

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


I've seen stuff like this written... C was written in C, or ABAP was written in ABAP..  I've even seen  saying that this is one of the criteria to sort languages into true programming languages.  I'd like someone to explain to me what this means.  Thanks in advance.  EDIT:Changed title from: "C was made using C" to "C was compiled using C".

I've heard of the idea of bootstrapping a language, that is, writing a compiler/interpreter for the language in itself.  I was wondering how this could be accomplished and looked around a bit, and saw someone say that it could only be done by either   writing an initial compiler in a different language. hand-coding an initial compiler in Assembly, which seems like a special case of the first   To me, neither of these seem to actually be bootstrapping a language in the sense that they both require outside support.  Is there a way to actually write a compiler in its own language?


\documentclass{beamer}  \usetheme[progressbar=frametitle]{metropolis} \usepackage{appendixnumberbeamer}  \begin{document}  \begin{frame}[fragile]{Backup slides}     Text \cite{Knuth92} \end{frame}  \begin{frame}[allowframebreaks]{References}   \bibliography{demo}   \bibliographystyle{abbrv} \end{frame}  \end{document}

I want to list my references in a beamer presentation using thebibliography environment, with the nice little    book icon (\beamertemplatebookbibitems) and  article icon (\beamertemplatearticlebibitems)   in front of each source.  Is there an icon for websites too? something like \beamertemplatewebsitebibitems? If not, is there a way to implement this easily ?


I am pretty new to Blender. I am trying to export a character from Blender to Unity, but when I import it in Unity in FBX file format, the materials get somehow mixed up, so for example the hair becomes blue, but in the blend file it is yellow.  I didn't do any complicated stuff to my material, I just set the color at the Diffuse section. If it matters, I initially checked the Shadeless box, but I unchecked it and it still doesn't work.  I also want to mention that I have all the materials applied to the character, which is only a mesh (it kinda looks like a Minecraft skin, because I chose to do it low-poly).  So should I:   try other formats for exporting? unwrap the model and apply materials in Unity (I don't know how to do it)? give up?   Any help is appreciated.

I used node textures in a mesh I exported to .FBX.  I then imported it into Unreal Engine 4 and it didn't import any textures; I clicked the Upload Textures option in Unreal Engine.  Is there something I'm doing wrong or is it Blender?


My computer is set up to boot from a solid state drive (SSD).  Should I change where my page file is located? Specifically, should I put it on my IDE hard disk?

I'm considering getting an SSD drive to run as the primary OS partition.  As I understand, this should provide a substantial improvement in performance.     My question is this: Should I leave the swap file on that drive?     The swap partition will be largely random seeks and so should benefit from the speed.  On the other hand, it will be constantly written to which will wear out the drive faster.


I'm a MSc Theoretical Physics student from Italy, and I'll most likely graduate around the end of next year: for the Italian academic system, this means that I'll be ready to try to get into a PhD program (after 3 years of BSc and 2 of MSc). I'm considering other countries' universities too, and since I spent a year of High School in the US I was looking for information about it. For what I understood, their post-secondary education system is college (4 years) for a BSc, then either Master or PhD (? years). Is this understanding correct? If so, do they have special rules for foreign students who already have a BSc and a MSc?

I start my master studies this fall in quantitative finance/economics in Europe. Since this will just take 3-4 semesters I want to take a look ahead and obviously PhD is one option to do.   So I am wondering if it makes sense to go to the US for PhD, since I will have already a master's degree in two years. I read a lot about the US PhD's which can be started after bachelor and therefore are somehow like a European master & PhD combined.   I saw some PhD programmes from well-known US universities and their curriculum contained almost just courses I will already have in my master. Wouldn't that be a waste of time to repeat them? Specially compared to my country (Switzerland) where a PhD duration is between 3-4 years.  Every input/personal experience will be appreciated.


Let $F$ be a field, and $x_{1}, \dots, x_{n}$ free variables. Let $K=F(x_{1},x_{2},\dots,x_{n})$, being the fraction field of the ring of polynomials in the variables $x_{1},\dots,x_{n}$. Show that $S_{n} \subset \mathrm{Aut}(K)$, and in particular, use this result to show  that any finite group $G$ is the Galois group of an extension of fields.    I'm lost on how to show this. I've seen other answers around, but they invoke the Fundamental Theorem of Galois Theory (which I haven't seen). What would be a way to get started on this problem? (and if possible without using the Fundamental Theorem of Galois Theory). I know that for the second statement, one would need to use Cayley's Theorem at some point.    Thanks for the help!

Every finite group is isomorphic to some Galois group for some finite normal extension of some field.   I'm trying to write a proof, but I know this is incorrect. Can anyone point me in the write direction?  Proposition: Every finite group is isomorphic to some Galois Group $\text{Aut}_F(K)$ for some finite normal extension K of some field F.   My hack at a proof: For every $n \in \mathbb{Z}^+$ where $n = |\text{Aut}_E K|$ there exists a normal extension $K$ of $E$ such that $\text{Aut}_E K \cong S_n$. Then consider a subgroup $H \leq \text{Aut}_E K$ where $H \cong \text{Aut}_E K$. It follows that $H$ is the Galois group of $K$ over $K_H$.


One of our data Provider who happens to be on SuccessFactor/SalesForce world, gave us  SOAP URl to call to work with salesForce.  Now, I added the WSDL as a Web Reference and now I have a client to play with. They asked me to keep the session alive by adding the SessionId in the Request in all the sub-sequent requests.  I came across the following documentation:  But it sounds like I am not looking at the same object for some part because  instead of Login(username, password) my object support Login(SFCredentials[])  also, I do not have access to SessionHeaderValue Not sure why is it different.   Is it a different version than the one mentioned in this documentation? If so, How can I access SessionHeaderValue in the new one?

One of our provider has a salesforce system in place and they have send us the URL. I added the reference as a Web Reference since adding it as a Service Reference had some issues.  Now, I am able to successfully login to the service and get the session ID. Now question is that how can I use the session ID in my subsequent Upsert request?   DoI have to add it to the SOAP header? If so, how?


I have heard a lot of people tell me that your Meta Game is just as important as playing well. What exactly is the Meta game and how does one go about improving it, or even getting it to begin with?

What is so called meta-game in StarCraft 2?    What other games have this meta-game?


Do you need to add priming sugar when moving beer to a keg?  Will the CO2 from the system be enough to carbonate it?

I have a Cornelius system and I'm wanting to keg my home brew.   I'm curious if you need to prime the beer to help with carbonation or if you just add wort to keg and carbonate from co2?   If you do it this way, does anyone have any recommendations for how much pressure & for how long?   I did keg a five gal. keg last year and it got some carbonation but it didn't last very long. I had the beer for about 2 months and at the end it kept some carbonation sometimes but not for the whole time I was drinking it.


Sorry if it's a stupid question. I haven't even made the character yet so I thought I'd ask before I invest time. Say my companion is Curie and I'm a sneaky character hiding from a raider in power armor. Will I see, "Curie disliked that" if I pickpocket the power core? Or if I steal people's weapons before I fight them? Am I shoehorned to use Cait if I have the pickpocket perk?

It's pretty easy to see what Piper enjoys, as I'm currently lock picking my way into her heart. I haven't seen anything that she doesn't like so far. What things do all of the companions like / dislike, so I can make sure never to do those things.


I have 1 24gb ssd and a 750gb regular drive, and when I install ubuntu to my SSD then my other drive is separate. I would like to install ubuntu so that my computer recognises both my ssd and regular drive the same, is there any way to do this when installing ubuntu. Any help is appreciated.   Thank you

I have an SSD with 64 GB and a 6 GB/s 1 Terabyte hard drive. I want to use the SSD only as a boot device and maybe for swap storage. On the 1 Terabyte hard drive, I want to have the main file system. As in Windows, I liked to have at least 2-3 Partitions example for music games programs and so on. Which partition layout do you recommend to me?


I'm not an expert and I don't know if already exists something like the following model, but I wrote a simple (mental) model to understand the basic concepts of quantum mechanics. I want to know if this model is valid or not.  Red-or-Black (RoB) Card Model     Suppose to have two cards, one is red and the other is black. Both the cards have the other side with the same color (e.g. white). A special machine can shuffle the cards truly random and then puts the cards turned down on the table with only the backs visible (i.e. the white side). Nobody knows where is the red and the black card, so each card is red or black with the 50% of probability. In other words each card is red and black at the same time (superposition).   This model seems work because when you turn up one of the two cards (measurement), you're fixing its state to a single state (or red or black). At the same time you're fixing also the state of the other card (entanglement). If you repeat the measure turning down and then turning up one of the two cards the result is always the same (the state is fixed). Also the no-cloning theorem works because you can't copy the color of a card until you turn up the card. Is this correct?  Another strange thing is the observer definition. If I view the color of a card I'll fix its state, but this is valid also if my cat views the color of that card. So, who/what is the observer? Can be the card itself? The card have the color printed over its surface, so the card knows its state, then I can't understand if it's right to say that the card is in a superposition because the state should be already fixed by itself (i.e. there is only a single state).

Consider that we have two balls, one white and one black, and two distant observers A and B with closed eyes. We give the first ball to the observer A and the second ball to the observer B. The observers don't know the exact color (state) of their balls, they know only the probability of having one or another color, until they look at them (measure). If the observer A looks at his ball he will see its color, which is white, so he immediately knows the color of the second ball. Lets call this “classical entanglement”.  My question is: What is the difference between this “classical entanglement” and the quantum entanglement, for example, of two entangled electrons with opposite spins states? Can this analogy be used to explain the quantum entanglement?


The title is self-explanatory. I have Windows and ubuntu installed on separate partitions. Currently using the Grub bootloader to switch between OS. If there's any other information I need to provide let me know.

It's a rather simple question (I hope). I currently have Windows 8 and I am dual booting it with Ubuntu 13.04.   If I were to install the latest update for Windows 8, that being 8.1, will it affect Ubuntu or will there be any conflicts between the two?


I'm planing to create an online map component with which the user can create/draw polygons based on underlying raster data.  Is there some library / tool / procedure existing which enables the creation of polygons based on the colors of the raster data (or map data) - something like the 'select by color' in photoshop? Example: the user clicks in the center of a lake and the tool creates a polygon which covers the complete lake at the coastline.

I've got some aerial photography (format: IMAGINE Image) which is detailed enough to see to fire hydrants and a shapefile of fire hydrants which was digitized based on some CAD data.  My project is to QC the fire hydrant shapefile locations by spot checking with the imagery. Is it possible to extract RGB values from the imagery that match the fire hydrants RGB values?  Fire hydrant (red):    I'm looking to select cell values (which i have written down) that are similar to the cell values of the fire hydrant and then extract those cells (either a raster file of those cells or a shapefile which plots location of similar cells). I'm assuming that there are very few features in the imagery that have similar reddish RGB Values.  After looking at Arron's Answer and playing around with both the supervised and unsupervised approach (see my comment below), i was unable to get the tool to perform exactly what i wanted until I started too look at the confidence raster output from the  tool.  I am not to sure what exactly the raster output is supposed to symbolize but from just looking at the level 14 cell value, but it captured the all the fire hydrants.    raster output:  location of fire hydrants:   My next step is to use the tool  convert the fire hydrant raster footprint to a polygon.  I am running the tool right now and in the past hour it has only made it to 11%.  The area I am working in is large, at 1x1 mile so I understand that it could take some time if there is a lot of small raster cells to convert to a polygon.  Are there any suggestions on running some tools to clean up some of the data so it speeds up the process of converting the raster to a polygon? I may not have a need to run this tool this since the raster footprint did such a good job at capturing the fire hydrants but I am interested in speeding up the process since I foresee this being used in other applications for the future.


I can not read data from mysql database in bengali language using live server but when I am running this script in local server using xampp it is working fine. please see the code below <?php $conn = new mysqli("localhost","dmsbager_nahid","@Nahidul","dmsbager_ok");   //fetch  $sql= "SELECT * FROM upazila_list;"; $result = $conn->query($sql); if ($result->num_rows > 0) {     while($row = $result->fetch_assoc()) {               echo   $row["upazila_name"] .'<br/>';       } }        ?>  it returns me ?????? ????? ?????  but I am Expecting নাহিদ কাদের জয়নাল  but I can retrieve which wrote in English. please help me.

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


I am using bare Win32Api. I need to launch app with elevated permissions and app has no manifest. So, the only way is to use ShellExecuteEx with runAs verb. It works, but I need to read process stdout. With CreateProcess I have STARTUPINFO which I can use to pipe process stdout.   But ShellExecuteEx does not have such API. So, how can I elevate and redirect stdout?

I'm using ShellExecuteEx to execute a command in C. Is there a way to use ShellExecuteEx and capture standard in/out/err?  Note: I don't want to use CreateProcess.


I am using Ubuntu 20.04. I have hidden the "Activities" button on the left side of top bar. Is there a way to hide where it shows what window is open, next to where "Activities" was?   For example, I want to hide "Google Chrome" from the upper left:   The GNOME extension TaskBar 2020 does not provide this function. I want to keep the top bar, just without showing what window is active.

Using GNOME Tweak Tool to disable the  (reference: ) is no more working in Ubuntu 20.04.   How do I get the same effect now?


Currently, there is no way to do advanced search with bounties ( is not satisfying me).  Is there a way to ask this option to be enabled with the same behavior than the others :    isaccepted: yes/true/1 returns only answers that have been marked "accepted"; no/false/0 returns only answers that are not marked accepted. hascode: yes/true/1 returns only posts that contain code blocks; no/false/0 returns only posts that contain no code. hasaccepted: yes/true/1 returns only questions that have accepted answers; no/false/0 returns only questions with no accepted answers. closed: yes/true/1 returns only questions that are closed; no/false/0 excludes closed questions from the search. duplicate: yes/true/1 returns questions that have been marked as a duplicate of another question; no/false/0 excludes duplicate questions from the search. migrated: yes/true/1 returns only questions that have been migrated to a different site; no/false/0 excludes migrated questions from the search. locked: yes/true/1 returns only locked posts (which have edits, votes, comments, and new answers disabled); no/false/0 returns only posts that are not locked. hasnotice: yes/true/1 returns only posts with a notice shown below them; no/false/0 returns only posts that do not have a notice applied. wiki: yes/true/1 returns only community wiki posts; no/false/0 returns only non-community wiki posts.      hasbounty: yes/true/1 returns only active bounty posts; no/false/0 returns only non active bounty posts.

Is there any possible way to search and list the bountied questions separately in SE?


Suppose $f: [0,1]\to \mathbb R$ is continuous and $$\int_{0}^{1} f(x)e^{nx} \mathsf dx=0$$ for every $n$. Prove that $f(x)=0$ for all $x \in[0,1]$.   Since $f$ is continuous on $[0,1]$, by Stone-Weierstrass theorem, we can say that there exists a sequence of polynomials $P_n$ that converges uniformly to $f$ on $[0,1]$. What the next step?

I'm trying to show that if $f$ is a continuous function on $[0,1]$ and $\int_0^{1} f(x)e^{nx}\,{\rm d}x = 0$ for all $n = 0, 1, 2, \dots$, then $f(x) = 0$.  I'd like to use Weierstrass approximation theorem to find a sequence of polynomials $p_m$ that converge uniformly to $f(x)$. Then we could say $\lim\limits_{m\to \infty} \int p_m(x)e^{nx}\,{\rm d}x = \int f(x)e^{nx}\,{\rm d}x = 0$, but I'm struggling to deduce that then all the $p_m$ are zero which would give the result.


My friend is playing a wizard/sorcerer (in a campaign I'm not in) and he's claiming this (irect quote from discord):  you can learn any spell by either finding a scroll or copying it from another wizard you can be a level 2 wiz, 8 sorc and learn level 5 wizards spells  However, from what I'm reading...  You determine what spells you know and can prepare for each class individually, as if you were a single classed member of that class. (PHB 164)  and then also,  When you find a wizard spell of 1st level or higher, you can add it to your spellbook if it is of a level for which you have spell slots... (PHB 114)  It doesn't mention how the spellbook works with multiclassing specifically, but based on these rules wouldn't a 2 wiz / 8 sorc only be able to copy level one spells into their spellbook?

The "Your Spellbook" sidebar for the wizard includes the following line:  Copying a Spell into the Book. When you find a wizard spell of 1st level or higher, you can add it to your spellbook if it is of a level for which you have spell slots and if you can spare the time to decipher and copy it.  Does this mean that a Wizard 1/Cleric 19 can copy any wizard spell they find into their spellbook? Is there anything preventing them from casting these spells?


Here is my script to change the directory  [user@linux ~]$ cat script.sh echo Before: $(pwd) cd "$1" echo After : $(pwd) [user@linux ~]$   When I tested it, it did not really change the directory as shown in the last pwd command.  Manual pwd command  [user@linux ~]$ pwd /home/user [user@linux ~]$   Test 1  [user@linux ~]$ script.sh dir01/ Before: /home/user After : /home/user/dir01 [user@linux ~]$   Test 2  [user@linux ~]$ script.sh /home/user/dir01 Before: /home/user After : /home/user/dir01 [user@linux ~]$   Manual pwd command again after that  [user@linux ~]$ pwd /home/user [user@linux ~]$   What's wrong with my code?

I want to run a script to simply change the current working directory:  #!/bin/bash cd web/www/project   But, after I run it, the current pwd remains unchanged! How can I do that?


This question is a duplicate. In particular a duplicate of these questions:       Both very good resources, but technology is always advancing, the 4 year old questions are not. The Stackexchange format doesn't take into account updates to older questions, hence I'm asking anew.  The options for backing up presented so far:   Options where the backup includes sending home stuff or just being really careful   Multiple memory cards Portable DVD/CD burner with integrated card reader Portable hard drive (HDD/SSD) with integrated card reader Netbook (this was 4 years ago, what to do today?) Tablet  Options where the backup includes some online functionality   DropBox / OneDrive / Box some cloud storage Custom NAS at home    The options for editing are pretty limited:   Netbook (again, what to do today?) Laptop Tablet Some funky custom RasberryPi solution   Have I missed anything important? Is there anything new I forgot? Portable Blueray drive? Magic Internet able to upload Gigabytes of RAW images from the middle of nowhere?  When thinking of far-away travels in non-first-world countries I don't think the cloud solution is viable. Being stuck in some pretty awful (speed wise) Internet Cafes I know it is a hassle to upload just one image of 5MB. Now imagining backing one of my 16GB CF cards... Impossible. I think the only solution is to send stuff home. I like the idea of DVDs, but that would always take a lot of DVDs when using large CF cards.  Editing wise for e.g. Blogging there is no real way around taking a small laptop/netbook which of course sucks if you're doing longer travels.

This question seems similar to , but my needs are different :   I shoot in RAW exclusively I'm looking for a 100% offline solution: while traveling, Internet won't be accessible the "laptop" solution is too heavy for me: I'm looking for a lightweight solution the simplest, the better: one device to rule them all   EDIT:  I'm using good old Compact Flash cards (yes, the bigger ones), so I need a device that can read it. If it can read from other cards, this question might be interesting for more people than myself  - that's the whole purpose of the website.    Also asked by :  Portable Storage Device while traveling  I need storage device which is able to read CF cards and make a backup of my photos while traveling. I do not want to carry laptop (it's bulky) and tablet (too little storage) but looking into some other solutions.   So far I found:   Epson PXXXX - price is blocker for me Jobo Giga Vu - same as above Nexto DI - bit better, but still a lot Hyperdrive Colorspace UDMA - this looks the best for price/options Wolwerine PicPac - cheap, bad opinions DigitalFoci PhotoSafe - same as above Ex-Pro® Picture 2 Drive - didn't find much about it   So ladys & gents what do you use?


Any given setting for $f$ is acceptable.

How to get $f(x)$, if we know that $f(f(x))=x^2+x$?  Is there an elementary function $f(x)$ that satisfies the equation?


Lots of old platformers are only left-to-right-ish and they don't allow you to move viewport left.  I'm interested was it just a game design choice or it's due to some limitations back then.  I have a lot of possible reasons in my head, but I'm interested in actual one, so please consider reply with citation.  Not sure I'm in correct community with this question, sorry in advance.

In almost all 2D platformers I've played, your avatar always starts off on the left side of the world, and continues on to the right. Is there something designers gain by doing this?


How do we properly check if a list is not null?  var ctx = new SP.ClientContext(baseUrl) var targetList = ctx.get_web().get_lists().getByTitle("ListName")

How can I verify if the list I'm trying to retrieve in Javascript really exists?  My code is:  function Search() {  var context = SP.ClientContext.get_current(); this.site = context.get_site(); this.web = context.get_web(); context.load(this.site); context.load(this.web); context.executeQueryAsync(     Function.createDelegate(this, this.onQuerySucceededSearch),     Function.createDelegate(this, this.onQueryFailedSearch) ); }  function onQuerySucceededSearch() { var Cliente = document.getElementById("Ribbon.TabCliente.Ricerca.CercaCliente").value; var Ufficio = document.getElementById("Ribbon.TabCliente.Ricerca.CercaUfficio").value; var Commessa = document.getElementById("Ribbon.TabCliente.Ricerca.CercaCommessa").value;  var listaEsiste = web.get_lists().getByTitle(Cliente);  alert(Cliente + Ufficio + Commessa);  if ((Cliente != undefined) && (listaEsiste != undefined)) {     var doveAndare = "myurl" + Cliente + "/" + Cliente;     if (Ufficio != undefined) {         doveAndare += '?&amp;FilterField10=SvDUfficio&amp;FilterValue10=' + Ufficio;     }     this.location = doveAndare; } else {     var doveAndare = "myurl?"     if (Cliente != undefined) {         doveAndare += "?&amp;Cliente:" + Cliente;     }     if (Ufficio != undefined) {         doveAndare += "Ufficio:" + Ufficio;     }     if (Commessa != undefined) {         doveAndare += "Commessa:" + Commessa;     }     this.location = doveAndare; } }   function onQueryFailedSearch(sender, args) { this.statusID = SP.UI.Status.addStatus("Search:",     "Fallimento: " + args.get_message() + " Close.", true); SP.UI.Status.setStatusPriColor(this.statusID, "red"); }   myList is always != null, even if the list doesn't exist!  Another question... I have the web object, how could I get the url?


I have method:  static T RandomObject<T> (...) { var tmp = Activator.CreateInstance<T>(); ...    foreach (PropertyInfo info in tmp.GetType().GetProperties()){    ...    } }   And if class T have object properties I want to generate them random too, so what I do is:  var t = info.PropertyType; obj = RandomObject<t>(...);   And then I get:     The type or namespace name t could not be found (are you missing a using directive or an assembly reference?)   Any idea to solve this problem?

What's the best way to call a generic method when the type parameter isn't known at compile time, but instead is obtained dynamically at runtime?  Consider the following sample code - inside the Example() method, what's the most concise way to invoke GenericMethod<T>() using the Type stored in the myType variable?  public class Sample {     public void Example(string typeName)     {         Type myType = FindType(typeName);          // What goes here to call GenericMethod<T>()?         GenericMethod<myType>(); // This doesn't work          // What changes to call StaticMethod<T>()?         Sample.StaticMethod<myType>(); // This also doesn't work     }      public void GenericMethod<T>()     {         // ...     }      public static void StaticMethod<T>()     {         //...     } }


Let  $\Sigma$ be a countable $\sigma$-algebra.  Show that there is a sequence $A_1,A_2,...$ of disjoint elements of $\Sigma$ such that every $B$ in $\Sigma$ is a countable union of elements in $\{A_n\}$.  My attempt:  Since $\Sigma$ is countable, we have $\Sigma = \{B_1,B_2,B_3,...\}$  Then I took:  $A_1 = B_1$  $A_2 = B_2 - B_1$  $A_3 = B_3 - (B_2 \cup B_1) $  $A_n = B_n - \bigcup_{i=1}^{n-1}{B_i} $  The sequence $\{A_n\}$ is disjoint and $\{A_n\}\subset \Sigma$.  I'm having trouble  showing that every $B$ in $\Sigma$ is a countable union of $\{A_n\}$.  How do I show that every $B$ in $\Sigma$ is a countable union of $\{A_n\}$?  Thanks in advance!

Let $\Omega$ be a set.  If $\Omega$ is finite, then any $\sigma$-algebra on $\Omega$ is finite.  If $\Omega$ is infinite and countable, a $\sigma$-algebra on $\Omega$  cannot be infinite and countable.     What about if $\Omega$ is not countable ? Is it possible to find an uncountable $\Omega$ with a $\sigma$-algebra that is infinite and countable ?


I have/had 72K comments to get rid of from a site that were re-surrecting from a few years ago.  It appears the physical comments are gone but I can't get the counters to read 0.  Plus, it still says there's 72,037 pending.

I have tried a lot of plugins that say they will remove all the comments with NO luck.   I am still showing a number of 72,037 comments, but I no longer can see the actual comments themselves. And, it's showing them all in 'Pending' with 103 in trash.  This site has been inactive for a couple years and I am just helping out getting it cleaned up for use again. How do I get that number to STOP showing up if I really don't have the comments. And, if I do where are they hiding?  Help please.  I am the Admin for the site in question.


Let $f:\mathbb{R}\rightarrow\mathbb{R}$ be defined as: $f(x)=\begin{cases}\frac{1}{\min\{q\in\mathbb{N}:qx\in\mathbb{Z} \}  } &\text{ if $x\in\mathbb{Q}$}\\ 0 &\text{if$x\in\mathbb{R/Q}$} \end{cases} $  The task is now to find every point, in which f is continous. (0 is not an element of $\mathbb{N}$ in this case). If $x\in\mathbb{Z}$, $f(x)=1$ obviously, also if $x\in\mathbb{Q}$, so $x=\frac{a}{b}$ with $a\in\mathbb{Z}$ and $b\in\mathbb{N}$, then $f(x)=\frac{1}{b}$. So this function almost looks like the Dirichlet function, which is discontinuous in every point. Intuitively, I would say that this function is continous in $x=0$, my explanation is kinda "hand-wavey" but when x becomes really small, $q$ has to get really big, so $\frac{1}{q}$ has to become really small, almost 0. So if we have divergent series $a_n$ of rational numbers,the limit of $f(a_n)$ should be 0, right? Did I make a mistake? Could you give me some advice how to prove this statement? Thanks in advance!

My teacher showed us this function and told us it was continuous at all non-$\mathbb{Q}$ points:  $$ f(x) = \begin{cases}   x & \text{ if } x\in\mathbb{Q} \\\\   0 & \text{ if }x\notin\mathbb{Q} \end{cases} $$  However, Wolfram MathWorld says , which is very similar, is discontinuous at all points. Why is one continuous and the other not?


>>> a = 2 >>> b = 3 >>> c = 2 >>> b > a == c True >>>   Is this true that b > a == c is equal to a < b and c == a because it's a chained comparison?  This doesn't make sense to me because of == comparison, I would expect that b > a == c is equal to (b > a) == c or b > (a == c).

What are the lesser-known but useful features of the Python programming language?  Try to limit answers to Python core. One feature per answer. Give an example and short description of the feature, not just a link to documentation. Label the feature using a title as the first line.  Quick links to answers:


I have a  power bank that can output 5V fast charge or, 5V 9V or 12V regular charge.   I am using this voltage trigger to get the 12V output desired but I have a special condition.  The power bank will be secured away and I will not be able to access the buttons to change it to the mode needed. I soldered a wire to the positive and negative side  of the "up" button on the voltage trigger. I did the same for the "mode" button as well.  I wrote a small program that reads the Voltage output of the power bank using a voltage divider to have the ~12V match the top voltage that the arduino can read. When the power is not at the right setting it sends a signal to an N-channel MOSFET to simulate the button being clicked and change the voltage level.   When I touch the positive and negative wires that I soldered to the "up" button for about 700ms the voltage  output changes. I've tried a HIGH pulse and a LOW pulse at different lengths between 700 -1500 ms with the N-channel MOSFET that doesn't quite work.  The problem is that sometimes the voltage trigger toggles between the power levels without any influence. Even when all wires are disconnected and its just the power bank and the trigger. That makes it difficult/impossible for me to be sure  that my program is running correctly, or that I can rely on it to set the output to 12V  What options do I have to get  the power bank to output 12V without needing to manually do anything?

I am trying to power up my raspberry pi 3 with a Xiaomi 10000mAh fast charging power bank through the L298N motor controller. The motor controller can receive from 7 to 35V, and it has a 5v output, which I use to power my pi through the 5V pin. I also use a USB 2.0 to TTL UART Module 6Pin Serial Converter ().  I read a bit about fast charging and how they control the voltage, and this is how the charger decides what voltage to output using the d+ and d- pin:   The first problem is that the usb converter doesn't have the D+ and D-, but I believe it should be the RXD and TXD pin. I want my power bank to output 9V to the motor controller so I tried plugging a 3.3V to the 0.6V to the RXD and TXD (tried both way) but it doesn't change the output voltage. The second problem is that if I just plug the power bank to the motor controller, which it will automatically output 5V, it doesn't turn on the Pi.  I am new to these kinds of stuff so any suggestion on how to do this will be really helpful. Thank you.


I have jobs installed in my system and it works indeed. However, when I typed   man jobs   and pressed enter, the terminal told me   No manual entry for jobs   Do you have the same problem? Or how can I solve it?

I'm working on a Power8 server running Ubuntu 16.04.2 LTS:  $ uname -a     Linux power 4.4.0-75-generic #96-Ubuntu SMP Thu Apr 20 09:55:30 UTC 2017 ppc64le ppc64le ppc64le GNU/Linux  $ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS"   None of the usual manpages appear to be installed. Even a simple command like:  man man   returns   No manual entry for man See 'man 7 undocumented' for help when manual pages are not available.   This goes for a variety of other tools, like ls, grep, etc. and library functions like usleep, printf, and so on.  I've checked that at least some manpages are actually installed:  $ dpkg -l | grep -i manpages ii  manpages                           4.04-2                                     all          Manual pages about using a GNU/Linux system ii  manpages-dev                       4.04-2                                     all          Manual pages about using GNU/Linux for development ii  manpages-posix                     2013a-1                                    all          Manual pages about using POSIX system ii  manpages-posix-dev                 2013a-1                                    all          Manual pages about using a POSIX system for development   Am I missing something? Is this specific to the ppc64le architecture? Or is there something else I can/should install to access these manpages?  Update: As requested, I ran sudo mandb. The result was:  0 man subdirectories contained newer manual pages. 0 manual pages were added. 0 stray cats were added. 2 old database entries were purged.   There were no changes to man man and other such commands.  Additionally, the output of manpath was:  $ manpath -g /usr/man:/usr/share/man:/usr/local/man:/usr/local/share/man:/usr/X11R6/man:/opt/man $ manpath -c /var/cache/man/oldlocal:/var/cache/man/local:/var/cache/man


I am writing some proofs using LaTeX, and following the standard procedure in the ConTeXt, I need to write something as follows:    However, I have no idea how to create the "double bracket", like the one includes x := y + z...  Could anyone give me some help on this?

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


I’m a student, my parents and other relatives send me money, but I also have an online clothing store I started this year. Because it’s online and upcoming I haven’t registered it. Should I explain this in my cover letter, incase they notice a deposit that is not in my parents name?

The UK Visas and Immigration Directorate publishes  that provides helpful tips that can result in successful visa applications. Section 2 of this guidance opens is entitled "other documents you may want to provide" (emphasis mine).  Section 2: other documents you may want to provide – all visitors This section provides guidance on the types of documents that you may want to provide to help us consider your application against the Immigration Rules. Previous travel documents/passports, which show previous travel. Financial documents showing that you have sufficient funds available.  These must clearly show that you have access to the funds, such as:  bank statements building society book proof of earnings such as a letter from employer confirming employment details (start date of employment, salary, role, company contact details) where a third party (who is either in the UK or will be legally in the UK at the time of your visit) is providing financial support to you e.g. a business, a friend or a relative, documents to show that they have sufficient resources to support you in addition to themselves and any dependant family should be provided   The first item is "bank statements" and this ties in with the , which says...  evidence that you can support yourself during your trip, eg bank statements or payslips from the last 6 months  (Note 'eg' is a Latin abbreviation meaning "for example"; this appears to be optional rather than a fixed requirement.) Question: How should someone interpret this such that the chances of success are maximized? How many statements should I submit? What are they looking for and what do my bank statements tell about me?


If I make my last ball, and the cue ball travels around the table and pockets the 8 ball in the same pocket, do I win or lose?    After all I made the 8 ball in my last pocket and you don't have to call your last pocket since it's the only choice you have unless your playing a 3 or more rail.

If I am able to shoot in the 8-ball and my last object ball in a single shot and I call the 8 ball in a pocket, do I win? Does the order in which the 2 balls leave the table matter?


We have a DB in simple recovery mode (which we want). At some point in the past, the LDF grew to be 20ish GB, and I'd like to shrink that.   However, I don't want to shrink it if some process is simply going to grow the file again. Is there a query/table/object that might help return information about transactions that caused the file to grow? Or perhaps is there a table that indicates when the file grew in the past?  Thanks!

The log file stays pretty small (~500MB) until about 11PM, and at that point it begins growing until no disk space is available. The log file reached it's maximum size at 12:39AM, so the growth took place over approximately an hour and a half time frame. The drive that houses the logs only has about 40GB of total space available, so the log file can only grow to that 40GB. That should be plenty though as the data is fairly static and only about 50GB total. Here are a few more additional notes:   DB recovery model is full Transaction log backups are taken every 15 minutes A defrag job is called at 11PM but looking at the history it only runs for a few minutes max   How can I pinpoint the exact cause of this? It has to be a large transaction that is open but how can I determine that?


I think this is a definition of = because it explains the meaning of the new symbol =. However, I wonder why the set theory thinks this as an axiom rather than a definition.

The axiom of extensionality is:  ${\forall}a({\forall}b({\forall}c(((c{\in}a){\iff}(c{\in}b)){\iff}(a=b))))$  The definition of $(P{\iff}Q)$ is:  ${\lnot}((P{\implies}Q){\implies}({\lnot}(Q{\implies}P)))$  or, in other words  $(P{\land}Q){\lor}({\lnot}P{\land}{\lnot}Q)$  In the case of the statement $((c{\in}a){\iff}(c{\in}b))$, this leads us to two options: $((c{\in}a){\land}(c{\in}b))$ and $({\lnot}(c{\in}a){\land}{\lnot}(c{\in}b))$. So far nothing weird. Now, let's see all the possible results of the axiom.  1.$((c{\in}a){\land}(c{\in}b)){\land}(a=b)$ 2.${\lnot}((c{\in}a){\land}(c{\in}b)){\land}{\lnot}(a=b)$ 3.$({\lnot}(c{\in}a){\land}{\lnot}(c{\in}b)){\land}(a=b)$ 4.${\lnot}({\lnot}(c{\in}a){\land}{\lnot}(c{\in}b)){\land}{\lnot}(a=b)$  Coincidentally, they are also all possible statements regarding the statements $((c{\in}a){\land}(c{\in}b))$ and $(a=b)$: both parts are true, the first part is true and the other is false, the second part is true and the first is false and neither is true. The axiom seems not to state anything new, because rephrased it's just produces a list of all possible options regarding the two parts of the statement. Worse, it doesn't seem to say anything about equality, since it allows for $a=b$ with both $(c{\in}a){\land}(c{\in}b)$ and ${\lnot}((c{\in}a){\land}(c{\in}b))$. So, what is the point of this axiom? And in what way does it say anything about equality?


To understand the problems with object slicing, I thought I have created a horrible example and I was trying to test it. However, the example is not as bad as I thought it would be.  Below is a minimal working example, and I would appreciate if you helped me understand why it is still "working properly". It would be even better if you helped me make the example worse.  #include <functional> #include <iostream>  template <class T> class Base { protected:   std::function<T()> f; // inherited  public:   Base() : f{[]() { return T{0}; }} {} // initialized   virtual T func1() const { return f(); }   virtual ~Base() = default; // avoid memory leak for children };  template <class T> class Child : public Base<T> { private:   T val;  public:   Child() : Child(T{0}) {}   Child(const T &val) : Base<T>{}, val{val} { // initialize Base<T>::f     Base<T>::f = [&]() { return this->val; }; // copy assign Base<T>::f   }   T func1() const override { return T{2} * Base<T>::f(); }   void setval(const T &val) { this->val = val; } };  template <class T> T indirect(const Base<T> b) { return b.func1(); }  int main(int argc, char *argv[]) {   Base<double> b;   Child<double> c{5};    std::cout << "c.func1() (before): " << c.func1() << '\n'; // as expected   c.setval(10);   std::cout << "c.func1() (after): " << c.func1() << '\n'; // as expected    std::cout << "indirect(b): " << indirect(b) << '\n'; // as expected   std::cout << "indirect(c): " << indirect(c) << '\n'; // not as expected    return 0; }   The output I get when I compile the code is as follows:  c.func1() (before): 10 c.func1() (after): 20 indirect(b): 0 indirect(c): 10   I would expect the last line to throw some exception or simply fail. When the base part of c gets sliced in indirect, there is no this->val to  be used inside the lambda expression (I know, C++ is a statically compiled language, not a dynamic one). I have also tried capturing this->val by value when copy assigning Base<T>::f, but it did not change the result.  Basically, my question is two folds. First, is this undefined behaviour, or simply a legal code? Second, if this is a legal code, why is the behaviour not affected by slicing? I mean, I can see that T func1() const is called from the Base<T> part, but why is the captured value not causing any trouble?  Finally, how can I build an example to have worse side-effects such as memory access type of problems?  Thank you in advance for your time.  EDIT. I am aware of the other topic that has been marked as duplicate. I have read all the posts there, and in fact, I have been trying to duplicate  there. As I have asked above, I am trying to get the behaviour     Then the information in b about member bar is lost in a.   which I cannot get fully. To me, only partial information seems to be lost. Basically, in the last post, the person claims     The extra information from the instance has been lost, and f is now prone to undefined behaviour.   In my example, f seems to be working just as well. Instead, I just have the call to T Base<T>::func1() const, which is no surprise.

Someone mentioned it in the IRC as the slicing problem.