Why are superzoom lenses small but giant telephoto lenses huge?

This week I've read two news stories about two different camera lenses that can magnify things that are very far away.  The first is the , which is a point-and-shoot camera that costs $600, has an 83x optical superzoom lens ("the same field of view as a 2,000mm lens on a full-frame camera"), and lets you see the craters of the moon.  The second is the , which weighs 36 pounds, costs $180,000, and can take portraits of people a half mile away.  A non-photographer might ask, "Why would somebody spend their life savings on a gigantic telescope of a lens when you could take far away pictures with a handheld camera for 1/300th the price?"  Well, I am basically a non-photographer, and I would like to ask that question. What does the big one give you that the little one doesn't provide? I understand that small changes in lenses can make a big difference in size and price, but this seems to be of a different scale entirely.   What is going on with the optics of the lenses that makes the small one able to be so small and the big one have to be so...big?   I'm trying to get a basic intuition for what makes lenses different, and I realize I don't understand enough about how lenses work to even know how to compare these apples and watermelons.


the sum of the series $\sum \frac{n}{2^{n}}$

the sum of the series $\sum_{n=1}^\infty \frac{1}{2^{n}}$ is 1. It is easy to find since it is a g.p.  the series $\sum_{n=1}^\infty \frac{n}{2^{n}}$ is convergent by ratio test. How will find the infinite sum? I am  trying to rearrange the terms and to use the rearrangement theorem, but I can't complete


Find all holomorphic functions $f: \mathbb{C} \rightarrow \mathbb{C}$ such that, for all $x,y\ \epsilon \ \mathbb{R} $ , $Re(f(x+iy)) := 2xy$   So I figured out thus far that $\frac{\partial u}{\partial x}:= 2y$ and $\frac{\partial u}{\partial y}:= 2x$ with $u(x,y):= 2xy$. Now by the Cauchy-Rieman equations I can see that  $\frac{\partial v}{\partial y}:= 2y\ $ and $\frac{\partial v}{\partial x}:= -2x\ $ for some $v(x,y)$.  However I seem to be stuck finding $v(x,y)$. Can anybody help me out here, would be very happy.


How do I recover files from SD Card that went from one camera to another?

A couple of years ago, I made the mistake of transferring my SD card from one camera (a Polaroid point-and-shoot that had low battery charge at the time) to another (an AGFA Photo point-and-shoot). I had no idea the files would be damaged, so I learned the hard way not to share SD cards between different cameras. :(  At one point, I was still able to review photos on the computer, but now the jpegs seem completely unreadable. I am still able to open the SD  card on my computer, but the files yield the same error message that I am unable to view the image.  I've tried Zero Assumption Recovery. It was able to retrieve a few files, but from a different session.  Is there any other way for me to get my photos back?


Should I expose my Active Directory to the public Internet for remote users?

I have a client whose workforce is comprised entirely of remote employees using a mix of Apple and Windows 7 PCs/laptops.   The users don't authenticate against a domain at the moment, but the organization would like to move in that direction for several reasons. These are company-owned machines, and the firm seeks to have some control over account deactivation, group policy and some light data-loss prevention (disable remote media, USB, etc.) They are concerned that requiring VPN authentication in order to access AD would be cumbersome, especially at the intersection of a terminated employee and cached credentials on a remote machine.  Most services in the organization are Google-based (mail, file, chat, etc.) so the only domain services are DNS and the auth for their Cisco ASA VPN.  The customer would like to understand why it is not acceptable to expose their domain controllers to the public. In addition, what is a more acceptable domain structure for a distributed remote workforce?  Edit:   is in use for a handful of Mac clients.


Show that if $(x_n)\rightarrow 2$ then $(1/x_n)\rightarrow 1/2$

Given a convergent sequence $(x_n)\rightarrow 2$, I am asked to prove $(1/x_n)\rightarrow 1/2$ without the use of the algebraic limit theorem.   Here is what I have tried: Let $\epsilon>0$ be arbitrary. We must prove that $|1/x_n-1/2|<\epsilon$. Observe that $$|1/x_n-1/2|=\frac{|x_n-2|}{2|x_n|}$$ and we can make $|x_n-2|$ as small as we like. However, I'm not sure how to choose $N$, and what to do with the $|x_n|$ in the denominator.


This isn't a particularly major issue, but I've had this thing nagging me for a while. When looking at QGIS 3.4's global variables, user_full_name is assigned my given and surname, which includes a diaeresis (¨) somewhere in there. I can't seem to find any way to get QGIS to switch/adapt encoding and display the name correctly. The accented character gets switched to that ubiquitous black rhombus.  I looked for info on this behavior and found moderately similar issues like  and  but it's not exactly the same problem as it's not a geodata encoding issue but rather how QGIS deals with values pulled from the OS.  I have tried unchecking the Override system locale tickbox in Options|General as I prefer to use American English even though my OS is set to Canadian French. No effect to observe.  There's somewhat of a workaround right now which is to fix the name in the Project variable project_author as it is editable (it's filled with the offending global variable by default).  I'm curious to know, though, if someone has encountered this before and if there's a solution in QGIS.


Python, Unicode, and the Windows console

When I try to print a Unicode string in a Windows console, I get an error . UnicodeEncodeError: 'charmap' codec can't encode character .... I assume this is because the Windows console does not accept Unicode-only characters. What's the best way around this? Is there any way I can make Python automatically print a ? instead of failing in this situation? Edit:  I'm using Python 2.5.  Note: @LasseV.Karlsen answer with the checkmark is sort of outdated (from 2008). Please use the solutions/answers/suggestions below with care!!  is more relevant as of today (6 Jan 2016).


How to block Hot Network Questions in the sidebar of Stack Exchange network?

Operating system is Ubuntu 14. Firefox is 50.1.0  This is what I have tried:    I restarted firefox after that. There was no effect.  What is the way to block those hot questions on the sidebar?


Ring homomorphisms from $\mathbb{Z}_{12}$ to $\mathbb{Z}_{20}$

How many ring homomorphisms are there from $\mathbb Z/12\mathbb Z$ to $\mathbb Z/20\mathbb Z$?   In all cases, describe the image and kernel of the homomorphism.  I am not even sure how to proceed on counting how many homomorphism are there any help appreciated.


Given $A$ an integral domain and $A[x_1, \ldots, x_n]$ a polynomial ring over $A$. Let $s = \prod_{1\leq i \leq n}{x_i}^{\alpha_i}$. What is the Krull dimension of $A[x_1, \ldots, x_n]_s$? Will it be equal to Krull dimension of $A[x_1, \ldots, x_n]$?


What is the difference between [[ $a == z* ]] and [ $a == z* ]?

Is there is any difference between these two.  [[ $a == z* ]]   and   [ $a == z* ]    Can I have an example where they would have different outputs?  Furthermore, how does the working of [[ ]] differs from [ ]?


How to prevent character from jumping multiple times

I just started learning Unity yesterday, Ive asked in many forums/servers this question but no one gave me a solution for my problem (in the title) so here's my code:  public class scr : MonoBehaviour {     public float speed = 1f;     private Rigidbody rb;     public float jumpforce = 1f;     private bool isGrounded;     public float disToGround = 0.5f;      //Vai obter o rigid body do character     void Start()     {         rb = GetComponent<Rigidbody>();     }      //Movimentaçao do character      void FixedUpdate()     {         float moveHorizontal = Input.GetAxis("Horizontal");         float moveVertical = Input.GetAxis("Vertical");          Vector3 movement = new Vector3(moveHorizontal, 0f , moveVertical);          rb.AddForce(movement * speed);          if (isGrounded == false && Input.GetKeyDown(KeyCode.Space))         {             rb.AddForce(Vector3.up * jumpforce, ForceMode.Impulse);         }     } }


Attempt to invoke virtual method 'boolean ...' on a null object reference

I am creating a function whereby I retrieve contacts via a webservice, but I want to create bookmarked/favorited contacts that are to be added into an SQLite database. After I add the favorite, and return to the activity I need to pass in the contact details to determine whether or not the contact has been marked as a favorite, and if it is, my FloatingActionButton would be of a certain set color. However (since I am using a webservice to retrieve the details first), I am doing this part of the code in the onPostExecute method of my async task. It supposedly passes in to a method in my SQLite Database helper, to check whether that contact's email exists or not, and if it exists, my FloatingActionButton is red, if not it stays my app's primary color.  This is the code in my onPostExecute      // check whether fav is selected     boolean found;     if (tvConEmail.getText().toString() != null) {         try {             found = db.findFavByEmail(tvConEmail.getText().toString());             if(found){                 favSelected = true;             }         } catch (NullPointerException e) {             e.printStackTrace();             favSelected = false;         }     }   However, no matter if the favorite is IN the database or not I catch the NullPointerException. This is my method in the database helper  public boolean findFavByEmail(String email) {         boolean exists = true;         SQLiteDatabase db = this.getReadableDatabase();         Cursor cursor = db.query(TABLE_FAVORITES,                 COLUMNS,                 "email = ?",                 new String[]{email},                 null, // group by                 null, // having                 null, // order by                 null); // limit          exists = (cursor.getCount() >0);         cursor.close();          return exists;     }   How can I solve this problem and retrieve the boolean found without a NullPointerException? Or maybe my problem is with the findFavByEmail method which purpose is to check whether there is an existing record with the email passed in as a parameter? I have checked and logged, my email value is not null.


Need to prevent SBS 2003 disabling its DHCP server if it sees another DHCP server on network

The DHCP server on our SBS 2003 server shuts itself down automatically after a couple of hours of having a Hamachi gateway running on the same LAN.      The server incorrectly assumes that Hamachi might start assigning DHCPs to other clients on the LAN.  While the Hamachi gateway client does indeed have a DHCP server, it only assigns IPs to computers making inbound VPN connections- not to PCs on the LAN.  Does anyone know of a way to override this behaviour on SBS 2003? Perhaps a registry hack?  I know the server has good intentions when it disables its DHCP server in this situation... however, in avoiding a non-existent problem, it is actually creating a real problem.


How to round a double to n length (not n decimal places)?

I have been trying to find a way to make sure the length of the double "value" is not larger than 10. However, this is becoming difficult to program since I am not rounding it to a certain number of decimal places.   For example, 1234567.8912 and 12.345678912 are both larger than 10 digits however, they will have to be rounded to a different number of decimal places. My logic was to find where the decimal point occurs and rounding the double to "10 - number of digits before the decimal place".   I created two different methods and both methods won't seem to work correctly.      if ((Double.toString(value)).length()> 10){         int counter = 0;         double no_of_dec = 1;         double no_of_int = 1;         double new_value = 0;         for (int i = 0; i< (Double.toString(value)).length(); i++){             if ( (Character.toString((Double.toString(value)).charAt(i))).equals(".") ){                 counter = 1;             } if (counter == 1){                 no_of_dec = no_of_dec * 10;             } else if (counter == 0){                 no_of_int = no_of_int * 10;             }         }          no_of_dec = no_of_dec / (no_of_int);         new_value = (double)Math.round(value * 100d/100d);         return Double.toString(new_value);     } else {         return Double.toString(value);     }       if ((Double.toString(value)).length()> 10){         double no_of_dec = 0;         double no_of_int = 0;         double new_value = 0;         for (int i = 0; i< (Double.toString(value)).length(); i++){             while (!(Character.toString((Double.toString(value)).charAt(i))).equals(".")){                 no_of_int = no_of_int + 1;             }         }         no_of_dec = (Double.toString(value)).length() - no_of_int;         no_of_dec = no_of_dec * 10;         new_value = (double)Math.round(value * no_of_dec/no_of_dec);         return Double.toString(new_value);     } else {         return Double.toString(value);     } }


Name of the app which shows colorful Android and sweets in grid

Can someone help me what is the name of this app? I can't find the name of it. Is it a spyware?


Context: Equation 1 requires substituting A for B.  Does this mean all "A" in equation 1 is replaced with "B" or vice versa?


How do I turn off "show mouse" when I press Ctrl?

I've searched everywhere in the system settings but I still can't find it.


Sometimes I need to look up a certain cross section, say the inclusive Z production cross section at $\sqrt{s}$ = 7 TeV. Is there a place where 'all the' cross sections are tabulated (experimental and theoretical), like the branching ratios are in the ? I know it might be hard, because there is often not 'the' cross section and you have to take into account generator cuts and the likes, but still there should certainly be a review somewhere?


Evaluate $\int_0^1 \log \left( \frac{x^2+\sqrt{3}x+1}{x^2-\sqrt{3}x+1} \right) \frac{dx}{x} $

I'm trying to evaluate this integral but i'm having a lot of problems with the standards method.  $$\int_0^1  \log \left( \frac{x^2+\sqrt{3}x+1}{x^2-\sqrt{3}x+1} \right) \frac{dx}{x} $$  I've tried integration by parts, taylor expansion of the $\log$ function and some substitution.  Wolfram says that the results is $\frac{\pi^2}{3}$. I think that it divide the integral in four parts factorizing the argument of the logarithm with complex numbers, anyway it seems to take too long as approach. Do you have any suggestions?  I've also noticed that the function is even so we could also write the integral as $$ \frac{1}{2} \int_{-1}^1  \log \left( \frac{x^2+\sqrt{3}x+1}{x^2-\sqrt{3}x+1} \right) \frac{dx}{x} $$


What's a good threadsafe singleton generic template pattern in C#

I have the following C# singleton pattern, is there any way of improving it?       public class Singleton<T> where T : class, new()     {          private static object _syncobj = new object();         private static volatile T _instance = null;         public static T Instance         {             get             {                 if (_instance == null)                 {                     lock (_syncobj)                     {                         if (_instance == null)                         {                             _instance = new T();                         }                     }                 }                 return _instance;             }         }          public Singleton()         { }      }   Preferred usage example:   class Foo : Singleton<Foo>  { }    Related:


Java. static {instance = new Instance();} What does it mean?

Java. I have found this code in my book about Spring Framework. What does it mean?:  static {    instance = new Instance(); }


It's a dual core Atom 1.33Ghz processor (2G ram). Bought it with Windows 7 illegally installed, but it always ran extremely slow anyway, so I wiped it and installed 14.04.   I expected it to be slow, but it's totally unusable. Like 80 seconds to open the unity search, then 10 seconds per letter when you type. Some things are almost usable, but others are impossibly slow. Also, browsers freeze up after about 5 minutes of use. So do most other programs.   I've disabled graphics, switched to GNOME, tried to install nvidia drivers, but nothing helps. Like, no difference at all.   Would an older version of Ubuntu run faster, or am I missing something fundamental? I ask because  seems to indicate 12.04 is the preferred system, though maybe it's just an old page?


Could any one please help regarding issue in SQL Server I have a query which returns 4 counts with different Objid. I want to merge them based on objid & value separated with a comma (,)


Redirect a single page to another page with HTML

I am trying to redirect a single page on my website to another websites page. I don't want to redirect the entire website because all of it is still relevant; so http://new-website.com'" /> doesn't work.  Does anyone know an HTML code I can use to do this?


I have HP G56 laptop and it originally came with Windows 7 which microsoft updated to windows 10 for free. I did clean install and so i don't have option to go back to windows 7.   I want to try Ubuntu as after upgrading to windows 10, my laptop runs slow. I have created bootable USB several times but can't make my laptop to boot. I saw tutorials and already setup bios to boot from USB first and also turnoff fast boot from power option. I can however use other USB for windows 10 that i have and that works but not from Ubuntu USB


How can apacite be configured to use title case for booktitle of @inproceedings bib entries?

I have a lot of citations to published conference proceedings in my document but apacite formats the booktitle field in sentence case rather than title case (as is specified in the APA publication manual (6th Edition). Is there a way to correct this behaviour?  For example, it will print:  Jones, J. (2005). SuperSense: An interactive instrument. In A. Anderson (Ed.), Proceedings of the australasian computer music conference (pp. 123–127). Fitzroy, Australia: ACMA. doi: 10.1073/234784975234  Rather than:  Jones, J. (2005). SuperSense: An interactive instrument. In A. Anderson (Ed.), Proceedings of the Australasian Computer Music Conference (pp. 123–127). Fitzroy, Australia: ACMA. doi: 10.1073/234784975234  Here's an MWE:  \documentclass{article} \usepackage[natbibapa]{apacite} \bibliographystyle{apacite} \usepackage{filecontents}  \begin{filecontents}{mylib.bib} @inproceedings{Jones:2005uo,   Address = {Fitzroy, Australia},   Editor = {A. Anderson},   Author = {J. Jones},   Booktitle = {Proceedings of the Australasian Computer Music Conference},   Pages = {123--127},   Publisher = {ACMA},   Title = {{S}uper{S}ense: An Interactive Instrument},   Year = {2005},   Doi = {10.1073/234784975234} } \end{filecontents}  \begin{document} \citet{Jones:2005uo} demonstrated some very interesting musical interactions that stole the show. \bibliography{mylib} \end{document}   This question is not a duplicate as it relates specifically to using the apacite bibliography style and compliance with the APA publication manual. There are other questions that deal more generally with capitalisation in BibTeX, however, I think it's reasonable to have separate discussions related to specific bibstyles as they can have complex and different configurations.


Java - User input using Scanner not working with a string

I am trying to ask the user for a simple 'yes' or 'no' response using:  Scanner user = new Scanner( System.in );  String response = user.nextLine();   I am then using the value of 'response' in a series of IF statements to output a specific piece of text.  However every time I enter in a response the program just terminates and I'm not sure what I am doing wrong.  Here's all of the code to make things more clear:  import java.util.Scanner;  public class vedant {  public static void main (String args[]){     System.out.println("Is it past 11.30pm?");     Scanner user = new Scanner( System.in );     String response = user.nextLine();     if (response == "yes") {         System.out.println("tut tut tut...");         user.close();     } else if (response == "no") {         System.out.println("Good boy");         user.close();     } }   }  BTW I'm new to Java so sorry if this is quite a basic mistake.


The tangent mapping in algebra and algebraic geometry - when does it exist?

In differential geometry, for a smooth map $f:M\to N$ one gets the pushforward of the tangent sheaf $T_f:TM\to f^* TN$. Question is does the same work in algebra, that is, if I have a map $f:A\to B$ of commutative algebras, does it yield a map $Tf: Der (B)\to B\otimes_A Der(A)$ without additional requirements like the module of Kahler differentials being dualizable or something like that? I guess in the later case it should be a consequence of the usual map $B\otimes_A \Omega_A\to \Omega_B$. Edit: I just found a very general solution to the problem:


How to apply Givens rotation to a matrix with complex elements?

I am trying to apply  to a matrix, I could do it when the matrix had real values. For example, for this matrix: $A=\begin{bmatrix}3&5\\4&1\end{bmatrix}$ I can simply calculate $sin$ and $cos$ like this: $r=\sqrt{3^2+4^2}=5$ $cos=3/r=0.6, sin=4/r=0.8$ But when the values are complex numbers, I have a problem in determining which value of $r$ to select. For example: $A=\begin{bmatrix}3+1.5i&5-7i\\4-2i&1+3i\end{bmatrix}$ $r=((3+1.5i)^2+(4-2i)^2)^{0.5}=4.403-0.795i$ or $-4.403+0.795i$ So the question is, Which value of $r$ should I select? What is the criteria?


If tag only changes are too minor don't allow them to be made

So I deliberately didn't make an edit solely to remove a tag to this question  as I've been told and learned that such an edit is too minor.  As I wasn't in the mood to get a rejection or clean the whole question up I just posted a comment.  (Is that the best course of action?)  Similarly another post describes others' approaches to minor tags:   It is then frustrating to see the review a handful of moments later when another low ranked user made the edit and it went through the review queue and got approved even though upon closer inspection there are other glaring problems.  Then an idea struck me. If 'tag only' edits are indeed deemed too minor to be made, then simply don't allow an edit that only changes a tag from a non-higher rep user.  And/or introduce a separate level of trust to give people the ability to add/remove tags from questions that requires less rep than that to make a full-on edit. This could remove a cause of a large body of 'too minor' edits while also encouraging users to get more  involved. Just an idea obviously.  In the end something to usher in some consistency to reviews or to allow us lower rep folk to flag a review to be reviewed would be nice :-p  Update I'm aware that if the content is already perfect, it's perfectly valid. I'm more interested in other cases.


How do I disprove that $|\mathcal P([0,1]) \setminus \mathcal P((0,1))| > |\mathcal P(\mathbb{N})|$

I am trying to disprove this proposition $|\mathcal P([0,1]) \setminus \mathcal P((0,1))| > |\mathcal P(\mathbb{N})|$, where $\mathcal P (X)$ is the power set of $X$, but I am not sure how. I hope someone here could help me, thanks.


ANdroid: java.lang.NullPointerException: Attempt to invoke virtual method 'double android.location.Location.getLatitude()

I am creating a directional application in android . that why i have to get the location from the android device here is my code when i run this code it give me Exception at these line   curlat = location.getLatitude(); curlng = location.getLongitude();   This is whole function   public void newlocation(Context context) {     locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);     // Define the criteria how to select the location provider     criteria = new Criteria();     criteria.setAccuracy(Criteria.ACCURACY_COARSE); // default     // user defines the criteria     criteria.setCostAllowed(false);     // get the best provider depending on the criteria     provider = locationManager.getBestProvider(criteria, false);     // the last known location of this provider      if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {         // TODO: Consider calling         //    ActivityCompat#requestPermissions         // here to request the missing permissions, and then overriding         //   public void onRequestPermissionsResult(int requestCode, String[] permissions,         //                                          int[] grantResults)         // to handle the case where the user grants the permission. See the documentation         // for ActivityCompat#requestPermissions for more details.         return;     }     Location location = locationManager.getLastKnownLocation(provider);     mylistener = new MyLocationListener();     if (location != null) {         mylistener.onLocationChanged(location);     } else {         // leads to the settings because there is no last known location         Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);         startActivity(intent);     }     // location updates: at least 1 meter and 200millsecs change     locationManager.requestLocationUpdates(provider, 200, 1, mylistener);     // String a=""+location.getLatitude();     // Toast.makeText(getApplicationContext(), a, 222).show();      curlat = location.getLatitude();     curlng = location.getLongitude();     Log.d("************", "1111111111111111");     new GetAddressTask(this).execute(location);  }


On the kit 18-55 lens that came with my Nikon D5100 I have noticed that when trying to focus on infinity for shots in dark conditions (star-trails, etc) the lens tends to move past infinity out of focus and need to be brought back a little to get a clear infinity focus point.  Is there a good trick for getting a clear infinity focus when in pitch dark conditions?


Show unselected vertices in UV/Image editor?

Is there a way to show all vertices (even if they're unselected in the 3D view) in the UV editor?


Windows 10: How to remove unwelcome hidden networks

I have 3 networks showing up which I have not selected. Worse still they have "connect automatically" checked. If you try to unconnect them, they immediately go back to connect automatically. If you try to remove them through the "network and internet" page, they do not appear under "manage known networks".  I do have a virtual machine installed but this should not have it's own dedicated wireless network. And if it did, it would be named something I would recognise.   How do I get rid of these networks. I feel like i have been hacked.   Thanks!


Just a wild idea of mine, can I reuse ER mask if I'm blasting it in the microwave to kill coronavirus or anything else on it? Will this disinfect the mask if there is anything on it, this is so I'll be able to use it again...


Actions to take to improve validation accuracy

I am training a CNN model which takes input of 128x128x3 color images and is trained to predict the coordinates of 4 landmarks on it (i.e, there are 2 * 4 = 8 values to be predicted if we count x and y coordinates separately. All of the coordinate values are scaled in [-1, 1] Following is my model class: class LandmarkLocalizerCNN:      def __init__(self, input_shape, landmark_point_count):         self.input_shape = input_shape         self.landmark_point_count = landmark_point_count      def first_level_cnn(self):         model = models.Sequential()          model.add(layers.Conv2D(8, (5, 5), padding = 'same',activation = 'relu', input_shape = self.input_shape))         model.add(layers.Conv2D(8, (5, 5), padding = 'same',activation = 'relu', input_shape = self.input_shape))         model.add(layers.Conv2D(16, (5, 5), padding = 'same',activation = 'relu', input_shape = self.input_shape))         model.add(layers.Conv2D(16, (5, 5), padding = 'same',activation = 'relu', input_shape = self.input_shape))         model.add(layers.MaxPooling2D((2, 2)))          model.add(layers.Conv2D(32, (3, 3), padding = 'same', activation = 'relu'))         model.add(layers.Conv2D(32, (3, 3), padding = 'same', activation = 'relu'))         model.add(layers.Conv2D(32, (3, 3), padding = 'same', activation = 'relu'))         model.add(layers.Conv2D(32, (3, 3), padding = 'same', activation = 'relu'))         model.add(layers.MaxPooling2D((2, 2)))          model.add(layers.Conv2D(64, (3, 3), padding = 'same', activation = 'relu'))         model.add(layers.Conv2D(64, (3, 3), padding = 'same', activation = 'relu'))         model.add(layers.Conv2D(64, (3, 3), padding = 'same', activation = 'relu'))         model.add(layers.Conv2D(64, (3, 3), padding = 'same', activation = 'relu'))         model.add(layers.MaxPooling2D((2, 2)))           model.add(layers.Conv2D(128, (3, 3), padding = 'same', activation = 'relu'))         model.add(layers.Conv2D(128, (3, 3), padding = 'same', activation = 'relu'))         model.add(layers.MaxPooling2D((2, 2)))          model.add(layers.Flatten())         model.add(layers.Dense(64, activation = 'relu'))         model.add(layers.Dense(32, activation = 'relu'))         model.add(layers.Dropout(0.2))         model.add(layers.Dense(16, activation = 'relu'))         model.add(layers.Dense(16, activation = 'relu'))         model.add(layers.Dropout(0.2))         model.add(layers.Dense(16, activation = 'relu'))         model.add(layers.Dense(16, activation = 'relu'))         model.add(layers.Dense(2 * self.landmark_point_count))          return model  And here is the created model: first_level_cnn_model = LandmarkLocalizerCNN(input_shape = (128, 128, 3), landmark_point_count = 4).first_level_cnn()  After training for 375 steps I got the metrics as following:  Here are some of my observations:  If I remove dropouts the training accuracy goes higher (around 0.9) quickly even with lesser number of layers. With dropout layers training accuracy doesn't go that higher but in either cases validation accuracy hardly crosses 0.6 In this current architecture the graph shows fluctuations in both training and validation plots with some strange behaviors. For training, the accuracy and loss seems to be negatively correlated but for validation they seem to be positively correlated. But finally both of them saturated and no more improvements.  So what the main problem my model is suffering from. I tried increasing and decreasing the number of layers and also adding or removing dropouts but they only help changing the training accuracy. But the validation accuracy hardly crosses 0.6 whatever I do, so how can I make my model to perform better in unknown cases?


How to rethrow InnerException without losing stack trace in C#?

I am calling, through reflection, a method which may cause an exception. How can I pass the exception to my caller without the wrapper reflection puts around it? I am rethrowing the InnerException, but this destroys the stack trace. Example code:  public void test1() {     // Throw an exception for testing purposes     throw new ArgumentException("test1"); }  void test2() {     try     {         MethodInfo mi = typeof(Program).GetMethod("test1");         mi.Invoke(this, null);     }     catch (TargetInvocationException tiex)     {         // Throw the new exception         throw tiex.InnerException;     } }


I wanted to put an image between to paragraphs. I used the following codes:   \documentclass[12pt,a4paper]{article}   \usepackage{graphicx}  \usepackage{enumerate}  \begin{document} \begin{enumerate}   \item text   \begin{figure}   \centering   \includegraphics[width=6cm, height=6cm]{set.png}   \caption {$(S,\le)$}   \label{fig:}   \end{figure}   \item text   \end{enumerate}   \end{document}  I want example (i) to be at first, then the image and then example (ii).  But it is appearing as the image attached here. What am I missing here?


How to override css containing '!important' using JavaScript under HTML input objects?

I actually work on a plugin for wordpress and I have problem to dynamically stylize a button form (input[type="submit"]), because some wordpress themes use the "!important" property.  I want to override that use JavaScript under HTML input objects, because i want to call some css value using php.  In the demo below I have volentary put the "!important" property in the css style to try to override it.      input[type="submit"] {     font-family: FontAwesome, 'Diplomata SC', "Helvetica Neue", helvetica, arial, sans-serif;     font-weight: bold;     text-transform: uppercase;     display:block;     background-color: #333333!important;     color: #FFFFFF!important;     padding: 5px 11px;     letter-spacing: 2px;     border: none;     cursor: pointer;     font-size: 15x;       border-radius: 3px;     box-shadow: 0 -3px rgba(0, 0, 0, 0.14) inset; }  input[type="submit"]:hover {   background-color: #27ccc0!important;   color: #FFFFFF!important; } <input  onmouseover="this.style.backgroundColor='#6ce033'; this.style.color='#FFF'; return true;" onmouseout="this.style.backgroundColor='#40c200'; this.style.color='#FFF'; return true;" type="submit">       <?php function add_button($id) {    $stored_meta = get_post_meta($id);  $btn_bg_color = esc_attr( $stored_meta['btn_bg_color'][0]);  $btn_txt_color = esc_attr( $stored_meta['btn_txt_color'][0]);  $hover_btn_bg_color = esc_attr( $stored_meta['hover_btn_bg_color'][0]);  $hover_btn_txt_color = esc_attr( $stored_meta['hover_btn_txt_color'][0]);      echo '<input onmouseover="this.style.backgroundColor='."'".$btn_bg_color."'".'; this.style.color='."'".$btn_txt_color."'".'; return true;"  onmouseout="this.style.backgroundColor='."'".$hover_btn_bg_color."'".'; this.style.color='."'".$hover_btn_txt_color."'".'; return true;" type="submit">'  ?> }     Above, a concrete example of what I want to do. Changing the style depending the post id.


How do you defrag and remove cookies on Ubuntu

I would like to know how you defragment and remove cookies on Ubuntu.


I am a young man who has recently reached a point of financial stability. I'm starting to think about long-term plans which may one day buy a home, or provide for myself in old age.  This raises the question of savings and investments, which causes me some ethical concerns.  I don't have an issue with investment in its basic form. Providing people money to help them do business, allowing it to grow and gaining interest in gratitude is not an issue for me.  The problem comes when we realise that a lot of the most financially successful businesses succeed due to addiction in their customers. Alcohol, tobacco, gambling, pornography, high interest financial services, and a number of others all rely on customers becoming dependent, unable to keep from buying their services. Because of this dependency, a lot of money is made in ethically questionable businesses, and professional investors (whose job is only to make as much money as possible) will choose to put money into these businesses.  The alternative would be to look in to investing myself. Although without some good practical knowledge, this would resemble gambling, throwing my money at whatever business takes my fancy, hoping for the best.  Being concerned about ethics, how can I go about investments and/or savings? Are there businesses which professionally invest ethically?


Would it be possible for some to bend two elements?

After reading this question  While it seems that it would break one of the rules of the show, that only the avatar can master all four elements. There would also be good reasons as to why someone couldn't learn all four, there is always the opposing element that is hardest for the Avatar to learn. I don't see any reason why someone couldn't learn to bend two elements (not master, but just bend since Thadeus's Answer  to the previous question is apparently the Definitive Answer on the subject.)    Many benders do learn to bend beyond their element such as Toph becoming a metal bender and Katarra bending blood. Now metal is considered part of the Earth but so is sand and it seems that sand is moved more like water. Iroh was able to adapt a water bender technique to fire bending which means it is possible to learn and use different bending styles. Also Iroh spent time connecting to the spirit world and that seems to be the main reason the Avatar is able to bend all 4 elements. So if someone was connected to the spirit world or even their past life that would fulfill that requirement.   Would it be possible to bend two elements?  There do seem to be times where it has been done in the series such as bending mud which is both Earth and Water. And there would definitely be limits such as a Earth bender couldn't bend Air and a Water bender couldn't bend Fire. But why couldn't a Fire Bender learn to bend Air. They both use breath control as a main focus of their bending. It also states on the Energybending wiki entry that all bending used to be done as an inner bending but that it became element bending.   So with new bending techniques being formed all the time, already stated used of combined elements being used, an assumed spiritual connection to a past life or a spiritual journey been taken, energybending rediscovered is it possible that two elements could be bent by one bender who is not the Avatar?


Is it possible to host a web server from behind a NAT

My PC is behind a NAT router that has a public IP address. If I want to host a website then I believe I need a domain name which I can purchase from some site which would pledge to resolve all DNS requests for that domain name and send the IP address of my NAT router (assuming I do not want to host my domain name on their servers). Now I want to host a web server on my computer.   What changes should be done to the NAT router's configuration to forward all HTTP requests for example.com to my PC in the internal network. Is the above strategy correct? Is it commonly used?


What does "either A or B" mean precisely, and how can I prove it?

I am in an argument about the phrase "either A or B". I believe it is necessarily exclusive, meaning it refers the possibilities of A or B but not both. But, after scouring the internet, I can't find a reliable source to back me up. How could I definitively determine whether I am right or not? (I found  by the way, but it refers to "either-or" and not the longer phrase "either [one thing] or [another thing]")


This is a fresh install on UEFI system. I set up 5 partitions on an nvme ssd:   1GB /boot 16MB biosgrub 512MB efi partition 50GB / root 450GB unused partition (for steam)   /home is located in a separate physical drive, also new (no data in it)  After install, when I choose to boot from the nvme, I only see blank screen with blinking underscore. I tried boot-repair from a livecd but it says no internet connection. I tried to turn off internet related functions, and it asks me to add x86 efi repository. I don't know how to do that  I tried to use update-grub but it says no canonical path for /cow. I mounted the efi partition and tried grub-install --efi-directory but it says "can't find disk"  The partitions were created from scratch via ubuntu installer  Not sure what else can be done at this point


Question: The value of: $$(1+\tan 1^o)(1+\tan 2^o)(1+\tan 3^o)...(1+\tan 44^o)$$ is:      A) 2       B) A multiple of 22      C) A multiple of 4      D) Not an integer   I'm not sure how I would solve this question. However, by intuition, I would say that the number wouldn't be an integer. As all the terms in the bracket are between 1 and 2, their product shouldn't give an integral value. Am I right?


How to verify Ubuntu will install on USB

Just created latest Ubuntu on USB stick with ISO. Have loaded from it on my MAC to point one can "try unbuntu" before install OR one can "Instal". How can I be sure it will install on USB and not overwrite MACOS on hard disc. Or am I worrying too much and should just go for it - I have backed up MacOs on hard drive.


Prove by mathematical induction that $\forall n \in \mathbb{N} : \sum_{k=1}^{2n} \frac{(-1)^{k+1}}{k} = \sum_{k=n+1}^{2n} \frac{1}{k} $

Prove by mathematical induction that:  $$\forall n \in \mathbb{N} : \sum_{k=1}^{2n} \frac{(-1)^{k+1}}{k} = \sum_{k=n+1}^{2n} \frac{1}{k} $$  Step 1: Show that the statement is true for $n = 1$:  LHS = $$\frac{(-1)^{1+1}}{1} = 1$$  RHS = $$\frac{1}{1} = 1$$  Step 2: Show that "if true for n = p, then true for n = p + 1":  Starting with the LHS of equality for $n = p + 1$ and try to get to the RHS by using the equality for $n = p$. Simplifying:  $$\sum_{k=1}^{2(p+1)} \frac{(-1)^{k+1}}{k} = \sum_{k=1}^{2p+2} \frac{(-1)^{k+1}}{k}$$  Breaking out the first two term:  $$ \sum_{k=1}^{2p+2} \frac{(-1)^{k+1}}{k} = \frac{(-1)^{2p+3}}{2p+2} + \frac{(-1)^{2p+2}}{2p+1} + \sum_{k=1}^{2p} \frac{(-1)^{k+1}}{k} $$  The last term can now be exchanged for the RHS in the original equality:  $$\frac{(-1)^{2p+3}}{2p+2} + \frac{(-1)^{2p+2}}{2p+1} + \sum_{k=1}^{2p} \frac{(-1)^{k+1}}{k} = \frac{(-1)^{2p+3}}{2p+2} + \frac{(-1)^{2p+2}}{2p+1} + \sum_{k=p+1}^{2p} \frac{1}{k}$$  Since $2p+3$ is odd and $2p+2$ is even, we get:  $$\frac{(-1)}{2p+2} + \frac{1}{2p+1} + \sum_{k=p+1}^{2p} \frac{1}{k} = \frac{(-1)}{2p+2} + \sum_{k=p+1}^{2p+1} \frac{1}{k}$$  ...because we can easily absorb the second term in the third term sum. However, I am stuck here because the first term is negative. I probably made a trivial error somewhere, but I am unable to find it. Any suggestions?


I searched for 15 minutes and to me the syntax still isn't clear... would this:  */5 8,9,10,11,12,13,14,15,16,17,18,19,20 * * *     run the job every 5 minutes from 8(8am) to 20 (8pm)?


import java.util.*; import java.lang.*;  class password {     public static void main(String[] args)     {         int i;         String pass,temppass;         Scanner s=new Scanner(System.in);         System.out.println("Enter Password: ");         pass=s.next();         System.out.println("Re-enter password: ");         temppass=s.next();         if(temppass==pass)         {             System.out.println("Sucess");         }         else             System.out.println("failed");     } }   I wrote this basic code in Java to match my password input. Even if I enter the correct password, it goes to the else statement, i.e. "failed". What should I do now?


Can a paired (or two group) t-test test if the difference between two means is less than a specific value?

In t-tests (paired or independent) we test if the difference in means if 0 (or another value).  I'm wondering if it's possible to instead test if the difference is less than x?


Diagrammatic Representation of non-Gaussian perturbation expansions

I have no experience in graph theory and am a little confused with how Hugh Osborn represents a perturbation expansion with diagrams on page 15 of  notes.  We have a perturbation expansion     My questions are:  1. In the diagrammatic interpretation part, 2 points are joined to create one line. So shouldn't a vertex with $k$ indices be at the intersection of $k/2$ lines?  2. If $A_{ij}^{-1}$ is a straight line from $i$ to $j$, how do we have a vertex      with only one line?  3. Where do the points $i,j,k,l$, etc. go on the loops?


I want to digest a multipart response in C++ sent back from a PHP script. Anyone know of a very lightweight MIME parser which can do this for me?


Installing 3rd party python libraries for QGIS on Windows

How can I use 3rd party libraries on QGIS plugins on Windows?   I've developed a plugin that uses rasterio and numpy for a customer, but he's having problems installing rasterio and numpy.  Actually rasterio and numpy were installed in it's main system Python (C:\Python27), but I need QGIS Python to recognize it.


When I attempt to add XY Data to my map the lat and lon coordinates are projected in meters for example (-82, 34) becomes -82 meters and 34 meters. The GCS and Projection for both the new layer and the data frame are WGS 1984 Web Mercator (auxiliary sphere). Why is the new layer's XY Data displaying incorrectly?


SSH tunnelling with multiple dynamic port forwardings

I am trying to monitor multiple JVMs running on different servers through an ssh tunnel.  Thanks to one of the UNIX gurus here, I have managed to get this running for a single server by:   Run jstatd on the target server Set up Visual VM to use 9696 as its socks proxy port. On my local PC, run:  ssh -L 2222:server1:22 bastion-host  On my local PC, run:  ssh -o port=2222 -D 9696 -L 1099:localhost:1099 localhost    This does the trick. Now when I try and tunnel to a second server I try:   On my local PC, run:  ssh -L 3333:server2:22 bastion-host  On my local PC, run:  ssh -o port=3333 -D 9696 -L 2099:localhost:1099 localhost    However, the last step complains with:  bind: Address already in use channel_setup_fwd_listener: cannot listen to port: 9696   Has anyone managed to do something similar?  Update:  The reason this is so complex is that jstatd is an RMI server application:    As with RMI applications, these register with an rmiregistry. Using rmi through a firewall requires me to use SOCKS as described here:    Unfortunately, visualvm only lets me set the SOCKS proxy port once, and the -D option won't allow me to forward the same local port to both servers...


I though that once a question or answer was deleted or closed, the points awarded/decucted by up/down votes were nullified.  I just had a closed question get down voted and it deducted my rep.  Why is dv even allowed on a closed question, and was I wrong about closure/deletion nullifying the rep from votes?


How to text-to-speech output using command-line?

How to get speech output from entered text by using command-line?  Also facility to change speech rate, pitch, volume etc using simple command.


Have unnumbered sections appear in ToC along numbered ones

EDIT (before publication): I found the answer in this question: , but it's a little hidden, so I still choose to publish this question and answer it myself, as I think the question title describes my problem better than the question I extracted the answer from and I estimate it might save somebody else the trouble of looking for the answer in a less specific question. Here comes:  In my document, I have numbered and unnumbered sections. I want both in my ToC. I am almost certain someone else has been looking for a way to achieve this, but I can't even find out how to get to the question I am looking for, so, I'm sorry if this is a duplicate of another question, but I couldn't find it. I'm out of ideas as to what to type in the search field.  \documentclass{article} \begin{document} \tableofcontents \section*{Abbreviations or what have you} \section{The First Section} \end{document}   I would like this example to produce:  "  Table of Contents  Abbreviations or what have you ..................1  1  The First Section ......................................2  "  (Trailing dots to "align" the numbers. No dots for sections in normal ToC.)  Could something similar to [heading=bibintoc] be used? This one makes the bibliography appear in the ToC without a number.   and other similar questions do not hold the answer to my query, as they seek to take away the numbers to the sections and still make a ToC, but it seems all their sections are unnumbered. I really don't know what to look for. If you don't want to post an answer, but a link to another question with an answer that solves my problem, that's ok with me, of course.  Comments and better answers always welcome. I am a beginner in TeX/LaTeX.


I have a separable Hilbert space H. How can one prove that the closed unit ball B is separable?  I'm told it's trivial but I can't see it.  My initial idea is to take the set A (dense set of H) and intersect it with B. This new set is clearly constable and it's closure is in B. but how can I show that B is in th closure of this set?  Thanks for any help


Is this sentence a question or a statement (or other). It ends with a question, so I used a question mark. (Just ignore the tech jargon.)     I get that this should show me the PID of the SIGTERMing process and I successfully   compiled it, but how do I use it?   Edit: Another question, should it be written as (which is correct and which is clearer?)     I get that this should show me the PID of the SIGTERMing process and successfully   compiled it, but how do I use it?


Consider this problem:  A stationary pulley carries a rope, one end of which supports a ladder with a man and the other end a counterweight of mass $M$. The man of mass $m$ climbs up a distance $l$ with respect to the ladder and then stops. What is the displacement of the centre of mass of the system?  Consider the counterweight, the man and the ladder to be one system. Their centre of mass doesn't accelerate if the external force on the system is zero, so the centre isn't displaced. What causes the acceleration in this case? Is it friction due to the pulley?


How come I don't see a close button on Electrical Engineering SE site?

I am a member of a fair number of sites on the Stack Exchange network. On most of them, I see a "vote to close" button on posts. I have 900+ rep on the EE SE, but don't see a close button. That seems odd. Why don't they have one?


What do the numbers in the "@@" line mean in output of diff?

Here is an example of Unix Shell program diff, from Version Control with Git, by Loeliger, 2ed:       Let’s look at the diff in detail.       In the header, the original file is denoted by - - - and the new file   by +++.       The @@ line provides line number context for both file versions.   What do the numbers in the "@@" line mean exactly?


Why is the number next to the review panel link incorrect?

Hi I'd like to know why the number next to the review link on top of the website page always indicate the number of available suggested edits and not the number of all the review tasks available. I doubt StackOverflow is a bugged website so my guess would be that there must be a reason for it. However I can't make myself a reason why it would still show up the available suggested edits when I reviewed my daily 20. Why for instance it is not showing me the number of available late answers to review, since it is most of the time 0 I think that would be useful.


Filtering rows to get only the latest value

I have the following data in a table:  ORDERID, PRODUCT,  QUANTITY 1,       potatoes, 10 1,       oranges,  20 2,       apples,   10 2,       oranges,  15 3,       pears,    20 3,       peaches,  12   I would like to query the table to filter out repeated products (e.g. oranges), taking only the latest (higher ORDERID) value. This should then result in:  ORDERID, PRODUCT,  QUANTITY 1,       potatoes, 10 2,       apples,   10 2,       oranges,  15 3,       pears,    20 3,       peaches,  12


Why Changing Permissions For Some Systems Files is Not Allowed?

I have a rooted  tablet and while browsing my files, i came along this folder: (./0/android/data) in the internal storage ... lets say (X-plore file browser) has the folder: (./0/android/data/x-plore).   For some reason, i wanted  to change the permissions for that program, instead of giving it the permissions: (reading, writing, executing) ... it will be (reading & executing).   The problem is it says (process failed, some file systems do not allow changing permissions) using Root browser or ES File Explorer (both with root access).  1- Why it says i can not change permissions although i have the root access already ?    2- Why it refers to a folder of an external application [(./0/android/data/x-plore)] as a system file ?


Is it essential to use a return 0 statement when we use int main() in c?

What will happen if we don't use it? will the compiler automatically add it like it does in C++?


I'm looking for a book where outcasts from Earth settle on some planet and eventually form seven or so guilds/families/kingdoms/nations. Each nation was known for some special trait. One nation could regenerate almost any wound. Another nation was of spies and could go invisible (?). One nation controlled time to an extent... etc. The name of the book was something like 'outcast' but not that word, only a similar word.


Can I upgrade to Lubuntu 18.04 LTS 32-bit?

Since 18.04 LTS, Ubuntu has stopped providing installers for the 32-bit variant. Can I install 16.04 LTS, then upgrade it to 18.04 LTS instead?  I assume the correct command would be:  sudo do-release-upgrade   What will happen if I have unity-greeter installed before the upgrade? Supposedly I should end with the 18.04 version of it, but Ubuntu has discontinued Unity in 18.04. (I did actually use Lubuntu with Unity greeter). Or the whole ubuntu-desktop for that matter?


How is the '===' operator used in jQuery?

taken from   I don't understand the line  return $.trim(this.value) === "";   I'm guessing it's returning all the input fields whose val are empty...but can someone explain how .trim and === work together?


We are debating the use of Whoever vs Whomever in this sentence "Thanks to whoever fixed this".  What is the correct form? - Thanks to whoever fixed this - Thanks to whomever fixed this!  Any explanation will be highly appreciated.


How could Darth Maul's survival go unnoticed?

They thought the Sith were gone for a thousand years, yet one shows up and kills Qui-Gon Jinn. So how come they did not bother to search his body and find out as much as possible about him?  To forestall easy guesses, keep in mind there is on-going debate on whether Obi-Wan retrieved his lightsaber after the duel (the one he carries in later events is identical to the one in TPM).  I prefer canon answers, but good conjectures are usually great reads, so I won't discourage 'em.


How to remove the last element of the array and free that part of the memory?

For example, If I have an list -   a = [10,2,3,5,17]   I want to tell python that I don't want the element 17 anymore and I want to remove that element and decrease the size of the array by 1.   I know python automatically frees all objects that are not referenced anymore, but how do I tell python that I don't want to use the last index anymore?   I basically want to make my program more memory efficient and remove all the extra space that I don't want dynamically.


How do I solve this problem using extended Euclidean Algorithm? 19d $\equiv$ 1 (mod 96)

I understand through trial and error that d=91, but trial and error is extremely inefficient and slow. I understand that you can use the extended Euclidean Algorithm to find d faster, but I'm encountering some unexpected problem. For some reason, I'm unable to move past the first step, could someone point out what I'm missing. 19d $\equiv$ 1 (mod 96) 96 = 5*19 + 1 $1 = 96 - 5\times19 = 3\times2^5 - 5\times19$


Is it realistic to achieve better results when doing PCA before neural network classification?

I'm doing a data analysis on data with more than 100 dimensions.  After that different ML-Algorithms like NN are applied to it.  When I do a PCA in the first place to reduce dimensionality to somewhat like 3-10, I persistently get better results (as in less miss-predictions) than without it.  My thought was that PCA should just speed up NN, etc, but not make them better?  Is this improvement realistic or did I make a mistake with my PCA?    This is how I´m doing it concretely:  Data; % training input Test_Data; % test input pca_size = 3; % pca size  %Scaling and Centering of Data Scaled = (Data - mean(Data))./std(Data);  coeff = pca(Scaled);  Data_Reduced = Data * coeff(:, 1:pca_size); Test_Data_Reduced = Test_Data * coeff(:, 1:pca_size);


I use a table and when I press a button, results are added to that table. The rows have a button that need to be selected, but it doesn't work  I want to click the button and alert what they say.  Link to fiddle:     var receitas = {   Lulas: ["Arroz de Lulas"],   Vaca: ["Bitoque", "Estufado de Vaca"] };  function get_receita(alimento) {   var pesquisa = [];   for (var key in receitas) {     if (receitas.hasOwnProperty(key)) {       if (key == alimento) {         pesquisa.push(receitas[key]);       };     };   };    return pesquisa[0]; };  $("#pesquisar_receita").click(function() {   var alimento = document.forms["form_refeicao"]["alimento"].value;   $("table").find("tr:gt(0)").remove();   //$("#resultados").css("display", "block");    var pesquisa = get_receita(alimento);   for (var i = 0; i < pesquisa.length; i++) {     //$("#resultado_"+i).text(pesquisa[i]);     $("table tr:last").after("
" + pesquisa[i] + "	<button>Escolher</button>
");   };    $("#resultados").css("display", "block"); });  $("table button").click(function() {   $(this).closest('tr').find('td').each(function(colIndex, c) {     refeicao = c.textContent;   });   alert(refeicao); })  <form id="form_refeicao" onSubmit="return false">
     Prato Principal:     <select id="alimento">       <option value="Vaca">Bife: Vaca</option>       <option value="Frango">Bife: Frango</option>       <option value="Porco">Bife: Porco</option>       <option value="Atum">Peixe: Atum</option>       <option value="Espadarte">Peixe: Espadarte</option>       <option value="Lulas">Peixe: Lulas</option>       <option value="Pescada">Peixe: Pescada</option>     </select>     <button id="pesquisar_receita">Pesquisar</button>

         Resultados:

 </form>


Does it make a difference if we treat the wavefunction as having two real components instead of one real and one imaginary component?

I understand that the wavefunction in Quantum Mechanics is usually treated as a complex vector with one real and one imaginary component.  Does it make an actual difference in terms of the answers we get, if we treat the wavefunction as having two real components instead of one real and one imaginary component, or is it just a matter of convention to treat the wavefunction as having one real and one imaginary component instead of two real components?


SEO International Websites usage of sub domains and ccTLD domains

Is it better to have separate country specific domains (which costs more money) or sub domains which define the country, for better SEO?  e.g.   example.com example.com.au example.co.uk   vs   example.com au.example.com uk.example.com   Assumption: The search engine web master tools, each sub domain are associated to a country. Example au.example.com is associated to the country Australia.  Update #1  I understand that both methods do work, especially when i utilize the assumption, listed above. The question is about: Which method is better? Is there such a small SEO difference between them? Is the first method way way way better than the second with getting better SEO results?  Update #2  A number of folks have suggested that the following is a good/better approach:   example.com/ example.com/au example.com/uk      By adding a country specific ISO   code to the end of the url/the first   folder of the domain can be recognised   as the country.   But a number of SEO mates have suggested that this is a valuable waste of folder level space. Er.. how can I explain. OK, it's been suggested by some SEO experts that if the number of levels or folders in the domain exceeds 5 then the page drops dramatically in importance. Basically, you don't want to make it deep. As such, adding the country as the first level can be considered a waste, especially when it can be handled by the domain OR sub domain - hence the question :)


function validateemail($email) { $v = "/[a-zA-Z0-9_-.+]+@[a-zA-Z0-9-]+.[a-zA-Z]+/";  return (bool)preg_match($v, $email); } // check e-mail address, to see if it's a valid phone number if ($validateemail($email)) { $error = true; echo 'Invalid phone number!'; }   I'm trying to check if an e-mail address is valid by the function validateemail, if it's an invalid phone number a message is displayed and $error is set to true. However I can't seem to get this code to work, there are no syntax errors as far as I know. Any advice would be appreciated.  BTW - I know there are other ways to validate e-mail addresses, this is for a college project and for that purpose we have to use regex.   Thanks in advance!


GitHub and Source Code Protection and Control

I am working in a small startup organization with approximately 12 - 15 developers.  We recently had an issue with one of our servers where by the entire server was "Re provisioned" i.e. completely wiped of all the code, databases, and information on it.  Our hosting company informed us that only someone with access to the server account could have done something like this - and we believe that it may have been a disgruntled employee (we have recently had to downsize).  We had local backups of some of the data but are still trying to recover from the data loss.  My question is this - we have recently began using GitHub to manage source control on some of our other projects - and have more then a few private repositories - is there any way to ensure that there is some sort of protection of our source code?  What i mean by this is that I am aware that you can delete an entire Project on GitHub, or even a series of code updates.  I would like to avoid this from happening.  What i would like to do is create (perhaps in a separate repository) a complete replica of the project on Git - and ensure that only a single individual has access to this replicated project.  That way if the original project is corrupted or destroyed for any reason we can restore where we were (with history intact) from the backup repository.  Is this possible?  What is the best way to do this?  Github has recently introduced "Company" accounts... is that the way to go?  Any help on this situation would be greatly appreciated.  Cheers!


Why is the username still displayed even when it's been deleted using 'userdel'

I added a user with the adduser command and then deleted it withuserdel, but the username is still displayed in the home directory and in the switch account section.    Why does this happen? How do I get rid of it?


C++ : What is the usage of int('0') in this code?

This code Find the sum of all digits that occur in a string.  Example     sumUpNumbers("2 apples, 12 oranges") = 5  //2+1+2   Can anyone explain the need for use int('0') in this code!?  int sumUpDigits(std::string inputString) {    int answer = 0;    for (int i = 0; i < inputString.size(); i++) {       if ('1' <= inputString[i] && inputString[i] <= '9') {       answer += int(inputString[i]) - int('0');     }   }    return answer; }


How to handle question where asker changes conditions?

What do I do with a question where it becomes clear the asker didn't give enough information in the first place? Scenario:  Asker asks, we answer. He won't accept any of our answers and says something like: "Well, I have conditions x and y that need to be filled also, so your solutions won't work". This he did not state in the question.  It only became clear in a comment a long way down the list, to one of the answers.   He has not updated his question after this became clear.   Flag it as    it should be closed for another reason... it is very low quality This question has severe formatting or content problems?   Update his problem for him?


Horizontal bar charts with min and max data in pgfplots

I am trying to create a horizontal bar chart like the one in the picture below. For that I want to use data stored in a table like this: \pgfplotstableread[col sep=comma]{ system,   Tmin, Tmax, limitmin, limitmax {a},      20,     50,     10,      30 {b},     10,     60,     15,      60 {c},      15,     78,     0,       0  }\datatable  The closest I came to a result was by manually typing in the coordinates. But the stacked bar chart keeps adding/ subtracting the values and I cant figure out how to let a bar start from a value different to zero. \begin{tikzpicture} \begin{axis}[ xbar stacked, stack negative=on previous , xlabel={Temperature $^{\circ}C$}, symbolic y coords={%     {A},     {B},     {C}}, ytick=data, %nodes near coords,  %nodes near coords align={horizontal}, ytick=data, xmajorgrids, legend ]      \addplot+[blue, fill=blue, bar shift =-5pt] coordinates {     (14,{A})      (5,{B})      (14,{C})  }; \addplot+[blue, fill=blue, bar shift =-5pt] coordinates {     (-20,{A})      (-10,{B})      (14,{C})  }; \addplot+[red, fill=red, bar shift =5pt] coordinates {     (20,{A})      (5,{B})      (14,{C})  };  \addplot+[red, fill=red, bar shift =5pt] coordinates {     (-20,{A})      (-10,{B})      (14,{C})  };  \end{axis} \end{tikzpicture}   There is probably a proper way to do this but I am still new to tikz and pgfplots and could not find a good example. Thanks for your help!


In Order of the Phoenix, Lucius Malfoy “falls from grace” and ends up on Voldemort's bad side.  What exactly did he do to anger Voldemort?


Does a player get credit for a kill if an environmental block actually does the final kill?

Working on a guardian farm, and I'm not certain about the mechanics here.  Will I get credit for the kill if I am able to hit the guardians once, but let the campfire under the guardians, or the lava they're swimming in take the final kill?


I am currently following . The recommended solution implements the ordered solution i.e. if you have A, B then combinations are A, B, AB.  Nevertheless, I would like to include any possible ordering of elements i.e. A, B, BA, AB. Is there any way to do that in Python?  Thank you.


Question is to prove :   Irreducibility of $(x-1)(x-2)\cdots (x-n)- 1$ over  $\mathbb{Z}$ for all $n\geq 1$ Irreducibility of $(x-1)(x-2)\cdots (x-n)+ 1$ over  $\mathbb{Z}$ for all $n\geq 1$ and $n\neq 4$   Hint for first bullet is      If the polynomial factors consider the value of the factors at $x=1,2,\dots,n$   For second bullet :  Suppose $p(x)=(x-1)(x-2)\cdots (x-n)-1$ is reducible we have:  $p(x)=q(x)r(x)$ with $\text {Max {degree of p(x), degree of r(x)}}<n$  Hint is suggesting me to use that $p(i)=-1$ for all $1\leq i\leq n$   i.e., $q(i)r(i)=-1$ for all $1\leq i\leq n$  i.e., $q(i)=-1; r(i)=1$ or $q(i)=1;r(i)=-1$  for all $1\leq i\leq n$  For second bullet :  Suppose $p(x)=(x-1)(x-2)\cdots (x-n)+1$ is reducible we have:  $p(x)=q(x)r(x)$ with $\text {Max {degree of p(x), degree of r(x)}}<n$  Hint is suggesting me to use that $p(i)=1$ for all $1\leq i\leq n$   i.e., $q(i)r(i)=1$ for all $1\leq i\leq n$  i.e., $q(i)=r(i)=1$ or $q(i)=r(i)=-1$  for all $1\leq i\leq n$  I am getting some vague ideas but could not bind them to prove this.  I would be thankful if some one can help me to clear this.  Thank you.  P.S : Please give "just hints". Do not write whole answer at once. This is a "request". Thank you :)  Edit : I have changed the title from   Irreducibility of $(x-1)(x-2)\cdots (x-n)\pm 1$ over $\mathbb{Z}$  to   Existence of Irreducible polynomials over $\mathbb{Z}$ of any given degree  for two reasons :   Irreducibility of $(x-1)(x-2)\cdots (x-n)\pm 1$ over $\mathbb{Z}$ for any $n\geq 1$ implies Existence of Irreducible polynomials over $\mathbb{Z}$ of any given degree The title looks atractive


Backup / Restore of DB on MSSQL 2019 to MSSQL 2014

I have a production database running on MSSQL 2019 on a hosted platform. I am wanting to create a sandbox copy of the db with all of the data in a local MSSQL server running 2014.  Everything I've tried  (backup / restore , generating scripts, export data) has error-ed out.  Does anyone have an easy button I am overlooking?


Searching for a string on multiple zip files

I am working on SunOS 5.10. I have a folder that contains about 200 zip files. Each zip file contains only one text file in it.  I would like to search for a specific string in all the text files in all the zip files.   I tried this (which searches for any text file in the zip file that contains the string "ORA-")  but it didn't work.   zipgrep ORA-1680 *.zip   What is the correct of doing it without uncompressing the zip files?


Autosegmental Representation in tikz-qtree

This is what I want to achieve    and this:    But all I've been able to make with tikz-qtree is the following:  \documentclass[12pt,a4]{article} \usepackage[utf8]{inputenc} \usepackage{tipa,tikz,tikz-qtree} \begin{document}  \begin{tikzpicture} [baseline] \tikzset{frontier/.style={distance from root=90pt}} \Tree [.$\sigma$ [.O [ p ] ] [.R [.$\mu$ a ] [.$\mu$ : ] ] ] \end{tikzpicture} \begin{tikzpicture} [baseline] \tikzset{frontier/.style={distance from root=90pt}} \Tree [.$\sigma$ [.O [ p ] ] [.R [.$\mu$ a ]  ] ] \end{tikzpicture}   And this:  \begin{tikzpicture}[baseline] \tikzset{frontier/.style={distance from root=90pt}} \Tree [.$\sigma$ [.O [ l ] ] [.R [.$\mu$ a ] [.$\mu$ l ] ] ] \end{tikzpicture} \begin{tikzpicture} [baseline] \tikzset{frontier/.style={distance from root=90pt}} \Tree [.$\sigma$ [.O [ : ] ] [.R [.$\mu$ a ] [ l ] ] ] \end{tikzpicture} \end{document}   Which renders:    and    The important part here is the linking from the leaves to more than one parent (it would be nice if I had the option of making the line dashed too). Now, pst-asr doesn't quite achieve what I want it to. It's important that I have the moras ('mu's). (Also it's a pstricks package, which means I must typeset it in DVIPSPDF.) I have tried a bit of the forest-package (especially forest-GP1), but I can't make that work as I want either. Lastly, some have recommended xyling, but I find that package very difficult to use.  Any recommendations?  Thanks.


What is the simplest and best device (or circuit) to stop the flow of current in a line when current in another line is present?

What is the simplest and best device (or circuit) to stop the flow of current in a 3.7V (2A) line when current in another 5V (2A) line is present?  Basically I want to make an UPS using a LiPo battery for a SIM800l, I have an SIM800l module attached to A 3.7V wall adapter but I also have connected the SIM800l to a 3.7V LiPo Battery, I want to stop using the battery when there is current from the USB wall charger.   I do not want to use a standard powerbank since these always use the battery.


Two balls A and B of the same size are dropped from the same point.

If the mass of A is greater of the two, and if air resistance is the same on both, which ball will reach the ground first/simultaneously?  I thought that since the acceleration acting on them is same, both will reach the ground simultaneously. But the answer in the book says that ball A (the one having greater mass) will reach first. I mean, isn't this what people thought before (I guess it's true) Galileo performed his experiment, until they were proven wrong?!


Interval preserving transformations are linear in special relativity

In almost all proofs I've seen of the Lorentz transformations one starts on the assumption that the required transformations are linear. I'm wondering if there is a way to prove the linearity:  Prove that any spacetime transformation $\left(y^0,y^1,y^2,y^3\right)\leftrightarrow \left(x^0,x^1,x^2,x^3\right)$ that preserves intervals, that is, such that  $$\left(dy^0\right)^2-\left(dy^1\right)^2-\left(dy^2\right)^2-\left(dy^3\right)^2=\left(dx^0\right)^2-\left(dx^1\right)^2-\left(dx^2\right)^2-\left(dx^3\right)^2$$  is linear (assuming that the origins of both coordinates coincide). That is, show that $\frac{\partial y^i}{\partial x^j}=L_j^i$ is constant throughout spacetime (that is, show that $\frac{\partial L_j^i}{\partial x^k}=0$).  Thus far all I've been able to prove is that $g_{ij}L_p^iL_q^j=g_{pq}$ (where $g_{ij}$ is the metric tensor of special relativity) and that $\frac{\partial L_j^i}{\partial x^k}=\frac{\partial L_k^i}{\partial x^j}$. Any further ideas?


Why embedded File not found exception in executable jar file?

There is binary file for update my switch configuration in src/main/resources directory in run time. when i try it with debug mode in eclipse the file exist and there is no problem, but when i create an executable jar file for real application this file does not exist.  Where is the problem?  String filePath  = new File("/resources/firmwares/myConfigFile.bin").getAbsolutePath();  File f = new File(filePath);     if (f.exists())              upload();


Modern stream ciphers usually predicts the usage of a nonce (also termed as IV) in the cryptosystem. The cost of initializing the cipher with the nonce varies from algorithm to algorithm (for instance, this cost seems very high on HC-256 and negligible on Salsa 20). I would like to know the correct usage pattern of a nonce together with the stream cipher in a cryptosystem. The only thing I know for sure is that they must never repeat...   Does it needs to be new for every transmitted message? It must be secret? (Is it assumed to be known by an attacker)?


I just realized I forgot information on my visa application and I already had my Biometrics appointment (UK VISA)

I applied for a tier 4 general student visa. Hours before my biometrics I realized I forgot to put down some countries I visited in Europe last year for travel history. My passport is stamped with these places, and I just completed my biometrics. If I cancel my application now to resubmit, will I have to redo my biometrics? Will this for sure get my visa rejected? UKVIS contact basically doesn't work and I have no answers for anything. My application support center said to call the UK embassy, but I have no idea what to do.


This question is not a duplicate, it is not about right and wrong answers and questions, it is about whether an acronym for sloppy answers to good questions would be useful, and I propose one that seems reasonably polite, more than some well known acronym for the opposite case (RTFM for sloppy questions). This is obviously based on the assumption that there are also sloppy answers, not only sloppy questions.  More often than expected I see that questions like "... how do I do x in Y ..."? even when they are clearly and well specified get some replies that do NOT answer the question at all and go like: "In Y doing x is bad style" "Why would you want do to x?" "Why are you using Y"? "Tell me the story of your life so we can understand why you wrongly chose language/tool Y rather than Z that is more ..." ...  Such replies would be somehow acceptable if they came along with the requested answer, most of the times there is no answer, this is the case I am writing about (and about clear, well specified questions)    Such annoying non-answers seem nearly as frequent as sloppy questions. For sloppy questions there is RTFM. For this annoying non-answers I am not aware of useful acronyms, so I propose FATFQ, which seems not only appropriate but also rather "open" and kind, relative to this kind of non-answers: it is not JATFQ or OATFQ (Just Ask.../ Only Ask ...) it is "First Ask The Fine Question", after that free to explain how right your tools and vision of the world are and how wrong the question is, but first, before the sermon, please answer the fine question, maybe by saying that you do not see any way to do x in Y.


Let$\ p_n$ be the$\ n$-th prime. Is$\ \lim_{n\to\infty} \log \log n \prod_{i=1}^{\lfloor \log n \rfloor} \frac{p_i-1}{p_i}>0$?

I'm less than a novice in analysis, I don't even know how to approach this. Thanks in advance.


Why doesn't air below a falling object balance its weight?

Consider the following scenario: a body is dropped and it hits the air molecules below it with a force equal to it's weight. By Newton's third law, the air molecules below should exert the same force on the body and force due to weight should cancel out and object should not fall. Why doesn't this happen?


I have a PHP file i need the file to repeat every x hours after the PHP file is done,   Someone told me check out  watch -n x <your command>   but will this repeat after the PHP file is done?  Sorry I'm a newbie, Thanks for the answers!


TikZ graphdrawing differences between LuaTeX versions

What I will describe below is not yet a problem but will appear when TeX Live 2019 is released and LuaTeX will be upgraded to 1.09.  MikTeX users might already experience this issue.  It also affects users of Mac OS X, because the random number generator of their C standard library is different from the one of glibc.    When I typeset one of the graphdrawing examples from the TikZ manual, it appears mirrored between the LuaTeX versions 1.07 (TeX Live 2018) and 1.09 (TeX Live 2019).  Why is that happening?  \documentclass{article} \usepackage{tikz} \usetikzlibrary{decorations.pathmorphing,graphs,graphdrawing} \usegdlibrary{force} \begin{document} \tikz [spring electrical layout, node distance=1.3cm,        every edge/.style={          decoration={coil, aspect=-.5, post length=1mm,                      segment length=1mm, pre length=2mm},          decorate, draw}] {   \foreach \i in {1,...,6}     \node (node \i) [fill=blue!50, text=white, circle] {\i};    \draw (node 1) edge (node 2)         (node 2) edge (node 3)                  edge (node 4)         (node 3) edge (node 4)                  edge (node 5)                  edge (node 6); } \end{document}   On the left is LuaTeX 1.07, on the right LuaTeX 1.09:


I've been looking around on the internet and I can't find anything in depth on how the cable/connection functions. I've only been able to find simple pin out descriptions.  If someone can link me or point me in the right direction, I would be very grateful.


Python variable redefinition in a function

I have a problem with the python code. Indeed, I want to change the value of a global variable through a function like this:  myVar = True # default value def myFunct():    myVar = False   The problem is with Python, you can't change the value of the global variable by a function. So anyone have a solutuion ?  Thank you.


How to copy/paste from "Sorry, the application XXX has stopped unexpectedly"

An app just crashed and I want to copy the error message and paste it into a search engine to hopefully find a solution.  Unfortunately the error dialog does not allow me to copy/paste anything:    In particular the stack trace, which is very long. Typing manually is slow and unreliable.  Maybe the same details can be copied from somewhere else?  Note: Similar to  but with more details. If one must be closed as a duplicate, despite being newer I believe this one is more useful. It is de-facto more popular: 200 views there, 42k views here.


Best way to support non-binary plugins / addins in Java

I am programming a program which should have a plugin feature, so that the user could add own actions. My question is how I could do that. Which language would be best (e.g. php or javascript). I don't want binary plugins, because plugin making should be easy.  And if I use for example JavaScript: how could I use it to interact with my Java Application?


Error:dbHelper.getReadableDatabase()' on a null object reference

when i execute db=myhelper.getReadableDatabase(); show error: java.lang.NullPointerException: Attempt to invoke virtual method 'android.database.sqlite.SQLiteDatabase com.example.licaixiaozhushou.dbHelper.getReadableDatabase()' on a null object reference     at com.example.licaixiaozhushou.setting$1.onClick(setting.java:32)     at android.view.View.performClick(View.java:7448)     at android.view.View.performClickInternal(View.java:7425)     at android.view.View.access$3600(View.java:810)     at android.view.View$PerformClick.run(View.java:28305)  the following is my code : bt.setOnClickListener(new View.OnClickListener(){         @Override         public void onClick(View v) {             Toast.makeText(setting.this,"111",Toast.LENGTH_LONG).show();             SQLiteDatabase db;             db=myhelper.getReadableDatabase();             ContentValues values=new ContentValues();             @SuppressLint("Recycle") Cursor cursor=db.query("login",null,null,null,null,null,null);             boolean flag=false;  this is my dbHelper: public class dbHelper extends SQLiteOpenHelper{     public  Context context;     public dbHelper(Context context) {         super(context,"licaixiaonengshou.db",null,2);         this.context = context;     }      @Override     public void onCreate(SQLiteDatabase db) {         db.execSQL("create table login(id varchar(20),password varchar(20))");         ContentValues values=new ContentValues();         values.put("id","747584987");         values.put("password","123456");         long id=db.insert("login",null,values);         db.close();     }     @Override     public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion){      } }  and sometimes it didn't show error just close the activity. i don't what i do.


Intro I am somewhat new to cryptography. Repeating the basics of RSA from :  Textbooks say the one-way function is merely two primes (with some critical constraints) ...  may be a good base of this question, as well as . Also,  already asks the same thing as the question here, but in a more abstract way. The idea Why not calculating in advance, on many computers, a vast amount of multiplications of primes that you loop over systematically, in the constraints of RSA? And then you would save the outcome as keys in a Big Data system that you can quickly search through? You could use a Bloom filter, a key coordinator or other Big Data tricks to quickly find the computers that might have the multiplied value at hand, and then quickly find a value's underlying primes. You could have 10000 computers, with chosen different starting prime ranges. The first and second primes could be within a likely range that is needed to meet RSA standards of 4096 bit. You may also guess a bit, meaning to take a range that is rather around the square root of a chosen outcome, or take other tricks to guess a bit. Then it just depends on how many computers you use. Even if you hit just 0.001 % of the possible combinations you could already get the private key from the public key in 0.001 % of the cases. Or do I oversee something here. The question It cannot be that easy, can it? Can Big Data attack RSA by just calculating many prime multiplications in advance?


How to select a different Stack Exchange site while flagging a question for migration?

I wanted to flag a question for migration to , but there were only Meta Stack Overflow, Super User, ,  and  in the list.  Maybe it's a good idea to add an autocomplete field (or something) to enter other Stack Exchange sites?


i want to draw a matrix like the pic below, i just don't know how to do it


I have this piece of code:  String chords = "I-iii-IV-iv"; String character; String nextCharacter; String finalChord; String chordString; for(int i = 0; i<chords.length(); i++) {             char c = chords.charAt(i);             character= Character.toString(c);             nextCharacter= Character.toString(chords.charAt(i+1));             do {                 if(nextCharacter.equals("-")) {                     //Chord is finished                     finalChord = character;                     chordString += finalChord += " ";                 } else {                     //Chord hasn't finished yet, repeat do-while loop                  }             } while (!character.equals("-"));    What this wants to do is loop through the initial String "I-iii-IV-iv".   If the character isn't a "-" but the next character is, add the actual chord to a final String. If the character is a "-", add it to a final String. If nor the character or the next character are "-" (which means you are in the "iii" case, for example), add this character to a string and loop through the for again until next character is a "-", then add the actual chord to a final String.   I don't know if that is clear enough, I hope it is. Thanks in advance!  Edit: What I'm wishing to do is looping through a String until the next character is "-". How can I do it?  Edit 2: Taken Hovercraft Full Of Eels' advice, I have tried to use a do-while loop. I find myself in the same situation, I want to repeat the loop if a certain condition is given (Nor the character or the next character are a "-". Let me expand my explanation: When that condition returns true, i want to check it again for the next character, and so on until the actual character is a "-".


Let $C$ and $D$ be categories and $F:C\to D$, $G:D\to C$ two functors.  $F$ is left-adjoint to $G$, if there are natural transformations $\eta:id_C\to GF$ and $\epsilon:FG\to id_D$ such that \begin{eqnarray} F&\xrightarrow{F\eta}&FGF&\xrightarrow{\epsilon F}F\\ G&\xrightarrow{\eta G}&GFG&\xrightarrow{G\epsilon}G \end{eqnarray} are the identity (!) transformations.  $F$ is an equivalence of categories (with inverse $G$) if there are natural isomorphisms $\eta:id_C\to GF$ and $\epsilon:FG\to id_D$ without any further properties.     Is $F$ left-adjoint to $G$, if $F$ is an equivalence of categories (with inverse $G$)?If not, suppose that $F$ is an equivalence of categories with inverse $G':D\to C$ and suppose further that $F$ is left-adjoint to $G$. Does it follow that there is a natural isomorphism $G\to G'$ or is there even an identity $G=G'$?


How can I continuously capture images from a webcam?  I want to experiment with object recognition (by maybe using java media framework).   I was thinking of creating two threads  one thread:   Node 1: capture live image Node 2: save image as "1.jpg" Node 3: wait 5 seconds Node 4: repeat...   other thread:   Node 1: wait until image is captured Node 2: using the "1.jpg" get colors from every pixle Node 3: save data in arrays Node 4: repeat...


showing certain vertices form an equilateral triangle

Suppose $a,b,c$ lie in the unit circle of the complex plane and satisfy $a+b+c = 0$. Then, $a,b,c$ form the vertices of an equilateral triangle. Try So, I want to show that $|b-a|=|c-a|=|b-c|$. We are given $|a| = |b| = |c| = 1$ and $a+b+c=0$. Since $|z| = z \overline{z} $, we have $$ (b-a)( \overline{b}-\overline{a} ) = (c-a)( \overline{c} - \overline{a} )$$ which simplifies to $$ |b| - b \overline{a} - a \overline{b} - |a| = |c| - c \overline{a} - a \overline{c} - |a| $$ Hence, $$ c \overline{a} + a \overline{c} - b \overline{a} - a \overline{b} = 0$$ $$ a( \overline{c} - \overline{b} ) + \overline{a} ( c-b) = 0 $$ Here I am stuck. Perhaps this is the wrong approach?


Postfix routinely references both smtp and smtpd in configuration files. What is the difference?

Environment: Postfix 3.3  In my main.cf file I see references to both smtp and smtpd.  For example:  smtpd security is set here.  smtpd_tls_security_level = may   And just a few lines below smtp security is set in an otherwise identical parameter.  smtp_tls_security_level = may   Other examples are these smtpd parameters:  smtpd_tls_cert_file smtpd_tls_key_file   Although these aren't exactly the same just a few lines below smtp is used.  smtp_tls_CApath smtp_tls_CAfile   Question:  As far as Postfix is concerned what is the difference between smtp and smtpd?


How does the kernel prevent a malicious program from reading all of physical RAM?

If I write a program that tries to read memory at every possible address, and I run it on a "full" Unix, it will not be able to access all of the physical RAM.  But how does the operating system prevent it from doing so?  I am more familiar with small CPU architectures where any piece of assembly code can access everything. I don't understand how a program (the kernel) can detect such malicious operations.


$\ell_p$ is Hilbert if and only if $p=2$

Can anybody please help me to prove this:  Let $p$ be greater than or equal to $1$. Show that for the space $\ell_p=\{(u_n):\sum_{n=1}^\infty |u_n|^p<\infty\}$ of all $p$-summable sequences (with norm $||u||_p=\sqrt[p]{\sum_{n=1}^\infty |u_n|^p}\ )$, there is an inner product $<\_\,|\,\_> $ s.t. $||u||^2=<u\,|\,u>$ if and only if $p=2$.


How to change Outlook back to Hotmail 2018

I was suddenly changed from my regular Hotmail setting to Outlook without my permission.  Suddenly everything were changed, the "sorting" only has date, from and size; missing all other sort options as in the past. I want my emails sort by subject.   So, please give me back my Hotmail. I don't like the Outlook.    The new Outlook doesn't have the option to switch back.


Possible Duplicate:          Yeah I got a deranged stalker that keeps downvoting me.  Anyone know how going about identifying such individuals?  (I just got 4 all at the same time just after making a new post).      that was the question I originally asked. Please tell me, what is so wrong with it ?


When I compile my code, I get the following:  Display ommitted hash table:  Exception in thread "main" java.lang.NullPointerException at Hash.display_hash_table(Hash.java:268) at Driver.main(Driver.java:20)   Here are the relevant portions of code:  public void display_hash_table()  {     System.out.println("Display ommitted hash table: ");      pw.append("Display ommitted hash table: \n");      for (int i = 0; i < table.length; i++) {          System.out.println(String.valueOf(i) + "\t" + table[i].getData());          pw.append(String.valueOf(i) + "\t" + table[i].getData() + "\n");      }      System.out.println("The total number of probes is: " + String.valueOf(this.count_probe) +     "\n");      pw.append("The total number of probes is: " + String.valueOf(this.count_probe) + "\n");  }   and      omitted_words.display_hash_table();   Does anyone have any suggestions on what could possibly be my error?  Thank you!


How to sudo visudo without a password, remove all prompts for password

Websites tell me to use sudo when I have no password, usually tell me one of two things.   It is bad security Or use 'sudo visudo' and the %admin ALL=(ALL) NOPASSWD: ALL line   I would like to not have a password on anything despite the security risks.  Going with option 2, I'm trying to avoid getting prompted to enter a password at all on my account.  So the problem with option 2, is that sudo is still prompting for a password that does not exist. So I can not use sudo visudo in order to remove the need to enter a password for sudo, because it prompts for a password.


Spell vamp / Life steal and AD scaling abilities

What do AD scaling abilities scale on for leech effects? Take the following skill for example, it is pure AD scaling:  Lee Sin Spell Summary Sonic Wave: Lee Sin projects a discordant wave of sound to locate his enemies, dealing (50/80/110/140/170) (+(1 per attack damage point)) physical damage to the first enemy it encounters. If Sonic Wave hits, Lee Sin can cast Resonating Strike for the next 3 seconds. Resonating Strike: Lee Sin dashes to the enemy hit by Sonic Wave, dealing (60/90/120/150/180) (+(1 per attack damage point)) physical damage plus 10% of their missing Health (Max: 400 damage vs. Monsters).  What would I leech health back from?  Life steal Spell vamp Both Neither


How to find the following number using modular arithmetic

Suppose I have a number $x$ such that, $$ x \equiv 31^{29}  \text{ (mod 57)} $$ How can I find $x$ using properties of modular arithmetic. Will it involve a special theorem?


I've had problems with my packages and Software Center for some time.  I can't download any packages, and can't open Software Center. It says that I have Brokencount <0.  How can I fix my packages?  I tried:  sudo apt-get autoclean  sudo apt-get autoremove


How to make the command in /etc/profile be found?

Os: debian9.  touch /home/test/test.log   There is a simple function write-date in /etc/profile.  write-date(){     date >>  /home/test/test.log     }   Create a service running at reboot or shutdown.  vim  /etc/systemd/system/test.service    [Unit] Description=Run command at shutdown Before=shutdown.target reboot.target  [Service] Type=oneshot RemainAfterExit=true ExecStart=/bin/bash  /home/test/test.sh  [Install] WantedBy=multi-user.target   The simple function write-date in /home/test/test.sh.  vim  /home/test/test.sh write-date   Enable the test.service.  sudo systemctl enable test.service   Reboot my pc and check log of test.service  sudo journalctl -u test -- Logs begin at Thu 2018-02-01 00:03:59 HKT, end at Thu 2018-02-01 00:15:54 HKT. -- Feb 01 00:04:04 test systemd[1]: Starting Run command at shutdown... Feb 01 00:04:05 test bash[438]: /home/test/test.sh: line 3: write-date: command not found Feb 01 00:04:11 test systemd[1]: test.service: Main process exited, code=exited, status=127/n/a Feb 01 00:04:11 test systemd[1]: Failed to start Run command at shutdown. Feb 01 00:04:11 test systemd[1]: test.service: Unit entered failed state. Feb 01 00:04:11 test systemd[1]: test.service: Failed with result 'exit-code'.   How to make the command in /etc/profile be found ?  cat -vet /home/test/test.sh $ $     write-date$     $ $


Information of things inside a black hole

Can we get the information of things that are gone in black hole?


When should we have main() in python script?

I see many python scripts having the following main() code pattern below; def main():     print("Hello World!")   if __name__ == "__main__":     main()  However, I have written many python scripts which do not have main() and I do not experience any problems without main(). When should one use main() in a python script, given that not having it seems to have no detrimental effect? I am using python 3.8


Do you know how to upload CPU-G onto Bionic Beaver version 18.04.1?  I need information about my computer for a Comp. Sci class.  Is there another program that I can use the will give me the same information?  Thanks in advance.


Why is my Macbook Air MagSafe Pin Becoming Extremely Hot?

Why is my Macbook Air MagSafe Pin becoming extremely hot?   I fear that my laptop will burn out. Can anyone help me on this?


Was age a motivating factor in George Lucas changing Anakin in “Return of the Jedi” from being an old man to a young man?

Straight to the point.  First, this is . This is specifically about the presented age of Anakin’s “Force Ghost” and I am not seeking deep evidence of age-ism in any way; just evidence of age of the character being a motivating factor.  Now, I have read all of the reasoning I have been able to consume on why Anakin’s “Force Ghost” was changed from Sebastian Shaw to Hayden Christen at the end of Return of the Jedi but none seems to address an issue I see: Was age a primary motivating factor in redoing the “Force Ghost” from being an older version of Anakin versus a younger version of Anakin.  Darth Vader is old and decrepit and evil… But Anakin Skywalker is young and brave and beautiful… Seems quite patronizing and even makes his redemption at the end of Return of the Jedi seem fake. He found good in him when he was Darth Vader and saw the Emperor killing his son and turned on the Emperor to save the future.  To me, Luke being young and his father being old—and a ghost—makes sense. Luke never fully went “dark” and his father is the one who ultimately ensured he would stay in light. Yes, Anakin was Darth Vader for a good chunk of his adult life… But still… The ending where Luke see’s his father as some kid who is younger than him? It’s just odd.  Was age a role in George Lucas’s desire to do this so Anakin would look young and cool to the merchandise buying youth of today?  More details.  This question and answer thread was spurred by this recent question:      And this question and answer thread:      First the first question about recognition is quite fair: Seeing a young man appear out of nowhere after watching an old Darth Vader die is just cognitively hard to understand unless you have watched the prequels.  And the second question was simply about changing Anakin’s head to make his appearance as a “Force Ghost” more consistent with the prequels.  But this question is something different about this whole Sebastian Shaw versus Hayden Christensen switcheroo: Was any of this based on simple audience pandering towards age? Meaning, George Lucas clearly geared the prequels towards kids—far more than the original trilogy—but to me this Anakin “Force Ghost” thing really irks me.  I mean, I understand the bass-ackwards logic that Anakin was only a Jedi for a certain period of his life and then became Sith in the later part of it. But to me it seems the story of redemption is actually lost. Vader/Anakin could not fight age or the decay of his already dysfunctional body. And in an act of love for his son, he killed a great source of evil that destroyed his life, family and threatened to destroy the future. To me, in the end… When Darth Vader was unmasked as an old, dying man that old dying man was redeemed. His spirit as a Jedi was validated by that final act. Thus his  “Force Ghost” being old makes sense.  UPDATE: FWIW, Star Wars concept  that messed around with the concept of what Anakin’s “Force Ghost” was meant to represent in The Force Awakens:       ‘When you light a candle, you also cast a shadow.’ That inspired me to   propose, for the first time, that Anakin’s ghost could come back […]   If we see Anakin Skywalker, because he does flow back and forth   between Darth Vader and Anakin, let’s see him as a character with a   dark and light side. The reason Luke is this whole new entity is   because he was the first to acknowledge his own dark side — that it   was not separate from him.   The ideas were ultimately discarded, but to me it shows that they idea that young Anakin is simply the “good” version because that is before he turned “bad” is actually not as solid an idea as some would imply. They just wanted a teen-heartthrob young guy to tie the concepts of the prequels to the original trilogy.


Change line spacing inside a node in TikZ

Inside a TikZ node, one can force line breaks using \\ providing the align option of the node is set.  I would like to increase the line spacing inside a node. This can be done in the usual way with the optional parameter of \\, e.g. \\[1em]. Doing this for every line break is tedious though. Is there a way to increase the break globally, so that any \\ inside a node acts as \\[1em]?  EDIT: Almost there!  \documentclass{article}  \usepackage{tikz} \usetikzlibrary{shapes}  \begin{document}  \tikzset{   mynode/.style={     draw   , align=center   , execute at begin node=\setlength{\baselineskip}{2em}   } }  \begin{tikzpicture}   \node[mynode] {     this \\     is \\     \tikz \node[mynode] {a \\ break};   }; \end{tikzpicture}  \end{document}   This produces:    The remaining question is how to place a 2em break before the inner node.


How to calculate equivalent capacitance to a battery?

I have a 1.25V 2Ah battery and I'm trying to calculate a equivalent capacitance with rated voltage of 2.7V for each of those batteries. This is what I did:   Work of Battery = \$1.25V \cdot 2A \cdot 3600s = 9000J\$  From the capacitor work equation:  $$W = 0.5 \cdot C \cdot V^2$$  $$9000J = 0.5 \cdot C \cdot 2.7V^2$$  $$C=2469.1358F$$  Is this correct?