I created 3 daily cron jobs to run.  Below are the three that are placed in etc/cron.daily  rkhunter.sh  #!/bin/sh ( rkhunter --versioncheck rkhunter --update rkhunter --cronjob --report-warnings-only ) | mail -s 'rkhunter Daily Run (my server)' me@email.com   chkrootkit.sh  #!/bin/bash chkrootkit | mail -s "chkrootkit Daily Run (my server)" me@email.com   logwatch.sh  #!/bin/sh ( logwatch ) | mail -s 'logwatch Daily Log (my server)' me@email.com   I replaced me@email.com ofcourse with my email.  If I run this cronjob manually it works fine ./nameoffile.sh  But it doesn't run daily, what can be the cause or how can I check into this?


Magic leaves "smudges" and a sorceress becomes a book

I could use some help identifying a book I read some time in the last year or so. The book goes between two different stories:  1) A student of magic finds a book in a cave that turns out to be a person transformed into a book. The book talks to the student and they share thoughts. At some point, the student runs away, chase ensues, and at the very end of the book, he manages to travel to another plane.  2) A girl in a religious society where magic is forbidden. She is the daughter of painters. She discovers she can see magic. Falls in love with some random painter, risks performing magic to not be pregnant, does it again so she can, and is arrested and sent to some prison thing.  The common element between the stories is that magic use leaves behind a smudge of some kind that can be visible.  Any assistance is appreciated.


How to serve non-root static files by nginx?

I tried: user nginx; ... ...        location / {            root /home/tango/www/html;        }   Only to get 403 forbidden error. The /home/tango/www/html/index.html is generated by tango so I don't think I can put that in /var/www/html/ writing where requires root permission. The error log confirms the permission error: 2020/07/28 11:50:12 [error] 122769#0: *533 open() "/home/tango/www/html/index.html" failed (13: Permission denied), client: XXX.YYY.ZZZ.AAA, server: , request: "GET /diagcte HTTP/1.1", host: "my.org"  However, ls -la /home/tango/www/html/index.html shows: -rw-r--r--. 1 tango posixusers 212 Jul 28 11:33 /home/tb571/www/html/index.html So the nginx user should have read permission. Anyways, can you help with serving a non-root static file through nginx?


"The selected disc image file isn't valid" error

I have been attempting to run Raring Ringtail (13.04) on my Windows 7 computer, just to see how it is. I'm not going to replace my whole OS... (yet.) Anyway, my BIOS doesn't support boot from USB so I am attempting to burn to DVD. I have it downloaded and used the Windows Disc Image Burner to attempt to burn it to my DVD. When I try to burn it, it gives me this error:     The selected disc image file isn't valid.   Any thoughts?


I have 3 of the aforementioned servers, and when I netinstall centos on them, the installer recognizes the raid configuration and the logical disks and installs fine.  Upon reboot after installation, the server reports that it is attempting to boot from drive C: and never gets past that.  I've used CentOS on dozens of servers before and never really had an issue, but most of those were custom ordered to be compatible with CentOS.  These were dropped in my lap and I was told to 'make it work'.  The servers are Generation 8, and the have the HP Dynamic Smart Array B320i RAID controller.  I haven't had any time to do research on the issue myself, I just wanted to drop SF a line to see if anyone else had noticed a similar issue.  The system has six physical SSDs split into three logical drives, slots 1 and 2 are a RAID 1 for the OS.  Slots 3-5 are a RAID 5 for data, and slot 6 is a single drive for logs.  I tried switching the controller to AHCI which I read on some HP Knowledgebase, but that didn't seem to have an effect.  Any help is greatly appreciated.


Where do you place the starting SQLite database within an Android project?

I have seen many solutions which are code oriented, like if you have to create a table, you would have to create it using code, but this is not good for complex applications, as we have SQLite Browser to create database and its tables, and it generates a database file.  Now the question is, where to place that file in my project, there is no data folder in eclipse project, I dont know what to do, its interaction is not like MySQL where we use driver or connection?


What do we iterate through when using pointer to an array?

This is a simple function for finding occurrences of a specific letter.    1:  int count_x(char *p, char a) 2:  { 3:      int count = 0; 4:      while(*p != '\0') 5:      { 6:        if (*p == a) 7:            count++; 8:        p++; 9:      } 10:      return count; 11:  }   We can get access to a specific element by using p[n], or we can dereference it *p and get a first element of that array as an example, and all of that stuff we usually do. The strange thing to me is located at the line number 8. When we write p++, we are getting the array we passed -1 symbol from the beginning. So if it was hello, world then it would be ello, world. We are somehow iterating throuhg the indices but i don't really understand how.    Can i have an explanation of how all of that stuff works?


Forcing new chapter not to start on an odd page

Possible Duplicate:          I am using a document class amsbook which I like very much, except for one thing: each new chapter starts on an odd-numbered page. Therefore, it happens that I get a whole blank page in the text, which I dislike. Is it possible (and easy?) to force the new chapter to start immediately on the next page after the preceding chapter? Can it be made automatically?


I have a small program.  I wanted to get the number of elements of the array p1. When I debug, I get 0. But I think it should be 6.  // ConsoleApplication3.cpp : Definiert den Einstiegspunkt für die Konsolenanwendung. //  #include "stdafx.h" #include <iostream> #include <stdio.h> using namespace std;  double array_concat(double p1[], double p2[]) {     double ans[2][6];     int i, j;     i = 0;     printf("%d\n", sizeof(p1) / sizeof(p1[0])); //is this wrong?     for (j = 0; j < sizeof(p1) / sizeof(p1[0]); j++){         ans[i][j] = p1[j];     }     i = 1;     for (j = 0; j < sizeof(p1) / sizeof(p1[0]); j++){         ans[i][j] = p2[j];     }      return ans[2][6]; }   int _tmain(int argc, _TCHAR* argv[]) {     cout << "Hello\n";     int i;     double c[2][6];     double p1[6] = { 0, 1, 0, 0, 0, 0 };     double p2[6] = { 1, 1, 0, 0, 0, 0 };      c[2][6] = array_concat(p1, p2);      for (i = 0; i < 12; i++){         printf("%lf\n", c[i]); //is this wrong?     }      return 0; }   What was wrong?  Edited code, so the p1,p2 and the return value of the function should better be poiters. I made it as in the example , but somehow it doesn't work.             // ConsoleApplication3.cpp : Definiert den Einstiegspunkt für die Konsolenanwendung.         //      #include "stdafx.h"     #include <iostream>     #include <stdio.h>     using namespace std;      double **array_concat(double *p1, double *p2)     {     double** ans = 0;     //ans = new double*[2];         //double ans[2][6];         int i, j;         i = 0;         printf("%d\n", sizeof(p1) / sizeof(p1[0])); //is this wrong?         for (j = 0; j < sizeof(p1) / sizeof(p1[0]); j++){             ans[i][j] = p1[j];         }         i = 1;         for (j = 0; j < sizeof(p1) / sizeof(p1[0]); j++){             ans[i][j] = p2[j];         }          return ans;     }       int _tmain(int argc, _TCHAR* argv[])     {         cout << "Hello\n";         int i;         //double c[2][6];         double p1[6] = { 0, 1, 0, 0, 0, 0 };         double p2[6] = { 1, 1, 0, 0, 0, 0 };          //double *c;         double **c = array_concat(p1, p2);          for (i = 0; i < 12; i++){             printf("%lf\n", c[i]); //is this wrong?         }          return 0;     }


So my program works fine until the end where it has to calculate and then show the results.It just show the result without calculating the "if" at the end.   public class Convertisseur1 {     public static void main(String[] args) {     String valeurInitial;     String valeurPoid;     String valeurDesire;     String valeurInitial2;     String valeurInitial3;      //seperation des string     valeurInitial = (args[0]);     valeurInitial2 = (args[0]);     valeurDesire = (args[1]);     valeurInitial3 = (args[0]);      valeurInitial = valeurInitial.replace("kg","");      valeurInitial = valeurInitial.replace("g","");           valeurInitial = valeurInitial.replace("t","");           valeurInitial = valeurInitial.replace("lb","");          double valeurdouble = Double.parseDouble(valeurInitial);      valeurInitial2 = valeurInitial2.substring(valeurInitial2.length()-2);     valeurInitial3 = valeurInitial3.substring(valeurInitial3.length()-1);            //convertion         System.out.println(valeurInitial2);     System.out.println(valeurDesire);     System.out.println(valeurdouble);     if(valeurInitial2 == "kg" &&valeurDesire == "g"){         valeurdouble = (valeurdouble*1000);          System.out.println("La convertion finale : " + valeurdouble);     }else if(valeurInitial2 == "kg"&&valeurDesire == "lb")         valeurdouble = (valeurdouble/2.2046226);      /*System.out.println(valeurdouble);     //System.out.println(valeurPoid);     System.out.println(valeurDesire);     System.out.println(valeurInitial2);     System.out.println(valeurInitial3);*/      } }


Using the literal '@' with a string variable

I have a helper class pulling a string from an XML file. That string is a file path (so it has backslashes in it). I need to use that string as it is... How can I use it like I would with the literal command?  Instead of this:  string filePath = @"C:\somepath\file.txt";   I want to do this:  string filePath = @helper.getFilePath(); //getFilePath returns a string   This isn't how I am actually using it; it is just to make what I mean a little clearer. Is there some sort of .ToLiteral() or something?


Why can an application installed using Wine not access NTFS partitions?

Ubuntu was installed alongside Windows 7 on my system. After some days, I deleted and formatted the Windows partition and didn't format the other NTFS partitions.  Before that, I installed Wine on my Ubuntu. I used it to install some software like Picasa. When I tried to open some images on a NTFS partition using Picasa, I was unable to view or access these partitions. I will show my partition details -    As you see, I have 4 NTFS partitions in total. When I opened Picasa and searched for the partitions in which the images are saved, I was unable to find some partitions (sda5, sda6 and sda7).    This is the window that was opened by Picasa when I tried to search image files. How can I access the partitions in which the images are stored from Picasa?


What kind of energy/force do astronauts experience away from the earth 's atmosphere/beyond?

I have been reading articles and watching space exploration documentaries,as astronauts stay on earth before launching into space,there's gravitational pull or force that acts upon them and the shuttle.  On the other side,after launching off into space and leaving the earth's gravitational waves;there's unknowingly certain energy or force that exists.  Therefore,I'm intrigued to know whether still gravitational waves/force acts again beyond the earth?  And if there's a force/energy that exists,what is the scientific term for it?


I am trying to power an ipad using a 32 ft active usb cable as seen . The issue is the power at the end of the run just isn't sufficient to keep the ipad charging (4.7v). I have done some research but have come up empty. most recommendations involve adding a powered hub near the end of the pull however this is not possible in my situation. How would I extend the life of the power over usb up to 32 feet or boost it at the main? to reiterate this is a power question i need a way to increase the output of power enough so that the ipad will charge. I am not concerned about data transference.


How did Rayleigh and Jeans apply the Equipartition of Energy in determining the energy distribution of blackbody - radiation?

I am reading the Ultraviolet Catastrophe and have come across this law. Here , it is written     They applied the statistical physics method to the waves by analogy with Maxwell's gas particles using the Equipartition of Energy ie. the total energy of radiation is distributed equally among all possible vibration frequencies . But there is no limit to the number of modes of vibration that can be excited as it's easy to fit waves into the container at higher and higher frequencies. Consequently the amount of radiation predicted by the theory is unlimited and should getting stronger and stronger as the temperature and the frequency is raised.    How did they apply equipartition theorem to the waves?? And how did the radiation(energy, right?) get increased as the temperature increased. Please help explaining these .


I was messing around with some number theory when I stumbled upon this. The statement I'm trying to prove is,      If $4^n + 2^n + 1$ is prime, then $n$ must be a power of $3$   I think it is true but I'm not entirely sure how to go about proving it. Any hints to start off?   I tried reducing the problem to something of the form $2^{2n} + 2^{n} + 1$ and messing with mods but to no avail. I'm not actually convinced it's true myself which is a difficult position to prove something from.


Is the relation {(1,1),(1,2)} transitive?

For it to be transitive (1,2) would need to exist in the relation. And it does, because a and b happen to be the same number. But sets don't contain duplicates, so it either is transitive, or it cant be transitive if a and b are the same value.


In light of , it seems that we ought to be able to accept our own answers within the same time limits as accepting someone else's answer. Of course, this notion has been discussed here before (when times were different, mind you):      The crux of the blog post was that it's not only acceptable but encouraged to accept your own answer when you find your own solution. I can accept someone else's answer to my question in as little as 15 minutes, surely I should be able to accept my own answer. I have no rep to gain from this, and the community is better off knowing that there's a solution to my problem or answer to my question. If there's concern about lots of spam here, perhaps this can be a privileged operation, say with 5k rep you can accept your own answers as if they were someone else's answer. One alternative to rep limits would be if previously self-accepted answers (and/or questions with self-accepted answers) have received upvotes, indicating a user is capable of asking and answering their own questions to the satisfaction of the community.  The rationale for my complaint is that lately I've been asking extremely long-tail questions for low-use frameworks/libraries on the site and receive not only low views but no comments or other answers. This leaves me searching for my own solutions, so when I find them I write up reasonable answers that add value to the site (that make the web a better place) and that ultimately I shouldn't have to manage any differently than any of my other questions. At the time of posting, my last  question had 7 views and hits


Why do people look at me sometimes and make remarks that I should sleep, or that I look ill?

I just created my new character 2 hours ago and I've reached a town. Sometimes random guards will comment that I look ill, or that I should rest. "You look sick, honey. Do you want to lie down?", isn't uncommon.  Did I unexpectedly get vampirism? I didn't fight any vampires, only a couple of wolves and bandits.  I'm a dark elf, so maybe my race isn't seen much around Skyrim and the remarks are more roleplay than actual illness.  Any ideas?


Why can't I log in to Minecraft? unknown username or password

My Minecraft password will not work. I've reset it about 5 times and no matter what I choose as my password, it will not take it. I just made my Minecraft account today   I am entering my username correctly, and I am typing everything in the correct boxes, but it always says "Unknown username or password...". I know I am putting my username in correctly because if I try to re-register, it will not let me use my email because it's currently in use.  Could somebody explain to my why no matter what my Minecraft password is, it won't work?


I currently have a Gmail account with a really long email address.  I want to change the primary email to a more professional one.  Is that at all possible?  And what do I do about all of the Google apps that I use? Will I have to start a new photo cloud and a new Google Wallet?


I have a problem with TeXshop (on Sierra). When I click on a .tex-file it compiles it to PDF but I cannot see (and thus modify) the source window. Any idea why ?


What is set exponentiation and what is its proof?

I recently learned about set exponentiation $B^{A}$, that is, $B^{A} = \left \{ f \mid f:A\rightarrow B \right \}$ which is the set of all the functions which maps A to B. The number of function in a set exponentiation is given as $ \mid B \mid ^{\mid A \mid}$. Let consider these sets S = {1,2,3} and T = {4,5}, then according to set exponentiation there are  $2^3=8$ functions which map the above sets S to T. Question 1: Can you please provide a simple example function which maps the above sets S and T?  else can you provide another example for the same? Question 2: How mathematicians proved the number of functions in set exponentiation is $ \mid B \mid ^{\mid A \mid}$ ?


Wrong charset in one column, the rest are fine?

I have an issue where in a form if I input special characters (e.g. åöä) they get rendered fine in my database. However, I also have a checkbox with a value that gets inputted into another column and these columns doesnt render it correctly.  Things I've tried:  mysqli_set_charset("utf8", $con);  $con->query("SET NAMES 'utf8'");     (first two characters are inputs ive entered, other column is a checkbox value)  html checkbox    value   All files are utf8, html code is utf8, database is utf8.  I'm completely out of ideas at the moment.  Edit, solved:


How to grep inverted not showing x lines before/after?

What I need is easy to explain but couldn't do it :-(  I want to grep a command output not showing the matching lines and x lines after that. Eg.  # fdisk -l Disk /dev/ram0: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes   Disk /dev/ram1: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes   Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes   I want to skip lines with 'ram' string and 6 lines after that, so the output would be just:  Disk /dev/sda: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes   Something like sudo fdisk -l | grep -v "ram" -A 6


Cannot generate url image with AsyncTask

I have a list of number of url and its name is  listOfUrlSources, I passed it inside class GenerateUrlImages the task of this class is to come out with a picture link and it works if you use it and pass a link to one site it gives out a picture link, but now I'm trying to pass more than one site for it and also give me links to photos I tried, but I didn't make it through a list.   //  for (int i = 0; i < sources.size(); i++) {                          item = new GenerateImage(sources.get(i).getUrl());                         // networkImagesLiveData.setValue(createLiveDataForLoadingImage(sources.get(i).getUrl()));                         listOfUrlSources.add(item);                     }                      new GenerateUrlImages().execute(listOfUrlSources);  //---------   //     public class GenerateUrlImages extends AsyncTask<List<GenerateImage>, Void, List<GenerateImage>>{          public GenerateUrlImages(){          }          @Override         protected List<GenerateImage> doInBackground(List<GenerateImage>... arrayLists) {             List<String> result = new ArrayList<String>();             List<GenerateImage> passed = new ArrayList<GenerateImage>();             passed = arrayLists[0];              //get passed arraylist             //urlImages             String src="";             try {                 org.jsoup.nodes.Document doc1;                 Elements img2;                 GenerateImage Item;                 for(int i=0; i<passed.size(); i++) {                   doc1 = Jsoup.connect(passed.get(i).getUrl()).get();                   //Elements img = doc1.getElementsByTag("img");                     img2 = doc1.getElementsByTag("meta");                     for(Element element : img2) {                       if("og:image".equals(element.attr("property"))) {                         src = element.attr("content");                          Item = new GenerateImage(src);                           urlImages.add(Item);                        }                     }                     for (int j = 0; j < urlImages.size(); j++) {                         Log.d("getUrlImage:", "" + urlImages(j));                     }                 }                 //InputStream in = new java.net.URL(src).openStream();                // bmp = BitmapFactory.decodeStream(in);             } catch (Exception e) {                 Log.e("Error :", e.getMessage());                 e.printStackTrace();             }             return null;         }         @Override         protected void onPreExecute(){          }         protected void onPostExecute(ArrayList<String> result){           }      }


Random forest regressor has a negative score

I am using a RandomForestRegressor. When I check the score for the model with the training data, it's  Rregressor.score(X_train,y_train) 0.8357837327169805  but when I check the score using the test set, it's negative  Rregressor.score(X_validate,y_validate) -0.5022815681820925  Is this overfitting? Is this the right way to check how good a model is? What are the ways to improve the performance?


Are prototypes required for all functions in C89, C90 or C99?

To be truly standards-compliant, must all functions in C (except for main) have a prototype, even if they are only used after their definition in the same translation unit?


Can existing C-VISIT Visa be used for Business from April 2015 onwards?

I hold a UK 10-year C-VISIT Visa that was issued to me IN 2013 for Tourism. In view of the changes to the Visitor Category from April 2015, would I be able to use the existing Tourist Visa for Business Purposes? Greatly appreciate your views.


Do the following sentences sound natural in formal AmE speech:   You may go now if you want to.  You might go now if you want to.    I think both of them are correct, but the latter is far more formal or rather literal. Though I doubt about this opinion.


The value of $i^i$ - is my method contradictory?

Consider Euler's Formula: $$e^{i\theta}=cos(\theta)+isin(\theta)$$ Using this, the value of $i$ is  $e^{{i\pi}/2}$. Following this: $$i^i=e^{i^2\pi/2}$$ The accepted principal result of this is that $$i^i=e^{-\pi/2}$$ I appreciate that the result given is one of many solutions - but for my question here, I'm only focussing on this case.  Instead of simply using $i^2=-1$, I will separate the exponent for $i^i=e^{i*i\pi/2}$.  Going back to Euler's Formula, and inserting ${\theta=i\pi/2}$ we get: $$i^i=\cos (i\pi/2) + i\sin (i\pi/2)$$ Which gives $$cosh(\pi/2)+i*sinh(pi/2)$$ Or roughly $2.509+2.301i$ Again - I know there are many different solutions here, I'm just focussing on the principal case.  Why is there a contradiction here? What exactly causes my method to not yield the same result? Originally my answer was marked as duplicate - however the thread I was linked to did not contain this method - and the reasons for its failure was said to be due to $ln(i)$ not being well defined over complex space (I used $ln(i)$ in my original question) . Considering that I can now show my method without the use of $ln(i)$, I am wondering if there is another reason why my method is incorrect.


Can I use Minecraft PC textures and worlds in Pocket Edition?

Now that I've discovered that I can host a , I'd like to know if is it possible to use the textures and maps of the PC version for the pocket version.  I'm planning to visit Peru and Machu Picchu. It would be really cool to entice them for the voyage by letting them play a  in their favourite video game. Unfortunately, this God of Deceit world looks really sophisticated. I don't believe the Pocket Edition would be able to play it.


I use  on Windows as my terminal to work with WSL. I want to use GUI instead of terminal. Is there any walkthrough of how to install a desktop GUI on WSL and be able to start it either upon connection or using a command? Thanks


What is the expected value of the logarithm of Gamma distribution?

If the expected value of $\mathsf{Gamma}(\alpha, \beta)$ is $\frac{\alpha}{\beta}$, what is the expected value of $\log(\mathsf{Gamma}(\alpha, \beta))$? Can it be calculated analytically?   The parametrisation I am using is shape-rate.


If $dF_p$ is nonsingular, then $F(p)\in$ Int$N$

Here is the problem 4-2 in John Lee's introduction to smooth manifolds:          Suppose $M$ is a smooth manifold (without boundary), $N$ is a smooth manifold     with boundary, and $F: M \to N$ is smooth. Show that if $p \in M$ is a     point such that $dF_p$ is non-singular, then $F(p)\in$ Int$N$.      To approach this problem, let's assume conversely that $F(p)\in$ $\partial N$, then there are two charts $(U,\varphi)$ and $(V, \psi)$(a boundary chart) centered at $p$ and $F(p)$ respectively. I can't see how the non-singularity of  $dF_p$ contradicts to the fact that $F(p)$ is in the boundary chart. Maybe the proof by contradiction is not the right way? Thanks in advance!


I have the following problem:  $n,m \in \mathbb{N_0}$. Write $(1+x)^{n+m}=(1+x)^{n}(1+x)^{m}$ with the help of binomial formulas, multiply the right side, and deduce the following Identity between binomial coefficients:  $\begin{pmatrix} n+m\\k\\ \end{pmatrix}= \sum_{l=0}^{k}{\begin{pmatrix} n\\l\\ \end{pmatrix}}{\begin{pmatrix} m\\k-l\\ \end{pmatrix}}  \forall k \in \mathbb{N_0}$  My idea: I know that: $(a+b)^n=\sum_{k=0}^{n}{\begin{pmatrix} n\\k\\ \end{pmatrix}a^{n-k}b^k=\sum_{k=0}^{n}{\begin{pmatrix} n\\k\\ \end{pmatrix}a^{k}b^{n-k}}}$  So:$(1+x)^{n+m}=\sum_{k=0}^{n}{{\begin{pmatrix} n\\k\\ \end{pmatrix}x^k}*\sum_{k=0}^{n}{{\begin{pmatrix} m\\k\\ \end{pmatrix}x^k}}} =\sum_{k=0}^{n}{{\begin{pmatrix} n+m\\k\\ \end{pmatrix}x^k}}=(1+x)^{n+m}$ But this doens't seem right.. Can anyone help me here?


Change color of individual bars in histogram of binomial distribution

With the help of  I managed to create histograms of binomial distributions. What I still need is to select some of the bars and fill them with a different color or mark them in another way in order to indicate probabilities like P(X < 4) or P(3 < X < 5).   This is what I've got so far.  \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.7}  \begin{document} \begin{tikzpicture}[     declare function={binom(\k,\n,\p)=\n!/(\k!*(\n-\k)!)*\p^\k*(1-\p)^(\n-\k);} ] \begin{axis}[ymin=0, xmin=-0.5,axis lines=left,xlabel={$k$}, ylabel={$P(X=k)$}, x label style={at={(axis description cs:1,0.1)},anchor=north},     y label style={at={(axis description cs:-0.15,1)},rotate = -90, anchor=north}, ,     samples at={0,...,12},     yticklabel style={         /pgf/number format/fixed,         /pgf/number format/fixed zerofill,         /pgf/number format/precision=2     },     ybar=0pt, bar width=1 ] \addplot [fill=lightgray, fill opacity=0.5] {binom(x,12,0.4)};  \end{axis} \end{tikzpicture} \end{document}


two documents sharing same reference numbering

I am writing a scientific paper with supplementary information in an additional document. The paper and the supplement share many references, which in the paper are numbered by first appearance in the text.  I would like the references in the supplement to have the same numbers as in the paper. I have additional references there and not all references from the paper show up in the supplement.  I am still working on the documents and the .bib-file is changing. It is generated by .  Is there a way to achieve the numbering the way I like? I haven't tried, but I think, that one way could be to create a .bib-file with all references that I want to use and then number all of them, regardless of their use in the current document. The problem is, that when I change the first appearance of one reference, I have to change the order of the bibtex-entries in the .bib-files, which is not very handy.


This may be a simple question:      Find all subrings of $\mathbb{Z}^2$.


In D7, Where can you go to get a list of Access Arguments to be used with user_access()?

Where can I find a list of Access Arguments to be used with user_access() ? I went to the permissions page and I'm not sure what I can copy and paste from there to be used as an argument for user_access(). So far I only know two: 'access dashboard' and 'access content'  I want to find out how can we get a list of these arguments.


Need to use regex for validating email address using javascript

I need to validate email address entered into a input textbox using regex.  How can I use regex \b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b to compare with the entered email id?  Pls suggest.


I am thinking in uploading my Master's thesis to arXiv, by the moment I would count with the endorsement of my supervisor, nevertheless I will not follow an academic career, so I will not keep my university mail. Therefore,  I am wondering if I could register in arXiv with a personal personal email. Is it allowed by arXiv?


What is a better comparision series for $\sum \frac {1}{F_n}$ than $\sum_0^\infty2^{-k}$?  By better comparison series than $\sum_0^\infty2^{-k}$ we mean a series $\sum c_k$ s.t. $\frac{1}{F_k}<c_k<\frac{1}{2^k}$  If possible $\sum c_k$ is a geometric series, or some other well known type of series e.g. $\sum \frac{1}{\alpha2^k}$ for some $\alpha$  By ratio test the sum over Fibonacci numbers converges. Is there a well known series that can be used to bound the value of the sum from above? and/or tighten the upper bound? I am not after closed form for the sum over Fibonacci numbers Just looking for a well known series that can be used for a relatively good comparison (I.e. the series is not way too large). I am trying to prove $\sum_0^\infty2^{-k}$ can be used for comparison, and then find a better series for comparison.


I am working with a really messed up DB that has a a lot of tables and some of the tables have huge numbers of columns with bad naming making this impossible to find anything specific.  I need a select operation for finding the table that has one of the columns equal to one specific value, by checking the values from each column of every table. Is that possible?


Simple harmonic motion phase difference problem

Two particles executing SHM of same amplitude of 20cm with same period along the same line about same equilibrium position. The maximum distance between the two is 20cm.  The trouble for me is what should be the equation of position of the SHMs. Is it a sin function or cos function? It seems to me that both the functions should be equivalent because it should not depend upon from where we take the phase of the SHMs. I mean the phase difference between them is constant value.  Please help me visualise the scene going on.


Keeps telling me that I'm referencing SubTotal and I'm not sure how to fix that. The error message I'm getting is "Column CHECK constraint for column 'Total' references another column, table 'Job'." Create Table Job(     JobNumber int not null         Identity (1,1)         Constraint PK_Job primary key clustered,     Date datetime not null,     Address varchar(100) not null,     City varchar(50) not null,     Province char(2) not null         Constraint CK_Province Check (Province like '[A-Z][A-Z]'),     PostalCode char(7) not null         Constraint CK_PostalCode Check (PostalCode like '[A-Z][0-9][A-Z][0-9][A-Z][0-9]'),     SubTotal money not null,     GST money not null,     Total money not null         Constraint CK_Total Check (Total>SubTotal),               /*COME BACK TO THIS */     ClientID int not null         Constraint FK_JobToClient references Client(ClientID),     StaffID int not null         Constraint FK_JobToStaff references Staff(StaffID), )


Expressions in for:each index value in LWC?

Currently, I am facing an issue is that I want index starting from value "1"  I am using for:each in my code.   <template>     <lightning-card title="HelloForEach" icon-name="custom:custom14">
             <template for:each={contacts} for:item="contact" for:index="index">
                    {index}  {contact.Name}, {contact.Title}
             </template>
     </lightning-card> </template>   I have added Screenshot Below. I want this  {index} starting from value "1" rather than "0" . I have also tried {index+1} but it throws an error .     Here is the .  Thanks in Advance


Is rejecting the hypothesis using p-value equivalent to hypothesis not belonging to the confidence interval?

While formally deriving the confidence interval of an estimate, I ended up with a formula that resembles very closely the way $p$-value is computed.  Thus the question: are they formally equivalent? I.e. is rejecting an hypotheses $H_0 = 0$ with a critical value $\alpha$ equivalent to $0$ not belonging to the confidence interval with critical value $\alpha$?


How to read information about wifi connection from proc - net?

Is there a way I can get information about my current WiFi connection on my android? Information like the name of the WiFi network, connection start time, connection duration etc.?  I looked inside the proc/net directory, but there too many other sub-directories and files, and I don't know where to start.


fluctuating ping/latency only to a certain ISP

Pretty much the title. There's an ISP server that located 200miles away from my location. Once the packets cross their network, it fluctuates from 40ms to 120ms back and forth and rarely happen to be stable, only occasionally. This problem doesn't happen to any other servers. Only this particular ISP. And i'm afraid that it'll affect some real-time applications and games too. Is this normal?


Colored text in the console Python 3.6.4

Is there any way to print in the console with colored text?  >>> from colorama import Fore  >>> print(Fore.BLUE + "Hello World")   But in the console I got this:  >>> [34mHello World   I also tried other methods, but none of them help.


E: Unable to find a source package for 'r-base' on Ubuntu 16.04 (aarch64)

I want to sudo apt build-dep r-base under Ubuntu 16.04 (running in Linux on DeX Beta). To this end, I followed  and put  deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran35/ deb http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted universe deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted universe   into /etc/apt/sources.list, then did  sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9   and then  sudo apt update sudo apt build-dep r-base   ... but obtain:   Reading package lists... Done E: Unable to find a source package for r-base   I've done these things before and recently under Ubuntu 19.04 (guess that's not relevant), is the aarch64 architecture a possible problem here? (I could install all sorts of preliminaries to build R from source (Tcl/Tk, GSL, GMP, MPFR...), all no problem). Let me know if you need the output of certain commands.   Note:  Concerning /etc/apt/sources.list: There was already a line deb http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted and I also commented in the same line starting with deb-src instead of deb. This led to exactly the same output. The file also contains the lines deb http://ports.ubuntu.com/ubuntu-ports/ xenial universe.


Would "erase all content and settings" disassociate my phone with the carrier?

I accidently set my husbands new iPhone 6 up under my back up. Now, when I receive texts he receives them too. Its making it appear that I have two phones. We share an iCloud account. Can I do a complete "erase all content and settings" to fix his phone? It won't deactivate his phone with Sprint?


How TeX does its scale factor calculation?

With the following example  \documentclass{article}  \begin{document}  \dimen0=1sp \dimen1=0.5\dimen0 \dimen2=0.99999\dimen0 \dimen3=0.999992\dimen0 \dimen4=0.999993\dimen0 \count255=\dimen0 \the\count255 sp ~ \count255=\dimen1 \the\count255 sp ~ \count255=\dimen2 \the\count255 sp ~ \count255=\dimen3 \the\count255 sp ~ \count255=\dimen4 \the\count255 sp ~  \end{document}   I got the following result  1sp 0sp 0sp 0sp 1sp   I cound not understand how TeX does its arithmetic calculation.


I'm totally confused by the calculator and timid regarding purchasing my tickets. Would someone familiar with the system answer?     recent stay:                       8/15/17 - 9/6/17   spain  23 days       planning extended visit to portugal:     11/30/17 - 2/4/18  PT 67 days   Is this a legal stay? Both trips are just using my USA passport.  I have used three different online calculators and the official EU one is confusing on the terminology.


Is it true that people tend to like music from their teenage years for most of their lives?

I often heard it said that people tend to end up most fond of music they listened to during their teenage years.  If true, why would this be? Have there perhaps even been scientific studies on this? Did they conclude that this is true, and if so, what are the reasons?


Instantiate a class with generic type T known as a name not type

I have the following code   private static void Main(string[] args)     {         ClassC<ClassD> objC=new ClassC<ClassD>();         var tTypeName = "MyProject.ClassD";         ClassC<Type.GetType(tTypeName)>=new ClassC<Type.GetType(tTypeName)>();     } }  public class ClassC<T> {     ///some code here }  public class ClassD {     ///some code here }   I will instantiate classc if I know the type T is ClassD like this   ClassC<ClassD> objC=new ClassC<ClassD>();   What if I know it during runtime, how can I pass ClassD type name to classc. I tried the following, it throw compilation error, Please advice.  var tTypeName = "MyProject.ClassD"; ClassC<Type.GetType(tTypeName)>=new ClassC<Type.GetType(tTypeName)>


Determine integers u and v from GCD(308,273) using GCD algorithm

I'm having trouble determining u and v using gcd algorithm, stuck on combining reverse of 308 and 273. I'm lost on what to do after laying out d=rk=... Is there a fixed order to what lines to use?  Work:  273u+308v=GCD(308,273)  a=273  b=308  d=7  273=35x7+28  308=273x1+35  35=308+(-273)x1  28=273+(-35)x7  7=35+(-28)x1  7=28x1+7  =28x1+(35+(-28)x1)  =??


In my book there is no explanation of the phrase short circuit but at many places the author has used it. I had googled it. Some explain it as the flow of charge along a high potential difference while others explain it as the flow of charge along a low resistance path. What exactly is a short circuit? An explanation along with a diagram would be very helpful.


Why do abstract classes in Java have constructors?

Why does an abstract class in Java have a constructor?  What is it constructing, as we can't instantiate an abstract class?  Any thoughts?


How can you limit the amount of memory an application in Windows 7 x64 can use? In particular X3 Terran Conflict

I am running the latest version of X3 Terran Conflict (3.1) and after about 30 min - 1 hour it's memory usage goes well above 2 GB.  I only have 4 GB of ram, running Windows 7 64 bit.  As a result of X3 using more ram than is available, my hard drive starts paging and makes the game and other applications become unusable.  I have to restart the game.  Is anyone aware of this issue or how to fix it and is there any way in Windows or through some tool, to limit how much memory is given to the game?  Is this a bug in the game? Can this even be fixed?  I'm using some mods but I doubt any of them are causing this as they are simple mods like adding a tractor beam etc.


I was wondering how to make such system?


What is the difference between a predicate and function?

I need to to understand the difference between predicates and functions in the context of Clasual Form Logic in order to define the Herbrand universe.  If I have p(x) :- q(f(x)) would I be right in saying that p and q are predicates while f is a function because it is "nested"?  By this thinking then if I have p(x) :- q(x) both p and q are predicates and I have no functions?  If this is incorrect then how can I tell the difference between a predicate and function?


I want to ask if there is this result $$\sum_{p\text{ are prime numbers}}\dfrac{1}{p^2}\approx 0.452224742...<\dfrac{1}{2}?$$ I sincerely thank you.


I am confused between these words. Dictionaries say they are similar, but I vaguely remember my schoolteacher apprising me of a difference between them. I would love if someone could elucidate.


Do I need a visa for Paris for a 8 hour transit?

I am a Dominican Republic citizen, travelling from the Dominican Republic to Cairo via Paris. My connection time is 8 hours, do I need a transit visa?


How to access raw texture data in DirectX 11?

I want to get access to a texture's pixel color data on the CPU. When trying to map the texture, I get E_INVALIDARG in return from ID3D11DeviceContext::Map.  ID3D11ShaderResourceView* resourceView; //represents my texture, already loaded up //...  //Getting the resources of the texture view... ID3D11Resource* res = nullptr; ID3D11Texture2D* tex = nullptr; resourceView->GetResource(&res); res->QueryInterface(&tex); D3D11_TEXTURE2D_DESC desc; tex->GetDesc(&desc); //Correct data gets filled out D3D11_RESOURCE_DIMENSION dim; res->GetType(&dim); //value gets set as Texture2D which it should  D3D11_MAPPED_SUBRESOURCE mappedResource; HRESULT h; h = context->Map(tex,0,D3D11_MAP_READ,0,&mappedResource); //This always fails h = context->Map(res,0,D3D11_MAP_READ,0,&mappedResource); //This also fails   The idea is that I keep only shaderResourceViews for my textures, because that is all I needed until now, and get the relevant resources here.  I tried mapping as WRITE_DISCARD also, but to no success. I am really confused, because I never had any problem with mapping constant buffers and vertex buffers. I seem to be certainly missing something? By the way, I am using Wic Texture loader and DDS Texture loader for the DirectXTex toolkit, and tried this code for png, dds textures, with and without mip-maps.


Can someone please elaborate the following factory function(JavaScript) code?

function makeMultiplier(Multipler){     var myFun= function(x){         return x*Multipler;     };      return myFun; }  var MultiplyBy3= makeMultiplier(3); console.log(MultiplyBy3(10));    What value is passing in x? and how the output is 30?


Is a set without limit points necessarily closed?

According to the definition on Rudin' Principles of Mathematicial Analysis, closed set is defined as:      $E$ is closed if every limit point of $E$ is a point of $E$.   Then I have a question: if a set has no limit point, is it necessarily closed? I think this idea doesn't contradict the definition of closed sets. Am I right?  And another question is #10 in Chap.2 of Rudin's:      Let $X$ be an infinite set. For $p\in X$ and $q\in X$, define    $d(p,q)=0$ when $p=q$. Otherwises,$d(p,q)=1$.    I have known that every set in the metric space is closed. To prove it, we can show that the complement of any set is open, which is quite trivial. My question is: how can we prove that every set is closed just by checking according to the definition of closed set, i.e. how can we show that every limit point of any arbitrary set $E$ in the metric space is a point of $E$?   Thanks in advanced!


Find Limit of Sum as a Riemann Sum : $\lim\limits_{n \to ∞} \frac{{\sqrt 1}+\cdots +{\sqrt n}}{n{\sqrt n}}$

Find  $$\lim\limits_{n \to ∞} \frac{{\sqrt 1}+\cdots+{\sqrt n}}{n{\sqrt n}}$$  The series in the numerator is what throws me off.  I have tried just about everything, I'm stuck on how to write it in a form where I can find the limit.


Let $f:\mathbb{R^n}\to\mathbb{R^m}$ be a function such that the image of any closed bounded set is closed and bounded. Must $f$ be continuous?


PHP to HTML netherlands characters not showing correctly

I have a Netherlands texts saved in my table. They show well in MySQL table like this Wilt u hoogstens één of twee kinderen, ook al kunt u zich qua gezondheid en inkomen meer kinderen permitte When I select that text and do an echo with PHP I get Wilt u hoogstens ��n of twee kinderen, ook al kunt u zich qua gezondheid en inkomen meer kinderen permitte. I tried to set the PHP page to use <meta http-equiv="content-type" content="text/html; charset=utf-8"> and also tried to do echo utf8_decode($text) but the text is still not showing as in the table. Any help on this please? Thanks. Note: the table field collation where the text is stored is utf8mb4_general_ci To select the text from my table I'm using PHP PDO: function get_questions($userBrowserLanguage, $dbh) { $query = "SELECT Frage, FrageNr FROM `tbl_fragen` WHERE Language = ? AND Test = ? AND Frage != ? ORDER BY FrageNr ASC";     $parameters = array('nl', 'OCA55', '');//$userBrowserLanguage     $sth = do_query($query, $parameters, $dbh);     $questions = array();     while ($question = do_fetch_result($sth)) {         array_push($questions, array($question['FrageNr'], $question['Frage']));     }     return $questions; }


16.04 recent install low graphics mode error

I recently installed 16.04 on a pen drive and it keeps on coming up with a running in low graphics mode pop up and wont let me do anything. I'm not the greatest with terminal. help would be appreciated.  EDIT: I also cannot get to grub menu when I hold shift during boot it takes me to what looks like a terminal. Also don't believe I have a user name or password.


What is the difference between pink salt and more typical coarse salt (e.g. sea salt)?  I know it is pink due to mineral deposits, but culinarily is it any different? e.g. does it taste different, is it used differently, etc.  Since there may be more than one kind of pink salt, I'm talking specifically about "Himalayan Pink Salt".


Guava: two classes in same package, one working and one getting 'ClassNotFound' error

I'm using the Bloom filter and Funnel classes in Guava. Rather than adding the JARs individually, I added a dependency on Guava using Maven.  When I used the Bloom filter class originally, it had no issues. But when I started using the Funnel class (in the same file with the same dependency section, classpath, etc.) I get the errors     java.lang.NoClassDefFoundError: com/google/common/hash/Funnels    and      java.lang.ClassNotFoundException.


What happens to Kreacher after Yaxley breach Grimauld's Place secret?

Kreacher is the house-elf of Grimmauld Place. From the death of the last black inhabitants, he was left alone until Sirius moved in. Then his ownership passed on to Harry.  Harry had him work at Hogwarts until DH when he had him back to Grimmauld Place. Some trust started to build between them, but after the Ministry of Magic chaotic escape, the house became accessible to Death Eathers (or at least presumably). Harry even thought about Kreacher for some time, and how he would be saddened by their disappearance and the invasion of the Death Eaters.  Nevertheless, we never get to know what happens to him afterward, IIRC. Is there any information about him after Harry, Ron and Hermione broke into the Ministry of Magic?


Handling multiple map frames with different layers in one print layout?

Often I need two (or more) map frames in map layout to present different data next to each other. It is easy to make multiple map frames in QGIS Print Composer. BUT...  It is in the nature of my work that very often I need to update some map frames because data I am presenting in map changed or I need to add/remove layer, change scale, projection etc.  So if I create one map frame, lock it (Lock layers for map item), create second map frame with different layers, scale,projection etc. and than realize I need to change something in first frame, I can't find a simple way to do it...  To simply do that in Mapinfo, there are more Map Windows, in ArcGIS there are multiple Data Frames. What is in QGIS to achieve that?


I am new to Ubuntu, I am working on AVR micro controller for that I need to use AVARICE software, by using synaptic package manager I installed AVARICE but I am not able to find it in application files.   so how to open that software? and if any knows about AVARICE I request to help me in working over it


How to insert code properly on Stack Overflow?

This is a simple question. I'm trying to enter code on Stack Overflow so I can ask people questions about my site. Stack Overflow says I have to indent or something to show my code. I've tried pressing the Ctrl+K command, and it does give me a "insert code here" but when I put the code between the " " it still gives me an error saying I can not post my code. This is becoming very frustrating being that I can't ask any questions on this site because the first thing people want is code, and without that my posts are just ignored.


Find the value of $\frac{\sqrt2 + \sqrt6}{\sqrt{2 + \sqrt3}}$

Find the value of $\dfrac{\sqrt2 + \sqrt6}{\sqrt{2 + \sqrt3}}$.  My book is showing that this problem has an exact integer value solutions, but I was unable to find it.  How can we prove that it has integer solutions, and which integer is its solution?


Hit:1 http://archive.canonical.com/ubuntu disco InRelease Hit:2 http://se.archive.ubuntu.com/ubuntu eoan InRelease                        Hit:3 http://se.archive.ubuntu.com/ubuntu eoan-updates InRelease                Ign:4 http://dl.google.com/linux/chrome/deb stable InRelease                    Hit:5 http://se.archive.ubuntu.com/ubuntu eoan-backports InRelease              Hit:6 https://deb.nodesource.com/node_12.x eoan InRelease                       Hit:7 http://dl.google.com/linux/chrome/deb stable Release                      Ign:8 https://repo.vivaldi.com/archive/deb stable InRelease                     Hit:9 https://dl.winehq.org/wine-builds/ubuntu eoan InRelease                   Hit:11 http://ppa.launchpad.net/git-core/ppa/ubuntu eoan InRelease              Hit:10 https://cli-assets.heroku.com/apt ./ InRelease                           Hit:12 https://deb.torproject.org/torproject.org eoan InRelease                 Hit:13 http://security.ubuntu.com/ubuntu eoan-security InRelease                Err:14 https://repo.vivaldi.com/archive/deb stable Release                        Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate.  Could not handshake: Error in the certificate verification. [IP: 23.111.9.47 443] Hit:15 http://ppa.launchpad.net/kritalime/ppa/ubuntu eoan InRelease             Hit:16 http://security.ubuntu.com/ubuntu disco-security InRelease               Hit:17 http://ppa.launchpad.net/linrunner/tlp/ubuntu eoan InRelease             Hit:18 https://download.sublimetext.com apt/stable/ InRelease                   Hit:19 https://packagecloud.io/AtomEditor/atom/any any InRelease       Reading package lists... Done   I got this error somebody who knows?  E: The repository 'https://repo.vivaldi.com/archive/deb stable Release' no longer has a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.


How do extension tubes affect the image circle?

If you abuse your lens by just stacking a bunch of extension rings one on top of the other, will this start to affect your image circle?  For instance, you have a lens that can just about cover your sensor with the image circle and you add a bunch of extension rings to focus up-close. Will the image circle start to show on your sensor or will it even widen? Or does it even matter?  Also, is it possible to express this relationship mathematically or does it depend on internal lens design too much?  Note: I ask about focused images, so I assume you still can focus on the object with all the extensions.


SQL connection issue via local and localhost

Code environment:   .Net Framework 4.6.1 Web API Entity Framework SQL Server 2017 Developer   The situation is : When I use (localhost) in connection string in web config. (something like this)  connectionString="data source=(localhost);initial catalog=CN_CHANNELTREE;user id=LOA_WEB;password=BugsFor#;MultipleActiveResultSets=True;App=EntityFramework"   It gives me an error: A network-related or instance-specific error occurred while establishing a connection to SQL Server.  But when I change (localhost) to (local), it connected well. And when I connect to SQL Server via SSMS, the local will give me a network-related error and the localhost will connected well.  And meanwhile, my buddy was running the code with (localhost) in connection string properly.  So I'm totally confused. Is anyone can explan this?


Binding the meta key (a.k.a. super key / Windows key) to left click

How can I bind the meta key (a.k.a.  / Windows key) to a left click? Hitting the meta key should trigger a left click, and pressing down on it should allow me to drag and drop (just like it would do when holding down left click).  I tried using System Preferences -> Shortcuts and Gestures:    but I cannot set "meta" alone as being a shortcut.  I use Kubuntu 14.10 Plasma 4 and Kubuntu 14.04 LTS x64.   (On Windows 7 SP1 x64 Ultimate I can achieve that using the program .)


Mathematical symbol for disjoint set union

In our lecture script, we use the notion of disjoint set union. It uses a special symbol to differentiate the disjoint from the usual set union, where we add an extra dot inside of the \cup symbol. Is there something like a \bigudot? Or any other way to add a centered dot to any symbol?


How to create a dropdown select list from an enum in a viewmodel?

Currently I have a dropdown list based on an enum in a viewmodel. The enum in the viewmodel looks like this:  public enum Frequency {     [Display(Name = "Daily")]     Daily,     [Display(Name = "Weekly")]     Weekly,     [Display(Name = "Monthly")]     Monthly }   In my razor view, I create the dropdown like this:  @Html.EnumDropDownListFor(model => model.Frequency, "--- Select frequency for assignment ---", new { @class = "form-control", id = "frequency" })   And the model gets referenced in the razor view like this:  @model MyApplication.ViewModel.MyViewModel   This works great. However, I want to make a dropdown select list for this instead. I have seen lots of posts that do this with a select list you create in either the controller or the view itself, but I would like to use the enum that comes from the viewmodel. Is this possible? Is it possible to do this without editing the controller?  Any help/guidance is greatly appreciated. Thanks.  Update  I was able to get this working based on  (Suggested in a response). I changed the view like this:  Html.DropDownList("Frequency", EnumHelper.GetSelectList(typeof(MyApplication.ViewModel.Frequency)), "--Select frequency--", new { @class = "form-control", id = "frequency" })   Thanks!


Java has a convenient split method:  String str = "The quick brown fox"; String[] results = str.split(" ");   Is there an easy way to do this in C++?


I cannot find a 64 bit x86 version of an ubuntu iso image to download.  I would like version 18.04.2 (or the latest LTS).  Can someone please direct me to the correct link/location.  Thanks.


Does Mexico issue exit stamps at airports, or only at land borders?

For a long time, I thought Mexico completely lacked exit formalities. Turns out they do have exit stamps (note how it says S=Salida rather than E=Entrada).  Is this only the case at land (and perhaps sea) crossings, or airports as well?


How can I install apache, mysql, php on ubuntu desktop

I just installed Ubuntu 13.10 desktop, I would like to know can I install Apache, MySQL and PHP on Ubuntu desktop version or do I need to install on the Ubuntu server version?


How do I create custom regions in a theme?

I want to add a new area which will be site wide. Describe the process of getting this new region into my theme, if possible generalize it for adding any new, custom region.


Is it ok to flag answers as "low quality" because they are wrong?

I recently asked a question that got a quick answer that was wrong.   After a few comments with the answerer, he stopped defending his position (because it does not work).  But the answer is still there to mislead others.  So I am left wondering if I should do anything about it or just let the eventual downvoting take its course.


I've searched high and low and can't seem to find any posts or blogs showing how to get picklist values for a particular recordType to use in a custom controller.   I can easily obtain the RecordType I need using code like this:      Map<String, Schema.RecordTypeInfo> RT = Task.SObjectType.getDescribe().getRecordTypeInfosByName();     //String var to of Record Type name's label to look for, note the label is used not the api name      String RTname = 'Field Sales';     //Id var to store desired Record Type id in       Id TaskRTId;      // Below only works if the record type above exists      if(RT.containsKey(TaskRTId)){                    //can add these to a list if checking for more than one in a for loop         TaskRTId = RT.get(check).getRecordTypeId();         SYSTEM.debug(RT.get(TaskRTId).getRecordTypeId());     }   I can use getPicklistValues() from a describe field results to get ALL the picklist values, but not for the specific RecordType.  List<SelectOption>options = new List<SelectOption>(); Schema.DescribeFieldResult fieldResult = Task.Type.getDescribe(); List<Schema.PicklistEntry> ple = fieldResult.getPicklistValues(); for( Schema.PicklistEntry f : ple) {     options.add(new SelectOption(f.getLabel(), f.getValue())); }         So, is there a means of isolating the results of the picklist values to the above RecordType via Apex?


How to write a by-the-book equals() method, possibly with hashCode()?

How would you write an equals() method? I need to be able to write a useable one for comparing playing cards in the program. I am using NetBeans for the writting of the code.  I also tend to notice that equals() methods often come with hashCode() methods. What is hashCode meant to do exactly and how should they be written?  So, how should I write an a by-the-book equals() method and a hashCode() method if I need it?    I will post the two equals() methods I ended up doing yesterday, and if anyone needs additional infomation on my program in particular, let me know and I will add the rest.  This is my current set up, unfortantely it will always printout the same output (false).  @Override public boolean equals(Object otherObject)     {        boolean set = false;        if (!(otherObject instanceof PlayingCard))        {           set = false;        }         if (otherObject == this)        {           set = true;        }        System.out.println(set);        return set;     }   This is (I think) the original equals() method I used.  @Override public boolean equals(Object otherObject) { if (otherObject == null) {     System.out.println("Match");     return false; } if (getClass() != otherObject.getClass()) {     System.out.println("Match");     return false; }  System.out.println("No Match, True"); PlayingCard other = (PlayingCard) otherObject; return suit.equals(other.suit) && rank == other.rank; }


Cycles: envirement background for lighting different then render background

I know from  that it is possible to set an image as a world background. But I'm creating a stylised render and my background should not affect world lighting, that should be white.   How can I have a white background color for lighting (becouse of GI) and an image visible as a background in fnal render?  Regards


Test Result Management and Reporting tool

I'm looking for a some sort of management/reporting tool that collects the results of tests, stores them for reporting, then lets users generate reports based on those tests.  We have numerous test running tools that run on a variety of platforms, but all output test results in the JUnit format.  The test are not specific to hardware or platform, but rather generic.  What we would like to do is have an automated (or manual) test run be able to submit it to a central location along with additional information, like platform, OS, hardware configuration and maybe user defined data.  The management/reporting tool would store this data.  Then, a manager would be able to go to the tool and request (or more likely, access a dashboard that developers have setup) an update on the current status.  This could be a list of test results that were run in a particular configuration, or a hardware status, or just the results of specific test(s).  EDIT: I am not looking for software that manages the TESTS.  We already write our own tests in other tools.  I want something that can manage the test RESULTS without having to create the TESTS.  Probably makes my question too specialized...  Any suggestions?


Would you please tell me whether the following fragment is grammatically correct?       ...led me to be qualified in various science Olympiads. For instance, I ranked 21st among...   I know that "qualification in" is correct, for example "we are looking for graduates with qualification in maths". But what about "be qualified in"?


$\renewcommand{ket}[1]{|#1\rangle}$ If we have a particle and we know the initial state $|\psi\rangle$ of everything that is relevant, and we know the full Hamiltonian $H$, then we should be able to show that if we measure the position of the particle then we will find it in a position eigenstate, or if not a position eigenstate, at least a superposition of eigenstates in which the observer observes the particle to be in a position eigenstate. From this it would seem as though the Born rule might be able to be derived. Does this reasoning work? If it doesn't work, why not?  Edit: To be clear, it doesn't necessarily have to follow from unitary time evolution by itself as touched in . Suppose $\ket{\psi(0)} = \ket{E}\ket{M}$ where $\ket{E}$ is an energy eigenstate describing the particle and $\ket{M}$ is the state of the measuring device or the environment or whatever is relevant. If one were to now measure the energy of the particle, then knowing the Hamiltonian $H$ (or maybe it is time dependent $H(t)$) it seems that it should be implied, by Schrodinger's equation, that $\ket{\psi(t)}=\ket{E}\ket{M(t)}$, and so the particle is still in the same energy eigenstate. If this is the case then it seems like the Born rule may also be a consequence of the other postulates of quantum mechanics. Is there something not right about what I've said?


What is the digital sum of $(99...9)^3$?

What is the digital sum of $(99...9)^3$ ? There are 12 nines in the expression. My attempt I have tried to write it as $(10^{12}-1)^3$ and tried to compute the digital sum of expanded expansion. But it is getting complicated and i am loosing track. Can any one help?


Vote +/- visible from question timeline for < 1000 rep users

I've noticed by looking by the timeline on this question () that I was able to see the + and - votes for my answer on that question, even though  it says that to view vote counts that I need to get 1000 rep.  Is this a bug, or is this some reward for hunting effort?  Just for reference, I found one from the "featured" pile and tested it - it also worked: .


How to measure and interpret correlation between non-normal variables

How should I measure correlation between, for example, population size or crossover probability and time ?  Pearson coefficient seems like an obvious choice. However my data do not follow normal distribution.   From what I remember Pearson should only be used when X and Y form bivariate normal distribution. Which is obviously not a case when X denominates mutation probability or population size.  Is there other way to measure correlation between variables or should I just use Pearson?  Furthermore how should I judge the strength of correlation? The tests I know about all rely on normal distribution in some way. Are there any others or should I just use rule of thumb?


Conservation of Energy for Uniform Circular Motion in a Vertical Plane

I was considering the energy and work done on an object experiencing uniform circular motion in a vertical plane, eg. a ball on a string swung vertically, and I arrived upon these conclusions:   The kinetic energy must be constant as $K=0.5mv^2$ and since the object is moving in UNIFORM circular motion the magnitude of the velocity is constant. The gravitational potential energy, $U$ must change as the object varies in height   Though, as this is a closed system, the mechanical energy (sum of $K$ and $U$) must be conserved - however, this does not seem to be the case as the $U$ varies whilst $K$ is constant.   Does this imply that an external force has been applied to the system? How else can you account for this discrepancy?


How to find following integral $$\int \csc^3 x\ dx=?$$  my work:   i substitute $\csc x =t$, $dx=-\frac{dt}{\csc x\cot x}=-\frac{dt}{t\sqrt{t^2-1}}$ $$\int t^3\frac{-dt}{t\sqrt{t^2-1}}$$  $$=-\int \frac{t^2dt}{\sqrt{t^2-1}}$$ substitute $t=\sec\theta$, $dt=\sec\theta\tan\theta\ d\theta$ $$=-\int \frac{\sec^2\theta\sec\theta\tan\theta\ d\theta}{\tan\theta}$$ $$=-\int \sec^3\theta d\theta$$  i got the similar cubic trigonometric function. I am not able to solve this integration. please help me solve it. thanks.


How to interpret pronunciation marks (such as "ləʊðd")

In questions such as this one () answerers often answer pronunciation questions with special characters, as Matt does for that question by using ləʊðd.  Though I already know how to pronounce the word loathed, I for the life of me can't look at those special characters and figure out how the pronunciation comes from them!  How exactly do they work?  Is there a reference somewhere for how each character is to be pronounced, so I can get a better handle on this system? It makes it hard for me to read questions and answers containing these symbols when I don't understand them.


Unbiased estimator of a uniform distribution

For a random sample $X_1,X_2,\ldots,X_n$ from a $\operatorname{Uniform}[0,\theta]$ distribution, with probability density function $$ f(x;\theta) = \begin{cases} 1/\theta,  & 0 \le x \le \theta \\ 0, & \text{otherwise} \end{cases} $$  Let $X_{\max} = \max(X_1,X_2,\ldots,X_n).$ What is the value of k such that $\hat \theta  = kX_{\max}$ is an unbiased estimator of $\theta$ ?    I'm not sure if there is more to this question, because my intuitive answer answer is just  $k=1$. This is because if you order the sample like $$x_{(1)} \le x_{(2)} \le \cdots \le x_{(n)}$$ such that $x_{(n)} = E[X_{\max}]$.  and the fact that the distribution is uniform, the estimator of $\theta$ should just be $X_{\max}$.  Unbiased estimator -> $E\left[\widehat{\theta\,}\right] = kE[X_{\max}] = \theta$  Is my logic wrong here?


Getting null object reference on TextView even when correct reference has been given

I have an AppCompatSpinner and I'm trying to set a text on a TextView here.  Here's my code:  eSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {             @Override             public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {                  final TextView eSpinnerTV = (TextView) adapterView.getSelectedView();                  switch (i) {                     case 0:                         final Calendar c = Calendar.getInstance();                         mHourEnd = c.get(Calendar.HOUR_OF_DAY);                         mMinuteEnd = c.get(Calendar.MINUTE);                          TimePickerDialog timePickerDialog = new TimePickerDialog(activityName.this,                                 new TimePickerDialog.OnTimeSetListener() {                                      @Override                                     public void onTimeSet(TimePicker view, int hourOfDay,                                                           int minute) {                                          Calendar date = Calendar.getInstance();                                         date.set(Calendar.HOUR_OF_DAY, hourOfDay);                                         date.set(Calendar.MINUTE, minute);                                         date.set(Calendar.AM_PM, date.get(Calendar.AM_PM));                                          sEnd(hourOfDay, minute);                                          uTimeInSF = new SimpleDateFormat("HH:mm:ss").format(date.getTime());                                          eString = new SimpleDateFormat("hh:mm a").format(date.getTime());                                          // error on the line below                                         eSpinnerTV.setText(uTimeAMPM);                                      }                                 }, mHourEnd, mMinuteEnd, false);                         timePickerDialog.show();                 }             }              @Override             public void onNothingSelected(AdapterView<?> adapterView) {              }         });   Here's sEnd.java file's code:  public void sEnd(int hour, int min) {         if (hour == 0) {             hour += 12;             format = "AM";         } else if (hour == 12) {             format = "PM";         } else if (hour > 12) {             hour -= 12;             format = "PM";         } else {             format = "AM";         }          uTimeAMPM = hour + ":" + min + " " + format;      }   Here's the xml code:  <android.support.v7.widget.AppCompatSpinner        android:id="@+id/pTime"        android:layout_width="wrap_content"        android:layout_height="wrap_content"        android:layout_marginTop="8dp"        android:layout_marginBottom="8dp"        android:entries="@array/pTimeList"        style="@style/Base.Widget.AppCompat.Spinner"> </android.support.v7.widget.AppCompatSpinner>   Here's pTimeList:  <string-array name="pTimeList">     <item>Pick a time..</item> </string-array>   As soon as I'm clicking the OK button after choosing time from TimePickerDialog, the app is crashing giving this error: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference on the line specified in the code above.  What is causing this error even when this textview has been clearly reference above in the code as final TextView eSpinnerTV = (TextView) adapterView.getSelectedView();?  Please let me know.


how to integrate $ \int_{-\infty}^\infty \frac{dx}{x^2(1+e^x)} $?

how to integrate $\int_{-\infty}^\infty\frac{dx}{x^2(1+e^x)}$?  How can I integrate this difficult form of integration, I tried many times to solve it by parts or by substitution but I didn't get it.


Wine or virtual machine (VirtualBox) to run apps (eg. Photoshop)

I am wondering if it will be better (stability, convenience and speed) to run apps like Photoshop with Wine or a virtual machine like VirtualBox?


How to get Scilab 6.0.1 working on Ubuntu 18.04 LTS?

I have installed clean Ubuntu MATE 18.04 LTS and installed Scilab from repository here with    sudo apt-get update sudo apt-get install scilab   After installation I tried to launch it from GUI (Applications → Other → Scilab) - it does not start. Then I tried to launch it from terminal with scilab command. Terminal output is as follows:  $ scilab /usr/bin/scilab-bin: error while loading shared libraries: libjava.so: cannot open shared object file: No such file or directory   so it can't find Java. I reported  about this problem.  I checked existence of libjava.so:  $ dpkg -S libjava.so   openjdk-11-jre-headless:amd64: /usr/lib/jvm/java-11-openjdk-amd64/lib/libjava.so   so it is in place.  What should I do to get Scilab 6.0.1 working on Ubuntu 18.04 LTS?


I received a .crt certificate to install on my new galaxy tab 10.1. How do I install it?  I see that I can "install from USB storage" but couldn't figure out where this storage is.


I have LG L5 (e610 model) device with Cyanogenmod 10. When I connect the phone to a computer with Linux (I have mtpfs installed), I can see both internal storage and the SD card.  However when I navigate inside them, I can't see some of the files.  For example, if I open file manager app on the phone, I can see several files in the Internal storage/Notifications directory, however the directory on the computer only shows one of those files.  If I switch USB connection type to PTP (camera) - as OS X doesn't support MTP natively - Image Capture sees the phone as a camera, however it can only see about a third of all the images present on the phone.  I don't have a Windows machine to try, but I suspect the results would be similar.  I tried upgrading Cyanogenmod to the latest nightly, clearing and reinstalling it - same results.  Any idea as to what is going on?  How can I make all files appear on the host computer?


How to access a subset of values from the returned set of values of a function in Python?

I have a Python function that returns a set of values say a1,...,an.  Example. The returned set is a1,a2,a3,a4.  def myFunction():     # The code     return a1,a2,a3,a4    I would like to access only a1 and a4 for example, how?  I tried  a1, , ,a4 = myFunction()   but it gives me error too many to unpack  EDIT The error too many to unpackwas only given when I tried a1,=myFunction()


How is the limit infimum of sets different from the limit infimum of a sequence of real numbers?

I am trying to understand whether the limit infimum of a set is related or a generalization of the limit infimum of a sequence of real numbers. Suppose that $X_n$ is a sequence of sets, and so the limit infimum of $X_n$ is defined as saying that from some stage onwards, all of the $X_n$ occur.   Concretely:  $$ \liminf_{n \to \infty}X_n = \bigcup_{n=1}^{\infty}\bigcap_{k\geq n}X_k $$  Now, suppose that we let $X_n(\omega) = (-1)^n$ and let $X(\omega) = 1$. Then, we have that:  $$ \liminf_{n \to \infty}X_n = -1 $$  Here it appears that after some time, only $-1$ occurs. But, I know that both $1$ and $-1$ alternate, and so there shouldn't be a time after which $-1$ only occurs.   I am wondering if I am somehow confusing something here between the limit of sets and the limit of a sequence? It also seems that the definition of the limit infimum/supremum of sets has no direct connection to that of a sequence and is an arbitrary definition. Am I wrong here?


I would like to be able to add the symbol "lambda-bar" (see below) into an equation. How can I do this?


Prove $\exists \xi, \eta \in (0,1)$, such that $f(\xi)+f'(\eta)=\xi+\eta$.

Suppose $f(x)$ is continuous in $[0,1]$,  derivable in $(0,1)$, $f(0)=0, f(1)=\frac 12$, prove    $\exists \xi, \eta \in (0,1)$, such that   $$  f(\xi)+f'(\eta)=\xi+\eta. $$   I have tried Cauchy mean value theorem:  let $F(x)=\int_0^x f(t)-t \,dt, G(x)=\frac{1}{2}x^2-f(x)$, then $\exists \xi \in (0,1), \eta \in (0,1)$, such that  $$ \frac{F(1)-F(0)}{1-0} = F'(\xi)  \Leftrightarrow f(\xi)-\xi = \int_0^1 f(t) \,dt - \frac 12. $$ $$ \frac{G(1)-G(0)}{1-0} = G'(\eta)  \Leftrightarrow \eta-f'(\eta) = \frac 12 - f(1) = 0. $$  but failed.  Any hints are appreciated, thanks for your help.    The conditions of this question are wrong, but if i rectify them, the question will contradict the anwser of Mr. Robert  Z to some extent, so please be sure to see the anwser after skimming this question. I am sorry for the inconvenience.


Taxation on income sending from Hong Kong to India savings account

I have been working in Malaysia for the last 1.5 years, my company has transferred my salary from Hong Kong to my Indian savings account for the last 18 months.    Do I need to pay tax on this? All my funds have been transferred to an SBI savings account. I don't have an NRI account. Can anyone give me clear answer. To prove NRI, is it enough that stay out of India for more than 182 days or are any more details required?


How to send the output of `time some_command` run repeatedly to a file?

If I run time uname -a | awk '{ print substr($3,1,9)" "$12 }', I get:  $ time uname -a | awk '{ print substr($3,1,9)" "$12 }' 4.15.0-70 x86_64  real    0m0.016s user    0m0.003s sys     0m0.016s $    I would like to run the above command several times and save the entire output to a file. So I tried  for i in {1..10}; do time uname -a | \ awk '{ print substr($3,1,9)" "$12 }' >> uname.txt; done   But only 4.15.0-70 x86_64 is sent ten times to the file uname.txt. The output of time is sent to the screen for each run and not to uname.txt.  So how can I have the output of time also captured in uname.txt?    I can use script and that works but the output isn't pretty:  (B[m(B[m(B[m4.15.0-70 x86_64  real    0m0.017s user    0m0.013s sys 0m0.007s (B[m(B[m(B[m4.15.0-70 x86_64  real    0m0.015s user    0m0.008s sys 0m0.009s (B[m(B[m(B[m4.15.0-70 x86_64  real    0m0.015s user    0m0.008s sys 0m0.008s   Or as an image:    I know I could clean it up if there's no better way.


Define memory usage or field size using macro with reinterpret_cast

Recently I saw this macro:  #define asOFFSET(s,m) ((size_t)(&reinterpret_cast<s*>(100000)->m)-100000)   I have found this as the approach to calculate the position offset of any item m of any struct s from the beginning of the structure.  However when I ran it and compared the calculation for two structures MyStuct2 and MyStruct3, which differ only by one int var3 added to MyStruct3 at the beginning, I got the difference 8 bytes, not 4 as I expected.   This is the code I run:  #include <time.h> #include <stdio.h>  #define asOFFSET(s,m) ((size_t)(&reinterpret_cast<s*>(100000)->m)-100000)   struct MyStruct1 {int var1; int a;}; struct MyStruct2 {long var2; int a;}; struct MyStruct3 {int var3; long var4; int a;};  int main (void) {   printf("%d\n",(int)asOFFSET(MyStruct1,a));  printf("%d\n",(int)asOFFSET(MyStruct2,a));  printf("%d\n",(int)asOFFSET(MyStruct3,a));   // Result:  // 4  // 8  // 16  }   and this is the output it gives:  4 8 16   My question is how can I fix the real memory in order to have one int taking 4 bytes and not 8? Thanks.


Is a UAE Tourist visa still valid after a change of passport number?

I recently applied for a tourist/visit visa to UAE. The passport I applied with, whose number is on the e-visa I received, is damaged so I couldn't even fly there.  If I get a new passport, is that going to be a problem with Immigration?  Will they allow entry, since I now have a new passport with a number different from that on the visa?


I am just curious if solar panels, because they absorb radiation, cool the atmosphere.  If there were enough of them, would the temperature be different?  I'm not a physicist or student.


Switching to different font size(s) locally

Inside a 12pt document I like to switch in an environment to a font size of 10pt. The macros like \normalsize, \large, \small etc. should all work like in a 10pt document. I'm aware that this isn't good typography and might look bad in general. I'm planning to use it for the labels inside a tikzpicture.  The task (I don't like to call it a "problem") is that I have some standalone tikzpicture documents which are using 10pt when compiled standalone, but can be also inserted into 12pt documents where the text does not fit any more in some places. I know it could be fixed by changing all distances to one of the font size specific units em or ex, but don't like to change several figures and maybe add this as a feature to the standalone package.


Travel to USA as a fully-vaccinated [ AstraZeneca ] person

I plan to travel to New York next month from Germany. I am a Turkish citizen.  say that fully-vaccinated people do NOT have to quarantine upon arrival, with a note at the bottom of the page:  *This guidance applies to COVID-19 vaccines currently authorized for emergency use by the Food and Drug Administration: Pfizer-BioNTech, Moderna, and Johnson and Johnson (J&J)/Janssen COVID-19 vaccines. This guidance can also be applied to COVID-19 vaccines that have been authorized for emergency use by the World Health Organization (e.g. AstraZeneca/Oxford).  Since the AstraZeneca vaccine is authorized by the WHO, I assume I also don't have to quarantine upon my arrival. Would my assumption be correct? Thank you.


Simple ordinary differential equations, why is it not defined on this interval?

I'm wondering why this differential equation, $xy'= 1$ has no solution on the interval $I:−1 < x < 1$ per Ordinary Differential Equations by Morris Tenenbaum and Harry Pollard, page 29: example 4.22.  From my understanding, this differential equation should have a solution as long as $x ≠ 0$.  It's "family" of solutions would then look like, $y = log|x| + c_1$ (which is given in the book), and seems to be defined for all $x ≠ 0$ as well.  What am I missing here?


How can I tunnel all of my network traffic through SSH?

Whenever I'm using the internet from an insecure location (such as public wifi) I like to use an ssh tunnel (ssh -D port host) to ensure my traffic can't be sniffed. Unfortunately, there seem to be many applications which do not provide a way to specify a proxy (Flash is one major example).  It feels like there should be some way to use a tunnel for all network traffic from my computer, but I'm complete ignorant of how to do this. Any help would be greatly appreciated.


bydefault scroll to the bottom of a div in Firefox browser

I used var items = document.getElementById('messageBody'); items.scrollTo(0, document.getElementById('messageBody').scrollHeight);  where, 'messageBody' is the id of the div with height 400px and vertical scroll in it. This seems to be working fine in Chrome browser but its not working in Firefox. Can someone help me with a fix for this issue in Firefox browser?


Is there a difference between "awhile" and "a while"? If there is, what is it? I've been wondering this for awhile, but now I actually need the answer.


Can anybody recommend a book on quantum physics for a mathematically minded student?

Basically what the title says. I'm a math/physics double major going into my second year, but I'm much more math oriented. I'll be taking a quantum class in the fall and I'd like a book that approaches the topic from a rigorous mathematical standpoint. If it matters at all, I have a good understanding of linear algebra, abstract algebra, differential equations, and some analysis.


asymptote versus tikz and usage in documents created with Latex

Is it better to use tikz or asymptote Any comparison available  Can asymptote code be added directly to a Latex book/letter/article along with tikz


Prove that if $a_n\gt 0$ and $\sum a_n$ diverges, then $\sum \frac{a_n}{1+a_n}$ diverges.     This is the solution to this problem, but I'm having a hard time understanding it. Why does $a_k/(1+a_k)$ not converge to $0$ if $a_k$ doesn't converge to $0$?   I'd appreciate it if anyone could answer this question for me.


Is it possible to call servlet and get values from it within JAVASCRIPT

I have a form where I want the values of text fields to be changed on select change event, I want to call the onchange event for the select field to calls a javascript function that gets values from database but its not working, need workable example according to this scenario (I am not familiar with AJAX/JSON/JSTL etc so I haven't used those).          (NEED WORKABLE EXAMPLE)            -----------------------------    Name   |                           |   (Select Field)           -----------------------------            -----------------------------    Price  |                           |   (Text Field)           -----------------------------            -----------------------------    Image  |                           |           |                           |           |                           |           |                           |           |                           |           -----------------------------                              <form name="product" method="post" action=".\GetProducts">

                                                                                <select class="form-control" name="orproductname" id="orproname" onchange="document.product.submit();">                                 <% ProductDAO pdr = new ProductDAO(); String[] kl = pdr.getProductNames();                                 for(int i=0;i<kl.length;i++) {%>                                 <option><% out.println(kl[i]); %></option>                                 <% } %>                                 </select>

                                                                                <input class="form-control" type="text" placeholder="Original Price" id="orproprice" name="orproductprice" required>

                          <input class="btn btn-primary send" style="width:200px; margin-right:20px" type="submit" value="Order">                         <input class="btn btn-primary send" style="width:200px" type="reset" value="Clear">                     </form>


I am looking for a stronger notion of generic flatness. Let $A$ be a Noetherian ring, $M$ a finitely generated module over $A$. Suppose there exists a maximal ideal $m$ of $A$ such that $M_m$ (the localization of $M$ at $m$) is $A_m$-flat (here $A_m$ is the localization of $A$ at $m$). Does there exist an open neighbourhood $U$ of $\mathrm{Spec}(A)$ containing the point corresponding to $m$ such that for all point (not necessarily closed) $u \in U$, the localization of $\tilde{M}$ (the coherent sheaf corresponding to the module $M$) at $u$ is $\mathcal{O}_{U,u}$-flat i.e., $\tilde{M}|_U$ is $\mathcal{O}_U$-flat?


Why aren't any slimes spawning in my slime farm?

I dug a large room to specifications, 3 blocks tall and 16 blocks wide as well as long. I dug it at 10 levels above bedrock, in a location {(-240, 0) -> (-224, 16)} specified by  slime finder app. I am definitely more than 24 blocks away and less than 32 away from the spawn room, as specified by the wiki .  Yet, no slimes. I have been sitting in my location patiently listening for the moist slapping sounds of slime. I have gone in to the room every time I heard a phantom slap but still nothing.  Am I just being dumb somehow or do the minecraft lords just hate me?  If it helps/anyone cares here's my seed: 6405460532872068998


For positive real numbers $a,b,c$ prove that $ \sum \limits_{cyc}{\frac{a^3}{(a+b)(a+c)}}\geq \frac{a+b+c}{4}$

I did this inequality with Holder Inequality in this way \begin{align*}&\left(\sum \limits_{cyc}{\frac{a^3}{(a+b)(a+c)}}\right) \left(\sum \limits_{cyc} (a+b)\right)\left(\sum \limits_{cyc}(a+c)\right)\geq (a+b+c)^3\\ \implies &\sum \limits_{cyc}\frac{a^3}{(a+b)(a+c)} \geq  \frac{a+b+c}{4} \end{align*}  Though i did this but it seems to me that it can be done in elementary way. But i can't find that way.   Can you please do this inequality in elementary way?  Edit: Please use only AM-Gm and Cauchy-Schwarz(Would be great if you don't use Cauchy-Schwarz)


Is it still worth to add the log4j library to a Java 5 project just to log let's say some exceptions to a file with some nice rollover settings. Or will the standard util.logging facility do the job as well?  What do you think?


How to show that $\sum_{n=1}^\infty r^n\cos n\theta=\frac{r\cos\theta-r^2}{1-2r\cos\theta+r^2}$?

I'm supposed to prove the following series expansion:  $$s_n=\sum_{n=1}^\infty r^n\cos n\theta=\frac{r\cos\theta-r^2}{1-2r\cos\theta+r^2}$$  I first note the following:  $$s_n=\sum_{n=1}^\infty \Re\left[re^{i\theta}\right]^n=\Re\left[\sum_{n=1}^\infty z^n\right]$$  Using geometric series definition:  $$s_n=\Re\left[\frac{1}{1-z}\right]$$  $$s_n=\Re\left[\frac{1-z}{1-2z+z^2}\right]$$  Substituting polar coordinates of $z$:  $$s_n=\Re\left[\frac{1-r\exp(i\theta)}{1-2r\exp(i\theta)+r^2\exp(2i\theta)}\right]$$  Taking real component:  $$s_n=\frac{1-r\cos\theta}{1-2r\cos\theta+r^2\cos2\theta}$$  I can't really seems to do anything beyond here, could someone point out where I've gone wrong?


I've found a number of how-tos for solving video but I'm just looking to put an element in a photo and can't seem to find a how-to for that.  Is it possible in blender to do a camera solve with a still image?  Thanks.


Can Dark Elixir be stored without a storage facility

I'm a town hall level 5 and on one of my raids I've taken 120k resources each and I noticed that I got 200 dark elixir, but I don't have dark elixir storage.   Where does it go? When I get a dark elixir storage will i start with 200? or does it all go to waste?


Why are there $736$ matrices $M\in \mathcal M_2(\mathbb{Z}_{26})$ for which it holds that $M=M^{-1}$?

I'm currently trying to introduce myself to cryptography.  I'm reading about the Hill Cipher currently in the book Applied Abstract Algebra. The Hill Cipher uses an invertible matrix $M$ for encryption and the inverse matrix $M^{-1}$ for decryption. The book recommends to use a matrix $M$ for which it holds that $M=M^{-1}$, since we then have the same key for encryption and decryption.  In the book, they use a $2 \times 2$ matrix $M$ over $\mathbb{Z}_{26}$ as example, and state that for there are 736 $2 \times 2$ matrices for which it hold that $M=M^{-1}$.  I'm trying to pick up on as much as possible when reading things, since I find it counter-productive for learning to skip something, when you don't get the theory behind it. Can someone enlighten to me, as to why it is that there are 736 possible $2 \times 2$ $M=M^{-1}$ matrices and how to find them?


What happens to a TNG-era Romulan Warbird power core when it is destroyed in combat or decommissioned?

As I understand it, the TNG-era Romulan Warbird is powered by an  - a synthetic black hole.   When such a ship is taken out of commission or the power source is replaced, what do you do with a spent artificial black hole? Is it stored, or dismantled or something else?


I have some doubts about the usages of that and who. Sometimes I read sentences such as         You are someone I love.   You are someone who I love.   People were asked to describe the qualities they look for in a friend.    People were asked to describe the qualities that they look for in a friend.      Why are who or that omitted in some of these sentences but not in others?


why need explicit self inside of initialize() ruby

I don't understand why 'attributes=' inside of initialize should have prefix self.   'name' method doesn't need to have prefix self to call 'attributes' method  class A  attr_accessor :attributes    def initialize attrs ={}     self.attributes = attrs   end    def name      puts attributes   end end  a = {"name" => "someone"} b = A.new a  b.name   output {"name" => "someone"}  if self.attributes = attrs change to attributes = attrs output gonna be nil


Why is swap used when a lot of memory is still free?

In the below 2.6.18 Linux Kernel (Red Hat) server, there is a lot of free memory, but I see some swap is used.  I always thought of swap as an overflow when memory has been depleted.  Why would it swap with about 7GB (50%) free memory?  Swappiness is 60 (default).  Meminfo output:  MemTotal:     16436132 kB MemFree:       7507008 kB Buffers:        534804 kB Cached:        2642652 kB SwapCached:      39084 kB Active:        6001828 kB Inactive:      2532028 kB HighTotal:           0 kB HighFree:            0 kB LowTotal:     16436132 kB LowFree:       7507008 kB SwapTotal:     2097144 kB SwapFree:      1990096 kB Dirty:             236 kB Writeback:           0 kB AnonPages:     5353644 kB Mapped:          45764 kB Slab:           330660 kB PageTables:      34020 kB NFS_Unstable:        0 kB Bounce:              0 kB CommitLimit:  10315208 kB Committed_AS: 14836360 kB VmallocTotal: 34359738367 kB VmallocUsed:    264660 kB VmallocChunk: 34359472735 kB HugePages_Total:     0 HugePages_Free:      0 HugePages_Rsvd:      0 Hugepagesize:     2048 kB


Question:     Given complex numbers $a,b,c$, we have that $|az^2 + bz +c| \leq 1$ holds true for any complex number $z, |z| \leq 1$. Find the maximum value of $|bc|$   It is said this is answer is $$|bc|\le \dfrac{3\sqrt{3}}{16}$$  My idea: let $z=1$,then $$|a+b+c|\le 1$$ let $z=-1$,then $$|a-b+c|\le 1$$ let $z=0$, then $$|c|\le 1$$  let $|\theta|=1$,then we have $$|a(z/\theta)^2+b(z/\theta)+c|\le 1\Longrightarrow |az^2+b\theta z+c\theta^2|\le 1$$ and only this can't solve this problem,Thank you


Calculating size of particular area below buffer in QGIS?

I have a point shapefile of villages where data was collected in Northern Kenya. I created a buffer around those villages.   The second vector layer contains polygons defining areas according to vegetation type. So for example, a forest might be surrounded by a narrow ring of woodland in an area which is mainly grassland. I'm trying to obtain a percentage of each vegetation type within the buffer per village.   I'm using QGIS 1.7


So, I made the mistake of buying a laptop with this uefi. I have no interest in dual booting Windows, I just want to install Ubuntu without the need of a degree in quantum physics. Right now I can only get my laptop to end the installation, but at the next boot it will open up the setup bios and won't go further... Is there a guide to get rid of this problem?


What does the statement "the laws of physics are invariant" mean?

In the first paragraph of Wikipedia's article on , it states one of the assumptions of special relativity is     the laws of physics are invariant (i.e., identical) in all inertial systems (non-accelerating frames of reference)   What does this mean? I have seen this phrase several times, but it seems very vague. Unlike saying the speed of light is constant, this phrase doesn't specify what laws are invariant or even what it means to be invariant/identical.   My Question   Can someone clarify the meaning  of this statement?   (I obviously know what an inertial frame is)


Give me time to approve edits to my questions

I asked a question and an edit was made, then a notification was made to suggest I approve the edit.  Someone else came along and approved that edit so quickly that I didn't even know the approval was there before it had been approved.  It's a bit frustrating to be asked to approve something and have someone else 'senior' trample over your question.  The edit was fine, but given that I wrote the question, wouldn't it be better to give me an opportunity to check the edit (say a 5 minute time-out before anyone else can approve it)?  Surely I'm in the best position to determine whether the edit is valid?  I suppose there may be certain situations that require an emergency-edit, but I hope there aren't many of those.  It seems a bit incongruous with things such as not being able to accept answers within 15 minutes.  I'd feel more engaged with the site if I could contribute in this situation.  Having someone else do it disengages me and personally gets my hackles up.  Furthermore, I'm less likely to learn how to improve what I ask in questions, if I'm not able to review edits- the process of reviewing and approving is a learning experience.  Having someone else come along and approve is rather like someone else showing you how to do something, rather than doing it yourself when you're being 'taught' something.


Convert Java to windows executable extension

I'm new to windows development using Java. Recently I wrote a small cgpa calculate for windows.  But the problem I have is how I can run the program as windows executable software  I used lauch4j to convert my program to .exe but it gave me an error when I tried to lauch the software.  What's the tips to build .exe app using eclipse or netbeans ide?


Idiom for "just because you give something a different name, it doesn't change what it is"

I'm looking for a way to idiomatically express the sentiment that just because you give something a different name, or precede it with a disclaimer, it doesn't change what it is, e.g.:   "I mean this as constructive criticism, not an insult, but ..."  "I'm not racist, but ..." "With all due respect ..."


How to combine these two array into one array using php?

Given these two array:         $name=array("alice","ken","wendy");  $frequent=array(3,6,9);                                          I try to combine it like  $data = array($name=>$frequent);   but it fails. Anyone can help?  I want this:  $data = array(       'alice' => 3,       'ken' => 6,       'wendy' => 9,  );


Where should Springer SV Mult be placed on a Linux Mint Computer?

I am trying to install the "Springer SV Mult" document class for use in Lyx V2.2.2. The OS is Linux Mint 18 with Texlive. I downloaded  but can't figure out where to create the "springer" folder that contains these files so that Lyx will see it and allow me to use this document class. Any suggestions?


If $F$ is a finite field then is it necessary that $|F|=p^n$ for some prime $p$ and positive integer $n$? I know that given prime $p$ and positive integer $n$, there is a field such that $|F|=p^n$? But is the converse always true?


Numbers with a minus sign in a matrix not aligned with the numbers without minus sign

What should I do to get all the 1 with a minus sign (-) in front of them aligned with the other 1 and the 0 in those vectors?  \documentclass[a4paper, 12pt]{book} \usepackage{amsmath} \begin{document} $$ v_1 = \begin{bmatrix} 1 \\ -1 \\ 0 \\0 \end{bmatrix}, \quad v_2 = \begin{bmatrix} 1 \\ 0 \\ -1 \\0 \end{bmatrix}, \quad v_3 = \begin{bmatrix} 1 \\ 0 \\ 0 \\-1 \end{bmatrix}, $$ \end{document}


Someone can recover my Gmail account through answering account creation date

There is a guy who can recover and log into my Gmail account just by answering when my account was created.(idk how he guessed my account creation date)  Even after adding recovery emails and phone and etc he still can access and delete all my recovery.  Any solution how can I secure my account completely and delete that recovery question of asking "account creation date" by Google?


Which partition is better to use in a Nokia booklet 4g?

I'm planning an installation of Lubuntu in a Nokia Booklet 4G, but I don't know much about partition tables and formats.  Which format would be good for the hardware?