How do I reconfigure keyboard shortcuts for copy and paste?

I've been looking all over the configuration menus and googling all over the web for how to configure keyboard shortcuts for Copy and Paste in the Unity window manager.  Is there some hidden place somewhere to configure this?  In Gnome Desktop on Lucid, I had it configured so that using the Ubuntu system keyboard/mouse, I could use Win+C/Win+V to copy and paste everywhere on the Gnome desktop, including in Firefox and gnome terminal; then when I moved the mouse to my Mac desktop*, the same keystrokes would copy and paste.  I would really like to keep this consistency.  Ctrl+C is obviously inappropriate as the "copy" key in any sort of terminal program.  (Any Ctrl characters, actually.)  * I am doing this by running Synergy server on Ubuntu, and the Synergy client on a Macbook.


I can imagine several specialized unicellular beings collaborating. But how does life get from that point to a unique pluricelular being that reproduces into another pluricelular being?


How to show that $R$ is a PID if $\mathbb{Z}\subset R\subset \mathbb Q$?   I tried as follows:  Let $I$ be an ideal in $R$. Then $\mathbb Z\cap I$ is an ideal in $\mathbb Z$. But I couldn't proceed further. Please help.


How will the super massive black hole affect our galaxy?

I've recently learned that the general consensus is that several (if not, most) galaxies have super massive black holes in their center, in particular the Milky Way. This, at least to me, makes perfect sense seeing as we are in a spiral galaxy which means we need something to "spiral" around (a large body or a bunch of mass).  But seeing as we're rotating around this massive black hole, won't we inevitably end up sucked in by it? Aren't we spinning towards the center of the galaxy, or are we staying steady where we are?


Can't put backslash into backticks in chat

I have recently found in chat that you cannot put backslashes in backticks without them showing and it disappearing:    Why is this so? If you put another letter in with it though it works as would be expected. So is this a bug or some sort of odd intentional feature?


TeXstudio Error: Could not start the command

I've installed texlive and add its /bin folder to the PATH from .bashrc file. Both pdflatex and xelatex commands work well within the terminal; pdflatex works from TeXstudio too, but xelatex doesn't work from TeXstudio and gives this error:  Error: Could not start the command: xelatex -synctex=1 -interaction=nonstopmode "template_Article".tex   I changed the build command to use the absolute path to xelatex and it worked fine:  "/usr/local/texlive/2019/bin/x86_64-linux/xelatex" -synctex=1 -interaction=nonstopmode %.tex   As opposed to pdflatex which is invoked by just calling:  pdflatex -synctex=1 -interaction=nonstopmode %.tex   What is the problem in your opinion? TeXstudio version is 2.12.18 and I'm running on TeXLive 2019.


gnome-shell-extensions-user-theme won't install due to unmet dependencies

I have gnome-tweak-tool install and use it regulary. I cannot however install the gnome-shell-extensions-user-theme to change the shell.  I already have the ppa but when it put  sudo apt-get install gnome-shell-extensions-user-theme  into the terminal i get this output.  dvorak@dvorak-g51vx:~$ sudo apt-get install gnome-shell-extensions-user-theme [sudo] password for dvorak: Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming.  The following information may help to resolve the situation:  The following packages have unmet dependencies: gnome-shell-extensions-user-theme : Depends: gnome-shell-extensions-common but it is not going to be installed  E: Unable to correct problems, you have held broken packages.   Can anyone elaborate on what I am doing wrong? I have tried to both install and remove both the unmet dependencies with the same error.


I own a car personally, but it is mortgaged to a bank. I want to sell it to an individual. I haven't the funds to repay the loan until I'm paid for the car. The buyer doesn't want to pay me without a lien release (or guarantee that one is coming). The bank won't release the lien until it gets the funds. What do people do in a case like this? It must be a common case. What should I do?


Trouble Reinstalling Windows after Ubuntu

I had problems with Windows, so about a year ago, we switched to Ubuntu.  Unfortunately the functionality was reduced, and so I want to go back to Windows, with all its problems.  I followed the instructions on other websites, and made the 4 restoration disc, and then put them in one at a time as instructed.  Then, I restarted and it says, "Restoration Incomplete".  And it doesn't do anything.  I'm using a Presario CQ56, and our restoration discs were made on a second computer, which was also a Presario CQ56.    I don't know how to get past this screen: "Restoration Incomplete The restoration did not complete. Please select one of the following buttons: Save Log  Details  Retry"  What am I supposed to do now?


Why is it that a variable is only significant when it is in a multivariate regression?

I have variables A and B and a target variable Y. Independently, A and not correlated to Y (the P value is too high) and B is correlated to Y with statistical significance. When I put A and B in a multivariate regression model to predict Y, A became significant and B stayed significant. Can someone explain the intuition behind why this happened? Is this why a lot of people say not to pay attention to the p value of a variable when it's in a multivariable regression (heard it from a professor)?


String should maintain Line break similar as TextArea

Input to textarea :(These 3 lines)   <textarea id="preM" rows="3" cols="10" style="resize: none; width:100%;"> </textarea>
      This is example of textarea   This is new Line   Hello All   In JSP page I am retrieving the value of Text Area  String variableString = request.getParameter("preM"); System.out.println(variableString);   Output is coming as:     This is example of textarea This is new Line Hello All   Expected output:     This is example of textarea   This is new Line   Hello All   I have already tried   StringBuffer preM = new StringBuffer(request.getParameter("preM")); int loc = (new String(preM)).indexOf('\n'); while(loc > 0){   text.replace(loc, loc+1, "
");   loc = (new String(preM)).indexOf('\n'); } out.println(preM);   But getting loc=-1.


We know that the series $\sum_{k=1}^{\infty}\frac{1}{k}$ diverges.     The series   $\frac{1}{1}+\frac{1}{2}+\frac{1}{3}+\dots+\frac{1}{8}+\frac{1}{10}+\frac{1}{11}+\dots+\frac{1}{18}+\frac{1}{20}+\frac{1}{21}+\dots+\frac{1}{88}+\frac{1}{100}+\frac{1}{101}+\dots$   converges slowly to approximately $22.92$. What is the exact value of the series?   The given series is the same as $\sum_{k=1}^{\infty}\frac{1}{k}$, but excluding all terms which involve the digit $9$.


I've got some problems with my minipage adjustment. I want "Author" and "Supervisor" to be on the same line but for some reason I cannot fathom "Supervisor" is barely on the same line as Test1 \textsc{Test1}, in fact a bit below.  That's my setup:  \documentclass[10pt]{article} \usepackage[document]{ragged2e} \usepackage[utf8]{inputenc}  \usepackage[ngerman]{babel}  \usepackage{graphicx} \usepackage{fullpage} \usepackage{float}  \usepackage{amsmath} \usepackage{amsfonts} \usepackage{mathtools} \usepackage{setspace} \doublespacing \allowdisplaybreaks   and that's my code:  \begin{minipage}{0.4\textwidth}   \begin{flushleft} \large   \emph{Students:}\\     Test1 \textsc{Test1}\\     Test2 \textsc{Test2}\\     Test3 \textsc{Test3}\\   \end{flushleft} \end{minipage}  ~ \begin{minipage}{0.4\textwidth}   \begin{flushright} \large   \emph{Supervisor} \\     Prof. Dr. Test \textsc{Test}\\   \end{flushright}      \end{minipage}\\[2 cm]   Thanks in advance!


I'm using the colortbl package to color table cells.  I've combined this w/ the xcolor package to define my own colors.  However, it appears that xcolor does not support transparency.  I saw the package transparent, but it is oriented toward text and I wasn't able to set the transparency level of a defined color.  Are there any packages that support alpha color channels?


Extracting copy from screen without printing screen

In preparing academic articles that require quotations from reputable Journals and books I am faced with a round-about retrieval process. First I take a screenshot then print that then scan it and then OCR it into my article document.   Is there a simpler way?  I have an iMac, MS Office and a Canon scanner with My Image Garden.


According to the weather report, it will be sunny on Monday.   According to the weather report, it’s going to be sunny on Monday.  Which one is correct? What is the difference in meaning?


Is there any latest release or other option to use LVS load balancing?

i checked the official linux virtual server website and they havent updated or discontinued since 2014.So, i cant find documentations for 4.5.X kernels. Is squid or HA proxy better alternative to LVS TUN/DR and APACHE mod_proxy? IS there any other better solution to use open source layer 4 or 7 techniques to load balance a statefull application? Not talking about DNS RR


I am new to LaTeX and I managed to add references to a document with natbib however when I preview it, the reference colour in the brackets appears to be in green colour. Everything else is fine. Would it still be green when I print it out? Or is this just a convenient built-in feature? How can I make it into black either way if I find this annoying? I am attaching a picture to show u what I mean.


Caley Hamilton why is det (A-A)=0 not a proof?

$\xi_A(\lambda)=det ( \lambda * I_n -A)$  Cayley-Hamilton stated that $\xi_A(A)=0_n$ Proof : $det (A-A)= det ( 0_n) =0$ Why is this proof wrong ?  First because we expect $\xi_A(A)$ to be a matrix not a scalar but I guess there is something else


How can I get this .sh file to run properly?

I'm trying to take a .bat file and make it a .sh   This is the working .bat file   @echo off title runserver "C:\Program Files\Java\jdk1.7.0_25\bin\java.exe" -Xmx815m -cp bin;lib/*; com.rs.Launcher true true false pause   this is my .sh file so far:  #!/bin/sh java -Xmx815m -cp bin;lib/*; com.rs.Launcher true true false pause   Is this wrong? Am I far off? I don't really know what I'm doing when it comes to .sh files so any help will be appreciated! Thanks a lot!


Best way to restrict access by IP address?

For an ASP.NET C# application, we will need to restrict access based on IP address. What is the best way to accomplish this?


Incrementing with Methods in Java & (Added) Array Processing

I have a question about Java:  public class Tester {    private int[] testArray = {3, 4, 5};    public void increment(int n) {         n++;   }   public void firstTestMethod() {        for(int i = 0; i < testArray.length; i++) {             increment(testArray[i]);             System.out.print(testArray[i] + " ");        }   }  }   The output produced when invoking firstTestMethod for a Tester object is 3 4 5. Could someone please help explain why? Thank you!    Hi all,  Could anyone take a look at this other problem? The correct answer is C, but I just don't understand! The link to the picture is below.  Thanks in advance!


Max supported external display resolution @60z for 2012 Macbook Air?

I have a mid-2012 13" Macbook Air with Intel HD Graphics 4000 1536 MB  My monitor died recently so I'm in the market for a new one, and I would like to know the maximum supported resolution for external displays @ 60hz refresh rate on this model?  The Apple info page here  ...states that max res is 2560x1600 but it doesn't state the refresh rate.  I don't want to go for that if only 30hz is supported.  The canonical question for Macbook display resolution answers is:   This provides a link to  which has more detailed specs info than provided by Apple.  However when I lookup my MBA on EveryMac I only find the following info:     2nd Display Support: "Dual/Mirroring*   2nd Max. Resolution:  2560x1600 (x2)   Details:   *Although Apple makes no mention of it, third-parties have discovered that this model can simultaneously support two external displays up to   2560x1600 "daisy chained" via Thunderbolt."   As with the official Apple specs, this does not give the refresh rate supported at 2560x1600.  Commenters have suggested that 2560x1600 is only supported @ 30hz... in which case my question still stands: what is the max resolution supported @ 60hz (for my specific model of Macbook)?


What is the smallest $n$ for which loopless graphs contain non-isomorphic $n$-vertex graphs with the same degree sequence?

I need a pair of non-isomorphic graphs with the smallest n-vertex possibility and where degree sequences are the same. Is the minimum number 2, such as a multigraph with n=2? Please help with the reasoning on this question. Thank you!


If a lens focuses all incoming light to a point, how do we get 2D images?

How do lenses produce 2-dimensional images, if a lens bends all incoming rays of light to intersect at the focal point? Shouldn't this produce a single dot of light on a screen placed at the focal length?  This is basically the standard diagram that always shows up in textbooks:    I know this doesn't happen in real life--I used to use telescopes pretty frequently for work. The most in-focus image would be the one with the smallest diameters for the stars, which, of course, we think of point sources at infinity. But--the light from all stars (despite being at infinity) is not all focused at a single point. Instead, each star's light is focused at its own $(x,y)$ point on a 2D image.  I can't reconcile the theory as I understand it with any of my real-life experience with optics. What am I missing?


Unable to register through the application.   App Version: 1.6.6.2 Device: iPhone 5s (Global) OS Version: Version 12.4.5 (Build 16G161)


String equality in bash strings are equal when actually they are not

#!/bin/bash STR1="David20" STR2="fbhfthtrh"  if [ "$STR1"="$STR2" ]; then          echo "Both the strings are equal" else         echo "Strings are not equal" fi


Please help me. How to compare this objects?  const a = {myProp: 'value1'}; const b = a; b.myProp = 'value2';   Always return me true. But have to return false.


My Minecraft skin is not showing properly in game

When I open Minecraft it shows the skin properly in the launcher but when I view myself in the game it doesn't show my clothing, only the layer that was put on behind it. Any advice? Skin from the launcher:  Skin in-game:


I have to create a Tikz picture of a limacon which is given in polar coordinates by the equation r = 0.5 + cos(θ) for θ between 0 and 2π. Note:makethe x-axis between 􀀀0.2 and 1.7 with a scale of 3 and the y-axis between 􀀀1 and 1 with a scale of 3.  My document is of the form:  \documentclass{article} \usepackage{tikz}  \begin{document}  \begin{figure}[h!]  \centering  \begin{tikzpicture}[xscale=3, yscale=3, domain=-0.2:1.7]  \draw[<->] (-0.2, 0) -- (1.7, 0)   node[above]{$x$};  \draw[<->] (0,0) -- (0,5)   node[right]{$y$};  \draw[colour=purple, smooth]   plot(HERE);  \end{tikzpicture}  \end{figure}  \end{document}   However, I do not know how to write the function in '' plot(HERE); ''. Can anyone help me? Thanks.


In an Integral Domain is it true that $\gcd(ac,ab) = a\gcd(c,b)$?

In my algebra class I was given as homework assignment to prove that:     Given an integral domain $A$ and $a,b,c,d,e \in A$. Then if $d = \gcd(b,c)$ and $e = \gcd(ac, ab)$ then $e = ad$.   It is easy to see that $ad \mid ab$ and $ad \mid ac$, so this implies that $\exists q \in A; e = q(ad)$. Now I'm having problems showing that $q = 1_A$. Working through some equalities, I proved that $\forall n\in \mathbb{N}, q^n \mid d$ so this gives me the light suspicion that I might be going the right way, but I'm pretty positive that this does not imply $q = 1_A$.  Does anyone want to give me a hint?  Thanks in advance :)


What is the difference in assignment between C and Python?

A = 0 B = 1  A, B = B, A + B    running 5 times:  the values of B in Python will be 1, 1, 2, 3, 5. the values of B in C will be 1, 1, 1, 1, 1.  Would anyone explain this to me?  #include <stdio.h>  #define TRUE (1 == 1); #define FALSE (1 == 0);  int fibonacci(int sequencia);  int main() {     fibonacci(5);     return FALSE; }  int fibonacci(int sequencia) {     static int antigo = 0;     static int novo = 1;     static int copia = 0;      if (sequencia == 0) {         return TRUE;     }      else {         printf("%i\n", novo);     }     antigo, novo = novo, antigo + novo;     fibonacci(sequencia - 1); }   antigo = 0 novo = 1  def fibonacci(sequencia):     global antigo, novo     if sequencia != 0:         print novo      else:         return True      antigo, novo = novo, antigo + novo     fibonacci(sequencia - 1)  if __name__ == "__main__":     fibonacci(5)


How to bring back minimize and maximize buttons in Gnome 3

I have recently installed Ubuntu Gnome which has the latest version of Gnome 3 running on it, and I have noticed that on windows there are no minimize buttons, and no maximize buttons, although I can see that you do get the options if you do a right-click. I have already read  question, and its answers, and have found that still none of them answer my question.  So my question is, as made clear in the title, how can I bring back the minimize and maximize buttons? Is this a bug? Or have Gnome decided not to have them?    OS Information:  No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 15.04 Release:    15.04 Codename:   vivid


How can I reset Compiz settings to default?

I'm using Ubuntu 13.04 (Raring)  I've installed CompizConfig Settings Manager (CCSM) and wanted to enable the wobbling window effect. This disabled some other things and suddenly I didn't have window borders any more... Following various instructions I found at Google, I've tried the following steps:   Go to CCSM Preferences / Reset to defaults   This disabled all plugins and effects (including Unity) so I didn't get any further...   executing dconf reset -f /org/compiz and rebooting   This brought borders back, but still don't have close/mini/maxi buttons, can't resize or move windows. And the top left entries of the menu bar vanished (Logout, battery, volume...) so I have to shutdown my computer via a terminal...  Edit:   Following the instructions from the first answer.   This brought my menu bar applets back... dpkg-reconfigure didn't seem to work. Result of this command:  /var/lib/dpkg/info/compiz.config: 1: /var/lib/dpkg/info/compiz.config: [general]: not found /var/lib/dpkg/info/compiz.config: 2: /var/lib/dpkg/info/compiz.config: backend: not found /var/lib/dpkg/info/compiz.config: 3: /var/lib/dpkg/info/compiz.config: plugin_list_autosort: not found /var/lib/dpkg/info/compiz.config: 5: /var/lib/dpkg/info/compiz.config: [gnome_session]: not found /var/lib/dpkg/info/compiz.config: 6: /var/lib/dpkg/info/compiz.config: backend: not found /var/lib/dpkg/info/compiz.config: 7: /var/lib/dpkg/info/compiz.config: integration: not found /var/lib/dpkg/info/compiz.config: 8: /var/lib/dpkg/info/compiz.config: plugin_list_autosort: not found /var/lib/dpkg/info/compiz.config: 9: /var/lib/dpkg/info/compiz.config: profile: not found /var/lib/dpkg/info/compiz.config: 11: /var/lib/dpkg/info/compiz.config: [general_ubuntu]: not found /var/lib/dpkg/info/compiz.config: 12: /var/lib/dpkg/info/compiz.config: backend: not found /var/lib/dpkg/info/compiz.config: 13: /var/lib/dpkg/info/compiz.config: integration: not found /var/lib/dpkg/info/compiz.config: 14: /var/lib/dpkg/info/compiz.config: plugin_list_autosort: not found /var/lib/dpkg/info/compiz.config: 15: /var/lib/dpkg/info/compiz.config: profile: not found   Is there any possibility to reset the settings like they were after installing Ubuntu?  Edit 2:  Just noticed that the title bar of windows isn't missing; It's just hidden under the menu bar. So the buttons are only hidden, too.  Edit 3: PROBLEM SOLVED  Started CCSM, went to window management and checked scale windows and move windows... After a re-login everything was fine.


I have a data set on predicting solar power generation,the dataset has 20 independent var and 1 dependent. The accuracy of my model is stuck at 60%. I have tried several models but this accuracy is best I could get other sucks even more. Here is my code: data_path = r'drive/My Drive/Proj/S.P.F./solarpowergeneration.csv' dts = pd.read_csv('solarpowergeneration.csv') dts.head() X = dts.iloc[:, :-1].values y = dts.iloc[:, -1].values print(X.shape, y.shape) y = np.reshape(y, (-1,1)) y.shape from sklearn.model_selection import train_test_split X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.25, random_state=42) from sklearn.preprocessing import StandardScaler sc= StandardScaler() X_train = sc.fit_transform(X_train) X_test = sc.transform(X_test) y_train = sc.fit_transform(y_train) y_test = sc.transform(y_test)  import keras.backend as K   def calc_accu(y_true, y_pred):   return K.mean(K.equal(K.round(y_true), K.round(y_pred)))  def get_spfnet():   ann = tf.keras.models.Sequential()    ann.add(Dense(X_train.shape[1], activation='relu')) # ann.add(BatchNormalization())   ann.add(Dropout(0.3))   ann.add(Dense(32, activation='relu', kernel_regularizer=regularizers.l2(0.01)))  # ann.add(BatchNormalization())   ann.add(Dropout(0.3))   ann.add(Dense(32, activation='relu', kernel_regularizer=regularizers.l2(0.01)))  # ann.add(BatchNormalization())   ann.add(Dropout(0.3))    ann.add(Dense(1))   ann.compile(loss='mse',               optimizer='adam',               metrics=[tf.keras.metrics.RootMeanSquaredError(), calc_accu])   return ann  spfnet = get_spfnet() #spfnet.summary() hist = spfnet.fit(X_train, y_train, batch_size=32, epochs=250, verbose=2)  the accuracy and loss graphs are plt.plot(hist.history['calc_accu']) plt.title('Model Accuracy') plt.xlabel('Epochs') plt.ylabel('Accuracy') plt.show() plt.plot(hist.history['root_mean_squared_error']) plt.title('Model error') plt.xlabel('Epochs') plt.ylabel('error') plt.show()       after 50 epochs nothing seems to improve, neither curve seems to overfit on the data I tried other models like reducing layers and removing kernel regularizes, using kernel_initlizers='normal' and 'he-normal'    but they perform poorly stuck at 20%. dataset:


We never seem to see any beings of Yoda's species - except, of course, Yoda himself.  This leads us to the question of where the rest of the li'l critt'rs are. Yoda had to have parents, correct? So what happened to them? Was Yoda, put simply, just one of the last of a dying species?


How to create several root-like and non_root-like linux users

I have a red-hat system with its root and non-root users. I have to create n new root-like users and m new non-root users. Basically I have to clone the 2 kind of users already present on the server.  The purpose is to give to each person able accessing to the server their unique credentials. Someone can act as root, someone else can act as a non-root user.   I considered it different than giving root power to another user, because I have to create new root-like users.


Proving normality of a subset from its generators

Exercise 3.26 in Dummit and Foote reads:     Let $N = \langle S\rangle$ for some subset $S$ of $G$. Prove that $N \trianglelefteq G$ if $ gSg^{-1} \subseteq N$  for all $g \in G$.   If $S$ is a finite set, I presume the proof is straightforward. Suppose $ gSg^{-1} \subseteq N$  for all $g \in G$. Any element of $N$ can be written as a product of elements of $S$. The properties of conjugation therefore make that the conjugate of an element of $N$ is a product of conjugates of elements of $S$. Since the latter by the assumption are all in $N$, conjugation will be closed in $N$.  I have two questions, however. First, how to go about an infinite $S$? An element of $N$ could be a product with infinitely many factors, for which the properties of conjugation have not been proven.  Second, I would think that the question might have read:     "Prove that $N \trianglelefteq G$ if and only if $ gSg^{-1} \subseteq N$  for all $g \in G$."   Indeed, if $N \trianglelefteq G$, since $S \subseteq N$, $gSg^{-1} \subseteq N$  for all $g \in G$, proving the reverse implication.  Did I make a mistake here? (I am suspicious because it is my impression that it is not very like. D&F not to make the most comprehensive statements.)


Execute gsub after first instance of closing character instead of continuing to end of string

I have a dataset in which the columns are survey questions and values in the rows contains the answer selected by the responded as well as multiple HTML tags. I'm trying to remove all the HTML tags to be left with just the answer text.   In Excel, this could be accomplished by doing <*> with an empty string as the replacement. I can't figure out how to do this in R though because the problem I'm having is that I can't get the wildcard to stop after the first greater-than bracket. Instead, it simply recognizes that as being a part of the wildcard and continues on to the end of the string. I've included a toy dataset and my attempt below.  temp <- data.frame(one = c('Answer 1',                          'Answer 2',                          'Answer 3'),                    two = c('apples are red',                          'apples are blue',                          'apples are bananas'))   temp[] <- sapply(temp, function(x) gsub('<.*>+', "", x))  # what I want the new temp to look like (above code results in empty strings data.frame(one = c("Answer 1",                     "Answer 2",                     "Answer 3"),            two = c("apples are red",                    "apples are blue",                     "apples are bananas   I tried using the code for nth occurence and a few others but it still continues on past the firsts instance to the end of the string.   What's the regex command I'm missing to make it terminate after the first instance? Also, I assume it will it move on to the next row after completing that first removal, thus forcing me to run the gsub() n number of times where n is the max number of tags in any given column. That's not particularly problematic but is there a workaround for that?


Why is Apple changing the default shell to zsh?

As bash is so broadly available, it provides a good compatibility layer for users that come from other Posix systems to use macOS. Why the move to zsh as the default shell, and why the extensive deprecation warning, as bash itself was deprecated?


Grover's algorithm: a real life example?

I'm fairly confused about how Grover's algorithm could be used in practice and I'd like to ask help on clarification through an example.  Let's assume an $N=8$ element database that contains colors Red, Orange, Yellow, Green, Cyan, Blue, Indigo and Violet, and not necessarily in this order. My goal is to find Red in the database.  The input for Grover's algorithm is $n = \log_2(N=8) = 3$ qubits, where the 3 qubits encode the indices of the dataset. My confusion comes here (might be confused about the premises so rather say confusion strikes here) that, as I understand, the oracle actually searches for one of the indices of the dataset (represented by the superposition of the 3 qubits), and furthermore, the oracle is "hardcoded" for which index it should look for.  My questions are:   What do I get wrong here? If the oracle is really looking for one of the indices of the database, that would mean we know already which index we are looking for, so why searching? Given the above conditions with the colors, could someone point it out if it is possible with Grover's to look for Red in an unstructured dataset?    There are implementations for Grover's algorithm with an oracle for $n=3$ searching for |111>, e.g. (or see an R implementation of the same oracle below):     Again, my confusion is, given I do not know the position of $N$ elements in a dataset, the algorithm requires me to search for a string that encodes the position of $N$ elements. How do I know which position I should look for when the dataset is unstructured?  R code:   #START  a = TensorProd(TensorProd(Hadamard(I2),Hadamard(I2)),Hadamard(I2))  # 1st CNOT  a1= CNOT3_12(a)  # 2nd composite  # I x I x T1Gate  b = TensorProd(TensorProd(I2,I2),T1Gate(I2))   b1 = DotProduct(b,a1)  c = CNOT3_02(b1)  # 3rd composite  # I x I x TGate  d = TensorProd(TensorProd(I2,I2),TGate(I2))  d1 = DotProduct(d,c)  e = CNOT3_12(d1)  # 4th composite  # I x I x T1Gate  f = TensorProd(TensorProd(I2,I2),T1Gate(I2))  f1 = DotProduct(f,e)  g = CNOT3_02(f1)  #5th composite  # I x T x T  h = TensorProd(TensorProd(I2,TGate(I2)),TGate(I2))  h1 = DotProduct(h,g)  i = CNOT3_01(h1)  #6th composite  j = TensorProd(TensorProd(I2,T1Gate(I2)),I2)  j1 = DotProduct(j,i)  k = CNOT3_01(j1)  #7th composite  l = TensorProd(TensorProd(TGate(I2),I2),I2)  l1 = DotProduct(l,k)  #8th composite  n = TensorProd(TensorProd(Hadamard(I2),Hadamard(I2)),Hadamard(I2))  n1 = DotProduct(n,l1)  n2 = TensorProd(TensorProd(PauliX(I2),PauliX(I2)),PauliX(I2))  a = DotProduct(n2,n1)  #repeat the same from 2st not gate  a1= CNOT3_12(a)  # 2nd composite  # I x I x T1Gate  b = TensorProd(TensorProd(I2,I2),T1Gate(I2))  b1 = DotProduct(b,a1)  c = CNOT3_02(b1)  # 3rd composite  # I x I x TGate  d = TensorProd(TensorProd(I2,I2),TGate(I2))  d1 = DotProduct(d,c)  e = CNOT3_12(d1)  # 4th composite  # I x I x T1Gate  f = TensorProd(TensorProd(I2,I2),T1Gate(I2))  f1 = DotProduct(f,e)  g = CNOT3_02(f1)  #5th composite  # I x T x T  h = TensorProd(TensorProd(I2,TGate(I2)),TGate(I2))  h1 = DotProduct(h,g)  i = CNOT3_01(h1)  #6th composite  j = TensorProd(TensorProd(I2,T1Gate(I2)),I2)  j1 = DotProduct(j,i)  k = CNOT3_01(j1)  #7th composite  l = TensorProd(TensorProd(TGate(I2),I2),I2)  l1 = DotProduct(l,k)  #8th composite  n = TensorProd(TensorProd(PauliX(I2),PauliX(I2)),PauliX(I2))  n1 = DotProduct(n,l1)  n2 = TensorProd(TensorProd(Hadamard(I2),Hadamard(I2)),Hadamard(I2))  n3 = DotProduct(n2,n1)  result=measurement(n3)  plotMeasurement(result)


How to write norm symbol with three line?

I want to have a norm symbol with three line in my equation such as |||x||| but with equal distances.


Need help understanding separable polynomials

I have the following definition of what it means for a polynomial to be separable:     Let $E$ be a field and $P \in E[x]$ be irreducible. Then we say $P$ is separable if it has no repeated root in any field extension of $E$.   If $P\in E[x]$ is reducible, we say $P$ is separable if all of its irreducible factors are separable.   In the irreducible case, we have shown $P$ is separable if it has no repeated root in a splitting field extension.  Can anyone give me an example of a polynomial which is not separable? I don't see why this definition isn't trivial. For example, if I had a double root like $(x-2)^2$ then the polynomial is reducible so we consider $(x-2)$ and $(x-2)$ separately, each of which does not have a double root. So when could we ever have a polynomial which is not separable?


Will upgrading my camera body improve my live music photography?

Currently I've been running an EOS M100 with the stock 15-45 mm, f3.5-6.3 lens.  I've recently acquired a sigma 17-50, f2.8 lens and adapter to fit the lens to the mirrorless M100.     How worthwhile would you folks view it pick up a new body. How much would I be looking to spend to find comparable to better image quality, better low-light photos, and quicker focusing (or is that going to be a primary function of the lens). I recognize the lens is not an ideal low light lens also.   My focus right now is currently live music events so my thinking was this would serve those purposes.   Please share your thoughts, I know very little about photography on a professional level but I'm passionate and pursuing it aggressively. Thanks for your input, I really appreciate it.


Can't get the adapter of the Dialogfragment

I Created class named Popupdialog which extends DialogFragment. So there is a recyclerview and adapter in that Popupdialog class.but when I am calling ((MyRecyclerViewforsmallcardincart)adapter).getmDataset(); from the activity ,I am getting NullpointerException.I know that the adapter is not going to the DialogFragment instead its uses its own adapter.How to overcome from this NullpointerException. adapter in the DialogFragment  adapter=new MyRecyclerViewforsmallcardincart(activity,data);                             recyclerView.setAdapter(adapter);   Error part of the activity  dataset=((MyRecyclerViewforsmallcardincart)adapter).getmDataset();                 int o=((MyRecyclerViewforsmallcardincart)adapter).getdatasize();   actually the problem is that the activity and dialog fragment had individual adapter. how can I able to pass the adapter to Dialog fragment?  FragmentManager fm = getFragmentManager();                 PopupDialog dialogFragment = new PopupDialog();                 dialogFragment.setArguments(args);                 dialogFragment.show(fm, "Color picker")   this is what I used to call DialogFragment.Thanks in advance


Relation Between Definitions of Geometric Independence

I'm struggling to see how these two definitions of geometric independence are related. In Elements of Algebraic Topology by J. Munkres the following definition is given:  Given a set $\{a_0,a_1,\ldots,a_k\}$ of points in $\mathbb{R}^n$ is said to be geometrically independent if for any (real) scalars $t_i$, the equations \begin{equation} \sum_{i=0}^kt_i =0, \text{ and }\sum_{i=0}^k t_ia_i =\boldsymbol{0} \end{equation} imply that $t_0 = t_1 = \ldots = t_k =0$.  And in Basic Concepts of Algebraic Topology, by F. H. Croom, geometric independence is defined as  A set $A=\{a_0,a_1,\ldots,a_k\}$ of $k+1$ points in $\mathbb{R}^n$ is geometrically independent means that no hyperplane of dimension $k-1$ contains all the points.  Croom defines the hyperplane as the set $H = \{v+a\mid a\in A\}$, where $A$ is a subspace of a vector space $V$ and $v\in V$. Any help is gladly appreciated.


How to paint color on different part of an object?

I have a long object (a leg bone). The object consists of two parts (left and right) which are divided by a non-manifold plane (zero thickness). I would like to ask if there is any way to paint the right part with different color than the left part without "cutting" the object by Boolean modifier? Thank you


How can I set up a parameter as an attribute drop down menu on a script tool?

I have built a script tool in ArcGIS Pro and I would like to set up one parameter as a drop down menu (the options in the drop down menu should be all the attribute values of one of the map layers).   I can't seem to find the right 'Data type' to pick up. If I choose 'Layer' as 'Data Type' and I run the tool I get a drop down menu with all map layers. I'm looking for something similar but specific to a layer field. If I choose 'field' in 'Data Type' and I run the tool absolutely nothing happens. What is this 'field' referring to? How could I achieve what I'm looking for?


Prove that $ \lim_{h\to0}\intop_{a}^{b}|f\left(x+h\right)-f\left(x\right)|dx=0 $

let $ f $ be integrable function in the interval $ [a-\varepsilon,b+\varepsilon] $ for $ \varepsilon>0 $  and let $ -\varepsilon<h<\varepsilon $. prove that :  $ \lim_{h\to0}\intop_{a}^{b}|f\left(x+h\right)-f\left(x\right)|dx=0 $  Here's what I tried:  I've proved that $ \intop_{a}^{b}f\left(x+h\right)dx=\intop_{a+h}^{b+h}f\left(x\right)dx $   And then I proved that $ \lim_{h\to0}\intop_{a}^{b}\left(f\left(x+h\right)-f\left(x\right)\right)dx=0 $   But I'm not sure how to make the connection between the previous things I've proved to this statement.   Note: we have'nt learned in class Lebesgue integral so we can only use Riemman integral in the proof.


Ubuntu not loading from USB flash on HP netbook

Trying to install Ubuntu on a HP Netbook Mini 210-4150NR( 1GB RAM)  I have installed ubuntu 12.04 LTS using uNetbootin and USB installer on USB. Changed the boot sequence in BIOS to load from the USB and it is recognising the USB.  On starting it shows the following message and is stuck at a blinking underscore:  SYSLINUX 4.03 2010-10-22 EDD Copyright (C) 1994-2010 H. Peter Anvin et al  based on various threads in this forum I tried formatting the USB flash drive as NTFS and installing and restarting but the BIOS did not recognise the same & went ahead to load windows.  I tried downloading a fresh iso using the link from the USB installer app, but the same result.  I tried the solution given at but to no avail  -   Please help with installing ubuntu on my netbook. ( I am using a PNY 8GB USB flash)


Why does a rocket engine have increasing power as the speed of the rocket increases?

Sorry to repeat this question, but I got no definite answer , so I am trying to state the question more clearly.   Power = force x distance / time = force x velocity.  So if we apply a small constant force, as velocity increases, we get power which keeps increasing with the velocity. How is it possible to obtain increasing power from a small constant force?   Specifically, consider a rocket in space, which has a large supply of fuel, burns fuel at a small constant rate, meaning the input power is constant and the generated force (thrust) is also constant. As it accelerates from zero to millions of m/s, we are getting increasing power from the small constant force.  How is this possible? Where does the increasing power come from, when the power from the fuel was constant?  Our assumptions   We do not approach the speed of light, so I am not seeking a relativistic solution.  I am not considering the reduction of mass of the rocket as it burns fuel. If we considered the reduced mass, then it would increase the obtained acceleration, velocity and power still further, from the small constant input power, so would not solve the problem.   Rocket theory states that thrust does not depend on the velocity of the rocket with respect to the observer, it only depends on the exhaust velocity relative to the rocket, so as the rocket accelerates (to beyond the exhaust velocity), the thrust really will be constant, by burning a small constant amount of fuel.    Previous attempts at solution  The answer which came closest to solving the problem was that when the rocket is at rest, we are accelerating both the rocket and exhaust in opposite directions, so we are spending the energy of the fuel on both, and only a small portion of the input power is used for accelerating the rocket, most of it is used for accelerating the exhaust. As the rocket speeds up, the velocity of the exhaust relative to the observer reduces, so we spend more of the input power in accelerating the rocket and less on accelerating the exhaust. However, this answer fails as the rocket exceeds the exhaust velocity, and both the rocket as well as the exhaust are moving forward relative to the observer. Now, as the rocket accelerates forward, the exhaust accelerates forward too, so the power for accelerating both keeps increasing again, so we get an increasing power from a small constant input power. How is this possible?  Also someone commented that we are not getting increasing power, but we have to provide increasing power to keep accelerating under a small constant force. How does this help to solve the problem in our scenario? We are still burning fuel at a small constant rate and the rocket keeps accelerating. Where does the extra power that we need to “provide” come from? Why does the rocket keep accelerating although the equation clearly states that it cannot do so unless we provide increasing input power (increasing fuel)?


What is the difference between a font and a typeface?

Originally, the typeface is a particular design of type, while a font is a type in a particular size and weight. In short, a typeface usually gathers many fonts.  Nowadays, with the digital design of documents, you often see those two words used rather interchangeably. It doesn't make much sense to say that “Helvetica 12” and “Helvetica 14” are different fonts (they used to be different drawers with different blocks of lead, now they're all a single OTF file!).  So, my question is: Does the difference between a 'font' and a 'typeface' subside in the language? Or are font and typeface now used interchangeably even by pros?


Why is the triangle inequality property important for metric spaces?

There is a property in the axiomatization of metric space: $d(x,z)\le d(x,y)+d(y,z)$. I understand that property applies well when it come to the measure of distances among points. However, that property seems to be irrelevant in the definitions of continuity, open set and some other key concepts.  My topology book says that it is asserting "the transitivity of closeness", a vague term that loses me. So why is that property important? Why did the founders (if any) of topology consider it at the first place? And what if that property is missed?


I'm using ADO and I retrieve a string data from mysql database.  CString         cstrPrivilege; char*           charPrivilege; //assume that I have done the database connection //let said the data is "Admin" cstrPrivilege = (LPCTSTR)(_bstr_t)m_pRecordset->GetCollect("Privilege"); wcout << cstrPrivilege.GetString() <<endl; // no problem, show "Admin"   The problem now is I want to assign convert the cstrPrivilege to charPrivilege for strcmp() purpose. But I have no idea and I have try a lot of method like:  charPrivilege = (LPSTR)(LPCTSTR)cstrPrivilege;  cout << charPrivilege; // only show the first character, show "A" only    and  charPrivilege = (LPSTR)(LPCTSTR)cstrPrivilege.GetBuffer(cstrPrivilege.GetLength()); // show "A" only too   I had found that my cstrPrivilege is in LPCWSTR type, but I still have no idea how to convert it.  Anyone have idea to solve it?


I am trying to find  $$\lim \limits_{n \to \infty}{1*4*7*\dots(3n+1) \over 2*5*8* \dots (3n+2)}$$  My first guess is to look at the reciprocal and isolate factors:  $${2 \over 1}{5 \over 4}{8 \over 7} \dots {3n+2 \over 3n+1}= {\left(1+1\right)}\left(1+{1 \over 4}\right)\left(1+{1 \over 7}\right) \dots \left(1+{1 \over 3n+1}\right)$$ Now we take the natural log: $$\ln{ + \ln\left(1+1\right)} + \ln\left(1+{1 \over 4}\right) +\ln\left(1+{1 \over 7}\right) \dots +\ln\left(1+{1 \over 3n+1}\right)$$ Using $\ln(1+x) \le x$, we get: $$\ln{ + \ln\left(1+1\right)} + \ln\left(1+{1 \over 4}\right) +\ln\left(1+{1 \over 7}\right) \dots +\ln\left(1+{1 \over 3n+1}\right) \le 1 + {1 \over 4} + {1 \over 7} + \dots + {1 \over 3n+1}$$ Now, I'm stuck. I suppose I might use the fact that the RHS is similar to the harmonic series and show that it converges to some log, but I'm not sure how to do that. Do you have any clues?


I need help to find the Galois Group of $x^5 +1$. I know that it has a 5-cycle and a 4 cycle and is not a subgroup of $A_5$. Thanks!


Including chapter as a separate TeX file

I am trying to include a separate TeX file that will contain the text of a chapter, however when I try to point the main TeX file to the chapter TeX file, there is an error which claims to not be able to locate it.  Here is a MWE:  %%Preamble%% \documentclass[11pt]{book} \usepackage[english]{babel} \usepackage{graphicx} \usepackage{hyperref} \usepackage[framemethod=TikZ]{mdframed}     \mdfsetup{%     middlelinecolor=red,     middlelinewidth=2pt,     backgroundcolor=gray!10,     roundcorner=10pt} \usepackage[scale=2]{ccicons} \title{\bf{An Econometrics Primer}} \author{David Clark} \date{}  \begin{document}  \frontmatter     \maketitle     \vspace*{\fill}       \begin{mdframed}         Except where otherwise noted, this work is licensed under \\         \bf{https://creativecommons.org/licenses/by-nc-nd/4.0/} \\         \ccbyncnd         \end{mdframed}     \tableofcontents  \mainmatter  \include{Chapter One/chapter1}  \backmatter  \end{document}   The directory path to the chapter tex file is as follows, where Introduction to Econometrics in the Primary Files folder is the TeX file which is compiled using the MWE above:


ORA-01950 error during the execution of insert statement

SQL> insert into DEPT values(101, 'RAMESH'); insert into DEPT values(101, 'RAMESH')         *      ERROR at line 1:       ORA-01950: no privileges on tablespace 'USERS'   I cant sort the above problem?


SSL/TLS for SMTP on Exchange 2010 but not using STARTTLS

I am forced to use an old legacy system that apparently is never going away which requires an SSL/TLS connection but then transmits the information through the TLS tunnel plain text.  The most common thing I am finding for using TLS with exchange 2010 is to have a plain text connection and then use STARTTLS to begin encryption and send your message encrypted after the original plaintext connection.  Can someone help me de-cypher the settings inside exchange 2010's receive connector settings to accomplish this?


Selective format-compliant JPEG encryption?

I am working towards building a format-compliant encryption system for pictures. The aim of it is to be able to obscure specific areas of a picture (i.e. faces, car license numbers...) while keeping the rest unaltered. The aim would be, for instance, being able to publish a picture on any given social network, making the "sensitive" regions visible only to a limited number of people, probably a subset of your friends, whom have been granted permission.  I had some (arguable) ideas regarding pixel permutations and BMP, but I have stumbled face-first on the fact that most social networks use exclusively JPEG, and any other format is compressed, essentially ruining the scheme.  So now I am stuck trying to find a new encryption scheme. Ideally, it should have the following properties:   Format-compliant: the image should be still a valid JPEG, openable and viewable. Unobtrusive: as much as possible, the encrypted image should not have a chunk of randomly colored pixels on the encrypted areas, but keep somewhat close to what it "should" look like - something like blurring or pixelation, but reversible. The rest of the image should be unaltered. Secure: aside from the crypto perspective, from a perceptual point of view the image should be obscured enough so as to make, e.g. a face unrecognisable without decoding.   2 and 3 are somewhat opposite, so my aim is finding some acceptable middle ground between them.  I have been trying to work with Droogenbroeck and Benedett's , which proposes, for every 8x8 square, keeping the DC (aka most significant) coefficient of the DCT, and encoding the rest. However, it works pretty badly for mid-large images: since encryption is done on small squares, and the DC coefficient -which holds most of the energy- is left unaltered, the larger the image is, the "smaller" those 8x8 become in proportion, eventually becoming useless for images over about 500x500. Other than that, most papers I have found use JPEG2000 - which apparently would make everything much easier, but basically isn't supported by anything, so it doesn't seem a reasonable solution for now.  I know this is a bit on the open-ended-questions side, so specifically, my question is: Is there previous work, or any already discussed solution, for this problem or some other similar one? Do you have any ideas about how to approach this?  Thank you for your time, and please let me know if there is I can clarify - ideally I should link pictures of what I mean, but I don't think I'm allowed below a certain rep threshold :(  EDIT   As fgrieu noted, this has an added problem [please see below]. For example, Facebook apparently decompresses and recompresses the image on uploading, which means an additional, unavoidable quality loss. That means "fine-grained" tricks with coefficients – especially the least significant ones – would not work. (Also thanks to Ilmari Karonen for linking the paper!)  The problem pointed by fgrieu is avoidable in other social networks - for instance, Google+ does not recompress the image, so no problems there.


I have two JavaScript objects   a =  {"aa" : "foo"} b = {"b" : "bar"}   I want to concat both and want to get this result  result =  {"aa" : "foo" , "b" :"bar"}   what is the simplest way to do this in plain javascript. I am not using any external libraries like jquery or underscore.


Add the ability to see your public profile on Stack Exchange

I think it would be a very useful feature to see my profile as others see it on Stack Exchange. Perhaps in the form of a "Public profile" button on the user's profile that would allow me to see my profile as others see it.  I've seen some questions related to this for the Stack Overflow Careers site, but I don't use that one... yet. LinkedIn has a button that shows your public profile, but I don't see anything like that here.  One of several motivations would be, for example: I have my email address on there, can others see it? Sure I could just remove it if I didn't want others to see it.    Also, when I look at other users, I see their % accept rate but I don't see that for myself.


Formulate equation after fitting to log(y)~x) using lm()

Following code was used to fit a function to my data;  # dataset x <- c(0,10000,20000,30000,40000,50000,60000,70000,80000,90000,100000,110000,120000,130000,140000,150000) y <- c(1034,908,794,693,602,523,452,392,339,294,255,221,195,171,152,135)  # visualize dataset plot(x,y, xlim=c(0,160000), ylim=c(0,1200), pch=".") lines(x, y,lwd=2, col="green")  # fit model model <- lm(log(y)~x) prediction <- exp(predict(model,list(Time=y)))  # visualize model par(new=T) plot(x,prediction, xlim=c(0,160000), ylim=c(0,1200), pch=".",xlab="", ylab="") lines(x, prediction,lwd=2, col = "red", xlab = "Time (s)", ylab = "Counts")   Values created by predict() fit nice to my data;    Following output is created by summary(model);  Call: lm(formula = log(y) ~ x)  Residuals:       Min        1Q    Median        3Q       Max  -0.024165 -0.011078 -0.002164  0.009068  0.036583   Coefficients:               Estimate Std. Error t value Pr(>|t|)     (Intercept)  6.945e+00  7.542e-03   920.9   <2e-16 *** x           -1.384e-05  8.567e-08  -161.6   <2e-16 *** --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  Residual standard error: 0.0158 on 14 degrees of freedom Multiple R-squared:  0.9995,    Adjusted R-squared:  0.9994  F-statistic: 2.61e+04 on 1 and 14 DF,  p-value: < 2.2e-16   As far I'm aware I'm fitting the following model; right?  $\log(y)=X\beta+\epsilon$;   I'm not able to formulate the equation based on above output... Unfortunately the following (closely related) question did not help me.   How to formulate the equation? Any help is greatly appreciated! Thanks!


If any integer to the power of $x$ is integer, must $x$ be integer?

My apologies if this has been asked already, I've searched but couldn't find it...  Let $x$ such that for every $y \in N$, $y^x$ is an integer. Does that necessarily mean that $x$ is an integer?


MySQL server has gone away - production site

Possible Duplicate:          My website is moved from localhost to virtual hosting and after 1 week I receive an error 2006 2006 MySQL server has gone away. Now I can create/edit content but not content types and cannot clear the cache, I see white screen in this case. My hoster said that the max_allowed_packed size is only 1M and I cannot change it.   Is there a way to fix this error?    I deleted content types I don't use now and the problem has gone away... And now I can also clear the cache and edit other content types. What it was I cannot understand, it's beyond me


I am new to Ubuntu and am using the  to develop in Pyton and have a directory in /home/myPython/ containing .py files.   I would like to type a file name from the terminal (E.G. colors.py) and python would load and execute it.  I tried putting myPython\ files into what I thought was the path but that didn't help.  How should I proceed?


Horizontal enumeration in multiple columns

Consider the following minimal example:  \documentclass{article}  \setlength{\parindent}{0mm}  \usepackage{paralist} \usepackage{tabto}  \begin{document}  \NumTabs{3} \begin{inparaenum} \item text \tab\item text \tab\item text \tab\item text \tab\item text \tab\item text    \end{inparaenum}  \end{document}   Which results in:    It does exactly what I want, but I was wondering whether it was possible to create an environment, say tabbedEnum so that we can eliminate the use of the \tab, in particular, that the first case doesn't need a tab but all others do. Something of the form:   \begin{tabbedEnum}[3] \item text \item text \item text \item text \item text \item text \end{tabbedEnum}


I have experienced, and read in several articles that LED’s get dimmer “over time”. I’m looking for a clarification: is it really over time, or is it hours of usage?  So if I put an LED bulb in a cabinet (with no power on it) for 10 years, and then power it on, will it be noticeably dimmer than when it was new?  All the articles I’ve read (even one that gave a pretty good laymen’s description of how LEDs work at the electron valence level) simply say “dimmer over time”, and not “dimmer with use”, so I’m guessing that the answer to my question is “yes”, I just wanted to verify that.


Efficient query to get greatest value per group from big table

Given the table:      Column    |            Type               id           | integer                       latitude     | numeric(9,6)                  longitude    | numeric(9,6)                  speed        | integer                       equipment_id | integer                       created_at   | timestamp without time zone Indexes:     "geoposition_records_pkey" PRIMARY KEY, btree (id)   The table has 20 million records that is not, relatively speaking, a large number. But it makes sequential scans slow.  How can I get the last record (max(created_at))  of each equipment_id?   I've tried both the following queries, with several variants that I've read through many answers of this topic:  select max(created_at),equipment_id from geoposition_records group by equipment_id;  select distinct on (equipment_id) equipment_id,created_at    from geoposition_records order by equipment_id, created_at desc;   I have also tried creating btree indexes for equipment_id,created_at but Postgres finds that using a seqscan is faster. Forcing enable_seqscan = off is of no use either since reading the index is as slow as the seq scan, probably worse.  The query must run periodically returning always the last.  Using Postgres 9.3.  Explain/analyze (with 1.7 million records):  set enable_seqscan=true; explain analyze select max(created_at),equipment_id from geoposition_records group by equipment_id; "HashAggregate  (cost=47803.77..47804.34 rows=57 width=12) (actual time=1935.536..1935.556 rows=58 loops=1)" "  ->  Seq Scan on geoposition_records  (cost=0.00..39544.51 rows=1651851 width=12) (actual time=0.029..494.296 rows=1651851 loops=1)" "Total runtime: 1935.632 ms"  set enable_seqscan=false; explain analyze select max(created_at),equipment_id from geoposition_records group by equipment_id; "GroupAggregate  (cost=0.00..2995933.57 rows=57 width=12) (actual time=222.034..11305.073 rows=58 loops=1)" "  ->  Index Scan using geoposition_records_equipment_id_created_at_idx on geoposition_records  (cost=0.00..2987673.75 rows=1651851 width=12) (actual time=0.062..10248.703 rows=1651851 loops=1)" "Total runtime: 11305.161 ms"


If $A$ and $B$ are independent events, and $A$ and $C$ are independent events, how do I show that $A$ and $B\cup C$ are independent?

Let $A$ and $B$ be independent events, and let $A$ and $C$ be independent events. How do I show that $A$ and $B\cup C$ are independent events as well?  According to the definition of independent events, $A$ and $B\cup C$ are independent if and only if $$P(A\cap (B\cup C)) = P(A)P(B\cup C).$$  Since $A$ and $B$ and $A$ and $C$ are independent, I know that $$P(A\cap B) = P(A)P(B) \quad\text{and}\quad P(A\cap C)=P(A)P(C).$$  However, I have no idea how to solve this. I attempted to apply the probability rules I know but got nowhere.


Combinations from n arrays picking one element from each array

Though i found answer to this in the below link, i want to know how to achieve this using itertools in python.


I was reading today that someone found $\pi$ to the ten trillionth digit.  Whenever I read that $\pi$ has been calculated to more digits, I ask myself whether this is useful.  I know that there are conjectures out there about distributions of numbers in $\pi$ and such.  So, I supposed knowing more digits helps us test conjectures.  But, are there more reasons that we would want to know the digits?  Anything really cool I'm ignoring or forgetting?


How to split my huge banner (W5155 mm x H870 mm) into 2 so i can save it as pdf for printing?

I need help on saving my banner into pdf to send to the printing shop. I currently can't save my banner as pdf because it's too big.. If I split it into 2 artboards, will the printing result still be in 1 continuous banner? Sorry, I'm a newbie. I've tried to find tutorials on this but only found the tutorial to split 1 big image into 2 panels and ended up they print the banner sepparately.. A respond will be much appreciated thanksss :))


What exactly does 'Wipe available diskspace' do?

One of the options offered when you right click the desktop or within a Nautilus window is "wipe available diskspace." I'd think that means all unused diskspace but assumptions can be dangerous. I don't want to try it only to find out that available meant "all". I can't remember seeing this option before 12.04.  I was asked to provide an image but unfortunately when right clicking to get the drop down menu, the print screen function doesn't respond thereby making an image impossible.  It appears that no responder so far has actually used this nautilus option. Jorge suggested that the feature was actually nautilus-wipe and I verified that is the case by removing nautilus-wipe and seeing that the menu option is now gone. Documentation for nautilus-wipe is almost non-existent and what little I found was superficial and contradictory. This doesn't leave me with a warm and fuzzy feeling regarding my using an application or feature that purports to "wipe disk" without a clear definition of what is wiped.


Two example statements meant to demonstrate the importance of quantifier order don't appear to do so

In a book1 I have encountered the following:     To check your understanding of [the importance of quantifier order], consider the following two statements. One is true, and the other is false. Which is which?   $$ \exists y > 0\ \text{such that}\ \forall x > 0, y < x $$   $$ \forall x > 0\ \exists y > 0\ \text{such that}\ y < x $$   (The type of $x$ and $y$ aren't specified, but I've assumed they are real numbers)  I think I understand how the two statements are different. However, to me, both statements appear to be false:  Start by assuming either statement is true. Since $y < x$, we can state that $y = x - d$, where $d > 0$. Let us consider the case that $x = d$. Substituting $x$ for $d$ gives us: $y = d - d \implies y = 0$. This contradicts the requirement in both statements that $y > 0$. Both statements must be false.  Alternatively stated: Whatever the value of $y$, there is a value of $x$ where $x = y$, contradicting the requirement that $y < x$.  Has the author made a mistake or am I making one? If so, please explain my mistake and help me understand which one is true, and why (with emphasis on the order of the quantifiers if possible).    1How to Study for a Mathematics Degree by Lara Alcock, p73


OK, I know Rey was probably taught in the ways of the force from a young age and that Kylo Ren was injured. But that still does not explain how someone like Kylo Ren who was far more experienced in many aspects of the force than a once young-ling was not able to quickly dispatch Rey with a few quick moves.  How was this possible?  EDIT: I am not suggesting that Rey was untrained, however I am asking how someone who was more versed in the force could not dispatch someone who is not with-in a few strokes of their light saber? And no question specifically addresses why Rey was able to stand up to Kylo Ren?


Prove: if p is prime and p ∣ ab, then p ∣ a or p ∣ b.

Our teacher went over the following proof but didn't post the notes on it.  I'm trying to understand how it checks out, could someone explain it without using contraposition.   For any integers a,b,p, if p is prime and p ∣ ab, then p ∣ a or p ∣ b.


I have dual booted my laptop with windows 7 and ubuntu 13.04. Now i want to remove my ubuntu partition. Is there any way to remove ubuntu partition without casing any harm to my  windows 7? I have tried to delete the ubuntu partition from my windows 7 but its not working. please suggest me the proper way to do it.


Related:    I recently noticed something: The off topic subreason chosen by flaggers doesn't make any difference at all. Specifically, the subreason chosen is not shown to close voters.  Besides, as the "other" reason is unavailable, a lot of cases that aren't covered by the custom off topic reasons aren't flaggable unless you use a moderator flag (which is less useful as it doesn't go into the review queues). This is a gap in the workflow, and not entirely intuitive for flaggers.  I propose that we give the flaggers one close off topic reason (and one migration reason)? It seems like the backend already treats custom close flags as the same.  The most obvious objection here (to me) is that it removes part of the usefulness of the close reasons -- the fact that, for flaggers and VTCers, it's much easier to determine whether or not the question should be closed.   However, this can be solved by nesting the close reasons under the description of a  generic "Does not fit the topic" close reason.    Alternatively, just give flaggers an extra default close reason "This question does not appear to be about $Topic, within the scope defined in the help center."


in a few hours we have in middel europe an total sun eclipse. And as in the titel you can read I want to know how to photograph the sun eclipse.   Please note that I do not have any experience or knowledged about cameras, photography etc. BUT I KNOW THAT FOR THIS KIND OR RECORD IS A SPECIAL FITER REQUIERD TO HOLD IN FRONT OF THE CAMMERA, and I have this filter.  For an beginnner like me, a generally explantion or a link to a tutorial/ instruction would be nice ;-) thx  But to be more detailed my questions are:   What would be the best camera device?[1] What are the best configuartion for the camera device? [2] Is it better to photograph or to film a sun eclipse? What/ Where would be the best place to make this record? For example, Mountain or Roof or Surface?   [1]: I have a samsung Galaxy note 2 (8 MPx); Samsung Galaxy note 1 (8 MPx); Rollei Powerflex 820; Sony slt-a58k (with dt 18-55mm f3.5-5.6 sam ii). So whitch one would be the best?   [2]: How to config the best camera above?  As you know I am a absolut beginner, so moderators and commuity feel free to correct or improve me


Compiling/Executing a C# Source File in Command Prompt

How do you compile and execute a .cs file from a command-prompt window?


I would have gone travelling or I would have gone to travel?

Why do we say "I would have gone travelling" instead of "I would have gone to travel"? Because "would" is a modal verb, we usually say that it is followed by an infinitive, not a gerund. Why does the second sentence sound incorrect?


Collection of Nonempty Subsets of $\mathbb{Z^{+}}$ a Class or Set?

In ZFC, is the collection $\mathcal{N}$ of nonempty subsets of $\mathbb{Z^{+}}$ a class or set? Please correct me if I am wrong, but so far as I understand the notion of class, a class is a collection of objects which satisfy a certain property $P$. In this example, let $P$ be the property that $A$ is a nonempty subset of $\mathbb{Z^{+}}$. Take $N=\{S|PS \}$. Then is $N$ not just our collection $\mathcal{N}$, and is $N$ not a class?


How can I get a mentor currently, as a student?

I'm currently a student at an art school, however I know I lack a large amount of experience to even be considered a graphic designer. I don't think I have the portfolio/experience yet to do internships. I do personal projects of my own, research, and read as much as I can about the industry.   But I want to learn as much as I can and gain as much knowledge/advice from experienced graphic designers. But I want to be as respectful and professional as I can about this, so I don't waste the person's time. So I was wondering where I could begin to look and how I could even go about this. I wouldn't mind simple email correspondence with the individual, but I wasn't sure if that was deemed professional. Thank you!


How can I move the boot sector to another drive?

When I installed Windows 7 on my new SSD it seems I messed some parts up during the partition selection, and now I have my system partition with the boot sector on another harddrive, and the boot partition containing Windows on my SSD.  How can I move the boot sector from my hard drive to my SSD, so that the system and boot partition are both the SSD and I don't need the hard drive to boot anymore?  I'm a bit lost on how to do this, as I don't have any idea how I split them in the first place. When I had to repair the boot sector using BootRec.exe I could only put it back on the hard drive, I saw no option to create one somewhere else.  I also want to keep all content on my SSD, so reinstalling Windows is not an option.   Here's a screenshot of my current disk layout (in german, but most terms should be easily recognizable):


Im using a script to delete old file in a directory, but the script kept showing  /usr/bin : Argument list too long   It turned out the number of files were 40000 and more, So I want to know what is the maximum limit of files that can be listed. Is there anyway to find it? Is it system specific?


I'm new to Ubuntu . I need to increase size of swap file from 8 GB to 16 GB , how can i do it ? and is that in this file /etc/fstab ?   by command free -h                total       used       free     shared    buffers     cached Mem:          7.6G       4.8G       2.8G       623M       232M       2.5G -/+ buffers/cache:       2.1G       5.5G Swap:          15G         0B        15G


SSLv3 error with cert generated in OpenSSL

I generated self-signed certificate with latest Ubuntu OS and OpenSSL in it. Certificate has RSA 4096 and SHA512...but it uses SSLv3 and from mozilla I can not access the web page because Mozilla does not support SSLv3 anymore. How can I generate cert. that uses TLS?


Why i used two variables , one didnot declar ,but didnot get global-variables?

First :  function A() {          for (var i = 0; i < 10; ++i) {             //...         }         console.log(i); //i is undefined        // i dont get global i         for (i = 0; i < 10; ++i) {             //...         }      }   When i execute A() , i donot get global var i . But this:      function B() {        // i get global i         for (i = 0; i < 10; ++i) {             //...         }      }   When i execute B() , I get global i . So why i cannot get the global when i execute A() ?


How to keep upstart installed-always, don't be replaced by sysvinit?

Each time I do apt-get dist-upgrade, the package sysvinit comes back and replaced upstart. Well, I have some scripts written for upstart, and I need to reinstall it every time (typing the annoying confirmation Yes, do as I say!) How can I flag it as a solid rock choice, so it won't be replaced forever?


Can I have a same sex marriage to my partner who is overseas?

I hope to seek some advice on marrying my partner who is from South Africa. We have been together 2 years and she has visited me twice in the UK where I am born and lived my whole life. Am I allowed to marry her now whilst she is here but she is only on a visitor visa and I want to surprise her.


Create a mechanism to host more open-ended questions from the main sites

There should be a way to shift an open ended question into a meta and link to it from the main site, or at least have it come up in searches there.  Or maybe Stack Exchange is just too inflexible and a new platform is needed.  Take this question on Stack Overflow for example (the specifics of the question aren't important): ; at the time of this post it had 456 up-votes, 228 stars, and a cumulative 138+ up-votes for comments stating that the question should be reopened.  Additionally, the comments are full of people talking about how useful the question is, but it was closed because "...[it] is not a good fit for our Q&A format...".    Obviously it's a question people are interested in, and it would seem that there should be some why that the SE network would support them (chat isn't it). I originally thought meta, but that got me a whole lot of down votes, so clearly that isn't it.  Still, not having something like this makes SE a lot less useful, because these types of closures happen all the time for questions that people are interested in.


I currently host a ASP.NET MVC site on Microsoft Azure. It's a great service, but a little pricey. Costs like $0.12 an hour just to have your site live, and then they also charge SQL Transfer and storage fees. Not CRAZY expensive, but like basically $100/month even if the site isn't doing anything.  I wanted to find a web host for an ASP.NET MVC site, that isn't going to break the bank while it's in its growing phase. Only data we really need is for storing user accounts for sign-up/logins, and for hosting images. I know a lot of hosts serve PHP/MySQL, and there's also plenty that serve ASP.NET Web Forms, but not nearly as many that serve ASP.NET MVC/SQL Server.  You guys know of any that suit these conditions and are pretty easy to setup?  Thanks!


I'm trying to cut a circle into a cube (as pictured) and the boolean modifier with the sphere is deforming the face of the cube. This is the second boolean modifier (the first being for the speaker cone below). Any idea why this is happening and how I can fix it?


How to count the number of bytes in a very large file, grouping the same bytes?

I am searching for a way to get a statistics on a very large (multiple times larger than the available RAM) the outputs what byte values in the files are present and how often:  A0 01 00 FF 77 01 77 01 A0   I need to know how many A0 bytes there are in this file, how many 01, and so on. The result could be:  A0: 2 01: 3 00: 1 FF: 1 77: 2   Therefore this question is very close to the question  but non of the existing answers works for larger files. From my understanding all answers require a minimum RAM equal to the size of the file to be tested (up to multiple times).   Hence the answers don't work on systems with small RAM, e.g. a Raspberry for processing a multi-GB file.  Is there a simple solution that works on any file size even if we have for example only 512MB RAM available?


How to create (the missing) El Captain recovery partition?

I upgraded from Snow Leopard to El Captain.  Before upgrade I had a bootcamp partition, and a third FAT32 partition. this caused some complications in the upgrade process and I had to delete the El Captain recovery partition (as well as my FAT32 partition).  Now I have two partitions: El Captain in my macintosh partition, and windows in my bootcamp partition, and everything is working fine.   Just that I do not have the El Captain Recovery Partition. Is there a way I can create it manually ? So that just in case something goes wrong I can recover.  (I know about the recovery USB stick, but I want to have recovery on the same HDD)  EDIT: I re-installed the El Capitan. It went smooth. Now I have a 650MB recovery partition. Isn't it supposed to be 6 GB partition?   Thanks


Do we know if there exist true mathematical statements that can not be proven?

Given the set of standard axioms (I'm not asking for proof of those), do we know for sure that a proof exists for all unproven theorems? For example, I believe the Goldbach Conjecture is not proven even though we "consider" it true.  Phrased another way, have we proven that if a mathematical statement is true, a proof of it exists? That, therefore, anything that is true can be proven, and anything that cannot be proven is not true? Or, is there a counterexample to that statement?  If it hasn't been proven either way, do we have a strong idea one way or the other? Is it generally thought that some theorems can have no proof, or not?


Is there a command-line java tool like wget/curl?

I want to write a ant/maven script to download and install some of the internal applications.  I am looking for tool which can give functionality like wget or curl so that I can directly call that from ant/maven it should support multiple protocols like https, ftp, http.  I expect there could be tool by Apache but not getting it.  Does http://hc.apache.org/ works as wget/curl I want all the verification like ssl certificate verification and all.


How do I add a user to the "Authenticate" menu?

I am talking about the menu shown in the screenshot provided:    When I click on "Select user...", a list of users is shown, but my user is missing, although I have sudoer permissions.


Difference between stacking and extruding meshes?

What would be the difference of stacking objects into each other and extruding by starting with one single primitive. How does it influence performance and what are the advantages and disadvantages using either of them? For reference. Between this  and this


Why do cars gain lift while going at a high speed?

I've been researching the physics involved with spoilers and I've just been turning up the same information about spoilers giving the back wheels of a car more traction by acting as an up side down airfoil.   So my question is, what exactly causes the car to apparently gain lift while moving quickly, so as to merit the use of a spoiler, and is this entirely due to the aerodynamics of the vehicle in question?   Edit: Clarity of question.


Two Number theory questions in GRE Mathematics Subject Test

The first one is if $6x+5y$ is a multiple of $13$, what must $b$ be so that $8x+by$ is also a multiple of $13$? The second one is what is the greatest integer divided $p^{4}-1$ for every prime number $p$ greater than $5$? I get the answer $11$ and $240$ respectively by plugging in different numbers. I wonder is there any regular way to solve them.


Suppose that real numbers $x, y, z$ satisfy: $$\frac{\cos x + \cos y + \cos z}{\cos(x + y + z)} = \frac{\sin x + \sin y + \sin z}{\sin (x + y + z )} = p$$  Then prove that: $$\cos (x + y) + \cos (y + z ) + \cos (x + z) = p$$  I am not even getting where to start? Please help.


When reading news titles in English, I always notice a strange form in the title, examples :    Quarantine bringing out creativity for millions on TikTok (source: CNN) Meet the clown lifting spirits in the time of coronavirus (source: CNN)   I said strange because there is no "to be" verb before these 2 verbs ("bringing out" and "lifting"). (I supposed the time is present continuous but with "to be" verb cancellation)  Is it a special form of writing news titles in English?


Convergence in probability implies convergence in mean under one additional condition

Prove that if random variables $X_n$ are dominated by an integrable random variable then $E[X_n] \to E[X]$ follows if $X_n$ converges to $X$ in probability.  Hint: Use the following theorem :   A necessary and sufficient condition for $X_n \to _p X$ is that each subsequence $\{X_{n_k}\}$ contain a further subsequence $\{X_{n_k}\}$ such that $\{X_{n_k}\}\to X$ with probability 1 as $n \to \infty$  The problem is that I have a.s. convergence for a subsequence one level lower for which I have to prove convergence in mean. So, stuck.


Compute a limit without L'Hopital's rule $\lim_{x \to a} \frac{a^x-x^a}{x-a}$

I would want to know how we can compute the following limit by using only fundamental limits.   $$\lim_{x \to a} \dfrac{a^x-x^a}{x-a},$$ where $a$ is a positive real number.   My idea was to use a substitution: $y=x-a$. We get $$\lim\limits_{y \to 0} \dfrac{a^aa^y-(y+a)^a}{y} =a^a\left[ \lim\limits_{y \to 0} \dfrac{a^y-1+1-(\frac{y+a}{a})^a}{y} \right] =a^a\left[ \ln a+\lim\limits_{y \to 0}\frac{1-(\frac{y+a}{a})^a}{y} \right]. $$  I am looking forward to read any tips on how I can continue from this point. Any help is appreciated.


I have a HP ac123tx laptop. A few days ago I installed Ubuntu 16.04. I don't know much about Linux but I want to learn. But the Wifi is not connecting. It seems some driver is missing, I tried to install but it did not work.  My network card details:  07:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller (rev 07) 13:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8723BE PCIe Wireless Network Adapter


Let be $\mathbb{R^*}$ and $\mathbb{C^*}$ the multiplicative groups of non-zero real numbers and non-zero complex numbers respectively. Is $\operatorname{Hom}(\mathbb{Z_6},\mathbb{R^*}\oplus\mathbb{C^*})\cong\mathbb{Z_6}\oplus \mathbb{Z_2}? $ Why?


How can we get more people to make their title a question?

Seems strange (and not in a good way) to me that when I click "Questions" and very few (about 1 in 8) of the titles end in question marks. So I'm curious to get some opinions:  Is there some simple change to the site that would encourage actually asking a question in the title?  Is this a worthwhile aim?


What macro techniques offer an alternative to expensive optics?

I was wondering what are the alternative macro techniques people use instead of buying expensive macro optics. I know about single lens reverse macro technique; what other alternative techniques allow you to do quality macro within a budget? If yes:   What is it called? What equipment do you need and (if any) where to buy them? Does it support AF/Aperture dial? What are the risks associated with it? What are the disadvantages of the technique? What are the Advantages in your opinion?   Feel free to add your own comments if you want, following the points.  This is a community wiki post, so please put one answer per post, and feel free to improve an item originally posted by someone else.


Why does all colors and effects not export to unity?

Why do all colors and effects not export to unity? All the white shading on edges and the brown color does not show in unity? I'm using a color palette where I scale the UV to 0 and then use g to move around on each face.


Java/Android best equivalent for C# linq

Let's see this example C# code:  List<int> numbers = new List<int>() { 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 }; int numCount = numbers.Where(n => n < 3 || n > 7).Count();   I'm insterested in cloesest equivalent in Java, obviously without need to write fancy for/foreach loops to iterate in collection.  As far as I know, there is no exact linq equivalnet in Java, however I'm still beginner in Java programming, so is there anything you could recommend for me? I'm actually looking for most compact and elegant way to achieve the same result in Java  [added] So, thanks for all reponses. However, I need to use it on Android and it seem I can't. Is there any solution for that?  (sorry it it's duplicate)  [added] Have anybody tried this?


How can I add a "C" common wire to this system?

I would like to add a "C" / Common wire hookup to my hvac system and get a fancy new thermostat. I've read  and still have some questions.  First of all, I have an Apollo Hydroheat system. Unusual system I gather. My house has two zones (upstairs and downstairs), both thermostats are connected the same way with four wires:  R - Red, G - Green, Y - Yellow, W - White  Luckily for me, the cable connecting the hvac to the thermostat has unused wires (orange, brown, blue, etc), so I shouldn't need to actually run any new cables.  I found an installation manual for an Apollo Hydronic air handler that has a wiring diagram. The PDF of the Apollo installation manual is  and the wiring diagram is on page 8.    Any thoughts as to whether or not it would be easy to add a live "C" wire? Do I need an external transformer? Can I literally just get a transformer, plug it into a wall outlet, and connect the "C" wire to that?


Table of contents inside an included PDF

I've got some problem with LaTeX right now, well to be honest it's not really a problem and I'm not even sure that it is possible but I would like to be able to do it.  Basically, here is my LaTeX :   \begin{document}  \tableofcontents  \appendix \addcontentsline{toc}{chapter}{A ~~Included} \includepdf [pages  = -] {included.pdf}  \end{document}   Let say that Content.tex contains included.pdf. So I have links in the table of contents inside Content.tex and that's good.  But I have also a table of contents inside included.pdf but when I used \includepdf, the link inside this included.pdf->tableOfContents doesn't work anymore...  If one of you has any idea how to make theses links work again, because I looked inside the \includepdf documentation, and I didn't find what I wanted... :/   Thanks in advance for your help,  Best regards


In R, how do I fit a student-t distribution to a set of empirical data?

In R, I can fit a Probability Density Function to some empirical data using the following code:  energy <- rnorm(30) * 20 dens <- density(energy) sum(dens$y)*diff(dens$x[1:2]) hist(energy,probability=TRUE) lines(density(energy),col="red")   This produces the following graph of the Probability Density Function (PDF):    Howevever, I would like to fit a student-t distribution to this data instead. I'm wondering if its possible to do this and if its possible to plot the result like in the diagram above?


How do I log in if my OpenID is not available, or maybe even no longer exists? Can I restore my lost account, or do I need to start over?  See also:


In the movie Prometheus, what makes Fifield turn into a Monsterous Psychopath?

We see David poison Charlie with the black ooze, but Charlie doesn't go crazy and try to kill everyone, and the other scientist appears to just be killed by the freaky snake thing inside of the dome structure, so my question is what exactly happens to Fifield that turns him into a Zombified homicidal maniac?  Is there currently an explanation for this anywhere?


As we all know, a power series converges within its radius of convergence. Usually the problem is to understand what happens on the boundary.   We can converge on all of the boundary, as for example $\sum_{k\geq 0} \frac{z^k}{1+k^2}$ does. Or we can diverge on all of the boundary, as for example $\sum_{k\geq 0} k^2 z^k$ does.  My question is now:     If we pick a set $A\subseteq S^1 \subseteq \mathbb{C}$. Can we always find a power series $\sum_{k\geq 0} a_k z^k$ with radius of convergence equal $1$ such that $\sum_{k\geq 0} a_k x^k$ converges for $x\in A$ and diverges for $x\in S\setminus A$?


I am stuck looking for a way to test for an item in a player's inventory so far nothing has worked  any help would be nice


It seems it's possible to change label's name, but I can't figure out how.  I found the label list in the board preferences, but the names aren't editable, they turn from grey to black when my mouse comes over, but that's all.  How can I change those labels' names?


How to calculate the resistance to heat a resistor to a specific temperature

Let's say I'm planning to buy some length of Kanthal-A1 wire. To power it, I have a 120 volt, maximum 20 amp power supply (my wall outlet). That part is okay. The problem is, I want it to be able to reach a certain temperature (1200 c), but the only thing I can control is the resistance! How can I figure out the max temp it'll be able to reach by only controlling the resistance?


Difference between "choose not to do 'x'" and "choose to not do 'x'"?

If I have two sentences "You need to start choosing to not do bad things" and "You need to start choosing not to do bad things", is there a difference between the two?  If so, what is it?


Book with walrus-like aliens invading and using asteroids to wipe out major cities

I remember years ago reading part of a book that was reminiscent of  but I can't remember the name or too much about it.    Some facts that stick out were the invading aliens were described as being like walruses, New Orleans and other major cities had been hit by asteroids and its mentioned that Japan surrendered immediately to the invaders while America still has military resistance in the Rocky Mountains.  I think it was a Baen published book.


Why does current always go to the resistance which is lower?

Why does current chose the easy way? Is there a proper mathematical  formula about why current tends to go over a resistance which is smaller?


How to get the 'height' of the screen using jquery

I want to set something in the middle of the screen   thanks


Can a Bard use the Spell Glyph option of the Glyph of Warding spell and cast a known spell into the glyph?

If you read the description of the "Spell Glyph" option of the  spell, it says you cast a spell that you have prepared into the glyph. Bards can learn this spell, but they don't prepare spells; they learn them.  Can a bard cast a spell that has been learned (rather then prepared) into a Glyph of Warding?


How to distribute `.desktop` files and icons for a Python package in Gnome (with distutils or setuptools)?

Currently I'm using the auto-tools to build/install and package a project of mine, but I would really like to move to something that feels more "pythonic".  My project consists of two scripts, one module, two glade GUI descriptions, and two .desktop files.  It's currently a pure python project, though that's likely to change soon-ish.  Looking at setuptools I can easily see how to deal with everything except the .desktop files; they have to end up in a specific directory so that Gnome can find them.  Is using distuils/setuptools a good idea to begin with?


This is a slightly esoteric question, but I was curious whether the following class extension pattern is legal (as in, does not constitute UB) in modern C++ (for all intends and purposes I am fine with restricting the discussion to C++17 and later).   template<typename T> struct AddOne {     T add_one() const {         T const& tref = *reinterpret_cast<T const*>(this);         return tref + 1;     } };  template<template<typename> typename  E, typename T> E<T> const& as(T const& obj) {     return reinterpret_cast<E<T> const&>(obj); }   auto test(float x) {     return as<AddOne>(x).add_one(); }  auto test1(int x) {     return as<AddOne>(x).add_one(); }  // a main() to make this an MVCE // will return with the exit code 16 int main(int argc, const char * argv[]) {   return test1(15); }   The above code is a complete example, it compiles, runs and produces the expected result with at least clang in C++17 mode. Check the disassembly code on compiler explorer:   My interpretation is as follows: the standard states that reinterpret_cast can convert between pointers/references of any types, but that accessing there resulting references might be UB (as per to aliasing rules). At the same time, converting the resulting value back to the original type is guaranteed to yield the original value.   Based on this, merely reinterepting a reference to float as a reference to AddOne<float> does not invoke UB. Since we never attempt to access any memory behind that reference as instance of AddOne<float>, there is no UB here either. We only use the type information of that reference to select the correct implementation of add_one() member function. The function itself coverts the reference back to the original type, so again, no UB. Essentially, this pattern is semantically equivalent to this:  template<typename T> struct AddOne {    static T add_one(T const& x) {       return x + 1;    } };  auto test(float x) {   return AddOne<Int>::add_one(x); }   Am I correct or is there something I miss here?  Consider this as an academic exercise in exploring the C++ standard.   Edit: this is not a duplicate of  since that question does not discuss casting this pointer or using reinterpret_cast to dispatch on the reinterpreted type.


Prove composition of two surjections is surjection

Suppose $f: A \to B$ and $g: B \to C$ are both surjections.  Since $f$ is surjective, then for every $b \in B$ there exists $a \in A$ such that $f(a)= b$.  Since $g$ is surjective, for every $c \in C$, there's  $b \in B$ such that $g(b) = c$. Then $g(f(a)) = g(b) = c$.   Would this work?  edit; I didn't realize there are similar questions on this site. Don't mind if this post is deleted.


Is removing duplicate data necessary for Gaussian Process Regression (GPR)?

I will consider Non-Noisy Observations i.e. $y=f(x)$  Lets say we have the following data set of 5 training examples with one of the examples duplicated $(1,2,3,4,4)$ maps to $(2,4,6,8,8)$. Since for GPR we have to invert a Kernel Matrix and a Kernel matrix containing duplicate inputs will not be invertible we should remove duplicate training examples when doing GPR with non-noisy observation.  Am I right in my reasoning ? Kindly comment


I am trying to print the elements of this array, but it is printing junk characters. What is the problem in this program?  class Demo{          public static void main(String[] args){         int[] x= new int []{5,6,7,8,9,10,11};         {             System.out.println(x);         }     } }


find the equation of the circle $x^2 +y^2 +ax +by = c$ passing through points $(6,8), (8,4), (3,9)$

Find the equation of the circle $x^2 +y^2 +ax +by = c$ passing through points $(6,8), (8,4), (3,9)$.   How do I go about solving this? I don't have a textbook assigned so I'm not even sure what this relates to, but its the beginning of linear algebra. so I guess I'm supposed to construct some kind of system of equations...


Where and how to report bugs with Gnome Snaps from Canonical?

I tried to get advice in the Snapcraft forums but no one answered so far:      I'm using 18.04 and the Characters snap worked fine until it was updated a few weeks ago. I'm also using the Communitheme snap which seems to be involved in triggering the bug. Window decorations and sidebar of the app are not visible except some white text/glyphs.            Plain text:  (org.gnome.Characters:17824): Gtk-WARNING **: 20:59:46.674: Theme parsing error: gtk.css:1:0: Failed to import: Error opening file /snap/communitheme/current/share/themes/Communitheme/gtk-3.20/gtk.css: Permission denied Gjs-Message: 20:59:46.676: JS LOG: Zeichen-Anwendung gestartet  (org.gnome.Characters:17824): GnomeDesktop-WARNING **: 20:59:47.985: Failed to load XKB rules file /usr/share/X11/xkb/rules/evdev.xml: Failed to open file “/usr/share/X11/xkb/rules/evdev.xml”: No such file or directory       I'm not sure where to report this, it's said to be an officially supported snap by Canonical but it has no bug tracking on launchpad (, ) as far as i can see, not on GitHub, not contact in snap info as other packages have or on the respective snapcraft page. And I also doubt that the Gnome bugtracker is the right place when another snap is involved.      Can someone please give me directions?


Sort Map based on ordering defined in ENUM

I have a Map<String, Id> and i want to sort them based on ENUM with sort order..   Map values: Apple, 1             Banana, 2             Grapes, 3             Coconut, 4             Mango, 5             Avocado, 6   my ENUM compose of   FruitName(sortOrder, id)   What is the best way to do the sorting?


No option to switch from xorg to Wayland on Ubuntu 17.10 login

I don't see the gear button next to the Sign in button at the login screen. I have Nvidia drivers installed (for Nvidia 730 GT card). Ubuntu boots into Xorg as seen from the terminal with echo $XDG_SESSION_TYPE which outputs x11.  How do I switch to Wayland?


I have some edges that are not on the x, y or z axis. What is a simple way to straighten them? For example, I can scale and then use Shift+Z to straighten on the x and y axis.  Any shortcuts other than temporarily rotating the entire object to put the edges on an axis?


I have finished the game, but I've got a gap in my inventory:    What am I missing?


Sum of the inverse of all positive integers which do not contain the digit 8

Let $No8$ be the set of positive integers that do not contain the digit $8$. For example, $123456790 ∈ No8$ but $1234567890 \notin No8$. Show that $$\sum_{n\in No8} \frac 1n<80$$  The bound in the above inequality is not the best possible; what is the best upper bound for $\sum_{n\in No8} \frac 1n$?


How do shutter speed, ISO and aperture work together to control exposure?

When shooting in natural or ambient artificial light (without flash, basically), how do light, shutter speed, ISO and aperture work together to control exposure?


Jquery functions not working after html redraw

My issue: click handlers are not working after I redraw the HTML elements that activate these handlers.   I have a parent div with a list of child divs that are sortable via jquery's .sortable() method. These divs have a variety of click handlers that cause various actions to happen.   jsfiddle:   First I collect all the html in the parent div   var original_order = $('#sortable_groups').html()   and then on cancel, restore the HTML to it's original state  $('#cancel').click(function() {          $('#sortable_groups').empty().html(original_order); });   The redrawing works exactly like I want it to, but after I cancel and the html is redrawn, the click handlers aren't working.    After digging through SO, I found some outdated posts about 'live' events, which have merged into .on('click') events. I have updated the code to use .on() handlers instead of .click(), sadly this did not solve the problem.   My above fiddle simplifies (but shows) the issue I'm having. If you click the bold text, a sanity alert appears. After hitting 'cancel', the sanity alert triggered via a click no longer appears.   I have a feeling that this issue is likely to do my misunderstanding of some aspects of Jquery, but as everything appears to work well initially and no errors are present in the console, I'm not really sure what to try next.


I have a shapefile containing a lot of lines which I'm trying to separate based on direction.  Is there any way to calculate the line bearing against a compass (in degrees or just as North / North-East / East etc.) add this calculated value as a column to the shapefile?


Is there any way to setup a 3TB SATA drive in Windows XP?

I have a  PC and I want to setup  (dynamic disk) in my PC.  But it reads only 700 GB from Windows XP although it read 3TB from the setup screen of my Dell. The problem is I can’t format it or do anything.  I want to partition the hard disk to two partitions: 70 gb for the Windows XP, and the other for my data but how?


I have recently installed Windows 8. But now in Windows 7, when I move windows, a line depicting the outline of the window shows the current position of the screen when dragging them. This is not like earlier, when the entire windows used to move. I really don’t like the way it looks now. Can anyone please help me?


Why does my phone Micromax Canvas Spark reboot while playing Pokemon Go?

Please help how can I solve that problem


tool to remember window positions when I plug in/unplug an external display

When I have a giant Thunderbolt monitor plugged into my MacBook, I want windows arranged a certain way.  No full-screen apps, some apps are shown on my small laptop screen, other apps are shown on my Thunderbolt display.  When I unplug the Thunderbolt display, I would like programs arranged differently, e.g., the browser is a full-screen app.  Is there any program that will let me "save" my window state when I have an external monitor plugged in, and save another layout when I don't have any external display, and automatically switch between the two when it detects that external display has been plugged in or unplugged?  I'm on Mountain Lion on a MacBook Pro.


If velocity is relative, how can mass (inertia) be coordinate independent?

Would inertia grow differently if we switch the reference frame?  LHC accelerator makes protons x7000 heavier at record speeds and I just wonder if we could change the reference frame (keeping velocity), would its mass be different? (eg. in vacuum, far from any gravitational field). If velocity is relative, we can say that protons are in rest and any other frames are moving at that velocity in opposite direction...