Drupal 7: use Form API to make a button that doesn't submit the whole page

I want a button that runs a callback function using the AJAX method included in Form API.  The button I have still submits the whole node edit form. I don't want it to do that - just pass a couple variables to the callback function and display the results. How can I do that?  This is my FAPI code for that button:      $form['rid_import']['rid_get'] = array(                 '#type' => 'button',                 '#value' => t('Import'),                 '#attributes' => array(                     'id' => array('fetch_rid'),                     'class' => array('col-sm-3', 'col-xs-4')                 ),                 '#parents' => array('rid_import'),                 '#limit_validation_errors' => array(),                 '#executes_submit_callback' => false,                 "#submit" => array('sql_no_submit'),                 '#ajax' => array(                     "callback" => 'sql_fetch_restid',                        "wrapper" => 'rid_sql_query',                     "event" => 'click'                 )           );   EDIT  You're right, I was being unclear. Basically what I wanted is something that works like your "Add More" or "Remove" buttons when you have multiple-value fields, but just to run my function without reloading the page – grab some data from the DB and show it there on the node edit form. I have a multivalue field collection that should be populated with those values and then saved together with the rest of the node. That's why I don't want it to go ahead and save the node. However, if it isn't possible I guess I will have to find another way to do what I need.  And tried to add a submit function, still reloads the whole page.


special symbols, . * # inside curly brackets

bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.} echo "BASH VERSION --- $BASH_VERSION" echo "bmajor ----- $bmajor" echo "bminor ----- $bminor"   prints,  BASH VERSION --- 4.2.46(1)-release bash --- 4.2 bmajor ----- 4 bminor ----- 2   I normally use curly brackets, {} to work with arrays. I see here, they are used for pattern matching.   How these values, ${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.} are evaluated? And what does the special characters, *, ., # inside {} mean?


Does Google cap impressions of my website?

It looks like my site hit an imaginary limit of 400 daily impressions.  What is this limit based on? How can I "break through" that limit?


Who actually sent the assassin to kill Bran?

I've read all of the books, but most of them years ago. But I can't remember who it was who actually sent the assassin.  Is it made clear, for example an actual confession?


I need help coming up with a function in python that can take 3 arguements as lists and give me all combinations of there elements

What I have so far does pretty much nothing    def dress_me(shirt, tie, suit):    #    if type(shirt) != list or type(tie) != list or type(suit) != list:     #        return None             combinations = dress_me(shirt, tie, suit)             for combo in combinations:                 print(combo)


Shortest sequence containing all permutations

Given an integer $n$, define $s(n)$ to be the length of the shortest sequence $S = (a_1, \cdots a_{s(n)})$ such that every permutation of $\{1,\cdots,n\}$ is a subsequence of $S$.  If $n=1$, then $S = (1)$ is the shortest sequence containing all permutations of $\{1\}$, so s(1) = 1.  If $n=2$, then $S = (1, 2, 1)$ contains all permutations of $\{1,2\}$ as a subsequence, so $s(2)=3$.  Is there a general formula for $s(n)$?


Combine two different textures so that one appears in the shadows as Earth rotates?

I just watched to this amazing example on how to animate Earth:  So I ask: is it possible to combine the two different textures below so that the night Earth (with lights on) appears in the shaddow region as Earth rotates?  Sources of images:


Word for a person who knows two or three languages

A polyglot is a person who is fluent in many languages, but what do we call a person who is fluent in only two or three languages?  Is bi-glot a proper term for this?  I don't think the words bilingual / trilingual fit the bill, because I am looking for a -glot word.


Does it make sense to use logistic regression in R when both my IV and DV are dummies?

I am doing experimental research for an assignment. My DV is agree coded 1 or disagree coded 0 with a statement my IV is group with treatment in scenario 1 and group without treatment 0. Does it still make sense to do a logistic regression on these variables?


A number theory problem, about prime number

Let $m_1, m_2, \ldots , m_r$, $r \geq 2$, be non zero integers which do not have a common prime divisor. Show that there exists $a_1, \ldots , a_r \in \Bbb Z$, such that  $$\sum_{i=1}^r a_i \cdot m_i = 1$$  I am new in this area, any help would be appreciate!


Finding an Inverse Function and Composition of Functions?

The functions of each pair are inverse to each other. For each pair, check that both compositions give the identity function.  $F: \mathbb{R} \to \mathbb{R}$ and $F^{−1}:\mathbb{R} \to \mathbb{R}$ are defined by $F(x)=3x+2$ and $F^{−1}(y)=\dfrac{y−2}{3}$. for all y ∈ R  My attempt:     Inverse Function  For each particular but arbitrarily chosen $y \in \mathbb{R}$, according to the definition of $f^{-1}$, $f^{-1}(y) = \dfrac{y-2}{3}$ is a unique real number $x$ such that $f(x) = y$. \begin{align*} F(x) & = y\\ 3x + 2 & = y\\ x & = \frac{y-2}{3} \end{align*} Therefore, $f^{-1}(y) = \frac{y-2}{3}$.  Compositions of Functions  The functions $g \circ f$ and $f \circ g$ are defined as follows: $$(g \circ f)(x) = g(f(x)) = g(3x + 2) = 3x + 2$$  for all $x \in \mathbb{Z}$.


On DE we can resize terminal (gnome-terminal for example) for our convenience,how can I know the size of the terminal in terms of pixels or number of columns and rows?


This is a problem that has long troubled me.  Imagine that I have a block of prose organized in three paragraphs. I want to construct a single quotation that contains only the first and third paragraph.  I use ellipsis if I want to tell readers that I am skipping sentences in a quotation. How do I tell readers that the quotation is skipping a paragraph?


How can I take screenshot in BlackArch Linux?

Which program can I use to take a screen cap or take video of my screen? Maybe it's a simple (silly) question, but I can't find a good solution.


Comparing Two strings in Java (If/Else statement) -- Android App

I am working on a login page in an Android App.   As you know, the app must check if the username and password are valid, and then grant the user access to the application.  I have used the following code:  ...   EditText un = (EditText) findViewById(R.id.username1);  EditText pw = (EditText) findViewById(R.id.password1);  String u = un.getText().toString();  String p = pw.getText().toString();   String myUser = "user1";  String myPass = "pass1";  //////// Now on the click of the Login Button:   public void onClickL (View view){  if ( (u == myUser) && (p == myPass)) /////// move to a new activity  else ///////Display a warning message: Try again  }   I entered the correct strings in both editText fields, however i always get the warning message. I don't understand what is wrong with it.  Please help :)


Would the fire damage from a burning bush lit by Burning Hands still be magical fire damage?

If burning hands is used to set a bush on fire is the damage caused by the burning bush still considered magical damage? What penalties would apply if so?


Is it safer to only use local variables within your JavaScript code?  As I understand variables declared within the $(document).ready(function () {code here...} block are local. Meaning these cannot be accessed or changed by other scripts?  Also, if a variable is declared global but assigned a value locally, is this value then globally visible?  var a; function myFunction() {     var a = 4; }  Will other scripts on the page be able to see the value of a being set to 4?


Recently I asked a question on Maths SE     after solving this one one I was thinking whether $e^\pi$ is greater or $\pi^e$ ? On calculating exact values upto 7 digits i got these values   $e^{\pi} =23.1406926$................and  $\pi^e =22.4591577$...............  So practically  I proved that $e^\pi$ is greater than $\pi^e$. But without finding the values If we want to find it , I want to know how to find it .... Suppose there are few type of sim like which one is greater from $17^{51}$ or $51^{17}$ , so we use Binomial Theorem , but here I didn't got any idea how to prove it .


I have been using ubuntu for a while now. I just got a new asus laptop, and did install ubuntu 14.04 in a dual booting on it. I tend to use ubuntu than windows. But when in ubuntu it seems to hit a little bit more.   I have research and almost off blogs about things to install after ubuntu seem to promote the tlp tool. with ppa add-apt-repository ppa:linrunner/tlp.  I am wondering about how this can positively and negatively affect the laptop, in terms to performance, speed of the hard drive (7200) etc.  Thank you


Do characters in Star Wars address how odd it is the universe is filled with humanoids?

In Star Wars, basically everyone is a human with facial make-up; is there an attempt at an in-universe explanation of this within this franchise?  Note:formerly this question was for Star Trek and Star Wars, which was too broad. This is now for Star Wars.  Link to old question:


I am building some backlinks to a page of my website that is high likely to get deindexed (I have to build to that specific page) mainly because of duplicate content.  Will my page, if deindexed, pass link juice if I permanently redirect (301) it to another page (also within my website)?


How many log files does a database usually have?

I'm studying SQL Server. I have read that a database can have several data files and one log file, but recently I was heard that a database can have more than one log file.   Is this true?


How to change IN operator with CHARINDEX within the WHERE clause SQL

I have these query :  SELECT * FROM        Table_a A     JOIN Table_b B         ON (B.ID = A.ID) WHERE     (A.UserLogin = @UserLogin)     AND (B.ID IN @DocumentID)   And I want to change using Charindex :  SELECT * FROM        Table_a A     JOIN Table_b B         ON (B.ID = A.ID) WHERE     (A.UserLogin = @UserLogin)     AND CHARINDEX(@DocumentID, B.ID ) > 0)     But the value of @DocumentID='3,4,5'. I don't know how to use CHARINDEX in this case. Can someone help... Thanks


Risk of extinction of Schrödinger's cats

I am interested in how uncertainty can be accounted for when considering the risk of extinction of a species. Forgive me for extending a rather tired thought experiment, but at least it's familiar territory and I hope it illustrates what I am trying to understand.  Let's say that Schrödinger was not satisfied with killing and not killing only one cat, so he went out and collected the last 15 remaining Himalayan Snow-Cats. He put each one in a box with a vial of poison, hammer, and a trigger device for releasing the hammer. Each trigger device has a known probability of releasing the hammer within any given hour, and the poison will take 5 hours to kill a cat (things got a bit trippy when he used radioactive decay, so this time he steers clear of quantum mechanics). After one hour, Schrödinger receives a notice from the ethics board telling him he's nuts and ordering him to release the cats immediately. He pushes a button which opens a cat-flap at the back of each box, thus releasing them all back into the wild. By the time the humane society check the boxes, all the cats have bolted. Before anyone can restrain him, Schrödinger detonates the remaining triggers, so nobody knows how many of the cats were poisoned.  The probability that each of the cats is poisoned is as follows:   0.17 0.46 0.62 0.08 0.40 0.76 0.03 0.47 0.53 0.32 0.21 0.85 0.31 0.38 0.69   After 5 hours have elapsed and all poisoned cats have died, what is the probability that there are:   (A) More than 10 Himalayan Snow-Cats still alive  (B) 10 or less still alive (C) 5 or less still alive (D) 2 or less still alive


How can I install Ubuntu 13.04 + without USB, CD, DVD or Net? (hard drive only)

I have an older i386 Sony Vaio desktop PC where the BIOS only allows boot from floppy, CD or very specific USB device types, none of which seem to recognize USB flash drives for some reason. Floppy is not an option because the drive no longer works and I have no media for it if it did. I've tried assorted CD and DVD drives, the CD drives all give read errors and DVD drives all say "unsupported emulation".  My next possible option that I would like to try, is to install the hard drive into another machine as a second HD and figure out a way to format it and save an Ubuntu installation to run from that HD once it is moved back into the target machine. IS this possible and if so, how would I go about doing so? The currently running machine uses Windows XP.


Using Centos Firewall how to assign multiple IPs to a Port?

Setting up a new zone, with a port that has . How does one apply this to more than one IP?  $ firewall-cmd --new-zone=special $ firewall-cmd --permanent --zone=special --add-rich-rule='   rule family="ipv4"   source address=”123.1.1.1"   port protocol="tcp" port="10050" accept'   Is source address allowed an array of CSV? Is it defined like this?      source address="123.1.1.1","234.1.1.1"


What does p-value mean in Multiple Regression Analysis?

I was trying to learn the usage of p-value in Multiple Regression Analysis. I have found the following sentence which meaning is not clear to me.   If the null hypothesis is true (b1=0), the chance of us getting a sample AS EXTREME AS we did.  I found another sentence like above.   The P value is the probability of seeing a result AS EXTREME AS the one you are getting (a t value as large as yours) in a collection of random data in which the variable had no effect.  I found this sentence in this   The meaning of AS EXTREME AS for this case is not clear to me at all. Since English is my second language, I cannot understand how the statements stated above explain the importance and usage of p-value.  I would be grateful if anyone would explain the above statements in such a way that a non-native speaker of English can easily understand the actual sense.


Regex.Matches Fails To Find Multiple Matches

I have run into a problem when trying to find multiple matches in a length of text. The text has the following format:  string text = "#IDENTIFIER http://www.link1.com #IDENTIFIER http://www.link2.org #IDENTIFIER http://www.link3.com #IDENTIFIER http://www.link4.net";   My objective is to extract each #IDENTIFIER link occurrence from this and I am doing it using the following code:  string pat = @"(#IDENTIFIER)(.*)\.(com|org|net)"; MatchCollection matches = Regex.Matches(text, pat); foreach(Match match in matches) {     Console.WriteLine("'{0}' found at index {1}.", match.Value, match.Index); }   The problem is, it returns one match and not 4. Why are the in-between patterns ignored?  Do you know what I am missing?


I am trying to edit out "Dear Baju" in . But when I click edit, somehow, "Dear Baju" is not there:    But after saving it's back again:


What's the name of the song that played in the last few minutes of episode 13 of Charlotte?

It's towards the end of the episode, something about Sinking Ships but I can't find the song.


Why am I getting an Null Pointer Exception from trying to add a record?

It says that I'm receiving the error at line 506 which is the one saying   firstTxt.setText(newPerson.getFirstname());   Here is the first two lines of error code: Exception in thread   AWT-EventQueue-0" java.lang.NullPointerException at      dataawaredatajava.JFrame.addButtonActionPerformed(JFrame.java:506)    This only happens whenever I click on the "Add?" button or addButton. I use a similar method of casting my object with my update button, but that seems to work perfectly fine!  private void addButtonActionPerformed(java.awt.event.ActionEvent evt) {                                               switch (addButton.getText()) {         case "Add New Person":             lstPerson.clearSelection();             blockForAddOrUpdate(true);             addButton.setEnabled(true);             addButton.setText("Add?");             break;         case "Add?":             Person newPerson = (Person)lstPerson.getSelectedValue();             firstTxt.setText(newPerson.getFirstname());             lastTxt.setText(newPerson.getLastname());             dobTxt.setText(newPerson.getDob());             occupationTxt.setText(newPerson.getOccupation());             marriedChB.setSelected(newPerson.getMarried());             noOfKidsJSp.setValue(newPerson.getNumberofkids());             dataAwareDataJavaPUEntityManager.getTransaction().begin();             dataAwareDataJavaPUEntityManager.persist(newPerson);             dataAwareDataJavaPUEntityManager.getTransaction().commit();             addButton.setText("Add New Person");             blockForAddOrUpdate(false);             personList.add(newPerson);             lstPerson.setSelectedValue(newPerson, true);             break;


I'm trying to get the Weed-Eater hat on Stack Overflow. To do so, I'm looking at the list of questions . The problem is, no tags show up there, and so it's rather difficult to see which ones I have a shot at. Any chance of showing the tags on this page?  I realize that getting this before Winter Bash is over would be difficult, but it would be good to keep such things in mind for the future.


Updates still coming in even after Firefox purged

I hope someone can help. While I cannot run Firefox anymore with the Purge and Remove from here, updates still want to put in Firefox files.  How do I stop that? To clarify I ran the "Purge" and the "Remove" commands (successfully, no error messages) in Terminal, and also re-installed and removed Firefox via the Software Manager, but updates for Firefox continue to keep being downloaded and installed. Thanks! Cheers, skris88


How to solve complex equation, all values?

$(-81)^{1/4}$  The answer, I got was -3,3..but when I input it in the webwork, it does not work.  What is the method to solve this?


Amplify current and voltage to preserve battery

I'm wondering, is it possible to provide for example 5V/500mA from a single 1.2V battery and consuming only 50mAh from the battery by using a low input voltage boost converter and a power amplifier ? (L272 and a TPS61200 for example)  I found that it's possile to go from 1.2v to 5v with the TPS61200 and go from 50mA to 500mA with the L272 but what if they're used together ? Will it preserve my battery lifespan ?


Syntax error INSERT INTO - PHP not clear what the error is

I am getting an error in my SQL for my code but for the life of me, I can't seem to understand how to fix it. the error code in SQL is:  1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[value-1],[value-2],[value-3],[value-4])' at line 1  from:          INSERT INTO mensajes(id, nombre, email, mensaje) VALUES ([value-1],[value-2],[value-3],[value-4])  My code is as follows:      if ( isset($_POST["nombre"],$_POST["email"],$_POST["mensaje"]) and $_POST["nombre"]!="" and $_POST["email"]!="" and $_POST["mensaje"]!=""){      // Traspasamos a variables locales, para evitar complicaciones con las comillas:     $nombre = $_POST["nombre"];     $email = $_POST["email"];     $mensaje = $_POST["mensaje"];      // Preparamos la orden SQL:     $consulta = "INSERT INTO mensajes(id,nombre,email,mensaje) VALUES('0','$nombre','$email','$mensaje')";      if ( mysqli_query($con, $consulta) ){          echo "
Registro agregado.
";      } else {          echo "
No se agregó...
";      }  } else {      echo '
Por favor, complete el formulario
';  }  } else {  echo "
Servicio interrumpido
";  }   Any help on this would be great and if I need to provide more information, also, please let me know. Cheers!


Explanation for the javascript operation

When i tried out the following in the google Chrome console , i got the corresponding answers can anyone explain reason for the following answers  1 == '1.0' true  1 == '1' true   '1.0' == '1' false   Why is this happening and does this means , == compares value or not


How can I access Apache (on VirtualBox guest) from host?

I installed Apache on an Ubuntu VM. When I go into the guest and load up Firefox I can see that Apache is working fine when I browse to localhost.  I would like to access this same page through the host. I've tried using the IP address of the guest but nothing comes up. Ideally I would love to set up my Windows 7 (host) to request http://guestserver.com of the Apache server on the guest. How can I do this?


\AtBeginDocument breaks csquotes nesting - or \xspace won't add space

A couple of months ago, I asked  question because xspace wasn't adding whitespace before an active quote. The apparent solution was to add \AtBeginDocument. However, this breaks csquotes nesting as I just found out:  \documentclass{minimal}  \usepackage[log-functions=false]{expl3} \usepackage[log-declarations=false]{xparse}  \usepackage{luatextra}  \usepackage[autostyle,german=guillemets]{csquotes}  \usepackage{xspace} \usepackage[xspace]{ellipsis}   \AtBeginDocument{        % comment this for the nesting to work     \MakeAutoQuote{“}{”} }  \NewDocumentCommand \test {} {     test\xspace }  \begin{document}  Hello, \test “after command, with just an “inner quote,” which \emph{should} be automatic.”  \end{document}   Is there a way to somehow get both to work? The inner quotes switching to single quotes automatically AND the space after the command?


I am an Movies & TV SE user.  Why there is no donation page on Stack Exchange?   With donations, the SE communities could make the site design even more beautiful.


"Basis extension theorem" for local smooth vector fields

Let $\pi: E \to M$  be a smooth vector bundle of rank $n$, and suppose $s_1, \ldots, s_m$ are independent smooth local sections over an open subset $U \subset M$.   Can I prove the "basis extension theorem" for smooth sections? That is, for each $p \in U$, there are smooth sections $s_{m+1},\ldots,s_n$ defined on some neighborhood of $V$ of $p$ such that $(s_1, \ldots, s_n)$ is a smooth local frame for $E$ over $U \cap V$.


List of Ubuntu Versions with Corresponding Linux Kernel Version

Is there a list of Ubuntu versions with default corresponding Linux kernel versions somewhere?  I would specifically like to know the most recent version of Ubuntu that still used Linux Kernel 2.x.


Unexpected behaviour while constructing higher order functions in Python

I'm trying to construct a function in Python that accepts a list of numbers and returns a list of functions dependent on the input values:  filters = lambda ys: [lambda x: x % y == 0 for y in ys]   If I call the above filters function with a list of values, it should return a list of lambda functions which have been constructed from the input list. For example, calling filters([3,5]) should return   [lambda x: x % 3 == 0,  lambda x: x % 5 == 0]   Defining another function, applyToNum (similar to map) as   applyToNum = lambda x, fns: [fn(x) for fn in fns]   I now encounter the following behaviour:  applyToNum(15, filters([3,4,5]))       # returns [True, True, True] rather than [True, False, True]   The interesting thing is that if I construct the filters function list manually, it works as expected:  filters2 = [   lambda x: x % 3 == 0,   lambda x: x % 4 == 0,   lambda x: x % 5 == 0]  applyToNum(15, filters2)  # returns [True, False, True]   Could someone explain why the above behaviour is seen?


meaning(metaphor) of the sentence: "putting my fireproof suit on"

I saw the Q&A few weeks ago,  A: Are you watching the walking dead B: No."putting my fireproof suit on"  so, does it mean afraid or angry or something?  THANK YOU :)


Why do we need the second postulate in special relativity?

Postulate 1: All inertial frames are equivalent Postulate 2: The speed of light in vacuum has the same value $c$ in any inertial frame.   It can be shown that the Lorentz transformations directly follow from the fist postulate ( and by assuming the universe is isotropic, but this assumption is also needed with the standard derivation). This proof would lead to several cases to consider (namely, $c= \infty$, $0< c^2 < \infty $, $c^2=0$  and $c^2 <0$)  however these can all be ruled out by experiment so that we finally reduce to the familiar Lorentz transformations. Why then do we still consider the invariance of the speed of light as a postulate, if it can be inferred from the first postulate?


Using a static variable in an abstract base class

I am trying to create a state machine. I have created a class called BaseState that all states inherits from. The problem I'm having is that when the sub classes change a BaseState member variable, it does not change the variable for all of the inherited classes. From what I know of programming, this is when I use static. But in my case I get a linker error (LNK2001).  So when I call ChangeState(State::MenuState); inside SplashState, it switches, but switches back since the value in BaseState has not changed.  class StateMachine { private:     State                   _currentState;     std::vector<BaseState*> _baseStates;     void ProcessStateRequest();  public:     StateMachine(InitVar initVar);     ~StateMachine();      void Update(float deltaTime); };   That adds the states like this:  StateMachine::StateMachine(InitVar initVar) {     _currentState = State::SPLASHSTATE;      for (int i = 0; i < State::EXITSTATE; i++)     {         switch (i)         {         case SPLASHSTATE:         {             _baseStates.push_back(new SplashState(initVar));             break;         }         case MENUSTATE:         {             _baseStates.push_back(new MenuState(initVar));             break;         }         case PLAYSTATE:         {             _baseStates.push_back(new PlayState(initVar));             break;         }         case OPTIONSSTATE:         {             _baseStates.push_back(new OptionsState(initVar));             break;         }         }     } }   With changing states like this:  void StateMachine::ProcessStateRequest() {     //if currentState does not match with the new requested state.     if (_currentState != _baseStates[_currentState]->GetNewStateRequest())     {         _baseStates[_currentState]->OnStateExit();         _currentState = _baseStates[_currentState]->GetNewStateRequest();         _baseStates[_currentState]->OnStateEnter();     } }   Inside basestate.h:  enum State {     SPLASHSTATE,     MENUSTATE,     PLAYSTATE,     OPTIONSSTATE,     EXITSTATE, };  class BaseState { private:     State               _newStateRequest; //Cannot edit this from subclasses. Adding static causes linker error. protected:     ObjectHandler*      _objectHandler;     UIHandler*          _uiHandler;      void ChangeState(State newState); public:     BaseState(InitVar initVar);     ~BaseState();      virtual void Update(float deltaTime) = 0;     virtual void OnStateEnter() = 0;     virtual void OnStateExit() = 0;      State GetNewStateRequest()const; };   The last part of basestate.cpp:  BaseState::BaseState(InitVar initVar) {     _objectHandler      = initVar.objectHandler;     _uiHandler          = initVar.uiHandler;     _newStateRequest    = SPLASHSTATE; }  BaseState::~BaseState() {}  void BaseState::ChangeState(State newState) {     _newStateRequest = newState; }  State BaseState::GetNewStateRequest() const {     return _newStateRequest; }


How to add sysadmin to user in SQL Server 2008 when no sysadmin accounts exist

I have a SQL server 2008 instance running. Unfortunately during testing I deselected the sysadmin rights for my login and now can't readd it (because I don't have sysadmin rights).  There are no other sysadmin accounts for the instance except SA.  I was set up for just Windows Authentication so I hacked the LoginMode in the registry to 2 so I could login as SA using Sql Authentication. This does indeed set the login mode to Mixed, however the SA user is disabled by default and I can't reenable it because I am don't have sysadmin rights.  How do I enable the SA login so I can get in and reassign the sysadmin to my normal account? Is there a registry setting for this too or is it stored in the master database?


Say we have $f(x+y) = f(x) + f(y) \quad \forall x,y \in \mathbb R$ and $f$ is continuous at one point at least. I wish to show there must be some $c$ such that $f(x)=cx$ for all $x$. Think I can do so by first showing $f$ is continuous everywhere I'm not sure how then let $f(q) = 1$ somehow and show that $f(q)  = cq$ where $q$ is rational. But then the aim is to show for all real $x$ so I am not sure~


For any triangle with sides $a$, $b$, $c$, show that $a^2b(a-b)+b^2c(b-c)+c^2a(c-a)\ge 0$

For any triangle with sides $a$, $b$, $c$, prove the inequality $$a^2b(a-b)+b^2c(b-c)+c^2a(c-a)\ge 0 .$$   This is IMO 1983 problem 6.  I tried substituting $a=x+y$, $b=y+z$, $c=z+x$ but well it doesn't help in any sense except wasting 3 pages that lead to nothing (please don't mind the joke). Using $a=2R\sin A$, $b=2R\sin B$, $c=2R\sin C$ also didn't lead to anything for me. Could you give me a hint for finding the proper substitution?


Is there GCC compiler that could build large source code in parallel ? "The compiler itself running with parallel computing methodology " Is there any GCC option for doing the previous requirement?


Can't boot into WIndows 10 after installing Ubuntu 18.04

I changed the boot order in the BIOS. Since then when I try to boot Windows from GRUB it shows      cannot load image   I've tried disabling secure boot and nothing changed. I tried booting from the f9 menu and choosing Windows, but it goes directly to the GRUB menu.  I ran the boot info script and .  I've seen other posts like . I tried it all and it didn't work for me.


Probability of randomly selecting marbles

if you have 5 black marbles and 1 white marble in one bag,  when randomly selecting 4 out of the 6 marbles at once without replacement, what is the probability of the white marble being included in the 4 marbles selected


Lists turn immidiatly to "global" - python

The title is not the issue. this issue i already solved by understanding the "immutable and mutable" -thing. But, I wanted to know a bit better about it. What are exactly allow the object to be acceced by another function if i dont tuch him and make shadow of the first one created. I show you with code:  def text():     print x  x = 6 text()   This example whill work well, because i didnt created a new object of immutable. but this:  def text():     print x  text() x = 6   This will not work because the integer is not a global variable.  What is exactly happend when i created a new object without globaled it? to where in the memory this objects goes that allowed me to approach to it by another scope. why its so different then just a global?


In Let’s go Pikachu can I move my mew to a new game?

I want to make a new game on Let’s Go that only has Psychic Pokémon in my party. I already got my mew out from the pokeball plus though. Is it possible to put mew into Pokémon home, make a new game of Let’s Go on another Nintendo User account on my Switch and then move mew to that new game? I don’t want to buy another pokeball plus to get mew into the new game....


Remove Portion of Query String based on a variable parameter value

I am using the following code (with the help of this ) to remove query string parameters that contain "all"?  It turns:   into   How can I modify the code to use a variable instead of "/all/"? I want to be able to easily switch out which parameter to remove.  Existing code (working but no variable):  let src = "https://www.foobar.com/page?year=all&language=all&gender=female"; let url = new URL(src); let re = /all/; let props = [...new URLSearchParams(url.search)]             .filter(([key, prop]) => !re.test(prop)); url = url.origin + url.pathname; let params = new URLSearchParams(); props.forEach(([key, prop]) => params.set(key, prop)); url += "?" + params.toString();   New code (not working)  let parametervariable = "/somefoovariable/"; let src = "https://www.foobar.com/page?year=all&language=all&gender=female"; let url = new URL(src); let re = parametervariable; let props = [...new URLSearchParams(url.search)]             .filter(([key, prop]) => !re.test(prop)); url = url.origin + url.pathname; let params = new URLSearchParams(); props.forEach(([key, prop]) => params.set(key, prop)); url += "?" + params.toString();  variable):**   The new code gives the following error: "Uncaught TypeError: re.test is not a function"


After installing OS, When opening "MY Computer" it shows first hard disk as "C", why so?   Why Hard disk labeling starts with C rather than A?


Every algebraic extension of a finite field is a finite extension. True or False?

If $F$ is an algebraic extension of a finite field $K$, then $F/K$ is separable. If we are able to show that $F/K$ is normal, then $F/K$ would be a Galois extension and hence splitting field of a polynomial over $K$, and therefore $F/K$ will be finite. But how to show $F/K$ is normal? Otherwise, if it is not so, give an example such that $K$ is a finite field and $F/K$ is algebraic but $[F:K]$ is infinite.


Install error Chrome on ubuntu 18.04 on windows10

I'm struggling with this problem for a few days now ;( I want to install Chrome and Chromedriver to use selenium on ubuntu, so I connected to Ubuntu 18.04 with Putty (windows 10 user) and write some codes that are needed for chrome installation, but the error is occurred as below: Could anyone please tell me what to do? ubuntu@ip-172-31-35-176:~$  wget -q -O - https://dl-ssl.google.com/linux/linux_s                                     igning_key.pub | sudo apt-key add - OK ubuntu@ip-172-31-35-176:~$ sudo sh -c 'echo "deb [arch=amd64] http://dl.google.c                                     om/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' ubuntu@ip-172-31-35-176:~$ sudo apt-get update E: Malformed entry 1 in list file /etc/apt/sources.list.d/google.list (Component                                     ) E: The list of sources could not be read.


test -f "$name" || touch "$name"  So I use this command to test if the file already exists but the problem now is if the file is a copy, my script continue in the same file, while I just want the script to end after it already exists with the text "this file already exists" end script.


How to Express the Equation of an Ellipse in Canonical Form in Standard Form

I have an ellipse expressed as $(a+1)x^2+2abxy+(1+b)y^2=r^2.$ I found its center to be $(0,0).$ How can I express this in standard form $\frac{x^2}{A^2}+\frac{y^2}{B^2}=1$ in the $xy$ plane?


What's in "standard system utilities" in the server install?

My googlefu has failed me. What packages are part of the "standard system utilities" that is preselected during install?  TIA! (-:


What is the cardinality of $\mathrm{SL}_2(\mathbb{Z}_p)$, where $p$ is a prime?

I was solving past exam papers and stuck on the following problem:  Let $p$ be a prime number .Suppose $G$ be the group of all $2 \times 2$ matrix over $\Bbb Z_p$,with determinant $1$ under matrix multiplication. Then order of $G$ is which of the following :  $p(p-1)(p+1)$  $p^2(p-1)$  $p^3$  $p^2(p-1)+p$    Can someone explain it? Thanks and regards to all.


Prove that if $A – C = B – C$ and $A\cap C = B\cap C$ then $A = B$

I am trying to prove that if $A – C = B – C$ and $A\cap C = B\cap C$ then $A = B$. I have tried using Venn Diagrams as a proof technique, but we are not able to use proof by Venn Diagrams.


How do I use the output of a command in a for loop in bash?

I'm trying to use the output of this in a for loop:  $wc -l example.mgn | awk '{print $1}' 12   however, I get this:    for i in {1..`wc -l example.mgn | awk '{print $1}'`}; do echo $i; done {1..12}


Make search by file name default in Finder

In Finder when I type something in the textbox the default is to search the whole mac in the contents of the files. I was able to change the default to search the current directory, but didn't see an option to change search for contents to search for file name. How can that be changed?


Why won't my mapped drive persist for elevated user after reboot?

This is related to this issue:   I'm needing to run a program (InstallShield) as an elevated user, but this program also needs to access files located on a network share. Due to max path length (and legibility) issues, I really want to access these files using a mapped drive (rather than the much longer UNC path). However, due to the issue referenced above, the drive I mapped (via Windows Explorer) is not recognized.  Unfortunately, the recommended EnableLinkedConnections registry hack doesn't appear to work at all for me. Instead, I can get things to (temporarily) work by mapping the drive via an elevated command prompt using the following command: net use Z: \\machine\path /persistent:yes  The problem is this mapped drive does not actually persist (despite the /persistent:yes parameter) after reboot. Granted I can just quickly remap it via a script I manually run, but I imagine there must be a better way.  I don't know how to automatically run login scripts as the elevated user, otherwise I would try that. I'm also wondering why the net use command isn't persisting as expected.  Since it may be relevant, this is a Windows 8.1 virtual machine. Also, the network share I'm trying to persistently map and access is provided by VMware Workstation (via its optional Shared Folders feature).  I'm wondering if this is maybe a timing issue? (see )    Update  I managed to find a workaround, although I still don't have an answer for why the mapping doesn't persist in the first place.  Anyway, I set up a simple scheduled task in Windows to run a batch file on login. This batch file maps the network share to the desired drive letter (via the same net use command). I also ensured the Run with highest privileges task setting was checked. Voila! Elevated processes can now see and access my mapped drive, even after rebooting.


Say you were wanting to measure a signal with a higher voltage than the ADC could handle. Is there some best practice or commonly used circuitry that goes beyond a simple voltage divider to protect the ADC?   Or is it common for professional designs to simply rely on a voltage divider?


If there were a space ship moving close to the speed of light, that was large enough for a smaller ship inside of it to reach close to the speed of light and it opened its hanger doors and the smaller ship exited the larger ship at that speed, Theoretically, would it be crushed by its own mass at the door horizon, when it neared the door, after exiting the door, at all, or do we even know?  (I'm not asking about relativity inside, because I know that neither ship is moving faster than the speed of light relativity speaking until the smaller ship exited the larger one, unless relativity changes as the ship approaches the door from the prospective of the person in the smaller ship). Which brings up what would it look like to the person in the larger ship from an angle where they could see out the hanger door, perspective of the small ship as it approached the door and to an outside observer (or camera) watching through the windows into the larger ship seeing the smaller ship (from that point of view moving faster than the speed of light) would it disappear, or would they just see it after?


The health, safety and well-being of our employees "is"/"are"

What is more correct? a) The health, safety and well-being of our employees is mission priority #1. b) The health, safety and well-being of our employees are mission priority #1.


I can't spawn in other types of mobspawners

I very well know how to do /spawner cow and such, but when I try to do /give <User> 52:4 (zombie spawner) it doesn't work; it gives me only a pig spawner. I am very annoyed, and my player wants a spawner shop. What do I do?  In case you want to know, here are my plugins: Essentials, WorldBoarder, Factions, Multicore, vaults, Playervaults


My first name is Lluis but always Ubuntu changes my name as Llus when my computer starts as Ubuntu. I don't understand why this 'i' is missed.


Does concentration require line of sight to the spell effect being maintained?

Does concentration on a spell require line of sight to the area of the spell, or can the caster move into cover and continue concentrating?  For example, a caster steps out of a doorway, casts Hypnotic Pattern, incapacitating 10 of 15 orcs, then ducks back through the doorway, closing the door, and continues to concentrate.  His allies now fight the orcs and the caster need not worry about the 5 unaffected orcs attacking him and forcing him to make concentration checks.  Taking things to a ridiculous extreme, could the caster cast the spell and then Teleport to the nearest inn and have a few drinks while continuing to concentrate on the spell from miles away?


I would like to know if there's a way to export all Manual Sahrings that have been done on Pricebook records. I would like to know, for each pricebook record, with which user/role/public group has beeen shared manually. I tried to query the PricebookShare object but I can't find it. Can someone help me? Thanks


Should I use "is" or "are" with "any of X"?

Please log a CIP if ANY of the following is required to make the change:  Please log a CIP if ANY of the following are required to make the change:    I believe it should be are; but am I right?


How to access global variable inside method in Java?

I'm trying to implement a LinkedList with an add method. As you can see, I've created a LinkedList class and initialized it with a nodes attribute that's an ArrayList containing Strings.  The add function should simply take a value and append it to the end of nodes. Instead, I'm getting a NullPointerException.  What am I missing here?  public class LinkedList {   public static ArrayList<String> nodes;    public LinkedList() {     ArrayList<String> nodes = new ArrayList<String>();     System.out.print(nodes);   }    public ArrayList<String> add(String value) {     nodes.add(value);     return nodes;   }     public static void main(String [] args) throws IOException   {     LinkedList list = new LinkedList();     list.add("B");   }  }


Can current be induced in a superconductor?

Moving a magnet close to a conductor induces a current. If it consists of a superconducting material with resistance $R=0$, then my textbook says:     Then the induced current will continue to flow even after the induced emf has disappeared.   This makes sense physically - there is no resistance to stop charge flow. But then the book draws this conclusion:     Thanks to this persistent current, it turns out that the flux through the loop is exactly the same as it was before the magnet started to move, so the flux through a loop of zero resistance never changes.   If the flux $\Phi$ never changes in a superconductor, from Faraday's law this means - from what I have learned - that no electromotive force $\mathcal{E}$ is induced:  $$\mathcal{E}=-\frac{\mathrm{d} \Phi}{\mathrm{d}t}=0 \:\:\:\:\text{ when }\frac{\mathrm{d} \Phi}{\mathrm{d}t}=0$$  My conclusion is therefor: There would never be induced any current at all. Current can never be induced in a superconductor loop. Is this the case or am I misunderstanding my book?


$$\lim _{x \to 0} \left[\frac{2}{x^3}(\sin^{-1}x - \tan^{-1}x )\right]^{\frac{2}{x^2}}$$  How to find this limit?  My Try: I tried to evaluate this $$\lim _{x \to 0} \left[\frac{2}{x^3}(\sin^{-1}x - \tan^{-1}x )\right]$$ to understand the nature of the problem. I used L'Hopital. But it became too tedious to calculate.  Can anyone please give me suggestion to solve it?  Edit: I used the hint given By lab bhattacharjee. I expand the inverse functions and I got $$\lim _{x \to 0} \left[\frac{2}{x^3}(\sin^{-1}x - \tan^{-1}x )\right] =1$$.  Now I think it remains to find the value of $\lim _{x \to 0}e^{f(x).g(x)}$ where $f(x) = \left[\frac{2}{x^3}(\sin^{-1}x - \tan^{-1}x )\right]$ and $g(x) = 2/x^2$


I am really struggling to create a multi line equation that incorporates both a matrix and a single equation that lines up the equals signs such as the one below:    So far have done the following:  \begin{equation*}     M =  U\Sigma V^{*} \end{equation*} \begin{equation}              = \textbf{U}\left[ \begin{array}{cccc}       \sigma_{1} & 0 & \ldots & 0\\      0 & \sigma_{2} & \ldots & 0\\      \vdots & \vdots & \ddots & \vdots\\      0 & 0 & \ldots & \sigma_{m}\\         \end{array} \right]\textbf{V*} \end{equation}


I've done some search in Internet and other sources about this question. Why the name ring to this particular object? Just curiosity.  Thanks.


I am about to purchase the Alienware m15 r3, and I usually dual boot all my computers, but I have seen some people experience some difficulties while trying to install ubuntu on an Alienware, and I haven't seen any posts about the new Alienware, has anyone install ubuntu on the Alienware m15 r3? If so, can you share what resources, problems you had, and the steps you followed? Thanks!!


Kubernetes ImagePullBackOff caused by no space left on device

I have this weird error on my Kubernetes test cluster. I'm running Kubernetes 1.7.0 and docker Docker version 1.12.6, build 78d1802  I have a separate volume mounted as /dockerdata and symlinked /var/lib/docker into this volume. I have ample space available on both my system volume and the dockerdata volume (more than 50% free). I still get ImagePullBackOff errors from kubernetes, the detailed error is:  Failed to pull image "<redacted>": rpc error: code = 2 desc = failed to register layer: ApplyLayer exit status 1 stdout:  stderr: open /usr/share/man/es/man1/fakeroot-sysv.1.gz: no space left on device.  If I manually clean up by removing stale images I can get around this, but as far as I can see I shouldn't have to - since none of my volumes are nearing full capacity (which I guess is also why the Kubernetes GC doesn't kick in).  I'm guessing there's something I don't understand about how Docker works in relation to local disks but I'm stumped. Any pointers appreciated.  Here's some more info: symlink info:   file /var/lib/docker /var/lib/docker: symbolic link to /dockerdata    df Filesystem     1K-blocks     Used Available Use% Mounted on udev             2014736        0   2014736   0% /dev tmpfs             404520    44628    359892  12% /run /dev/xvda1      20263528  4121240  16125904  21% / tmpfs            2022600        0   2022600   0% /dev/shm tmpfs               5120        0      5120   0% /run/lock tmpfs            2022600        0   2022600   0% /sys/fs/cgroup /dev/xvdb       51475068 18385324  30451920  38% /dockerdata tmpfs             404520        0    404520   0% /run/user/1000    lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 16.04.2 LTS Release:    16.04 Codename:   xenial


Cutting a circular hole in a hollow cylinder without distorting the cylinder

Whenever I try to cut out a circular hole in either a cylinder or sphere the polygons around the circular hole always have distorted normals after smoothing. Is there anyway to fix this. I've tried using the remesh modifier but wind up with some pretty ugly results.


I'm freshly installed Cairo-Dock in Ubuntu 14.04.when i use key combination Alt+Tab Cairo-Dock also shows up its own window switcher overlapping with Unity window Switcher.  How can i Disable these window-switcher in Cairo-Dock ?


Javascript: How to trim an editable div content

I have an editable div in which users write text for comment. Now I want to remove space before and after the text. For example when a user type   "&nbsp;&nbsp;Hello&nbsp;world&nbsp;&nbsp;&nbsp;"   I have to insert   "Hello&nbsp;world"    into the database.  I have tried   text.trim()   but it doesn't work. How can I do this ?  Also how to remove duplicates empty line ?  I would like to replace
Hello

World
   By
Hello

World
   Thank you


Paired Samples T-Test by Day or By Group?

I am trying to test the impact of a sale initiative on store revenue. I have created 10 matched pairs of stores and then randomly distributed one store in each pair into a test or control group.  I then ran the sale for 21 days within the test group (keeping control constant) and measured relative lift in revenue compared to baseline.  My questions  1.) Should I be using a paired t-test based on the previous store matching  2.) Should I be measuring across each day of the test such as:          Control Test 1/1/2017    4   3 1/2/2017    3   4 1/3/2017    1   3 1/4/2017    2   3 1/5/2017    2   4 1/6/2017    1   7   Or measuring across my paired markets such as:                 Test Control Market Pair 1   10  5 Market Pair 2   8   3 Market Pair 3   5   1


BME Jobs in Industry: Do you need a PhD or Masters?

As an incoming Senior, I am currently having the debate that many before me have had: Masters, or PhD?  I'm a biomedical engineering student who wants to get an advanced degree to better position myself for high-end R&D and engineering jobs in industry. From what I've gathered, it seems like a Masters can do the trick, though getting a PhD may put me in an even better position. BME seems to be different than other fields when it comes to advanced degrees. It seems to me that the PhD's have more opportunities than Master's upon graduation in the BME field.   So if I ignore all factors, and want to maximize my chances of doing high-end R&D engineering at a good medical imaging company, it seems that PhD is what I should get.   However, here are some considerations that I have.   1) The time and effort required for a PhD is significant. A PhD in BME takes a longer time than average, and is quite difficult. I don't quite enjoy the idea of entering the workforce at the age of 27.   2) However, PhD's are funded fully, so there appears to be no financial burden/debt (apart from the fact that I won't be earning like my Bachelors/Masters counterparts during my PhD years).   3) PhD programs are harder than Masters programs to get in to. I believe I could get into a top tier university for a Masters program, but not a PhD program.  4) Masters requires less time and effort, and seems to get me qualified for more jobs than a bachelor's.   5) A Masters, however, may not qualify me for the high-end R&D that a PhD might.  6) I may be wrong, but funding for Masters programs is limited. I could obtain significant debt.   Number 6 is a big problem for me. Do Masters students incur debt, or do they generally get enough funding to get by? I read in a lot of top universities that no guaranteed funding is available like there is for PhDs, but TA and RA positions may be available. How common is it for Masters students to get such positions?  If Masters students do get funding, then my plan is to enter into a Masters program (hopefully at a top 15 BME program), and apply for jobs at the end of my degree. If I get good opportunities, I'll take them, otherwise, I might apply for a PhD program. (I am worried about one thing; does this extend the amount of time it'll take for me to begin work? Or can I apply the work I've done in my Masters towards my PhD?).  However, if Masters students do not get enough funding, and I could incur debt, my idea was to apply to PhD program and potentially opt out with a Masters if I can get good job opportunities, or if my PhD is too challenging. How frowned upon is doing this (I would imagine that my advisor couldn't be too pleased)?  Any advice would be appreciated! I want to know if my assumptions are reasonable, and if my plans are reasonable as well!


I heard the standard interpretation of Heisenberg Uncertainty Principle: Just the measurement affects the position of the body because always you want to see a body (=to measure the position), you need a light - and only the fact that photons that strike the surface of that radiating body have momentum mean that the position of the radiating body isn't certain (even theoretically) only because of your measuring - and therefore the uncertainty in position will always be non-zero. Is there some possible way to modify this model to apply always in quantum mechanics? If no, is there some good model what describes the origin of the uncertainty?


How do I remove login credentials (emails or OpenIDs) from my account?     For more information, see "" in the .


Fermat's little theorem's proof for a negative integer

I'm in the process of proving Fermat's little theorem.     For a prime integers $p$ we have $a^p \equiv a \mod{p}$   I proved it for a non-negative $a$, not I need to generalize the case to an arbitrary $a \in \mathbb{Z}$. That is, I need to prove that give a negative integer $a$ we have $a^p \equiv a \mod{p}$ using the fact that it is so for a non-negative $a$.


What are the criteria for degree revocation?

I was awarded a degree from a reputable college or university. For what reasons could my degree be revoked after the fact? Should I be worried? Note to readers: This is a special community wiki 'canonical' question that aggregates advice on a frequently-asked question. See . Please feel free to edit this question to improve it. Each answer here relates to a different criterion which may (or may not) lead to degree revocation. If you have a new possible criterion, please add an answer. If you have more information about an existing criterion, please edit the existing answer.


I am trying to return certain variables about the salary based employees from a txt file and the code will compile but not print out.  This is what I currently have done in my project:  public class PayrollPreparation {      private File source;     private Scanner input;     private String payrollType;     private int employeeID;     private String employeeName;     private int hoursWorked;     private double payRate;     private double straightPay;      public void printEmployeeData() {         System.out.println("Employee ID         Name        Hours Worked        Pay      Amount");          try {             source = new File("Payroll.txt");             input = new Scanner(source);             input.useDelimiter("[,\n]");         } catch (Exception e) {             System.out.println(e);         }          while (input.hasNext()) {             if (payrollType.equals("S")) {                 employeeID = input.nextInt();                 employeeName = input.next();                 hoursWorked = input.nextInt();                 payRate = input.nextDouble();                 payrollType = input.next();                 straightPay = (hoursWorked * payRate);                  System.out.println(" " + employeeID + "           " + employeeName                         + "                                                "                         + hoursWorked + "       " + straightPay);                  input.nextLine();             }         }         System.out.println("No More Salaried Employees.");     } }   The code all compiles but when tested there is an error with the if statement and it says java.lang.NullPointerException: null


Ridge regression results different in using lm.ridge and glmnet

I applied some data to find the best variables solution of regression model using ridge regression in R. I have used lm.ridge and glmnet (when alpha=0), but the results are very different especially when lambda=0. It suppose that both parameter estimators have the same values. So, what is the problem here?   best regards


I want to protect database from SQL Injection. How can I use PDO or mysqli mysql_real_escape_string in this code. MY PHP Version is 5.6.36    public function LoginUser($email, $password)   {      /*      * echo $password= addslashes("$password"); die;      */     $sql = "SELECT ref,firstname,contact,email,parent_id FROM `pro` where passe=password('$password') and email='$email' "; // or login='$email'     $result = mysql_query($sql);     return $data = mysql_fetch_assoc($result);   }


Prove $2^k+1$ divisible by 3 iff $k$ is odd number.  Since I need to prove both direction looks like if I need to prove it's divisible by 3 it's by induction and the other side by congruence..am I right? is there a better wat than induction? and we I still can't prove both direction... any hints?


I've got the problem that my little sister got an virus on my laptop, so I had a BSoD all the time, he didn't even boot windows. After a lot changes windows booted and all my data was there too, but now regulary I'm getting a new blue screen. Every time a other error. I think it's an virus who infects all my dll's. I can't even start programs like Firefox... need help how to solve that... can't open anti virus program - seems infected too, on reinstall I got BSoD again and crash... My local time changed too. Got Windows 10 Pro 64x Thank you


Deleting a specific file from inside a tar file

I have to delete the files which are zipped and then stored in .tar format. I Have to untar the files then delete the files which name includes XXX, YYY or ZZZ. There are more than thousand of .tar files and each .tar file contains hundred of .zip files.I need a script which can do this.


What's the difference between will do and will be doing?

College officer wrote me: you will be receiving a new letter... Why didn't he write "you will receive"?  In addition, what is the difference between "I will wait" and "I'll be waiting"?


What cheat codes exist for Goldeneye Wii?

I just recently found out about the cheat codes for this game, and the sites I've viewed have three listed:      NotIt!!!11  Inv1s1bleEv3ryth1ng  <477MYFR13NDS4R3SP13S>   Does Goldeneye Wii have any other cheat codes?


Black artifacts when looking through many transparent objects?

Using v2.73, cycles and a very simple scene: an array of cubes, no big deal.   If I set the shader's material to transparent, the cubes in the foreground do become transparent but those far away in the back do not disappear completely and this strange dark things appear (visible in rendered mode and in final renders)    I've played with the clipping distance on the viewport and camera, but I can't figure out how to make those ghosts go away...


I am working with population data organised in parish units for the whole of Denmark. Many parishes are very small (ie <500 inhabitants compared to a median of around 1500) so I plan to merge these with the next largest adjacent parish. I am working with shapefiles and can manually merge the polygons using QGIS, but with over 1000 small parishes, it would be nice to be able to automate this process! Any suggestions as to how - in QGIS or other software (I also have access to ArcInfo)?


Find the minimun value of $P(X=0)$ for non negative integer values of $X$.

Consider a non-negative integer random variable $X$ which satisfies $\mathbb{E}[X]=1, \mathbb{E}[X^2]=2, \mathbb{E}[X^3]=5$. Find the minimun value of $P(X=0)$. I managed to show that $$Var(X) = \mathbb{E}[X^2]-\mathbb{E}[X]^2=2-1=1$$ but then I'm stuck. Any hint?


How to change "and" in Bibliography to Icelandic "og" in Overleaf

I´m writting my thesis in icelandic on Overleaf. The English references with more than one authors in the bibliography are automatically with "and" instead of icelandic "og", is it possible to use newcommand or something to change it on Overleaf? see example here:   @incollection{wals-36,   address   = {Leipzig},   author    = {Michael Daniel and Edith Moravcsik},   booktitle = {The World Atlas of Language Structures Online},   editor    = {Matthew S. Dryer and Martin Haspelmath},   publisher = {Max Planck Institute for Evolutionary Anthropology},   title     = {The Associative Plural},   url       = {https://wals.info/chapter/36},   year      = {2013} }  Daniel, M. and Moravcsik, E. (2013). The associative plural. In Dryer, M. S. and Haspelmath, M., editors, The World Atlas of Language Structures Online. Max Planck Institute for Evolutionary Anthropology, Leipzig.   Here´s beginning of the document(deleted parts which are not related to the question):  \documentclass[12pt]{article} \usepackage[icelandic]{babel} %\usepackage[utf8]{inputenc} %\usepackage[T1]{fontenc}  \usepackage{setspace} \usepackage{natbib} \usepackage{url} \usepackage{gb4e}  \bibliography{heimildir} \bibliographystyle{apalike}


How can I make Notepad++ default program for `.txt` files?

I would like .txt files to open with Notepad++ by default in Windows 10. I have found the options to change file associations but there is no option to specify custom programs. Here's a screen shot:    How can I make Notepad++ default program for .txt files?


Prove that limit of the fractional part of $\sqrt{n^2+n}$ is $\frac{1}{2}$

Prove that $$\operatorname{frac}(\sqrt{n^2 + n}) \to \frac{1}{2}$$ ($n \in \mathbb{N}$, $\operatorname{frac}$ is fractional part of number)  I think I should use just definition of limit and find $N$ for all $\varepsilon > 0$.


Gmail stop redirecting me to Google Inbox

I access my Gmail account from Firefox and when I log into gmail.com, my account seems to redirect to Google Inbox (inbox.google.com) rather than the Gmail (mail.google.com) interface I want to see and that I thought was the default.   I have been unable to find anything in the settings to stop this behavior.  Any ideas?


What I try to do is to bind an onchange event to an element which is not appended. But this is what I tried:    var $container = rule.$el.find('.rule-value-container');   var html = `<input class="form-control" type="number" name="${ name }_0" step="any" min="0">`;    console.log($(html));   $(html).on('change', function(e) {     console.log('test', e);   })    $container.html('');   $container.append(html); }   But this is not working how can I bind an on change event to an element which is not appended yet?


I want to sort a list of objects of a class by 2 ways. I am able to do custom sort by overwriting the compareTo method.  But I have two lists and I want to sort them differently.  Can I still accomplish this by calling the list.sort() method?  global class myClass implements Comparable{      public integer Total{get;set;}     public integer numOfDays{get;set;}      global Integer compareTo(Object compareTo) {         myClass compareToEmp = (myClass)compareTo;         if (Total == myClass.Total) return 0;         if (Total > myClass.Total) return 1;         return -1;             } }   In the above example, how can I also be able to sort by "numOfDays"?  //UPDATE:  I actually wanted to sort list by single property.   But use different properties to sort different lists.  I ended up adding a new field to my class for sorting purpose.  global class myClass implements Comparable{      public integer Total{get;set;}     public integer numOfDays{get;set;}     public boolean isA {get;set;}      global Integer compareTo(Object compareTo) {         myClass compareToEmp = (myClass)compareTo;         if(isA){          if (Total == myClass.Total) return 0;         if (Total > myClass.Total) return 1;             return -1; }         else{              if (Total == myClass.numOfDays) return 0;         if (Total > myClass.numOfDays) return 1;             return -1;          }            } }


Whats the difference between installing a desktop from iso and apt-get?

So lets say I want to install Xubuntu. I can either go to their website and download an ISO, flash it to a memory stick and do an install, one of the options of which allows me to keep all my files and programs.   Or, I can type sudo apt-get install xubuntu* which will install all the xubuntu packages. What is the difference in what I get by these two methods and why?


My teacher was explaining how sometimes a comma isn't enough to make a sentence correct, and that sometimes you have to use a semicolon. I am having trouble figuring out when you should use which.   Can someone please explain?


How to increase the Space between two Edge Loops?

I created two edge loops and during creation (or after) I want to move them apart. I can move them together during creation but I wanted them a certain distance from the existing edges on either side of the newly created edge loops.


I have 2 known positive integers, $a$ and $b$ . Is there a ' standard ' formula to find the lowest (if possible) positive integers $x$ and $y$ , so that the following is true?     $$xa = yb + 1$$


How do you get rid of film grain in a render? I made the sampling high enough and I just want to get rid of the film grain and make the pixels look smooth.


I'd like to know a reference for a simple proof that $\{c_\mu\mid \mu\vdash n\}$ is a basis for the centre of the symmetric group algebra $\mathbb{C}\mathfrak{S}_n$, where $c_\mu$ is the sum of all elements of a given cycle type (i.e. the sum of every element in the conjugacy class corresponding to $\mu$).


How do I apply the texture paint to a specific object?

I am new to Blender and I am using Blender 2.8. I want the texture paint that I created to apply only to the character's jacket but it's applying to the entire body. How do I fix that?


Why didn't the dwarf women have beards in The Hobbit - An Unexpected Journey?

I may have missed it with the 3D, but I could have sworn I saw what I suspect was a lady Dwarf or two running from the Erebor in the beginning of the Hobbit, but they didn't seem bearded.    If dwarf women aren't bearded, then was Aragorn just kidding in the Two Towers (movie) when he intimated that they all had beards?    It's also stated by Tolkien in appendix A to The Lord of the Rings that female dwarves appear identical to males and we can assume they are also born with beards, just like their male counterparts.


I've been searching the documentation for this, without much luck so far. In particular I'd like to convert an Id to a 18-char string, and ideally read about that in documentation to verify its the recommended approach.  I've seen various approaches including  String str = '' + someId;   Is this the same as   String str = (String)someId;    I've also seen   String str = String.valueOf(someId);   However when I tried that I got 15-char strings! Why is that?!  What is the recommended approach to always guarantee an 18-char string from an Id?


Why do users erase all the password when they hit one wrong key, instead of just the last wrong character?

We login to applications almost every day. The password is stored in our fingers, as an automated process (if they have used it long enough). When users realize they have entered a wrong character (before hitting login-button) they erase the whole password, and retype the entire password – instead of just the last wrong character. Question is why?         – Wireframes created with


Related to    On  I used ```makefile and it is "working" the highlighting:     However, on , I am also using ```makefile and it is not working the highlighting:       Where is the list of language names supported by the markdown fenced code blocks? Is makefile one of them? Perhaps it is called Makefile? makemake? toktok?   The documentation on  does not say it either.


How to open a particular port in ubuntu?

My SoulSeek client Nicotine+ checks my open ports during initial configuration and promts that the one port number it needs is closed, cutting me off frmo about 50% of the users. Is there anyway I can open that particular port for the application to use?  RUnning ubuntu desktop 13.04. I have not manually installed any firewalls, but not sure if its included in the default installation.


This doubt is hitting me since 2-3 days, so I decided to test it myself. What I did is I installed Ubuntu 16.04.4 in VMWare and edited /etc/apt/sources.list and replaced xenial with bionic using:  sudo sed -i 's/xenial/bionic/g' /etc/apt/sources.list   Then I ran  sudo apt-get update && sudo apt-get upgrade    I was able to upgrade to 18.04, confirmed by using lsb_release -a. However, I encountered some problems like:   apt does not have a stable CLI interface. Use with caution in scripts. unmet dependency of  python3-aptdaemon.pkcompat Release 'bionic-backports' for 'appstream' not found Broken Unity   I solved all the errors and installed gnome and gdm3.   So, I just want to know is it a good idea to edit sources.list? I know that my system might broke but is there any other specific reason not to use this.  Note: I tested this on Ubuntu 16.04 in VMWare to clear my doubts only.


Why does rounding up of the number doesn't work here?(python)

for _ in range(3): sec=sec+1.3 round(sec) print(sec)   I am working on a GUI/ML project and i ran the above simple snippet.I have to display the number in the GUI(pyqt5) but the output is all messed up.Here is the output that i got.(sec=0 at the start obviously)   1.3 2.6 3.9000000000000004   Questions:-   Why is the output 3.9000000000000004??Why the anomaly?? I have tried multiple ways to round up the number like ....but nothing works!! How can i round this upto 1/2 decimal places???


How to apply style to HTML subdocuments?

I tend to apply my own custom CSS documents to certain sites, since I prefer dark backgrounds with light text as opposed to the vice-versa standard, and very few sites have a "dark mode" or otherwise cater to that preference, this site itself being an excellent example.  However, I was recently stricken by something odd - an entire HTML document nested inside of another one. (I now understand this is achieved via use of an <iframe> and so it's nearly impossible to style without JS or something) I can only apply the custom stylesheet to the parent document, though.  So, long story short, I'm wondering what sort of selectors I would have to use to target elements of the nested document only - for example, selecting the <body> of the nested document. Would I refer to a body in a html in a !DOCTYPE that is also in a body? What about recursively nested documents?  Whether this nesting thing is poor practice or not does not immediately concern me -- there seems to be a valid use case for it and, regardless, I'm not building the site. What I DO care about is how to add styles to it externally.


Blocking directory listing on a wamp server

So I have a website that runs through wamp however if you type a path in the address bar, you get an index of the directory, which I don't want  I have already tried to add a .htaccess file in the directory to stop it indexing (saying IgnoreIndex *) and went into the apache httpd.conf file and changing  Include conf/extra/httpd-autoindex.conf   to:  # Include conf/extra/httpd-autoindex.conf    however none have worked... I have tried restarting my server, restarting services, but nothing... Help?


Proof $\sum_{k=1}^n (-1)^{k+1} \binom{n}{k}\frac{1}{k} = H_n$ by induction

I found interesting task: Calculate $$\sum_{k=1}^n (-1)^{k+1} \binom{n}{k}\frac{1}{k}$$ I have calculated some first values and I see that it is $H_n$. I found  tip that it can be solved by induction or by "integral" trick by considering $\sum_{k=1}^n(-1)^k{n\choose k}x^{k-1}$ I don't know what is that trick so I decided to solve it by induction.  Let $S_n = \sum_{k=1}^n (-1)^{k+1} \binom{n}{k}\frac{1}{k} $ $$ S_1 = 1 = H_1 \text{ ok.} $$ $$S_{n+1} =  \sum_{k=1}^{n+1} (-1)^{k+1} \binom{n+1}{k}\frac{1}{k}  = \\ -\sum_{k=0}^{n} (-1)^{k+1} \binom{n+1}{k+1}\frac{1}{k+1}$$ but I have problem with use induction assumption. $$-\sum_{k=0}^{n} (-1)^{k+1} \binom{n}{k}\frac{n+1}{(k+1)^2} = \\ -(n+1)\sum_{k=0}^{n} (-1)^{k+1} \binom{n}{k}\frac{1}{(k+1)^2}$$ but know I have $\frac{1}{(k+1)^2} $ instead of something like $\frac{1}{k}$


I looked up several tutorials on how to install and they dont work. I do everything correctly but then i get this:     The file   '/home/mike/Downloads/minecraft.jar'   is not marked as executable.  If this   was downloaded or copied from an   untrusted source, it may be dangerous   to run.  For more details, read about   the executable bit.   I run the minecraft.jar with the Sun java runtime 6 but it doesnt work:/. Any help would be greatly appreciated!


Bijection between $2^{\mathbb R}$ and $\mathbb{ R ^ R}$

I'm well aware of the standard proof based on cardinality arithmetic to show that these two sets have the same cardinality and the question of defining a bijection between the two sets came up. I worked on it a little while and was wondering if there were any gaps, or a simpler method of coming up with such a bijection.   The main idea I had was to take a family of sequences indexed by the real numbers. So that each one of these sequences corresponds to a unique real number. Then I can map each one of these sequences to another number, by applying the binary function from $\mathbb R$ to $\{0,1\}$ and mapping the infinite binary sequence to a real number, use one of the standard bijections.  First let $E$ be a family of sequences indexed by the real numbers. Such that $E_{xi}\neq E_{yj}$ for all $x,y \in \mathbb R$ and $i,j \in \mathbb N$ also with the property that  $\mathbb R= \bigcup_{x \in \mathbb R, i \in \mathbb N} E_{xi}$.   What sort of theorems would I need to prove such a family existed, is it enough to note that the reals can be represented as a uncountable union of countably infinite sets?  Also let $P: 2^{\mathbb N} \rightarrow \mathbb R$ be you favorite bijection.  Now consider an element of $2^{\mathbb R}$ as a function $f: \mathbb R \rightarrow \{0,1\}$ and $g \in \mathbb{ R^R}$ in a similar manner. Then our bijection between the two sets will be the function $\Phi$ which maps $f$ to a function $g$, such that $g(x)=P(F(E_x))$ where $F$ applies $f$ to each element of the sequence $E_x$.   I'm fairly sure this is an onto and one-to-one function. The one-to-one property should follow because the sequences are disjoint, cover $\mathbb R$ and $P$ is a bijection. The onto argument is a little hazier, but it should be possible to recreate the function $f$, by first inverting each element with $P$ and then defining $f$ based on these sequences.


Where are Time Machine local backups/snapshots stored?

Out of curiosity, I'm wondering where in the file system Time Machine stores its local backups/snapshots.


Can "since" and "for" be used interchangeably?

Example:     I had no idea how deep the forest really was, though the people around   often used the word endless to describe it. And I believed that was   the case, for I'd never seen the end of it, not even   standing from the tallest balcony.   Will the meaning change if I use since, instead? I'm not sure why, but I feel using for will make the passage sound a bit "dated"?


Why the expression "put on the socks" grammatically correct?

I know, this seems so natural, but what's the logic behind this?  Is there any difference between the above and....  Put the socks on  This one seems more right to me....cause I think it's an elliptical expression.   Complete meaning can be: put the socks on your feet.  But when I try seeing the initial one like this....I don't get able to do that.  How did the use of the first expression begin and how did it evolve?


Invariance of canonical Hamiltonian equation when adding the total time derivative of a function of $q_i$ and $t$ to the Lagrangian

The following is exercise 8.2 in 3rd edition (and exercise 8.19 in 2nd edition) of Goldstein's Classical Mechanics.   Adding the total time derivative of a function of $q_i$ and t to the Lagrangian will not change the the Euler-Lagrangian equation. So if we make the following change to Lagrangian,   $$L'(q,\dot{q},t) = L(q,\dot{q},t) + \frac{dF(q_1,q_2,...,q_n,t)}{dt}$$ we can get  $$ \frac{d}{dt}\frac{\partial{L'}}{\partial{\dot{q_i}}} - \frac{\partial{L'}}{\partial{q_i}} = 0 $$ from  $$ \frac{d}{dt}\frac{\partial{L}}{\partial{\dot{q_i}}} - \frac{\partial{L}}{\partial{q_i}} = 0 $$  How can we get the corresponding Hamiltonian equation part? This is to prove  $$ \dot{p'_i} = \frac{\partial{H'}}{\partial q_i} $$ $$ -\dot{q_i} = \frac{\partial{H'}}{\partial p'_i}  $$  from   $$ \dot{p_i} = \frac{\partial{H}}{\partial q_i} $$ $$ -\dot{q_i} = \frac{\partial{H}}{\partial p_i}  $$ where $p'_i = \frac{\partial L'}{\partial \dot q_i}$.  Edit  The corresponding $H'$ is $$ H' = \sum_k{p'_k \dot{q_k}} - L' $$ where $p'_k = \frac{\partial L'}{\partial \dot q_k}$.


Proving $f(C) \setminus f(D) \subseteq f(C \setminus D)$ and disproving equality

Let $f: A\longrightarrow B$ be a function.   1)Prove that for any two sets, $C,D\subseteq A$ , we have $f(C) \setminus f(D)\subseteq f(C\setminus D)$.  2)Give an example of a function $f$, and sets $C$,$D$, for which $f(C) \setminus f(D) \neq f(C\setminus D)$  First time exposed to sets.. how would I go about proving this? What assumptions should I make?


SQL Server Convert integer to binary string

I was wondering if there was an easy way in SQL to convert an integer to its binary representation and then store it as a varchar.  For example 5 would be converted to "101" and stored as a varchar.


"This question have been asked before and already has an answer" duplicate of a future post?

I've seen the behavior on occasion and are a bit curious of the ruling. How can a post be marked as a duplicate of post which wasn't there at the time of the original post? The most recent example I've seen is this:    Posted February 12 and marked as a duplicate of    Posted March 14.  I'm told its because the second post had better answers. I'm curious if this is correct. Shouldn't the answers on the later question be merged to the first one, which is the original one?


Why local value is changing after updating hashmap

I don't understand why after getting value from hashmap and updating hashmap, the local value changing at updated value. I always thought that java works on pass by value not by reference. @Component @RequiredArgsConstructor public class ParametersCompare {      @NonNull     private final ParameterRepository parameterRepository;      public boolean isAnyChange(String object, List<Parameter> currentParameter) {         Map<String, String> parameterHistory = parameterRepository.getHistoricalParameter(object);         parameterRepository.updateParameters(currentParameter, object);         return isAnyChange(parameterHistory, currentParameter);     }   @Service public class ParameterRepository  {      private final Map<String, Map<String, String>> oldParameters = new TreeMap<>();      public void updateParameters(List<Parameter> currentParameters, String object) {         Map<String, String> oldParameters = this.oldParameters.computeIfAbsent(object, s -> new HashMap<>());         updateParameters(currentParameters, oldParameters, object);     }      public Map<String, String> getHistoricalParameter(String object) {         Map<String, String> currentParameters = this.oldParameters.get(object);         if (object == null) {             return Collections.emptyMap();         } else {             return currentParameters;         }     }       private void updateParameters(List<Parameter> currentParameters, Map<String, String> oldParameters, String object) {         currentParameters.forEach(parameter -> oldParameters.put(parameter.getName(), parameter.getValue()));         this.oldParameters.put(object, oldParameters);     } }  After line parameterRepository.updateParameters(currentParameter, object);  oldParameters is changing to variable received from currentParameter. Thanks in advance for pointing why is changing. best regards


If $A$ with a size of $n\times 200$, does the inverse of $AA^T$ always exist?

For the matrix, $A$ with a size of $n\times 200$, does the inverse of $AA^T$ always exist? It is clear that if $n>200,$ $AA^T$ could not be inverse by the argument of the rank of $AA^T$. But how about the $n=200$ or $n<200$?


Removing zombie process from the process table

Can somebody please explain when parent process receives the exit status of a dead child process via wait, who actually reallocates the memory of the child process and removes it from the process table?


Linux Equivalent of Windows Ctrl to show Mouse Pointer

In Windows, it is possible to set pressing Ctrl to display the current location of the mouse pointer, as per .  Is there a way of setting a key or key combination to perform the same action in Ubuntu? Note, this is the opposite of turning this function off, as detailed at .


ElGamal Signature Scheme: Recovering the key when reusing randomness

Show how if Alice uses the same value of $k$ to sign two different messages $m_1$ and $m_2$, using the ElGamal signature scheme, Eve can recover the value of $a$ from the corresponding signatures $(m_1, r_1, s_1)$ and $(m_2, r_2, s_2)$. (Note: you are allowed to assume that if $\gcd(a, n) = d$ then there are $d$ solutions to the congruence $ax \equiv b \pmod n$.)     ElGamal Signature Scheme:      Key Gen:      Compute $y = g^x \;\bmod p$.      The public key is $(p, g, y)$. The secret key is $(p, g, x)$      Signature Gen:      Choose a random $k$ such that $0 < k < p − 1$ and $\gcd(k, p − 1) = 1$      Compute $r = g^k \;\bmod p$ and $s = k^{-1}(m – xr) \;\bmod{p-1}$   Thoughts: So far, I can tell that $r_1$ and $r_2$ are equal and $s_1$ and $s_2$ are closely related since the only variation is $m$.  We can relate the two equations for $s$, by solving them for $-xr$:  $$s_1k - m_1 \equiv s_2k - m_2 \pmod p$$  $$(s_1 - s_2)k \equiv m_1 - m_2 \pmod p$$  Let $a = s_1 - s_2$, then we know from the question that for $\gcd(a, n) = d$ there are $d$ solutions for $k$.  Now the forger can compute $g^k$ for each solution to k, until $r$ is found.  Then compute $xr \equiv m_1 - ks_1 \pmod{p-1}$  There are $d' = \gcd(r, p-1)$ solutions for $x$.  The forger can compute $g^x$ for all the $x$s found until she finds $y$.  Once she has $y$ she knows the proper $x$ which can be used to find $m_1$ and $m_2$.  How does this look?


What character growth happens beyond level 20?

Level 20 is shown to be the level cap. So does getting 30000 XP for the epic boons or added ability scores implement into character's statistics such as max prepared spells or max health increase?   For example a 20th level Wizard with 20 intelligence can prepare a maximum of 25 spells.  After gaining 30000 XP would that wizard be considered level 21 and get 26 maximum spells?


ubuntu is not opening only blinking line on booting

It only seems the blinking line on desktop and Ubuntu software is not opening  i just updated using terminal then it is not opening


Why doesn't an answer show up as having been edited if it has been replied to within the grace period?

I asked a question earlier and I received a reply with a minute of posting. It didn't answer my question and I replied to state why it did not answer my question. Within that period someone else had also replied.  The answer was then edited several times but the "edited [time] ago" didn't appear because it had been edited within the grace period. This now meant that the replies looked crazy and irrelevant.  Unfortunately the answer has since been deleted from the thread so I cannot link it to demonstrate.    I didn't know users with 10k rep can see deleted posts. So here's the thread:


According to my knowledge, heat is nothing but the result of the vibrations of atoms and molecules. I guess this mean that in heating up a gas or liquid, we are increasing the rate at which the container of this gas or liquid vibrates, thereby imparting to the molecules a certain amount of energy.  How would this work in case of a burning log in the fireplace? Is it vibrating and thus heating up the molecules in the room? Or is it releasing highly energetic photons that do the required bombarding? What exactly is happening when we light a fire?


I'd like to install Ubuntu 13.04 on Lenovo g580 and I have this issue. After a few seconds of booting liveUSB screens gets black and nothing happens. I've read somewhere about connecting second screen to solve similar issue. Of course this didn't solve it, but it provided something like terminal with     initramfs>   and few basic commands ..  Is it possible to install Ubuntu on Lenovo g580 hardware? I also checked  Ubuntu 12.04: failed  Mint 13: SUCCEED (x32 and x64)  Is it because of drivers? Of course I want Ubuntu instead of Mint. :)


Fatal error: Call to undefined function add_action() - an untouched problem

The question was asked many times in many ways, but unfortunately is not covered well in most of the answers. I'm having the same issue doing things using include-files.  In my TwentyFourteen child theme's functions.php I used:  require_once get_stylesheet_directory_uri() .'/admin-panel/theme-options.php';   And I'm using . I've used it in many of my projects, the same way mentioned here, without having the error. But recently I'm having the issue in several of my projects. If I take the code to functions.php then everything's fine. But it's occurring only when I'm trying to include/require external file.  I'm having the error:     Fatal error: Call to undefined function add_action() in C:\xampp\htdocs\project\wp-content\themes\my-theme\admin-panel\theme-options.php on line 2   In this case I'm having the error using a child theme (of T14). But even in one of my parent theme I'm facing the issue. But in the same environment my other projects are running well with all the includes and/or requires (where several add_action()s are defined). I'm having issues in ALL the add_action() calls, like CPT assigning, Custom Taxonomy assigning etc. But I'm successfully developing another two projects including external files from inc/ folder where all my CPTs are assigned and their meta boxes too.  I tried reinstalling WordPress, deactivating all my plugins, tried from Child Theme, tried only the same thing by modifying TwentyFifteen (applying default theme), tried require(), require_once(), include(), include, require_once, and require one after another with failure. And I'm using WP 4.1.1 in all the good and problematic installs.  Majority of the previous questions are answered with a simple line:     As the message says, you haven defined the function add_action() and yet you're trying to use it.   But,   how come (isn't it already defined by WordPress)? and why it's differing project to project in the same environment (How come it's out of the scope now only in particular project[s])?


What is the origin of the term "ginger" for red-headed people?

I'd like to know the etymology of the word "ginger" in reference to red-headed people.  In particular, if "ginger" in this context is related to the plant root used in cooking, I'd like to know how the color red became associated with it. I am only familiar with ginger roots that do not possess any red coloring.  A quick google search yields vague and somewhat conflicting results. An authoritative answer with references would be appreciated.  Edit: Although an answer has pointed out a distinction between the term "ginger" and "red-head" in terms of physical features, there is certainly a tendency to see the term applied to people with hair that is any shade of red. I would be interested to trace the usage history of how the word ginger has been applied in that more broad sense.


Fermat Last Theorem for non Integer Exponents

We now that Fermat's last theorem is true so there are not positive integer solutions to $$x^n+y^n=z^n$$ for $n\in\mathbb{N}$ and $n>2$.  But what about if $n\in\mathbb{R}$ or $n\in\mathbb{R}^+$?


Prove that for all sets A and B, A ∩ B = ∅ implies ( A ∪ B ) - B = A

In the next proof we avail ourselves of the next lemma: For all sets A and B, ( A ∪ B ) - B = A. Proof: Let A and B be arbitrary sets and let x ∈ ( A ∪ B ) - B. x ∈ ( A ∪ B ) - B ⇔ x ∈ ( A ∪ B ) ∧ x ∉ B ⇔ ( x ∈ A ∨ x ∈ B ) ∧ x ∉ B ⇔ ( x ∈ A ∧ x ∉ B ) ∨ ( x ∈ B ∨ x ∉ B) For p ∧ ~ p ≡ F and p ∧ q ⇒ p where p and q are prepositions, ( x ∈ A ∧ x ∉ B ) ∨ ( x ∈ B ∨ x ∉ B ) ⇔ x ∈ A ∨ F By modus tollendo ponens, x ∈ A ∨ F ⇔ x ∈ A So then, x ∈ ( A ∪ B ) - B ⇔ x ∈ A And ( A ∪ B ) - B = A Therefore, the statement for all sets A and B, A ∩ B = ∅  implies ( A ∪ B ) - B = A is true trivially. Is this proof right?


Trigonometric limits without derivatives

How would one derive $\lim_{x\rightarrow0}\left(\frac{\sin(x)}{x}\right)$ without using any derivatives?


How do I get started playing Dungeons and Dragons 4th edition by myself?

I've been wanting to start playing D&D for some time, and I was wondering how I could get started by myself with relative ease. I own the first two player handbooks, and a set of dice.


Curve through a sequence of points with Metapost and TikZ

This question led to a new package:      I found Metapost best for drawing complex smooth curves (i.e., Bezier, splines), since you do not have to directly specify Bezier control points. Unfortunately, I need to use TikZ for my current project exclusively; drawing (closed) curves in TikZ is tedious and very time-consuming task. So I combined the "power" of Metapost with TikZ into the following workflow:   Draw closed curve in Metapost. Open the generated Postscript file in a text editor and manually extract control points. Paste extracted points into a TikZ figure and modify the PGF/TikZ expressions to draw curve.   Pasted below is a reproducible example to illustrate the described approach.  %% Construct curve in Metapost beginfig(1)   draw (0,0) .. (60,40) .. (40,90) .. (10,70) .. (30,50) .. cycle; endfig; end  %% Extract control points from postscript file newpath 0 0 moveto 5.18756 -26.8353 60.36073 -18.40036 60 40 curveto 59.87714 59.889 57.33896 81.64203 40 90 curveto 22.39987 98.48387 4.72404 84.46368 10 70 curveto 13.38637 60.7165 26.35591 59.1351 30 50 curveto 39.19409 26.95198 -4.10555 21.23804 0 0 curveto closepath stroke  %% Create Tikz figure in pdfLaTeX \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=0.1]  \draw (0, 0) .. controls (5.18756, -26.8353) and (60.36073, -18.40036)    .. (60, 40) .. controls (59.87714, 59.889) and (57.33896, 81.64203)    .. (40, 90) .. controls (22.39987, 98.48387) and (4.72404, 84.46368)    .. (10, 70) .. controls (13.38637, 60.7165) and (26.35591, 59.1351)    .. (30, 50) .. controls (39.19409, 26.95198) and (-4.10555, 21.23804)    .. (0, 0);     \end{tikzpicture} \end{document}   This approach works if you have to draw a curve or two, but becomes tedious with more curves. I wonder if there is a simpler way which avoids manual copy-paste repetitions from file to file? Maybe the most elegant solution should be a simple C/C++/... program, but I cant't find the implementation of  used by Metapost to calculate Bezier control points. Any ideas would be greatly appreciated.    Addition by Jake:  Here's a comparison of the path resulting from Hobby's algorithm (thick black line) and the \draw plot [smooth] algorithm (orange line). In my opinion, the result from Hobby's algorithm is clearly superior in this case.


This might be a terrible idea, but is it possible to have non-installed packages automatically installed? That is, instead of seeing this:  $ git clone ... The program 'git' is currently not installed. To run 'git' please ask your administrator to install the package 'git'   Seeing this instead:  $ git clone ... Installing package 'git' ...


The determinant of a block Matrix of Order $2n$

Let us consider the $2n \times 2n$ block matrix $$\mathbf{X} = \pmatrix{\mathbf{P} & \mathbf{Q}\\ \mathbf{R} & \mathbf{S} }$$ where $\mathbf{P} , \mathbf{Q} , \mathbf{R} , \mathbf{S}$ are square  matrices of order $n$ which commute pairwise. Show that $$\det \mathbf{X} = \det (\mathbf{PS} - \mathbf{QR}).$$  The problem in this case I am having is when none of the matrices $ \mathbf{P} , \mathbf{Q} , \mathbf{R} , \mathbf{S} $ are invertible. Any help will be greatly appreciated.


I'm seeing delays in SSH Logins. Specifically, there are 2 spots where I see a range from instantaneous to multi-second delays.   Between issuing the ssh command and getting a login prompt and between entering the passphrase and having the shell load   Now, specifically I'm looking at ssh details only here. Obviously network latency, speed of the hardware and OSes involved, complex login scripts, etc can cause delays.  For context I ssh to a vast multitude of linux distributions and some Solaris hosts using mostly Ubuntu, CentOS, and MacOS X as my client systems.  Almost all of the time, the ssh server configuration is unchanged from the OS's default settings.  What ssh server configurations should I be interested in?  Are there OS/kernel parameters that can be tuned? Login shell tricks?  Etc?


About stdin. Any example for `[n]<filename` when n~0?

Does 1<filename have any meaning?Perhaps it means "keyboard -> stdout"?


What's the difference between $\mathbb{Q}[\sqrt{-d}]$ and $\mathbb{Q}(\sqrt{-d})$?

Sorry to ask this, I know it's not really a maths question but a definition question, but Googling didn't help. When asked to show that elements in each are irreducible, is it the same?


D7 in sub directory - Not able to log in

I have a Drupal site I need to show for portfolio reasons so I have installed it in a sub directory.    I have changed the rewritebase to /subdir   Initially without that change I was served the homepage just fine but no interior pages. With that change I was able to get deeper into this site but when I went to login the backend it loaded forever and spit out this error:     Additional uncaught exception thrown while handling exception.      Original      PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT source FROM {url_alias} WHERE alias = :alias AND language IN (:language, :language_none) ORDER BY language ASC, pid DESC; Array ( [:alias] => user [:language] => en [:language_none] => und ) in drupal_lookup_path() (line 176 of /home/content/k/c/l/name/html/fsubdir/includes/path.inc).      Additional      PDOException: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array ( [:db_insert_placeholder_0] => 0 [:db_insert_placeholder_1] => php [:db_insert_placeholder_2] => %type: !message in %function (line %line of %file). [:db_insert_placeholder_3] => a:6:{s:5:"%type";s:12:"PDOException";s:8:"!message";s:284:"SQLSTATE[HY000]: General error: 2006 MySQL server has gone away: SELECT source FROM {url_alias} WHERE alias = :alias AND language IN (:language, :language_none) ORDER BY language ASC, pid DESC; Array ( [:alias] =&gt; user [:language] =&gt; en [:language_none] =&gt; und ) ";s:9:"%function";s:20:"drupal_lookup_path()";s:5:"%file";s:61:"/home/content/k/c/l/name/html/subdir/includes/path.inc";s:5:"%line";i:176;s:14:"severity_level";i:3;} [:db_insert_placeholder_4] => 3 [:db_insert_placeholder_5] => [:db_insert_placeholder_6] =>  [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => 173.10.171.18 [:db_insert_placeholder_9] => 1354293470 ) in dblog_watchdog() (line 157 of /home/content/k/c/l/name/html/subdir/modules/dblog/dblog.module).   Can anyone point me in the right direction to get this resolved?


Matlab - for loop over cell array "foreach"-like syntax loops only over the first element

I thought that if I write  for x = cell_array     ... end   then the loop will run over the elements of cell_array, but in the following case it doesn't:  >> tags  tags =       'dset3'     'dset4'     'cpl1'  >> class(tags)  ans =  cell  >> for t = tags      tmp = t{:}  %No semicolon: i.e. print it.    end  tmp =  dset3   So it only works for the first element.  What's the problem?


Prove $a \mid m$ and $b \mid m \implies \frac{a \cdot b}{\text{gcd}(a, b)} \mid m$

I'm stuck at proving:     Let $a, b, c \in \mathbb{Z}, a\cdot b \neq 0$. Prove:   $$ a \mid m \hspace{15px}\text{and}\hspace{15px} b \mid m \implies \frac{a \cdot b}{\text{gcd}(a, b)} \mid m $$   My current attempt looks like this:  Let $t := \text{gcd}(a, b)$ donate the greatest common divisor of $a$ and $b$.   $$ \implies\exists\, a', b': a = t\cdot a' \hspace{15px}\text{and}\hspace{15px} b  = t \cdot b' $$  $$ \implies \frac{a  b}{\text{gcd}(a, b)} = \frac{a  b}{t} = \frac{t  a'b}{t} = a' b $$  I know that since b \mid m: $a'b \mid m$ iff $\text{gcd}(a', b) = 1$ and $a' \mid m$, but I'm not sure whether this is the right approach to this problem.   Currently I don't know about identities involving the least common multiple.


Spaceship outruns the end of the universe - influences evolution on another planet

There is a book I read in the 1980s or 1990s from a Ca.  library. It was a hard copy not a paperback. It is not "To Outlive Eternity/Tau Zero" by Poul Anderson (I have that one). It may have been written by a woman or someone whose last name starts with an "L".  A large crew of men and women are in a new super fast space ship. They are being chased by someone and they outrun the collapse of the universe, but they have lost their home planet. They watch as the universe is reborn. They go into orbit around a planet that looks like it can support life like theirs. They are moving super fast. They look like a ring of radiation going around the planet. They put down 10 super metal markers with scientific info onto the surface of the planet. They watch the planet develop and form life like the dinosaurs and then evolve into human like life forms.  There are 2 warring countries on the planet. They block or turn off the sun to freeze the planet and force the countries to form one world government. The planet gets freezing cold and the people start to freeze. The countries agree to form one world government. The people on the ship are welcomed to the planet.


The minimum value of $x^8 – 8x^6 + 19x^4 – 12x^3 + 14x^2 – 8x + 9$ is

The minimum value of $$f(x)=x^8 – 8x^6 + 19x^4 – 12x^3 + 14x^2 – 8x + 9$$ is  (a)-1  (b)9  (c)6  (d)1  Apart from trying to obtain $1$, which in this case is simple and $f(2)=1$ is there a standard method to approach such problems.  Please keep in mind that this is an objective question in one of the competitive exam and you get around 5 mins to solve it.  Also this is asked in elementary section, so only knowledge of basic calculus and polynomials is assumed.


Which undergraduate math book cover topics about polynomials?

In China, there's a course called “Advanced Algebra," the first chapter of this course is all about polynomials, I wonder which undergraduate math books cover this topic? The details are below, sorry for the incorrect terminology, I used online dictionary for translation.  1.1 Number field 1.2 Polynomial of one indeterminate 1.3 Polynomial integral division 1.4 The greatest common divisor 1.5 The factorization theorem 1.6 Multiple factor 1.7 Polynomial function 1.8 The factor of complex coefficient in real coefficient polynomial decomposition 1.9 Polynomial with rational coefficients 1.10 Polynomial in several indeter minates 1.11 Symmetric polynomial