Given a linear congruence $x + a ≡ y $ mod $n$, is it valid to rewrite as $x - y ≡ a $ mod $n$ ? Based on the definition of congruence, $n | x + a - y$ if we have the expression $x + a ≡ y $ mod $n$ and $n | x - y - a$ if we have the expression $x - y ≡ a $ mod $n$


How do I resolve slow and choppy performance in virtualbox?

Ubuntu runs very slowly inside of VirtualBox.  How do I run Ubuntu with unity or enabled transparency smoothly with VirtualBox?


Convert MySQL query into prepared statement with possible null value

In an effort to prevent sql injections, I am converting my queries into prepared statements. I have one left. It contains a possible null value too, hence it's proving to be a little difficult.  Normal:  // Declare $dbc, $varA, $varB, $varC, $ID  $varC = ($varC == '-') ? "NULL" : "'" . $varC . "'";  $query = "UPDATE myTable "; $query .= "SET VARA = '{$varA}', VARB = '{$varB}', VARC = $varC "; $query .= "WHERE ID = '{$ID}'";  $result = @mysqli_query($dbc, $query) or die("Error updating record: " . mysqli_error($dbc));   Attempt at prepared statement:  // Declare $dbc, $varA, $varB, $varC, $ID  $varC = ($varC == '-') ? "NULL" : "'" . $varC . "'";  $query = "UPDATE myTable "; $query .= "SET VARA = ? VARB = ? VARC = ? "; $query .= "WHERE ID = ?";  $stmt = mysqli_prepare($dbc, $query); $bind = mysqli_stmt_bind_param($stmt, "ssss", $varA, $varB, $varC, $ID); $exec = mysqli_stmt_execute($stmt); mysqli_stmt_close($stmt);


Expiration dates vs. "Best before" dates?

This has been discussed briefly elsewhere (e.g. ), but it doesn't seem to have been asked generally.  In the USA, there are a variety of dates printed on foods. Unfortunately, there seems to be little convention. The list includes at least the following (feel free to add more!):   Best by [DATE] Best if used by [DATE] Best before [DATE] Expiry date: [DATE] Expiration date: [DATE] Expires by [DATE] Use by [DATE] Use before [DATE] Freeze by [DATE] Eat fresh or freeze by [DATE]   What meaning is implied/conveyed by each of those?  For example:   What do each of those mean in terms of taste, quality, safety, etc?  Are any of them firmer deadlines than another, and are any intended to be mere guidelines?  Common sense tells us that "expires on [DATE]" means it's assumed to be unsafe after [DATE]), but does it say anything more -- or less -- than that, and what of the others?


C#: Difference between List and Collection (CA1002, Do not expose generic lists)

Tried to run Run Code Analysis on a project here, and got a number of warnings that said something like this:     CA1002 : Microsoft.Design : Change 'List<SomeType>' in 'SomeClass.SomeProtectedOrPublicProperty' to use Collection, ReadOnlyCollection or KeyedCollection   Why should I use Collection<T> instead of List<T>? When I look at the msdn documentation, they seem almost equal. After reading the error help for the warning, I found that      System.Collections.Generic.List(T)_is a generic collection designed for performance not inheritance and, therefore, does not contain any virtual members.   But what does this really mean? And what should I be doing instead?  Should I keep using List<T> internally, and then in the properties return a new Collection<T>(someList) instead? Or should I just start using Collection<T> instead of List<T>?


What's the motivation to define the unit of current as fundamental in SI system?

The charge in electromagnetism seemingly plays the same role like mass in the Newtonian mechanics.But why we define the current unit (Ampere) in  as the fundamental rather than charge unit?


max fan speed rpm is not correct on dell alienware m14xr2, how to fix it?

im getting a problem, i have alienware m14xr2 with i7 cpu, using linux (right now im using ubuntu 18.04) also manjaro, i have a problem on heavy load my notebook is shutting down due to overheating because when the temp is for example 90c my fans are running at 4200 rpm and is not sufficient to reduce the temp and when my notebook get 105c shutdown.  in windows this not happen because the fan at that temp run at like 7200 rpm, my fan is 10.4CFM, i check my fan speed using lm-sensors and i8kmod module for dell in linux and the max speed is only 4200  I try to manipulate it manually using fan control and i8kmod trying to set the fan speed to 7200 rpm but it don't take my settings.  I already try with other board, and with new thermal paste but the same, in windows this not happens, windows is handling the fan and cpu temperature fine.  Thanks.


Join spatial point data to polygons in R

I am trying to perform a spatial join between point data and polygon data.  I have data that indicate the spatial coordinates of an event in my csv file A and have another file, shapefile B, that contains the boundaries of an area as polygons.  head(A)   month   longitude latitude lsoa_code                   crime_type 1 2014-09 -1.550626 53.59740 E01007359        Anti-social behaviour 2 2014-09 -1.550626 53.59740 E01007359                 Public order 3 2014-09 -1.865236 53.93678 E01010646        Anti-social behaviour  head(B@data)   code      name                                  altname 0 E05004934 Longfield, New Barn and Southfleet    <NA> 1 E05000448                   Lewisham Central    <NA> 2 E05003149                            Hawcoat    <NA>   I want to join the crime data A to my shapefile B to map the crime events that happen in my area A. Unfortunately I cannot perform an attribute join based code as the code in A refers to different units than the code in B.  I've read a number of tutorials and posts but could not find an answer. I tried:  joined = over(A, B)   and overlay, but did not accomplish what I wanted.  Is there a way to do this join directly or would an intermediate transformation from A to another format be needed?  Conceptually I want to select those points of A that fall into the code areas of B (similar to "join based on spatial location in ArcGIS").  Did someone have this issue and solved it?


Cache the password if SSH-keys are forbidden

I have a server which I have to access frequently via ssh, because I compute on it. Now, the computing center explicitly forbids SSH-keys because they are "insecure". They feel that typing my password, on a keyboard, everytime, possible in front of other humans, is a much safer way to login.   Now; I cannot change their minds (I tried).   Is there a way to at least temporarily store SSH passwords, the way GIT can store passwords in a cache for some defined time?


Without using rotational mechanics, why does a gyroscope precess the direction it does?

When a top is spun, it will precess in some direction, either clockwise or counterclockwise. It's possible to find out which way using $\boldsymbol{\tau} = d\mathbf{L}/dt$ and $\boldsymbol{\tau} = \mathbf{r} \times \mathbf{F}$, where $\mathbf{F}$ is the force of gravity.  However, I was never totally satisfied with this because I couldn't "see" exactly why the conclusion was true. Intuitively, I don't get, in my gut, why a downward force $\mathbf{F}$ can push the rotation axis to the left or right.  In principle, one can explain this by just applying non-rotational mechanics to different pieces of the gyroscope. I think this would really help me visualize what's going on. Is there such an explanation?  Note: I already know about the math of rotational mechanics, so please don't rewrite it. I am not interested in any answer that contains a $\boldsymbol{\tau}$, $\mathbf{L}$, $\boldsymbol{\omega}$, or $\times$ anywhere in it.


I would like to use the symbol '𝔖' in Latex (used for ).  Any ideas?


Help with a Predicate Logic homework proof

I have a Predicate Logic argument I need to translate into the symbolism of predicate logic first and then I need to construct a proof in CP.    The argument is "Some wars are just. No war of aggression is just. Therefore, there are wars that are not wars of aggression. (Wx = x is a war, Jx = x is just, Ax = x is a war of aggression)."    I think I have it translated right, however, I am lost on how to construct the proof into CP.    This is how I have translated it (∃x) (Wx • Jx), (x) (Ax → ~Jx) ∴ (∃x) (Wx • ~Ax)   I need help with the CP proof. Any help would be very much appreciated!  I am also only allowed to use implicational rules like, MP, MT, HS, DS, CD, Simp, Conj, and Add.  Equivalence rules such as DN, Com, As, DeM, Cont, Dist, Ex, Re, ME, MI. As well as QN, UI, EG, EI, UG.


C++ Erase vector element by value rather than by position?

vector<int> myVector;   and lets say the values in the vector are this (in this order):  5 9 2 8 0 7   If I wanted to erase the element that contains the value of "8", I think I would do this:  myVector.erase(myVector.begin()+4);   Because that would erase the 4th element. But is there any way to erase an element based off of the value "8"?  Like:  myVector.eraseElementWhoseValueIs(8);   Or do I simply just need to iterate through all the vector elements and test their values?


Assigning values in a list by value instead of reference

So I'm toying with the traveling salesman problem, and I have the following code to create random instances of the TSP. (tangent, does TSP stand for Traveling Salesman Problem, or Traveling Sales Person? in otherwords, is TSP problem redundant? But back to the main problem...)  import numpy as np import random import copy def generate_TSP(num_nodes, symmetric=False, triangleInequality=False, rangeStart=0.0, rangeEnd=100.0, dropEdges=0.0):     tsp = [ [0]*num_nodes ] *num_nodes     for i in range(num_nodes):         for j in range(num_nodes):             if i == j:                 tsp[i][j] = np.inf                 continue             else:                 tsp[i][j] = round(random.uniform(rangeStart, rangeEnd), 2)             if symmetric:                 tsp[j][i] = copy.deepcopy(tsp[i][j])             if np.random.rand() < dropEdges:                 tsp[i][j] = np.inf     return tsp   The Problem is that when I call generate_TSP(4, symmetric=True) it doesn't return a symmetric matrix. Instead, every row in the matrix is the same as the last row. I figured this has something to do with python assigning by reference instead of value or something like that, so I've tried it with the deep copy and without. Forgive my C++ ways, but I don't quite understand python's reference vs value system.  Here's an example of the output  josephfs@DESKTOP-IH0RR0A:~/cs312/TSP$ python3 Python 3.6.9 (default, Nov  7 2019, 10:44:02) [GCC 8.3.0] on linux  Type "help", "copyright", "credits" or "license" for more information. >>> import TSP >>> print(TSP.generate_TSP(4, symmetric=True)) [[91.87, 15.11, 52.67, inf], [91.87, 15.11, 52.67, inf], [91.87, 15.11, 52.67, inf], [91.87, 15.11, 52.67, inf]]


Ajax call using element created by ajax is not calling

IN below code ,  created using ajax is not working for another ajax   <!DOCTYPE html>

Let jQuery AJAX Change This Text

  <button>Get External Content</button>      When i tried to click button created by ajax. and no response is shown..


I need to validate this email using JS, I need to check for the @sign and a period. This is what I have now, but if I run all my code it doesn't not validate the @ sign.  if(email.value == "" || !isNaN(email.value) ) { var re = /^(([^<>()[\]\.,;:\s@\"]+(\.[^<>()[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i;         //something is wrong.        isValid = false;        txtFeedback.innerHTML += "
Please enter a valid email address.
";         email.nextElementSibling.innerHTML = "Please enter a email address.";    }


Is there a name for the relationship between a movement and a follower of that movement?

Movements and philosophies often have a specific term that is used to describe followers of it.  For example, Islam and Muslims, the Society of Jesus and Jesuits, Communism and Communists, even the Grateful Dead and Deadheads.  The analogous relationship between person and place is called .  Is there such a term for the relationship that I've described?


Any idea where I can learn to recover an encryption key?

So I have been given an assignment to recover an encryption key through the method of brute force. I know the keyspace is 2^16. I have the ciphertext, and I have the encryption/decryption algorithms. My problem is I have no clue how one would begin any sort of brute force attack. I don't require any cryptoanalysis from anyone, just maybe some tips and tricks, or a good resource anyone may know of that might help me realize my goal. This is my first time attempting anything like this. I'd really appreciate it guys. If it would helpful in determining what advice I'd need: The assignment code is given at  under lecture notes 2. "With BLOCKSIZE set to 16, the script EncryptForFun.py produces the following ciphertext output for a plaintext message that is a quote by Mark Twain: 20352a7e36703a6930767f7276397e376528632d6b6665656f6f6424623c2d\ 30272f3c2d3d2172396933742c7e233f687d2e32083c11385a03460d440c25 Recover the encryption key and decode the message"


Why do JPEG files blur red more than other colors?

I am trying to figure out why JPEG compression causes noise in the red spectrum that is larger and fuzzier in regards to, say, the blue spectrum.  I've seen  and I am not looking for a workaround; I just want to know why red is prone to more distortion during compression.  This behavior is highly visible in 'political campaign' images (where the picture is rendered in red, blue, and some shade of tan), but is visible elsewhere too.  Here is an example:  Notice the border along the red side?


Let $f: X \to Y$ be a morphism of schemes. Consider the graph morphism $(id,f): X \to X \times Y$. Denote by $\Gamma_f \subset X \times Y$ it's schematic image. Futhermore the projection $pr_X: X \times Y \to X$ induces the morphism $p:\Gamma \to X$  My question is under what conditions (preferably the most weak ones) on $f,X,Y$ the graph morphism $(id,f)$ and $pr$ are isomorphisms.  I know:  -$(id,f)$ is always an immersion and even a closed immersion (by a base change argument) if $Y$ is separable (can be seen by a base change argument)  -it's (set theoretically) injective since $pr . (id,f)= id$ for $pr: X\times Y \to X$.  -then there are always some boring conditions like when $f$ is already an isomorphism or similar  Does anybody know the most weakingst conditions which garantee that $(id,f)$ is an iso


Restrict programs from accessing the Internet

I have a 256 kbit/s Internet connection. Most often, I find that the browsing speed is too slow. I have to use  (SysInternals) to find out which program is accessing the Internet without my knowledge and terminate it. Previously I was using  to control Internet access by installed programs. But as it doesn't work for Windows 7, I'm left with no option.   Is there any other tool which serves the purpose?


I want to install wine and my pc is giving me the response  E: Unable to locate package wine-devel


What does an icon that looks like a pair of connected chain links next to a wireless network name mean?

When I click on the WiFi symbol in the menu bar on my Mac I get a list of wireless networks, most of them with little lock icons next to them. But some of them show what looks like a pair of chain links instead (see image below). What does this mean? That these networks are personal hotspots?


Russian utf-8 shows special characters? (PHP)

I displayed some Russian words on HTML and it showed like following.     ГђВџГђВѕГђВ»ГђВЅГ‘В‹ГђВ№ ГђВєГђВ°ГђВґГ‘ВЂ   The result is:     Полный кадр   I tried to convert the original string to UTF8 and displayed in HTML. I showed like above.  Some information:     store field collation: latin1_swedish_ci   The sql result is :      ÐÐ¾Ð»Ð½ÑÐ¹ ÐºÐ°Ð´Ñ   I queried the database and get the value. And then convert to utf8:  mb_convert_encoding($value, 'utf-8', 'windows-1251');   Could you please take a look at this link. Someone fixed it:  http://stackoverflow.com/questions/13765242/need-help-determining-encoding-of-the-text   The problem is I'm rebuilding a website. Some data is from old website. And I cannot input it manually because It's a lot. So I wrote a php script to get data from the old website and inserted to my new website. The old website display russian in HTML perfectly. But I didn't code it, and I cannot see his code. I already check the data between old table and new table. It's the same.


Can I switch to the Imperials after I join the Stormcloaks?

Well, I don't know if this is even fixable. At the start of the game, I ended up joining the Imperials like I do any other time, but I accidentally joined the Stormcloaks by giving the Jagged Crown to Assface over in Windhelm.   My controller has always had issues with lag for odd reasons and often selects things I don't want it too. So, my question is: Am I stuck with this guy for the rest of the game? Is there a way to go back to the Imperials? I am playing on the Xbox 360.


Writing a letter of recommendation as a graduate student

I am a MA student who frequently works with undergraduates on projects. One student has asked me if I can write her a letter of recommendation for graduate school. Are there any risks to me submitting a letter, as opposed to her finding a faculty member (who likely would not be in the same field as her interests)? For graduate school applications how much does the position of the person writing a recommendation letter matter, as opposed to his/her academic familiarity with the student? I have already advised her to check with the programs she is applying to in case they have requirements.  Edit: I realize I left this unclear before-- she has two tenured professors willing to write letters. If I agreed to, I would be the third letter. The department is small, so there might not be too many options for an additional letter.


while i was reading about namespacing and scopping in python, i read that   -the innermost scope, which is searched first, contains the local names -the scopes of any enclosing functions, which are searched starting with the nearest enclosing scope, contains non-local, but also non-global names -the next-to-last scope contains the current module’s global names -the outermost scope (searched last) is the namespace containing built-in names   but when i tried this :  def test() :     name = 'karim'      def tata() :         print(name)         name='zaka'         print(name)     tata()   i have received this error :  UnboundLocalError: local variable 'name' referenced before assignment   when the statement print(name) the tata() function will not find name in the current scope so python will go up in scope and find it in test() function scope no??


Where did the free space for my deleted ExFAT partition go?

I had these partitions on an external hard drive:  /dev/disk2 (external, physical):    #:                       TYPE NAME                    SIZE       IDENTIFIER    0:      GUID_partition_scheme                        *2.0 TB     disk2    1:                        EFI EFI                     209.7 MB   disk2s1    2:                  Apple_HFS Android                 63.9 GB    disk2s2    3:                  Apple_HFS RiptideHUP              968.0 GB   disk2s3    4:       Microsoft Basic Data RiptideF                967.8 GB   disk2s4   My aim was to delete disk2s2 and then resize disk2s3 to occupy the leftover space by deleting disk2s2.  I deleted disk2s2 using this command:  diskutil  erasevolume  "Free Space"  ""  /dev/disk2s2   Now, to resize the volume, I used:  diskutil  resizevolume  /dev/disk2s3  R   However, I got this error:  Started partitioning on disk2s3 RiptideHUP Error: -69743: The new size must be different than the existing size   Can someone help me and tell me where I went wrong?  NOTE: Using diskutil list now shows:  /dev/disk2 (external, physical):    #:                       TYPE NAME                    SIZE       IDENTIFIER    0:      GUID_partition_scheme                        *2.0 TB     disk2    1:                        EFI EFI                     209.7 MB   disk2s1    2:                  Apple_HFS RiptideHUP              968.0 GB   disk2s3    3:       Microsoft Basic Data RiptideF                967.8 GB   disk2s4


What is the cleanest way to implement the following:  list = [list1, list2, ...] return [*list1, *list2, ...]   It looks like this syntax will be available in Python 3.5. In the meantime, what is your solution?


I have the code  \documentclass{amsart}  \begin{document}     \begin{equation}         ]-\pi,0[ \qquad -\pi \qquad \int_{-\pi}^0 \qquad [-\pi,0]     \end{equation} \end{document}   which produces    Why is the minus sign on the left so far away from pi and how can this be avoided?


Do you need to submit an itinerary to get a Russian visa? And do you have to stick to it?

I believe there are certain countries which in order to be granted a visa you must submit your intended itinerary. I am pretty sure I've heard Russia is or was formerly such a country.  What do independent travellers do? I've been thinking of hitch-hiking across Russia without a precise plan and a friend of mine has wanted to do a road trip across Russia also without an exact plan.  Is this a no-brainer or is there lots of red tape we would have to deal with? Or is it just official-speak / bureaucracy where they make it look complicated but in practice it turns out to be easy?


What is causing the null pointer exception in this part of my java code?

I need to create an array of buttons, each having its own Card from another program in which I called Deck. After instantiating the cards and then instantiating the buttons, I keep on getting null pointer exception, which I do not know where it is coming from. Please feel free to ask if you don't understand what I'm talking about; I am relatively new to programming.      import javax.swing.*;     import java.awt.*;     import java.awt.event.*;      public class TenCard extends JFrame implements ActionListener { // a window with borders, title bar, buttons and panel. private static JFrame f;  // panel that will hold the contents private JPanel        p;  // declare deck and displayed cards private Deck        myDeck;     //Deck private Card[]      playerCards1; private Card[]      playerCards2;   /**********components**********/  //JButtons private JButton[]    cardbuttons1; private JButton[]    cardbuttons2; private JButton      sortbutton; private JButton      shufflebutton; private JButton     flipbutton;   //Textfields private JTextField text1; private JTextField text2;   //Menu private JMenuBar   menuBar; private JMenuItem  item1, item2; /*****ending the components*****/  /** * constructor that instatiates * the frame, panel, layout, etc and * adds two cards to the panel */ public TenCard() {     f = new JFrame("High Card Game");      // create the content panel     p = new JPanel();      // set the layout     GridLayout layout = new GridLayout(2,3);      // instantiate game and assign cards     myDeck  = new Deck();     myDeck.shuffle();       Card playerCards1[]= new Card[5];     for (int i=0; i<5; i++)     {         playerCards1[i]= myDeck.dealOneCard();     }       Card playerCards2[]= new Card[5];     for (int i=0; i<5; i++)     {         playerCards2[i]= myDeck.dealOneCard();     }          // set layout     p.setLayout(layout);     addCardsToPanel();     addFieldToContentPanel();      // add the content to the window     f.setContentPane(p); }  /** * Create and add three buttons to content panel */ public void addCardsToPanel() {     // instantiate buttons with images     sortbutton = new JButton("sort cards");     shufflebutton = new JButton("shuffle cards");     flipbutton = new JButton("flip cards");       JButton cardbuttons1[] = new JButton[5];     for (int i = 0;  i < 5; i++)     {         cardbuttons1[i] = new JButton("player 1, card" +i, playerCards1[i].getBackImage());      }      JButton cardbuttons2[] = new JButton[5];     for (int i = 0;  i < 5; i++)      {          cardbuttons2[i] = new JButton("player 2, card" +i, playerCards2[i].getBackImage());      }       // add buttons      p.add(sortbutton);     p.add(shufflebutton);     p.add(flipbutton);   }


How to access an ejected USB flash drive without removing and plugging it back in

If you eject a USB flash drive in Windows and do not remove it from the port, you cannot access it any more unless you remove it from the port and plug it in again.  How can you access it again without removing it and plugging it back in again?  Is there a command or script I can use?


An example of a function which satisfies $\sup_{y}\inf_{x}f(x,y)<\inf_{x}\sup_{y}f(x,y)$

Let  $f:X\times Y\to \mathbb{R}$. I could not come up with an example that satisfies $$\sup_{y\in Y}\inf_{x\in X}f(x,y)<\inf_{x\in X}\sup_{y\in Y}f(x,y).$$ Any help would be appreciated. Thanks!


What is more reliable - apt-mark or APT-pin (/etc/apt/preferences.d/pin) for version locking?

Usually on my Ubuntu 16.04 LTS, I lock package versions with APT-pin functionality.  For example if I want to pin meld to version 1.5.3-1ubuntu1 I create the following pin-file:  cat <<EOF | sudo tee /etc/apt/preferences.d/pin-meld Package: meld Pin: version 1.5.3-1ubuntu1 Pin-Priority: 1337 EOF   This file applies settings system-wide: apt, apt-get, aptitude and GUI tools such as synaptic and muon respects it.  I know other mechanism - apt-mark. Let's assume. My starting point - I have manually installed meld_1.5.3-1ubuntu1, its pin is removed.  $ apt-mark showhold $ apt-cache policy meld  meld:   Installed: 1.5.3-1ubuntu1   Candidate: 3.14.2-1   Version table:      3.14.2-1 500         500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages         500 http://archive.ubuntu.com/ubuntu xenial/universe i386 Packages  *** 1.5.3-1ubuntu1 100         100 /var/lib/dpkg/status   Then I hold installed version.  $ sudo apt-mark hold meld meld set on hold.  $ dpkg -l | grep meld hi  meld                                          1.5.3-1ubuntu1                               all          graphical tool to diff and merge files   APT-mark shows it is on hold. But apt-cache policy meld have no changes  $ apt-cache policy meld  meld:   Installed: 1.5.3-1ubuntu1   Candidate: 3.14.2-1   Version table:      3.14.2-1 500         500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages         500 http://archive.ubuntu.com/ubuntu xenial/universe i386 Packages  *** 1.5.3-1ubuntu1 100         100 /var/lib/dpkg/status   apt-get upgrade reports that meld is kept back:  $ sudo apt-get upgrade  Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done The following packages have been kept back:   meld 0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.   But if I launch aptitude in interactive mode I have meld in Upgradable Packages:  Actions  Undo  Package  Resolver  Search  Options  Views  Help C-T: Menu  ?: Help  q: Quit  u: Update  g: Preview/Download/Install/Remove Pkgs aptitude 0.7.4 --\ Upgradable Packages (1)   --\ gnome - The GNOME Desktop Environment (1)     --\ universe - Unsupported Free Software. (1)                                                                                ih    meld    1.5.3-1ubuntu1 3.14.2-1         and if I accidentally select Actions -> Cancel pending actions the hold will be removed.  As far I can understand synaptic ignores apt-mark markings, its Lock Version functionality works differently. meld is listed here as Installed (upgradeable). Mark all upgrades button does not auto-select it, but package may be accidentally upgraded by Mark for Upgrade.   Muon works in same manner with packages, held by apt-mark. But what is interesting its option Lock at Current Version writes pin-file to /etc/apt/preferences.d/meld.  Am I understand correctly that APT-pin is more reliable than apt-mark?


How can we help my 7 year old quit sucking her thumb?

My daughter who is now 7 is still sucking her thumb.  It is a great embarrassment to her and she always talks about how it is her big secret from her friends.  We have tried the finger nail polish, bandaids, and specialized thumb covers, but eventually she overcomes them all because she can not sleep. Suggestions?


Inserting two list of variables into a dictionary

I currently have two lists of Variables. The first list is just the basic alphabet (I've named it the alpha list) and the second list is a shuffled version of that alphabet (I've named it the beta list). I would like to insert the Alpha list in a set of keys in a dictionary and the Beta list as a set of the values.  So far previous attempts on what I could find did not work for this situation   import random  incoding_cipher= {} #creating empty dictionaries   decoding_cipher= {}  alpha=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']  beta= alpha[:] random.shuffle(beta)


I have a rivers layer which I am trying to get "Curved labels" on. When I zoom in the layer is labelled correctly with curved labels. However, when I zoom out the curved labels disappear completely.   I know other people have posted this question before and was wondering if anyone had found a solution to the problem ?.   Parallel labels works fine at all scales. I've also attempted playing with the 'Max angle between curved charachter setting' but this still dosn't solve the issue.


I'm training a CNN network to find coordinates of an object place on a 2d grid space.  The problem is that the error is not going below 3 cm tolerance. My data set consists of 1000 images (240x135 resolution). I'm using a model with 7 conv-maxpool layers and then 5 dense layers (all relu activations).  How can I reduce error further ??  I have tried training for longer durations, used mini-batch GD, used l2 regularization, dropout..


Many users use just one main login for a windows 8 PC with no password and that one logs in automaticaly (user1).  In order to access files from windows 8 machine on Android or other Windows PCs, a separate second login with password is the easiest solution. (user2)  How can one setup autologin for user1 and keep user2 somehow very much in the background and never bother the main user.


How can I find duplicate rows and for each group of duplicate rows delete the max ID row, in MySQL?  Using this query, I can find duplicate rows:  SELECT * , COUNT( awb_no ) c FROM tbl_cod_rpt_COPY GROUP BY awb_no HAVING c >1   And this query gives me the maximum ID for each group:  SELECT * , MAX( tbl_cod_rpt_id ) FROM tbl_cod_rpt_COPY GROUP BY awb_no HAVING COUNT( awb_no ) >1   Now how would I delete the tbl_cod_rpt_COPY rows matching the MAX( tbl_cod_rpt_id ) values from the query above?


My new setup website Directs to /cgi-sys/defaultwebpage.cgi

I have many domains set up in cPanel. I just added a new website and it keeps directing me to /cgi-sys/defaultwebpage.cgi.  Why?? Please can you explain why this is happening and how to solve it?


"I noticed an (minor) imperfection in my paper, but it is already under review. What should I do now?

I submitted a paper to a journal early last year that was given major corrections. The reviewers were generally positive about the contribution but felt the technical framework needed simplified.  I spent 6 months or so on the corrections and sent it back a couple of weeks ago. The journal secretary has since confirmed it's back with the reviewers.  I've since noticed there's something missing from the paper and although it's relatively trivial - insofar as it doesn't affect the results - I'm concerned that it will ruin my chances of acceptance.  Basically, in the revised paper I simplified the framework by binning multiple confusing definitions in favour of four new definitions of four similar concepts (let's call then apple, orange, banana and pear, with the definitions being "X is a(n) {apple,orange,banana,pear} if such-and-such a property holds"). These definitions are all in the paper as resubmitted.  Each of these concepts then has an associated definition (also new in the revised paper) of an operator whose output is a collection of each individual concept.  e.g. +(A,B) = {apple1,apple2,...,appleN}; -(A,B) = {orange1,orange2,...,orangeN} etc.  These definitions are near-identical: "the apple operation +(A,B) yields a set where every element is an apple", "the orange operation -(A,B) yields a set where every element is an orange" etc.  (I've trivialised the definitions but you hopefully get the idea).  My problem is that I've only provided definitions of the operators for apples and oranges and completely forgot the ones for bananas and pears. I subsequently say something along the lines of "consider the following banana operation *(A,B)..." and also later in the paper use the undefined operators in a theorem.  The definitions of banana and pear operator are near-identical to those for apple and orange, something I think is easy to deduce in context.  A silly mistake I know, but not only did I not spot it, amazingly two others I asked to review it (one internal one external) didn't spot it either.  I'm just wondering if it's worth worrying about? I suppose it's likely that the reviewers won't spot it either, but if they do, does this seem like a minor correction (rest of the paper notwithstanding)? And if so, are minor corrections normally allowed after major corrections?   Edited to add: I realise that the question in the title didn't fully encapsulate what I was asking. I've updated the title to more fully reflect the question I was asking.


How do I access the HTTP request header fields via JavaScript?

I want to capture the HTTP request header fields, primarily the Referer and User-Agent, within my client-side JavaScript.  How may I access them?    Google Analytics manages to get the data via JavaScript that they have you embed in you pages, so it is definitely possible.     Related:


Let $\{f_n\}$ be a sequence of holomorphic functions defined in a generic domain $D \subset \mathbb{C}$. Suppose that there exist $f$ such that $f_n \to f$ uniformly.  My question is: is it true that $f$ is holomorphic too?


$A$ abelian variety. Is the multiplication by $n_A$ surjective?

According with Mumford the answer is yes, but there are some obscure points in the proof.  We know that there exists a very ample line bundle on $A$ since every abelian variety is projective. Hence, via some corollaries of the Theorem of the Cube, we get an ample line bundle whose restriction to the kernel of $n_A$ is both the trivial bundle and very ample. This should imply that the dimension of $\ker n_A$ is $0$.  Furthermore, Mumford says that the fact that the dimension of the kernel is $0$ implies the surjectivity of $n_A$.  Is anybody able to clarify these two points to me?  Thanks in advance!


Do the statements "circuits/components will only draw the current they need", and "V = IR" contradict?

What I'd like to know is how we can resolve the two statements, "Circuits/linear components will only draw what they need", and "V = IR". They seem to contradict one another, in my view. With a given voltage and a given resistance, current will be set by these two properties in the circuit, regardless of "the current components need". If this could be at all explained mathematically as well, I also think that'd be better... these analogies seem limited after a certain depth...


Why I am getting different behavior when comparing using "is"?

My code is-  x1 = 1000 x2 = 1000  x1 is x2 -> False  Y1 = 1 Y2 = 1  Y1 is Y2 - > True   Why results are different?


su and sudo without typing passphrase twice

On the command line, I find that, if I want to administer something, I must first login admin and enter password and then sudo something and enter password again. Is there a way to do this in one step, remembering the password for 60 seconds?  This is not a duplicate. I don't want to make my normal user a suoder.


prove that if $(\mathbb{Z}/n\mathbb{Z})^{*}$ is cyclic, $n=2,4 $~or~$ p^k, 2p^k$ where $p$ is an odd prime number.

prove that if $(\mathbb{Z}/n\mathbb{Z})^{*}$ is cyclic, $n=2,4$ or $p^k$, $2p^k$ where $p$ is an odd prime number.  I thought of looking at two cases: $n = \Pi p_i^{k_i}$, $n = \Pi 2 p_i^{k_i}$  with $p_i \neq p_j$ if $i \neq j$ and check why these fail to be cyclic.  We see obviously that for both cases $\phi(n) = \Pi (p^{k_i} - p^{k_i - 1})$. this number is even as well because the $p_i$ are odd. Further than this i haven't come.  Any tips and tricks? Am i going to the right direction or is there a better trick in doing this?


After I scan via clamav/clamtk, I found 1 possible threat that I cannot remove/quarantine.  How to remove virus? Or Is this false positive?  /usr/lib/ruby/1.9.1/rdoc/generator/template/darkfish/js/thickbox-compressed.js  PUA.Script.Packed-1


Anything wrong with putting connection strings in applicationSettings?

.NET has supported a number of ways to store configuration settings for quite some time, which has led to a good deal of confusion. It doesn't help that the top three hits for a search for  are ten years old (and many of the   on this venerable site are also 6-7 years old). It is really hard to determine which of the early recommendations have since been deprecated.  In my project I have chosen to use ApplicationSettings (as opposed to AppSettings) because:   That appears to be the  (and ).  The AppSettings element * (topic is "no longer available"; but see "Other Versions" on that page.)  [*Although, confusingly, the AppSettings Property ] I prefer to edit the settings in a designer tool, rather than an xml editor. I prefer strongly typed settings.   However, now I need to decide where to put my connection strings. The most current documentation on  (and , as well as ) still appears to recommend using the <connectionStrings> section of the app.config. But accessing this from the code requires the use of the old syntax, which I now consider obsolete along with appSettings. In other words, it makes no sense to read one part of the app.config file with the old syntax:  ConfigurationManager.ConnectionStrings["MydDBConnName"];   and another part of the same file with the  syntax:  Properties.Settings.Default.myOtherSetting;   Plus, it prevents me from being able to edit the strings in the designer.  So bottom line: is there any reason not to standardize all my configuration settings (including the connection strings) in the ApplicationSettings element?


I really tried hard to do this on my own, but I keep failing ... Using multi-column and multi-row commands confused me. I know some of you might frown upon such a request but I really need help getting this table implemented .. So I'm sorry if I upset anyone.  My preamble has :   \documentclass[12pt,a4paper]{report} \usepackage[lmargin=3.81cm,tmargin=2.54cm,rmargin=2.54cm,bmargin=2.52cm]{geometry} \linespread{1.5}     Is there a way I can convert this from excel to LaTeX form ? I tried an add-in before but it didn't work for me. Also online generators cannot combine cells the way I want them (unless I didn't find a better table generator ? )


What Debian version are the different Ubuntu versions based on?

I have some software packages customised for Ubuntu 10.04, 10.10 and 12.10, but now I have to install them on Debian Squeeze. I have been unable to Google for a mapping between specific Ubuntu and Debian versions. Can someone here help?   Specifically I want to know which Ubuntu version corresponds to Debian Squeeze.


How to use MOSFETS for single-button on-switch and input signal to microcontroller

I'm trying to create a single button circuit for the purpose of both powering on a microcontroller (probably an arduino) and then allowing the microcrontroller to control its own power (power itself off) and accept further presses of the same button as input ( functionally like the power button on a smartphone: Hold it down when the phone's powered off and it starts. Push it again when the phone's operating and it will bring up your power menu ).  From research it seems MOSFETs might be the way to go, and from reading I've planned a circuit. I have no experience with MOSFETs though (my first batch are on order now), and am not aware of the potential pitfalls. Attached an example circuit regarding which I have a couple of questions.    The intention is: when the button (a momentary switch ) closes the circuit initially, current is allowed to pass through M3 ( P-Channel MOSFET with no voltage at the gate ) through M1 ( N-Channel MOSFET with voltage currently applied to the gate ) and through to VIn. In the MicroControllers setup routine, it asserts D1 high, applying voltage to the gates of both M3 and M2, closing M3 and the startup circuit, and opening M2 which is now the persistent power circuit. The micro-controller can then choose to shutdown by asserting D1 low, which will shut off M2 and cut off the power.  Now the circuit is open and the power is on, the switch can be used as an input to D2.  1) Obviously... should this circuit work in theory?  2) Do I need to protect the MOSFETs against initial power burst with capacitors to ground or equivalent?  3) Is controlling M3 and M2 with the same voltage that they are allowing to pass like trying to pull yourself up with your own shoelaces? Should I buffer the supply in some way?  4) The example circuit at  shows a resistor connecting the gate to GND. Is this necessary? Should current be allowed to flow past the gate leg of a MOSFET?  5) Is introducing an input voltage to a digital input of a microcontroller before it has programmed its inputs and outputs safe? (Connection to D2 on power up).  ---------- Edit 1 ----------  The duplicate question does provide an alternative (and it would seem quite robust circuit ) that achieves what Ive laid out above ( I hadn't found that answer in searching... Sorry ) My aims though with this question are:  1) To establish if this, or a corrected version, is a feasible circuit without the extra step of the regulator. Most arduinos and equivalents already have one on board, without the enable pin.  2) To understand a little more about MOSFETs.  From answers and comments below @Dave Tweed and @Joe Hass, is the the Threshold Voltage subtracted from the voltage across source and Drain then? Ie. If I supply 10V and the nMOSFET has a a threshold of 5V I can expect 5V at drain going to Vin? (And this doesn't happen in reverse with pMOSFETs?)  @Jon Watt thanks for the example. That answers most of what I'm looking to do, minus the digital input signal. A question though that may seem obvious, is R2 essentially a pull down resistor to keep the gate low when no input is applied from CTL?  Ideally this would be a standalone modular power circuit which you could put on a board and interface with any particular uC setup, with just Vin, Gnd, Vout, Shutdown and Input pins. Whether Shutdown and input are high or low logic doesn't really matter.  Also, in case the detail helps, for my particular application at the moment, I'm looking to have absolute power shut off, as this is for devices that should retain their charge over a long time and will only be sporadically used (once a day). So no sleep mode draining even minimal resources.  If I can understand the threshold problem, and nobody thinks this is beyond possibility, I'll have another go at drafting some potential circuits.


The Sums of squares in 3 way Anova in R output has changed as the order of the variables in the modes changes

I am trying to fit a 3 way ANOVA using R. Then i realized the sums of squares of the output has changed when the order of the variables in the model are changed.Can anyone figure out the reason for that ?  There seems to be something wrong because in normal situation the sums of squares in R not affected by the order of variables in the model


Is it ethical/legal to obtain journal articles from reddit?

My university's subscription is really limited (I come from Lebanon). I never found any paper related to my research or essays using the database that my university is subscribing to; even the basic pioneering papers in business. Yesterday, I started writing my master's thesis and the very basic papers behind my topic cannot be accessed through my university's portal (cannot simply ignore them) and I, obviously, don't have access/cannot pay for individual papers. What to do in this case? Someone here recommended a Reddit page that provides and shares papers upon requests. How legal/ethical is that? The page claims that all the shared papers are based on the concept of fair use.  Eventually, I have 3 options: Follow this way, adopt a bad scholarship behavior by not tracking down original references to check myself (which is out of the question) or I just go home and forget about writing a master's thesis or a literature review because it's almost impossible to access those papers without the help of option 1. As for emailing individual authors, well none have replied so far so it isn't always a practical option as I cannot wait days for 1 particular paper to be received (if any).


Ryzen 7 2700x installing Ubuntu with no integrated graphics shows no signal

I have this configuration:   CPU: Ryzen 7 2700x  mobo: Asus x470 gaming  RAM: 2x8GB 3000 MHz  GPU: GeForce GT 1030 Monitor: 4K LG monitor   I downloaded the latest stable version of Ubuntu and I made a bootable USB drive with Rufus.  I restarted the PC (with Windows 10) and booted the USB stick.  I selected in the grub Install Ubuntu, then there was a loading purple screen and suddenly:  "No signal"   message from monitor and monitor goes off. The PC is still on, but I can't use the monitor. So I need to force the restart.  Why does this happen? I tried also to reset BIOS configuration and disabled the "xmp" profile, so RAM runs at 2133MHz, but there's nothing to do.  I think something related with graphics card because my processor Ryzen 7 2700x doesn't have an integrated graphics card, so maybe it switches to the motherboqard's HDMI port instead of the HDMI port in the dedicated GT 1030.


Streaming to Double or copy RTMP servers with ffmpeg

my current code on windows :loop title test ffmpeg -re -i "http://iptv.ts" -c:v libx264 -s 1280x720 -preset veryfast -minrate 2100k -maxrate 3100k -bufsize 3100k -pix_fmt yuv420p -g 50 -c:a aac -strict -2 -b:a 160k -ac 2 -ar 44100 -f flv "rtmp://" goto loop how can i add 2 rtmp for output


I read a book many years ago that talks about the shortest distance between two points being a line, and if you held a string between those points you can fold the string to connect the points. The book is about teleportation and space travel, and I believe it has a purple cover. Anyone know of this book?


How to check if two object arrays have any difference in javascript?

I am using React framework and passing a prop to a component that maintains a state. The prop and state are arrays of objects, and I want to verify whether or not there is any change between the two at some point in my code.     somethingHasChanged = () => {     return !isEqual(this.props.array1.sort(), this.state.array1.sort());   };   Where the objects in the array are defined like so:      array1: PropTypes.arrayOf(       PropTypes.shape({         id: PropTypes.string,         name: PropTypes.string,         label: PropTypes.string,       }),     ),   The id can be repeated in several objects in the array, so it does not uniquely identify one object. Name and label are optional keys in the json object but it doesn't have to be specified.  Right now I sort both arrays and then check if they are equal, but I'm seeing some weird behavior. Sometimes when I expect both arrays to be equal, they are different because the content is the same but the ordering is not the same even though I call sort() on both. Is there a better, easier/more flexible approach rather than doing a deep comparison?


Let $G$ be a group and $H<G$ such that $[G:H]<\infty$. There exists a subgroup $N\triangleleft G$ such that $[G:N]<\infty$.  I have to show this fact (that according to my book is due to Poincaré), but I think that the statement, written in this way, is trivial: for every group $G$, I can take $N=G$, in fact $G\triangleleft G$ and $[G:G]=1$.  Where am I wrong?  If I'm not wrong, do you know a similar statement?


I'm having a difficulty trying to add a button to my add-on Tools menu for picking a material. Currently I'm doing it by bpy.props.StringProperty() so the user has to write the correct material. Is it possible and how would I make a material picker box like this one? (from Render Layers menu, material override)  I don't even know what is the name of this so excuse me if this is a duplicate question. P.S. I would also like to have an object picker, but I'm assuming that once I figure out how to make the material, the object is just next door. Thank you in advance!


Second Update: I see that some answers that reference my image are more closely answering my question. Here is a second image to clarify my point.  Take this image representing a checkerboard like configuration.  If I asked you to move the X negative 1 space it would be impossible.  You would have to make a guess as to which direction is negative. However, I can ask you to move the X 1 space/unit, since moving to any square from the center would satisfy moving 1 space/unit.  But wait!  Once you complete moving the X 1 space/unit; I could now follow up and request you move negative 1 space, since you have now already travelled in one direction. Now you are able to negate the original request by 1 space/unit  Therefore negative doesn't exists until you have already begun moving in some direction/unit/space/time/apples.      update   Maybe this helps illustrate my point.  In this image there is a line, going either direction will take you to infinity (A or B),  the number of spaces you move is always a positive number. If I moved 20 widgets closer to infinity A. or I moved 20 widgets closer to infinity B.  So, negative numbers don't exist and are only positive numbers that are increasing in the opposite direction  Negative indicates the direction of travel on a line.  the measure of movements will always be positive.  Does a negative number really exist?  I can't have -1 apples.  I can only imagine I had an apple when I really did not.  Thus, in reality I would have -1 apple as compared to my imagination.  didn't know how to tag this


Create a variable in .CSS file for use within that .CSS file

Possible Duplicate:          We have some "theme colors" that are reused in our CSS sheet.  Is there a way to set a variable and then reuse it?  E.g.  .css OurColor: Blue  H1 {   color:OurColor; }


Show equation number only once in align environment

I want the equation number to be shown only at the last line, or better, somewhere in the middle of all. So instead of (1), (2), ... only (1). I use \begin{align} ... \end{align}


"The maximum number": plural or singular?

Kindly, what are your thoughts on the following sentences:        The maximum number of wordbooks (%d) have been saved.   The maximum number of wordbooks (%d) has been saved.      My opinion is that (1) is more appropriate as "save" relates to wordbooks (a plural noun) and "The ... number" is some kind of determiner.  The dissenting opinion is that "The number" is obviously singular, and the "wordbooks" are subsidiary.  I agree that (2) is grammatically correct but I maintain it implies merely a single number was saved, not the wordbooks themselves.


removing text between CLOSEST delimiters in a string- regex

I am trying to use regex to get rid of strings between specific characters, for example "[" and "]":  input = "There is a [blue] cloud on top of that [big] elephant"; desiredOut = "There is a cloud on top of that elephant"; // this is what i want   But if I use regex to replace what is between "[" and "]" I remove everything between the first and last of this characters:  string input = "There is a [blue] cloud on top of that [big] elephant"; string regex = "(\\[.*\\])" ; string actualOut = Regex.Replace(input, regex, "");  actualOut = "There is a elephant" // this is what i get   Any clues on how to remove the stuff between inmediate delimiters? thanks.


$$A =\begin{pmatrix}a &b \\ c & d \end{pmatrix}$$ show that:   $A$ is diagonalizable if $(a-d)^2 +4bc > 0$ $A$ is not diagonalizable if $(a-d)^2 + 4bc\leq 0$


What about a feature where the asker can transfer a comment to an answer?

I've noticed a trend where people like to answer the question in the comments section. This means as the asker I have to ask them to make an answer for me to accept it, which people sometimes don't want to do even though they are the earliest and most helpful answer. This, of course, breaks the question-answer format of SO.  Can we make a feature where we can make a comment into an answer as the asker? Are there alternate solutions to this problem?


How to transfer entire iMessage conversations to computer?

I am getting a new iPhone come next month. I want to save all of my nostalgic conversations for the future.  Is there a way to transfer an entire chat log to the computer in plain text?  Or will I have to painstakingly take screenshot after screenshot as I scroll up in the text history?


Can I use Named Credential merge fields as URL parameters on the endpoint?

I have a named credential as follows:  Name   Test_Credential URL    https://www.somesite.com Identity Type    Named Principal Authentication Protocol    Password Authentication Username   foobar Password   mySomeSiteDeveloperKey Generate Authorization Header   FALSE Allow Merge Fields in HTTP Header    TRUE Allow Merge Fields in HTTP Body     TRUE   The service that I am trying to authenticate against uses URL parameters to pass in the developer key and username. Is there any way to use  to pass those in to the URL?   The Named Credential attributes seem not to get decoded until the request is actually sent, as debugging the endpoint, or headers if I set them per the linked doc, show the un-merged data. I can get the callout to go to the right place, and return the expected error because the auth information is not provided. Anybody know of a "show me my HTTP request" site that I could point to to get a better idea of how this works?  I've tried both of these:  req.setEndpoint('callout:Test_Credential/api/action?id={!$Credential.Password}&account={!$Credential.UserName}');  req.setEndpoint('callout:Test_Credential/api/action' + '?id=' + '{!$Credential.Password}' + '&account=' + '{!$Credential.UserName}');   (Edited to remove the part about $Credential vs. $Test_Credential as I was able to determine that it is the former, and see the merged creds by calling out to .)


download a csv file dynamically create in PHP

how can I force the browser to download a csv file I created in PHP?  I tried  $result = array (    array('aaa', 'bbb', 'ccc', 'dddd'),    array('123', '456', '789'),    array('aaa', 'bbb') );  $filename = 'result_file.csv';  header("Content-Type: text/plain"); header('Content-Disposition: attachment; filename="'.$filename.'"'); header("Content-Length: " . strlen($result)); echo $result; exit;   but the csv file is full of PHP errors


Animation: create a rotation around the object z-axis instead of global z-axis

I'm creating an animation where I rotate an object, insert a LocRotScale keyframe (via the I key), select another frame, rotate the object again and insert a LocRotScale keyframe.  For example I use this:  Z, 190, Enter   Now I want to rotate the object around its own z-axis instead of the global z-axis. I've found out if you press the [Z] two times you get the Local axis instead of Global.  For example I do this now:  ZZ, 190, Enter  The rotation is ok, but when I insert the LocRotScale keyframe it did the rotation, but not around the Normal axis, but it used the Global axis.  Any suggestion on what I'm doing wrong here?


c++ can i return two different set of results in a function. or is using a class must in this case

I think the question is clear.  Let me rephrase it.  In a function, there are two different sets of calculations. I want the function to return both "a" and "b". (both have same type(struct) but, a could be *pointer, whereas b could be **pointer)  But from what I am aware of is, that I can only return one.  Im not so familiar with class. but I know that with class u can get both back by doing something like x.a (returns a) and x.b (returns b).  Is there any to do this just in a function?


Is there an easy way of showing that $2^n \pm 1$ is never a perfect power, except for $2^3 + 1 = 3^2 $?  I know that   gives the result directly, but I'm hopefully for a more elementary method.    I can show that it is never a square, except for $2^3 + 1$.  Proof: Cases $n=1, 2, 3$ are easily dealt with. Henceforth, let $n\geq4$.  $2^n -1 \equiv 3 \pmod{4}$ hence is never a square.     If $2^n +1 =x^2$, then $2^n = (x-1)(x+1)$ and both of these are powers of 2. Thus we must have $(x-1) = 2, (x+1) = 4$. This gives the solution of $2^3 + 1 = 3^2$.    Let's now do an odd prime.  Say $2^n +1 = x^p$. Then $2^n = x^p - 1 = (x-1)(x^{p-1}+x^{p-2} + \ldots +1)$, so both terms are powers of 2. We have $ x = 2^m+1$ is odd. But the other term is the sum of $p$ odd numbers, hence is odd. Since this is clearly greater than 1, we get a contradiction.  Say $2^n -1 = x^p$. Then $2^n = x^p + 1 = (x+1)(x^{p-1} - x^{p-2} + \ldots -x +1 )$, so both terms are powers of 2. We have $x = 2^m -1$ is odd. But the other term is the sum of $p$ odd numbers, hence is odd. Since $x^p + 1 \neq x+1$ except for $p=1$, this means that the term is greater than 1. Hence we get a contradiction.


Can one sell the game made in unity free version?

I'm just getting into it and soon my first project will be done. Can I sell it afterwards?


How to debug only one thread in Visual Studio

I would like to be able to follow only one thread's execution while debugging. I use a threadpool so the debugger keeps switching between threads and this makes debugging very uncomfortable.  Reading:       I get one solution which is conditional breakpoints (based on the name of the thread). However, I can't tell "the thread #3" will always be the one treating the interesting case, so I would have to change the condition for each execution. Too much work.  Another solution is to use the freeze/thaw feature to make only my interesting thread run. However, this make some information unavailable because all threads are paused.  What I am using now is to put make the program run until I get to a breakpoint where I am sure to be in the good thread. Then I pause all other threads of threadpool and try to resume the execution. If the programs seems to be stuck, I pause, and thaw the current thread.  The ideal solution would to find the correct thread, flag it and then say to Visual Studio: "break only if the current thread is flagged".  Is this even possible ?


For an infinite set $A$, does $|A| = |A \times A|$?

I know that $|\mathbb{N}| = |\mathbb{N}^2|$, and that $|\mathbb{R}| = |\mathbb{R}^2|$.  It seems like this might be true for all sets, but I don't know how to go about proving this.  It's easy to prove that $|A| \leq |A \times A|$ (see ).  So to prove the claim it suffices to show that there exists some injective function $f : A \times A \to A$.  For $A = \mathbb{N}$, you can use e.g. $f:p, q \mapsto (p+q)^2 + p$.  For $A = \mathbb{R}$ you can construct various space-filling curves.  But I'm not sure how such constructive solutions can be generalized, if at all.  Any suggestions on how to approach this?


I got used to using the shutdown command like:  shutdown -t now   So when I started wanting to use reboot in the same way I was confused at first because to reboot now you need to use:  reboot -n   I looked more into and I noticed reboot could also be used to shutdown the system with:  reboot -p   What is the history behind these two commands? Did one come out before the other and are they both on most systems historically?


Why didn't they use the extra cannons on the Millennium Falcon?

As was seen in Star Wars A New Hope the Millennium Falcon has dorsal and ventral laser cannons. During the Battle of Endor I can not recall ever seeing these weapons used, even though they probably would have been very helpful (such as when being chased by TIE fighters through the superstructure of the Death Star 2).    Was there some legitimate reason for why these guns were not used?


Why is it easier to get sunburnt in the water?

I went today to the swimming pool and I remembered that when I was younger my mom used to tell me to be careful because you get sunburnt much more easily in the water than in the ground.  I never gave this a lot of thought until recently and I consider that it might be caused by two factors: the reflection and refraction of sun rays in the water and the loss of efficacy of your sunscreen produced by the water (even if it is water resistant).  Is the first effect actually relevant? It should be possible to compare the flux of energy due to reflected rays to that compared of direct rays.  Do we get sunburnt more easily because of the reflection? In case this is the case I would like to know if there is any difference between the effect in a swimming pool or in the sea.


I want to smooth hard edges without effecting other in close proximity

I want to smooth the edges in the red circle but I also want to keep the blue edge rough. I also want to smooth the blue edge along the horizontal line so the sharp cuts between the edges disappear.


I've seen a lot of hard drives with only a few bad (unrecoverable) sectors (as indicated by SMART). Of course the proper thing to do with a bad drive is replace it, as there's a good chance of the drive crashing completely in the near future; I'm aware of that. However, in the interim, or for those who don't want to spend $70 to save data they don't value highly anyway (sigh, non-technical people), or just to get some use out of old hardware instead of throwing it away, I'm wondering if there's a way to identify where the unrecoverable sectors are ("where" meaning numerically, from 0 to the number of sectors on the drive), so I could stick a blank partition in that general area. Yes, this would involve low-level-formatting the drive and reinstalling the OS, of course.  So:  Would partitioning around unrecoverable sectors even be a workable way of reducing the disk of losing data?  If so, is there a way to find the location of these unrecoverable sectors?


Can I change root's email address or forward it to an external address?

I'm getting a lot of mail in my root user's mail account. This appears to be mostly reports and errors from things like cron scripts. I'm trying to work though and solve these things, possibly even have them be piped to some sort of "dashboard" - but until then how can I have these messages go to my personal e-mail account instead?


Help proving ${n \choose k} \equiv 0 \pmod n$ for all $k$ such that $0<k<n$ iff $n$ is prime.

I can prove the $n$ is prime case: If $n$ is prime, then since $k < n$ and $n$ is prime, the factor of $n$ in the numerator won't be cancelled out.  So the question boils down to     Let an integer $n>1$ be such that $n$ divides $\binom nk$ whenever $0<k<n$; show that $n$ is prime.   If $n$ is composite and even, then ${n \choose 2} = \frac{n(n+1)}{2}$ is not divisible by $n$ because it 'lost' a $2$ factor (and $n+1$ is odd), which takes care of this case.  However, I'm somewhat at a loss for what to do when $n$ is composite and odd. Any hints?


If $n$ be a positive integer greater than $1$, then prove that $$2^n>1+n\sqrt{2^{n-1}}$$    I found this problem under $AM \ge GM$ chapter. Help me to solve this problem using  $AM \ge GM$. Thanks in advance.


How can I get 9 digits (to left of decimal point) precision for float (wikipedia promises [6-9] digits, but math allows only 7?

Double-precision (IEEE 754): 53-bit significand precision gives from 15 to 17 significant decimal digits precision ().  Single-precision (IEEE 754): This gives from 6 to 9 significant decimal digits precision. All integers with 6 or fewer significant decimal digits can be converted to an IEEE 754 floating-point value without loss of precision ()  My guess is that by "decimal digits" wikipedia means all 37456 in 37.456  I understand it that lower bound (6 decimal digits for float and 15 for double) is always exact, and sometimes (when?) I can rely even on up to 9 (float) and 17 (double) decimal digits inclusive. By decimal digits I mean 456 in 37.456  But simple test-snippet shows that even 6th decimal digit lies:  System.out.println(90f == 90.000_001f); // true. Problem with 6th digit !!! System.out.println(90f == 90.000_000_000_001f); // true - as expected System.out.println(90f == 90.000_01f); // false. 5th digit still "exact" - as expected   I think 90.000_001 becomes 9.000_000_1 (mantissa in base10) * 10 (E1 exponent)  in internal representation (because 1 digit before decimal point must be used), so only 7th digit becomes inexact, meaning 6 digits is a guarantee (if you convert 90.000_001 to internal representation). But why wiki speaks about [6-9] range?  Besides, as I understand, maximum possible precision (number of representable decimal digits on the right after decimal point) is defined by simple math as integer part of log10(2^numberOfBitsForMantissa), but this calculation gives 6 (for float) and 15 (for double) - I don't include 1 implicit bit (for "integer" part) in numberOfBitsForMantissa (well, I don't know, is it allowed to use this bit with negative exponent like this: 1.11 * E-1 = 0.111). But this +1 bit anyway puts precision limit for float at 7 decimal digits max (unlike [6-9] in wiki).  So what number of precision digits shall be exact (see my code snippet) and why I see differences between these three:   my code snippet: up to 6 decimal digits (inclusive) for float wiki: [6 - 9] for float, [15 - 17] for double log10(2^numberOfBitsForMantissa) formula, giving max 6 (for float) and max 15 (for double)      My guess is that if I convert number like 99.000_01 to internal   representation like 9.9_000_01 then only 6 digits (float) and 15   (double) to the left of decimal point (.) are stored in mantissa in this INTERNAL representation (in 9.9_000_01). If I   have a number x < 1 (for example 0.345_567_8, then (and only then) it   can be represented as 3.455_678 * E-1 and in this case 7 digits   (float) and again 15 digits (double) can be stored - lg(2^53) and lg(2^52) both have 15 as integer part. Why wikipedia   writes different - I have no clue!   My research shows that there is no clear answer to my question: , ,     for an IEEE754 single precision floating point, the closest number to  9999990000   is  9999989760   What is guaranteed is that your number and the float, when both are rounded to six significant figures, will be the same.


Let $f_n(x) : \mathbb{R} \rightarrow \mathbb{R}$ be defined as $\dfrac{x}{n}$. Is $f_n$ uniformly convergent?   With "$(a_n)$ is limited and $(b_n)$ converges to 0 $\Rightarrow (a_nb_n)$ converges also to 0" i would guess that $x\cdot \dfrac{1}{n}$ converges uniformly but $x$ is not limited in this case. So does ist converge uniformly or not?


Shamir's Secret Sharing - Proactive and dealer-free

I recently started studying about cryptography and I tried to search the internet but I can't find much about these subjects. I want to see the proof of Shamir's Secret Sharing being Proactive and dealer-free .   Later Edit: I found the proof of it being proactive, however I still struggle with the 2nd thing. Basically, if the users know (k,n,p) , how can they compute a secret with none of them knowing it ?


Give an example of a function $f : R \rightarrow R$ which is continuous at all irrationals points and discontinuous at all rational points of $R$.


Print dashes across full width of screen

I'm looking to print a dash "-" until the end of the user's screen.  Basically my program would print a line of text and then a line of dashes beneath it and then another line of text. This would be done so that the user can easily distinguish between the first and second line.   Something like this:  First line of text -------------------------------------------------------------------------------------- Second line of text   Is there a way for me to do this using the standard python 2.6 libraries. I cannot use any additional libraries such as texttable or a newer version of Python.


If $F$ is field such that $|F|=q=p^n$, $(m,p)=1$ and $E$ is the splitting field of $x^m-1\in F[x]$ then $[E:F]$ is the minimum positive integer $k$ such that $m \mid (q^k-1)$. I have no any idea on this. But I really want to know how to prove this. Thanks!


How delete[] works behind the scene in c++?

when we allocate memory dynamically using new operator for a int data type. it makes sense to use delete operator. For example  if a code would like bellow :      int *p=new int; delete p;  Here it makes sense to use delete . Here we can think like this that the block, p points ,delete/de-allocate that memory block . But for the bellow code :  int *p=new int[5]; delete[] p;  How does it make any sense to use delete[] here. I am asking this because p is not the name of the array. Here p is just a simple pointer which is pointing to the first element of the array memory block. Now how does delete[] works to delete the whole array.As here was not mentioned the size of the array. Then how does the statement delete[] p; delete the whole array.


find file but not in directories named X

Using find (specifically the one on windows that comes with git) to search files. I specifically want to check my entire USB drive but not in folders that start with a dot (specifically .git and .vs) and not in a folder called photos (many many vacation and bday pics, my file isn't in there).  How do I ignore those directories?


A question from G.Polya:  prove $$1 + \frac 1 4 + \frac 1 9 + \frac 1 {16} + \cdots  =  \log x \cdot \log (1 - x) + \frac {x+(1-x)} {1} + \frac {x^2 + (1-x)^2}{4}+\frac{x^3+(1-x)^3}{9}+\cdots$$ for $0<x<1$.  The answer says:  $\sum_{n=1}^\infty \frac{x^n}{n^2}=\int_0^x \sum_{n=1}^\infty \frac{t^{n-1}}{n}dt = - \int_0^{x} t^{-1}\log(1-t)dt;$ integrate by parts then introduce as new variable of integration $s=1-t$.  Following the answer, I got $$- \int_0^{x} t^{-1}\log(1-t)dt=-\log(1-x)\log x+\int _1^ {1-x}\frac{\log(1-t)}tdt.$$ But how to proceed?


Getting an boot error when starting computer

I was in the middle of watching a movie on Netflix, then suddenly everything started crashing. First, explorer.exe closed down, then Google chrome. I had multiple things running in the background (Steam, Raptr, etc.). Individuality, each of those apps closed down also. When they did, a small dialog box popped up for each of them, one at a time, saying that it was missing a file, it couldn't run anymore, or something similar to that. It also had some jumbled up "code" with numbers and letters that I couldn't read.  Ever since then, everytime I turn my computer on, it will run for a few seconds and give this error "Reboot and select proper boot device or insert boot media in selected boot device and press a key_". No matter how many times I try to reboot it, it always gives me the same error.  A day later after this happened I was able to start the computer, but before it booted, it told me that I didn't shut down the computer properly and asked how I wanted to run the OS (Run Windows in Safety Mode, Run Windows Normally, etc.). Once I logged, everything went SUPER slow and everything crashed almost instantly. The only thing I opened was Microsoft Security Essentials and only got in about two clicks before it was "Not Responding". Then, after that the whole computer froze and I had to restart it. Now, it's back to saying what it originally said, "Reboot and select proper boot device or insert boot media in selected boot device and press a key_".  I built this PC back in February 2012. Here are the specs: OS: Windows 7 Ultimate CPU: AMD 8-core GPU: Nvidia GTX Force 560 Ti RAM: 16GB Hard Drive: Hitachi Deskstar 750GB  I'm usually very good taking care of my PC. I don't download anything that's not from a trusted site or source. I don't open up any spam email or such or go to any harmful websites like porn or stream movies. I am very clean with the things I do with my PC and don't do many DIFFERENT things with it. I use it pretty often especially for video games and doing homework in Eclipse. Also, good to note that I don't have any Norton or antisoftware installed. I have Microsoft Security Essentials installed but never did a scan.


In the movie Alien, why did Ash use a magazine to try to kill Ripley?

When I read the answers to "", I was wondering why he would use a magazine at all to kill her.  As an android, he is stronger and faster than humans. He could crush her throat by choking her. He could crush her skull with his bare hands. He could grab something and quickly stab her chest far faster than it would take to roll up a magazine and stuff it in her throat. He could move his hands fast enough to break her ribs inward and puncture her chest organs. He had so many other options that were quicker and more likely to succeed.  Edit: This is not a duplicate of "", since that asks about Ash's intentions, but this one asks why he uses an inefficient method to kill her. None of the answers there mention that Ash could have used a different murder weapon/technique.


Examples where $H\ne \mathrm{Aut}(E/E^H)$

If $E/F$ is a field extension, and $H$ is a subgroup of $\mathrm{Aut}(E/F)$, it is quite trivial to see that $H\subset \mathrm{Aut}(E/E^H)$.   Since the theorem only shows the inclusion relationship, I think there must be a lot of examples where $\subset$ is actually $\subsetneq$. But due to lack of knowledge I can't come up with one.   Could you help me with this? Best regards.


Group $G$ isomorphic to direct product $G \times G$

I am looking for a group $G$ with $\vert G \vert > 1$ which is isomorphic to the direct product $G \times G$.   I have been looking for such a group among non-finite groups, such as $\mathbb{Z}$ or the group of real-valued sequences. However, for these groups, I could not find an isomorphism to the direct products of themselves.  Could anyone please give me a hint which particular group might be helpful to consider?


How to instanciate an object regularly on the surface of an other object

I'm in the process of modelling a building similar to reference picture below. I'm struggling with the part I highlighted in red. I can easily model one of these objects, but I'm looking for a way to repeat them regularly with consistent spacing on different surfaces of my mesh. As you can see, the orientations of the different surfaces are different. I tried different options :  Particules/Geometry nodes : I can't find a way to make it not random and have consistent spacing. Having the orientation follow the base geometry also seem challenging but my experience with geometry nodes is very limited. Using instances on faces : I managed to get a somewhat decent result by copying only one strip of my building mesh, inserting loopcuts at each spot where I want to instanciate the child object and configuring an instancer on faces. It's tedious because I need to adjust the number of cuts on each face to have an even spacing and making the corners look good take a lot of fiddling.  Does someone has a smarter idea ? Thank you.


A conceptual doubt regarding Forced Oscillations and Resonance

While studying about the Resonance and Forced Oscillations, I came across a graph in my textbook that is given below:-  Now, the author writes      As the amount of damping increases, the peak shifts to lower frequencies.   Why does this happen? And does this imply that at higher damping levels one cannot achieve a higher amplitude by setting the period of the forced oscillation to be equal to the natural frequency? This seems strange because, the highest amplitude is achieved when the natural frequency is equal to the driving frequency. But, I guess that the rules are somehow different for the damping case.


how does tor encrypt information from your ISP or local network?

At my work, I have a network administrator that presumably sees everything I connect to on the internet (and has banned things like Facebook, Youtube, etc). However, tor seems to let me through those blocks. How does Tor prevent my network admin and local network from seeing what I'm doing. It seems to me that everything I request from my browser must go through my work's router/network first. Can't they see these initial requests? Does this anonymity also apply to downloading?


Why is creating an .exe from a java program not recommended?

I am learning learn about GUI programming with Java, and I am using the Netbeans IDE.  I would now like to create an executable program to run outside of Netbeans; i.e. so that it can be run from my desktop.   But when I did some research, I got the impression that creating an .exe from Java program is not recommended. Would you please explain to me why it is not recommended?


Let $x$ be a real number. Find the minimum value of   $$P=\frac{\sqrt{3(2x^2+2x+1)}}{3}+\frac{1}{\sqrt{2x^2+(3-\sqrt{3})x+3}}+\frac{1}{\sqrt{2x^2+(3+\sqrt{3})x+3}}$$  This is a problem from 2015 Vietnamese University Entrance Exam.  I tried plotting and finding all local minima but that seems to be impossible as the derivative is too complicated. I guess this problem can only be solved by using inequalities.


beamer: Block Environment in Combination With Column Environment

I want to use the block environment together with the column environment in a beamer document.     The margin/spacing is getting wrong/ugly in this combination. I want   that the blocks are exactly as wide as a normal text would occupy (so   that the text margins are still correct).   \documentclass{beamer}  \setbeamersize{text margin left=5mm} \setbeamersize{text margin right=5mm}  \setbeamercolor{block title}{fg=white,bg=red} \setbeamercolor{block body}{fg=black,bg=gray} \setbeamercolor{background canvas}{bg=yellow}  \begin{document}  % Frame 1 ----------------------- \begin{frame} \frametitle{No Column Environment}     \begin{block}{Block Title}     Block Text.     \end{block} \end{frame}  % Frame 2 ----------------------- \begin{frame} \frametitle{Column Environment -- Only Left Block Environment}  \begin{columns}     \column{.50\textwidth}         \begin{block}{Block Title}         Block Text.         \end{block}     \column{.50\textwidth}         \color{blue}\vrule width\textwidth height\textwidth \end{columns} \end{frame}  % Frame 3 ----------------------- \begin{frame} \frametitle{Column Environment -- Left and Right Block Environment}  \begin{columns}     \column{.50\textwidth}         \begin{block}{Block Title}         Block Text.         \end{block}     \column{.50\textwidth}          \begin{block}{Block Title}         Block Text.         \end{block}  \end{columns} \end{frame}  % Frame 4 ----------------------- \begin{frame} \frametitle{Column Environment Only}  \begin{columns}     \column{.50\textwidth}         \color{blue}\vrule width\textwidth height\textwidth     \column{.50\textwidth}         \color{blue}\vrule width\textwidth height\textwidth \end{columns} \end{frame}  \end{document}     The reason for the yellow background is, so that it is clear where the page has its borders.  Trying the idea from  in one of the comments leads to.  \begin{frame}     \begin{columns}[onlytextwidth]          \begin{column}{.45\textwidth}          \begin{block}{Block Title} Block Text.          \end{block}%         \end{column} \hfill%         \begin{column}{.45\textwidth}          \begin{block}{Block Title} Block Text.          \end{block}          \end{column}      \end{columns}     \begin{block}{Block Title}     Block Text.     \end{block} \end{frame}       Bug?! I Opened an Issue on GitHub   I opened an issue on github:  Update [2020-02-17]: The issue was closed on 22 Aug 2017 :).      Similar or Duplicate or Related    .


Broken URL for data.stackexchange.com help page

When using data.stackexchange.com I fail to remember if as [post link] is the correct alias to get the url for the post. Luckily the site has an  link. Unfortunately it is now broken. Can this be fixed?


Functions returning functions understanding why it works

function retirement(retirementAge) {   var a = ' years left until retirement.';   return function(yearOfBirth) {     var age = 2016 - yearOfBirth;     console.log((retirementAge - age) + a);   } }  var retirementUS = retirement(66); retirementUS(1990);    My question is why yearOfBirth can be equal to retirementUS I understand this works I just don't understand why.


How do I load a form with a specific form display (form mode)?

On a custom page I'm trying to load an user edit form with a specific form display. I'm able to load the form however I can't figure out how to load the form with the specific display.  This is what I have now:  public function content($substep) {      $user = \Drupal::entityTypeManager()       ->getStorage('user')       ->load(1); // loading user 1 for test purpose      $form_state = new FormState();      $form = \Drupal::entityTypeManager()       ->getFormObject('user', 'default')       ->setEntity($user);      return \Drupal::formBuilder()->getForm($form); }   Anyone has an idea?


I am using Spigot, some plugins, and I want to make like a zoo on a map, with mobs behind glass cubes. The problem is that when I load my map, every time some of the mobs just vanish, empty cages. I put eggs again, they spawn, I go to my other map in the multiverse (/mv tp my_other_map) and when I come back, empty cages again, always the same ones...   I've  read it's a question of distance of me (distance in cubes unit), if I'm too far away, the mobs will despawn... Is there a way for them to stay?


Count and use the number of items in advance

When writing LaTeX code, I often successively make changes like adding or removing items. I'd like to have TeX count and update the number of items in the list automatically, as in  There are \numItemsNextList ways how a parameter can be given: \begin{itemize} \item By a constant expression. \item By user interaction. \item From another database. \end{itemize}   (what happens next is of course that I realize there is yet another way to give a parameter and add it to the list)  I could roll out my own preprocessor to just count the number of \item-commands in the following \begin{...} ... \end{...} block. But is there a TeX solution as well?


Signatures Invalid and Problem with MergeList error

So, whenever I try to update repos recently (via apt-get), I get something like this:  Reading package lists... Error! W: GPG error: http://ppa.launchpad.net trusty Release: The following signatures were invalid: BADSIG 6AF0E1940624A220 Launchpad PPA for TualatriX W: GPG error: http://ppa.launchpad.net trusty Release: The following signatures were invalid: BADSIG 5A9A06AEF9CB8DB0 Launchpad PPA for Ubuntu Wine Team E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/ppa.launchpad.net_libreoffice_libreoffice-4-3_ubuntu_dists_trusty_main_i18n_Translation-en%5fUS E: The package lists or status file could not be parsed or opened.   When I disable all the ppas, these errors disappeared. Is this a problem with the launchpad servers or is the problem within my configuration or something? I'm running Ubuntu 14.04.


How can I find the smallest set of groups of $n$ elements such that every element is in the same group as every other at least once?

Background: I'm working on  for , and I've run into a problem with how I'm creating the individual matchups (groups of 4 entries).  Currently, I'm simply generating all combinations of 4 elements (in the combinatoric sense) of entries, but that gets really big really quickly:  $$x \choose 4$$    (from )  Therefore, my question is: How can I choose subsets (of length $n$) of a set such that each element of that set appears in the same subset as every other element at least once, while maintaining a minimal amount of subsets?  I can figure this out for $n = 2$, since the solution is quite intuitive: simply combine the first element with every other element, combine the second element with every other element that comes after it, etc. For a set of length $L$, this yields:  $$\sum_{x=1}^{L-1}(L - x)$$    (from )  which is much smaller and more manageable.  However, I still have not been able to figure out: How can I generalize this to any $n$?


How to determine the number of coin tosses to identify one biased coin from another?

If coin $X$ and coin $Y$ are biased, and have the probability of turning up heads at $p$ and $q$ respectively, then given one of these coins at random, how many times must coin A be flipped in order to identify whether we're dealing with coin $X$ or $Y$? We assume a 0.5 chance that we can get either coin.


^@ spam in tty (but seems to be system-wide)

I recently noticed some weird behavior on my GNU/Linux machine. I've been trying to narrow it down but I am unsure where to go next. My setup uses the following:   i3 gdm arch systemd grub2 pulseaudio 4.13.3-1-ARCH   Here is how it manifests iself:   when trying to resize panes in i3 (alt+right click and hold) the action will be randomly canceled (happens on key presses) alt+dragging windows meets a similar fate booting to tty periodically adds ^@s to the login prompt, I'd estimate them to be ~0.5s intervals in tty I can see those being passed to vim when I open the command bar (:) using a pager like less in tty mode and searching with / will result in  (?) being spammed htop's search (/) is instantly canceled by the periodic keypress  holding a key and trying to have it be repeated (such as holding space) will stop the other occurrences from happening (e.g. only one or two happen) any tooltip (such as chrome tooltips) get instantly closed because of key presses   Here is what I have tried:   tried switching DE temporarily (gnome, cinnamon, xfce) tried killing programs one by one until I was left with a tty session and essentially systemd services + pulseaudio tried booting on an arch livecd - problem does not manifest  overriding grub2 with init=/bin/bash drops me into a shell where the problem does not manifest I have tried pressing all keys to verify it wasn't a hardware problem, however previous steps point to it not being hardware I have made a diff of dmesg, from the init=/bin/bash and the regular boot - the main difference seems to be systemd being started in the regular boot Made a diff of lsmod from init=/bin/bash and regular boot, tried to rmmod modules that seemed related   My system is up to date, I'm not quite sure what other steps I can do to track this down. Any other debugging tips?


How to intuitively understand the shapes of confidence and prediction intervals in simple linear regression

Assume the linear regression $Y=b_{0}+b_{1}X$ The $100(1-a)$% prediction interval for $x=x_{*}$ is given by  whereas the The $100(1-a)$% confidence interval for $E(Y|X=x_{*})$ is given by  What I don't understand is the difference in the shape of the bands. The upper and lower 100(1-a)% prediction intervals are straight lines, whereas the the 100(1-a)% confidence intervals for $E(Y|X=x_{*})$ are curves, with the minimum band width at $E(X)$ I understand the reasons why prediction bands are wider than the equivalent confidence bands. But, is there an intuitive way to understand why the shapes of the confidence and prediction bands are different?  The formulas are from


I am trying to use table layout with recyclerView but it is giving the error:java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TableRow.addView(android.view.View)' on a null object reference.  There is my adapter class:  public class CompanyAdapter extends RecyclerView.Adapter<CompanyAdapter.bookViewHolder> {  ArrayList<DataClass> arrayList; TextView deposit; TextView purchase; TextView date; TableRow tableRow; TableLayout tableLayout;  public CompanyAdapter(ArrayList<DataClass> arrayList){     this.arrayList = arrayList; }  @Override public bookViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {     Context context = parent.getContext();     View view =    LayoutInflater. from(context).inflate(R.layout.company_list_item,parent,false);     return new bookViewHolder(view); }  @Override public void onBindViewHolder(bookViewHolder holder, int position) {     DataClass dataClass = arrayList.get(position);     holder.bind(dataClass);     //bookNameTV.setText(dataClass.getBook());     //authorNameTV.setText(dataClass.getAuthor());   }  @Override public int getItemCount() {     return arrayList.size(); }  public class bookViewHolder extends RecyclerView.ViewHolder{        public bookViewHolder(View itemView) {         super(itemView);         deposit = (TextView) itemView.findViewById(R.id.deposit);         purchase = (TextView) itemView.findViewById(R.id.purchase);         date = (TextView) itemView.findViewById(R.id.date);         tableLayout = (TableLayout)  itemView.findViewById(R.id.maintablelayout);      }      public void bind(DataClass dataClass){         deposit.setText(Integer.toString(dataClass.getAmount()));         purchase.setText(Integer.toString(dataClass.getAmount()));         date.setText(dataClass.date);         tableRow.addView(deposit);         tableRow.addView(purchase);         tableRow.addView(date);         tableLayout.addView(tableRow, new TableLayout.LayoutParams(                 TableLayout.LayoutParams.FILL_PARENT,                 TableLayout.LayoutParams.WRAP_CONTENT));// giving error      } } }   One more question, Is there any better way to use tableLayout with recycler View without using any library? Thanks..!


I'm trying to get an arrow that has an arrow head pointing north east and south west, so like \updownarrow but rotated. I can't seem to find this in LaTeX at all. It has to go inside an equation environment.   Any ideas?


unix, difference between path starting with '/' and '//'

In unix/linux, any number of consecutive forwardslashes in a path is generally equivalent to a single forwardslash. eg.  $ cd /home/shum $ pwd /home/shum $ cd /home//shum $ pwd /home/shum $ cd /home///shum $ pwd /home/shum   Yet for some reason two forwardslashes at the beginning of an absolute path is treated specially. eg.  $ cd ////home $ pwd /home $ cd /// $ pwd / $ cd // $ pwd // $ cd home//shum $ pwd //home/shum   Any other number of consecutive forwardslashes anywhere else in a patch gets truncated, but two at the beginning will remain, even if you then navigate around the filesystem relative to it.  Why is this? Is there any difference between /... and //... ?


How to check which desktop GUI environment is installed on my Ubuntu machine

I have an AWS Ubuntu machine.  I want to find out which desktop GUI environment is installed and running on my Ubuntu machine.  Every time I'm logging into Ubuntu I'm getting the GNOME environment. I want to uninstall it and install mate-desktop instead.  How can I do this?


I need to create an XML schema that validates a tree structure of an XML document. I don't know exactly the occurrences or depth level of the tree.  XML example:  <?xml version="1.0" encoding="utf-8"?> <node>   <attribute/>   <node>     <attribute/>     <node/>         </node> </node>    Which is the best way to validate it?  Recursion?


Critical error 6398 - User synchronization not working anymore

I just found this morning that there are a lot of critical errors since 9/9/2015 in SharePoint, all of them being the Event ID 6398. Here's the error:  The Execute method of job definition Microsoft.Office.Server.UserProfiles.UserProfileImportJob (ID 9c4b1113-cc57-46e0-83c4-75c1c64f909a) threw an exception. More information is included below. Operation is not valid due to the current state of the object.  When I go see which job is causing this issue (with the id), it points right toward the User Profile Service Application - User Profile Incremental Synchronization job. And in fact, when I go see users in SharePoint, I can see that they're not up-to-date since about a week (surely since 9/9/2015). I tried to search for solutions, but they were more "Disable the faulty job" than anything else and I don't think disabling this job is a solution. I also found a solution that would be to restart the SharePoint Timer Service on the server, but I'm quite hesitant about this, since I don't know the impacts of restarting the service (even if I don't think it would cause any problem). I'm using SharePoint 2013 if it can be of any help. Is anyone ever faced this problem and maybe have a solution? Thanks.


Seeking purge function to remove layers from qgs file which are not present in Layers pane of QGIS?

I have some QGIS projects that I've been using for long time, adding and removing layers, updating reference to deleted or moved files etc.  Opening the qgs file with a text editor I see that it contains numerous references to different files, and this references are not showed on the Layer tree pane.  I have three different cases: references to existing file, references to missing files, references to database connections. I got aware of this when I opened my project on another machine, and QGIS reported a missing database connection to vector tables not present in the layer tree view.  Manually deleting references from the qgs file solved the problem, but I'm managing huge projects and it's near to impossible to manually check the project consistency. I've tried the "Remove empty layers" plugin, but the ones I'm trying to remove are not empty layers.   Is there any way to 'purge' qgis file?


Proof explanation about the computation of a certain determinant by Sylvester's theorem

Let $n\geq 2$, $A=[a_{ij}]\in Mat_n(\mathbb{R})$ the matrix defined by $a_{ij}=0$ if $i=j$ and $a_{ij}=1$ if $i\not =j$   Calculate $\det(A)$  Proof:  Sylvester's theorem:   Using Sylvester's determinant theorem, which says that for any rectangular matrices of mutually transposed shapes $A\in\mathrm M_{n,m}(K)$ and $B\in \mathrm M_{m,n}(K)$ one has $$\det(I_n+AB)=\det(I_m+BA).$$  If $N$ is your matrix then $-N=I_n-AB$ where $A\in\mathrm M_{n,1}(K)$ is a one column all-one matrix and $B$ is its transpose. Then  $$ \det(N)=(-1)^n\det(-N)=(-1)^n\det(I_1-BA)=(-1)^n(1-n). $$ I need an explanation about one part of the proof  Question:     I don't see this step:      $(-1)^n\det(I_1-BA)=(-1)^n(1-n).$


Pratical Grid Index for Data Driven Pages

I'm trying to automatically generate a smart grid index for data driven pages, though frustratingly, the grid index created by the Grid Index Features tool, seems to start the grid at the bottom left corner (see below)  And isn't mart enough to move re-position itself to remove redundant grids, ideally, if it were intuitive it would shift and thus could remove grid one from the equation.     Has anyone come into this issue? Or found a workaround to create a nice grid index? Would love to get your insight to this problem.


The question is quite clear.  Is there any difference (semantically or connotationally, if that's a word) between nude and naked? Nude seems more formal to me, but I'm not quite sure.  Interesting:  Merriam-Webster link from naked, to nude     Definition of NAKED   1. not covered by clothing :


PXE Boot Server Installation Steps in Ubuntu Server VM

How can I install Ubuntu virtual machine using PXE boot server?  I need the all the configurations details and what to change in the configurations files.


How do snaps work exactly and why are they mounted?

Recently I started learning more about snap packages and what intrigued me was that snap packages are mounted together with their own file system and dependencies (correct me if I'm wrong). Now, with all the great things that snaps bring to the table, what I'd like to know is:  Are snap packages always going to be mounted? This seems kind of awkward, since they appear in places like lsblk and give the impression of not being well integrated into my system.   Also, could they ever replace .deb and .rpm packages completely, or are they a different type of animal and are only complementary to .deb and.rpm packages?  As a side-note, I noticed that some applications are so self-contained that they don't respect any of my desktop settings like the mouse cursor theme or icon and menu themes.


Two spaces which are coverings of each other

Let $X$ and $Y$ be non-homeomorphic spaces. Can $X$ be a cover of $Y$ and vice versa?  Does the answer change if we have a nicer class of spaces eg. path-connected CW-complexes/manifolds?


What is the connection between Poisson brackets and commutators?

The Poisson bracket is defined as:  $$\{f,g\} ~:=~ \sum_{i=1}^{N} \left[  \frac{\partial f}{\partial q_{i}} \frac{\partial g}{\partial p_{i}} - \frac{\partial f}{\partial p_{i}} \frac{\partial g}{\partial q_{i}} \right]. $$  The anticommutator is defined as:  $$ \{a,b\} ~:=~ ab + ba. $$  The commutator is defined as:  $$ [a,b] ~:=~ ab - ba. $$  What are the connections between all of them?  Edit: Does the Poisson bracket define some uncertainty principle as well?


What is the preferred way to declare thread in java?

We can declare thread in class using two ways   extends Thread class implements Runnable interface   so which scenario is the best way?


Why is there a need for more edit approvals when I can edit?

Sometimes, there is an edit made by users with not enough rep. So I click, and sometimes approve. There, I have a message saying "2 more users needs to approve for the edit to take place", or something similar.  I have the privilege to edit. Why isn't my approval enough? If I think the edit is worth it, that means it's an edit I want to see. So I could edit the post right away.  I don't get the thinking behind this.


How to setup texliveonfly, on any LaTeX editor?

I'm a novice in the world of LaTeX, and I'm struggling to find a simple tutorial on how to to setup  as part of TeX Live 2011 in any LaTeX editor.   Is there anyone out there who's got texliveonfly setup on their computer, who could provide a simple step-by-step guide?


Trigger a button click with JavaScript on the Enter key in a text box

I have one text input and one button (see below). How can I use JavaScript to trigger the button's click event when the Enter key is pressed inside the text box?  There is already a different submit button on my current page, so I can't simply make the button a submit button. And, I only want the Enter key to click this specific button if it is pressed from within this one text box, nothing else.  <input type="text" id="txtSearch" /> <input type="button" id="btnSearch" value="Search" onclick="doSomething();" />