I tried today to install xubuntu on my PC but I had some problems in partitioning, while I was trying to fix it, I accidentally deleted everything from the partitions .  So is it possible to recover from ntfs with Xubuntu .  The data that was on my hard drive exceed 400GB of songs, family photos, my work !!


Let $d=(m,n)$. Prove: $φ (mn) = φ (m) φ (n)\frac{d}{φ (d)}$

Let $d=(m,n)$. Prove: $$φ (mn) = φ (m) φ (n)\frac{d}{φ (d)}$$ Can anyone help me with this proof?


Given two sets $S_1$ and $S_2$ in $\mathbb R^n$ define their sum by    $$S_1+S_2=\{x\in\mathbb R^n; x=x_1+x_2, x_1\in S_1, x_2\in S_2\}.$$   Prove that if $S_1$ and $S_2$ are compact, $S_1+S_2$ is also compact.   Prove that the sum of two compact sets in $\mathbb R^n$ is compact.   Compact set is the one which is both bounded and closed. The finite union of closed sets is closed. But union is not the same as defined in the task. I so not know how to proceed. I do understand that I need to show that the resulting set is both bounded and closed, but I do know how to do that.


How to install packages that is already downloaded?

I am new to linux environment.I am using windows. Recenty I downloaded the google chrome and tried to install it but failed.Then I saw a tutorial which had this command  wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb   It will download the package again but I have already downloaded it using mozilla. Is there any terminal window command that I can use in place of this above command to access an install package from a specified path and install it?  The Tutorial link is:


My Tags page is (still) showing no results on SO and Meta

I just visited  and for me it shows no results. Has something broken?   The problem occurs for me , but oddly not on some other sites I've tried, such as  or .   I have tried pressing Ctrl+F5 many times, but as yet no success in solving this. This has now been broken for days, leading me to believe that caching is not the culprit.  I've since noticed that the problem goes away if I add some tags as favourites (e.g. ). But I prefer to have no favourite tags, so the problem remains for me. What's odd is that I don't use favourite tags anywhere on the network, so the fact that the ServerFault and Programmers tab works for me is a mystery.


How do you reinstall Ubuntu after deleting python3.6?

I recently made the stupid mistake of uninstalling python3.6 because I upgraded to python 3.9, not knowing how important python is for Ubuntu. I got signed out automatically and when I tried to sign in it said something like "Start of session failed" (it could have been something slightly different, I don't remember exactly), so I rebooted my computer and then, instead of showing my username, a text console was shown. I asked about it in another question and they told me that the easiest solution is to back up my files and completely reinstall everything. However, I don't know how to get out of the text console, Ctrl+Alt+F7 doesn't work and neither does "Login as root" Also, I don't know how to recover my files, I plugged in a flash drive and nothing happened.


How to bond/connect wires to neodymium magnets?

After reading , I learned it is not advisable to solder a wire to neodymium magnets.  After more reading I found  post describing the use of conductive epoxy to bond electrical wires to neodymium magnets, a very messy process which takes several hours of waiting.  I want to ask this community if they have or suggest better methods to bond/connect a wire to a neodymium magnet to act as a conductive connection?


A finite group is nilpotent iff two elements with relatively prime order commute

(Question 9 in chapter 6.1 of Dummit and Foote). Prove that a finite group G is nilpotent if and only if whenever $a, b \in G$ with $(|a|, |b|) = 1$ then $ab = ba$. It says to use the following theorem:  Let G be a finite group, $p_1$, $p_2$, ... $p_s$ be the distinct primes dividing its order, and $P_i \in Syl_{p_i}(G)$. Then G is nilpotent iff $G \cong P_1 \times P_2 \times ... P_s$.  I believe I know the if direction: an element $a \in G$ corresponds to an element $(g_1, g_2, ... g_s) \in P_1 \times P_2 \times ... P_s$ and $|a| = lcm(|g_1|, |g_2|, ... |g_s|)$. If $b$ corresponds to $(h_1, h_2, ... h_s)$ then $(|a|, |b|) = 1$ implies each $(|g_i|, |h_i|) = 1$. Since the order of the elements divides $|P_i|$ a prime power, $|g_i|$ or $|h_i|$ has to be 1 or their gcd would not be 1. So one of every pair $g_i$ and $h_i$ has to be 1, so they commute, so $a$ and $b$ commute.  I'm not sure how to do the only if direction. Any pointers? Thank you


How can you prevent X-Forwarded-For spoofing on haproxy?

Is there a way to prevent the X-Forwarded-For from being spoofed in haproxy?  i.e. Can I rename that header to something else? Or is there another way to forward on the correct IP address of the client?


Improving the Global Network Auto-Login experience

Something about having to deal with this feels really clunky. Am I the only one who feels this way? Is there anything that can be done to improve this user experience?  (source: ) Said another way, if I had to deal with this going from gmail to google docs to google reader, it would annoy me to no end. Especially as stackexchange grows and the network becomes a destination for interesting content, I don't really want to confront this boundary every time I go from site to site.


I don't think Stack Overflow should allow questions in other languages, do they? I often hear comments like "I wish we had Stack Overflow in our language".  Are there any plans to make Stack Overflow available to non English speaking countries?  Is it OK if people "clone" Stack Overflow to make it available locally?


Ramanujan Identity related to JacobiFunction

The following identity is allegedly due to Ramanujan $$\int_0^\infty \frac{{\rm d}x}{(1+x^2)(1+r^2x^2)(1+r^4x^2)\cdots} = \frac{\pi/2}{\sum_{n=0}^\infty r^{\frac{n(n+1)}{2}}} \, $$but how do you prove this? The denominator of the right side is related to the Jacobi Function, so maybe one could proceed via modular forms?


float and integer comparison in a pandas dataframe

I am aware of the technical limitations when comparing floats, but consider the following example: import pandas as pd import numpy as np  df = pd.DataFrame({'col1': [1.12060000],                    'col2': [1.12065000]}) df Out[155]:          col1       col2 0 1.12060000 1.12065000  As you can see col2 and col1 are exactly 0.00005 apart. Now, I want to test that. I understand that this returns the wrong result because I am using decimals (df.col2 - df.col1) < 0.00005 Out[156]:  0    True dtype: bool  However, more puzzling to me are the following results (100000*df.col2 - 100000*df.col1) < 5 Out[157]:  0    True dtype: bool  while (1000000*df.col2 - 1000000*df.col1) < 50 Out[158]:  0    False dtype: bool  Why does the comparison to 5 fails and only the last one works? I thought using integers would solve the issues when comparing floats? Thanks!


New 61W USB-C Apple power adapter to old Magsafe2 45W Mid- Apple Mac Air 2012

Any issues with getting a new 61W USB-C Apple power adapter, buying a Magsafe 2 to USB-C cable and using it with my old Mac Air Mid-2012? I am sick of the old 45W adapter breaking all the time, the outer coating splits/frays and it would be nice to be able to just replace the cable if that happens vs. the whole adapter. If it will work, any recommendations for the USB-C to Magsafe 2 cable?  I have seen mixed reviews and I am not sure if its because they just should not be used or I am just finding cheap cables.


Should you pronounce the plural 's' after a word that ends with 's'?

I've always said, for example, "Achilles' shield" as "Achilles-es shield". However, I've noticed others don't pronounce the plural, simply just keep it as "Achilles". Should you pronounce the '-es', or is it not necessary?


C++ getline() behaves strangely when reading stringstream containing \0

I'm trying to read a large buffer from a socket which uses \0 to delimit pieces of data and \n to delimit lines.  I thought getline() would be an easy way to get each line but it's behaving strangely.  I'm using \n as the delimiter in getline().  string line; string test1 = "aaa,123\nbbb\nccc,456\n"; stringstream ss1(test1); while(std::getline(ss1, line, '\n')) {     cout << line << endl;     } // outputs: // aaa,123 // bbb // ccc,456  string test2 = "aaa\0123\0\nbbb\0\nccc\0456\0\n"; stringstream ss2(test2); while(std::getline(ss2, line, '\n')) {     cout << line << endl;     } // outputs: // aaa // 3   Why is this happening in test2? Where is the 3 coming from? Must I remove the \0 to make this work? Is there an easier/better way to mark strings in my buffer when I do a socket recv()?


How can I show the following inequality for any real numbers $x,y,z$?  $$\frac{|x-z|}{1+|x-z|}\le \frac{|x-y|}{1+|x-y|} + \frac{|y-z|}{1+|y-z|}.$$   The triangle inequality could be useful, but I am not sure in what way.   Thank you


How do I use bash script to parse a JSON and run related commands according to the parsed results?

I have a JSON file (array) like this:  [   {"name":"Joe","age":36},   {"name":"John","age":14},   {"name":"Linda","age":62} ]   And I want to parse it in shell, analyzing every item in the array, then to run a command for each item:  curl 'http://example.com/submit' -H --data 'name=[NAME]&age=[AGE]'    Which is, in this case:  curl 'http://example.com/submit' -H --data 'name=Joe&age=36' curl 'http://example.com/submit' -H --data 'name=John&age=14' curl 'http://example.com/submit' -H --data 'name=Linda&age=62'    I know how to do it with Node.jS but I really want to know how to achieve such operations in bash.  I am using zsh on ubuntu.


Is there a way to redeem Steam games from Steam keys while I'm not on my PC?

I'm going to be away from the country (and from my PC) for a month. However, I'm going to receive some steam keys from a friend sometime next week, and I was wondering if there was a way for me to redeem steam games while I'm away.  I only have my mobile phone (Android) and tablet (iOS) while I'm away.  Is there a way for me to redeem steam games without a PC?


Labeled/unlabeled balls in unlabeled boxes

I was hoping I could receive some clarification into the the four cases:   Placing labeled balls in unlabeled boxes with repetition. Placing labeled balls in unlabeled boxes without repetition. Placing unlabeled balls in unlabeled boxes with repetition. Placing unlabeled balls in unlabeled boxes without repetition.   I just want an intuitive understanding of the four cases.  How many ways are there to arrange, say, 4 balls into 9 boxes or 9 balls into 4 boxes in each case above, and why?


I'm using latest Ubuntu GNOME. When I download the steam-installer though software it works, after that nothing happens no update and it won't launch.  Here is the error message I get when I try to launch steam in a terminal:  $ steam Running Steam on ubuntu 16.04 64-bit STEAM_RUNTIME is enabled automatically  grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc grep: symbol lookup error: grep: undefined symbol: pcre_jit_stack_alloc Installing breakpad exception handler for appid(steam)/version(1461972496) libGL error: unable to load driver: swrast_dri.so libGL error: failed to load driver: swrast


citation inside a caption don't follow order of appearance

citations inside a caption of a figure don't follow the order of appearance in the document. I used this in the preamble      \usepackage[square,numbers]{natbib}     \bibliographystyle{unsrtnat}   and this when I included the figure       \begin{figure}[h]       \centering       \includegraphics[width=0.8\textwidth]         {images/Fluid_distrubution_and_wettability}      \caption{Wettability and fluid distribution at pore level      \protect\cite{Crain68:online}}.      \label{fig:wett.fluid.dist}     \end{figure}   But then I get for example Figure 2.2, caption here [1] even though I have already many citations before the figure. But if I put this code in other areas of the document, citations are exactly according to the order they appeared in the document.


A remainder when $2^{100}$ is divided by $153$

What will be the remainder when $2^{100}$ is divided by $153$?


Why did Tony Stark keep the electromagnet in his chest?

The ARC reactor and electromagnet chest piece are originally there to prevent pieces of shrapnel from piercing his heart. That happens because he was fixed by a Chinese/Afghan doctor who doesn't have anything else to do it properly.  However, when he got back to the US during Iron Man and Iron Man 2, why didn't he have the shrapnel removed? Why not just immediately get rid of the electromagnet and live normally?  He later decides to have the electromagnet removed (at the end of Iron Man 3), so why didn't he do it before, especially when it was killing him in Iron Man 2? What changed during Iron Man 3 that suddenly made it possible? Or what prevented him from having it removed before?


Please help!  I made a Latex (using texworks) and it will not recognize my png file. I have the file in the same directory as the .tex and, when I scroll over the command in tex works, the image appears. I used R to compile the graph. Below are my packages:  \documentclass[12pt,a4paper,oneside,draft]{article}  %\setlength{\columnsep}{.1in} \usepackage{fullpage} \usepackage{graphicx} \usepackage{color} %added \usepackage{longtable} %added \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{amscd} \usepackage{amsopn} \usepackage{amsxtra} \usepackage{amstext} \usepackage{fancyhdr} \usepackage{geometry} \usepackage[english]{babel} \usepackage{setspace} \usepackage{hyperref} \usepackage{harvard} \usepackage{array} \usepackage{multicol} \usepackage{setspace}  \renewcommand\harvardurl[1]{\textbf{URL:} \url{#1}} \geometry{letterpaper}  \geometry{margin=1in}  \renewcommand{\headrulewidth}{-5pt} \lhead{}\chead{}\rhead{\phantom{X} \thepage}   All I am getting is this image below in my document,   Please, any help would be appreciated. I'm on a strict deadline!  Best,  -Chuck


How do I take a Screenshot of the new "Touch Bar" on the newer Macs?

I am using Safari on the MacBook Pro, and had about 100 tabs open. As a result the Touch Bar lit up with lots of tiny images of the pages I opened.  I wanted to show someone how the Touch Bar had changed, but didn't want to take out my phone and take a picture of it.   Is there any way to do this?


"proficient " What is the correct usage?

Which preposition is correct in the phrase "proficient in/at/with English"?


How can I set up a password for the 'rm' command?

My friends keep deleting my files using the terminal. So please help me out by explaining how to make a password for rm command.


A process called "accountsd" has over 200% of CPU usage - MacBook Air 2020

Apparently for no reason this process takes a lot of cpu resources and makes my mac unusable(battery drops, overheating and performance drops). I upgraded the operating system to the latest version but that didn't help. Would anyone know how to solve? Thank you.


ssh into an account which has no home directory

As a follow up to my  question, I have decided to create the local user accounts as below.   adduser --system --no-create-home USERNAME   Now, I would like the local users to be able to access the machines using ssh. As per my understanding, ssh works as below.   Assuming I have 2 machines (say alpha and beta).    From alpha machine: ssh user@beta alpha's public key will be present under ~/.ssh/authorized_keys in beta machine.  alpha's private key will be present under /~/.ssh in the alpha machine.    Now I have planned to implement no home for the users. So assuming I adduser into beta machine without any home for any user, will I still be able to ssh into beta from alpha?


Is there an infinite number of primes constructed as in Euclid's proof?

In Euclid's proof that there are infinitely many primes, the number  $p_1 p_2 ... p_n + 1$ is constructed and proved to be either a prime, or a product of primes greater than $p_n$.  Trivially, we could also use the number $R_n=p_1 p_2 ... p_n - 1$ to prove the theorem, for n>2.  Intuitively, as $n$ grows, the probability that $R_n$ is prime gets smaller. Is there a proof that $R_n$ is not prime for any $n$ greater than some integer $M$ ? Or conversely, that there is an infinite number of prime $R_n$ numbers?  A possibly equivalent question: Is there a prime number greater than $p_n$ and smaller than $R_n$ for any $n$ greater than some integer $M$ ?


IPHONE - detecting if the device was jailbroken

I am trying to detect if an iphone/ipod is jailbreak. Then I thought the application could try to access a file outside its area, for example, try to see if MobileMail.app is there...  here is the code  NSString *filePath = @"/Applications/MobileMail.app"; if ([[NSFileManager defaultManager] fileExistsAtPath:filePath])     {         NSString *title = @"problem";         NSString *message = @"you are using a jailbroken iphone";         NSString * buttonOK = @"OK";          UIAlertView *alert = [[UIAlertView alloc] title message                           delegate:self  cancelButtonTitle: buttonOK   otherButtonTitles:nil];           [alert show];           [alert release];        }   as jailbroken iphones can access areas outside its sandbox and the normal iphone can't, this code, in theory, would show if a device was jailbroken or not, but this is the problem.  Someone raised the point that Apple could not approve an application using this code as it may think the Application was trying to access a file outside its sandbox.  Is this true? If yes, can you guys suggest any other code that could verify if the application is running on a jailbreak device?  thanks for any help.


Filesystem Root Disk Space too Low - Syslog Too Big

I have been reading as much as I can about this problem but I am under deadline pressure (the only time these problems seem to occur). None of the answers on similar questions provide much clarity. I did the same steps as this person:     My Syslog is 148 Gb!!  The system is brand new - I built all of it from scratch only 2 weeks ago, which also marks the period of time I have experience with Ubuntu.   The System disk is 256 GB NVRAM I have assigned 32 Gb for virtual RAM I have a 2TB external drive most files I have a "Workbench" Folder on my Desktop for some active files. (Running at 33 GB). I am primarily using Blender, with MB-lab (recently) and some very large environments. Also Makehuman has been used over the last couple of days.   The computer has been running (hard) almost continuously...so it has not been restarted. Could this be a reason why the Syslog is large?  I have tried:   df -h. Everything looks as it should except that the System disk is full. Busybody - but I don't understand what it is doing...it is processing triggers for man-db and systemd. Restarting the system. NB. I have not dug into logrotator, but from what I have read this is automatically part of the OS. I attempted to open the syslog and apart from normal looking entries intially my page just went solid black...like to government is onto me or something. I am currently copying across the syslog to the my large storage HDD and then I will delete it, restart and see what happens.   The system is Ryzen 2700, 16 GB RAM, RTX 2060, Latest Ubuntu 20.04.  I would have preferred to contribute my experience on one of the other active threads, but that isn't how this forum works. I would really like to know what could be causing my syslog to suck the life out of my machine. Using Blender for Fluid caches and Rendering perhaps?


I was pushing random buttons and all of the sudden my monkey was the camera. How do I undo this?


Applying options to already loaded package

Is there a way to apply some options to a package which is loaded in the cls file I am using? For instance, suppose that the cls file loads graphicx, and I want to apply the option demo to it from my tex file.


13.04 - more than four workspace shortcuts in GNOME Flashback (No effects)

I'm using GNOME Flashback (No effects) on Ubuntu 13.04 and I've got six workspaces however when entering System Settings -> Keyboard -> Shortcuts -> Navigation I only see options to address the initial four.  It used to be options up to 12 workspaces there and as I certainly don't need that much, I want to have at least enough for the amount currently active.  How can I restore or add more shotcuts specifically to navigate and move windows to workspace 5 and 6?


Using an iPad or Nexus 7 as an Ubuntu Second Monitor

Is there any way to use an iPad mini or a Nexus 7 as a second monitor through a cable? I don't want something like vnc, I need it to work through the usb cable (or any other cable).  The reason why I am considering the iPad is because of the larger screen (compared to the Nexus 7). I think its self explanatory that I need this to work with Ubuntu.


Does alpha (the significance level) represent the probability of making a Type I error?

P-values do not represent the probability of making a Type I error. This is well known. We know that a p-value is the probability of seeing an effect as extreme in the universe of the null hypothesis.   However - I have read that alpha values are the highest probability that we're willing to accept making an error.  This doesn't sit well with me. How can we compare a P-value (which DOES NOT represent the probability of making a Type I error) with the an alpha value (which represents the probability of making a type I error)?


Can I log back into my Pokémon Go account if I'm told it doesn't exist?

I normally use Facebook to sign into Pokémon Go. However as of today I couldn’t sign in and a pop up keeps saying that the account does not exist. So I tried going in as a new trainer with the same Facebook account in hopes to try switch back to the original account but failed to do so. Hence, now I’m stuck being a new trainer starting from scratch... any ways for me to switch back to my original trainer?


I need a section which isn’t really a part, nor a chapter. So I was trying to define a new command, \subpart, based on the \part command, but with its own numbering and which would look like this, in the middle of a new blank page:     SUBPART ONE      Name of the subpart   However, when I try to do so, there always are errors showing up…  My approach, based on the code from I-dont-remember-where on the web:  \makeatletter \def\@subpart[#1]{%     \ifnum \c@secnumdepth >\m@ne       \refstepcounter{subpart}%       \addcontentsline{toc}{subpart}{\thepart\hspace{1em}#1}%     \else       \addcontentsline{toc}{subpart}{#1}%     \fi     {\parindent \z@ %\raggedright                    % Commented \raggedright      \interlinepenalty \@M      \normalfont      \ifnum \c@secnumdepth >\m@ne        \Large\bfseries\hfil\partname~\thepart\hfil   %  added \hfil … \hfil for centering        \par\nobreak      \fi      \huge \bfseries %      \markboth{}{}\par}%     \nobreak     \vskip 3ex     \@afterheading} \makeatother   I really should learn to use LaTeX correctly…   Thank you for your help, Sebastian


Suppose you have a ring $(C[0,1],+,\cdot,0,1)$ of continuous real valued functions on $[0,1]$, with addition defined as $(f+g)(x)=f(x)+g(x)$ and multiplication defined as $(fg)(x)=f(x)g(x)$. I'm curious what the zero divisors are.  My hunch is that the zero divisors are precisely the functions whose zero set contains an open interval. My thinking is that if $f$ is a function which is at least zero on an open interval $(a,b)$, then there exists some function which is nonzero on $(a,b)$, but zero everywhere else on $[0,1]\setminus(a,b)$. Conversely, if $f$ is not zero on any open interval, then every zero is isolated in a sense. But if $fg=0$ for some $g$, then $g$ is zero everywhere except these isolated points, but continuity would imply that it is also zero at the zeros of $f$, but then $g=0$, so $f$ is not a zero divisor.   I have a hard time stating this formally though, since I'm only studying algebra, and not analysis. Is this intuition correct, and if so, how could it be rigorously expressed?


How do I switch back to python2 after Anaconda set python3 as the default?

Recently, I installed  on my 15.04 and ended up with this!  :~$ python --version Python 3.5.1 :: Anaconda 2.5.0 (64-bit)  :~$ python2 --version Python 2.7.9  :~$ python3 --version Python 3.5.1 :: Anaconda 2.5.0 (64-bit)   During the last moments of installation, I did enter something as yes in hurry, and I suppose it had to do something with this. (Ok, my fault, I should have handled that carefully, but I need help now, not criticism).    AFAIK this is definitely going to break other programs. What do I do now?    What I think could work.  Can this be done using aliases?  alias python=python2   But I ain't sure.


How to Solve a Divisibility Problem : Prove or disprove (Continued)

For all integers a,b,c, prove or disprove each of the following:  i.  If a | c and b | c, then ab | c^2.  ii. If a | (b+c), then a | b and a | c.  Note : "If true prove without using numbers as an example otherwise you can use them if false" That's What My Prof. says.  Unfortunately, The first one I couldn't solve it.  Note No. 2 : My Question is different than this Question :    Please help me , I didn't understand the question really  Thank you in advance


I cannot connect via WiFi and I've tried following the instructions in another question, but I get an error when modprobeing the module rtl8273de.  You can see the commands I ran on a clean install of Ubuntu 18.04 .  The error is as follows:     No wifi adapter found   I tried modprobeing, but I got the below error:  georgeorwell@georgeorwell:~/rtlwifi_new$ sudo modprobe -r rtl8723de modprobe: FATAL: Module rtl8723de not found.   I'm using an HP bs15-000xx laptop, and the WiFi was working (albeit rather slowly) before, when I had windows 10 installed.  I'd be happy to paste a config output somewhere...


I guess that it's a FAQ but I can't find the answer in the manual or here. How is it possible to change the fonts in the body of the text with beamer ?


I wanted to update my Google Chrome and I tried various methods which I found on the internet. But nothing worked and I got the following error: Error: Opening the cache(E:Malformed entry 1 in the list file /etc/apt/sources.list.d/google.list(URI), E:The list of sources could not be read.)   This usually means that the installed packages have unmet dependencies. I am not sure if I ask properly. Can you help me solve this issue?


"Class not found error" when including the file

I have a controller inside my module as follows.  <?php  /**  * @file  * Contains \Drupal\module_name\Controller\ControllerName.  */ namespace Drupal\module_name\Controller; use Drupal\Core\Controller\ControllerBase;  /**  * NuSoap is required, and included here.  */     include 'nusoap/nusoap.php';     class ControllerName extends ControllerBase {         private static $instance = NULL;       private $session_result, $myconnection, $namespace;       private $debug = 0;       private $servicestatus = false;       private $logedin = false;          private $appliances = array();        /* process() retries, on error 503, $max_retries times         * every $recursion_timeout seconds         */       private $max_retries = 15;       private $recursion_timeout = 1;       private $logfile = '';        //constructor       public function __construct ($ip, $user, $password) {         $this->myconnection = new nusoap_client("https://" . $ip ."/sdk/");         $this->myconnection->timeout = 10;         $this->myconnection->useHTTPPersistentConnection();         $this->myconnection->soap_defencoding = "UTF-8";         $this->namespace = "urn:vim25";         $status = $this->_Login($user, $password);         if (!$status) {           drupal_set_message(             t(               'Unable to connect to vCenter "@ip", check connection!',               array('@ip' => $ip)             ),             'error'           );         }       }     }   and i have a folder structure inside module as nusoap/nusoap.php as follows   class nusoap_client extends nusoap_base  {   var $username = '';                // Username for HTTP authentication var $password = '';             // Password for HTTP authentication var $authtype = '';             // Type of HTTP authentication var $certRequest = array();     // Certificate for HTTP SSL authentication var $requestHeaders = false;    // SOAP headers in request (text) var $responseHeaders = '';      // SOAP headers from response (incomplete namespace resolution) (text) var $responseHeader = NULL;     // SOAP Header from response (parsed) var $document = '';             // SOAP body response portion (incomplete namespace resolution) (text) var $endpoint; var $forceEndpoint = ''; stuff ...   }   As you can see it is extending the base class, but whenever I run this using the router I am getting the following error:     Class 'Drupal\module_name\Controller\nusoap_client' not found   Is it because the wrong usage of the include files in Drupal 8? How can I include files in a controller?  As a note there are more dependent files calling the nusoap inside the nusoap folder.


I am a UK citizen with an ESTA valid until August 2019, I'm flying into the US in June 2019, then driving into Canada for 2 weeks, and then back to the US for another week.   Will there be any problems about the time left on the ESTA?


Search every column in every table in Sybase Database

I'm been taxed with the task of creating an application that pulls data from our Micros Point of Sales system. The POS is using a Sybase database running on one of our servers. The database schema is very convoluted. I've been able to figure out most of the schema to gain access to the data I need, however, there are a few things still left to find. I know what they are called in the actual POS, but I can't seem to find them anywhere in the database (although I haven't actually looked through all 200+ tables).  I'm wondering if there's any way to run a query to search for a specific string in all the columns in all the tables. BTW, I'm using the "Interactive SQL" application that comes with the Sybase Database Client software to connect to the database.


Error when I'm clicking and try to make inAppPurchase function?

I receive the follwing error:      java.lang.NullPointerException: Attempt to invoke interface method    android.os.Bundle com.android.vending.billing.IInAppBillingService.getSkuDetails(int, java.lang.String, java.lang.String, android.os.Bundle) on a null object reference   when I'm clicking my button:   skuDetails = billingService.getSkuDetails(3, "com.android.vending.billing", "inapp", querySkus);   All parameters have not null values, but in the same time i got such error.  And full code is below:  connection = new ServiceConnection() {     @Override     public void onServiceDisconnected(ComponentName name) {         billingService = null;         }          @Override         public void onServiceConnected(ComponentName name, IBinder service) {             billingService = IInAppBillingService.Stub.asInterface(service);          }     };      Intent intent = new Intent("com.android.vending.billing.IInAppBillingService.BIND");     intent.setPackage("com.android.vending.billing");     getBaseContext().bindService(intent, connection, Context.BIND_AUTO_CREATE);  buyButton.setOnClickListener(new View.OnClickListener() {          @Override         public void onClick(View v) {             ArrayList<String> skuList = new ArrayList<String>();             skuList.add(ITEM_SKU);             Bundle querySkus = new Bundle();             querySkus.putStringArrayList("ITEM_ID_LIST", skuList);              Log.e(TAG, "onClick: " + querySkus.getStringArrayList("ITEM_ID_LIST"));                Bundle skuDetails = null;             try {                 skuDetails = billingService.getSkuDetails(3,                         "com.android.vending.billing",                         "inapp", querySkus);                             int response = skuDetails.getInt("RESPONSE_CODE");                 if (response == 0) {                      ArrayList<String> responseList = skuDetails                             .getStringArrayList("DETAILS_LIST");                      for (String thisResponse : responseList) {                         JSONObject object = new JSONObject(thisResponse);                         String sku = object.getString("productId");                         String price = object.getString("price");                         if (sku.equals(ITEM_SKU)) {                             System.out.println("price " + price);                             Bundle buyIntentBundle = billingService                                     .getBuyIntent(3, getPackageName(), sku,                                             "inapp",                                             base64EncodedPublicKey);                             PendingIntent pendingIntent = buyIntentBundle                                     .getParcelable("BUY_INTENT");                             startIntentSenderForResult(                                     pendingIntent.getIntentSender(), 1001,                                     new Intent(), Integer.valueOf(0),                                     Integer.valueOf(0), Integer.valueOf(0));                         }                     }                 }             } catch (RemoteException e) {                 // TODO Auto-generated catch block                 e.printStackTrace();             } catch (JSONException e) {                 // TODO Auto-generated catch block                 e.printStackTrace();             } catch (IntentSender.SendIntentException e) {                 // TODO Auto-generated catch block                 e.printStackTrace();             }          }     });


ChaCha with 64bit integers as a PRNG with streams

Can I use ChaCha with four rounds as a good non-cryptographic PRNG with different streams if I use 64 bit integers instead of the standard 32 bit integers? I need a bigger state and this seems the easiest way to do it.


An entire function with a bound on its integral is constant

Let $f$ be an entire function such that $\int_0^{2\pi} |f(r e^{it})| dt\leq r^{\frac{41}{3}}$ for all $r>0$. Prove that $f$ is constant.  I thought of using Liouville's theorem, combined with Cauchy's estimates. To do so, I tried to use Cauchy's integral formula, but it is not possible to bound the term $|w-z|$ which appears below in the integral.  Anyone can give me a hint? Thanks!


What does "properly normalized" mean in CLT?       In probability theory, the central limit theorem (CLT) establishes that, in some situations, when independent random variables are added, their properly normalized sum tends toward a normal distribution


About dual booting Ubuntu 16.04 LTS with Windows 10

My laptop's processor is a Intel Core-i3 (2.00 Ghz), 4 GB ram and 1TB HDD. I want to dual boot Ubuntu 16.04 LTS with my currently installed windows 10.   Will it slow down my laptop?  Will the both OS use the full 4 GB ram each?


Ubuntu failed to boot: "Failed to load image \EFI\ubuntu\grubx64.efi" corrupted

I recently started using Linux Ubuntu (18.04.1). After recent update I restarted my laptop to switch for Windows. The next day when I tried to launch Ubuntu, instead regular purple dual boot menu I got this:  Unexpected return from initial read: Volume Corrupt, buffersize 1000 Failed to load image \EFI\ubuntu\grubx64.efi: Volume Corrupt start_image() returned Volume Corrupt System BootOrder not found.              Initializing defaults Failed to open \EFI\ubuntu\grubx64.efi\ - Volume Corrupt Failed to load image \EFI\ubuntu\grubx64.efi: Volume Corrupt start_image() returned Volume Corrupt StartImage failed: 10   And no button works. The main reason I ran here to start this thread is because I can not access Ubuntu recovery mode by any possible way. I know this part: Failed to open \EFI\ubuntu\grubx64.efi\ maybe related to various reasons so it is hard for me to find precise solution. Please, could anyone provide some newbie-friendly quick guide how to solve this issue... Provided there is one that does no include reinstalling OS.


removing enemy and bullet in collision java

I am currently making a simple 2d game in java. I have created A controller class and created linked lists for zombies(enemies) and bullets. Then in my gameState class I am trying to use for each loops to loop through the linked lists and detect if there is a collision with the bullet and the zombie. However the way it is laid out below in my code example, only the enemy can be removed from the game, if I try to remove the bullet as well, the game crashes. I was wondering if I could get some ideas on how i can remove both entities after a collision occurs.  this is the error I get when the bullet collides with the enemy  Exception in thread "Thread-1" java.util.ConcurrentModificationException at java.util.LinkedList$ListItr.checkForComodification(Unknown Source) at java.util.LinkedList$ListItr.next(Unknown Source) at android.game.GameState.update(GameState.java:71) at android.game.Game.update(Game.java:121) at android.game.Game.run(Game.java:101) at java.lang.Thread.run(Unknown Source)   In GameState class:  for(Zombie zombie : c.z)     {         if(player.getX() > zombie.getX()){             zombie.setX(zombie.getX() + 1);         }          if(player.getX() < zombie.getX()){             zombie.setX(zombie.getX() - 1);         }          if(player.getY() > zombie.getY()){             zombie.setY(zombie.getY() + 1);         }          if(player.getY() < zombie.getY()){             zombie.setY(zombie.getY() - 1);         }          if(player.getBounds().intersects(zombie.getBounds())){              kills ++;             c.removeZombie(zombie);             System.out.println("kills" + kills);          }          for(Bullet bullet : c.b){             if(zombie.getBounds().intersects(bullet.getBounds())){                 //c.removeBullet(bullet);                 c.removeZombie(zombie);                 kills++;                  System.out.println("kills" + kills);                     }          }      }   Controller class:  public class Controller {  LinkedList<Bullet> b = new LinkedList<Bullet>(); LinkedList<Zombie> z = new LinkedList<Zombie>();  Bullet TempBullet; Zombie TempZombie;  public Controller(){     addZombie(new Zombie (200,600));     addZombie(new Zombie (400,650)); }  public void tick(){     for(int i = 0; i<b.size(); i++){         TempBullet = b.get(i);          TempBullet.tick();     }      for(int i = 0; i<z.size(); i++){         TempZombie = z.get(i);          TempZombie.update();     }   }  public void draw(Graphics g){     for(int i = 0; i < b.size(); i++){         TempBullet = b.get(i);          TempBullet.draw(g);     }      for(int i = 0; i < z.size(); i++){         TempZombie = z.get(i);          TempZombie.render(g);     }  }  public void addBullet(Bullet block){     b.add(block); }  public void removeBullet(Bullet block){     b.remove(block); }  public void addZombie(Zombie block){     z.add(block); }  public void removeZombie(Zombie block){     z.remove(block); } }


How many ways are there to distribute $7$ (identical) apples, $6$ oranges and $7$ pears among $3$ different people with each person getting at least $1$ pear?   Below are my workings but I am not sure if they are correct, looking for some help, thanks!  Using the inclusion/exclusion principle:  Include the number of ways to distribute them such that at most $\color\red3$ people have pears:  $$3^7\cdot\binom{3}{\color\red3}\cdot\color\red3^6=1594323$$  Exclude the number of ways to distribute them such that at most $\color\red2$ people have pears:  $$3^7\cdot\binom{3}{\color\red2}\cdot\color\red2^6=419904$$  Include the number of ways to distribute them such that at most $\color\red1$ person has pears:  $$3^7\cdot\binom{3}{\color\red1}\cdot\color\red1^6=6561$$    Hence the number of ways to distribute them such that each person has pears is:  $$1594323-419904+6561=1180980$$


Why All the text is invisible in Intellij?

I have installed manjaro and intellij.  For a couple of month now I had no problems at all and I was fine with that. Since yesterday I experience a strange bug.  The whole text is gone.   What I tried so far:    reinstalled Intellij 13.1.3-2 community edition via pacman. installed pycharm to see if the problems occurs in that edition as well.  strangely in pycharm text appears although it is the same fonts style as the ViewContainer Header. I don't think that that is normal.    Now I think that maybe I deleted a font or something similar. (I remember a 500MB Update that ran through pacman)  Does anyone has an idea how to solve it?


Python - Does it matter if i import modules before or after defining functions? Newb Ques

I'm writing a password management program that encrypts the passwords and saves the hashes to a document. Should I import before defining the functions, import in the functions they are used, or import after defining the functions but before running the functions. I'm trying to make my code as neat as possible. I'm currently importing passlib.hash, sha256_crypt, os.path, time. Sorry if it's not clear I'm kind of new and trying to teach myself. Any advice helps.


I'm having some strange kind of trouble with Windows 10. Whenever I try to install any application, a pop-up dialogue box is supposed to come, asking for our confirmation, but such a box doesn't appear, and as a result, I'm unable to install any application.  Whenever I run an installation, the screen dims, but the dialogue box doesn't appear. The sound of the dialogue box does appear though. Can anyone help me with this kind of problem. What could be the reason for this and what are the possible solutions for the same.


if [[ 6 > 50 ]]; then     echo "true" fi  $ bash script.sh I'm missing something very obvious here. Why is 6 greater than 50 ?? ** EDIT ** I'm also try to solve for if [[ 6.5 > 50 ]]; then     echo "true" fi


What focal length lens do I need for photographing the moon?

I would like to know whether it is possible to photograph moon without any flaws with a canon EOS 550d..   Also to get an image of the moon as close as the following image, what kind of equipment(lens,etc) is need to be used with the 550d Body


What happens if you start your turn in an occupied location?

Based on the answer in this question  if a creature is unwillingly pushed/pulled/dropped or otherwise forced to end its turn in your space, what happens?  I can't find anything saying what happens. All I find is that you can't willingly end your turn in another creatures space.  What happens if you start your turn in the same space as another creature? Does anything happen to the creature that is forced to be in your space?


Lock-screen to take a picture after incorrect password

Is there a way to modify the lock screen to show a custom message and/or take a picture (/w the webcam) when incorrect password was typed in? (Like it was shown in the movie Goodbye World)  (And does anyone know where are the files used by the lockscreen? - I mean codes)


Returning query results in predefined order

Is it possible to do a SELECT statement with a predetermined order, ie. selecting IDs 7,2,5,9 and 8 and returning them in that order, based on nothing more than the ID field?  Both these statements return them in the same order:   SELECT id FROM table WHERE id in (7,2,5,9,8)    SELECT id FROM table WHERE id in (8,2,5,9,7)


What Matlab optimization solver gives you the t-stats and p-value for the estimates?

I calculate a data log likelihood (evaluated at a set of parameters to be estimated), and my task is to find the set of parameters that maximize my log likelihood.  My problem is: thought there are a bunch of matlab optimization algorithms that can give me the estimated parameter (like fminserch, patternsearch), they don't give the t-stats (or standard error) of each estimate....So if I want to check the robustness of the estimation, what should I do?  Thank you :)


How can I run OpenVPN as root in the background, in a script?

I'd like to write a script that calls openvpn first, followed by ssh. When typing the command  sudo openvpn ~/my_connection.ovpn   in the command prompt I get the following output:  ... Wed Jan  4 21:04:35 2017 do_ifconfig, tt->ipv6=0, tt->did_ifconfig_ipv6_setup=0 Wed Jan  4 21:04:35 2017 /sbin/ip link set dev tun0 up mtu 1500 Wed Jan  4 21:04:35 2017 /sbin/ip addr add dev tun0 local IP_FOO peer IP_FOO Wed Jan  4 21:04:35 2017 Initialization Sequence Completed   This command is blocking and the shell is not released. In order to start an ssh connection afterwards I need to push the openvpn process into the background by typing Ctrl+Z followed by a bg.  However, I'd like to call the openvpn connection step and the ssh automatically by calling just my bash file. How do I manage to emulate the Ctrl+Z and bg steps in this file?  I've tried to append a & to the openvpn command and to place nohup in front of it. Neither works.


Is it ok to calk drywall corner joints rather than taping them?

Instead of removing the popcorn ceiling I decided to just put a layer of drywall on top of the existing popcorn ceiling. I noticed the worker used the caulking instead of taping where the old and the new drywall meets. Is this okay?


Why is using a Global Variables class (singleton) bad practise?

The company I'm working for has a HUGE class (Globals.m) that is a singleton. It stores mostly a bunch of BOOLs that should go into NSUserDefaults, but there are also pointers to things like videoplayers that belong to various viewcontrollers. I am fairly new to iOS development (and I'm a lowly intern), but I know in my gut that the code smells to high heaven. How can I explain why using a singleton to store all the variables is bad?  Edit: I don't mean singletons are bad, I just mean in this case. Essentially every significant variable in the app is stored in this one instance.


Discrete solution for alternate zero (low) and one (high) at output?

I am trying to figure out a discrete solution for alternate low and high at the output for varying input. Consider the discrete solution as a block.  Input to the system consist of a push-button. Normally input to the system will be high. When pressed the push-button, input to the system will be low. Each time prasing the push button(that is input goes to low), output should change the state from previous state( that is low (0) to high (1) or high (1) to low (0)).   Any lead to the solution will be helpful.


Remapping LaTeX symbol to another unicode value

When compiling the following piece of LaTeX code, the ∖ symbol does not show up.  \documentclass{article} \usepackage{unicode-math} \setmainfont{Latin Modern Roman} \setmathfont{Latin Modern Math} \begin{document} This will not show: $\setminus$ \\ This will show: $\smallsetminus$ \end{document}   I know why this happens: \setminus translates to unicode character 0x29F5, and this character is not part of Latin Modern Math. What I would like to do is to use Unicode character for \smallsetminus, 0x2216, instead. So what I am really looking for is a way to remap the \smallsetminus command to another Unicode value than the one defined by the unicode-math package. I know a possible way to get a value for \setminus would be to use another math font that does have Unicode character 0x29F5. Adding the line  \setmathfont[range={"29F5}]{XITS Math}   gives me a ∖ symbol, but I don’t want to use another font for this character.


I'm interested in learning  on the cheap. What's the best free resource/book/tutorial for learning R?


How do I change changing the default program when plugging in removeable media?

I have updated to ubuntu 11.10. The problem is when I plug in my external harddisk,all the files are trying to get opened with movie player. Also when I click the icon of external harddisk which shows up automatically when we plug in external harddisk in the right side panel, movie player opens up and try to open the files in it.   How can I change this default opening program from movie player to file browser?


Get numeric position indicator on icons in taskbar?

You can open/switch to applications on the taskbar using SUPER+. A great feature, but hard to use due to the fact you have to count the icons..  Is there a way to show the positions on these icons?  Update: Keeping the accepted answer for history, but see later answer for software.


Continuity of the function $x\mapsto d(x,A)$ on a metric space

Let $(X,d)$ be a metric space. How to prove that for any closed $A$ a function $d(x,A)$ is continuous - I know that it is even Lipschitz continuous, but I have a problem with the proof:  $$ |d(x,a) - d(y,a)| \leq d(x,y) $$ for any $a\in A$ - but we cannot just replace it by $|d(x,A) - d(y,A)|\leq d(x,y)$ since the minimum (or infimum in general) can be attained in different points $a\in A$ for $x$ and $y$, so we only have that $$ |d(x,A)-d(y,A)|\leq d(x,y)+\sup\limits_{a,b\in A}d(a,b) $$ which does not mean continuity.


Is there a way to xcopy just changed or new files?

I am trying to deploy a website from my desktop to my webserver and so right now I am doing this:   xcopy C:\source X:\destination /s   My desktop is a Windows XP machine, and I need to copy to a Windows Server 2008 machine, but this copies everything and the whole site is very large and it takes a really long time to finish copying.   Is there a way to specifically just copy new or updated files? I see you can pass in a changed-since date, but I wanted to see if there is a simpler way to compare against the destination file...  Also, I am open to using anything outside of xcopy that can do the job as well...


Prove that $\mathbb R^n$ is not the union of finitely many its proper subspaces.

I am reading An Introduction to Algebraic Topology by Rotman. After proving   Theorem 2.7: For every $k\geq 0$, euclidean space$\mathbb R^n$ contains $k$ points in general position,  the book remarked: There are other proofs of this theorem using induction on k. The key geometric observation needed is that $\mathbb R^n$ is not the union of only finitely many proper affine subsets . I want to prove that observation.


Least-squares constrained to the unit Euclidean sphere

Assume $A\in \mathbb{R}^{t\times n}$ and $b\in \mathbb{R}^t$. How to solve the following optimization problem in $x\in \mathbb{R}^n$?  $$\begin{array}{ll} \text{minimize} & \|Ax-b\|_2^2\\ \text{subject to} & x^Tx=1\end{array}.$$    Thanks for the comments, I already read another question. But in fact, the two answers are not complete. In fact, this is not a convex optimization, so the solution we get may be local maximum or something else.   Can anyone prove that if $x,\lambda$ satisfy $$A^TAx-A^Tb+\lambda x = 0\\ x^tx=1.$$ This must be a global minimum?


Is there a closed formula for this summation?

I have the summation  $$\sum\limits_{i=1}^n \frac{1}{i^2}$$  And I don't know how to find a closed formula for it. Any ideas?


Looking for Sci-Fi cartoon series from early 2000s

All I remember is that it was between ~2002-2005.  It was about a boy in a dystopian, almost post-apocalyptic world (lot's of brown\cliff\mountains scenes).  He found a staff with a droid on it (who possibly could talk and gave him powers over electricity(?)) or he stole it from a technomage, and he found it in a cave.  The other thing I remember in another episode is that they were on a hovership in a canyon with a dam which closed water access.  I can't remember if it was a good thing or bad guys plan to steal water from good people.  It felt like either sci-fi or steam punk.


Does the Borde-Guth-Vilenkin theorem definitively demonstrate that the Universe cannot be past-eternal, whatsoever?  Does it not assume a classical space-time while the real world requires Quantum mechanics?  Are there successful models in Cosmology that are Past-Eternal?  Why might Alan Guth say the Universe might be eternal in the past, when he himself wrote a theorem in 2003 saying it most definitely isn't?


Why alternating current produces electromagnetic waves?

So my question is: why alternating current produces electromagnetic waves?   There are plenty of answers on google that state it as fact, but none answer why. I  mean what is it about accelerating electrons that generate EM wave? Are the theories for it? Is there lazy explanation?


Selecting features with NULL Geometry from Shapefiles using QGIS?

I have been given a Shapefile that contains records with NULL geometry, along with records with non-NULL geometry. This situation appears to cause problems in QGIS (1.8 and 2.0) when editing the geometries.  I have been able to remove the NULL records by using the Marquee Select tool in the Map pane to select all the features in the dataset and saving the selection as a new shapefile, what I would like to know is how  to identify and delete the NULL geometry records in situ in QGIS. I have been unable to do this using the 'Select By Expression' functionality in QGIS 2.0 with expressions such as the following:   $area = 0   $geometry IS NULL   geomToWKT(  $geometry ) =  ''   I have uploaded a  containing five records, two of which (ID 3 and 4) have null geometries. The format is a MapInfo TAB file as I am having problems creating a Shapefile that preserves the NULL geometries! (I am not sure of the provenance of the Shapefile that sparked the question to begin with)


I want to ask the shell to display a csv file in a nice format in my python script. So I wrote the following:  printout = "column -s, -t < output.csv | less -#2 -N -S " subprocess.call(printout.split(), shell = False)   The error I get is:  column: invalid option -- '#'   I have a rough idea that it is something to do with shell=False; however when I set it to True and run in cmd line, it puts me into another line and I have to ctrl+C to get out.


Proof for $(n!)^2 \geq n^n$ without using induction

The question is to prove that $$ (n!)^2 \geq n^n \text{ | } n\in\mathbb{N} $$ My attempt: From the general AM-GM inequality, we have $$ \frac{a_1+a_2+a_3+\cdots+a_n}{n} \geq \sqrt[n]{a_1a_2a_3\cdots a_n} $$ Taking $$ a_r=\frac{1}{r^2} $$ we get $$ \begin{aligned} &\left(\frac{1+\frac{1}{2^2}+\frac{1}{3^2}+\cdots+\frac{1}{n^2}}{n}\right)^n > \left(\frac{1}{1.2^2.3^2\cdots n^2}\right) \\ \implies & \left(\frac{1+\frac{1}{2^2}+\frac{1}{3^2}+\cdots+\frac{1}{n^2}}{n}\right)^n > \frac{1}{(n!)^2} \\ \implies & (n!)^2 > \left(\frac{n}{1+\frac{1}{2^2}+\frac{1}{3^2}+\cdots+\frac{1}{n^2}}\right)^n \end{aligned} $$ If $$ \left(1+\frac{1}{2^2}+\frac{1}{3^2}+\cdots+\frac{1}{n^2}\right)^n=k $$ Then, we have $$ (n!)^2 > \frac{n^n}{k} $$ and I'm stuck. Help please!


Java keyinput with keyListener won't work. I don't know what I wrote in a wrong way

I'm am creating a basic cookieclicker game and I have implemented a keyinput (space key). Now I got a problem I can't solve and eclipse say that nothing is wrong until i run it.  Keyinput code:  package Tryout;  import java.awt.event.KeyListener; import java.awt.event.KeyEvent;  public class Key_Input implements KeyListener {      private boolean[] keys = new boolean[10];      public boolean space;      public void update(){          space = keys[KeyEvent.VK_SPACE];      }      @Override     public void keyPressed(KeyEvent e) {         keys[e.getKeyCode()] = true;      }      @Override     public void keyReleased(KeyEvent e) {         keys[e.getKeyCode()] = false;      }     @Override     public void keyTyped(KeyEvent e) {         // TODO Auto-generated method stub      }  }   And then the "maincode":      package Tryout;  import javax.swing.*; import java.awt.*; import java.awt.event.KeyListener; import java.awt.event.KeyEvent;  import Tryout.Key_Input;  public class adamTryout {      private static int width = 600;     private static int height = 338;      static JLabel textLabel = new JLabel();      static public Key_Input key;      public static void createWindow() {          JFrame frame = new JFrame("CookieClicker");         frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);         frame.setSize(width, height);           textLabel = new JLabel("CookieClicker" ,SwingConstants.CENTER);          textLabel.setPreferredSize(new Dimension(600, 338));          frame.getContentPane().add(textLabel, BorderLayout.CENTER);            frame.setLocationRelativeTo(null);         frame.pack();         frame.setVisible(true);      }      public static void main(String[] args) {         // TODO Auto-generated method stub          createWindow();            double x = 0;               //Number of Cookie Clickers          double z;                   // Cost of the Cookie Clickers          double cookies = 0;         //Amount of Cookies          double count = 0;           //Additional amount of cookies per second from the Cookie Clickers          final double constant = 0.1; //Amount of CPS (cookies per second) you get from 1 Cookie Clicker            while (1>0) {               // the game loop, (infinity loop)             key.update();          // Code that can't run              if(key.space) {        // Code that can't run                 x++;             }              z = Math.ceil(15*java.lang.Math.pow(1.15, x));              if(cookies >= z) {  //If you got enough cookies you autobuy a new CC and the number of CC's increase as well as the cost of a CC                  textLabel.setText("You bought a new Cookie Clicker; +0.1 cookie each second!");                  cookies = cookies - z;                  x++;                  try {  //delayer (Uptades 1 time per second)                     Thread.sleep(1000);                     } catch (InterruptedException ex) {                         Thread.currentThread().interrupt();                     }              }               try {  //delayer (Uptades 1 time per second)                 Thread.sleep(1000);                 } catch (InterruptedException ex) {                     Thread.currentThread().interrupt();                 }              count = x*constant;              cookies = cookies + 1 + count;              cookies = (double)Math.round(cookies*100)/100;              textLabel.setText("cookies; " + cookies + " \n " + "CPS; " + ((double)Math.round((count + 1)*100)/100) + " \n " + "Cookie Clickers; " + Math.round(x));         // Your current amount of cookies         }     } }   The JFrame starts but they the console output is:   Exception in thread "main" java.lang.NullPointerException     at Tryout.adamTryout.main(adamTryout.java:59)  I simply haven't got a clue what to do now. Please help.


I've been asked a question by a student - it's off the beaten track, and I am struggling to get a definitive answer, even off other physics teachers... If we have an open tube, so open at both ends, how can we end up with a standing wave being formed in this tube? How can the initial wave reflect back and cause the formation of a standing wave? I have my own ideas - but i am never happy with going with what i think, i always try and get the idea validated and hopefully approved! Cheers, Marc'


A useful illustration for differential geometry

I'm working on creating an illustration that I will need in many, different guises in differential geometry/manifold theory etc. Following on from a previous (answered) question of mine (, I want to show how two coordinate lines in the plane originate from two curves on a surface via the chosen map:  \begin{tikzpicture}     \begin{axis}[             name=mfd,             declare function={                     f(\x,\y)=10-(\x^2+\y^2);             },                   declare function={                     c_x(\t)=(cos(\t)+(sin(5*\t)/10))/3+1;             },                   declare function={                     c_y(\t)=(sin(\t))/2-1;             },                   declare function={                     c_z(\t)=f(c_x(\t),c_y(\t));             },           ]                    \addplot3[surf,domain=-2:2,domain y=-2:2,]{f(x,y)};             \addplot3[black,opacity=1.0,variable=t,domain=0:360,dashed,thin] ({c_x(t)},{c_y(t)},{c_z(t)});             \addplot3[black,opacity=1.0,variable=t,domain=-2:2,thin] (t,-1.2,{f(t,-1.2)});             \addplot3[black,opacity=1.0,variable=t,domain=-2:2,thin] (0.8,t,{f(t,-1.2)});             \addplot3[black,opacity=1.0,only marks,mark=text,text mark=$\cdot$] (1,-1,{f(1,-1)}) coordinate (a);     \end{axis}     \begin{axis}[             at={($(mfd.north east)+(1cm,-2cm)$)},             anchor=north west,             declare function={                     c_x(\t)=(cos(\t)+(sin(5*\t)/10))/3+1;             },                   declare function={                     c_y(\t)=(sin(\t))/2-1;             }            ]                    \addplot[variable=t,domain=0:360]({c_x(t)},{c_y(t)});             \addplot[black,opacity=1.0,only marks,mark=text,text mark=$\cdot$] (1,-1) coordinate (b);             \addplot[variable=t,domain=0.6:1.4](t,-1.2);             \addplot[variable=t,domain=-1.5:-0.5](0.8,t);     \end{axis}     \draw [-stealth, shorten <= 3pt, shorten >= 3pt] (a) to[bend left] (b); \end{tikzpicture}   However, I have a couple of problems:   The curves representing the coordinate axes pulled back from the plane via the coordinate map insist on being closed off with a straight line - is there a way to avoid that? I want to draw all the black curves with a thin, dashed line, but I probably don't understand how to set those options. What am I doing wrong?   I apologise if these questions are rather elementary, but I find the relevant manuals difficult to search through; they seem to be meant for reading cover to cover rather than reference.


Bounty question no longer relevent to OP

I have a bountied question . I can no longer test the validity of any answers, because I have moved back to 32 bit Python, and the question deals with 64 bit Python. Anyway, trust me that I am no longer able to test these answers.  I have read , but that does not talk at all about bounties.   My dilemma is the following:  None of the answers I have received help me, and so if I were to just sit and do nothing (as the SO meta post implies), the first poster would get rewarded for giving an unhelpful answer, which in my mind goes against the point of the bounty/points system.  It would be more just for the community to choose (via upvotes) the best answer.  What should I do in the spirit of the points system?  EDIT: Wait a second! My question on SO is still relevant to others, so this is a different question, unlike in the "duplicate" you linked to. Motion to re-open. In the question marked as "duplicate" the OP says that his question is no longer relevant to him, and implies anyone else. My question is about a relevant question which I can no longer test.  EDIT2: I want to clear something up. @James said in the comments You're essentially asking what to do with a bounty when there are no good answers. I do not think so. No, actually I am asking what to do when I cannot test any of the answers, there is a difference. Regardless of whether or not better answers arrive (which would be great), I cannot test if the answers actually work or are better. I am not worried about not getting a solution to my problem, I am worried about being unable to evaluate it in the first place. For all I know the next answers could make the problem worse. So the question is about how I should deal with the points if I don't feel qualified dishing them out. This is why PythonMaster's answer of "choose the one most likely to work" is about as good as it gets. It is also why I am accepting his answer.


Finding the dual basis for the space of polynomials of degree $\leq$ 2

Let $V$ be the space of polynomials of degree at most $2$, with basis $\{1,x,x^2 \}$.Find the dual basis to $\{1,x,x^2\}$.   I know that the dual basis of $\{f_1,f_2,f_3\}$ is the basis $\{f_1^*,f_2^*,f_3^*\}$ where $f_i^*(a_1f_1,\ldots,a_3f_3)$ but I'm not sure how to actually compute the dual basis.


i'm planning to migrate my server from one hosting to another, hence I need to change the dns for my domain name. but the problem is, dns propagating takes a few hours to really complete. Problem is, my site has few thousands users and they enter data daily on my site. What is the best practice on server migration? because i don't want any non-synchronized or non-updated database later.


I'm using Chrome as the default browser on all my devices (laptop, desktop, tablet, smartphone, etc.), and on all of them I'm logged in with my Google account. It happens that I did't use my laptop so much in the last months, so I'm having difficulties accessing the laptop related history on Chrome, because when I go to history I found weeks and weeks of browsing history generated on the other devices. Is there a way to quickly access the local browsing history on a specific device?


Unable to access shared folders on a domain using a workgroup PC (W7 home premium)

I do know that a Windows 7 Home premium does not have the "join to a domain" feature. But shouldn't they be able to access a shared drive on a domain?, as I've seen some can access.  However, I've been having difficulties to fix such a workstation which can ping the destination server but does not offer username/password prompt to access the said server shares. I've tried the registry editing method to overcome this issue; which didn't work too.  Any help or advise on this will be great.


How to change the voice language to english?

I recently bought Dragon Age: Inquisition and I'm keen on playing it. I do have a German client, so the voice is set to German on standard.  In the ingame settings I'm able to change the text language to English, but not the voice.  I can read on the Interwebs that Bioware released a free DLC which enables English voice audio, but I really can't find where to activate that DLC. Several sites claim that there is a DLC section in the Origin-window, but I can't find it:    How can I activate the English voice language on another localized client?


Scenario 1  public static void main(String[] args) throws Exception {         String s1 = "Testing";         String s2 = new String("Testing");         s2.intern();         if(s1==s2){             System.out.println("s1 equals to s2");         }else{             System.out.println("s1 is not equal to s2");         }      }   OUTPUT:    s1 is not equal to s2.  Scenario 2  public static void main(String[] args) throws Exception {                String s1 = "Testing";         String s2 = new String("Testing").intern();         if(s1==s2){             System.out.println("s1 equals to s2");         }else{             System.out.println("s1 is not equal to s2");         }     }   OUTPUT:  s1 equals to s2 .  My question is what is the difference between new String("Testing") and new String("Testing").intern() ?


Detect if variable provides a function in template

I have a function template which is called with different values, i.e.  template <typename T> T do_calculations(const T &var) {      T return_variable;      //Do calculations      return return_variable; }   Now the calculations depend on the type of the variable var. T can either be a scalar (such as double or int), a vector (such as std::vector<> or other types) or a matrix. I know that I can differentiate between for example a std::vector and a double by knowing that double does not have a member function called size(). How can I implement that in my code above? My aim is to have similar code to this:  template <typename T> T do_calculations(const T &var) {      T return_variable;      if(T.has_function_size())          //Do calculations on vector      else          //Do calculations on scalar      return return_variable; }   I can not do a simple check if T is a known type due to having a lot of different input types, but I know that all possible types having a function size() behave similar enough for me.  Now my problem is: My code for the vector calculation loops over all elements, but the code for scalar calculation only over the single element:  template <typename T> T do_calculations(const T &var) {      T return_variable;      if(T.has_function_size())          for(size_t i = 0; i < T.size(); ++i)              return_variable[i] = func(var[i]);      else          return_variable = func(var);      return return_variable; }   with func() a function taking a scalar. Compilation fails with the error that I can not apply func() to a vector (or my own type). Do I have to create separate functions for that, or can I tell the compiler that I know what I do?


How to import tga files texture information into Blender?

I just received a 3D model including one obj and two tga files that are generated in 3dx Max.  When I import the obj file into Blender, obviously I cannot see the texture details provided by tga files.  The obj file contains a line referring to an mtl file with the same name which does not exist.  How can I convert texture information of tga files such that I can import and see them in blender?  I've read somewhere that I should convert tga file into png or jpg format.  Then what?  Thanks,


Integration of the Sequence $\cos^2(nx+u_n)$ over a Measurable Set.

Letting $W\subset[0,2\pi]$ be measurable, and letting $(u_n)$ be a sequence of real numbers, how can it be shown that  $$\int_W \cos^2(nx+u_n)dx\rightarrow \frac{\mu(W)}{2}$$ as $n\rightarrow \infty$, where $\mu$ is the Lebesgue measure? I know that you can begin by linearizing $\cos^2$.


Defining the email address which Nagios sends emails from

Hi currently Nagios sends notifications from nagios@server.domain.com, How do I go about configuring this? Thanks


Class Name Does not Name a Type Issues with Templated Inheritance

Pure Virtual Class, AbstractThing.hpp:  #ifdef ABSTRACT_INTERFACE_FOR_THING #define ABSTRACT_INTERFACE_FOR_THING  namespace A { namespace B  {  template <class T> class AbstractThing { public:   virtual ~AbstractThing() = 0;   virtual T    GetStatus() = 0;  };  } } #endif   Header File, Thing.hpp:   #ifdef _THING_H #define _THING_H  #include "AbstractThing.hpp" namespace A  {    namespace B  { template <class T> class Thing : public AbstractThing<T> { public:   Thing();     ~Thing();   T  GetStatus();  };  } }  #endif   Source file, Thing.cpp,  #include "Thing.hpp"  namespace A { namespace B { template <class T> Thing<T>::Thing() {}  template <class T> Thing<T>::~Thing() {}  template <class T> T Thing<T>::GetStatus() { ... } } }   I keep running into this issue where compiler the complains about the class name (Thing) not being a type.  However, it is declared in the header file.  From reading other posts, it seems like this issue is generally caused by failing to pre-declare a function or class.  However, I don't see why my code does not accomplish this.  I thought that it might be a namespace issue because GetStatus() will compile if I remove the namespace access (Thing::), but removing the namespaces did not help.


Why Is My Program Causing Multiple Null Pointer Exceptions?

This program is a work-in-progress tic-tac-toe game, where I've only just made the buttons; at least, theoretically. I looked up "null pointer exception" before posting this, but still don't understand how it applies here. Help?  //this line is line four public class TicTacToe extends JFrame {   public static void main(String[] args) {     new TicTacToe();   }   public TicTacToe(){     super.setTitle("Tic Tac Toe");     super.setSize(800, 800);     super.setDefaultCloseOperation(EXIT_ON_CLOSE);     buildPanel();     super.setVisible(true);   }   public void buildPanel(){     GridLayout g = new GridLayout(3,3);     JPanel p = new JPanel();     p.setLayout(g);     JButton [] buttons = new JButton[9];     //I'm adding text temporarily to help me see where each button's position     buttons[0] = new JButton("One");     p.add(buttons[0]);     buttons[1] = new JButton("Two");     p.add(buttons[1]);     buttons[2] = new JButton("Three");     p.add(buttons[2]);     buttons[3] = new JButton("Four");     p.add(buttons[3]);     buttons[4] = new JButton("Five");     p.add(buttons[4]);     buttons[5] = new JButton("Six");     p.add(buttons[5]);     buttons[6] = new JButton("Seven");     p.add(buttons[6]);     buttons[7] = new JButton("Eight");     p.add(buttons[8]);     buttons[8] = new JButton("Nine");     p.add(buttons[8]);      add(p);      ActionListener Callback = event -> {       String label = event.getActionCommand();      };     for (int i=0;i<buttons.length;i++){       String string="O";       if (i%2==0){         string = "X";       }       buttons[i].setText(string);       buttons[i].addActionListener(Callback);     }   } }   The Result:       Exception in thread "main" java.lang.NullPointerException     at java.desktop/java.awt.Container.addImpl(Container.java:1117)     at java.desktop/java.awt.Container.add(Container.java:436)     at TicTacToe.buildPanel(TicTacToe.java:37)     at TicTacToe.<init>(TicTacToe.java:13)     at TicTacToe.main(TicTacToe.java:7)


match noisy GPS data to closest linestring in road network

I have some noisy GPS data(Points) that they are not exactly on the road because of the noise. But I want to match them to the closest road linestrings. How to do this in PostgreSQL?    Data: accident_tn is the traffic accidents data that contains st_case as its unique id, and geom as its geometry (which is Point type); road is the road network that contains id as the unique id of the linestring, and geom_way as its geometry (which is linestring type); Goal: match each accident point with a road network linestring (the closest one). I tried:   select acc.st_case, road.id     from accident_tn acc, at_2po_4pgr road     where st_dwithin(acc.geom,road.geom_way,0.0002)     order by acc.st_case;   Sample result:    Remaining Problem: Because of the radian value in ST_DWITHIN(), some accidents match more than one linestring while some accidents match none.  I am thinking about how can I modify the query to keep only one linestring for those one point-many linestrings case. In this sense, I can then select a larger randian threshold to match all accident point to one and only one linestring.


I want to remove this line from fstab using sed:  /var/run/saslauthd /export/sasl none bind 0 0   I know a workaround, first give the number of line, then remove it with sed, but I want to know how to escape the three /?  I have tried a lot but none of these works:  sed  /^/var/run/saslauthd/d /etc/fstab sed  /^\/var\/run\/saslauthd/d /etc/fstab sed  /^"/var\/run\/saslauthd"/d /etc/fstab sed  ^"/var\/run\/saslauthd"/d /etc/fstab sed  ^"/var/run/saslauthd"/d /etc/fstab sed  ^/var/run/saslauthd:d /etc/fstab sed  :^/var/run/saslauthd:d /etc/fstab sed  :^"/var/run/saslauthd":d /etc/fstab sed  :^\/var\/run\/saslauthd":d /etc/fstab sed  :^\/var\/run\/saslauthd:d /etc/fstab sed  :^//var/run/saslauthd:d /etc/fstab sed  ^//var/run/saslauthd:d /etc/fstab


How do I verify that the USB debugging key fingerprint is correct?

When I try to enable USB debugging on my Android device, I am prompted with this message:  The computer's RSA key fingerprint is: FE:35:23:34:...  I see the public key in ~/.android/adbkey.pub How can I verify that this RSA key fingerprint is correct on the computer's commandline? Can I use adb?


Remove Doubles was removed and replaced with Merge by Distance? If, you set the value small enough it works the same and gives versatility.  Blender 2.8 Beta Version 5/13/19


20.04.1 LTS I need Geogebra From:       Installing GeoGebra directly from the command line: for Ubuntu, these two commands eliminate the need for downloading .deb files:  $ sudo apt-add-repository -u 'deb  stable main' $ sudo apt install geogebra-classic From:  You have add their GPG key by wget  -O - | sudo apt-key add and then rerun update and install package: sudo apt-get update sudo apt-get install geogebra-classic From:  Packages from somewhere that's not in the official Debian Archives or Ubuntu Repositories may-or-may-not meet the standards, and might indeed leave cruft laying about. You likely know better than to install random debs from the big, dirty internet already. End excerpts. Given these three "Ask Ubuntu" responses, and my need to run Geogebra production current (as of now, from the geogebra.org download website, 6.0.620.0-offline 01-December-2020), which of the above is correct?  Is the geogebra.org suggested method "safe" pursuant to the last reply about non-Ubuntu (Canonical) packages?


I was thinking; what shape does a black hole have?. By 'Shape', I mean its form (e.g, circle , cylinder, sphere, torus, etc..).  We usually think of black holes as if they're plugholes (e.g, a flat circular object), but what if they're spherical? A spherical black hole would make much more sense. I would imagine than a black hole shaped like a basketball would be capable of pulling more mass towards it than a flat one, as it has a higher surface-to-volume ratio to do so.  Edit I know that it's probably a sphere, but when you think about it, a cylinder could also be a potential shape.


Can a druid wildshape again whilst still in animal form?

I am trying to determine if a druid can use wildshape to turn into a dire wolf then use it again immediately to transform into a small snake.  Can they just transform directly into the new animal form, or does the druid need to end the current form going back to their normal self, then once in normal form expend an action or bonus action to go to the next animal form?  This all assumes that the Druid has enough wildshape instances left to use.


Is Jordan basis unique? I have a 4x4 matrix, find eigenvectors and one generalized eigenvector, also trying different linearly independent eigenvectors but the matrix P so that PJP^-1 =A only works for certain vector. \begin{pmatrix}-\frac{1}{2}&0&-\frac{1}{2}&0\\ \frac{3}{2}&0&\frac{1}{2}&0\\ -\frac{3}{2}&0&-\frac{3}{2}&-1\\ 1&1&1&1\end{pmatrix}\begin{pmatrix}1&-1&0&-1\\ 0&2&0&1\\ -2&1&-1&1\\ 2&-1&2&0\end{pmatrix}\begin{pmatrix}1&1&0&0\\ -1&0&1&1\\ -3&-1&0&0\\ 3&0&-1&0\end{pmatrix}=\begin{pmatrix}-1&0&0&0\\ 0&1&0&-1\\ 0&0&1&1\\ 0&0&0&1\end{pmatrix}


Why do $n$ linearly independent vectors span $\mathbb{R}^{n}$?

Suppose we have $n$ linearly independent vectors $\mathbf{v}_{1}\ldots\mathbf{v}_{n}$ in $\mathbb{R}^{n}$. I know that they do span $\mathbb{R}^{n}$, because we can easily specify a non-singular map which sends the $\mathbf{v}_{i}$s to the standard basis, and then to whichever vector in $\mathbb{R}^{n}$ we choose.    My question is: do we need all the machinery of linear maps, determinants, etc. or is there a proof which is closer to the definitions? Every time I start writing down a proof I end up wanting to say "and this set of equations can be solved uniquely because this matrix is non-singular". Is this necessary?


I have 2D dataset on a layer (currently to British National Grid co-ordinates) and I'm trying to save it as a geojson file using WGS84 CRS and QGIS 3.10.10. This dataset needs to be transformed from the old model OSTN02 to the new OSTN15. Otherwise when I upload this dataset into a geoserver the data is offset. Also when using the WMS layer (basemap - Road 27700) from the Ordenance survey in QGIS is not displaying the data with new model OSTN15. Does anyone know why is this happening? What are the steps to do this transformation or is it just saving the layer, choosing OSTN15 CRS option, which I can't really see?


Changing road bike tyre from 28mm to 32 or 35mm

I have a Triban RC500 bike. Apparently it's wheels can take wider tyres. A lot of internet info suggests that this  is a good thing to do for comfort and perhaps for better rolling resistance too? My questions is, will I need to change to different inner tubes or the current tubes are OK to go from 28mm to 32/35 mm tyres?


how to avoid listing previously entered values in certain text fields of a form? HTML, PHP

In my HTML FORMs, when I focus certain text fields they list down history of values entered previously. Is it possible to avoid this auto-drop-down? I am not looking for some browser settings tips for my computer, instead, I want these settings for all of the users of my website filling a form.   Will it also be possible to apply these settings for some selected text fields only? as historical values for some text fields may be helpful for a particular user using his/her machine.  May be this could be achieved using Javascript, but no clue where to start from.   Thanks for your help.  PS: I am using PHP and Javascript (JQuery).


How can I pass an integer parameter value in JasperReport from Java code?

So I've successfully created my report and I've been trying to get an int variable as a parameter into my query, but I keep on getting this error:  Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/apache/commons/collections/map/ReferenceMap   The code I have to deliver the parameter is this:  private void report(){     try {         Connection con = DriverManager.getConnection("jdbc:mysql://localhost:3306/DB?autoReconnect=true&useSSL=false", "root", "root");          Map parameter = new HashMap();          parameter.put("ID", last_Report);          String path = System.getProperty("user.dir") + "/src/Reports/Report1.jrxml";          JasperReport content = JasperCompileManager.compileReport(path);          JasperPrint printRep = JasperFillManager.fillReport(content, parameter, con);          JasperViewer.viewReport(printRep);      } catch (JRException ex) {         Logger.getLogger(App.class.getName()).log(Level.SEVERE, null, ex);     } catch (SQLException ex) {         Logger.getLogger(App.class.getName()).log(Level.SEVERE, null, ex);     } }   I already checked if the last_Report variable has a proper value, and it does have an int, and when I print the Map, I get this: [{ID=25}].  I have my parameter declared here:  <parameter name="ID" class="java.lang.Integer">     <defaultValueExpression><![CDATA[]]></defaultValueExpression> </parameter>   And this is my query:  Select * from Reports where reports_ID = $P{ID};   Edit: I removed and re added all the libraries, and now I'm getting this:  Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/apache/commons/digester/Digester   Libraries I currently have:   mysql-connector-java-5.1.45-bin.jar commons-beanutils-1.9.3.jar commons-collections4-4.1.jar commons-digester3-3.2.jar commons-logging-1.2.jar itext7-7.0.2.zip jfreechart-1.0.19-demo.jar jxl.jar poi-3.17.jar jasperreports-6.5.1.jar jasperreports-fonts-6.5.1.jar jasperreports-javaflow-6.5.1.jar


How to deduce the usual definition of Quasi-coherent Module over a scheme from the general definition over ringed Spaces

Quasi-Coherent Modules over a Ringed Space : Let $(X,\mathcal O_X)$ be a ringed space. A sheaf of modules $F$ over $(X,\mathcal O_X)$ is called quasi-coherent if for every point $x\in X$ $\exists U\subset X$ s.t ${F_{|}}_{U}$ is the cokernel of a map $\oplus_{i\in I}\mathcal O_U\rightarrow\oplus_{j\in J}\mathcal O_U$  Quasi-Coherent Modules over a Scheme: Let $(X,\mathcal O_X)$ be a Scheme. A sheaf of modules $F$ over $(X,\mathcal O_X)$ is called quasi-coherent if X can be covered by open affine subsets $U_i=Spec(A_i)$, such that for each $i$ there is an $A_i$ module $M_i$ with ${F_{|}}_{U_i}=\tilde{M_i}$  Question: How can one deduce the definition of quasi-coherent sheaf of module over a scheme from the definition of quasi-coherent sheaf of modules over a ringed space?


When did formal "you" and "we" for showing respect in English wither away?

It appears that the current form of English only has the casual or irreverent form of pronouns like "you" and "I"; English lacks the formal or respectful version, which is present in many other languages. By contrast, in formal Hindi conversations, one refers to the first person as "hum" which roughly translates to the regal "we" in English. One refers to the second person as "aap", which translates to "thou" in archaic English, but appears to have no equivalent in current English.  In which historical era did English shed the respectful forms of pronouns? What was the historical context of such linguistic pruning?


Binary conditional operator with assignment

I have this code in javascript: val: a ? a : '' Basically checking that a is not null before assinging it. The problem is that a is double in the line. Is there a shorter way to do this like: val: a ? '' ? Thanks


What's the difference between a well-posed (ill-posed) and well-conditioned (ill-conditioned) problem?  According to :     Even if a problem is well-posed, it may still be ill-conditioned, meaning that a small error in the initial data can result in much larger errors in the answers.


I made an inset and want to extrude it along its local axis I'm trying to extrude the tip of this kettle,I have turned on from the transformation orientation local axis.I tried on the Y and Z, and both go incorrect direction. I'm trying to get it along the axis as shown in the example.   Thank you.


Is it possible to link file to an output of command line?

I want to create symlink, or a pipe, or something else that could be used in lieu of a file. I want that pseudo-file to execute a command and output of that command should become the contents of that file  Something like this (not actual command):  ln -s `ssh x@y cat /etc/z.conf` /etc/z.conf   Basically, so that when you cat /etc/z.conf, it would run ssh x@y cat /etc/z.conf and connect the stdout pipe to the file handle. I would imagine, it's possible to do in a c program, but I was wondering if this could be done using command line tools only.  NOTE: I an NOT looking for a way to alias a command. I want this to look like a file, such as for example: when I run a service which reads /etc/z.conf, it would read the contents of this file transparently to itself. Also: simply copying the file is not an acceptable solution


How can we compute this quantity, constructed using motivation from Vandermonde's identity?

states that $$ \sum_{k=0}^{r} {m \choose k}{n \choose r-k} = {m+n \choose r} $$ I wonder if we can use this formula or otherwise to calculate: $$ \sum_{k=0}^{r}k^l {m \choose k}{n \choose r-k}, l \in \mathbb{N} ?$$ or if not,  at least when $l=1,$ namely: $$ \sum_{k=0}^{r}k {m \choose k}{n \choose r-k}?$$ I'd appreciate the relevant calculations or some links where I can find the above?


Can I travel from India to USA through Heathrow airport?

I want to travel to USA from India through Heathrow (UK) airport. When I travelled to USA from India on H4 visa. After that I got H1 approval and my change of status changed to H1. Then I returned back to India and now my H1 has expired. If I want to travel to USA through Heathrow, is it possible or will I have any problems regarding change of status or not?


How to install software that "Requires installation of untrusted packages"?

I am using Ubuntu 12.10.  When I try to update the software, it shows me this error:   Requires installation of untrusted packages This requires installing packages from unauthenticated sources. Details  kalzium-data kanagram kate-data kde-l10n-engb kde-l10n-zhcn kde-runtime-data kdegames-data klettres-data libakonadi-kabc4 liblxc0 libwildmidi-config libwildmidi1 lxc marble-data nepomuk-core-data parley-data tomboy


How do I install VMware player on a Mac os X?

I went to their site, and downloaded a .bundle which automagically turned into a .txt file after downloading.   Long story short, I can't run the txt file because I guess Mountain Lion Mac os X isn't a strict Linux box and is missing some core components to do that type of installation.  Does anyone know how to install VMware?


I have just installed Ubuntu on a VmWare virtual machine.  IT wants me to login to finish installation, but I do not remember ever creating an account, so I have no idea how to login!    I have tried user ubuntu with no password (and various passwords for root).


How do I apply modifiers and other changes in 2.90?

I'm using 2.90, and going through a tutorial to create a couch on youtube. I've added a mirror modifier, 2 arrays, and a subdiv. How do I apply those modifiers so it completes those operations on the mesh? I don't see an Apply button anywhere, and have looked up 'Apply' in the doc with no answer. Is there a hotkey other than Ctrl-A?


Usually my layers tab appears in the area of the red circle, but I did something that changed it. I would like to know how to get it back. Thanks!


Minimal of Ring Theory for Field/Galois theory.

I am an undergraduate in my last semester, and due to bureaucratic reasons I couldn't take a course in Ring Theory until now. Again, for bureaucracy, I had to enroll in a course in Field theory and Galois theory this quarter, and I will be taking the Rings course in the next one. Not the ideal situation, I know, but that's how things ended up being and I won't be able to change the order in which I will take the courses (I tried to). So, I need to know what's the basic results of Ring theory I should be at least know to enunciate/or know the proofs in order to follow this course in field theory, as I listened that it is a very deep subject and I'm concerned about my ability to survive it. I didn't took the course in Ring theory but studied something by myself in the last month, so I know the language of homomorphisms, polynomial rings and the abstract Chinese Remainder Theorem, but I would like to know what exactly is demanded. Also, which book is a good reference to study field theory in a first course, given the present situation?


How do I get horizontal lines to the left and right of a heading in Microsoft word?

In Word 2007 I want to put a heading in the center of a line with a horizontal line to the left and to the right of the text.  The line must not cross through the text. I have tried using autoshapes and lines - but then the lines move each time I press Enter or ← Backspace and I have to put them in place again manually.  At Borders and Shading there is an "Insert horizontal line" option, but this gives me a solid line from the left to the right of the page and I cannot insert text anywhere on it or in it.    The final product should look something like this:     -------------------------  Heading -------------------------


I am given the information that $ \vec{u} = \langle 1, 1/2 \rangle$ and $\vec{v} = \langle 2,3 \rangle$.   There are a few pieces I am asked to find, and these are the one I am having trouble with:   $\left\Vert \large \frac{\vec{u}}{|| \vec{u}||}\right\Vert$  The magnitude of vector u is $ \sqrt{5}/2$, of which I correctly calculated; the unit vector is then $ \langle \large \frac{2 \sqrt{5}}{5}, \frac{ \sqrt{5}}{5} \rangle$. However, when I go to find the magnitude of the unit vector, I get $ \sqrt \frac{3}{5}$, which is clearly not one. What did I do wrong?


I am an Indian travelling from India to Cayman Islands via Dubai and US.  I have a valid Cayman islands work permit. I have a layover in Newyork / Miami for around 5 hrs maximum. Should I need a transit visa to transit US or if I have a dubai visa, is it enough to transit US and reach Cayman islands?  if so what is the best alternative option to reach cayman islands without taking a US visa?


Outlier detection in high dimensional data

I am looking to clean up a large data set (~300) with a large number of features (~140).  I would like to explore outliers in the data.  My first thought was to use PCA to reduce these features to a few components that explain most of the variance, and then exclude outliers of these new n factors.  However, there are a few issues with this approach.  The first is that PCA is affected by outliers itself.  Robust PCA may be a good alternative here?  The second issue is that some of the variables I would like to partial out, like age, sex, etc..., but not remove data based on these.  I would like to control for them first, and then apply some outlier detection on the result.  Does it makes sense to partial these out first, and then apply a robust PCA outlier analysis on the results of that?


I have this figure in Excel that I want to replicate in LaTeX.    So far, I have these.    Can anyone help me to get as close as possible to the first figure please? Also, I want to add a legend to the error bars to let the reader know its magnitude.  My MWE:  \documentclass[11pt,paper=a4,BCOR=15mm,bibliography=totoc,DIV=9,final,headings=optiontohead, listof=chaptergapsmall,listof=totoc,numbers=noenddot,openright,parskip=half,titlepage,twoside,]{scrreprt} \usepackage[ngerman,english,]{babel}  \usepackage[onehalfspacing]{setspace}        \usepackage{graphicx} \usepackage{tikz,pgfplots} \usetikzlibrary{intersections, calc} \usepgfplotslibrary{units}   \begin{document}  \begin{figure}[h!] \centering \begin{tikzpicture} [scale=1.23] \begin{axis}[       ybar,         bar width=7pt,         xtick={1,...,9},     ylabel= y values,     xlabel=y values,     enlargelimits=0.05,     ybar interval=0.7,     %       x unit=-,     %       y unit=\si{\frac{kg}{h}},      ]    \addplot     coordinates {(1,4473.317111) (2,7394.47646) (3,6886.499957)      (4,9836.193336) (5,8098.401475) (6,8308.855452) (7,9983.205801)      (8,7617.506648) (9,9617.462814)}; \addplot+[error bars/.cd, y dir=both,y explicit]     coordinates {(1,4342.7395) +- (0,0.05)                 (2,7381.3423) +- (0,0.05)                 (3,6837.375) +- (0,0.05)                 (4,9964.5747) +- (0,0.05)                 (5,7624.083) +- (0,0.05)                 (6,7843.0192) +- (0,0.05)                 (7,9665.1374) +- (0,0.05)                 (8,7266.0779) +- (0,0.05)                 (9,9393.7355) +- (0,0.05)                 }; \legend{x data,y values} \end{axis} \end{tikzpicture} \caption{Figure Caption} \label{fig:plot1} \end{figure}  \end{document}


i am trying to read / understand the book: Introduction to the modern theory of dynamic systems, hassleblatt boris and katok anatole.  On page 28 there is an excercise which I am trying to solve but have no clue how it would work. I guess it is not very hard but I'm not getting any further.  I hope someone can help me.  1.3.1 Exercise: Prove that the decimal expansion of the number $2^n$ may begin with any finite combination of digits.


Can Newton's second law for rotation be derived from Newton's second law for translation?

I am referring to the :  $\vec{\tau}=I \vec{\alpha}$  Which obviously is the analogue for Newton's second law for translation  $\vec{F}=M \vec{a}$  I wonder whether the rotation law can be derived from transnational one? If yes, how can we do it?


How does up/downvoting work exactly in terms of reputation and do some users have greater ability to affect ones reputation?

I'm really confused on voting.  Based on the link below I am assuming that comments do not affect reputation.  Can administrators or more "powerful" users for lack of a better term affect a user's reputation more than "regular" users?  Is there a way to see which user(s) is giving me upvotes and downvotes?  Is there a way to file a complaint if you think somebody is targeting you due to racism, bigotry, etc.? What is the mechanism for this?  I started in the SciFi and fantasy community, then joined Android and received an additional 100 points in both Android and SciFi. I did not receive an additional 100 points in SciFi when I joined META, although it states in the link below in the comments that I should for each time I join a community. Why didn't I receive an additional 100 points in SciFi again?  I edited my question based on the link below. If there are other links I should check out that'd be great.


Creating square buffer around point feature using ArcGIS for Desktop?

I would like to create a square buffer from a point feature but I do not understand the code that goes into it.   Similar questions have been asked on the forums.esri website but that was over 10 years ago, and it did not work when I tried the code.  How do I create a square buffer from a point feature?


Hibernate: Automatically creating/updating the db tables based on entity classes

I have the following entity class (in Groovy):  import javax.persistence.Entity import javax.persistence.Id import javax.persistence.GeneratedValue import javax.persistence.GenerationType  @Entity public class ServerNode {    @Id   @GeneratedValue(strategy = GenerationType.AUTO)   Long id    String firstName   String lastName  }   and my persistence.xml:  <?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="1.0">     <persistence-unit name="NewPersistenceUnit">         <provider>org.hibernate.ejb.HibernatePersistence</provider>         <properties>             <property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/Icarus"/>             <property name="hibernate.connection.driver_class" value="com.mysql.jdbc.Driver"/>             <property name="hibernate.connection.username" value="root"/>             <property name="hibernate.connection.password" value=""/>             <property name="hibernate.archive.autodetection" value="class"/>             <property name="hibernate.show_sql" value="true"/>             <property name="hibernate.format_sql" value="true"/>             <property name="hbm2ddl.auto" value="create"/>         </properties>         <class>net.interaxia.icarus.data.models.ServerNode</class>     </persistence-unit> </persistence>   and the script:  import javax.persistence.EntityManager import javax.persistence.EntityManagerFactory import javax.persistence.Persistence import net.interaxia.icarus.data.models.ServerNode  def factory = Persistence.createEntityManagerFactory("NewPersistenceUnit") def manager = factory.createEntityManager()  manager.getTransaction().begin()  manager.persist new ServerNode(firstName: "Test", lastName: "Server")  manager.getTransaction().commit()   the database Icarus exists, but currently has no tables. I would like Hibernate to automatically create and/or update the tables based on the entity classes. How would I accomplish this?


I have to prove the following:      Given $a_1,\dots ,a_n\in V$, the set $W$ of all linear combinations of $a_1,\dots ,a_n$ is a subspace of $V$.   I'm having a little bit of trouble because the two notions seems to be the same, but I guess the solution is as follows:    From the definition of vector space, for each $a,b\in V$, $a+b\in V$ and $\alpha a\in V$.  Then for all $\alpha_1,\alpha_2, \dots \alpha_n $ we have $\alpha_1 a_1+ \alpha_2a_2+ \dots \alpha_na_n \in V $ as a consequence of successive aplications of $1$ and we have $\alpha_1 a_1+ \alpha_2a_2+ \dots \alpha_na_n\in W$ by definition. From this, we obtain that $V=W$ and hence, as $V$ is a subspace of $V$, then $V$ is a subspace of $W$.    Is my proof correct?


How to calculate this product: $\sin 1^\circ\times\sin 2^\circ\times\cdots\times\sin90^\circ$

How to calculate this product: $$\sin 1^\circ\times\sin 2^\circ\times\cdots\times\sin90^\circ$$