Why does Star Wars say "a long time ago, in a galaxy far far away?" Besides sounding like a fairytale beginning, does it have any literal truth in the series or the canon?  I mean, humans prominently feature in Star Wars, and humans on earth today have only recently evolved technology to go to nearby planets. How does the Star wars franchise explain this? Are those humans somehow in another galaxy before advanced humans evolved on earth, something like out of Battlestar Galactica?

Kind of brought to my attention by .  The poster mentions non-humans, which implies that there are humans in the Star Wars universe.  However, since it happened "A long time ago, in a galaxy far far away", how could there be any humans in the Star Wars universe?  Are there "humans" in Star Wars there just because it was easier to make the movies that way?  Other shows such as Star Trek are about the future of humans, so it's easy to understand the existence of humans in those storylines.  However for Star Wars it just doesn't make sense.  It also seems odd that they'd go around creating all these different species and then just leave the main characters as humans. I guess another possibility is that the humans in star Wars eventually populated Earth, but then what happened to all the technology?


I am trying to use relative coordinate with notation ++(x,y) which usually works fine. But in the example below it doesn't. I would like to define the node relative the center of a matrix, which I did at the end of the code below \node [font=\color{blue}] at (m.center)++(1,-3)  {$4$}; I thought this would work but it doesn't. If this line is deleted everything is fine. How can I do this? \documentclass[border=10pt]{standalone} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary{matrix,fit}  \begin{document}  \begin{tikzpicture}  \matrix(m) [matrix of math nodes, nodes in empty cells, nodes={minimum size=1cm, outer sep=0pt, text height=1.5ex, text depth=.25ex}] {  7      &   & 4     &      \\         &   &       &      \\  8      &   & 3     &      \\         &   &       &      \\ };  \draw (m-1-1.north west) rectangle (m-4-4.south east);  \foreach \i in {2,4} {   \draw (m-\i-1.south west) -- (m-\i-4.south east); }   \foreach \j in {2,4} {   \draw (m-1-\j.north east) -- (m-4-\j.south east); }  % dual ui \node [font=\color{blue}] at (3,1) {$5$}; \node [font=\color{blue}] at (3,-1) {$6$};  % dual vj \node [font=\color{blue}] at (-1,-3) {$14$}; % \node [font=\color{blue}] at (1,-3) {$4$};  % Testing new notation \node [font=\color{blue}] at (m.center)  {$4$};  % This last line is not valid for some reason \node [font=\color{blue}] at (m.center)++(1,-3)  {$4$};  \end{tikzpicture}  \end{document}

I use Tikz with Matrix because I need to draw arrows and write on and beside the matrix. However, I don´t control the coordinates well other than using trail and error. For instance in the matrix below I have put an X at (0,0) and it is not in the centre of the matrix. However, if the matrix is 4x4 than it is in the centre. Is there any convenient way to know the coordinates? \documentclass[border=1cm]{standalone}  \usepackage{tikz} \usetikzlibrary{matrix}   \begin{document}  \begin{tikzpicture} \matrix(m) [matrix of math nodes, nodes in empty cells, nodes={minimum size=1cm, outer sep=0pt, text height=1.5ex, text depth=.25ex}] {  36     &   & 32    &   & 33    &   \\         &   &       &   &       &   \\  10     &   & 8     &   & 7     &   \\         &   &       &   &       &   \\  12     &   & 17    &   & 16    &   \\         &   &       &   &       &   \\  23     &   & 15    &   & 16    &   \\     &   &   &       &   &       &   \\ };  \draw (m-1-1.north west) rectangle (m-8-6.south east);    % Lineas horizontales \foreach \i in {2,4,6,8} {   \draw (m-\i-1.south west) -- (m-\i-6.south east); }  % Lineas verticales \foreach \j in {2,4,6} {   \draw (m-1-\j.north east) -- (m-8-\j.south east); }  % dual ui \node [font=\color{red}] at (3.5,3) {$\ge 10$}; \node [font=\color{red}] at (3.5,1) {$\ge 8$}; \node [font=\color{red}] at (3.5,-1) {$=4$}; \node [font=\color{red}] at (3.5,-3) {$=3$};  % dual vj \node [font=\color{red}] at (-2.5,-5) {$\le12$}; \node [font=\color{red}] at (-0.5,-5) {$=12$}; \node [font=\color{red}] at (1.5,-5) {$=6$};  \node [font=\color{red}] at (0,0) {X};  \end{tikzpicture}     \end{document}


I now have this question because of a code review iteration, in which I created an POJO to be used as a request object, like this one:  class Request {        private List<Item> items;        static class Item{            // ... some other stuff        } }   and then someone requested to extract the inner class because it was static, meaning that its instances would be treated as if they were automatically static, which would mean that we would only have an instance of type Item while the system was up and stuff, or at least there was that risk though.  I tried to respond by saying that that happens with static values, but this is a static class, which according to what I understand it only affects the way it is instantiated and the access it has to the enclosing classes' fields, but I couldn't find anything in the JLS (or anywhere to be honest) to explicitly support my claim.  Does anyone know whether the guy was right about requesting that change? If not, does anybody know where can I find information to support/prove my argument? Any pointer will do :) Thanks in advance!

What is the main difference between an inner class and a static nested class in Java? Does design / implementation play a role in choosing one of these?


I have setup an SSH connection to run a program on a remote server. The program prints debug information on the terminal every 10 seconds. If I leave the SSH windows open for a long time (say 10 hours), does the SSH connection become inactive? How is activity defined in an SSH session? Should I type/run command every x seconds to keep the session alive?

I can't seem to find an answer to this simple question, which I need for some compliance documentation.    On a default install of CentOS 6.5 (OpenSSH 5.3p1-94.el6), after how long of being idle will a user's SSH session be terminated?  I believe the following can be set to increase the idle timeout, but they are commented out by default.  $ grep -i alive /etc/ssh/sshd_config #TCPKeepAlive yes #ClientAliveInterval 0 #ClientAliveCountMax 3   Also, is there a command to dump a list of the current sshd settings?  I don't see anything in man sshd.


I am often puzzled by the time indication on this platform  I asked a question yesterday and this morning I noticed that I asked it today:    Since it is already past midnight on the west coast in the US, this would only make sense if the Stack Exchange servers are in Hawaii.   At the same time I often also noticed that 1 hour lasts longer then an hour on my laptop or watch. This is specifically visible in chat, where you sometimes see asked 1 hours ago, while it is often already 2-3 hours later.

What time zone do Stack Overflow's servers operate in?  I noticed that it couldn't be my time zone, or the ones before me (I'm in North American Eastern Time), because I logged into SO earlier today (around 12 pm), then I logged in just a few minutes ago (around 8 pm), then about a minute later I got the Fanatic badge (yay me!).


If $F$ is a field and $\phi:F[x] \to F[x]$ is a ring automorphism,with the property that $\forall \lambda \in F:\phi (\lambda)=\lambda$,then prove that exist $a,b \in F:\phi(x)=ax+b$.

I am trying to prove a series of propositions:  Given any homomorphism p from $\mathbb{R}$[X] to $\mathbb{R}$[X], show that it is equal to $\phi_g$ for a unique g in $\mathbb{R}$[X], with $\phi_g$(f) = f(g(X)). I've expanded the expression $p(f) = p(\sum_{i=0}^n a_iX^i) =\sum_{i=0}^n p(a_i)p(X)^i$ but I'm not sure how to show $p(f) = \sum_{i=0}^n p(a_i)p(X)^i = \sum_{i=0}^n a_ig(X)^i = \phi_g(f)$.  Show that if h,g $\in \mathbb{R}$[X] are such that h(g(X)) = X, then g(X) = aX+b for a $\in$ R$^x$ and b$\in \mathbb{R}$.


I am stuck on the following exercise:     Let $G$ be a finite Abelian group that does not contain a subgroup isomorphic to $\mathbb Z_p \oplus \mathbb Z_p$ for any prime $p$. Prove that $G$ is cyclic.   This exercise comes before the chapter about fundamental theorem of finite Abelian groups and before the chapter about normal subgroups. Some of the chapters before the exercise are: cyclic groups, cosets and Lagrange's theorem, direct products.   So I assume there is a proof only using these tools (unless it is an accident and the exercise was meant to come later in the book).  Here is the idea I had:  Proof by contraposition: Assume $G$ is finite Abelian and not cyclic.   Then it contains two different subgroups of the same order (Although I'm not sure I can really deduce that since perhaps only the implication "cyclic implies contains exactly one subgroups per divisor of the order" holds)  Say they have order $n$. Let $p$ be a prime divisor of $n$. Now I want to deduce that each subgroup contains a copy of $\mathbb Z_p$ but I believe this might not be true.  Also, if we did have two disjoint copies of $\mathbb Z_p$ in $G$ then it's not clear to me how to get to $\mathbb Z_p \oplus \mathbb Z_p$ from there.     Please could someone tell me how to prove this?

Suppose that $G$ is a finite abelian group that does not contain a subgroup isomorphic to $\mathbb Z_p\oplus\mathbb Z_p$ for any prime $p$. Prove that $G$ is cyclic.   Attempt: If $G$ is a finite abelian group, then let $H$ be any subgroup of $G$  It's given that $H \not\simeq \mathbb{Z}_p \oplus \mathbb{Z}_p$ which can be due to a variety of reasons like : $|H|$ may not be $p^2$ or $H$ may not contain any element of order $p$ etc  Hence, the process of finding an element $g$ such that $|g| = |G|$ seems difficult, hence, probably the best bet would be to first assume that $G$ is not cyclic.  Hence,  $O(g) \neq |G|~ \forall ~ g \in G$ .   Also, $G \not\simeq Z_{|G|}$ since $G$ is not cyclic.  How do i arrive at a contradiction from here that if $G$ is not cyclic, it must contain a subgroup $H \simeq \mathbb Z_p \oplus \mathbb Z_p $.  Please note that this question occurs in Gallian before normal and factor groups are introduced.  Thank you for help.


So, I've seen several of posts like this on Stackoverflow, but I am completely confused here after taking resources from like 10 posts. And the fact that I'm relatively new to Java isn't really helping. So, my goal is to get a file, convert it to a byte array, send that, have the client put that into a byte array, and convert that byte array to a string.  So here's the relevant server code (this is in a try/catch just so you know):  System.out.println("Waiting for a client..."); // Start a server ServerSocket server = new ServerSocket(3210); // Listen for anyone at that port Socket socket = server.accept(); System.out.println("A client has connected!"); DataOutputStream outputStream = new DataOutputStream(new BufferedOutputStream(socket.getOutputStream())); // Get file File file = new File("history.txt"); // Convert file to byte array byte[] bytes = new byte[(int) file.length()]; // Send bytes outputStream.write(bytes); // Close everything down socket.close(); outputStream.close(); server.close();   If you read the comments, you get a basic idea of what I think is/should be done in the client and server. Here's the client (again, surrounded in a try/catch):  Socket socket = new Socket(desktopName, 3210); // Get stream DataInputStream inputStream = new DataInputStream(new BufferedInputStream(socket.getInputStream())); // Create a byte array byte[] bytes = new byte[1024 * 16]; // Convert byte array to string allMessagesTextBox.setText(new String(bytes)); inputStream.close(); socket.close();   And when that code is run in Eclipse, I get a java.lang.NullPointerException on the client on the line where it converts the byte array to string and prints it out. I've tried dozens of different techniques provided by websites and QA sites, but they all lead me to this error. Any ideas on what's wrong here, and how to fix it?

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


I have several drop-down lists on my page. I would like the open list to close when you click on the next list or anywhere in the page body. Now I have such a construction that close the open list if you click on another list, but the last list always remains open. We can only close it by clicking on it, and I would like the list to close when you click anywhere on the page. jQuery(function($) {          $('body').on('click', '.jet-toggle__control', function(){                  $('.jet-toggle__control').not(this).parent().removeClass('active-toggle');         $('.jet-toggle__content').not(this).css('height', '0');              });      });  I will be grateful for any help here.

I have some HTML menus, which I show completely when a user clicks on the head of these menus. I would like to hide these elements when the user clicks outside the menus' area.  Is something like this possible with jQuery?  $("#menuscontainer").clickOutsideThisElement(function() {     // Hide the menus });


This is analogous to , but I need a concrete explanation of the induction part.   Prove that $$ \sum_{n=0}^{\infty} {n+k \choose k}x^n = \frac{1}{(1-x)^{k+1}} $$ for all $k \in \mathbb{N}$ and all $x \in (-1,1)$.  My attempt:  When $k=0$, this reduces to geometric series: $\sum_{0}^{\infty}x^n = \frac{1}{1-x}$.  When $k \geq 1$, suppose $S(k) = \sum_{n=0}^{\infty} {n+k \choose k}x^n = \frac{1}{(1-x)^{k+1}}$, how can I show that it holds for $S(k+1)$?  In particular, how can I show that $S(k+1) = S(k)+xS(k+1)$?

I recently found a formula to help find a sequence given a generating function:  $(\frac{1}{1-x})^k=\sum_{n=0}^{\infty}\binom{n+k-1}{n}x^n, k \in \mathbb{N}$  I just wondered if there was a known proof for this, or if anyone knows of a way to prove it.


It seems that it is impossible to enclose a link in a comment by square brackets.  For example, writing [[ABC](https://stackoverflow.com/)] in a comment generates “]” instead of “[].”  It generates the latter in a question or an answer, which is great: [].  Related to this, [[ABC]](https://stackoverflow.com/) is recognized as a link in a question or an answer (great again): , but not in a comment.  It would be nice if these work in comments in the same way as in questions and answers.  For example, I wanted to use either of these forms in the first comment to  on the Theoretical Computer Science Stack Exhange site.  Edit: As Jared Harley stated in a comment, the second issue had been already reported in “.”

Parens, outside  Input: ([text](http://example.com) Result: ([text]() Expected: (  Brackets, inside  Input: [[text]](http://example.com) Result:  [[text]]() Expected:   These issues affect chat's markdown rendering too.


I wanna ask you guys about extending battery. I run precise, My laptop can't work more than 1 hour, after it's fully charged. The notification after I unplug the charger only shows 0:45. How can I work with that condition?

I'm trying to install the Jupiter power settings app but, I read it is no longer compatible with the new kernel. Is there a similar program or a way to manage the power settings on 13.04?


Say I have a class:  class myM():     def __init__(self):         print("original")   I then instantiate this class  a=myM() From which I can call  a.__init__() However, if I use the class itself to call __init__, myM.__init__() results in an error.  These 2 options work however: myM.__init__(myM) and myM.__init__(a) where a=myM().  Question:  Why do I have to pass myM or a as an argument to __init__, for myM.__init__ to work?  Why dont I need to do that if I call a.__init__() instead?

What is the difference between the following class methods?  Is it that one is static and the other is not?  class Test(object):   def method_one(self):     print "Called method_one"    def method_two():     print "Called method_two"  a_test = Test() a_test.method_one() a_test.method_two()


This is my first time attempting to use SED.   I can get the substitution command to work with simple strings. As in:  sed -i 's/foo/bar/g' file.txt   However when I attempt to use a Regex it stops working. The regex I want to use is trying to identify URLs:  (https?:)?(\/\/)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)   I am trying to remove all URLs from a text file. Here's my full command:   sed -i 's/(https?:)?(\/\/)?(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)//g' file.txt   Can anyone see the issue?

I wrote a regular expression which works well in a certain program (grep, sed, awk, perl, python, ruby, ksh, bash, zsh, find, emacs, vi, vim, gedit, …). But when I use it in a different program (or on a different unix variant), it stops matching. Why?


is there any reason for using static_cast on non pointer POD data types, like int, float, double?  float v = 100; int x = (int) v vs int x = static_cast<int>v   Is there any reason/advantage on using that, I saw several answers that covers pointers, but plain POD data I could not find explicit answers about non-pointers.

I've heard that the static_cast function should be preferred to C-style or simple function-style casting.  Is this true?  Why?


I know dy/dx for example means "derivative of y with respect to x," but there's another context that confuses me. You will generally just see a dx term sitting at the end of an integral equation and I just don't know exactly what it means or why it's there.  For instance, if I put into Wolfram Alpha "integral of 2x", it writes out:        That dx in there! I guess it's saying "the integral of 2x with respect to x" ? But why is that even necessary? Isn't it implied? It's annoying because it looks like multiplication, like it means "2 * x * dx" and it's just kind of misleading notation.

When I was at school and learning integration in maths class at A Level my teacher wrote things like this on the board.  $$\int f(x)\, dx$$  When he came to explain the meaning of the $dx$, he told us "think of it as a full stop".  For whatever reason I did not raise my hand and question him about it.  But I have always shaken my head at such a poor explanation for putting a $dx$ at the end of integration equations such as these.  To this day I do not know the purpose of the $dx$.  Can someone explain this to me without resorting to grammatical metaphors?


I work in a company where two companies are under one network. They use same subnet. (We have 50 clients (pc) - 4 servers - total for both companies)   Both companies have own server for domain controller, each company have own employees.   I was wondering is it good solution to set main router (default gateway) to serve as only DHCP, and to remove DHCP from domain controllers ?   Only servers have static IP address. It is hard to manage multiple DHCP servers. Especially in this case where employees use WIFI connection as well  Router model - CISCO RV325  Gigabit Dual WAN VPN Router

This is a  about Redundant DHCP Servers.   Is it possible to have more than one DHCP server on the same LAN? What are the implications of doing this?    What happens if there is more than one DHCP server available? How do my clients know which one to use?  How can I have DHCP servers supplying addresses to more than one subnet\network segment? How can I configure multiple DHCP servers to supply addresses for the same subnet.


one dimensional Schrödinger equation: $$ \left[-\frac{\hbar^{2}}{2 m}\frac{\partial^2\psi(x)}{\partial{x}^2} +V(x)\right] \psi(x)=E \psi(x)$$  I know that to calculate the eigenfunctions $ \psi(x) $ depends on the potential $V(x)$, but in general, which are the characteristic of $\psi(x)$? it can be a complex function or a real function and how proof that?   What means that $\phi(x)$ is a physical solution if we also care about the probability?   Can unphysical wavefunctions give a right probability?

When the Hamiltonian is Hermitian(i,e. beyond the effective mass approximation), generally under which conditions the eigenfunctions/wavefunctions are real? What happens in 1D case like the finite quantum well symmetric with respect to the origin might be an example. any general rule? further generalization into 2D case?


I am using the following query in Stack Exchange Data Explorer:  SELECT Id, DisplayName, Reputation, Location FROM users  WHERE Id = '3628106' ORDER BY Reputation DESC   But I don't see Location in the result:    But  has Location in the profile:    What I am missing here?

promised that data.SE would "soon" get live data:     I realize it's a long weekend, but given that data.SE is now over 2 months out of date, it would be nice if this was finally rolled out.


All delayed choice quantum eraser experiments I've seen record the signal photons reaching detector D0 and then use the data of the idler photons recorded at detectors D1, D2, D3, D4 to "filter out" the photons with which-path information at detector D0 to be able to see the interference pattern.  Now, what would one see at detector D0 if the experiment was performed every 1 second and changed to send the entangled idler photons to the moon? It takes more than a second for the idler photons to reach the moon, which is enough time for the photon stream to form a COMPLETE interference pattern (or not) at detector D0. At the moon, instead of using 4 detectors where 2 do detect which-path information and 2 don't, a device with only 2 detectors would alternate randomly every second between recording and not-recording the which-path information of the incoming entangled idler photons.  Recording the which-path information at the moon should produce an interference pattern on earth. So would the observer looking at detector D0 see the pattern randomly change from interference to non-interference every second? If yes, can he thus predict 1 second in the future what the device at the moon will do?

The assumptions are:    Alice and Bob have perfectly synchronized clocks Alice and Bob have successfully exchanged a pair of entangled photons   The idea is simply to have Alice and Bob perform the Quantum Eraser Experiment (doesn't need to be the delayed choice).   Alice and Bob agree on a specific time when Bob's photon will be between the "path marker" (which is usually just after the slits) and the detector.  If Alice acts collpasing the wave-function on her photon, the interference pattern will disappear. If not it won't.  Alice and Bob can be spatially separated...  What am I misunderstanding?   The only meaningful difference from this spatially separated quantum eraser experiment to one done on tabletop is that you won't be able to use a coincidence detector, but that is not impeditive to identifying the interference pattern, just will make errors more probable. Which we should be able to deal with a appropriate protocol...  There is a experimental paper with a small amount of citations pointing out to the breaking of complementarity in a very similar setup:


I have a problem with freezing/lagging system and I suspect kworker is to blame. Yesterday everything was fine and I did not install any updates but today the system is slow, as I am writing right now the letters are popping with a delay and when I top my system it shows ~30 % CPU on kworker.    I am using Xubuntu 18.04 with kernel 5.3.0-53-generic. I updated it today thinking that this could help but it didn't. I also tried to follow this topic:    but I don't understand the answer - for example, I don't know how to find the problem in perf report.  Also, now, when I restart my computer, it prompts the message that there is a problem with my system and asks permission to send a notification, but it doesn't show any report of that problem or number of an error, anything.   I would appreciate any help!  Ok, partial solution:    This helped with the kworker eating up the CPU, however, I still have a problem with the message prompted at entering the system - it still says that there is a problem but it does not say of what nature so I worry these two things are related and the solution is temporary.

I recently installed Ubuntu 12.04 on my Samsung laptop alongside Windows 7. Whenever I use Ubuntu (even when its idle) kworker uses almost 90% of one of 8-cores. Even though it doesn't really affect my usage, it bugs me and I am afraid of that it might harm my processor. I even tried installing another Linux distro (Linux Mint), and kworker caused the same problem. So I don't know what to do. I would really appreciate your  help.


There is an educational app in my android phone that allows me to download videos for studying them offline. I have downloaded a lot of videos and have my storage filling up to the brink because of it. I would like to transfer those videos from my phone to my android emulator on my PC. I have opened  Internal Shared Storage > Android > data > com.emedicoz.app  It turns out to be empty! I have got 3.5 GB of data for this particular app and there is nothing showing over here! I have accessed data of other apps using this similar directory and been successful at it. But this app's data shows empty. I have tried backing up this app using third party apps but they are not successful in backing up any data more specifically any videos. They only backup some configuration and settings. How do I access the data of this app? My phone is not rooted and I don't have an SD card on it. Does it have any bearing? PS: I have Android 9 PKQ1.18

Could you list all possible directories where Android apps may store data, providing description what kind of data are stored in each directory?


This a exercise from Udacity's Deep learning course.   Can anyone explain why the final answer is not 1.0?  v1 = 1e9 v2 = 1e-6 for i in range(int(1e6)):     v1 = v1 + v2 print 'answer is', v1 - 1e9 # answer is 0.953674316406

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


May I ask how do I convert sine waves to square waves at a frequency up to 1MHz?  New to digital electronics. Have done some research but not sure which circuit to use/ which is suitable. Appreciate your help. Thanks!  Components I have:  74LS14 Hex Schmitt trigger inverter  74HC132 Quad 2-input Schmitt trigger NAND gate

How I can make this sine to square wave converter accept higher frequency?   Because when I tested it, it only accepts 10KHZ max. I will need to input a higher level of frequency till 1000KHZ.   Would this mean that I need to swap the resistor values to lower values?   New to digital electronics. Would appreciate if someone could help. U1 is an Op Amp.


I've been looking for this book for quite some time. It was in English. I remember reading it in high school, around 2005, and the copy I read looked old then, but the name of it is escaping me.  It's about a man in the British army if I'm remembering correctly, searching for his missing brother in the Amazon. He ends up traveling through several different worlds throughout the book. There are only sporadic details that I remember other than that, such as the main character being in a card game on the trip to the Amazon where the other players are cheating and one of the main character's companions having a revolver with a design on the grip.  The method for traveling through worlds was kind of vague. For example he simply passes out after passing through a specific point in the Amazon when the first move takes place.   The one character name I am able to remember is User Annie. She doesn't get introduced until late in the book.

I'm trying to remember the name of a novel/series I read back in the mid-eighties.  I can't remember the author other than that it was a known older author.  I initially thought maybe Saberhagen or Harrison, but can't find it in their bibliographies.  It involved a collection of 4-5 people from different times/places.  The distinctive bit I can remember was that one of them (not the main character) was a cyberpunkish woman from the "future" of 1999 who spoke in futuristic dialect of English that the other characters, including the protagonist, from the "present" (from the eighties) could not understand.  Unfortunately, I don't remember much else of the plot other than that they were making their way through ruins.


In my Drupal themes' folder I've created a file named "custom-js.js".  I created this file to use 2 jQuery manipulations on a small text block that appears in all pages of the site.   My question is, how do I enable this JS file? How do I "link it" with Drupal, so that it's actually being used in my site?

How can I add JavaScript and CSS to my site?


I want to run vncserver in terminal, to automate it with several other commands I've put it inside a shell script. However, when you call vncserver for the first time, it asks you to set a password.  I tried:  vncserver -mychosenpass    but this doesn't work and it's still asking me to set a password like i hadn't set a parameter at all. I know that running vncserver, will raise 3 prompts, the first to ask what password to set, the second will ask me to retype that password to confirm and the last prompt i want to reply with "n". How can i automate this through my shell script?

I am using a script to automatically set up a computer. I need to assign a password to the vnc server for the user, which is normally done using the vncserver command. However, it prompts for the user to enter and re-enter their password, neither of which the script is capable of doing. So, how can I set up the VNC password without an interactive prompt?   Thanks.


What is $$\sum_{n=1}^\infty\frac{1}{n^2+1}$$ I know that  $\sum_{n=1}^\infty\frac1{n^2}=\frac{\pi^2}6$ but what about if we add a one to it in the denominator, can we still figure it out?

This is a homework question whereby I am supposed to evaluate:  $$\sum_{n=1}^\infty \frac{1}{n^2 +1}$$  Wolfram Alpha outputs the answer as   $$\frac{1}{2}(\pi \coth(\pi) - 1)$$  But I have no idea how to get there. Tried partial fractions (by splitting into imaginary components), tried comparing with the Basel problem (turns out there's little similarities), nothing worked.


I just got my first Arduino and had a question about pull-up resistors.  I was trying to connect a push-button to the Arduino at pin 2, and if it's HIGH then I write HIGH to pin 13. Now, in the tutorial I watched, it said to have a resistor from the button to ground so if pin 2 asks what the voltage is, it gets ground, so it doesn't write HIGH to pin 13.   I tested this and it did, indeed, prevent the noise from pin 2. However, when I tried replacing the 10k resistor with a normal wire, it didn't work. So, my question is why do we have to use a resistor and why can't it just be any connection to ground?  In this diagram pin 2 reads whether it gets 5V (HIGH) or 0V (LOW) and returns a boolean value. Then, if the value is HIGH, pin 13 outputs HIGH. Also, it looks like the long wire on the Arduino is blocking out the labeling on a pin. The pin that the long wire connects to says "5V".  Thanks!

There are many tutorials that use a pull-up or pull-down resistor in conjunction with a switch to avoid a floating ground, e.g.        Many of these projects use a 10K resistor, merely remarking that it is a good value.  Given a a particular circuit, how do I determine the appropriate value for a pull-down resistor?  Can it be calculated, or is it best determined by experimentation?


Hi, I want to list posts which belong to custom type "news" under a certain category. This is my code: <?php $news = get_posts( array(     'post_type'      => 'news',     'category' => 83 ) );   if ( $news ) {     foreach ( $news as $post ) {         setup_postdata( $post );         the_title();     }     wp_reset_postdata(); } ?>  I get nothing from this and I checked the category ID and its correct. If I use a 0 instead then it lists all posts regardless of their category but any other number will list nothing. Why is that? Please notice that these custom type posts are categorized under a custom taxonomy called news_category. Thank you.

I want to display custom type posts from a custom taxonomy category so I did this: $news = get_posts( array(     'posts_per_page' => -1,     'post_type' => 'news',     'tax_query' => array(             'taxonomy' => 'news_category',             'field' => 'term_id',             'terms' => 82,         ),     ) );  $postslist = get_posts( $news );      foreach ($postslist as $crap) { ?>      <a href="<?php $crap->title; ?>"><?php $crap->title; ?> <?php }?>  I get nothing from this. Why is that? I double checked the category ID and its correct. Also, I used the Custom post types plugin to register the custom taxonomy.


Given the three line segments below, of lengths a, b and 1, respectively:  construct the following length using a compass and ruler: $$\frac{1}{\sqrt{b+\sqrt{a}}} \ \ \text{and} \ \ \ \sqrt[4]{a} $$  Make sure to draw the appropriate diagram(s) and describe your process in words. We are also to use the following axioms and state where they are used:   Any two points can be connected by a line segment,  Any line segment can be extended to a line,  Any point and a line segment define a circle,  Points are born as intersection of lines, circles and lines and circles   Can someone please guide me or show me as to how to construct this? I know if we draw a triangle whose base(let's suppose this is $a+1$) is the diameter of a semi-circle, then the line perpendicular to this base leading to the top of the semi-circle will divide the trianlge into two smaller triangles with the bases resulting in $a$ and $1$. I don't know how to end up with $\sqrt{a}$ from there. But with it, the process can be repeated to end up with $\sqrt[4]{a}$. Can someone explain or show me? I will then be able to tackle a whole lot of other questions.


While changing a directory ownership, accidentally I did  sudo chown subhadip /  instead of  sudo chown MyApp   After realizing my mistake, tried to fixed few permissions i.e.,  sudo  etc. by  sudo chown -R root /  stopped operation as its wrong.  Now I am getting “The system is running in low-graphics mode” error, which I believe because of wrong permissions only.  I am able to login in console mode.  Please guide me.

I accidently ran  sudo chmod 755 -R /   instead of  sudo chmod 755 -R ./   I stopped it after few seconds, but now there is some problems such as  sudo: must be setuid root   How can I revert permissions back?


The set of $n\times n$ matrices can be identified with the space $M_n(\mathbb{R})$. Let $G$ be a subgroup of $GL_n(\mathbb{R})$.  I would like to show that the set of matrices that can be joined to the identity $I$ forms a normal subgroup of G.

Let $M(n;\mathbb{R})$ denote the set of all $n \times n$ matrices with real entries (identified with $\mathbb{R}^{n^{2}}$ and endowed with its usual topology) and let $GL(n;\mathbb{R})$ denote the group of invertible matrices. Let $G$ be a subgroup of $GL(n;\mathbb{R})$. Define $$H = \biggl\{ A \in G  \ \biggl| \ \exists \ \varphi:[0,1] \to G \ \text{continuous such that} \ \varphi(0)=A , \ \varphi(1)=I\biggr\}$$  Then is $H$ normal in $G$?  For proving $H$ normal i should verify two things:   First $H$ is a subgroup. For all $A \in G, B \in H$, we must have $A \cdot B \cdot A^{-1} \in H$.   That's it i  am not able to proceed any further.


The Question: We can define a set of integers $X_a$$_,$$_b$ = {∀u, v ∈ $\Bbb Z$, au + bv}. For example, if a = 6 and b = 8 then X$_6$$_,$$_8$ includes numbers like 20 = 2$*$6 + 1$*$8 and 4 = −2$*$6 + 2$*$8. Let c be the smallest positive integer in X$_a$$_,$$_b$. Prove that every number in X$_a$$_,$$_b$ is a multiple of c.

Let $S = \{ax + by: x,y \in \mathbb{Z}\}$  and let $e > 0$ be the smallest element in $S$. Prove that $e \mid a$, and hence prove that $e = \gcd(a,b)$  I'm afraid I can't provide much of my initial working here because I'm at a loss of how to start.  I suppose that to show $e\mid a$ I would have to show that $eg = a$ for some $g \in \mathbb{Z}$. But I have no idea how I would do this.


Is there any chance of SMT (simultaneous multithrading) giving worse performance than normal CPU?  For example, is it possible for normal CPU to two programs one by one to have better performance than running these two programs simultaneously on CPU that supports 2-way SMT?  Thanks in advance.

Is there any chance of SMT (simultaneous multithreading) having worse performance than normal CPU?  For example, is it possible for a normal CPU to run two programs one by one and have better performance than running these two programs simultaneously on a CPU that supports 2-way SMT?


I'm trying to recreate this effect:    For the sake of simplicity, let's ignore the teal edges and just assume two white rectangles. I'm having trouble creating the color invert/difference with the brightness at the same time.  I tried:   Making a black layer at 50% opacity (to create the darkened layer) Imported my rectangles from AI and set opacity to 70% Closest blending setting seemed to be "Overlay" but this did not produce any hue distortion as seen in the inspiration   Question  How should I adjust my methods to achieve brightness / color inversion? Hopefully there are labor-saving options for this.   Note: (not sure exactly what kind of color distortion is used, can assume inversion for now)  Note2: Also note that I'm not trying to apply the color invert to the whole picture, just where the white rectangle is. I don't think similar questions have addressed this method.

Good day guys, i have to something like this, any idea how is this picture made ?  so it looks like negative i did invert it in photoshop but the bright side of his face was blue, so there been negative effect and smting been used to change his face to blue before nagative or smting that changed his face to normal skin color after negative ? what can it be ? what do you guys think ? THANKS ! for help.


I've accidentally formatted my 5TB storage drive (I got so angry with myself that punched the wall and broke my right hand over it) but luckily all the important files are still in "excellent" recoverable condition. Problem is I don't have any other place big enough to salvage the files over to. My immediate option at this point is to use the formatted drive I'm recovering from.    Does recovering from the same drive essentially overwrite the other data I'm trying to recover? Should I just wait and buy another 5TB drive to put the recovered files in?

What steps can I take to try to recover lost or inaccessible data from any storage device?  Answers:   This applies to any computer storage device, e.g. internal/external hard drives, USB sticks, flash memory. The most important thing is to STOP using it, any type of I/O can ruin your chances of a recovery.     We have separate questions covering common problems with USB flash drives in greater detail:


Einstein's elevator thought experiment considered that in the Minkowski space-time of special relativity, all bodies fall identically.  What grounds did Einstein have to generalise this falling bodies observation to all physical processes to conclude that there is no conceivable physical experiment to distinguish between a homogenous gravitational field reference frame and a uniformly acceleration reference frame?   I believe this is about extending the weak equivalence principle to the Einstein's equivalence principle.

Suppose a reference frame S1 is accelerated in the x direction with a constant acceleration g. A second frame S2 is at rest in a homogeneous gravitational field which imparts to all objects an acceleration −g in the x direction. Observationally there is no distinction in any respect between S1 and S2. All bodies are, to wit, equally accelerated in the gravitational field. By GENERALISING this mechanical equality, Einstein postulated the complete physical equivalence of a gravitational field and the corresponding acceleration of the reference frame. This is the so-called ‘equivalence principle’.  The first realisation of equality is from the Einstein Elevator thought experiment. Could someone please explain what grounds Einstein had to generalise his local observation to conclude with the equivalence principle.  Thank you.


I have installed ubuntu 13.04 over Windows xp through wubi.exe because i have tried installing ubuntu through usb but it seems like my laptop usb is not supporting it though it shows  SYSLINUX.........  in boot screen and hangs up that's why i quit usb installation and tried wubi.exe.  After installing Ubuntu 13.04 through wubi it seems like xp and ubuntu both are installed in same partition, thats a problem for me...  I want to delete xp without removing ubunutu.

I have installed Ubuntu on my D: partition using Wubi. Is there any way in which I can remove my Windows from C: drive and move my existing Ubuntu installation to C: drive and make it a regular install.


I am trying to translate date/time into french. below is my code but i have a problem when getting the character "à", what php gives me is "Ã" character.  setlocale(LC_TIME, "");  setlocale(LC_TIME, 'french'); echo 'locale - ' . setlocale(LC_TIME, '0'); echo ' : month - ' . strftime('Le %d %B %Y') . 'à'; //Le 07 Octobre 2014 à

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


When running ls -al, the beginning of the output starts with something like drwxrwxr-x In this string I understand the following:    d --> At the beginning of the string means directory r --> Means read permissions w --> Means Write permissions x --> And the x means execute permissions   What I am confused about though, is why does the rwx repeat multiple times throughout this string drwxrwxr-x??? I believe it has something to do with current user permissions, group permissions, and something else.... Any advice or knowledge would be greatly appreciated...

What do the following numbers represent?


I need to multiply any two matrices (that have correct dimensions allowing it) in Python3 without using any imports except for math. (So no numpy).  That said, here is what I came up with:  def dotMatrix(m1, m2):     m1rows = len(m1[0])     m1cols = len(m1)     m2rows = len(m1[0])     m2cols = len(m2)     newcolumn = [0]*m2cols     m = [newcolumn]*m2rows     sum = 0      for a in range(m1rows):         for b in range(m2rows):             for c in range(m2cols):                 sum += m1[a][c]*m2[c][b]              m[a][b] = sum             sum = 0      return m   a = [[1,4],[2,5],[3,6]] b = [[7,9,11],[8,10,12]]  c = dotMatrix(a,b) print(c)   It is supposed to return [[58,139],[64,154]], but instead it returns [[54, 68], [54, 68]]. Why is this?  I am working off of the example on

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


OS: 16.04  After automatic upgrade, apt-get update cause the following error:  *** Error in `appstreamcli': double free or corruption (fasttop): 0x0000000001166b20 *** ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7fe27911e7e5] /lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7fe27912737a] ... 7ffc8371a000-7ffc8371c000 r--p 00000000 00:00 0                          [vvar] 7ffc8371c000-7ffc8371e000 r-xp 00000000 00:00 0                          [vdso] ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall] Aborted (core dumped)   I found that this is the appstream's bug, but how can I fix it?

I cannot install any package. It seems the command apt-get update must be run but it throws some errors:  $ sudo apt-get update Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]      Hit:2 http://ve.archive.ubuntu.com/ubuntu xenial InRelease                      Hit:3 http://ve.archive.ubuntu.com/ubuntu xenial-updates InRelease              Hit:4 http://ve.archive.ubuntu.com/ubuntu xenial-backports InRelease            Fetched 102 kB in 23s (4337 B/s)                                                *** Error in `appstreamcli': double free or corruption (fasttop): 0x000000000210f4b0 *** ======= Backtrace: ========= /lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7fac8d8317e5] [...] Aborted (core dumped) Reading package lists... Done E: Problem executing scripts APT::Update::Post-Invoke-Success   'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli;   then appstreamcli refresh > /dev/null; fi' E: Sub-process returned an error code


I used Paint.net until I switched over to Ubuntu 17.04.  I've seen Krita and Pinta, but they do not fit what I want.  I will need to be able to do pixel art as well as normal functions.  I would like separate windows unlike any other program.  I would like a program that is better than Paint.net and is more flexible

Does anyone know of a simple Image Editor, with functionality comparable to ,  for Ubuntu?  I've always found GIMP to be overkill and too complicated for what I want to do.


Let V be a finite dim complex inner product space. Let T be a linear operator on V. Prove that T is self-adjoint if and only if $\langle T\alpha,\alpha\rangle$ is real $\forall \alpha \in V$. The first direction is trivial, if we assume T is self-adjoint then $\langle T\alpha,\alpha\rangle = \langle \alpha,T\alpha\rangle=\overline{\langle T\alpha,\alpha\rangle}$ So it has to be real. But I have no clue on how to start the other direction? Where would I start?

I have having trouble with the following question:  Let $V$ be a finite-dimensional complex inner product space, and let $T$ be a linear operator on $V$. Prove that if $\langle T\alpha, \alpha\rangle$ is real for every $\alpha$ in $V$ then $T$ is self-adjoint.   I have been focusing on trying to show that if $\langle T\alpha, \alpha\rangle = \langle T^*\alpha, \alpha\rangle$ for all $\alpha$ then  $T = T^*$, but have been unable to do so. I also feel like I'm missing something really obvious. How should I proceed.


In this question:   The Accepted answer is floating along with other answers (sometimes on the 2nd level, sometimes it is the third answer), why is it treated as ordinary answers? Shouldn't it be a fixed top answer?

On , the accepted answer doesn't float on top. Apart from that, the display is correct (i.e. the V mark and the green border)  If I sort by "vote", I've got the following answer order:   Jezell Marc Gravell chilltemp (Accepted) Shaun Bowe   By "oldest":   Marc Gravell Jezell chilltemp (Accepted) Shaun Bowe   and by "newest":   Shaun Bowe chilltemp (Accepted) Jezell Marc Gravell     I'm using Firefox V.3.5 : Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1) Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729)  Feel free to ask for more debug information if needed.


I have a string like below    Ontario;Northwest Territories;Nunavut;Prince Edward Island   from this string I need to create an array of string like   territoty:Array<string> = [Ontario,Northwest Territories,Nunavut,Prince   Edward Island]   in javascript.  How can I create the array from the string?

I have this string  'john smith~123 Street~Apt 4~New York~NY~12345'   Using JavaScript, what is the fastest way to parse this into  var name = "john smith"; var street= "123 Street"; //etc...


I have a ten separated articles journal.  Can I construct one TOC for the journal that contains all that articles?    The example indicated that the TOC generated from single file. In my case, I have 10 separated files. Of course one can have TOC in each file. I need (if possible) to make a single TOC that contains all other TOC from the 10 files.

I have a problem with the numbering of items.  I own the items separately and do not know how to put it together, for the numbering, etc, etc.  I have several articles, and need to get an index should be done as follows                                 Contents   Name of the Article  Author of Article .......................................................Page Number  Name of the Article  Author of Article .......................................................Page Number  Name of the Article  Author of Article .......................................................Page Number  Etc, etc.  Thanks for your help


I downloaded tor but can't start it. This is what I keep getting   ~$ start-tor-browser start-tor-browser: command not found   I did download it, but just can't open it.

Whenever I start Tor in Ubuntu 13.04, the Vidalia Control Panel opens, loads up and displays a status of "Connected to the Tor network!". However, the tor-infused firefox, does not pop up like it should.  Tor log:  jul. 04 02:09:11.859 [Notice] Tor v0.2.3.25 (git-17c24b3118224d65) running on Linux. jul. 04 02:09:11.860 [Notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning jul. 04 02:09:11.861 [Notice] Read configuration file "/home/joren/.tor-browser/App/../Data/Tor/torrc". jul. 04 02:09:11.872 [Notice] Initialized libevent version 2.0.21-stable using method epoll (with changelist). Good. jul. 04 02:09:11.873 [Notice] Opening Socks listener on 127.0.0.1:9150 jul. 04 02:09:11.873 [Notice] Opening Control listener on 127.0.0.1:9151 jul. 04 02:09:11.937 [Notice] Parsing GEOIP file ./Data/Tor/geoip. jul. 04 02:09:12.178 [Notice] No AES engine found; using AES_* functions. jul. 04 02:09:12.178 [Notice] This OpenSSL has a good implementation of counter mode; using it. jul. 04 02:09:12.235 [Notice] OpenSSL OpenSSL 1.0.0k 5 Feb 2013 looks like version 0.9.8m or later; I will try SSL_OP to enable renegotiation jul. 04 02:09:12.740 [Notice] Reloaded microdescriptor cache.  Found 8497 descriptors. jul. 04 02:09:12.740 [Notice] I learned some more directory information, but not enough to build a circuit: We have no usable consensus. jul. 04 02:09:13.758 [Notice] Bootstrapped 5%: Connecting to directory server. jul. 04 02:09:13.761 [Notice] Heartbeat: Tor's uptime is 0:00 hours, with 1 circuits open. I've sent 0 kB and received 0 kB. jul. 04 02:09:13.908 [Notice] Bootstrapped 10%: Finishing handshake with directory server. jul. 04 02:09:14.252 [Notice] Bootstrapped 15%: Establishing an encrypted directory connection. jul. 04 02:09:14.507 [Notice] Bootstrapped 20%: Asking for networkstatus consensus. jul. 04 02:09:14.615 [Notice] Bootstrapped 25%: Loading networkstatus consensus. jul. 04 02:09:16.446 [Notice] We'd like to launch a circuit to handle a connection, but we already have 32 general-purpose client circuits pending. Waiting until some finish. jul. 04 02:09:16.447 [Notice] Bootstrapped 45%: Asking for relay descriptors. jul. 04 02:09:16.448 [Notice] I learned some more directory information, but not enough to build a circuit: We have only 113/3851 usable microdescriptors. jul. 04 02:09:17.755 [Notice] We now have enough directory information to build circuits. jul. 04 02:09:17.755 [Notice] Bootstrapped 80%: Connecting to the Tor network. jul. 04 02:09:17.810 [Notice] Bootstrapped 85%: Finishing handshake with first hop. jul. 04 02:09:17.818 [Notice] Bootstrapped 90%: Establishing a Tor circuit. jul. 04 02:09:18.156 [Notice] Tor has successfully opened a circuit. Looks like client functionality is working. jul. 04 02:09:18.157 [Notice] Bootstrapped 100%: Done.   How do I proceed solving this issue?


I recently replaced the light bulb in the oven. I pressed the oven light button while cooking nachos and hear a pop and the bulb went out, the heat went away, the display that shows the temp, time... went off. Breaker didn't trip, there's still power as the burners still work. Any ideas? New wiring in the oven? New fuse?

I recently replaced the bulb on my oven. However I did put back the insulating looking ring. I pushed the oven light button while baking nachos. I heard a pop and the heat went out as did the light and digital display that shows temp, time... The burners still work though. New wires inside needed? New fuse? Can someone please help!


There are many old/partial/... threads about this where I find none of them satisfactory and sufficient.  I want to turn all notifications off of my Android Facebook app.  It has not been possible before, so I did not have the app.  I will uninstall the app if there is no solution for the task.   I have browsed all Facebook settings but they do not have anything about turning all notifications off.   I would like to find also System specific block for Facebook App i.e. do not allow it it to show me any notifications.  It  would be great if you can do this without third party appplications.   Phone: Oneplus 2 OS: OxygenOS 3.1 (Android 6)

On my iphone, there is a "notifications" setting section, which basically just allows me to choose which apps has the power to notify me.  I was wondering if there's anything similar that is available on the Samsung Galaxy s2?  Basically, we have a new app called Scramble For Friends. And it keeps notifying us every time someone has finished their turn so that I can play. We play random people so this could be in the middle of the night or in a meeting etc.  It just vibrates but still - it's annoying and we want to turn it off. We also don't want to turn off other notifications like Email, Facebook etc. - we just want to turn off the notifications for Scramble For Friends.  I've been looking around in the Settings but there doesn't seem to be a universal page which deals just with notifications.


The company where I work has a set of kiosk devices which we install at remote sites. For the new version of these devices, we are looking at running Windows IoT Enterprise as the OS.  With this change, our existing MDM solution is not supported. When exploring alternative options, we came across Microsoft's Direct Access solution, which satisfies all of our requirements as far as management and cost effectiveness.  While Direct Access seems to be the solution we're looking for, there is one make-or-break question that I have not been able to find an answer to: Is the Direct Access client supported on Windows IoT Enterprise?  For the sake of clarity, by "supported" I mean "if it breaks, can we call Microsoft Support?" If it runs on the IoT client but is not a supported solution, we will need to look elsewhere.  Thank you

This is a  about Licensing.    Questions on licensing are off-topic on Server Fault.  If your question has been closed as a duplicate of this question, then this is because we want to help you understand why licence questions are off topic rather than just telling you "it just is". In all likelihood, this question will not address your question directly, it was not meant to.    I have a question regarding software licensing. Can the Server Fault community please help with the following:   How many licenses do I need? Is this licensing configuration valid? What CALs do I need to be properly licensed? Can I run this product in a virtual environment? Can I downgrade this product to an earlier version? Am I entitled to feature X with license Y?


I've always struggled with why everyone is afraid of the Night King in Game of Thrones and the army of the dead after it's revealed by Benjen that there's magic in the wall that prevent undead from passing through.   So, if Daenerys never flew Viserion North, who was then killed by the Night King...Does the Night King and the army of the dead have any way of breaking down / getting through the wall without Viserion or another dragon?   Note: I've read  answers, and none of them give a good enough explanation of how he would get past the wall without a dragon.

In Season 6, we find out the following about the magical properties of the wall:     BENJEN: This is where I leave you.   BRAN: You're not coming with us?   BENJEN: The Wall is not just ice and stone. Ancient spells were carved into its foundations. Strong magic to protect men from what lies beyond. And while it stands, the dead cannot pass. I cannot pass.   —"Winds of Winter" (Game of Thrones, S06E10)   So why would the men of Westeros need to worry about the Night King and his army? Couldn't they sit back and enjoy the wall's protection?


Why should I use KL divergence over just giving the abs difference from two PDFs?

I have learned about the intuition behind the KL Divergence as how much a model distribution function differs from the theoretical/true distribution of the data. The source I am reading goes on to say that the intuitive understanding of 'distance' between these two distributions is helpful, but should not be taken literally because for two distributions $P$ and $Q$, the KL Divergence is not symmetric in $P$ and $Q$.   I am not sure how to understand the last statement, or is this where the intuition of 'distance' breaks down?   I would appreciate a simple, but insightful example.


I was wondering. Is it possible for someone to major in Maths as in do their masters in Maths once they've earned their degree in Computer Science?

Can I be admitted to graduate school in a different field from my degree?  Specific cases include:   If I've taken plenty of advanced courses in field X in the process of completing a degree in another field, can I apply to graduate school in X? What if I haven't taken many courses in X, but I have acquired a good grasp of X through self-study or working in a related field? What if I've never studied X, but I have done very well in an unrelated field?  Could I be admitted to graduate school in X on the basis of general intellectual promise, and then make up the missing background after enrollment?   Note that this question is an attempt to provide a comprehensive answer, to avoid the need for a profusion of field-specific questions on this topic (see the associated ). Please feel free to edit the question or answer to improve them.


I want to get string if the string not contain word "RAM".     String : 16/32/64 GB    2 GB RAM 32/64 GB  3 GB RAM  64 GB  4 GB RAM   And the result to be obtained  :     String : 16/32/64 GB     32/64 GB  64 GB    What the regex pattern should be used? Please help me. Thank You.

I know it's possible to match a word and then reverse the matches using other tools (e.g. grep -v). However, is it possible to match lines that do not contain a specific word, e.g. hede, using a regular expression?   Input:  hoho hihi haha hede   Code:  grep "<Regex for 'doesn't contain hede'>" input   Desired output:  hoho hihi haha


I changed the projection of my base to WGS 84 PDC but I get these lines on top. This also happens to a few other projections. I am trying to make the Pacific the center of the map.

I wish to display a map in QGIS (world country shapefiles) showing all countries but centered on the Pacific area.   I am not familiar with Proj4, so is there any way this can be done in QGIS?


This does not happen frequently, but see for example:     I'm sorry for this duplication, but is there a better way to put your post on 2 different sites, without this stupid duplication?

Over the past couple of days there have been a few questions about overlapping proposals and questions that could belong on multiple sites:        What is the best practice before / after asking a question if you think your question might be better on another site?  or  If I think my question might belong on multiple sites as per the above posts?


Do you capitalize the word "state" when saying, "In Washington State, individuals who are unemployed may apply for treatment through DSHS."

Say we had the following:     Higher Education spending, clout, and influence in New York State is substantial. Within the State’s borders...   Should the latter instance of State be capitalized or not?


I frequently notice questions which are actually multiple questions circling around a specific problem in one. These usually appear as an introductory-paragraph followed by a numbered list of questions.   Is this behavior really constructive? Isn't it better to open multiple questions in this case? Doesn't it go against the stackexchange concept of one-question-one-answer? Don't they discourage people from answering when they can say something interesting about one sub-questions but not about the others because their answer would be incomplete? Won't that mean that people won't answer at all? Or does it on the other hand cause people to write answers which only address one of the points of the question while ignoring others, hoping that others will provide answers for other points? When that happens, which answer should be accepted? When I consider them bad, should I close them as too broad or some other close-reason? Should I downvote them? Should I ask these people in a comment to split the question into multiple ones? Would there be a way to discourage people from opening such questions?    And then they usually end with a paragraph asking the audience to answer all of these questions at once. What do you think about them?

Sometimes I come across a question on SO that is actually a number of questions all in one. If these "sub-questions" are closely related, it's not a problem. But if they are only weakly related (or not at all) it gets ugly. I'm now (ironically or hypocritically) going to ask a few questions of my own for the community to respond to:  Do you consider a question made up of a number of weakly-related sub-questions "inappropriate"? Why or why not? How many is too many sub-questions? What do you think is the best way to deal with such questions?  As an example,  I had some discussion about with another user. I will add a more complete version of my response in an answer below, but in short I felt that this question should be closed and many of the questions asked separately.


My iPhone has iOS 10 on it. My iPad Mini has iOS 9 which is the most recent version available for that device.  Can I restore my iPad Mini with a backup that I made from my iPhone? I only need my contacts and messages.

I have a 3gs with iOS 5.1.  I backed up my data, and wanted to restore to my new iPhone 4, with iOS 5.0.1.  Somehow, I was not given an option to restore my backup.  Is it possible to restore backup to a device that has older firmware?


I am having trouble understanding what off diagonal elememts of a density matrix represent. I know that it tells you the coherence but i dont undetstand why. Like in case of diagonal elements it tells you the probability of finding the system in some state because the diagonal terms are the product of the complex number (associated with the state) times its conjugate which gives the probability, but i dot understand the logic behind saying off-diagonal terms tell us coherence

Say we have some state $$|\psi\rangle=\frac{1}{\sqrt{2}}(|0\rangle+i|1\rangle)$$ it is in a quantum superposition of $|0\rangle$ and $|1\rangle$. Its density matrix is $$\rho=\begin{pmatrix}\frac 1 2 & \frac i 2\\ -\frac i 2 & \frac 1 2\end{pmatrix}$$ If we measure $\rho$ we get some classical density matrix of the form $$\rho=\begin{pmatrix}\frac 1 2 & 0\\ 0 & \frac 1 2\end{pmatrix}$$  Is there some nice intepretation of what these cross terms mean, other than just arrising from the phase of the state?


I m using . Is there any way to get the effect asked in  to this AAUsidebar theme.

I know about beamer's  feature \setbeamercovered{invisible} and \setbeamercovered{transparent} to hide or grey out upcoming item's . But is there some way to have past items greyed (transparent) and future items hidden (invisible), so that only the current item is black/highlighted? And the best would be if on or 1 slide after the last all the item's could be visible highlighted. Something like this:   [grey] past 1 [grey] past 2 current [hidden] future 1 [hidden] future 2 [hidden] future 3   Is there any easy way of doing this?


Today I fond that MariaDB is closed on my server (I dont know why) but its not restarted after crash.  I have already added mariadb to start on boot like:  sudo /sbin/chkconfig mariadb on   I want to ask that how to restart the service after it get closed ? Thanks for help.

On Windows, you can set what should happen if/when a service fails.  Is there a standard way of achieving the same thing on Linux (CentOS in particular)?  A bigger part of my question is: how do you handle sockets that have been left open - for example in TIME_WAIT, FIN_WAIT1, etc states.  At the moment if the service I am developing crashes, I have to wait for the sockets to clear or change the listen port before I can then manually restart it.  Thanks for your help.


Out of a total population of 50 items, there are 20 "correct" items, what is the probability of me selecting 11 (or more) of these correct items if I randomly choose 20?    How can I do this in R? I was thinking of using binom.test() but that assumes replacement, and my questions involves 'no-replacement' when making your selections.

If I am selecting 232 people from a pool of 363 people without replacement what is the probability of 2 of a list of 12 specific people being in that selection?  This is a random draw for an ultra race where there were 363 entrants for 232 spots. There is an argument about whether the selection was biased against a certain group of 12 people.  My initial attempt at calculating this was that there was 232 choose 363 possible selections. The number of combinations of any one person from the list of twelve is 1 choose 12 + 2 choose 12 + ... + 11 choose 12 + 12 choose 12. Thus 1 choose 12 + 2 choose 12 .... / 232 choose 363. Which ends up being a very low number which is clearly too low.  How do I calculate this?


I know that in League of Legends, if I try to have two items which are both unique with the same effect, that only the earlier purchased item's effect applies. ()  My question is in regards to stacking named Unique items with different effects.  Titanic Hydra and Ravenous Hydra both have "UNIQUE - Cleave" effects  but each Cleave effect does something different.  Does this mean that both Hydra's effect will be applied or will the same rule of which came first apply?

From  we know that stacking multiple items with the same named-unique effect do not stack. However, the Spellblade effect is different between the multiple items (listed below) that share the effect, so how exactly do they not stack? Does it just use the passive from the first item I got? For example, if I got an Iceborn Gauntlet followed by a Trinity Force would I get the TF or IG passive?        Sheen - Basic attack deals bonus Physical damage equal to your base attack damage. Trinity Force - Basic attack deals bonus Physical damage equal to 200% of your base attack damage. Lich Bane - Your basic attack deals bonus Magic damage equal to 75% of your base attack damage + 50% of your ability power. Iceborn Gauntlet - Basic attack deals bonus Physical damage equal to 125% of your base attack damage to surrounding enemies and creates a field for 3 seconds that slows enemies inside by 35%.


So I never read it personally, but I recall hearing about a story set in the future in which it's discovered that as observation collapses quantum states, it's possible to - through cybernetic brain alterations - actively choose which way you want it to collapse, generally to make matters of odds turn out slightly in your favour/slight reality-altering powers.  As it turns out, humans' observational powers are unique, and other races in the galaxy are being gravely endangered as humanity makes observations regarding the rest of the universe that conflict with what they necessarily need to survive/exist. To remedy the situation, the aliens are apparently erecting a massive opaque sphere around the solar system.  I believe the plot proper has to do with someone trying to investigate the rise of some kind of virus capable of hijacking a person's will and directly controlling their observational powers, with the intent of using the collective observational power of millions to massively warp reality - I think just for anarchic reasons.  That's about all I can think of at the moment, I'd really appreciate it if anyone's heard of this.  And I am 99.999% certain this is not The Quantum Thief...

Basically our thoughts are ruining everything. Like when humans are taught stars are giant balls of gas. To the rest of the universe they aren't but humans think it and destroy alien planets. I think they come to seal us off from the rest of the universe.


What is the difference between ArrayList and LinkedList? I watched a video on it by TheNewBoston but i am still confused. Please answer in a short form and in plain English. Please do not use any advanced code.

I've always been one to simply use:  List<String> names = new ArrayList<>();   I use the interface as the type name for portability, so that when I ask questions such as these I can rework my code.    When should  be used over  and vice-versa?


I am on a new private beta, and looking at tag wiki entries. I see some that are good fundamentally, but perhaps have a small error, like a spelling error. I can't figure out a way to improve the edit, either by accepting it, or trying to manually edit it. Is there a way to do this, and if not, can we make there be a way to do it?

Sometimes a users suggests an edit for tag wiki excerpts that needs a bit of improvement. As in the following screenshot, I wanted to remove the typos he introduced and leave the rest of his improvement.  However, I cannot "improve" the tag. The button isn't there. When I go to the tag, I cannot edit it. The only way is to accept, wait for another accept and then edit, which is cumbersome and it may move away from my radar before I get to it, leaving the errors.


For years I've been downloading things onto my Android then transferring them to SD cards via the usb port connected to a card-reader.   Could I use a basic unpowered external hard drive instead, such as a Sonnics? (Phone is not rooted)

On some sources I have read that it is impossible to use external hard drives over USB OTG. Is it really impossible? Isn't there some kind of workaround? Update: Apparently ES file explorer can see the disk but can't open it. I heard there are such issues with NTFS hard drives on Android.


I am looking for solution verification. I am trying to grasp the very very basic idea of modular arithmetic. I am sure there are lot of other ways to go about it assuming I did these problems correctly.  $3k \equiv 7 \pmod{13}$ since we are in mod(13) we only look at the values $k=0,...,12$  so $$3k -7 \equiv 0 \pmod{13}$$  $(k = 1) \space 3 - 7 =-4$  $(k = 2) \space 6 - 7 = -1$  $(k = 3) \space 9 - 7 = 2$  $(k = 4) \space 12 - 7 = 5$  $(k = 5) \space 15 - 7 = 8$  $(k = 6) \space 18 - 7 = 11$  $(k = 7) \space 21 - 7 = 14$  $(k = 8) \space 24 - 7 = 17$  $(k = 9) \space 27 - 7 = 20$  $(k = 10) \space 30 - 7 = 23$  $(k = 11) \space 33 - 7 = 26$  Now listing multiples of 13:  13  26  39  we get $26$ when $k = 11$ so the answer is $11$  $4k \equiv 2 (mod 7)$  $4k - 2 \equiv \space 0 (mod 7)$  we look at the values from $0,1,2....6$  $(k = 1) 4 - 2 = 2$  $(k = 2) 8 - 2 =6$  $(k = 3) 12 - 2 = 10$  $(k = 4) 16 - 2 = 14$  $(k = 5) 20 - 2 =18$  $(k = 6) 24 - 2 = 22$  listing multiples of $7: 7, 14 , 21 , 28$  we get 14 when when $k = 4$ so the solution to the congruence equation is $k = 4$

What is the best way to solve equations like the following:  $9x \equiv 33 \pmod{43}$  The only way I know would be to try all multiples of $43$ and $9$ and compare until I get $33$ for the remainder.  Is there a more efficient way ?   Help would be greatly appreciated!


I am trying to install Ubuntu Server on my desktop computer that has a wireless card. Installing Ubuntu from a flashdrive, I reached a part where I had to remove my wireless card to go through the network part of the installation because it would hang if the card was still inserted. However, I cannot get past the mirror selection. I get an error when it trys to connect to the archive mirror. Obviously, since I don't have my card inserted, it won't connect to anything. But the installation will hang if the cad is inserted. What do I do?

I downloaded the server version of Ubuntu from Ubuntu's official site. Created a Bootable USB from the ISO file I downloaded. I connected through Internet using DHCP in the installation process. While I was installing it on my Desktop Computer (pentium D 1 GB RAM) I have this error "Bad Archive Mirror".   I also found 2-3 questions with same problem on forum but I didn't get solution of my problem from them.


I add Content-Disposition header to generate filename for download.   self.response.headers['Content-Type'] = 'text/xml' self.response.headers['Content-Disposition'] = 'attachment; filename=' + os.path.splitext(filename)[0] + '.nfo'   It works well with English characters, but when the filename contains Russian characters (for ex., filename = u'Some video file (2014).avi') it fails. I tried different combinations of encode('utf-8') and urllib.quote, but it doesn't help.

Web applications that want to force a resource to be downloaded rather than directly rendered in a Web browser issue a Content-Disposition header in the HTTP response of the form:  Content-Disposition: attachment; filename=FILENAME  The filename parameter can be used to suggest a name for the file into which the resource is downloaded by the browser.  (Content-Disposition), however, states in  (The Filename Parameter) that the file name can only use US-ASCII characters:     Current [RFC 2045] grammar restricts   parameter values (and hence   Content-Disposition filenames) to   US-ASCII.  We recognize the great   desirability of allowing arbitrary   character sets in filenames, but it is   beyond the scope of this document to   define the necessary mechanisms.   There is empirical evidence, nevertheless, that most popular Web browsers today seem to permit non-US-ASCII characters yet (for the lack of a standard) disagree on the encoding scheme and character set specification of the file name. Question is then, what are the various schemes and encodings employed by the popular browsers if the file name “naïvefile” (without quotes and where the third letter is U+00EF) needed to be encoded into the Content-Disposition header?  For the purpose of this question, popular browsers being:   Firefox  Internet Explorer  Safari Google Chrome  Opera


Show that $Z(M_n(R))$ consist of $ \operatorname{diag}\{ a, a, ..., a \} $ with $ a\in Z(R) $

The question is from Axler's "Linear Algebra Done Right", which I'm using for self-study.  We are given a linear operator $T$ over a finite dimensional vector space $V$. We have to show that $T$ is a scalar multiple of the identity iff $\forall S \in {\cal L}(V), TS = ST$. Here, ${\cal L}(V)$ denotes the set of all linear operators over $V$.  One direction is easy to prove. If $T$ is a scalar multiple of the identity, then there exists a scalar $a$ such that $Tv = av$, $\forall v \in V$. Hence, given an arbitrary vector $w$, $$TS(w) = T(Sw) = a(Sw) = S(aw) = S(Tw) = ST(w)$$ where the third equality is possible because $S$ is a linear operator. Then, it follows that $TS = ST$, as required.  I am, however, at a loss as to how to tackle the other direction. I thought that a proof by contradiction,  ultimately constructing a linear operator $S$ for which $TS \neq ST$, might be the way to go, but haven't made much progress.   Thanks in advance!


I'm trying to create an array of meshes (with the same mesh data) between two different shape keys, interpolating between the two, like when tweening curves in Rhino. So far, all I have been able to do is manually duplicate and adjust the shape key for each object, but this also doesn't quite work as the base and final shape keys seem to change as I make duplicates (?) Any help would be great!

I have made a simple profile mesh (an edge loop) which I've animated along a path using 'Follow Path'. It has a number of Shape Keys, and as it moves along the path, it changes shape. I would like to capture a copy of the full state of the mesh, in place, at each frame of its animation.   This would be, if you like, a sort of 'physical onion skinning'. Dupliframes capture the transformations of the mesh at each frame, including tilts and scales derived from the path,  varying those along the path, so come very close. But they don't capture the Shape Keys. If I alter the shape, it changes in all the duplicates,irrespective of keyed frames.  I'm attempting this in the hope of modeling with the resulting copies: creating a mechanism for lofting between varying profiles along a curve with a reasonable degree of accuracy, and ease of workflow.. so if there's an alternative route to that, please comment.


This is more a question born out of curiosity than actual needs, but this seems like the right place for it.   Based on  I was wondering what world maps centered on the GC would look like. Has somebody played around with it and can link their results here(or even place it on wikipedia in  article)? I imagine a polar projection or a cylindrical projection with the GC as coordinate origin.

I want to find the center point of all lands of the earth.  What I have tried up to now is downloading shapefile of all countries and polar parts of the earth. Then I imported that shapefile into a SQL Server 2008 database and then tried to run some queries to find that point but all of them were in vain.  How can I calculate the Centroid of all lands of the earth using SQL Server?


I'm using PHP with MySQL to make a basic search engine on my website to look up books that people post, but the problem is that I'm using something for example:  `title` LIKE '%".(string)$searchTerm."%'   NOTICE: The variable $searchTerm is being escaped before-hand.  I know this is widely used and works pretty good, but the problem is that, if I have a book title for example:     Writer's Reference   The result(s) would show, if someone searches for "Writer's Reference" (with no double quotes) But, if someone looks up just "Writers Reference" the result won't show up, which is why I'm here asking what may be a good idea to resolve this.  Using AJAX to query every time on every onkeyup event? Collecting every output into an array? But that might slow-down the process. Is there a way in MySQL that filters and ignores apostrophes, but at the same time, if someone uses an apostrophe it would work? A regex operation?  Thanks.  EDIT: I'm not trying to prevent SQL Injections, I'm looking for a way that if someone looks up a word without an apostrophe, the result with an apostrophe shows up, but at the moment with the LIKE %% won't show up, because it takes direct words from the database. So if the search term does not have an apostrophe and the result has one, it won't show up.  EDIT 2: As I followed the comments, I recently updated the two columns in the database to use FULLTEXT via ALTER TABLEdbname.bookADD FULLTEXT (title,description)  But after so, I'm using a switch case to see if the user is selecting to search in the title or description, or both, both work, as I'm using MATCH(title,description) AGAINST('".(string)$sTerm."') but the others that look in the title or description only won't work as planned, of course, I'm having something like: MATCH(title) AGAINST('".(string)$sTerm."') but won't work unless I make it MATCH(title,title) AGAINST('".(string)$sTerm."') (Adding another title in the MATCH)  Also, still, when someone searches for "Writes Reference" without the apostrophe, it still won't work for some reason, might it be my php code?

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


Is the universe infinite? Or is it finite?  If it is infinite,it's very difficult to imagine an endless space(though not impossible).  But if it's finite, the idea that we can't go beyond a certain space just creeps me out.  So, what is it actually?

I thought the universe was finite, but then I read this:    And they seem to assume it is infinite. So which is it?


Let $n$ be a positive integer which is not divisible by $2$ and $5. $ Prove that there is a multiple of $n$ consisting entirely of ones.   This problem possibly is a duplicate,  and I am using the android app in which I don't know how to find existing questions.   I think this can be solved by using Fermat's Little Theorem.   Any help will be appreciated

I recently solved a , which says that,     A positive integer can be multiplied with another integer resulting in   a positive integer that is composed only of one and zero as digits.   How can I prove that this is true(currently I assume that it is). Also, is it possible to establish an upper bound on the length(number of digits) of the number generated?


I want to format a USB-Drive (/dev/sdc) and make multiple partitions each of a different type using fdisk. My fdisk uses sectors(not cylinders) to create a new partition. /dev/sdc1 <- NTFS  (10GiB) /dev/sdc2 <- Fat32 (04GiB)    Can someone please provide the step by step method to be used in a terminal ?

I want to know how to format a storage drive from the terminal. Helpful things to provide in the answer would be often used options for commands and base knowledge that one can use to extrapolate future uses. Specifically I would like to know how to format in the different file systems such as NTFS, FAT32, EXT4, etc. Information on how to partition the drive via terminal is also wanted.  I am trying to format a high capacity external hard drive (EHDD) into NTFS - from the terminal.   I know I can use gparted for this as well as other GUI programs, but I still want to now how to do it from the terminal.


There are there groups (colA, colB, colC) representing three different measurement methods. The question is whether there is a difference between the three methods. To decide the question we perform experiments and measure the same thing with each method. The output of each method is a label not a value on a numeric scale. In addition, we do not have a control group so we do not know which method's output is the right one in the experiment. I solved the question in the way below  but I became uncertain whether it is a correct solution. I might have oversimplified the problem. Consequently, the chi-square approach used tests something else not what we want.  Data:             colA,    colB,    colC experiment1 label1,  label1,  label2 experiment2 label3,  label1,  label3 experiment3 label4,  label4,  label2 experiment4 label5,  label4,  label5 ...    My first approach, probably oversimplified:   As we do not know which label is correct and which not, we regard at first all the outputs of method A correct and compare them to the other two columns and count the same labels in the same experiments in the other columns, then we regard all the outputs of method B correct and then method C. So we get the label count below:   I. colA regarded as correct colA(4) colB(2) colC(2)  II. colB regarded as correct colA(2), colB(4), colC(0)  III. colC regarded as correct colA(2), colB(0), colC(4)   Then we compute a chi-square test for each, here II. and III. are the same. (There are more than 5 expected values in each column it is just the example to highlight the problem.) This way we get three p values for each test, from which we select the highest one to be on the safe side and decide whether the deviations between columns are likely to be caused by chance only.    My second approach would probably be:   The data same data transformed in a different format:                          label1, label2, label3, label4, label5 methodA (earlier colA)       1,      0,      1,      1,      1, methodB (earlier colB)       2,      0,      0,      2,      0, methodC (earlier colC)       0,      2,      1,      0,      1,   Here the expected values for each label would be greater than 5 with the real data. However, we do not want to test whether the distribution among the labels are caused by chance only but whether there is a difference between the methodA, methodB and methodC. Can Chi-Square be used here? What other tests would you propose to use to see whether there is a difference between the three methods?  What would be your solution? Thank you also in advance for any comments.


I am trying to initialize an array grid of objects and get a null point error when I do so. It should be calling the object Constructor in Cell each iteration of the loop.  Instead I am getting the error. Please help. public class Spread extends JPanel {     private JPanel outputArea;     private JTextArea numberDead;     private JTextArea totalInfected;     private JTextArea newInfections;     private Integer totalDead;     private Integer total;     private Integer newInfected;     private Integer length = 60;     private Integer width = 100;     private Cell[][] label;          public void makeOutputArea() {         int a;         int b;         outputArea = new JPanel(new GridLayout(length, width, -1, -1));         outputArea.setBorder(BorderFactory.createEmptyBorder(2,2,2,2));          for (a = 0; a < (length - 1); a++){             for (b = 0; b < (width - 1); b++)                 label[a][b] = new Cell(); //nullpointerror is located here.                 label[a][b].setPreferredSize(new Dimension(10, 10));                 label[a][b].setOpaque(true);                 outputArea.add(label[a][b]);                 outputArea.setVisible(true);                 if (label[a][b].getInfected() == true) ++total;             }         }          public JPanel getOutputArea() {         return outputArea;     } ...Additional code follows.  This is the Cell class it should be initializing in the array. As you can see it has a constructor, which should be called for each loop.  Instead it is giving a null pointer and never initializing each cell object. import java.awt.Color; import java.util.Random; import javax.swing.JLabel;  @SuppressWarnings("serial") public class Cell extends JLabel{     private int iteration;     private boolean infected;     private boolean dead;     private boolean immune;     private Random generator = new Random(); //Random number Generator     private static int infectionRate = 5;     private static int deathRate = 3;               public void setIteration(int i) {         iteration = i;     }          public int getIteration() {         return iteration;     }          public void setInfected(boolean b) {         infected = b;     }          public boolean getInfected() {         return infected;     }          public void setDead(boolean a) {         dead = a;     }          public boolean getDead() {         return dead;     }          public void setImmune(boolean i) {         immune = i;     }          public boolean getImmune() {         return immune;     }          public Cell() {         setImmune(false);         setDead(false);         setIteration(0);         if (generator.nextInt(100) < infectionRate) {             setInfected(true);             setIteration(++iteration);         }         else setInfected(false);         color();     }          public void color() {         if (getInfected() == true) setBackground(Color.RED);         else if (getDead() == true) setBackground(Color.BLACK);         else setBackground(Color.GREEN);     }          public void updateInfection(boolean b) {         try {             if (getImmune() == true) return;             else if (getDead() == true) return;             else if (getInfected() == true) {                 setIteration(++iteration);                 if (iteration >=4) {                     if (generator.nextInt(100) < deathRate) {                         setInfected(false);                         setDead(true);                         return;                     }                     else {                         setInfected(false);                         setImmune(true);                         return;                     }                 }                 return;             }             else {                 if (generator.nextInt(100) <= 75) {                     setInfected(true);                     setIteration(++iteration);                     return;                 }                 else return;             }         }         finally {             this.color();         }     } }

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


I need to copy every 6 cells down horizontal to a new column  So that D3/E3/F3/G3/H3/I3 goes to J2/K2/L2/M2/N2/O2 And that D4/E4/F4/G4/H4/I4 goes to P2/Q2/R2/S2/T2/U2   And so on for sets of 20 rows  I swear I did it before, do not know VBA but am stumped other than manual paste

I have a movie list with over 1500 entries (A1-A1500), all alphabetized (Thanks to Excel) and I would like to split that into multiple columns of 55 rows each on a separate sheet if possible.  So A1-A55 from Sheet1 would go to A1-A55 on Sheet2, and A56-A110 would go to B1-B55 on Sheet2, so on and so on.  Each cell is an individual movie name and I would just like them to go from one long column to multiple columns with 55 rows in each.


i have a question why we use <!doctype HTML> outside of <HTML> tag? and don't use inside it?

What is DOCTYPE and why do I want to use it? What are the different DOCTYPEs I can use? What is the difference between standards and quirks mode, and what are some quirks I may run into with differently set DOCTYPEs?   Lastly, what is the proper DOCTYPE that I should be using?


Can you please have a look at ? Even if I receive reputation points, the counter constantly stays at 437.

If I am concerned that my reputation score is incorrect, how can I audit it, or get a report of a detailed breakdown of my reputation?


The Sony A7r II has 42.4 (effective) Megapixels with a pixel area of 20.33µm2; and   the Sony A7s II has 12.2 (effective) Megapixels with a pixel area of 70.55µm2.  (both are FF camera's)  That is, A7r II has more pixels, whereas the A7s II has larger pixels.    Question.  I'm looking for a comprehensive list on what (dis)advantages larger pixels have over more pixles and vice versa, in general. The specific case of the A7r II vs A7s II can be used for explanation purposes.    List of Camera's with same sensor size and different number of pixels.   A7r II, 42.4 megapixels Nikon D810, 36.3 megapixels Canon 5D Mark IV, 30.4 megapixels Nikon D610, 24 megapixels Sony A7s II, 12.2 megapixels Canon 1Ds, 11 megapixels        EDIT: This (old) part will be deleted later.      This is not a 'small' difference. How does this translate to usage?   What is the possible 'aim' of Sony here? What can one do that the   other can't, or at least not as good. Here is an obvious starting   point:         More pixels yield larger image, which is what you want if you're going to print large photos.   ...         Why would you prefer one over the other? When just looking into the   number of pixel and single pixel area.

Are more megapixels good?  Are more megapixels bad?  Do more megapixels increase detail? Do they make my images sharper? On the other side, is there a point that is too much? Do megapixels cause increased noise and other problems? How does print and viewing size come into it?  Widespread Internet-forum wisdom used to be that 6 megapixels was the sweet spot — below that just wasn't enough, but above that, there wasn't much benefit. File sizes got larger, but detail was lost to noise and other problems. The arguments are that cramming too many pixels into a small sensor makes each pixel too small to provide any real benefit, and that higher-megapixel sensors outresolve cheap lenses anyway. (Substitute something like 12 instead of 6 if we're discussing APS-C DSLRs, or 24 for full-frame.)  By 2011,  was in the range of 12-18 megapixels. In 2016 most were are in the 16-24 megapixel range. Certainly none are at 6 anymore; even smartphones come with 8 megapixel cameras. Does this offer any real improvement over that old "sweet spot"? Has technology improved to the point where the "wisdom" needs to be updated, or are we all suffering for marketing? Or have we gone past the sweet spot in some ways, but it's okay because of previously-un-argued points. (For example: more noise, sure, but more detail as well.)  Within the 16-24 megapixel common-today range, for the same sensor size, is there any actual benefit to the higher end? How do megapixels directly affect image quality with today's technology? What are the benefits and when do they apply? What are the drawbacks, and when do they apply? How should I adjust my technique (and expectations) based on my camera's megapixel count?


I am planning to start studying optimal control, especially the bang-bang problem.   What elementary texts or documents on the subject would you recommend?

Ok, so I am reading about decision making and I came across this subject. Fortunately it has a  , but the point is I want to see some examples, and learn to solve regular problems of this field. Of course I can go for the book by Pontryagin but then I don't think that would be an educative book. Does anyone has a suggestion? I would be happy if it also covers LQ problems. P.S. I studied math, therefore I appreciate a book with rigorous approach to the subject.


Problem:  prove $\max\{x,y\}=\frac {(x-y)}{2} + \frac {(x+y)}{2}$  $x$ and $y$ are max elements in two sets.   Here is what i have thought of so far as a concrete problem: $\max \{4,5\}=d(4,5)= 1$  I know that the $$\begin{align} \max\{4,5\} &= \frac{4-5}{2}+ \frac{4+5}{2} \\                               &= \frac{-1}{2}+\frac{1}{2}  \\ &= 0\end{align}$$  I am thinking of breaking it down to trichotomy: $x=y, x>y$, and $x<y$.  for $x=y$  what i got is.. $$ \begin{align}  \max\{x,y\} &= \frac{(x-y)}{2}+\frac{(x+y)}{2} \\              &=  0+x \\              &=  x \end{align} $$ (which is the max)  but why isn't this 0?  and am i even thinking in the right direction or am i mixing up two different concepts?

Show that the $\max{ \{ x,y \} }= \dfrac{x+y+|x-y|}{2}$.   I do not understand how to go about completing this problem or even where to start.


So, first of all, here is a test file:   The column length was added using QGIS (v 3.10 A Coruña), field calculator and adding parameter $length.   If the file is opened with geopandas (v 0.6.1), the property length outputs this:  a.length Out[8]:  0    1581.729679 1     899.177689 2      38.054220 3      47.333848 4     189.591771 5     275.946388 dtype: float64  the values obtained by qgis are:  a['length'] Out[9]:  0    1580.830737 1     898.686067 2      38.033291 3      47.307854 4     189.489982 5     275.796306 Name: length, dtype: float64  As you can see there is a difference of a few centimeters.   Has anyone else experienced this?

I created some linestring features in EPSG:32632 (WGS 84 / UTM zone 32N) exactly 10 000 m long.  QGIS calculates all line lengths (horizontal, vertical, diagonal) as 10 001.9 m. The measure tool explains "Project CRS transformation is turned on and ellipsoidal calculation is selected. The coordinates are transformed to the chosen ellipsoid (WGS84), and the distance is calculated in meters."  When I set the ellipsoid to "None / Planimetric" in project properties, I get the expected results (10 000 m).  I don't understand the phrase "coordinates are transformed to the chosen ellipsoid (WGS84)", is it a transformation to unprojected degrees (4326?)? Since 32632 already is based on WGS84, is there anything to transform? If there is a kind of "great circle" calculation involved, I would have expected lengths can only get smaller.  Is QGIS's calculation correct/meaningful, is it plain wrong or do I see rounding errors?  This are the geometries I tested:  LineString (370000 5615000, 370000 5625000) LineString (366464.46609406732022762 5616464.46609406732022762, 373535.53390593267977238 5623535.53390593267977238) LineString (365000 5620000, 375000 5620000) LineString (373535.53390593267977238 5616464.46609406638890505, 366464.46609406638890505 5623535.5339059317484498)   Edit as addition to MappaGnosis's answer: I forgot that in UTM , this seems to be the simple answer for the title question.


I want to setAction on ItemClick in the RecycleView, I setup the listener in the adapter but always i got NullPointer. I want to know what's wrong with my code  I have tried different adapter but always the same Result.  Fragment Contact:   adapter.setmOnItemClickListener(new MyContactAdapter.OnItemClickListener() {          @Override         public void onItemClick(ContactItem contactItem, Boolean isChecked) {             Logger.d(Pair.create("Test", "OnItemClick"), LoggerConstant.CUSTOM_VIEW, "ItemClicked :" );              //if ( mFloatingActionButton != null)                mFloatingActionButton.enableFloatingButton(true);             //    mFloatingActionButton.setOptionOnClickListener(this);         }     });   Listener In the adapter:  public interface OnItemClickListener {         void onItemClick(ContactItem contactItem, Boolean isChecked);   }  public void setmOnItemClickListener(OnItemClickListener  itemclick) {     Logger.d(Pair.create("Test", "OnItemClick"), LoggerConstant.CUSTOM_VIEW, "ItemClickedAdapterSet :" );     mOnItemClickListener=itemclick;  }   OnBind ViewHolder      contactItemView.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View v) {             if(mOnItemClickListener != null){                 mOnItemClickListener.onItemClick(contactItem,true);             }         }     });   I expect to have log on ItemClick Listener but always null pointer