I'm investigating the Basel Problem, and the sum to consider is:  $\dfrac{1}{1^2}+\dfrac{1}{2^2}+...+\dfrac{1}{n^2}$  How can I show this converges? Using graphs/computer software is also fine, but how would I do it? Is there a way using calculus?  I've looked on Google for a while and I found a few proofs, but I didn't understand any of them.

I can prove this sum has a constant upper bound like this: $$\sum_{k=1}^n \frac1{k ^ 2} \lt 1 + \sum_{k=2}^n \frac 1  {k (k - 1)} = 2 - \frac 1 n \lt 2$$ And computer calculation shows that sum seems to converge to 1.6449.  But I still want to know:  Does this sum converge? Is there a name of this sum (or the series $\frac{1}{k^2} $)?


Suppose there is a train moving right with constant acceleration and there is a butterfly inside the train which moves opposite to direction of motion of train i.e. towards left. The butterfly always moves with constant velocity outside the train.  Does the butterfly retard or accelerate inside the train due to acceleration of train or does it move with constant velocity easily? Please explain.

A fly is flying around in a car, the fly never touches any surface in the car only fly’s around in the air inside the car. The car accelerates. does the fly slam in to the rear window. or does the fly continue to fly uninterrupted?


OK. So I have sinned and here I am at the confessional.  Yes, the mods wern't too happy about it but I made a suggestion to one mod. How about pulling in all my various accounts under this IP and rolling them into one. It's a pain not having the back-log of questions I can refer to if there are things that I'd like to go back and look at without accidentally duping questions.  Or is this too much to ask. The mod in question suggested it could be a 'good' idea.  Any pointers?

I accidentally posted a question without being logged in. Is there a way to associate that question with my account?   For more information, visit "" in the .   a.k.a. How can you link a registered account to a cookie-based account? a.k.a. How do I merge an unregistered account with a registered account a.k.a. Merging users a.k.a. How do I associate anonymous questions I’ve asked with my registered account? a.k.a. Is there a way to claim an unregistered user? (in case anyone searches with those terms)


I got Ubuntu 18.04.3 installed on my laptop, but the tech that did it for me forgot the password he used!  Because of travel, I cannot let him sort out the problem; I have to do it myself, as I need the laptop.  How do find out what password he used or how can I reset it?  I have found official instruction for it online that simply don't work - they lead to different screens and possibilities than those described.  I  am more confused than ever.  Can some one help me?  I am NOT a tech, but I can open a terminal, so  please do not assume I know any more than that.

I'm working on a Ubuntu system, and my client has completely forgotten his administrative password. He doesn't even remember entering one; however it is there.  I've tried the suggestions on the website, and I have been unsuccessful in deleting the password so that I can download applets required for running some files. Is there a solution?


Given $a>0$ prove that $\lim a^{1/n} =1$.  One of my tries was to find a number $N \in R / |a^{1/n}-1|< \epsilon, \forall n\ge N$ so I started by $|a^{1/N}-1|< \epsilon$ then separated the inequality for $a>1$ and then I got $a^{1/N}-1<\epsilon$, then $1/N<log_a(\epsilon -1)$, then I was trying to find a way to make sure that $log_a(\epsilon -1)> 0$ but I couldn't.

if $a>1$, Prove that $\lim a^{1\over n}=1$ Is the result true if $0<a\le1 ?$  My attempt :  let $a^{1/n}=1+h$, then $a=1+nh+\frac{n(n-1)h^2}{2}+\dots+h^n$  so, $a>\frac{n(n-1)h^2}{2}$  or, $|h|<\sqrt{\frac{2a}{n}}$  for given $\epsilon>0$  $|a^{1/n}-1|=|h|<\sqrt{\frac{2a}{n}}<\epsilon$  i.e $n>\frac{2a}{\epsilon^2}$  Hence we can find a suitable  $m$ for all $a>0$  Is it correct ?


While this is a straightforward result which follows almost immediately from Lagrange's theorem (by considering the subgroup generated by $\langle g\rangle $), is there any way this can be proven without using Lagrange or any other theorem which derives from it?  One approach I thought of is that if it can be proven that for $ g \in G$ we have $ g^{|G|} = e$ then the result follows as $ g^n = e \iff o(g) \mid n $ , but I've had no success going down this line of attack.  While I have no idea if it is possible to do so, I suspect it is as it's from a past paper question which says we can't use Lagrange's theorem or the Orbit-Stabiliser theorem to prove the result without proving these beforehand. If the result could only be deduced from Lagrange, then I would assume the question would first ask for a proof of it and then have this as a corollary.

This is a very easy fact we use in Group Theory,  But somehow, I wondered that whether there may be another way (other than Lagrange's Theorem) to prove that the order of an element divides the order of Group.  I attempted to go on the term "exponent" of the Group (just assume that G is a Finite Group), which we may define the least common multiple of orders of elements in G. But this exponent divides $|G|$, since the order of each element divides $|G|$. So it became a little paradox.   Shall I think that; before teaching this fact in a Course, one should teach about Lagrange's first?


I was asked to do a large banner with the size of 46in x 81in and the only other information I was given with this project is that it would be printed at 300dpi.    What size and resolution document should I produce and how did you calculate this?  What type of information should I request the next time I am designing for a large print? This image will include a collection of multiple smaller raster images, whats a good way to make them look good blown up?   Edit: I apologize for not being very clear. I guess my question is if I am producing an image that needs to fit on a 46x81 space should I be designing an image that is 46x81 or a smaller image that matches same aspect ratio?

For wall-sized graphics and large banners (e.g. 3m × 5m), what is an acceptable PPI for print? As I understand it 300 ppi is the typical for 'small' artworks (esp. for clean text resolution). However, for small artworks, the audience usually engages at a much closer distance. Therefore, in the interests of keeping a bitmap file down to a reasonable size, can you get away with a much-reduced PPI for a large format/banner print?


I am using Lenovo Thinkpad E430.  I have installed Windows 8.1 Pro 64 bit   My battery charges up to 46%, and then it is showing "plugged in, but not charging".  I tried many possibilities.  1. Uninstalled AC Adapter control  2. Removed battery for some time 3. Shutdown, Connected AC adapter, Uninstall AC Adapter control, Connect Battery 4. Reset Gauge on energy management (It takes long time to reset).   But these did not fix the problem.  Can some one point out the solutions for this one?

My 1.5 year old Dell Studio 15 notebook computer has a battery and I keep it attached to the notebook but 98% of the time I just plug in the power adapter.  Lately when I unplugged the power adapter, the battery was only good for 10 minutes, and a few days ago, when I unplugged the power adapter, the computer simply turned off.  When clicking on the battery icon on Win 7, it says "Plugged in, not charging":    is the battery dead?  Or can Windows 7 have any option to not charge the battery?  It is a Dell Studio 15, I wonder if in such case, it looks like it can be a manufacture's defect, would Dell replace the battery? (if there was a recall, then they probably would, i think).  The notebook is 1.5 year old.


This is class file code to like and count photo likes. I'm getting null pointer exception      //likes counter      firebaseFirestore.collection("Posts/" + blogPostId + "/Likes").addSnapshotListener(new EventListener<QuerySnapshot>() {         @Override         public void onEvent(QuerySnapshot documentSnapshots, FirebaseFirestoreException e) {              if (!documentSnapshots.isEmpty()){                  int count = documentSnapshots.size();                 holder.updateLikesCount(count);              }else{                  holder.updateLikesCount(0);              }          }     });   This is Logcat Details :   Process: com.example.suraj.photoblog, PID: 24823     java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.google.firebase.firestore.QuerySnapshot.isEmpty()' on a null object reference         at com.example.suraj.photoblog.BlogRecyclerAdapter$1.onEvent(BlogRecyclerAdapter.java:107)         at com.example.suraj.photoblog.BlogRecyclerAdapter$1.onEvent(BlogRecyclerAdapter.java:103)         at com.google.firebase.firestore.zzi.onEvent(Unknown Source)         at com.google.android.gms.internal.zzevc.zza(Unknown Source)         at com.google.android.gms.internal.zzevd.run(Unknown Source)         at android.os.Handler.handleCallback(Handler.java:742)         at android.os.Handler.dispatchMessage(Handler.java:95)         at android.os.Looper.loop(Looper.java:157)         at android.app.ActivityThread.main(ActivityThread.java:5601)         at java.lang.reflect.Method.invoke(Native Method)         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:774)         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:652)

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


How to find the limit $\lim_{x\to 1^-}\prod_{n=0}^\infty( \frac{1+x^{n+1}}{1+x^n})^{x^n}$?   At first glance, I invoke Bernoulli inequality to estimate the power $x^n$ as $1+n(x-1)\leq x^n\leq 1$. Then we can find some cancellations. However, $1+n(x-1)$ seems to be rough...

Compute : $$L=\lim_{x\to 1^-} \left(\prod_{n=0}^{\infty} \left(\frac {1+x^{n+1}}{1+x^n}\right)^{x^n}\right)$$   My try:   Writing out the first few terms I noticed that the limit can be expressed as $$L=\lim_{x\to 1^-} \frac 12\left(\prod_{n=1}^{\infty} (1+x^n)^{x^{n-1} -x^n}\right)$$ $$L=\frac 12\lim_{x\to 1^-} \left(\prod_{n=1}^{\infty} (1+x^n)^{x^{n-1}}\right)^{1-x}$$  Converting to exponential form I get $$L=\frac 12 \exp {\left(\lim_{x\to 1^-} (1-x)\sum_{n=1}^{\infty} \left(x^{n-1}\ln(1+x^n)\right)\right)}$$  And got stuck here. I did try to use approximation $\ln x\sim x$ hereon to get final answer as $\frac {\sqrt e}{2}$ but I think it was improper to use approximation and hence I believe that the answer I got is flawed. I also noticed that the form I obtained is quite similar to be used for a Riemann Sum but I didn't get a way to tackle the problem using that way.  Can someone please help me with this problem....


Following c++ code compiles using g++.  I'm a bit curious about how name a is resolve in the constructor  #include <cstdio>  struct A {   A(int a) : a(a) { };   const int a; };  int main() {   A a(10);   printf("%d\n", a.a);   return 0; }

class C {   T a; public:   C(T a): a(a) {;} };   Is it legal?


Are some weaker attacks better due to speed and less power up required to use them? For instance a 50 attack with 2 short power up bars compared to a 60 attack with one long power up bar. Anyone have any insight here?

I have two Pidgeot. One has a special attack of 25 with 4 blue bars, and the other has a special attack of 60 with one blue bar.  I assume the blue bars are the number of times you can use that attack when it is fully charged, so the 25 deals 100 damage and the other only 60?  Which is better, weaker attacks you can use more often or stronger attacks you can use less often?


I need a book that's beneficial for me and not something that contains what i have already read.  I have a strong maths,physics background and I have good c++ programming skills  and i  want to start game programming in 2d because after a lot of research on net people recommend not to jump in 3d directly.  Also I don't want to study from online tutorials like those in SFML because there is lot of knowledge scattered on the net but what i want to study from a good book because in the book all knowledge is in one place   I have also done research that books like Beginning 2d game programming by Charles Kelly,Game Engine Architechture,Game Coding Complete,Advanced 2d game development by Jonathan Harbour are all good But I can Only Buy one at the moment and i already know c++,physics and maths pretty well (dont know graphics though) so which one is the right one for me. So please guide me Thank You

Let's make a list of the best books that every game developer should read.  Each answer should have a single book (by title and optionally author), a link to buy the book, and a short synopsis of what the book is about.


I am running a web server on a machine with Ubuntu 11. Everything is accessible from the local network, but not from outside. What can I do to check to make sure the appropriate ports are open?  I am relatively new to Ubuntu and server management, so any "dumbing down" is just fine.  Appreciate any help.  Google search hasn't given me much actionable advice.

I would like to see what ports are open on my machine, e.g. what ports my machine is listening on. E.g. port 80 if I have installed a web server, and so on.  Is there any command for this?


I am trying to create an environment specifically for C-code, but when I compile the document below, LaTeX just hangs. I'm running MiKTeX 2.9 if that matters. Is lstlistings one of those environments (as explained ,  and ) for which this is impossible?  \documentclass{article}     \usepackage{listings}      \newenvironment{ccode}{\begin{lstlisting}[language = C]}{\end{lstlisting}}  \begin{document}  \begin{lstlisting}[language = C] printf("Hello, world!\n"); \end{lstlisting}  %\begin{ccode} %printf("Hello, world!\n"); %\end{ccode}  \end{document}

I am trying to define an enviroment for a specific programming language, F#. Here's my code:  \definecolor{bluekeywords}{rgb}{0.13,0.13,1} \definecolor{greencomments}{rgb}{0,0.5,0} \definecolor{turqusnumbers}{rgb}{0.17,0.57,0.69} \definecolor{redstrings}{rgb}{0.5,0,0}  \lstdefinelanguage{FSharp}     {morekeywords={let, new, match, with, rec, open, module, namespace, type, of, member, and, for, in, do, begin, end, fun, function, try, mutable, if, then, else},     keywordstyle=\color{bluekeywords},     sensitive=false,     morecomment=[l][\color{greencomments}]{///},     morecomment=[l][\color{greencomments}]{//},     morecomment=[s][\color{greencomments}]{{(*}{*)}},     morestring=[b]",     stringstyle=\color{redstrings}     }  \newenvironment{fslisting}   {     \lstset{         language=FSharp,         basicstyle=\ttfamily,         breaklines=true,         columns=fullflexible}     \begin{lstlisting}   }   {     \end{lstlisting}   }   Then I'm trying to use it as such:  \begin{fslisting} type 'a Process = 'a Signal IObservable \end{fslisting}   But it doesn't work. The output log says that the listing is not terminated - or is terminated by the document. So the rest of the document is also formatted as a listing, which is of course not the intention.  What am I doing wrong here?


What is the difference between this (a 'standalone' function): function standaloneFunction () {     console.log('standaloneFunction runs, success') }  standaloneFunction()   ...and this (a function inside a variable):  let variableFunction = function variableFunction () {     console.log('function inside let has same name as the variable, runs? - yep, does.')  }  variableFunction()   Is it a problem that the variable and the function share the same name? it doesnt seem so - i speculate this is because it has something to do how variables and functions are saved in memory? Functions in their entirety, and variables only their declaration? When i do console.log(this), i can't find the 'variableFunction' in the execution context of 'this' - however, 'standaloneFunction' does appear. Have you, as a beginner, also asked yourself such questions? Am i being too picky about such details? Should i already use es6 syntax? Please also don't hold back with any advice regarding articulating my question. Thanks to everyone who has taken their time to read this.

I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent.  The previous developer used two ways of declaring functions and I can't work out if there is a reason behind it or not.  The two ways are:  var functionOne = function() {     // Some code };     function functionTwo() {     // Some code }   What are the reasons for using these two different methods and what are the pros and cons of each? Is there anything that can be done with one method that can't be done with the other?


I created a script to run my react build on port 5555  and on running it, I get  I want to quit this process without killing the server. How can I do it? Output with &

I am new to Ubuntu. I have used Sublime Text. I have realized that after I open Sublime Text from the Terminal, if I close the terminal the application  keeps running. The same isn't true for other applications like geany.   After I open the application from terminal, when I close the terminal the application also closes. I have tried &exit like geany &exit. But this isn't what I am looking for.   How can I keep geany running even after I close it?


I want to copy and paste a small code snippet from OneNote into an answer.  I have done this dozens of times, but today when I attempt it, the window thinks I want to paste in an image or a link.  I just want a simple copy and paste of text.  How do I convince it that's all I want? In response to comments: I am working on a Windows 10 machine using Firefox.  Also, several people have pointed to another similar question.  However, the answer there did not help me with my issue.

Steps to reproduce:   Write something in  Copy that text Try pasting in Stack Overflow It opens the image upload dialog box (Example: )   PS: I tried pasting the same in the  editor, and it pasted the text properly.  OS Version: Windows 10  I tested and replicated it on the following two browsers:   Chrome: Version 77.0.3865.90 (Official Build) (64-bit) Edge: Microsoft Edge 42.17134.1.0


I am traveling from Madrid, Spain to Brisbane, Australia with Emirates Airline with a 3 hour transit in Dubai. I am on a Fiji passport and wanted to know if a transit visa will be required for Dubai for this short layover. I do not plan on leaving the airport.

Do I need a transit visa for a layover via airports in the UAE, such as Dubai International Airport or Abu Dhabi International Airport? If so, what are the requirements for such a visa? Can I get the transit visa on arrival?


What is a good way to create blank space (preferably, underlined -- it is to be filled in by hand when document is printed) that takes up all the remaining space on a line. The blank space may appear at the beginning, in the middle or at the end of the line; it may also occupy the whole line.  I would appreciate a solution that survives changing the font and font size of surrounding text, as well as the size of page and page margins.  UPDATE: I am looking for a solution with Knuth's TeX and plain TeX.  UPDATE 2: I find egreg's  a good one. However, in this case it would be very convenient if blanks can be broken across lines (automatically, of course) in cases where the blank is too long to fit on current line and has to be broken up either because it is longer than the line or because text on that line is too short and would result in an underfull box if left alone.  UPDATE 3:  Types of fill-in blanks I need:  1) unbreakable blanks of a specified fixed length; (egreg already provided an elegant solution to this case )  2) breakable blanks of a specified fixed length;  3) breakable blanks no shorter than a specified minimum length. These are the same as type 2 blanks except that the last part of a broken blank (or the whole blank when it is not broken) should expand and take up all the available space on its line (like \hrulefill).

I am preparing some lecture notes/slides and would like to efficiently create two versions of the output: a complete version for myself, and a version for my students with certain text replaced with blanks or an empty box so that they can fill it in during lectures.  the \underline{\phantom{text}} command does the trick, but it would be time consuming to create a separate version of the document and insert this in all the relevant places.  How can one use macros to give us the ability to easily toggle between the teacher version (with full text) and student version (with blanks)?  I was going to post this as a question but then figured it out so thought I'd share it.


I recently activated my 2007 physical copy of Supreme Commander on Steam that has been installed via disk since that time. It gave me access to Supreme Commander AND Forged Alliance (yay free game! :D) but according to Steam I have to re-download and re-install SupCom, even though it is already installed.  Is there a way to move the original game files around such that Steam knows it's installed? Yes, I know I can uninstall the already installed copy and re-download it but I'd like to avoid that if I can.

Let's say I have a game bought on retail/other digital download and installed on my hard drive. I buy the same game (or a minor variant of it, say the GOTY edition) on Steam. It should be possible to use the existing installation to avoid the generally big downloads. This is very useful as it saves both bandwidth and time.   Previously, as far as I understood, Steam downloaded the game files directly to steam\steamapps\common\<game_name>. Since this folder would be created on starting the download, pausing and closing steam, copying the game files to this folder and then validating game files would make Steam absorb as much as possible and just download the missing files.  Currently, Steam downloads the files to steam\steamapps\downloading\<game_id> and then moves them over to the aforementioned folder once the download finishes. So first of all, what the final folder would be is not clear. So what would be the correct way of doing the same thing, that is, make steam use as much of the existing files as possible? Should the files be copied to downloading\*\, or should I figure out the actual folder (say via googling) and copy the files to steamapps\common\*\?  More specifically, I had a retail copy of Arkham City installed and I just bought the GOTY version on Steam. Now I tried both of the above things, in either case, the validating does not seem to do anything. Assuming I have the correct folder name steamapps\common\Batman Arkham City GOTY, according to , if I copy the files there, Steam seems to just continue with its 17GB download. If I copy it to steamapps\downloading\200260 then the download keeps stopping every few seconds with "Disk Write Error" after modifying 1 or 2 files, and I have to keep hitting resume.


EDIT: Rounding dataframe float values solves this: value_float2 = 6.3 df_float3 = df[(df['D'].round(1) == value_float2)]        A      B  C    D 3  bar  three  3  6.3  Original Question I'm trying to locate specific row for a unique value under a specific column. The problem is that I'm getting Empty Dataframe under some of the float values. Example dataframe: df = pd.DataFrame({'A': 'foo bar foo bar foo bar f foo'.split(),                'B': 'one one two three two two one three'.split(),                'C': np.arange(8), 'D': np.arange(8) * 2.1})  Which gets me:   A      B  C     D 0  foo    one  0   0.0 1  bar    one  1   2.1 2  foo    two  2   4.2 3  bar  three  3   6.3 4  foo    two  4   8.4 5  bar    two  5  10.5 6    f    one  6  12.6 7  foo  three  7  14.7  When I'm looking for value 2.1 in D column, I'm getting the correct row: value_float1 = 2.1 df_float1 = df[(df['D'] == value_float1)]       A    B  C    D 1  bar  one  1  2.1  But for a different float value, for example 6.3, I'm getting an empty dataframe: value_float2 = 6.3 df_float2 = df[(df['D'] == value_float2)]  Empty DataFrame Columns: [A, B, C, D] Index: []  Can anyone help me to fix it, or at least explain what is happening? It happens for 12.6 and 14.7 as well.

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


In this method I am comparing String elements alphabetically. In other words, if an element in a ArrayList is alphabetically bigger than the minimum String (parameter in the method) and is smaller than the maximum String (also parameter) then this String element should be removed from the ArrayList.   However, after running the method there are no Strings returned, not even those which should stay after the method call. In addition, when the IF condition is not satisfied, it printed out "Error" without returning the list.   import java.util.ArrayList;  public class Main {      public static ArrayList<String> removeInRange(ArrayList<String> list, String beginning, String ending)     {          for (int i = 0; i<list.size(); i++)         {             if (list.get(i).compareTo(beginning)> 0 && list.get(i).compareTo(ending)< 0)             {                 list.remove(list.get(i));             }              else {                  System.out.println("Error");             }         } return list;     }      public static void main(String[] args) {          ArrayList<String> list = new ArrayList<>();         list.add("h");         list.add("e");         list.add("x");          removeInRange(list, "a", "k");      } }

I want to filter a java.util.Collection based on a predicate.


I have used the following configuration according the data sheet FOSC/32, 12 TAD I still get cross talk, I'm using 3 ADC Channels with USB, and When I use one Channel, other channels get affected I mean they get readings too.  unsigned int ADC_read_implementation(int channel){     unsigned int adval = 0;     ADCON2.B7 = 1; //results right justified     ADCON2.B0 = 0;     ADCON2.B1 = 1;     ADCON2.B2 = 1;        ADCON2.B3 = 1;     ADCON2.B4 = 1;     ADCON2.B5 = 1;      ADCON1 = 0x05;     if ( channel == 1 )     {       ADCON0.CHS0 = 0x1;       ADCON0.CHS2 = 0x0;       ADCON0.CHS1 = 0x0;       ADCON0.CHS3 = 0x0;     }     else if (channel == 8)     {       ADCON0.CHS0 = 0x0;       ADCON0.CHS2 = 0x0;       ADCON0.CHS1 = 0x0;       ADCON0.CHS3 = 0x1;     }     else     {       ADCON0.CHS0 = 0x1;       ADCON0.CHS2 = 0x0;       ADCON0.CHS1 = 0x0;       ADCON0.CHS3 = 0x1;     }     ADCON0.B0 = 1; //turn on ADC     Delay_ms(10);     ADCON0.GO_DONE = 1;     while(ADCON0.GO_DONE == 1);     adval = (ADRESH << 8) + ADRESL;     return adval; }  Crystal used is 4MHz

I'm using PIC18F2458 as USB Joystick HID. The program works, but I have few problems. Right now, The USB is not detected If I write less than 5 values ( Throttle, X,Y, 4 buttons). The current problem is If I'm using an analog sensor for the throttle, other axis x,y getting read too, because they are going to be read from analog input and of course there is noise, so whenever I use a rotary resistor on the throttle usb input, I get other axis written too. How can I fix that issue ? second issue how would I add two throttle for the usb descriptor ? Here is the current code: unsigned int average(int channel) {  int samples = 16;  unsigned int sum = 0;  int i;  for (i = 0; i < samples; i++)  {        sum+=(Adc_Read(channel)>>2)-128;  }  sum = sum/16;  return sum; }  void analogo() {      usb[0] = average(1);   // Get 10-bit results of AD conversion     usb[1] = average(9);     usb[2] = average(8); }  void main(void){                               // Disable comparators   ADCON1  = 0x05;                         // Configure all ports with analog function as digital  TRISA.RA1 =1;  TRISB.RB2=1;  TRISB.RB3 =1;    HID_Enable(&readbuff,&writebuff);       // Enable HID communication   //vl6180x_configure();    while(1){   analogo();   USB_Polling_Proc();      writebuff[0]=usb[0];         // throttle     writebuff[1]=usb[1];        // X axis     writebuff[2]=usb[2];        // Y  axis     writebuff[3]=0xFF;        //button  0xFF     writebuff[4]=0xFF;        //button POV 0xFF        HID_Write(&writebuff,5);      }  }  and the Descriptor const struct {   char report[USB_HID_RPT_SIZE]; } hid_rpt_desc =       {0x05, 0x01, // USAGE_PAGE (Generic Desktop)      0x15, 0x00, // LOGICAL_MINIMUM (0)      0x09, 0x04, // USAGE (Joystick)      0xA1, 0x01, // COLLECTION (Application)      0x05, 0x02, // USAGE_PAGE (Simulation Controls)      0x09, 0xBB, // USAGE (Throttle)      0x15, 0x00, // LOGICAL_MINIMUM (0)      0x26, 0xFF, 0x00, // LOGICAL_MAXIMUM (255)      0x75, 0x08, // REPORT_SIZE (8)      0x95, 0x01, // REPORT_COUNT (1)      0x81, 0x02, // INPUT (Data Var Abs)      0x05, 0x01, // USAGE_PAGE (Generic Desktop)      0x09, 0x01, // USAGE (Pointer)      0xA1, 0x00, // COLLECTION (Physical)      0x09, 0x30, // USAGE (X)      0x09, 0x31, // USAGE (Y)      0x95, 0x02, // REPORT_COUNT (2)      0x81, 0x02, // INPUT (Data Var Abs)}      0xC0, // END_COLLECTION      0x09, 0x39, // USAGE (Hat switch)      0x15, 0x00, // LOGICAL_MINIMUM (0)      0x25, 0x03, // LOGICAL_MAXIMUM (3)      0x35, 0x00, // PHYSICAL_MINIMUM (0)      0x46, 0x0E, 0x01, // PHYSICAL_MAXIMUM (270)      0x65, 0x14, // UNIT (Eng Rot:Angular Pos)      0x75, 0x04, // REPORT_SIZE (4)      0x95, 0x01, // REPORT_COUNT (1)      0x81, 0x02, // INPUT (Data Var Abs)      0x05, 0x09, // USAGE_PAGE (Button)      0x19, 0x01, // USAGE_MINIMUM (Button 1)      0x29, 0x0A, // USAGE_MAXIMUM (Button 10)       0x15, 0x00, // LOGICAL_MINIMUM (0)       0x25, 0x01, // LOGICAL_MAXIMUM (1)       0x75, 0x01, // REPORT_SIZE (1)       0x95, 0x0C, // REPORT_COUNT (12) 2 bits added to switch report count                   // so bytes are even. Bytes must be even.       0x55, 0x00, // UNIT_EXPONENT (0)       0x65, 0x00, // UNIT (None)       0x81, 0x02, // INPUT (Data Var Abs) 0xC0 // END_COLLECTION   };


I'd like to use my Raspberry Pi as a home print and scanner server. I successfully made it to half way, installed hplips and cups, we can print now from OSX, Windows, Ubuntu and Android, there's sane/saned and I can scan from the command line.  I'm wondering if there's a way to set it up so that when I push the scan button on my multifunctional device, it saves the scan with default settings and an incremental file name in a folder that's shared with samba.

I have an HP Deskjet with integrated scanner. It has a "Scan" button on its top, but this button does not interact with the xsane program on my Debian machine: To get a page scanned, I have to initiate the scanning process from xsane.  Is there a setting (or a scan program) that allows me to press the scan button and cause the program to scan a page?


I want to get a list of packages that I have installed using apt-get.  i.e. any packages that I have installed since my Linode (Debian) was initially created.  Is this possible?

I have tried searching for this but there seems to be no command that can output a list of packages (ideally in Ubuntu) that I have installed, not including any dependencies.


My question is basically in the title:     Does for every $d$-dimensional connected manifold $M$ exist a surjective continuous map $\phi:\Bbb R^d\to M$?   I first thought that in the case of Riemannian manifolds the  shall do the trick, but it might not be surjective, right? So if such a $\phi$ does not always exist, what are the weakest restrictions I need to make it exist, e.g. should $M$ be compact, differentiable, ...?

I want to know if we can get away with only having one set of coordinates for a manifold if we allow multiple coordinates to map to the same point.


How to construct a set $E \subseteq \mathbb{R}^n$ satisfying the following two conditions:  (i) $E$ is Lebesgue measurable;  (ii) $E$ is not a Borel set.  (Here a Borel set is a member of Borel $\sigma$-algebra, which is defined by the $\sigma$-algebra generated by the collection of all open sets in $\mathbb{R}^n$.)

I'm trying to find a set which is Lebesgue measurable but not Borel measurable.  So I was thinking of taking a Lebesgue set of measure zero and intersecting it with something so that the result is not Borel measurable.  Is this a good approach? Can someone give a hint what set I would take (so please no full answers, I want to find it myself in the end ;-))  Also, I seem to remember that to construct a non-Lebesgue measurable set one needs to use the axiom of choice. Is this also the case for non-Borel measurable sets?


I have a question about my trip to the USA.   I was born in the Netherlands and never changed citizenship. I've never had another passport than the Dutch one and I have never visited Iran nor lived there. I travelled to New York in 2016 on an ESTA and did not have any problems.   My question is - am I suitable for the ESTA Waiver Programme? I don't know if I hold the Iranian nationality because of my father's descent. Also, my father didn't sign me in the Iranian Consulate of the Netherlands that I was born. They only know that he has children, that's it.   UPDATE 20/02/2020: So I've mailed the CBP USA because I still was not a 100% sure. I explained them my situation as above and this is what I received.   You are eligible to apply for admission under the Visa Waiver Program (VWP) if you: • Intend to enter the United States for 90 days or less for business, pleasure or transit • Have a valid passport lawfully issued to you by a Visa Waiver Program country • Arrive via a Visa Waiver Program signatory carrier • Have a return or onward ticket  Just to want to let people know if they have a similair situation like me!

I am a British citizen and have dual nationality with Hong Kong but my father is Iranian. Does this mean I also have Iranian nationality? I've never held an Iranian passport or traveled to Iran and he has never informed the Iranian government of my existence.  I already had an ESTA to travel to US in December 2015 and it hasn't been revoked though I didn't put on the application that I was an Iranian national because I legitimately didn't think I was but this new law has made me double check. I'm going to the US again in May and was wondering if the US would consider me an Iranian national and therefore need a visa.   Edit 08/06/2016: Just wanted to update this since I hate it when I find a closed thread with no answer. I ended up going to the US without a visa and was allowed through with no problems. An uncle I was traveling with who is a British citizen but was born in Iran got a visa, and when he was going through customs and immigration was asked why he got a visa when he didn't need one! The officer said he would have been fine with just an approved ESTA...


My MWE is here     #!/bin/bash num=$(gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings | grep -oE '[0-9]+'|sort -rn|head -n 1) num=$((num + 1)) echo $num #gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "[<altered_list>]" #gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "[$key , $key $num]" key="/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom" list=$(gsettings get org.gnome.settings-daemon.plugins.media-keys custom-keybindings) newnum=$(echo "${list}" | grep -oE '[0-9]+' |sort -rn|head -n 1) echo $newnum sed -e "/]/${key}${newnum}/" ${list} #gsettings set org.gnome.settings-daemon.plugins.media-keys custom-keybindings "[$key , $key $num]" echo $key   I want to sed -e "/]/${key}${newnum}/" ${list} that means from -   ['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/']      I want to get     ['/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom2/', '/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom1/','/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom3/']   add a extra custom3 in the input.

I have a script that reads a text stream and generates a file of sed commands that is later run with sed -f. The generated sed commands are like:  s/cid:image002\.gif@01CC3D46\.926E77E0/https:\/\/mysite.com\/files\/1922/g s/cid:image003\.gif@01CC3D46\.926E77E0/https:\/\/mysite.com\/files\/1923/g s/cid:image004\.jpg@01CC3D46\.926E77E0/https:\/\/mysite.com\/files\/1924/g   Assume the script which generates the sed commands is something like:  while read cid fileid do     cidpat="$(echo $cid | sed -e s/\\./\\\\./g)"     echo 's/'"$cidpat"'/https:\/\/mysite.com\/files\/'"$fileid"'/g' >> sedscr done   How can I improve the script to ensure all regex metacharacters in the cid string are escaped and interpolated properly?


I need to install libsdl1.2-dev for doing some graphics, but it is not allowed.   The reason is:  Die folgenden Pakete haben unerfüllte Abhängigkeiten:  libsdl1.2-dev : Hängt ab von: libx11-dev soll aber nicht installiert werden                  Hängt ab von: libglu1-mesa-dev soll aber nicht installiert werden                  Hängt ab von: libpulse-dev soll aber nicht installiert werden                  Hängt ab von: libxt-dev soll aber nicht installiert werden                  Hängt ab von: libxext-dev soll aber nicht installiert werden E: Probleme können nicht korrigiert werden, Sie haben zurückgehaltene defekte Pakete.  Update: Einige Pakete konnten nicht installiert werden. Das kann bedeuten, dass Sie eine unmögliche Situation angefordert haben oder, wenn Sie die Unstable-Distribution verwenden, dass einige erforderliche Pakete noch nicht erstellt wurden oder Incoming noch nicht verlassen haben. Die folgenden Informationen helfen Ihnen vielleicht, die Situation zu lösen:  Die folgenden Pakete haben unerfüllte Abhängigkeiten:  libpulse-dev : Hängt ab von: libpulse0 (= 1:1.1-0ubuntu15) aber 1:1.1-0ubuntu15.4 soll installiert werden                 Hängt ab von: libpulse-mainloop-glib0 (= 1:1.1-0ubuntu15) aber 1:1.1-0ubuntu15.4 soll installiert werden                 Hängt ab von: libglib2.0-dev soll aber nicht installiert werden  libx11-dev : Hängt ab von: libx11-6 (= 2:1.4.99.1-0ubuntu2.1) aber 2:1.4.99.1-0ubuntu2.2 soll installiert werden               Empfiehlt: libx11-doc soll aber nicht installiert werden E: Probleme können nicht korrigiert werden, Sie haben zurückgehaltene defekte Pakete.   mp@ubuntu:~$ sudo apt-get install libsdl1.2-dev libx11-dev libglu1-mesa-dev libpulse-dev libxt-dev libxext-dev Paketlisten werden gelesen... Fertig Abhängigkeitsbaum wird aufgebaut        Statusinformationen werden eingelesen... Fertig Einige Pakete konnten nicht installiert werden. Das kann bedeuten, dass Sie eine unmögliche Situation angefordert haben oder, wenn Sie die Unstable-Distribution verwenden, dass einige erforderliche Pakete noch nicht erstellt wurden oder Incoming noch nicht verlassen haben. Die folgenden Informationen helfen Ihnen vielleicht, die Situation zu lösen:  Die folgenden Pakete haben unerfüllte Abhängigkeiten:  libpulse-dev : Hängt ab von: libpulse0 (= 1:1.1-0ubuntu15) aber 1:1.1-0ubuntu15.4 soll installiert werden                 Hängt ab von: libpulse-mainloop-glib0 (= 1:1.1-0ubuntu15) aber 1:1.1-0ubuntu15.4 soll installiert werden                 Hängt ab von: libglib2.0-dev soll aber nicht installiert werden  libx11-dev : Hängt ab von: libx11-6 (= 2:1.4.99.1-0ubuntu2.1) aber 2:1.4.99.1-0ubuntu2.2 soll installiert werden               Empfiehlt: libx11-doc soll aber nicht installiert werden E: Probleme können nicht korrigiert werden, Sie haben zurückgehaltene defekte Pakete.

Occasionally, when I'm installing stuff, I get an error like the following:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


I have NOT installed ubuntu, and I want to; the guidelines on the website suggest that when I boot from the USB I get some kind of a GUI which guides me through setup; however, what I get is a black terminal screen. What is going wrong here?  I have ubuntu-14.10-desktop-amd64.iso on my formatted USB.

I have Windows 7 installed in my internal HDD and wanted to try out Ubuntu so I have an USB to put Ubuntu LiveUSB on and installed Ubuntu on a external HDD and everything worked out fine.  Now the problem. If I remove the external HDD and try to boot Windows normally it shows the grub rescue screen. The only way to boot into Windows is by having the external HDD attached.  Is there any way I can make it so I won't have to have the external HDD attached to be able to boot my Windows 7?


I have just installed ubuntu 16.04 on an asus tp200s and the wifi is not working, it cannot even see networks.  my output of lspci is:  00:00.0 Host bridge: Intel Corporation Device 2280 (rev 21) 00:02.0 VGA compatible controller: Intel Corporation Device 22b1 (rev 21) 00:0b.0 Signal processing controller: Intel Corporation Device 22dc (rev 21) 00:14.0 USB controller: Intel Corporation Device 22b5 (rev 21) 00:1a.0 Encryption controller: Intel Corporation Device 2298 (rev 21) 00:1b.0 Audio device: Intel Corporation Device 2284 (rev 21) 00:1c.0 PCI bridge: Intel Corporation Device 22c8 (rev 21) 00:1c.2 PCI bridge: Intel Corporation Device 22cc (rev 21) 00:1f.0 ISA bridge: Intel Corporation Device 229c (rev 21) 00:1f.3 SMBus: Intel Corporation Device 2292 (rev 21) 02:00.0 Network controller: Qualcomm Atheros Device 0042 (rev 30)   And my output of lspci -nnk | grep 0280 -A2 is:  02:00.0 Network controller [0280]: Qualcomm Atheros Device [168c:0042] (rev 30) Subsystem: AzureWave Device [1a3b:2231] Kernel modules: ath10k_pci

I bought an Acer laptop and installed Ubuntu 14.04LTS but WiFi drivers are not available for it. So I am trying to install a windows driver using wifidocs/driver/ndiswrapper.  On doing lspci -vvnn, it gives:  Network controller ［0280: Qualcomm Atheros Device ［168c:0042］ (rev 30)   Then I also disabled the atheros drivers. Using lspci and lspci -n, I can say PCI id is 168c:0042. But Acer website has three atheros drivers. I could not figure out which one to download but downloaded one on a windows PC and pasted the zip file on my desktop then unzipped it from the terminal using unzip <filename>.zip. The page says you have to go to control panel system hardware and all that on the windows system. I did not do it. Windows computer not being mine, I am afraid I should not install any additional driver on it. After unzipping it has one .inx file and one .bin file but no .sys file. I don't know whether I am completely right till here or have I missed something? And if I am right then how to proceed from here? I also made a new directory and copied the unzipped .inx and .bin files in it. Then in that directory I ran the ndiswrapper -i <filename>.inf but it says ndiswrapper not installed and when I do sudo apt-get install ndiswrapper-common, I get the reply that ndiswrapper-common is already the latest version. What to do? here is my dmesg | grep ath10k result  [   7.882758] ath10k_pci 0000:03:00.0: pci irq msi-x interrupts 8 irq_mode 0 reset_mode 0 [    8.190016] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/cal-pci-0000:03:00.0.bin failed with error -2 [    8.334587] ath10k_pci 0000:03:00.0: Direct firmware load for ath10k/QCA9377/hw1.0/board-2.bin failed with error -2 [   10.140677] ath10k_pci 0000:03:00.0: qca9377 hw1.0 (0x05020000, 0x003820ff sub 105b:e09a) fw WLAN.TF.1.0-00267-1 fwapi 5 bdapi 1 htt-ver 3.1 wmi-op 4 htt-op 3 cal otp max-sta 32 raw 0 hwcrypto 1 features ignore-otp [   10.140682] ath10k_pci 0000:03:00.0: debug 0 debugfs 0 tracing 0 dfs 0 testmode 0 Here is the output of lspci -nnk | grep -iA2 net  02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)     Subsystem: Acer Incorporated [ALI] Device [1025:098a]     Kernel driver in use: r8169 03:00.0 Network controller [0280]: Qualcomm Atheros Device [168c:0042] (rev 30)     Subsystem: Foxconn International, Inc. Device [105b:e09a]     Kernel driver in use: ath10k_pci


Suppose we have two random variables $Z$ and $U$, the random variable $Z$ follows the exponential distribution and the random variable $U$ follows the general distribution $G$. The probability that $Z$ is greater than $U$ is calculated as follows: $Pr\{Z>U\}=\int_{0}^{\infty} Pr\{Z>U|U=u\} dG(u)$ Unfortunately, I can not understand why such a relationship exists. On what principle can this equation be obtained?

Given that $X$ and $Y$ are independent variables and that $X$ is exponential with a mean of $2$ and $Y$ is exponential with a mean of $1$. Find $P(X<Y)$?   From the information it can be concluded that $X \sim \operatorname{Exp}(\frac{1}{2})$ and $Y \sim \operatorname{Exp}(1)$  Hence, $f(x,y) = \frac{1}{2}e^{-\frac{1}{2}x} e^{-y} $  Therefore, $P(X<Y) = \int_{0}^{\infty} \int_{0}^{y} \frac{1}{2}e^{-\frac{1}{2}x} e^{-y} \,\,dx dy = \frac{1}{3}$   Is this the correct way to solve this problem?


My usecase: User opertes on Server1 station. He can use ssh or whatever to connect with Remote Station and start some application on it and display it on his station (Server1). Now user has to change his place and operate on Server2. I know that he can start new instance of application and display it on Server2. But I want to dispaly the same running instane of application on Server2. Is it possible? How to do that?

I'm using X11 forwarding over ssh to run Linux apps on my Windows box, and when the network drops it loses everything that was running. Is there anything similar to screen for X11?


Is there any way to transform the default "Category" taxonomy menu in the admin panel (once in a post) from a checkbox multi-option to a checkbox single option, or an option box.  My aim is to prevent a user to add a content in more than one category.  Thanks

I am trying to change the checkboxes for the terms on the backend to radiobuttons. I found this topic:  however wich helped me doing this. However, this will turn ALL terms checkboxes to radio buttons.  Is it possible to apply this only for one taxonomy?  My code:  add_action('add_meta_boxes','mysite_add_meta_boxes',10,2); function mysite_add_meta_boxes($post_type, $post) {   ob_start(); } add_action('dbx_post_sidebar','mysite_dbx_post_sidebar'); function mysite_dbx_post_sidebar() {   $html = ob_get_clean();   $html = str_replace('"checkbox"','"radio"',$html);   echo $html; }   thanks


I have studied at 4 universities, and in 3 different programs. I always observed that STEM professors are not good at teaching. I suspect this is because they do not have  and so on. Do STEM professors generally hold training in teaching from faculty of education or not? If YES, what am I missing? If NO, why?

I am a PhD student in the field of education and I enjoy reading SE questions to stimulate my mind when I need a break. I find academia to be one of my most frequently visited sites.    When reading questions, answers, and comments to questions of teaching practices I often see content I consider problematic given what is “known” (a word I will use loosely here) from research in educational psychology.    How do professors and lecturers learn to teach?    I do not mean this flippantly as I often see high-quality contributions on SE as well.   I suspect teaching courses as doctoral students is a consistent practice across fields, but I am curious to know what accompanies this in fields outside of education.  What other resources are provided besides having professors and lecturers learn on the fly and make their own conceptions of what good teaching practices are?  I understand this may be largely field and institution dependent. I also am asking from a U.S. context, but I would be interested to know if the structure is noticeably different between countries.


I'm using spring mvc 3.2.2.  I have a main index page that contains a header for login/user info as well as a navigation menu and a footer (as well as it's own content).  > http://localhost:8080/mywebsite/home/index.jsp  .... ...     <headerbar>...    <navmenu>...            Now that I will be adding new controllers and actions how can I reuse the header/nav menu and footer so that I don't have to add it in each additional page?  So for my users controller page all I want to have to do is render the user information without having include the header/nav/footer etc.  > http://localhost:8080/mysite/account/user/8585
User Account
 <user>${username}</user> <firstname>${firstname}</firstname>   How can I accomplish this?  .... ...     <headerbar>...    <navmenu>...      RenderBody?()

I'm using Spring's MVC with JSP views. Every JSP page has similar structure - headers, content, footers, perhaps a sidebar, etc. Looking around for "best practices" people seem to "include" footers and headers, but that means that every JSP page includes these "include" statements, giving a fixed format. To my eye a better solution would involve nested views, where a base template is extended with information appropriate to the page in question. One advantage of this approach is that you can have default values assumed in the base template without repeating them elsewhere. Another advantage is that you can further separate structure and content ("header" and "footer" being structural, and so belonging in the base template) in pages which contain a lot of text (think of help pages - you could put all that in the database, but why bother, especially since with Spring you can resolve to different views via the locale?).  There doesn't seem to be any support for this at the MVC level in Spring, but it could be implemented in JSP using custom tags and, indeed, there's a rather clunky attempt  (that might explain what I want better than this question, although I think you could make it less intrusive).  Anyway, my question is - does this already exist as a (popular/standard) tag library? I'm happy writing custom tags, but my impression of this stuff (generating web sites) is that there's a huge range of solutions already out there, with most work going into choosing the correct tools (eg Spring). Thanks.


Please, can you explain me why the following lines of code, print letter E many times, instead of A,B,C,D,E ?  I don't understand what's going on. I've tried many things, but i get either errors, or undefined values.  var values = ['A','B','C','D','E']; var myfunctions = [];  for (var i = 0;i < values.length;i++){     var letter = values[i];     console.log(letter);     myfunctions.push( function(){         console.log(letter);     });  };  for (var j = 0;j < values.length;j++){     myfunctions[j](); };

How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help.


Below is our galaxy, if there is a such a massive black hole at the center then wouldn't it suck in any light traveling above it, or is the amount of light put out by stars near the center so great that the light is sucked in slower than its produced?

According to NASA      a black hole is anything but empty space. Rather, it is a great amount of matter packed into a very small area   According to the documentary  about Black Holes     Gravity here is so strong even light cannot escape   Which leads me to believe that Black Holes basically are masses so compact but great which gives them very strong gravitational influence (Newton's Gravitational Law) that light is not allowed to go out of, hence a "Black" hole.  If my above understanding of Black Holes is correct, then why is those Spiral Galaxies pictured using Hubble Telescope is showing a big shiny ball instead of a "Black" hole ? What is the obvious clue that I am missing here ?  Here is the image of Andromeda Galaxy image taken using Hubble.


I placed Auriel's Bow in a chest at Nightcaller Temple. When I came back it was gone, what do I do? I'm playing on XBox, not PC.

I've lost Morekei, 100% magicka regen, and I have no idea how. I've been looping through all of the shopkeepers I might have somehow sold it to but no one seems to have it.  I've got this game on PC. Is there any way I can gain information about where in the game world it is is? Conosle commands or looking through the game files?  I can create another one (anyone know it's ID?), but I'd prefer not to do that.


I have read that shapefiles are limited to 2 GB, yet I have found that QGIS can go beyond that limit. In this case, I was generating contours from DEMs. The output would have been greater than 2 GB, and ArcMap failed, but QGIS created the output. Has anyone else noticed this? Just curious…

I have a very large .gdb that I want to reduce to my study area. Unfortunately, the study area is still quite big. I could select features that intersected my study area but when I tried Export > Save Selected Feature As...it crashed and only saved some of the features (4GB). Ideally, I would create another .gdb but it seems that QGIS does not support .gdb creation (read-only) or delete the features I don't need directly in the .gdb but as far as I know it is not possible to modify a layer in a .gdb.


I'm trying to add a string to a listview, the string is being received via the broadcast receiver. whenever I try to do something on my arraylist or an adapter to my listview I get a null pointer exception.  public class DevScan extends AppCompatActivity {   MyReceiver rcvr; String test; ArrayList<String> devlist; ArrayAdapter<String> Adapter; ListView devLV;  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_dev_scan);     Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);     setSupportActionBar(toolbar);      rcvr=new MyReceiver();     this.registerReceiver(rcvr, new    IntentFilter("CUSTOM_INTENT"));          final UDP_service srv = new UDP_service(this);     srv.start();       final ArrayList<String> devlist = new ArrayList<>();     ListView devLV = (ListView) findViewById(R.id.devlistview);      devlist.add("elloooo");      final ArrayAdapter<String> Adapter = new ArrayAdapter<String>(             this,             android.R.layout.simple_list_item_1,             devlist );      devLV.setAdapter(Adapter);       Button scanb1 = (Button) findViewById(R.id.scanbtn1);     scanb1.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View view) {             devlist.clear();             Adapter.notifyDataSetChanged();               srv.Message="eloooo!";             srv.send();            }     });  }  private class MyReceiver extends BroadcastReceiver {     @Override     public void onReceive(Context context, Intent intent){     test = intent.getExtras().getString("packet");     //it works fine when I put the Extra in a string variable        //these 3 cause NPE      // devlist.add(intent.getExtras().getString("packet"));      //   devlist.add("foo");      //   Adapter.notifyDataSetChanged();       Log.i("SOCK broadcast intent", test);  } }   }   what I don't undsetand is why string variable 'test' is works fine with MyReceiver, but arraylist defined in the same way doesn't  soluton:  because of my lack of knowlage I redeclared my objects as local, by accident..

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


In Amazon EC2, where I set "security groups", It says: Source:  0.0.0.0/0 And then it gives an example of: 192.168.2.0/24  What is "/24"?  I know what port and IP is.

This is a  about IPv4 Subnets.      Related:               How does Subnetting Work, and How do you do it by hand or in your head?  Can someone explain both conceptually and with several examples? Server Fault gets lots of subnetting homework questions, so we could use an answer to point them to on Server Fault itself.   If I have a network, how do I figure out how to split it up? If I am given a netmask, how do I know what the network Range is for it? Sometimes there is a slash followed by a number, what is that number? Sometimes there is a subnet mask, but also a wildcard mask, they seem like the same thing but they are different? Someone mentioned something about knowing binary for this?


For example: something , everything, anything, nothing ... special  someone , everyone , anyone,, no one ... special  somebody , everybody , anybody , nobody ...special

I want to better understand why the construction something + [adjective] makes grammatical sense. Background: I was recently reading a Washington Post article and came across the following sentence.  So if you fall in that category, [the movie] feels more like magic than repetitive.  (Note: I've copied the relevant spoiler-free sentence above; following the link to the article will open you up to movie spoilers! ) The phrase more like magic than repetitive struck me as odd, presumably because it was non-parallel (more like [noun] than [adjective]). I would have expected "...more like magic than something repetitive." (Actually, that needs to be rewritten to flow better, but the point is that at least it appears to be grammatical.) Thus, one would have the noun phrase "something repetitive," of the form "[noun] [adjective]." This got me to thinking about the use of adjectives after nouns. There is a great Stack Exchange article  that involves the characteristics of the adjective that indicate it should come after the noun. But I haven't been able to find examples of how the word "something" requires a postponed adjective. Consider the following sentences:  I want to buy something red. I am looking for something sweet to eat.  You cannot say:  *I want to buy red something. *I am looking for sweet something to eat.  But you can say:  I want to buy something (that is) red. I am looking for something (that is) sweet to eat.  So, my question:  Do the above examples mean that the "something [adjective]" construction is an example of the ellipsis of "that is"?  Is there something special about the word "something" that requires the postponed adjective? Note that I am NOT looking for details about adjectives that are postponed; I'm interested in the word that precedes the adjective (either "something" or similar words).   By the way, I am not interested in the following constructions, which are different:  I want to paint the house red. I tried to build the brick house taller.  Thanks in advance!


I have obtained my Microsoft Windows 7 Product Key, and I have decided to do a fresh install the Windows 7 Home Edition.  How should I create the bootable media to install a 64-bit Windows 7 Home Basic edition?  I was redirected by Microsoft support representative to , but he himself said that this link is for retail key, and my key is not retail key but rather one shipped with the machine (OEM key?).  My question is actually in extension with the question posted .  I have to Create this new thread for the 2 reason →   I do not have 50 reputation yet to ask question in comment box there. I have lots of questions that thread was unable to answer.   That thread gives a link →  I could Not find Window 7 Home Basic Download link for 64 bit window. Can some one Please help me with that?  I found this → en_windows_7_home_basic_with_sp1_x86_dvd_u_676470.iso     But I am not sure if it is equivalent to 64 bit installation also.  If my above question is resolved then my 2nd question will be → Since the download link is .iso extension so just by saving it in dvd will it be a bootable window or we have to still burn it to create a DVD?  I have  4.7GB DVD and I hope that will be sufficient.

I just bought a serial for Windows 7 on-line from the Microsoft store (the most painful shopping experience EVER!). I selected that I wanted to download my version of Windows 7 after purchase. After payment, I have listed a Product Key but no download link in sight.   Where do I download my Windows 7 ISO to burn to disk?  Note: I'm not a Technet or MSDN subscriber.


In these books there is quite a lot of focus on realism - there are weight units and length units based on things corresponding to the society's technological stage, and many things are based on internal events in that world. However, since there is so much focus on these details, I wonder what are years based on? In the real world we have developed them because of the cyclic changes of weather, but in this world these changes are irregular, and summers and winters are both stated to last years. So, what is a "year" based on in that world?

I only watched the Game of Thrones TV series. But there it was said that the current summer lasted for already nine years. In our world a "year" is the time in which all four seasons pass. Since this is different in Westeros, they seem to have some other way of saying what a "year" is. Is this somehow explained in the books?


To me, the horse's role is merely to transmit the force it is being pushed forward with by the ground over to the cart. So, let's say, the ground pushes horse with 20 N, the horse pulls cart with 20 N, the cart pulls horse with 20 N. If the force that the ground pushes the horse with is doubled, the force on the horse by the cart and on the cart by the horse should also be doubled and we are still left with 0 net force.

Given Newton's third law, why is there motion at all? Should not all forces even themselves out, so nothing moves at all? When I push a table using my finger, the table applies the same force onto my finger like my finger does on the table just with an opposing direction, nothing happens except that I feel the opposing force. But why can I push a box on a table by applying force ($F=ma$) on one side, obviously outbalancing the force the box has on my finger and at the same time outbalancing the friction the box has on the table? I obviously have the greater mass and acceleration as for example the matchbox on the table and thusly I can move it, but shouldn't the third law prevent that from even happening? Shouldn't the matchbox just accommodate to said force and applying the same force to me in opposing direction?


How could it be shown that the number of binary string of length k with an even number of 1s is the same as those with an odd number of 1s.  Eg. for $k = 3$ :  Binary string length 3 with even amount of 1s : $000 ; 011 ; 110 ; 101$  Binary string length 3 with odd amount of 1s : $111 ; 100 ; 010 ;001$  Both of these set have the same cardinality. I'd like to see a generalization for any $k\in\mathbb{N}$.  If think we need to show there exist a bijection between the set of binary string of length $k$ with even number of 1s and and the one with odd number of 1s in order to prove they have the same cardinality, but I'm not sure how to define such a function.  Thanks

I am currently self-studying introductory combinatorics by reading Introduction to combinatorial mathematics. I am currently in the first chapter, and I have a question regarding one of the examples. The question was asking to count the number of n-bit strings with an even number of zeros. The answer is of course $2^{n-1}$. The author gave 2 solutions. I however didn't completely understand what I think is the straightforward one. The solution I got was that he took out 1 bit, leaving $(n-1)$ bits, if the number of zeros is even in the $(n-1)$-bit number, then he will just append a 1, if not then he will append a zero. So in the end we just needed to count the number of $(n-1)$-bit strings. The other solution (the straightforward one) that I didn't understand examined the symmetry that half of the $2^n$ must have an even number of zeros, and the other half will have an odd number of zeros. I just don't get why this property must hold. I can understand that half of the $2^n$ numbers will have even parity, but I can't see how it holds for the parity of the number of zero or one bits. If anyone can show me how that property holds, I'd be very grateful. I'd also be interested to see different explanations and proofs if possible.  Thank you.


Just to illustrate that there are better and worse ways to apply brakes, here's an example of a less-than-ideal way: I was biking on a borrowed bike and getting used to the brakes. The front brake lever was squishier than the rear. After skidding out and landing my hip on a stump, which lowered morale significantly for the next half-hour or so, I learned to give the front brake a harder squeeze to compensate for the squish. This was on a mountain trail and at the urging of my biking companion on that day.  So my question is this: How does one brake under certain circumstances? Are there times when all-front or all-rear braking makes sense, or is it always best to apply pressure somewhat evenly to both brakes, and are there different braking techniques on roads vs trails and such?

Sheldon Brown's  page states that:     Skilled cyclists use the front brake alone probably 95% of the time   and     "Generally I advise against using both brakes at the same time."   I certainly use my front brake more than my rear brake, but not exclusively. Specifically, I pull two or three times harder on the front brake than on the rear, and as I come to a stop and feel less traction on the rear wheel, I gradually let up on the rear brake. Sheldon's advice implies that it would be better to use the front brake exclusively.  The page states cases for the exceptions where a cyclist should use both brakes together or the rear brake alone but doesn't provide a rationale for why not to use the two brakes together. In normal conditions, is using the front brake alone truly better than using both brakes, and if so, why?  (Related question: )


I am planning to add Disqus to my WordPress site. Now will my comments will be indexed by the Google as earlier or do I have to add any extra plugins or sitemap for comments.

I am building a website and am trying to decide between writing my own commenting system and using Disqus.  One of the main deciding factors is that (obviously), I want comments left on my page to be show on SERPS. However, I remember reading somewhere that Disqus loads comments into a page using AJAX - and therefore the comments are "invisible" as far as Googlebot and other SE crawlers are concerned. Could someone confirm or refute this?  The other question I have is about whether (as a commenter), When I place a comment on another website using Disqus (including any links I may add to my comment), do the links in my comment count as a back link (in other words are they "dofollow" or "nofollow" links)?


I'd like to go to a terminal so I can kill processes jamming my windowing session. (I would then return with  CTRL-ALT-F7.) But  CTRL-ALT-F1 just locks the screen; no terminal.   CTRL-ALT-Fn-F1  similarly does not work.  What am I doing wrong? How do I get the effect of  CTRL-ALT-F1?   (This is  a Dell Inspiron 15 7000 Gaming with  Ubuntu 18.04)

How to switch between virtual console and GUI in Ubuntu? I wanted to see what key functions would allow me to switch between the two.


I have two mice connected to my computer, one on each side of the keyboard.  Both mice are working: they move the pointer, and both buttons work (one is a DeathAdder, one is a Sensei, if that matters).  When opening the mouse section, I would have expected to see two configurations, but I only see one. It seems to be shared, as changing "Primary Button" changes primary button for both mice.  However, I would like the left mouse to have the primary button on the right and the right mouse to have its primary button on the left.  How can I accomplish that?

I see that I can configure mouse and touchpad all in one panel (Ubuntu 13.10, defaults, Gnome). Which is to some extend. Namely, I want to have the touchpad differently configured then the mouse and ...  When I have an (USB) mouse attached I use it normally left-handed. Therefore I switch the buttons to left-handed. But when I use the touchpad I feel little bit lost with that kind of configuration. Therefore I wanna have it right-handed.  Is there a way to achieve the following: when I plugin a mouse (respectively when it is detected) automatically switch to left-handed and when I unplug it, switch automatically to right-handed?


I'm trying to come up with a word that describes a male aged from 20 through 25. Man feels too adult like and Young Adult feels like a teenager. The type of word I'm looking for is someone not yet middle aged, but is on his way there, but still retains some youthfulness.   Thank you for your response.   Just to add on, any word using modern terms probably won't work, as it is being used in something set in a medieval / fantasy realm.     An edit to explain how. I am asking for a word that is referring to a male who is older than a young adult who still has a sense of youthfulness. An example would be someone about to graduate college, someone who feels too old to be called young (adult) but does not have the experiences or age yet to be considered middle aged.

When writing a book and referring to a female and male aged 18–25, what term would be most appropriate? Boy and girl seem too young, whereas man and woman seem too old.  Example sentence:     A boy/man emerged from the shadows.   Edit: I think the word I am looking for is similar to 'guy' but less American and colloquial. Any thoughts?


If $A\cup B=A\cup C$ and $A\cap B=A\cap C$, prove that $B=C$.   My attempt: $$A\cup B= A\cup C$$ $$n(A\cup B)=n(A\cup C)$$ $$n(A)+n(B)-n(A\cap B)=n(A)+n(C)-n(A\cap C)$$ $$n(B)=n(C)$$ $$B=C$$.  Is this correct?Or, do we have any other alternatives?

I’m stuck on this one problem in my textbook regarding proofs in set theory. I’ve done the following so far:  Let $ x \in B $. As $ B \subseteq A \cup B $, we have $ x \in A \cup B $, so $ x \in A \cup C $ because $ A \cup B = A \cup C $. Hence, $ x \in (A \cup B) \cap (A \cup C) $, which yields $ x \in A \cup (B \cap C) $. Now, either $ x \in A $ or $ x \in B \cap C $. If $ x \in B \cap C $, then $ x \in C $ because $ B \cap C \subseteq C $, so $ B \subseteq C $.  This is only half of the proof, though, as I have to prove that $ C \subseteq B $ as well; and I also haven’t even considered the case $ x \in A $ for the last step in what I have so far. I’ve drawn many different Venn diagrams, and although I see why the statement is true, I just can’t formalize it. Any pointers, help or guidance is very much appreciated. Thanks!


I am trying to figure out what is the estimated variance (i.e. the estimated "error") of residuals around a fitted line.   > summary(model)  Call: lm(formula = fecundity ~ Organic)  Residuals:     Min      1Q  Median      3Q     Max  -2.2909 -1.6439 -0.4606  1.5121  3.7273   Coefficients:             Estimate Std. Error t value Pr(>|t|)     (Intercept)  47.6667     1.4907   31.98 9.97e-10 *** Organic      -8.6788     0.4805  -18.06 9.06e-08 *** --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  Residual standard error: 2.182 on 8 degrees of freedom Multiple R-squared:  0.9761,    Adjusted R-squared:  0.9731  F-statistic: 326.2 on 1 and 8 DF,  p-value: 9.063e-08  > anova(model) Analysis of Variance Table  Response: fecundity           Df Sum Sq Mean Sq F value    Pr(>F)     Organic    1 1553.5 1553.50  326.22 9.063e-08 *** Residuals  8   38.1    4.76                       --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

The help pages in R assume I know what those numbers mean, but I don't. I'm trying to really intuitively understand every number here. I will just post the output and comment on what I found out. There might (will) be mistakes, as I'll just write what I assume. Mainly I'd like to know what the t-value in the coefficients mean, and why they print the residual standard error.   Call: lm(formula = iris$Sepal.Width ~ iris$Petal.Width)  Residuals:      Min       1Q   Median       3Q      Max  -1.09907 -0.23626 -0.01064  0.23345  1.17532    This is a 5-point-summary of the residuals (their mean is always 0, right?). The numbers can be used (I'm guessing here) to quickly see if there are any big outliers. Also you can already see it here if the residuals are far from normally distributed (they should be normally distributed).  Coefficients:                  Estimate Std. Error t value Pr(>|t|)     (Intercept)       3.30843    0.06210  53.278  < 2e-16 *** iris$Petal.Width -0.20936    0.04374  -4.786 4.07e-06 *** --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1    Estimates $\hat{\beta_i}$, computed by least squares regression. Also, the standard error is $\sigma_{\beta_i}$. I'd like to know how this is calculated.  I have no idea where the t-value and the corresponding p-value come from. I know $\hat{\beta}$ should be normal distributed, but how is the t-value calculated?  Residual standard error: 0.407 on 148 degrees of freedom   $\sqrt{ \frac{1}{n-p} \epsilon^T\epsilon }$, I guess. But why do we calculate that, and what does it tell us?  Multiple R-squared: 0.134,  Adjusted R-squared: 0.1282    $ R^2 = \frac{s_\hat{y}^2}{s_y^2} $, which is $ \frac{\sum_{i=1}^n (\hat{y_i}-\bar{y})^2}{\sum_{i=1}^n (y_i-\bar{y})^2} $. The ratio is close to 1 if the points lie on a straight line, and 0 if they are random.  What is the adjusted R-squared?  F-statistic: 22.91 on 1 and 148 DF,  p-value: 4.073e-06    F and p for the whole model, not only for single $\beta_i$s as previous. The F value is $ \frac{s^2_{\hat{y}}}{\sum\epsilon_i} $. The bigger it grows, the more unlikely it is that the $\beta$'s do not have any effect at all.


Consider the following question:  Let $\mathbb{Q}$ be the field of all rational numbers.  Let Aut($\mathbb{Q}$) be the group of all Automorphism on $\mathbb{Q}$ (All Isomorphism from $\mathbb{Q}$ to $\mathbb{Q}$).  Show that $\mathbb{Q^{*}}$ is isomorphic to Aut($\mathbb{Q}$).  I really dont know how to prove this base on the Isomorphism theorem.  Any help will be appreciated.

Let $\mathbb Q$ be group of rational numbers under addition.  Then I want to find out the automorphism group of $\mathbb Q$. In a book it is given that Aut($\mathbb Q$) is isomorphic to $\mathbb Q^*$, the  multiplicative group of rational numbers. I stuck in this.


Is "Whom do I look like" the 'proper' way of saying "Who do I look like?" I know that second option is the most used one, but still

I happened to watch a lecturer was explaining word order of English in the beginners’ English learning course in NHK’s - Japan’s largest and publicly-owned broadcasting network – educational TV program (aired on July 23rd). He showed four cubes, each of which showing the word, “Who”, “You” “Help” “Do” placed at random, and asked students to put the cubes in the right order:   Right answer: Who Do You Help?   I was comfortable with “Who do you help (speak / give / write, and so on) too, but a question arose:   Is “Whom do you help?” grammatically wrong or, obsolete? If so, why is it wrong, how and around when it became obsolete?  I’ve never seriously thought of such question as the declension of a dative pronoun in interrogative form until I hit upon the above TV scene. Taking advantage of this opportunity, I ventured to post a beginner’s question.


I have HTML element(span) the changes it's location.When I click HTML element(span) I need to get the HTML element(span)'s location.  Here is html:      measure            Here is onclick event:    function OpenFlyout(xpos, tbItemIndex, e)   {    }   How can I get HTML element(span) location in OpenFlyout function?

I want to know how to get the X and Y position of HTML elements such as img and div in JavaScript relative to the browser window.


I need help with the following problem:  Let $n$ and $m$ be positive integers.   Prove that  $$\frac{\gcd(n,m)}{n}{n \choose m}$$  is an integer.

Prove that for every $n\geq m \geq1$ natural numbers, the following number is an integer:  $${\gcd(n,m)\over n}\cdot{n\choose m}$$  Where $\gcd$ is the greatest common divisor.  I tried to make it simpler by cancelling the $n$ from the left side, and making it $(n-1)!$ on the right: $\gcd(n, m) \cdot \frac{(n-1)!}{m!(n-m)!}$, but can't really go further.   This was problem B-2 on the .


I have a trimodal null distribution that looks like this:  In order to calculate the significance we just check how extreme the values are respect to our null distribution.  We do it this way:    find.pvalue <- function(value, null.dist, length(null.dist))  {     if (value<0) {       p = (sum(null.dist < value)+1)/length(null.dist)     } else {       p = (sum(null.dist > value)+1)/length(null.dist)     }     return(p)   }   Then adjust FDR.  This is how I would do it for a normal distribution, but is this correct way to test for extreme values for a null distribution like this one?   Thanks


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

How can I calculate $\sum\limits_{n=1}^{\infty}\frac{1}{F_n}$, where $F_0=0$, $F_1=1$ and $F_n=F_{n-1}+F_{n-2}$?  Empirically, the result is around $3.35988566$.  Is there a "more mathematical way" to express this?


Suppose $E/F$ is a field extension and $\alpha, \beta \in E$ are algebraic over $F$. Then it is not too hard to see that when $\alpha$ is nonzero, $1/\alpha$ is also algebraic. If $a_0 + a_1\alpha + \cdots + a_n \alpha^n = 0$, then dividing by $\alpha^{n}$ gives $$a_0\frac{1}{\alpha^n} + a_1\frac{1}{\alpha^{n-1}} + \cdots + a_n = 0.$$     Is there a similar elementary way to show that $\alpha + \beta$ and $\alpha \beta$ are also algebraic (i.e. finding an explicit formula for a polynomial that has $\alpha + \beta$ or $\alpha\beta$ as its root)?    The only proof I know for this fact is the one where you show that $F(\alpha, \beta) / F$ is a finite field extension and thus an algebraic extension.

How does one go about proving that the sums and products of two algebraic numbers over a field $F$ (say $a,b\in K$, where $K/F$ is a field extension) is also algebraic?   If we call $f_a$ and $f_b$ the min. poly's of $a$ and $b$, then I'm assuming the answer involves such polynomials. Perhaps looking at their roots in splitting fields for both of them? And finding a "big" splitting field, constructed from those two other ones?      In particular, I'd like a way of explicitly constructing the minimal polynomials $\ f_{ab}$ of $ab$ and $f_{a+b}$ of $a+b$.     I read somewhere that $g(x)=\Pi_j\Pi_i (x-\alpha_i\beta_j)$ works for $ab$, where the $\alpha_i$ and $\beta_j$ are the roots of $f_a$ and $f_b$, respectively, but I do not know why $g(x)\in F[x]$.  Similar remarks for $a+b$


A vessel is filled with the liquid,3 parts of which are water and 5 parts syrup,How much of the mixture must be drawn off and replaced with the water ,so that mixture may be half water and half syrup  I have tried:  Totally it contains 8 parts,  3/8       5/8    1/2   1/8        1/8  Ratio is 1:1,for the mixture to become half,what i am doing mistake,is anyone guide me for the Answer,But the answer is 1/5  what i am doing wrong ?

A vessel is filled with liquid,3 parts of which are water and 5 parts syrup.How much of the mixture must be drawn off and replaced with water so that the mixture may be half water and half syrup?  What is the best possible way to solve this question?


I watched a Harry Potter's movie in which they say "Right smart bird you got there, Mr. Potter." But I think "Right smart bird you've got there, Mr. Potter." is correct, because I think 'have got' indicates Harry's possession of that bird. What is the answer? And what does 'there' mean? Does it just refer to Potter's house? Or is it meaningless?

Reg: What's that you have got Meggie? Reg: Show us. Meggie: No, she's mine! I got her for my birthday! Reg: We just want to have a look.  Reg used the present perfect have got in the first sentence; instead, Meggie used the past tense got. If Meggie used have got, would the sentence be correct?


This question has been in my head for so many days. When I was studying BJT amplifiers, capacitors were used for blocking DC. It is called a coupling capacitor. When the AC signal is superimposed on DC and is applied to the circuit shown, what would be output across R(Vo)? My professor told that we will get a sine wave(5sinWt) with reference to ground and DC(10) would be eliminated. But I am not able to visualize the waveforms across C and R. I want to know how capacitor charges and discharges and blocks dc. Please help me with the waveforms.

I am confused with this! How does a capacitor block DC?   I have seen many circuits using capacitors powered by a DC supply. So, if capacitor blocks DC, why should it be used in such circuits? Also, the voltage rating is mentioned as a DC value on the capacitor. What does it signify?


For a project I am involved in, we are creating a dataset that will show the extents of natural areas and provide an estimate of the ecological integrity of that area. We are calling it an "Ecological Integrity Dataset," but as far as I can tell, we're making a map layer that has this information. Can someone very simply tell me the difference between a map layer and a dataset?

What is the difference between a feature class and a feature layer?  To me they seem very similar in concept.


How to get the right pronunciation when a new word occurs for example, I would pronounce privet : /'praɪ.vɪt/ like the beginning of private but unfortunately we must pronounce it : /ˈprɪv.ɪt/ Is there any rules?

I have learned English for many years, and from the first day I began to learn it I know the dictionary is necessary for the study.  One of the important aspects is that English words, unlike German and Spanish, usually can not be read correctly without phonetics.  But recently, I talked with some native speakers and they told me they can read any word directly and rightly even though they never learned it before.  I just want to know how they can do that -- there is no ordinarily acceptable method to read an English word?


I just installed Eclipse Neon for ubuntu without using terminal , I unarchived it and ran the program and it installed like in windows. Now when I type eclipse in terminal it can't open it.  I am thinking that any software that is not installed using terminal can't be accessed from it, am I right?   It asks me to install eclipse by using sudo apt install eclipse-platform , which means Terminal otherwise my OS has no idea if any program named eclipse is already installed.

I downloaded the Linux Eclipse installer from its site. By default, it is installed in home folder. No desktop shortcuts nothing else. Just a copy to a folder.  How can I install it the same way as is installed by sudo apt-get install eclipse?


is it possible to toggle a bit to 0 when it is 1 and to 1 when it is 0? For example,00000000 go through the function will 00000001 and when the 00000001 go through the function again, 00000001 will become 00000000. Is it possible?

How do you set, clear, and toggle a bit?


I wanna say excuse me first for my lack english. I am not a native speaker.  So, I am creating a rock scissor paper game with GUI in Java.  The algorithm is very simple. I will get a showOptionDialog with three buttons. (rock, scissor, paper) When I click one of the three buttons, Java will compare my choice and computer's choice. Computer will choose random number between 1~3   I am almost finished with my GUI but I have some problem with showOptionDialog  private String[]a = {"Rock","Paper","Scissor"}; private int userChoice; /* some codes   */    public void actionPerformed(ActionEvent e){     if(e.getSource()==play){         userChoice = JOptionPane.showOptionDialog(null,"Rock Paper Scissor","Choose",JOptionPane.YES_NO_CANCEL_OPTION,         JOptionPane.QUESTION_MESSAGE,null,a,a[1]);         if(userChoice==a[0] )     } }   I tried something like this but as you know java shows me an incomporable types int and String. Any good idea how should I do?

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


Both seem to be flags but what is the difference?

I often see a single dash - or double dash -- followed by linux commands or other installed linux programs.   What are the differences between single dash and double dashes?  Is it just about abbreviation?  For example, -v means --verbose most of the time.


I installed Ubuntu 16.04 LTS with linux kernel 4.13. However I had to manually install linux kernel 4.4 to support local legacy software and hardware.  I'm currently running  $uname -r 4.4.0-128-generic   How do I update this kernel to  without upgrading the kernel I initially installed?   I.e. how can upgrade my kernel from 4.4.128 to 4.4.138 without upgrading to my initially installed kernel, 4.13?  Edit: I know that I could do this update/upgrade manually, but I'm hoping that there is a more clever solution via manipulation of using sudo apt-get dist-upgrade or the like....

I am doing experiments with few Linux kernels, also I want to keep all the kernels on my system; I don't want then to be removed automatically. how do I achieve that?  (NOTE: I have mounted /boot on separate 4GB partition so space is not an issue)


I just installed Ubuntu and opened an admin panel where I saw that I accidentally allowed the system to use my laptop's name. Can anyone suggest how would I remove it?

I want to change the OS hostname but I do not want to restart.  I have edited /etc/hostname but it requires a restart to get implemented. How to avoid this?


The mass of a proton is around 900 mega electron volts/c2. The mass of two up quarks and a down quark is about 10 mega electron volts/c2.

We know that the sum of the masses of the quarks in a proton is approximately $9.4^{+1.9}_{-1.3}~\text{MeV}/c^2$, whereas the mass of a proton is $\approx931~\text{MeV}/c^2$. This extra mass is attributed to the kinetic energy of the confined quarks and the confining field of the strong force. Now, when we talk about energetically favourably bound systems, they have a total mass-energy less than the sum of the mass-energies of the constituent entities. How does a proton, a bound system of quarks with its mass-energy so much more than its constituent entities, remain stable? The strong force and other energetic interactions supposedly contribute this mass-energy by the mass-energy equivalence principle, but how exactly does this occur?


Is it even possible to get length of all objects inside an array? Let say i have an array which looks like that:    var foo = [{     "id": 1,     "path": {         "1": [{             x: 21,             y: 22         }, {             x: 22,             y: 12         }],         "2": [{             x: 21,             y: 22         }, {             x: 22,             y: 12         }]     } }];  for (let x in foo) {     var path = foo[x].path;     for (let c in path) {         console.log(path[c]);     } }     How can i correctly get total lenght of objects inside path array here?

I have a JavaScript object. Is there a built-in or accepted best practice way to get the length of this object? const myObject = new Object(); myObject["firstname"] = "Gareth"; myObject["lastname"] = "Simpson"; myObject["age"] = 21;


In my studies I came across this  There is some more to this answer but for the purpose of this question lets leave it at that. I can't figure out what $\boldsymbol{I}_{\theta, \infty}(x_i/i)$ is and have already spent way to long trying to figure it out. Any help would be appreciated.

Here is  an excerpt from "All of Statistics" by Larry Wasserman (page 23):     Given an event A, define the indicator function of A by      $$ I_{A}(\omega)= \color{Red}{I(\omega \in A)} =\begin{cases}  1 &  \text{ if } \omega \in A \\   0 & \text{ if } \omega \notin A   \end{cases} $$   I am not convinced, referring to term colored red, with the notation here. Since this is a widely referred text, I would like to know that whether this is a typo or I am missing something here.


Can anyone please tell me what these two parallel lines on my exit stamp mean?     And will it impact my further application & travel to the Schengen area? It happened when I was denied entry to Croatia due to single entry Schengen visa and therefore I have no valid visa to enter Croatia. The Croatian border guard didn't stamp anything on my passport nor gave me any letter, she just kindly told us we can apply for a visa in Ljubljana. The Slovenian guard just drew two parallel lines on our exit stamp and when we left the Schengen area via Switzerland the country which issued my visa the guard just stamped me out without a single question.

I am from Myanmar. I was on my way to Venice from Brussels while holding Schengen visa (single entry). I bought a British Airways ticket to fly from Brussels to Venice. Unfortunately, on that day, all BA flights from Brussels were canceled. British Airway's customer service centre told me to go to from Brussels to London by train, where I could catch my flight to Venice. I took a taxi to Bruxelles-Midi train station and bought a ticket to London. A Brussels immigration officer inspected and approved my passport.   Then I had to to through UK Border Immigration. There, they said I can't enter to get my flight. Although I explained the situation with the airline and made clear of my destination (I already reserved my hotels in Venice, Switzerland and France as described in my travel itinerary), they detained me for some hours and also took my fingerprints on paper and photo.   They asked questions concerned about my finances and gave me a refusal letter for not having a transit visa. So I had to re-enter Brussels where the immigration officer put the below stamp in my passport. As I had a single entry Schengen visa, I had to buy another airline ticket to Venice and complete my Europe trip.   What do the stamps below mean on my passport?   Can they affect me and, if so, how and why, when I apply for another Schengen visa?


Given the following string 1234  1234  We can use  to find only the last four numbers or . How do I get a bytecode analysis (maybe with the dis module?) to compare which one is more effective? I know I could use timeit but am really interested in the internals.

Is there a way to debug a regular expression in Python? And I'm not referring to the process of trying and trying till they work :)  Here is how regexes can be debugged in Perl:   use re 'debug';  my $str = "GET http://some-site.com HTTP/1.1"; if($str =~/get\s+(\S+)/i) {     print "MATCH:$1\n"; }   The code above produces the following output on my computer when ran:   Compiling REx "get\s+(\S+)" Final program:    1: EXACTF  (3)    3: PLUS (5)    4:   SPACE (0)    5: OPEN1 (7)    7:   PLUS (9)    8:     NSPACE (0)    9: CLOSE1 (11)   11: END (0) stclass EXACTF  minlen 5 Matching REx "get\s+(\S+)" against "GET http://some-site.com HTTP/1.1" Matching stclass EXACTF  against "GET http://some-site.com HTTP/1.1" (33 chars)    0           |  1:EXACTF (3)    3        |  3:PLUS(5)                                   SPACE can match 1 times out of 2147483647...    4       |  5:  OPEN1(7)    4       |  7:  PLUS(9)                                     NSPACE can match 20 times out of 2147483647...   24       |  9:    CLOSE1(11)   24       | 11:    END(0) Match successful! MATCH:http://some-site.com Freeing REx: "get\s+(\S+)"


I have a weird hacking case with one of my wordpress sites. It's a small site, basically shows 5 blog posts on whether or not the office will be open/closed. It's not too complicated or anything, but it was hacked and now redirects to some spam/malware sites.  Basically the site loads the pages, and after about 3 seconds it redirects. I've checked the header.php, index, footer, and don't see anything obvious, plus they weren't listed as being changed. The other thing that is weird is I ran a linux command to search for files that have been changed in the last 10 days, and the only ones that came back were ones I touched while checking for these redirects and doing :wq with vi. It doesn't seem like anything on the php/backend side is doing this redirect.  It is hosted on a apache linux server. Would there be somewhere else I can check to see if this redirect is being made? If there was something that was causing it in the php files, wouldn't it redirect immediately instead of letting the site load? There isn't an .htaccess and I don't see anything obivous in the apache.conf file.   After doing some digging I found that there is some script injects in all pages. The script redirects to a page where there is some malicious content. However, the wordpress version control does not say that these pages were edited. It doesn't have anything historical that looks like this had happened. Is it possible that something was changed in the wp-admin to inject these scripts in the editor? Or if you make changes to the wordpress database for a page does it not create a new version? Where would I check that? What permissions should my wordpress site have?  Thanks for the help!

This is a  about Server Security - Responding to Breach Events (Hacking)   See Also:                  Canonical Version I suspect that one or more of my servers is compromised by a hacker, virus, or other mechanism:   What are my first steps? When I arrive on site should I disconnect the server, preserve "evidence", are there other initial considerations? How do I go about getting services back online? How do I prevent the same thing from happening immediately again? Are there best practices or methodologies for learning from this incident? If I wanted to put a Incident Response Plan together, where would I start? Should this be part of my Disaster Recovery or Business Continuity Planning?   Original Version       2011.01.02 - I'm on my way into work at 9.30 p.m. on a Sunday because our server has been compromised somehow and was resulting in a    attack on our provider. The servers access to the Internet   has been shut down which means over 5-600 of our clients sites are now   down. Now this could be an FTP hack, or some weakness in code   somewhere. I'm not sure till I get there.      How can I track this down quickly? We're in for a whole lot of   litigation if I don't get the server back up ASAP. Any help is   appreciated. We are running Open SUSE 11.0.            2011.01.03 - Thanks to everyone for your help. Luckily I WASN'T the only person responsible for this server, just the nearest. We managed   to resolve this problem, although it may not apply to many others in a   different situation. I'll detail what we did.      We unplugged the server from the net. It was performing (attempting to   perform) a Denial Of Service attack on another server in Indonesia,   and the guilty party was also based there.      We firstly tried to identify where on the server this was coming from,   considering we have over 500 sites on the server, we expected to be   moonlighting for some time. However, with SSH access still, we ran a   command to find all files edited or created in the time the attacks   started. Luckily, the offending file was created over the winter   holidays which meant that not many other files were created on the   server at that time.      We were then able to identify the offending file which was inside the   uploaded images folder within a  website.      After a short cigarette break we concluded that, due to the files   location, it must have been uploaded via a file upload facility that   was inadequetly secured. After some googling, we found that there was   a security vulnerability that allowed files to be uploaded, within the   ZenCart admin panel, for a picture for a record company. (The section   that it never really even used), posting this form just uploaded any   file, it did not check the extension of the file, and didn't even   check to see if the user was logged in.      This meant that any files could be uploaded, including a PHP file for   the attack. We secured the vulnerability with ZenCart on the infected   site, and removed the offending files.      The job was done, and I was home for 2 a.m.            The Moral   - Always apply security patches for ZenCart, or any other CMS system for that matter. As when security updates are released, the whole   world is made aware of the vulnerability.   - Always do backups, and backup your backups.   - Employ or arrange for someone that will be there in times like these. To prevent anyone from relying on a panicy post on Server   Fault.


I'm sure most of you know this phrase, what does it mean? Does it represent stupidity cutey thing that they do? What makes this phrase so popular?

I've seen this expression probably a dozen times in anime and manga. There are many variants, but they all have the character's tongue sticking up out of the side of their mouth. Their eyes are also typically big and sometimes in the shape of a backwards の character, or sometimes winking. Here are a few examples, though there are many more:  Bakemonogatari:    Clannad:    Tonari no Kashiwagi-san:    What is the origin of these expressions? Are they referring to a particular art style or character?